dbmsv2 init...1
This commit is contained in:
parent
40a33a1339
commit
9435c8440e
@ -38,8 +38,6 @@ class ServerController extends EquipmentController
|
|||||||
protected function getResultSuccess(string $message = MESSAGES["SUCCESS"], ?string $actionTemplate = null): RedirectResponse|string
|
protected function getResultSuccess(string $message = MESSAGES["SUCCESS"], ?string $actionTemplate = null): RedirectResponse|string
|
||||||
{
|
{
|
||||||
switch ($this->getAction()) {
|
switch ($this->getAction()) {
|
||||||
case 'create_form':
|
|
||||||
case 'modify_form':
|
|
||||||
case 'view':
|
case 'view':
|
||||||
case 'index':
|
case 'index':
|
||||||
$this->control = $this->getControlDatas();
|
$this->control = $this->getControlDatas();
|
||||||
@ -58,7 +56,7 @@ class ServerController extends EquipmentController
|
|||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
protected function getFormData(string $field, array $requestDatas, array $formDatas): array
|
protected function setFormData(string $field, array $requestDatas, array $formDatas): array
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case 'CPU':
|
case 'CPU':
|
||||||
@ -72,7 +70,7 @@ class ServerController extends EquipmentController
|
|||||||
$formDatas["{$field}_extra"] = $requestDatas["{$field}_extra"] ?? null;
|
$formDatas["{$field}_extra"] = $requestDatas["{$field}_extra"] ?? null;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$formDatas = parent::getFormData($field, $requestDatas, $formDatas);
|
$formDatas = parent::setFormData($field, $requestDatas, $formDatas);
|
||||||
}
|
}
|
||||||
return $formDatas;
|
return $formDatas;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -165,20 +165,15 @@ abstract class CommonController extends BaseController
|
|||||||
$this->setControlDatas('field_optons', $options);
|
$this->setControlDatas('field_optons', $options);
|
||||||
}
|
}
|
||||||
//FormDatas 전달값,Default값
|
//FormDatas 전달값,Default값
|
||||||
final protected function getFormDatas($formDatas = []): array
|
final protected function getFormDatas(): array
|
||||||
{
|
{
|
||||||
foreach ($this->getControlDatas('form_datas') as $field => $value) {
|
return $this->getControlDatas('form_datas');
|
||||||
$formDatas[$field] = $value;
|
|
||||||
}
|
|
||||||
return $formDatas;
|
|
||||||
}
|
}
|
||||||
final protected function setFormDatas(array $requestDatas, array $formDatas = []): void
|
final protected function setFormDatas(array $requestDatas, array $formDatas = []): void
|
||||||
{
|
{
|
||||||
foreach ($this->getControlDatas('actionFields') as $field) {
|
foreach ($this->getControlDatas('actionFields') as $field) {
|
||||||
$formDatas = $this->getFormData($field, $requestDatas, $formDatas);
|
$formDatas = $this->setFormData($field, $requestDatas, $formDatas);
|
||||||
}
|
}
|
||||||
// echo var_dump($requestDatas);
|
|
||||||
// dd($formDatas);
|
|
||||||
$this->setControlDatas('form_datas', $formDatas);
|
$this->setControlDatas('form_datas', $formDatas);
|
||||||
}
|
}
|
||||||
//FormDatas 검증
|
//FormDatas 검증
|
||||||
@ -227,7 +222,7 @@ abstract class CommonController extends BaseController
|
|||||||
return $options;
|
return $options;
|
||||||
}
|
}
|
||||||
//FormData Field별 전달값 처리
|
//FormData Field별 전달값 처리
|
||||||
protected function getFormData(string $field, array $requestDatas, array $formDatas): array
|
protected function setFormData(string $field, array $requestDatas, array $formDatas): array
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
default:
|
default:
|
||||||
|
|||||||
@ -4,9 +4,9 @@
|
|||||||
"settings": {
|
"settings": {
|
||||||
"width": 3000,
|
"width": 3000,
|
||||||
"height": 3000,
|
"height": 3000,
|
||||||
"scrollTop": -1058.7976,
|
"scrollTop": -1366.5228,
|
||||||
"scrollLeft": -797,
|
"scrollLeft": -185.0714,
|
||||||
"zoomLevel": 0.91,
|
"zoomLevel": 0.73,
|
||||||
"show": 511,
|
"show": 511,
|
||||||
"database": 4,
|
"database": 4,
|
||||||
"databaseName": "",
|
"databaseName": "",
|
||||||
@ -250,7 +250,6 @@
|
|||||||
"m77kSp3scTgMhInPBjsc3",
|
"m77kSp3scTgMhInPBjsc3",
|
||||||
"9F6QpQqxeEggZ0FHM81O1",
|
"9F6QpQqxeEggZ0FHM81O1",
|
||||||
"tsDqk1dzwzUtvBzpjmarJ",
|
"tsDqk1dzwzUtvBzpjmarJ",
|
||||||
"DPWDmZrk302pW-5V72rvt",
|
|
||||||
"hmZlcR-Pw2C_ife1zzo5o",
|
"hmZlcR-Pw2C_ife1zzo5o",
|
||||||
"AGBQ4FnuIDU-Dy5QoS0Fu",
|
"AGBQ4FnuIDU-Dy5QoS0Fu",
|
||||||
"bh-W1plz0vCW2rURDnfDR",
|
"bh-W1plz0vCW2rURDnfDR",
|
||||||
@ -327,7 +326,7 @@
|
|||||||
"color": ""
|
"color": ""
|
||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
"updateAt": 1756961447384,
|
"updateAt": 1757309382902,
|
||||||
"createAt": 1745819764137
|
"createAt": 1745819764137
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -8777,7 +8776,7 @@
|
|||||||
"RITMHZcQAJ7KvtxkTtMv-"
|
"RITMHZcQAJ7KvtxkTtMv-"
|
||||||
],
|
],
|
||||||
"x": 1472.7756,
|
"x": 1472.7756,
|
||||||
"y": 2238.6057,
|
"y": 2226.6057,
|
||||||
"direction": 2
|
"direction": 2
|
||||||
},
|
},
|
||||||
"end": {
|
"end": {
|
||||||
@ -8814,7 +8813,7 @@
|
|||||||
"4iRyOhmW3b7kbiZT8lQyY"
|
"4iRyOhmW3b7kbiZT8lQyY"
|
||||||
],
|
],
|
||||||
"x": 1472.7756,
|
"x": 1472.7756,
|
||||||
"y": 2107.9390333333336,
|
"y": 2103.9390333333336,
|
||||||
"direction": 2
|
"direction": 2
|
||||||
},
|
},
|
||||||
"meta": {
|
"meta": {
|
||||||
@ -8889,7 +8888,7 @@
|
|||||||
"RITMHZcQAJ7KvtxkTtMv-"
|
"RITMHZcQAJ7KvtxkTtMv-"
|
||||||
],
|
],
|
||||||
"x": 948.7756,
|
"x": 948.7756,
|
||||||
"y": 2238.6057,
|
"y": 2226.6057,
|
||||||
"direction": 1
|
"direction": 1
|
||||||
},
|
},
|
||||||
"end": {
|
"end": {
|
||||||
@ -8917,7 +8916,7 @@
|
|||||||
"RITMHZcQAJ7KvtxkTtMv-"
|
"RITMHZcQAJ7KvtxkTtMv-"
|
||||||
],
|
],
|
||||||
"x": 1472.7756,
|
"x": 1472.7756,
|
||||||
"y": 2369.2723666666666,
|
"y": 2349.2723666666666,
|
||||||
"direction": 2
|
"direction": 2
|
||||||
},
|
},
|
||||||
"end": {
|
"end": {
|
||||||
|
|||||||
@ -27,6 +27,10 @@ abstract class CommonEntity extends Entity
|
|||||||
$field = constant("static::TITLE");
|
$field = constant("static::TITLE");
|
||||||
return $this->attributes[$field];
|
return $this->attributes[$field];
|
||||||
}
|
}
|
||||||
|
public function getCustomTitle(): string
|
||||||
|
{
|
||||||
|
return $this->getTitle();
|
||||||
|
}
|
||||||
public function getStatus(): string|null
|
public function getStatus(): string|null
|
||||||
{
|
{
|
||||||
return $this->attributes['status'] ?? null;
|
return $this->attributes['status'] ?? null;
|
||||||
|
|||||||
@ -18,8 +18,8 @@ class PartEntity extends EquipmentEntity
|
|||||||
{
|
{
|
||||||
return $this->attributes['price'];
|
return $this->attributes['price'];
|
||||||
}
|
}
|
||||||
public function getFormTitle(): string
|
public function getCustomTitle(): string
|
||||||
{
|
{
|
||||||
return number_format($this->getPrice()) . "원," . $this->getTitle();
|
return $this->getTitle() . " " . number_format($this->getPrice()) . "원,";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,8 +44,8 @@ class ServerEntity extends EquipmentEntity
|
|||||||
{
|
{
|
||||||
return $this->attributes['code'];
|
return $this->attributes['code'];
|
||||||
}
|
}
|
||||||
public function getTitle(): string
|
public function getCustomTitle(): string
|
||||||
{
|
{
|
||||||
return sprintf("%s[%s]", parent::getTitle(), $this->getCode());
|
return sprintf("[%s] %s", $this->getCode(), $this->getTitle());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,7 @@ class ServerPartEntity extends EquipmentEntity
|
|||||||
{
|
{
|
||||||
return $this->getPartEntity() !== null ? sprintf(
|
return $this->getPartEntity() !== null ? sprintf(
|
||||||
"%s%s",
|
"%s%s",
|
||||||
$this->getBilling() === "" ? "" : ($this->getBilling() === PAYMENT['BILLING']["ONETIME"] ? ICONS['ONETIME'] : ICONS['MONTH']),
|
$this->getBilling() === "" ? "" : ($this->getBilling() === PAYMENT['BILLING']["ONETIME"] ? ICONS['ONETIME'] : ($this->getBilling() === PAYMENT['BILLING']["MONTH"] ? ICONS['MONTH'] : "")),
|
||||||
$this->getPartEntity()->getTitle()
|
$this->getPartEntity()->getTitle()
|
||||||
) : "";
|
) : "";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -227,7 +227,7 @@ class CommonHelper
|
|||||||
foreach ($viewDatas['control']['field_optons'][$field] as $key => $entity) {
|
foreach ($viewDatas['control']['field_optons'][$field] as $key => $entity) {
|
||||||
$isSelected = $key == $value ? ' selected' : '';
|
$isSelected = $key == $value ? ' selected' : '';
|
||||||
$isDisabled = $viewDatas['control']['action'] === 'index' && $entity->getStatus() !== $entity::DEFAULT_STATUS ? ' readonly' : '';
|
$isDisabled = $viewDatas['control']['action'] === 'index' && $entity->getStatus() !== $entity::DEFAULT_STATUS ? ' readonly' : '';
|
||||||
$html .= sprintf("<option value=\"%s\"%s%s>%s</option>", $key, $isSelected, $isDisabled, array_key_exists('isForm', $extras) ? $entity->getFormTitle() : $entity->getTitle());
|
$html .= sprintf("<option value=\"%s\"%s%s>%s</option>", $key, $isSelected, $isDisabled, $entity->getCustomTitle());
|
||||||
}
|
}
|
||||||
$html .= '</select>';
|
$html .= '</select>';
|
||||||
return $html;
|
return $html;
|
||||||
@ -281,6 +281,7 @@ class CommonHelper
|
|||||||
case 'old_clientinfo_uid':
|
case 'old_clientinfo_uid':
|
||||||
case 'clientinfo_uid':
|
case 'clientinfo_uid':
|
||||||
case 'serviceinfo_uid':
|
case 'serviceinfo_uid':
|
||||||
|
case 'serverinfo_uid':
|
||||||
$extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' select-field' : 'select-field';
|
$extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' select-field' : 'select-field';
|
||||||
$form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras);
|
$form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras);
|
||||||
break;
|
break;
|
||||||
@ -348,26 +349,11 @@ class CommonHelper
|
|||||||
public function getListFilter(string $field, mixed $value, array $viewDatas, array $extras = []): string
|
public function getListFilter(string $field, mixed $value, array $viewDatas, array $extras = []): string
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case 'user_uid':
|
default:
|
||||||
case 'old_clientinfo_uid':
|
$filter = $this->getFieldForm($field, $value, $viewDatas, $extras);;
|
||||||
case 'clientinfo_uid':
|
|
||||||
case 'serviceinfo_uid':
|
|
||||||
case 'serverinfo_uid':
|
|
||||||
case 'part_uid':
|
|
||||||
$extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' select-field' : 'select-field';
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!array_key_exists($field, $viewDatas['control']['field_optons'])) {
|
return $filter;
|
||||||
throw new \Exception(__METHOD__ . "에서 {$field}의 field_options가 정의되지 않았습니다.");
|
|
||||||
}
|
|
||||||
if (!is_array($viewDatas['control']['field_optons'][$field])) {
|
|
||||||
throw new \Exception(__METHOD__ . "에서 {$field}의 field_options가 array형태가 아닙니다.");
|
|
||||||
}
|
|
||||||
$options = ["" => lang("{$viewDatas['class_path']}.label.{$field}") . " 선택"];
|
|
||||||
foreach ($viewDatas['control']['field_optons'][$field] as $key => $entity) {
|
|
||||||
$options[$key] = $entity->getTitle();
|
|
||||||
}
|
|
||||||
return form_dropdown($field, $options, $value, $extras);;
|
|
||||||
}
|
}
|
||||||
public function getListLabel(string $field, string $label, array $viewDatas, array $extras = []): string
|
public function getListLabel(string $field, string $label, array $viewDatas, array $extras = []): string
|
||||||
{
|
{
|
||||||
|
|||||||
@ -37,9 +37,6 @@ class ServiceHelper extends CustomerHelper
|
|||||||
public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null
|
public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case 'serverinfo_uid':
|
|
||||||
$value = $viewDatas['control']['field_optons'][$field][$viewDatas['entity']->getServerEntity()->getPK()]->getTitle();
|
|
||||||
break;
|
|
||||||
case 'billing_at':
|
case 'billing_at':
|
||||||
if (array_key_exists('unPaids', $viewDatas)) {
|
if (array_key_exists('unPaids', $viewDatas)) {
|
||||||
if (array_key_exists($viewDatas['entity']->getPK(), $viewDatas['unPaids'])) {
|
if (array_key_exists($viewDatas['entity']->getPK(), $viewDatas['unPaids'])) {
|
||||||
|
|||||||
@ -24,6 +24,10 @@ class ServerHelper extends EquipmentHelper
|
|||||||
// $extras['readonly'] = in_array($viewDatas['control']['action'], ['modify_form']) ? ' readonly' : '';
|
// $extras['readonly'] = in_array($viewDatas['control']['action'], ['modify_form']) ? ' readonly' : '';
|
||||||
$form = parent::getFieldForm($field, $value, $viewDatas, $extras);
|
$form = parent::getFieldForm($field, $value, $viewDatas, $extras);
|
||||||
break;
|
break;
|
||||||
|
case 'title':
|
||||||
|
$extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' select-field' : 'select-field';
|
||||||
|
$form = $this->form_dropdown_custom($field, $value, $viewDatas, $extras);
|
||||||
|
break;
|
||||||
case 'manufactur_at':
|
case 'manufactur_at':
|
||||||
case 'format_at':
|
case 'format_at':
|
||||||
$extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' calender' : 'calender';
|
$extras['class'] = array_key_exists('class', $extras) ? $extras['class'] . ' calender' : 'calender';
|
||||||
|
|||||||
@ -3,7 +3,7 @@ return [
|
|||||||
'title' => "IP정보",
|
'title' => "IP정보",
|
||||||
'label' => [
|
'label' => [
|
||||||
'lineinfo_uid' => '회선정보',
|
'lineinfo_uid' => '회선정보',
|
||||||
'old_clientinfo_uid' => "전고객",
|
'old_clientinfo_uid' => "종전사용고객",
|
||||||
'clientinfo_uid' => '고객정보',
|
'clientinfo_uid' => '고객정보',
|
||||||
'serverinfo_uid' => '서버정보',
|
'serverinfo_uid' => '서버정보',
|
||||||
'ip' => "IP",
|
'ip' => "IP",
|
||||||
|
|||||||
@ -8,7 +8,6 @@ return [
|
|||||||
'type' => "장비벤더",
|
'type' => "장비벤더",
|
||||||
'title' => "모델명",
|
'title' => "모델명",
|
||||||
'price' => "기본가",
|
'price' => "기본가",
|
||||||
'amount' => "제공가",
|
|
||||||
'manufactur_at' => "입고일",
|
'manufactur_at' => "입고일",
|
||||||
'format_at' => "포맷보류일",
|
'format_at' => "포맷보류일",
|
||||||
'status' => "상태",
|
'status' => "상태",
|
||||||
|
|||||||
@ -20,7 +20,6 @@ class ServerModel extends EquipmentModel
|
|||||||
"type",
|
"type",
|
||||||
"title",
|
"title",
|
||||||
"price",
|
"price",
|
||||||
"amount",
|
|
||||||
"manufactur_at",
|
"manufactur_at",
|
||||||
"format_at",
|
"format_at",
|
||||||
"status",
|
"status",
|
||||||
@ -44,7 +43,6 @@ class ServerModel extends EquipmentModel
|
|||||||
$rule = "required|trim|string";
|
$rule = "required|trim|string";
|
||||||
break;
|
break;
|
||||||
case "price":
|
case "price":
|
||||||
case "amount":
|
|
||||||
$rule = "required|numeric";
|
$rule = "required|numeric";
|
||||||
break;
|
break;
|
||||||
case "type":
|
case "type":
|
||||||
|
|||||||
@ -21,7 +21,7 @@ class GoogleService extends AuthService
|
|||||||
if (!$this->_mySocket) {
|
if (!$this->_mySocket) {
|
||||||
throw new \Exception("Socket이 지정되지 않았습니다.");
|
throw new \Exception("Socket이 지정되지 않았습니다.");
|
||||||
}
|
}
|
||||||
return $this->_mySOcket;
|
return $this->_mySocket;
|
||||||
}
|
}
|
||||||
public function getFormFields(): array
|
public function getFormFields(): array
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Services;
|
namespace App\Services;
|
||||||
|
|
||||||
|
use App\Entities\CommonEntity;
|
||||||
use App\Entities\FormOptionEntity;
|
use App\Entities\FormOptionEntity;
|
||||||
use App\Libraries\LogCollector;
|
|
||||||
use CodeIgniter\Model;
|
use CodeIgniter\Model;
|
||||||
|
|
||||||
abstract class CommonService
|
abstract class CommonService
|
||||||
@ -32,7 +32,7 @@ abstract class CommonService
|
|||||||
return $this->_model;
|
return $this->_model;
|
||||||
}
|
}
|
||||||
//Entity별로 작업처리시
|
//Entity별로 작업처리시
|
||||||
protected function getEntity_process(mixed $entity): mixed
|
protected function getEntity_process(object $entity): mixed
|
||||||
{
|
{
|
||||||
return $entity;
|
return $entity;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -92,6 +92,9 @@ class ServiceService extends CustomerService
|
|||||||
}
|
}
|
||||||
protected function getEntity_process(mixed $entity): ServiceEntity
|
protected function getEntity_process(mixed $entity): ServiceEntity
|
||||||
{
|
{
|
||||||
|
if (!($entity instanceof ServiceEntity)) {
|
||||||
|
throw new \Exception(__METHOD__ . "에서 형식오류:ServiceEntity만 허용됩니다.");
|
||||||
|
}
|
||||||
//서버정보 정의
|
//서버정보 정의
|
||||||
$serverEntity = $this->getServerService()->getEntity(['serviceinfo_uid' => $entity->getPK()]);
|
$serverEntity = $this->getServerService()->getEntity(['serviceinfo_uid' => $entity->getPK()]);
|
||||||
if (!($serverEntity instanceof ServerEntity)) {
|
if (!($serverEntity instanceof ServerEntity)) {
|
||||||
@ -168,19 +171,19 @@ class ServiceService extends CustomerService
|
|||||||
}
|
}
|
||||||
|
|
||||||
//서버정보 상태설정용
|
//서버정보 상태설정용
|
||||||
private function setServer_process(ServiceEntity $entity, string $status): ServerEntity
|
private function setServer_process(ServiceEntity $entity, mixed $serverinfo_uid, string $status): ServiceEntity
|
||||||
{
|
{
|
||||||
//서버경우 서비스중으로 설정
|
//서버경우 서비스중으로 설정
|
||||||
$serverEntity = $this->getServerService()->getEntity(['serviceinfo_uid' => $entity->getPK()]);
|
$serverEntity = $this->getServerService()->getEntity($serverinfo_uid);
|
||||||
if (!($serverEntity instanceof ServerEntity)) {
|
if (!($serverEntity instanceof ServerEntity)) {
|
||||||
throw new \Exception("{$entity->getPK()}에 해당하는 서버정보를 찾을수없습니다.");
|
throw new \Exception("{$serverinfo_uid}에 해당하는 서버정보를 찾을수없습니다.");
|
||||||
}
|
}
|
||||||
//서버정보 상태수정
|
//서버정보 상태수정
|
||||||
$serverEntity = $this->getServerService()->modify(
|
$serverEntity = $this->getServerService()->modify(
|
||||||
$serverEntity,
|
$serverEntity,
|
||||||
['serviceEntity' => $entity, 'status' => $status],
|
['serviceEntity' => $entity, 'status' => $status],
|
||||||
);
|
);
|
||||||
return $serverEntity;
|
return $entity->setServerEntity($serverEntity);
|
||||||
}
|
}
|
||||||
//생성
|
//생성
|
||||||
public function create(array $formDatas): ServiceEntity
|
public function create(array $formDatas): ServiceEntity
|
||||||
@ -189,7 +192,11 @@ class ServiceService extends CustomerService
|
|||||||
throw new \Exception("서버가 지정되지 않았습니다.");
|
throw new \Exception("서버가 지정되지 않았습니다.");
|
||||||
}
|
}
|
||||||
$entity = parent::create($formDatas);
|
$entity = parent::create($formDatas);
|
||||||
$serverEntity = $this->setServer_process($entity, STATUS['OCCUPIED']);
|
$serverEntity = $this->setServer_process(
|
||||||
|
$entity,
|
||||||
|
$formDatas['serverinfo_uid'],
|
||||||
|
STATUS['OCCUPIED']
|
||||||
|
);
|
||||||
return $entity->setServerEntity($serverEntity);
|
return $entity->setServerEntity($serverEntity);
|
||||||
}
|
}
|
||||||
//수정
|
//수정
|
||||||
@ -199,18 +206,34 @@ class ServiceService extends CustomerService
|
|||||||
throw new \Exception("신규 서버가 지정되지 않았습니다.");
|
throw new \Exception("신규 서버가 지정되지 않았습니다.");
|
||||||
}
|
}
|
||||||
//기존서버정보 사용가능으로 설정
|
//기존서버정보 사용가능으로 설정
|
||||||
$this->setServer_process($entity, STATUS['AVAILABLE']);
|
if ($entity->getServerInfoUID() !== $formDatas['serverinfo_uid']) {
|
||||||
|
$entity = $this->setServer_process(
|
||||||
|
$entity,
|
||||||
|
$entity->getServerInfoUID(),
|
||||||
|
STATUS['AVAILABLE']
|
||||||
|
);
|
||||||
|
}
|
||||||
//서비스 정보수정
|
//서비스 정보수정
|
||||||
$entity = parent::modify($entity, $formDatas);
|
$entity = parent::modify($entity, $formDatas);
|
||||||
//신규서버정보 사용중으로 설정
|
//신규서버정보 사용중으로 설정
|
||||||
$serverEntity = $this->setServer_process($entity, STATUS['OCCUPIED']);
|
if ($entity->getServerInfoUID() !== $formDatas['serverinfo_uid']) {
|
||||||
return $entity->setServerEntity($serverEntity);
|
$entity = $this->setServer_process(
|
||||||
|
$entity,
|
||||||
|
$formDatas['serverinfo_uid'],
|
||||||
|
STATUS['OCCUPIED']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return $entity;
|
||||||
}
|
}
|
||||||
//삭제
|
//삭제
|
||||||
public function delete(mixed $entity): ServiceEntity
|
public function delete(mixed $entity): ServiceEntity
|
||||||
{
|
{
|
||||||
//기존서버정보 사용가능으로 설정
|
//기존서버정보 사용가능으로 설정
|
||||||
$this->setServer_process($entity, STATUS['AVAILABLE']);
|
$this->setServer_process(
|
||||||
|
$entity,
|
||||||
|
$entity->getServerInfoUID(),
|
||||||
|
STATUS['AVAILABLE']
|
||||||
|
);
|
||||||
return parent::delete($entity);
|
return parent::delete($entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,6 +76,9 @@ class ServerPartService extends EquipmentService
|
|||||||
//partEntity 정보 추가
|
//partEntity 정보 추가
|
||||||
protected function getEntity_process(mixed $entity): ServerPartEntity
|
protected function getEntity_process(mixed $entity): ServerPartEntity
|
||||||
{
|
{
|
||||||
|
if (!($entity instanceof ServerPartEntity)) {
|
||||||
|
throw new \Exception(__METHOD__ . "에서 형식오류:ServicePartEntity만 허용됩니다.");
|
||||||
|
}
|
||||||
switch ($entity->getType()) {
|
switch ($entity->getType()) {
|
||||||
case 'SWITCH':
|
case 'SWITCH':
|
||||||
$partService = $this->getSwitchService();
|
$partService = $this->getSwitchService();
|
||||||
@ -90,11 +93,7 @@ class ServerPartService extends EquipmentService
|
|||||||
$partService = $this->getPartService();
|
$partService = $this->getPartService();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$partEntity = $partService->getEntity($entity->getPartUID());
|
return $entity->setPartEntity($partService->getEntity($entity->getPartUID()));
|
||||||
if ($entity) {
|
|
||||||
$entity->setPartEntity($partEntity);
|
|
||||||
}
|
|
||||||
return $entity;
|
|
||||||
}
|
}
|
||||||
//기본 기능부분
|
//기본 기능부분
|
||||||
// FieldForm관련용
|
// FieldForm관련용
|
||||||
@ -170,7 +169,7 @@ class ServerPartService extends EquipmentService
|
|||||||
case 'SWITCH':
|
case 'SWITCH':
|
||||||
case 'CS':
|
case 'CS':
|
||||||
//부품정보에 서버정보 설정 및 서비스,고객정보 정의
|
//부품정보에 서버정보 설정 및 서비스,고객정보 정의
|
||||||
if ($formDatas['status'] === STATUS['AVAILABLE']) {
|
if ($status === STATUS['AVAILABLE']) {
|
||||||
//사용가능
|
//사용가능
|
||||||
$formDatas['clientinfo_uid'] = null;
|
$formDatas['clientinfo_uid'] = null;
|
||||||
$formDatas['serviceinfo_uid'] = null;
|
$formDatas['serviceinfo_uid'] = null;
|
||||||
@ -198,7 +197,7 @@ class ServerPartService extends EquipmentService
|
|||||||
if (!array_key_exists('serverinfo_uid', $formDatas)) {
|
if (!array_key_exists('serverinfo_uid', $formDatas)) {
|
||||||
throw new \Exception("서버 정보가 지정되지 않았습니다.");
|
throw new \Exception("서버 정보가 지정되지 않았습니다.");
|
||||||
}
|
}
|
||||||
$serverEntity = $this->getServiceService()->getEntity($formDatas['serviceinfo_uid']);
|
$serverEntity = $this->getServerService()->getEntity($formDatas['serverinfo_uid']);
|
||||||
}
|
}
|
||||||
if (!($serverEntity instanceof ServerEntity)) {
|
if (!($serverEntity instanceof ServerEntity)) {
|
||||||
throw new \Exception("서버 정보가 지정되지 않았습니다.");
|
throw new \Exception("서버 정보가 지정되지 않았습니다.");
|
||||||
@ -225,20 +224,14 @@ class ServerPartService extends EquipmentService
|
|||||||
if (!array_key_exists('serverinfo_uid', $formDatas)) {
|
if (!array_key_exists('serverinfo_uid', $formDatas)) {
|
||||||
throw new \Exception("서버 정보가 지정되지 않았습니다.");
|
throw new \Exception("서버 정보가 지정되지 않았습니다.");
|
||||||
}
|
}
|
||||||
$serverEntity = $this->getServiceService()->getEntity($formDatas['serviceinfo_uid']);
|
$serverEntity = $this->getServerService()->getEntity($formDatas['serverinfo_uid']);
|
||||||
}
|
}
|
||||||
if (!($serverEntity instanceof ServerEntity)) {
|
if (!($serverEntity instanceof ServerEntity)) {
|
||||||
throw new \Exception("서버 정보가 지정되지 않았습니다.");
|
throw new \Exception("서버 정보가 지정되지 않았습니다.");
|
||||||
}
|
}
|
||||||
if ($formDatas['status'] === STATUS['OCCUPIED']) {
|
|
||||||
$formDatas["clientinfo_uid"] = $serverEntity->getClientInfoUID();
|
$formDatas["clientinfo_uid"] = $serverEntity->getClientInfoUID();
|
||||||
$formDatas["serviceinfo_uid"] = $serverEntity->getServiceInfoUID();
|
$formDatas["serviceinfo_uid"] = $serverEntity->getServiceInfoUID();
|
||||||
$formDatas["serverinfo_uid"] = $serverEntity->getPK();
|
$formDatas["serverinfo_uid"] = $serverEntity->getPK();
|
||||||
} else {
|
|
||||||
$formDatas["clientinfo_uid"] = null;
|
|
||||||
$formDatas["serviceinfo_uid"] = null;
|
|
||||||
$formDatas["serverinfo_uid"] = null;
|
|
||||||
}
|
|
||||||
//기존 Part_UID와 신규 Part_UID가 다르면 기존 Part정보 사용가능으로 변경
|
//기존 Part_UID와 신규 Part_UID가 다르면 기존 Part정보 사용가능으로 변경
|
||||||
if ($entity->getPartUID() != $formDatas['part_uid']) {
|
if ($entity->getPartUID() != $formDatas['part_uid']) {
|
||||||
$this->setPart_process($entity, $entity->getPartUID(), STATUS['AVAILABLE']);
|
$this->setPart_process($entity, $entity->getPartUID(), STATUS['AVAILABLE']);
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Services\Equipment;
|
namespace App\Services\Equipment;
|
||||||
|
|
||||||
|
use App\Entities\CommonEntity;
|
||||||
use App\Entities\Customer\ServiceEntity;
|
use App\Entities\Customer\ServiceEntity;
|
||||||
use App\Entities\Equipment\ServerEntity;
|
use App\Entities\Equipment\ServerEntity;
|
||||||
use App\Models\Equipment\ServerModel;
|
use App\Models\Equipment\ServerModel;
|
||||||
@ -18,17 +19,15 @@ class ServerService extends EquipmentService
|
|||||||
public function getFormFields(): array
|
public function getFormFields(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
"clientinfo_uid",
|
||||||
|
"serviceinfo_uid",
|
||||||
"code",
|
"code",
|
||||||
"type",
|
"type",
|
||||||
"title",
|
"title",
|
||||||
"price",
|
"price",
|
||||||
"amount",
|
|
||||||
"manufactur_at",
|
"manufactur_at",
|
||||||
"format_at",
|
"format_at",
|
||||||
"status",
|
"status",
|
||||||
"CPU",
|
|
||||||
"RAM",
|
|
||||||
"DISK",
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
public function getFormFilters(): array
|
public function getFormFilters(): array
|
||||||
@ -52,7 +51,6 @@ class ServerService extends EquipmentService
|
|||||||
"type",
|
"type",
|
||||||
'title',
|
'title',
|
||||||
'price',
|
'price',
|
||||||
'amount',
|
|
||||||
'manufactur_at',
|
'manufactur_at',
|
||||||
"format_at",
|
"format_at",
|
||||||
'status',
|
'status',
|
||||||
@ -64,6 +62,7 @@ class ServerService extends EquipmentService
|
|||||||
'clientinfo_uid',
|
'clientinfo_uid',
|
||||||
'serviceinfo_uid',
|
'serviceinfo_uid',
|
||||||
'type',
|
'type',
|
||||||
|
"title",
|
||||||
'status'
|
'status'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -81,7 +80,9 @@ class ServerService extends EquipmentService
|
|||||||
//partEntity 정보 추가
|
//partEntity 정보 추가
|
||||||
protected function getEntity_process(mixed $entity): ServerEntity
|
protected function getEntity_process(mixed $entity): ServerEntity
|
||||||
{
|
{
|
||||||
//부품연결정보 정의
|
if (!($entity instanceof ServerEntity)) {
|
||||||
|
throw new \Exception(__METHOD__ . "에서 형식오류:ServerEntity만 허용됩니다.");
|
||||||
|
}
|
||||||
foreach (SERVERPART['PARTTYPES'] as $partType) {
|
foreach (SERVERPART['PARTTYPES'] as $partType) {
|
||||||
foreach ($this->getServerPartService()->getEntities(['serverinfo_uid' => $entity->getPK(), 'type' => $partType]) as $serverPartEntity) {
|
foreach ($this->getServerPartService()->getEntities(['serverinfo_uid' => $entity->getPK(), 'type' => $partType]) as $serverPartEntity) {
|
||||||
$entity = $entity->addServerPartEntity($partType, $serverPartEntity);
|
$entity = $entity->addServerPartEntity($partType, $serverPartEntity);
|
||||||
@ -138,18 +139,17 @@ class ServerService extends EquipmentService
|
|||||||
{
|
{
|
||||||
$entity = parent::create($formDatas);
|
$entity = parent::create($formDatas);
|
||||||
//신규 ServerPart정보 생성
|
//신규 ServerPart정보 생성
|
||||||
foreach (SERVERPART['SERVER_PARTTYPES'] as $partType) {
|
// foreach (SERVERPART['SERVER_PARTTYPES'] as $partType) {
|
||||||
$serverPartFormDatas = [];
|
// $serverPartFormDatas = [];
|
||||||
$serverPartFormDatas['serverEntity'] = $entity;
|
// $serverPartFormDatas['serverEntity'] = $entity;
|
||||||
$serverPartFormDatas['type'] = $partType;
|
// $serverPartFormDatas['type'] = $partType;
|
||||||
$serverPartFormDatas['part_uid'] = $partType . "_uid";
|
// $serverPartFormDatas['part_uid'] = $partType . "_uid";
|
||||||
$serverPartFormDatas["billing"] = array_key_exists("{$partType}_billing", $formDatas) ? $formDatas["{$partType}_billing"] : null;
|
// $serverPartFormDatas["billing"] = array_key_exists("{$partType}_billing", $formDatas) ? $formDatas["{$partType}_billing"] : null;
|
||||||
$serverPartFormDatas["amount"] = array_key_exists("{$partType}_amount", $formDatas) ? $formDatas["{$partType}_amount"] : 0;
|
// $serverPartFormDatas["cnt"] = array_key_exists("{$partType}_cnt", $formDatas) ? $formDatas["{$partType}_cnt"] : 1;
|
||||||
$serverPartFormDatas["cnt"] = array_key_exists("{$partType}_cnt", $formDatas) ? $formDatas["{$partType}_cnt"] : 1;
|
// $serverPartFormDatas["extra"] = array_key_exists("{$partType}_extra", $formDatas) ? $formDatas["{$partType}_extra"] : null;
|
||||||
$serverPartFormDatas["extra"] = array_key_exists("{$partType}_extra", $formDatas) ? $formDatas["{$partType}_extra"] : null;
|
// $this->getServerPartService()->create($serverPartFormDatas);
|
||||||
$this->getServerPartService()->create($serverPartFormDatas);
|
// }
|
||||||
}
|
return $this->getEntity_process($entity);
|
||||||
return $entity->getEntity_process($entity);
|
|
||||||
}
|
}
|
||||||
//Service별 수정
|
//Service별 수정
|
||||||
public function modify(mixed $entity, array $formDatas): ServerEntity
|
public function modify(mixed $entity, array $formDatas): ServerEntity
|
||||||
@ -164,9 +164,7 @@ class ServerService extends EquipmentService
|
|||||||
}
|
}
|
||||||
$serviceEntity = $this->getServiceService()->getEntity($formDatas['serviceinfo_uid']);
|
$serviceEntity = $this->getServiceService()->getEntity($formDatas['serviceinfo_uid']);
|
||||||
}
|
}
|
||||||
if (!($serviceEntity instanceof ServiceEntity)) {
|
if ($serviceEntity instanceof ServiceEntity) {
|
||||||
throw new \Exception("서비스 정보가 지정되지 않았습니다.");
|
|
||||||
}
|
|
||||||
//서비스상태에 따라
|
//서비스상태에 따라
|
||||||
if ($formDatas['status'] === STATUS['AVAILABLE']) {
|
if ($formDatas['status'] === STATUS['AVAILABLE']) {
|
||||||
//사용가능
|
//사용가능
|
||||||
@ -177,6 +175,7 @@ class ServerService extends EquipmentService
|
|||||||
$formDatas["clientinfo_uid"] = $serviceEntity->getClientInfoUID();
|
$formDatas["clientinfo_uid"] = $serviceEntity->getClientInfoUID();
|
||||||
$formDatas["serviceinfo_uid"] = $serviceEntity->getPK();
|
$formDatas["serviceinfo_uid"] = $serviceEntity->getPK();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//서버정보수정
|
//서버정보수정
|
||||||
return $this->getEntity_process(parent::modify($entity, $formDatas));
|
return $this->getEntity_process(parent::modify($entity, $formDatas));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,6 +28,7 @@
|
|||||||
<?= $this->include("templates/{$viewDatas['layout']}/index_content_top"); ?>
|
<?= $this->include("templates/{$viewDatas['layout']}/index_content_top"); ?>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
<?= form_close() ?>
|
||||||
<?= form_open(current_url(), ['id' => 'batchjob_form', 'method' => "post"]) ?>
|
<?= 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">
|
<table class="index_table data table table-bordered table-hover table-striped" data-rtc-resizable-table="reisze_table">
|
||||||
<thead>
|
<thead>
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<tr>
|
<tr>
|
||||||
<?php foreach (["code", "type", "title", "price", "amount", "manufactur_at", "format_at", "status",] as $field): ?>
|
<?php foreach (["code", "type", "title", "price", "manufactur_at", "format_at", "status",] as $field): ?>
|
||||||
<th nowrap class="text-end"><?= $viewDatas['helper']->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
<th nowrap class="text-end"><?= $viewDatas['helper']->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
||||||
<td nowrap class="text-start">
|
<td nowrap class="text-start">
|
||||||
<?= $viewDatas['helper']->getFieldForm($field, old($field, $viewDatas['control']['form_datas'][$field] ?? null), $viewDatas) ?>
|
<?= $viewDatas['helper']->getFieldForm($field, old($field, $viewDatas['control']['form_datas'][$field] ?? null), $viewDatas) ?>
|
||||||
|
|||||||
@ -28,6 +28,7 @@
|
|||||||
<?= $this->include("templates/{$viewDatas['layout']}/index_content_top"); ?>
|
<?= $this->include("templates/{$viewDatas['layout']}/index_content_top"); ?>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
<?= form_close() ?>
|
||||||
<?= form_open(current_url(), ['id' => 'batchjob_form', 'method' => "post"]) ?>
|
<?= 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">
|
<table class="index_table data table table-bordered table-hover table-striped" data-rtc-resizable-table="reisze_table">
|
||||||
<thead>
|
<thead>
|
||||||
@ -42,8 +43,7 @@
|
|||||||
<?= $viewDatas['helper']->getListLabel('title', lang("{$viewDatas['class_path']}.label.title"), $viewDatas) ?>
|
<?= $viewDatas['helper']->getListLabel('title', lang("{$viewDatas['class_path']}.label.title"), $viewDatas) ?>
|
||||||
</th>
|
</th>
|
||||||
<th class="index_head_short_column">
|
<th class="index_head_short_column">
|
||||||
<?= $viewDatas['helper']->getListLabel('price', lang("{$viewDatas['class_path']}.label.price"), $viewDatas) ?>/
|
<?= $viewDatas['helper']->getListLabel('price', lang("{$viewDatas['class_path']}.label.price"), $viewDatas) ?>
|
||||||
<?= $viewDatas['helper']->getListLabel('amount', lang("{$viewDatas['class_path']}.label.amount"), $viewDatas) ?>
|
|
||||||
</th>
|
</th>
|
||||||
<th class="index_head_short_column">
|
<th class="index_head_short_column">
|
||||||
<?= $viewDatas['helper']->getListLabel('manufactur_at', lang("{$viewDatas['class_path']}.label.manufactur_at"), $viewDatas) ?>/
|
<?= $viewDatas['helper']->getListLabel('manufactur_at', lang("{$viewDatas['class_path']}.label.manufactur_at"), $viewDatas) ?>/
|
||||||
@ -72,7 +72,6 @@
|
|||||||
</td>
|
</td>
|
||||||
<td nowrap>
|
<td nowrap>
|
||||||
<div><?= $viewDatas['helper']->getFieldView('price', $entity->price, $viewDatas) ?></div>
|
<div><?= $viewDatas['helper']->getFieldView('price', $entity->price, $viewDatas) ?></div>
|
||||||
<div><?= $viewDatas['helper']->getFieldView('amount', $entity->amount, $viewDatas) ?></div>
|
|
||||||
</td>
|
</td>
|
||||||
<td nowrap>
|
<td nowrap>
|
||||||
<div><?= $viewDatas['helper']->getFieldView('manufactur_at', $entity->manufactur_at, $viewDatas) ?></div>
|
<div><?= $viewDatas['helper']->getFieldView('manufactur_at', $entity->manufactur_at, $viewDatas) ?></div>
|
||||||
@ -83,8 +82,8 @@
|
|||||||
<table class="table table-bordered table-striped m-0 p-0">
|
<table class="table table-bordered table-striped m-0 p-0">
|
||||||
<?php foreach (SERVERPART['SERVER_PARTTYPES'] as $partType): ?>
|
<?php foreach (SERVERPART['SERVER_PARTTYPES'] as $partType): ?>
|
||||||
<tr class="m-0 p-0">
|
<tr class="m-0 p-0">
|
||||||
<th class="text-end m-0 p-0"><?= $viewDatas['helper']->getListButton($partType, $partType, $viewDatas) ?></th>
|
<th class="m-0 p-0" width="15%"><?= $viewDatas['helper']->getListButton($partType, $partType, $viewDatas) ?></th>
|
||||||
<td class="text-start m-0 p-0"><?= $viewDatas['helper']->getFieldView($partType, "", $viewDatas) ?></td>
|
<td class="m-0 p-0"><?= $viewDatas['helper']->getFieldView($partType, "", $viewDatas) ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
<?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
<?= form_open(current_url(), $viewDatas['forms']['attributes'], $viewDatas['forms']['hiddens']) ?>
|
||||||
<div class="action_form">
|
<div class="action_form">
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<?php foreach (["code", "type", "title", "price", "amount", "manufactur_at", "format_at", "status",] as $field): ?>
|
<?php foreach (["code", "type", "title", "price", "manufactur_at", "format_at", "status",] as $field): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th nowrap class="text-end"><?= $viewDatas['helper']->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
<th nowrap class="text-end"><?= $viewDatas['helper']->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
||||||
<td nowrap class="text-start">
|
<td nowrap class="text-start">
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td nowrap>
|
<td nowrap>
|
||||||
<table class="table table-bordered">
|
<table class="table table-bordered">
|
||||||
<?php foreach (["code", "type", "title", "price", "amount", "manufactur_at", "format_at", "status",] as $field): ?>
|
<?php foreach (["code", "type", "title", "price", "manufactur_at", "format_at", "status",] as $field): ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th nowrap class="text-end"><?= $viewDatas['helper']->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
<th nowrap class="text-end"><?= $viewDatas['helper']->getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?></th>
|
||||||
<td nowrap class="text-start">
|
<td nowrap class="text-start">
|
||||||
@ -26,10 +26,10 @@
|
|||||||
</td>
|
</td>
|
||||||
<td nowrap>
|
<td nowrap>
|
||||||
<table class="table table-bordered table-striped m-0 p-0">
|
<table class="table table-bordered table-striped m-0 p-0">
|
||||||
<?php foreach (SERVERPART['PARTTYPES'] as $partType): ?>
|
<?php foreach (SERVERPART['SERVER_PARTTYPES'] as $partType): ?>
|
||||||
<tr class="m-0 p-0">
|
<tr class="m-0 p-0">
|
||||||
<th class="text-end m-0 p-0"><?= $viewDatas['serverPartHelper']->getListButton($partType, $partType, $viewDatas) ?></th>
|
<th class="text-end m-0 p-0"><?= $viewDatas['helper']->getListButton($partType, $partType, $viewDatas) ?></th>
|
||||||
<td class="text-start m-0 p-0"><?= $viewDatas['serverPartHelper']->getFieldView($partType, "", $viewDatas) ?></td>
|
<td class="text-start m-0 p-0"><?= $viewDatas['helper']->getFieldView($partType, "", $viewDatas) ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@ -1,24 +0,0 @@
|
|||||||
<?= $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>
|
|
||||||
<?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>
|
|
||||||
<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() ?>
|
|
||||||
@ -28,6 +28,7 @@
|
|||||||
<?= $this->include("templates/{$viewDatas['layout']}/index_content_top"); ?>
|
<?= $this->include("templates/{$viewDatas['layout']}/index_content_top"); ?>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
<?= form_close() ?>
|
||||||
<?= form_open(current_url(), ['id' => 'batchjob_form', 'method' => "post"]) ?>
|
<?= 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">
|
<table class="index_table data table table-bordered table-hover table-striped" data-rtc-resizable-table="reisze_table">
|
||||||
<thead>
|
<thead>
|
||||||
@ -88,7 +89,7 @@
|
|||||||
<table class="table table-bordered table-striped m-0 p-0">
|
<table class="table table-bordered table-striped m-0 p-0">
|
||||||
<?php foreach (SERVERPART['SERVICE_PARTTYPES'] as $partType): ?>
|
<?php foreach (SERVERPART['SERVICE_PARTTYPES'] as $partType): ?>
|
||||||
<tr class="m-0 p-0">
|
<tr class="m-0 p-0">
|
||||||
<th class="m-0 p-0"><?= $viewDatas['helper']->getListButton($partType, $partType, $viewDatas) ?></th>
|
<th class="m-0 p-0" width="15%"><?= $viewDatas['helper']->getListButton($partType, $partType, $viewDatas) ?></th>
|
||||||
<td class="m-0 p-0"><?= $viewDatas['helper']->getFieldView($partType, "", $viewDatas) ?></td>
|
<td class="m-0 p-0"><?= $viewDatas['helper']->getFieldView($partType, "", $viewDatas) ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach ?>
|
<?php endforeach ?>
|
||||||
|
|||||||
@ -1,24 +0,0 @@
|
|||||||
<?= $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">
|
|
||||||
<?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>
|
|
||||||
<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