fix(surveyor/penilai): perbaikkan jadwal kunjungan dan print out memo
This commit is contained in:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user