From 5de8920a2e892e0099bab8a31ee42232c06eaa32 Mon Sep 17 00:00:00 2001 From: "choi.jh" Date: Wed, 10 Sep 2025 17:48:54 +0900 Subject: [PATCH] dbmsv2 init...1 --- app/Config/Routes.php | 2 +- app/Controllers/Admin/AdminController.php | 1 - app/Controllers/Admin/ClientController.php | 0 .../Admin/Customer/AccountController.php | 7 - .../Admin/Customer/ClientController.php | 70 ++++++- .../Admin/Customer/CouponController.php | 7 - .../Admin/Customer/PaymentController.php | 12 +- .../Admin/Customer/PointController.php | 7 - .../Admin/Customer/ServiceController.php | 61 +----- .../Admin/Equipment/CSController.php | 7 - .../Admin/Equipment/IPController.php | 7 - .../Admin/Equipment/LineController.php | 11 +- .../Admin/Equipment/PartController.php | 7 - .../Admin/Equipment/ServerController.php | 12 +- .../Admin/Equipment/ServerPartController.php | 7 - .../Admin/Equipment/SwitchController.php | 7 - app/Controllers/Admin/Home.php | 23 +-- app/Controllers/Admin/MyLogController.php | 9 +- app/Controllers/Admin/SearchController.php | 7 - app/Controllers/Admin/UserController.php | 22 +-- app/Controllers/Auth/AuthController.php | 10 +- app/Controllers/CommonController.php | 71 +++---- app/Entities/Customer/ClientEntity.php | 8 + app/Entities/Customer/PaymentEntity.php | 12 +- app/Entities/Customer/ServiceEntity.php | 31 +++ app/Helpers/Customer/ServiceHelper.php | 2 +- app/Helpers/UserSNSHelper.php | 27 +++ app/Language/en/Customer/Service.php | 5 +- app/Models/Customer/PaymentModel.php | 21 -- app/Services/Auth/AuthService.php | 8 +- app/Services/Auth/GoogleService.php | 3 +- app/Services/Auth/LocalService.php | 3 +- app/Services/CommonService.php | 31 ++- app/Services/Customer/AccountService.php | 4 +- app/Services/Customer/ClientService.php | 3 +- app/Services/Customer/CouponService.php | 4 +- app/Services/Customer/CustomerService.php | 17 +- app/Services/Customer/PaymentService.php | 21 +- app/Services/Customer/PointService.php | 4 +- app/Services/Customer/ServiceService.php | 47 ++++- app/Services/Equipment/CSService.php | 3 +- app/Services/Equipment/EquipmentService.php | 10 +- app/Services/Equipment/IPService.php | 3 +- app/Services/Equipment/LineService.php | 3 +- app/Services/Equipment/PartService.php | 3 +- app/Services/Equipment/ServerPartService.php | 2 +- app/Services/Equipment/ServerService.php | 4 +- app/Services/Equipment/SwitchService.php | 8 +- app/Services/MyLogService.php | 6 +- app/Services/UserSNSService.php | 4 +- app/Services/UserService.php | 3 +- app/Views/admin/client/detail.php | 141 ++++++++++++++ app/Views/admin/create_form.php | 6 +- app/Views/admin/download.php | 2 +- app/Views/admin/index.php | 16 +- app/Views/admin/modify_form.php | 6 +- app/Views/admin/popup/create_form.php | 6 +- app/Views/admin/popup/index.php | 14 +- app/Views/admin/popup/modify_form.php | 6 +- app/Views/admin/popup/view.php | 6 +- app/Views/admin/search/index.php | 70 ------- app/Views/admin/server/create_form.php | 14 +- app/Views/admin/server/index.php | 48 ++--- app/Views/admin/server/modify_form.php | 6 +- app/Views/admin/server/view.php | 10 +- app/Views/admin/service/detail.php | 180 ------------------ app/Views/admin/service/index.php | 60 +++--- app/Views/admin/service/view.php | 10 +- app/Views/admin/view.php | 6 +- app/Views/admin/welcome/new.php | 14 +- app/Views/layouts/empty.php | 2 +- app/Views/layouts/front.php | 2 +- .../templates/admin/index_content_bottom.php | 6 +- public/css/admin/client/detail.css | 8 + public/css/admin/service/detail.css | 33 ---- 75 files changed, 616 insertions(+), 723 deletions(-) delete mode 100644 app/Controllers/Admin/ClientController.php create mode 100644 app/Helpers/UserSNSHelper.php create mode 100644 app/Views/admin/client/detail.php delete mode 100644 app/Views/admin/search/index.php delete mode 100644 app/Views/admin/service/detail.php create mode 100644 public/css/admin/client/detail.css delete mode 100644 public/css/admin/service/detail.css diff --git a/app/Config/Routes.php b/app/Config/Routes.php index ddcce8d..8d7ced1 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -69,6 +69,7 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au $routes->post('batchjob', 'ClientController::batchjob'); $routes->post('batchjob_delete', 'ClientController::batchjob_delete'); $routes->get('download/(:alpha)', 'ClientController::download/$1'); + $routes->get('detail/(:num)', 'ClientController::detail/$1'); }); $routes->group('account', ['namespace' => 'App\Controllers\Admin\Customer'], function ($routes) { $routes->get('/', 'AccountController::index'); @@ -121,7 +122,6 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au $routes->post('batchjob', 'ServiceController::batchjob'); $routes->post('batchjob_delete', 'ServiceController::batchjob_delete'); $routes->get('download/(:alpha)', 'ServiceController::download/$1'); - $routes->get('detail', 'ServiceController::detail'); }); $routes->group('serviceitem', ['namespace' => 'App\Controllers\Admin\Customer'], function ($routes) { $routes->get('/', 'ServiceItemController::index'); diff --git a/app/Controllers/Admin/AdminController.php b/app/Controllers/Admin/AdminController.php index aee4824..bd06f69 100644 --- a/app/Controllers/Admin/AdminController.php +++ b/app/Controllers/Admin/AdminController.php @@ -18,7 +18,6 @@ abstract class AdminController extends CommonController $this->uri_path = "admin/"; $this->view_path = "admin" . DIRECTORY_SEPARATOR; $this->content_title = "관리자"; - $this->helper = $this->getHelper(); } //Service,ServicePaymentController사용 final public function getServiceService(): ServiceService diff --git a/app/Controllers/Admin/ClientController.php b/app/Controllers/Admin/ClientController.php deleted file mode 100644 index e69de29..0000000 diff --git a/app/Controllers/Admin/Customer/AccountController.php b/app/Controllers/Admin/Customer/AccountController.php index 57a070f..81372bd 100644 --- a/app/Controllers/Admin/Customer/AccountController.php +++ b/app/Controllers/Admin/Customer/AccountController.php @@ -28,13 +28,6 @@ class AccountController extends CustomerController } return $this->_service; } - public function getHelper(): AccountHelper - { - if (!$this->_helper) { - $this->_helper = new AccountHelper(); - } - return $this->_helper; - } //Index,FieldForm관련. protected function create_process(array $formDatas): AccountEntity { diff --git a/app/Controllers/Admin/Customer/ClientController.php b/app/Controllers/Admin/Customer/ClientController.php index a5da90f..6e3cca6 100644 --- a/app/Controllers/Admin/Customer/ClientController.php +++ b/app/Controllers/Admin/Customer/ClientController.php @@ -3,9 +3,13 @@ namespace App\Controllers\Admin\Customer; use App\Entities\Customer\ClientEntity; +use App\Entities\Customer\ServiceEntity; use App\Helpers\Customer\ClientHelper; -use App\Services\Customer\ClientService; +use App\Helpers\Customer\ServiceHelper; +use App\Helpers\Equipment\ServerHelper; +use App\Services\Customer\ClientService; +use CodeIgniter\HTTP\RedirectResponse; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use CodeIgniter\Validation\Validation; @@ -29,13 +33,6 @@ class ClientController extends CustomerController } return $this->_service; } - public function getHelper(): ClientHelper - { - if (!$this->_helper) { - $this->_helper = new ClientHelper(); - } - return $this->_helper; - } //Index,FieldForm관련 //생성관련 protected function create_process(array $formDatas): ClientEntity @@ -75,4 +72,61 @@ class ClientController extends CustomerController return $validation; } //Index,FieldForm관련. + protected function getResultSuccess(string $message = MESSAGES["SUCCESS"], ?string $actionTemplate = null): RedirectResponse|string + { + switch ($this->getAction()) { + // case 'create_form': + // case 'modify_form': + case 'detail': + $this->service = $this->getService(); + $this->control = $this->getService()->getControlDatas(); + $this->getService()->getHelper()->setViewDatas($this->getViewDatas()); + $actionTemplate = $this->request->getVar('ActionTemplate') ?? $actionTemplate ?? 'client'; + if ($actionTemplate) { + $view_file = $this->view_path . $actionTemplate . DIRECTORY_SEPARATOR . $this->getAction(); + } else { + $view_file = $this->view_path . $this->getAction(); + } + $result = view($view_file, ['viewDatas' => $this->getViewDatas()]); + break; + default: + $result = parent::getResultSuccess($message, $actionTemplate); + break; + } + return $result; + } + public function detail(mixed $uid): RedirectResponse|string + { + try { + $this->setAction(__FUNCTION__); + $this->setFormFields(); + $this->setFormFilters(); + $this->setFormRules(); + //기본값정의 + $this->setFormDatas($this->request->getGet()); + $this->setFormOptions(); + //일괄작업용 Fields정의 + $entity = $this->getService()->getEntity($uid); + if (!($entity instanceof ClientEntity)) { + throw new \Exception("{$uid}에 해당하는 고객정보를 찾을수 없습니다."); + } + $this->totalCounts = $this->getService()->getServiceService()->getTotalCountsByType(['clientinfo_uid' => $entity->getPK()]); + $this->totalAmounts = $this->getService()->getServiceService()->getTotalAmounts([ + 'clientinfo_uid' => $entity->getPK(), + 'status' => STATUS['AVAILABLE'] + ]); + $this->unPaids = $this->getService()->getPaymentService()->getUnPaids('clientinfo_uid', [ + 'clientinfo_uid' => $entity->getPK() + ]); + $this->serviceEntities = $this->getService()->getServiceService()->getEntities(['clientinfo_uid' => $entity->getPK()]); + $this->entity = $entity; + helper(['form']); + $this->serviceHelper = new ServiceHelper(); + $this->serverHelper = new ServerHelper(); + return $this->getResultSuccess(); + } catch (\Exception $e) { + return $e->getMessage(); + // return $this->getResultFail($e->getMessage()); + } + } } diff --git a/app/Controllers/Admin/Customer/CouponController.php b/app/Controllers/Admin/Customer/CouponController.php index dd0cc6a..8a5aaed 100644 --- a/app/Controllers/Admin/Customer/CouponController.php +++ b/app/Controllers/Admin/Customer/CouponController.php @@ -28,13 +28,6 @@ class CouponController extends CustomerController } return $this->_service; } - public function getHelper(): CouponHelper - { - if (!$this->_helper) { - $this->_helper = new CouponHelper(); - } - return $this->_helper; - } //Index,FieldForm관련. protected function create_process(array $formDatas): CouponEntity { diff --git a/app/Controllers/Admin/Customer/PaymentController.php b/app/Controllers/Admin/Customer/PaymentController.php index c3487c6..763da11 100644 --- a/app/Controllers/Admin/Customer/PaymentController.php +++ b/app/Controllers/Admin/Customer/PaymentController.php @@ -34,13 +34,6 @@ class PaymentController extends CustomerController } return $this->_service; } - public function getHelper(): PaymentHelper - { - if (!$this->_helper) { - $this->_helper = new PaymentHelper(); - } - return $this->_helper; - } public function getClientService(): ClientService { if (!$this->_clientService) { @@ -52,8 +45,9 @@ class PaymentController extends CustomerController { switch ($this->getAction()) { case 'invoice': - $this->control = $this->getControlDatas(); - $this->getHelper()->setViewDatas($this->getViewDatas()); + $this->service = $this->getService(); + $this->control = $this->getService()->getControlDatas(); + $this->getService()->getHelper()->setViewDatas($this->getViewDatas()); $actionTemplate = $this->request->getVar('ActionTemplate') ?? $actionTemplate ?? 'payment'; if ($actionTemplate) { $view_file = $this->view_path . $actionTemplate . DIRECTORY_SEPARATOR . $this->getAction(); diff --git a/app/Controllers/Admin/Customer/PointController.php b/app/Controllers/Admin/Customer/PointController.php index a1839c4..934bd1c 100644 --- a/app/Controllers/Admin/Customer/PointController.php +++ b/app/Controllers/Admin/Customer/PointController.php @@ -28,13 +28,6 @@ class PointController extends CustomerController } return $this->_service; } - public function getHelper(): PointHelper - { - if (!$this->_helper) { - $this->_helper = new PointHelper(); - } - return $this->_helper; - } //Index,FieldForm관련. protected function create_process(array $formDatas): PointEntity { diff --git a/app/Controllers/Admin/Customer/ServiceController.php b/app/Controllers/Admin/Customer/ServiceController.php index 395259a..43b71e1 100644 --- a/app/Controllers/Admin/Customer/ServiceController.php +++ b/app/Controllers/Admin/Customer/ServiceController.php @@ -31,13 +31,6 @@ class ServiceController extends CustomerController } return $this->_service; } - public function getHelper(): ServiceHelper - { - if (!$this->_helper) { - $this->_helper = new ServiceHelper(); - } - return $this->_helper; - } public function getPaymentService(): PaymentService { if (!$this->_paymentService) { @@ -51,11 +44,11 @@ class ServiceController extends CustomerController switch ($this->getAction()) { // case 'create_form': // case 'modify_form': - case 'detail': case 'view': case 'index': - $this->control = $this->getControlDatas(); - $this->getHelper()->setViewDatas($this->getViewDatas()); + $this->service = $this->getService(); + $this->control = $this->getService()->getControlDatas(); + $this->getService()->getHelper()->setViewDatas($this->getViewDatas()); $actionTemplate = $this->request->getVar('ActionTemplate') ?? $actionTemplate ?? 'service'; if ($actionTemplate) { $view_file = $this->view_path . $actionTemplate . DIRECTORY_SEPARATOR . $this->getAction(); @@ -88,49 +81,13 @@ class ServiceController extends CustomerController protected function index_process(array $entities = []): array { //서비스별 미납 Count - $this->unPaids = $this->getPaymentService()->getUnPaidCount(); + $unpaids = ['count' => 0, 'amount' => 0]; + foreach ($this->getPaymentService()->getUnPaids('serviceinfo_uid') as $row) { + $unpaids[$row->serviceinfo_uid]['count'] = $row->cnt; + $unpaids[$row->serviceinfo_uid]['amount'] = $row->amount; + }; + $this->unpaids = $unpaids; //부모함수처리 return parent::index_process($entities); } - - public function detail(): RedirectResponse|string - { - try { - $this->setAction(__FUNCTION__); - $this->setFormFields(); - $this->setFormFilters(); - $this->setFormRules(); - //기본값정의 - $this->setFormDatas($this->request->getGet()); - $this->setFormOptions(); - //일괄작업용 Fields정의 - $this->setControlDatas('batchjob_fields', $this->getService()->getBatchjobFields()); - //일괄작업용 버튼정의 - $this->setControlDatas('batchjob_buttions', $this->getService()->getBatchjobButtons()); - helper(['form']); - //Return Url정의 - $this->getMyAuth()->pushCurrentUrl($this->request->getUri()->getPath() . ($this->request->getUri()->getQuery() ? "?" . $this->request->getUri()->getQuery() : "")); - //조건절 처리 - $this->index_condition_process(); - //TotalCount (SoftDelete적용이 되려면 countAllResults를 사용해야함) - $this->total_count = $this->getService()->getTotalCount(); - //Pagination 처리 - $this->pagination = $this->index_pagenation_process(); - //줄수 처리용 - $this->page_options = $this->index_pageOptions_process(); - //조건절 처리 - //OrcerBy , Limit 처리 - $this->order_field = $this->request->getVar('order_field'); - $this->order_value = $this->request->getVar('order_value'); - $this->getService()->setOrderBy($this->order_field, $this->order_value); - $this->getService()->setLimit($this->per_page); - $this->getService()->setOffset(($this->page - 1) * $this->per_page); - $this->index_condition_process(); - $this->entities = $this->index_process(); - return $this->getResultSuccess(); - } catch (\Exception $e) { - return $e->getMessage(); - // return $this->getResultFail($e->getMessage()); - } - } } diff --git a/app/Controllers/Admin/Equipment/CSController.php b/app/Controllers/Admin/Equipment/CSController.php index 7acdcd9..191054d 100644 --- a/app/Controllers/Admin/Equipment/CSController.php +++ b/app/Controllers/Admin/Equipment/CSController.php @@ -27,12 +27,5 @@ class CSController extends EquipmentController } return $this->_service; } - public function getHelper(): CSHelper - { - if (!$this->_helper) { - $this->_helper = new CSHelper(); - } - return $this->_helper; - } //Index,FieldForm관련 } diff --git a/app/Controllers/Admin/Equipment/IPController.php b/app/Controllers/Admin/Equipment/IPController.php index 06e7b9a..7d911d3 100644 --- a/app/Controllers/Admin/Equipment/IPController.php +++ b/app/Controllers/Admin/Equipment/IPController.php @@ -30,13 +30,6 @@ class IPController extends EquipmentController } return $this->_service; } - public function getHelper(): IPHelper - { - if (!$this->_helper) { - $this->_helper = new IPHelper(); - } - return $this->_helper; - } final public function getLineService(): LineService { if (!$this->_lineService) { diff --git a/app/Controllers/Admin/Equipment/LineController.php b/app/Controllers/Admin/Equipment/LineController.php index a1e4257..67c15ac 100644 --- a/app/Controllers/Admin/Equipment/LineController.php +++ b/app/Controllers/Admin/Equipment/LineController.php @@ -30,13 +30,6 @@ class LineController extends EquipmentController } return $this->_service; } - public function getHelper(): LineHelper - { - if (!$this->_helper) { - $this->_helper = new LineHelper(); - } - return $this->_helper; - } final public function getIPService(): IpService { if (!$this->_ipService) { @@ -50,13 +43,13 @@ class LineController extends EquipmentController protected function create_process(array $formDatas): LineEntity { //Line 등록 - if (!$this->getHelper()->isValidCIDR($formDatas['bandwith'])) { + if (!$this->getService()->getHelper()->isValidCIDR($formDatas['bandwith'])) { throw new \Exception("{$formDatas['bandwith']}는 CIDR 형식에 부합되지 않습니다."); } //부모처리 $entity = parent::create_process($formDatas); //Prefixed IP to array 자동 등록 - foreach ($this->getHelper()->cidrToIpRange($formDatas['bandwith']) as $ip) { + foreach ($this->getService()->getHelper()->cidrToIpRange($formDatas['bandwith']) as $ip) { $this->getIPService()->createByLineInfo($entity, $ip); } return $entity; diff --git a/app/Controllers/Admin/Equipment/PartController.php b/app/Controllers/Admin/Equipment/PartController.php index 8e0e36c..cafa72d 100644 --- a/app/Controllers/Admin/Equipment/PartController.php +++ b/app/Controllers/Admin/Equipment/PartController.php @@ -27,13 +27,6 @@ class PartController extends EquipmentController } return $this->_service; } - public function getHelper(): PartHelper - { - if (!$this->_helper) { - $this->_helper = new PartHelper(); - } - return $this->_helper; - } //Index,FieldForm관 // protected function index_process(array $entities = []): array // { diff --git a/app/Controllers/Admin/Equipment/ServerController.php b/app/Controllers/Admin/Equipment/ServerController.php index 7ff4792..242737c 100644 --- a/app/Controllers/Admin/Equipment/ServerController.php +++ b/app/Controllers/Admin/Equipment/ServerController.php @@ -27,21 +27,15 @@ class ServerController extends EquipmentController } return $this->_service; } - public function getHelper(): ServerHelper - { - if (!$this->_helper) { - $this->_helper = new ServerHelper(); - } - return $this->_helper; - } //Index,FieldForm관련 protected function getResultSuccess(string $message = MESSAGES["SUCCESS"], ?string $actionTemplate = null): RedirectResponse|string { switch ($this->getAction()) { case 'view': case 'index': - $this->control = $this->getControlDatas(); - $this->getHelper()->setViewDatas($this->getViewDatas()); + $this->service = $this->getService(); + $this->control = $this->getService()->getControlDatas(); + $this->getService()->getHelper()->setViewDatas($this->getViewDatas()); $actionTemplate = $this->request->getVar('ActionTemplate') ?? $actionTemplate ?? 'server'; if ($actionTemplate) { $view_file = $this->view_path . $actionTemplate . DIRECTORY_SEPARATOR . $this->getAction(); diff --git a/app/Controllers/Admin/Equipment/ServerPartController.php b/app/Controllers/Admin/Equipment/ServerPartController.php index 706e9e7..df32497 100644 --- a/app/Controllers/Admin/Equipment/ServerPartController.php +++ b/app/Controllers/Admin/Equipment/ServerPartController.php @@ -26,13 +26,6 @@ class ServerPartController extends EquipmentController } return $this->_service; } - public function getHelper(): ServerPartHelper - { - if (!$this->_helper) { - $this->_helper = new ServerPartHelper(); - } - return $this->_helper; - } //Index,FieldForm관련 public function getFormOption(string $field, array $options = []): array { diff --git a/app/Controllers/Admin/Equipment/SwitchController.php b/app/Controllers/Admin/Equipment/SwitchController.php index 8071cfd..6355f18 100644 --- a/app/Controllers/Admin/Equipment/SwitchController.php +++ b/app/Controllers/Admin/Equipment/SwitchController.php @@ -28,13 +28,6 @@ class SwitchController extends EquipmentController } return $this->_service; } - public function getHelper(): SwitchHelper - { - if (!$this->_helper) { - $this->_helper = new SwitchHelper(); - } - return $this->_helper; - } //Index,FieldForm관 protected function create_process(array $formDatas): SwitchEntity { diff --git a/app/Controllers/Admin/Home.php b/app/Controllers/Admin/Home.php index f78f601..b63422c 100644 --- a/app/Controllers/Admin/Home.php +++ b/app/Controllers/Admin/Home.php @@ -30,13 +30,6 @@ class Home extends AdminController } return $this->_service; } - public function getHelper(): mixed - { - if (!$this->_helper) { - $this->_helper = new HomeHelper(); - } - return $this->_helper; - } final public function getPaymentService(): PaymentService { if (!$this->_PaymentService) { @@ -48,8 +41,9 @@ class Home extends AdminController { switch ($this->getAction()) { case 'index': - $this->control = $this->getControlDatas(); - $this->getHelper()->setViewDatas($this->getViewDatas()); + $this->service = $this->getService(); + $this->control = $this->getService()->getControlDatas(); + $this->getService()->getHelper()->setViewDatas($this->getViewDatas()); $actionTemplate = $this->request->getVar('ActionTemplate') ?? $actionTemplate; if ($actionTemplate) { $view_file = $this->view_path . $actionTemplate . DIRECTORY_SEPARATOR . $this->getAction(); @@ -79,8 +73,15 @@ class Home extends AdminController $this->newServiceEntities = $this->getService()->getEntitiesByNewService($this->interval); $this->newServiceCount = count($this->newServiceEntities); //서비스별 미납 Count - $this->unPaids = $this->getPaymentService()->getUnPaidCount(); - $this->unPaidCount = count($this->unPaids); + $totalUnPaidCount = 0; + $unpaids = ['count' => 0, 'amount' => 0]; + foreach ($this->getPaymentService()->getUnPaids('serviceinfo_uid') as $row) { + $unpaids[$row->serviceinfo_uid]['count'] = $row->cnt; + $unpaids[$row->serviceinfo_uid]['amount'] = $row->amount; + $totalUnPaidCount += $row->cnt; + }; + $this->unpaids = $unpaids; + $this->totalUnPaidCount = $totalUnPaidCount; helper(['form']); return $this->getResultSuccess(); } diff --git a/app/Controllers/Admin/MyLogController.php b/app/Controllers/Admin/MyLogController.php index 7749c91..1c32c45 100644 --- a/app/Controllers/Admin/MyLogController.php +++ b/app/Controllers/Admin/MyLogController.php @@ -12,7 +12,7 @@ use App\Helpers\MyLogHelper; class MyLogController extends AdminController { - private $_helper = null; + public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); @@ -29,12 +29,5 @@ class MyLogController extends AdminController } return $this->_service; } - public function getHelper(): MyLogHelper - { - if (!$this->_helper) { - $this->_helper = new MyLogHelper(); - } - return $this->_helper; - } //Index,FieldForm관련 } diff --git a/app/Controllers/Admin/SearchController.php b/app/Controllers/Admin/SearchController.php index a53ef4d..f749fa0 100644 --- a/app/Controllers/Admin/SearchController.php +++ b/app/Controllers/Admin/SearchController.php @@ -29,13 +29,6 @@ class SearchController extends AdminController } return $this->_service; } - public function getHelper(): ServiceHelper - { - if (!$this->_helper) { - $this->_helper = new ServiceHelper(); - } - return $this->_helper; - } protected function getResultSuccess(string $message = MESSAGES["SUCCESS"], ?string $actionTemplate = null): RedirectResponse|string { switch ($this->getAction()) { diff --git a/app/Controllers/Admin/UserController.php b/app/Controllers/Admin/UserController.php index 7fd96cc..e7f089f 100644 --- a/app/Controllers/Admin/UserController.php +++ b/app/Controllers/Admin/UserController.php @@ -16,7 +16,7 @@ class UserController extends AdminController { private $_db; private $_service = null; - private $_helper = null; + public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); @@ -33,24 +33,14 @@ class UserController extends AdminController } return $this->_service; } - public function getHelper(): UserHelper - { - if (!$this->_helper) { - $this->_helper = new UserHelper(); - } - return $this->_helper; - } //Index,FieldForm관련 protected function getResultSuccess(string $message = MESSAGES["SUCCESS"], ?string $actionTemplate = null): RedirectResponse|string { switch ($this->getAction()) { - case 'profile_modify': - $this->getMyLogService()->save($this->getService()->getClassName(), $this->getAction(), $message, $this->getMyAuth()->getUIDByAuthInfo()); - $result = $this->view($this->entity->getPK()); - break; case 'profile_modify_form': - $this->control = $this->getControlDatas(); - $this->getHelper()->setViewDatas($this->getViewDatas()); + $this->service = $this->getService(); + $this->control = $this->getService()->getControlDatas(); + $this->getService()->getHelper()->setViewDatas($this->getViewDatas()); $actionTemplate = $this->request->getVar('ActionTemplate') ?? $actionTemplate; if ($actionTemplate) { $view_file = $this->view_path . $actionTemplate . DIRECTORY_SEPARATOR . 'modify_form'; @@ -59,6 +49,10 @@ class UserController extends AdminController } $result = view($view_file, ['viewDatas' => $this->getViewDatas()]); break; + case 'profile_modify': + $this->getMyLogService()->save($this->getService()->getClassName(), $this->getAction(), $message, $this->getMyAuth()->getUIDByAuthInfo()); + $result = $this->view($this->entity->getPK()); + break; default: $result = parent::getResultSuccess($message, $actionTemplate); break; diff --git a/app/Controllers/Auth/AuthController.php b/app/Controllers/Auth/AuthController.php index 17f17c4..d476804 100644 --- a/app/Controllers/Auth/AuthController.php +++ b/app/Controllers/Auth/AuthController.php @@ -13,7 +13,7 @@ use Psr\Log\LoggerInterface; abstract class AuthController extends CommonController { - private $_helper = null; + public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); @@ -24,13 +24,6 @@ abstract class AuthController extends CommonController } abstract protected function getSNSButton(): string; abstract protected function login_process(array $formDatas): UserEntity; - final public function getHelper(): mixed - { - if (!$this->_helper) { - $this->_helper = new AuthHelper(); - } - return $this->_helper; - } protected function getResultFail(string $message = MESSAGES["FAILED"]): RedirectResponse { if ($this->request->getMethod() === 'POST') { @@ -74,7 +67,6 @@ abstract class AuthController extends CommonController $this->forms = ['attributes' => ['method' => "post",], 'hiddens' => []]; return $this->getResultSuccess(); } catch (\Exception $e) { - dd($e->getMessage()); return $this->getResultFail($e->getMessage()); } } diff --git a/app/Controllers/CommonController.php b/app/Controllers/CommonController.php index 7fbf352..c059710 100644 --- a/app/Controllers/CommonController.php +++ b/app/Controllers/CommonController.php @@ -23,9 +23,7 @@ abstract class CommonController extends BaseController private $_myAuth = null; private ?MyLogService $_myLogService = null; private $_viewDatas = []; - private $_control = []; abstract public function getService(): mixed; - abstract function getHelper(): mixed; public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger) { parent::initController($request, $response, $logger); @@ -55,20 +53,6 @@ abstract class CommonController extends BaseController } return $this->_myAuth; } - final protected function getControlDatas(?string $key = null): mixed - { - if (!$key) { - return $this->_control; - } - return array_key_exists($key, $this->_control) ? $this->_control[$key] : null; - } - final protected function setControlDatas(string $key, mixed $values): void - { - if (!array_key_exists($key, $this->_control)) { - $this->_control[$key] = []; - } - $this->_control[$key] = $values; - } final protected function getViewDatas(): array { return $this->_viewDatas; @@ -83,19 +67,19 @@ abstract class CommonController extends BaseController //Index,FieldForm관련 final protected function setAction(string $action): void { - $this->_control['action'] = $action; + $this->getService()->setControlDatas('action', $action); } final protected function getAction(): string { - if (!array_key_exists('action', $this->_control)) { + if (!$this->getService()->getControlDatas('action')) { throw new \Exception("action이 정의되지 않았습니다."); } - return $this->_control['action']; + return $this->getService()->getControlDatas('action'); } //FormFields정의 final protected function getFormFields($fields = []): array { - return array_merge($fields, $this->getControlDatas('actionFields')); + return array_merge($fields, $this->getService()->getControlDatas('actionFields')); } final protected function setFormFields(?array $fields = null): void { @@ -110,11 +94,11 @@ abstract class CommonController extends BaseController $actionFields = $this->getService()->getFormFields(); break; } - $this->setControlDatas('actionFields', is_array($fields) ? $fields : $actionFields); + $this->getService()->setControlDatas('actionFields', is_array($fields) ? $fields : $actionFields); } final protected function getFormFilters($filters = []): array { - return array_merge($filters, $this->getControlDatas('actionFilters')); + return array_merge($filters, $this->getService()->getControlDatas('actionFilters')); } final protected function setFormFilters(?array $filters = null): void { @@ -129,12 +113,12 @@ abstract class CommonController extends BaseController $actionFilters = $this->getService()->getFormFilters(); break; } - $this->setControlDatas('actionFilters', is_array($filters) ? $filters : $actionFilters); + $this->getService()->setControlDatas('actionFilters', is_array($filters) ? $filters : $actionFilters); } //FormRules정의 final protected function getFormRules(array $rules = []): array { - foreach ($this->getControlDatas('field_rules') as $field => $rule) { + foreach ($this->getService()->getControlDatas('field_rules') as $field => $rule) { $rules[$field] = $rule; } return $rules; @@ -142,15 +126,15 @@ abstract class CommonController extends BaseController final protected function setFormRules(): void { $rules = []; - foreach ($this->getControlDatas('actionFields') as $field) { + foreach ($this->getService()->getControlDatas('actionFields') as $field) { $rules = $this->getFormRule($field, $rules); } - $this->setControlDatas('field_rules', $rules); + $this->getService()->setControlDatas('field_rules', $rules); } //FormOptions정의 final protected function getFormOptions(array $options = []): array { - foreach ($this->getControlDatas('field_optons') as $field => $option) { + foreach ($this->getService()->getControlDatas('field_optons') as $field => $option) { $options[$field] = $option; } return $options; @@ -159,29 +143,29 @@ abstract class CommonController extends BaseController { //기존 Filter Options 가져와서 field에 해당하는 option이 없으면 field를 key로 배열추가 후 다시 filter_options 전체 적용 $options = []; - foreach ($this->getControlDatas('actionFilters') as $field) { + foreach ($this->getService()->getControlDatas('actionFilters') as $field) { $options[$field] = $this->getFormOption($field, $options); } - $this->setControlDatas('field_optons', $options); + $this->getService()->setControlDatas('field_optons', $options); } //FormDatas 전달값,Default값 final protected function getFormDatas(): array { - return $this->getControlDatas('form_datas'); + return $this->getService()->getControlDatas('form_datas'); } final protected function setFormDatas(array $requestDatas, array $formDatas = []): void { - foreach ($this->getControlDatas('actionFields') as $field) { + foreach ($this->getService()->getControlDatas('actionFields') as $field) { $formDatas = $this->setFormData($field, $requestDatas, $formDatas); } - $this->setControlDatas('form_datas', $formDatas); + $this->getService()->setControlDatas('form_datas', $formDatas); } //FormDatas 검증 final protected function doValidations(): void { //변경할 값 확인 : Upload된 파일 검증시 $this->request->getPOST()보다 먼처 체크필요 $validation = service('validation'); - foreach ($this->getControlDatas('field_rules') as $field => $rule) { + foreach ($this->getService()->getControlDatas('field_rules') as $field => $rule) { $validation = $this->doValidation($validation, $field, $rule); } if (!$validation->run($this->getFormDatas())) { @@ -252,7 +236,7 @@ abstract class CommonController extends BaseController protected function getResultSuccess(string $message = MESSAGES["SUCCESS"], ?string $actionTemplate = null): RedirectResponse|string { helper(['form']); - switch ($this->getControlDatas('action')) { + switch ($this->getService()->getControlDatas('action')) { case 'create': case 'modify': // $this->getMyLogService()->save($this->getService()->getClassName(), $this->getAction(), $message, $this->getMyAuth()->getUIDByAuthInfo()); @@ -264,8 +248,9 @@ abstract class CommonController extends BaseController case 'view': case 'index': case 'download': - $this->control = $this->getControlDatas(); - $this->getHelper()->setViewDatas($this->getViewDatas()); + $this->service = $this->getService(); + $this->control = $this->getService()->getControlDatas(); + $this->getService()->getHelper()->setViewDatas($this->getViewDatas()); $actionTemplate = $this->request->getVar('ActionTemplate') ?? $actionTemplate; if ($actionTemplate) { $view_file = $this->view_path . $actionTemplate . DIRECTORY_SEPARATOR . $this->getAction(); @@ -570,28 +555,28 @@ abstract class CommonController extends BaseController { //Filter조건절 처리 $index_filters = []; - foreach ($this->getControlDatas('actionFilters') as $field) { + foreach ($this->getService()->getControlDatas('actionFilters') as $field) { $value = $this->request->getGet($field); if ($value) { $this->getService()->index_condition_filterField($field, $value); $index_filters[$field] = $value; } } - $this->setControlDatas('index_filters', $index_filters); + $this->getService()->setControlDatas('index_filters', $index_filters); //검색어조건절 처리 $index_word = $this->request->getVar('index_word'); if ($index_word !== null && $index_word !== '') { $this->getService()->index_condition_filterWord($index_word); } - $this->setControlDatas('index_word', $index_word); + $this->getService()->setControlDatas('index_word', $index_word); //날자검색 $index_start = $this->request->getVar('index_start'); $index_end = $this->request->getVar('index_end'); if ($index_start !== null && $index_start !== '' && $index_end !== null && $index_end !== '') { $this->getService()->index_condition_filterDate($index_start, $index_end); } - $this->setControlDatas('index_start', $index_start); - $this->setControlDatas('index_end', $index_end); + $this->getService()->setControlDatas('index_start', $index_start); + $this->getService()->setControlDatas('index_end', $index_end); } //PageNation 처리 protected function index_pagenation_process($pager_group = 'default', int $segment = 0, $template = 'bootstrap_full') @@ -637,9 +622,9 @@ abstract class CommonController extends BaseController $this->setFormDatas($this->request->getGet()); $this->setFormOptions(); //일괄작업용 Fields정의 - $this->setControlDatas('batchjob_fields', $this->getService()->getBatchjobFields()); + $this->getService()->setControlDatas('batchjob_fields', $this->getService()->getBatchjobFields()); //일괄작업용 버튼정의 - $this->setControlDatas('batchjob_buttions', $this->getService()->getBatchjobButtons()); + $this->getService()->setControlDatas('batchjob_buttions', $this->getService()->getBatchjobButtons()); helper(['form']); //Return Url정의 $this->getMyAuth()->pushCurrentUrl($this->request->getUri()->getPath() . ($this->request->getUri()->getQuery() ? "?" . $this->request->getUri()->getQuery() : "")); diff --git a/app/Entities/Customer/ClientEntity.php b/app/Entities/Customer/ClientEntity.php index c6b1a9a..3050e36 100644 --- a/app/Entities/Customer/ClientEntity.php +++ b/app/Entities/Customer/ClientEntity.php @@ -22,6 +22,10 @@ class ClientEntity extends CustomerEntity { return $this->attributes['role']; } + public function getSaleRate(): int + { + return $this->attributes['sale_rate'] ?? 0; + } public function getAccountBalance(): int { return $this->attributes['account_balance']; @@ -34,4 +38,8 @@ class ClientEntity extends CustomerEntity { return $this->attributes['point_balance']; } + public function getHistory(): string + { + return $this->attributes['history'] ?? ""; + } } diff --git a/app/Entities/Customer/PaymentEntity.php b/app/Entities/Customer/PaymentEntity.php index 92bc09f..c9848fd 100644 --- a/app/Entities/Customer/PaymentEntity.php +++ b/app/Entities/Customer/PaymentEntity.php @@ -10,13 +10,9 @@ class PaymentEntity extends CustomerEntity const PK = PaymentModel::PK; const TITLE = PaymentModel::TITLE; const DEFAULT_STATUS = STATUS['UNPAID']; - public function getItemType(): string + public function getBilling(): string { - return $this->attributes['item_type']; - } - public function getIsOnetime(): int - { - return $this->attributes['isOnetime']; + return $this->attributes['billing']; } public function getAmount(): int { @@ -26,9 +22,9 @@ class PaymentEntity extends CustomerEntity { return $this->attributes['billing_at']; } - public function getPayMethod(): string + public function getPay(): string { - return $this->attributes['pay_method']; + return $this->attributes['pay']; } public function getCountDueAt(): string { diff --git a/app/Entities/Customer/ServiceEntity.php b/app/Entities/Customer/ServiceEntity.php index d0596b0..8f3ed72 100644 --- a/app/Entities/Customer/ServiceEntity.php +++ b/app/Entities/Customer/ServiceEntity.php @@ -3,6 +3,7 @@ namespace App\Entities\Customer; use App\Entities\Equipment\ServerEntity; +use App\Entities\UserEntity; use App\Models\Customer\ServiceModel; class ServiceEntity extends CustomerEntity @@ -10,6 +11,24 @@ class ServiceEntity extends CustomerEntity const PK = ServiceModel::PK; const TITLE = ServiceModel::TITLE; const DEFAULT_STATUS = STATUS['AVAILABLE']; + public function setUserEntity(UserEntity $entity): ServiceEntity + { + $this->attributes['userEntity'] = $entity; + return $this; + } + public function getUSerEntity(): UserEntity + { + return $this->attributes['userEntity']; + } + public function setClientEntity(UserEntity $entity): ServiceEntity + { + $this->attributes['clientEntity'] = $entity; + return $this; + } + public function getClientEntity(): ClientEntity + { + return $this->attributes['clientEntity']; + } public function setServerEntity(ServerEntity $entity): ServiceEntity { $this->attributes['serverEntity'] = $entity; @@ -23,12 +42,24 @@ class ServiceEntity extends CustomerEntity { return $this->attributes['code']; } + final public function getSite(): string + { + return $this->attributes['site']; + } public function getType(): string { return $this->attributes['type']; } + final public function getLocation(): string + { + return $this->attributes['location']; + } final public function getBillingAt(): string { return $this->attributes['billing_at']; } + final public function getAmount(): int + { + return $this->attributes['amount'] ?? 0; + } } diff --git a/app/Helpers/Customer/ServiceHelper.php b/app/Helpers/Customer/ServiceHelper.php index 8bea334..83121cf 100644 --- a/app/Helpers/Customer/ServiceHelper.php +++ b/app/Helpers/Customer/ServiceHelper.php @@ -37,7 +37,7 @@ class ServiceHelper extends CustomerHelper { switch ($field) { case 'clientinfo_uid': - $value = "" . $viewDatas['control']['field_optons'][$field][$value]->getTitle() . ""; + $value = "" . $viewDatas['control']['field_optons'][$field][$value]->getTitle() . ""; break; case 'serverinfo_uid': $value = array_key_exists('entity', $viewDatas) ? $viewDatas['entity']->getServerEntity()->getCustomTitle() : "지정된서버없음"; diff --git a/app/Helpers/UserSNSHelper.php b/app/Helpers/UserSNSHelper.php new file mode 100644 index 0000000..366d3da --- /dev/null +++ b/app/Helpers/UserSNSHelper.php @@ -0,0 +1,27 @@ +setTitleField(UserModel::TITLE); + } + public function getFieldForm(string $field, mixed $value, array $viewDatas, array $extras = []): string + { + switch ($field) { + case 'passwd': + case 'confirmpassword': + $form = form_password($field, "", [...$extras]); + break; + default: + $form = parent::getFieldForm($field, $value, $viewDatas, $extras); + break; + } + return $form; + } // +} diff --git a/app/Language/en/Customer/Service.php b/app/Language/en/Customer/Service.php index 813499a..8cd5bd7 100644 --- a/app/Language/en/Customer/Service.php +++ b/app/Language/en/Customer/Service.php @@ -33,9 +33,10 @@ return [ "normal" => "일반", "defence" => "방어", "dedicated" => "전용", - "alternative" => "대체", + "vpn" => "VPN", + "event" => "이벤트", "test" => "테스트", - "VPN" => "VPN", + "alternative" => "대체", "ours" => "자사용", "colocation" => "코로케이션", ], diff --git a/app/Models/Customer/PaymentModel.php b/app/Models/Customer/PaymentModel.php index fd9ce02..91cc36f 100644 --- a/app/Models/Customer/PaymentModel.php +++ b/app/Models/Customer/PaymentModel.php @@ -58,25 +58,4 @@ class PaymentModel extends CustomerModel } return $rule; } - - /** - * 서비스(고객)별 미납결제정보 - * @param array checkDate = 'now' , '-1 day' , '-2 day'등 - * @return array> - * [serviceinfo_uid => count], [clientinfo_uid => count] - */ - final public function getUnPaidCount(string $checkDate = 'now', string $idx_field = "serviceinfo_uid"): array - { - // strtotime 기준으로 날짜 계산 - $dateTime = date('Y-m-d H:i:s', strtotime($checkDate)); - $rows = $this->asArray() - ->select("{$idx_field}, COUNT(*) as cnt") - ->where('billing_at <', $dateTime) - ->where('amount >', 0) - ->where('status', STATUS['UNPAID']) - ->groupBy($idx_field) - ->findAll(); - //array_column($rows, 'cnt', 'serviceinfo_uid')는 serviceinfo_uid를 키로 하고 cnt를 값으로 하는 연관 배열을 생성합니다. - return array_column($rows, 'cnt', $idx_field); - } } diff --git a/app/Services/Auth/AuthService.php b/app/Services/Auth/AuthService.php index 61d0f5d..37b89b5 100644 --- a/app/Services/Auth/AuthService.php +++ b/app/Services/Auth/AuthService.php @@ -3,18 +3,20 @@ namespace App\Services\Auth; use App\Entities\UserEntity; +use App\Helpers\CommonHelper; +use App\Models\CommonModel; use App\Services\CommonService; use CodeIgniter\Session\Session; -use CodeIgniter\Model; + // 참고:https://github.com/SyntaxPhoenix/iloclient abstract class AuthService extends CommonService { private ?Session $_session = null; private $url_stack_name = "url_stack"; - protected function __construct(Model $model) + protected function __construct(CommonModel $model, CommonHelper $helper) { - parent::__construct($model); + parent::__construct($model, $helper); $this->addClassName('Auth'); } abstract public function login(array $formDatas): UserEntity; diff --git a/app/Services/Auth/GoogleService.php b/app/Services/Auth/GoogleService.php index 5505506..0dc522f 100644 --- a/app/Services/Auth/GoogleService.php +++ b/app/Services/Auth/GoogleService.php @@ -3,6 +3,7 @@ namespace App\Services\Auth; use App\Entities\UserEntity; +use App\Helpers\UserHelper; use App\Models\UserModel; use App\Libraries\MySocket\GoogleSocket\CURL; use CodeIgniter\Exceptions\PageNotFoundException; @@ -13,7 +14,7 @@ class GoogleService extends AuthService public function __construct(mixed $mySocket) { $this->_mySocket = $mySocket; - parent::__construct(new UserModel()); + parent::__construct(new UserModel(), new UserHelper()); $this->addClassName('Google'); } public function getMySocket(): mixed diff --git a/app/Services/Auth/LocalService.php b/app/Services/Auth/LocalService.php index f438316..e41b938 100644 --- a/app/Services/Auth/LocalService.php +++ b/app/Services/Auth/LocalService.php @@ -3,13 +3,14 @@ namespace App\Services\Auth; use App\Entities\UserEntity; +use App\Helpers\UserHelper; use App\Models\UserModel; class LocalService extends AuthService { public function __construct() { - parent::__construct(new UserModel()); + parent::__construct(new UserModel(), new UserHelper()); $this->addClassName('Local'); } public function getFormFields(): array diff --git a/app/Services/CommonService.php b/app/Services/CommonService.php index 9c5fc92..dede8e6 100644 --- a/app/Services/CommonService.php +++ b/app/Services/CommonService.php @@ -2,20 +2,45 @@ namespace App\Services; -use App\Entities\CommonEntity; use App\Entities\FormOptionEntity; -use CodeIgniter\Model; +use App\Models\CommonModel; +use App\Helpers\CommonHelper; abstract class CommonService { private $_model = null; + private $_helper = null; + private $_classNames = []; - protected function __construct(Model $model) + private $_control = []; + protected function __construct(CommonModel $model, CommonHelper $helper) { $this->_model = $model; + $this->_helper = $helper; } abstract public function getFormFields(): array; abstract public function getFormFilters(): array; + final public function getHelper(): mixed + { + if (!$this->_helper) { + throw new \Exception("Helper가 정의되지 않았습니다. " . __METHOD__); + } + return $this->_helper; + } + final public function getControlDatas(?string $key = null): mixed + { + if (!$key) { + return $this->_control; + } + return array_key_exists($key, $this->_control) ? $this->_control[$key] : null; + } + final public function setControlDatas(string $key, mixed $values): void + { + if (!array_key_exists($key, $this->_control)) { + $this->_control[$key] = []; + } + $this->_control[$key] = $values; + } final protected function addClassName(string $className): void { $this->_classNames[] = $className; diff --git a/app/Services/Customer/AccountService.php b/app/Services/Customer/AccountService.php index f247773..76703ae 100644 --- a/app/Services/Customer/AccountService.php +++ b/app/Services/Customer/AccountService.php @@ -3,14 +3,14 @@ namespace App\Services\Customer; use App\Entities\Customer\AccountEntity; +use App\Helpers\Customer\AccountHelper; use App\Models\Customer\AccountModel; -use App\Entities\Customer\ClientEntity; class AccountService extends CustomerService { public function __construct() { - parent::__construct(new AccountModel()); + parent::__construct(new AccountModel(), new AccountHelper()); $this->addClassName('Account'); } public function getFormFields(): array diff --git a/app/Services/Customer/ClientService.php b/app/Services/Customer/ClientService.php index d5c5ae0..e46d6f9 100644 --- a/app/Services/Customer/ClientService.php +++ b/app/Services/Customer/ClientService.php @@ -3,13 +3,14 @@ namespace App\Services\Customer; use App\Entities\Customer\ClientEntity; +use App\Helpers\Customer\ClientHelper; use App\Models\Customer\ClientModel; class ClientService extends CustomerService { public function __construct() { - parent::__construct(new ClientModel()); + parent::__construct(new ClientModel(), new ClientHelper()); $this->addClassName('Client'); } public function getFormFields(): array diff --git a/app/Services/Customer/CouponService.php b/app/Services/Customer/CouponService.php index 559b712..643887a 100644 --- a/app/Services/Customer/CouponService.php +++ b/app/Services/Customer/CouponService.php @@ -3,14 +3,14 @@ namespace App\Services\Customer; use App\Entities\Customer\CouponEntity; +use App\Helpers\Customer\CouponHelper; use App\Models\Customer\CouponModel; -use App\Entities\Customer\ClientEntity; class CouponService extends CustomerService { public function __construct() { - parent::__construct(new CouponModel()); + parent::__construct(new CouponModel(), new CouponHelper()); $this->addClassName('Coupon'); } public function getFormFields(): array diff --git a/app/Services/Customer/CustomerService.php b/app/Services/Customer/CustomerService.php index 6d58faa..42e23b8 100644 --- a/app/Services/Customer/CustomerService.php +++ b/app/Services/Customer/CustomerService.php @@ -3,9 +3,12 @@ namespace App\Services\Customer; use App\Entities\Customer\ClientEntity; -use App\Services\CommonService; +use App\Helpers\CommonHelper; +use App\Models\CommonModel; +use App\Services\CommonService; use App\Services\Customer\ClientService; +use App\Services\Customer\PaymentService; use App\Services\Equipment\ServerService; use App\Services\Equipment\SwitchService; use App\Services\UserService; @@ -18,11 +21,12 @@ abstract class CustomerService extends CommonService private ?ServiceService $_serviceService = null; private ?ServerService $_serverService = null; private ?SwitchService $_switchService = null; + private ?PaymentService $_paymentServiceService = null; private $_equipmentService = []; - protected function __construct(Model $model) + protected function __construct(CommonModel $model, CommonHelper $helper) { - parent::__construct($model); + parent::__construct($model, $helper); $this->addClassName('Customer'); } final public function getClientService(): ClientService @@ -46,6 +50,13 @@ abstract class CustomerService extends CommonService } return $this->_serviceService; } + final public function getPaymentService(): PaymentService + { + if (!$this->_paymentServiceService) { + $this->_paymentServiceService = new PaymentService(); + } + return $this->_paymentServiceService; + } final public function getSwitchService(): SwitchService { if (!$this->_switchService) { diff --git a/app/Services/Customer/PaymentService.php b/app/Services/Customer/PaymentService.php index 3e61287..9d8b9a6 100644 --- a/app/Services/Customer/PaymentService.php +++ b/app/Services/Customer/PaymentService.php @@ -3,13 +3,14 @@ namespace App\Services\Customer; use App\Entities\Customer\PaymentEntity; +use App\Helpers\Customer\PaymentHelper; use App\Models\Customer\PaymentModel; class PaymentService extends CustomerService { public function __construct() { - parent::__construct(new PaymentModel()); + parent::__construct(new PaymentModel(), new PaymentHelper()); $this->addClassName('Payment'); } public function getModelClass(): PaymentModel @@ -95,9 +96,21 @@ class PaymentService extends CustomerService $this->getModel()->orderBy('billing_at ASC'); parent::setOrderBy($field, $value); } - //미납서비스 정보 - final public function getUnPaidCount(string $checkDate = 'now', string $idx_field = "serviceinfo_uid"): array + //총 미납건수, 금액 + public function getUnPaids(string $group, array $where = []): array { - return $this->getModel()->getUnPaidCount($checkDate, $idx_field); + $rows = $this->getModel()->groupBy($group) + ->select("{$group}, COUNT(uid) as cnt, SUM(amount) as amount") + ->where(['billing_at <=' => date('Y-m-d')]) + ->where(['status' => STATUS['UNPAID']]) + ->where($where) + ->get()->getResult(); + $unpaids = []; + foreach ($rows as $row) { + $unpaids[$row->$group] = [];; + $unpaids[$row->$group]['count'] = $row->cnt; + $unpaids[$row->$group]['amount'] = $row->amount; + } + return $unpaids; } } diff --git a/app/Services/Customer/PointService.php b/app/Services/Customer/PointService.php index e8442c7..f98957f 100644 --- a/app/Services/Customer/PointService.php +++ b/app/Services/Customer/PointService.php @@ -3,14 +3,14 @@ namespace App\Services\Customer; use App\Entities\Customer\PointEntity; +use App\Helpers\Customer\PointHelper; use App\Models\Customer\PointModel; -use App\Entities\Customer\ClientEntity; class PointService extends CustomerService { public function __construct() { - parent::__construct(new PointModel()); + parent::__construct(new PointModel(), new PointHelper()); $this->addClassName('Point'); } public function getFormFields(): array diff --git a/app/Services/Customer/ServiceService.php b/app/Services/Customer/ServiceService.php index 7767cd2..d028c2f 100644 --- a/app/Services/Customer/ServiceService.php +++ b/app/Services/Customer/ServiceService.php @@ -2,8 +2,11 @@ namespace App\Services\Customer; +use App\Entities\Customer\ClientEntity; use App\Entities\Customer\ServiceEntity; use App\Entities\Equipment\ServerEntity; +use App\Entities\UserEntity; +use App\Helpers\Customer\ServiceHelper; use App\Models\Customer\ServiceModel; use App\Services\Equipment\ServerService; use App\Traits\IPTrait; @@ -14,7 +17,7 @@ class ServiceService extends CustomerService private ?ServerService $_serverService = null; public function __construct() { - parent::__construct(new ServiceModel()); + parent::__construct(new ServiceModel(), new ServiceHelper()); $this->addClassName('Service'); } public function getFormFields(): array @@ -95,6 +98,18 @@ class ServiceService extends CustomerService if (!($entity instanceof ServiceEntity)) { throw new \Exception(__METHOD__ . "에서 형식오류:ServiceEntity만 허용됩니다."); } + //관리자정보 정의 + $userEntity = $this->getUserService()->getEntity($entity->getUserUID()); + if (!($userEntity instanceof UserEntity)) { + throw new \Exception("{$entity->getUserUID()}에 해당하는 관리자정보를 찾을수 없습니다."); + } + $entity = $entity->setUserEntity($userEntity); + //고객정보 정의 + $clientEntity = $this->getClientService()->getEntity($entity->getClientInfoUID()); + if (!($clientEntity instanceof ClientEntity)) { + throw new \Exception("{$entity->getClientInfoUID()}에 해당하는 고객정보를 찾을수 없습니다."); + } + $entity = $entity->setUserEntity($userEntity); //서버정보 정의 $serverEntity = $this->getServerService()->getEntity(['serviceinfo_uid' => $entity->getPK()]); if (!($serverEntity instanceof ServerEntity)) { @@ -130,24 +145,27 @@ class ServiceService extends CustomerService return $this->getEntities(sprintf("start_at >= NOW()-INTERVAL {$interval} DAY AND status = '%s'", $status)); } //서비스 방식에 따른 서비스별 Count - final public function getTotalCountsByType(): array + final public function getTotalCountsByType(array $where = []): array { $totalCounts = [ 'chiba_total' => 0, 'tokyo_total' => 0, - 'all_total' => 0, + 'all_total' => 0, 'normal' => ['chiba' => 0, 'tokyo' => 0, 'total' => 0], 'defence' => ['chiba' => 0, 'tokyo' => 0, 'total' => 0], 'dedicated' => ['chiba' => 0, 'tokyo' => 0, 'total' => 0], - 'alternative' => ['chiba' => 0, 'tokyo' => 0, 'total' => 0], + 'vpn' => ['chiba' => 0, 'tokyo' => 0, 'total' => 0], + 'event' => ['chiba' => 0, 'tokyo' => 0, 'total' => 0], 'test' => ['chiba' => 0, 'tokyo' => 0, 'total' => 0], + 'alternative' => ['chiba' => 0, 'tokyo' => 0, 'total' => 0], ]; - $sql = "SELECT type, + $rows = $this->getModel()->groupBy('type')->select("type, COUNT(CASE WHEN location = 'chiba' THEN 1 END) AS chiba, COUNT(CASE WHEN location = 'tokyo' THEN 1 END) AS tokyo, - COUNT(CASE WHEN location IN ('chiba', 'tokyo') THEN 1 END) AS total - FROM serviceinfo GROUP BY type"; - foreach ($this->getModel()->query($sql)->getResult() as $row) { + COUNT(CASE WHEN location IN ('chiba', 'tokyo') THEN 1 END) AS total") + ->where($where) + ->get()->getResult(); + foreach ($rows as $row) { $totalCounts[$row->type] = [ 'chiba' => $row->chiba, 'tokyo' => $row->tokyo, @@ -159,6 +177,18 @@ class ServiceService extends CustomerService $totalCounts['all_total'] = $totalCounts['chiba_total'] + $totalCounts['tokyo_total']; return $totalCounts; } + //서비스별 총 금액 + final public function getTotalAmounts($where = []): array + { + $rows = $this->getModel()->groupBy('clientinfo_uid')->select("clientinfo_uid,SUM(amount) AS amount") + ->where($where) + ->get()->getResult(); + $amounts = []; + foreach ($rows as $row) { + $amounts[$row->clientinfo_uid] = $row->amount; + } + return $amounts; + } //다음 달로 결제일을 연장합니다. final public function extendBillingAt(string $billing_at, string $status): bool { @@ -169,7 +199,6 @@ class ServiceService extends CustomerService ) WHERE billing_at = ? AND status = ?"; return $this->getModel()->query($sql, [$billing_at, $status]); } - //서버정보 상태설정용 private function setServer_process(ServiceEntity $entity, mixed $serverinfo_uid, string $status): ServiceEntity { diff --git a/app/Services/Equipment/CSService.php b/app/Services/Equipment/CSService.php index 1700af6..3cd3d79 100644 --- a/app/Services/Equipment/CSService.php +++ b/app/Services/Equipment/CSService.php @@ -2,13 +2,14 @@ namespace App\Services\Equipment; +use App\Helpers\Equipment\CSHelper; use App\Models\Equipment\CSModel; class CSService extends EquipmentService { public function __construct() { - parent::__construct(new CSModel()); + parent::__construct(new CSModel(), new CSHelper()); $this->addClassName('CS'); } public function getFormFields(): array diff --git a/app/Services/Equipment/EquipmentService.php b/app/Services/Equipment/EquipmentService.php index b9f4f05..2b670bf 100644 --- a/app/Services/Equipment/EquipmentService.php +++ b/app/Services/Equipment/EquipmentService.php @@ -2,11 +2,13 @@ namespace App\Services\Equipment; -use App\Services\CommonService; +use App\Entities\Customer\ClientEntity; +use App\Helpers\CommonHelper; +use App\Models\CommonModel; +use App\Services\CommonService; use App\Services\Customer\ClientService; use App\Services\Customer\ServiceService; -use App\Entities\Customer\ClientEntity; use App\Services\Equipment\ServerService; use App\Services\UserService; use CodeIgniter\Model; @@ -17,9 +19,9 @@ abstract class EquipmentService extends CommonService private ?ClientService $_clientService = null; private ?ServiceService $_serviceService = null; private ?ServerService $_serverService = null; - protected function __construct(Model $model) + protected function __construct(CommonModel $model, CommonHelper $helper) { - parent::__construct($model); + parent::__construct($model, $helper); $this->addClassName('Equipment'); } final public function getClientService(): ClientService diff --git a/app/Services/Equipment/IPService.php b/app/Services/Equipment/IPService.php index 40c1475..04118aa 100644 --- a/app/Services/Equipment/IPService.php +++ b/app/Services/Equipment/IPService.php @@ -5,6 +5,7 @@ namespace App\Services\Equipment; use App\Entities\Equipment\IPEntity; use App\Entities\Equipment\LineEntity; use App\Entities\Equipment\ServerEntity; +use App\Helpers\Equipment\IPHelper; use App\Models\Equipment\IPModel; use App\Services\Equipment\EquipmentService; use App\Services\Equipment\LineService; @@ -14,7 +15,7 @@ class IPService extends EquipmentService private ?LineService $_lineService = null; public function __construct() { - parent::__construct(new IPModel()); + parent::__construct(new IPModel(), new IPHelper()); $this->addClassName('IP'); } public function getFormFields(): array diff --git a/app/Services/Equipment/LineService.php b/app/Services/Equipment/LineService.php index 2776d6e..752a576 100644 --- a/app/Services/Equipment/LineService.php +++ b/app/Services/Equipment/LineService.php @@ -2,13 +2,14 @@ namespace App\Services\Equipment; +use App\Helpers\Equipment\LineHelper; use App\Models\Equipment\LineModel; class LineService extends EquipmentService { public function __construct() { - parent::__construct(new LineModel()); + parent::__construct(new LineModel(), new LineHelper()); $this->addClassName('Line'); } public function getFormFields(): array diff --git a/app/Services/Equipment/PartService.php b/app/Services/Equipment/PartService.php index 057b41b..1d03fc7 100644 --- a/app/Services/Equipment/PartService.php +++ b/app/Services/Equipment/PartService.php @@ -3,13 +3,14 @@ namespace App\Services\Equipment; use App\Entities\Equipment\PartEntity; +use App\Helpers\Equipment\PartHelper; use App\Models\Equipment\PartModel; class PartService extends EquipmentService { public function __construct() { - parent::__construct(new PartModel()); + parent::__construct(new PartModel(), new PartHelper()); $this->addClassName('Part'); } public function getFormFields(): array diff --git a/app/Services/Equipment/ServerPartService.php b/app/Services/Equipment/ServerPartService.php index 9b79932..f1a2d3d 100644 --- a/app/Services/Equipment/ServerPartService.php +++ b/app/Services/Equipment/ServerPartService.php @@ -17,7 +17,7 @@ class ServerPartService extends EquipmentService private ?CSService $_csService = null; public function __construct() { - parent::__construct(new ServerPartModel()); + parent::__construct(new ServerPartModel(), new ServerPartHelper()); $this->addClassName('ServerPart'); } public function getFormFields(): array diff --git a/app/Services/Equipment/ServerService.php b/app/Services/Equipment/ServerService.php index 1d54a5a..d324387 100644 --- a/app/Services/Equipment/ServerService.php +++ b/app/Services/Equipment/ServerService.php @@ -2,9 +2,9 @@ namespace App\Services\Equipment; -use App\Entities\CommonEntity; use App\Entities\Customer\ServiceEntity; use App\Entities\Equipment\ServerEntity; +use App\Helpers\Equipment\ServerHelper; use App\Models\Equipment\ServerModel; use App\Services\Equipment\EquipmentService; @@ -13,7 +13,7 @@ class ServerService extends EquipmentService private ?ServerPartService $_serverPartService = null; public function __construct() { - parent::__construct(new ServerModel()); + parent::__construct(new ServerModel(), new ServerHelper()); $this->addClassName('Server'); } public function getFormFields(): array diff --git a/app/Services/Equipment/SwitchService.php b/app/Services/Equipment/SwitchService.php index ae6e4e5..2ed688f 100644 --- a/app/Services/Equipment/SwitchService.php +++ b/app/Services/Equipment/SwitchService.php @@ -2,16 +2,16 @@ namespace App\Services\Equipment; -use App\Services\Equipment\EquipmentService; -use App\Models\Equipment\SwitchModel; use App\Entities\Equipment\SwitchEntity; -use App\Entities\Equipment\ServerEntity; +use App\Helpers\Equipment\SwitchHelper; +use App\Models\Equipment\SwitchModel; +use App\Services\Equipment\EquipmentService; class SwitchService extends EquipmentService { public function __construct() { - parent::__construct(new SwitchModel()); + parent::__construct(new SwitchModel(), new SwitchHelper()); $this->addClassName('Switch'); } public function getFormFields(): array diff --git a/app/Services/MyLogService.php b/app/Services/MyLogService.php index 826ca5d..83b0f4b 100644 --- a/app/Services/MyLogService.php +++ b/app/Services/MyLogService.php @@ -3,8 +3,10 @@ namespace App\Services; use App\Entities\MyLogEntity; -use App\Models\MyLogModel; +use App\Helpers\MyLogHelper; use App\Libraries\LogCollector; +use App\Models\MyLogModel; +use App\Services\CommonService; use App\Services\UserService; class MyLogService extends CommonService @@ -12,7 +14,7 @@ class MyLogService extends CommonService private $_userService = null; public function __construct() { - parent::__construct(new MyLogModel()); + parent::__construct(new MyLogModel(), new MyLogHelper()); $this->addClassName('MyLog'); } public function getFormFields(): array diff --git a/app/Services/UserSNSService.php b/app/Services/UserSNSService.php index da08984..8f3eda3 100644 --- a/app/Services/UserSNSService.php +++ b/app/Services/UserSNSService.php @@ -2,15 +2,15 @@ namespace App\Services; +use App\Helpers\UserSNSHelper; use App\Models\UserSNSModel; -use App\Entities\UserSNSEntity; // use Google\Service\AndroidEnterprise\Resource\Users; class UserSNSService extends CommonService { public function __construct() { - parent::__construct(new UserSNSModel()); + parent::__construct(new UserSNSModel(), new UserSNSHelper()); $this->addClassName('UserSNS'); } public function getFormFields(): array diff --git a/app/Services/UserService.php b/app/Services/UserService.php index 59cf13f..681d2bb 100644 --- a/app/Services/UserService.php +++ b/app/Services/UserService.php @@ -3,13 +3,14 @@ namespace App\Services; use App\Entities\UserEntity; +use App\Helpers\UserHelper; use App\Models\UserModel; class UserService extends CommonService { public function __construct() { - parent::__construct(new UserModel()); + parent::__construct(new UserModel(), new UserHelper()); $this->addClassName('User'); } public function getFormFields(): array diff --git a/app/Views/admin/client/detail.php b/app/Views/admin/client/detail.php new file mode 100644 index 0000000..c20c06e --- /dev/null +++ b/app/Views/admin/client/detail.php @@ -0,0 +1,141 @@ +extend(LAYOUTS[$viewDatas['layout']]['path']) ?> +section('content') ?> +getHelper()->alert($error) ?> +
include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?>
+ + + + + + +
+ + include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu'); ?> + + + +
include("templates/{$viewDatas['layout']}/index_header"); ?>
+
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
getTitle() ?>
+ +
도코치바VPN일반방어전용이벤트테스트대체쿠폰장기할인예치금전체요금전체미납금
getCouponBalance() ?>%getSaleRate() ?>%getAccountBalance() ?>getPK(), $viewDatas['totalAmounts']) ? number_format($viewDatas['totalAmounts'][$viewDatas['entity']->getPK()]) : 0 ?>getPK(), $viewDatas['unPaids']) ? number_format($viewDatas['unPaids'][$viewDatas['entity']->getPK()]['amount']) : 0 ?>
+
+
+
+
고객 비고
+
+
+ +
+
+ +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[상세정보]사이트위치형식CPU메모리저장장치OSSOFTWAREIP주소CS결제처리
+
getCode() ?>
+
getServerEntity()->getCode() ?>
+
getFieldView('site', $serviceEntity->getSite(), $viewDatas) ?>getFieldView('location', $serviceEntity->getLocation(), $viewDatas) ?>getFieldView('type', $serviceEntity->getType(), $viewDatas) ?>CPU메모리저장장치OSSOFTWAREIP주소CS + + + + + + + + + + + + + +
결제일2025-09-11
결제금500,000
미납금500,000
+
서비스 비고
서비스 비고
+
+ +
+ +
+ + +
+ +
include(LAYOUTS[$viewDatas['layout']]['path'] . '/bottom'); ?>
+endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/create_form.php b/app/Views/admin/create_form.php index 8c6950a..9e537b1 100644 --- a/app/Views/admin/create_form.php +++ b/app/Views/admin/create_form.php @@ -1,6 +1,6 @@ extend(LAYOUTS[$viewDatas['layout']]['path']) ?> section('content') ?> -alert($error) ?> +getHelper()->alert($error) ?>
include("templates/{$viewDatas['layout']}/form_content_top"); ?>
@@ -8,9 +8,9 @@ - + diff --git a/app/Views/admin/download.php b/app/Views/admin/download.php index e988fcb..0f7c82b 100644 --- a/app/Views/admin/download.php +++ b/app/Views/admin/download.php @@ -12,7 +12,7 @@ - + diff --git a/app/Views/admin/index.php b/app/Views/admin/index.php index 0edc1ef..f0d5571 100644 --- a/app/Views/admin/index.php +++ b/app/Views/admin/index.php @@ -1,6 +1,6 @@ extend(LAYOUTS[$viewDatas['layout']]['path']) ?> section('content') ?> -alert($error) ?> +getHelper()->alert($error) ?>
include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?>
getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?>getHelper()->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?> - getFieldForm($field, old($field) ?? ($viewDatas['control']['form_datas'][$field] ?? null), $viewDatas) ?> + getHelper()->getFieldForm($field, old($field) ?? ($viewDatas['control']['form_datas'][$field] ?? null), $viewDatas) ?>
getFieldView($field, $entity->$field, $viewDatas) ?>getHelper()->getFieldView($field, $entity->$field, $viewDatas) ?>
@@ -22,7 +22,7 @@ include("templates/{$viewDatas['layout']}/index_content_top"); ?> @@ -35,7 +35,7 @@ - + @@ -45,14 +45,14 @@ getStatus() === $viewDatas['entity']::DEFAULT_STATUS ? "" : 'class="table-danger"' ?>> - + - + diff --git a/app/Views/admin/modify_form.php b/app/Views/admin/modify_form.php index 37771f5..972209f 100644 --- a/app/Views/admin/modify_form.php +++ b/app/Views/admin/modify_form.php @@ -1,6 +1,6 @@ extend(LAYOUTS[$viewDatas['layout']]['path']) ?> section('content') ?> -alert($error) ?> +getHelper()->alert($error) ?>
include("templates/{$viewDatas['layout']}/form_content_top"); ?>
'action_form', ...$viewDatas['forms']['attributes']], $viewDatas['forms']['hiddens']) ?> @@ -8,9 +8,9 @@
번호 getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?>getHelper()->getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?> 작업
getListButton('modify', '', $viewDatas) ?>getHelper()->getListButton('modify', '', $viewDatas) ?> getFieldView($field, $entity->$field, $viewDatas) ?>getHelper()->getFieldView($field, $entity->$field, $viewDatas) ?> - getListButton('view', '', $viewDatas) ?>  - getListButton('history', '', $viewDatas) ?>  - getListButton('delete', '', $viewDatas) ?> + getHelper()->getListButton('view', '', $viewDatas) ?>  + getHelper()->getListButton('history', '', $viewDatas) ?>  + getHelper()->getListButton('delete', '', $viewDatas) ?>
- + diff --git a/app/Views/admin/popup/create_form.php b/app/Views/admin/popup/create_form.php index 8c6950a..9e537b1 100644 --- a/app/Views/admin/popup/create_form.php +++ b/app/Views/admin/popup/create_form.php @@ -1,6 +1,6 @@ extend(LAYOUTS[$viewDatas['layout']]['path']) ?> section('content') ?> -alert($error) ?> +getHelper()->alert($error) ?>
include("templates/{$viewDatas['layout']}/form_content_top"); ?>
@@ -8,9 +8,9 @@
getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?>getHelper()->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?> - getFieldForm($field, old($field) ?? $viewDatas['entity']->$field ?? null, $viewDatas) ?> + getHelper()->getFieldForm($field, old($field) ?? $viewDatas['entity']->$field ?? null, $viewDatas) ?>
- + diff --git a/app/Views/admin/popup/index.php b/app/Views/admin/popup/index.php index cb8748e..f60bd2a 100644 --- a/app/Views/admin/popup/index.php +++ b/app/Views/admin/popup/index.php @@ -1,6 +1,6 @@ extend(LAYOUTS[$viewDatas['layout']]['path']) ?> section('content') ?> -alert($error) ?> +getHelper()->alert($error) ?>
@@ -11,7 +11,7 @@
@@ -23,7 +23,7 @@ - + @@ -34,13 +34,13 @@ getStatus() === $viewDatas['entity']::DEFAULT_STATUS ? "" : 'class="table-danger"' ?>> - + - + diff --git a/app/Views/admin/popup/modify_form.php b/app/Views/admin/popup/modify_form.php index a806e01..587ae3f 100644 --- a/app/Views/admin/popup/modify_form.php +++ b/app/Views/admin/popup/modify_form.php @@ -1,6 +1,6 @@ extend(LAYOUTS[$viewDatas['layout']]['path']) ?> section('content') ?> -alert($error) ?> +getHelper()->alert($error) ?>
include("templates/{$viewDatas['layout']}/form_content_top"); ?>
@@ -8,9 +8,9 @@
getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?>getHelper()->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?> - getFieldForm($field, old($field) ?? ($viewDatas['control']['form_datas'][$field] ?? null), $viewDatas) ?> + getHelper()->getFieldForm($field, old($field) ?? ($viewDatas['control']['form_datas'][$field] ?? null), $viewDatas) ?>
번호 getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?>getHelper()->getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?> 작업
getListButton('modify', '', $viewDatas) ?>getHelper()->getListButton('modify', '', $viewDatas) ?> getFieldView($field, $entity->$field, $viewDatas) ?>getHelper()->getFieldView($field, $entity->$field, $viewDatas) ?> - getListButton('view', '', $viewDatas) ?>  - getListButton('delete', '', $viewDatas) ?> + getHelper()->getListButton('view', '', $viewDatas) ?>  + getHelper()->getListButton('delete', '', $viewDatas) ?>
- + diff --git a/app/Views/admin/popup/view.php b/app/Views/admin/popup/view.php index 6ecd1a1..ddf121c 100644 --- a/app/Views/admin/popup/view.php +++ b/app/Views/admin/popup/view.php @@ -1,14 +1,14 @@ extend(LAYOUTS[$viewDatas['layout']]['path']) ?> section('content') ?> -alert($error) ?> +getHelper()->alert($error) ?>
getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?>getHelper()->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?> - getFieldForm($field, old($field) ?? ($viewDatas['entity']->$field ?? null), $viewDatas) ?> + getHelper()->getFieldForm($field, old($field) ?? ($viewDatas['entity']->$field ?? null), $viewDatas) ?>
- - + +
getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?>getFieldView($field, $viewDatas['entity']->$field, $viewDatas) ?>getHelper()->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?>getHelper()->getFieldView($field, $viewDatas['entity']->$field, $viewDatas) ?>
diff --git a/app/Views/admin/search/index.php b/app/Views/admin/search/index.php deleted file mode 100644 index a53906a..0000000 --- a/app/Views/admin/search/index.php +++ /dev/null @@ -1,70 +0,0 @@ -extend(LAYOUTS[$viewDatas['layout']]['path']) ?> -section('content') ?> -alert($error) ?> -
include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?>
- - - - - - -
- - include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu'); ?> - - - -
include("templates/{$viewDatas['layout']}/index_header"); ?>
-
- -
- include("templates/{$viewDatas['layout']}/index_content_top"); ?> - 'batchjob_form', 'method' => "post"]) ?> - - - - - - - - - - - - - - - getStatus() === $viewDatas['entity']::DEFAULT_STATUS ? "" : 'class="table-danger"' ?>> - - - - - - - - - - - - - -
번호getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?>작업
getListButton('modify', '', $viewDatas) ?>getFieldView($field, $entity->$field, $viewDatas) ?> - getListButton('view', '', $viewDatas) ?>  - getListButton('history', '', $viewDatas) ?>  - getListButton('delete', '', $viewDatas) ?> -
- - $label): ?> - $label): ?> -
getFieldLabel($item_type, $label, $viewDatas) ?>
getFieldView($item_type, $entity->$item_type, $viewDatas) ?>
-
- include("templates/{$viewDatas['layout']}/index_content_bottom"); ?> - -
-
- - -
- -
include(LAYOUTS[$viewDatas['layout']]['path'] . '/bottom'); ?>
-endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/server/create_form.php b/app/Views/admin/server/create_form.php index c971b79..1a5db42 100644 --- a/app/Views/admin/server/create_form.php +++ b/app/Views/admin/server/create_form.php @@ -1,6 +1,6 @@ extend(LAYOUTS[$viewDatas['layout']]['path']) ?> section('content') ?> -alert($error) ?> +getHelper()->alert($error) ?>
include("templates/{$viewDatas['layout']}/form_content_top"); ?>
@@ -15,9 +15,9 @@ - + @@ -28,12 +28,12 @@
getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?>getHelper()->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?> - getFieldForm($field, old($field, $viewDatas['control']['form_datas'][$field] ?? null), $viewDatas) ?> + getHelper()->getFieldForm($field, old($field, $viewDatas['control']['form_datas'][$field] ?? null), $viewDatas) ?>
- + diff --git a/app/Views/admin/server/index.php b/app/Views/admin/server/index.php index 03490e7..4d6eaec 100644 --- a/app/Views/admin/server/index.php +++ b/app/Views/admin/server/index.php @@ -1,6 +1,6 @@ extend(LAYOUTS[$viewDatas['layout']]['path']) ?> section('content') ?> -alert($error) ?> +getHelper()->alert($error) ?>
include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?>
getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?>getHelper()->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?> - getFieldForm($field, old($field, $viewDatas['control']['form_datas'][$field] ?? null), $viewDatas) ?> - getFieldForm("{$field}_cnt", old("{$field}_cnt", $viewDatas['control']['form_datas']["{$field}_cnt"] ?? 1), $viewDatas) ?> + getHelper()->getFieldForm($field, old($field, $viewDatas['control']['form_datas'][$field] ?? null), $viewDatas) ?> + getHelper()->getFieldForm("{$field}_cnt", old("{$field}_cnt", $viewDatas['control']['form_datas']["{$field}_cnt"] ?? 1), $viewDatas) ?> - getFieldForm("{$field}_extra", old("{$field}_extra", $viewDatas['control']['form_datas']["{$field}_extra"] ?? null), $viewDatas) ?> + getHelper()->getFieldForm("{$field}_extra", old("{$field}_extra", $viewDatas['control']['form_datas']["{$field}_extra"] ?? null), $viewDatas) ?>
@@ -22,7 +22,7 @@ include("templates/{$viewDatas['layout']}/index_content_top"); ?> @@ -35,22 +35,22 @@ @@ -61,37 +61,37 @@ getStatus() === $entity::DEFAULT_STATUS ? "" : 'class="table-danger"' ?>> - + - + diff --git a/app/Views/admin/server/modify_form.php b/app/Views/admin/server/modify_form.php index 8acd5d9..ddb8312 100644 --- a/app/Views/admin/server/modify_form.php +++ b/app/Views/admin/server/modify_form.php @@ -1,6 +1,6 @@ extend(LAYOUTS[$viewDatas['layout']]['path']) ?> section('content') ?> -alert($error) ?> +getHelper()->alert($error) ?>
include("templates/{$viewDatas['layout']}/form_content_top"); ?>
@@ -8,9 +8,9 @@
번호 - getListLabel('clientinfo_uid', lang("{$viewDatas['class_path']}.label.clientinfo_uid"), $viewDatas) ?>/ - getListLabel('serviceinfo_uid', lang("{$viewDatas['class_path']}.label.serviceinfo_uid"), $viewDatas) ?> + getHelper()->getListLabel('clientinfo_uid', lang("{$viewDatas['class_path']}.label.clientinfo_uid"), $viewDatas) ?>/ + getHelper()->getListLabel('serviceinfo_uid', lang("{$viewDatas['class_path']}.label.serviceinfo_uid"), $viewDatas) ?> - getListLabel('type', lang("{$viewDatas['class_path']}.label.type"), $viewDatas) ?>/ - getListLabel('title', lang("{$viewDatas['class_path']}.label.title"), $viewDatas) ?> + getHelper()->getListLabel('type', lang("{$viewDatas['class_path']}.label.type"), $viewDatas) ?>/ + getHelper()->getListLabel('title', lang("{$viewDatas['class_path']}.label.title"), $viewDatas) ?> - getListLabel('price', lang("{$viewDatas['class_path']}.label.price"), $viewDatas) ?> + getHelper()->getListLabel('price', lang("{$viewDatas['class_path']}.label.price"), $viewDatas) ?> - getListLabel('manufactur_at', lang("{$viewDatas['class_path']}.label.manufactur_at"), $viewDatas) ?>/ - getListLabel('format_at', lang("{$viewDatas['class_path']}.label.format_at"), $viewDatas) ?> + getHelper()->getListLabel('manufactur_at', lang("{$viewDatas['class_path']}.label.manufactur_at"), $viewDatas) ?>/ + getHelper()->getListLabel('format_at', lang("{$viewDatas['class_path']}.label.format_at"), $viewDatas) ?> - getListLabel('status', lang("{$viewDatas['class_path']}.label.status"), $viewDatas) ?> + getHelper()->getListLabel('status', lang("{$viewDatas['class_path']}.label.status"), $viewDatas) ?> 부품정보 작업
getListButton('modify', '', $viewDatas) ?>getHelper()->getListButton('modify', '', $viewDatas) ?> -
getFieldView('clientinfo_uid', $entity->getClientInfoUID(), $viewDatas) ?>
-
getFieldView('serviceinfo_uid', $entity->getServiceInfoUID(), $viewDatas) ?>
+
getHelper()->getFieldView('clientinfo_uid', $entity->getClientInfoUID(), $viewDatas) ?>
+
getHelper()->getFieldView('serviceinfo_uid', $entity->getServiceInfoUID(), $viewDatas) ?>
-
getFieldView('type', $entity->type, $viewDatas) ?>
-
getFieldView('title', $entity->getTitle(), $viewDatas) ?>
+
getHelper()->getFieldView('type', $entity->type, $viewDatas) ?>
+
getHelper()->getFieldView('title', $entity->getTitle(), $viewDatas) ?>
-
getFieldView('price', $entity->price, $viewDatas) ?>
+
getHelper()->getFieldView('price', $entity->price, $viewDatas) ?>
-
getFieldView('manufactur_at', $entity->manufactur_at, $viewDatas) ?>
-
getFieldView('format_at', $entity->format_at, $viewDatas) ?>
+
getHelper()->getFieldView('manufactur_at', $entity->manufactur_at, $viewDatas) ?>
+
getHelper()->getFieldView('format_at', $entity->format_at, $viewDatas) ?>
getFieldView('status', $entity->status, $viewDatas) ?>getHelper()->getFieldView('status', $entity->status, $viewDatas) ?> - - + +
getListButton($partType, $partType, $viewDatas) ?>getFieldView($partType, "", $viewDatas) ?>getHelper()->getListButton($partType, $partType, $viewDatas) ?>getHelper()->getFieldView($partType, "", $viewDatas) ?>
- getListButton('view', '', $viewDatas) ?>  - getListButton('history', '', $viewDatas) ?>  - getListButton('delete', '', $viewDatas) ?> + getHelper()->getListButton('view', '', $viewDatas) ?>  + getHelper()->getListButton('history', '', $viewDatas) ?>  + getHelper()->getListButton('delete', '', $viewDatas) ?>
- + diff --git a/app/Views/admin/server/view.php b/app/Views/admin/server/view.php index 898a397..1492135 100644 --- a/app/Views/admin/server/view.php +++ b/app/Views/admin/server/view.php @@ -1,6 +1,6 @@ extend(LAYOUTS[$viewDatas['layout']]['path']) ?> section('content') ?> -alert($error) ?> +getHelper()->alert($error) ?>
include("templates/{$viewDatas['layout']}/form_content_top"); ?>
@@ -15,9 +15,9 @@
getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?>getHelper()->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?> - getFieldForm($field, old($field) ?? ($viewDatas['entity']->$field ?? null), $viewDatas) ?> + getHelper()->getFieldForm($field, old($field) ?? ($viewDatas['entity']->$field ?? null), $viewDatas) ?>
- + @@ -28,8 +28,8 @@
getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?>getHelper()->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?> - getFieldView($field, $viewDatas['entity']->$field ?? null, $viewDatas) ?> + getHelper()->getFieldView($field, $viewDatas['entity']->$field ?? null, $viewDatas) ?>
- - + +
getListButton($partType, $partType, $viewDatas) ?>getFieldView($partType, "", $viewDatas) ?>getHelper()->getListButton($partType, $partType, $viewDatas) ?>getHelper()->getFieldView($partType, "", $viewDatas) ?>
diff --git a/app/Views/admin/service/detail.php b/app/Views/admin/service/detail.php deleted file mode 100644 index 4f19e5a..0000000 --- a/app/Views/admin/service/detail.php +++ /dev/null @@ -1,180 +0,0 @@ -extend(LAYOUTS[$viewDatas['layout']]['path']) ?> -section('content') ?> -alert($error) ?> -
include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?>
- - - - - - -
- - include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu'); ?> - - - -
include("templates/{$viewDatas['layout']}/index_header"); ?>
-
- - -
- -
-
-
gobetsoft
- -
-
- -
-
-
도코
-
0
-
-
-
서버
-
1
-
-
-
VPN
-
0
-
-
-
일반
-
1
-
-
-
방어
-
0
-
-
-
전용
-
0
-
-
-
이벤트
-
0
-
-
-
테스트
-
0
-
-
-
대체
-
0
-
-
-
장기할인
-
30%
-
-
-
쿠폰
-
0
-
-
-
-
-
-
-
예치금
-
30,000
-
-
-
전체요금
-
567,000
-
-
-
전체미납금
-
567,000
-
-
-
-
-
-
-
비고
-
-
- -
-
- -
-
-
-
- -
1836B-M404
-
S10243329344
-
-
-
-
-
사이트
-
Prime
-
-
-
위치
-
도쿄
-
-
-
형식
-
대체
-
-
-
CPU/메모리/저장장치
-
XEON*2/2G*2/SSD 128G*2
-
-
-
SOFTWARE
-
0
-
-
-
OS
-
Windows
-
-
-
-
IP주소
-
10.20.20.20
-
-
-
CS
-
20.1.2.3
-
-
-
메모
-
asdfsdfsdfsdf
-
-
-
부가서비스
-
부가
-
-
-
결제처리
-
0
-
-
-
결제처리
-
0
-
-
-
-
-
-
- -
- - -
- -
include(LAYOUTS[$viewDatas['layout']]['path'] . '/bottom'); ?>
-endSection() ?> \ No newline at end of file diff --git a/app/Views/admin/service/index.php b/app/Views/admin/service/index.php index b87edc7..f04e5c4 100644 --- a/app/Views/admin/service/index.php +++ b/app/Views/admin/service/index.php @@ -1,6 +1,6 @@ extend(LAYOUTS[$viewDatas['layout']]['path']) ?> section('content') ?> -alert($error) ?> +getHelper()->alert($error) ?>
include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?>
@@ -22,7 +22,7 @@ include("templates/{$viewDatas['layout']}/index_content_top"); ?> @@ -35,27 +35,27 @@ - + @@ -64,42 +64,42 @@ getStatus() === $entity::DEFAULT_STATUS ? "" : 'class="table-danger"' ?>> - + - + diff --git a/app/Views/admin/service/view.php b/app/Views/admin/service/view.php index 82e4954..fb217cf 100644 --- a/app/Views/admin/service/view.php +++ b/app/Views/admin/service/view.php @@ -1,6 +1,6 @@ extend(LAYOUTS[$viewDatas['layout']]['path']) ?> section('content') ?> -alert($error) ?> +getHelper()->alert($error) ?>
include("templates/{$viewDatas['layout']}/form_content_top"); ?>
@@ -15,9 +15,9 @@
번호 - getListLabel('site', lang("{$viewDatas['class_path']}.label.site"), $viewDatas) ?>/ - getListLabel('location', lang("{$viewDatas['class_path']}.label.location"), $viewDatas) ?> + getHelper()->getListLabel('site', lang("{$viewDatas['class_path']}.label.site"), $viewDatas) ?>/ + getHelper()->getListLabel('location', lang("{$viewDatas['class_path']}.label.location"), $viewDatas) ?> - getListLabel('clientinfo_uid', lang("{$viewDatas['class_path']}.label.clientinfo_uid"), $viewDatas) ?>/ - getListLabel('type', lang("{$viewDatas['class_path']}.label.type"), $viewDatas) ?> + getHelper()->getListLabel('clientinfo_uid', lang("{$viewDatas['class_path']}.label.clientinfo_uid"), $viewDatas) ?>/ + getHelper()->getListLabel('type', lang("{$viewDatas['class_path']}.label.type"), $viewDatas) ?> - getListLabel('serverinfo_uid', lang("{$viewDatas['class_path']}.label.serverinfo_uid"), $viewDatas) ?>/ - getListLabel('start_at', lang("{$viewDatas['class_path']}.label.start_at"), $viewDatas) ?> + getHelper()->getListLabel('serverinfo_uid', lang("{$viewDatas['class_path']}.label.serverinfo_uid"), $viewDatas) ?>/ + getHelper()->getListLabel('start_at', lang("{$viewDatas['class_path']}.label.start_at"), $viewDatas) ?> - getListLabel('amount', lang("{$viewDatas['class_path']}.label.amount"), $viewDatas) ?>/ - getListLabel('billing_at', lang("{$viewDatas['class_path']}.label.billing_at"), $viewDatas) ?> + getHelper()->getListLabel('amount', lang("{$viewDatas['class_path']}.label.amount"), $viewDatas) ?>/ + getHelper()->getListLabel('billing_at', lang("{$viewDatas['class_path']}.label.billing_at"), $viewDatas) ?> - getListLabel('status', lang("{$viewDatas['class_path']}.label.status"), $viewDatas) ?>/ - getListLabel('updated_at', lang("{$viewDatas['class_path']}.label.updated_at"), $viewDatas) ?> + getHelper()->getListLabel('status', lang("{$viewDatas['class_path']}.label.status"), $viewDatas) ?>/ + getHelper()->getListLabel('updated_at', lang("{$viewDatas['class_path']}.label.updated_at"), $viewDatas) ?> 부품정보getListLabel('user_uid', lang("{$viewDatas['class_path']}.label.user_uid"), $viewDatas) ?>getHelper()->getListLabel('user_uid', lang("{$viewDatas['class_path']}.label.user_uid"), $viewDatas) ?> 작업
getListButton('modify', '', $viewDatas) ?>getHelper()->getListButton('modify', '', $viewDatas) ?> -
getFieldView('site', $entity->site, $viewDatas) ?>
-
getFieldView('location', $entity->location, $viewDatas) ?>
+
getHelper()->getFieldView('site', $entity->site, $viewDatas) ?>
+
getHelper()->getFieldView('location', $entity->location, $viewDatas) ?>
-
getFieldView('clientinfo_uid', $entity->getClientInfoUID(), $viewDatas) ?>
-
getFieldView('type', $entity->type, $viewDatas) ?>
+
getHelper()->getFieldView('clientinfo_uid', $entity->getClientInfoUID(), $viewDatas) ?>
+
getHelper()->getFieldView('type', $entity->type, $viewDatas) ?>
-
getFieldView('serverinfo_uid', $entity->getServerEntity()->getTitle(), $viewDatas) ?>
-
getFieldView('start_at', $entity->start_at, $viewDatas) ?>
+
getHelper()->getFieldView('serverinfo_uid', $entity->getServerEntity()->getTitle(), $viewDatas) ?>
+
getHelper()->getFieldView('start_at', $entity->start_at, $viewDatas) ?>
-
getFieldView('amount', $entity->amount, $viewDatas) ?>
-
getFieldView('billing_at', $entity->billing_at, $viewDatas) ?>
+
getHelper()->getFieldView('amount', $entity->amount, $viewDatas) ?>
+
getHelper()->getFieldView('billing_at', $entity->billing_at, $viewDatas) ?>
-
getFieldView('status', $entity->status, $viewDatas) ?>
-
getFieldView('updated_at', $entity->updated_at, $viewDatas) ?>
+
getHelper()->getFieldView('status', $entity->status, $viewDatas) ?>
+
getHelper()->getFieldView('updated_at', $entity->updated_at, $viewDatas) ?>
- - + +
getListButton($partType, $partType, $viewDatas) ?>getFieldView($partType, "", $viewDatas) ?>getHelper()->getListButton($partType, $partType, $viewDatas) ?>getHelper()->getFieldView($partType, "", $viewDatas) ?>
getFieldView('user_uid', $entity->user_uid, $viewDatas) ?>getHelper()->getFieldView('user_uid', $entity->user_uid, $viewDatas) ?> - getListButton('view', '', $viewDatas) ?>  - getListButton('history', '', $viewDatas) ?>  - getListButton('delete', '', $viewDatas) ?> + getHelper()->getListButton('view', '', $viewDatas) ?>  + getHelper()->getListButton('history', '', $viewDatas) ?>  + getHelper()->getListButton('delete', '', $viewDatas) ?>
- + @@ -28,8 +28,8 @@
getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?>getHelper()->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?> - getFieldView($field, $viewDatas['entity']->$field ?? null, $viewDatas) ?> + getHelper()->getFieldView($field, $viewDatas['entity']->$field ?? null, $viewDatas) ?>
- - + +
getListButton($partType, $partType, $viewDatas) ?>getFieldView($partType, "", $viewDatas) ?>getHelper()->getListButton($partType, $partType, $viewDatas) ?>getHelper()->getFieldView($partType, "", $viewDatas) ?>
diff --git a/app/Views/admin/view.php b/app/Views/admin/view.php index 6ecd1a1..ddf121c 100644 --- a/app/Views/admin/view.php +++ b/app/Views/admin/view.php @@ -1,14 +1,14 @@ extend(LAYOUTS[$viewDatas['layout']]['path']) ?> section('content') ?> -alert($error) ?> +getHelper()->alert($error) ?>
- - + +
getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?>getFieldView($field, $viewDatas['entity']->$field, $viewDatas) ?>getHelper()->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?>getHelper()->getFieldView($field, $viewDatas['entity']->$field, $viewDatas) ?>
diff --git a/app/Views/admin/welcome/new.php b/app/Views/admin/welcome/new.php index ec107c1..d0cc1bb 100644 --- a/app/Views/admin/welcome/new.php +++ b/app/Views/admin/welcome/new.php @@ -23,13 +23,13 @@ - getListButton('new_service_view', '', $viewDatas, ['label' => $entity->getTitle()]) ?> - getFieldView('clientinfo_uid', $entity->getClientInfoUID(), $viewDatas) ?> - getFieldView('type', $entity->getType(), $viewDatas) ?> - getFieldView('switchinfo_uid', $entity->getSwitchCode(), $viewDatas) ?> - getFieldView('IP', null, $viewDatas) ?> - getFieldView('DEFENCE', null, $viewDatas) ?> - getFieldView('user_uid', $entity->getUserUID(), $viewDatas) ?> + getHelper()->getListButton('new_service_view', '', $viewDatas, ['label' => $entity->getTitle()]) ?> + getHelper()->getFieldView('clientinfo_uid', $entity->getClientInfoUID(), $viewDatas) ?> + getHelper()->getFieldView('type', $entity->getType(), $viewDatas) ?> + getHelper()->getFieldView('switchinfo_uid', $entity->getSwitchCode(), $viewDatas) ?> + getHelper()->getFieldView('IP', null, $viewDatas) ?> + getHelper()->getFieldView('DEFENCE', null, $viewDatas) ?> + getHelper()->getFieldView('user_uid', $entity->getUserUID(), $viewDatas) ?> diff --git a/app/Views/layouts/empty.php b/app/Views/layouts/empty.php index ce76d5b..5acbd14 100644 --- a/app/Views/layouts/empty.php +++ b/app/Views/layouts/empty.php @@ -23,7 +23,7 @@ - alert($error) ?> + getHelper()->alert($error) ?>
renderSection('content') ?>
diff --git a/app/Views/layouts/front.php b/app/Views/layouts/front.php index 33be8ea..5c56cc7 100644 --- a/app/Views/layouts/front.php +++ b/app/Views/layouts/front.php @@ -23,7 +23,7 @@ - alert($error) ?> + getHelper()->alert($error) ?> renderSection('content') ?>
diff --git a/app/Views/templates/admin/index_content_bottom.php b/app/Views/templates/admin/index_content_bottom.php index 5ec867e..0dcff4f 100644 --- a/app/Views/templates/admin/index_content_bottom.php +++ b/app/Views/templates/admin/index_content_bottom.php @@ -1,12 +1,12 @@
diff --git a/public/css/admin/client/detail.css b/public/css/admin/client/detail.css new file mode 100644 index 0000000..867924a --- /dev/null +++ b/public/css/admin/client/detail.css @@ -0,0 +1,8 @@ +table.layout_middle td.layout_right div#container * { + font-size:12px; +} + +.note-box { + height: 150px; + resize: none; +} \ No newline at end of file diff --git a/public/css/admin/service/detail.css b/public/css/admin/service/detail.css deleted file mode 100644 index f70fad7..0000000 --- a/public/css/admin/service/detail.css +++ /dev/null @@ -1,33 +0,0 @@ -table.layout_middle td.layout_right div#container * { - font-size:12px; -} -.summary-box { - margin:0px; - padding:0px; -} -.summary-box div{ - text-align: center; - padding: 5px; - border: 1px solid rgb(204, 203, 203); -} - -.summary-box div.bg-label { - background-color:rgb(224, 223, 223) -} - -.note-box { - height: 150px; - resize: none; -} - -.amount-positive { - color: green; -} - -.amount-negative { - color: red; -} - -.amount-highlight { - color: blue; -}