refactor: agencies role check
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 7s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 7s
This commit is contained in:
parent
2d7b0189ee
commit
5e76c4d50d
2 changed files with 8 additions and 2 deletions
|
|
@ -62,6 +62,7 @@ const props = withDefaults(
|
|||
defineProps<{
|
||||
readonly?: boolean;
|
||||
isEdit?: boolean;
|
||||
hideAction?: boolean;
|
||||
|
||||
dataId?: string;
|
||||
}>(),
|
||||
|
|
@ -411,6 +412,7 @@ watch(
|
|||
:prefix="data.name"
|
||||
hide-fade
|
||||
use-toggle
|
||||
:readonly="hideAction"
|
||||
:active="data.status !== 'INACTIVE'"
|
||||
:toggle-title="$t('status.title')"
|
||||
:icon="'ph-building-office'"
|
||||
|
|
@ -450,7 +452,7 @@ watch(
|
|||
style="position: absolute; z-index: 999; top: 0; right: 0"
|
||||
>
|
||||
<div
|
||||
v-if="data.status !== 'INACTIVE'"
|
||||
v-if="data.status !== 'INACTIVE' && !hideAction"
|
||||
class="surface-1 row rounded"
|
||||
>
|
||||
<UndoButton
|
||||
|
|
@ -597,6 +599,7 @@ watch(
|
|||
v-model:on-create-data-list="imageListOnCreate"
|
||||
v-model:image-url="imageState.imageUrl"
|
||||
v-model:data-list="imageList"
|
||||
:changeDisabled="hideAction"
|
||||
:on-create="model"
|
||||
:hiddenFooter="!imageState.isImageEdit"
|
||||
@add-image="addImage"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import { Icon } from '@iconify/vue/dist/iconify.js';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
import { useQuasar } from 'quasar';
|
||||
|
||||
import { baseUrl } from 'src/stores/utils';
|
||||
import { baseUrl, canAccess } from 'src/stores/utils';
|
||||
import { useNavigator } from 'src/stores/navigator';
|
||||
import { useInstitution } from 'src/stores/institution';
|
||||
import { Institution, InstitutionPayload } from 'src/stores/institution/types';
|
||||
|
|
@ -750,6 +750,7 @@ watch(
|
|||
"
|
||||
/>
|
||||
<KebabAction
|
||||
v-if="canAccess('agencies', 'edit')"
|
||||
:id-name="props.row.name"
|
||||
:status="props.row.status"
|
||||
@view="
|
||||
|
|
@ -833,6 +834,7 @@ watch(
|
|||
"
|
||||
/>
|
||||
<KebabAction
|
||||
v-if="canAccess('agencies', 'edit')"
|
||||
:id-name="props.row.id"
|
||||
:status="props.row.status"
|
||||
@view="
|
||||
|
|
@ -973,6 +975,7 @@ watch(
|
|||
@change-status="triggerChangeStatus"
|
||||
:readonly="!pageState.isDrawerEdit"
|
||||
:isEdit="pageState.isDrawerEdit"
|
||||
:hide-action="!canAccess('agencies', 'edit')"
|
||||
v-model="pageState.addModal"
|
||||
v-model:drawer-model="pageState.viewDrawer"
|
||||
v-model:data="formData"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue