update form inspeksi and basic data inspeksi

This commit is contained in:
majid
2024-11-20 17:04:15 +07:00
parent 7e70608ba4
commit deaf9e8e1b
32 changed files with 1341 additions and 666 deletions

View File

@@ -210,7 +210,11 @@
},
due_date: {
title: 'Due Date',
render: (item, data) => `${data.due_date || ''}`,
render: (item, data) => {
const mulai = new Date(data.permohonan.created_at);
const selesai = new Date(data.tanggal_kunjungan)
return `${mulai.getDate()}-${mulai.getMonth() + 1}-${mulai.getFullYear()} - ${selesai.getDate()}-${selesai.getMonth() + 1}-${selesai.getFullYear()}`
},
},
paparan: {
title: 'Paparan',
@@ -236,6 +240,11 @@
});
});
function formatDateFromISO(isoDateString) {
const date = new Date(isoDateString);
const day = String(date.getDate()).padStart(2, '0');