Ffix(surveyor/penilai): perbaikkan edit foto dan call report

This commit is contained in:
majid
2025-03-01 10:25:50 +07:00
parent 025cb3d5b8
commit f65b9bec23
10 changed files with 375 additions and 166 deletions

View File

@@ -181,7 +181,13 @@ class PembayaranController extends Controller
$permohonan = Permohonan::find($id);
if ($permohonan) {
$data['status_bayar'] = 'sudah_bayar';
if ($request->type === 'revisi') {
$data['status_bayar'] = 'belum_bayar';
} else {
$data['status_bayar'] = 'sudah_bayar';
}
if ($permohonan->jenis_penilaian_id == 2) {
$data['status'] = 'spk';
}

View File

@@ -1056,7 +1056,8 @@ class PenilaiController extends Controller
'fakta_negatif' => 'nullable|array',
'type' => 'required',
'action' => 'required',
'keterangan' => 'nullable|array'
'keterangan' => 'nullable|array',
]);

View File

@@ -682,6 +682,7 @@ class SurveyorController extends Controller
$request->validate([
'edited_image' => 'required|string',
'original_path' => 'required|string',
'nomor_registrasi' => 'required',
]);
// Decode base64 image
@@ -701,7 +702,7 @@ class SurveyorController extends Controller
// Path asli
$originalPath = $request->input('original_path');
$fileName = basename($originalPath);
$newFilePath = 'edited_images/' . $fileName;
$newFilePath = 'surveyor/upload_foto/'. $request->input('nomor_registrasi') . '/' . $fileName;
// Simpan file ke storage
Storage::disk('public')->put($newFilePath, $decodedImage);
@@ -1675,10 +1676,6 @@ class SurveyorController extends Controller
'basicData',
'cekAlamat'
));
// return response()->json([
// 'daya'=> $permohonan
// ]);
}
/**