0
0
Fork 0

feat: refs #7349 usa back con permisos

This commit is contained in:
Javi Gallego 2024-10-23 07:45:00 +02:00
parent 735ee09ef8
commit ae56c06628
3 changed files with 53 additions and 16 deletions

View File

@ -258,15 +258,28 @@ onBeforeMount(() => {
<template #body-cell-attender="{ row }"> <template #body-cell-attender="{ row }">
<QTd> <QTd>
<VnSelect <VnSelect
url="Workers/search"
v-model="row.attenderFk" v-model="row.attenderFk"
:where="{ role: 'buyer' }" :params="{ departmentCodes: ['shopping'] }"
sort-by="id" :fields="['id', 'nickname']"
url="Workers" sort-by="nickname ASC"
hide-selected hide-selected
option-label="firstName" option-label="nickname"
option-value="id" option-value="id"
dense dense
/> >
<template #option="scope">
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
<QItemLabel caption
>{{ scope.opt?.nickname }},
{{ scope.opt?.code }}</QItemLabel
>
</QItemSection>
</QItem>
</template>
</VnSelect>
</QTd> </QTd>
</template> </template>
<template #body-cell-item="{ row }"> <template #body-cell-item="{ row }">

View File

@ -52,15 +52,27 @@ const redirectToItemTypeBasicData = (_, { id }) => {
</VnRow> </VnRow>
<VnRow> <VnRow>
<VnSelect <VnSelect
url="Workers/search"
v-model="data.workerFk" v-model="data.workerFk"
:label="t('itemType.shared.worker')" :label="t('shared.worker')"
url="Workers" sort-by="nickname ASC"
sort-by="firstName ASC" :fields="['id', 'nickname']"
:fields="['id', 'firstName']" :params="{ departmentCodes: ['shopping'] }"
option-label="nickname"
option-value="id" option-value="id"
option-label="firstName"
hide-selected hide-selected
/> ><template #option="scope">
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
<QItemLabel caption
>{{ scope.opt?.nickname }},
{{ scope.opt?.code }}</QItemLabel
>
</QItemSection>
</QItem>
</template>
</VnSelect>
<VnSelect <VnSelect
v-model="data.categoryFk" v-model="data.categoryFk"
:label="t('itemType.shared.category')" :label="t('itemType.shared.category')"

View File

@ -41,15 +41,27 @@ const temperaturesOptions = ref([]);
</VnRow> </VnRow>
<VnRow> <VnRow>
<VnSelect <VnSelect
url="Workers/search"
v-model="data.workerFk" v-model="data.workerFk"
:label="t('shared.worker')" :label="t('shared.worker')"
url="Workers" sort-by="nickname ASC"
sort-by="firstName ASC" :fields="['id', 'nickname']"
:fields="['id', 'firstName']" :params="{ departmentCodes: ['shopping'] }"
option-label="nickname"
option-value="id" option-value="id"
option-label="firstName"
hide-selected hide-selected
/> ><template #option="scope">
<QItem v-bind="scope.itemProps">
<QItemSection>
<QItemLabel>{{ scope.opt?.name }}</QItemLabel>
<QItemLabel caption
>{{ scope.opt?.nickname }},
{{ scope.opt?.code }}</QItemLabel
>
</QItemSection>
</QItem>
</template></VnSelect
>
<VnSelect <VnSelect
v-model="data.categoryFk" v-model="data.categoryFk"
:label="t('shared.category')" :label="t('shared.category')"