update camera dan otorisator
This commit is contained in:
@@ -352,7 +352,7 @@
|
||||
|
||||
|
||||
<div id="different_surveyor_penilai" class="hidden">
|
||||
|
||||
<div class="grid gap-2.5">
|
||||
<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
|
||||
@@ -385,7 +385,12 @@
|
||||
<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>
|
||||
|
||||
@if (isset($updateTeamPenilai))
|
||||
@foreach ($updateTeamPenilai as $item)
|
||||
<option value="{{ $item->regions->id }}">{{ $item->regions->name }}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</select>
|
||||
</div>
|
||||
@error('surveyor_id')
|
||||
@@ -393,6 +398,7 @@
|
||||
@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
|
||||
@@ -405,16 +411,39 @@
|
||||
@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>
|
||||
<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 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="surveyor_id" name="surveyor_id"
|
||||
class="tomselect input @error('surveyor_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_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">
|
||||
@@ -528,6 +557,7 @@
|
||||
} else if (selectedValue === 'berbeda') {
|
||||
sameSurveyorPenilai.classList.add('hidden');
|
||||
differentSurveyorPenilai.classList.remove('hidden');
|
||||
|
||||
} else {
|
||||
sameSurveyorPenilai.classList.add('hidden');
|
||||
differentSurveyorPenilai.classList.add('hidden');
|
||||
@@ -541,23 +571,28 @@
|
||||
|
||||
if (selectedValue === 'pilih_dari_region') {
|
||||
surveyorRegion.classList.remove('hidden');
|
||||
surveyorRegion.classList.add('flex');
|
||||
}else{
|
||||
surveyorRegion.classList.add('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
document.getElementById('penilaian_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');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
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');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -57,10 +57,7 @@
|
||||
<span class="sort"> <span class="sort-label"> Tujuan Penilaian </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
<th class="min-w-[150px]" data-datatable-column="status">
|
||||
<span class="sort"> <span class="sort-label"> Status </span>
|
||||
<span class="sort-icon"> </span> </span>
|
||||
</th>
|
||||
|
||||
<th class="min-w-[50px] text-center" data-datatable-column="actions">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -126,6 +123,8 @@
|
||||
const element = document.querySelector('#permohonan-table');
|
||||
const searchInput = document.getElementById('search');
|
||||
|
||||
|
||||
|
||||
const apiUrl = element.getAttribute('data-api-url');
|
||||
const dataTableOptions = {
|
||||
apiEndpoint: apiUrl,
|
||||
@@ -171,19 +170,10 @@
|
||||
return `${data.tujuan_penilaian.name}`;
|
||||
},
|
||||
},
|
||||
status: {
|
||||
title: 'Status'
|
||||
},
|
||||
actions: {
|
||||
title: 'Status',
|
||||
render: (item, data) => {
|
||||
return `<div class="flex flex-nowrap justify-center">
|
||||
|
||||
<a class="btn btn-sm btn-icon btn-clear btn-success " onclick="otorisator(${data.id})">
|
||||
<i class="ki-filled ki-check-squared"></i>
|
||||
</a>
|
||||
|
||||
|
||||
<a class="btn btn-sm btn-icon btn-clear btn-warning " href="otorisator/show/${data.id}">
|
||||
<i class="ki-outline ki-eye"></i>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user