@@ -433,11 +433,13 @@ export default {
433
433
* Attach the selected resource.
434
434
*/
435
435
async attachResource () {
436
+ this .isWorking = true
436
437
this .submittedViaAttachResource = true
437
438
438
439
try {
439
440
await this .attachRequest ()
440
441
442
+ this .isWorking = false
441
443
this .submittedViaAttachResource = false
442
444
443
445
await this .fetchPolicies (),
@@ -447,6 +449,7 @@ export default {
447
449
} catch (error) {
448
450
window .scrollTo (0 , 0 )
449
451
452
+ this .isWorking = false
450
453
this .submittedViaAttachResource = false
451
454
452
455
this .handleOnCreateResponseError (error)
@@ -457,6 +460,7 @@ export default {
457
460
* Attach a new resource and reset the form
458
461
*/
459
462
async attachAndAttachAnother () {
463
+ this .isWorking = true
460
464
this .submittedViaAttachAndAttachAnother = true
461
465
462
466
try {
@@ -466,15 +470,16 @@ export default {
466
470
467
471
this .disableNavigateBackUsingHistory ()
468
472
469
- Nova .success (this .__ (' The resource was attached!' ))
470
-
473
+ this .isWorking = false
471
474
this .submittedViaAttachAndAttachAnother = false
472
475
473
- await this .fetchPolicies ()
476
+ await this .fetchPolicies (),
477
+ Nova .success (this .__ (' The resource was attached!' ))
474
478
475
479
// Reset the form by refetching the fields
476
480
this .initializeComponent ()
477
481
} catch (error) {
482
+ this .isWorking = false
478
483
this .submittedViaAttachAndAttachAnother = false
479
484
480
485
this .handleOnCreateResponseError (error)
0 commit comments