dbmsv4 init...3
This commit is contained in:
parent
997dfd9973
commit
76faa50df8
@ -56,4 +56,30 @@ class AccountHelper extends WalletHelper
|
|||||||
}
|
}
|
||||||
return $value;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,4 +25,30 @@ class CouponHelper extends WalletHelper
|
|||||||
}
|
}
|
||||||
return $value;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,4 +25,30 @@ class PointHelper extends WalletHelper
|
|||||||
}
|
}
|
||||||
return $value;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user