dbmsv2_init...1
This commit is contained in:
parent
7f0bbab8dd
commit
ca838f31bb
@ -362,14 +362,16 @@ define('LAYOUTS', [
|
|||||||
//List의 Page당 갯수
|
//List의 Page당 갯수
|
||||||
define('DEFAULT_LIST_PERPAGE', $_ENV['LIST_PERPAGE'] ?? $_SERVER['LIST_PERPAGE'] ?? 20);
|
define('DEFAULT_LIST_PERPAGE', $_ENV['LIST_PERPAGE'] ?? $_SERVER['LIST_PERPAGE'] ?? 20);
|
||||||
|
|
||||||
//신규서비스 Interval
|
|
||||||
define('SERVICE_NEW_INTERVAL', $_ENV['SERVICE_NEW_INTERVAL'] ?? $_SERVER['SERVICE_NEW_INTERVAL'] ?? 7);
|
|
||||||
|
|
||||||
//서버 PartType
|
//서버 PartType
|
||||||
define("SERVER", [
|
define("SERVER", [
|
||||||
"PARTTYPES" => ['CPU', 'RAM', 'DISK'],
|
"PARTTYPES" => ['CPU', 'RAM', 'DISK'],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
define("SERVICE", [
|
||||||
|
"NEW_INTERVAL" => $_ENV['SERVICE_NEW_INTERVAL'] ?? $_SERVER['SERVICE_NEW_INTERVAL'] ?? 7,
|
||||||
|
"PARTTYPES" => ['CPU', 'RAM', 'DISK', 'DB', 'OS', 'SOFTWARE'],
|
||||||
|
]);
|
||||||
|
|
||||||
//결제관련
|
//결제관련
|
||||||
define("PAYMENT", [
|
define("PAYMENT", [
|
||||||
'BILLING' => [
|
'BILLING' => [
|
||||||
@ -382,16 +384,3 @@ define("PAYMENT", [
|
|||||||
'POINT' => 'point'
|
'POINT' => 'point'
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
//서버아이템 정의
|
|
||||||
define("SERVER_LINK_ITEMS", [
|
|
||||||
'CPU' => "CPU정보",
|
|
||||||
'RAM' => "RAM정보",
|
|
||||||
'DISK' => "DISK정보",
|
|
||||||
'OS' => "OS정보",
|
|
||||||
'SOFTWARE' => "기타SW정보",
|
|
||||||
'IP' => "IP정보",
|
|
||||||
'CS' => "CS정보",
|
|
||||||
]);
|
|
||||||
|
|
||||||
//Test
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ use App\Helpers\Customer\ServiceHelper;
|
|||||||
|
|
||||||
use App\Services\Customer\PaymentService;
|
use App\Services\Customer\PaymentService;
|
||||||
use App\Services\Customer\ServiceService;
|
use App\Services\Customer\ServiceService;
|
||||||
|
use CodeIgniter\HTTP\RedirectResponse;
|
||||||
use CodeIgniter\HTTP\RequestInterface;
|
use CodeIgniter\HTTP\RequestInterface;
|
||||||
use CodeIgniter\HTTP\ResponseInterface;
|
use CodeIgniter\HTTP\ResponseInterface;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
@ -45,6 +46,29 @@ class ServiceController extends CustomerController
|
|||||||
return $this->_paymentService;
|
return $this->_paymentService;
|
||||||
}
|
}
|
||||||
//Index,FieldForm관련
|
//Index,FieldForm관련
|
||||||
|
protected function getResultSuccess(string $message = MESSAGES["SUCCESS"], ?string $actionTemplate = null): RedirectResponse|string
|
||||||
|
{
|
||||||
|
switch ($this->getAction()) {
|
||||||
|
// case 'create_form':
|
||||||
|
// case 'modify_form':
|
||||||
|
case 'view':
|
||||||
|
case 'index':
|
||||||
|
$this->control = $this->getControlDatas();
|
||||||
|
$this->getHelper()->setViewDatas($this->getViewDatas());
|
||||||
|
$actionTemplate = $this->request->getVar('ActionTemplate') ?? $actionTemplate ?? 'service';
|
||||||
|
if ($actionTemplate) {
|
||||||
|
$view_file = $this->view_path . $actionTemplate . DIRECTORY_SEPARATOR . $this->getAction();
|
||||||
|
} else {
|
||||||
|
$view_file = $this->view_path . $this->getAction();
|
||||||
|
}
|
||||||
|
$result = view($view_file, ['viewDatas' => $this->getViewDatas()]);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$result = parent::getResultSuccess($message, $actionTemplate);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
//생성관련
|
//생성관련
|
||||||
protected function create_process(array $formDatas): ServiceEntity
|
protected function create_process(array $formDatas): ServiceEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@ -20,7 +20,7 @@ class ServerController extends EquipmentController
|
|||||||
$this->class_path .= $this->getService()->getClassName();
|
$this->class_path .= $this->getService()->getClassName();
|
||||||
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
|
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
|
||||||
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
|
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
|
||||||
$this->serverinfopartinfo_cnt_options = array_combine(range(1, 10), range(1, 10));
|
$this->partinfo_cnt_options = array_combine(range(1, 10), range(1, 10));
|
||||||
}
|
}
|
||||||
public function getService(): ServerService
|
public function getService(): ServerService
|
||||||
{
|
{
|
||||||
|
|||||||
@ -20,7 +20,7 @@ class ServerPartController extends EquipmentController
|
|||||||
$this->class_path .= $this->getService()->getClassName();
|
$this->class_path .= $this->getService()->getClassName();
|
||||||
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
|
$this->uri_path .= strtolower($this->getService()->getClassName('/')) . '/';
|
||||||
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
|
// $this->view_path .= strtolower($this->getService()->getClassName()) . DIRECTORY_SEPARATOR;
|
||||||
$this->serverinfopartinfo_cnt_options = array_combine(range(1, 10), range(1, 10));
|
$this->partinfo_cnt_options = array_combine(range(1, 10), range(1, 10));
|
||||||
}
|
}
|
||||||
public function getService(): ServerPartService
|
public function getService(): ServerPartService
|
||||||
{
|
{
|
||||||
|
|||||||
@ -72,7 +72,7 @@ class Home extends AdminController
|
|||||||
//Total 서버 현황
|
//Total 서버 현황
|
||||||
$this->totalCounts = $this->getService()->getTotalCountsByType();
|
$this->totalCounts = $this->getService()->getTotalCountsByType();
|
||||||
//interval을 기준으로 최근 신규 서비스정보 가져오기
|
//interval을 기준으로 최근 신규 서비스정보 가져오기
|
||||||
$this->interval = intval($this->request->getVar('interval') ?? SERVICE_NEW_INTERVAL);
|
$this->interval = intval($this->request->getVar('interval') ?? SERVICE['NEW_INTERVAL']);
|
||||||
$this->newServiceEntities = $this->getService()->getEntitiesByNewService($this->interval);
|
$this->newServiceEntities = $this->getService()->getEntitiesByNewService($this->interval);
|
||||||
$this->newServiceCount = count($this->newServiceEntities);
|
$this->newServiceCount = count($this->newServiceEntities);
|
||||||
//서비스별 미납 Count
|
//서비스별 미납 Count
|
||||||
|
|||||||
@ -11,6 +11,25 @@ class ServiceHelper extends CustomerHelper
|
|||||||
parent::__construct();
|
parent::__construct();
|
||||||
$this->setTitleField(field: ServiceModel::TITLE);
|
$this->setTitleField(field: ServiceModel::TITLE);
|
||||||
}
|
}
|
||||||
|
private function getServerPartForm(string $field, mixed $value, array $viewDatas, array $extras, string $partType): string
|
||||||
|
{
|
||||||
|
//Type별로 부품연결정보가 있는지 확인
|
||||||
|
$serverpartEntity = null;
|
||||||
|
if (array_key_exists('entity', $viewDatas)) {
|
||||||
|
$serverpartEntity = $viewDatas['entity']->getServerPartEntity($partType);
|
||||||
|
}
|
||||||
|
$form = "";
|
||||||
|
//수정시 Type별 사용할 hidden partinfo_uid
|
||||||
|
if ($serverpartEntity !== null) {
|
||||||
|
$form .= form_hidden("partinfo_uid_{$partType}", $serverpartEntity->getPK());
|
||||||
|
}
|
||||||
|
//기존 입력화면에서 return 된것인지?
|
||||||
|
if ($value === null && $serverpartEntity !== null) {
|
||||||
|
$value = $serverpartEntity->getPartInfoUID();
|
||||||
|
}
|
||||||
|
$form .= $this->form_dropdown_custom($field, $value, $viewDatas, $extras);
|
||||||
|
return $form;
|
||||||
|
}
|
||||||
public function getFieldForm(string $field, mixed $value, array $viewDatas, array $extras = []): string
|
public function getFieldForm(string $field, mixed $value, array $viewDatas, array $extras = []): string
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
@ -54,12 +73,69 @@ class ServiceHelper extends CustomerHelper
|
|||||||
}
|
}
|
||||||
$form .= $this->form_dropdown_custom($field, $value, $viewDatas, $extras);
|
$form .= $this->form_dropdown_custom($field, $value, $viewDatas, $extras);
|
||||||
break;
|
break;
|
||||||
|
case 'partinfo_uid_CPU':
|
||||||
|
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'CPU');
|
||||||
|
break;
|
||||||
|
case 'partinfo_uid_CPU_cnt':
|
||||||
|
$form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개";
|
||||||
|
break;
|
||||||
|
case 'partinfo_uid_RAM':
|
||||||
|
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'RAM',);
|
||||||
|
break;
|
||||||
|
case 'partinfo_uid_RAM_cnt':
|
||||||
|
$form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개";
|
||||||
|
break;
|
||||||
|
case 'partinfo_uid_DISK':
|
||||||
|
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'DISK');
|
||||||
|
break;
|
||||||
|
case 'partinfo_uid_DISK_cnt':
|
||||||
|
$form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개";
|
||||||
|
break;
|
||||||
|
case 'partinfo_uid_DISK_extra':
|
||||||
|
$form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras);
|
||||||
|
break;
|
||||||
|
case 'partinfo_uid_OS':
|
||||||
|
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'OS');
|
||||||
|
break;
|
||||||
|
case 'partinfo_uid_OS_cnt':
|
||||||
|
$form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개";
|
||||||
|
break;
|
||||||
|
case 'partinfo_uid_DB':
|
||||||
|
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'DB');
|
||||||
|
break;
|
||||||
|
case 'partinfo_uid_DB_cnt':
|
||||||
|
$form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개";
|
||||||
|
break;
|
||||||
|
case 'partinfo_uid_SOFTWARE':
|
||||||
|
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'SOFTWARE');
|
||||||
|
break;
|
||||||
|
case 'partinfo_uid_SOFTWARE_cnt':
|
||||||
|
$form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개";
|
||||||
|
break;
|
||||||
|
// case 'ipinfo_uid':
|
||||||
|
// case 'csinfo_uid':
|
||||||
|
// $extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' select-field' : 'select-field';
|
||||||
|
// $form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras);
|
||||||
|
// break;
|
||||||
default:
|
default:
|
||||||
$form = parent::getFieldForm($field, $value, $viewDatas, $extras);
|
$form = parent::getFieldForm($field, $value, $viewDatas, $extras);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return $form;
|
return $form;
|
||||||
}
|
}
|
||||||
|
private function getServerPartView(string $field, mixed $value, array $viewDatas, array $extras, string $partType): string
|
||||||
|
{
|
||||||
|
$serverPartEntity = $viewDatas['entity']->getServerEntity()->getServerPartEntity($partType);
|
||||||
|
if ($serverPartEntity !== null) {
|
||||||
|
$value .= sprintf(
|
||||||
|
"<div>%s%s %s</div>",
|
||||||
|
$serverPartEntity->getTitle(),
|
||||||
|
$serverPartEntity->getCnt() >= 1 ? "*" . $serverPartEntity->getCnt() . "개" : "",
|
||||||
|
$serverPartEntity->getExtra() ?? ""
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return $value;
|
||||||
|
}
|
||||||
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) {
|
||||||
@ -77,28 +153,25 @@ class ServiceHelper extends CustomerHelper
|
|||||||
// ]
|
// ]
|
||||||
// );
|
// );
|
||||||
// break;
|
// break;
|
||||||
case "LINE":
|
case 'CPU':
|
||||||
case "IP":
|
case 'RAM':
|
||||||
case "SERVER":
|
case 'DISK':
|
||||||
case "CPU":
|
case 'OS':
|
||||||
case "RAM":
|
case 'DB':
|
||||||
case "STORAGE":
|
case 'SOFTWARE':
|
||||||
case "SOFTWARE":
|
$value = $this->getServerPartView($field, $value, $viewDatas, $extras, $field);
|
||||||
case "DEFENCE":
|
break;
|
||||||
case "DOMAIN":
|
case 'ipinfo_uid':
|
||||||
$temps = ["<ul>"];
|
$value = "";
|
||||||
foreach ($viewDatas['entity']->getItemEntities($field) as $itemEntity) {
|
foreach ($viewDatas['entity']->getServerEntity()->getIPEntities() as $ipEntity) {
|
||||||
// dd($viewDatas['control']['field_optons'][$field]);
|
$value .= sprintf("<div>%s%s %s</div>", $ipEntity->getTitle(), $ipEntity->getAmount());
|
||||||
$temps[] = sprintf(
|
}
|
||||||
"<li title=\"%s\">%s %s %s</li>",
|
break;
|
||||||
$itemEntity->getView_Price(),
|
case 'csinfo_uid':
|
||||||
$viewDatas['control']['field_optons'][$field][$itemEntity->getItemUid()]->getTitle(),
|
$value = "";
|
||||||
$itemEntity->getView_BillingCycle(),
|
foreach ($viewDatas['entity']->getServerEntity()->getCSEntities() as $csEntity) {
|
||||||
$itemEntity->getView_Sale()
|
$value .= sprintf("<div>%s%s %s</div>", $csEntity->getTitle(), $csEntity->getAmount());
|
||||||
);
|
|
||||||
}
|
}
|
||||||
$temps[] = "</ul>";
|
|
||||||
$value = implode("", $temps);
|
|
||||||
break;
|
break;
|
||||||
case 'billing_at':
|
case 'billing_at':
|
||||||
if (array_key_exists('unPaids', $viewDatas)) {
|
if (array_key_exists('unPaids', $viewDatas)) {
|
||||||
|
|||||||
@ -46,19 +46,19 @@ class ServerHelper extends EquipmentHelper
|
|||||||
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'CPU');
|
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'CPU');
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_CPU_cnt':
|
case 'partinfo_uid_CPU_cnt':
|
||||||
$form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개";
|
$form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개";
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_RAM':
|
case 'partinfo_uid_RAM':
|
||||||
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'RAM',);
|
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'RAM',);
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_RAM_cnt':
|
case 'partinfo_uid_RAM_cnt':
|
||||||
$form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개";
|
$form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개";
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_DISK':
|
case 'partinfo_uid_DISK':
|
||||||
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'DISK');
|
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'DISK');
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_DISK_cnt':
|
case 'partinfo_uid_DISK_cnt':
|
||||||
$form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개";
|
$form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개";
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_DISK_extra':
|
case 'partinfo_uid_DISK_extra':
|
||||||
$form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras);
|
$form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras);
|
||||||
@ -67,19 +67,19 @@ class ServerHelper extends EquipmentHelper
|
|||||||
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'OS');
|
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'OS');
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_OS_cnt':
|
case 'partinfo_uid_OS_cnt':
|
||||||
$form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개";
|
$form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개";
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_DB':
|
case 'partinfo_uid_DB':
|
||||||
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'DB');
|
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'DB');
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_DB_cnt':
|
case 'partinfo_uid_DB_cnt':
|
||||||
$form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개";
|
$form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개";
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_SOFTWARE':
|
case 'partinfo_uid_SOFTWARE':
|
||||||
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'SOFTWARE');
|
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'SOFTWARE');
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_SOFTWARE_cnt':
|
case 'partinfo_uid_SOFTWARE_cnt':
|
||||||
$form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개";
|
$form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개";
|
||||||
break;
|
break;
|
||||||
case 'ipinfo_uid':
|
case 'ipinfo_uid':
|
||||||
case 'csinfo_uid':
|
case 'csinfo_uid':
|
||||||
|
|||||||
@ -46,19 +46,19 @@ class ServerPartHelper extends EquipmentHelper
|
|||||||
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'CPU');
|
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'CPU');
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_CPU_cnt':
|
case 'partinfo_uid_CPU_cnt':
|
||||||
$form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개";
|
$form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개";
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_RAM':
|
case 'partinfo_uid_RAM':
|
||||||
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'RAM',);
|
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'RAM',);
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_RAM_cnt':
|
case 'partinfo_uid_RAM_cnt':
|
||||||
$form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개";
|
$form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개";
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_DISK':
|
case 'partinfo_uid_DISK':
|
||||||
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'DISK');
|
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'DISK');
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_DISK_cnt':
|
case 'partinfo_uid_DISK_cnt':
|
||||||
$form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개";
|
$form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개";
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_DISK_extra':
|
case 'partinfo_uid_DISK_extra':
|
||||||
$form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras);
|
$form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras);
|
||||||
@ -67,19 +67,19 @@ class ServerPartHelper extends EquipmentHelper
|
|||||||
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'OS');
|
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'OS');
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_OS_cnt':
|
case 'partinfo_uid_OS_cnt':
|
||||||
$form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개";
|
$form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개";
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_DB':
|
case 'partinfo_uid_DB':
|
||||||
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'DB');
|
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'DB');
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_DB_cnt':
|
case 'partinfo_uid_DB_cnt':
|
||||||
$form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개";
|
$form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개";
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_SOFTWARE':
|
case 'partinfo_uid_SOFTWARE':
|
||||||
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'SOFTWARE');
|
$form = $this->getServerPartForm($field, $value, $viewDatas, $extras, 'SOFTWARE');
|
||||||
break;
|
break;
|
||||||
case 'partinfo_uid_SOFTWARE_cnt':
|
case 'partinfo_uid_SOFTWARE_cnt':
|
||||||
$form = form_dropdown($field, $viewDatas['serverinfopartinfo_cnt_options'], $value, $extras) . "개";
|
$form = form_dropdown($field, $viewDatas['partinfo_cnt_options'], $value, $extras) . "개";
|
||||||
break;
|
break;
|
||||||
case 'ipinfo_uid':
|
case 'ipinfo_uid':
|
||||||
case 'csinfo_uid':
|
case 'csinfo_uid':
|
||||||
|
|||||||
@ -2,15 +2,17 @@
|
|||||||
|
|
||||||
namespace App\Services\Customer;
|
namespace App\Services\Customer;
|
||||||
|
|
||||||
use App\Traits\IPTrait;
|
|
||||||
use App\Services\Equipment\IPService;
|
|
||||||
use App\Services\Equipment\CSService;
|
|
||||||
use App\Models\Customer\ServiceModel;
|
|
||||||
use App\Entities\Customer\ServiceEntity;
|
use App\Entities\Customer\ServiceEntity;
|
||||||
|
use App\Models\Customer\ServiceModel;
|
||||||
|
use App\Services\Equipment\CSService;
|
||||||
|
use App\Services\Equipment\IPService;
|
||||||
|
use App\Services\Equipment\ServerPartService;
|
||||||
|
use App\Traits\IPTrait;
|
||||||
|
|
||||||
class ServiceService extends CustomerService
|
class ServiceService extends CustomerService
|
||||||
{
|
{
|
||||||
use IPTrait;
|
use IPTrait;
|
||||||
|
private ?ServerPartService $_serverPartService = null;
|
||||||
private ?IPService $_ipService = null;
|
private ?IPService $_ipService = null;
|
||||||
private ?CSService $_csService = null;
|
private ?CSService $_csService = null;
|
||||||
public function __construct()
|
public function __construct()
|
||||||
@ -109,6 +111,13 @@ class ServiceService extends CustomerService
|
|||||||
}
|
}
|
||||||
return $entity;
|
return $entity;
|
||||||
}
|
}
|
||||||
|
final public function getServerPartService(): ServerPartService
|
||||||
|
{
|
||||||
|
if (!$this->_serverPartService) {
|
||||||
|
$this->_serverPartService = new ServerPartService();
|
||||||
|
}
|
||||||
|
return $this->_serverPartService;
|
||||||
|
}
|
||||||
final public function getIPService(): IPService
|
final public function getIPService(): IPService
|
||||||
{
|
{
|
||||||
if (!$this->_ipService) {
|
if (!$this->_ipService) {
|
||||||
@ -127,6 +136,24 @@ class ServiceService extends CustomerService
|
|||||||
public function getFormOption(string $field, array $options = []): array
|
public function getFormOption(string $field, array $options = []): array
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
|
case 'partinfo_uid_CPU':
|
||||||
|
$options = $this->getServerPartService()->getFormOption('partinfo_uid_CPU');
|
||||||
|
break;
|
||||||
|
case 'partinfo_uid_RAM':
|
||||||
|
$options = $this->getServerPartService()->getFormOption('partinfo_uid_RAM');
|
||||||
|
break;
|
||||||
|
case 'partinfo_uid_DISK':
|
||||||
|
$options = $this->getServerPartService()->getFormOption('partinfo_uid_DISK');
|
||||||
|
break;
|
||||||
|
case 'partinfo_uid_OS':
|
||||||
|
$options = $this->getServerPartService()->getFormOption('partinfo_uid_OS');
|
||||||
|
break;
|
||||||
|
case 'partinfo_uid_DB':
|
||||||
|
$options = $this->getServerPartService()->getFormOption('partinfo_uid_DB');
|
||||||
|
break;
|
||||||
|
case 'partinfo_uid_SOFTWARE':
|
||||||
|
$options = $this->getServerPartService()->getFormOption('partinfo_uid_SOFTWARE');
|
||||||
|
break;
|
||||||
case 'ipinfo_uid': //수정때문에 전체가 필요
|
case 'ipinfo_uid': //수정때문에 전체가 필요
|
||||||
$options = $this->getIPService()->getEntities();
|
$options = $this->getIPService()->getEntities();
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -35,12 +35,6 @@ class ServerService extends EquipmentService
|
|||||||
"partinfo_uid_DISK",
|
"partinfo_uid_DISK",
|
||||||
"partinfo_uid_DISK_cnt",
|
"partinfo_uid_DISK_cnt",
|
||||||
"partinfo_uid_DISK_extra",
|
"partinfo_uid_DISK_extra",
|
||||||
"partinfo_uid_OS",
|
|
||||||
"partinfo_uid_OS_cnt",
|
|
||||||
"partinfo_uid_SOFTWARE",
|
|
||||||
"partinfo_uid_SOFTWARE_cnt",
|
|
||||||
"ipinfo_uid",
|
|
||||||
"csinfo_uid",
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
public function getFormFilters(): array
|
public function getFormFilters(): array
|
||||||
@ -54,10 +48,6 @@ class ServerService extends EquipmentService
|
|||||||
"partinfo_uid_RAM",
|
"partinfo_uid_RAM",
|
||||||
"partinfo_uid_DISK",
|
"partinfo_uid_DISK",
|
||||||
"partinfo_uid_DISK_extra",
|
"partinfo_uid_DISK_extra",
|
||||||
"partinfo_uid_OS",
|
|
||||||
"partinfo_uid_SOFTWARE",
|
|
||||||
"ipinfo_uid",
|
|
||||||
"csinfo_uid",
|
|
||||||
"status"
|
"status"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,26 +22,54 @@
|
|||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="index_head_short_column">번호</th>
|
<th class="index_head_short_column">번호</th>
|
||||||
<?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
|
<th class="index_head_short_column">
|
||||||
<th data-rtc-resizable="<?= $field ?>"><?= $viewDatas['helper']->getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
<?= $viewDatas['helper']->getListLabel('clientinfo_uid', lang("{$viewDatas['class_path']}.label.clientinfo_uid"), $viewDatas) ?>/
|
||||||
<?php endforeach ?>
|
<?= $viewDatas['helper']->getListLabel('serviceinfo_uid', lang("{$viewDatas['class_path']}.label.serviceinfo_uid"), $viewDatas) ?>
|
||||||
<th class="index_head_short_column">추가정보</th>
|
</th>
|
||||||
|
<th class="index_head_short_column">
|
||||||
|
<?= $viewDatas['helper']->getListLabel('type', lang("{$viewDatas['class_path']}.label.type"), $viewDatas) ?>/
|
||||||
|
<?= $viewDatas['helper']->getListLabel('title', lang("{$viewDatas['class_path']}.label.title"), $viewDatas) ?>
|
||||||
|
</th>
|
||||||
|
<th class="index_head_short_column">
|
||||||
|
<?= $viewDatas['helper']->getListLabel('price', lang("{$viewDatas['class_path']}.label.price"), $viewDatas) ?>/
|
||||||
|
<?= $viewDatas['helper']->getListLabel('amount', lang("{$viewDatas['class_path']}.label.amount"), $viewDatas) ?>
|
||||||
|
</th>
|
||||||
|
<th class="index_head_short_column">
|
||||||
|
<?= $viewDatas['helper']->getListLabel('manufactur_at', lang("{$viewDatas['class_path']}.label.manufactur_at"), $viewDatas) ?>/
|
||||||
|
<?= $viewDatas['helper']->getListLabel('format_at', lang("{$viewDatas['class_path']}.label.format_at"), $viewDatas) ?>
|
||||||
|
</th>
|
||||||
|
<th class="index_head_short_column">
|
||||||
|
<?= $viewDatas['helper']->getListLabel('status', lang("{$viewDatas['class_path']}.label.status"), $viewDatas) ?>
|
||||||
|
</th>
|
||||||
|
<th class="index_head_short_column">부품정보</th>
|
||||||
<th class="index_head_short_column">작업</th>
|
<th class="index_head_short_column">작업</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php $cnt = 0 ?>
|
<?php $cnt = 0 ?>
|
||||||
<?php foreach ($viewDatas['entities'] as $entity): ?>
|
<?php foreach ($viewDatas['entities'] as $entity): ?>
|
||||||
<?php $viewDatas['entity'] = $entity; ?>
|
<?php $viewDatas['entity'] = $entity; ?>
|
||||||
<tr <?= $viewDatas['entity']->getStatus() === $viewDatas['entity']::DEFAULT_STATUS ? "" : 'class="table-danger"' ?>>
|
<tr <?= $entity->getStatus() === $entity::DEFAULT_STATUS ? "" : 'class="table-danger"' ?>>
|
||||||
<?php $viewDatas['cnt'] = $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt); ?>
|
<?php $viewDatas['cnt'] = $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt); ?>
|
||||||
<td nowrap><?= $viewDatas['helper']->getListButton('modify', '', $viewDatas) ?></td>
|
<td nowrap><?= $viewDatas['helper']->getListButton('modify', '', $viewDatas) ?></td>
|
||||||
<?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
|
<td>
|
||||||
<td><?= $viewDatas['helper']->getFieldView($field, $entity->$field, $viewDatas) ?></td>
|
<div><?= $viewDatas['helper']->getFieldView('clientinfo_uid', $entity->getClientInfoUID(), $viewDatas) ?></div>
|
||||||
<?php endforeach ?>
|
<div><?= $viewDatas['helper']->getFieldView('serviceinfo_uid', $entity->getServiceInfoUID(), $viewDatas) ?></div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div><?= $viewDatas['helper']->getFieldView('type', $entity->type, $viewDatas) ?></div>
|
||||||
|
<div><?= $viewDatas['helper']->getFieldView('title', $entity->getTitle(), $viewDatas) ?></div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div><?= $viewDatas['helper']->getFieldView('price', $entity->price, $viewDatas) ?></div>
|
||||||
|
<div><?= $viewDatas['helper']->getFieldView('amount', $entity->amount, $viewDatas) ?></div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div><?= $viewDatas['helper']->getFieldView('manufactur_at', $entity->manufactur_at, $viewDatas) ?></div>
|
||||||
|
<div><?= $viewDatas['helper']->getFieldView('format_at', $entity->format_at, $viewDatas) ?></div>
|
||||||
|
</td>
|
||||||
|
<td><?= $viewDatas['helper']->getFieldView('status', $entity->status, $viewDatas) ?></td>
|
||||||
<td nowrap>
|
<td nowrap>
|
||||||
<?php foreach (SERVER['PARTTYPES'] as $partType): ?>
|
<?php foreach (SERVER['PARTTYPES'] as $partType): ?><div><?= $viewDatas['helper']->getFieldView($partType, "", $viewDatas) ?></div><?php endforeach; ?>
|
||||||
<div><?= $viewDatas['helper']->getFieldView($partType, "", $viewDatas) ?></div>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<div><?= $viewDatas['helper']->getFieldView("ipinfo_uid", "", $viewDatas) ?></div>
|
<div><?= $viewDatas['helper']->getFieldView("ipinfo_uid", "", $viewDatas) ?></div>
|
||||||
<div><?= $viewDatas['helper']->getFieldView("csinfo_uid", "", $viewDatas) ?></div>
|
<div><?= $viewDatas['helper']->getFieldView("csinfo_uid", "", $viewDatas) ?></div>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
<?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
|
<?php foreach ($viewDatas['control']['actionFields'] as $field): ?>
|
||||||
<th data-rtc-resizable="<?= $field ?>"><?= $viewDatas['helper']->getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
<th data-rtc-resizable="<?= $field ?>"><?= $viewDatas['helper']->getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
<th class="index_head_short_column">추가정보</th>
|
<th class="index_head_short_column">부품정보</th>
|
||||||
<th class="index_head_short_column">작업</th>
|
<th class="index_head_short_column">작업</th>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
@ -39,9 +39,7 @@
|
|||||||
<td><?= $viewDatas['helper']->getFieldView($field, $entity->$field, $viewDatas) ?></td>
|
<td><?= $viewDatas['helper']->getFieldView($field, $entity->$field, $viewDatas) ?></td>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
<td nowrap>
|
<td nowrap>
|
||||||
<?php foreach (SERVER['PARTTYPES'] as $partType): ?>
|
<?php foreach (SERVER['PARTTYPES'] as $partType): ?><div><?= $viewDatas['helper']->getFieldView($partType, "", $viewDatas) ?></div><?php endforeach; ?>
|
||||||
<div><?= $viewDatas['helper']->getFieldView($partType, "", $viewDatas) ?></div>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<div><?= $viewDatas['helper']->getFieldView("ipinfo_uid", "", $viewDatas) ?></div>
|
<div><?= $viewDatas['helper']->getFieldView("ipinfo_uid", "", $viewDatas) ?></div>
|
||||||
<div><?= $viewDatas['helper']->getFieldView("csinfo_uid", "", $viewDatas) ?></div>
|
<div><?= $viewDatas['helper']->getFieldView("csinfo_uid", "", $viewDatas) ?></div>
|
||||||
</td>
|
</td>
|
||||||
50
app/Views/admin/service/create_form.php
Normal file
50
app/Views/admin/service/create_form.php
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?>
|
||||||
|
<?= $this->section('content') ?>
|
||||||
|
<?php if ($error = session('error')): echo $viewDatas['helper']->alert($error) ?><?php endif ?>
|
||||||
|
<div id="container" class="content">
|
||||||
|
<div class="form_top"><?= $this->include("templates/{$viewDatas['layout']}/form_content_top"); ?></div>
|
||||||
|
<?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||||
|
<div class="action_form">
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<tr>
|
||||||
|
<th>기본 서버정보</th>
|
||||||
|
<th>기본 추가정보(서버 비용에 포함)</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<tr>
|
||||||
|
<?php foreach (["code", "type", "title", "price", "amount", "manufactur_at", "format_at", "status",] as $field): ?>
|
||||||
|
<th nowrap class="text-end"><?= $viewDatas['helper']->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
||||||
|
<td nowrap class="text-start">
|
||||||
|
<?= $viewDatas['helper']->getFieldForm($field, old($field) ?? ($viewDatas['control']['form_datas'][$field] ?? null), $viewDatas) ?>
|
||||||
|
<span><?= validation_show_error($field); ?></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach ?>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<?php foreach (SERVICE['PARTTYPES'] as $partType): ?>
|
||||||
|
<tr>
|
||||||
|
<th nowrap class="text-end"><?= $viewDatas['helper']->getFieldLabel("partinfo_uid_{$partType}", lang("{$viewDatas['class_path']}.label.partinfo_uid_{$partType}"), $viewDatas) ?></th>
|
||||||
|
<td nowrap class="text-start">
|
||||||
|
<?= $viewDatas['helper']->getFieldForm("partinfo_uid_{$partType}", old("partinfo_uid_{$partType}") ?? ($viewDatas['control']['form_datas']["partinfo_uid_{$partType}"] ?? null), $viewDatas) ?>
|
||||||
|
<?= $viewDatas['helper']->getFieldForm("partinfo_uid_{$partType}_cnt", old("partinfo_uid_{$partType}_cnt") ?? ($viewDatas['control']['form_datas']["partinfo_uid_{$partType}_cnt"] ?? null), $viewDatas) ?>
|
||||||
|
<?php if ($partType === "DISK"): ?>
|
||||||
|
<?= $viewDatas['helper']->getFieldForm("partinfo_uid_{$partType}_extra", old("partinfo_uid_{$partType}_extra") ?? ($viewDatas['control']['form_datas']["partinfo_uid_{$partType}_extra"] ?? null), $viewDatas) ?>
|
||||||
|
<?php endif ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div class="text-center"><?= form_submit('', '입력', array("class" => "btn btn-outline btn-primary")); ?></div>
|
||||||
|
<?= form_close(); ?>
|
||||||
|
</div>
|
||||||
|
<div class="form_bottom"><?= $this->include("templates/{$viewDatas['layout']}/form_content_bottom"); ?></div>
|
||||||
|
</div>
|
||||||
|
<?= $this->endSection() ?>
|
||||||
107
app/Views/admin/service/index.php
Normal file
107
app/Views/admin/service/index.php
Normal file
@ -0,0 +1,107 @@
|
|||||||
|
<?= $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>
|
||||||
|
<th class="index_head_short_column">
|
||||||
|
<?= $viewDatas['helper']->getListLabel('site', lang("{$viewDatas['class_path']}.label.site"), $viewDatas) ?>/
|
||||||
|
<?= $viewDatas['helper']->getListLabel('location', lang("{$viewDatas['class_path']}.label.location"), $viewDatas) ?>/
|
||||||
|
<?= $viewDatas['helper']->getListLabel('switchinfo_uid', lang("{$viewDatas['class_path']}.label.switchinfo_uid"), $viewDatas) ?>
|
||||||
|
</th>
|
||||||
|
<th class="index_head_short_column">
|
||||||
|
<?= $viewDatas['helper']->getListLabel('clientinfo_uid', lang("{$viewDatas['class_path']}.label.clientinfo_uid"), $viewDatas) ?>/
|
||||||
|
<?= $viewDatas['helper']->getListLabel('type', lang("{$viewDatas['class_path']}.label.type"), $viewDatas) ?>
|
||||||
|
</th>
|
||||||
|
<th class="index_head_short_column">
|
||||||
|
<?= $viewDatas['helper']->getListLabel('serverinfo_uid', lang("{$viewDatas['class_path']}.label.serverinfo_uid"), $viewDatas) ?>/
|
||||||
|
<?= $viewDatas['helper']->getListLabel('start_at', lang("{$viewDatas['class_path']}.label.start_at"), $viewDatas) ?>
|
||||||
|
</th>
|
||||||
|
<th class="index_head_short_column">
|
||||||
|
<?= $viewDatas['helper']->getListLabel('amount', lang("{$viewDatas['class_path']}.label.amount"), $viewDatas) ?>/
|
||||||
|
<?= $viewDatas['helper']->getListLabel('billing_at', lang("{$viewDatas['class_path']}.label.billing_at"), $viewDatas) ?>
|
||||||
|
</th>
|
||||||
|
<th class="index_head_short_column">
|
||||||
|
<?= $viewDatas['helper']->getListLabel('status', lang("{$viewDatas['class_path']}.label.status"), $viewDatas) ?>/
|
||||||
|
<?= $viewDatas['helper']->getListLabel('updated_at', lang("{$viewDatas['class_path']}.label.updated_at"), $viewDatas) ?>
|
||||||
|
</th>
|
||||||
|
<th class="index_head_short_column">부품정보</th>
|
||||||
|
<th class="index_head_short_column"><?= $viewDatas['helper']->getListLabel('user_uid', lang("{$viewDatas['class_path']}.label.user_uid"), $viewDatas) ?></th>
|
||||||
|
<th class="index_head_short_column">작업</th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php $cnt = 0 ?>
|
||||||
|
<?php foreach ($viewDatas['entities'] as $entity): ?>
|
||||||
|
<?php $viewDatas['entity'] = $entity; ?>
|
||||||
|
<tr <?= $entity->getStatus() === $entity::DEFAULT_STATUS ? "" : 'class="table-danger"' ?>>
|
||||||
|
<?php $viewDatas['cnt'] = $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt); ?>
|
||||||
|
<td nowrap><?= $viewDatas['helper']->getListButton('modify', '', $viewDatas) ?></td>
|
||||||
|
<td>
|
||||||
|
<div><?= $viewDatas['helper']->getFieldView('site', $entity->site, $viewDatas) ?></div>
|
||||||
|
<div><?= $viewDatas['helper']->getFieldView('location', $entity->location, $viewDatas) ?></div>
|
||||||
|
<div><?= $viewDatas['helper']->getFieldView('switchinfo_uid', $entity->switchinfo_uid, $viewDatas) ?></div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div><?= $viewDatas['helper']->getFieldView('clientinfo_uid', $entity->getClientInfoUID(), $viewDatas) ?></div>
|
||||||
|
<div><?= $viewDatas['helper']->getFieldView('type', $entity->type, $viewDatas) ?></div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div><?= $viewDatas['helper']->getFieldView('serverinfo_uid', $entity->getServerEntity()->getTitle(), $viewDatas) ?></div>
|
||||||
|
<div><?= $viewDatas['helper']->getFieldView('start_at', $entity->start_at, $viewDatas) ?></div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div><?= $viewDatas['helper']->getFieldView('amount', $entity->amount, $viewDatas) ?></div>
|
||||||
|
<div><?= $viewDatas['helper']->getFieldView('billing_at', $entity->billing_at, $viewDatas) ?></div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div><?= $viewDatas['helper']->getFieldView('status', $entity->status, $viewDatas) ?></div>
|
||||||
|
<div><?= $viewDatas['helper']->getFieldView('updated_at', $entity->updated_at, $viewDatas) ?></div>
|
||||||
|
</td>
|
||||||
|
<td nowrap>
|
||||||
|
<?php foreach (SERVICE['PARTTYPES'] as $partType): ?><div><?= $viewDatas['helper']->getFieldView($partType, "", $viewDatas) ?></div><?php endforeach; ?>
|
||||||
|
<div><?= $viewDatas['helper']->getFieldView("ipinfo_uid", "", $viewDatas) ?></div>
|
||||||
|
<div><?= $viewDatas['helper']->getFieldView("csinfo_uid", "", $viewDatas) ?></div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div><?= $viewDatas['helper']->getFieldView('user_uid', $entity->user_uid, $viewDatas) ?></div>
|
||||||
|
</td>
|
||||||
|
<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>
|
||||||
|
<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() ?>
|
||||||
61
app/Views/admin/service/index_org.php
Normal file
61
app/Views/admin/service/index_org.php
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
<?= $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']['actionFields'] as $field): ?>
|
||||||
|
<th data-rtc-resizable="<?= $field ?>"><?= $viewDatas['helper']->getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
||||||
|
<?php endforeach ?>
|
||||||
|
<th class="index_head_short_column">작업</th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php $cnt = 0 ?>
|
||||||
|
<?php foreach ($viewDatas['entities'] as $entity): ?>
|
||||||
|
<?php $viewDatas['entity'] = $entity; ?>
|
||||||
|
<tr <?= $viewDatas['entity']->getStatus() === $viewDatas['entity']::DEFAULT_STATUS ? "" : 'class="table-danger"' ?>>
|
||||||
|
<?php $viewDatas['cnt'] = $viewDatas['total_count'] - (($viewDatas['page'] - 1) * $viewDatas['per_page'] + $cnt); ?>
|
||||||
|
<td nowrap><?= $viewDatas['helper']->getListButton('modify', '', $viewDatas) ?></td>
|
||||||
|
<?php foreach ($viewDatas['control']['actionFields'] 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>
|
||||||
|
<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() ?>
|
||||||
50
app/Views/admin/service/modify_form.php
Normal file
50
app/Views/admin/service/modify_form.php
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?>
|
||||||
|
<?= $this->section('content') ?>
|
||||||
|
<?php if ($error = session('error')): echo $viewDatas['helper']->alert($error) ?><?php endif ?>
|
||||||
|
<div id="container" class="content">
|
||||||
|
<div class="form_top"><?= $this->include("templates/{$viewDatas['layout']}/form_content_top"); ?></div>
|
||||||
|
<?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||||
|
<div class="action_form">
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<tr>
|
||||||
|
<th>서버정보</th>
|
||||||
|
<th>추가정보</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<?php foreach (["code", "type", "title", "price", "amount", "manufactur_at", "format_at", "status",] as $field): ?>
|
||||||
|
<tr>
|
||||||
|
<th nowrap class="text-end"><?= $viewDatas['helper']->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
||||||
|
<td nowrap class="text-start">
|
||||||
|
<?= $viewDatas['helper']->getFieldForm($field, old($field) ?? ($viewDatas['entity']->$field ?? null), $viewDatas) ?>
|
||||||
|
<span><?= validation_show_error($field); ?></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<?php foreach (SERVICE['PARTTYPES'] as $partType): ?>
|
||||||
|
<tr>
|
||||||
|
<th nowrap class="text-end"><?= $viewDatas['helper']->getFieldLabel("partinfo_uid_{$partType}", lang("{$viewDatas['class_path']}.label.partinfo_uid_{$partType}"), $viewDatas) ?></th>
|
||||||
|
<td nowrap class="text-start">
|
||||||
|
<?= $viewDatas['helper']->getFieldForm("partinfo_uid_{$partType}", old("partinfo_uid_{$partType}") ?? ($viewDatas['entity']->getServerPartEntity($partType) ? $viewDatas['entity']->getServerPartEntity($partType)->getPartInfoUID() : ($viewDatas['control']['form_datas']["partinfo_uid_{$partType}"] ?? null)), $viewDatas) ?>
|
||||||
|
<?= $viewDatas['helper']->getFieldForm("partinfo_uid_{$partType}_cnt", old("partinfo_uid_{$partType}_cnt") ?? ($viewDatas['entity']->getServerPartEntity($partType) ? $viewDatas['entity']->getServerPartEntity($partType)->getCnt() : ($viewDatas['control']['form_datas']["partinfo_uid_{$partType}_cnt"] ?? null)), $viewDatas) ?>
|
||||||
|
<?php if ($partType === "DISK"): ?>
|
||||||
|
<?= $viewDatas['helper']->getFieldForm("partinfo_uid_{$partType}_extra", old("partinfo_uid_{$partType}_extra") ?? ($viewDatas['entity']->getServerPartEntity($partType) ? $viewDatas['entity']->getServerPartEntity($partType)->getExtra() : ($viewDatas['control']['form_datas']["partinfo_uid_{$partType}_extra"] ?? null)), $viewDatas) ?>
|
||||||
|
<?php endif ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div class="text-center"><?= form_submit('', '수정', array("class" => "btn btn-outline btn-primary")); ?></div>
|
||||||
|
<?= form_close(); ?>
|
||||||
|
</div>
|
||||||
|
<div class="form_bottom"><?= $this->include("templates/{$viewDatas['layout']}/form_content_bottom"); ?></div>
|
||||||
|
</div>
|
||||||
|
<?= $this->endSection() ?>
|
||||||
50
app/Views/admin/service/view.php
Normal file
50
app/Views/admin/service/view.php
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?>
|
||||||
|
<?= $this->section('content') ?>
|
||||||
|
<?php if ($error = session('error')): echo $viewDatas['helper']->alert($error) ?><?php endif ?>
|
||||||
|
<div id="container" class="content">
|
||||||
|
<div class="form_top"><?= $this->include("templates/{$viewDatas['layout']}/form_content_top"); ?></div>
|
||||||
|
<?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||||
|
<div class="action_form">
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<tr>
|
||||||
|
<th>서버정보</th>
|
||||||
|
<th>추가정보</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<?php foreach (["code", "type", "title", "price", "amount", "manufactur_at", "format_at", "status",] as $field): ?>
|
||||||
|
<tr>
|
||||||
|
<th nowrap class="text-end"><?= $viewDatas['helper']->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
||||||
|
<td nowrap class="text-start">
|
||||||
|
<?= $viewDatas['helper']->getFieldView($field, $viewDatas['entity']->$field ?? null, $viewDatas) ?>
|
||||||
|
<span><?= validation_show_error($field); ?></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<?php foreach (SERVICE['PARTTYPES'] as $partType): ?>
|
||||||
|
<tr>
|
||||||
|
<th nowrap class="text-end"><?= $viewDatas['helper']->getFieldLabel("partinfo_uid_{$partType}", lang("{$viewDatas['class_path']}.label.partinfo_uid_{$partType}"), $viewDatas) ?></th>
|
||||||
|
<td nowrap class="text-start">
|
||||||
|
<?= $viewDatas['helper']->getFieldView("partinfo_uid_{$partType}", old("partinfo_uid_{$partType}") ?? ($viewDatas['entity']->getServerPartEntity($partType) ? $viewDatas['entity']->getServerPartEntity($partType)->getPartInfoUID() : ($viewDatas['control']['form_datas']["partinfo_uid_{$partType}"] ?? null)), $viewDatas) ?>
|
||||||
|
<?= $viewDatas['helper']->getFieldView("partinfo_uid_{$partType}_cnt", old("partinfo_uid_{$partType}_cnt") ?? ($viewDatas['entity']->getServerPartEntity($partType) ? $viewDatas['entity']->getServerPartEntity($partType)->getCnt() : ($viewDatas['control']['form_datas']["partinfo_uid_{$partType}_cnt"] ?? null)), $viewDatas) ?>
|
||||||
|
<?php if ($partType === "DISK"): ?>
|
||||||
|
<?= $viewDatas['helper']->getFieldView("partinfo_uid_{$partType}_extra", old("partinfo_uid_{$partType}_extra") ?? ($viewDatas['entity']->getServerPartEntity($partType) ? $viewDatas['entity']->getServerPartEntity($partType)->getExtra() : ($viewDatas['control']['form_datas']["partinfo_uid_{$partType}_extra"] ?? null)), $viewDatas) ?>
|
||||||
|
<?php endif ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<div class="text-center"><?= form_submit('', '수정', array("class" => "btn btn-outline btn-primary")); ?></div>
|
||||||
|
<?= form_close(); ?>
|
||||||
|
</div>
|
||||||
|
<div class="form_bottom"><?= $this->include("templates/{$viewDatas['layout']}/form_content_bottom"); ?></div>
|
||||||
|
</div>
|
||||||
|
<?= $this->endSection() ?>
|
||||||
Loading…
Reference in New Issue
Block a user