perf: improve

This commit is contained in:
Javier Segarra 2024-09-17 13:48:17 +02:00
parent 29e4c723c9
commit c7bef79c0a
1 changed files with 3 additions and 5 deletions

View File

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