fix(lpj): perbaiki penamaan dan logika tanggal
- Mengubah logika penentuan tanggal saat ini untuk mematuhi aturan yang berlaku. - Menambahkan tampilan baru untuk LPJ sederhana dan standar. - Memperbaiki penamaan rute dari 'standard' menjadi 'standar' untuk konsistensi. - Memperbaiki akses data debitur dengan menggunakan optional chaining.
This commit is contained in:
@@ -46,8 +46,8 @@ function checkActiveDateRangePenawaran($id)
|
|||||||
|
|
||||||
$start_date = strtotime($penawaran->start_date);
|
$start_date = strtotime($penawaran->start_date);
|
||||||
$end_date = strtotime($penawaran->end_date);
|
$end_date = strtotime($penawaran->end_date);
|
||||||
// $todays_date = strtotime(now());
|
$todays_date = strtotime(now());
|
||||||
$todays_date = strtotime("+1 day", strtotime(now()));
|
//$todays_date = strtotime("+1 day", strtotime(now()));
|
||||||
|
|
||||||
$allow = true;
|
$allow = true;
|
||||||
if ($todays_date >= $start_date && $todays_date <= $end_date) {
|
if ($todays_date >= $start_date && $todays_date <= $end_date) {
|
||||||
|
|||||||
@@ -491,10 +491,10 @@
|
|||||||
.then(data => {
|
.then(data => {
|
||||||
if (data.status) {
|
if (data.status) {
|
||||||
// Jika status LPJ sudah ada, arahkan langsung ke halaman
|
// Jika status LPJ sudah ada, arahkan langsung ke halaman
|
||||||
if (data.status === 'standard') {
|
if (data.status === 'standar') {
|
||||||
showLoadingSwal('Tunggu ...');
|
showLoadingSwal('Tunggu ...');
|
||||||
window.location.href =
|
window.location.href =
|
||||||
`{{ route('penilai.standard', $permohonan->id) }}?documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
`{{ route('penilai.standar', $permohonan->id) }}?documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
||||||
} else if (data.status === 'sederhana') {
|
} else if (data.status === 'sederhana') {
|
||||||
showLoadingSwal('Tunggu ...');
|
showLoadingSwal('Tunggu ...');
|
||||||
window.location.href =
|
window.location.href =
|
||||||
@@ -524,7 +524,7 @@
|
|||||||
denyButtonColor: '#d33',
|
denyButtonColor: '#d33',
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
saveStatusLpj(permohonanId, documentId, inspeksiId, 'standard',
|
saveStatusLpj(permohonanId, documentId, inspeksiId, 'standar',
|
||||||
jaminanId);
|
jaminanId);
|
||||||
} else if (result.isDenied) {
|
} else if (result.isDenied) {
|
||||||
saveStatusLpj(permohonanId, documentId, inspeksiId, 'sederhana',
|
saveStatusLpj(permohonanId, documentId, inspeksiId, 'sederhana',
|
||||||
@@ -556,9 +556,9 @@
|
|||||||
}).then(response => response.json())
|
}).then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
if (data.success) {
|
if (data.success) {
|
||||||
if (type === 'standard') {
|
if (type === 'standar') {
|
||||||
window.location.href =
|
window.location.href =
|
||||||
`{{ route('penilai.standard', $permohonan->id) }}?documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
`{{ route('penilai.standar', $permohonan->id) }}?documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
||||||
} else if (type === 'sederhana') {
|
} else if (type === 'sederhana') {
|
||||||
window.location.href =
|
window.location.href =
|
||||||
`{{ route('penilai.sederhana', $permohonan->id) }}?documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
`{{ route('penilai.sederhana', $permohonan->id) }}?documentId=${documentId}&inspeksiId=${inspeksiId}&jaminanId=${jaminanId}`;
|
||||||
|
|||||||
@@ -154,7 +154,7 @@
|
|||||||
debitur_id: {
|
debitur_id: {
|
||||||
title: 'Debitur',
|
title: 'Debitur',
|
||||||
render: (item, data) => {
|
render: (item, data) => {
|
||||||
return `${data.debiture.name}`;
|
return `${data.debiture?.name}`;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
tujuan_penilaian_id: {
|
tujuan_penilaian_id: {
|
||||||
|
|||||||
@@ -614,7 +614,7 @@ Breadcrumbs::for('penilai.showDataPembanding', function (BreadcrumbTrail $trail)
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
Breadcrumbs::for('penilai.standard', function (BreadcrumbTrail $trail) {
|
Breadcrumbs::for('penilai.standar', function (BreadcrumbTrail $trail) {
|
||||||
$trail->parent('penilai.show');
|
$trail->parent('penilai.show');
|
||||||
$trail->push('Standard');
|
$trail->push('Standard');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user