Skip to content

Front edition#56

Merged
vampi62 merged 11 commits intomainfrom
front-edition
Feb 26, 2026
Merged

Front edition#56
vampi62 merged 11 commits intomainfrom
front-edition

Conversation

@vampi62
Copy link
Owner

@vampi62 vampi62 commented Feb 21, 2026

This pull request introduces several improvements and refactors to core frontend components, focusing on better data handling, more flexible filtering, and improved user session management. The most significant changes include refactoring comment and filter components to use explicit user and config objects, updating filtering logic to support object-based options, and enhancing permission checks in form components and improve filtering and managing comments.

Replace usage of shared "*Edition" placeholders with direct local responses and per-entity state updates across stores (camera, commands, config, ias, items, projets, projettags, stores, tags, users). Key changes:

- Set loading flags on individual nested entities (e.g. this.items[id].loading) instead of overwriting objects via spreads.
- Initialize nested maps before use (if (!this.items[id]) this.items[id] = {}).
- Use local variables for fetch results (const item = await ...) and write results directly into the relevant store maps instead of assigning to global edition objects.
Introduce hasPermission action in auth store and migrate components to use it instead of direct role_user comparisons.
Introduce src/utils/buildRSQLFilter.js and export it from utils/index.js to centralize RSQL filter construction. Integrate the new filter builder across multiple components, stores and views (Filter, FilterContainer, Tags, Tableau, Commentaire, many store modules and views) to standardize query/filter logic. package.json now includes lodash-es and other dependency updates were applied. This centralization simplifies filter handling and keeps query generation consistent across the frontend.
Change Tableau component to a unified fetch signature and add listFetchFunction handling. The fetchFunction now accepts (limit, offset, expand, filter, sort, clear) and meta.expand is supported; refetchListData is invoked after interval fetches. Added listFetchFunction (array) to request related resources for loaded intervals. Updated Tags and Tableau usages across many views to pass :fetch-function and :total-count, set meta.expand where needed, and use Object.fromEntries for datalist options. Removed many initial bulk onMounted prefetch loops in favor of interval/lazy loading and simplified modal open handlers. Overall improves lazy-loading of related entities and standardizes table fetching behavior.
Update various stores to read total counts from new response.pagination.total (fallback to 0) instead of the old count field. Interval/listing methods now return pagination nextOffset and hasMore so callers can handle cursor-style pagination. Adjust per-entity total count assignments where totals are keyed by parent id.
Refactor locale JSONs to standardize keys and split list/detail variants.
Replace concatenated length/size messages with parameterized translations ({count})
@vampi62 vampi62 merged commit ba66d8f into main Feb 26, 2026
1 check passed
@vampi62 vampi62 deleted the front-edition branch February 26, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant