revert: refs #8197 arrayData changes

This commit is contained in:
Alex Moreno 2024-12-04 09:49:48 +01:00
parent 1b2af7cb84
commit 2d2501838b
2 changed files with 8 additions and 3 deletions

View File

@ -75,13 +75,18 @@ export function useArrayData(key = useRoute().meta.moduleName, userOptions) {
limit: store.limit, limit: store.limit,
}; };
let userParams = { ...store.userParams };
Object.assign(filter, store.userFilter); Object.assign(filter, store.userFilter);
delete store.filter.where; let where;
if (filter?.where || store.filter?.where)
where = Object.assign(filter?.where ?? {}, store.filter?.where ?? {});
Object.assign(filter, store.filter); Object.assign(filter, store.filter);
filter.where = where;
const params = { filter }; const params = { filter };
Object.assign(params, store.userParams); Object.assign(params, userParams);
if (params.filter) params.filter.skip = store.skip; if (params.filter) params.filter.skip = store.skip;
if (store?.order && typeof store?.order == 'string') store.order = [store.order]; if (store?.order && typeof store?.order == 'string') store.order = [store.order];
if (store.order?.length) params.filter.order = [...store.order]; if (store.order?.length) params.filter.order = [...store.order];

View File

@ -30,7 +30,7 @@ const filter = {
<template> <template>
<CardSummary <CardSummary
data-key="AccountSummary" data-key="AccountId"
ref="AccountSummary" ref="AccountSummary"
url="VnUsers/preview" url="VnUsers/preview"
:filter="filter" :filter="filter"