forked from verdnatura/salix-front
fix: #8192 find by thermographFk instead id
This commit is contained in:
parent
55b4c07e80
commit
faf307bc16
|
@ -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']"
|
||||||
|
|
Loading…
Reference in New Issue