diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index c324459..3fdeb6b 100644 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -12,6 +12,53 @@ "from": "QualityManagement", "permission": { "permission": 2, "type": null, "element": null }, "parent": 0, + "children": [ + { + "id": 1008502001, + "pid": "/", + "type": 2, + "subtype": 1, + "name": "Reports", + "uri": "{/base}/qualitymanagement/report/list?{?}", + "target": "self", + "icon": null, + "order": 5, + "from": "QualityManagement", + "permission": { "permission": 2, "category": null, "element": null }, + "parent": 1008501001, + "children": [ + { + "id": 1008502002, + "pid": "/qualitymanagement", + "type": 3, + "subtype": 1, + "name": "List", + "uri": "{/base}/qualitymanagement/report/list?{?}", + "target": "self", + "icon": null, + "order": 1, + "from": "QualityManagement", + "permission": { "permission": 2, "category": null, "element": null }, + "parent": 1008502001, + "children": [] + } + ] + } + ] + }, + { + "id": 1008503001, + "pid": "/", + "type": 2, + "subtype": 1, + "name": "QualityReport", + "uri": "{/base}/private/qualitymanagement/dashboard?{?}", + "target": "self", + "icon": null, + "order": 1, + "from": "QualityManagement", + "permission": { "permission": 2, "type": 2, "element": null }, + "parent": 1003401001, "children": [] } ] diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index f0b60b4..f8b3c10 100644 --- a/Admin/Routes/Web/Backend.php +++ b/Admin/Routes/Web/Backend.php @@ -1,3 +1,88 @@ - [ + [ + 'dest' => '\Modules\QualityManagement\Controller\BackendController:viewReportDashboard', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::READ, + 'state' => PermissionCategory::REPORT_DASHBOARD, + ], + ], + ], + '^.*/qualitymanagement/report/view.*$' => [ + [ + 'dest' => '\Modules\QualityManagement\Controller\BackendController:viewQualityReport', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::READ, + 'state' => PermissionCategory::QUALITY_REPORT, + ], + ], + ], + '^.*/qualitymanagement/audit/list.*$' => [ + [ + 'dest' => '\Modules\QualityManagement\Controller\BackendController:viewAuditList', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::READ, + 'state' => PermissionCategory::AUDIT_REPORT, + ], + ], + ], + '^.*/qualitymanagement/audit/view.*$' => [ + [ + 'dest' => '\Modules\QualityManagement\Controller\BackendController:viewQuality', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::READ, + 'state' => PermissionCategory::QUALITY_REPORT, + ], + ], + ], + + '^.*/private/qualitymanagement/dashboard.*$' => [ + [ + 'dest' => '\Modules\QualityManagement\Controller\BackendController:viewPrivateReportDashboard', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::READ, + 'state' => PermissionCategory::PRIVATE_DASHBOARD, + ], + ], + ], + '^.*/private/qualitymanagement/report.*$' => [ + [ + 'dest' => '\Modules\QualityManagement\Controller\BackendController:viewPrivateReport', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => BackendController::NAME, + 'type' => PermissionType::READ, + 'state' => PermissionCategory::PRIVATE_DASHBOARD, + ], + ], + ], +]; diff --git a/Models/PermissionCategory.php b/Models/PermissionCategory.php new file mode 100644 index 0000000..631eba5 --- /dev/null +++ b/Models/PermissionCategory.php @@ -0,0 +1,36 @@ + [ - 'QualityManagement' => '', + 'QualityManagement' => 'Qualitätsmanagement', + 'Reports' => 'Berichte', + 'QualityReport' => 'Qualitätsbericht', ]]; diff --git a/Theme/Backend/Lang/Navigation.en.lang.php b/Theme/Backend/Lang/Navigation.en.lang.php index 581951e..a2ba09e 100644 --- a/Theme/Backend/Lang/Navigation.en.lang.php +++ b/Theme/Backend/Lang/Navigation.en.lang.php @@ -14,4 +14,6 @@ declare(strict_types=1); return ['Navigation' => [ 'QualityManagement' => 'Quality Management', + 'Reports' => 'Reports', + 'QualityReport' => 'Quality Report', ]]; diff --git a/info.json b/info.json index 13c8daf..8db65ca 100644 --- a/info.json +++ b/info.json @@ -14,7 +14,6 @@ "name": "Jingga", "website": "jingga.app" }, - "description": "The administration module.", "directory": "QualityManagement", "dependencies": { "Admin": "1.0.0",