Skip to content

Commit

Permalink
Merge pull request #106 from Ritika-Patel08/#105
Browse files Browse the repository at this point in the history
Improved: code by changing 'find-user' to 'users' in route as well as in landing tab and renamed FindUsers.vue to Users.vue (#105)
  • Loading branch information
ravilodhi authored Mar 7, 2024
2 parents d75c73c + 131bf27 commit 4444ed1
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/components/FilterMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default defineComponent({
},
methods: {
closeMenu() {
// Query Updation and fetchUsers action automatically gets handled by the event handlers on FindUsers page
// Query Updation and fetchUsers action automatically gets handled by the event handlers on Users page
// Hence, we don't need to call query updation action and just need to close the menu.
menuController.close()
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<ion-tabs>
<ion-router-outlet></ion-router-outlet>
<ion-tab-bar slot="bottom">
<ion-tab-button tab="users" href="/tabs/find-users">
<ion-tab-button tab="users" href="/tabs/users">
<ion-icon :icon="personOutline" />
<ion-label>{{ translate("Find Users") }}</ion-label>
<ion-label>{{ translate("Users") }}</ion-label>
</ion-tab-button>
<ion-tab-button tab="permissions" href="/tabs/permissions">
<ion-icon :icon="idCardOutline" />
Expand Down
1 change: 0 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
"Fields cannot be empty.": "Fields cannot be empty.",
"Filters": "Filters",
"Finish and create new user": "Finish and create new user",
"Find Users": "Find Users",
"Finish setup": "Finish setup",
"First name": "First name",
"First name is required.": "First name is required.",
Expand Down
6 changes: 3 additions & 3 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const loginGuard = (to: any, from: any, next: any) => {
const routes: Array<RouteRecordRaw> = [
{
path: '/',
redirect: '/tabs/find-users'
redirect: '/tabs/users'
},
{
path: '/login',
Expand All @@ -56,8 +56,8 @@ const routes: Array<RouteRecordRaw> = [
component: Tabs,
children: [
{
path: 'find-users',
component: () => import('@/views/FindUsers.vue'),
path: 'users',
component: () => import('@/views/Users.vue'),
},{
path: 'settings',
component: () => import('@/views/Settings.vue')
Expand Down
2 changes: 1 addition & 1 deletion src/views/CreateUser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ion-page>
<ion-header>
<ion-toolbar>
<ion-back-button default-href="/tabs/find-users" slot="start"></ion-back-button>
<ion-back-button default-href="/tabs/users" slot="start"></ion-back-button>
<ion-title>{{ translate("Create user") }}</ion-title>
</ion-toolbar>
</ion-header>
Expand Down
2 changes: 1 addition & 1 deletion src/views/Permissions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export default defineComponent({
},
async openCurrentGroupUsers() {
await this.store.dispatch('user/updateQuery', {queryString: '', securityGroup: this.currentGroup.groupId, status: '', hideDisabledUser: true})
this.router.replace('find-users')
this.router.replace('users')
},
async downloadCSVForPermissions() {
if(!Object.keys(this.currentGroupPermissions).length) {
Expand Down
2 changes: 1 addition & 1 deletion src/views/UserConfirmation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ion-page>
<ion-header>
<ion-toolbar>
<ion-back-button default-href="/tabs/find-users" slot="start"></ion-back-button>
<ion-back-button default-href="/tabs/users" slot="start"></ion-back-button>
<ion-title>{{ translate("Create user") }}</ion-title>
</ion-toolbar>
</ion-header>
Expand Down
2 changes: 1 addition & 1 deletion src/views/UserDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ion-page>
<ion-header :translucent="true">
<ion-toolbar>
<ion-back-button slot="start" default-href="/tabs/find-users" />
<ion-back-button slot="start" default-href="/tabs/users" />
<ion-title>{{ translate("User details") }}</ion-title>
</ion-toolbar>
</ion-header>
Expand Down
4 changes: 2 additions & 2 deletions src/views/FindUsers.vue → src/views/Users.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<ion-header :translucent="true">
<ion-toolbar>
<ion-title>{{ translate("Find Users") }}</ion-title>
<ion-title>{{ translate("Users") }}</ion-title>
<ion-menu-button slot="end" class="mobile-only">
<ion-icon :icon="optionsOutline" />
</ion-menu-button>
Expand Down Expand Up @@ -179,7 +179,7 @@ import { hasError } from '@/adapter';
import { Actions, hasPermission } from '@/authorization'
export default defineComponent({
name: 'FindUsers',
name: 'Users',
components: {
FilterMenu,
IonBadge,
Expand Down

0 comments on commit 4444ed1

Please sign in to comment.