fix(schedule): calendar
This commit is contained in:
@ -134,8 +134,8 @@ export class ScheduleModel {
|
||||
|
||||
const doctor = exception?.override_doctor ?? series.doctor;
|
||||
const room = exception?.override_room ?? series.room;
|
||||
const eventStart = exception?.override_start_at ? new Date(exception.override_start_at) : defaultStart;
|
||||
const eventEnd = exception?.override_end_at ? new Date(exception.override_end_at) : defaultEnd;
|
||||
const eventStart = exception?.override_start_at ? exception.override_start_at : defaultStart;
|
||||
const eventEnd = exception?.override_end_at ? exception.override_end_at : defaultEnd;
|
||||
const eventTitle = exception?.override_title || series.title;
|
||||
|
||||
const roomId = room?.id || null;
|
||||
@ -151,8 +151,8 @@ export class ScheduleModel {
|
||||
room_name: roomName,
|
||||
doctor_id: doctorId,
|
||||
doctor_name: doctorName,
|
||||
start_at: eventStart.toISOString(),
|
||||
end_at: eventEnd.toISOString(),
|
||||
start_at: eventStart,
|
||||
end_at: eventEnd,
|
||||
quota: series.quota ?? null,
|
||||
used_quota: usageMap.get(`${series.id}:${occurrenceYmd}`) || 0,
|
||||
left_quota:
|
||||
@ -462,8 +462,8 @@ export class ScheduleModel {
|
||||
};
|
||||
}
|
||||
|
||||
private static combineDateAndTime(ymd: string, hhmmss: string): Date {
|
||||
return new Date(`${ymd}T${hhmmss}`);
|
||||
private static combineDateAndTime(ymd: string, hhmmss: string) {
|
||||
return `${ymd} ${hhmmss}`;
|
||||
}
|
||||
|
||||
private static startOfDay(date: Date): Date {
|
||||
|
||||
Reference in New Issue
Block a user