diff --git a/app/Cells/BoardCell.php b/app/Cells/BoardCell.php index 7bba4ee..e20ec0a 100644 --- a/app/Cells/BoardCell.php +++ b/app/Cells/BoardCell.php @@ -18,7 +18,7 @@ class BoardCell extends BaseCell $viewDatas['currentCategory'] = $this->getCategoryModel()->getEntity([$this->getCategoryModel()->getPrimaryKey() => __FUNCTION__]); $viewDatas['cellDatas'] = array(); $viewDatas['cellDatas']['entitys'] = $this->getBoardModel()->getEntitys([ - 'category_uid' => __FUNCTION__ + 'category' => __FUNCTION__ ]); return view( 'Views/front/board/cell/' . __FUNCTION__, diff --git a/app/Config/Constants.php b/app/Config/Constants.php index 97b7787..18c2b5f 100644 --- a/app/Config/Constants.php +++ b/app/Config/Constants.php @@ -238,6 +238,7 @@ define('CLASS_ICONS', [ 'SITEPAGE' => '', 'CATEGORY' => '', 'PRODUCT' => '', + 'DEVICE' => '', 'ORDER' => '', 'BILLING' => '', 'CART' => '', diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 4bc1331..c8c4912 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -103,6 +103,18 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au $routes->get('toggle/(:num)/(:hash)', 'SitepageController::toggle/$1/$2'); $routes->post('batchjob', 'SitepageController::batchjob'); }); + $routes->group('device', static function ($routes) { + $routes->get('', 'DeviceController::index'); + $routes->get('excel', 'DeviceController::excel'); + $routes->get('insert', 'DeviceController::insert_form'); + $routes->post('insert', 'DeviceController::insert'); + $routes->get('update/(:uuid)', 'DeviceController::update_form/$1'); + $routes->post('update/(:uuid)', 'DeviceController::update/$1'); + $routes->get('view/(:uuid)', 'DeviceController::view/$1'); + $routes->get('delete/(:uuid)', 'DeviceController::delete/$1', ['filter' => 'authFilter:master']); + $routes->get('toggle/(:uuid)/(:hash)', 'DeviceController::toggle/$1/$2'); + $routes->post('batchjob', 'DeviceController::batchjob'); + }); $routes->group('product', static function ($routes) { $routes->get('', 'ProductController::index'); $routes->get('excel', 'ProductController::excel'); diff --git a/app/Controllers/Admin/BoardController.php b/app/Controllers/Admin/BoardController.php index dfe7d1d..758bccf 100644 --- a/app/Controllers/Admin/BoardController.php +++ b/app/Controllers/Admin/BoardController.php @@ -25,14 +25,14 @@ class BoardController extends AdminController public function getFields(string $action = ""): array { - $fields = ["category_uid", 'title', "board_file", "passwd", "status", "content"]; + $fields = ["category", 'title', "board_file", "passwd", "status", "content"]; switch ($action) { case "index": case "excel": - return ["category_uid", "user_uid", 'title', "board_file", "view_cnt", "status", "created_at"]; + return ["category", "user_uid", 'title', "board_file", "view_cnt", "status", "created_at"]; break; case "view": - return ["category_uid", "user_uid", 'title', "board_file", "view_cnt", "status", "created_at", "content"]; + return ["category", "user_uid", 'title', "board_file", "view_cnt", "status", "created_at", "content"]; break; default: return $fields; @@ -41,7 +41,7 @@ class BoardController extends AdminController } public function getFieldFilters(): array { - return ["category_uid", "user_uid", "status"]; + return ["category", "user_uid", "status"]; } public function getFieldBatchFilters(): array { @@ -66,7 +66,7 @@ class BoardController extends AdminController private function build_notice() { - $entitys = $this->_model->getEntitys(['category_uid' => $this->_category_notice, 'status' => DEFAULTS['STATUS']]); + $entitys = $this->_model->getEntitys(['category' => $this->_category_notice, 'status' => DEFAULTS['STATUS']]); $temps = array("