@@ -433,11 +433,13 @@ export default {
433433 * Attach the selected resource.
434434 */
435435 async attachResource () {
436+ this .isWorking = true
436437 this .submittedViaAttachResource = true
437438
438439 try {
439440 await this .attachRequest ()
440441
442+ this .isWorking = false
441443 this .submittedViaAttachResource = false
442444
443445 await this .fetchPolicies (),
@@ -447,6 +449,7 @@ export default {
447449 } catch (error) {
448450 window .scrollTo (0 , 0 )
449451
452+ this .isWorking = false
450453 this .submittedViaAttachResource = false
451454
452455 this .handleOnCreateResponseError (error)
@@ -457,6 +460,7 @@ export default {
457460 * Attach a new resource and reset the form
458461 */
459462 async attachAndAttachAnother () {
463+ this .isWorking = true
460464 this .submittedViaAttachAndAttachAnother = true
461465
462466 try {
@@ -466,15 +470,16 @@ export default {
466470
467471 this .disableNavigateBackUsingHistory ()
468472
469- Nova .success (this .__ (' The resource was attached!' ))
470-
473+ this .isWorking = false
471474 this .submittedViaAttachAndAttachAnother = false
472475
473- await this .fetchPolicies ()
476+ await this .fetchPolicies (),
477+ Nova .success (this .__ (' The resource was attached!' ))
474478
475479 // Reset the form by refetching the fields
476480 this .initializeComponent ()
477481 } catch (error) {
482+ this .isWorking = false
478483 this .submittedViaAttachAndAttachAnother = false
479484
480485 this .handleOnCreateResponseError (error)
0 commit comments