Integrasikan data memo ke form memo penilai
- Memperbaiki binding data memo ke input form mengenai memo penilai. - Menambahkan logika untuk menampilkan pilihan kota, kecamatan, dan kelurahan berdasarkan provinsi, kota, dan kecamatan yang dipilih. - Menyesuaikan tampilan memo dengan data dari database, termasuk hasil survey, kesimpulan saran, dan file terlampir. - Melakukan perbaikan minor pada struktur kode untuk konsistensi.
This commit is contained in:
@@ -137,6 +137,7 @@ class PenilaiController extends Controller
|
|||||||
|
|
||||||
$resume = Penilai::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
|
$resume = Penilai::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
|
||||||
$lpjData = null;
|
$lpjData = null;
|
||||||
|
$resumeData = null;
|
||||||
if ($resume) {
|
if ($resume) {
|
||||||
$resumeData = json_decode($resume->resume, true);
|
$resumeData = json_decode($resume->resume, true);
|
||||||
}
|
}
|
||||||
@@ -153,21 +154,31 @@ class PenilaiController extends Controller
|
|||||||
|
|
||||||
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
|
$permohonan = $this->surveyorController->getPermohonanJaminanId($permohonanId, $documentId, $jaminanId);
|
||||||
$inspeksi = Inspeksi::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
|
$inspeksi = Inspeksi::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
|
||||||
|
$penilai = Penilai::where('permohonan_id', $permohonanId)->where('dokument_id', $documentId)->first();
|
||||||
$provinces = Province::all();
|
$provinces = Province::all();
|
||||||
$basicData = $this->surveyorController->getCommonData();
|
$basicData = $this->surveyorController->getCommonData();
|
||||||
|
|
||||||
$formFoto = null;
|
$formFoto = $formPeta = $cities = $districts = $villages= null;
|
||||||
$formPeta = null;
|
|
||||||
if ($inspeksi) {
|
if ($inspeksi) {
|
||||||
$formFoto = json_decode($inspeksi->foto_form, true);
|
$formFoto = json_decode($inspeksi->foto_form, true);
|
||||||
$formPeta = json_decode($inspeksi->data_form, true);
|
$formPeta = json_decode($inspeksi->data_form, true);
|
||||||
|
$memo = json_decode($penilai->memo);
|
||||||
|
if(isset($memo->province_code)){
|
||||||
|
$cities = City::where('province_id', $memo->province_code)->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($memo->city_code)){
|
||||||
|
$districts = District::where('city_id', $memo->city_code)->get();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isset($memo->district_code)) {
|
||||||
|
$villages = Village::where('district_id', $memo->district_code)->get();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return view('lpj::penilai.components.memo', compact('permohonan', 'formFoto', 'formPeta', 'provinces', 'basicData'));
|
return view('lpj::penilai.components.memo', compact('permohonan', 'formFoto', 'formPeta', 'provinces', 'basicData','memo','cities', 'districts', 'villages'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -26,31 +26,30 @@
|
|||||||
<label class="form-label max-w-56">Kepada</label>
|
<label class="form-label max-w-56">Kepada</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<input type="text" name="kepada" class="input w-full" placeholder="Masukkan..."
|
<input type="text" name="kepada" class="input w-full" placeholder="Masukkan..."
|
||||||
value="">
|
value=" {{ $memo->kepada ?? "" }}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">Dari</label>
|
<label class="form-label max-w-56">Dari</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<input type="text" name="dari" class="input w-full" placeholder="Masukkan..."
|
<input type="text" name="dari" class="input w-full" placeholder="Masukkan..."
|
||||||
value="">
|
value="{{ $memo->dari ?? "" }}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">Nomor Memo</label>
|
<label class="form-label max-w-56">Nomor Memo</label>
|
||||||
<div class="flex flex-wrap items-base line w-full">
|
<div class="flex flex-wrap items-base line w-full">
|
||||||
<input type="text" name="nomor_memo" class="input w-full" placeholder="Masukkan..."
|
<input type="text" name="nomor_memo" class="input w-full" placeholder="Masukkan..."
|
||||||
value="">
|
value="{{ $memo->nomor_memo ?? "" }}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">Tanggal</label>
|
<label class="form-label max-w-56">Tanggal</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<input type="date" name="tanggal" class="input w-full" placeholder="Masukkan..."
|
<input type="date" name="tanggal" class="input w-full" placeholder="Masukkan..."
|
||||||
value="">
|
value="{{ $memo->tanggal ?? "" }}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -58,7 +57,7 @@
|
|||||||
<label class="form-label max-w-56">Perihal</label>
|
<label class="form-label max-w-56">Perihal</label>
|
||||||
<div class="flex flex-wrap items-base line w-full">
|
<div class="flex flex-wrap items-base line w-full">
|
||||||
<input type="text" name="perihal" class="input w-full" placeholder="Masukkan..."
|
<input type="text" name="perihal" class="input w-full" placeholder="Masukkan..."
|
||||||
value="">
|
value="{{ $memo->perihal ?? "" }}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -67,9 +66,8 @@
|
|||||||
<div class="card w-full bg-white rounded-lg shadow-md ">
|
<div class="card w-full bg-white rounded-lg shadow-md ">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h1 class="text-md font-medium text-gray-900 uppercase">Sehubungan dengan permintaan BAGI Cabang
|
<h1 class="text-md font-medium text-gray-900 uppercase">Sehubungan dengan permintaan BAGI Cabang
|
||||||
............., untuk dilakukan survey untuk penilaian baru/review, calon debitur/debitur an
|
<b>{{ $permohonan->branch->name }}</b>, untuk dilakukan survey untuk penilaian baru/review, calon debitur/debitur an
|
||||||
….............,
|
<b>{{ $permohonan->debiture->name }}</b>,dengan deskripsi sebagai berikut :
|
||||||
dengan deskripsi sebagai berikut :
|
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
@@ -82,15 +80,12 @@
|
|||||||
<select id="jenis_asset_tidak_sesuai" class="input w-full" name="jenis_asset_tidak_sesuai">
|
<select id="jenis_asset_tidak_sesuai" class="input w-full" name="jenis_asset_tidak_sesuai">
|
||||||
<option value="">Select Jenis asset</option>
|
<option value="">Select Jenis asset</option>
|
||||||
@foreach ($basicData['jenisJaminan'] as $item)
|
@foreach ($basicData['jenisJaminan'] as $item)
|
||||||
<option value="{{ $item->name }}">{{ $item->name }}</option>
|
<option value="{{ $item->name }}" {{ ($memo->jenis_asset_tidak_sesuai ?? '') == $item->name ? 'selected' : '' }}>
|
||||||
|
{{ $item->name }}
|
||||||
|
</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
@@ -99,7 +94,7 @@
|
|||||||
<label for="address" class="form-label max-w-56">Lokasi</label>
|
<label for="address" class="form-label max-w-56">Lokasi</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<input type="text" id="address" name="address" class="input w-full"
|
<input type="text" id="address" name="address" class="input w-full"
|
||||||
placeholder="Masukkan Jl." value="{{ old('address') }}">
|
placeholder="Masukkan Jl." value="{{ $memo->address ?? old('address') }}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -109,7 +104,7 @@
|
|||||||
<select id="province_code" name="province_code" class="input w-full">
|
<select id="province_code" name="province_code" class="input w-full">
|
||||||
<option value="">Pilih Provinsi</option>
|
<option value="">Pilih Provinsi</option>
|
||||||
@foreach ($provinces as $item)
|
@foreach ($provinces as $item)
|
||||||
<option value="{{ $item->code }}">{{ $item->name }}</option>
|
<option value="{{ $item->code }}" {{ ($memo->province_code ?? '') == $item->code ? 'selected' : '' }}>{{ $item->name }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@@ -120,6 +115,11 @@
|
|||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<select id="city_code" name="city_code" class="select w-full">
|
<select id="city_code" name="city_code" class="select w-full">
|
||||||
<option value="">Pilih Kota/Kabupaten</option>
|
<option value="">Pilih Kota/Kabupaten</option>
|
||||||
|
@if(isset($cities))
|
||||||
|
@foreach ($cities as $item)
|
||||||
|
<option value="{{ $item->code }}" {{ ($memo->city_code?? '') == $item->code ? 'selected' : '' }}>{{ $item->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -129,6 +129,11 @@
|
|||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<select id="district_code" name="district_code" class="select w-full">
|
<select id="district_code" name="district_code" class="select w-full">
|
||||||
<option value="">Pilih Kecamatan</option>
|
<option value="">Pilih Kecamatan</option>
|
||||||
|
@if(isset($districts))
|
||||||
|
@foreach ($districts as $item)
|
||||||
|
<option value="{{ $item->code }}" {{ ($memo->district_code?? '') == $item->code ? 'selected' : '' }}>{{ $item->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -138,23 +143,36 @@
|
|||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<select id="village_code" name="village_code" class="select w-full">
|
<select id="village_code" name="village_code" class="select w-full">
|
||||||
<option value="">Pilih Kelurahan</option>
|
<option value="">Pilih Kelurahan</option>
|
||||||
|
@if(isset($villages))
|
||||||
|
@foreach ($villages as $item)
|
||||||
|
<option value="{{ $item->code }}" {{ ($memo->village_code ?? '') == $item->code ? 'selected' : '' }}>{{ $item->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
<label for="address" class="form-label max-w-56">Tanggal Survey</label>
|
<label for="address" class="form-label max-w-56">Address</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<input type="date" id="address" name="address" class="input w-full"
|
<input type="text" id="address" name="address" class="input w-full"
|
||||||
placeholder="Masukkan Jl." value="{{ old('address') }}">
|
placeholder="Masukkan Jl." value="{{ $memo->address ?? old('address') }}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
<label for="address" class="form-label max-w-56">Penilai</label>
|
<label for="tanggal_survey" class="form-label max-w-56">Tanggal Survey</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<input type="text" id="address" name="address" class="input w-full"
|
<input type="date" id="tanggal_survey" name="tanggal_survey" class="input w-full"
|
||||||
placeholder="Masukkan Jl." value="{{ old('address') }}">
|
placeholder="Masukkan Tanggal Survey" value="{{ $memo->tanggal_survey ?? old('tanggal_survey') }}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 w-full">
|
||||||
|
<label for="penilai" class="form-label max-w-56">Penilai</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input type="text" id="penilai" name="penilai" class="input w-full"
|
||||||
|
placeholder="Masukkan Penilai" value="{{ $memo->penilai ?? old('penilai') }}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -167,7 +185,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3 class="card-title uppercase">
|
<h3 class="card-title uppercase">
|
||||||
@@ -181,7 +198,7 @@
|
|||||||
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
|
<div id="fakta-positif-container" class="flex flex-wrap items-baseline w-full">
|
||||||
|
|
||||||
<div class="terlampir flex items-center gap-2 mt-2 textarea-group w-full">
|
<div class="terlampir flex items-center gap-2 mt-2 textarea-group w-full">
|
||||||
<textarea class="textarea mt-2" name="terlampir[]" rows="3">{{ old('terlampir', '') }}</textarea>
|
<textarea class="textarea mt-2" name="terlampir[]" rows="3">{{ $memo->terlampir[0] ?? old('terlampir', '') }}</textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -190,12 +207,12 @@
|
|||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">Berdasarkan hasil survey dapat disampaikan sbb:</label>
|
<label class="form-label max-w-56">Berdasarkan hasil survey dapat disampaikan sbb:</label>
|
||||||
<div id="hasil_survey" class="flex flex-wrap items-baseline w-full">
|
<div id="hasil_survey" class="flex flex-wrap items-baseline w-full">
|
||||||
@if (!empty($forminspeksi['hasil_survey']))
|
@if (!empty($memo->hasil_survey))
|
||||||
@foreach ($forminspeksi['hasil_survey'] as $index => $positif)
|
@foreach ($memo->hasil_survey as $index => $positif)
|
||||||
<div class="hasil_survey flex items-center gap-2 mt-2 textarea-group w-full">
|
<div class="hasil_survey flex items-center gap-2 mt-2 textarea-group w-full">
|
||||||
<textarea class="textarea mt-2" name="hasil_survey[]" rows="3">{{ old("hasil_survey.$index", $positif) }}</textarea>
|
<textarea class="textarea mt-2" name="hasil_survey[]" rows="3">{{ old("hasil_survey.$index", $positif) }}</textarea>
|
||||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||||
style="display: none;">
|
style="display: none;">
|
||||||
<i class="ki-outline ki-trash"></i>
|
<i class="ki-outline ki-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -204,13 +221,13 @@
|
|||||||
<div class="hasil_survey flex items-center gap-2 mt-2 textarea-group w-full">
|
<div class="hasil_survey flex items-center gap-2 mt-2 textarea-group w-full">
|
||||||
<textarea class="textarea mt-2" name="hasil_survey[]" rows="3">{{ old('hasil_survey.0', '') }}</textarea>
|
<textarea class="textarea mt-2" name="hasil_survey[]" rows="3">{{ old('hasil_survey.0', '') }}</textarea>
|
||||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||||
style="display: none;">
|
style="display: none;">
|
||||||
<i class="ki-outline ki-trash"></i>
|
<i class="ki-outline ki-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
<button type="button" class="btn btn-primary btn-sm mt-5"
|
<button type="button" class="btn btn-primary btn-sm mt-5"
|
||||||
onclick="addClonableItem('hasil_survey', 'hasil_survey')">
|
onclick="addClonableItem('hasil_survey', 'hasil_survey')">
|
||||||
<i class="ki-outline ki-plus"></i>
|
<i class="ki-outline ki-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -220,28 +237,28 @@
|
|||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">Kesimpulan dan saran</label>
|
<label class="form-label max-w-56">Kesimpulan dan saran</label>
|
||||||
<div id="fakta-negatif-container" class="flex flex-wrap items-baseline w-full">
|
<div id="fakta-negatif-container" class="flex flex-wrap items-baseline w-full">
|
||||||
@if (!empty($forminspeksi['kesimpulan_saran']))
|
@if (!empty($memo->kesimpulan_saran))
|
||||||
@foreach ($forminspeksi['kesimpulan_saran'] as $index => $negatif)
|
@foreach ($memo->kesimpulan_saran as $index => $negatif)
|
||||||
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
<div class="fakta_negatif flex items-center gap-2 mt-2 textarea-group w-full">
|
||||||
<textarea class="textarea mt-2" name="kesimpulan_saran[]" rows="3">{{ old("kesimpulan_saran.$index", $negatif) }}</textarea>
|
<textarea class="textarea mt-2" name="kesimpulan_saran[]" rows="3">{{ old("kesimpulan_saran.$index", $negatif) }}</textarea>
|
||||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||||
style="display: none;">
|
style="display: none;">
|
||||||
<i class="ki-outline ki-trash"></i>
|
<i class="ki-outline ki-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
@else
|
@else
|
||||||
<div class="kesimpulan_saran flex items-center gap-2 mt-2 textarea-group w-full">
|
<div class="kesimpulan_saran flex items-center gap-2 mt-2 textarea-group w-full">
|
||||||
<textarea class="textarea mt-2" name="kesimpulan_saran[]" rows="3">{{ old('kesimpulan_saran.0', $forminspeksi['kesimpulan_saran'][0] ?? '') }}</textarea>
|
<textarea class="textarea mt-2" name="kesimpulan_saran[]" rows="3">{{ old('kesimpulan_saran.0') }}</textarea>
|
||||||
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
<button class="btn btn-danger btn-sm remove-btn" type="button"
|
||||||
style="display: none;">
|
style="display: none;">
|
||||||
<i class="ki-outline ki-trash"></i>
|
<i class="ki-outline ki-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
<em id="error-kesimpulan_saran" class="alert text-danger text-sm"></em>
|
<em id="error-kesimpulan_saran" class="alert text-danger text-sm"></em>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
<button type="button" class="btn btn-primary btn-sm mt-5"
|
<button type="button" class="btn btn-primary btn-sm mt-5"
|
||||||
onclick="addClonableItem('fakta-negatif-container', 'kesimpulan_saran')">
|
onclick="addClonableItem('fakta-negatif-container', 'kesimpulan_saran')">
|
||||||
<i class="ki-outline ki-plus"></i>
|
<i class="ki-outline ki-plus"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -250,7 +267,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h3 class="card-title uppercase">
|
<h3 class="card-title uppercase">
|
||||||
@@ -279,7 +295,7 @@
|
|||||||
</h2>
|
</h2>
|
||||||
<div class="flex items-center mt-5">
|
<div class="flex items-center mt-5">
|
||||||
<img src="{{ Storage::url($formPeta[$item]) }}"
|
<img src="{{ Storage::url($formPeta[$item]) }}"
|
||||||
alt="{{ $item }}">
|
alt="{{ $item }}">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -315,10 +331,7 @@
|
|||||||
{{ $item['name_rute'] . ' ' . $loop->index + 1 }}
|
{{ $item['name_rute'] . ' ' . $loop->index + 1 }}
|
||||||
</h2>
|
</h2>
|
||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
|
|
||||||
|
|
||||||
<img src="{{ Storage::url($item['foto_rute']) }}" alt="">
|
<img src="{{ Storage::url($item['foto_rute']) }}" alt="">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -449,8 +462,6 @@
|
|||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
@include('lpj::surveyor.js.utils')
|
@include('lpj::surveyor.js.utils')
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function saveMemo() {
|
function saveMemo() {
|
||||||
const form = document.getElementById('form-memo');
|
const form = document.getElementById('form-memo');
|
||||||
@@ -496,7 +507,7 @@
|
|||||||
headers: {
|
headers: {
|
||||||
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
'X-CSRF-TOKEN': '{{ csrf_token() }}'
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function (response) {
|
||||||
hideLoadingSwal();
|
hideLoadingSwal();
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
@@ -520,11 +531,11 @@
|
|||||||
}
|
}
|
||||||
console.log(response);
|
console.log(response);
|
||||||
},
|
},
|
||||||
error: function(xhr, status, error) {
|
error: function (xhr, status, error) {
|
||||||
let errors = xhr.responseJSON?.errors;
|
let errors = xhr.responseJSON?.errors;
|
||||||
$('.alert').text('');
|
$('.alert').text('');
|
||||||
if (errors) {
|
if (errors) {
|
||||||
$.each(errors, function(key, value) {
|
$.each(errors, function (key, value) {
|
||||||
$(`#error-${key}`).text(value[0]);
|
$(`#error-${key}`).text(value[0]);
|
||||||
toastrErrorBuild(value[0]);
|
toastrErrorBuild(value[0]);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user