refactor: enhance access control and visibility logic across various components
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s

This commit is contained in:
puriphatt 2025-07-07 12:42:52 +07:00
parent a59e0c5157
commit c481266654
8 changed files with 43 additions and 30 deletions

View file

@ -34,7 +34,7 @@ import {
import { RequestWork } from 'src/stores/request-list/types';
import { storeToRefs } from 'pinia';
import useOptionStore from 'src/stores/options';
import { dialogWarningClose, canAccess } from 'src/stores/utils';
import { dialogWarningClose, canAccess, isRoleInclude } from 'src/stores/utils';
import { useI18n } from 'vue-i18n';
import { QForm } from 'quasar';
import { getName } from 'src/services/keycloak';
@ -728,7 +728,7 @@ onMounted(async () => {
<AdditionalFileExpansion
v-if="view !== CreditNoteStatus.Success"
:readonly="false"
:readonly="isRoleInclude(['sale', 'head_of_sale'])"
v-model:file-data="attachmentData"
:transform-url="
async (url: string) => {