Merge branch 'staging' into feature/senior-officer
This commit is contained in:
@@ -40,6 +40,24 @@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="mb-5">
|
||||
<h3 class="text-md font-medium text-gray-900">
|
||||
Nilai Plafond:
|
||||
</h3>
|
||||
<span class="text-2sm text-gray-700">
|
||||
{{ $permohonan->nilaiPlafond->name }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="mb-5">
|
||||
<h3 class="text-md font-medium text-gray-900">
|
||||
Status Bayar:
|
||||
</h3>
|
||||
<span class="text-md font-bold {{ $permohonan->status_bayar === 'belum_bayar' ? 'text-red-600' : 'text-green-600' }} uppercase">
|
||||
{{ str_replace('_',' ',$permohonan->status_bayar) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -139,7 +157,7 @@
|
||||
@include('lpj::component.detail-jaminan')
|
||||
|
||||
<div class="card">
|
||||
<form action="{{ route('authorization.update', $permohonan->id) }}" method="POST">
|
||||
<form action="{{ route('authorization.update', $permohonan->id) }}" method="POST" id="authorizationForm">
|
||||
<input type="hidden" name="_method" value="PUT">
|
||||
@csrf
|
||||
<div class="card-body lg:py-7.5">
|
||||
@@ -149,6 +167,16 @@
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<textarea class="textarea" rows="3" type="number" id="keterangan" name="keterangan"></textarea>
|
||||
<em class="alert text-danger text-sm" id="keterangan-message"></em>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 mt-2" id="fileUploadSection">
|
||||
<label class="form-label max-w-56">
|
||||
Upload File Revisi
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input type="file" class="file-input" id="revisionFile" name="revisionFile">
|
||||
<em class="alert text-danger text-sm hidden" id="file-message"></em>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -156,7 +184,7 @@
|
||||
<button type="submit" name="status" value="preregister" class="btn btn-success">
|
||||
Approve
|
||||
</button>
|
||||
<button type="submit" name="status" value="revisi" class="btn btn-warning ml-3">
|
||||
<button type="submit" name="status" value="revisi" id="revisi" class="btn btn-warning ml-3">
|
||||
Revisi
|
||||
</button>
|
||||
</div>
|
||||
@@ -164,3 +192,45 @@
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const form = document.getElementById('authorizationForm');
|
||||
const keterangan = document.getElementById('keterangan');
|
||||
const revisiBtn = document.getElementById('revisi');
|
||||
const keteranganMessage = document.getElementById('keterangan-message');
|
||||
|
||||
const revisionFile = document.getElementById('revisionFile');
|
||||
const fileMessage = document.getElementById('file-message');
|
||||
|
||||
|
||||
form.addEventListener('submit', function(event) {
|
||||
if (event.submitter === revisiBtn && keterangan.value.trim() === '') {
|
||||
event.preventDefault();
|
||||
keteranganMessage.textContent = 'Catatan harus diisi.';
|
||||
} else {
|
||||
keteranganMessage.textContent = '';
|
||||
}
|
||||
|
||||
if (!revisionFile.files.length) {
|
||||
event.preventDefault();
|
||||
fileMessage.textContent = 'File revisi harus diunggah.';
|
||||
fileMessage.classList.remove('hidden');
|
||||
} else {
|
||||
fileMessage.classList.add('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
// Add event listener for typing in keterangan textarea
|
||||
keterangan.addEventListener('input', function() {
|
||||
keteranganMessage.classList.add('hidden');
|
||||
});
|
||||
|
||||
// Add event listener for file selection
|
||||
revisionFile.addEventListener('change', function() {
|
||||
fileMessage.classList.add('hidden');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
@@ -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">
|
||||
@if(isset($permohonan->id))
|
||||
@method('PUT')
|
||||
<input type="hidden" name="id" value="{{ $permohonan->id }}">
|
||||
@endif
|
||||
@csrf
|
||||
|
||||
@@ -52,19 +53,14 @@
|
||||
Tujuan Penilaian
|
||||
</label>
|
||||
<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>
|
||||
@if(isset($tujuanPenilaian))
|
||||
@foreach($tujuanPenilaian as $row)
|
||||
@if(isset($permohonan))
|
||||
<option value="{{ $row->id }}" {{ isset($permohonan->tujuan_penilaian_id) && $permohonan->tujuan_penilaian_id == $row->id?'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@else
|
||||
<option value="{{ $row->id }}">
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@endif
|
||||
<option value="{{ $row->id }}"
|
||||
{{ (old('tujuan_penilaian_id') == $row->id) || (isset($permohonan) && $permohonan->tujuan_penilaian_id == $row->id) ? 'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
@@ -83,19 +79,14 @@
|
||||
<option value="">Pilih Fasilitas Kredit</option>
|
||||
@if(isset($fasilitasKredit))
|
||||
@foreach($fasilitasKredit as $row)
|
||||
@if(isset($permohonan))
|
||||
<option value="{{ $row->id }}" {{ isset($permohonan->jenis_fasilitas_kredit_id) && $permohonan->jenis_fasilitas_kredit_id == $row->id ?'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@else
|
||||
<option value="{{ $row->id }}">
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@endif
|
||||
<option value="{{ $row->id }}"
|
||||
{{ (old('jenis_fasilitas_kredit_id') == $row->id) || (isset($permohonan) && $permohonan->jenis_fasilitas_kredit_id == $row->id) ? 'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
@error('status')
|
||||
@error('jenis_fasilitas_kredit_id')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
@@ -107,22 +98,17 @@
|
||||
</label>
|
||||
<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">
|
||||
<option value="">Pilih Nilai Flafond</option>
|
||||
<option value="">Pilih Nilai Plafond</option>
|
||||
@if(isset($plafond))
|
||||
@foreach($plafond as $row)
|
||||
@if(isset($permohonan))
|
||||
<option value="{{ $row->id }}" {{ isset($permohonan->nilai_plafond_id) && $permohonan->nilai_plafond_id == $row->id ?'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@else
|
||||
<option value="{{ $row->id }}">
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@endif
|
||||
<option value="{{ $row->id }}"
|
||||
{{ (old('nilai_plafond_id') == $row->id) || (isset($permohonan) && $permohonan->nilai_plafond_id == $row->id) ? 'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
@error('status')
|
||||
@error('nilai_plafond_id')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
@@ -135,10 +121,10 @@
|
||||
<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">
|
||||
<option value="">Pilih Status Bayar</option>
|
||||
<option {{ $permohonan->status_bayar=="sudah_bayar" ? 'selected' : '' }} value="sudah_bayar">Sudah Bayar</option>
|
||||
<option {{ $permohonan->status_bayar=="belum_bayar" ? 'selected' : '' }} value="belum_bayar">Belum 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" {{ (old('status_bayar') == 'belum_bayar') || (isset($permohonan) && $permohonan->status_bayar == 'belum_bayar') ? 'selected' : '' }}>Belum Bayar</option>
|
||||
</select>
|
||||
@error('status')
|
||||
@error('status_bayar')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
@@ -149,12 +135,16 @@
|
||||
Nilai NJOP
|
||||
</label>
|
||||
<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')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if($permohonan->status=='revisi')
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
Catatan : <br>
|
||||
@@ -211,19 +201,14 @@
|
||||
Tujuan Penilaian
|
||||
</label>
|
||||
<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>
|
||||
@if(isset($tujuanPenilaian))
|
||||
@foreach($tujuanPenilaian as $row)
|
||||
@if(isset($permohonan))
|
||||
<option value="{{ $row->id }}" {{ isset($permohonan->tujuan_penilaian_id) && $permohonan->tujuan_penilaian_id == $row->id?'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@else
|
||||
<option value="{{ $row->id }}">
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@endif
|
||||
<option value="{{ $row->id }}"
|
||||
{{ (old('tujuan_penilaian_id') == $row->id) || (isset($permohonan) && $permohonan->tujuan_penilaian_id == $row->id) ? 'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
@@ -242,19 +227,14 @@
|
||||
<option value="">Pilih Fasilitas Kredit</option>
|
||||
@if(isset($fasilitasKredit))
|
||||
@foreach($fasilitasKredit as $row)
|
||||
@if(isset($permohonan))
|
||||
<option value="{{ $row->id }}" {{ isset($permohonan->jenis_fasilitas_kredit_id) && $permohonan->jenis_fasilitas_kredit_id == $row->id ?'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@else
|
||||
<option value="{{ $row->id }}">
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@endif
|
||||
<option value="{{ $row->id }}"
|
||||
{{ (old('jenis_fasilitas_kredit_id') == $row->id) || (isset($permohonan) && $permohonan->jenis_fasilitas_kredit_id == $row->id) ? 'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
@error('status')
|
||||
@error('jenis_fasilitas_kredit_id')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
@@ -266,22 +246,17 @@
|
||||
</label>
|
||||
<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">
|
||||
<option value="">Pilih Nilai Flafond</option>
|
||||
<option value="">Pilih Nilai Plafond</option>
|
||||
@if(isset($plafond))
|
||||
@foreach($plafond as $row)
|
||||
@if(isset($permohonan))
|
||||
<option value="{{ $row->id }}" {{ isset($permohonan->nilai_plafond_id) && $permohonan->nilai_plafond_id == $row->id ?'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@else
|
||||
<option value="{{ $row->id }}">
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@endif
|
||||
<option value="{{ $row->id }}"
|
||||
{{ (old('nilai_plafond_id') == $row->id) || (isset($permohonan) && $permohonan->nilai_plafond_id == $row->id) ? 'selected' : '' }}>
|
||||
{{ $row->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
@error('status')
|
||||
@error('nilai_plafond_id')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
@@ -294,10 +269,10 @@
|
||||
<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">
|
||||
<option value="">Pilih Status Bayar</option>
|
||||
<option value="sudah_bayar">Sudah Bayar</option>
|
||||
<option value="belum_bayar">Belum 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" {{ (old('status_bayar') == 'belum_bayar') || (isset($permohonan) && $permohonan->status_bayar == 'belum_bayar') ? 'selected' : '' }}>Belum Bayar</option>
|
||||
</select>
|
||||
@error('status')
|
||||
@error('status_bayar')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
@@ -308,41 +283,16 @@
|
||||
Nilai NJOP
|
||||
</label>
|
||||
<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')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</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">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
Save
|
||||
|
||||
Reference in New Issue
Block a user