diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index adb8716..75cb759 100755 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -9,5 +9,5 @@ jobs: - uses: actions/first-interaction@v1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - issue-message: 'Thank you for createing this issue. We will check it as soon as possible.' + issue-message: 'Thank you for creating this issue. We will check it as soon as possible.' pr-message: 'Thank you for your pull request. We will check it as soon as possible.' diff --git a/Admin/Installer.php b/Admin/Installer.php index e2afccc..2c6c2da 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -46,8 +46,6 @@ final class Installer extends InstallerAbstract { parent::install($app, $info, $cfgHandler); - self::createDefaultStock($app); - /* Stock types */ $fileContent = \file_get_contents(__DIR__ . '/Install/types.json'); if ($fileContent === false) { @@ -61,6 +59,8 @@ final class Installer extends InstallerAbstract } self::createStockTypes($app, $types); + + self::createDefaultStock($app); } /** diff --git a/Controller/ApiController.php b/Controller/ApiController.php index f993fef..aa79e14 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -188,7 +188,8 @@ final class ApiController extends Controller $location->name = $request->getDataString('name') ?? ''; $location->stock = new NullStock($request->getDataInt('stock') ?? 1); - $location->type = $request->hasData('type') ? new NullStockType((int) $request->getDataInt('type')) : null; + // @todo Define default type instead of just 1 + $location->type = new NullStockType($request->getDataInt('type') ?? 1); return $location; } diff --git a/Theme/Backend/Lang/de.lang.php b/Theme/Backend/Lang/de.lang.php index 5e7f755..b3a53fd 100755 --- a/Theme/Backend/Lang/de.lang.php +++ b/Theme/Backend/Lang/de.lang.php @@ -21,4 +21,6 @@ return ['WarehouseManagement' => [ 'Shelf' => 'Fach', 'Type' => 'Typ', 'Location' => 'Lagerplatz', + 'Quantity' => 'Menge', + 'All' => 'Alle', ]]; diff --git a/Theme/Backend/Lang/en.lang.php b/Theme/Backend/Lang/en.lang.php index 96d91d8..c5e22c1 100755 --- a/Theme/Backend/Lang/en.lang.php +++ b/Theme/Backend/Lang/en.lang.php @@ -21,4 +21,6 @@ return ['WarehouseManagement' => [ 'Shelf' => 'Shelf', 'Type' => 'Type', 'Location' => 'Location', + 'Quantity' => 'Quantity', + 'All' => 'All', ]]; diff --git a/Theme/Backend/stock-list.tpl.php b/Theme/Backend/stock-list.tpl.php index cdcbc71..1084afb 100755 --- a/Theme/Backend/stock-list.tpl.php +++ b/Theme/Backend/stock-list.tpl.php @@ -20,7 +20,7 @@ echo $this->data['nav']->render(); ?>