Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -50,6 +50,18 @@ $isAdmin = ($userRole === 'ADMIN');
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Weergave-schakelaar: Bord (Kanban) / Tijdlijn (Gantt) -->
|
||||
<div class="inline-flex p-1 bg-slate-100/90 dark:bg-[#0c0f17] border border-slate-200/90 dark:border-slate-800/90 rounded-xl text-xs font-semibold shadow-2xs self-start xl:self-center">
|
||||
<span class="flex items-center space-x-1.5 px-3 py-1.5 rounded-lg bg-white dark:bg-slate-800 text-indigo-600 dark:text-indigo-400 font-bold shadow-2xs cursor-default">
|
||||
<i data-lucide="kanban" class="w-3.5 h-3.5"></i>
|
||||
<span>Bord</span>
|
||||
</span>
|
||||
<a id="linkToTimeline" href="/timeline.php" class="flex items-center space-x-1.5 px-3 py-1.5 rounded-lg text-slate-600 dark:text-slate-400 hover:text-slate-900 dark:hover:text-white hover:bg-slate-200/60 dark:hover:bg-slate-800/60 transition">
|
||||
<i data-lucide="clock" class="w-3.5 h-3.5"></i>
|
||||
<span>Tijdlijn</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Midden & Rechts: Filters & Actieknoppen -->
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
|
||||
@@ -446,6 +458,10 @@ const LANE_ACCENT_COLORS = {
|
||||
|
||||
// 1. Initialisatie
|
||||
document.addEventListener('DOMContentLoaded', async () => {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
if (urlParams.get('board_id')) {
|
||||
currentBoardId = parseInt(urlParams.get('board_id'), 10);
|
||||
}
|
||||
await loadBoardsList();
|
||||
});
|
||||
|
||||
@@ -494,6 +510,7 @@ function onBoardSelectChange(bId) {
|
||||
// 2. Data van specifiek bord inladen
|
||||
async function loadBoardData(boardId) {
|
||||
currentBoardId = boardId;
|
||||
document.getElementById('linkToTimeline')?.setAttribute('href', `/timeline.php?board_id=${boardId}`);
|
||||
const container = document.getElementById('boardLanesContainer');
|
||||
container.innerHTML = `
|
||||
<div class="flex items-center justify-center w-full py-20 text-slate-400 text-sm">
|
||||
|
||||
Reference in New Issue
Block a user