fix(surveyor): perbaikan tanda tangan, print out sederhana dan print hasil surveyor
This commit is contained in:
@@ -1032,10 +1032,10 @@ class PenilaiController extends Controller
|
||||
|
||||
$alamat = [
|
||||
'address' => $inputAddress['address'] ?? null,
|
||||
'village_code' => $this->getWilayahName($inputAddress['village_code'] ?? null, 'village'),
|
||||
'district_code' => $this->getWilayahName($inputAddress['district_code'] ?? null, 'district'),
|
||||
'city_code' => $this->getWilayahName($inputAddress['city_code'] ?? null, 'city'),
|
||||
'province_code' => $this->getWilayahName($inputAddress['province_code'] ?? null, 'province')
|
||||
'village_code' => getWilayahName($inputAddress['village_code'] ?? null, 'village'),
|
||||
'district_code' => getWilayahName($inputAddress['district_code'] ?? null, 'district'),
|
||||
'city_code' => getWilayahName($inputAddress['city_code'] ?? null, 'city'),
|
||||
'province_code' => getWilayahName($inputAddress['province_code'] ?? null, 'province')
|
||||
];
|
||||
|
||||
$viewLaporan = $this->getViewLaporan($tipeLaporan);
|
||||
@@ -1112,39 +1112,6 @@ class PenilaiController extends Controller
|
||||
return $viewMap[$tipe] ?? 'penilai.components.print-resume';
|
||||
}
|
||||
|
||||
public function getWilayahName($code, $type)
|
||||
{
|
||||
try {
|
||||
$wilayah = null;
|
||||
|
||||
if (!$code) {
|
||||
return null;
|
||||
}
|
||||
|
||||
switch ($type) {
|
||||
case 'province':
|
||||
$wilayah = Province::where('code', $code)->first();
|
||||
return $wilayah ? $wilayah->name : null;
|
||||
|
||||
case 'city':
|
||||
$wilayah = City::where('code', $code)->first();
|
||||
return $wilayah ? $wilayah->name : null;
|
||||
|
||||
case 'district':
|
||||
$wilayah = District::where('code', $code)->first();
|
||||
return $wilayah ? $wilayah->name : null;
|
||||
|
||||
case 'village':
|
||||
$wilayah = Village::where('code', $code)->first();
|
||||
return $wilayah ? $wilayah->name : null;
|
||||
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// mengambil data dari fungsi permohonan di surveyor, dan table
|
||||
@@ -1322,8 +1289,7 @@ class PenilaiController extends Controller
|
||||
'resume' => [
|
||||
'fakta.fakta_positif',
|
||||
'fakta.fakta_negatif',
|
||||
'fisik',
|
||||
'keterangan'
|
||||
'fisik'
|
||||
],
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user