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 contactChannels = ref([]);
|
||||
const handleSalesModelValue = (val) => ({
|
||||
const handleSalesModelValue = (val) => {
|
||||
if (!val) val = '';
|
||||
return {
|
||||
or: [
|
||||
{ id: val },
|
||||
{ name: val },
|
||||
{ nickname: { like: '%' + val + '%' } },
|
||||
{ code: { like: `${val}%` } },
|
||||
],
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
const exprBuilder = (param, value) => {
|
||||
return {
|
||||
|
|
|
@ -12,14 +12,17 @@ defineProps({
|
|||
required: true,
|
||||
},
|
||||
});
|
||||
const handleSalesModelValue = (val) => ({
|
||||
const handleSalesModelValue = (val) => {
|
||||
if (!val) val = '';
|
||||
return {
|
||||
or: [
|
||||
{ id: val },
|
||||
{ name: val },
|
||||
{ nickname: { like: '%' + val + '%' } },
|
||||
{ code: { like: `${val}%` } },
|
||||
],
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
const exprBuilder = (param, value) => {
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue