feat: enhance FastRequest functionality with shift scheduling and improve payment callback handling

This commit is contained in:
2026-09-21 04:45:57 +03:30
parent 5f19f82f86
commit 45da0103c0
11 changed files with 74 additions and 15 deletions
+2 -1
View File
@@ -156,12 +156,13 @@ class CaseService
->where('invoices.paid_at', '>=', $monthStart);
$nextShift = $isDoctor ? $this->shiftScheduleService->nextShiftStart($user, now()) : null;
$onShift = $isDoctor && $this->shiftScheduleService->isOnShift($user, now());
return [
'pending_cases' => $this->pendingForUser($user)->count(),
'monthly_reviewed' => $reviewedQuery->count(),
'monthly_amount' => (int) $amountQuery->sum('invoices.amount'),
'next_shift_hours' => $nextShift ? (int) ceil(now()->diffInMinutes($nextShift, true) / 60) : null,
'next_shift_hours' => $onShift ? 0 : ($nextShift ? (int) ceil(now()->diffInMinutes($nextShift, true) / 60) : null),
'is_doctor' => $isDoctor,
];
}