refactor: Check the conditions

This commit is contained in:
Net 2024-08-30 11:42:52 +07:00
parent 306b5d6005
commit ac1dddf5c3

View file

@ -3,6 +3,7 @@ import useUserStore from 'stores/user';
import { selectFilterOptionRefMod } from 'stores/utils';
import { onMounted, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { isRoleInclude } from 'src/stores/utils';
const userStore = useUserStore();
const { t } = useI18n();
@ -100,6 +101,7 @@ onMounted(async () => {
map-options
hide-selected
hide-bottom-space
:disable="isRoleInclude(['branch_manager']) && !readonly"
v-model="hqId"
for="select-hq-id"
input-debounce="0"
@ -148,6 +150,7 @@ onMounted(async () => {
option-value="value"
lazy-rules="ondemand"
class="col-md-2 col-12"
:disable="isRoleInclude(['branch_manager']) && !readonly"
:dense="dense"
:readonly="readonly"
:hide-dropdown-icon="readonly"