update pemilihan team hanya surveyor atau penilai dan update form foto menggunakan camera
This commit is contained in:
@@ -280,15 +280,14 @@
|
||||
<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" 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>
|
||||
type="text" value="{{ $jenisPenilaian->name }}" readonly>
|
||||
@error('jenis_penilaian_id')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
@@ -300,9 +299,7 @@
|
||||
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" 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')
|
||||
@@ -311,62 +308,115 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||
<label class="form-label max-w-56">
|
||||
Surveyor yang di tunjuk
|
||||
Pilih Surveyor dan Penilai
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline 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->first()->teamsUsers as $item)
|
||||
<option value="{{ $item->user->id }}">{{ $item->user->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<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_id')
|
||||
@error('surveyor_selection')
|
||||
<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">
|
||||
Penilai yang di tunjuk
|
||||
</label>
|
||||
<div class="flex flex-wrap items-baseline w-full">
|
||||
<select id="penilaian_id" name="penilaian_id"
|
||||
class="input tomselect @error('penilaian_id') border-danger bg-danger-light @enderror w-full">
|
||||
<option value="">Pilih Penilai</option>
|
||||
@foreach ($teamPenilai->first()->teamsUsers as $item)
|
||||
<option value="{{ $item->user->id }}">{{ $item->user->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@error('penilaian_id')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
<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->first()->teamsUsers as $item)
|
||||
<option value="{{ $item->user->id }}">{{ $item->user->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@error('penilai_surveyor_id')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</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 tomselect @error('penilai_surveyor_id') border-danger bg-danger-light @enderror w-full">
|
||||
<option value="">Pilih Surveyor dan Penilai</option>
|
||||
@foreach ($teamPenilai->first()->teamsUsers as $item)
|
||||
<option value="{{ $item->user->id }}">{{ $item->user->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@error('penilai_surveyor_id')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
|
||||
<div id="different_surveyor_penilai" class="hidden">
|
||||
|
||||
<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->first()->teamsUsers as $item)
|
||||
<option value="{{ $item->user->id }}">{{ $item->user->name }}</option>
|
||||
@endforeach
|
||||
<option value="pilih_dari_region">pilih dari region berdeda</option>
|
||||
</select>
|
||||
</div>
|
||||
@error('surveyor_id')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<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_id" name="surveyor_id"
|
||||
class="tomselect input @error('surveyor_id') border-danger bg-danger-light @enderror w-full">
|
||||
<option value="">Pilih Region</option>
|
||||
<option value="pilih_dari_region">Pilih dari region berdeda</option>
|
||||
</select>
|
||||
</div>
|
||||
@error('surveyor_id')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
<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="penilaian_id" name="penilaian_id"
|
||||
class="input tomselect @error('penilaian_id') border-danger bg-danger-light @enderror w-full">
|
||||
<option value="">Pilih Penilai</option>
|
||||
@foreach ($teamPenilai->first()->teamsUsers as $item)
|
||||
<option value="{{ $item->user->id }}">{{ $item->user->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<button type="button" id="btnPenilai" class="btn btn-light">
|
||||
<i class="ki-outline ki-notepad-edit"></i> Pilih dari region berbeda
|
||||
</button>
|
||||
</div>
|
||||
@error('penilaian_id')
|
||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||
@enderror
|
||||
</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
|
||||
@@ -404,16 +454,9 @@
|
||||
Revisi
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -473,8 +516,51 @@
|
||||
</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');
|
||||
}else{
|
||||
surveyorRegion.classList.add('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
function handleRegionBerbeda(params) {
|
||||
const surveyor = document.getElementById('btnSurveyor');
|
||||
const penilai = document.getElementById('btnPenilai');
|
||||
const surveyorId = document.getElementById('surveyorRegion');
|
||||
|
||||
surveyor.addEventListener('click', function() {
|
||||
surveyorId.classList.add('hidden');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const revisiForm = document.getElementById('revisiForm');
|
||||
const btnSubmit = document.getElementById('btnSubmit');
|
||||
|
||||
Reference in New Issue
Block a user