diff --git a/resources/js/components/util/RekodBayaranModal.vue b/resources/js/components/util/RekodBayaranModal.vue index 6192b06..4aa6c24 100644 --- a/resources/js/components/util/RekodBayaranModal.vue +++ b/resources/js/components/util/RekodBayaranModal.vue @@ -43,6 +43,9 @@
- Tiada Data Diperolehi -
-Tiada Data Diperolehi
++
+
+
- Tiada Data Diperolehi -
-Tiada Data Diperolehi
+| + | Bil | -+ | No Rujukan | -- Jenis Penyelesaian Pembiayaan + | + Jenis | -+ | Pembiayaan Asal | -+ | Tempoh | -- Tarikh Penyelesaian Pembiayaan + | + Tarikh | -+ | Action |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
-
-
-
-
- - Tiada Data Diperolehi - - |
+ |||||||||||||
| @@ -266,12 +274,15 @@ |
-
|
@@ -390,6 +401,53 @@ export default {
break;
}
},
+ rekodSAGStatements: function(norujukan){
+ let urlroute = window.route('accountstatement.rekod', norujukan)
+ window.open(urlroute, '_blank');
+ },
+ formatDate(datetime, type) {
+ if (!datetime) return '';
+
+ const date = new Date(datetime);
+
+ if (type === 'date') {
+ // Return date only in dd/mm/yyyy format
+ const day = String(date.getDate()).padStart(2, '0');
+ const month = String(date.getMonth() + 1).padStart(2, '0');
+ const year = date.getFullYear();
+ return `${day}/${month}/${year}`;
+ }
+
+ if (type === 'time') {
+ // Return time in 12-hour format with AM/PM
+ let hours = date.getHours();
+ const minutes = String(date.getMinutes()).padStart(2, '0');
+ const seconds = String(date.getSeconds()).padStart(2, '0');
+ const ampm = hours >= 12 ? 'PM' : 'AM';
+
+ hours = hours % 12;
+ hours = hours ? hours : 12; // the hour '0' should be '12'
+ hours = String(hours).padStart(2, '0');
+
+ return `${hours}:${minutes}:${seconds} ${ampm}`;
+ }
+
+ // Default: return both date and time
+ const day = String(date.getDate()).padStart(2, '0');
+ const month = String(date.getMonth() + 1).padStart(2, '0');
+ const year = date.getFullYear();
+
+ let hours = date.getHours();
+ const minutes = String(date.getMinutes()).padStart(2, '0');
+ const seconds = String(date.getSeconds()).padStart(2, '0');
+ const ampm = hours >= 12 ? 'PM' : 'AM';
+
+ hours = hours % 12;
+ hours = hours ? hours : 12;
+ hours = String(hours).padStart(2, '0');
+
+ return `${day}/${month}/${year} ${hours}:${minutes}:${seconds} ${ampm}`;
+ },
}
}
diff --git a/resources/js/pages/Detailspelanggan.vue b/resources/js/pages/Detailspelanggan.vue
index 2e126c0..a5ca76d 100644
--- a/resources/js/pages/Detailspelanggan.vue
+++ b/resources/js/pages/Detailspelanggan.vue
@@ -2,7 +2,7 @@
||||||||||||