forked from verdnatura/salix-front
refactor: refs #8194 modified select worker to allow no one filter from monitor ticket
This commit is contained in:
parent
accf61517a
commit
6c05347219
|
@ -21,6 +21,10 @@ const $props = defineProps({
|
|||
type: Object,
|
||||
default: null,
|
||||
},
|
||||
noOne: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
const value = computed({
|
||||
|
@ -54,6 +58,7 @@ const url = computed(() => {
|
|||
:fields="['id', 'name', 'nickname', 'code']"
|
||||
sort-by="nickname ASC"
|
||||
:params="$props.params"
|
||||
:no-one="$props.noOne"
|
||||
>
|
||||
<template #prepend v-if="$props.hasAvatar">
|
||||
<VnAvatar :worker-id="value" color="primary" :title="title" />
|
||||
|
@ -69,8 +74,12 @@ const url = computed(() => {
|
|||
<QItemSection>
|
||||
<QItemLabel>
|
||||
{{ scope.opt.name }}
|
||||
{{ console.log('scope.opt: ', scope.opt) }}
|
||||
</QItemLabel>
|
||||
<QItemLabel caption>
|
||||
<QItemLabel v-if="!scope.opt.id">
|
||||
{{ scope.opt.nickname }}
|
||||
</QItemLabel>
|
||||
<QItemLabel caption v-if="scope.opt.id">
|
||||
{{ scope.opt.nickname }},
|
||||
{{ scope.opt.code }}
|
||||
</QItemLabel>
|
||||
|
|
|
@ -122,19 +122,6 @@ const getLocale = (label) => {
|
|||
:params="{ departmentCodes: ['VT'] }"
|
||||
:no-one="true"
|
||||
>
|
||||
<template #option="{ opt, itemProps }">
|
||||
<QItem v-bind="itemProps">
|
||||
<QItemSection>
|
||||
<QItemLabel>{{ opt.name }}</QItemLabel>
|
||||
<QItemLabel
|
||||
v-if="opt.code"
|
||||
class="text-grey text-caption"
|
||||
>
|
||||
{{ `${opt.nickname}, ${opt.code}` }}
|
||||
</QItemLabel>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnSelectWorker>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
|
|
Loading…
Reference in New Issue