dbms_init...1
This commit is contained in:
parent
e7ce8124be
commit
72b3859106
@ -56,6 +56,19 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
|
|||||||
$routes->post('batchjob_delete', 'ClientController::batchjob_delete');
|
$routes->post('batchjob_delete', 'ClientController::batchjob_delete');
|
||||||
$routes->get('download/(:alpha)', 'ClientController::download/$1');
|
$routes->get('download/(:alpha)', 'ClientController::download/$1');
|
||||||
});
|
});
|
||||||
|
$routes->group('clienthistory', ['namespace' => 'App\Controllers\Admin\Customer'], function ($routes) {
|
||||||
|
$routes->get('/', 'ClientHistoryController::index', []);
|
||||||
|
$routes->get('create', 'ClientHistoryController::create_form');
|
||||||
|
$routes->post('create', 'ClientHistoryController::create');
|
||||||
|
$routes->get('modify/(:num)', 'ClientHistoryController::modify_form/$1');
|
||||||
|
$routes->post('modify/(:num)', 'ClientHistoryController::modify/$1');
|
||||||
|
$routes->get('view/(:num)', 'ClientHistoryController::view/$1');
|
||||||
|
$routes->get('delete/(:num)', 'ClientHistoryController::delete/$1');
|
||||||
|
$routes->get('toggle/(:num)/(:any)', 'ClientHistoryController::toggle/$1/$2');
|
||||||
|
$routes->post('batchjob', 'ClientHistoryController::batchjob');
|
||||||
|
$routes->post('batchjob_delete', 'ClientHistoryController::batchjob_delete');
|
||||||
|
$routes->get('download/(:alpha)', 'ClientHistoryController::download/$1');
|
||||||
|
});
|
||||||
$routes->group('account', ['namespace' => 'App\Controllers\Admin\Customer'], function ($routes) {
|
$routes->group('account', ['namespace' => 'App\Controllers\Admin\Customer'], function ($routes) {
|
||||||
$routes->get('/', 'AccountController::index', []);
|
$routes->get('/', 'AccountController::index', []);
|
||||||
$routes->get('create', 'AccountController::create_form');
|
$routes->get('create', 'AccountController::create_form');
|
||||||
|
|||||||
@ -2,14 +2,15 @@
|
|||||||
|
|
||||||
namespace App\Controllers\Admin\Customer;
|
namespace App\Controllers\Admin\Customer;
|
||||||
|
|
||||||
|
use App\Helpers\Customer\ClientHelper;
|
||||||
|
use App\Services\Customer\ClientService;
|
||||||
|
use CodeIgniter\HTTP\RedirectResponse;
|
||||||
use CodeIgniter\HTTP\RequestInterface;
|
use CodeIgniter\HTTP\RequestInterface;
|
||||||
|
|
||||||
use CodeIgniter\HTTP\ResponseInterface;
|
use CodeIgniter\HTTP\ResponseInterface;
|
||||||
use CodeIgniter\Validation\Validation;
|
use CodeIgniter\Validation\Validation;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
use App\Helpers\Customer\ClientHelper;
|
|
||||||
use App\Services\Customer\ClientService;
|
|
||||||
|
|
||||||
class ClientController extends CustomerController
|
class ClientController extends CustomerController
|
||||||
{
|
{
|
||||||
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||||
@ -35,6 +36,18 @@ class ClientController extends CustomerController
|
|||||||
}
|
}
|
||||||
return $this->_helper;
|
return $this->_helper;
|
||||||
}
|
}
|
||||||
|
protected function getResultSuccess(string $message = MESSAGES["SUCCESS"], ?string $actionTemplate = null): RedirectResponse|string
|
||||||
|
{
|
||||||
|
switch ($this->getAction()) {
|
||||||
|
case 'index':
|
||||||
|
$result = parent::getResultSuccess($message, $this->request->getVar('ActionTemplate') ?? $actionTemplate ?? 'client');
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$result = parent::getResultSuccess($message, $actionTemplate);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
//Index,FieldForm관련
|
//Index,FieldForm관련
|
||||||
protected function setValidation(Validation $validation, string $field, string $rule): Validation
|
protected function setValidation(Validation $validation, string $field, string $rule): Validation
|
||||||
{
|
{
|
||||||
|
|||||||
53
app/Controllers/Admin/Customer/ClientHistoryController.php
Normal file
53
app/Controllers/Admin/Customer/ClientHistoryController.php
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controllers\Admin\Customer;
|
||||||
|
|
||||||
|
use CodeIgniter\HTTP\RedirectResponse;
|
||||||
|
use CodeIgniter\HTTP\RequestInterface;
|
||||||
|
use CodeIgniter\HTTP\ResponseInterface;
|
||||||
|
use Psr\Log\LoggerInterface;
|
||||||
|
|
||||||
|
use App\Helpers\Customer\ClientHistoryHelper;
|
||||||
|
use App\Services\Customer\ClientHistoryService;
|
||||||
|
|
||||||
|
class ClientHistoryController extends CustomerController
|
||||||
|
{
|
||||||
|
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
|
||||||
|
{
|
||||||
|
parent::initController($request, $response, $logger);
|
||||||
|
$this->content_title = lang("{$this->getService()->getClassName()}.title");
|
||||||
|
$this->class_path .= $this->getService()->getClassName();
|
||||||
|
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
|
||||||
|
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getService(): ClientHistoryService
|
||||||
|
{
|
||||||
|
if (!$this->_service) {
|
||||||
|
$this->_service = new ClientHistoryService();
|
||||||
|
}
|
||||||
|
return $this->_service;
|
||||||
|
}
|
||||||
|
public function getHelper(): ClientHistoryHelper
|
||||||
|
{
|
||||||
|
if (!$this->_helper) {
|
||||||
|
$this->_helper = new ClientHistoryHelper();
|
||||||
|
}
|
||||||
|
return $this->_helper;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getResultSuccess(string $message = MESSAGES["SUCCESS"], ?string $actionTemplate = null): RedirectResponse|string
|
||||||
|
{
|
||||||
|
switch ($this->getAction()) {
|
||||||
|
case 'index':
|
||||||
|
$result = parent::getResultSuccess($message, $this->request->getVar('ActionTemplate') ?? $actionTemplate ?? 'popup');
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$result = parent::getResultSuccess($message, $actionTemplate);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
//Index,FieldForm관련
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@ -4,8 +4,8 @@
|
|||||||
"settings": {
|
"settings": {
|
||||||
"width": 3000,
|
"width": 3000,
|
||||||
"height": 3000,
|
"height": 3000,
|
||||||
"scrollTop": -1480.1953,
|
"scrollTop": -695.5286,
|
||||||
"scrollLeft": -994.6025,
|
"scrollLeft": -409.6025,
|
||||||
"zoomLevel": 0.79,
|
"zoomLevel": 0.79,
|
||||||
"show": 511,
|
"show": 511,
|
||||||
"database": 4,
|
"database": 4,
|
||||||
@ -51,7 +51,8 @@
|
|||||||
"0WXrjcyXXGeoAVM2VB8s2",
|
"0WXrjcyXXGeoAVM2VB8s2",
|
||||||
"eLGlqJ4z_woGP6CLZEuUr",
|
"eLGlqJ4z_woGP6CLZEuUr",
|
||||||
"JoMB-mb6p6NoHpiAvjD2y",
|
"JoMB-mb6p6NoHpiAvjD2y",
|
||||||
"IsMoJXzvtuoOFFt93qS0w"
|
"IsMoJXzvtuoOFFt93qS0w",
|
||||||
|
"rlCmi1ybOTx8gPwOXyjTX"
|
||||||
],
|
],
|
||||||
"relationshipIds": [
|
"relationshipIds": [
|
||||||
"gAVYXWnBSnCw-0ieO4Mil",
|
"gAVYXWnBSnCw-0ieO4Mil",
|
||||||
@ -70,7 +71,8 @@
|
|||||||
"cRqZmxohkCGd_FTkg1rhI",
|
"cRqZmxohkCGd_FTkg1rhI",
|
||||||
"e74Cc4zZztxyoazM_ssbu",
|
"e74Cc4zZztxyoazM_ssbu",
|
||||||
"Y-MNlBi4tzmX_zwrY0zTc",
|
"Y-MNlBi4tzmX_zwrY0zTc",
|
||||||
"my7misDXaAqlgb4tiABJn"
|
"my7misDXaAqlgb4tiABJn",
|
||||||
|
"2m5lqUPzTlINKxzoMyyWG"
|
||||||
],
|
],
|
||||||
"indexIds": [],
|
"indexIds": [],
|
||||||
"memoIds": []
|
"memoIds": []
|
||||||
@ -394,15 +396,15 @@
|
|||||||
"CX9ODlVw-gFnxgfMJ1JyV"
|
"CX9ODlVw-gFnxgfMJ1JyV"
|
||||||
],
|
],
|
||||||
"ui": {
|
"ui": {
|
||||||
"x": 150.6007,
|
"x": 156.9298,
|
||||||
"y": 1934.1184,
|
"y": 1983.4854,
|
||||||
"zIndex": 2,
|
"zIndex": 2,
|
||||||
"widthName": 60,
|
"widthName": 60,
|
||||||
"widthComment": 60,
|
"widthComment": 60,
|
||||||
"color": ""
|
"color": ""
|
||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
"updateAt": 1750829018823,
|
"updateAt": 1750916235652,
|
||||||
"createAt": 1745819764138
|
"createAt": 1745819764138
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -794,15 +796,15 @@
|
|||||||
"n9ZWAQ9754sZ3MM4IxCAA"
|
"n9ZWAQ9754sZ3MM4IxCAA"
|
||||||
],
|
],
|
||||||
"ui": {
|
"ui": {
|
||||||
"x": 136.0004,
|
"x": 146.1271,
|
||||||
"y": 759.2028,
|
"y": 927.5572,
|
||||||
"zIndex": 2278,
|
"zIndex": 2278,
|
||||||
"widthName": 110,
|
"widthName": 110,
|
||||||
"widthComment": 60,
|
"widthComment": 60,
|
||||||
"color": ""
|
"color": ""
|
||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
"updateAt": 1750829272018,
|
"updateAt": 1750916226017,
|
||||||
"createAt": 1748484896313
|
"createAt": 1748484896313
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -911,15 +913,15 @@
|
|||||||
"ZNqrByaObXV1K12bzagzY"
|
"ZNqrByaObXV1K12bzagzY"
|
||||||
],
|
],
|
||||||
"ui": {
|
"ui": {
|
||||||
"x": 137.852,
|
"x": 149.2444,
|
||||||
"y": 1186.5143,
|
"y": 1342.2104,
|
||||||
"zIndex": 2502,
|
"zIndex": 2502,
|
||||||
"widthName": 92,
|
"widthName": 92,
|
||||||
"widthComment": 86,
|
"widthComment": 86,
|
||||||
"color": ""
|
"color": ""
|
||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
"updateAt": 1750828899771,
|
"updateAt": 1750916229463,
|
||||||
"createAt": 1748507247933
|
"createAt": 1748507247933
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -949,15 +951,15 @@
|
|||||||
"Z8XCLTbsA5h402twy9vwb"
|
"Z8XCLTbsA5h402twy9vwb"
|
||||||
],
|
],
|
||||||
"ui": {
|
"ui": {
|
||||||
"x": 137.9782,
|
"x": 151.9022,
|
||||||
"y": 1591.4787,
|
"y": 1712.9976,
|
||||||
"zIndex": 2505,
|
"zIndex": 2505,
|
||||||
"widthName": 99,
|
"widthName": 99,
|
||||||
"widthComment": 103,
|
"widthComment": 103,
|
||||||
"color": ""
|
"color": ""
|
||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
"updateAt": 1750828957031,
|
"updateAt": 1750916232755,
|
||||||
"createAt": 1749520593335
|
"createAt": 1749520593335
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1027,6 +1029,44 @@
|
|||||||
"updateAt": 1750900814178,
|
"updateAt": 1750900814178,
|
||||||
"createAt": 1750898626895
|
"createAt": 1750898626895
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"rlCmi1ybOTx8gPwOXyjTX": {
|
||||||
|
"id": "rlCmi1ybOTx8gPwOXyjTX",
|
||||||
|
"name": "clientinfo_history",
|
||||||
|
"comment": "고객_history",
|
||||||
|
"columnIds": [
|
||||||
|
"EEdbsRYJLw-oqKaIcEy4j",
|
||||||
|
"xM99dcx7-5WMPvULGsgWq",
|
||||||
|
"TH4M6Y21xogid7W4U19I9",
|
||||||
|
"7MFKRXZwdneZW5jfT5zDw",
|
||||||
|
"YWl9ZfaQvqzHphqvdffhi",
|
||||||
|
"skUFXBIguZ9hstXTw3Cam",
|
||||||
|
"rr6Zr8XuvAOSjxyt9yzEm",
|
||||||
|
"LjRSallyJdccFBrFB6FPh"
|
||||||
|
],
|
||||||
|
"seqColumnIds": [
|
||||||
|
"EEdbsRYJLw-oqKaIcEy4j",
|
||||||
|
"sXpn1a1POuNlWAvXFTuIo",
|
||||||
|
"xM99dcx7-5WMPvULGsgWq",
|
||||||
|
"TH4M6Y21xogid7W4U19I9",
|
||||||
|
"7MFKRXZwdneZW5jfT5zDw",
|
||||||
|
"YWl9ZfaQvqzHphqvdffhi",
|
||||||
|
"skUFXBIguZ9hstXTw3Cam",
|
||||||
|
"rr6Zr8XuvAOSjxyt9yzEm",
|
||||||
|
"LjRSallyJdccFBrFB6FPh"
|
||||||
|
],
|
||||||
|
"ui": {
|
||||||
|
"x": 140.0029,
|
||||||
|
"y": 636.1117,
|
||||||
|
"zIndex": 2566,
|
||||||
|
"widthName": 92,
|
||||||
|
"widthComment": 67,
|
||||||
|
"color": ""
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"updateAt": 1750916277385,
|
||||||
|
"createAt": 1750916193767
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tableColumnEntities": {
|
"tableColumnEntities": {
|
||||||
@ -7449,6 +7489,186 @@
|
|||||||
"updateAt": 1750900874920,
|
"updateAt": 1750900874920,
|
||||||
"createAt": 1750900801840
|
"createAt": 1750900801840
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"EEdbsRYJLw-oqKaIcEy4j": {
|
||||||
|
"id": "EEdbsRYJLw-oqKaIcEy4j",
|
||||||
|
"tableId": "rlCmi1ybOTx8gPwOXyjTX",
|
||||||
|
"name": "uid",
|
||||||
|
"comment": "",
|
||||||
|
"dataType": "INT",
|
||||||
|
"default": "",
|
||||||
|
"options": 11,
|
||||||
|
"ui": {
|
||||||
|
"keys": 1,
|
||||||
|
"widthName": 60,
|
||||||
|
"widthComment": 60,
|
||||||
|
"widthDataType": 60,
|
||||||
|
"widthDefault": 60
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"updateAt": 1750916244200,
|
||||||
|
"createAt": 1750916216049
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sXpn1a1POuNlWAvXFTuIo": {
|
||||||
|
"id": "sXpn1a1POuNlWAvXFTuIo",
|
||||||
|
"tableId": "rlCmi1ybOTx8gPwOXyjTX",
|
||||||
|
"name": "serviceinfo_uid",
|
||||||
|
"comment": "",
|
||||||
|
"dataType": "INT",
|
||||||
|
"default": "",
|
||||||
|
"options": 8,
|
||||||
|
"ui": {
|
||||||
|
"keys": 0,
|
||||||
|
"widthName": 80,
|
||||||
|
"widthComment": 60,
|
||||||
|
"widthDataType": 60,
|
||||||
|
"widthDefault": 60
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"updateAt": 1750916216049,
|
||||||
|
"createAt": 1750916216049
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"TH4M6Y21xogid7W4U19I9": {
|
||||||
|
"id": "TH4M6Y21xogid7W4U19I9",
|
||||||
|
"tableId": "rlCmi1ybOTx8gPwOXyjTX",
|
||||||
|
"name": "title",
|
||||||
|
"comment": "",
|
||||||
|
"dataType": "VARCHAR(255)",
|
||||||
|
"default": "",
|
||||||
|
"options": 8,
|
||||||
|
"ui": {
|
||||||
|
"keys": 0,
|
||||||
|
"widthName": 60,
|
||||||
|
"widthComment": 60,
|
||||||
|
"widthDataType": 81,
|
||||||
|
"widthDefault": 60
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"updateAt": 1750916216049,
|
||||||
|
"createAt": 1750916216049
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"7MFKRXZwdneZW5jfT5zDw": {
|
||||||
|
"id": "7MFKRXZwdneZW5jfT5zDw",
|
||||||
|
"tableId": "rlCmi1ybOTx8gPwOXyjTX",
|
||||||
|
"name": "description",
|
||||||
|
"comment": "",
|
||||||
|
"dataType": "TEXT",
|
||||||
|
"default": "",
|
||||||
|
"options": 0,
|
||||||
|
"ui": {
|
||||||
|
"keys": 0,
|
||||||
|
"widthName": 61,
|
||||||
|
"widthComment": 60,
|
||||||
|
"widthDataType": 60,
|
||||||
|
"widthDefault": 60
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"updateAt": 1750916216049,
|
||||||
|
"createAt": 1750916216049
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"YWl9ZfaQvqzHphqvdffhi": {
|
||||||
|
"id": "YWl9ZfaQvqzHphqvdffhi",
|
||||||
|
"tableId": "rlCmi1ybOTx8gPwOXyjTX",
|
||||||
|
"name": "status",
|
||||||
|
"comment": "상태",
|
||||||
|
"dataType": "VARCHAR(20)",
|
||||||
|
"default": "'default'",
|
||||||
|
"options": 8,
|
||||||
|
"ui": {
|
||||||
|
"keys": 0,
|
||||||
|
"widthName": 60,
|
||||||
|
"widthComment": 60,
|
||||||
|
"widthDataType": 75,
|
||||||
|
"widthDefault": 60
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"updateAt": 1750916216049,
|
||||||
|
"createAt": 1750916216049
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"skUFXBIguZ9hstXTw3Cam": {
|
||||||
|
"id": "skUFXBIguZ9hstXTw3Cam",
|
||||||
|
"tableId": "rlCmi1ybOTx8gPwOXyjTX",
|
||||||
|
"name": "updated_at",
|
||||||
|
"comment": "",
|
||||||
|
"dataType": "TIMESTAMP",
|
||||||
|
"default": "",
|
||||||
|
"options": 0,
|
||||||
|
"ui": {
|
||||||
|
"keys": 0,
|
||||||
|
"widthName": 62,
|
||||||
|
"widthComment": 60,
|
||||||
|
"widthDataType": 65,
|
||||||
|
"widthDefault": 60
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"updateAt": 1750916216050,
|
||||||
|
"createAt": 1750916216050
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rr6Zr8XuvAOSjxyt9yzEm": {
|
||||||
|
"id": "rr6Zr8XuvAOSjxyt9yzEm",
|
||||||
|
"tableId": "rlCmi1ybOTx8gPwOXyjTX",
|
||||||
|
"name": "created_at",
|
||||||
|
"comment": "",
|
||||||
|
"dataType": "TIMESTAMP",
|
||||||
|
"default": "CURRENT_TIMESTAMP",
|
||||||
|
"options": 8,
|
||||||
|
"ui": {
|
||||||
|
"keys": 0,
|
||||||
|
"widthName": 60,
|
||||||
|
"widthComment": 60,
|
||||||
|
"widthDataType": 65,
|
||||||
|
"widthDefault": 122
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"updateAt": 1750916216050,
|
||||||
|
"createAt": 1750916216050
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"LjRSallyJdccFBrFB6FPh": {
|
||||||
|
"id": "LjRSallyJdccFBrFB6FPh",
|
||||||
|
"tableId": "rlCmi1ybOTx8gPwOXyjTX",
|
||||||
|
"name": "deleted_at",
|
||||||
|
"comment": "",
|
||||||
|
"dataType": "TIMESTAMP",
|
||||||
|
"default": "",
|
||||||
|
"options": 0,
|
||||||
|
"ui": {
|
||||||
|
"keys": 0,
|
||||||
|
"widthName": 60,
|
||||||
|
"widthComment": 60,
|
||||||
|
"widthDataType": 65,
|
||||||
|
"widthDefault": 60
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"updateAt": 1750916216050,
|
||||||
|
"createAt": 1750916216050
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"xM99dcx7-5WMPvULGsgWq": {
|
||||||
|
"id": "xM99dcx7-5WMPvULGsgWq",
|
||||||
|
"tableId": "rlCmi1ybOTx8gPwOXyjTX",
|
||||||
|
"name": "clientinfo_uid",
|
||||||
|
"comment": "",
|
||||||
|
"dataType": "INT",
|
||||||
|
"default": "",
|
||||||
|
"options": 8,
|
||||||
|
"ui": {
|
||||||
|
"keys": 2,
|
||||||
|
"widthName": 73,
|
||||||
|
"widthComment": 60,
|
||||||
|
"widthDataType": 60,
|
||||||
|
"widthDefault": 60
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"updateAt": 1750916270440,
|
||||||
|
"createAt": 1750916263299
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"relationshipEntities": {
|
"relationshipEntities": {
|
||||||
@ -7583,8 +7803,8 @@
|
|||||||
"columnIds": [
|
"columnIds": [
|
||||||
"f7_MGvRjkwL1xkCWrAgDR"
|
"f7_MGvRjkwL1xkCWrAgDR"
|
||||||
],
|
],
|
||||||
"x": 648.6007,
|
"x": 654.9298,
|
||||||
"y": 2046.1184,
|
"y": 2095.4854,
|
||||||
"direction": 2
|
"direction": 2
|
||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
@ -7631,7 +7851,7 @@
|
|||||||
"_AcWUYKzNJd-V0fRHq8Cx"
|
"_AcWUYKzNJd-V0fRHq8Cx"
|
||||||
],
|
],
|
||||||
"x": 1627.5371,
|
"x": 1627.5371,
|
||||||
"y": 777.4445999999999,
|
"y": 734.4446,
|
||||||
"direction": 1
|
"direction": 1
|
||||||
},
|
},
|
||||||
"end": {
|
"end": {
|
||||||
@ -7659,7 +7879,7 @@
|
|||||||
"N_yJVoCN4oUEDhYqdzApb"
|
"N_yJVoCN4oUEDhYqdzApb"
|
||||||
],
|
],
|
||||||
"x": 937.1139,
|
"x": 937.1139,
|
||||||
"y": 1231.9058,
|
"y": 1347.9058,
|
||||||
"direction": 1
|
"direction": 1
|
||||||
},
|
},
|
||||||
"end": {
|
"end": {
|
||||||
@ -7667,8 +7887,8 @@
|
|||||||
"columnIds": [
|
"columnIds": [
|
||||||
"TerqekzImISduE6ewW1b5"
|
"TerqekzImISduE6ewW1b5"
|
||||||
],
|
],
|
||||||
"x": 654.852,
|
"x": 666.2444,
|
||||||
"y": 1358.5143,
|
"y": 1514.2104,
|
||||||
"direction": 2
|
"direction": 2
|
||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
@ -7715,7 +7935,7 @@
|
|||||||
"_AcWUYKzNJd-V0fRHq8Cx"
|
"_AcWUYKzNJd-V0fRHq8Cx"
|
||||||
],
|
],
|
||||||
"x": 1627.5371,
|
"x": 1627.5371,
|
||||||
"y": 892.1112666666666,
|
"y": 820.4446,
|
||||||
"direction": 1
|
"direction": 1
|
||||||
},
|
},
|
||||||
"end": {
|
"end": {
|
||||||
@ -7742,17 +7962,17 @@
|
|||||||
"columnIds": [
|
"columnIds": [
|
||||||
"N_yJVoCN4oUEDhYqdzApb"
|
"N_yJVoCN4oUEDhYqdzApb"
|
||||||
],
|
],
|
||||||
"x": 937.1139,
|
"x": 1197.1138999999998,
|
||||||
"y": 1386.5724666666667,
|
"y": 1463.9058,
|
||||||
"direction": 1
|
"direction": 8
|
||||||
},
|
},
|
||||||
"end": {
|
"end": {
|
||||||
"tableId": "eLGlqJ4z_woGP6CLZEuUr",
|
"tableId": "eLGlqJ4z_woGP6CLZEuUr",
|
||||||
"columnIds": [
|
"columnIds": [
|
||||||
"jyD_WqbebGSYxIa72ig3p"
|
"jyD_WqbebGSYxIa72ig3p"
|
||||||
],
|
],
|
||||||
"x": 658.9782,
|
"x": 672.9022,
|
||||||
"y": 1715.4787,
|
"y": 1836.9976,
|
||||||
"direction": 2
|
"direction": 2
|
||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
@ -7799,7 +8019,7 @@
|
|||||||
"N_yJVoCN4oUEDhYqdzApb"
|
"N_yJVoCN4oUEDhYqdzApb"
|
||||||
],
|
],
|
||||||
"x": 937.1139,
|
"x": 937.1139,
|
||||||
"y": 1077.2391333333333,
|
"y": 1115.9058,
|
||||||
"direction": 1
|
"direction": 1
|
||||||
},
|
},
|
||||||
"end": {
|
"end": {
|
||||||
@ -7807,8 +8027,8 @@
|
|||||||
"columnIds": [
|
"columnIds": [
|
||||||
"ZWV8iXrgQovfYTm32QGbZ"
|
"ZWV8iXrgQovfYTm32QGbZ"
|
||||||
],
|
],
|
||||||
"x": 684.0004,
|
"x": 694.1271,
|
||||||
"y": 1085.8694666666665,
|
"y": 1254.2238666666667,
|
||||||
"direction": 2
|
"direction": 2
|
||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
@ -7827,7 +8047,7 @@
|
|||||||
"_AcWUYKzNJd-V0fRHq8Cx"
|
"_AcWUYKzNJd-V0fRHq8Cx"
|
||||||
],
|
],
|
||||||
"x": 1627.5371,
|
"x": 1627.5371,
|
||||||
"y": 662.7779333333333,
|
"y": 906.4446,
|
||||||
"direction": 1
|
"direction": 1
|
||||||
},
|
},
|
||||||
"end": {
|
"end": {
|
||||||
@ -7835,8 +8055,8 @@
|
|||||||
"columnIds": [
|
"columnIds": [
|
||||||
"yc1mNA3iMmF8xoUX60z6F"
|
"yc1mNA3iMmF8xoUX60z6F"
|
||||||
],
|
],
|
||||||
"x": 684.0004,
|
"x": 694.1271,
|
||||||
"y": 955.2027999999999,
|
"y": 1123.5572,
|
||||||
"direction": 2
|
"direction": 2
|
||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
@ -7855,7 +8075,7 @@
|
|||||||
"mfHtgzc_Aeocr6xkgwYWh"
|
"mfHtgzc_Aeocr6xkgwYWh"
|
||||||
],
|
],
|
||||||
"x": 1584.6636,
|
"x": 1584.6636,
|
||||||
"y": 364.3842666666667,
|
"y": 257.7176,
|
||||||
"direction": 1
|
"direction": 1
|
||||||
},
|
},
|
||||||
"end": {
|
"end": {
|
||||||
@ -7911,7 +8131,7 @@
|
|||||||
"mfHtgzc_Aeocr6xkgwYWh"
|
"mfHtgzc_Aeocr6xkgwYWh"
|
||||||
],
|
],
|
||||||
"x": 1584.6636,
|
"x": 1584.6636,
|
||||||
"y": 257.7176,
|
"y": 364.3842666666667,
|
||||||
"direction": 1
|
"direction": 1
|
||||||
},
|
},
|
||||||
"end": {
|
"end": {
|
||||||
@ -7919,8 +8139,8 @@
|
|||||||
"columnIds": [
|
"columnIds": [
|
||||||
"s1Az-lXWK0NlVQqFEEK8o"
|
"s1Az-lXWK0NlVQqFEEK8o"
|
||||||
],
|
],
|
||||||
"x": 684.0004,
|
"x": 694.1271,
|
||||||
"y": 824.5361333333333,
|
"y": 992.8905333333332,
|
||||||
"direction": 2
|
"direction": 2
|
||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
@ -8011,6 +8231,34 @@
|
|||||||
"updateAt": 1750900801840,
|
"updateAt": 1750900801840,
|
||||||
"createAt": 1750900801840
|
"createAt": 1750900801840
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"2m5lqUPzTlINKxzoMyyWG": {
|
||||||
|
"id": "2m5lqUPzTlINKxzoMyyWG",
|
||||||
|
"identification": false,
|
||||||
|
"relationshipType": 16,
|
||||||
|
"startRelationshipType": 2,
|
||||||
|
"start": {
|
||||||
|
"tableId": "6ajvOCaGuXU9pzV0Y9jEi",
|
||||||
|
"columnIds": [
|
||||||
|
"_AcWUYKzNJd-V0fRHq8Cx"
|
||||||
|
],
|
||||||
|
"x": 1627.5371,
|
||||||
|
"y": 648.4446,
|
||||||
|
"direction": 1
|
||||||
|
},
|
||||||
|
"end": {
|
||||||
|
"tableId": "rlCmi1ybOTx8gPwOXyjTX",
|
||||||
|
"columnIds": [
|
||||||
|
"xM99dcx7-5WMPvULGsgWq"
|
||||||
|
],
|
||||||
|
"x": 654.0029,
|
||||||
|
"y": 760.1117,
|
||||||
|
"direction": 2
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"updateAt": 1750916263300,
|
||||||
|
"createAt": 1750916263300
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"indexEntities": {},
|
"indexEntities": {},
|
||||||
|
|||||||
11
app/Entities/Customer/ClientHistoryEntity.php
Normal file
11
app/Entities/Customer/ClientHistoryEntity.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entities\Customer;
|
||||||
|
|
||||||
|
use App\Models\Customer\ClientHistoryModel;
|
||||||
|
|
||||||
|
class ClientHistoryEntity extends CustomerEntity
|
||||||
|
{
|
||||||
|
const PK = ClientHistoryModel::PK;
|
||||||
|
const TITLE = ClientHistoryModel::TITLE;
|
||||||
|
}
|
||||||
@ -321,6 +321,8 @@ class CommonHelper
|
|||||||
} else {
|
} else {
|
||||||
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
||||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||||
|
} else {
|
||||||
|
$value = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,6 +21,8 @@ class AccountHelper extends CustomerHelper
|
|||||||
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
||||||
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
||||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||||
|
} else {
|
||||||
|
$value = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -78,6 +78,19 @@ class ClientHelper extends CustomerHelper
|
|||||||
case 'batchjob_delete':
|
case 'batchjob_delete':
|
||||||
$action = !$this->getMyAuth()->isAccessRole(['security']) ? "" : parent::getListButton($action, $viewDatas, $extras);
|
$action = !$this->getMyAuth()->isAccessRole(['security']) ? "" : parent::getListButton($action, $viewDatas, $extras);
|
||||||
break;
|
break;
|
||||||
|
case 'history':
|
||||||
|
$extras = ["class" => "btn btn-outline btn-primary btn-circle", "target" => "_self", ...$extras];
|
||||||
|
$action = form_label(
|
||||||
|
ICONS['HISTORY'],
|
||||||
|
$action,
|
||||||
|
[
|
||||||
|
"data-src" => "/admin/customer/clienthistory?clientinfo_uid={$viewDatas['entity']->getPK()}",
|
||||||
|
"data-bs-toggle" => "modal",
|
||||||
|
"data-bs-target" => "#index_action_form",
|
||||||
|
...$extras
|
||||||
|
]
|
||||||
|
);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
$action = parent::getListButton($action, $viewDatas, $extras);
|
$action = parent::getListButton($action, $viewDatas, $extras);
|
||||||
break;
|
break;
|
||||||
|
|||||||
14
app/Helpers/Customer/ClientHistoryHelper.php
Normal file
14
app/Helpers/Customer/ClientHistoryHelper.php
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Helpers\Customer;
|
||||||
|
|
||||||
|
use App\Models\Customer\ClientHistoryModel;
|
||||||
|
|
||||||
|
class ClientHistoryHelper extends CustomerHelper
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->setTitleField(field: ClientHistoryModel::TITLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -21,6 +21,8 @@ class CouponHelper extends CustomerHelper
|
|||||||
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
||||||
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
||||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||||
|
} else {
|
||||||
|
$value = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -22,6 +22,8 @@ class PointHelper extends CustomerHelper
|
|||||||
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
||||||
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
||||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||||
|
} else {
|
||||||
|
$value = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -97,6 +97,24 @@ class ServiceHelper extends CustomerHelper
|
|||||||
public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null
|
public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
|
case 'user_uid':
|
||||||
|
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||||
|
break;
|
||||||
|
case 'clientinfo_uid':
|
||||||
|
case 'ownerinfo_uid':
|
||||||
|
$temp = parent::getFieldForm($field, $value, $viewDatas, $extras);
|
||||||
|
$value = $temp . form_label(
|
||||||
|
ICONS['HISTORY'],
|
||||||
|
'client_history',
|
||||||
|
[
|
||||||
|
"data-src" => "/admin/customer/clienthistory?clientinfo_uid={$value}",
|
||||||
|
"data-bs-toggle" => "modal",
|
||||||
|
"data-bs-target" => "#index_action_form",
|
||||||
|
"class" => "btn btn-outline btn-primary btn-circle",
|
||||||
|
"target" => "_self"
|
||||||
|
]
|
||||||
|
);
|
||||||
|
break;
|
||||||
case "LINE":
|
case "LINE":
|
||||||
case "IP":
|
case "IP":
|
||||||
case "SERVER":
|
case "SERVER":
|
||||||
@ -122,10 +140,11 @@ class ServiceHelper extends CustomerHelper
|
|||||||
break;
|
break;
|
||||||
case 'billing_at':
|
case 'billing_at':
|
||||||
if (array_key_exists('unPaids', $viewDatas)) {
|
if (array_key_exists('unPaids', $viewDatas)) {
|
||||||
$value .= array_key_exists($viewDatas['entity']->getPK(), $viewDatas['unPaids']) ? "<BR>미지급항목: " . $viewDatas['unPaids'][$viewDatas['entity']->getPK()] . "개" : "";
|
if (array_key_exists($viewDatas['entity']->getPK(), $viewDatas['unPaids'])) {
|
||||||
|
$value .= "<div><a href=\"/admin/customer/payment?serviceinfo_uid={$viewDatas['entity']->getPK()}\">미지급: <span style=\"color:red;\">" . $viewDatas['unPaids'][$viewDatas['entity']->getPK()] . "</span>개</a></div>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$value = parent::getFieldView($field, $value, $viewDatas, $extras);
|
$value = parent::getFieldView($field, $value, $viewDatas, $extras);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -33,6 +33,8 @@ class ServicePaymentHelper extends CustomerHelper
|
|||||||
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
||||||
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
||||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||||
|
} else {
|
||||||
|
$value = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -51,6 +51,8 @@ class HomeHelper extends CommonHelper
|
|||||||
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
||||||
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
||||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||||
|
} else {
|
||||||
|
$value = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -21,6 +21,8 @@ class MyLogHelper extends CommonHelper
|
|||||||
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
if (in_array($field, $viewDatas['control']['filter_fields'])) {
|
||||||
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
if (array_key_exists($value, $viewDatas['control']['filter_optons'][$field])) {
|
||||||
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
$value = $viewDatas['control']['filter_optons'][$field][$value]->getTitle();
|
||||||
|
} else {
|
||||||
|
$value = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
20
app/Language/en/Customer/ClientHistory.php
Normal file
20
app/Language/en/Customer/ClientHistory.php
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
return [
|
||||||
|
'title' => "고객History정보",
|
||||||
|
'label' => [
|
||||||
|
'clientinfo_uid' => "고객명",
|
||||||
|
'title' => "제목",
|
||||||
|
'description' => "상세정보",
|
||||||
|
'status' => "상태",
|
||||||
|
'updated_at' => "수정일",
|
||||||
|
'created_at' => "신청일",
|
||||||
|
'deleted_at' => "삭제일",
|
||||||
|
],
|
||||||
|
'DEFAULTS' => [
|
||||||
|
'status' => 'default'
|
||||||
|
],
|
||||||
|
"STATUS" => [
|
||||||
|
'default' => "사용중",
|
||||||
|
"pause" => "일시정지",
|
||||||
|
],
|
||||||
|
];
|
||||||
@ -4,7 +4,7 @@ return [
|
|||||||
'label' => [
|
'label' => [
|
||||||
'clientinfo_uid' => "고객",
|
'clientinfo_uid' => "고객",
|
||||||
'ownerinfo_uid' => "관리자",
|
'ownerinfo_uid' => "관리자",
|
||||||
'user_uid' => "등록자",
|
'user_uid' => "작업자",
|
||||||
'title' => "서비스명",
|
'title' => "서비스명",
|
||||||
'type' => "서비스형식",
|
'type' => "서비스형식",
|
||||||
'location' => "위치",
|
'location' => "위치",
|
||||||
|
|||||||
@ -16,6 +16,5 @@ return [
|
|||||||
"STATUS" => [
|
"STATUS" => [
|
||||||
'default' => "사용중",
|
'default' => "사용중",
|
||||||
"pause" => "일시정지",
|
"pause" => "일시정지",
|
||||||
'delete' => "삭제",
|
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -4,7 +4,7 @@ return [
|
|||||||
'label' => [
|
'label' => [
|
||||||
'serviceinfo_uid' => "서비스",
|
'serviceinfo_uid' => "서비스",
|
||||||
'ownerinfo_uid' => "관리자",
|
'ownerinfo_uid' => "관리자",
|
||||||
'user_uid' => "결제자",
|
'user_uid' => "작업자",
|
||||||
'item_type' => "항목종류",
|
'item_type' => "항목종류",
|
||||||
'item_uid' => "항목",
|
'item_uid' => "항목",
|
||||||
'billing_cycle' => "납부방식",
|
'billing_cycle' => "납부방식",
|
||||||
|
|||||||
44
app/Models/Customer/ClientHistoryModel.php
Normal file
44
app/Models/Customer/ClientHistoryModel.php
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Models\Customer;
|
||||||
|
|
||||||
|
use App\Entities\Customer\ClientHistoryEntity;
|
||||||
|
|
||||||
|
class ClientHistoryModel extends CustomerModel
|
||||||
|
{
|
||||||
|
const TABLE = "clientinfo_history";
|
||||||
|
const PK = "uid";
|
||||||
|
const TITLE = "title";
|
||||||
|
protected $table = self::TABLE;
|
||||||
|
protected $primaryKey = self::PK;
|
||||||
|
protected $returnType = ClientHistoryEntity::class;
|
||||||
|
protected $allowedFields = [
|
||||||
|
"clientinfo_uid",
|
||||||
|
"title",
|
||||||
|
"description",
|
||||||
|
"status",
|
||||||
|
"updated_at"
|
||||||
|
];
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
public function getFormFieldRule(string $action, string $field): string
|
||||||
|
{
|
||||||
|
if (is_array($field)) {
|
||||||
|
throw new \Exception(__FUNCTION__ . "=> field가 array 입니다.\n" . var_export($field, true));
|
||||||
|
}
|
||||||
|
switch ($field) {
|
||||||
|
case "clientinfo_uid":
|
||||||
|
$rule = "required|numeric";
|
||||||
|
break;
|
||||||
|
case "title":
|
||||||
|
$rule = "required|trim|string";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$rule = parent::getFormFieldRule($action, $field);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $rule;
|
||||||
|
}
|
||||||
|
}
|
||||||
57
app/Services/Customer/ClientHistoryService.php
Normal file
57
app/Services/Customer/ClientHistoryService.php
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Services\Customer;
|
||||||
|
|
||||||
|
use App\Entities\Customer\ClientHistoryEntity;
|
||||||
|
use App\Models\Customer\ClientHistoryModel;
|
||||||
|
|
||||||
|
class ClientHistoryService extends CustomerService
|
||||||
|
{
|
||||||
|
private ?ClientService $_clientService = null;
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
$this->addClassName('ClientHistory');
|
||||||
|
}
|
||||||
|
public function getModelClass(): ClientHistoryModel
|
||||||
|
{
|
||||||
|
return new ClientHistoryModel();
|
||||||
|
}
|
||||||
|
public function getEntityClass(): ClientHistoryEntity
|
||||||
|
{
|
||||||
|
return new ClientHistoryEntity();
|
||||||
|
}
|
||||||
|
public function getFormFields(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
"clientinfo_uid",
|
||||||
|
"title",
|
||||||
|
"description",
|
||||||
|
];
|
||||||
|
}
|
||||||
|
public function getFilterFields(): array
|
||||||
|
{
|
||||||
|
return ["clientinfo_uid", 'status'];
|
||||||
|
}
|
||||||
|
public function getBatchJobFields(): array
|
||||||
|
{
|
||||||
|
return ['status'];
|
||||||
|
}
|
||||||
|
public function getIndexFields(): array
|
||||||
|
{
|
||||||
|
return ['clientinfo_uid', 'title', 'status', 'created_at'];
|
||||||
|
}
|
||||||
|
//FieldForm관련용
|
||||||
|
public function getFormFieldOption(string $field, array $options = []): array
|
||||||
|
{
|
||||||
|
switch ($field) {
|
||||||
|
case 'clientinfo_uid':
|
||||||
|
$options = $this->getClientService()->getEntities();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$options = parent::getFormFieldOption($field, $options);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $options;
|
||||||
|
}
|
||||||
|
}
|
||||||
64
app/Views/admin/client/index.php
Normal file
64
app/Views/admin/client/index.php
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?>
|
||||||
|
<?= $this->section('content') ?>
|
||||||
|
<?php if ($error = session('error')): echo $viewDatas['helper']->alert($error) ?><?php endif ?>
|
||||||
|
<div class="layout_top"><?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?></div>
|
||||||
|
<!-- Layout Middle Start -->
|
||||||
|
<table class="layout_middle">
|
||||||
|
<tr>
|
||||||
|
<td class="layout_left">
|
||||||
|
<!-- Layout Left Start -->
|
||||||
|
<?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu'); ?>
|
||||||
|
<!-- Layout Left End -->
|
||||||
|
</td>
|
||||||
|
<td class="layout_right">
|
||||||
|
<!-- Layout Right Start -->
|
||||||
|
<div class="layout_header"><?= $this->include("templates/{$viewDatas['layout']}/index_header"); ?></div>
|
||||||
|
<div id="container" class="layout_content">
|
||||||
|
<link href="/css/<?= $viewDatas['layout'] ?>/index.css" media="screen" rel="stylesheet" type="text/css" />
|
||||||
|
<div class="index_body">
|
||||||
|
<?= $this->include("templates/{$viewDatas['layout']}/index_content_top"); ?>
|
||||||
|
<?= form_open(current_url(), ['id' => 'batchjob_form', 'method' => "post"]) ?>
|
||||||
|
<table class="index_table data table table-bordered table-hover table-striped" data-rtc-resizable-table="reisze_table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="index_head_short_column">번호</th>
|
||||||
|
<?php foreach ($viewDatas['control']['index_fields'] as $field): ?>
|
||||||
|
<th data-rtc-resizable="<?= $field ?>"><?= $viewDatas['helper']->getListLabel($field, $viewDatas) ?></th>
|
||||||
|
<?php endforeach ?>
|
||||||
|
<th class="index_head_short_column">작업</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php $cnt = 0 ?>
|
||||||
|
<?php foreach ($viewDatas['entities'] as $entity): ?>
|
||||||
|
<?php $viewDatas['entity'] = $entity; ?>
|
||||||
|
<tr <?= $viewDatas['helper']->getListRowColor($entity) ?>>
|
||||||
|
<?php $viewDatas['cnt'] = $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt); ?>
|
||||||
|
<td><?= $viewDatas['helper']->getListButton('modify', $viewDatas) ?></td>
|
||||||
|
<?php foreach ($viewDatas['control']['index_fields'] as $field): ?>
|
||||||
|
<td><?= $viewDatas['helper']->getFieldView($field, $entity->$field, $viewDatas) ?></td>
|
||||||
|
<?php endforeach ?>
|
||||||
|
<td nowrap>
|
||||||
|
<?= $viewDatas['helper']->getListButton('view', $viewDatas) ?>
|
||||||
|
<?= $viewDatas['helper']->getListButton('history', $viewDatas) ?>
|
||||||
|
<?= $viewDatas['helper']->getListButton('delete', $viewDatas) ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php $cnt++ ?>
|
||||||
|
<?php endforeach ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<?= $this->include("templates/{$viewDatas['layout']}/index_content_bottom"); ?>
|
||||||
|
<?= form_close() ?>
|
||||||
|
</div>
|
||||||
|
<div class="index_bottom"><?= $this->include("templates/common/" . (isset($viewDatas['modal_type']) ? $viewDatas['modal_type'] : 'modal_iframe')); ?></div>
|
||||||
|
<script type="text/javascript" src="/js/<?= $viewDatas['layout'] ?>/index.js"></script>
|
||||||
|
</div>
|
||||||
|
<div class="layout_footer"><?= $this->include("templates/{$viewDatas['layout']}/index_footer"); ?></div>
|
||||||
|
<!-- Layout Right End -->
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<!-- Layout Middle End -->
|
||||||
|
<div class="layout_bottom"><?= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/bottom'); ?></div>
|
||||||
|
<?= $this->endSection() ?>
|
||||||
Loading…
Reference in New Issue
Block a user