Skip to content

Commit

Permalink
Merge pull request #300 from ymaheshwari1/#277
Browse files Browse the repository at this point in the history
Fixed: issue of empty state not being displayed when searching for a permission whose type is HIDDEN(#277)
  • Loading branch information
ymaheshwari1 authored Nov 6, 2024
2 parents dd181d0 + a3595d1 commit 18d5646
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/PermissionItems.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@

<template v-if="arePermissionsAvailable()">
<div v-for="(group, groupId) in filteredPermissions" :key="groupId">
<ion-item-divider v-if="group.groupId !== 'SGC_HIDDEN' && group.permissions.length" class="ion-margin-vertical" color="light">
<ion-item-divider v-if="group.permissions.length" class="ion-margin-vertical" color="light">
<ion-label>
{{ group.groupName || group.groupId }}
</ion-label>
<ion-note slot="end">{{ group.permissions.length }}</ion-note>
</ion-item-divider>

<section v-if="group.groupId !== 'SGC_HIDDEN'">
<section>
<ion-card v-for="permission in group.permissions" :key="permission.permissionId" button @click="updatePermissionAssociation(permission)">
<ion-card-header>
<div>
Expand Down
3 changes: 3 additions & 0 deletions src/store/modules/permission/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ const getters: GetterTree<PermissionState, RootState> = {
})
}

// Remove the hidden permissions so to not display them on the UI
delete groupType["SGC_HIDDEN"];

return groupType
},
getQuery(state) {
Expand Down

0 comments on commit 18d5646

Please sign in to comment.