forked from verdnatura/salix-front
feat: refs #6724 Restriction QCheckbox entry isBooked
This commit is contained in:
parent
de68af5e13
commit
46fa06cf1e
|
@ -2,6 +2,7 @@
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import { useRole } from 'src/composables/useRole';
|
||||||
|
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import FormModel from 'components/FormModel.vue';
|
import FormModel from 'components/FormModel.vue';
|
||||||
|
@ -15,6 +16,8 @@ import { toDate } from 'src/filters';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const { hasAny } = useRole();
|
||||||
|
const isAdministrative = () => hasAny(['administrative']);
|
||||||
|
|
||||||
const suppliersOptions = ref([]);
|
const suppliersOptions = ref([]);
|
||||||
const travelsOptions = ref([]);
|
const travelsOptions = ref([]);
|
||||||
|
@ -205,9 +208,8 @@ const onFilterTravelSelected = (formData, id) => {
|
||||||
<QCheckbox v-model="data.isRaid" :label="t('entry.basicData.raid')" />
|
<QCheckbox v-model="data.isRaid" :label="t('entry.basicData.raid')" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<!-- refs #6724 Cuando exista propiedad vn-acl o similar habilitar -->
|
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
disable
|
v-if="isAdministrative()"
|
||||||
v-model="data.isBooked"
|
v-model="data.isBooked"
|
||||||
:label="t('entry.basicData.booked')"
|
:label="t('entry.basicData.booked')"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue