617 lines
33 KiB
PHP
617 lines
33 KiB
PHP
@extends('layouts.main')
|
|
|
|
@section('breadcrumbs')
|
|
{{ Breadcrumbs::render(request()->route()->getName()) }}
|
|
@endsection
|
|
|
|
@push('styles')
|
|
<style>
|
|
.modal {
|
|
width: 50%;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
position: fixed;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translate(-50%, -50%);
|
|
}
|
|
</style>
|
|
@endpush
|
|
|
|
|
|
@section('content')
|
|
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
|
<div class="card">
|
|
<div class="card-header" id="advanced_settings_appearance">
|
|
<h3 class="card-title">
|
|
Data Permohonan
|
|
</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 lg:py-7.5 grid grid-cols-3">
|
|
<div class="mb-5">
|
|
<h3 class="text-md font-medium text-gray-900">
|
|
Nomor Register Permohonan:
|
|
</h3>
|
|
<span class="text-2sm text-gray-700">
|
|
{{ $permohonan->nomor_registrasi }}
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mb-5">
|
|
<h3 class="text-md font-medium text-gray-900">
|
|
Pemohon:
|
|
</h3>
|
|
<span class="text-2sm text-gray-700">
|
|
{{ $permohonan->user->nik }} | {{ $permohonan->user->name }} | {{ $permohonan->user->branch->name }}
|
|
</span>
|
|
</div>
|
|
|
|
<div class="mb-5">
|
|
<h3 class="text-md font-medium text-gray-900">
|
|
Tujan Permohonan:
|
|
</h3>
|
|
<span class="text-2sm text-gray-700">
|
|
{{ $permohonan->tujuanPenilaian->name }}
|
|
</span>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card min-w-full">
|
|
<div class="card-header">
|
|
<h3 class="card-title">
|
|
Detail Debutur
|
|
</h3>
|
|
</div>
|
|
<div class="card-table scrollable-x-auto pb-3">
|
|
<div class="grid grid-cols-1 xl:grid-cols-2 gap-5 lg:gap-7.5">
|
|
<div class="col-span-1">
|
|
<table class="table align-middle text-sm text-gray-500">
|
|
<tr>
|
|
<td class="py-2 text-gray-600 font-normal">
|
|
Name
|
|
</td>
|
|
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
{{ $permohonan->debiture->name ?? '' }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="py-3">
|
|
Email
|
|
</td>
|
|
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
{{ $permohonan->debiture->email ?? '' }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="py-3">
|
|
Phone
|
|
</td>
|
|
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
{{ $permohonan->debiture->phone ?? '' }}
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="py-3 text-gray-600 font-normal">
|
|
Address
|
|
</td>
|
|
<td class="py-3 text-gray-700 text-sm font-normal">
|
|
{{ $permohonan->debiture->address ?? '' }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="py-3 text-gray-600 font-normal">
|
|
|
|
</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 ?? '' }}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="col-span-1">
|
|
<table class="table align-middle text-sm text-gray-500">
|
|
<tr>
|
|
<td class="py-3 text-gray-600 font-normal">
|
|
Cabang
|
|
</td>
|
|
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
{{ $permohonan->debiture->branch->name ?? '' }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="py-3 text-gray-600 font-normal">
|
|
CIF
|
|
</td>
|
|
<td class="py-2 text-gray-800 font-normaltext-sm">
|
|
{{ $permohonan->debiture->cif ?? '' }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="py-3 text-gray-600 font-normal">
|
|
Nomor Rekening
|
|
</td>
|
|
<td class="py-3 text-gray-700 text-sm font-normal">
|
|
{{ $permohonan->debiture->nomor_rekening ?? '' }}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="py-3">
|
|
NPWP
|
|
</td>
|
|
<td class="py-3 text-gray-700 text-2sm font-normal">
|
|
{{ $permohonan->debiture->npwp ?? '' }}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@include('lpj::component.detail-jaminan')
|
|
|
|
<div class="card pb-2.5">
|
|
<div class="card-header" id="basic_settings">
|
|
<h3 class="card-title">
|
|
Form Assignment
|
|
</h3>
|
|
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
<form
|
|
action="{{ isset($penilaian->nomor_registrasi) ? route('penilaian.update', $permohonan) : route('penilaian.store') }}"
|
|
method="POST" class="">
|
|
@if (isset($penilaian->nomor_registrasi))
|
|
@method('PUT')
|
|
@endif
|
|
@csrf
|
|
<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="nomor_registrasi"
|
|
value="{{ $penilaian->nomor_registrasi ?? $permohonan->nomor_registrasi }}">
|
|
<div class="flex flex-wrap items-baseline w-full">
|
|
<input class="input" type="hidden" name="jenis_penilaian_id"
|
|
value="{{ $jenisPenilaian->id }}">
|
|
<input class="input @error('jenis_penilaian_id') border-danger bg-danger-light @enderror"
|
|
type="text" value="{{ $jenisPenilaian->name }}" readonly>
|
|
@error('jenis_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">
|
|
Tim Penilai yang di tunjuk
|
|
</label>
|
|
<div class="flex flex-wrap items-baseline w-full">
|
|
<input class="input" type="hidden" name="teams_id" value="{{ $regionName->id }}">
|
|
<input class="input @error('teams_id') border-danger bg-danger-light @enderror"
|
|
type="text" value="{{ $regionName->name }}" readonly>
|
|
@error('teams_id')
|
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
|
|
{{-- @php
|
|
var_dump($penilaianTeam);
|
|
@endphp --}}
|
|
|
|
<div
|
|
class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5 {{ $penilaianTeam->isEmpty() ? '' : 'hidden' }}">
|
|
<label class="form-label max-w-56">
|
|
Pilih Surveyor dan Penilai
|
|
</label>
|
|
<div class="flex flex-wrap items-baseline w-full">
|
|
<div class="input-group w-full">
|
|
<select id="surveyor_selection" name="surveyor_selection"
|
|
class="tomselect input @error('surveyor_selection') border-danger bg-danger-light @enderror w-full">
|
|
<option value="">Pilih Surveyor dan Penilai</option>
|
|
<option value="penilai_dan_surveyor">Penilai dan Surveyor Sama</option>
|
|
<option value="berbeda">Berbeda</option>
|
|
</select>
|
|
</div>
|
|
|
|
@error('surveyor_selection')
|
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
|
|
<div id="same_surveyor_penilai" class="hidden">
|
|
<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">
|
|
<div class="input-group w-full">
|
|
<select id="penilai_surveyor_id" name="penilai_surveyor_id"
|
|
class="input tomselect @error('penilai_surveyor_id') border-danger bg-danger-light @enderror w-full">
|
|
<option value="">Pilih Surveyor dan Penilai</option>
|
|
@foreach ($teamPenilai as $item)
|
|
<option value="{{ $item->id }}">{{ $item->name }}</option>
|
|
@endforeach
|
|
</select>
|
|
</div>
|
|
@error('penilai_surveyor_id')
|
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div id="different_surveyor_penilai" class="{{ $penilaianTeam->isNotEmpty() ? '' : 'hidden' }}">
|
|
<div class="grid gap-2.5">
|
|
|
|
@if (
|
|
$penilaianTeam->isNotEmpty() &&
|
|
$penilaianTeam->contains(fn($item) => $item->role == 'surveyor' && is_null($item->user_id))
|
|
)
|
|
<div id="surveyorId" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
|
<label class="form-label max-w-56">
|
|
Surveyor yang di tunjuk
|
|
</label>
|
|
<div class="flex flex-wrap items-baseline w-full">
|
|
<div class="input-group w-full">
|
|
<select id="surveyor_id" name="surveyor_id"
|
|
class="tomselect input @error('surveyor_id') border-danger bg-danger-light @enderror w-full">
|
|
<option value="">Pilih Surveyor</option>
|
|
@foreach ($teamPenilai as $item)
|
|
<option value="{{ $item->id }}">{{ $item->name }}</option>
|
|
@endforeach
|
|
|
|
@if ($penilaianTeam->isEmpty())
|
|
<option value="pilih_dari_region">pilih dari region berdeda
|
|
</option>
|
|
@endif
|
|
</select>
|
|
</div>
|
|
@error('surveyor_id')
|
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
@elseif($penilaianTeam->isEmpty())
|
|
<div id="surveyorId" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
|
<label class="form-label max-w-56">
|
|
Surveyor yang di tunjuk
|
|
</label>
|
|
<div class="flex flex-wrap items-baseline w-full">
|
|
<div class="input-group w-full">
|
|
<select id="surveyor_id" name="surveyor_id"
|
|
class="tomselect input @error('surveyor_id') border-danger bg-danger-light @enderror w-full">
|
|
<option value="">Pilih Surveyor</option>
|
|
@foreach ($teamPenilai as $item)
|
|
<option value="{{ $item->id }}">{{ $item->name }}</option>
|
|
@endforeach
|
|
|
|
@if ($penilaianTeam->isEmpty())
|
|
<option value="pilih_dari_region">pilih dari region berdeda
|
|
</option>
|
|
@endif
|
|
</select>
|
|
</div>
|
|
@error('surveyor_id')
|
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
|
|
<div id="surveyorRegion" class="hidden items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
|
<label class="form-label max-w-56">
|
|
Pilih Region
|
|
</label>
|
|
<div class="flex flex-wrap items-baseline w-full">
|
|
<div class="input-group w-full">
|
|
<select id="surveyor_region_id" name="surveyor_region_id"
|
|
class="tomselect input @error('surveyor_region_id') border-danger bg-danger-light @enderror w-full">
|
|
<option value="">Pilih Region</option>
|
|
|
|
@if (isset($updateTeamPenilai))
|
|
@foreach ($updateTeamPenilai as $item)
|
|
<option value="{{ $item->regions->id }}">
|
|
{{ $item->regions->name }}</option>
|
|
@endforeach
|
|
@endif
|
|
</select>
|
|
</div>
|
|
@error('surveyor_region_id')
|
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@if (
|
|
$penilaianTeam->isNotEmpty() &&
|
|
$penilaianTeam->contains(fn($item) => $item->role == 'penilai' && is_null($item->user_id))
|
|
)
|
|
|
|
<div id="penilaiId" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
|
<label class="form-label max-w-56">
|
|
Penilai yang di tunjuk
|
|
</label>
|
|
<div class="flex flex-wrap items-baseline w-full">
|
|
<div class="input-group w-full">
|
|
<select id="penilai_id" name="penilai_id"
|
|
class="input tomselect @error('penilai_id') border-danger bg-danger-light @enderror w-full">
|
|
<option value="">Pilih Penilai</option>
|
|
@foreach ($teamPenilai as $item)
|
|
<option value="{{ $item->id }}">{{ $item->name }}</option>
|
|
@endforeach
|
|
@if ($penilaianTeam->isEmpty())
|
|
<option value="pilih_dari_region">pilih dari region berdeda
|
|
</option>
|
|
@endif
|
|
</select>
|
|
</div>
|
|
@error('penilai_id')
|
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
@elseif($penilaianTeam->isEmpty())
|
|
<div id="penilaiId" class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
|
<label class="form-label max-w-56">
|
|
Penilai yang di tunjuk
|
|
</label>
|
|
<div class="flex flex-wrap items-baseline w-full">
|
|
<div class="input-group w-full">
|
|
<select id="penilai_id" name="penilai_id"
|
|
class="input tomselect @error('penilai_id') border-danger bg-danger-light @enderror w-full">
|
|
<option value="">Pilih Penilai</option>
|
|
@foreach ($teamPenilai as $item)
|
|
<option value="{{ $item->id }}">{{ $item->name }}</option>
|
|
@endforeach
|
|
@if ($penilaianTeam->isEmpty())
|
|
<option value="pilih_dari_region">pilih dari region berdeda
|
|
</option>
|
|
@endif
|
|
</select>
|
|
</div>
|
|
@error('penilai_id')
|
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
@endif
|
|
<div id="penilaiRegion" class="hidden items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
|
<label class="form-label max-w-56">
|
|
Pilih Region
|
|
</label>
|
|
<div class="flex flex-wrap items-baseline w-full">
|
|
<div class="input-group w-full">
|
|
<select id="penilai_region_id" name="penilai_region_id"
|
|
class="tomselect input @error('penilai_region_id') border-danger bg-danger-light @enderror w-full">
|
|
<option value="">Pilih Region</option>
|
|
|
|
@if (isset($updateTeamPenilai))
|
|
@foreach ($updateTeamPenilai as $item)
|
|
<option value="{{ $item->regions->id }}">
|
|
{{ $item->regions->name }}</option>
|
|
@endforeach
|
|
@endif
|
|
</select>
|
|
</div>
|
|
@error('penilai_region_id')
|
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
|
@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">
|
|
Jadwal Kunjungan
|
|
</label>
|
|
|
|
<div class="flex flex-wrap items-baseline w-full">
|
|
<input class="input @error('tanggal_kunjungan') border-danger bg-danger-light @enderror"
|
|
type="datetime-local" name="tanggal_kunjungan"
|
|
value="{{ isset($penilaian->tanggal_kunjungan) ? \Carbon\Carbon::createFromTimestamp($penilaian->tanggal_kunjungan)->format('Y-m-d\TH:i') : '' }}">
|
|
@error('tanggal_kunjungan')
|
|
<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">
|
|
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>
|
|
</div>
|
|
@error('keterangan')
|
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
<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>
|
|
</div>
|
|
|
|
|
|
<div class="modal fade" data-modal="true" id="modal_revisi" data-backdrop="static" data-keyboard="false">
|
|
<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" id="revisiForm">
|
|
@csrf
|
|
@method('PUT')
|
|
|
|
<input type="hidden" name="action" value="revisi">
|
|
<input type="hidden" name="nomor_registrasi"
|
|
value="{{ $penilaian->nomor_registrasi ?? $permohonan->nomor_registrasi }}">
|
|
|
|
<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">Dokumen Revisi</label>
|
|
<div class="flex flex-wrap items-baseline w-full">
|
|
<input id="dokumen"
|
|
class="file-input @error('dokumen') border-danger bg-danger-light @enderror"
|
|
type="file" name="dokumen">
|
|
@error('dokumen')
|
|
<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">Catatan</label>
|
|
<div class="flex flex-wrap items-baseline w-full">
|
|
<textarea id="keterangan" class="textarea @error('keterangan') border-danger bg-danger-light @enderror"
|
|
rows="3" name="keterangan"></textarea>
|
|
@error('keterangan')
|
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer justify-end mt-2">
|
|
<div class="flex gap-4">
|
|
<button type="button" class="btn btn-light" data-modal-dismiss="true">Cancel</button>
|
|
<button id="btnSubmit" type="submit" class="btn btn-primary">Submit</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
@push('scripts')
|
|
<script>
|
|
document.getElementById('surveyor_selection').addEventListener('change', function() {
|
|
const selectedValue = this.value;
|
|
const sameSurveyorPenilai = document.getElementById('same_surveyor_penilai');
|
|
const differentSurveyorPenilai = document.getElementById('different_surveyor_penilai');
|
|
|
|
if (selectedValue === 'penilai_dan_surveyor') {
|
|
sameSurveyorPenilai.classList.remove('hidden');
|
|
differentSurveyorPenilai.classList.add('hidden');
|
|
} else if (selectedValue === 'berbeda') {
|
|
sameSurveyorPenilai.classList.add('hidden');
|
|
differentSurveyorPenilai.classList.remove('hidden');
|
|
|
|
} else {
|
|
sameSurveyorPenilai.classList.add('hidden');
|
|
differentSurveyorPenilai.classList.add('hidden');
|
|
}
|
|
});
|
|
|
|
|
|
document.getElementById('surveyor_id').addEventListener('change', function() {
|
|
const selectedValue = this.value;
|
|
const surveyorRegion = document.getElementById('surveyorRegion');
|
|
|
|
if (selectedValue === 'pilih_dari_region') {
|
|
surveyorRegion.classList.remove('hidden');
|
|
surveyorRegion.classList.add('flex');
|
|
} else {
|
|
surveyorRegion.classList.add('hidden');
|
|
}
|
|
});
|
|
|
|
document.getElementById('penilai_id').addEventListener('change', function() {
|
|
const selectedValue = this.value;
|
|
const penilaiRegion = document.getElementById('penilaiRegion');
|
|
|
|
if (selectedValue === 'pilih_dari_region') {
|
|
penilaiRegion.classList.remove('hidden');
|
|
penilaiRegion.classList.add('flex');
|
|
} else {
|
|
penilaiRegion.classList.add('hidden');
|
|
}
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const revisiForm = document.getElementById('revisiForm');
|
|
const btnSubmit = document.getElementById('btnSubmit');
|
|
|
|
btnSubmit.addEventListener('click', function(event) {
|
|
// Cegah form dari pengiriman default
|
|
event.preventDefault();
|
|
|
|
// Ambil nilai dari input dan textarea
|
|
const dokumenRevisi = document.getElementById('dokumen').value;
|
|
const keteranganRevisi = document.getElementById('keterangan').value.trim();
|
|
|
|
// Bersihkan pesan kesalahan sebelumnya
|
|
document.querySelectorAll('.alert.text-danger').forEach(el => el.remove());
|
|
|
|
// Validasi: jika ada field kosong, tampilkan pesan kesalahan
|
|
let isValid = true;
|
|
|
|
if (!dokumenRevisi) {
|
|
const errorMessage = document.createElement('em');
|
|
errorMessage.className = 'alert text-danger text-sm';
|
|
errorMessage.innerText = 'Dokumen Revisi harus diisi.';
|
|
document.getElementById('dokumen').parentElement.appendChild(errorMessage);
|
|
isValid = false; // Set isValid ke false
|
|
}
|
|
|
|
if (!keteranganRevisi) {
|
|
const errorMessage = document.createElement('em');
|
|
errorMessage.className = 'alert text-danger text-sm';
|
|
errorMessage.innerText = 'Catatan harus diisi.';
|
|
document.getElementById('keterangan').parentElement.appendChild(errorMessage);
|
|
isValid = false; // Set isValid ke false
|
|
}
|
|
|
|
// Jika semua field valid, kirim form
|
|
if (isValid) {
|
|
revisiForm.submit();
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
@endpush
|