feat: Update appointment time range to 08:15 - 20:00 and enhance visual representation of available slots
This commit is contained in:
@@ -267,9 +267,8 @@
|
|||||||
const slotStartSet = new Set(candidateSlots.map(function (slot) { return slot.start; }));
|
const slotStartSet = new Set(candidateSlots.map(function (slot) { return slot.start; }));
|
||||||
const allDays = dateRangeInclusive(String(available.date_start || ''), String(available.date_end || ''));
|
const allDays = dateRangeInclusive(String(available.date_start || ''), String(available.date_end || ''));
|
||||||
|
|
||||||
// Show a reasonable full-day range, but we'll visually highlight available slots
|
// Show the requested UI time window from 08:15 to 20:00 and highlight available slots
|
||||||
// Keep computed min/max for calculating slot gaps, but use UI range wider
|
let slotMinTime = '08:15:00';
|
||||||
let slotMinTime = '06:00:00';
|
|
||||||
let slotMaxTime = '20:00:00';
|
let slotMaxTime = '20:00:00';
|
||||||
if (candidateSlots.length > 0) {
|
if (candidateSlots.length > 0) {
|
||||||
const starts = candidateSlots.map(function (slot) {
|
const starts = candidateSlots.map(function (slot) {
|
||||||
@@ -478,6 +477,7 @@
|
|||||||
calendar.addEvent(be);
|
calendar.addEvent(be);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Add candidate free slots (blue)
|
||||||
candidateSlots.forEach(function (slot) {
|
candidateSlots.forEach(function (slot) {
|
||||||
const start = new Date(slot.start.replace(' ', 'T') + ':00');
|
const start = new Date(slot.start.replace(' ', 'T') + ':00');
|
||||||
const end = new Date(slot.end.replace(' ', 'T') + ':00');
|
const end = new Date(slot.end.replace(' ', 'T') + ':00');
|
||||||
@@ -485,8 +485,8 @@
|
|||||||
title: 'Freier Slot',
|
title: 'Freier Slot',
|
||||||
start: start,
|
start: start,
|
||||||
end: end,
|
end: end,
|
||||||
color: '#20c997',
|
color: '#0d6efd',
|
||||||
textColor: '#062b1f',
|
textColor: '#ffffff',
|
||||||
editable: false,
|
editable: false,
|
||||||
extendedProps: {
|
extendedProps: {
|
||||||
slotStart: slot.start,
|
slotStart: slot.start,
|
||||||
|
|||||||
Reference in New Issue
Block a user