0
0
Fork 0

Merge pull request 'fix: refs #7831 add locale & hide table params' (!660) from 7831-hotfix-addLocale into master

Reviewed-on: verdnatura/salix-front#660
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
Jorge Penadés 2024-08-30 14:08:36 +00:00
commit 124194ddcb
3 changed files with 7 additions and 3 deletions

View File

@ -201,8 +201,11 @@ function formatValue(value) {
function sanitizer(params) {
for (const [key, value] of Object.entries(params)) {
if (typeof value == 'object')
params[key] = Object.values(value)[0].replaceAll('%', '');
if (typeof value === 'object' && value !== null) {
sanitizer(value);
} else if (typeof value === 'string') {
params[key] = value.replaceAll('%', '');
}
}
return params;
}

View File

@ -12,7 +12,7 @@ import ItemListFilter from '../ItemListFilter.vue';
search-data-key="ItemList"
:searchbar-props="{
url: 'Items/filter',
label: 'searchbar.labelr',
label: 'searchbar.label',
info: 'searchbar.info',
}"
/>

View File

@ -42,6 +42,7 @@ const to = ref();
const arrayData = useArrayData('ItemLastEntries', {
url: 'Items/lastEntriesFilter',
order: ['landed DESC', 'buyFk DESC'],
searchUrl: 'itemLastEntries',
exprBuilder: exprBuilder,
userFilter: {
where: {