feat: improve print views, SQLite config, and file upload performance
This commit is contained in:
@@ -304,7 +304,8 @@ public static function form(Schema $schema): Schema
|
||||
->disk('public')
|
||||
->directory('surgery_photos/before')
|
||||
->downloadable()
|
||||
->openable(),
|
||||
->openable()
|
||||
->fetchFileInformation(false),
|
||||
|
||||
FileUpload::make('photos_after')
|
||||
->label(__('patients.fields.photos_after'))
|
||||
@@ -313,7 +314,8 @@ public static function form(Schema $schema): Schema
|
||||
->disk('public')
|
||||
->directory('surgery_photos/after')
|
||||
->downloadable()
|
||||
->openable(),
|
||||
->openable()
|
||||
->fetchFileInformation(false),
|
||||
|
||||
FileUpload::make('videos')
|
||||
->label(__('patients.fields.videos'))
|
||||
@@ -321,7 +323,8 @@ public static function form(Schema $schema): Schema
|
||||
->disk('public')
|
||||
->directory('surgery_photos/videos')
|
||||
->acceptedFileTypes(['video/mp4', 'video/quicktime', 'video/x-msvideo', 'video/x-matroska', 'video/webm', 'audio/mpeg', 'audio/mp3', 'audio/wav', 'audio/ogg', 'audio/aac'])
|
||||
->downloadable(),
|
||||
->downloadable()
|
||||
->fetchFileInformation(false),
|
||||
|
||||
FileUpload::make('audio_files')
|
||||
->label(__('patients.fields.audio_files'))
|
||||
@@ -329,7 +332,8 @@ public static function form(Schema $schema): Schema
|
||||
->disk('public')
|
||||
->directory('audio_files')
|
||||
->acceptedFileTypes(['audio/mpeg', 'audio/mp3', 'audio/wav', 'audio/ogg', 'audio/mp4', 'audio/aac'])
|
||||
->downloadable(),
|
||||
->downloadable()
|
||||
->fetchFileInformation(false),
|
||||
|
||||
])
|
||||
->columns(2)
|
||||
@@ -830,6 +834,7 @@ public static function table(Table $table): Table
|
||||
->downloadable()
|
||||
->openable()
|
||||
->disabled()
|
||||
->fetchFileInformation(false)
|
||||
->extraAttributes(['data-hide-dropzone' => 'true']),
|
||||
|
||||
FileUpload::make('photos_after')
|
||||
@@ -842,6 +847,7 @@ public static function table(Table $table): Table
|
||||
->downloadable()
|
||||
->openable()
|
||||
->disabled()
|
||||
->fetchFileInformation(false)
|
||||
->extraAttributes(['data-hide-dropzone' => 'true']),
|
||||
|
||||
FileUpload::make('videos')
|
||||
@@ -852,6 +858,7 @@ public static function table(Table $table): Table
|
||||
->acceptedFileTypes(['video/mp4', 'video/quicktime', 'video/x-msvideo', 'video/x-matroska', 'video/webm', 'audio/mpeg', 'audio/mp3', 'audio/wav', 'audio/ogg', 'audio/aac'])
|
||||
->downloadable()
|
||||
->disabled()
|
||||
->fetchFileInformation(false)
|
||||
->extraAttributes(['data-hide-dropzone' => 'true']),
|
||||
|
||||
FileUpload::make('audio_files')
|
||||
@@ -862,6 +869,7 @@ public static function table(Table $table): Table
|
||||
->acceptedFileTypes(['audio/mpeg', 'audio/mp3', 'audio/wav', 'audio/ogg', 'audio/mp4', 'audio/aac'])
|
||||
->downloadable()
|
||||
->disabled()
|
||||
->fetchFileInformation(false)
|
||||
->extraAttributes(['data-hide-dropzone' => 'true']),
|
||||
]),
|
||||
])
|
||||
|
||||
@@ -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,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user