diff --git a/app/Cells/Customer/ServiceCell.php b/app/Cells/Customer/ServiceCell.php
index fc83d2f..41d3c8d 100644
--- a/app/Cells/Customer/ServiceCell.php
+++ b/app/Cells/Customer/ServiceCell.php
@@ -21,7 +21,8 @@ class ServiceCell extends CustomerCell
$this->getService()->setFormRules();
$this->getService()->setFormOptions();
$entities = $this->getService()->getEntities(['clientinfo_uid' => $params['userinfo_uid']]);
- return view('cells/service/detail', [
+ $template = array_key_exists('template', $params) ? $params['template'] : __FUNCTION__;
+ return view('cells/service/' . $template, [
'serviceCellDatas' => [
'control' => $this->getService()->getControlDatas(),
'service' => $this->getService(),
diff --git a/app/Config/Constants.php b/app/Config/Constants.php
index 3063dcd..27de9f7 100644
--- a/app/Config/Constants.php
+++ b/app/Config/Constants.php
@@ -231,7 +231,15 @@ define('ICONS', [
'SERVICE_ITEM_DEFENCE' => '',
'SERVICE_ITEM_DOMAIN' => '',
'SERVICE_ITEM_OTHER' => '',
-
+ 'SERVER_ITEM_CPU' => '',
+ 'SERVER_ITEM_RAM' => '',
+ 'SERVER_ITEM_DISK' => '',
+ 'SERVER_ITEM_SWITCH' => '',
+ 'SERVER_ITEM_OS' => '',
+ 'SERVER_ITEM_DB' => '',
+ 'SERVER_ITEM_SOFTWARE' => '',
+ 'SERVER_ITEM_IP' => '',
+ 'SERVER_ITEM_CS' => '',
]);
//메신저 아이콘
define('MESSENGER_ICONS', [
diff --git a/app/Controllers/Admin/Equipment/ServerController.php b/app/Controllers/Admin/Equipment/ServerController.php
index 5f7c817..a964209 100644
--- a/app/Controllers/Admin/Equipment/ServerController.php
+++ b/app/Controllers/Admin/Equipment/ServerController.php
@@ -30,6 +30,7 @@ class ServerController extends EquipmentController
protected function getResultSuccess(string $message = MESSAGES["SUCCESS"], ?string $actionTemplate = null): RedirectResponse|string
{
switch ($this->getService()->getAction()) {
+ case 'index':
case 'view':
$this->service = $this->getService();
$this->control = $this->getService()->getControlDatas();
diff --git a/app/Helpers/Customer/ServiceHelper.php b/app/Helpers/Customer/ServiceHelper.php
index dd61812..45834db 100644
--- a/app/Helpers/Customer/ServiceHelper.php
+++ b/app/Helpers/Customer/ServiceHelper.php
@@ -69,8 +69,8 @@ class ServiceHelper extends CustomerHelper
$value = "" . $viewDatas['control']['field_optons'][$field][$value]->getTitle() . "";
break;
case 'serverinfo_uid':
- $value = array_key_exists('entity', $viewDatas) ? $viewDatas['entity']->getServerEntity()->getCode() : "지정된서버없음";
- $value .= view_cell("\App\Cells\Equipment\ServerPartCell::parttable", ['serverinfo_uid' => $viewDatas['entity']->getServerEntity()->getPK(), 'types' => SERVERPART['SERVICE_PARTTYPES'], 'template' => 'partservice']);
+ $value = $viewDatas['entity']->getServerEntity()->getCode();
+ $value .= " /" . view_cell("\App\Cells\Equipment\ServerPartCell::parttable", ['serverinfo_uid' => $viewDatas['entity']->getServerEntity()->getPK(), 'types' => SERVERPART['SERVICE_PARTTYPES'], 'template' => 'part_service']);
break;
case 'billing_at':
if (array_key_exists('unPaids', $viewDatas)) {
diff --git a/app/Helpers/Equipment/ServerHelper.php b/app/Helpers/Equipment/ServerHelper.php
index cc583d3..c32df45 100644
--- a/app/Helpers/Equipment/ServerHelper.php
+++ b/app/Helpers/Equipment/ServerHelper.php
@@ -39,7 +39,6 @@ class ServerHelper extends EquipmentHelper
break;
case 'title':
$value = parent::getFieldView($field, $value, $viewDatas, $extras);
- $value .= "
" . view_cell("\App\Cells\Equipment\ServerPartCell::parttable", ['serverinfo_uid' => $viewDatas['entity']->getPK(), 'types' => SERVERPART['SERVER_PARTTYPES']]) . "
";
break;
case 'manufactur_at':
case 'format_at':
diff --git a/app/Helpers/Equipment/ServerPartHelper.php b/app/Helpers/Equipment/ServerPartHelper.php
index b95d2db..0d53954 100644
--- a/app/Helpers/Equipment/ServerPartHelper.php
+++ b/app/Helpers/Equipment/ServerPartHelper.php
@@ -124,9 +124,13 @@ class ServerPartHelper extends EquipmentHelper
case 'OS':
case 'DB':
case 'SOFTWARE':
- $extras = ["class" => "btn btn-sm btn-outline btn-circle", "target" => "_self", ...$extras];
+ $extras = [
+ "class" => "btn btn-sm btn-outline btn-circle",
+ "target" => "_self",
+ ...$extras,
+ ];
$action = form_label(
- $label ? $label : ICONS['SETUP'],
+ $label ? $label : ICONS["SERVER_ITEM_{$action}"],
$action,
[
"data-src" => "/admin/equipment/serverpart?serverinfo_uid={$viewDatas['serverinfo_uid']}&type={$action}&ActionTemplate=popup",
diff --git a/app/Views/admin/server/index.php b/app/Views/admin/server/index.php
new file mode 100644
index 0000000..b153a35
--- /dev/null
+++ b/app/Views/admin/server/index.php
@@ -0,0 +1,109 @@
+= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?>
+= $this->section('content') ?>
+getHelper()->alert($error) ?>
+= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/top'); ?>
+
+
+
+ |
+
+ = $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/left_menu'); ?>
+
+ |
+
+
+
+
+
+
+ = form_open(current_url(), ["method" => "get"]) ?>
+
+ = form_close() ?>
+ = form_open(current_url(), ['id' => 'batchjob_form', 'method' => "post"]) ?>
+
+
+
+ | 번호 |
+
+ = $viewDatas['service']->getHelper()->getListLabel('clientinfo_uid', lang("{$viewDatas['class_path']}.label.clientinfo_uid"), $viewDatas) ?>/
+ = $viewDatas['service']->getHelper()->getListLabel('serviceinfo_uid', lang("{$viewDatas['class_path']}.label.serviceinfo_uid"), $viewDatas) ?>
+ |
+
+ = $viewDatas['service']->getHelper()->getListLabel('type', lang("{$viewDatas['class_path']}.label.type"), $viewDatas) ?>/
+ = $viewDatas['service']->getHelper()->getListLabel('title', lang("{$viewDatas['class_path']}.label.title"), $viewDatas) ?>
+ |
+ 부품정보 |
+
+ = $viewDatas['service']->getHelper()->getListLabel('price', lang("{$viewDatas['class_path']}.label.price"), $viewDatas) ?>
+ |
+
+ = $viewDatas['service']->getHelper()->getListLabel('manufactur_at', lang("{$viewDatas['class_path']}.label.manufactur_at"), $viewDatas) ?>
+ |
+
+ = $viewDatas['service']->getHelper()->getListLabel('format_at', lang("{$viewDatas['class_path']}.label.format_at"), $viewDatas) ?>
+ |
+
+ = $viewDatas['service']->getHelper()->getListLabel('status', lang("{$viewDatas['class_path']}.label.status"), $viewDatas) ?>
+ |
+ 작업 |
+
+
+
+
+
+ getStatus() === $entity::DEFAULT_STATUS ? "" : 'class="table-danger"' ?>>
+
+ | = $viewDatas['service']->getHelper()->getListButton('modify', '', $viewDatas) ?> |
+
+ = $viewDatas['service']->getHelper()->getFieldView('clientinfo_uid', $entity->getClientInfoUID(), $viewDatas) ?>
+ = $viewDatas['service']->getHelper()->getFieldView('serviceinfo_uid', $entity->getServiceInfoUID(), $viewDatas) ?>
+ |
+
+ = $viewDatas['service']->getHelper()->getFieldView('type', $entity->type, $viewDatas) ?>
+ = $viewDatas['service']->getHelper()->getFieldView('title', $entity->getTitle(), $viewDatas) ?>
+ |
+
+ = view_cell("\App\Cells\Equipment\ServerPartCell::parttable", ['serverinfo_uid' => $entity->getPK(), 'types' => SERVERPART['SERVER_PARTTYPES'], 'template' => 'part_server']) ?>
+ |
+
+ = $viewDatas['service']->getHelper()->getFieldView('price', $entity->price, $viewDatas) ?>
+ |
+
+ = $viewDatas['service']->getHelper()->getFieldView('manufactur_at', $entity->manufactur_at, $viewDatas) ?>
+ |
+
+ = $viewDatas['service']->getHelper()->getFieldView('format_at', $entity->format_at, $viewDatas) ?>
+ |
+ = $viewDatas['service']->getHelper()->getFieldView('status', $entity->status, $viewDatas) ?> |
+
+ = $viewDatas['service']->getHelper()->getListButton('view', '', $viewDatas) ?>
+ = $viewDatas['service']->getHelper()->getListButton('delete', '', $viewDatas) ?>
+ |
+
+
+
+
+
+ = $this->include("templates/{$viewDatas['layout']}/index_content_bottom"); ?>
+ = form_close() ?>
+
+
+
+
+ |
+
+
+
+= $this->include(LAYOUTS[$viewDatas['layout']]['path'] . '/bottom'); ?>
+= $this->endSection() ?>
\ No newline at end of file
diff --git a/app/Views/cells/serverpart/partdetail.php b/app/Views/cells/serverpart/part_detail.php
similarity index 100%
rename from app/Views/cells/serverpart/partdetail.php
rename to app/Views/cells/serverpart/part_detail.php
diff --git a/app/Views/cells/serverpart/part_server.php b/app/Views/cells/serverpart/part_server.php
new file mode 100644
index 0000000..cfc07ce
--- /dev/null
+++ b/app/Views/cells/serverpart/part_server.php
@@ -0,0 +1,5 @@
+
+
+ getHelper()->getListButton($type, '', $serverPartCellDatas) . $serverPartCellDatas['service']->getHelper()->getFieldView($type, "", $serverPartCellDatas) ?>
+
+= implode("/", $temps) ?>
\ No newline at end of file
diff --git a/app/Views/cells/serverpart/part_service.php b/app/Views/cells/serverpart/part_service.php
new file mode 100644
index 0000000..5444649
--- /dev/null
+++ b/app/Views/cells/serverpart/part_service.php
@@ -0,0 +1,5 @@
+
+
+ getHelper()->getListButton($type, '', $serverPartCellDatas) . $serverPartCellDatas['service']->getHelper()->getFieldView($type, "", $serverPartCellDatas) ?>
+
+= implode("/", $temps) ?>
\ No newline at end of file
diff --git a/app/Views/cells/serverpart/partservice.php b/app/Views/cells/serverpart/partservice.php
deleted file mode 100644
index 79aebd6..0000000
--- a/app/Views/cells/serverpart/partservice.php
+++ /dev/null
@@ -1,3 +0,0 @@
-= $serverPartCellDatas['service']->getHelper()->getFieldView('SWITCH', "", $serverPartCellDatas) ?> /
-= $serverPartCellDatas['service']->getHelper()->getFieldView('IP', "", $serverPartCellDatas) ?> /
-= $serverPartCellDatas['service']->getHelper()->getFieldView('OS', "", $serverPartCellDatas) ?>
\ No newline at end of file
diff --git a/app/Views/cells/service/detail.php b/app/Views/cells/service/detail.php
index fe82885..366172e 100644
--- a/app/Views/cells/service/detail.php
+++ b/app/Views/cells/service/detail.php
@@ -30,7 +30,7 @@
= $serviceCellDatas['service']->getHelper()->getFieldView('location', $entity->getLocation(), $serviceCellDatas) ?>
= $serviceCellDatas['service']->getHelper()->getFieldView('type', $entity->getType(), $serviceCellDatas) ?>
- = view_cell("\App\Cells\Equipment\ServerPartCell::parttable", ['serverinfo_uid' => $entity->getServerEntity()->getPK(), 'types' => SERVERPART['SERVICE_PARTTYPES'], 'template' => 'partdetail']) ?>
+ = view_cell("\App\Cells\Equipment\ServerPartCell::parttable", ['serverinfo_uid' => $entity->getServerEntity()->getPK(), 'types' => SERVERPART['SERVICE_PARTTYPES'], 'template' => 'part_detail']) ?>
= form_open("/admin/customer/service/history/{$entity->getPK()}?return_url=" . urlencode(current_url()), ['method' => "post"]) ?>
|