fix(surveyor/penilai): perbaikkan jadwal kunjungan dan print out memo

This commit is contained in:
majid
2025-03-17 14:54:43 +07:00
parent afea3ac60f
commit adfc1b3cec
6 changed files with 26 additions and 24 deletions

View File

@@ -47,14 +47,17 @@
];
// Memindahkan foto_tempat ke depan jika ada
if (($key = array_search('upload_gs', $fotoTypes)) !== false) {
unset($fotoTypes[$key]);
array_unshift($fotoTypes, 'upload_gs');
}
// Filter fotoTypes untuk memastikan hanya yang memiliki imagePath valid
$validPhotoTypes = array_filter($fotoTypes, function ($type) use ($forminspeksi) {
return isset($forminspeksi[$type]) &&
file_exists(storage_path('app/public/' . $forminspeksi[$type]));
});
unset($fotoTypes[$key]);
array_unshift($fotoTypes, 'upload_gs');
}
// Filter fotoTypes untuk memastikan hanya yang memiliki imagePath valid
$validPhotoTypes = array_filter($fotoTypes, function ($type) use ($forminspeksi) {
// Check if value is a string (not an array) and file exists
return isset($forminspeksi[$type]) &&
is_string($forminspeksi[$type]) &&
file_exists(storage_path('app/public/' . $forminspeksi[$type]));
});
@endphp
<table width="100%" border="0">