dbmsv2 init...1
This commit is contained in:
parent
8033eee902
commit
65cda50f06
@ -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(),
|
||||
|
||||
@ -231,7 +231,15 @@ define('ICONS', [
|
||||
'SERVICE_ITEM_DEFENCE' => '<i class="bi bi-shield-lock"></i>',
|
||||
'SERVICE_ITEM_DOMAIN' => '<i class="bi bi-globe2"></i>',
|
||||
'SERVICE_ITEM_OTHER' => '<i class="bi bi-gear-wide-connected"></i>',
|
||||
|
||||
'SERVER_ITEM_CPU' => '<i class="bi bi-cpu"></i>',
|
||||
'SERVER_ITEM_RAM' => '<i class="bi bi-memory"></i>',
|
||||
'SERVER_ITEM_DISK' => '<i class="bi bi-device-hdd"></i>',
|
||||
'SERVER_ITEM_SWITCH' => '<i class="bi bi-diagram-3"></i>',
|
||||
'SERVER_ITEM_OS' => '<i class="bi bi-microsoft"></i>',
|
||||
'SERVER_ITEM_DB' => '<i class="bi bi-database"></i>',
|
||||
'SERVER_ITEM_SOFTWARE' => '<i class="bi bi-window-sidebar"></i>',
|
||||
'SERVER_ITEM_IP' => '<i class="bi bi-globe2"></i>',
|
||||
'SERVER_ITEM_CS' => '<i class="bi bi-shield-check"></i>',
|
||||
]);
|
||||
//메신저 아이콘
|
||||
define('MESSENGER_ICONS', [
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -69,8 +69,8 @@ class ServiceHelper extends CustomerHelper
|
||||
$value = "<a href=\"/admin/customer/client/detail/{$value}\">" . $viewDatas['control']['field_optons'][$field][$value]->getTitle() . "</a>";
|
||||
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)) {
|
||||
|
||||
@ -39,7 +39,6 @@ class ServerHelper extends EquipmentHelper
|
||||
break;
|
||||
case 'title':
|
||||
$value = parent::getFieldView($field, $value, $viewDatas, $extras);
|
||||
$value .= "<div>" . view_cell("\App\Cells\Equipment\ServerPartCell::parttable", ['serverinfo_uid' => $viewDatas['entity']->getPK(), 'types' => SERVERPART['SERVER_PARTTYPES']]) . "</div>";
|
||||
break;
|
||||
case 'manufactur_at':
|
||||
case 'format_at':
|
||||
|
||||
@ -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",
|
||||
|
||||
109
app/Views/admin/server/index.php
Normal file
109
app/Views/admin/server/index.php
Normal file
@ -0,0 +1,109 @@
|
||||
<?= $this->extend(LAYOUTS[$viewDatas['layout']]['path']) ?>
|
||||
<?= $this->section('content') ?>
|
||||
<?php if ($error = session('error')): echo $viewDatas['service']->getHelper()->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">
|
||||
<?= 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['control']['actionFilters'] as $field): ?>
|
||||
<?= $viewDatas['service']->getHelper()->getListFilter($field, $viewDatas['control']['index_filters'][$field] ?? old($field), $viewDatas) ?>
|
||||
<?php endforeach ?>
|
||||
</nav>
|
||||
<?= $this->include("templates/{$viewDatas['layout']}/index_content_top"); ?>
|
||||
</div>
|
||||
</nav>
|
||||
<?= form_close() ?>
|
||||
<?= 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['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) ?>
|
||||
</th>
|
||||
<th class="index_head_short_column">
|
||||
<?= $viewDatas['service']->getHelper()->getListLabel('type', lang("{$viewDatas['class_path']}.label.type"), $viewDatas) ?>/
|
||||
<?= $viewDatas['service']->getHelper()->getListLabel('title', lang("{$viewDatas['class_path']}.label.title"), $viewDatas) ?>
|
||||
</th>
|
||||
<th class="index_head_short_column">부품정보</th>
|
||||
<th class="index_head_short_column">
|
||||
<?= $viewDatas['service']->getHelper()->getListLabel('price', lang("{$viewDatas['class_path']}.label.price"), $viewDatas) ?>
|
||||
</th>
|
||||
<th class="index_head_short_column">
|
||||
<?= $viewDatas['service']->getHelper()->getListLabel('manufactur_at', lang("{$viewDatas['class_path']}.label.manufactur_at"), $viewDatas) ?>
|
||||
</th>
|
||||
<th class="index_head_short_column">
|
||||
<?= $viewDatas['service']->getHelper()->getListLabel('format_at', lang("{$viewDatas['class_path']}.label.format_at"), $viewDatas) ?>
|
||||
</th>
|
||||
<th class="index_head_short_column">
|
||||
<?= $viewDatas['service']->getHelper()->getListLabel('status', lang("{$viewDatas['class_path']}.label.status"), $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['service']->getHelper()->getListButton('modify', '', $viewDatas) ?></td>
|
||||
<td nowrap>
|
||||
<?= $viewDatas['service']->getHelper()->getFieldView('clientinfo_uid', $entity->getClientInfoUID(), $viewDatas) ?><BR>
|
||||
<?= $viewDatas['service']->getHelper()->getFieldView('serviceinfo_uid', $entity->getServiceInfoUID(), $viewDatas) ?>
|
||||
</td>
|
||||
<td nowrap>
|
||||
<?= $viewDatas['service']->getHelper()->getFieldView('type', $entity->type, $viewDatas) ?><BR>
|
||||
<?= $viewDatas['service']->getHelper()->getFieldView('title', $entity->getTitle(), $viewDatas) ?>
|
||||
</td>
|
||||
<td nowrap>
|
||||
<?= view_cell("\App\Cells\Equipment\ServerPartCell::parttable", ['serverinfo_uid' => $entity->getPK(), 'types' => SERVERPART['SERVER_PARTTYPES'], 'template' => 'part_server']) ?>
|
||||
</td>
|
||||
<td nowrap>
|
||||
<?= $viewDatas['service']->getHelper()->getFieldView('price', $entity->price, $viewDatas) ?>
|
||||
</td>
|
||||
<td nowrap>
|
||||
<?= $viewDatas['service']->getHelper()->getFieldView('manufactur_at', $entity->manufactur_at, $viewDatas) ?>
|
||||
</td>
|
||||
<td nowrap>
|
||||
<?= $viewDatas['service']->getHelper()->getFieldView('format_at', $entity->format_at, $viewDatas) ?>
|
||||
</td>
|
||||
<td><?= $viewDatas['service']->getHelper()->getFieldView('status', $entity->status, $viewDatas) ?></td>
|
||||
<td nowrap>
|
||||
<?= $viewDatas['service']->getHelper()->getListButton('view', '', $viewDatas) ?>
|
||||
<?= $viewDatas['service']->getHelper()->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() ?>
|
||||
5
app/Views/cells/serverpart/part_server.php
Normal file
5
app/Views/cells/serverpart/part_server.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php $temps = [] ?>
|
||||
<?php foreach ($serverPartCellDatas['types'] as $type): ?>
|
||||
<?php $temps[] = $serverPartCellDatas['service']->getHelper()->getListButton($type, '', $serverPartCellDatas) . $serverPartCellDatas['service']->getHelper()->getFieldView($type, "", $serverPartCellDatas) ?>
|
||||
<?php endforeach ?>
|
||||
<?= implode("/", $temps) ?>
|
||||
5
app/Views/cells/serverpart/part_service.php
Normal file
5
app/Views/cells/serverpart/part_service.php
Normal file
@ -0,0 +1,5 @@
|
||||
<?php $temps = [] ?>
|
||||
<?php foreach (['SWITCH', 'IP', 'OS'] as $type): ?>
|
||||
<?php $temps[] = $serverPartCellDatas['service']->getHelper()->getListButton($type, '', $serverPartCellDatas) . $serverPartCellDatas['service']->getHelper()->getFieldView($type, "", $serverPartCellDatas) ?>
|
||||
<?php endforeach ?>
|
||||
<?= implode("/", $temps) ?>
|
||||
@ -1,3 +0,0 @@
|
||||
<?= $serverPartCellDatas['service']->getHelper()->getFieldView('SWITCH', "", $serverPartCellDatas) ?> /
|
||||
<?= $serverPartCellDatas['service']->getHelper()->getFieldView('IP', "", $serverPartCellDatas) ?> /
|
||||
<?= $serverPartCellDatas['service']->getHelper()->getFieldView('OS', "", $serverPartCellDatas) ?>
|
||||
@ -30,7 +30,7 @@
|
||||
<div><?= $serviceCellDatas['service']->getHelper()->getFieldView('location', $entity->getLocation(), $serviceCellDatas) ?></div>
|
||||
<div><?= $serviceCellDatas['service']->getHelper()->getFieldView('type', $entity->getType(), $serviceCellDatas) ?></div>
|
||||
</td>
|
||||
<?= 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']) ?>
|
||||
<td>
|
||||
<?= form_open("/admin/customer/service/history/{$entity->getPK()}?return_url=" . urlencode(current_url()), ['method' => "post"]) ?>
|
||||
<div class="row align-items-center">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user