feat: improve print views, SQLite config, and file upload performance

This commit is contained in:
SajjadMahmoody
2026-04-06 13:04:57 +03:30
parent c2c3963c71
commit 128a11ad33
55 changed files with 22799 additions and 356 deletions
@@ -26,8 +26,24 @@ public function printAdmission(Prescription $prescription)
{
$prescription->load('patientRecord');
$patient = $prescription->patientRecord;
$appointment = $patient?->surgeryAppointment?->load('surgeryCenter');
$centerName = '';
$surgeryDate = '';
if ($appointment) {
try {
$surgeryDate = Jalalian::fromCarbon($appointment->surgery_date)->format('Y/m/d');
} catch (\Throwable) {
$surgeryDate = $appointment->surgery_date?->format('Y-m-d') ?? '';
}
$centerName = $appointment->surgeryCenter?->name ?? '';
}
return view('prints.prescription-admission', [
'prescription' => $prescription,
'centerName' => $centerName,
'surgeryDate' => $surgeryDate,
]);
}