diff --git a/app/Cells/Equipment/PartCell.php b/app/Cells/Equipment/PartCell.php
new file mode 100644
index 0000000..737de66
--- /dev/null
+++ b/app/Cells/Equipment/PartCell.php
@@ -0,0 +1,31 @@
+getService()->setAction(__FUNCTION__);
+ $this->getService()->setFormFields();
+ $this->getService()->setFormFilters();
+ $this->getService()->setFormRules();
+ $this->getService()->setFormOptions();
+ $types = array_key_exists('types', $params) ? $params['types'] : SERVERPART['STOCK_PARTTYPES'];
+ $template = array_key_exists('template', $params) ? $params['template'] : __FUNCTION__;
+ return view('cells/part/' . $template, [
+ 'partCellDatas' => [
+ 'control' => $this->getService()->getControlDatas(),
+ 'service' => $this->getService(),
+ 'entities' => $this->getService()->getEntities("type IN (" . "'" . implode("','", $types) . "'" . ")"),
+ ],
+ ]);
+ }
+}
diff --git a/app/Config/Constants.php b/app/Config/Constants.php
index 3a1bfec..1c08264 100644
--- a/app/Config/Constants.php
+++ b/app/Config/Constants.php
@@ -404,6 +404,7 @@ define("SERVICE", [
//서버파트 관련
define("SERVERPART", [
"CNT_RANGE" => array_combine(range(1, 10), range(1, 10)),
+ "STOCK_PARTTYPES" => ['CPU', 'RAM', 'DISK'],
"SERVER_PARTTYPES" => ['CPU', 'RAM', 'DISK', 'ETC'],
"SERVICE_PARTTYPES" => ['SWITCH', 'IP', 'OS', 'SOFTWARE', 'CS', 'ETC'],
"ALL_PARTTYPES" => ['CPU', 'RAM', 'DISK', 'OS', 'DB', 'SOFTWARE', 'SWITCH', 'IP', 'CS', 'ETC'],
diff --git a/app/Services/CommonService.php b/app/Services/CommonService.php
index ae661c3..6f3d6f2 100644
--- a/app/Services/CommonService.php
+++ b/app/Services/CommonService.php
@@ -159,7 +159,7 @@ abstract class CommonService
return $this->getEntity_process($entity);
} catch (\Exception $e) {
$message = sprintf(
- "\n------%s SQL오류-----
\n%s
\n%s
\n------------------------------\n",
+ "\n------%s SQL오류-----
\n%s\n%s\n------------------------------\n",
__FUNCTION__,
$this->getModel()->getLastQuery(),
$e->getMessage()
@@ -196,7 +196,7 @@ abstract class CommonService
return $entities;
} catch (\Exception $e) {
$message = sprintf(
- "\n------%s SQL오류-----
\n%s
\n%s
\n------------------------------\n",
+ "\n------%s SQL오류-----
\n%s\n%s\n------------------------------\n",
__FUNCTION__,
$this->getModel()->getLastQuery(),
$e->getMessage()
diff --git a/app/Views/admin/welcome/index.php b/app/Views/admin/welcome/index.php
index 68b1b85..80d94e2 100644
--- a/app/Views/admin/welcome/index.php
+++ b/app/Views/admin/welcome/index.php
@@ -15,11 +15,15 @@
= $this->include("{$viewDatas['layout']}/welcome/banner"); ?>
- = view_cell("\App\Cells\Customer\ServiceCell::totalCountDashboard") ?>>
+ = $this->include("{$viewDatas['layout']}/welcome/total_service"); ?>
= $this->include("{$viewDatas['layout']}/welcome/new_service"); ?>
= $this->include("{$viewDatas['layout']}/welcome/user_history"); ?>
+
+
+
+
= $this->include("{$viewDatas['layout']}/welcome/stock"); ?>
diff --git a/app/Views/admin/welcome/stock.php b/app/Views/admin/welcome/stock.php
index b8fcbd9..1b7ca7e 100644
--- a/app/Views/admin/welcome/stock.php
+++ b/app/Views/admin/welcome/stock.php
@@ -8,6 +8,6 @@
- 준비중....
+ = view_cell("\App\Cells\Equipment\PartCell::parttable", ['types' => SERVERPART['STOCK_PARTTYPES']]) ?>
\ No newline at end of file
diff --git a/app/Views/admin/welcome/total_service.php b/app/Views/admin/welcome/total_service.php
index 13e786d..10a7711 100644
--- a/app/Views/admin/welcome/total_service.php
+++ b/app/Views/admin/welcome/total_service.php
@@ -8,68 +8,6 @@
-
-
- | 고객명 |
- 일반 |
- 방어 |
- 전용 |
- 대체 |
- 테스트 |
- 합계 |
-
-
- | 도쿄 |
- 치바 |
- 도쿄 |
- 치바 |
- 도쿄 |
- 치바 |
- 도쿄 |
- 치바 |
- 도쿄 |
- 치바 |
- 합계 |
- 도쿄 |
- 치바 |
- 합계 |
-
- $label): ?>
-
- | = $label ?> |
- = $viewDatas['totalCounts'][$key]['normal']['tokyo'] ?> |
- = $viewDatas['totalCounts'][$key]['normal']['chiba'] ?> |
- = $viewDatas['totalCounts'][$key]['defence']['tokyo'] ?> |
- = $viewDatas['totalCounts'][$key]['defence']['chiba'] ?> |
- = $viewDatas['totalCounts'][$key]['dedicated']['tokyo'] ?> |
- = $viewDatas['totalCounts'][$key]['dedicated']['chiba'] ?> |
- = $viewDatas['totalCounts'][$key]['alternative']['tokyo'] ?> |
- = $viewDatas['totalCounts'][$key]['alternative']['chiba'] ?> |
- = $viewDatas['totalCounts'][$key]['test']['tokyo'] ?> |
- = $viewDatas['totalCounts'][$key]['test']['chiba'] ?> |
- = $viewDatas['totalCounts'][$key]['test']['summary'] ?> |
- = $viewDatas['totalCounts'][$key]['tokyo_summary'] ?> |
- = $viewDatas['totalCounts'][$key]['chiba_summary'] ?> |
- = $viewDatas['totalCounts'][$key]['all_summary'] ?> |
-
-
-
- | 총합계 |
- 0 |
- 0 |
- 0 |
- 0 |
- 0 |
- 0 |
- 0 |
- 0 |
- 0 |
- 0 |
- 0 |
- 0 |
- 0 |
- 0 |
-
-
+ = view_cell("\App\Cells\Customer\ServiceCell::totalCountDashboard") ?>
\ No newline at end of file
diff --git a/app/Views/cells/part/parttable.php b/app/Views/cells/part/parttable.php
new file mode 100644
index 0000000..d90548f
--- /dev/null
+++ b/app/Views/cells/part/parttable.php
@@ -0,0 +1,11 @@
+
+
+
+
+
+ | = $partCellDatas['service']->getHelper()->getFieldView($field, $entity->$field, $partCellDatas) ?> |
+
+
+
+
+
\ No newline at end of file
diff --git a/app/Views/cells/service/totalCountDashboard.php b/app/Views/cells/service/totalCountDashboard.php
index ced3be9..bc8e859 100644
--- a/app/Views/cells/service/totalCountDashboard.php
+++ b/app/Views/cells/service/totalCountDashboard.php
@@ -1,75 +1,63 @@
-
-
-
-
- | 고객명 |
- 일반 |
- 방어 |
- 전용 |
- 대체 |
- 테스트 |
- 합계 |
-
-
- | 도쿄 |
- 치바 |
- 도쿄 |
- 치바 |
- 도쿄 |
- 치바 |
- 도쿄 |
- 치바 |
- 도쿄 |
- 치바 |
- 합계 |
- 도쿄 |
- 치바 |
- 합계 |
-
- $label): ?>
-
- | = $label ?> |
- = $serviceCellDatas['totalCounts'][$key]['normal']['tokyo'] ?> |
- = $serviceCellDatas['totalCounts'][$key]['normal']['chiba'] ?> |
- = $serviceCellDatas['totalCounts'][$key]['defence']['tokyo'] ?> |
- = $serviceCellDatas['totalCounts'][$key]['defence']['chiba'] ?> |
- = $serviceCellDatas['totalCounts'][$key]['dedicated']['tokyo'] ?> |
- = $serviceCellDatas['totalCounts'][$key]['dedicated']['chiba'] ?> |
- = $serviceCellDatas['totalCounts'][$key]['alternative']['tokyo'] ?> |
- = $serviceCellDatas['totalCounts'][$key]['alternative']['chiba'] ?> |
- = $serviceCellDatas['totalCounts'][$key]['test']['tokyo'] ?> |
- = $serviceCellDatas['totalCounts'][$key]['test']['chiba'] ?> |
- = $serviceCellDatas['totalCounts'][$key]['test']['summary'] ?> |
- = $serviceCellDatas['totalCounts'][$key]['tokyo_summary'] ?> |
- = $serviceCellDatas['totalCounts'][$key]['chiba_summary'] ?> |
- = $serviceCellDatas['totalCounts'][$key]['all_summary'] ?> |
-
-
-
- | 총합계 |
- 0 |
- 0 |
- 0 |
- 0 |
- 0 |
- 0 |
- 0 |
- 0 |
- 0 |
- 0 |
- 0 |
- 0 |
- 0 |
- 0 |
-
-
-
-
\ No newline at end of file
+
+
+ | 고객명 |
+ 일반 |
+ 방어 |
+ 전용 |
+ 대체 |
+ 테스트 |
+ 합계 |
+
+
+ | 도쿄 |
+ 치바 |
+ 도쿄 |
+ 치바 |
+ 도쿄 |
+ 치바 |
+ 도쿄 |
+ 치바 |
+ 도쿄 |
+ 치바 |
+ 합계 |
+ 도쿄 |
+ 치바 |
+ 합계 |
+
+ $label): ?>
+
+ | = $label ?> |
+ = $serviceCellDatas['totalCounts'][$key]['normal']['tokyo'] ?> |
+ = $serviceCellDatas['totalCounts'][$key]['normal']['chiba'] ?> |
+ = $serviceCellDatas['totalCounts'][$key]['defence']['tokyo'] ?> |
+ = $serviceCellDatas['totalCounts'][$key]['defence']['chiba'] ?> |
+ = $serviceCellDatas['totalCounts'][$key]['dedicated']['tokyo'] ?> |
+ = $serviceCellDatas['totalCounts'][$key]['dedicated']['chiba'] ?> |
+ = $serviceCellDatas['totalCounts'][$key]['alternative']['tokyo'] ?> |
+ = $serviceCellDatas['totalCounts'][$key]['alternative']['chiba'] ?> |
+ = $serviceCellDatas['totalCounts'][$key]['test']['tokyo'] ?> |
+ = $serviceCellDatas['totalCounts'][$key]['test']['chiba'] ?> |
+ = $serviceCellDatas['totalCounts'][$key]['test']['summary'] ?> |
+ = $serviceCellDatas['totalCounts'][$key]['tokyo_summary'] ?> |
+ = $serviceCellDatas['totalCounts'][$key]['chiba_summary'] ?> |
+ = $serviceCellDatas['totalCounts'][$key]['all_summary'] ?> |
+
+
+
+ | 총합계 |
+ 0 |
+ 0 |
+ 0 |
+ 0 |
+ 0 |
+ 0 |
+ 0 |
+ 0 |
+ 0 |
+ 0 |
+ 0 |
+ 0 |
+ 0 |
+ 0 |
+
+
\ No newline at end of file