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,
|
type: Object,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
noOne: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const value = computed({
|
const value = computed({
|
||||||
|
@ -54,6 +58,7 @@ const url = computed(() => {
|
||||||
:fields="['id', 'name', 'nickname', 'code']"
|
:fields="['id', 'name', 'nickname', 'code']"
|
||||||
sort-by="nickname ASC"
|
sort-by="nickname ASC"
|
||||||
:params="$props.params"
|
:params="$props.params"
|
||||||
|
:no-one="$props.noOne"
|
||||||
>
|
>
|
||||||
<template #prepend v-if="$props.hasAvatar">
|
<template #prepend v-if="$props.hasAvatar">
|
||||||
<VnAvatar :worker-id="value" color="primary" :title="title" />
|
<VnAvatar :worker-id="value" color="primary" :title="title" />
|
||||||
|
@ -69,8 +74,12 @@ const url = computed(() => {
|
||||||
<QItemSection>
|
<QItemSection>
|
||||||
<QItemLabel>
|
<QItemLabel>
|
||||||
{{ scope.opt.name }}
|
{{ scope.opt.name }}
|
||||||
|
{{ console.log('scope.opt: ', scope.opt) }}
|
||||||
</QItemLabel>
|
</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.nickname }},
|
||||||
{{ scope.opt.code }}
|
{{ scope.opt.code }}
|
||||||
</QItemLabel>
|
</QItemLabel>
|
||||||
|
|
|
@ -122,19 +122,6 @@ const getLocale = (label) => {
|
||||||
:params="{ departmentCodes: ['VT'] }"
|
:params="{ departmentCodes: ['VT'] }"
|
||||||
:no-one="true"
|
: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>
|
</VnSelectWorker>
|
||||||
</QItemSection>
|
</QItemSection>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
|
Loading…
Reference in New Issue