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:
29
modules/helpdesk/web/js/helpdesk-clickable-rows.js
Normal file
29
modules/helpdesk/web/js/helpdesk-clickable-rows.js
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* Shared clickable-row behaviour for helpdesk tables.
|
||||
* Navigates to `data-href` on click or Enter/Space key.
|
||||
*/
|
||||
export function initClickableRows() {
|
||||
const rows = document.querySelectorAll('.app-clickable-row[data-href]');
|
||||
|
||||
rows.forEach((row) => {
|
||||
row.addEventListener('click', (event) => {
|
||||
if (event.target.closest('a')) {
|
||||
return;
|
||||
}
|
||||
const href = row.dataset.href;
|
||||
if (href) {
|
||||
window.location.href = href;
|
||||
}
|
||||
});
|
||||
|
||||
row.addEventListener('keydown', (event) => {
|
||||
if (event.key === 'Enter' || event.key === ' ') {
|
||||
event.preventDefault();
|
||||
const href = row.dataset.href;
|
||||
if (href) {
|
||||
window.location.href = href;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user