0
0
Fork 0

fix: #8192 find by thermographFk instead id

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, 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> </script>
<template> <template>
<FetchData <FetchData
@ -205,6 +224,7 @@ const onThermographCreated = async (data) => {
}" }"
sort-by="thermographFk ASC" sort-by="thermographFk ASC"
option-label="thermographFk" option-label="thermographFk"
option-filter-value="thermographFk"
:disable="viewAction === 'edit'" :disable="viewAction === 'edit'"
:tooltip="t('New thermograph')" :tooltip="t('New thermograph')"
:roles-allowed-to-create="['logistic']" :roles-allowed-to-create="['logistic']"