feat(helpdesk): align module with core list/drawer standards

- add helpdesk module pages, services, settings and tests

- standardize debtor list on drawer/grid contracts and robust filter drawer behavior

- add helpdesk aside panel navigation and settings visibility provider

- switch primary list slug to helpdesk/debitor and remove helpdesk/search compatibility

- include required core contract updates for list contracts and detail/drawer integration
This commit is contained in:
2026-04-02 17:48:27 +02:00
parent 5d07236758
commit a0d7670dd7
55 changed files with 5977 additions and 11 deletions

View File

@@ -1370,6 +1370,35 @@ const normalizeListMode = (value) => {
return 'drawer';
};
const resolveDrawerRoot = (gridConfig, filterOptions = {}) => {
const explicitRoot = filterOptions?.drawerRoot;
if (explicitRoot) {
return resolveDomQueryElement(explicitRoot) || document;
}
const containerEl = gridConfig?.container instanceof Element
? gridConfig.container
: null;
if (!containerEl) {
return document;
}
const drawerSelector = String(filterOptions?.drawer?.drawerSelector || '[data-filter-drawer]').trim() || '[data-filter-drawer]';
const openSelector = String(filterOptions?.drawer?.openSelector || '[data-filter-drawer-open]').trim() || '[data-filter-drawer-open]';
let current = containerEl;
while (current && current !== document.documentElement) {
const hasDrawer = Boolean(current.querySelector(drawerSelector));
const hasOpenButton = Boolean(current.querySelector(openSelector));
if (hasDrawer && hasOpenButton) {
return current;
}
current = current.parentElement;
}
return containerEl.parentElement || document;
};
/**
* Standardized list-page bootstrap:
* - builds grid filters from schema (or uses explicit filters)
@@ -1425,7 +1454,7 @@ export function initStandardListPage(options = {}) {
const chipUiConfig = filterOptions.chips && typeof filterOptions.chips === 'object'
? filterOptions.chips
: {};
const drawerRoot = filterOptions.drawerRoot || document;
const drawerRoot = resolveDrawerRoot(gridConfig, filterOptions);
const domLabels = readDomLabelDefaults({
drawerRoot,
chipsSelector: chipUiConfig.container || '[data-active-filter-chips]',