Merge pull request 'fix: refs #7133 handleSalesModelValue function to handle empty input' (!1116) from 7133-fixCustomerSelect into dev
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
Reviewed-on: #1116 Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
commit
7ef1e49277
|
@ -16,14 +16,17 @@ const { t } = useI18n();
|
||||||
|
|
||||||
const businessTypes = ref([]);
|
const businessTypes = ref([]);
|
||||||
const contactChannels = ref([]);
|
const contactChannels = ref([]);
|
||||||
const handleSalesModelValue = (val) => ({
|
const handleSalesModelValue = (val) => {
|
||||||
|
if (!val) val = '';
|
||||||
|
return {
|
||||||
or: [
|
or: [
|
||||||
{ id: val },
|
{ id: val },
|
||||||
{ name: val },
|
{ name: val },
|
||||||
{ nickname: { like: '%' + val + '%' } },
|
{ nickname: { like: '%' + val + '%' } },
|
||||||
{ code: { like: `${val}%` } },
|
{ code: { like: `${val}%` } },
|
||||||
],
|
],
|
||||||
});
|
};
|
||||||
|
};
|
||||||
|
|
||||||
const exprBuilder = (param, value) => {
|
const exprBuilder = (param, value) => {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -12,14 +12,17 @@ defineProps({
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const handleSalesModelValue = (val) => ({
|
const handleSalesModelValue = (val) => {
|
||||||
|
if (!val) val = '';
|
||||||
|
return {
|
||||||
or: [
|
or: [
|
||||||
{ id: val },
|
{ id: val },
|
||||||
{ name: val },
|
{ name: val },
|
||||||
{ nickname: { like: '%' + val + '%' } },
|
{ nickname: { like: '%' + val + '%' } },
|
||||||
{ code: { like: `${val}%` } },
|
{ code: { like: `${val}%` } },
|
||||||
],
|
],
|
||||||
});
|
};
|
||||||
|
};
|
||||||
|
|
||||||
const exprBuilder = (param, value) => {
|
const exprBuilder = (param, value) => {
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue