Implement multi-selection filter for race status in the registration management interface. Enhance UI with a mobile-friendly design for better user interaction. Update backend logic to handle selected statuses and ensure proper filtering in requests. This aligns with MSIN-4401 requirements for improved event management functionality.
This commit is contained in:
@ -890,6 +890,32 @@
|
||||
Ms1Loader.show(inscrLoaderMsg);
|
||||
}
|
||||
});
|
||||
|
||||
// MSIN-4401 — Libellé du multi-select statut (Tous / N sélectionnés).
|
||||
(function () {
|
||||
function updateStatutMultiSummary(details) {
|
||||
if (!details) {
|
||||
return;
|
||||
}
|
||||
var textEl = details.querySelector('.inscr-gestion-statut-multi__summary-text');
|
||||
if (!textEl) {
|
||||
return;
|
||||
}
|
||||
var checked = details.querySelectorAll('input[name="sel_rech_statut[]"]:checked');
|
||||
var n = checked.length;
|
||||
var labelAll = details.getAttribute('data-label-all') || '';
|
||||
var labelN = details.getAttribute('data-label-n') || '%d';
|
||||
textEl.textContent = (n === 0) ? labelAll : labelN.replace('%d', String(n));
|
||||
}
|
||||
|
||||
moduleInscr.addEventListener('change', function (e) {
|
||||
var input = e.target;
|
||||
if (!input || input.name !== 'sel_rech_statut[]') {
|
||||
return;
|
||||
}
|
||||
updateStatutMultiSummary(input.closest('.inscr-gestion-statut-multi'));
|
||||
});
|
||||
})();
|
||||
})();
|
||||
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user