dbmsv4 init...1
This commit is contained in:
parent
9dc949b99d
commit
c401cac80b
@ -33,6 +33,7 @@ class BoardController extends AdminController
|
||||
'category',
|
||||
'status',
|
||||
];
|
||||
$indexFilter = $filters;
|
||||
$batchjobFilters = ['user_uid', 'category', 'status'];
|
||||
switch ($action) {
|
||||
case 'create':
|
||||
@ -79,6 +80,7 @@ class BoardController extends AdminController
|
||||
$this->service->getFormService()->setFormRules($action, $fields);
|
||||
$this->service->getFormService()->setFormFilters($filters);
|
||||
$this->service->getFormService()->setFormOptions($filters);
|
||||
$this->service->getFormService()->getIndexFilters($indexFilter);
|
||||
$this->service->getFormService()->setBatchjobFilters($batchjobFilters);
|
||||
parent::action_init_process($action);
|
||||
}
|
||||
|
||||
@ -34,6 +34,7 @@ class AccountController extends CustomerController
|
||||
"bank",
|
||||
"status",
|
||||
];
|
||||
$indexFilter = $filters;
|
||||
$batchjobFilters = ['status'];
|
||||
parent::action_init_process($action);
|
||||
switch ($action) {
|
||||
@ -57,6 +58,7 @@ class AccountController extends CustomerController
|
||||
$this->service->getFormService()->setFormRules($action, $fields);
|
||||
$this->service->getFormService()->setFormFilters($filters);
|
||||
$this->service->getFormService()->setFormOptions($filters);
|
||||
$this->service->getFormService()->getIndexFilters($indexFilter);
|
||||
$this->service->getFormService()->setBatchjobFilters($batchjobFilters);
|
||||
parent::action_init_process($action);
|
||||
}
|
||||
|
||||
@ -31,9 +31,8 @@ class ClientController extends CustomerController
|
||||
'role',
|
||||
'status',
|
||||
];
|
||||
$indexFilter = $filters;
|
||||
$batchjobFilters = ['status'];
|
||||
// $actionButtons = ['view' => ICONS['SEARCH']];
|
||||
// $batchjobButtons = [];
|
||||
parent::action_init_process($action);
|
||||
switch ($action) {
|
||||
case 'create':
|
||||
@ -68,6 +67,7 @@ class ClientController extends CustomerController
|
||||
$this->service->getFormService()->setFormRules($action, $fields);
|
||||
$this->service->getFormService()->setFormFilters($filters);
|
||||
$this->service->getFormService()->setFormOptions($filters);
|
||||
$this->service->getFormService()->getIndexFilters($indexFilter);
|
||||
$this->service->getFormService()->setBatchjobFilters($batchjobFilters);
|
||||
parent::action_init_process($action);
|
||||
}
|
||||
|
||||
@ -34,6 +34,7 @@ class CouponController extends CustomerController
|
||||
"clientinfo_uid",
|
||||
"status",
|
||||
];
|
||||
$indexFilter = $filters;
|
||||
$batchjobFilters = ['status'];
|
||||
parent::action_init_process($action);
|
||||
switch ($action) {
|
||||
@ -57,6 +58,7 @@ class CouponController extends CustomerController
|
||||
$this->service->getFormService()->setFormRules($action, $fields);
|
||||
$this->service->getFormService()->setFormFilters($filters);
|
||||
$this->service->getFormService()->setFormOptions($filters);
|
||||
$this->service->getFormService()->getIndexFilters($indexFilter);
|
||||
$this->service->getFormService()->setBatchjobFilters($batchjobFilters);
|
||||
parent::action_init_process($action);
|
||||
}
|
||||
|
||||
@ -30,6 +30,7 @@ class PointController extends CustomerController
|
||||
"clientinfo_uid",
|
||||
"status",
|
||||
];
|
||||
$indexFilter = $filters;
|
||||
$batchjobFilters = ['status'];
|
||||
parent::action_init_process($action);
|
||||
switch ($action) {
|
||||
@ -53,6 +54,7 @@ class PointController extends CustomerController
|
||||
$this->service->getFormService()->setFormRules($action, $fields);
|
||||
$this->service->getFormService()->setFormFilters($filters);
|
||||
$this->service->getFormService()->setFormOptions($filters);
|
||||
$this->service->getFormService()->getIndexFilters($indexFilter);
|
||||
$this->service->getFormService()->setBatchjobFilters($batchjobFilters);
|
||||
parent::action_init_process($action);
|
||||
}
|
||||
|
||||
@ -42,6 +42,7 @@ class ServiceController extends CustomerController
|
||||
'user_uid',
|
||||
'status',
|
||||
];
|
||||
$indexFilter = $filters;
|
||||
$batchjobFilters = [
|
||||
'site',
|
||||
'location',
|
||||
@ -70,7 +71,6 @@ class ServiceController extends CustomerController
|
||||
'billing_at',
|
||||
'status',
|
||||
'start_at',
|
||||
'updated_at',
|
||||
'created_at'
|
||||
];
|
||||
break;
|
||||
@ -82,6 +82,7 @@ class ServiceController extends CustomerController
|
||||
$this->service->getFormService()->setFormRules($action, $fields);
|
||||
$this->service->getFormService()->setFormFilters($filters);
|
||||
$this->service->getFormService()->setFormOptions($filters);
|
||||
$this->service->getFormService()->getIndexFilters($indexFilter);
|
||||
$this->service->getFormService()->setBatchjobFilters($batchjobFilters);
|
||||
parent::action_init_process($action);
|
||||
}
|
||||
|
||||
@ -31,6 +31,7 @@ class LineController extends EquipmentController
|
||||
"clientinfo_uid",
|
||||
"status",
|
||||
];
|
||||
$indexFilter = $filters;
|
||||
$batchjobFilters = ['status'];
|
||||
parent::action_init_process($action);
|
||||
switch ($action) {
|
||||
@ -55,6 +56,7 @@ class LineController extends EquipmentController
|
||||
$this->service->getFormService()->setFormRules($action, $fields);
|
||||
$this->service->getFormService()->setFormFilters($filters);
|
||||
$this->service->getFormService()->setFormOptions($filters);
|
||||
$this->service->getFormService()->getIndexFilters($indexFilter);
|
||||
$this->service->getFormService()->setBatchjobFilters($batchjobFilters);
|
||||
parent::action_init_process($action);
|
||||
}
|
||||
|
||||
@ -34,6 +34,7 @@ class ServerController extends EquipmentController
|
||||
"clientinfo_uid",
|
||||
"status",
|
||||
];
|
||||
$indexFilter = $filters;
|
||||
$batchjobFilters = ['status'];
|
||||
parent::action_init_process($action);
|
||||
switch ($action) {
|
||||
@ -58,6 +59,7 @@ class ServerController extends EquipmentController
|
||||
$this->service->getFormService()->setFormRules($action, $fields);
|
||||
$this->service->getFormService()->setFormFilters($filters);
|
||||
$this->service->getFormService()->setFormOptions($filters);
|
||||
$this->service->getFormService()->getIndexFilters($indexFilter);
|
||||
$this->service->getFormService()->setBatchjobFilters($batchjobFilters);
|
||||
parent::action_init_process($action);
|
||||
}
|
||||
|
||||
@ -35,6 +35,7 @@ class ServerPartController extends EquipmentController
|
||||
"part_uid",
|
||||
"billing",
|
||||
];
|
||||
$indexFilter = $filters;
|
||||
$batchjobFilters = ['billing', 'type'];
|
||||
parent::action_init_process($action);
|
||||
switch ($action) {
|
||||
@ -59,6 +60,7 @@ class ServerPartController extends EquipmentController
|
||||
$this->service->getFormService()->setFormRules($action, $fields);
|
||||
$this->service->getFormService()->setFormFilters($filters);
|
||||
$this->service->getFormService()->setFormOptions($filters);
|
||||
$this->service->getFormService()->getIndexFilters($indexFilter);
|
||||
$this->service->getFormService()->setBatchjobFilters($batchjobFilters);
|
||||
parent::action_init_process($action);
|
||||
}
|
||||
|
||||
@ -21,6 +21,7 @@ class MylogController extends AdminController
|
||||
{
|
||||
$fields = ['title', 'content'];
|
||||
$filters = [];
|
||||
$indexFilter = $filters;
|
||||
$batchjobFilters = $filters;
|
||||
parent::action_init_process($action);
|
||||
switch ($action) {
|
||||
@ -44,6 +45,7 @@ class MylogController extends AdminController
|
||||
$this->service->getFormService()->setFormRules($action, $fields);
|
||||
$this->service->getFormService()->setFormFilters($filters);
|
||||
$this->service->getFormService()->setFormOptions($filters);
|
||||
$this->service->getFormService()->getIndexFilters($indexFilter);
|
||||
$this->service->getFormService()->setBatchjobFilters($batchjobFilters);
|
||||
parent::action_init_process($action);
|
||||
}
|
||||
|
||||
@ -27,6 +27,7 @@ class CPUController extends PartController
|
||||
$filters = [
|
||||
"status",
|
||||
];
|
||||
$indexFilter = $filters;
|
||||
$batchjobFilters = ['status'];
|
||||
parent::action_init_process($action);
|
||||
switch ($action) {
|
||||
@ -51,6 +52,7 @@ class CPUController extends PartController
|
||||
$this->service->getFormService()->setFormRules($action, $fields);
|
||||
$this->service->getFormService()->setFormFilters($filters);
|
||||
$this->service->getFormService()->setFormOptions($filters);
|
||||
$this->service->getFormService()->getIndexFilters($indexFilter);
|
||||
$this->service->getFormService()->setBatchjobFilters($batchjobFilters);
|
||||
parent::action_init_process($action);
|
||||
}
|
||||
|
||||
@ -32,9 +32,8 @@ class CSController extends PartController
|
||||
'type',
|
||||
'status'
|
||||
];
|
||||
$indexFilter = $filters;
|
||||
$batchjobFilters = ['status'];
|
||||
// $actionButtons = ['view' => ICONS['SEARCH']];
|
||||
// $batchjobButtons = [];
|
||||
parent::action_init_process($action);
|
||||
switch ($action) {
|
||||
case 'create':
|
||||
@ -80,6 +79,7 @@ class CSController extends PartController
|
||||
$this->service->getFormService()->setFormRules($action, $fields);
|
||||
$this->service->getFormService()->setFormFilters($filters);
|
||||
$this->service->getFormService()->setFormOptions($filters);
|
||||
$this->service->getFormService()->getIndexFilters($indexFilter);
|
||||
$this->service->getFormService()->setBatchjobFilters($batchjobFilters);
|
||||
parent::action_init_process($action);
|
||||
}
|
||||
|
||||
@ -28,6 +28,7 @@ class DISKController extends PartController
|
||||
$filters = [
|
||||
"status",
|
||||
];
|
||||
$indexFilter = $filters;
|
||||
$batchjobFilters = ['status'];
|
||||
parent::action_init_process($action);
|
||||
switch ($action) {
|
||||
@ -52,6 +53,7 @@ class DISKController extends PartController
|
||||
$this->service->getFormService()->setFormRules($action, $fields);
|
||||
$this->service->getFormService()->setFormFilters($filters);
|
||||
$this->service->getFormService()->setFormOptions($filters);
|
||||
$this->service->getFormService()->getIndexFilters($indexFilter);
|
||||
$this->service->getFormService()->setBatchjobFilters($batchjobFilters);
|
||||
parent::action_init_process($action);;
|
||||
}
|
||||
|
||||
@ -31,6 +31,7 @@ class IPController extends PartController
|
||||
"lineinfo_uid",
|
||||
'status'
|
||||
];
|
||||
$indexFilter = $filters;
|
||||
$batchjobFilters = ['status'];
|
||||
parent::action_init_process($action);
|
||||
switch ($action) {
|
||||
@ -69,6 +70,7 @@ class IPController extends PartController
|
||||
$this->service->getFormService()->setFormRules($action, $fields);
|
||||
$this->service->getFormService()->setFormFilters($filters);
|
||||
$this->service->getFormService()->setFormOptions($filters);
|
||||
$this->service->getFormService()->getIndexFilters($indexFilter);
|
||||
$this->service->getFormService()->setBatchjobFilters($batchjobFilters);
|
||||
parent::action_init_process($action);
|
||||
}
|
||||
|
||||
@ -27,6 +27,7 @@ class RAMController extends PartController
|
||||
$filters = [
|
||||
"status",
|
||||
];
|
||||
$indexFilter = $filters;
|
||||
$batchjobFilters = ['status'];
|
||||
parent::action_init_process($action);
|
||||
switch ($action) {
|
||||
@ -51,6 +52,7 @@ class RAMController extends PartController
|
||||
$this->service->getFormService()->setFormRules($action, $fields);
|
||||
$this->service->getFormService()->setFormFilters($filters);
|
||||
$this->service->getFormService()->setFormOptions($filters);
|
||||
$this->service->getFormService()->getIndexFilters($indexFilter);
|
||||
$this->service->getFormService()->setBatchjobFilters($batchjobFilters);
|
||||
parent::action_init_process($action);
|
||||
}
|
||||
|
||||
@ -27,6 +27,7 @@ class SOFTWAREController extends PartController
|
||||
$filters = [
|
||||
"status",
|
||||
];
|
||||
$indexFilter = $filters;
|
||||
$batchjobFilters = ['status'];
|
||||
parent::action_init_process($action);
|
||||
switch ($action) {
|
||||
@ -51,6 +52,7 @@ class SOFTWAREController extends PartController
|
||||
$this->service->getFormService()->setFormRules($action, $fields);
|
||||
$this->service->getFormService()->setFormFilters($filters);
|
||||
$this->service->getFormService()->setFormOptions($filters);
|
||||
$this->service->getFormService()->getIndexFilters($indexFilter);
|
||||
$this->service->getFormService()->setBatchjobFilters($batchjobFilters);
|
||||
parent::action_init_process($action);
|
||||
}
|
||||
|
||||
@ -29,10 +29,8 @@ class SWITCHController extends PartController
|
||||
'serverinfo_uid',
|
||||
'status'
|
||||
];
|
||||
$batchjobFilters = [
|
||||
'status',
|
||||
];
|
||||
|
||||
$indexFilter = $filters;
|
||||
$batchjobFilters = ['status',];
|
||||
parent::action_init_process($action);
|
||||
switch ($action) {
|
||||
case 'create':
|
||||
@ -73,6 +71,7 @@ class SWITCHController extends PartController
|
||||
$this->service->getFormService()->setFormRules($action, $fields);
|
||||
$this->service->getFormService()->setFormFilters($filters);
|
||||
$this->service->getFormService()->setFormOptions($filters);
|
||||
$this->service->getFormService()->getIndexFilters($indexFilter);
|
||||
$this->service->getFormService()->setBatchjobFilters($batchjobFilters);
|
||||
parent::action_init_process($action);
|
||||
}
|
||||
|
||||
@ -29,6 +29,7 @@ class PaymentController extends AdminController
|
||||
"content ",
|
||||
];
|
||||
$filters = ['user_uid', 'clientinfo_uid', 'serviceinfo_uid', 'status', 'billing', 'pay'];
|
||||
$indexFilter = $filters;
|
||||
$batchjobFilters = ['status'];
|
||||
switch ($action) {
|
||||
case 'create':
|
||||
@ -71,7 +72,6 @@ class PaymentController extends AdminController
|
||||
'user_uid',
|
||||
'created_at'
|
||||
];
|
||||
$filters = ['user_uid', 'clientinfo_uid', 'serviceinfo_uid', 'status', 'billing'];
|
||||
break;
|
||||
default:
|
||||
throw new \Exception("[{$action}] 지원하지 않는 action입니다.");
|
||||
@ -81,6 +81,7 @@ class PaymentController extends AdminController
|
||||
$this->service->getFormService()->setFormRules($action, $fields);
|
||||
$this->service->getFormService()->setFormFilters($filters);
|
||||
$this->service->getFormService()->setFormOptions($filters);
|
||||
$this->service->getFormService()->getIndexFilters($indexFilter);
|
||||
$this->service->getFormService()->setBatchjobFilters($batchjobFilters);
|
||||
parent::action_init_process($action);
|
||||
}
|
||||
|
||||
@ -30,6 +30,7 @@ class UserController extends AdminController
|
||||
'role'
|
||||
];
|
||||
$filters = ['role', 'status'];
|
||||
$indexFilter = $filters;
|
||||
$batchjobFilters = ['status'];
|
||||
switch ($action) {
|
||||
case 'create':
|
||||
@ -54,6 +55,7 @@ class UserController extends AdminController
|
||||
$this->service->getFormService()->setFormRules($action, $fields);
|
||||
$this->service->getFormService()->setFormFilters($filters);
|
||||
$this->service->getFormService()->setFormOptions($filters);
|
||||
$this->service->getFormService()->getIndexFilters($indexFilter);
|
||||
$this->service->getFormService()->setBatchjobFilters($batchjobFilters);
|
||||
parent::action_init_process($action);
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@ abstract class CommonController extends AbstractCRUDController
|
||||
{
|
||||
// Filter조건절 처리
|
||||
$index_filters = [];
|
||||
foreach ($this->service->getFormService()->getFormFilters($action) as $field) {
|
||||
foreach ($this->service->getFormService()->getIndexFilters($action) as $field) {
|
||||
$value = $this->request->getVar($field) ?? null;
|
||||
if ($value) {
|
||||
$this->service->setFilter($field, $value);
|
||||
|
||||
@ -11,6 +11,7 @@ abstract class CommonForm
|
||||
private array $_formFields = [];
|
||||
private array $_formRules = [];
|
||||
private array $_formFilters = [];
|
||||
private array $_indexFilters = [];
|
||||
private array $_batchjobFilters = [];
|
||||
private array $_formOptions = [];
|
||||
private array $_actionButtons = ['view' => ICONS['SEARCH'], 'delete' => ICONS['DELETE']];
|
||||
@ -80,6 +81,14 @@ abstract class CommonForm
|
||||
{
|
||||
return $this->_formFilters;
|
||||
}
|
||||
final public function setIndexFilters(array $fields): void
|
||||
{
|
||||
$this->_indexFilters = $fields;;
|
||||
}
|
||||
final public function getIndexFilters(): array
|
||||
{
|
||||
return $this->_indexFilters;
|
||||
}
|
||||
final public function setBatchjobFilters(array $fields): void
|
||||
{
|
||||
$this->_batchjobFilters = $fields;;
|
||||
|
||||
@ -90,15 +90,15 @@ class ClientHelper extends CustomerHelper
|
||||
public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string
|
||||
{
|
||||
switch ($action) {
|
||||
case 'modify':
|
||||
$action = $this->getAuthContext()->isAccessRole([ROLE['USER']['SECURITY']]) ? parent::getListButton($action, $label, $viewDatas, $extras) : $label;
|
||||
break;
|
||||
case 'create':
|
||||
case 'delete':
|
||||
case 'batchjob':
|
||||
case 'batchjob_delete':
|
||||
$action = $this->getAuthContext()->isAccessRole([ROLE['USER']['SECURITY']]) ? parent::getListButton($action, $label, $viewDatas, $extras) : "";
|
||||
break;
|
||||
case 'modify':
|
||||
$action = $this->getAuthContext()->isAccessRole([ROLE['USER']['SECURITY']]) ? parent::getListButton($action, $label, $viewDatas, $extras) : $label;
|
||||
break;
|
||||
case 'history':
|
||||
$action = form_label(
|
||||
$label ? $label : ICONS['HISTORY'],
|
||||
|
||||
@ -43,10 +43,7 @@ class PaymentHelper extends CommonHelper
|
||||
}
|
||||
break;
|
||||
case 'delete':
|
||||
$action = "";
|
||||
if ($this->getAuthContext()->isAccessRole([ROLE['USER']['SECURITY']])) {
|
||||
$action = parent::getListButton($action, $label, $viewDatas, $extras);
|
||||
}
|
||||
$action = $this->getAuthContext()->isAccessRole([ROLE['USER']['SECURITY']]) ? parent::getListButton($action, $label, $viewDatas, $extras) : "";
|
||||
break;
|
||||
case 'paid':
|
||||
$action = form_submit($action . "_submit", $label ? $label : '결제 처리', [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user