12 Added notes and colours to customers

This commit is contained in:
2025-07-23 15:35:19 +02:00
parent 84d43f0dac
commit 541b181c87
17 changed files with 362 additions and 20 deletions

View File

@@ -89,7 +89,8 @@ export default class extends Controller {
return ''; // Empty location as requested
},
popupDetailAttendees(eventObj) {
return eventObj.attendees[0]; // Show team name
const teamName = eventObj.attendees[0]; // Show team name
return teamName;
},
popupDetailState(eventObj) {
return '';
@@ -148,11 +149,13 @@ export default class extends Controller {
const startTime = new Date(reservation.start_time);
const endTime = new Date(reservation.end_time);
// Create the event
// Create the event with customer name only
const customerName = reservation.customer ? `${reservation.customer.first_name} ${reservation.customer.surname}` : '';
const event = {
id: `reservation-${reservation.id}`,
calendarId: calendarId,
title: reservation.customer ? `${reservation.customer.first_name} ${reservation.customer.surname}` : '',
title: customerName,
start: startTime,
end: endTime,
category: 'time',
@@ -276,4 +279,4 @@ export default class extends Controller {
// Update calendar display
window.calendar.render();
}
}
}