This commit is contained in:
wayanrivan
2026-07-08 17:12:44 +07:00
parent fb0bfed78b
commit 8d90b0d8a4
2 changed files with 71 additions and 68 deletions

View File

@ -484,6 +484,7 @@
// {
// data: 'finish',
// render: (data, type, row, meta) => {
// console.log(row)
// // saat export, hanya tampilkan lokasi tanpa tanggal/jam
// if (type === 'export') {
// return Helper.shortenText(decodeURIComponent(row.finishLoc ||
@ -494,28 +495,30 @@
// ${Helper.shortenText(decodeURIComponent(row.finishLoc || 'address'), 255) || "-"}
// `;
// }
// },
// },
{
data: 'finish',
render: (data, type, row) => {
console.log(row.fulladdress);
console.log(row.latitude);
console.log(row.longitude);
// console.log(row.fulladdress);
// console.log(row.latitude);
// console.log(row.longitude);
// console.log("End Loc : ",row.endLoc)
console.log('fulll data ',row)
// Saat export Excel
if (type === 'export') {
const nearestSite = findNearestSite(
row.latitude,
row.longitude
);
// const nearestSite = findNearestSite(
// row.latitude,
// row.longitude
// );
if (nearestSite) {
return formatSiteLabel(nearestSite);
}
// if (nearestSite) {
// return formatSiteLabel(nearestSite);
// }
return Helper.shortenText(
decodeURIComponent(row.fulladdress || 'address'),
decodeURIComponent(row.finishLoc || 'address'),
255
) || '-';
}