Merge pull request 'Warmfix[ZoneList]: Fixed id filter' (!1739) from Warmfix-ZoneListIdFilter into test
gitea/salix-front/pipeline/head This commit looks good
Details
gitea/salix-front/pipeline/head This commit looks good
Details
Reviewed-on: #1739 Reviewed-by: Javier Segarra <jsegarra@verdnatura.es>
This commit is contained in:
commit
3876dc4c34
|
@ -188,16 +188,14 @@ const exprBuilder = (param, value) => {
|
||||||
return {
|
return {
|
||||||
code: { like: `%${value}%` },
|
code: { like: `%${value}%` },
|
||||||
};
|
};
|
||||||
|
case 'id':
|
||||||
|
case 'price':
|
||||||
case 'agencyModeFk':
|
case 'agencyModeFk':
|
||||||
return {
|
return {
|
||||||
agencyModeFk: value,
|
[param]: value,
|
||||||
};
|
};
|
||||||
case 'search':
|
case 'search':
|
||||||
return /^\d+$/.test(value) ? { id: value } : { name: { like: `%${value}%` } };
|
return /^\d+$/.test(value) ? { id: value } : { name: { like: `%${value}%` } };
|
||||||
case 'price':
|
|
||||||
return {
|
|
||||||
price: value,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue