dbms_init...1

This commit is contained in:
최준흠 2025-05-23 13:42:48 +09:00
parent 125516a4ef
commit fabf52cd86
70 changed files with 419 additions and 1016 deletions

View File

@ -15,5 +15,9 @@ abstract class AdminController extends CommonController
$this->layout = "admin";
$this->uri_path = "admin/";
$this->view_path = "admin" . DIRECTORY_SEPARATOR;
$this->title = "관리자";
$this->individualStylesheets = [];
$this->individualScripts = [];
$this->helper = $this->getHelper();
}
}

View File

@ -15,10 +15,11 @@ class AccountController extends CustomerController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
$this->class_path = $this->getService()->getClassPath();
$this->title = lang("{$this->getService()->getClassPath()}.title");
$this->helper = $this->getHelper();
$this->title = lang("{$this->getService()->getClassName()}.title");
$this->class_path .= $this->getService()->getClassName();
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
}
public function getService(): AccountService
{

View File

@ -18,10 +18,11 @@ class ClientController extends CustomerController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
$this->class_path = $this->getService()->getClassPath();
$this->title = lang("{$this->getService()->getClassPath()}.title");
$this->helper = $this->getHelper();
$this->title = lang("{$this->getService()->getClassName()}.title");
$this->class_path .= $this->getService()->getClassName();
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
}
public function getService(): ClientService
{

View File

@ -15,10 +15,11 @@ class CouponController extends CustomerController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
$this->class_path = $this->getService()->getClassPath();
$this->title = lang("{$this->getService()->getClassPath()}.title");
$this->helper = $this->getHelper();
$this->title = lang("{$this->getService()->getClassName()}.title");
$this->class_path .= $this->getService()->getClassName();
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
}
public function getService(): CouponService
{

View File

@ -22,8 +22,6 @@ abstract class CustomerController extends AdminController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= 'customer/';
// $this->view_path .= "customer" . DIRECTORY_SEPARATOR;
}
final public function getClientService(): ClientService

View File

@ -5,7 +5,6 @@ namespace App\Controllers\Admin\Customer;
use App\Entities\Customer\PointEntity;
use App\Helpers\Customer\PointHelper;
use App\Services\Customer\PointService;
use CodeIgniter\HTTP\RedirectResponse;
use CodeIgniter\HTTP\RequestInterface;
use CodeIgniter\HTTP\ResponseInterface;
@ -16,10 +15,11 @@ class PointController extends CustomerController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
$this->class_path = $this->getService()->getClassPath();
$this->title = lang("{$this->getService()->getClassPath()}.title");
$this->helper = $this->getHelper();
$this->title = lang("{$this->getService()->getClassName()}.title");
$this->class_path .= $this->getService()->getClassName();
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
}
public function getService(): PointService
{

View File

@ -22,13 +22,11 @@ class ServiceController extends CustomerController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
$this->title = lang("{$this->getService()->getClassName()}.title");
$this->class_path .= $this->getService()->getClassName();
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
$this->class_path = $this->getService()->getClassPath();
$this->title = lang("{$this->getService()->getClassPath()}.title");
$this->helper = $this->getHelper();
// $this->individualStylesheets = ['server_partinfo.css'];
// $this->individualScripts = ['server_partinfo.js'];
}
public function getService(): ServiceService
{
@ -106,7 +104,6 @@ class ServiceController extends CustomerController
'fields' => ['type', 'clientinfo_uid', 'rack', 'lineinfo_uid', 'serverinfo_uid', 'IP', 'CPU', 'RAM', 'DISK', 'SOFTWARE', 'DEFENCE', 'billing_at', 'start_at', 'status'],
];
$this->init('index', $fields);
$this->modal_type = 'modal_iframe';
return parent::index_process();
}
}

View File

@ -14,11 +14,11 @@ class DefenceController extends EquipmentController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
$this->title = lang("{$this->getService()->getClassName()}.title");
$this->class_path .= $this->getService()->getClassName();
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
$this->class_path = $this->getService()->getClassPath();
$this->title = lang("{$this->getService()->getClassPath()}.title");
$this->helper = $this->getHelper();
}
public function getService(): DefenceService
{
@ -49,7 +49,6 @@ class DefenceController extends EquipmentController
'fields' => ['type', 'ip', 'accountid', 'domain', 'status'],
];
$this->init('index', $fields);
$this->modal_type = 'modal_iframe';
return parent::index_process();
}
}

View File

@ -21,8 +21,6 @@ abstract class EquipmentController extends AdminController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= 'equipment/';
// $this->view_path .= "equipment" . DIRECTORY_SEPARATOR;
}
final public function getClientService(): ClientService
{
@ -57,17 +55,17 @@ abstract class EquipmentController extends AdminController
protected function getFormFieldOption(string $field, array $options): array
{
switch ($field) {
case 'serviceinfo_uid':
case 'clientinfo_uid':
$temps = [];
foreach ($this->getServiceService()->getEntities() as $entity) {
foreach ($this->getClientService()->getEntities() as $entity) {
$temps[$entity->getPK()] = $entity->getTitle();
}
$options[$field] = $temps;
// dd($options);
break;
case 'clientinfo_uid':
case 'serviceinfo_uid':
$temps = [];
foreach ($this->getClientService()->getEntities() as $entity) {
foreach ($this->getServiceService()->getEntities() as $entity) {
$temps[$entity->getPK()] = $entity->getTitle();
}
$options[$field] = $temps;
@ -81,6 +79,14 @@ abstract class EquipmentController extends AdminController
$options[$field] = $temps;
// dd($options);
break;
case 'serverinfo_uid':
$temps = [];
foreach ($this->getServerService()->getEntities() as $entity) {
$temps[$entity->getPK()] = $entity->getTitle();
}
$options[$field] = $temps;
// dd($options);
break;
default:
$options = parent::getFormFieldOption($field, $options);
break;

View File

@ -14,10 +14,11 @@ class IpController extends EquipmentController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
$this->class_path = $this->getService()->getClassPath();
$this->title = lang("{$this->getService()->getClassPath()}.title");
$this->helper = $this->getHelper();
$this->title = lang("{$this->getService()->getClassName()}.title");
$this->class_path .= $this->getService()->getClassName();
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
}
public function getService(): IpService
{

View File

@ -18,10 +18,11 @@ class LineController extends EquipmentController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
$this->class_path = $this->getService()->getClassPath();
$this->title = lang("{$this->getService()->getClassPath()}.title");
$this->helper = $this->getHelper();
$this->title = lang("{$this->getService()->getClassName()}.title");
$this->class_path .= $this->getService()->getClassName();
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
}
public function getService(): LineService
{
@ -59,7 +60,7 @@ class LineController extends EquipmentController
$temps = [];
$temps['lineinfo_uid'] = $entity->getPK();
$temps['ip'] = $ip;
$temps['status'] = lang("{$this->getIpService()->getClassPath()}.DEFAULTS.status");
$temps['status'] = DEFAULTS['STATUS'];
$this->getIpService()->create($temps, new IpEntity());
}
return $entity;
@ -80,7 +81,6 @@ class LineController extends EquipmentController
'fields' => ['clientinfo_uid', 'type', 'title', 'bandwith', 'status', "start_at", 'created_at'],
];
$this->init('index', $fields);
$this->modal_type = 'modal_iframe';
return parent::index_process();
}
}

View File

@ -16,10 +16,11 @@ class CpuController extends LinkController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
$this->class_path = $this->getService()->getClassPath();
$this->title = lang("{$this->getService()->getClassPath()}.title");
$this->helper = $this->getHelper();
$this->title = lang("{$this->getService()->getClassName()}.title");
$this->class_path .= $this->getService()->getClassName();
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
}
public function getService(): CpuService
{
@ -49,8 +50,8 @@ class CpuController extends LinkController
$fields = [
'fields' => ['serverinfo_uid', 'cpuinfo_uid'],
];
// dd($fields);
$this->init('index', $fields);
$this->modal_type = 'modal_iframe';
return parent::index_process();
}
}

View File

@ -16,10 +16,11 @@ class DiskController extends LinkController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
$this->class_path = $this->getService()->getClassPath();
$this->title = lang("{$this->getService()->getClassPath()}.title");
$this->helper = $this->getHelper();
$this->title = lang("{$this->getService()->getClassName()}.title");
$this->class_path .= $this->getService()->getClassName();
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
}
public function getService(): DiskService
{
@ -49,7 +50,6 @@ class DiskController extends LinkController
'fields' => ['serverinfo_uid', 'diskinfo_uid'],
];
$this->init('index', $fields);
$this->modal_type = 'modal_iframe';
return parent::index_process();
}
}

View File

@ -14,8 +14,6 @@ abstract class LinkController extends EquipmentController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= 'part/';
// $this->view_path .= "part" . DIRECTORY_SEPARATOR;
}
abstract public function getPartService(): mixed;
@ -44,14 +42,6 @@ abstract class LinkController extends EquipmentController
protected function getFormFieldOption(string $field, array $options): array
{
switch ($field) {
case 'serverinfo_uid':
$temps = [];
foreach ($this->getServerService()->getEntities() as $entity) {
$temps[$entity->getPK()] = $entity->getTitle();
}
$options[$field] = $temps;
// dd($options);
break;
case 'cpuinfo_uid':
case 'raminfo_uid':
case 'diskinfo_uid':

View File

@ -16,10 +16,11 @@ class RamController extends LinkController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
$this->class_path = $this->getService()->getClassPath();
$this->title = lang("{$this->getService()->getClassPath()}.title");
$this->helper = $this->getHelper();
$this->title = lang("{$this->getService()->getClassName()}.title");
$this->class_path .= $this->getService()->getClassName();
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
}
public function getService(): RamService
{
@ -49,7 +50,6 @@ class RamController extends LinkController
'fields' => ['serverinfo_uid', 'raminfo_uid'],
];
$this->init('index', $fields);
$this->modal_type = 'modal_iframe';
return parent::index_process();
}
}

View File

@ -14,10 +14,11 @@ class CpuController extends PartController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
$this->class_path = $this->getService()->getClassPath();
$this->title = lang("{$this->getService()->getClassPath()}.title");
$this->helper = $this->getHelper();
$this->title = lang("{$this->getService()->getClassName()}.title");
$this->class_path .= $this->getService()->getClassName();
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
}
public function getService(): CpuService
{

View File

@ -14,10 +14,11 @@ class DiskController extends PartController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
$this->class_path = $this->getService()->getClassPath();
$this->title = lang("{$this->getService()->getClassPath()}.title");
$this->helper = $this->getHelper();
$this->title = lang("{$this->getService()->getClassName()}.title");
$this->class_path .= $this->getService()->getClassName();
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
}
public function getService(): DiskService
{

View File

@ -13,8 +13,6 @@ abstract class PartController extends EquipmentController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= 'part/';
// $this->view_path .= "part" . DIRECTORY_SEPARATOR;
}
protected function setOrderByForList()

View File

@ -14,10 +14,11 @@ class RamController extends PartController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
$this->class_path = $this->getService()->getClassPath();
$this->title = lang("{$this->getService()->getClassPath()}.title");
$this->helper = $this->getHelper();
$this->title = lang("{$this->getService()->getClassName()}.title");
$this->class_path .= $this->getService()->getClassName();
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
}
public function getService(): RamService
{

View File

@ -8,9 +8,9 @@ use Psr\Log\LoggerInterface;
use App\Helpers\Equipment\ServerHelper;
use App\Services\Equipment\ServerService;
use App\Services\Equipment\Part\CpuService;
use App\Services\Equipment\Part\RamService;
use App\Services\Equipment\Part\DiskService;
use App\Services\Equipment\Link\CpuService;
use App\Services\Equipment\Link\RamService;
use App\Services\Equipment\Link\DiskService;
class ServerController extends EquipmentController
{
@ -20,13 +20,11 @@ class ServerController extends EquipmentController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
$this->title = lang("{$this->getService()->getClassName()}.title");
$this->class_path .= $this->getService()->getClassName();
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
$this->class_path = $this->getService()->getClassPath();
$this->title = lang("{$this->getService()->getClassPath()}.title");
$this->helper = $this->getHelper();
// $this->individualStylesheets = ['server_partinfo.css'];
// $this->individualScripts = ['server_partinfo.js'];
}
public function getService(): ServerService
{
@ -70,7 +68,7 @@ class ServerController extends EquipmentController
'fields' => ['code', 'type', 'model', 'CPU', 'RAM', 'DISK', 'status'],
];
$this->init('index', $fields);
$this->modal_type = 'modal_iframe';
// $this->modal_type = 'modal_fetch_v2'; //기본은 modal_iframe임
$entities = [];
foreach (parent::index_process() as $entity) {
$entity->setPartEntities("CPU", $this->getCpuService()->getPartEntities($entity));

View File

@ -15,10 +15,11 @@ class SoftwareController extends EquipmentController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
$this->class_path = $this->getService()->getClassPath();
$this->title = lang("{$this->getService()->getClassPath()}.title");
$this->helper = $this->getHelper();
$this->title = lang("{$this->getService()->getClassName()}.title");
$this->class_path .= $this->getService()->getClassName();
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
}
public function getService(): SoftwareService
{
@ -41,7 +42,6 @@ class SoftwareController extends EquipmentController
'fields' => ['type', 'model', 'status', 'description'],
];
$this->init('index', $fields);
$this->modal_type = 'modal_iframe';
return parent::index_process();
}
}

View File

@ -14,8 +14,6 @@ class Home extends AdminController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->title = "관리자페이지 메인";
$this->helper = $this->getHelper();
}
final public function getService(): Service

View File

@ -18,10 +18,11 @@ class MyLogController extends AdminController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
$this->class_path = $this->getService()->getClassPath();
$this->title = lang("{$this->getService()->getClassPath()}.title");
$this->helper = $this->getHelper();
$this->title = lang("{$this->getService()->getClassName()}.title");
$this->class_path .= $this->getService()->getClassName();
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
}
final public function getService(): Service
{

View File

@ -19,10 +19,11 @@ class UserController extends AdminController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
$this->class_path = $this->getService()->getClassPath();
$this->title = lang("{$this->getService()->getClassPath()}.title");
$this->helper = $this->getHelper();
$this->title = lang("{$this->getService()->getClassName()}.title");
$this->class_path .= $this->getService()->getClassName();
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
}
final public function getService(): UserService
{

View File

@ -21,7 +21,9 @@ abstract class AuthController extends CommonController
$this->layout = "auth";
$this->uri_path = "auth/";
$this->view_path = "auth" . DIRECTORY_SEPARATOR;
$this->helper = $this->getHelper();
$this->title = "사용자인증";
$this->individualStylesheets = [];
$this->individualScripts = [];
}
abstract protected function getSNSButton(): string;
abstract protected function login_process(): UserEntity;

View File

@ -18,9 +18,6 @@ class GoogleController extends AuthController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
$this->class_path = $this->getService()->getClassPath();
$this->title = lang("{$this->getService()->getClassPath()}.title");;
}
final public function getSocket()
{

View File

@ -15,9 +15,6 @@ class LocalController extends AuthController
public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
{
parent::initController($request, $response, $logger);
$this->uri_path .= strtolower($this->getService()->getClassName()) . '/';
$this->class_path = $this->getService()->getClassPath();
$this->title = lang("{$this->getService()->getClassPath()}.title");;
}
final public function getService(): LocalService
{

View File

@ -34,8 +34,6 @@ abstract class CommonController extends BaseController
$this->myAuthName = $this->getMyAuth()->getNameByAuthInfo();
$this->myAuthUID = $this->getMyAuth()->getUIDByAuthInfo();
}
$this->individualStylesheets = [];
$this->individualScripts = [];
}
final public function __get($name)
{
@ -111,7 +109,7 @@ abstract class CommonController extends BaseController
{
switch ($field) {
default:
$options[$field] = lang($this->getService()->getClassPath() . '.' . strtoupper($field));
$options[$field] = lang($this->getService()->getClassName() . '.' . strtoupper($field));
break;
}
if (!is_array($options)) {
@ -130,7 +128,6 @@ abstract class CommonController extends BaseController
}
$options = $this->getFormFieldOption($field, $options);
}
// dd($options);
return $options;
}
protected function setValidation(Validation $validation, string $action, string $field, ?string $rule = null): Validation

View File

@ -4,8 +4,8 @@
"settings": {
"width": 4000,
"height": 4000,
"scrollTop": -705.0313,
"scrollLeft": -1854.3014,
"scrollTop": -1726.0313,
"scrollLeft": -1275.3014,
"zoomLevel": 0.82,
"show": 511,
"database": 4,
@ -612,42 +612,6 @@
"createAt": 1745819764139
}
},
"F82-EcEv3fB4uzGzPrPla": {
"id": "F82-EcEv3fB4uzGzPrPla",
"name": "serviceinfos_lineinfos",
"comment": "서비스-회선 연결",
"columnIds": [
"PQWVHSFO2ixiAvG2FPtNK",
"fDS7QeP4XnANQE_qEtGsY",
"dDoAacc03mr5Qr0bIwlN6",
"LyX52QG0qvEVedLUxYJDd",
"bfvSqmZKRGwglKHwbLVTz",
"iYSERwWFGJgDi9-uEJfTS"
],
"seqColumnIds": [
"PQWVHSFO2ixiAvG2FPtNK",
"fDS7QeP4XnANQE_qEtGsY",
"dDoAacc03mr5Qr0bIwlN6",
"LyX52QG0qvEVedLUxYJDd",
"bfvSqmZKRGwglKHwbLVTz",
"SAJjTd76vMt9-sjpnk11V",
"8FuC8kf_1mqFDJ26TKj3u",
"iYSERwWFGJgDi9-uEJfTS",
"nAYYL4VvZwFBqqY9J5A1P"
],
"ui": {
"x": 1169.5592,
"y": 1703.1059,
"zIndex": 2,
"widthName": 113,
"widthComment": 94,
"color": ""
},
"meta": {
"updateAt": 1747625662621,
"createAt": 1745819764139
}
},
"jO40Ej5EXImXnadoJo9bn": {
"id": "jO40Ej5EXImXnadoJo9bn",
"name": "couponinfo",
@ -855,50 +819,6 @@
"createAt": 1746783705263
}
},
"M9XC2MNIJqyKe77s6znI7": {
"id": "M9XC2MNIJqyKe77s6znI7",
"name": "billinginfo_detail",
"comment": "청구서 상세정보",
"columnIds": [
"zlUiG0OmBC3q6Z3V1dOKc",
"XqPP8eaTMK9vWD9QQJkYy",
"g41qCdbclynuoNo7zTUoC",
"4sOzBtwc60uLCkHDsc97O",
"1rO0HpkAfirZmhaN1AfEp",
"gj0lezIVbnpLT2mHo07Lt",
"ML125axlUAsBywUvRiZTr"
],
"seqColumnIds": [
"zlUiG0OmBC3q6Z3V1dOKc",
"V6GO9aJVqbCkSNyuuUQZR",
"XqPP8eaTMK9vWD9QQJkYy",
"8lqEpuD0pgHuFAKgAcb_C",
"fjz1tZJeFpPjWlvpNogge",
"Xx_20LUdW7jZxJRZ6rdil",
"ZeTOeaI1N5mWuBiB0tO1F",
"GfFdPBERgldIUWf5bA_nZ",
"cuyA-A5FkTXz_x0BD1Uld",
"g41qCdbclynuoNo7zTUoC",
"4sOzBtwc60uLCkHDsc97O",
"1rO0HpkAfirZmhaN1AfEp",
"gj0lezIVbnpLT2mHo07Lt",
"M6x8wlvrCkm0FWL8umYC3",
"ML125axlUAsBywUvRiZTr",
"761T13bs94ZLVeC2iJm13"
],
"ui": {
"x": 2324.3826,
"y": 971.8752,
"zIndex": 697,
"widthName": 89,
"widthComment": 89,
"color": ""
},
"meta": {
"updateAt": 1747627186617,
"createAt": 1747281566137
}
},
"RTq5rHQupiXXJPXqpN8K5": {
"id": "RTq5rHQupiXXJPXqpN8K5",
"name": "defenceinfo",
@ -3204,126 +3124,6 @@
"createAt": 1745819764139
}
},
"PQWVHSFO2ixiAvG2FPtNK": {
"id": "PQWVHSFO2ixiAvG2FPtNK",
"tableId": "F82-EcEv3fB4uzGzPrPla",
"name": "uid",
"comment": "",
"dataType": "INT",
"default": "",
"options": 11,
"ui": {
"keys": 1,
"widthName": 60,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1746576266319,
"createAt": 1745819764139
}
},
"fDS7QeP4XnANQE_qEtGsY": {
"id": "fDS7QeP4XnANQE_qEtGsY",
"tableId": "F82-EcEv3fB4uzGzPrPla",
"name": "serviceinfo_uid",
"comment": "",
"dataType": "INT",
"default": "",
"options": 8,
"ui": {
"keys": 0,
"widthName": 80,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1745819764139,
"createAt": 1745819764139
}
},
"dDoAacc03mr5Qr0bIwlN6": {
"id": "dDoAacc03mr5Qr0bIwlN6",
"tableId": "F82-EcEv3fB4uzGzPrPla",
"name": "lineinfo_uid",
"comment": "",
"dataType": "INT",
"default": "",
"options": 8,
"ui": {
"keys": 0,
"widthName": 63,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1745819764139,
"createAt": 1745819764139
}
},
"nAYYL4VvZwFBqqY9J5A1P": {
"id": "nAYYL4VvZwFBqqY9J5A1P",
"tableId": "F82-EcEv3fB4uzGzPrPla",
"name": "billing_type",
"comment": "",
"dataType": "VARCHAR(20)",
"default": "'month'",
"options": 0,
"ui": {
"keys": 0,
"widthName": 63,
"widthComment": 60,
"widthDataType": 75,
"widthDefault": 60
},
"meta": {
"updateAt": 1747278256064,
"createAt": 1745819764139
}
},
"bfvSqmZKRGwglKHwbLVTz": {
"id": "bfvSqmZKRGwglKHwbLVTz",
"tableId": "F82-EcEv3fB4uzGzPrPla",
"name": "amount",
"comment": "",
"dataType": "INT",
"default": "0",
"options": 8,
"ui": {
"keys": 0,
"widthName": 60,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1747281837283,
"createAt": 1745819764139
}
},
"iYSERwWFGJgDi9-uEJfTS": {
"id": "iYSERwWFGJgDi9-uEJfTS",
"tableId": "F82-EcEv3fB4uzGzPrPla",
"name": "created_at",
"comment": "",
"dataType": "TIMESTAMP",
"default": "CURRENT_TIMESTAMP",
"options": 8,
"ui": {
"keys": 0,
"widthName": 60,
"widthComment": 60,
"widthDataType": 65,
"widthDefault": 122
},
"meta": {
"updateAt": 1745819764139,
"createAt": 1745819764139
}
},
"9gNKhuq9UnDKyb9KuZ7cY": {
"id": "9gNKhuq9UnDKyb9KuZ7cY",
"tableId": "jO40Ej5EXImXnadoJo9bn",
@ -5104,46 +4904,6 @@
"createAt": 1747198681287
}
},
"SAJjTd76vMt9-sjpnk11V": {
"id": "SAJjTd76vMt9-sjpnk11V",
"tableId": "F82-EcEv3fB4uzGzPrPla",
"name": "start_at",
"comment": "",
"dataType": "DATE",
"default": "",
"options": 0,
"ui": {
"keys": 0,
"widthName": 60,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1747276995320,
"createAt": 1747276980620
}
},
"8FuC8kf_1mqFDJ26TKj3u": {
"id": "8FuC8kf_1mqFDJ26TKj3u",
"tableId": "F82-EcEv3fB4uzGzPrPla",
"name": "end_at",
"comment": "",
"dataType": "DATE",
"default": "",
"options": 0,
"ui": {
"keys": 0,
"widthName": 60,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1747277047507,
"createAt": 1747276980620
}
},
"uUAmxeQ2jccu4JFTvVBGY": {
"id": "uUAmxeQ2jccu4JFTvVBGY",
"tableId": "3tdV9J9ns8BWCGQeCXITI",
@ -5364,26 +5124,6 @@
"createAt": 1747278265899
}
},
"LyX52QG0qvEVedLUxYJDd": {
"id": "LyX52QG0qvEVedLUxYJDd",
"tableId": "F82-EcEv3fB4uzGzPrPla",
"name": "billing_type",
"comment": "",
"dataType": "VARCHAR(20)",
"default": "'month'",
"options": 8,
"ui": {
"keys": 0,
"widthName": 63,
"widthComment": 60,
"widthDataType": 75,
"widthDefault": 60
},
"meta": {
"updateAt": 1747281881579,
"createAt": 1747278266228
}
},
"3xj1HNeP9Ve34yUpq2lCB": {
"id": "3xj1HNeP9Ve34yUpq2lCB",
"tableId": "3tdV9J9ns8BWCGQeCXITI",
@ -5484,286 +5224,6 @@
"createAt": 1747279185055
}
},
"zlUiG0OmBC3q6Z3V1dOKc": {
"id": "zlUiG0OmBC3q6Z3V1dOKc",
"tableId": "M9XC2MNIJqyKe77s6znI7",
"name": "uid",
"comment": "",
"dataType": "INT",
"default": "",
"options": 11,
"ui": {
"keys": 1,
"widthName": 60,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1747281698883,
"createAt": 1747281695983
}
},
"V6GO9aJVqbCkSNyuuUQZR": {
"id": "V6GO9aJVqbCkSNyuuUQZR",
"tableId": "M9XC2MNIJqyKe77s6znI7",
"name": "clientinfo_uid",
"comment": "",
"dataType": "INT",
"default": "",
"options": 8,
"ui": {
"keys": 0,
"widthName": 73,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1747281695983,
"createAt": 1747281695983
}
},
"8lqEpuD0pgHuFAKgAcb_C": {
"id": "8lqEpuD0pgHuFAKgAcb_C",
"tableId": "M9XC2MNIJqyKe77s6znI7",
"name": "invoiced_at",
"comment": "",
"dataType": "DATE",
"default": "",
"options": 8,
"ui": {
"keys": 0,
"widthName": 61,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1747281695983,
"createAt": 1747281695983
}
},
"fjz1tZJeFpPjWlvpNogge": {
"id": "fjz1tZJeFpPjWlvpNogge",
"tableId": "M9XC2MNIJqyKe77s6znI7",
"name": "total_amount",
"comment": "",
"dataType": "INT",
"default": "0",
"options": 0,
"ui": {
"keys": 0,
"widthName": 72,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1747281695983,
"createAt": 1747281695983
}
},
"Xx_20LUdW7jZxJRZ6rdil": {
"id": "Xx_20LUdW7jZxJRZ6rdil",
"tableId": "M9XC2MNIJqyKe77s6znI7",
"name": "status",
"comment": "",
"dataType": "VARCHAR(20)",
"default": "'unpaid'",
"options": 0,
"ui": {
"keys": 0,
"widthName": 60,
"widthComment": 60,
"widthDataType": 75,
"widthDefault": 60
},
"meta": {
"updateAt": 1747281695983,
"createAt": 1747281695983
}
},
"M6x8wlvrCkm0FWL8umYC3": {
"id": "M6x8wlvrCkm0FWL8umYC3",
"tableId": "M9XC2MNIJqyKe77s6znI7",
"name": "updated_at",
"comment": "",
"dataType": "TIMESTAMP",
"default": "",
"options": 0,
"ui": {
"keys": 0,
"widthName": 62,
"widthComment": 60,
"widthDataType": 65,
"widthDefault": 60
},
"meta": {
"updateAt": 1747281695983,
"createAt": 1747281695983
}
},
"ML125axlUAsBywUvRiZTr": {
"id": "ML125axlUAsBywUvRiZTr",
"tableId": "M9XC2MNIJqyKe77s6znI7",
"name": "created_at",
"comment": "",
"dataType": "TIMESTAMP",
"default": "CURRENT_TIMESTAMP",
"options": 8,
"ui": {
"keys": 0,
"widthName": 60,
"widthComment": 60,
"widthDataType": 65,
"widthDefault": 122
},
"meta": {
"updateAt": 1747281695983,
"createAt": 1747281695983
}
},
"XqPP8eaTMK9vWD9QQJkYy": {
"id": "XqPP8eaTMK9vWD9QQJkYy",
"tableId": "M9XC2MNIJqyKe77s6znI7",
"name": "billinginfo_uid",
"comment": "",
"dataType": "INT",
"default": "",
"options": 8,
"ui": {
"keys": 0,
"widthName": 77,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1747627122211,
"createAt": 1747281724119
}
},
"761T13bs94ZLVeC2iJm13": {
"id": "761T13bs94ZLVeC2iJm13",
"tableId": "M9XC2MNIJqyKe77s6znI7",
"name": "invoiced_at",
"comment": "",
"dataType": "DATE",
"default": "",
"options": 8,
"ui": {
"keys": 0,
"widthName": 61,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1747281800343,
"createAt": 1747281800343
}
},
"gj0lezIVbnpLT2mHo07Lt": {
"id": "gj0lezIVbnpLT2mHo07Lt",
"tableId": "M9XC2MNIJqyKe77s6znI7",
"name": "amount",
"comment": "",
"dataType": "INT",
"default": "0",
"options": 8,
"ui": {
"keys": 0,
"widthName": 60,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1747281823097,
"createAt": 1747281807242
}
},
"ZeTOeaI1N5mWuBiB0tO1F": {
"id": "ZeTOeaI1N5mWuBiB0tO1F",
"tableId": "M9XC2MNIJqyKe77s6znI7",
"name": "serviceinfo_uid",
"comment": "",
"dataType": "INT",
"default": "",
"options": 8,
"ui": {
"keys": 0,
"widthName": 80,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1747282270188,
"createAt": 1747282258543
}
},
"1rO0HpkAfirZmhaN1AfEp": {
"id": "1rO0HpkAfirZmhaN1AfEp",
"tableId": "M9XC2MNIJqyKe77s6znI7",
"name": "billing_type",
"comment": "",
"dataType": "VARCHAR(20)",
"default": "'month'",
"options": 8,
"ui": {
"keys": 0,
"widthName": 63,
"widthComment": 60,
"widthDataType": 75,
"widthDefault": 60
},
"meta": {
"updateAt": 1747282482361,
"createAt": 1747282482361
}
},
"cuyA-A5FkTXz_x0BD1Uld": {
"id": "cuyA-A5FkTXz_x0BD1Uld",
"tableId": "M9XC2MNIJqyKe77s6znI7",
"name": "partinfo_uid",
"comment": "일회성용",
"dataType": "INT",
"default": "",
"options": 8,
"ui": {
"keys": 0,
"widthName": 66,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1747282634151,
"createAt": 1747282593370
}
},
"GfFdPBERgldIUWf5bA_nZ": {
"id": "GfFdPBERgldIUWf5bA_nZ",
"tableId": "M9XC2MNIJqyKe77s6znI7",
"name": "partinfo_uid",
"comment": "일회성용",
"dataType": "INT",
"default": "",
"options": 8,
"ui": {
"keys": 0,
"widthName": 66,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1747282762136,
"createAt": 1747282736023
}
},
"pY1RZgzuWBgRILX2XsMTt": {
"id": "pY1RZgzuWBgRILX2XsMTt",
"tableId": "B4qGh3KZsXHQ3_4EOgwJZ",
@ -6444,46 +5904,6 @@
"createAt": 1747626605945
}
},
"g41qCdbclynuoNo7zTUoC": {
"id": "g41qCdbclynuoNo7zTUoC",
"tableId": "M9XC2MNIJqyKe77s6znI7",
"name": "serviceinofs_lineinfos_uid",
"comment": "",
"dataType": "INT",
"default": "",
"options": 8,
"ui": {
"keys": 0,
"widthName": 135,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1747627136540,
"createAt": 1747627057149
}
},
"4sOzBtwc60uLCkHDsc97O": {
"id": "4sOzBtwc60uLCkHDsc97O",
"tableId": "M9XC2MNIJqyKe77s6znI7",
"name": "serviceinfos_ipinfos_uid",
"comment": "",
"dataType": "INT",
"default": "",
"options": 8,
"ui": {
"keys": 0,
"widthName": 126,
"widthComment": 60,
"widthDataType": 60,
"widthDefault": 60
},
"meta": {
"updateAt": 1747627183882,
"createAt": 1747627168942
}
},
"3RTWS2E2a-gW6e6wW3sgo": {
"id": "3RTWS2E2a-gW6e6wW3sgo",
"tableId": "Btzrm5KCDr_59gZoXRXol",
@ -8584,90 +8004,6 @@
"createAt": 1747375452269
}
},
"1aURvXuUxIJSq835rWUHk": {
"id": "1aURvXuUxIJSq835rWUHk",
"identification": false,
"relationshipType": 16,
"startRelationshipType": 2,
"start": {
"tableId": "B4qGh3KZsXHQ3_4EOgwJZ",
"columnIds": [
"F9EPb6nsDx6Tf3GG8rvP1"
],
"x": 424.9137,
"y": 1388.9145,
"direction": 8
},
"end": {
"tableId": "kc1EFvFhlBSc0B0bDgX28",
"columnIds": [
"CY-ZAs3Ns1YhoxL9UiCee"
],
"x": 436.63779999999997,
"y": 1657.3461,
"direction": 4
},
"meta": {
"updateAt": 1747621930445,
"createAt": 1747621930445
}
},
"6OXR3AW1sSxDJA2ITIz9i": {
"id": "6OXR3AW1sSxDJA2ITIz9i",
"identification": false,
"relationshipType": 16,
"startRelationshipType": 2,
"start": {
"tableId": "kc1EFvFhlBSc0B0bDgX28",
"columnIds": [
"nb5CGzskl3_LIRA0yyede"
],
"x": 686.1378,
"y": 1763.0603857142855,
"direction": 2
},
"end": {
"tableId": "3RJ8qxNNqL7eCvBmmqzpd",
"columnIds": [
"i_tL8EWzsKz8Q6TjEkdFG"
],
"x": 1166.2223,
"y": 1798.7022,
"direction": 1
},
"meta": {
"updateAt": 1747625914065,
"createAt": 1747625914065
}
},
"QJHejLurUndA2vJMYRawK": {
"id": "QJHejLurUndA2vJMYRawK",
"identification": false,
"relationshipType": 16,
"startRelationshipType": 2,
"start": {
"tableId": "doERb3lIVeBW_D0NtNYX8",
"columnIds": [
"7B0zaLoZnOoMNW8OHZlrQ"
],
"x": 2349.9171,
"y": 1617.5552,
"direction": 1
},
"end": {
"tableId": "3RJ8qxNNqL7eCvBmmqzpd",
"columnIds": [
"0rvNoG9MrbN-6-6iDdw3K"
],
"x": 1681.2223,
"y": 1798.7022,
"direction": 2
},
"meta": {
"updateAt": 1747625932404,
"createAt": 1747625932404
}
},
"avEpCJt-x4kXYN5bcKxiG": {
"id": "avEpCJt-x4kXYN5bcKxiG",
"identification": false,
@ -8696,62 +8032,6 @@
"createAt": 1747626605945
}
},
"MxsfrRz6sLqMRG7oWr1iC": {
"id": "MxsfrRz6sLqMRG7oWr1iC",
"identification": false,
"relationshipType": 16,
"startRelationshipType": 2,
"start": {
"tableId": "3RJ8qxNNqL7eCvBmmqzpd",
"columnIds": [
"_oIE_aDPjyuwPZo2h8QUJ"
],
"x": 1678.4824,
"y": 1662.4008,
"direction": 2
},
"end": {
"tableId": "M9XC2MNIJqyKe77s6znI7",
"columnIds": [
"g41qCdbclynuoNo7zTUoC"
],
"x": 2324.3826,
"y": 1083.8752,
"direction": 1
},
"meta": {
"updateAt": 1747627057149,
"createAt": 1747627057149
}
},
"JJfgXbuwe3g8PggszRv6T": {
"id": "JJfgXbuwe3g8PggszRv6T",
"identification": false,
"relationshipType": 16,
"startRelationshipType": 2,
"start": {
"tableId": "3tdV9J9ns8BWCGQeCXITI",
"columnIds": [
"N9whwkJk3imEwSl_tqk7W"
],
"x": 1684.2751,
"y": 1974.3199,
"direction": 2
},
"end": {
"tableId": "M9XC2MNIJqyKe77s6znI7",
"columnIds": [
"4sOzBtwc60uLCkHDsc97O"
],
"x": 2324.3826,
"y": 1158.5418666666667,
"direction": 1
},
"meta": {
"updateAt": 1747627168942,
"createAt": 1747627168942
}
},
"xnvl_tBcFrTl87jBGDW08": {
"id": "xnvl_tBcFrTl87jBGDW08",
"identification": false,

View File

@ -8,7 +8,7 @@ class CpuEntity extends LinkEntity
{
const PK = CpuModel::PK;
const TITLE = CpuModel::TITLE;
public function getLinkInfoUID(): string
public function getPartInfoUID(): string
{
return $this->attributes['cpuinfo_uid'];
}

View File

@ -8,7 +8,7 @@ class DiskEntity extends LinkEntity
{
const PK = DiskModel::PK;
const TITLE = DiskModel::TITLE;
public function getLinkInfoUID(): string
public function getPartInfoUID(): string
{
return $this->attributes['diskinfo_uid'];
}

View File

@ -11,7 +11,7 @@ abstract class LinkEntity extends EquipmentEntity
{
parent::__construct($data);
}
abstract public function getLinkInfoUID(): string;
abstract public function getPartInfoUID(): string;
final public function getServiceInfoUID(): string
{
return $this->attributes['serverinfo_uid'];

View File

@ -8,7 +8,7 @@ class RamEntity extends LinkEntity
{
const PK = RamModel::PK;
const TITLE = RamModel::TITLE;
public function getLinkInfoUID(): string
public function getPartInfoUID(): string
{
return $this->attributes['raminfo_uid'];
}

View File

@ -232,24 +232,15 @@ class CommonHelper
}
$form = implode(" ", $forms);
} else {
$extra_class = isset($extras['class']) ? $extras['class'] . ' select-field' : 'select-field';
// $extra_class = isset($extras['class']) ? $extras['class'] : "";
$formOptions = ["" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택'];
foreach ($viewDatas['field_options'][$field] as $key => $label) {
$formOptions[$key] = $label;
}
$form = form_dropdown($field, $formOptions, $value, $extras);
$form = form_dropdown($field, $formOptions, $value, ['class' => $extra_class, ...array_diff_key($extras, ['class' => ''])]);
}
break;
case 'clientinfo_uid':
if (!is_array($viewDatas['field_options'][$field])) {
throw new \Exception(__METHOD__ . "에서 {$field}의 field_options가 array형태가 아닙니다.");
}
$extra_class = isset($extras['class']) ? $extras['class'] . ' select-field' : 'select-field';
$formOptions = ["" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택'];
foreach ($viewDatas['field_options'][$field] as $key => $label) {
$formOptions[$key] = $label;
}
$form = form_dropdown($field, $formOptions, $value, ['class' => $extra_class, ...array_diff_key($extras, ['class' => ''])]);
break;
case 'manufactur_at':
case 'billing_at':
case 'start_at':
@ -260,6 +251,7 @@ class CommonHelper
$form = form_input($field, $value ?? "", ['class' => $extra_class, ...array_diff_key($extras, ['class' => ''])]);
break;
case 'description':
case 'content':
$extra_class = isset($extras['class']) ? $extras['class'] . ' tinymce' : 'tinymce';
$form = form_textarea($field, $value ?? "", ['id' => $field, 'class' => $extra_class, ...array_diff_key($extras, ['class' => ''])]);
break;
@ -268,8 +260,8 @@ class CommonHelper
if (!is_array($viewDatas['field_options'][$field])) {
throw new \Exception(__METHOD__ . "에서 {$field}의 field_options가 array형태가 아닙니다.");
}
// $extra_class = isset($extras['class']) ? $extras['class'] . ' select-field' : 'select-field';
$extra_class = isset($extras['class']) ? $extras['class'] : "";
$extra_class = isset($extras['class']) ? $extras['class'] . ' select-field' : 'select-field';
// $extra_class = isset($extras['class']) ? $extras['class'] : "";
$formOptions = ["" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택'];
foreach ($viewDatas['field_options'][$field] as $key => $label) {
$formOptions[$key] = $label;
@ -300,13 +292,6 @@ class CommonHelper
]
);
break;
case 'user_uid':
$user_uids = [];
foreach (explode(DEFAULTS["DELIMITER_ROLE"], $value) as $key) {
$user_uids[] = $viewDatas['field_options'][$field][$key];
}
$value = implode(" , ", array: $user_uids);
break;
case 'role':
$roles = [];
foreach (explode(DEFAULTS["DELIMITER_ROLE"], $value) as $key) {

View File

@ -13,7 +13,29 @@ class ServerHelper extends EquipmentHelper
parent::__construct($request);
$this->setTitleField(field: ServerModel::TITLE);
}
// public function getFieldForm(string $field, mixed $value, array $viewDatas, array $extras = []): string
// {
// if (in_array($viewDatas['action'], ['create', 'modify'])) {
// $extras = (strpos($viewDatas['field_rules'][$field], 'required') !== false) ? ["class" => "form-control", "required" => "", ...$extras] : ["class" => "form-control", ...$extras];
// }
// switch ($field) {
// case 'model':
// if (!is_array($viewDatas['field_options'][$field])) {
// throw new \Exception(__METHOD__ . "에서 {$field}의 field_options가 array형태가 아닙니다.");
// }
// $extra_class = isset($extras['class']) ? $extras['class'] . ' select-field' : 'select-field';
// $formOptions = ["" => lang($viewDatas['class_path'] . '.label.' . $field) . ' 선택'];
// foreach ($viewDatas['field_options'][$field] as $key => $label) {
// $formOptions[$key] = $label;
// }
// $form = form_dropdown($field, $formOptions, $value, ['class' => $extra_class, ...array_diff_key($extras, ['class' => ''])]);
// break;
// default:
// $form = parent::getFieldForm($field, $value, $viewDatas, $extras);
// break;
// }
// return $form;
// }
public function getFieldView(string $field, array $viewDatas, array $extras = []): string
{
$value = $viewDatas['entity']->$field ?? "";

View File

@ -14,11 +14,7 @@ abstract class AuthService extends CommonService
protected function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
public function getClassName(): string
{
return "Auth" . DIRECTORY_SEPARATOR;
$this->addClassName('Auth');
}
//Index,FieldForm관련

View File

@ -15,6 +15,7 @@ class GoogleService extends AuthService
{
$this->_mySocket = $mySocket;
parent::__construct($request);
$this->addClassName('Google');
}
public function getMySocket(): mixed
{
@ -23,10 +24,6 @@ class GoogleService extends AuthService
}
return $this->_mySOcket;
}
public function getClassName(): string
{
return parent::getClassName() . DIRECTORY_SEPARATOR . "Google";
}
final public function getModelClass(): UserModel
{
return new UserModel();

View File

@ -11,10 +11,7 @@ class LocalService extends AuthService
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
final public function getClassName(): string
{
return parent::getClassName() . DIRECTORY_SEPARATOR . "Local";
$this->addClassName('Local');
}
final public function getModelClass(): UserModel
{

View File

@ -9,15 +9,14 @@ abstract class CommonService
{
private $_serviceDatas = [];
private $_model = null;
private $_classNames = [];
protected ?IncomingRequest $request = null;
protected function __construct(?IncomingRequest $_request = null)
{
$this->request = $_request;
}
abstract public function getModelClass(): mixed;
abstract public function getEntityClass(): mixed;
abstract public function getClassName(): string;
abstract public function getFields(): array;
abstract public function getFilterFields(): array;
abstract public function getBatchJobFields(): array;
@ -32,14 +31,18 @@ abstract class CommonService
{
$this->_serviceDatas[$name] = $value;
}
final public function getClassPath(): string
{
return $this->getClassName();
}
final public function getRequest(): IncomingRequest|null
{
return $this->request;
}
final public function addClassName(string $className): void
{
$this->_classNames[] = $className;
}
final public function getClassName($delimeter = DIRECTORY_SEPARATOR): string
{
return implode($delimeter, $this->_classNames);
}
final public function getModel(): mixed
{
if (!$this->_model) {

View File

@ -12,10 +12,7 @@ class AccountService extends CustomerService
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
public function getClassName(): string
{
return parent::getClassName() . DIRECTORY_SEPARATOR . "Account";
$this->addClassName('Account');
}
public function getModelClass(): AccountModel
{

View File

@ -14,10 +14,7 @@ class ClientService extends CustomerService
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
public function getClassName(): string
{
return parent::getClassName() . DIRECTORY_SEPARATOR . "Client";
$this->addClassName('Client');
}
public function getModelClass(): ClientModel
{

View File

@ -12,10 +12,7 @@ class CouponService extends CustomerService
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
public function getClassName(): string
{
return parent::getClassName() . DIRECTORY_SEPARATOR . "Coupon";
$this->addClassName('Coupon');
}
public function getModelClass(): CouponModel
{

View File

@ -13,12 +13,8 @@ abstract class CustomerService extends CommonService
protected function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
$this->addClassName('Customer');
}
public function getClassName(): string
{
return "Customer";
}
final public function getClientService(): ClientService
{
if (!$this->_clientService) {

View File

@ -12,10 +12,7 @@ class PointService extends CustomerService
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
public function getClassName(): string
{
return parent::getClassName() . DIRECTORY_SEPARATOR . "Point";
$this->addClassName('Point');
}
public function getModelClass(): PointModel
{

View File

@ -12,10 +12,7 @@ class ServiceService extends CustomerService
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
public function getClassName(): string
{
return parent::getClassName() . DIRECTORY_SEPARATOR . "Service";
$this->addClassName('Service');
}
public function getModelClass(): ServiceModel
{

View File

@ -13,10 +13,7 @@ class DefenceService extends EquipmentService
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
public function getClassName(): string
{
return parent::getClassName() . DIRECTORY_SEPARATOR . "Defence";
$this->addClassName('Defence');
}
public function getModelClass(): DefenceModel
{

View File

@ -10,9 +10,6 @@ abstract class EquipmentService extends CommonService
protected function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
public function getClassName(): string
{
return "Equipment";
$this->addClassName('Equipment');
}
}

View File

@ -12,10 +12,7 @@ class IpService extends EquipmentService
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
public function getClassName(): string
{
return parent::getClassName() . DIRECTORY_SEPARATOR . "Ip";
$this->addClassName('Ip');
}
public function getModelClass(): IpModel
{

View File

@ -12,10 +12,7 @@ class LineService extends EquipmentService
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
public function getClassName(): string
{
return parent::getClassName() . DIRECTORY_SEPARATOR . "Line";
$this->addClassName('Line');
}
public function getModelClass(): LineModel
{

View File

@ -2,9 +2,11 @@
namespace App\Services\Equipment\Link;
use CodeIgniter\HTTP\IncomingRequest;
use App\Entities\Equipment\Link\CpuEntity;
use App\Models\Equipment\Link\CpuModel;
use CodeIgniter\HTTP\IncomingRequest;
use App\Services\Equipment\Part\CpuService as PartService;
class CpuService extends LinkService
{
@ -12,10 +14,7 @@ class CpuService extends LinkService
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
public function getClassName(): string
{
return parent::getClassName() . DIRECTORY_SEPARATOR . "Cpu";
$this->addClassName('Cpu');
}
public function getModelClass(): CpuModel
{
@ -25,6 +24,10 @@ class CpuService extends LinkService
{
return new CpuEntity();
}
protected function getPartService(): PartService
{
return new PartService();
}
public function getFields(): array
{
return [
@ -32,7 +35,6 @@ class CpuService extends LinkService
"cpuinfo_uid",
];
}
public function getFilterFields(): array
{
return ["serverinfo_uid", "cpuinfo_uid"];

View File

@ -2,9 +2,11 @@
namespace App\Services\Equipment\Link;
use CodeIgniter\HTTP\IncomingRequest;
use App\Entities\Equipment\Link\DiskEntity;
use App\Models\Equipment\Link\DiskModel;
use CodeIgniter\HTTP\IncomingRequest;
use App\Services\Equipment\Part\DiskService as PartService;
class DiskService extends LinkService
{
@ -12,10 +14,7 @@ class DiskService extends LinkService
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
public function getClassName(): string
{
return parent::getClassName() . DIRECTORY_SEPARATOR . "Disk";
$this->addClassName('Disk');
}
public function getModelClass(): DiskModel
{
@ -25,6 +24,10 @@ class DiskService extends LinkService
{
return new DiskEntity();
}
protected function getPartService(): PartService
{
return new PartService();
}
public function getFields(): array
{

View File

@ -6,14 +6,22 @@ namespace App\Services\Equipment\Link;
use App\Services\Equipment\EquipmentService;
use CodeIgniter\HTTP\IncomingRequest;
use App\Entities\Equipment\ServerEntity;
abstract class LinkService extends EquipmentService
{
protected function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
$this->addClassName('Link');
}
public function getClassName(): string
abstract protected function getPartService();
final public function getPartEntities(ServerEntity $serverEntity): array
{
return parent::getClassName() . DIRECTORY_SEPARATOR . "Link";
$entities = [];
foreach ($this->getEntities(['serverinfo_uid' => $serverEntity->getPK()]) as $entity) {
$entities[] = $this->getPartService()->getEntity($entity->getPartInfoUID());
}
return $entities;
}
}

View File

@ -2,9 +2,11 @@
namespace App\Services\Equipment\Link;
use CodeIgniter\HTTP\IncomingRequest;
use App\Entities\Equipment\Link\RamEntity;
use App\Models\Equipment\Link\RamModel;
use CodeIgniter\HTTP\IncomingRequest;
use App\Services\Equipment\Part\RamService as PartService;
class RamService extends LinkService
{
@ -12,10 +14,7 @@ class RamService extends LinkService
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
public function getClassName(): string
{
return parent::getClassName() . DIRECTORY_SEPARATOR . "Ram";
$this->addClassName('Ram');
}
public function getModelClass(): RamModel
{
@ -25,6 +24,10 @@ class RamService extends LinkService
{
return new RamEntity();
}
protected function getPartService(): PartService
{
return new PartService();
}
public function getFields(): array
{

View File

@ -13,10 +13,7 @@ class CpuService extends PartService
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
public function getClassName(): string
{
return parent::getClassName() . DIRECTORY_SEPARATOR . "Cpu";
$this->addClassName('Cpu');
}
public function getModelClass(): CpuModel
{

View File

@ -13,10 +13,7 @@ class DiskService extends PartService
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
public function getClassName(): string
{
return parent::getClassName() . DIRECTORY_SEPARATOR . "Disk";
$this->addClassName('Disk');
}
public function getModelClass(): DiskModel
{

View File

@ -2,8 +2,6 @@
namespace App\Services\Equipment\Part;
use App\Entities\Equipment\ServerEntity;
use App\Services\Equipment\EquipmentService;
use CodeIgniter\HTTP\IncomingRequest;
@ -12,36 +10,21 @@ abstract class PartService extends EquipmentService
protected function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
$this->addClassName('Part');
}
abstract protected function getLinkService(): mixed;
public function getClassName(): string
{
return parent::getClassName() . DIRECTORY_SEPARATOR . "Part";
}
public function getFields(): array
final public function getFields(): array
{
return [
"model",
"status",
];
}
public function getFilterFields(): array
final public function getFilterFields(): array
{
return ['status'];
}
public function getBatchJobFields(): array
final public function getBatchJobFields(): array
{
return ['status'];
}
final public function getPartEntities(ServerEntity $entity): array
{
$entities = [];
foreach ($this->getLinkService()->getEntities(['serverinfo_uid' => $entity->getPK()]) as $linkEntity) {
$entities[] = $this->getEntity($linkEntity->getPartInfoUID());
}
return $entities;
}
}

View File

@ -13,10 +13,7 @@ class RamService extends PartService
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
public function getClassName(): string
{
return parent::getClassName() . DIRECTORY_SEPARATOR . "Ram";
$this->addClassName('Ram');
}
public function getModelClass(): RamModel
{

View File

@ -13,10 +13,7 @@ class ServerService extends EquipmentService
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
public function getClassName(): string
{
return parent::getClassName() . DIRECTORY_SEPARATOR . "Server";
$this->addClassName('Server');
}
public function getModelClass(): ServerModel
{

View File

@ -12,10 +12,7 @@ class SoftwareService extends EquipmentService
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
public function getClassName(): string
{
return parent::getClassName() . DIRECTORY_SEPARATOR . "Software";
$this->addClassName('Software');
}
public function getModelClass(): SoftwareModel
{

View File

@ -13,10 +13,7 @@ class MyLogService extends CommonService
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
final public function getClassName(): string
{
return "MyLog";
$this->addClassName('MyLog');
}
public function getModelClass(): MyLogModel
{

View File

@ -13,10 +13,7 @@ class UserSNSService extends CommonService
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
final public function getClassName(): string
{
return "UserSNS";
$this->addClassName('UserSNS');
}
public function getModelClass(): UserSNSModel
{

View File

@ -12,10 +12,7 @@ class UserService extends CommonService
public function __construct(?IncomingRequest $request = null)
{
parent::__construct($request);
}
final public function getClassName(): string
{
return "User";
$this->addClassName('User');
}
public function getModelClass(): UserModel
{

View File

@ -49,7 +49,7 @@
<?= form_close() ?>
<div class=" index_pagination"><?= $viewDatas['pagination'] ?></div>
</div>
<div class="index_bottom"><?= $this->include("templates/common/" . (isset($viewDatas['modal_type']) ? $viewDatas['modal_type'] : 'modal_fetch')); ?></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>

View File

@ -5,7 +5,7 @@
<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"); ?>
<?= $this->include("templates/{$viewDatas['layout']}/index_content_top_popup"); ?>
<?= 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>
@ -37,7 +37,7 @@
<?= form_close() ?>
<div class=" index_pagination"><?= $viewDatas['pagination'] ?></div>
</div>
<div class="index_bottom"><?= $this->include("templates/common/" . (isset($viewDatas['modal_type']) ? $viewDatas['modal_type'] : 'modal_fetch')); ?></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>
<!-- Layout Middle End -->

View File

@ -9,7 +9,7 @@
<a href="/admin/customer/client"><?= ICONS['SIGNPOST'] ?>고객정보</a>
</div>
<div class="accordion-item">
<a href="/admin/customer/account"><?= ICONS['DEPOSIT'] ?>입출금내역</a>
<a href="/admin/customer/account"><?= ICONS['DEPOSIT'] ?> 예치금내역</a>
</div>
<div class="accordion-item">
<a href="/admin/customer/coupon"><?= ICONS['CLOUD'] ?> 쿠폰내역</a>

View File

@ -9,7 +9,7 @@
</nav>
<nav class="search nav justify-content-center">
검색어:<?= form_input('word', $viewDatas['word'] ?? "") ?>
검색일:<?= form_input('start', $viewDatas['start'] ?? "", ["class" => "calender"]) ?><?= form_input('end', $viewDatas['end'] ?? "", ["class" => "calender"]) ?>
검색일:<?= form_input('start', $viewDatas['start'] ?? "", ["class" => "calender"]) ?>~<?= form_input('end', $viewDatas['end'] ?? "", ["class" => "calender"]) ?>
<button class="btn btn-outline-primary" type="submit">검색</button>
<?= anchor(current_url() . '/download/excel', ICONS['EXCEL'], ["target" => "_self", "class" => "excel"]) ?>
</nav>

View File

@ -0,0 +1,22 @@
<?= form_open(current_url(), ["method" => "get"]) ?>
<nav class="index_top navbar navbar-expand-lg">
<div class="container-fluid">
<nav class="condition nav">
조건:
<?php foreach ($viewDatas['filter_fields'] as $field): ?>
<?= $viewDatas['helper']->getFieldForm($field, $viewDatas[$field] ?? old($field), $viewDatas) ?>
<?php endforeach ?>
</nav>
<nav class="search nav justify-content-center">
검색어:<?= form_input('word', $viewDatas['word'] ?? "") ?>
<button class="btn btn-outline-primary" type="submit">검색</button>
<?= anchor(current_url() . '/download/excel', ICONS['EXCEL'], ["target" => "_self", "class" => "excel"]) ?>
</nav>
<nav class="pageinfo nav justify-content-end">
Page:<?= $viewDatas['page'] ?>/<?= $viewDatas['total_page'] ?>
<?= form_dropdown('per_page', $viewDatas['page_options'], $viewDatas['per_page'], ['onChange' => 'this.form.submit()']) ?>
/ :<?= $viewDatas['total_count'] ?>
</nav>
</div>
</nav>
<?= form_close() ?>

View File

@ -8,7 +8,7 @@
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="modal-body-content">
<div class="modal-body" id="modal-body-content" style="max-height: 80vh; overflow-y: auto;">
<!-- 여기에 동적으로 콘텐츠가 로드됩니다 -->
</div>
<div class="modal-footer">

View File

@ -0,0 +1,166 @@
<!-- 모달 HTML -->
<div id="index_action_form" class="modal fade" tabindex="-1" aria-labelledby="modal_label" aria-hidden="true">
<div class="modal-dialog modal-xl modal-dialog-centered modal-dialog-scrollable">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modal_label">
<h4>&nbsp;&nbsp;<?= ICONS['DESKTOP'] ?> <?= $viewDatas['title'] ?>&nbsp;&nbsp;</h4>
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" id="modal-body-content" style="max-height: 80vh; overflow-y: auto;">
<!-- 여기에 AJAX로 콘텐츠가 삽입됨 -->
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" onClick="window.location.reload()">닫기</button>
</div>
</div>
</div>
</div>
<!-- 필수 CDN (jQuery, Select2, jQuery UI Datepicker, TinyMCE) -->
<link href="//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/js/select2.min.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">
<script src="//code.jquery.com/ui/1.13.2/jquery-ui.min.js"></script>
<script src="https://cdn.tiny.cloud/1/no-api-key/tinymce/6/tinymce.min.js" referrerpolicy="origin"></script>
<script>
const modal = document.getElementById('index_action_form');
const modalBody = document.getElementById('modal-body-content');
// 콘텐츠 로드 함수
async function loadContent(url) {
try {
const response = await fetch(url);
if (!response.ok) throw new Error(`HTTP 오류! 상태: ${response.status}`);
const content = await response.text();
modalBody.innerHTML = content;
// 스크립트 실행
const scripts = modalBody.getElementsByTagName('script');
for (let script of scripts) {
if (script.src) {
await loadScript(script.src);
} else {
eval(script.innerHTML);
}
}
setupFormSubmission();
initializePlugins(); // 플러그인 초기화
} catch (error) {
console.error('콘텐츠 로드 중 오류 발생:', error);
modalBody.innerHTML = '<p>콘텐츠를 로드하는 중 오류가 발생했습니다. 다시 시도해 주세요.</p>';
}
}
// 외부 스크립트 로드 함수
function loadScript(src) {
return new Promise((resolve, reject) => {
const script = document.createElement('script');
script.src = src;
script.onload = () => resolve();
script.onerror = () => reject(new Error(`스크립트 로드 실패: ${src}`));
document.body.appendChild(script);
});
}
// 폼 제출 처리
function setupFormSubmission() {
const form = modalBody.querySelector('form');
if (form) {
form.addEventListener('submit', async (e) => {
e.preventDefault();
const formData = new FormData(form);
try {
const response = await fetch(form.action, {
method: 'POST',
body: formData
});
const contentType = response.headers.get("content-type");
if (contentType && contentType.includes("application/json")) {
const result = await response.json();
if (result.success) {
modalBody.innerHTML = '<p>데이터가 성공적으로 저장되었습니다.</p>';
setTimeout(() => {
bootstrap.Modal.getInstance(modal).hide();
window.location.reload();
}, 2000);
} else {
modalBody.innerHTML = result.html;
setupFormSubmission();
initializePlugins(); // 다시 초기화
}
} else {
const htmlContent = await response.text();
modalBody.innerHTML = htmlContent;
const scripts = modalBody.getElementsByTagName('script');
for (let script of scripts) {
eval(script.innerHTML);
}
setupFormSubmission();
initializePlugins();
}
} catch (error) {
console.error('폼 제출 중 오류 발생:', error);
modalBody.innerHTML = '<p>데이터 저장 중 오류가 발생했습니다. 다시 시도해 주세요.</p>';
}
});
}
}
// 플러그인 초기화 (TinyMCE, Select2, Datepicker)
function initializePlugins() {
// TinyMCE
if (typeof tinymce !== 'undefined') {
tinymce.remove(); // 모든 에디터 제거 후 재초기화
tinymce.init({
selector: 'textarea',
license_key: 'gpl',
height: 250,
plugins: 'advlist autolink lists link image charmap preview anchor',
toolbar: 'undo redo blocks fontfamily fontsize forecolor backcolor | bold italic underline strikethrough | align numlist bullist | link image | table media | code fullscreen preview',
menubar: 'file edit view insert format tools table help'
});
}
// Select2
if (typeof $ !== 'undefined' && $.fn.select2) {
$(".calender").datepicker({
changeYear: true,
changeMonth: true,
yearRange: "-10:+0",
dateFormat: "yy-mm-dd"
});
}
// Datepicker (jQuery UI)
if (typeof $ !== 'undefined' && $.fn.datepicker) {
$(".select-field").select2({
theme: "classic",
width: 'style',
dropdownAutoWidth: true
});
}
}
// 모달 열릴 때 AJAX 콘텐츠 로드
modal.addEventListener('show.bs.modal', (event) => {
const button = event.relatedTarget;
const url = button.getAttribute('data-src');
if (url) {
loadContent(url);
} else {
console.error('data-src 속성이 없습니다.');
modalBody.innerHTML = '<p>URL을 찾을 수 없습니다. 다시 시도해 주세요.</p>';
}
});
// 모달 닫힐 때 초기화
modal.addEventListener('hidden.bs.modal', () => {
modalBody.innerHTML = '';
});
</script>

View File

@ -6,7 +6,7 @@
-->
<div id="index_action_form" class="index_action_form modal fade" tabindex="-1" aria-labelledby="iframe_modal_label"
aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered modal-dialog-scrollable"> <!-- modal-lg는 모달 크기를 크게 설정 -->
<div class="modal-dialog modal-xl modal-dialog-centered modal-dialog-scrollable"> <!-- modal-lg는 모달 크기를 크게 설정 -->
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="iframe_modal_label">
@ -14,7 +14,7 @@
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="modal-body" style="max-height: 80vh; overflow-y: auto;">
<iframe id="form-container" src="about:blank" width="100%" frameborder="0" allowfullscreen></iframe>
</div>
<div class="modal-footer">
@ -28,7 +28,8 @@
<script>
function resizeIframe() {
var iframe = document.getElementById('form-container');
iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';
// iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';
iframe.style.height = '500px';
}
function closeBootstrapModal() {
@ -44,16 +45,15 @@
}
var index_action_form = document.getElementById('index_action_form');
index_action_form.addEventListener('show.bs.modal', function (event) {
index_action_form.addEventListener('show.bs.modal', function(event) {
var button = event.relatedTarget;
var iframeSrc = button.getAttribute('data-src');
var iframe = document.getElementById('form-container');
iframe.src = iframeSrc;
iframe.src = button.getAttribute('data-src');
// iframe이 로드된 후 높이를 조정하는 이벤트 리스너 추가
iframe.onload = function () {
iframe.onload = function() {
resizeIframe();
// 컨텐츠 변경 시 높이 재조정을 위한 MutationObserver 설정
var iframeContent = iframe.contentDocument || iframe.contentWindow.document;
// 컨텐츠 변경 시 높이 재조정을 위한 MutationObserver 설정
var observer = new MutationObserver(resizeIframe);
observer.observe(iframeContent.body, {
attributes: true,
@ -64,7 +64,7 @@
});
// 모달이 닫힐 때 iframe src를 초기화하여 종료 처리
index_action_form.addEventListener('hidden.bs.modal', function () {
index_action_form.addEventListener('hidden.bs.modal', function() {
var iframe = document.getElementById('form-container');
iframe.src = "about:blank"; // 모달 닫힐 때 iframe 초기화
});