From e9ee5ec255b95ef1d93841e28e118085b85b24d6 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 28 Feb 2024 05:09:13 +0000 Subject: [PATCH] bump --- .github/dev_bug_report.md | 35 --------------------------- .github/dev_feature_request.md | 18 -------------- Admin/Install/Navigation.install.json | 8 +++--- Admin/Installer.php | 6 ++--- Models/StockMapper.php | 8 ++++++ Theme/Backend/stock-type-view.tpl.php | 4 +-- 6 files changed, 17 insertions(+), 62 deletions(-) delete mode 100755 .github/dev_bug_report.md delete mode 100755 .github/dev_feature_request.md 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 13239fa..a4c8bf1 100755 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -19,7 +19,7 @@ "type": 2, "subtype": 1, "name": "Stock", - "uri": "{/base}/warehouse/stock/list", + "uri": "{/base}/warehouse/stock/list?{?}", "target": "self", "icon": null, "order": 1, @@ -33,7 +33,7 @@ "type": 3, "subtype": 1, "name": "Stocks", - "uri": "{/base}/warehouse/stock/list", + "uri": "{/base}/warehouse/stock/list?{?}", "target": "self", "icon": null, "order": 1, @@ -48,7 +48,7 @@ "type": 3, "subtype": 1, "name": "Locations", - "uri": "{/base}/warehouse/stock/location/list", + "uri": "{/base}/warehouse/stock/location/list?{?}", "target": "self", "icon": null, "order": 5, @@ -63,7 +63,7 @@ "type": 3, "subtype": 1, "name": "Types", - "uri": "{/base}/warehouse/stock/type/list", + "uri": "{/base}/warehouse/stock/type/list?{?}", "target": "self", "icon": null, "order": 10, diff --git a/Admin/Installer.php b/Admin/Installer.php index 3f2aaf8..9e24ff3 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -73,7 +73,7 @@ final class Installer extends InstallerAbstract private static function createDefaultStock(ApplicationAbstract $app) : void { /** @var \Modules\WarehouseManagement\Controller\ApiController $module */ - $module = $app->moduleManager->getModuleInstance('WarehouseManagement', 'Api'); + $module = $app->moduleManager->get('WarehouseManagement', 'Api'); $response = new HttpResponse(); $request = new HttpRequest(); @@ -100,7 +100,7 @@ final class Installer extends InstallerAbstract $stockTypes = []; /** @var \Modules\WarehouseManagement\Controller\ApiStockTypeController $module */ - $module = $app->moduleManager->getModuleInstance('WarehouseManagement', 'ApiStockType'); + $module = $app->moduleManager->get('WarehouseManagement', 'ApiStockType'); foreach ($types as $type) { $response = new HttpResponse(); @@ -159,7 +159,7 @@ final class Installer extends InstallerAbstract public static function personalStock(ApplicationAbstract $app, string $type) : void { /** @var \Modules\WarehouseManagement\Controller\ApiController $module */ - $module = $app->moduleManager->getModuleInstance('WarehouseManagement', 'Api'); + $module = $app->moduleManager->get('WarehouseManagement', 'Api'); $mapper = $type === 'client' ? \Modules\ClientManagement\Models\ClientMapper::class diff --git a/Models/StockMapper.php b/Models/StockMapper.php index 47be062..f8be1de 100755 --- a/Models/StockMapper.php +++ b/Models/StockMapper.php @@ -103,6 +103,14 @@ final class StockMapper extends DataMapperFactory $reserved = []; $ordered = []; + if (empty($items)) { + return [ + 'dists' => $dists, + 'reserved' => $reserved, + 'ordered' => $ordered, + ]; + } + $itemIdsString = \implode(',', $items); // @todo only select sales stock. Therefore we need a place to define the sales stock(s) diff --git a/Theme/Backend/stock-type-view.tpl.php b/Theme/Backend/stock-type-view.tpl.php index 5561fb2..eaadc64 100644 --- a/Theme/Backend/stock-type-view.tpl.php +++ b/Theme/Backend/stock-type-view.tpl.php @@ -50,7 +50,7 @@ echo $this->data['nav']->render(); settings - + @@ -70,7 +70,7 @@ echo $this->data['nav']->render(); settings type->isRequired) : ?> - +