dbmsv4 init...3

This commit is contained in:
최준흠 2025-12-22 09:42:38 +09:00
parent 997dfd9973
commit 76faa50df8
3 changed files with 78 additions and 0 deletions

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}