Merge branch 'staging' of https://git.putrakuningan.com/daengdeni/lpj into andydev
This commit is contained in:
@@ -108,7 +108,6 @@
|
|||||||
public function update(PermohonanRequest $request, $id)
|
public function update(PermohonanRequest $request, $id)
|
||||||
{
|
{
|
||||||
$validate = $request->validated();
|
$validate = $request->validated();
|
||||||
|
|
||||||
if ($validate) {
|
if ($validate) {
|
||||||
try {
|
try {
|
||||||
// Update in database
|
// Update in database
|
||||||
@@ -116,6 +115,7 @@
|
|||||||
if ($permohonan->status == 'revisi') {
|
if ($permohonan->status == 'revisi') {
|
||||||
$validate['status'] = 'order';
|
$validate['status'] = 'order';
|
||||||
}
|
}
|
||||||
|
|
||||||
$permohonan->update($validate);
|
$permohonan->update($validate);
|
||||||
return redirect()
|
return redirect()
|
||||||
->route('permohonan.index')->with('success', 'Permohonan updated successfully');
|
->route('permohonan.index')->with('success', 'Permohonan updated successfully');
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
'nomor_registrasi' => 'nullable|string|max:10',
|
'nomor_registrasi' => 'nullable|string|max:10',
|
||||||
'tanggal_permohonan' => 'nullable|date',
|
'tanggal_permohonan' => 'nullable|date',
|
||||||
'user_id' => 'nullable|exists:users,id',
|
'user_id' => 'nullable|exists:users,id',
|
||||||
'branch_id' => 'required|exists:branches,id',
|
'branch_id' => 'nullable|exists:branches,id',
|
||||||
'tujuan_penilaian_id' => 'required|exists:tujuan_penilaian,id',
|
'tujuan_penilaian_id' => 'required|exists:tujuan_penilaian,id',
|
||||||
'debiture_id' => 'required|exists:debitures,id',
|
'debiture_id' => 'required|exists:debitures,id',
|
||||||
'status' => 'nullable|string',
|
'status' => 'nullable|string',
|
||||||
@@ -49,6 +49,7 @@
|
|||||||
'tanggal_permohonan' => date('Y-m-d'),
|
'tanggal_permohonan' => date('Y-m-d'),
|
||||||
'user_id' => auth()->user()->id,
|
'user_id' => auth()->user()->id,
|
||||||
'branch_id' => auth()->user()->branch_id,
|
'branch_id' => auth()->user()->branch_id,
|
||||||
|
'status' => 'order'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -246,7 +246,13 @@
|
|||||||
Dokumen Jaminan
|
Dokumen Jaminan
|
||||||
</label>
|
</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<input class="file-input" type="file" name="dokumen_jaminan[]" value="">
|
<div class="flex flex-col w-full gap-2" id="file-container-{{$n}}">
|
||||||
|
<div class="flex items-center gap-2">
|
||||||
|
<input class="file-input" type="file" name="dokumen_jaminan[{{ $n }}][]" multiple>
|
||||||
|
<button type="button" class="btn btn-primary w-[100px] text-center" onclick="addFileInput({{ $n }})">Add More</button>
|
||||||
|
</div>
|
||||||
|
<div id="additional-files-{{ $n }}"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
<form action="{{ isset($permohonan->id) ? route('permohonan.update', $permohonan) : route('permohonan.store') }}" method="POST" class="grid gap-5" enctype="multipart/form-data">
|
<form action="{{ isset($permohonan->id) ? route('permohonan.update', $permohonan) : route('permohonan.store') }}" method="POST" class="grid gap-5" enctype="multipart/form-data">
|
||||||
@if(isset($permohonan->id))
|
@if(isset($permohonan->id))
|
||||||
@method('PUT')
|
@method('PUT')
|
||||||
|
<input type="hidden" name="id" value="{{ $permohonan->id }}">
|
||||||
@endif
|
@endif
|
||||||
@csrf
|
@csrf
|
||||||
|
|
||||||
@@ -52,19 +53,14 @@
|
|||||||
Tujuan Penilaian
|
Tujuan Penilaian
|
||||||
</label>
|
</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<select class="input tomselect w-full @error('branch_id') border-danger bg-danger-light @enderror" name="tujuan_penilaian_id" id="tujuan_penilaian_id">
|
<select class="input tomselect w-full @error('tujuan_penilaian_id') border-danger bg-danger-light @enderror" name="tujuan_penilaian_id" id="tujuan_penilaian_id">
|
||||||
<option value="">Pilih Tujuan Penilaian</option>
|
<option value="">Pilih Tujuan Penilaian</option>
|
||||||
@if(isset($tujuanPenilaian))
|
@if(isset($tujuanPenilaian))
|
||||||
@foreach($tujuanPenilaian as $row)
|
@foreach($tujuanPenilaian as $row)
|
||||||
@if(isset($permohonan))
|
<option value="{{ $row->id }}"
|
||||||
<option value="{{ $row->id }}" {{ isset($permohonan->tujuan_penilaian_id) && $permohonan->tujuan_penilaian_id == $row->id?'selected' : '' }}>
|
{{ (old('tujuan_penilaian_id') == $row->id) || (isset($permohonan) && $permohonan->tujuan_penilaian_id == $row->id) ? 'selected' : '' }}>
|
||||||
{{ $row->name }}
|
{{ $row->name }}
|
||||||
</option>
|
</option>
|
||||||
@else
|
|
||||||
<option value="{{ $row->id }}">
|
|
||||||
{{ $row->name }}
|
|
||||||
</option>
|
|
||||||
@endif
|
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</select>
|
</select>
|
||||||
@@ -83,19 +79,14 @@
|
|||||||
<option value="">Pilih Fasilitas Kredit</option>
|
<option value="">Pilih Fasilitas Kredit</option>
|
||||||
@if(isset($fasilitasKredit))
|
@if(isset($fasilitasKredit))
|
||||||
@foreach($fasilitasKredit as $row)
|
@foreach($fasilitasKredit as $row)
|
||||||
@if(isset($permohonan))
|
<option value="{{ $row->id }}"
|
||||||
<option value="{{ $row->id }}" {{ isset($permohonan->jenis_fasilitas_kredit_id) && $permohonan->jenis_fasilitas_kredit_id == $row->id ?'selected' : '' }}>
|
{{ (old('jenis_fasilitas_kredit_id') == $row->id) || (isset($permohonan) && $permohonan->jenis_fasilitas_kredit_id == $row->id) ? 'selected' : '' }}>
|
||||||
{{ $row->name }}
|
{{ $row->name }}
|
||||||
</option>
|
</option>
|
||||||
@else
|
|
||||||
<option value="{{ $row->id }}">
|
|
||||||
{{ $row->name }}
|
|
||||||
</option>
|
|
||||||
@endif
|
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</select>
|
</select>
|
||||||
@error('status')
|
@error('jenis_fasilitas_kredit_id')
|
||||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
@@ -107,22 +98,17 @@
|
|||||||
</label>
|
</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<select class="input tomselect w-full @error('nilai_plafond_id') border-danger bg-danger-light @enderror" name="nilai_plafond_id" id="nilai_plafond_id">
|
<select class="input tomselect w-full @error('nilai_plafond_id') border-danger bg-danger-light @enderror" name="nilai_plafond_id" id="nilai_plafond_id">
|
||||||
<option value="">Pilih Nilai Flafond</option>
|
<option value="">Pilih Nilai Plafond</option>
|
||||||
@if(isset($plafond))
|
@if(isset($plafond))
|
||||||
@foreach($plafond as $row)
|
@foreach($plafond as $row)
|
||||||
@if(isset($permohonan))
|
<option value="{{ $row->id }}"
|
||||||
<option value="{{ $row->id }}" {{ isset($permohonan->nilai_plafond_id) && $permohonan->nilai_plafond_id == $row->id ?'selected' : '' }}>
|
{{ (old('nilai_plafond_id') == $row->id) || (isset($permohonan) && $permohonan->nilai_plafond_id == $row->id) ? 'selected' : '' }}>
|
||||||
{{ $row->name }}
|
{{ $row->name }}
|
||||||
</option>
|
</option>
|
||||||
@else
|
|
||||||
<option value="{{ $row->id }}">
|
|
||||||
{{ $row->name }}
|
|
||||||
</option>
|
|
||||||
@endif
|
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</select>
|
</select>
|
||||||
@error('status')
|
@error('nilai_plafond_id')
|
||||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
@@ -135,10 +121,10 @@
|
|||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<select class="input tomselect w-full @error('status_bayar') border-danger bg-danger-light @enderror" name="status_bayar" id="status_bayar">
|
<select class="input tomselect w-full @error('status_bayar') border-danger bg-danger-light @enderror" name="status_bayar" id="status_bayar">
|
||||||
<option value="">Pilih Status Bayar</option>
|
<option value="">Pilih Status Bayar</option>
|
||||||
<option {{ $permohonan->status_bayar=="sudah_bayar" ? 'selected' : '' }} value="sudah_bayar">Sudah Bayar</option>
|
<option value="sudah_bayar" {{ (old('status_bayar') == 'sudah_bayar') || (isset($permohonan) && $permohonan->status_bayar == 'sudah_bayar') ? 'selected' : '' }}>Sudah Bayar</option>
|
||||||
<option {{ $permohonan->status_bayar=="belum_bayar" ? 'selected' : '' }} value="belum_bayar">Belum Bayar</option>
|
<option value="belum_bayar" {{ (old('status_bayar') == 'belum_bayar') || (isset($permohonan) && $permohonan->status_bayar == 'belum_bayar') ? 'selected' : '' }}>Belum Bayar</option>
|
||||||
</select>
|
</select>
|
||||||
@error('status')
|
@error('status_bayar')
|
||||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
@@ -149,12 +135,16 @@
|
|||||||
Nilai NJOP
|
Nilai NJOP
|
||||||
</label>
|
</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<input class="input @error('nilai_njop') border-danger bg-danger-light @enderror" type="text" name="nilai_njop" value="{{ $permohonan->nilai_njop ?? '' }}">
|
<input class="input @error('nilai_njop') border-danger bg-danger-light @enderror"
|
||||||
|
type="text"
|
||||||
|
name="nilai_njop"
|
||||||
|
value="{{ old('nilai_njop', $permohonan->nilai_njop ?? '') }}">
|
||||||
@error('nilai_njop')
|
@error('nilai_njop')
|
||||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if($permohonan->status=='revisi')
|
@if($permohonan->status=='revisi')
|
||||||
<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">
|
||||||
Catatan : <br>
|
Catatan : <br>
|
||||||
@@ -211,19 +201,14 @@
|
|||||||
Tujuan Penilaian
|
Tujuan Penilaian
|
||||||
</label>
|
</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<select class="input tomselect w-full @error('branch_id') border-danger bg-danger-light @enderror" name="tujuan_penilaian_id" id="tujuan_penilaian_id">
|
<select class="input tomselect w-full @error('tujuan_penilaian_id') border-danger bg-danger-light @enderror" name="tujuan_penilaian_id" id="tujuan_penilaian_id">
|
||||||
<option value="">Pilih Tujuan Penilaian</option>
|
<option value="">Pilih Tujuan Penilaian</option>
|
||||||
@if(isset($tujuanPenilaian))
|
@if(isset($tujuanPenilaian))
|
||||||
@foreach($tujuanPenilaian as $row)
|
@foreach($tujuanPenilaian as $row)
|
||||||
@if(isset($permohonan))
|
<option value="{{ $row->id }}"
|
||||||
<option value="{{ $row->id }}" {{ isset($permohonan->tujuan_penilaian_id) && $permohonan->tujuan_penilaian_id == $row->id?'selected' : '' }}>
|
{{ (old('tujuan_penilaian_id') == $row->id) || (isset($permohonan) && $permohonan->tujuan_penilaian_id == $row->id) ? 'selected' : '' }}>
|
||||||
{{ $row->name }}
|
{{ $row->name }}
|
||||||
</option>
|
</option>
|
||||||
@else
|
|
||||||
<option value="{{ $row->id }}">
|
|
||||||
{{ $row->name }}
|
|
||||||
</option>
|
|
||||||
@endif
|
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</select>
|
</select>
|
||||||
@@ -242,19 +227,14 @@
|
|||||||
<option value="">Pilih Fasilitas Kredit</option>
|
<option value="">Pilih Fasilitas Kredit</option>
|
||||||
@if(isset($fasilitasKredit))
|
@if(isset($fasilitasKredit))
|
||||||
@foreach($fasilitasKredit as $row)
|
@foreach($fasilitasKredit as $row)
|
||||||
@if(isset($permohonan))
|
<option value="{{ $row->id }}"
|
||||||
<option value="{{ $row->id }}" {{ isset($permohonan->jenis_fasilitas_kredit_id) && $permohonan->jenis_fasilitas_kredit_id == $row->id ?'selected' : '' }}>
|
{{ (old('jenis_fasilitas_kredit_id') == $row->id) || (isset($permohonan) && $permohonan->jenis_fasilitas_kredit_id == $row->id) ? 'selected' : '' }}>
|
||||||
{{ $row->name }}
|
{{ $row->name }}
|
||||||
</option>
|
</option>
|
||||||
@else
|
|
||||||
<option value="{{ $row->id }}">
|
|
||||||
{{ $row->name }}
|
|
||||||
</option>
|
|
||||||
@endif
|
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</select>
|
</select>
|
||||||
@error('status')
|
@error('jenis_fasilitas_kredit_id')
|
||||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
@@ -266,22 +246,17 @@
|
|||||||
</label>
|
</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<select class="input tomselect w-full @error('nilai_plafond_id') border-danger bg-danger-light @enderror" name="nilai_plafond_id" id="nilai_plafond_id">
|
<select class="input tomselect w-full @error('nilai_plafond_id') border-danger bg-danger-light @enderror" name="nilai_plafond_id" id="nilai_plafond_id">
|
||||||
<option value="">Pilih Nilai Flafond</option>
|
<option value="">Pilih Nilai Plafond</option>
|
||||||
@if(isset($plafond))
|
@if(isset($plafond))
|
||||||
@foreach($plafond as $row)
|
@foreach($plafond as $row)
|
||||||
@if(isset($permohonan))
|
<option value="{{ $row->id }}"
|
||||||
<option value="{{ $row->id }}" {{ isset($permohonan->nilai_plafond_id) && $permohonan->nilai_plafond_id == $row->id ?'selected' : '' }}>
|
{{ (old('nilai_plafond_id') == $row->id) || (isset($permohonan) && $permohonan->nilai_plafond_id == $row->id) ? 'selected' : '' }}>
|
||||||
{{ $row->name }}
|
{{ $row->name }}
|
||||||
</option>
|
</option>
|
||||||
@else
|
|
||||||
<option value="{{ $row->id }}">
|
|
||||||
{{ $row->name }}
|
|
||||||
</option>
|
|
||||||
@endif
|
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
</select>
|
</select>
|
||||||
@error('status')
|
@error('nilai_plafond_id')
|
||||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
@@ -294,10 +269,10 @@
|
|||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<select class="input tomselect w-full @error('status_bayar') border-danger bg-danger-light @enderror" name="status_bayar" id="status_bayar">
|
<select class="input tomselect w-full @error('status_bayar') border-danger bg-danger-light @enderror" name="status_bayar" id="status_bayar">
|
||||||
<option value="">Pilih Status Bayar</option>
|
<option value="">Pilih Status Bayar</option>
|
||||||
<option value="sudah_bayar">Sudah Bayar</option>
|
<option value="sudah_bayar" {{ (old('status_bayar') == 'sudah_bayar') || (isset($permohonan) && $permohonan->status_bayar == 'sudah_bayar') ? 'selected' : '' }}>Sudah Bayar</option>
|
||||||
<option value="belum_bayar">Belum Bayar</option>
|
<option value="belum_bayar" {{ (old('status_bayar') == 'belum_bayar') || (isset($permohonan) && $permohonan->status_bayar == 'belum_bayar') ? 'selected' : '' }}>Belum Bayar</option>
|
||||||
</select>
|
</select>
|
||||||
@error('status')
|
@error('status_bayar')
|
||||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
@@ -308,41 +283,16 @@
|
|||||||
Nilai NJOP
|
Nilai NJOP
|
||||||
</label>
|
</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<input class="input @error('nilai_njop') border-danger bg-danger-light @enderror" type="text" name="nilai_njop" value="{{ $permohonan->nilai_njop ?? '' }}">
|
<input class="input @error('nilai_njop') border-danger bg-danger-light @enderror"
|
||||||
|
type="text"
|
||||||
|
name="nilai_njop"
|
||||||
|
value="{{ old('nilai_njop', $permohonan->nilai_njop ?? '') }}">
|
||||||
@error('nilai_njop')
|
@error('nilai_njop')
|
||||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
|
||||||
<label class="form-label max-w-56">
|
|
||||||
Status Permohonan
|
|
||||||
</label>
|
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
|
||||||
<select class="input tomselect w-full @error('status') border-danger bg-danger-light @enderror" name="status" id="status">
|
|
||||||
<option value="">Pilih Status Permohonan</option>
|
|
||||||
@if(isset($status))
|
|
||||||
@foreach($status as $row)
|
|
||||||
@if(isset($permohonan))
|
|
||||||
<option value="{{ $row->slug }}" {{ isset($permohonan->status) && $permohonan->status == $row->slug ?'selected' : '' }}>
|
|
||||||
{{ $row->name }}
|
|
||||||
</option>
|
|
||||||
@else
|
|
||||||
<option value="{{ $row->slug }}">
|
|
||||||
{{ $row->name }}
|
|
||||||
</option>
|
|
||||||
@endif
|
|
||||||
@endforeach
|
|
||||||
@endif
|
|
||||||
</select>
|
|
||||||
@error('status')
|
|
||||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
<button type="submit" class="btn btn-primary">
|
<button type="submit" class="btn btn-primary">
|
||||||
Save
|
Save
|
||||||
|
|||||||
Reference in New Issue
Block a user