Fix loader on local user management page

Loader for batch delete should start after confirming the
action in the modal.

Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: I5c4a4a5c0f98b51757f614423232cd6e08e90902
diff --git a/src/views/AccessControl/LocalUserManagement/LocalUserManagement.vue b/src/views/AccessControl/LocalUserManagement/LocalUserManagement.vue
index 3143c14..cf7cc22 100644
--- a/src/views/AccessControl/LocalUserManagement/LocalUserManagement.vue
+++ b/src/views/AccessControl/LocalUserManagement/LocalUserManagement.vue
@@ -259,7 +259,6 @@
         .finally(() => this.endLoader());
     },
     onBatchAction(action) {
-      this.startLoader();
       switch (action) {
         case 'delete':
           this.$bvModal
@@ -281,6 +280,7 @@
             )
             .then(deleteConfirmed => {
               if (deleteConfirmed) {
+                this.startLoader();
                 this.$store
                   .dispatch('localUsers/deleteUsers', this.selectedRows)
                   .then(messages => {
@@ -294,6 +294,7 @@
             });
           break;
         case 'enable':
+          this.startLoader();
           this.$store
             .dispatch('localUsers/enableUsers', this.selectedRows)
             .then(messages => {
@@ -305,6 +306,7 @@
             .finally(() => this.endLoader());
           break;
         case 'disable':
+          this.startLoader();
           this.$store
             .dispatch('localUsers/disableUsers', this.selectedRows)
             .then(messages => {
@@ -315,8 +317,6 @@
             })
             .finally(() => this.endLoader());
           break;
-        default:
-          this.endLoader();
       }
     },
     onTableRowAction(action, row) {