fix(surveyor): perbaikkan upload foto data pembanding
This commit is contained in:
@@ -1356,6 +1356,7 @@ class SurveyorController extends Controller
|
|||||||
try {
|
try {
|
||||||
DB::beginTransaction();
|
DB::beginTransaction();
|
||||||
|
|
||||||
|
// dd($request->all());
|
||||||
$maxSize = getMaxFileSize('Foto');
|
$maxSize = getMaxFileSize('Foto');
|
||||||
$validator = $request->validate([
|
$validator = $request->validate([
|
||||||
'permohonan_id' => 'required|exists:permohonan,id',
|
'permohonan_id' => 'required|exists:permohonan,id',
|
||||||
@@ -1363,8 +1364,6 @@ class SurveyorController extends Controller
|
|||||||
'dokument_id' => 'required',
|
'dokument_id' => 'required',
|
||||||
'name_foto_objek' => 'nullable|string',
|
'name_foto_objek' => 'nullable|string',
|
||||||
'nomor_registrasi' => 'required|string',
|
'nomor_registrasi' => 'required|string',
|
||||||
'foto_objek' => 'nullable|jpeg|png|jpg|gif|svg|max:'.$maxSize,
|
|
||||||
'foto_objek_pembanding.*' => 'nullable|jpeg|png|jpg|gif|svg|max:'.$maxSize,
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$tanahBangunanTypes = ['KAPAL', 'PESAWAT', 'KENDARAAN', 'ALAT BERAT', 'MESIN'];
|
$tanahBangunanTypes = ['KAPAL', 'PESAWAT', 'KENDARAAN', 'ALAT BERAT', 'MESIN'];
|
||||||
|
|||||||
@@ -355,8 +355,6 @@
|
|||||||
const preview = newCell.querySelector('img');
|
const preview = newCell.querySelector('img');
|
||||||
if (preview) {
|
if (preview) {
|
||||||
preview.id = newImageId;
|
preview.id = newImageId;
|
||||||
preview.src = '';
|
|
||||||
preview.accept = ".jpg,.jpeg,.png";
|
|
||||||
preview.classList.add('hidden');
|
preview.classList.add('hidden');
|
||||||
input.onchange = function() {
|
input.onchange = function() {
|
||||||
const file = this.files[0];
|
const file = this.files[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user