diff --git a/.github/dev_bug_report.md b/.github/dev_bug_report.md deleted file mode 100755 index ef93e56..0000000 --- a/.github/dev_bug_report.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -name: Dev Bug Report -about: Create a report to help us improve -title: '' -labels: stat_backlog, type_bug -assignees: '' - ---- - -# Bug Description -A clear and concise description of what the bug is. - -# How to Reproduce - -Steps to reproduce the behavior: - -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -## Minimal Code Example - -``` -// your code ... -``` - -# Expected Behavior -A clear and concise description of what you expected to happen. - -# Screenshots -If applicable, add screenshots to help explain your problem. - -# Additional Information -Add any other context about the problem here. diff --git a/.github/dev_feature_request.md b/.github/dev_feature_request.md deleted file mode 100755 index 9573c35..0000000 --- a/.github/dev_feature_request.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Dev Feature Request -about: Suggest an idea for this project -title: '' -labels: stat_backlog, type_feature -assignees: '' - ---- - -# What is the feature you request -* A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -* A clear and concise description of what you want to happen. - -# Alternatives -A clear and concise description of any alternative solutions or features you've considered. - -# Additional Information -Add any other context or screenshots about the feature request here. diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index c325900..506b025 100755 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -19,7 +19,7 @@ "type": 2, "subtype": 1, "name": "Vehicles", - "uri": "{/base}/fleet/vehicle/list", + "uri": "{/base}/fleet/vehicle/list?{?}", "target": "self", "icon": null, "order": 1, @@ -33,7 +33,7 @@ "type": 3, "subtype": 1, "name": "List", - "uri": "{/base}/fleet/vehicle/list", + "uri": "{/base}/fleet/vehicle/list?{?}", "target": "self", "icon": null, "order": 1, @@ -65,7 +65,7 @@ "type": 2, "subtype": 1, "name": "Drivers", - "uri": "{/base}/fleet/driver/list", + "uri": "{/base}/fleet/driver/list?{?}", "target": "self", "icon": null, "order": 1, @@ -79,7 +79,7 @@ "type": 3, "subtype": 1, "name": "List", - "uri": "{/base}/fleet/driver/list", + "uri": "{/base}/fleet/driver/list?{?}", "target": "self", "icon": null, "order": 1, @@ -111,7 +111,7 @@ "type": 2, "subtype": 1, "name": "Inspections", - "uri": "{/base}/fleet/inspection/list", + "uri": "{/base}/fleet/inspection/list?{?}", "target": "self", "icon": null, "order": 1, @@ -125,7 +125,7 @@ "type": 3, "subtype": 1, "name": "List", - "uri": "{/base}/fleet/inspection/list", + "uri": "{/base}/fleet/inspection/list?{?}", "target": "self", "icon": null, "order": 1, @@ -148,6 +148,21 @@ "permission": { "permission": 4, "category": null, "element": null }, "parent": 1003504001, "children": [] + }, + { + "id": 1003504301, + "pid": "/fleet/inspection", + "type": 3, + "subtype": 1, + "name": "DriverInspectionTypes", + "uri": "{/base}/fleet/inspection/type/list?{?}", + "target": "self", + "icon": null, + "order": 5, + "from": "FleetManagement", + "permission": { "permission": 4, "category": null, "element": null }, + "parent": 1003504001, + "children": [] } ] }, diff --git a/Admin/Installer.php b/Admin/Installer.php index 597acd4..5d6f0b8 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -125,7 +125,7 @@ final class Installer extends InstallerAbstract $fuelTypes = []; /** @var \Modules\FleetManagement\Controller\ApiVehicleController $module */ - $module = $app->moduleManager->getModuleInstance('FleetManagement', 'ApiVehicle'); + $module = $app->moduleManager->get('FleetManagement', 'ApiVehicle'); /** @var array $type */ foreach ($types as $type) { @@ -186,7 +186,7 @@ final class Installer extends InstallerAbstract $vehicleTypes = []; /** @var \Modules\FleetManagement\Controller\ApiVehicleController $module */ - $module = $app->moduleManager->getModuleInstance('FleetManagement', 'ApiVehicle'); + $module = $app->moduleManager->get('FleetManagement', 'ApiVehicle'); /** @var array $type */ foreach ($types as $type) { @@ -247,7 +247,7 @@ final class Installer extends InstallerAbstract $inspectionTypes = []; /** @var \Modules\FleetManagement\Controller\ApiVehicleController $module */ - $module = $app->moduleManager->getModuleInstance('FleetManagement', 'ApiVehicle'); + $module = $app->moduleManager->get('FleetManagement', 'ApiVehicle'); /** @var array $type */ foreach ($types as $type) { @@ -308,7 +308,7 @@ final class Installer extends InstallerAbstract $inspectionTypes = []; /** @var \Modules\FleetManagement\Controller\ApiDriverController $module */ - $module = $app->moduleManager->getModuleInstance('FleetManagement', 'ApiDriver'); + $module = $app->moduleManager->get('FleetManagement', 'ApiDriver'); /** @var array $type */ foreach ($types as $type) { @@ -369,7 +369,7 @@ final class Installer extends InstallerAbstract $itemAttrType = []; /** @var \Modules\FleetManagement\Controller\ApiVehicleAttributeController $module */ - $module = $app->moduleManager->getModuleInstance('FleetManagement', 'ApiVehicleAttribute'); + $module = $app->moduleManager->get('FleetManagement', 'ApiVehicleAttribute'); /** @var array $attribute */ foreach ($attributes as $attribute) { @@ -437,7 +437,7 @@ final class Installer extends InstallerAbstract $itemAttrValue = []; /** @var \Modules\FleetManagement\Controller\ApiVehicleAttributeController $module */ - $module = $app->moduleManager->getModuleInstance('FleetManagement', 'ApiVehicleAttribute'); + $module = $app->moduleManager->get('FleetManagement', 'ApiVehicleAttribute'); foreach ($attributes as $attribute) { $itemAttrValue[$attribute['name']] = []; @@ -510,7 +510,7 @@ final class Installer extends InstallerAbstract $itemAttrType = []; /** @var \Modules\FleetManagement\Controller\ApiDriverAttributeController $module */ - $module = $app->moduleManager->getModuleInstance('FleetManagement', 'ApiDriverAttribute'); + $module = $app->moduleManager->get('FleetManagement', 'ApiDriverAttribute'); /** @var array $attribute */ foreach ($attributes as $attribute) { @@ -578,7 +578,7 @@ final class Installer extends InstallerAbstract $itemAttrValue = []; /** @var \Modules\FleetManagement\Controller\ApiDriverAttributeController $module */ - $module = $app->moduleManager->getModuleInstance('FleetManagement', 'ApiDriverAttribute'); + $module = $app->moduleManager->get('FleetManagement', 'ApiDriverAttribute'); foreach ($attributes as $attribute) { $itemAttrValue[$attribute['name']] = []; diff --git a/Controller/BackendController.php b/Controller/BackendController.php index dcd1e43..3284e15 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -20,6 +20,7 @@ use Modules\FleetManagement\Models\Attribute\VehicleAttributeTypeMapper; use Modules\FleetManagement\Models\Driver\DriverInspectionMapper; use Modules\FleetManagement\Models\Driver\DriverMapper; use Modules\FleetManagement\Models\InspectionMapper; +use Modules\FleetManagement\Models\InspectionTypeMapper; use Modules\FleetManagement\Models\VehicleMapper; use Modules\FleetManagement\Models\VehicleTypeMapper; use Modules\Media\Models\MediaMapper; @@ -177,7 +178,7 @@ final class BackendController extends Controller $view = new View($this->app->l11nManager, $request, $response); $view->setTemplate('/Modules/FleetManagement/Theme/Backend/inspection-list'); - $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003502001, $request, $response); + $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003501001, $request, $response); $list = InspectionMapper::getAll() ->sort('id', 'DESC') @@ -204,10 +205,10 @@ final class BackendController extends Controller { $view = new View($this->app->l11nManager, $request, $response); - $view->setTemplate('/Modules/FleetManagement/Theme/Backend/inspection-list'); + $view->setTemplate('/Modules/FleetManagement/Theme/Backend/inspection-type-list'); $view->data['nav'] = $this->app->moduleManager->get('Navigation')->createNavigationMid(1003502001, $request, $response); - $list = InspectionMapper::getAll() + $list = InspectionTypeMapper::getAll() ->sort('id', 'DESC') ->execute(); diff --git a/Theme/Backend/driver-profile.tpl.php b/Theme/Backend/driver-profile.tpl.php index 9e012ec..a1ce416 100644 --- a/Theme/Backend/driver-profile.tpl.php +++ b/Theme/Backend/driver-profile.tpl.php @@ -242,8 +242,8 @@ echo $this->data['nav']->render();