forked from verdnatura/salix-front
Merge pull request 'feat: refs #6724 Disabled QCheckbox entry isBooked' (!292) from 6724-disableEntryBooked into dev
Reviewed-on: verdnatura/salix-front#292 Reviewed-by: Javi Gallego <jgallego@verdnatura.es> Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
This commit is contained in:
commit
a8ac00f7e4
|
@ -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([]);
|
||||||
|
@ -206,6 +209,7 @@ const onFilterTravelSelected = (formData, id) => {
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<QCheckbox
|
<QCheckbox
|
||||||
|
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