fix(suveyor/penilai/so): perbaikan print out, form survey dan laporan dan paparan
This commit is contained in:
@@ -6,35 +6,50 @@
|
||||
|
||||
@section('content')
|
||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||
<div class="card border border-agi-100 pb-2.5">
|
||||
<div class="min-w-full card-grid" data-datatable="false" data-datatable-page-size="10"
|
||||
data-datatable-state-save="false" id="permohonan-table"
|
||||
data-api-url="{{ route('otorisator.datatables', ['otorisator' => $header]) }}">
|
||||
<div class="flex-wrap py-5 card-header bg-agi-50">
|
||||
<h3 class="card-title">
|
||||
Daftar {{ $header }}
|
||||
</h3>
|
||||
<div class="flex flex-wrap gap-2 lg:gap-5">
|
||||
<div class="card border border-agi-100 card-grid min-w-full" data-datatable="false" data-datatable-page-size="10"
|
||||
data-datatable-state-save="false" id="permohonan-table"
|
||||
data-api-url="{{ route('otorisator.datatables', ['otorisator' => $header]) }}">
|
||||
<div class="flex-wrap py-5 card-header bg-agi-50">
|
||||
<h3 class="card-title">
|
||||
Daftar {{ $header }}
|
||||
</h3>
|
||||
<div class="flex flex-wrap gap-2 lg:gap-5">
|
||||
<div class="flex">
|
||||
<label class="input input-sm"> <i class="ki-filled ki-magnifier"> </i>
|
||||
<input placeholder="Search Penilaian" id="search" type="text" value="">
|
||||
</label>
|
||||
</div>
|
||||
|
||||
@if ($header == 'Pelaporan')
|
||||
<div class="flex">
|
||||
<label class="input input-sm"> <i class="ki-filled ki-magnifier"> </i>
|
||||
<input placeholder="Search Penilaian" id="search" type="text" value="">
|
||||
</label>
|
||||
</div>
|
||||
<div class="flex flex-wrap gap-2.5">
|
||||
<div class="h-[24px] border border-r-gray-200"></div>
|
||||
<a class="btn btn-sm btn-light" href="{{ route('permohonan.export') }}"> Export to Excel </a>
|
||||
<select class="select select-sm w-28" id="region">
|
||||
<option value="">
|
||||
Pilih Region
|
||||
</option>
|
||||
@foreach ($regions as $region)
|
||||
<option value="{{ $region->name }}">
|
||||
{{ $region->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="flex flex-wrap gap-2.5">
|
||||
<div class="h-[24px] border border-r-gray-200"></div>
|
||||
<a class="btn btn-sm btn-light" href="{{ route('permohonan.export') }}"> Export to Excel </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="scrollable-x-auto">
|
||||
<table class="table text-sm font-medium text-gray-700 align-middle table-auto table-border"
|
||||
data-datatable-table="true">
|
||||
<thead>
|
||||
<div class="card-body">
|
||||
<div class="scrollable-x-auto">
|
||||
<table class="table table-auto table-border align-middle text-gray-700 font-medium text-sm"
|
||||
data-datatable-table="true">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="w-14">
|
||||
<input class="checkbox checkbox-sm" data-datatable-check="true" type="checkbox"/>
|
||||
<input class="checkbox checkbox-sm" data-datatable-check="true" type="checkbox" />
|
||||
</th>
|
||||
<th class="min-w-[150px]" data-datatable-column="nomor_registrasi">
|
||||
<span class="sort"> <span class="sort-label"> Nomor Registrasi </span>
|
||||
@@ -93,20 +108,19 @@
|
||||
|
||||
<th class="min-w-[50px] text-center" data-datatable-column="actions">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div
|
||||
class="flex-col justify-center gap-3 font-medium text-gray-600 card-footer md:justify-between md:flex-row text-2sm">
|
||||
<div class="flex items-center gap-2">
|
||||
Show
|
||||
<select class="w-16 select select-sm" data-datatable-size="true" name="perpage"> </select> per
|
||||
page
|
||||
</div>
|
||||
<div
|
||||
class="flex-col justify-center gap-3 font-medium text-gray-600 card-footer md:justify-between md:flex-row text-2sm">
|
||||
<div class="flex items-center gap-2">
|
||||
Show
|
||||
<select class="w-16 select select-sm" data-datatable-size="true" name="perpage"> </select> per
|
||||
page
|
||||
</div>
|
||||
<div class="flex items-center gap-4">
|
||||
<span data-datatable-info="true"> </span>
|
||||
<div class="pagination" data-datatable-pagination="true">
|
||||
</div>
|
||||
<div class="flex items-center gap-4">
|
||||
<span data-datatable-info="true"> </span>
|
||||
<div class="pagination" data-datatable-pagination="true">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -208,7 +222,7 @@
|
||||
penilai: {
|
||||
title: 'Penilai',
|
||||
render: (item, data) => {
|
||||
if(data.penilaian.user_penilai[0]){
|
||||
if (data.penilaian.user_penilai[0]) {
|
||||
console.log(data.penilaian.user_penilai[0]);
|
||||
return `${data.penilaian.user_penilai[0].user.name} | ${data.penilaian.user_penilai[0].team.name} | ${data.penilaian.user_penilai[0].team.regions.name}`;
|
||||
}
|
||||
@@ -219,7 +233,7 @@
|
||||
jenis_laporan: {
|
||||
title: 'Jenis laporan',
|
||||
render: (item, data) => {
|
||||
if(data.penilai.type_penilai){
|
||||
if (data.penilai.type_penilai) {
|
||||
return `<span class="text-md font-bold capitalize">${data.penilai.type_penilai}</span>`;
|
||||
}
|
||||
return '';
|
||||
@@ -240,7 +254,7 @@
|
||||
approval_so: {
|
||||
title: 'Approval SO',
|
||||
render: (item, data) => {
|
||||
if(data.approve_so) {
|
||||
if (data.approve_so) {
|
||||
return `${data.approve_so.name} | ${window.formatTanggalIndonesia(data.approval_so_at)}`;
|
||||
}
|
||||
return '';
|
||||
@@ -249,7 +263,7 @@
|
||||
approval_eo: {
|
||||
title: 'Approval EO',
|
||||
render: (item, data) => {
|
||||
if(data.approve_eo) {
|
||||
if (data.approve_eo) {
|
||||
return `${data.approve_eo.name} | ${window.formatTanggalIndonesia(data.approval_eo_at)}`;
|
||||
}
|
||||
return '';
|
||||
@@ -258,7 +272,7 @@
|
||||
approval_dd: {
|
||||
title: 'Approval DD',
|
||||
render: (item, data) => {
|
||||
if(data.approve_dd) {
|
||||
if (data.approve_dd) {
|
||||
return `${data.approve_dd.name} | ${window.formatTanggalIndonesia(data.approval_dd_at)}`;
|
||||
}
|
||||
return '';
|
||||
@@ -285,11 +299,17 @@
|
||||
|
||||
let dataTable = new KTDataTable(element, dataTableOptions);
|
||||
// Custom search functionality
|
||||
searchInput.addEventListener('input', function () {
|
||||
searchInput.addEventListener('input', function() {
|
||||
const searchValue = this.value.trim();
|
||||
dataTable.search(searchValue, true);
|
||||
|
||||
});
|
||||
|
||||
const regionSelect = document.getElementById('region');
|
||||
regionSelect.addEventListener('change', function() {
|
||||
const selectedRegion = this.value;
|
||||
dataTable.search(selectedRegion, true);
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
@@ -325,7 +345,9 @@
|
||||
message: userMessage // Kirim pesan sebagai bagian dari data
|
||||
},
|
||||
success: (response) => {
|
||||
Swal.fire('Berhasil!', 'Data berhasil diotorisasi. Menunggu Approval EO dan atau DD', 'success').then(() => {
|
||||
Swal.fire('Berhasil!',
|
||||
'Data berhasil diotorisasi. Menunggu Approval EO dan atau DD',
|
||||
'success').then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
console.log(response);
|
||||
|
||||
@@ -160,10 +160,24 @@
|
||||
|
||||
@elseif($dataHeader == 'paparan')
|
||||
@if($permohonan->penilai->file_paparan)
|
||||
<span class="btn btn-success"
|
||||
<span class="btn btn-success btn-outline"
|
||||
onclick="viewPDF('{{ Storage::url($permohonan->penilai->file_paparan) }}')"><i
|
||||
class="ki-filled ki-eye mr-2"></i>Lihat Data Paparan</span>
|
||||
@endif
|
||||
|
||||
@if($permohonan->penilai->kertas_kerja)
|
||||
<span class="btn btn-warning btn-outline"
|
||||
onclick="viewPDF('{{ Storage::url($permohonan->penilai->kertas_kerja) }}')"><i
|
||||
class="ki-filled ki-eye mr-2"></i>Lihat Kertas Kerja</span>
|
||||
@endif
|
||||
|
||||
|
||||
<a class="btn btn-success"
|
||||
href="{{ route('otorisator.view-laporan') }}?permohonanId={{ $permohonan->id }}&documentId={{ $documentId }}&inspeksiId={{ $inspeksiId }}&jaminanId={{ $jenisJaminanId }}&statusLpj={{ true }}">
|
||||
Lihat Laporan
|
||||
</a>
|
||||
|
||||
|
||||
@if(Auth::user()->hasAnyRole(['administrator','senior-officer']) && $authorization->approve_so==null)
|
||||
<button onclick="otorisatorData({{ $authorization->id }},'SO')" type="button" class="btn btn-primary">
|
||||
<i class="ki-filled ki-double-check"></i>
|
||||
|
||||
Reference in New Issue
Block a user