From 76faa50df8b1712f751885210956f5117b0299e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Mon, 22 Dec 2025 09:42:38 +0900 Subject: [PATCH] dbmsv4 init...3 --- app/Helpers/Customer/Wallet/AccountHelper.php | 26 +++++++++++++++++++ app/Helpers/Customer/Wallet/CouponHelper.php | 26 +++++++++++++++++++ app/Helpers/Customer/Wallet/PointHelper.php | 26 +++++++++++++++++++ 3 files changed, 78 insertions(+) diff --git a/app/Helpers/Customer/Wallet/AccountHelper.php b/app/Helpers/Customer/Wallet/AccountHelper.php index d6dc8cd..05bf478 100644 --- a/app/Helpers/Customer/Wallet/AccountHelper.php +++ b/app/Helpers/Customer/Wallet/AccountHelper.php @@ -56,4 +56,30 @@ class AccountHelper extends WalletHelper } return $value; } + public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string + { + switch ($action) { + case 'modify': + //역활이 보안관리자가 아니면 수정불가 + if ($this->getAuthContext()->isAccessRole([ROLE['USER']['SECURITY']])) { + $action = parent::getListButton($action, $label, $viewDatas, $extras); + } else { + $oldBatchJobUids = old("batchjob_uids", null); + $oldBatchJobUids = is_array($oldBatchJobUids) ? $oldBatchJobUids : [$oldBatchJobUids]; + $action = form_checkbox([ + "id" => "checkbox_uid_{$viewDatas['entity']->getPK()}", + "name" => "batchjob_uids[]", + "value" => $viewDatas['entity']->getPK(), + "class" => "batchjobuids_checkboxs", + "checked" => in_array($viewDatas['entity']->getPK(), $oldBatchJobUids) + ]); + $action .= $label; + } + break; + default: + $action = parent::getListButton($action, $label, $viewDatas, $extras); + break; + } + return $action; + } } diff --git a/app/Helpers/Customer/Wallet/CouponHelper.php b/app/Helpers/Customer/Wallet/CouponHelper.php index a7933c2..8e19ded 100644 --- a/app/Helpers/Customer/Wallet/CouponHelper.php +++ b/app/Helpers/Customer/Wallet/CouponHelper.php @@ -25,4 +25,30 @@ class CouponHelper extends WalletHelper } return $value; } + public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string + { + switch ($action) { + case 'modify': + //역활이 보안관리자가 아니면 수정불가 + if ($this->getAuthContext()->isAccessRole([ROLE['USER']['SECURITY']])) { + $action = parent::getListButton($action, $label, $viewDatas, $extras); + } else { + $oldBatchJobUids = old("batchjob_uids", null); + $oldBatchJobUids = is_array($oldBatchJobUids) ? $oldBatchJobUids : [$oldBatchJobUids]; + $action = form_checkbox([ + "id" => "checkbox_uid_{$viewDatas['entity']->getPK()}", + "name" => "batchjob_uids[]", + "value" => $viewDatas['entity']->getPK(), + "class" => "batchjobuids_checkboxs", + "checked" => in_array($viewDatas['entity']->getPK(), $oldBatchJobUids) + ]); + $action .= $label; + } + break; + default: + $action = parent::getListButton($action, $label, $viewDatas, $extras); + break; + } + return $action; + } } diff --git a/app/Helpers/Customer/Wallet/PointHelper.php b/app/Helpers/Customer/Wallet/PointHelper.php index 9d43a5d..8b0b202 100644 --- a/app/Helpers/Customer/Wallet/PointHelper.php +++ b/app/Helpers/Customer/Wallet/PointHelper.php @@ -25,4 +25,30 @@ class PointHelper extends WalletHelper } return $value; } + public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string + { + switch ($action) { + case 'modify': + //역활이 보안관리자가 아니면 수정불가 + if ($this->getAuthContext()->isAccessRole([ROLE['USER']['SECURITY']])) { + $action = parent::getListButton($action, $label, $viewDatas, $extras); + } else { + $oldBatchJobUids = old("batchjob_uids", null); + $oldBatchJobUids = is_array($oldBatchJobUids) ? $oldBatchJobUids : [$oldBatchJobUids]; + $action = form_checkbox([ + "id" => "checkbox_uid_{$viewDatas['entity']->getPK()}", + "name" => "batchjob_uids[]", + "value" => $viewDatas['entity']->getPK(), + "class" => "batchjobuids_checkboxs", + "checked" => in_array($viewDatas['entity']->getPK(), $oldBatchJobUids) + ]); + $action .= $label; + } + break; + default: + $action = parent::getListButton($action, $label, $viewDatas, $extras); + break; + } + return $action; + } }