12 Added notes and colours to customers
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user