added shift titles to the shift signup sheets to make tracking easier and adding shifts easier
This commit is contained in:
@@ -128,18 +128,23 @@ function displayMySignups() {
|
||||
return;
|
||||
}
|
||||
|
||||
// Need to match signups with shift details
|
||||
// Need to match signups with shift details for date/time info
|
||||
const signupsWithDetails = mySignups.map(signup => {
|
||||
const shift = allShifts.find(s => s.ID === signup.shift_id);
|
||||
return { ...signup, shift };
|
||||
}).filter(s => s.shift);
|
||||
return {
|
||||
...signup,
|
||||
shift,
|
||||
// Use title from signup record if available, otherwise from shift
|
||||
displayTitle: signup.shift_title || (shift ? shift.Title : 'Unknown Shift')
|
||||
};
|
||||
}).filter(s => s.shift); // Only show signups where we can find the shift details
|
||||
|
||||
list.innerHTML = signupsWithDetails.map(signup => {
|
||||
const shiftDate = new Date(signup.shift.Date);
|
||||
return `
|
||||
<div class="signup-item">
|
||||
<div>
|
||||
<h4>${escapeHtml(signup.shift.Title)}</h4>
|
||||
<h4>${escapeHtml(signup.displayTitle)}</h4>
|
||||
<p>📅 ${shiftDate.toLocaleDateString()} ⏰ ${signup.shift['Start Time']} - ${signup.shift['End Time']}</p>
|
||||
</div>
|
||||
<div class="signup-actions">
|
||||
|
||||
Reference in New Issue
Block a user