From e6fb5b5f05cc9ba5b1814e479183f586203ac205 Mon Sep 17 00:00:00 2001 From: Edmond Lang Date: Sun, 29 Jun 2025 13:40:38 +0800 Subject: [PATCH 1/4] fix php 7.4 issue --- .../ExportCustomersToExcelController.php | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/app/Http/Controllers/Exports/ExportCustomersToExcelController.php b/app/Http/Controllers/Exports/ExportCustomersToExcelController.php index f77d8acb..09961cb7 100644 --- a/app/Http/Controllers/Exports/ExportCustomersToExcelController.php +++ b/app/Http/Controllers/Exports/ExportCustomersToExcelController.php @@ -154,13 +154,19 @@ class ExportCustomersToExcelController { $exportsTransactions = new ExportsWalletTransactions($request); - $type = $request->get('type'); - $exportFileName = match ($type) { - 'payment' => 'wallet-payment-transactions.xls', - 'credit_note' => 'wallet-credit-note-transactions.xls', - 'debit_note' => 'wallet-debit-note-transactions.xls', - default => 'wallet-topup-transactions.xls', - }; + switch ($request->get('type')) { + case 'payment': + $exportFileName = 'wallet-payment-transactions.xls'; + break; + case 'credit_note': + $exportFileName = 'wallet-credit-note-transactions.xls'; + break; + case 'debit_note': + $exportFileName = 'wallet-debit-note-transactions.xls'; + break; + default: + $exportFileName = 'wallet-topup-transactions.xls'; + } $filesystemDriver = Storage::getDefaultDriver(); if ($filesystemDriver === 's3') { @@ -171,7 +177,7 @@ class ExportCustomersToExcelController return $response; } } - + public function invoiceTransactions(Request $request){ $exportsTransactions = new ExportsInvoiceTransactions($request); $exportFileName = 'invoice-transactions.xls'; From 3fcd83b9a735b34f55b723201c23c63ec715be0f Mon Sep 17 00:00:00 2001 From: Edmond Lang Date: Sun, 29 Jun 2025 13:57:47 +0800 Subject: [PATCH 2/4] fix php 7.4 issue --- .../Controllers/Exports/ExportCustomersToExcelController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Exports/ExportCustomersToExcelController.php b/app/Http/Controllers/Exports/ExportCustomersToExcelController.php index 09961cb7..503126fe 100644 --- a/app/Http/Controllers/Exports/ExportCustomersToExcelController.php +++ b/app/Http/Controllers/Exports/ExportCustomersToExcelController.php @@ -154,7 +154,8 @@ class ExportCustomersToExcelController { $exportsTransactions = new ExportsWalletTransactions($request); - switch ($request->get('type')) { + $type = $request->get('type'); + switch ($type) { case 'payment': $exportFileName = 'wallet-payment-transactions.xls'; break; From c7fd52e65f56cc390a1027c0f8fd5aa74fd720e7 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Mon, 30 Jun 2025 23:35:34 +0800 Subject: [PATCH 3/4] E-Invoice - Disable maintenance page for normal user --- app/Http/Middleware/EnsureUserIsAdmin.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/Http/Middleware/EnsureUserIsAdmin.php b/app/Http/Middleware/EnsureUserIsAdmin.php index 58c206ac..18949d20 100644 --- a/app/Http/Middleware/EnsureUserIsAdmin.php +++ b/app/Http/Middleware/EnsureUserIsAdmin.php @@ -18,9 +18,12 @@ class EnsureUserIsAdmin */ public function handle(Request $request, Closure $next) { - $user = JWTAuth::parseToken()->authenticate(); - if(!in_array($user->type, RoleTypes::ADMIN_ROLES)){ - return response()->view('errors.503', [], 503); + $maintenanceTitle = env('MAINTENANCE_MESSAGE_TITLE', null); + if (!empty($maintenanceTitle)) { + $user = JWTAuth::parseToken()->authenticate(); + if(!in_array($user->type, RoleTypes::ADMIN_ROLES)){ + return response()->view('errors.503', [], 503); + } } return $next($request); } From cbc1aa65c1646cafbeb8e47b0623a647f1f4dfc1 Mon Sep 17 00:00:00 2001 From: Edmond Lang Date: Tue, 1 Jul 2025 12:34:08 +0800 Subject: [PATCH 4/4] update mobile menu for e invoice --- resources/views/partials/menu.blade.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/resources/views/partials/menu.blade.php b/resources/views/partials/menu.blade.php index 4a8ce344..66b4e1b7 100644 --- a/resources/views/partials/menu.blade.php +++ b/resources/views/partials/menu.blade.php @@ -119,6 +119,25 @@
Customers
+
+
+ +
+ +
+
+
+ +
+ +