solveConflicts_test_to_dev #957

Merged
alexm merged 58 commits from solveConflicts_test_to_dev into dev 2024-11-18 10:21:51 +00:00
1 changed files with 32 additions and 3 deletions
Showing only changes of commit cb1c050343 - Show all commits

View File

@ -11,6 +11,20 @@ defineProps({
required: true, required: true,
}, },
}); });
const handleSalesModelValue = (val) => ({
or: [
{ id: val },
{ name: val },
{ nickname: { like: '%' + val + '%' } },
{ code: { like: `${val}%` } },
],
});
const exprBuilder = (param, value) => {
return {
and: [{ active: { neq: false } }, handleSalesModelValue(value)],
};
};
</script> </script>
<template> <template>
@ -52,14 +66,18 @@ defineProps({
<QItem class="q-mb-sm"> <QItem class="q-mb-sm">
<QItemSection> <QItemSection>
<VnSelect <VnSelect
url="Workers/activeWithInheritedRole" url="Workers/search"
:filter="{ where: { role: 'salesPerson' } }" :params="{
departmentCodes: ['VT'],
}"
auto-load auto-load
:label="t('Salesperson')" :label="t('Salesperson')"
:expr-builder="exprBuilder"
v-model="params.salesPersonFk" v-model="params.salesPersonFk"
@update:model-value="searchFn()" @update:model-value="searchFn()"
option-value="id" option-value="id"
option-label="name" option-label="name"
sort-by="nickname ASC"
emit-value emit-value
map-options map-options
use-input use-input
@ -68,7 +86,18 @@ defineProps({
outlined outlined
rounded rounded
:input-debounce="0" :input-debounce="0"
/> >
<template #option="{ itemProps, opt }">
<QItem v-bind="itemProps">
<QItemSection>
<QItemLabel>{{ opt.name }}</QItemLabel>
<QItemLabel caption>
{{ opt.nickname }},{{ opt.code }}
</QItemLabel>
</QItemSection>
</QItem>
</template></VnSelect
>
</QItemSection> </QItemSection>
</QItem> </QItem>
<QItem class="q-mb-sm"> <QItem class="q-mb-sm">