From e7db2d47d988854570342270c04e2784465cd391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Mon, 2 Mar 2026 13:38:04 +0900 Subject: [PATCH] dbmsv4 init...5 --- app/Entities/Customer/ClientEntity.php | 5 ++++- app/Entities/UserEntity.php | 4 ++++ app/Forms/BoardForm.php | 2 +- app/Forms/Customer/ServiceForm.php | 2 +- app/Forms/Equipment/CHASSISForm.php | 6 +++--- app/Forms/Equipment/ServerForm.php | 6 +++--- app/Forms/Equipment/ServerPartForm.php | 4 ++-- app/Forms/Part/IPForm.php | 4 ++-- app/Forms/Part/PartForm.php | 4 ++-- app/Forms/PaymentForm.php | 2 +- 10 files changed, 23 insertions(+), 16 deletions(-) diff --git a/app/Entities/Customer/ClientEntity.php b/app/Entities/Customer/ClientEntity.php index 6dca574..4b45b55 100644 --- a/app/Entities/Customer/ClientEntity.php +++ b/app/Entities/Customer/ClientEntity.php @@ -42,7 +42,10 @@ class ClientEntity extends CustomerEntity { return $this->role; } - + public function getRoles(): array + { + return explode(DEFAULTS['DELIMITER_COMMA'], $this->getRole()); + } public function getAccountBalance(): int { return (int) ($this->account_balance ?? 0); diff --git a/app/Entities/UserEntity.php b/app/Entities/UserEntity.php index 93dee44..9dcb391 100644 --- a/app/Entities/UserEntity.php +++ b/app/Entities/UserEntity.php @@ -32,6 +32,10 @@ class UserEntity extends CommonEntity { return $this->role; } + public function getRoles(): array + { + return explode(DEFAULTS['DELIMITER_COMMA'], $this->getRole()); + } public function getEmail(): string { return $this->email; diff --git a/app/Forms/BoardForm.php b/app/Forms/BoardForm.php index 8d1da73..ee395cf 100644 --- a/app/Forms/BoardForm.php +++ b/app/Forms/BoardForm.php @@ -95,7 +95,7 @@ class BoardForm extends CommonForm case 'worker_uid': foreach ($this->getFormOption_process(service('userservice'), $field, $formDatas) as $tempEntity) { $tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle(); - // $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())]; + // $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())]; } $options['options'] = $tempOptions; break; diff --git a/app/Forms/Customer/ServiceForm.php b/app/Forms/Customer/ServiceForm.php index 6504486..ddb0d98 100644 --- a/app/Forms/Customer/ServiceForm.php +++ b/app/Forms/Customer/ServiceForm.php @@ -114,7 +114,7 @@ class ServiceForm extends CustomerForm case 'serverinfo_uid': foreach ($this->getFormOption_process(service('equipment_serverservice'), $field, $formDatas) as $tempEntity) { $tempOptions[$tempEntity->getPK()] = $tempEntity->getCustomTitle(); - // $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())]; + // $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())]; } $options['options'] = $tempOptions; break; diff --git a/app/Forms/Equipment/CHASSISForm.php b/app/Forms/Equipment/CHASSISForm.php index e53970e..63e7791 100644 --- a/app/Forms/Equipment/CHASSISForm.php +++ b/app/Forms/Equipment/CHASSISForm.php @@ -81,21 +81,21 @@ class CHASSISForm extends EquipmentForm case "cpuinfo_uid": foreach ($this->getFormOption_process(service('part_cpuservice'), $field, $formDatas) as $tempEntity) { $tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle(); - // $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())]; + // $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())]; } $options['options'] = $tempOptions; break; case "raminfo_uid": foreach ($this->getFormOption_process(service('part_ramservice'), $field, $formDatas) as $tempEntity) { $tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle(); - // $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())]; + // $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())]; } $options['options'] = $tempOptions; break; case "diskinfo_uid": foreach ($this->getFormOption_process(service('part_diskservice'), $field, $formDatas) as $tempEntity) { $tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle(); - // $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())]; + // $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())]; } $options['options'] = $tempOptions; break; diff --git a/app/Forms/Equipment/ServerForm.php b/app/Forms/Equipment/ServerForm.php index 13fe98e..6044379 100644 --- a/app/Forms/Equipment/ServerForm.php +++ b/app/Forms/Equipment/ServerForm.php @@ -134,7 +134,7 @@ class ServerForm extends EquipmentForm case 'serviceinfo_uid': foreach ($this->getFormOption_process(service('customer_serviceservice'), $field, $formDatas) as $tempEntity) { $tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle(); - // $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())]; + // $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())]; } $options['options'] = $tempOptions; break; @@ -159,7 +159,7 @@ class ServerForm extends EquipmentForm case 'switchinfo_uid': foreach ($this->getFormOption_process(service('part_switchservice'), $field, $formDatas) as $tempEntity) { $tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle(); - // $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())]; + // $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())]; } $options['options'] = $tempOptions; // dd($options); @@ -167,7 +167,7 @@ class ServerForm extends EquipmentForm case 'ip': //key=value이 같음주의 foreach ($this->getFormOption_process(service('part_ipservice'), 'ip', $formDatas) as $tempEntity) { $tempOptions[$tempEntity->getTitle()] = $tempEntity->getTitle(); - // $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())]; + // $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())]; } //formDatas에 값이 있고, $tempOptions에 없다면 추가(VPN의 Customer IP 경우) if (array_key_exists($field, $formDatas) && $formDatas[$field]) { diff --git a/app/Forms/Equipment/ServerPartForm.php b/app/Forms/Equipment/ServerPartForm.php index 11e9bb7..8170c6a 100644 --- a/app/Forms/Equipment/ServerPartForm.php +++ b/app/Forms/Equipment/ServerPartForm.php @@ -109,14 +109,14 @@ class ServerPartForm extends EquipmentForm case 'serverinfo_uid': foreach ($this->getFormOption_process(service('equipment_serverservice'), $field, $formDatas) as $tempEntity) { $tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle(); - // $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())]; + // $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())]; } $options['options'] = $tempOptions; break; case 'serviceinfo_uid': foreach ($this->getFormOption_process(service('customer_clientservice'), $field, $formDatas) as $tempEntity) { $tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle(); - // $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())]; + // $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())]; } $options['options'] = $tempOptions; break; diff --git a/app/Forms/Part/IPForm.php b/app/Forms/Part/IPForm.php index bae6dce..1c302ef 100644 --- a/app/Forms/Part/IPForm.php +++ b/app/Forms/Part/IPForm.php @@ -106,14 +106,14 @@ class IPForm extends PartForm case 'lineinfo_uid': foreach ($this->getFormOption_process(service('equipment_lineservice'), $field, $formDatas) as $tempEntity) { $tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle(); - // $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())]; + // $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())]; } $options['options'] = $tempOptions; break; case 'old_clientinfo_uid': foreach ($this->getFormOption_process(service('customer_clientservice'), $field, $formDatas) as $tempEntity) { $tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle(); - // $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())]; + // $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())]; } // dd($tempOptions); $options['options'] = $tempOptions; diff --git a/app/Forms/Part/PartForm.php b/app/Forms/Part/PartForm.php index 956eb46..f7b21f3 100644 --- a/app/Forms/Part/PartForm.php +++ b/app/Forms/Part/PartForm.php @@ -39,14 +39,14 @@ abstract class PartForm extends CommonForm case 'serviceinfo_uid': foreach ($this->getFormOption_process(service('customer_serviceservice'), $field, $formDatas) as $tempEntity) { $tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle(); - // $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())]; + // $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())]; } $options['options'] = $tempOptions; break; case 'serverinfo_uid': foreach ($this->getFormOption_process(service('equipment_serverservice'), $field, $formDatas) as $tempEntity) { $tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle(); - // $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())]; + // $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())]; } $options['options'] = $tempOptions; break; diff --git a/app/Forms/PaymentForm.php b/app/Forms/PaymentForm.php index 115ec30..0f3ef79 100644 --- a/app/Forms/PaymentForm.php +++ b/app/Forms/PaymentForm.php @@ -110,7 +110,7 @@ class PaymentForm extends CommonForm case 'serviceinfo_uid': foreach ($this->getFormOption_process(service('customer_serviceservice'), $field, $formDatas) as $tempEntity) { $tempOptions[$tempEntity->getPK()] = $tempEntity->getTitle(); - // $options['attributes'][$tempEntity->getPK()] = ['data-role' => implode(DEFAULTS['DELIMITER_COMMA'], $tempEntity->getRole())]; + // $options['attributes'][$tempEntity->getPK()] = ['data-role' => $tempEntity->getRole())]; } $options['options'] = $tempOptions; break;