fix: update tampilan penilai jaminan
This commit is contained in:
@@ -45,56 +45,51 @@
|
|||||||
</style>
|
</style>
|
||||||
@endpush
|
@endpush
|
||||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||||
<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="laporan-penilai-jaminan-table"
|
|
||||||
data-api-url="{{ route('laporan-penilai-jaminan.datatables') }}">
|
<!-- Filter Card -->
|
||||||
<div class="card-header bg-agi-50 py-5 flex-wrap">
|
<div class="card border border-agi-100">
|
||||||
<h3 class="card-title">
|
<div class="card-header bg-agi-50 py-5">
|
||||||
Daftar Laporan Penilai Jaminan
|
<h3 class="card-title">Filter Laporan</h3>
|
||||||
</h3>
|
</div>
|
||||||
<div class="flex flex-wrap gap-2 lg:gap-5">
|
<div class="card-body grid gap-4">
|
||||||
<div class="flex">
|
<!-- Search field at the top, full width -->
|
||||||
|
<div class="flex flex-col w-full">
|
||||||
|
<label class="text-sm font-medium mb-1">Pencarian</label>
|
||||||
|
<label class="input input-sm">
|
||||||
|
<i class="ki-filled ki-magnifier"></i>
|
||||||
|
<input placeholder="Search Laporan Penilaian Jaminan" id="search" type="text" value="">
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Other filter fields in grid layout -->
|
||||||
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
|
||||||
|
<div class="flex flex-col">
|
||||||
|
<label class="text-base font-medium mb-1">Tanggal Awal</label>
|
||||||
<label class="input">
|
<label class="input">
|
||||||
Start Date
|
<input placeholder="Tanggal Awal" id="start_date" type="date">
|
||||||
<input placeholder="Tanggal Awal" id="tanggal_awal" type="date">
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex">
|
<div class="flex flex-col">
|
||||||
|
<label class="text-base font-medium mb-1">Tanggal Akhir</label>
|
||||||
<label class="input">
|
<label class="input">
|
||||||
End Date
|
<input placeholder="Tanggal Akhir" id="end_date" type="date">
|
||||||
<input placeholder="Tanggal Akhir" id="tanggal_akhir" type="date">
|
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex">
|
<div class="flex flex-col">
|
||||||
<button class="btn btn-primary" id="filter_tanggal">Filter</button>
|
<label class="text-base font-medium mb-1">Cabang</label>
|
||||||
|
<select class="select tomselect" id="branch_filter">
|
||||||
|
<option value="">Semua Cabang</option>
|
||||||
|
@foreach (\Modules\Basicdata\Models\Branch::where('status', 1)->get() as $branch)
|
||||||
|
<option value="{{ $branch->id }}">{{ $branch->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex">
|
<div class="flex flex-col">
|
||||||
<label class="input "> <i class="ki-filled ki-magnifier"> </i>
|
|
||||||
<input placeholder="Search Laporan" id="search" type="text" value="">
|
<label class="text-base font-medium mb-1">Laporan</label>
|
||||||
</label>
|
<select class="select tomselect" name="laporan[]" id="laporan" multiple>
|
||||||
</div>
|
<option value="">Semua Laporan</option>
|
||||||
<div class="flex">
|
|
||||||
<!-- Custom dropdown for status filter -->
|
|
||||||
<div class="dropdown" data-dropdown="true" data-dropdown-trigger="click">
|
|
||||||
<button class="dropdowns-toggle btn btn-light inline-flex justify-between w-full items-center">
|
|
||||||
Pilih Type Laporan
|
|
||||||
<i class="ki-outline ki-down dropdown-open:hidden">
|
|
||||||
</i>
|
|
||||||
<i class="ki-outline ki-up hidden dropdown-open:block">
|
|
||||||
</i>
|
|
||||||
</button>
|
|
||||||
<div
|
|
||||||
class="dropdowns-content w-full max-w-56 py-2 absolute mt-2 origin-top-right z-50 bg-white rounded-md shadow-lg ring-1 ring-black ring-opacity-5">
|
|
||||||
<div class="menu menu-default flex flex-col w-full">
|
|
||||||
<!-- Checkbox untuk All Status -->
|
|
||||||
<div class="menu-item">
|
|
||||||
<label class="menu-link flex items-center px-4 py-2 text-sm text-gray-700">
|
|
||||||
<input id="select-all" type="checkbox"
|
|
||||||
class="form-checkbox h-4 w-4 text-blue-600">
|
|
||||||
<span class="ml-2">All Status</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<!-- Dinamis Status dari Backend -->
|
|
||||||
@php
|
@php
|
||||||
$status_laporan = [
|
$status_laporan = [
|
||||||
'Standar',
|
'Standar',
|
||||||
@@ -106,28 +101,40 @@
|
|||||||
];
|
];
|
||||||
@endphp
|
@endphp
|
||||||
@foreach ($status_laporan as $item)
|
@foreach ($status_laporan as $item)
|
||||||
<div class="menu-item">
|
<option value="{{ strtolower($item) }}">{{ $item }}</option>
|
||||||
<label class="menu-link flex items-center px-4 py-2 text-sm text-gray-700">
|
|
||||||
<input type="checkbox"
|
|
||||||
class="form-checkbox status-checkbox h-4 w-4 text-blue-600"
|
|
||||||
value="{{ strtolower($item) }}">
|
|
||||||
<span class="ml-2">{{ $item }}</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
@endforeach
|
@endforeach
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
<!-- Buttons row at the bottom -->
|
||||||
<div class="flex flex-wrap gap-2.5">
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mt-2">
|
||||||
<div class="h-[24px] border border-r-gray-200"></div>
|
<button class="btn btn-sm btn-primary" id="filter_tanggal">
|
||||||
<button class="btn btn-light" id="export-button">
|
<i class="ki-outline ki-filter fs-2 me-1"></i>
|
||||||
Export Excel
|
Terapkan Filter
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-sm btn-light"
|
||||||
|
id="export-btn">
|
||||||
|
<i class="ki-outline ki-file-down fs-2 me-1"></i>
|
||||||
|
Export to Excel
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<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="laporan-penilai-jaminan-table"
|
||||||
|
data-api-url="{{ route('laporan-penilai-jaminan.datatables') }}">
|
||||||
|
<div class="card-header bg-agi-50 py-5 flex-wrap">
|
||||||
|
<h3 class="card-title">
|
||||||
|
Daftar Laporan Penilai Jaminan
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="scrollable-x-auto">
|
<div class="scrollable-x-auto">
|
||||||
<table class="table table-auto table-border align-middle text-gray-700 font-medium text-sm"
|
<table class="table table-auto table-border align-middle text-gray-700 font-medium text-sm"
|
||||||
@@ -135,13 +142,21 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="w-14">
|
<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" id="check-all"/>
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="nomor_registrasi">
|
<th class="min-w-[150px]" data-datatable-column="nomor_registrasi">
|
||||||
<span class="sort"><span class="sort-label">Nomor Registrasi</span>
|
<span class="sort"><span class="sort-label">Nomor Registrasi</span>
|
||||||
<span class="sort-icon"></span>
|
<span class="sort-icon"></span>
|
||||||
</span>
|
</span>
|
||||||
</th>
|
</th>
|
||||||
|
<th class="min-w-[150px]" data-datatable-column="tanggal_permohonan">
|
||||||
|
<span class="sort"> <span class="sort-label"> Tanggal Permohonan </span>
|
||||||
|
<span class="sort-icon"> </span> </span>
|
||||||
|
</th>
|
||||||
|
<th class="min-w-[150px]" data-datatable-column="branch">
|
||||||
|
<span class="sort"> <span class="sort-label"> Cabang </span>
|
||||||
|
<span class="sort-icon"> </span> </span>
|
||||||
|
</th>
|
||||||
<th class="min-w-[150px]" data-datatable-column="user_id">
|
<th class="min-w-[150px]" data-datatable-column="user_id">
|
||||||
<span class="sort"><span class="sort-label">User Pemohon</span>
|
<span class="sort"><span class="sort-label">User Pemohon</span>
|
||||||
<span class="sort-icon"></span>
|
<span class="sort-icon"></span>
|
||||||
@@ -157,6 +172,10 @@
|
|||||||
<span class="sort-icon"></span>
|
<span class="sort-icon"></span>
|
||||||
</span>
|
</span>
|
||||||
</th>
|
</th>
|
||||||
|
<th class="min-w-[150px]" data-datatable-column="jenis_agunan">
|
||||||
|
<span class="sort"> <span class="sort-label"> Jenis Jaminan </span>
|
||||||
|
<span class="sort-icon"> </span> </span>
|
||||||
|
</th>
|
||||||
|
|
||||||
<th class="min-w-[150px]" data-datatable-column="laporan">
|
<th class="min-w-[150px]" data-datatable-column="laporan">
|
||||||
<span class="sort"><span class="sort-label">Laporan</span>
|
<span class="sort"><span class="sort-label">Laporan</span>
|
||||||
@@ -164,6 +183,11 @@
|
|||||||
</span>
|
</span>
|
||||||
</th>
|
</th>
|
||||||
|
|
||||||
|
<th class="" data-datatable-column="actions">
|
||||||
|
<span class="sort"><span class="sort-label">Actions</span>
|
||||||
|
<span class="sort-icon"></span>
|
||||||
|
</span>
|
||||||
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
@@ -186,30 +210,41 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Form tersembunyi untuk export -->
|
<!-- Form tersembunyi untuk export -->
|
||||||
<form id="export-form" action="{{ route('laporan-penilai-jaminan.export') }}" method="GET" class="hidden">
|
<form id="export-form"
|
||||||
<input type="hidden" name="tanggal_awal" id="export_tanggal_awal">
|
action="{{ route('laporan-penilai-jaminan.export') }}"
|
||||||
<input type="hidden" name="tanggal_akhir" id="export_tanggal_akhir">
|
method="GET" class="hidden">
|
||||||
|
<input type="hidden" name="start_date" id="export_tanggal_awal">
|
||||||
|
<input type="hidden" name="end_date" id="export_tanggal_akhir">
|
||||||
<input type="hidden" name="status" id="export_status">
|
<input type="hidden" name="status" id="export_status">
|
||||||
|
<input type="hidden" name="branch_id" id="export_branch_id">
|
||||||
|
<input type="hidden" name="laporan" id="export_laporan">
|
||||||
<input type="hidden" name="selected_ids" id="export_selected_ids">
|
<input type="hidden" name="selected_ids" id="export_selected_ids">
|
||||||
<input type="hidden" name="export_type" id="export_type" value="all">
|
<input type="hidden" name="export_type" id="export_type" value="all">
|
||||||
</form>
|
</form>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
|
||||||
@push('scripts')
|
@push('scripts')
|
||||||
<script type="module">
|
<script type="module">
|
||||||
const element = document.querySelector('#laporan-penilai-jaminan-table');
|
const element = document.querySelector('#laporan-penilai-jaminan-table');
|
||||||
const searchInput = document.getElementById('search');
|
const searchInput = document.getElementById('search');;
|
||||||
const tanggalAwalInput = document.getElementById('tanggal_awal');
|
const startDateInput = document.getElementById('start_date');
|
||||||
const tanggalAkhirInput = document.getElementById('tanggal_akhir');
|
const endDateInput = document.getElementById('end_date');
|
||||||
|
const branchFilter = document.getElementById('branch_filter');
|
||||||
|
const laporanFilter = document.getElementById('laporan');
|
||||||
const filterTanggalButton = document.getElementById('filter_tanggal');
|
const filterTanggalButton = document.getElementById('filter_tanggal');
|
||||||
const selectAllCheckbox = document.getElementById('select-all');
|
const exportButton = document.getElementById('export-btn');
|
||||||
|
|
||||||
|
|
||||||
|
const selectAllCheckbox = document.getElementById('check-all');
|
||||||
const statusCheckboxes = document.querySelectorAll('.status-checkbox');
|
const statusCheckboxes = document.querySelectorAll('.status-checkbox');
|
||||||
|
|
||||||
// Export elements
|
// Export elements
|
||||||
const exportForm = document.getElementById('export-form');
|
const exportForm = document.getElementById('export-form');
|
||||||
const exportButton = document.getElementById('export-button');
|
const exportStartDate = document.getElementById('export_tanggal_awal');
|
||||||
const exportTanggalAwal = document.getElementById('export_tanggal_awal');
|
const exportEndDate = document.getElementById('export_tanggal_akhir');
|
||||||
const exportTanggalAkhir = document.getElementById('export_tanggal_akhir');
|
const exportBranchId = document.getElementById('export_branch_id');
|
||||||
|
const exportLaporan = document.getElementById('export_laporan');
|
||||||
const exportStatus = document.getElementById('export_status');
|
const exportStatus = document.getElementById('export_status');
|
||||||
const exportSelectedIds = document.getElementById('export_selected_ids');
|
const exportSelectedIds = document.getElementById('export_selected_ids');
|
||||||
const exportType = document.getElementById('export_type');
|
const exportType = document.getElementById('export_type');
|
||||||
@@ -241,7 +276,19 @@
|
|||||||
nomor_registrasi: {
|
nomor_registrasi: {
|
||||||
title: 'Nomor Registrasi',
|
title: 'Nomor Registrasi',
|
||||||
},
|
},
|
||||||
|
tanggal_permohonan: {
|
||||||
|
title: 'Tanggal Permohonan',
|
||||||
|
render: (item, data) => {
|
||||||
|
return data.tanggal_permohonan ? window.formatTanggalIndonesia(data.tanggal_permohonan) :
|
||||||
|
'-';
|
||||||
|
},
|
||||||
|
},
|
||||||
|
branch: {
|
||||||
|
title: 'Cabang',
|
||||||
|
render: (item, data) => {
|
||||||
|
return data.branch && data.branch.name ? `${data.branch.name}` : '-';
|
||||||
|
},
|
||||||
|
},
|
||||||
user_id: {
|
user_id: {
|
||||||
title: 'User Pemohon',
|
title: 'User Pemohon',
|
||||||
render: (item, data) => {
|
render: (item, data) => {
|
||||||
@@ -254,6 +301,7 @@
|
|||||||
return data.debiture && data.debiture.name ? `${data.debiture.name}` : '-';
|
return data.debiture && data.debiture.name ? `${data.debiture.name}` : '-';
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
tujuan_penilaian_id: {
|
tujuan_penilaian_id: {
|
||||||
title: 'Tujuan Penilaian',
|
title: 'Tujuan Penilaian',
|
||||||
render: (item, data) => {
|
render: (item, data) => {
|
||||||
@@ -261,6 +309,14 @@
|
|||||||
`${data.tujuan_penilaian.name}` : '-';
|
`${data.tujuan_penilaian.name}` : '-';
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
jenis_agunan: {
|
||||||
|
title: 'Jenis Jaminan',
|
||||||
|
render: (item, data) => {
|
||||||
|
return data.dokumenjaminan.map((item) => {
|
||||||
|
return item.jenis_jaminan ? item.jenis_jaminan.name : '-';
|
||||||
|
}).join(', ');
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
laporan: {
|
laporan: {
|
||||||
title: 'Status',
|
title: 'Status',
|
||||||
@@ -292,6 +348,31 @@
|
|||||||
return `<span class="badge ${badgeClass}">${statusLaporan}</span>`;
|
return `<span class="badge ${badgeClass}">${statusLaporan}</span>`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
actions: {
|
||||||
|
title: 'Action',
|
||||||
|
render: (item, data) => {
|
||||||
|
const status = data.status; // Anggap status berada di dalam objek data
|
||||||
|
const dokumenjaminan = data.dokumenjaminan || [];
|
||||||
|
|
||||||
|
return `
|
||||||
|
<div class="flex flex-nowrap justify-center gap-1">
|
||||||
|
${
|
||||||
|
['done'].includes(status) ?
|
||||||
|
dokumenjaminan.map(dokumen => {
|
||||||
|
return `
|
||||||
|
<a class="btn btn-sm btn-primary" href="surveyor/print-out-inspeksi/${data.id}/${dokumen.id}/${dokumen.jenis_jaminan_id}">
|
||||||
|
<i class="ki-outline ki-printer"></i>Inspeksi
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-sm btn-success" onclick="checkLaporan('${data.id}', '${dokumen.id}', '${dokumen.jenis_jaminan_id}', 0)">
|
||||||
|
<i class="ki-filled ki-printer"></i>Laporan
|
||||||
|
</a>
|
||||||
|
`;
|
||||||
|
}).join('') : ''
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -301,8 +382,7 @@
|
|||||||
|
|
||||||
// Search functionality
|
// Search functionality
|
||||||
searchInput.addEventListener('input', function() {
|
searchInput.addEventListener('input', function() {
|
||||||
const searchValue = this.value.trim();
|
applyDateFilter();
|
||||||
dataTable.search(searchValue, true);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Filter by date range
|
// Filter by date range
|
||||||
@@ -311,20 +391,31 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
function applyDateFilter() {
|
function applyDateFilter() {
|
||||||
const tanggalAwal = tanggalAwalInput.value;
|
const startDate = startDateInput.value;
|
||||||
const tanggalAkhir = tanggalAkhirInput.value;
|
const endDate = endDateInput.value;
|
||||||
|
const branch = branchFilter.value;
|
||||||
|
const laporan = Array.from(laporanFilter.selectedOptions).map(option => option.value);
|
||||||
|
|
||||||
|
|
||||||
let filters = {};
|
let filters = {};
|
||||||
if (searchInput.value) {
|
if (searchInput.value) {
|
||||||
filters.search = searchInput.value;
|
filters.search = searchInput.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tanggalAwal) {
|
if (startDate) {
|
||||||
filters.tanggal_awal = tanggalAwal
|
filters.start_date = startDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tanggalAkhir) {
|
if (endDate) {
|
||||||
filters.tanggal_akhir = tanggalAkhir
|
filters.end_date = endDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (branch) {
|
||||||
|
filters.branch_id = branch;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (laporan.length > 0) {
|
||||||
|
filters.laporan = laporan;
|
||||||
}
|
}
|
||||||
|
|
||||||
dataTable.search(filters);
|
dataTable.search(filters);
|
||||||
@@ -378,11 +469,12 @@
|
|||||||
selected_ids: selectedIds,
|
selected_ids: selectedIds,
|
||||||
export_type: 'selected'
|
export_type: 'selected'
|
||||||
});
|
});
|
||||||
} else if (tanggalAwalInput.value && tanggalAkhirInput.value || getSelectedStatuses().length > 0) {
|
} else if (startDateInput.value && endDateInput.value || getSelectedStatuses().length > 0) {
|
||||||
// If filters are applied but no rows selected, export filtered data
|
|
||||||
exportData({
|
exportData({
|
||||||
tanggal_awal: tanggalAwalInput.value,
|
start_date: startDateInput.value,
|
||||||
tanggal_akhir: tanggalAkhirInput.value,
|
end_date: endDateInput.value,
|
||||||
|
branch_id: branchFilter.value,
|
||||||
|
laporan: Array.from(laporanFilter.selectedOptions).map(option => option.value),
|
||||||
status: getSelectedStatuses(),
|
status: getSelectedStatuses(),
|
||||||
export_type: 'filtered'
|
export_type: 'filtered'
|
||||||
});
|
});
|
||||||
@@ -396,12 +488,13 @@
|
|||||||
|
|
||||||
function exportData(filters = {}) {
|
function exportData(filters = {}) {
|
||||||
// Set filter values in the hidden form
|
// Set filter values in the hidden form
|
||||||
exportTanggalAwal.value = filters.tanggal_awal || '';
|
exportStartDate.value = filters.start_date || '';
|
||||||
exportTanggalAkhir.value = filters.tanggal_akhir || '';
|
exportEndDate.value = filters.end_date || '';
|
||||||
exportStatus.value = filters.status ? filters.status.join(',') : '';
|
exportStatus.value = filters.status ? filters.status.join(',') : '';
|
||||||
|
exportBranchId.value = filters.branch_id || '';
|
||||||
|
exportLaporan.value = filters.laporan ? filters.laporan.join(',') : '';
|
||||||
exportSelectedIds.value = filters.selected_ids ? filters.selected_ids.join(',') : '';
|
exportSelectedIds.value = filters.selected_ids ? filters.selected_ids.join(',') : '';
|
||||||
exportType.value = filters.export_type || 'all';
|
exportType.value = filters.export_type || 'all';
|
||||||
|
|
||||||
// Submit the form
|
// Submit the form
|
||||||
exportForm.submit();
|
exportForm.submit();
|
||||||
}
|
}
|
||||||
@@ -417,4 +510,39 @@
|
|||||||
return Array.from(checkboxes).map(checkbox => checkbox.value);
|
return Array.from(checkboxes).map(checkbox => checkbox.value);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function checkLaporan(permohonanId, documentId, statusLpj) {
|
||||||
|
// showLoadingSwal('Tunggu...');
|
||||||
|
fetch(
|
||||||
|
`{{ url('/penilai/check-laporan') }}?permohonanId=${permohonanId}&documentId=${documentId}`
|
||||||
|
)
|
||||||
|
.then(response => response.json())
|
||||||
|
.then(data => {
|
||||||
|
if (data.status) {
|
||||||
|
window.location.href =
|
||||||
|
`{{ route('penilai.print-out') }}?permohonanId=${permohonanId}&documentId=${documentId}&statusLpj=${0}&type=${data.status}`;
|
||||||
|
} else {
|
||||||
|
// Jika laporan belum ada, tampilkan pesan peringatan
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Laporan Belum Ada',
|
||||||
|
text: data.message,
|
||||||
|
icon: 'warning',
|
||||||
|
confirmButtonText: 'OK',
|
||||||
|
confirmButtonColor: '#3085d6',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error('Error:', error);
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Terjadi Kesalahan',
|
||||||
|
text: 'Tidak dapat memproses permintaan. Silakan coba lagi nanti.',
|
||||||
|
icon: 'error',
|
||||||
|
confirmButtonText: 'OK',
|
||||||
|
confirmButtonColor: '#d33',
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|||||||
Reference in New Issue
Block a user