forked from verdnatura/salix-front
Reviewed-on: verdnatura/salix-front#855 Reviewed-by: Alex Moreno <alexm@verdnatura.es>
This commit is contained in:
commit
3cbd294168
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { ref, watch } from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import { useValidator } from 'src/composables/useValidator';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
|
|
|
@ -258,15 +258,28 @@ onBeforeMount(() => {
|
|||
<template #body-cell-attender="{ row }">
|
||||
<QTd>
|
||||
<VnSelect
|
||||
url="Workers/search"
|
||||
v-model="row.attenderFk"
|
||||
:where="{ role: 'buyer' }"
|
||||
sort-by="id"
|
||||
url="Workers"
|
||||
:params="{ departmentCodes: ['shopping'] }"
|
||||
:fields="['id', 'nickname']"
|
||||
sort-by="nickname ASC"
|
||||
hide-selected
|
||||
option-label="firstName"
|
||||
option-label="nickname"
|
||||
option-value="id"
|
||||
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>
|
||||
</template>
|
||||
<template #body-cell-item="{ row }">
|
||||
|
|
|
@ -52,15 +52,27 @@ const redirectToItemTypeBasicData = (_, { id }) => {
|
|||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
url="Workers/search"
|
||||
v-model="data.workerFk"
|
||||
:label="t('itemType.shared.worker')"
|
||||
url="Workers"
|
||||
sort-by="firstName ASC"
|
||||
:fields="['id', 'firstName']"
|
||||
:label="t('shared.worker')"
|
||||
sort-by="nickname ASC"
|
||||
:fields="['id', 'nickname']"
|
||||
:params="{ departmentCodes: ['shopping'] }"
|
||||
option-label="nickname"
|
||||
option-value="id"
|
||||
option-label="firstName"
|
||||
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
|
||||
v-model="data.categoryFk"
|
||||
:label="t('itemType.shared.category')"
|
||||
|
|
|
@ -41,15 +41,27 @@ const temperaturesOptions = ref([]);
|
|||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
url="Workers/search"
|
||||
v-model="data.workerFk"
|
||||
:label="t('shared.worker')"
|
||||
url="Workers"
|
||||
sort-by="firstName ASC"
|
||||
:fields="['id', 'firstName']"
|
||||
sort-by="nickname ASC"
|
||||
:fields="['id', 'nickname']"
|
||||
:params="{ departmentCodes: ['shopping'] }"
|
||||
option-label="nickname"
|
||||
option-value="id"
|
||||
option-label="firstName"
|
||||
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
|
||||
v-model="data.categoryFk"
|
||||
:label="t('shared.category')"
|
||||
|
|
Loading…
Reference in New Issue