dbms_init...1

This commit is contained in:
choi.jh 2025-06-24 10:48:44 +09:00
parent 11a47df12d
commit d5f2e5a688
8 changed files with 47 additions and 5 deletions

View File

@ -58,6 +58,13 @@ class ServiceController extends CustomerController
return $result;
}
//Index,FieldForm관련
//수정관련
protected function modify_process(mixed $entity, array $formDatas): mixed
{
//수정자 정보 자동추가용
$formDatas['user_uid'] = $this->getMyAuth()->getUIDByAuthInfo();
return parent::modify_process($entity, $formDatas);
}
//View 관련
protected function view_process(mixed $entity): mixed
{

View File

@ -81,6 +81,13 @@ class ServicePaymentController extends CustomerController
return $result;
}
//Index,FieldForm관련
//수정관련
protected function modify_process(mixed $entity, array $formDatas): mixed
{
//수정자 정보 자동추가용
$formDatas['user_uid'] = $this->getMyAuth()->getUIDByAuthInfo();
return parent::modify_process($entity, $formDatas);
}
//View 관련
protected function view_process(mixed $entity): mixed
{

View File

@ -4,13 +4,13 @@
"settings": {
"width": 3000,
"height": 3000,
"scrollTop": -847.6656,
"scrollLeft": -448.1008,
"scrollTop": -958.6656,
"scrollLeft": -800,
"zoomLevel": 0.73,
"show": 511,
"database": 4,
"databaseName": "",
"canvasType": "@dineug/erd-editor/builtin-schema-sql",
"canvasType": "ERD",
"language": 1,
"tableNameCase": 4,
"columnNameCase": 2,

View File

@ -6,6 +6,7 @@ use CodeIgniter\HTTP\IncomingRequest;
class CommonHelper
{
private $_myAuth = null;
private $_viewDatas = [];
private $_titleField = "";
private ?IncomingRequest $_request = null;
@ -13,6 +14,13 @@ class CommonHelper
{
$this->_request = $request;
}
final protected function getMyAuth(): mixed
{
if (!$this->_myAuth) {
$this->_myAuth = service('myauth');
}
return $this->_myAuth;
}
final public function getRequest(): IncomingRequest|null
{
return $this->_request;

View File

@ -16,6 +16,10 @@ class ClientHelper extends CustomerHelper
public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null
{
switch ($field) {
case "email":
case "phone":
$value = !$this->getMyAuth()->isAccessRole(['security']) ? "***********" : parent::getFieldView($field, $value, $viewDatas, $extras);
break;
case 'account_balance':
$extras = ["class" => "btn btn-link", "target" => "_self", ...$extras];
$value = form_label(
@ -65,4 +69,21 @@ class ClientHelper extends CustomerHelper
}
return $value;
} //
public function getListButton(string $action, array $viewDatas, array $extras = []): string
{
switch ($action) {
case 'modify':
$action = !$this->getMyAuth()->isAccessRole(['security']) ? $viewDatas['cnt'] : parent::getListButton($action, $viewDatas, $extras);
break;
case 'delete':
case 'batchjob':
case 'batchjob_delete':
$action = !$this->getMyAuth()->isAccessRole(['security']) ? "" : parent::getListButton($action, $viewDatas, $extras);
break;
default:
$action = parent::getListButton($action, $viewDatas, $extras);
break;
}
return $action;
}
}

View File

@ -23,6 +23,7 @@ return [
"manager" => "관리자",
"cloudflare" => "Cloudflare관리자",
"firewall" => "firewall관리자",
"security" => "보안관리자",
"director" => "감독자",
"master" => "마스터",
],

View File

@ -31,7 +31,6 @@ class ServicePaymentService extends CustomerService
return [
"serviceinfo_uid",
"ownerinfo_uid",
"user_uid",
"item_type",
"item_uid",
"billing_cycle",

View File

@ -35,7 +35,6 @@ class ServiceService extends CustomerService
return [
"clientinfo_uid",
"ownerinfo_uid",
"user_uid",
"type",
"location",
"switch",