#6943 - Customer module find salesPersons out of first get #711

Merged
jsegarra merged 25 commits from 6943_fix_customer_module into dev 2024-09-23 12:25:22 +00:00
1 changed files with 3 additions and 5 deletions
Showing only changes of commit c7bef79c0a - Show all commits

View File

@ -17,9 +17,7 @@ const businessTypes = ref([]);
const contactChannels = ref([]); const contactChannels = ref([]);
const title = ref(); const title = ref();
const handleSalesModelValue = (val) => { const handleSalesModelValue = (val) => {
if (salesPersonFilter.value.and.length == 0) salesPersonFilter.value.and.push = []; filter.value.and[1] = {
salesPersonFilter.value.and[1] = {
or: [ or: [
{ name: val }, { name: val },
{ nickname: { like: '%' + val + '%' } }, { nickname: { like: '%' + val + '%' } },
@ -28,7 +26,7 @@ const handleSalesModelValue = (val) => {
}; };
}; };
const salesPersonFilter = ref({ const filter = ref({
and: [{ active: { neq: false } }], and: [{ active: { neq: false } }],
}); });
</script> </script>
@ -111,7 +109,7 @@ const salesPersonFilter = ref({
:params="{ :params="{
departmentCodes: ['VT', 'shopping'], departmentCodes: ['VT', 'shopping'],
}" }"
:where="salesPersonFilter" :where="filter"
:fields="['id', 'nickname']" :fields="['id', 'nickname']"
sort-by="nickname ASC" sort-by="nickname ASC"
:rules="validate('client.salesPersonFk')" :rules="validate('client.salesPersonFk')"