diff --git a/app/Helpers/CommonHelper.php b/app/Helpers/CommonHelper.php index 937a232..de63693 100644 --- a/app/Helpers/CommonHelper.php +++ b/app/Helpers/CommonHelper.php @@ -197,13 +197,13 @@ class CommonHelper return $ips; } - public function getFieldLabel(string $field, array $viewDatas, array $extras = []): string + public function getFieldLabel(string $field, string $label, array $viewDatas, array $extras = []): string { switch ($field) { default: // required가 있으면 class 추가 $extras = (strpos($viewDatas['control']['field_rules'][$field], 'required') !== false) ? ["class" => "text-danger", "required" => "", ...$extras] : $extras; - $label = form_label(array_key_exists('label', $extras) ? $extras['label'] : lang("{$viewDatas['class_path']}.label.{$field}"), $field, $extras); + $label = form_label($label, $field, $extras); break; } return $label; @@ -332,11 +332,11 @@ class CommonHelper return $entity->isMatched($field, $value) ? "" : 'class="table-danger"'; } - public function getListLabel(string $field, array $viewDatas, array $extras = []): string + public function getListLabel(string $field, string $label, array $viewDatas, array $extras = []): string { switch ($field) { default: - $label = $this->getFieldLabel($field, $viewDatas, $extras); + $label = $this->getFieldLabel($field, $label, $viewDatas, $extras); if (isset($viewDatas['order_field']) && $viewDatas['order_field'] == $field) { $label .= $viewDatas['order_value'] == 'ASC' ? ICONS["UP"] : ICONS["DOWN"]; } @@ -350,14 +350,14 @@ class CommonHelper return $label; } - public function getListButton(string $action, array $viewDatas, array $extras = []): string + public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string { switch ($action) { case 'create': // echo current_url() . '/' . $action . '?' . $viewDatas['uri']->getQuery(); $extras = ["class" => "btn btn-outline btn-primary btn-circle", "target" => "_self", ...$extras]; $action = form_label( - array_key_exists('label', $extras) ? $extras['label'] : ICONS['ADD'], + $label ? $label : ICONS['ADD'], $action, [ "data-src" => current_url() . '/' . $action . '?' . $viewDatas['uri']->getQuery(), @@ -378,7 +378,7 @@ class CommonHelper "checked" => in_array($viewDatas['entity']->getPK(), $oldBatchJobUids) ]); $action = $checkbox . form_label( - $viewDatas['cnt'], + $label ? $label : $viewDatas['cnt'], $action, [ "data-src" => current_url() . '/' . $action . '/' . $viewDatas['entity']->getPK() . '?' . $viewDatas['uri']->getQuery(), @@ -391,7 +391,7 @@ class CommonHelper case 'view': $extras = ["class" => "btn btn-outline btn-primary btn-circle", "target" => "_self", ...$extras]; $action = form_label( - array_key_exists('label', $extras) ? $extras['label'] : ICONS['SEARCH'], + $label ? $label : ICONS['SEARCH'], $action, [ "data-src" => current_url() . '/' . $action . '/' . $viewDatas['entity']->getPK(), @@ -405,19 +405,19 @@ class CommonHelper $extras = ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self", ...$extras]; $action = anchor( current_url() . '/' . $action . '/' . $viewDatas['entity']->getPK(), - array_key_exists('label', $extras) ? $extras['label'] : ICONS['DELETE'], + $label ? $label : ICONS['DELETE'], $extras ); break; case 'batchjob': - $action = form_submit("batchjob_submit", '일괄처리', [ + $action = form_submit("batchjob_submit", $label ? $label : '일괄처리', [ "formaction" => current_url() . '/batchjob', "class" => "btn btn-outline btn-warning", // "onclick" => "return submitBatchJob()" ]); break; case 'batchjob_delete': - $action = form_submit("batchjob_submit", '일괄삭제', [ + $action = form_submit("batchjob_submit", $label ? $label : '일괄삭제', [ "formaction" => current_url() . '/batchjob_delete', "class" => "btn btn-outline btn-danger", // "onclick" => "return submitBatchJobDelete()" diff --git a/app/Helpers/Customer/AccountHelper.php b/app/Helpers/Customer/AccountHelper.php index d8a6cd5..e78c2e2 100644 --- a/app/Helpers/Customer/AccountHelper.php +++ b/app/Helpers/Customer/AccountHelper.php @@ -26,7 +26,7 @@ class AccountHelper extends CustomerHelper } return $value; } - public function getListButton(string $action, array $viewDatas, array $extras = []): string + public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string { switch ($action) { case 'modify': @@ -36,7 +36,7 @@ class AccountHelper extends CustomerHelper $action = ""; break; default: - $action = parent::getListButton($action, $viewDatas, $extras); + $action = parent::getListButton($action, $label, $viewDatas, $extras); break; } return $action; diff --git a/app/Helpers/Customer/ClientHelper.php b/app/Helpers/Customer/ClientHelper.php index 2499e58..864b97e 100644 --- a/app/Helpers/Customer/ClientHelper.php +++ b/app/Helpers/Customer/ClientHelper.php @@ -67,16 +67,16 @@ class ClientHelper extends CustomerHelper } return $value; } // - public function getListButton(string $action, array $viewDatas, array $extras = []): string + public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string { switch ($action) { case 'modify': - $action = !$this->getMyAuth()->isAccessRole(['security']) ? $viewDatas['cnt'] : parent::getListButton($action, $viewDatas, $extras); + $action = !$this->getMyAuth()->isAccessRole(['security']) ? $viewDatas['cnt'] : parent::getListButton($action, $label, $viewDatas, $extras); break; case 'delete': case 'batchjob': case 'batchjob_delete': - $action = !$this->getMyAuth()->isAccessRole(['security']) ? "" : parent::getListButton($action, $viewDatas, $extras); + $action = !$this->getMyAuth()->isAccessRole(['security']) ? "" : parent::getListButton($action, $label, $viewDatas, $extras); break; case 'history': $extras = ["class" => "btn btn-outline btn-primary btn-circle", "target" => "_self", ...$extras]; @@ -92,7 +92,7 @@ class ClientHelper extends CustomerHelper ); break; default: - $action = parent::getListButton($action, $viewDatas, $extras); + $action = parent::getListButton($action, $label, $viewDatas, $extras); break; } return $action; diff --git a/app/Helpers/Customer/CouponHelper.php b/app/Helpers/Customer/CouponHelper.php index ff069e6..e2f7081 100644 --- a/app/Helpers/Customer/CouponHelper.php +++ b/app/Helpers/Customer/CouponHelper.php @@ -26,7 +26,7 @@ class CouponHelper extends CustomerHelper } return $value; } - public function getListButton(string $action, array $viewDatas, array $extras = []): string + public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string { switch ($action) { case 'modify': @@ -36,7 +36,7 @@ class CouponHelper extends CustomerHelper $action = ""; break; default: - $action = parent::getListButton($action, $viewDatas, $extras); + $action = parent::getListButton($action, $label, $viewDatas, $extras); break; } return $action; diff --git a/app/Helpers/Customer/PointHelper.php b/app/Helpers/Customer/PointHelper.php index e171a06..5fd1a6d 100644 --- a/app/Helpers/Customer/PointHelper.php +++ b/app/Helpers/Customer/PointHelper.php @@ -27,7 +27,7 @@ class PointHelper extends CustomerHelper } return $value; } - public function getListButton(string $action, array $viewDatas, array $extras = []): string + public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string { switch ($action) { case 'modify': @@ -37,7 +37,7 @@ class PointHelper extends CustomerHelper $action = ""; break; default: - $action = parent::getListButton($action, $viewDatas, $extras); + $action = parent::getListButton($action, $label, $viewDatas, $extras); break; } return $action; diff --git a/app/Helpers/Customer/ServiceHelper.php b/app/Helpers/Customer/ServiceHelper.php index 62da6d7..91bed34 100644 --- a/app/Helpers/Customer/ServiceHelper.php +++ b/app/Helpers/Customer/ServiceHelper.php @@ -13,7 +13,7 @@ class ServiceHelper extends CustomerHelper parent::__construct(); $this->setTitleField(field: ServiceModel::TITLE); } - public function getFieldLabel(string $field, array $viewDatas, array $extras = []): string + public function getFieldLabel(string $field, string $label, array $viewDatas, array $extras = []): string { switch ($field) { case "LINE": @@ -39,7 +39,7 @@ class ServiceHelper extends CustomerHelper ); break; default: - $label = parent::getFieldLabel($field, $viewDatas, $extras); + $label = parent::getFieldLabel($field, $label, $viewDatas, $extras); break; } return $label; @@ -159,13 +159,13 @@ class ServiceHelper extends CustomerHelper return $value; } - public function getListButton(string $action, array $viewDatas, array $extras = []): string + public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string { switch ($action) { case 'history': $extras = ["class" => "btn btn-outline btn-primary btn-circle", "target" => "_self", ...$extras]; $action = form_label( - ICONS['HISTORY'], + $label ? $label : ICONS['HISTORY'], $action, [ "data-src" => "/admin/customer/servicehistory?serviceinfo_uid={$viewDatas['entity']->getPK()}", @@ -176,7 +176,7 @@ class ServiceHelper extends CustomerHelper ); break; default: - $action = parent::getListButton($action, $viewDatas, $extras); + $action = parent::getListButton($action, $label, $viewDatas, $extras); break; } return $action; diff --git a/app/Helpers/Customer/ServicePaymentHelper.php b/app/Helpers/Customer/ServicePaymentHelper.php index 3251665..4c9dc92 100644 --- a/app/Helpers/Customer/ServicePaymentHelper.php +++ b/app/Helpers/Customer/ServicePaymentHelper.php @@ -35,7 +35,7 @@ class ServicePaymentHelper extends CustomerHelper } return $value; } - public function getListButton(string $action, array $viewDatas, array $extras = []): string + public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string { switch ($action) { case 'invoice': @@ -49,11 +49,11 @@ class ServicePaymentHelper extends CustomerHelper if ($viewDatas['entity']->getStatus() !== DEFAULTS['STATUS']) { $action = ""; } else { - $action = parent::getListButton($action, $viewDatas, $extras); + $action = parent::getListButton($action, $label, $viewDatas, $extras); } break; default: - $action = parent::getListButton($action, $viewDatas, $extras); + $action = parent::getListButton($action, $label, $viewDatas, $extras); break; } return $action; diff --git a/app/Helpers/HomeHelper.php b/app/Helpers/HomeHelper.php index 6cc11ee..a9a9cae 100644 --- a/app/Helpers/HomeHelper.php +++ b/app/Helpers/HomeHelper.php @@ -63,13 +63,13 @@ class HomeHelper extends CommonHelper } return $value; } - public function getListButton(string $action, array $viewDatas, array $extras = []): string + public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string { switch ($action) { case 'new_service_view': $extras = ["class" => "btn btn-outline btn-light btn-circle", "target" => "_self", ...$extras]; $action = form_label( - array_key_exists('label', $extras) ? $extras['label'] : ICONS['SEARCH'], + $label ? $label : ICONS['SEARCH'], $action, [ "data-src" => '/admin/customer/service/view/' . $viewDatas['entity']->getPK(), @@ -80,7 +80,7 @@ class HomeHelper extends CommonHelper ); break; default: - $action = parent::getListButton($action, $viewDatas, $extras); + $action = parent::getListButton($action, $label, $viewDatas, $extras); break; } return $action; diff --git a/app/Helpers/MyLogHelper.php b/app/Helpers/MyLogHelper.php index ce3d1ab..0194b2f 100644 --- a/app/Helpers/MyLogHelper.php +++ b/app/Helpers/MyLogHelper.php @@ -33,7 +33,7 @@ class MyLogHelper extends CommonHelper } return $value; } - public function getListButton(string $action, array $viewDatas, array $extras = []): string + public function getListButton(string $action, string $label, array $viewDatas, array $extras = []): string { switch ($action) { case 'create': @@ -52,7 +52,7 @@ class MyLogHelper extends CommonHelper $action = ""; break; default: - $action = parent::getListButton($action, $viewDatas, $extras); + $action = parent::getListButton($action, $label, $viewDatas, $extras); break; } return $action; diff --git a/app/Views/admin/client/index.php b/app/Views/admin/client/index.php index d8f3bd5..b3ae969 100644 --- a/app/Views/admin/client/index.php +++ b/app/Views/admin/client/index.php @@ -23,7 +23,7 @@ 번호 - getListLabel($field, $viewDatas) ?> + getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?> 작업 @@ -34,14 +34,14 @@ getListRowColor($entity) ?>> - getListButton('modify', $viewDatas) ?> + getListButton('modify', '', $viewDatas) ?> getFieldView($field, $entity->$field, $viewDatas) ?> getListButton('view', $viewDatas) ?>  - getListButton('history', $viewDatas) ?>  - getListButton('delete', $viewDatas) ?> + getListButton('history', '', $viewDatas) ?>  + getListButton('delete', '', $viewDatas) ?> diff --git a/app/Views/admin/create_form.php b/app/Views/admin/create_form.php index c12faa0..71f4d8b 100644 --- a/app/Views/admin/create_form.php +++ b/app/Views/admin/create_form.php @@ -8,7 +8,7 @@ - + - + @@ -34,13 +34,13 @@ getListRowColor($entity) ?>> - + diff --git a/app/Views/admin/modify_form.php b/app/Views/admin/modify_form.php index b91659f..0910edd 100644 --- a/app/Views/admin/modify_form.php +++ b/app/Views/admin/modify_form.php @@ -8,7 +8,7 @@
getFieldLabel($field, $viewDatas) ?>getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?> getFieldForm($field, old($field) ?? ($viewDatas[$field] ?? null), $viewDatas) ?> diff --git a/app/Views/admin/index.php b/app/Views/admin/index.php index 041f35d..de45d0f 100644 --- a/app/Views/admin/index.php +++ b/app/Views/admin/index.php @@ -23,7 +23,7 @@
번호 getListLabel($field, $viewDatas) ?>getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?> 작업
getListButton('modify', $viewDatas) ?>getListButton('modify', '', $viewDatas) ?> getFieldView($field, $entity->$field, $viewDatas) ?> - getListButton('view', $viewDatas) ?>  - getListButton('delete', $viewDatas) ?> + getListButton('view', '', $viewDatas) ?>  + getListButton('delete', '', $viewDatas) ?>
- + - + @@ -34,13 +34,13 @@ getListRowColor($entity) ?>> - + @@ -53,8 +53,8 @@ getFieldForm($field, null, $viewDatas, ['data-batchjob' => 'true']) ?>  - - + +
diff --git a/app/Views/admin/popup/index.php b/app/Views/admin/popup/index.php index 32ce989..af9b7d3 100644 --- a/app/Views/admin/popup/index.php +++ b/app/Views/admin/popup/index.php @@ -29,7 +29,7 @@ - + @@ -40,13 +40,13 @@ getListRowColor($entity) ?>> - + diff --git a/app/Views/admin/service/index.php b/app/Views/admin/service/index.php index e160592..30c6182 100644 --- a/app/Views/admin/service/index.php +++ b/app/Views/admin/service/index.php @@ -23,7 +23,7 @@ - + @@ -34,14 +34,14 @@ getListRowColor($entity) ?>> - + @@ -49,7 +49,7 @@
getFieldLabel($field, $viewDatas) ?>getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?> getFieldForm($field, old($field) ?? $viewDatas['entity']->$field ?? null, $viewDatas) ?>
diff --git a/app/Views/admin/payment/index.php b/app/Views/admin/payment/index.php index 800547d..4cd4848 100644 --- a/app/Views/admin/payment/index.php +++ b/app/Views/admin/payment/index.php @@ -23,7 +23,7 @@
번호 getListLabel($field, $viewDatas) ?>getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?> 작업
getListButton('modify', $viewDatas) ?>getListButton('modify', '', $viewDatas) ?> getFieldView($field, $entity->$field, $viewDatas) ?> - getListButton('view', $viewDatas) ?>  - getListButton('delete', $viewDatas) ?> + getListButton('view', '', $viewDatas) ?>  + getListButton('delete', '', $viewDatas) ?>
번호 getListLabel($field, $viewDatas) ?>getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?> 작업
getListButton('modify', $viewDatas) ?>getListButton('modify', '', $viewDatas) ?> getFieldView($field, $entity->$field, $viewDatas) ?> - getListButton('view', $viewDatas) ?>  - getListButton('delete', $viewDatas) ?> + getListButton('view', '', $viewDatas) ?>  + getListButton('delete', '', $viewDatas) ?>
번호 getListLabel($field, $viewDatas) ?>getListLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?> 작업
getListButton('modify', $viewDatas) ?>getListButton('modify', '', $viewDatas) ?> getFieldView($field, $entity->$field, $viewDatas) ?> - getListButton('view', $viewDatas) ?>  - getListButton('history', $viewDatas) ?>  - getListButton('delete', $viewDatas) ?> + getListButton('view', '', $viewDatas) ?>  + getListButton('history', '', $viewDatas) ?>  + getListButton('delete', '', $viewDatas) ?>
$label): ?> - + diff --git a/app/Views/admin/service/view.php b/app/Views/admin/service/view.php index 204d206..3a9981d 100644 --- a/app/Views/admin/service/view.php +++ b/app/Views/admin/service/view.php @@ -9,14 +9,14 @@ - +
getFieldLabel($item_type, $viewDatas) ?>getFieldLabel($item_type, $label, $viewDatas) ?>
getFieldLabel($field, $viewDatas) ?>getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?> getFieldView($field, $viewDatas['entity']->$field, $viewDatas) ?> $label): ?> - + diff --git a/app/Views/admin/view.php b/app/Views/admin/view.php index cb2821e..88610c8 100644 --- a/app/Views/admin/view.php +++ b/app/Views/admin/view.php @@ -7,7 +7,7 @@
getFieldLabel($item_type, $viewDatas) ?>getFieldLabel($item_type, $label, $viewDatas) ?> getFieldView($item_type, $viewDatas['entity']->$item_type, $viewDatas) ?>
- + diff --git a/app/Views/templates/admin/index_content_bottom.php b/app/Views/templates/admin/index_content_bottom.php index 3f6c151..b03b379 100644 --- a/app/Views/templates/admin/index_content_bottom.php +++ b/app/Views/templates/admin/index_content_bottom.php @@ -1,12 +1,12 @@
diff --git a/app/Views/templates/admin/welcome_new.php b/app/Views/templates/admin/welcome_new.php index c5bc7aa..f429008 100644 --- a/app/Views/templates/admin/welcome_new.php +++ b/app/Views/templates/admin/welcome_new.php @@ -25,7 +25,7 @@ - +
getFieldLabel($field, $viewDatas) ?>getFieldLabel($field, lang("{$viewDatas['class_path']}.label.{$field}"), $viewDatas) ?> getFieldView($field, $viewDatas['entity']->$field, $viewDatas) ?>
getListButton('new_service_view', $viewDatas, ['label' => $entity->getTitle()]) ?>getListButton('new_service_view', '', $viewDatas, ['label' => $entity->getTitle()]) ?> getFieldView('ownerinfo_uid', $entity->getOwnerUID(), $viewDatas) ?> getFieldView('type', $entity->getType(), $viewDatas) ?> getFieldView('switchinfo_uid', $entity->getSwitchUID(), $viewDatas) ?>