fix: #8192 find by thermographFk instead id
gitea/salix-front/pipeline/pr-master Build queued... Details

This commit is contained in:
Javier Segarra 2024-11-14 12:59:18 +01:00
parent 55b4c07e80
commit faf307bc16
1 changed files with 20 additions and 0 deletions

View File

@ -133,6 +133,25 @@ const onThermographCreated = async (data) => {
warehouseId: data.warehouseFk,
};
};
const exprBuilder = (param, value) => {
switch (param) {
case 'search':
return /^\d+$/.test(value)
? { id: value }
: {
or: [
{ name: { like: `%${value}%` } },
{ nickname: { like: `%${value}%` } },
],
};
case 'name':
case 'nickname':
return { [param]: { like: `%${value}%` } };
case 'roleFk':
return { [param]: value };
}
};
</script>
<template>
<FetchData
@ -205,6 +224,7 @@ const onThermographCreated = async (data) => {
}"
sort-by="thermographFk ASC"
option-label="thermographFk"
option-filter-value="thermographFk"
:disable="viewAction === 'edit'"
:tooltip="t('New thermograph')"
:roles-allowed-to-create="['logistic']"