Moving away from Azure Devops #1

Merged
Janus007 merged 113 commits from refac into master 2026-02-03 00:04:27 +01:00
2 changed files with 18 additions and 10 deletions
Showing only changes of commit 044b547836 - Show all commits

View file

@ -72,25 +72,33 @@ export class HeaderDrawerRenderer {
/** /**
* Create a header item element for an allDay event * Create a header item element for an allDay event
* Supports multi-day events with column span
*/ */
private createHeaderItem(event: ICalendarEvent, visibleDates: string[]): HTMLElement | null { private createHeaderItem(event: ICalendarEvent, visibleDates: string[]): HTMLElement | null {
const dateKey = this.dateService.getDateKey(event.start); const startDateKey = this.dateService.getDateKey(event.start);
const colIndex = visibleDates.indexOf(dateKey); const endDateKey = this.dateService.getDateKey(event.end);
if (colIndex === -1) return null; // Event not in visible range
const startColIndex = visibleDates.indexOf(startDateKey);
const endColIndex = visibleDates.indexOf(endDateKey);
// Event skal mindst starte eller slutte inden for synlige datoer
if (startColIndex === -1 && endColIndex === -1) return null;
const item = document.createElement('swp-header-item'); const item = document.createElement('swp-header-item');
item.dataset.eventId = event.id; item.dataset.eventId = event.id;
item.dataset.itemType = 'event'; item.dataset.itemType = 'event';
item.dataset.date = dateKey; item.dataset.start = event.start.toISOString();
item.dataset.end = event.end.toISOString();
item.textContent = event.title; item.textContent = event.title;
// Color class // Color class
const colorClass = this.getColorClass(event); const colorClass = this.getColorClass(event);
if (colorClass) item.classList.add(colorClass); if (colorClass) item.classList.add(colorClass);
// Grid position (1-indexed) // Grid position (1-indexed, clamp til synlige kolonner)
const col = colIndex + 1; const col = Math.max(0, startColIndex) + 1;
item.style.gridArea = `1 / ${col} / 2 / ${col + 1}`; const endCol = (endColIndex !== -1 ? endColIndex : visibleDates.length - 1) + 2;
item.style.gridArea = `1 / ${col} / 2 / ${endCol}`;
return item; return item;
} }

View file

@ -73,10 +73,10 @@
"id": "EVT-DEC09-002", "id": "EVT-DEC09-002",
"title": "Skæg trimning", "title": "Skæg trimning",
"description": "Skæg trim og styling", "description": "Skæg trim og styling",
"start": "2025-12-09T16:00:00", "start": "2025-12-09T00:00:00",
"end": "2025-12-09T16:30:00", "end": "2025-12-10T23:59:59",
"type": "customer", "type": "customer",
"allDay": false, "allDay": true,
"bookingId": "BOOK-006", "bookingId": "BOOK-006",
"resourceId": "EMP003", "resourceId": "EMP003",
"customerId": "CUST006", "customerId": "CUST006",