Skip to content

Commit

Permalink
Improved: Clear selected user state and navigate to the create user p…
Browse files Browse the repository at this point in the history
…age on Users page(hotwax#214)
  • Loading branch information
R-Sourabh committed Apr 19, 2024
1 parent d043e88 commit 60e2b2d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/views/UserConfirmation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
},
props: ['partyId'],
async ionViewWillEnter() {
this.selectedUser = '';
emitter.emit('presentLoader')
await this.store.dispatch("user/getSelectedUserDetails", { partyId: this.partyId });
emitter.emit('dismissLoader')
Expand Down
9 changes: 7 additions & 2 deletions src/views/Users.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
</div>

<ion-fab vertical="bottom" horizontal="end" slot="fixed">
<ion-fab-button :disabled="!hasPermission(Actions.APP_USER_CREATE)" @click="router.push('/create-user')">
<ion-fab-button :disabled="!hasPermission(Actions.APP_USER_CREATE)" @click="handleNewUser()">
<ion-icon :icon="addOutline" />
</ion-fab-button>
</ion-fab>
Expand Down Expand Up @@ -206,7 +206,8 @@ export default defineComponent({
securityGroups: 'util/getSecurityGroups',
query: 'user/getQuery',
isScrollable: "user/isScrollable",
userProfile: 'user/getUserProfile'
userProfile: 'user/getUserProfile',
selectedUser: 'user/getSelectedUser'
})
},
data() {
Expand All @@ -221,6 +222,10 @@ export default defineComponent({
await this.store.dispatch('util/getSecurityGroups')
},
methods: {
handleNewUser(){
this.selectedUser = '';
this.router.push('/create-user');
},
getDate(date: any) {
return DateTime.fromMillis(date).toFormat('dd LLL yyyy')
},
Expand Down

0 comments on commit 60e2b2d

Please sign in to comment.