Skip to content

Commit

Permalink
fix: update status of auto method and calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
soyu-se committed Jul 22, 2024
1 parent 0404b50 commit 5184625
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public async Task<IActionResult> DentistSchedule()
}

// Những ngày còn lại đã dc lên lịch nếu không có appointment nào liên quan sẽ ko cho vô và đánh "Trống"
else if(!appointmentDict.ContainsKey(key) || !periodicAppointmentDict.ContainsKey(key))
else if(!appointmentDict.ContainsKey(key))
{
dailyTimeSlots.Add(new EventVM
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)

// Cập nhật trạng thái
appointment.AppointmentStatus = "Đã Hủy";

//Cập nhật lại trạng thái của schedule
var schedules = context.Schedules.First(s => s.ID == appointment.ScheduleID);
schedules.ScheduleStatus = "Đã Hủy";

// Gửi lại mail xác nhận đã hủy cho khách hàng
var user = await context.Accounts.FirstOrDefaultAsync(a => a.ID == appointment.PatientRecords.AccountID);
if (user != null)
Expand Down

0 comments on commit 5184625

Please sign in to comment.