Item types #319

Merged
jsegarra merged 28 commits from :feature/ItemFamily into dev 2024-05-02 07:39:59 +00:00
1 changed files with 34 additions and 4 deletions
Showing only changes of commit 6276c433d1 - Show all commits

View File

@ -24,10 +24,40 @@ const redirectToItemTypeSummary = (id) => {
const redirectToCreateView = () => {
router.push({ name: 'ItemTypeCreate' });
};
const exprBuilder = (param, value) => ({
name: { like: `%${value}%` },
code: { like: `%${value}%` },
});
Outdated
Review

En Salix no esta así.
Pero en todo caso seria con un OR.

En Salix no esta así. Pero en todo caso seria con un OR.

exprBuilder corregido.

Commit: 6276c433d1

exprBuilder corregido. Commit: https://gitea.verdnatura.es/verdnatura/salix-front/commit/6276c433d13b9afea9e3e2726bd0dda469bdc14e
const exprBuilder = (param, value) => {
switch (param) {
case 'name':
return {
name: { like: `%${value}%` },
};
case 'code':
return {
code: { like: `%${value}%` },
};
case 'search':
if (value) {
if (!isNaN(value)) {
return { id: value };
} else {
return {
or: [
{
name: {
like: `%${value}%`,
},
},
{
code: {
like: `%${value}%`,
},
},
],
};
}
}
}
};
</script>
<template>