update filed penilai, surveyor dan tambah buton revisi
This commit is contained in:
@@ -6,11 +6,15 @@
|
||||
|
||||
@push('styles')
|
||||
<style>
|
||||
.divider {
|
||||
border: none;
|
||||
height: 1px;
|
||||
background-color: #ddd;
|
||||
margin: 20px 0;
|
||||
.modal {
|
||||
width: 50%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
@@ -70,7 +74,7 @@
|
||||
Name
|
||||
</td>
|
||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
||||
{{ $permohonan->debiture->name ?? "" }}
|
||||
{{ $permohonan->debiture->name ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -78,7 +82,7 @@
|
||||
Email
|
||||
</td>
|
||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
||||
{{ $permohonan->debiture->email ?? "" }}
|
||||
{{ $permohonan->debiture->email ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -86,7 +90,7 @@
|
||||
Phone
|
||||
</td>
|
||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
||||
{{ $permohonan->debiture->phone ?? "" }}
|
||||
{{ $permohonan->debiture->phone ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -95,7 +99,7 @@
|
||||
Address
|
||||
</td>
|
||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
||||
{{ $permohonan->debiture->address ?? "" }}
|
||||
{{ $permohonan->debiture->address ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -103,7 +107,11 @@
|
||||
|
||||
</td>
|
||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
||||
{{ $permohonan->debiture->village->name ?? "" }}, {{ $permohonan->debiture->district->name ?? "" }}, {{ $permohonan->debiture->city->name ?? "" }}, {{ $permohonan->debiture->province->name ?? "" }} - {{ $permohonan->debiture->village->postal_code ?? "" }}
|
||||
{{ $permohonan->debiture->village->name ?? '' }},
|
||||
{{ $permohonan->debiture->district->name ?? '' }},
|
||||
{{ $permohonan->debiture->city->name ?? '' }},
|
||||
{{ $permohonan->debiture->province->name ?? '' }} -
|
||||
{{ $permohonan->debiture->village->postal_code ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -115,7 +123,7 @@
|
||||
Cabang
|
||||
</td>
|
||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
||||
{{ $permohonan->debiture->branch->name ?? "" }}
|
||||
{{ $permohonan->debiture->branch->name ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -123,7 +131,7 @@
|
||||
CIF
|
||||
</td>
|
||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
||||
{{ $permohonan->debiture->cif ?? "" }}
|
||||
{{ $permohonan->debiture->cif ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -131,7 +139,7 @@
|
||||
Nomor Rekening
|
||||
</td>
|
||||
<td class="py-3 text-gray-700 text-sm font-normal">
|
||||
{{ $permohonan->debiture->nomor_rekening ?? "" }}
|
||||
{{ $permohonan->debiture->nomor_rekening ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -139,7 +147,7 @@
|
||||
NPWP
|
||||
</td>
|
||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
||||
{{ $permohonan->debiture->npwp ?? "" }}
|
||||
{{ $permohonan->debiture->npwp ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -155,8 +163,9 @@
|
||||
</h3>
|
||||
</div>
|
||||
<div data-accordion="true">
|
||||
@foreach($permohonan->debiture->documents as $dokumen)
|
||||
<div class="accordion-item [&:not(:last-child)]:border-b border-b-gray-200" data-accordion-item="true" id="accordion_1_item_1">
|
||||
@foreach ($permohonan->debiture->documents as $dokumen)
|
||||
<div class="accordion-item [&:not(:last-child)]:border-b border-b-gray-200" data-accordion-item="true"
|
||||
id="accordion_1_item_1">
|
||||
<button class="accordion-toggle py-4 group mx-8" data-accordion-toggle="#accordion_1_content_1">
|
||||
<span class="text-base text-gray-900 font-medium">
|
||||
Jaminan {{ $loop->index + 1 }}
|
||||
@@ -173,7 +182,7 @@
|
||||
Pemilik Jaminan:
|
||||
</h3>
|
||||
<span class="text-2sm text-gray-700">
|
||||
{{ $dokumen->pemilik->name?? "" }}
|
||||
{{ $dokumen->pemilik->name ?? '' }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="mb-5">
|
||||
@@ -181,7 +190,7 @@
|
||||
Jenis Jaminan:
|
||||
</h3>
|
||||
<span class="text-2sm text-gray-700">
|
||||
{{ $dokumen->jenisJaminan->name?? "" }}
|
||||
{{ $dokumen->jenisJaminan->name ?? '' }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="mb-5">
|
||||
@@ -189,7 +198,7 @@
|
||||
Hubungan Pemilik Jaminan:
|
||||
</h3>
|
||||
<span class="text-2sm text-gray-700">
|
||||
{{ $dokumen->pemilik->hubungan_pemilik->name?? "" }}
|
||||
{{ $dokumen->pemilik->hubungan_pemilik->name ?? '' }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="mb-5">
|
||||
@@ -197,20 +206,24 @@
|
||||
Alamat Pemilik Jaminan:
|
||||
</h3>
|
||||
<span class="text-2sm text-gray-700">
|
||||
{{ $dokumen->pemilik->address ?? ""}},
|
||||
<br> {{ $dokumen->pemilik->village->name ?? "" }}, {{ $dokumen->pemilik->district->name ?? "" }}, {{ $dokumen->pemilik->city->name ?? "" }}, {{ $dokumen->pemilik->province->name ?? "" }} - {{ $dokumen->pemilik->village->postal_code ?? "" }}
|
||||
{{ $dokumen->pemilik->address ?? '' }},
|
||||
<br> {{ $dokumen->pemilik->village->name ?? '' }},
|
||||
{{ $dokumen->pemilik->district->name ?? '' }},
|
||||
{{ $dokumen->pemilik->city->name ?? '' }},
|
||||
{{ $dokumen->pemilik->province->name ?? '' }} -
|
||||
{{ $dokumen->pemilik->village->postal_code ?? '' }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-table scrollable-x-auto pb-3">
|
||||
<table class="table align-middle text-sm text-gray-500">
|
||||
@foreach($dokumen->detail as $detail)
|
||||
@foreach ($dokumen->detail as $detail)
|
||||
<tr>
|
||||
<td class="py-2 text-gray-600 font-normal max-w-[100px]">
|
||||
{{ $loop->index + 1 }}. {{ $detail->jenisLegalitasJaminan->name }}
|
||||
</td>
|
||||
<td class="py-2 text-gray-800 font-normaltext-sm">
|
||||
{{ $detail->name ?? "" }}
|
||||
{{ $detail->name ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -218,8 +231,9 @@
|
||||
Dokumen Jaminan
|
||||
</td>
|
||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
||||
@if(isset($detail->dokumen_jaminan))
|
||||
<a href="{{ route('debitur.jaminan.download',['id'=>$permohonan->debiture->id,'dokumen'=>$detail->id]) }}" class="badge badge-sm badge-outline mt-2">{{ basename($detail->dokumen_jaminan) }}
|
||||
@if (isset($detail->dokumen_jaminan))
|
||||
<a href="{{ route('debitur.jaminan.download', ['id' => $permohonan->debiture->id, 'dokumen' => $detail->id]) }}"
|
||||
class="badge badge-sm badge-outline mt-2">{{ basename($detail->dokumen_jaminan) }}
|
||||
<i class="ki-filled ki-cloud-download"></i></a>
|
||||
@endif
|
||||
</td>
|
||||
@@ -229,7 +243,7 @@
|
||||
Keterangan
|
||||
</td>
|
||||
<td class="py-3 text-gray-700 text-2sm font-normal">
|
||||
{{ $detail->keterangan ?? "" }}
|
||||
{{ $detail->keterangan ?? '' }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@@ -240,32 +254,30 @@
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card pb-2.5">
|
||||
<div class="card-header" id="basic_settings">
|
||||
<h3 class="card-title">
|
||||
Form Assignment
|
||||
</h3>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('penilaian.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i>
|
||||
Back</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form
|
||||
action="{{ isset($penilaian->permohonan_id) ? route('penilaian.update', $permohonan) : route('penilaian.store') }}"
|
||||
action="{{ isset($penilaian->nomor_registrasi) ? route('penilaian.update', $permohonan) : route('penilaian.store') }}"
|
||||
method="POST" class="">
|
||||
@if (isset($penilaian->permohonan_id))
|
||||
@if (isset($penilaian->nomor_registrasi))
|
||||
@method('PUT')
|
||||
@endif
|
||||
@csrf
|
||||
<div class="pl-1 lg:pl-5 xl:pl-5 grid gap-2.5 p-5">
|
||||
<div class="pl-1 grid gap-2.5">
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Penilai yang Dilakukan oleh
|
||||
</label>
|
||||
<input type="hidden" name="permohonan_id" value="{{ $penilaian->permohonan_id ?? $permohonan->id }}">
|
||||
<input type="hidden" name="nomor_registrasi"
|
||||
value="{{ $penilaian->nomor_registrasi ?? $permohonan->nomor_registrasi }}">
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select
|
||||
class="input tomselect w-full @error('jenis_penilaian_id') border-danger bg-danger-light @enderror"
|
||||
@@ -273,7 +285,7 @@
|
||||
<option value="">Jenis Penilaian</option>
|
||||
|
||||
@foreach ($jenisPenilaian as $item)
|
||||
@if (isset($penilaian->permohonan_id))
|
||||
@if (isset($penilaian->nomor_registrasi))
|
||||
<option value="{{ $item->id }}"
|
||||
{{ $penilaian->teams_id == $item->id ? 'selected' : '' }}>
|
||||
{{ $item->name }}</option>
|
||||
@@ -294,11 +306,11 @@
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select
|
||||
class="input tomselect w-full @error('teams_id') border-danger bg-danger-light @enderror"
|
||||
class="input tomselect w-full @error('teams_id') border-danger bg-danger-light @enderror"
|
||||
name="teams_id" id="teams_id">
|
||||
<option value="">Pilih Tim Penilai</option>
|
||||
@foreach ($teamPenilai as $item)
|
||||
@if (isset($penilaian->permohonan_id))
|
||||
@if (isset($penilaian->nomor_registrasi))
|
||||
<option value="{{ $item->id }}"
|
||||
{{ $penilaian->teams_id == $item->id ? 'selected' : '' }}>
|
||||
{{ $item->regions->name }}</option>
|
||||
@@ -318,22 +330,14 @@
|
||||
Surveyor yang di tunjuk
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="user_id" name="user_id"
|
||||
class="input @error('user_id') border-danger bg-danger-light @enderror w-full">
|
||||
<option value="">Pilih Penilai</option>
|
||||
<select id="surveyor_id" name=""
|
||||
class="input select @error('surveyor_id') border-danger bg-danger-light @enderror w-full">
|
||||
<option value="">Pilih Surveyor</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Surveyor dan penilai yang di tunjuk
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="user_id" name="user_id"
|
||||
class="input @error('user_id') border-danger bg-danger-light @enderror w-full">
|
||||
<option value="">Pilih Penilai</option>
|
||||
</select>
|
||||
@error('surveyor_id')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -342,13 +346,32 @@
|
||||
Penilai yang di tunjuk
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="user_id" name="user_id"
|
||||
class="input @error('user_id') border-danger bg-danger-light @enderror w-full">
|
||||
<select id="penilaian_id" name="penilaian_id"
|
||||
class="input select @error('penilaian_id') border-danger bg-danger-light @enderror w-full">
|
||||
<option value="">Pilih Penilai</option>
|
||||
</select>
|
||||
@error('penilaian_id')
|
||||
<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">
|
||||
Surveyor dan penilai yang di tunjuk
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="penilai_surveyor_id" name="penilai_surveyor_id"
|
||||
class="input select @error('penilai_surveyor_id') border-danger bg-danger-light @enderror w-full">
|
||||
<option value="">Pilih Surveyor dan Penilai</option>
|
||||
</select>
|
||||
@error('penilai_surveyor_id')
|
||||
<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">
|
||||
Jadwal Kunjungan
|
||||
@@ -369,42 +392,98 @@
|
||||
Catatan
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<textarea class="textarea @error('keterangan') border-danger bg-danger-light @enderror" rows="3" type="text"
|
||||
name="keterangan">{{ $penilaian->keterangan ?? '' }}</textarea>
|
||||
<textarea class="textarea @error('keterangan') border-danger bg-danger-light @enderror" rows="3"
|
||||
type="text" name="keterangan">{{ $penilaian->keterangan ?? '' }}</textarea>
|
||||
</div>
|
||||
@error('keterangan')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex justify-end card-footer">
|
||||
<button type="submit"
|
||||
@if ($permohonan->status == 'Assign') class="btn btn-success"
|
||||
@else
|
||||
class="btn btn-warning" @endif>
|
||||
Aproved
|
||||
<div class="flex justify-end card-footer mt-2">
|
||||
<button type="submit" class="btn btn-success">
|
||||
Aprove
|
||||
</button>
|
||||
|
||||
<button type="button" data-modal-toggle="#modal_revisi" class="btn btn-warning ml-3">
|
||||
Revisi
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal" data-modal="true" id="modal_revisi">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title">
|
||||
Revisi
|
||||
</h3>
|
||||
<button class="btn btn-xs btn-icon btn-light" data-modal-dismiss="true">
|
||||
<i class="ki-outline ki-cross">
|
||||
</i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form action="{{ route('penilaian.revisi', $penilaian->nomor_registrasi ?? $permohonan->nomor_registrasi) }}" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
|
||||
<div class="pl-1 grid gap-2.5">
|
||||
<input type="hidden" name="nomor_registrasi" value="{{ $penilaian->nomor_registrasi ?? $permohonan->nomor_registrasi }}">
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Dokumen Revisi</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<input class="file-input @error('dokumen_revisi') border-danger bg-danger-light @enderror" type="file" name="dokumen_revisi" value="">
|
||||
</div>
|
||||
@error('dokumen_revisi')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">Catatan</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<textarea class="textarea @error('keterangan_revisi') border-danger bg-danger-light @enderror" rows="3" name="keterangan_revisi">{{ old('keterangan_revisi', $penilaian->keterangan ?? '') }}</textarea>
|
||||
</div>
|
||||
@error('keterangan')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer justify-end mt-2">
|
||||
<div class="flex gap-4">
|
||||
<button class="btn btn-light" data-modal-dismiss="true">Cancel</button>
|
||||
<button class="btn btn-primary">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
let teamsSelect = document.getElementById('teams_id');
|
||||
let penilaiSelect = document.getElementById('user_id');
|
||||
let penilaiSelect = document.getElementById('penilaian_id');
|
||||
let surveyorSelect = document.getElementById('surveyor_id');
|
||||
let penilaiSurveyorSelect = document.getElementById('penilai_surveyor_id');
|
||||
|
||||
// Mengambil nilai user_id dari variabel PHP
|
||||
let selectedUserId = @json($penilaian->user_id ?? null); // Gunakan null jika tidak ada
|
||||
let selectedSurveyorId = @json($penilaian->surveyor_id ?? null);
|
||||
let selectedPenilaiId = @json($penilaian->penilai_id ?? null);
|
||||
let selectedPenilaiSurveyorId = @json($penilaian->penilai_surveyor_id ?? null);
|
||||
|
||||
function fetchPenilai(teamId) {
|
||||
penilaiSelect.innerHTML = '';
|
||||
penilaiSelect.innerHTML = '<option value="">Pilih Penilai</option>';
|
||||
surveyorSelect.innerHTML = '<option value="">Pilih Surveyor</option>';
|
||||
penilaiSurveyorSelect.innerHTML = '<option value="">Pilih Penilai Surveyor</option>';
|
||||
|
||||
if (teamId) {
|
||||
fetch(`/penilaian/getUserTeams/${teamId}`)
|
||||
@@ -412,35 +491,60 @@
|
||||
.then(data => {
|
||||
if (data && data.length > 0) {
|
||||
data.forEach((user) => {
|
||||
let option = document.createElement('option');
|
||||
option.value = user.id;
|
||||
option.text = user.name;
|
||||
let optionPenilai = document.createElement('option');
|
||||
let optionSurveyor = document.createElement('option');
|
||||
let optionPenilaiSurveyor = document.createElement('option');
|
||||
|
||||
if (selectedUserId && selectedUserId == user.id) {
|
||||
option.selected = true;
|
||||
optionPenilai.value = user.id;
|
||||
optionSurveyor.value = user.id;
|
||||
optionPenilaiSurveyor.value = user.id;
|
||||
|
||||
optionPenilai.text = user.name;
|
||||
optionSurveyor.text = user.name;
|
||||
optionPenilaiSurveyor.text = user.name;
|
||||
|
||||
// Tambahkan pengguna ke semua select
|
||||
penilaiSelect.appendChild(optionPenilai);
|
||||
surveyorSelect.appendChild(optionSurveyor);
|
||||
penilaiSurveyorSelect.appendChild(optionPenilaiSurveyor);
|
||||
|
||||
// Jika dalam mode edit dan data sudah ada, set opsi yang sesuai sebagai selected
|
||||
if (selectedPenilaiId && selectedPenilaiId == user.id) {
|
||||
optionPenilai.selected = true;
|
||||
}
|
||||
if (selectedSurveyorId && selectedSurveyorId == user.id) {
|
||||
optionSurveyor.selected = true;
|
||||
}
|
||||
if (selectedPenilaiSurveyorId && selectedPenilaiSurveyorId == user
|
||||
.id) {
|
||||
optionPenilaiSurveyor.selected = true;
|
||||
}
|
||||
|
||||
penilaiSelect.appendChild(option);
|
||||
});
|
||||
} else {
|
||||
let option = document.createElement('option');
|
||||
option.value = '';
|
||||
option.text = 'Tidak ada penilai.';
|
||||
penilaiSelect.appendChild(option);
|
||||
let noUserOption = document.createElement('option');
|
||||
noUserOption.value = '';
|
||||
noUserOption.text = 'Tidak ada pengguna yang sesuai.';
|
||||
penilaiSelect.appendChild(noUserOption);
|
||||
surveyorSelect.appendChild(noUserOption.cloneNode(true));
|
||||
penilaiSurveyorSelect.appendChild(noUserOption.cloneNode(true));
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error fetching team members:', error);
|
||||
let option = document.createElement('option');
|
||||
option.value = '';
|
||||
option.text = 'Terjadi kesalahan.';
|
||||
penilaiSelect.appendChild(option);
|
||||
let errorOption = document.createElement('option');
|
||||
errorOption.value = '';
|
||||
errorOption.text = 'Terjadi kesalahan.';
|
||||
penilaiSelect.appendChild(errorOption);
|
||||
surveyorSelect.appendChild(errorOption.cloneNode(true));
|
||||
penilaiSurveyorSelect.appendChild(errorOption.cloneNode(true));
|
||||
});
|
||||
} else {
|
||||
let option = document.createElement('option');
|
||||
option.value = '';
|
||||
option.text = 'Pilih tim terlebih dahulu.';
|
||||
penilaiSelect.appendChild(option);
|
||||
let defaultOption = document.createElement('option');
|
||||
defaultOption.value = '';
|
||||
defaultOption.text = 'Pilih tim terlebih dahulu.';
|
||||
penilaiSelect.appendChild(defaultOption);
|
||||
surveyorSelect.appendChild(defaultOption.cloneNode(true));
|
||||
penilaiSurveyorSelect.appendChild(defaultOption.cloneNode(true));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -455,4 +559,15 @@
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
|
||||
@if($errors->any())
|
||||
var modal = new Modal(document.getElementById('modal_revisi'));
|
||||
modal.show();
|
||||
@endif
|
||||
});
|
||||
</script>
|
||||
|
||||
@endpush
|
||||
|
||||
Reference in New Issue
Block a user