From fabf52cd86737b4d1c6623e9794049b4f0be7055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Fri, 23 May 2025 13:42:48 +0900 Subject: [PATCH] dbms_init...1 --- app/Controllers/Admin/AdminController.php | 4 + .../Admin/Customer/AccountController.php | 9 +- .../Admin/Customer/ClientController.php | 9 +- .../Admin/Customer/CouponController.php | 9 +- .../Admin/Customer/CustomerController.php | 2 - .../Admin/Customer/PointController.php | 10 +- .../Admin/Customer/ServiceController.php | 11 +- .../Admin/Equipment/DefenceController.php | 9 +- .../Admin/Equipment/EquipmentController.php | 18 +- .../Admin/Equipment/IpController.php | 9 +- .../Admin/Equipment/LineController.php | 12 +- .../Admin/Equipment/Link/CpuController.php | 11 +- .../Admin/Equipment/Link/DiskController.php | 10 +- .../Admin/Equipment/Link/LinkController.php | 10 - .../Admin/Equipment/Link/RamController.php | 10 +- .../Admin/Equipment/Part/CpuController.php | 9 +- .../Admin/Equipment/Part/DiskController.php | 9 +- .../Admin/Equipment/Part/PartController.php | 2 - .../Admin/Equipment/Part/RamController.php | 9 +- .../Admin/Equipment/ServerController.php | 18 +- .../Admin/Equipment/SoftwareController.php | 10 +- app/Controllers/Admin/Home.php | 2 - app/Controllers/Admin/MyLogController.php | 9 +- app/Controllers/Admin/UserController.php | 9 +- app/Controllers/Auth/AuthController.php | 4 +- app/Controllers/Auth/GoogleController.php | 3 - app/Controllers/Auth/LocalController.php | 3 - app/Controllers/CommonController.php | 5 +- app/Database/erp2.vuerd.json | 724 +----------------- app/Entities/Equipment/Link/CpuEntity.php | 2 +- app/Entities/Equipment/Link/DiskEntity.php | 2 +- app/Entities/Equipment/Link/LinkEntity.php | 2 +- app/Entities/Equipment/Link/RamEntity.php | 2 +- app/Helpers/CommonHelper.php | 27 +- app/Helpers/Equipment/ServerHelper.php | 24 +- app/Services/Auth/AuthService.php | 6 +- app/Services/Auth/GoogleService.php | 5 +- app/Services/Auth/LocalService.php | 5 +- app/Services/CommonService.php | 15 +- app/Services/Customer/AccountService.php | 5 +- app/Services/Customer/ClientService.php | 5 +- app/Services/Customer/CouponService.php | 5 +- app/Services/Customer/CustomerService.php | 6 +- app/Services/Customer/PointService.php | 5 +- app/Services/Customer/ServiceService.php | 5 +- app/Services/Equipment/DefenceService.php | 5 +- app/Services/Equipment/EquipmentService.php | 5 +- app/Services/Equipment/IpService.php | 5 +- app/Services/Equipment/LineService.php | 5 +- app/Services/Equipment/Link/CpuService.php | 14 +- app/Services/Equipment/Link/DiskService.php | 13 +- app/Services/Equipment/Link/LinkService.php | 12 +- app/Services/Equipment/Link/RamService.php | 13 +- app/Services/Equipment/Part/CpuService.php | 5 +- app/Services/Equipment/Part/DiskService.php | 5 +- app/Services/Equipment/Part/PartService.php | 25 +- app/Services/Equipment/Part/RamService.php | 5 +- app/Services/Equipment/ServerService.php | 5 +- app/Services/Equipment/SoftwareService.php | 5 +- app/Services/MyLogService.php | 5 +- app/Services/UserSNSService.php | 5 +- app/Services/UserService.php | 5 +- app/Views/admin/index.php | 2 +- app/Views/admin/popup/index.php | 4 +- .../layouts/admin/left_menu/customer.php | 2 +- .../templates/admin/index_content_top.php | 2 +- .../admin/index_content_top_popup.php | 22 + .../{modal_fetch.php => modal_fetch_v1.php} | 2 +- app/Views/templates/common/modal_fetch_v2.php | 166 ++++ app/Views/templates/common/modal_iframe.php | 18 +- 70 files changed, 419 insertions(+), 1016 deletions(-) create mode 100644 app/Views/templates/admin/index_content_top_popup.php rename app/Views/templates/common/{modal_fetch.php => modal_fetch_v1.php} (98%) create mode 100644 app/Views/templates/common/modal_fetch_v2.php diff --git a/app/Controllers/Admin/AdminController.php b/app/Controllers/Admin/AdminController.php index 792913d..d755d60 100644 --- a/app/Controllers/Admin/AdminController.php +++ b/app/Controllers/Admin/AdminController.php @@ -15,5 +15,9 @@ abstract class AdminController extends CommonController $this->layout = "admin"; $this->uri_path = "admin/"; $this->view_path = "admin" . DIRECTORY_SEPARATOR; + $this->title = "관리자"; + $this->individualStylesheets = []; + $this->individualScripts = []; + $this->helper = $this->getHelper(); } } diff --git a/app/Controllers/Admin/Customer/AccountController.php b/app/Controllers/Admin/Customer/AccountController.php index 00ee4c9..2913ad6 100644 --- a/app/Controllers/Admin/Customer/AccountController.php +++ b/app/Controllers/Admin/Customer/AccountController.php @@ -15,10 +15,11 @@ class AccountController extends CustomerController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= strtolower($this->getService()->getClassName()) . '/'; - $this->class_path = $this->getService()->getClassPath(); - $this->title = lang("{$this->getService()->getClassPath()}.title"); - $this->helper = $this->getHelper(); + $this->title = lang("{$this->getService()->getClassName()}.title"); + $this->class_path .= $this->getService()->getClassName(); + $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; + // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; + } public function getService(): AccountService { diff --git a/app/Controllers/Admin/Customer/ClientController.php b/app/Controllers/Admin/Customer/ClientController.php index 08fd58e..82b9e77 100644 --- a/app/Controllers/Admin/Customer/ClientController.php +++ b/app/Controllers/Admin/Customer/ClientController.php @@ -18,10 +18,11 @@ class ClientController extends CustomerController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= strtolower($this->getService()->getClassName()) . '/'; - $this->class_path = $this->getService()->getClassPath(); - $this->title = lang("{$this->getService()->getClassPath()}.title"); - $this->helper = $this->getHelper(); + $this->title = lang("{$this->getService()->getClassName()}.title"); + $this->class_path .= $this->getService()->getClassName(); + $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; + // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; + } public function getService(): ClientService { diff --git a/app/Controllers/Admin/Customer/CouponController.php b/app/Controllers/Admin/Customer/CouponController.php index 529ad73..b27e4c9 100644 --- a/app/Controllers/Admin/Customer/CouponController.php +++ b/app/Controllers/Admin/Customer/CouponController.php @@ -15,10 +15,11 @@ class CouponController extends CustomerController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= strtolower($this->getService()->getClassName()) . '/'; - $this->class_path = $this->getService()->getClassPath(); - $this->title = lang("{$this->getService()->getClassPath()}.title"); - $this->helper = $this->getHelper(); + $this->title = lang("{$this->getService()->getClassName()}.title"); + $this->class_path .= $this->getService()->getClassName(); + $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; + // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; + } public function getService(): CouponService { diff --git a/app/Controllers/Admin/Customer/CustomerController.php b/app/Controllers/Admin/Customer/CustomerController.php index c044b37..696cf57 100644 --- a/app/Controllers/Admin/Customer/CustomerController.php +++ b/app/Controllers/Admin/Customer/CustomerController.php @@ -22,8 +22,6 @@ abstract class CustomerController extends AdminController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= 'customer/'; - // $this->view_path .= "customer" . DIRECTORY_SEPARATOR; } final public function getClientService(): ClientService diff --git a/app/Controllers/Admin/Customer/PointController.php b/app/Controllers/Admin/Customer/PointController.php index 297671c..aaaeddf 100644 --- a/app/Controllers/Admin/Customer/PointController.php +++ b/app/Controllers/Admin/Customer/PointController.php @@ -5,7 +5,6 @@ namespace App\Controllers\Admin\Customer; use App\Entities\Customer\PointEntity; use App\Helpers\Customer\PointHelper; use App\Services\Customer\PointService; -use CodeIgniter\HTTP\RedirectResponse; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; @@ -16,10 +15,11 @@ class PointController extends CustomerController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= strtolower($this->getService()->getClassName()) . '/'; - $this->class_path = $this->getService()->getClassPath(); - $this->title = lang("{$this->getService()->getClassPath()}.title"); - $this->helper = $this->getHelper(); + $this->title = lang("{$this->getService()->getClassName()}.title"); + $this->class_path .= $this->getService()->getClassName(); + $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; + // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; + } public function getService(): PointService { diff --git a/app/Controllers/Admin/Customer/ServiceController.php b/app/Controllers/Admin/Customer/ServiceController.php index 7476c86..1ad6107 100644 --- a/app/Controllers/Admin/Customer/ServiceController.php +++ b/app/Controllers/Admin/Customer/ServiceController.php @@ -22,13 +22,11 @@ class ServiceController extends CustomerController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= strtolower($this->getService()->getClassName()) . '/'; + $this->title = lang("{$this->getService()->getClassName()}.title"); + $this->class_path .= $this->getService()->getClassName(); + $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; - $this->class_path = $this->getService()->getClassPath(); - $this->title = lang("{$this->getService()->getClassPath()}.title"); - $this->helper = $this->getHelper(); - // $this->individualStylesheets = ['server_partinfo.css']; - // $this->individualScripts = ['server_partinfo.js']; + } public function getService(): ServiceService { @@ -106,7 +104,6 @@ class ServiceController extends CustomerController 'fields' => ['type', 'clientinfo_uid', 'rack', 'lineinfo_uid', 'serverinfo_uid', 'IP', 'CPU', 'RAM', 'DISK', 'SOFTWARE', 'DEFENCE', 'billing_at', 'start_at', 'status'], ]; $this->init('index', $fields); - $this->modal_type = 'modal_iframe'; return parent::index_process(); } } diff --git a/app/Controllers/Admin/Equipment/DefenceController.php b/app/Controllers/Admin/Equipment/DefenceController.php index d38de43..f8fc1f2 100644 --- a/app/Controllers/Admin/Equipment/DefenceController.php +++ b/app/Controllers/Admin/Equipment/DefenceController.php @@ -14,11 +14,11 @@ class DefenceController extends EquipmentController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= strtolower($this->getService()->getClassName()) . '/'; + $this->title = lang("{$this->getService()->getClassName()}.title"); + $this->class_path .= $this->getService()->getClassName(); + $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; + // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; - $this->class_path = $this->getService()->getClassPath(); - $this->title = lang("{$this->getService()->getClassPath()}.title"); - $this->helper = $this->getHelper(); } public function getService(): DefenceService { @@ -49,7 +49,6 @@ class DefenceController extends EquipmentController 'fields' => ['type', 'ip', 'accountid', 'domain', 'status'], ]; $this->init('index', $fields); - $this->modal_type = 'modal_iframe'; return parent::index_process(); } } diff --git a/app/Controllers/Admin/Equipment/EquipmentController.php b/app/Controllers/Admin/Equipment/EquipmentController.php index d89bd67..ac46585 100644 --- a/app/Controllers/Admin/Equipment/EquipmentController.php +++ b/app/Controllers/Admin/Equipment/EquipmentController.php @@ -21,8 +21,6 @@ abstract class EquipmentController extends AdminController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= 'equipment/'; - // $this->view_path .= "equipment" . DIRECTORY_SEPARATOR; } final public function getClientService(): ClientService { @@ -57,17 +55,17 @@ abstract class EquipmentController extends AdminController protected function getFormFieldOption(string $field, array $options): array { switch ($field) { - case 'serviceinfo_uid': + case 'clientinfo_uid': $temps = []; - foreach ($this->getServiceService()->getEntities() as $entity) { + foreach ($this->getClientService()->getEntities() as $entity) { $temps[$entity->getPK()] = $entity->getTitle(); } $options[$field] = $temps; // dd($options); break; - case 'clientinfo_uid': + case 'serviceinfo_uid': $temps = []; - foreach ($this->getClientService()->getEntities() as $entity) { + foreach ($this->getServiceService()->getEntities() as $entity) { $temps[$entity->getPK()] = $entity->getTitle(); } $options[$field] = $temps; @@ -81,6 +79,14 @@ abstract class EquipmentController extends AdminController $options[$field] = $temps; // dd($options); break; + case 'serverinfo_uid': + $temps = []; + foreach ($this->getServerService()->getEntities() as $entity) { + $temps[$entity->getPK()] = $entity->getTitle(); + } + $options[$field] = $temps; + // dd($options); + break; default: $options = parent::getFormFieldOption($field, $options); break; diff --git a/app/Controllers/Admin/Equipment/IpController.php b/app/Controllers/Admin/Equipment/IpController.php index fab38e2..d04917e 100644 --- a/app/Controllers/Admin/Equipment/IpController.php +++ b/app/Controllers/Admin/Equipment/IpController.php @@ -14,10 +14,11 @@ class IpController extends EquipmentController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= strtolower($this->getService()->getClassName()) . '/'; - $this->class_path = $this->getService()->getClassPath(); - $this->title = lang("{$this->getService()->getClassPath()}.title"); - $this->helper = $this->getHelper(); + $this->title = lang("{$this->getService()->getClassName()}.title"); + $this->class_path .= $this->getService()->getClassName(); + $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; + // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; + } public function getService(): IpService { diff --git a/app/Controllers/Admin/Equipment/LineController.php b/app/Controllers/Admin/Equipment/LineController.php index e269d4f..7d091c5 100644 --- a/app/Controllers/Admin/Equipment/LineController.php +++ b/app/Controllers/Admin/Equipment/LineController.php @@ -18,10 +18,11 @@ class LineController extends EquipmentController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= strtolower($this->getService()->getClassName()) . '/'; - $this->class_path = $this->getService()->getClassPath(); - $this->title = lang("{$this->getService()->getClassPath()}.title"); - $this->helper = $this->getHelper(); + $this->title = lang("{$this->getService()->getClassName()}.title"); + $this->class_path .= $this->getService()->getClassName(); + $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; + // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; + } public function getService(): LineService { @@ -59,7 +60,7 @@ class LineController extends EquipmentController $temps = []; $temps['lineinfo_uid'] = $entity->getPK(); $temps['ip'] = $ip; - $temps['status'] = lang("{$this->getIpService()->getClassPath()}.DEFAULTS.status"); + $temps['status'] = DEFAULTS['STATUS']; $this->getIpService()->create($temps, new IpEntity()); } return $entity; @@ -80,7 +81,6 @@ class LineController extends EquipmentController 'fields' => ['clientinfo_uid', 'type', 'title', 'bandwith', 'status', "start_at", 'created_at'], ]; $this->init('index', $fields); - $this->modal_type = 'modal_iframe'; return parent::index_process(); } } diff --git a/app/Controllers/Admin/Equipment/Link/CpuController.php b/app/Controllers/Admin/Equipment/Link/CpuController.php index 0e7a4be..77160ab 100644 --- a/app/Controllers/Admin/Equipment/Link/CpuController.php +++ b/app/Controllers/Admin/Equipment/Link/CpuController.php @@ -16,10 +16,11 @@ class CpuController extends LinkController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= strtolower($this->getService()->getClassName()) . '/'; - $this->class_path = $this->getService()->getClassPath(); - $this->title = lang("{$this->getService()->getClassPath()}.title"); - $this->helper = $this->getHelper(); + $this->title = lang("{$this->getService()->getClassName()}.title"); + $this->class_path .= $this->getService()->getClassName(); + $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; + // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; + } public function getService(): CpuService { @@ -49,8 +50,8 @@ class CpuController extends LinkController $fields = [ 'fields' => ['serverinfo_uid', 'cpuinfo_uid'], ]; + // dd($fields); $this->init('index', $fields); - $this->modal_type = 'modal_iframe'; return parent::index_process(); } } diff --git a/app/Controllers/Admin/Equipment/Link/DiskController.php b/app/Controllers/Admin/Equipment/Link/DiskController.php index 5626bbd..edeb559 100644 --- a/app/Controllers/Admin/Equipment/Link/DiskController.php +++ b/app/Controllers/Admin/Equipment/Link/DiskController.php @@ -16,10 +16,11 @@ class DiskController extends LinkController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= strtolower($this->getService()->getClassName()) . '/'; - $this->class_path = $this->getService()->getClassPath(); - $this->title = lang("{$this->getService()->getClassPath()}.title"); - $this->helper = $this->getHelper(); + $this->title = lang("{$this->getService()->getClassName()}.title"); + $this->class_path .= $this->getService()->getClassName(); + $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; + // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; + } public function getService(): DiskService { @@ -49,7 +50,6 @@ class DiskController extends LinkController 'fields' => ['serverinfo_uid', 'diskinfo_uid'], ]; $this->init('index', $fields); - $this->modal_type = 'modal_iframe'; return parent::index_process(); } } diff --git a/app/Controllers/Admin/Equipment/Link/LinkController.php b/app/Controllers/Admin/Equipment/Link/LinkController.php index a21a28d..85578d9 100644 --- a/app/Controllers/Admin/Equipment/Link/LinkController.php +++ b/app/Controllers/Admin/Equipment/Link/LinkController.php @@ -14,8 +14,6 @@ abstract class LinkController extends EquipmentController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= 'part/'; - // $this->view_path .= "part" . DIRECTORY_SEPARATOR; } abstract public function getPartService(): mixed; @@ -44,14 +42,6 @@ abstract class LinkController extends EquipmentController protected function getFormFieldOption(string $field, array $options): array { switch ($field) { - case 'serverinfo_uid': - $temps = []; - foreach ($this->getServerService()->getEntities() as $entity) { - $temps[$entity->getPK()] = $entity->getTitle(); - } - $options[$field] = $temps; - // dd($options); - break; case 'cpuinfo_uid': case 'raminfo_uid': case 'diskinfo_uid': diff --git a/app/Controllers/Admin/Equipment/Link/RamController.php b/app/Controllers/Admin/Equipment/Link/RamController.php index 51c4bb8..69d891e 100644 --- a/app/Controllers/Admin/Equipment/Link/RamController.php +++ b/app/Controllers/Admin/Equipment/Link/RamController.php @@ -16,10 +16,11 @@ class RamController extends LinkController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= strtolower($this->getService()->getClassName()) . '/'; - $this->class_path = $this->getService()->getClassPath(); - $this->title = lang("{$this->getService()->getClassPath()}.title"); - $this->helper = $this->getHelper(); + $this->title = lang("{$this->getService()->getClassName()}.title"); + $this->class_path .= $this->getService()->getClassName(); + $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; + // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; + } public function getService(): RamService { @@ -49,7 +50,6 @@ class RamController extends LinkController 'fields' => ['serverinfo_uid', 'raminfo_uid'], ]; $this->init('index', $fields); - $this->modal_type = 'modal_iframe'; return parent::index_process(); } } diff --git a/app/Controllers/Admin/Equipment/Part/CpuController.php b/app/Controllers/Admin/Equipment/Part/CpuController.php index 83fe1b8..3de2c24 100644 --- a/app/Controllers/Admin/Equipment/Part/CpuController.php +++ b/app/Controllers/Admin/Equipment/Part/CpuController.php @@ -14,10 +14,11 @@ class CpuController extends PartController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= strtolower($this->getService()->getClassName()) . '/'; - $this->class_path = $this->getService()->getClassPath(); - $this->title = lang("{$this->getService()->getClassPath()}.title"); - $this->helper = $this->getHelper(); + $this->title = lang("{$this->getService()->getClassName()}.title"); + $this->class_path .= $this->getService()->getClassName(); + $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; + // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; + } public function getService(): CpuService { diff --git a/app/Controllers/Admin/Equipment/Part/DiskController.php b/app/Controllers/Admin/Equipment/Part/DiskController.php index 3b6fee9..585d6b1 100644 --- a/app/Controllers/Admin/Equipment/Part/DiskController.php +++ b/app/Controllers/Admin/Equipment/Part/DiskController.php @@ -14,10 +14,11 @@ class DiskController extends PartController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= strtolower($this->getService()->getClassName()) . '/'; - $this->class_path = $this->getService()->getClassPath(); - $this->title = lang("{$this->getService()->getClassPath()}.title"); - $this->helper = $this->getHelper(); + $this->title = lang("{$this->getService()->getClassName()}.title"); + $this->class_path .= $this->getService()->getClassName(); + $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; + // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; + } public function getService(): DiskService { diff --git a/app/Controllers/Admin/Equipment/Part/PartController.php b/app/Controllers/Admin/Equipment/Part/PartController.php index 75d91eb..a5bb5c8 100644 --- a/app/Controllers/Admin/Equipment/Part/PartController.php +++ b/app/Controllers/Admin/Equipment/Part/PartController.php @@ -13,8 +13,6 @@ abstract class PartController extends EquipmentController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= 'part/'; - // $this->view_path .= "part" . DIRECTORY_SEPARATOR; } protected function setOrderByForList() diff --git a/app/Controllers/Admin/Equipment/Part/RamController.php b/app/Controllers/Admin/Equipment/Part/RamController.php index fea9673..8b2c96e 100644 --- a/app/Controllers/Admin/Equipment/Part/RamController.php +++ b/app/Controllers/Admin/Equipment/Part/RamController.php @@ -14,10 +14,11 @@ class RamController extends PartController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= strtolower($this->getService()->getClassName()) . '/'; - $this->class_path = $this->getService()->getClassPath(); - $this->title = lang("{$this->getService()->getClassPath()}.title"); - $this->helper = $this->getHelper(); + $this->title = lang("{$this->getService()->getClassName()}.title"); + $this->class_path .= $this->getService()->getClassName(); + $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; + // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; + } public function getService(): RamService { diff --git a/app/Controllers/Admin/Equipment/ServerController.php b/app/Controllers/Admin/Equipment/ServerController.php index 2b8db7d..2e6027a 100644 --- a/app/Controllers/Admin/Equipment/ServerController.php +++ b/app/Controllers/Admin/Equipment/ServerController.php @@ -8,9 +8,9 @@ use Psr\Log\LoggerInterface; use App\Helpers\Equipment\ServerHelper; use App\Services\Equipment\ServerService; -use App\Services\Equipment\Part\CpuService; -use App\Services\Equipment\Part\RamService; -use App\Services\Equipment\Part\DiskService; +use App\Services\Equipment\Link\CpuService; +use App\Services\Equipment\Link\RamService; +use App\Services\Equipment\Link\DiskService; class ServerController extends EquipmentController { @@ -20,13 +20,11 @@ class ServerController extends EquipmentController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= strtolower($this->getService()->getClassName()) . '/'; + $this->title = lang("{$this->getService()->getClassName()}.title"); + $this->class_path .= $this->getService()->getClassName(); + $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; - $this->class_path = $this->getService()->getClassPath(); - $this->title = lang("{$this->getService()->getClassPath()}.title"); - $this->helper = $this->getHelper(); - // $this->individualStylesheets = ['server_partinfo.css']; - // $this->individualScripts = ['server_partinfo.js']; + } public function getService(): ServerService { @@ -70,7 +68,7 @@ class ServerController extends EquipmentController 'fields' => ['code', 'type', 'model', 'CPU', 'RAM', 'DISK', 'status'], ]; $this->init('index', $fields); - $this->modal_type = 'modal_iframe'; + // $this->modal_type = 'modal_fetch_v2'; //기본은 modal_iframe임 $entities = []; foreach (parent::index_process() as $entity) { $entity->setPartEntities("CPU", $this->getCpuService()->getPartEntities($entity)); diff --git a/app/Controllers/Admin/Equipment/SoftwareController.php b/app/Controllers/Admin/Equipment/SoftwareController.php index 20b5a06..791eed7 100644 --- a/app/Controllers/Admin/Equipment/SoftwareController.php +++ b/app/Controllers/Admin/Equipment/SoftwareController.php @@ -15,10 +15,11 @@ class SoftwareController extends EquipmentController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= strtolower($this->getService()->getClassName()) . '/'; - $this->class_path = $this->getService()->getClassPath(); - $this->title = lang("{$this->getService()->getClassPath()}.title"); - $this->helper = $this->getHelper(); + $this->title = lang("{$this->getService()->getClassName()}.title"); + $this->class_path .= $this->getService()->getClassName(); + $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; + // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; + } public function getService(): SoftwareService { @@ -41,7 +42,6 @@ class SoftwareController extends EquipmentController 'fields' => ['type', 'model', 'status', 'description'], ]; $this->init('index', $fields); - $this->modal_type = 'modal_iframe'; return parent::index_process(); } } diff --git a/app/Controllers/Admin/Home.php b/app/Controllers/Admin/Home.php index 6f2cf77..8e0a1a3 100644 --- a/app/Controllers/Admin/Home.php +++ b/app/Controllers/Admin/Home.php @@ -14,8 +14,6 @@ class Home extends AdminController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->title = "관리자페이지 메인"; - $this->helper = $this->getHelper(); } final public function getService(): Service diff --git a/app/Controllers/Admin/MyLogController.php b/app/Controllers/Admin/MyLogController.php index 30a02b6..2f60d3e 100644 --- a/app/Controllers/Admin/MyLogController.php +++ b/app/Controllers/Admin/MyLogController.php @@ -18,10 +18,11 @@ class MyLogController extends AdminController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= strtolower($this->getService()->getClassName()) . '/'; - $this->class_path = $this->getService()->getClassPath(); - $this->title = lang("{$this->getService()->getClassPath()}.title"); - $this->helper = $this->getHelper(); + $this->title = lang("{$this->getService()->getClassName()}.title"); + $this->class_path .= $this->getService()->getClassName(); + $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; + // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; + } final public function getService(): Service { diff --git a/app/Controllers/Admin/UserController.php b/app/Controllers/Admin/UserController.php index 38a06f3..75981e9 100644 --- a/app/Controllers/Admin/UserController.php +++ b/app/Controllers/Admin/UserController.php @@ -19,10 +19,11 @@ class UserController extends AdminController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= strtolower($this->getService()->getClassName()) . '/'; - $this->class_path = $this->getService()->getClassPath(); - $this->title = lang("{$this->getService()->getClassPath()}.title"); - $this->helper = $this->getHelper(); + $this->title = lang("{$this->getService()->getClassName()}.title"); + $this->class_path .= $this->getService()->getClassName(); + $this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/'; + // $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR; + } final public function getService(): UserService { diff --git a/app/Controllers/Auth/AuthController.php b/app/Controllers/Auth/AuthController.php index 9da1aaf..320563e 100644 --- a/app/Controllers/Auth/AuthController.php +++ b/app/Controllers/Auth/AuthController.php @@ -21,7 +21,9 @@ abstract class AuthController extends CommonController $this->layout = "auth"; $this->uri_path = "auth/"; $this->view_path = "auth" . DIRECTORY_SEPARATOR; - $this->helper = $this->getHelper(); + $this->title = "사용자인증"; + $this->individualStylesheets = []; + $this->individualScripts = []; } abstract protected function getSNSButton(): string; abstract protected function login_process(): UserEntity; diff --git a/app/Controllers/Auth/GoogleController.php b/app/Controllers/Auth/GoogleController.php index 014da47..326e4cc 100644 --- a/app/Controllers/Auth/GoogleController.php +++ b/app/Controllers/Auth/GoogleController.php @@ -18,9 +18,6 @@ class GoogleController extends AuthController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= strtolower($this->getService()->getClassName()) . '/'; - $this->class_path = $this->getService()->getClassPath(); - $this->title = lang("{$this->getService()->getClassPath()}.title");; } final public function getSocket() { diff --git a/app/Controllers/Auth/LocalController.php b/app/Controllers/Auth/LocalController.php index af1ce08..2b74062 100644 --- a/app/Controllers/Auth/LocalController.php +++ b/app/Controllers/Auth/LocalController.php @@ -15,9 +15,6 @@ class LocalController extends AuthController public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); - $this->uri_path .= strtolower($this->getService()->getClassName()) . '/'; - $this->class_path = $this->getService()->getClassPath(); - $this->title = lang("{$this->getService()->getClassPath()}.title");; } final public function getService(): LocalService { diff --git a/app/Controllers/CommonController.php b/app/Controllers/CommonController.php index e80ec05..4105e94 100644 --- a/app/Controllers/CommonController.php +++ b/app/Controllers/CommonController.php @@ -34,8 +34,6 @@ abstract class CommonController extends BaseController $this->myAuthName = $this->getMyAuth()->getNameByAuthInfo(); $this->myAuthUID = $this->getMyAuth()->getUIDByAuthInfo(); } - $this->individualStylesheets = []; - $this->individualScripts = []; } final public function __get($name) { @@ -111,7 +109,7 @@ abstract class CommonController extends BaseController { switch ($field) { default: - $options[$field] = lang($this->getService()->getClassPath() . '.' . strtoupper($field)); + $options[$field] = lang($this->getService()->getClassName() . '.' . strtoupper($field)); break; } if (!is_array($options)) { @@ -130,7 +128,6 @@ abstract class CommonController extends BaseController } $options = $this->getFormFieldOption($field, $options); } - // dd($options); return $options; } protected function setValidation(Validation $validation, string $action, string $field, ?string $rule = null): Validation diff --git a/app/Database/erp2.vuerd.json b/app/Database/erp2.vuerd.json index c89d9ef..9a53f47 100644 --- a/app/Database/erp2.vuerd.json +++ b/app/Database/erp2.vuerd.json @@ -4,8 +4,8 @@ "settings": { "width": 4000, "height": 4000, - "scrollTop": -705.0313, - "scrollLeft": -1854.3014, + "scrollTop": -1726.0313, + "scrollLeft": -1275.3014, "zoomLevel": 0.82, "show": 511, "database": 4, @@ -612,42 +612,6 @@ "createAt": 1745819764139 } }, - "F82-EcEv3fB4uzGzPrPla": { - "id": "F82-EcEv3fB4uzGzPrPla", - "name": "serviceinfos_lineinfos", - "comment": "서비스-회선 연결", - "columnIds": [ - "PQWVHSFO2ixiAvG2FPtNK", - "fDS7QeP4XnANQE_qEtGsY", - "dDoAacc03mr5Qr0bIwlN6", - "LyX52QG0qvEVedLUxYJDd", - "bfvSqmZKRGwglKHwbLVTz", - "iYSERwWFGJgDi9-uEJfTS" - ], - "seqColumnIds": [ - "PQWVHSFO2ixiAvG2FPtNK", - "fDS7QeP4XnANQE_qEtGsY", - "dDoAacc03mr5Qr0bIwlN6", - "LyX52QG0qvEVedLUxYJDd", - "bfvSqmZKRGwglKHwbLVTz", - "SAJjTd76vMt9-sjpnk11V", - "8FuC8kf_1mqFDJ26TKj3u", - "iYSERwWFGJgDi9-uEJfTS", - "nAYYL4VvZwFBqqY9J5A1P" - ], - "ui": { - "x": 1169.5592, - "y": 1703.1059, - "zIndex": 2, - "widthName": 113, - "widthComment": 94, - "color": "" - }, - "meta": { - "updateAt": 1747625662621, - "createAt": 1745819764139 - } - }, "jO40Ej5EXImXnadoJo9bn": { "id": "jO40Ej5EXImXnadoJo9bn", "name": "couponinfo", @@ -855,50 +819,6 @@ "createAt": 1746783705263 } }, - "M9XC2MNIJqyKe77s6znI7": { - "id": "M9XC2MNIJqyKe77s6znI7", - "name": "billinginfo_detail", - "comment": "청구서 상세정보", - "columnIds": [ - "zlUiG0OmBC3q6Z3V1dOKc", - "XqPP8eaTMK9vWD9QQJkYy", - "g41qCdbclynuoNo7zTUoC", - "4sOzBtwc60uLCkHDsc97O", - "1rO0HpkAfirZmhaN1AfEp", - "gj0lezIVbnpLT2mHo07Lt", - "ML125axlUAsBywUvRiZTr" - ], - "seqColumnIds": [ - "zlUiG0OmBC3q6Z3V1dOKc", - "V6GO9aJVqbCkSNyuuUQZR", - "XqPP8eaTMK9vWD9QQJkYy", - "8lqEpuD0pgHuFAKgAcb_C", - "fjz1tZJeFpPjWlvpNogge", - "Xx_20LUdW7jZxJRZ6rdil", - "ZeTOeaI1N5mWuBiB0tO1F", - "GfFdPBERgldIUWf5bA_nZ", - "cuyA-A5FkTXz_x0BD1Uld", - "g41qCdbclynuoNo7zTUoC", - "4sOzBtwc60uLCkHDsc97O", - "1rO0HpkAfirZmhaN1AfEp", - "gj0lezIVbnpLT2mHo07Lt", - "M6x8wlvrCkm0FWL8umYC3", - "ML125axlUAsBywUvRiZTr", - "761T13bs94ZLVeC2iJm13" - ], - "ui": { - "x": 2324.3826, - "y": 971.8752, - "zIndex": 697, - "widthName": 89, - "widthComment": 89, - "color": "" - }, - "meta": { - "updateAt": 1747627186617, - "createAt": 1747281566137 - } - }, "RTq5rHQupiXXJPXqpN8K5": { "id": "RTq5rHQupiXXJPXqpN8K5", "name": "defenceinfo", @@ -3204,126 +3124,6 @@ "createAt": 1745819764139 } }, - "PQWVHSFO2ixiAvG2FPtNK": { - "id": "PQWVHSFO2ixiAvG2FPtNK", - "tableId": "F82-EcEv3fB4uzGzPrPla", - "name": "uid", - "comment": "", - "dataType": "INT", - "default": "", - "options": 11, - "ui": { - "keys": 1, - "widthName": 60, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1746576266319, - "createAt": 1745819764139 - } - }, - "fDS7QeP4XnANQE_qEtGsY": { - "id": "fDS7QeP4XnANQE_qEtGsY", - "tableId": "F82-EcEv3fB4uzGzPrPla", - "name": "serviceinfo_uid", - "comment": "", - "dataType": "INT", - "default": "", - "options": 8, - "ui": { - "keys": 0, - "widthName": 80, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1745819764139, - "createAt": 1745819764139 - } - }, - "dDoAacc03mr5Qr0bIwlN6": { - "id": "dDoAacc03mr5Qr0bIwlN6", - "tableId": "F82-EcEv3fB4uzGzPrPla", - "name": "lineinfo_uid", - "comment": "", - "dataType": "INT", - "default": "", - "options": 8, - "ui": { - "keys": 0, - "widthName": 63, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1745819764139, - "createAt": 1745819764139 - } - }, - "nAYYL4VvZwFBqqY9J5A1P": { - "id": "nAYYL4VvZwFBqqY9J5A1P", - "tableId": "F82-EcEv3fB4uzGzPrPla", - "name": "billing_type", - "comment": "", - "dataType": "VARCHAR(20)", - "default": "'month'", - "options": 0, - "ui": { - "keys": 0, - "widthName": 63, - "widthComment": 60, - "widthDataType": 75, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1747278256064, - "createAt": 1745819764139 - } - }, - "bfvSqmZKRGwglKHwbLVTz": { - "id": "bfvSqmZKRGwglKHwbLVTz", - "tableId": "F82-EcEv3fB4uzGzPrPla", - "name": "amount", - "comment": "", - "dataType": "INT", - "default": "0", - "options": 8, - "ui": { - "keys": 0, - "widthName": 60, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1747281837283, - "createAt": 1745819764139 - } - }, - "iYSERwWFGJgDi9-uEJfTS": { - "id": "iYSERwWFGJgDi9-uEJfTS", - "tableId": "F82-EcEv3fB4uzGzPrPla", - "name": "created_at", - "comment": "", - "dataType": "TIMESTAMP", - "default": "CURRENT_TIMESTAMP", - "options": 8, - "ui": { - "keys": 0, - "widthName": 60, - "widthComment": 60, - "widthDataType": 65, - "widthDefault": 122 - }, - "meta": { - "updateAt": 1745819764139, - "createAt": 1745819764139 - } - }, "9gNKhuq9UnDKyb9KuZ7cY": { "id": "9gNKhuq9UnDKyb9KuZ7cY", "tableId": "jO40Ej5EXImXnadoJo9bn", @@ -5104,46 +4904,6 @@ "createAt": 1747198681287 } }, - "SAJjTd76vMt9-sjpnk11V": { - "id": "SAJjTd76vMt9-sjpnk11V", - "tableId": "F82-EcEv3fB4uzGzPrPla", - "name": "start_at", - "comment": "", - "dataType": "DATE", - "default": "", - "options": 0, - "ui": { - "keys": 0, - "widthName": 60, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1747276995320, - "createAt": 1747276980620 - } - }, - "8FuC8kf_1mqFDJ26TKj3u": { - "id": "8FuC8kf_1mqFDJ26TKj3u", - "tableId": "F82-EcEv3fB4uzGzPrPla", - "name": "end_at", - "comment": "", - "dataType": "DATE", - "default": "", - "options": 0, - "ui": { - "keys": 0, - "widthName": 60, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1747277047507, - "createAt": 1747276980620 - } - }, "uUAmxeQ2jccu4JFTvVBGY": { "id": "uUAmxeQ2jccu4JFTvVBGY", "tableId": "3tdV9J9ns8BWCGQeCXITI", @@ -5364,26 +5124,6 @@ "createAt": 1747278265899 } }, - "LyX52QG0qvEVedLUxYJDd": { - "id": "LyX52QG0qvEVedLUxYJDd", - "tableId": "F82-EcEv3fB4uzGzPrPla", - "name": "billing_type", - "comment": "", - "dataType": "VARCHAR(20)", - "default": "'month'", - "options": 8, - "ui": { - "keys": 0, - "widthName": 63, - "widthComment": 60, - "widthDataType": 75, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1747281881579, - "createAt": 1747278266228 - } - }, "3xj1HNeP9Ve34yUpq2lCB": { "id": "3xj1HNeP9Ve34yUpq2lCB", "tableId": "3tdV9J9ns8BWCGQeCXITI", @@ -5484,286 +5224,6 @@ "createAt": 1747279185055 } }, - "zlUiG0OmBC3q6Z3V1dOKc": { - "id": "zlUiG0OmBC3q6Z3V1dOKc", - "tableId": "M9XC2MNIJqyKe77s6znI7", - "name": "uid", - "comment": "", - "dataType": "INT", - "default": "", - "options": 11, - "ui": { - "keys": 1, - "widthName": 60, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1747281698883, - "createAt": 1747281695983 - } - }, - "V6GO9aJVqbCkSNyuuUQZR": { - "id": "V6GO9aJVqbCkSNyuuUQZR", - "tableId": "M9XC2MNIJqyKe77s6znI7", - "name": "clientinfo_uid", - "comment": "", - "dataType": "INT", - "default": "", - "options": 8, - "ui": { - "keys": 0, - "widthName": 73, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1747281695983, - "createAt": 1747281695983 - } - }, - "8lqEpuD0pgHuFAKgAcb_C": { - "id": "8lqEpuD0pgHuFAKgAcb_C", - "tableId": "M9XC2MNIJqyKe77s6znI7", - "name": "invoiced_at", - "comment": "", - "dataType": "DATE", - "default": "", - "options": 8, - "ui": { - "keys": 0, - "widthName": 61, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1747281695983, - "createAt": 1747281695983 - } - }, - "fjz1tZJeFpPjWlvpNogge": { - "id": "fjz1tZJeFpPjWlvpNogge", - "tableId": "M9XC2MNIJqyKe77s6znI7", - "name": "total_amount", - "comment": "", - "dataType": "INT", - "default": "0", - "options": 0, - "ui": { - "keys": 0, - "widthName": 72, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1747281695983, - "createAt": 1747281695983 - } - }, - "Xx_20LUdW7jZxJRZ6rdil": { - "id": "Xx_20LUdW7jZxJRZ6rdil", - "tableId": "M9XC2MNIJqyKe77s6znI7", - "name": "status", - "comment": "", - "dataType": "VARCHAR(20)", - "default": "'unpaid'", - "options": 0, - "ui": { - "keys": 0, - "widthName": 60, - "widthComment": 60, - "widthDataType": 75, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1747281695983, - "createAt": 1747281695983 - } - }, - "M6x8wlvrCkm0FWL8umYC3": { - "id": "M6x8wlvrCkm0FWL8umYC3", - "tableId": "M9XC2MNIJqyKe77s6znI7", - "name": "updated_at", - "comment": "", - "dataType": "TIMESTAMP", - "default": "", - "options": 0, - "ui": { - "keys": 0, - "widthName": 62, - "widthComment": 60, - "widthDataType": 65, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1747281695983, - "createAt": 1747281695983 - } - }, - "ML125axlUAsBywUvRiZTr": { - "id": "ML125axlUAsBywUvRiZTr", - "tableId": "M9XC2MNIJqyKe77s6znI7", - "name": "created_at", - "comment": "", - "dataType": "TIMESTAMP", - "default": "CURRENT_TIMESTAMP", - "options": 8, - "ui": { - "keys": 0, - "widthName": 60, - "widthComment": 60, - "widthDataType": 65, - "widthDefault": 122 - }, - "meta": { - "updateAt": 1747281695983, - "createAt": 1747281695983 - } - }, - "XqPP8eaTMK9vWD9QQJkYy": { - "id": "XqPP8eaTMK9vWD9QQJkYy", - "tableId": "M9XC2MNIJqyKe77s6znI7", - "name": "billinginfo_uid", - "comment": "", - "dataType": "INT", - "default": "", - "options": 8, - "ui": { - "keys": 0, - "widthName": 77, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1747627122211, - "createAt": 1747281724119 - } - }, - "761T13bs94ZLVeC2iJm13": { - "id": "761T13bs94ZLVeC2iJm13", - "tableId": "M9XC2MNIJqyKe77s6znI7", - "name": "invoiced_at", - "comment": "", - "dataType": "DATE", - "default": "", - "options": 8, - "ui": { - "keys": 0, - "widthName": 61, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1747281800343, - "createAt": 1747281800343 - } - }, - "gj0lezIVbnpLT2mHo07Lt": { - "id": "gj0lezIVbnpLT2mHo07Lt", - "tableId": "M9XC2MNIJqyKe77s6znI7", - "name": "amount", - "comment": "", - "dataType": "INT", - "default": "0", - "options": 8, - "ui": { - "keys": 0, - "widthName": 60, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1747281823097, - "createAt": 1747281807242 - } - }, - "ZeTOeaI1N5mWuBiB0tO1F": { - "id": "ZeTOeaI1N5mWuBiB0tO1F", - "tableId": "M9XC2MNIJqyKe77s6znI7", - "name": "serviceinfo_uid", - "comment": "", - "dataType": "INT", - "default": "", - "options": 8, - "ui": { - "keys": 0, - "widthName": 80, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1747282270188, - "createAt": 1747282258543 - } - }, - "1rO0HpkAfirZmhaN1AfEp": { - "id": "1rO0HpkAfirZmhaN1AfEp", - "tableId": "M9XC2MNIJqyKe77s6znI7", - "name": "billing_type", - "comment": "", - "dataType": "VARCHAR(20)", - "default": "'month'", - "options": 8, - "ui": { - "keys": 0, - "widthName": 63, - "widthComment": 60, - "widthDataType": 75, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1747282482361, - "createAt": 1747282482361 - } - }, - "cuyA-A5FkTXz_x0BD1Uld": { - "id": "cuyA-A5FkTXz_x0BD1Uld", - "tableId": "M9XC2MNIJqyKe77s6znI7", - "name": "partinfo_uid", - "comment": "일회성용", - "dataType": "INT", - "default": "", - "options": 8, - "ui": { - "keys": 0, - "widthName": 66, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1747282634151, - "createAt": 1747282593370 - } - }, - "GfFdPBERgldIUWf5bA_nZ": { - "id": "GfFdPBERgldIUWf5bA_nZ", - "tableId": "M9XC2MNIJqyKe77s6znI7", - "name": "partinfo_uid", - "comment": "일회성용", - "dataType": "INT", - "default": "", - "options": 8, - "ui": { - "keys": 0, - "widthName": 66, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1747282762136, - "createAt": 1747282736023 - } - }, "pY1RZgzuWBgRILX2XsMTt": { "id": "pY1RZgzuWBgRILX2XsMTt", "tableId": "B4qGh3KZsXHQ3_4EOgwJZ", @@ -6444,46 +5904,6 @@ "createAt": 1747626605945 } }, - "g41qCdbclynuoNo7zTUoC": { - "id": "g41qCdbclynuoNo7zTUoC", - "tableId": "M9XC2MNIJqyKe77s6znI7", - "name": "serviceinofs_lineinfos_uid", - "comment": "", - "dataType": "INT", - "default": "", - "options": 8, - "ui": { - "keys": 0, - "widthName": 135, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1747627136540, - "createAt": 1747627057149 - } - }, - "4sOzBtwc60uLCkHDsc97O": { - "id": "4sOzBtwc60uLCkHDsc97O", - "tableId": "M9XC2MNIJqyKe77s6znI7", - "name": "serviceinfos_ipinfos_uid", - "comment": "", - "dataType": "INT", - "default": "", - "options": 8, - "ui": { - "keys": 0, - "widthName": 126, - "widthComment": 60, - "widthDataType": 60, - "widthDefault": 60 - }, - "meta": { - "updateAt": 1747627183882, - "createAt": 1747627168942 - } - }, "3RTWS2E2a-gW6e6wW3sgo": { "id": "3RTWS2E2a-gW6e6wW3sgo", "tableId": "Btzrm5KCDr_59gZoXRXol", @@ -8584,90 +8004,6 @@ "createAt": 1747375452269 } }, - "1aURvXuUxIJSq835rWUHk": { - "id": "1aURvXuUxIJSq835rWUHk", - "identification": false, - "relationshipType": 16, - "startRelationshipType": 2, - "start": { - "tableId": "B4qGh3KZsXHQ3_4EOgwJZ", - "columnIds": [ - "F9EPb6nsDx6Tf3GG8rvP1" - ], - "x": 424.9137, - "y": 1388.9145, - "direction": 8 - }, - "end": { - "tableId": "kc1EFvFhlBSc0B0bDgX28", - "columnIds": [ - "CY-ZAs3Ns1YhoxL9UiCee" - ], - "x": 436.63779999999997, - "y": 1657.3461, - "direction": 4 - }, - "meta": { - "updateAt": 1747621930445, - "createAt": 1747621930445 - } - }, - "6OXR3AW1sSxDJA2ITIz9i": { - "id": "6OXR3AW1sSxDJA2ITIz9i", - "identification": false, - "relationshipType": 16, - "startRelationshipType": 2, - "start": { - "tableId": "kc1EFvFhlBSc0B0bDgX28", - "columnIds": [ - "nb5CGzskl3_LIRA0yyede" - ], - "x": 686.1378, - "y": 1763.0603857142855, - "direction": 2 - }, - "end": { - "tableId": "3RJ8qxNNqL7eCvBmmqzpd", - "columnIds": [ - "i_tL8EWzsKz8Q6TjEkdFG" - ], - "x": 1166.2223, - "y": 1798.7022, - "direction": 1 - }, - "meta": { - "updateAt": 1747625914065, - "createAt": 1747625914065 - } - }, - "QJHejLurUndA2vJMYRawK": { - "id": "QJHejLurUndA2vJMYRawK", - "identification": false, - "relationshipType": 16, - "startRelationshipType": 2, - "start": { - "tableId": "doERb3lIVeBW_D0NtNYX8", - "columnIds": [ - "7B0zaLoZnOoMNW8OHZlrQ" - ], - "x": 2349.9171, - "y": 1617.5552, - "direction": 1 - }, - "end": { - "tableId": "3RJ8qxNNqL7eCvBmmqzpd", - "columnIds": [ - "0rvNoG9MrbN-6-6iDdw3K" - ], - "x": 1681.2223, - "y": 1798.7022, - "direction": 2 - }, - "meta": { - "updateAt": 1747625932404, - "createAt": 1747625932404 - } - }, "avEpCJt-x4kXYN5bcKxiG": { "id": "avEpCJt-x4kXYN5bcKxiG", "identification": false, @@ -8696,62 +8032,6 @@ "createAt": 1747626605945 } }, - "MxsfrRz6sLqMRG7oWr1iC": { - "id": "MxsfrRz6sLqMRG7oWr1iC", - "identification": false, - "relationshipType": 16, - "startRelationshipType": 2, - "start": { - "tableId": "3RJ8qxNNqL7eCvBmmqzpd", - "columnIds": [ - "_oIE_aDPjyuwPZo2h8QUJ" - ], - "x": 1678.4824, - "y": 1662.4008, - "direction": 2 - }, - "end": { - "tableId": "M9XC2MNIJqyKe77s6znI7", - "columnIds": [ - "g41qCdbclynuoNo7zTUoC" - ], - "x": 2324.3826, - "y": 1083.8752, - "direction": 1 - }, - "meta": { - "updateAt": 1747627057149, - "createAt": 1747627057149 - } - }, - "JJfgXbuwe3g8PggszRv6T": { - "id": "JJfgXbuwe3g8PggszRv6T", - "identification": false, - "relationshipType": 16, - "startRelationshipType": 2, - "start": { - "tableId": "3tdV9J9ns8BWCGQeCXITI", - "columnIds": [ - "N9whwkJk3imEwSl_tqk7W" - ], - "x": 1684.2751, - "y": 1974.3199, - "direction": 2 - }, - "end": { - "tableId": "M9XC2MNIJqyKe77s6znI7", - "columnIds": [ - "4sOzBtwc60uLCkHDsc97O" - ], - "x": 2324.3826, - "y": 1158.5418666666667, - "direction": 1 - }, - "meta": { - "updateAt": 1747627168942, - "createAt": 1747627168942 - } - }, "xnvl_tBcFrTl87jBGDW08": { "id": "xnvl_tBcFrTl87jBGDW08", "identification": false, diff --git a/app/Entities/Equipment/Link/CpuEntity.php b/app/Entities/Equipment/Link/CpuEntity.php index 6a99b22..38cbe70 100644 --- a/app/Entities/Equipment/Link/CpuEntity.php +++ b/app/Entities/Equipment/Link/CpuEntity.php @@ -8,7 +8,7 @@ class CpuEntity extends LinkEntity { const PK = CpuModel::PK; const TITLE = CpuModel::TITLE; - public function getLinkInfoUID(): string + public function getPartInfoUID(): string { return $this->attributes['cpuinfo_uid']; } diff --git a/app/Entities/Equipment/Link/DiskEntity.php b/app/Entities/Equipment/Link/DiskEntity.php index 59742cb..80718e5 100644 --- a/app/Entities/Equipment/Link/DiskEntity.php +++ b/app/Entities/Equipment/Link/DiskEntity.php @@ -8,7 +8,7 @@ class DiskEntity extends LinkEntity { const PK = DiskModel::PK; const TITLE = DiskModel::TITLE; - public function getLinkInfoUID(): string + public function getPartInfoUID(): string { return $this->attributes['diskinfo_uid']; } diff --git a/app/Entities/Equipment/Link/LinkEntity.php b/app/Entities/Equipment/Link/LinkEntity.php index 8188805..47fac92 100644 --- a/app/Entities/Equipment/Link/LinkEntity.php +++ b/app/Entities/Equipment/Link/LinkEntity.php @@ -11,7 +11,7 @@ abstract class LinkEntity extends EquipmentEntity { parent::__construct($data); } - abstract public function getLinkInfoUID(): string; + abstract public function getPartInfoUID(): string; final public function getServiceInfoUID(): string { return $this->attributes['serverinfo_uid']; diff --git a/app/Entities/Equipment/Link/RamEntity.php b/app/Entities/Equipment/Link/RamEntity.php index 0b8153e..6effd3c 100644 --- a/app/Entities/Equipment/Link/RamEntity.php +++ b/app/Entities/Equipment/Link/RamEntity.php @@ -8,7 +8,7 @@ class RamEntity extends LinkEntity { const PK = RamModel::PK; const TITLE = RamModel::TITLE; - public function getLinkInfoUID(): string + public function getPartInfoUID(): string { return $this->attributes['raminfo_uid']; } diff --git a/app/Helpers/CommonHelper.php b/app/Helpers/CommonHelper.php index f9c6fb2..2dcf1ac 100644 --- a/app/Helpers/CommonHelper.php +++ b/app/Helpers/CommonHelper.php @@ -232,24 +232,15 @@ class CommonHelper } $form = implode(" ", $forms); } else { + $extra_class = isset($extras['class']) ? $extras['class'] . ' select-field' : 'select-field'; + // $extra_class = isset($extras['class']) ? $extras['class'] : ""; $formOptions = ["" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택']; foreach ($viewDatas['field_options'][$field] as $key => $label) { $formOptions[$key] = $label; } - $form = form_dropdown($field, $formOptions, $value, $extras); + $form = form_dropdown($field, $formOptions, $value, ['class' => $extra_class, ...array_diff_key($extras, ['class' => ''])]); } break; - case 'clientinfo_uid': - if (!is_array($viewDatas['field_options'][$field])) { - throw new \Exception(__METHOD__ . "에서 {$field}의 field_options가 array형태가 아닙니다."); - } - $extra_class = isset($extras['class']) ? $extras['class'] . ' select-field' : 'select-field'; - $formOptions = ["" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택']; - foreach ($viewDatas['field_options'][$field] as $key => $label) { - $formOptions[$key] = $label; - } - $form = form_dropdown($field, $formOptions, $value, ['class' => $extra_class, ...array_diff_key($extras, ['class' => ''])]); - break; case 'manufactur_at': case 'billing_at': case 'start_at': @@ -260,6 +251,7 @@ class CommonHelper $form = form_input($field, $value ?? "", ['class' => $extra_class, ...array_diff_key($extras, ['class' => ''])]); break; case 'description': + case 'content': $extra_class = isset($extras['class']) ? $extras['class'] . ' tinymce' : 'tinymce'; $form = form_textarea($field, $value ?? "", ['id' => $field, 'class' => $extra_class, ...array_diff_key($extras, ['class' => ''])]); break; @@ -268,8 +260,8 @@ class CommonHelper if (!is_array($viewDatas['field_options'][$field])) { throw new \Exception(__METHOD__ . "에서 {$field}의 field_options가 array형태가 아닙니다."); } - // $extra_class = isset($extras['class']) ? $extras['class'] . ' select-field' : 'select-field'; - $extra_class = isset($extras['class']) ? $extras['class'] : ""; + $extra_class = isset($extras['class']) ? $extras['class'] . ' select-field' : 'select-field'; + // $extra_class = isset($extras['class']) ? $extras['class'] : ""; $formOptions = ["" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택']; foreach ($viewDatas['field_options'][$field] as $key => $label) { $formOptions[$key] = $label; @@ -300,13 +292,6 @@ class CommonHelper ] ); break; - case 'user_uid': - $user_uids = []; - foreach (explode(DEFAULTS["DELIMITER_ROLE"], $value) as $key) { - $user_uids[] = $viewDatas['field_options'][$field][$key]; - } - $value = implode(" , ", array: $user_uids); - break; case 'role': $roles = []; foreach (explode(DEFAULTS["DELIMITER_ROLE"], $value) as $key) { diff --git a/app/Helpers/Equipment/ServerHelper.php b/app/Helpers/Equipment/ServerHelper.php index 4ba0c1a..d95169d 100644 --- a/app/Helpers/Equipment/ServerHelper.php +++ b/app/Helpers/Equipment/ServerHelper.php @@ -13,7 +13,29 @@ class ServerHelper extends EquipmentHelper parent::__construct($request); $this->setTitleField(field: ServerModel::TITLE); } - + // public function getFieldForm(string $field, mixed $value, array $viewDatas, array $extras = []): string + // { + // if (in_array($viewDatas['action'], ['create', 'modify'])) { + // $extras = (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? ["class" => "form-control", "required" => "", ...$extras] : ["class" => "form-control", ...$extras]; + // } + // switch ($field) { + // case 'model': + // if (!is_array($viewDatas['field_options'][$field])) { + // throw new \Exception(__METHOD__ . "에서 {$field}의 field_options가 array형태가 아닙니다."); + // } + // $extra_class = isset($extras['class']) ? $extras['class'] . ' select-field' : 'select-field'; + // $formOptions = ["" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택']; + // foreach ($viewDatas['field_options'][$field] as $key => $label) { + // $formOptions[$key] = $label; + // } + // $form = form_dropdown($field, $formOptions, $value, ['class' => $extra_class, ...array_diff_key($extras, ['class' => ''])]); + // break; + // default: + // $form = parent::getFieldForm($field, $value, $viewDatas, $extras); + // break; + // } + // return $form; + // } public function getFieldView(string $field, array $viewDatas, array $extras = []): string { $value = $viewDatas['entity']->$field ?? ""; diff --git a/app/Services/Auth/AuthService.php b/app/Services/Auth/AuthService.php index a997075..c34b329 100644 --- a/app/Services/Auth/AuthService.php +++ b/app/Services/Auth/AuthService.php @@ -14,11 +14,7 @@ abstract class AuthService extends CommonService protected function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - - public function getClassName(): string - { - return "Auth" . DIRECTORY_SEPARATOR; + $this->addClassName('Auth'); } //Index,FieldForm관련 diff --git a/app/Services/Auth/GoogleService.php b/app/Services/Auth/GoogleService.php index 6d9f7c8..36e5c01 100644 --- a/app/Services/Auth/GoogleService.php +++ b/app/Services/Auth/GoogleService.php @@ -15,6 +15,7 @@ class GoogleService extends AuthService { $this->_mySocket = $mySocket; parent::__construct($request); + $this->addClassName('Google'); } public function getMySocket(): mixed { @@ -23,10 +24,6 @@ class GoogleService extends AuthService } return $this->_mySOcket; } - public function getClassName(): string - { - return parent::getClassName() . DIRECTORY_SEPARATOR . "Google"; - } final public function getModelClass(): UserModel { return new UserModel(); diff --git a/app/Services/Auth/LocalService.php b/app/Services/Auth/LocalService.php index 15a9925..50200b8 100644 --- a/app/Services/Auth/LocalService.php +++ b/app/Services/Auth/LocalService.php @@ -11,10 +11,7 @@ class LocalService extends AuthService public function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - final public function getClassName(): string - { - return parent::getClassName() . DIRECTORY_SEPARATOR . "Local"; + $this->addClassName('Local'); } final public function getModelClass(): UserModel { diff --git a/app/Services/CommonService.php b/app/Services/CommonService.php index d0564eb..bdff9ff 100644 --- a/app/Services/CommonService.php +++ b/app/Services/CommonService.php @@ -9,15 +9,14 @@ abstract class CommonService { private $_serviceDatas = []; private $_model = null; + private $_classNames = []; protected ?IncomingRequest $request = null; protected function __construct(?IncomingRequest $_request = null) { $this->request = $_request; } - abstract public function getModelClass(): mixed; abstract public function getEntityClass(): mixed; - abstract public function getClassName(): string; abstract public function getFields(): array; abstract public function getFilterFields(): array; abstract public function getBatchJobFields(): array; @@ -32,14 +31,18 @@ abstract class CommonService { $this->_serviceDatas[$name] = $value; } - final public function getClassPath(): string - { - return $this->getClassName(); - } final public function getRequest(): IncomingRequest|null { return $this->request; } + final public function addClassName(string $className): void + { + $this->_classNames[] = $className; + } + final public function getClassName($delimeter = DIRECTORY_SEPARATOR): string + { + return implode($delimeter, $this->_classNames); + } final public function getModel(): mixed { if (!$this->_model) { diff --git a/app/Services/Customer/AccountService.php b/app/Services/Customer/AccountService.php index b5111a7..af96cf7 100644 --- a/app/Services/Customer/AccountService.php +++ b/app/Services/Customer/AccountService.php @@ -12,10 +12,7 @@ class AccountService extends CustomerService public function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - public function getClassName(): string - { - return parent::getClassName() . DIRECTORY_SEPARATOR . "Account"; + $this->addClassName('Account'); } public function getModelClass(): AccountModel { diff --git a/app/Services/Customer/ClientService.php b/app/Services/Customer/ClientService.php index 6e195d3..f873b14 100644 --- a/app/Services/Customer/ClientService.php +++ b/app/Services/Customer/ClientService.php @@ -14,10 +14,7 @@ class ClientService extends CustomerService public function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - public function getClassName(): string - { - return parent::getClassName() . DIRECTORY_SEPARATOR . "Client"; + $this->addClassName('Client'); } public function getModelClass(): ClientModel { diff --git a/app/Services/Customer/CouponService.php b/app/Services/Customer/CouponService.php index d9e822e..cd657ac 100644 --- a/app/Services/Customer/CouponService.php +++ b/app/Services/Customer/CouponService.php @@ -12,10 +12,7 @@ class CouponService extends CustomerService public function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - public function getClassName(): string - { - return parent::getClassName() . DIRECTORY_SEPARATOR . "Coupon"; + $this->addClassName('Coupon'); } public function getModelClass(): CouponModel { diff --git a/app/Services/Customer/CustomerService.php b/app/Services/Customer/CustomerService.php index 27165a0..4df309f 100644 --- a/app/Services/Customer/CustomerService.php +++ b/app/Services/Customer/CustomerService.php @@ -13,12 +13,8 @@ abstract class CustomerService extends CommonService protected function __construct(?IncomingRequest $request = null) { parent::__construct($request); + $this->addClassName('Customer'); } - public function getClassName(): string - { - return "Customer"; - } - final public function getClientService(): ClientService { if (!$this->_clientService) { diff --git a/app/Services/Customer/PointService.php b/app/Services/Customer/PointService.php index 24b89b5..1f5782c 100644 --- a/app/Services/Customer/PointService.php +++ b/app/Services/Customer/PointService.php @@ -12,10 +12,7 @@ class PointService extends CustomerService public function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - public function getClassName(): string - { - return parent::getClassName() . DIRECTORY_SEPARATOR . "Point"; + $this->addClassName('Point'); } public function getModelClass(): PointModel { diff --git a/app/Services/Customer/ServiceService.php b/app/Services/Customer/ServiceService.php index 115923c..d65392d 100644 --- a/app/Services/Customer/ServiceService.php +++ b/app/Services/Customer/ServiceService.php @@ -12,10 +12,7 @@ class ServiceService extends CustomerService public function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - public function getClassName(): string - { - return parent::getClassName() . DIRECTORY_SEPARATOR . "Service"; + $this->addClassName('Service'); } public function getModelClass(): ServiceModel { diff --git a/app/Services/Equipment/DefenceService.php b/app/Services/Equipment/DefenceService.php index 857e024..a803369 100644 --- a/app/Services/Equipment/DefenceService.php +++ b/app/Services/Equipment/DefenceService.php @@ -13,10 +13,7 @@ class DefenceService extends EquipmentService public function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - public function getClassName(): string - { - return parent::getClassName() . DIRECTORY_SEPARATOR . "Defence"; + $this->addClassName('Defence'); } public function getModelClass(): DefenceModel { diff --git a/app/Services/Equipment/EquipmentService.php b/app/Services/Equipment/EquipmentService.php index fe029bc..6987f13 100644 --- a/app/Services/Equipment/EquipmentService.php +++ b/app/Services/Equipment/EquipmentService.php @@ -10,9 +10,6 @@ abstract class EquipmentService extends CommonService protected function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - public function getClassName(): string - { - return "Equipment"; + $this->addClassName('Equipment'); } } diff --git a/app/Services/Equipment/IpService.php b/app/Services/Equipment/IpService.php index 9a647fe..767207c 100644 --- a/app/Services/Equipment/IpService.php +++ b/app/Services/Equipment/IpService.php @@ -12,10 +12,7 @@ class IpService extends EquipmentService public function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - public function getClassName(): string - { - return parent::getClassName() . DIRECTORY_SEPARATOR . "Ip"; + $this->addClassName('Ip'); } public function getModelClass(): IpModel { diff --git a/app/Services/Equipment/LineService.php b/app/Services/Equipment/LineService.php index 0b2cd40..f58d051 100644 --- a/app/Services/Equipment/LineService.php +++ b/app/Services/Equipment/LineService.php @@ -12,10 +12,7 @@ class LineService extends EquipmentService public function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - public function getClassName(): string - { - return parent::getClassName() . DIRECTORY_SEPARATOR . "Line"; + $this->addClassName('Line'); } public function getModelClass(): LineModel { diff --git a/app/Services/Equipment/Link/CpuService.php b/app/Services/Equipment/Link/CpuService.php index f9468fc..2b444bd 100644 --- a/app/Services/Equipment/Link/CpuService.php +++ b/app/Services/Equipment/Link/CpuService.php @@ -2,9 +2,11 @@ namespace App\Services\Equipment\Link; +use CodeIgniter\HTTP\IncomingRequest; + use App\Entities\Equipment\Link\CpuEntity; use App\Models\Equipment\Link\CpuModel; -use CodeIgniter\HTTP\IncomingRequest; +use App\Services\Equipment\Part\CpuService as PartService; class CpuService extends LinkService { @@ -12,10 +14,7 @@ class CpuService extends LinkService public function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - public function getClassName(): string - { - return parent::getClassName() . DIRECTORY_SEPARATOR . "Cpu"; + $this->addClassName('Cpu'); } public function getModelClass(): CpuModel { @@ -25,6 +24,10 @@ class CpuService extends LinkService { return new CpuEntity(); } + protected function getPartService(): PartService + { + return new PartService(); + } public function getFields(): array { return [ @@ -32,7 +35,6 @@ class CpuService extends LinkService "cpuinfo_uid", ]; } - public function getFilterFields(): array { return ["serverinfo_uid", "cpuinfo_uid"]; diff --git a/app/Services/Equipment/Link/DiskService.php b/app/Services/Equipment/Link/DiskService.php index 9855b9a..37376fe 100644 --- a/app/Services/Equipment/Link/DiskService.php +++ b/app/Services/Equipment/Link/DiskService.php @@ -2,9 +2,11 @@ namespace App\Services\Equipment\Link; +use CodeIgniter\HTTP\IncomingRequest; + use App\Entities\Equipment\Link\DiskEntity; use App\Models\Equipment\Link\DiskModel; -use CodeIgniter\HTTP\IncomingRequest; +use App\Services\Equipment\Part\DiskService as PartService; class DiskService extends LinkService { @@ -12,10 +14,7 @@ class DiskService extends LinkService public function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - public function getClassName(): string - { - return parent::getClassName() . DIRECTORY_SEPARATOR . "Disk"; + $this->addClassName('Disk'); } public function getModelClass(): DiskModel { @@ -25,6 +24,10 @@ class DiskService extends LinkService { return new DiskEntity(); } + protected function getPartService(): PartService + { + return new PartService(); + } public function getFields(): array { diff --git a/app/Services/Equipment/Link/LinkService.php b/app/Services/Equipment/Link/LinkService.php index 0d6f887..1bda5dc 100644 --- a/app/Services/Equipment/Link/LinkService.php +++ b/app/Services/Equipment/Link/LinkService.php @@ -6,14 +6,22 @@ namespace App\Services\Equipment\Link; use App\Services\Equipment\EquipmentService; use CodeIgniter\HTTP\IncomingRequest; +use App\Entities\Equipment\ServerEntity; + abstract class LinkService extends EquipmentService { protected function __construct(?IncomingRequest $request = null) { parent::__construct($request); + $this->addClassName('Link'); } - public function getClassName(): string + abstract protected function getPartService(); + final public function getPartEntities(ServerEntity $serverEntity): array { - return parent::getClassName() . DIRECTORY_SEPARATOR . "Link"; + $entities = []; + foreach ($this->getEntities(['serverinfo_uid' => $serverEntity->getPK()]) as $entity) { + $entities[] = $this->getPartService()->getEntity($entity->getPartInfoUID()); + } + return $entities; } } diff --git a/app/Services/Equipment/Link/RamService.php b/app/Services/Equipment/Link/RamService.php index 9fffc06..7089abb 100644 --- a/app/Services/Equipment/Link/RamService.php +++ b/app/Services/Equipment/Link/RamService.php @@ -2,9 +2,11 @@ namespace App\Services\Equipment\Link; +use CodeIgniter\HTTP\IncomingRequest; + use App\Entities\Equipment\Link\RamEntity; use App\Models\Equipment\Link\RamModel; -use CodeIgniter\HTTP\IncomingRequest; +use App\Services\Equipment\Part\RamService as PartService; class RamService extends LinkService { @@ -12,10 +14,7 @@ class RamService extends LinkService public function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - public function getClassName(): string - { - return parent::getClassName() . DIRECTORY_SEPARATOR . "Ram"; + $this->addClassName('Ram'); } public function getModelClass(): RamModel { @@ -25,6 +24,10 @@ class RamService extends LinkService { return new RamEntity(); } + protected function getPartService(): PartService + { + return new PartService(); + } public function getFields(): array { diff --git a/app/Services/Equipment/Part/CpuService.php b/app/Services/Equipment/Part/CpuService.php index 28059f8..17c5bb6 100644 --- a/app/Services/Equipment/Part/CpuService.php +++ b/app/Services/Equipment/Part/CpuService.php @@ -13,10 +13,7 @@ class CpuService extends PartService public function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - public function getClassName(): string - { - return parent::getClassName() . DIRECTORY_SEPARATOR . "Cpu"; + $this->addClassName('Cpu'); } public function getModelClass(): CpuModel { diff --git a/app/Services/Equipment/Part/DiskService.php b/app/Services/Equipment/Part/DiskService.php index 001d9cb..a007243 100644 --- a/app/Services/Equipment/Part/DiskService.php +++ b/app/Services/Equipment/Part/DiskService.php @@ -13,10 +13,7 @@ class DiskService extends PartService public function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - public function getClassName(): string - { - return parent::getClassName() . DIRECTORY_SEPARATOR . "Disk"; + $this->addClassName('Disk'); } public function getModelClass(): DiskModel { diff --git a/app/Services/Equipment/Part/PartService.php b/app/Services/Equipment/Part/PartService.php index 6ce1a30..06413d6 100644 --- a/app/Services/Equipment/Part/PartService.php +++ b/app/Services/Equipment/Part/PartService.php @@ -2,8 +2,6 @@ namespace App\Services\Equipment\Part; - -use App\Entities\Equipment\ServerEntity; use App\Services\Equipment\EquipmentService; use CodeIgniter\HTTP\IncomingRequest; @@ -12,36 +10,21 @@ abstract class PartService extends EquipmentService protected function __construct(?IncomingRequest $request = null) { parent::__construct($request); + $this->addClassName('Part'); } - - abstract protected function getLinkService(): mixed; - public function getClassName(): string - { - return parent::getClassName() . DIRECTORY_SEPARATOR . "Part"; - } - - public function getFields(): array + final public function getFields(): array { return [ "model", "status", ]; } - public function getFilterFields(): array + final public function getFilterFields(): array { return ['status']; } - public function getBatchJobFields(): array + final public function getBatchJobFields(): array { return ['status']; } - - final public function getPartEntities(ServerEntity $entity): array - { - $entities = []; - foreach ($this->getLinkService()->getEntities(['serverinfo_uid' => $entity->getPK()]) as $linkEntity) { - $entities[] = $this->getEntity($linkEntity->getPartInfoUID()); - } - return $entities; - } } diff --git a/app/Services/Equipment/Part/RamService.php b/app/Services/Equipment/Part/RamService.php index 3752c59..3870c54 100644 --- a/app/Services/Equipment/Part/RamService.php +++ b/app/Services/Equipment/Part/RamService.php @@ -13,10 +13,7 @@ class RamService extends PartService public function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - public function getClassName(): string - { - return parent::getClassName() . DIRECTORY_SEPARATOR . "Ram"; + $this->addClassName('Ram'); } public function getModelClass(): RamModel { diff --git a/app/Services/Equipment/ServerService.php b/app/Services/Equipment/ServerService.php index 487ba0e..892dc07 100644 --- a/app/Services/Equipment/ServerService.php +++ b/app/Services/Equipment/ServerService.php @@ -13,10 +13,7 @@ class ServerService extends EquipmentService public function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - public function getClassName(): string - { - return parent::getClassName() . DIRECTORY_SEPARATOR . "Server"; + $this->addClassName('Server'); } public function getModelClass(): ServerModel { diff --git a/app/Services/Equipment/SoftwareService.php b/app/Services/Equipment/SoftwareService.php index 0ff6995..e2c343f 100644 --- a/app/Services/Equipment/SoftwareService.php +++ b/app/Services/Equipment/SoftwareService.php @@ -12,10 +12,7 @@ class SoftwareService extends EquipmentService public function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - public function getClassName(): string - { - return parent::getClassName() . DIRECTORY_SEPARATOR . "Software"; + $this->addClassName('Software'); } public function getModelClass(): SoftwareModel { diff --git a/app/Services/MyLogService.php b/app/Services/MyLogService.php index 6413050..b3868fb 100644 --- a/app/Services/MyLogService.php +++ b/app/Services/MyLogService.php @@ -13,10 +13,7 @@ class MyLogService extends CommonService public function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - final public function getClassName(): string - { - return "MyLog"; + $this->addClassName('MyLog'); } public function getModelClass(): MyLogModel { diff --git a/app/Services/UserSNSService.php b/app/Services/UserSNSService.php index 970dd44..a28a554 100644 --- a/app/Services/UserSNSService.php +++ b/app/Services/UserSNSService.php @@ -13,10 +13,7 @@ class UserSNSService extends CommonService public function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - final public function getClassName(): string - { - return "UserSNS"; + $this->addClassName('UserSNS'); } public function getModelClass(): UserSNSModel { diff --git a/app/Services/UserService.php b/app/Services/UserService.php index 0b64fab..6a2c82d 100644 --- a/app/Services/UserService.php +++ b/app/Services/UserService.php @@ -12,10 +12,7 @@ class UserService extends CommonService public function __construct(?IncomingRequest $request = null) { parent::__construct($request); - } - final public function getClassName(): string - { - return "User"; + $this->addClassName('User'); } public function getModelClass(): UserModel { diff --git a/app/Views/admin/index.php b/app/Views/admin/index.php index 1d9a40b..261ccb8 100644 --- a/app/Views/admin/index.php +++ b/app/Views/admin/index.php @@ -49,7 +49,7 @@
-
include("templates/common/" . (isset($viewDatas['modal_type']) ? $viewDatas['modal_type'] : 'modal_fetch')); ?>
+
include("templates/common/" . (isset($viewDatas['modal_type']) ? $viewDatas['modal_type'] : 'modal_iframe')); ?>
diff --git a/app/Views/admin/popup/index.php b/app/Views/admin/popup/index.php index a678ec8..b6e4aec 100644 --- a/app/Views/admin/popup/index.php +++ b/app/Views/admin/popup/index.php @@ -5,7 +5,7 @@
- include("templates/{$viewDatas['layout']}/index_content_top"); ?> + include("templates/{$viewDatas['layout']}/index_content_top_popup"); ?> 'batchjob_form', 'method' => "post"]) ?> @@ -37,7 +37,7 @@
-
include("templates/common/" . (isset($viewDatas['modal_type']) ? $viewDatas['modal_type'] : 'modal_fetch')); ?>
+
include("templates/common/" . (isset($viewDatas['modal_type']) ? $viewDatas['modal_type'] : 'modal_iframe')); ?>
diff --git a/app/Views/layouts/admin/left_menu/customer.php b/app/Views/layouts/admin/left_menu/customer.php index a392fe7..1af5c96 100644 --- a/app/Views/layouts/admin/left_menu/customer.php +++ b/app/Views/layouts/admin/left_menu/customer.php @@ -9,7 +9,7 @@ 고객정보
쿠폰내역 diff --git a/app/Views/templates/admin/index_content_top.php b/app/Views/templates/admin/index_content_top.php index 52e4cf7..298433d 100644 --- a/app/Views/templates/admin/index_content_top.php +++ b/app/Views/templates/admin/index_content_top.php @@ -9,7 +9,7 @@ diff --git a/app/Views/templates/admin/index_content_top_popup.php b/app/Views/templates/admin/index_content_top_popup.php new file mode 100644 index 0000000..3cc2d2c --- /dev/null +++ b/app/Views/templates/admin/index_content_top_popup.php @@ -0,0 +1,22 @@ + "get"]) ?> + + \ No newline at end of file diff --git a/app/Views/templates/common/modal_fetch.php b/app/Views/templates/common/modal_fetch_v1.php similarity index 98% rename from app/Views/templates/common/modal_fetch.php rename to app/Views/templates/common/modal_fetch_v1.php index e42ea83..9045c3e 100644 --- a/app/Views/templates/common/modal_fetch.php +++ b/app/Views/templates/common/modal_fetch_v1.php @@ -8,7 +8,7 @@
-