From b330abd0e2e258b1ee4cf3469a0fa11a8d4086f1 Mon Sep 17 00:00:00 2001 From: Cyclone Date: Mon, 1 Dec 2025 20:29:14 +0800 Subject: [PATCH] 1.fix layout and add icon in Tiada Data diperolehi dalam carian 2.add account statements icon in rekod Tebus --- .../js/components/util/RekodBayaranModal.vue | 128 +++++++++++++----- resources/js/pages/Detailspelanggan.vue | 41 +++--- routes/web.php | 50 +------ 3 files changed, 116 insertions(+), 103 deletions(-) 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 @@ Tarikh Bayaran + + Masa Bayaran + Bayaran @@ -54,14 +57,13 @@ -
-
-

- Tiada Data Diperolehi -

-
-
- +
+ + + +

Tiada Data Diperolehi

+
+ @@ -75,7 +77,15 @@
-

+

+

+
+
+ + +
+
+

@@ -125,14 +135,13 @@ -
-
-

- Tiada Data Diperolehi -

-
-
- +
+ + + +

Tiada Data Diperolehi

+
+ @@ -179,25 +188,25 @@ - - - - - - - @@ -205,14 +214,13 @@ +
+ + + +

Tiada Data Diperolehi

+
+ @@ -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 @@
-
+
@@ -334,12 +335,13 @@ @@ -457,12 +459,13 @@ diff --git a/routes/web.php b/routes/web.php index ec481b0..8712df7 100644 --- a/routes/web.php +++ b/routes/web.php @@ -224,55 +224,7 @@ Route::get('/autoserahan/rekod', [AutoSerahanController::class,'record'])->name Route::get('/autoserahan/rekod', [AutoSerahanController::class,'record'])->name('autoserahan.rekod'); -Route::get('/accounts/statements', [AccountStatementController::class,'showStatement'])->name('accountstatement.rekod'); -// Route::get('/accounts', function () { - - - -// $accountHolder = [ -// 'name' => 'John Smith', -// 'address' => '2450 Courage St, STE 108', -// 'city_state_zip' => 'Brownsville, TX 78521', -// ]; - -// $bankDetails = [ -// 'name' => 'PERMODALAN KELANTAN BERHAD', -// 'address' => '231 Valley Farms Street Santa Monica, CA 90403', -// 'email' => 'firstcitizensbank@domain.com', -// 'branch' => 'Main Branch - Santa Monica', -// 'account_number' => '111-234-567-890', -// 'statement_date' => '10/31/2025', -// 'period_covered' => '10/01/2025 to 10/31/2025', -// ]; - -// $summary = [ -// 'opening_balance' => 175800.00, -// 'total_credit' => 510000.00, -// 'total_debit' => 94000.00, -// 'closing_balance' => 591800.00, -// 'account_type' => 'Current Account', -// 'transaction_count' => 8, -// ]; - -// $transactions = [ -// // Note: The PDF format has Debit/Credit columns reversed in some tools, -// // but standard accounting puts Credits first. We'll follow the PDF logic -// // where amounts are placed under the correct column (Credit or Debit). -// ['date' => '10/02/2025', 'description' => 'Payment - Credit Card', 'credit' => null, 'debit' => 5400.00, 'balance' => 170400.00], -// ['date' => '10/03/2025', 'description' => 'Payment - Insurance', 'credit' => null, 'debit' => 3000.00, 'balance' => 167400.00], -// ['date' => '10/05/2025', 'description' => 'Account Transfer In', 'credit' => 500000.00, 'debit' => null, 'balance' => 667400.00], -// ['date' => '10/10/2025', 'description' => 'Cheque Deposit', 'credit' => 10000.00, 'debit' => null, 'balance' => 677400.00], -// ['date' => '10/15/2025', 'description' => 'Payment - Electricity', 'credit' => null, 'debit' => 1500.00, 'balance' => 675900.00], -// ['date' => '10/20/2025', 'description' => 'Payment - Water Utility', 'credit' => null, 'debit' => 600.00, 'balance' => 675300.00], -// ['date' => '10/25/2025', 'description' => 'Payment - Car Loan', 'credit' => null, 'debit' => 3500.00, 'balance' => 671800.00], -// ['date' => '10/30/2025', 'description' => 'Account Transfer Out', 'credit' => null, 'debit' => 80000.00, 'balance' => 591800.00], -// ]; - - - -// return view('accounts-statements', compact('accountHolder', 'bankDetails', 'summary', 'transactions')); -// }); - +Route::get('/accounts/statements/{norujukan}', [AccountStatementController::class,'showStatement'])->name('accountstatement.rekod'); Route::get('{any}', function () { return view('home');
+ Bil + No Rujukan - Jenis Penyelesaian Pembiayaan + + Jenis + Pembiayaan Asal + Tempoh - Tarikh Penyelesaian Pembiayaan + + Tarikh + Action
-
-
-

- Tiada Data Diperolehi -

-
-
-
@@ -266,12 +274,15 @@
- +
-
-
-

- Tiada data yang diperolehi dalam carian -

-
+
+ + + +

+ Tiada data yang diperolehi dalam carian +

-
-
-

- Tiada data yang diperolehi dalam carian -

-
+
+ + + +

+ Tiada data yang diperolehi dalam carian +

-
-
-

- Tiada data yang diperolehi dalam carian -

-
+
+ + + +

+ Tiada data yang diperolehi dalam carian +