diff --git a/Admin/Routes/Web/Api.php b/Admin/Routes/Web/Api.php index 8237062..6461381 100644 --- a/Admin/Routes/Web/Api.php +++ b/Admin/Routes/Web/Api.php @@ -31,7 +31,31 @@ return [ ], ], ], - '^.*/supplier/attribute$' => [ + '^.*/supplier(\?.*|$)$' => [ + [ + 'dest' => '\Modules\SupplierManagement\Controller\ApiController:apiSupplierCreate', + 'verb' => RouteVerb::PUT, + 'csrf' => true, + 'active' => true, + 'permission' => [ + 'module' => ApiController::NAME, + 'type' => PermissionType::CREATE, + 'state' => PermissionCategory::SUPPLIER, + ], + ], + [ + 'dest' => '\Modules\SupplierManagement\Controller\ApiController:apiSupplierUpdate', + 'verb' => RouteVerb::SET, + 'csrf' => true, + 'active' => true, + 'permission' => [ + 'module' => ApiController::NAME, + 'type' => PermissionType::MODIFY, + 'state' => PermissionCategory::SUPPLIER, + ], + ], + ], + '^.*/supplier/attribute(\?.*|$)$' => [ [ 'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeCreate', 'verb' => RouteVerb::PUT, @@ -39,7 +63,7 @@ return [ 'active' => true, 'permission' => [ 'module' => ApiController::NAME, - 'type' => PermissionType::READ, + 'type' => PermissionType::CREATE, 'state' => PermissionCategory::SUPPLIER, ], ], @@ -50,12 +74,12 @@ return [ 'active' => true, 'permission' => [ 'module' => ApiController::NAME, - 'type' => PermissionType::READ, + 'type' => PermissionType::MODIFY, 'state' => PermissionCategory::SUPPLIER, ], ], ], - '^.*/supplier/attribute/type$' => [ + '^.*/supplier/attribute/type(\?.*|$)$' => [ [ 'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeTypeCreate', 'verb' => RouteVerb::PUT, @@ -64,7 +88,7 @@ return [ 'permission' => [ 'module' => ApiController::NAME, 'type' => PermissionType::READ, - 'state' => PermissionCategory::SUPPLIER, + 'state' => PermissionCategory::ATTRIBUTE, ], ], [ @@ -75,11 +99,11 @@ return [ 'permission' => [ 'module' => ApiController::NAME, 'type' => PermissionType::READ, - 'state' => PermissionCategory::SUPPLIER, + 'state' => PermissionCategory::ATTRIBUTE, ], ], ], - '^.*/supplier/attribute/type/l11n$' => [ + '^.*/supplier/attribute/type/l11n(\?.*|$)$' => [ [ 'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeTypeL11nCreate', 'verb' => RouteVerb::PUT, @@ -87,8 +111,8 @@ return [ 'active' => true, 'permission' => [ 'module' => ApiController::NAME, - 'type' => PermissionType::READ, - 'state' => PermissionCategory::SUPPLIER, + 'type' => PermissionType::CREATE, + 'state' => PermissionCategory::ATTRIBUTE, ], ], [ @@ -98,12 +122,12 @@ return [ 'active' => true, 'permission' => [ 'module' => ApiController::NAME, - 'type' => PermissionType::READ, - 'state' => PermissionCategory::SUPPLIER, + 'type' => PermissionType::MODIFY, + 'state' => PermissionCategory::ATTRIBUTE, ], ], ], - '^.*/supplier/attribute/value$' => [ + '^.*/supplier/attribute/value(\?.*|$)$' => [ [ 'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeValueCreate', 'verb' => RouteVerb::PUT, @@ -111,7 +135,7 @@ return [ 'active' => true, 'permission' => [ 'module' => ApiController::NAME, - 'type' => PermissionType::READ, + 'type' => PermissionType::CREATE, 'state' => PermissionCategory::SUPPLIER, ], ], @@ -122,12 +146,12 @@ return [ 'active' => true, 'permission' => [ 'module' => ApiController::NAME, - 'type' => PermissionType::READ, + 'type' => PermissionType::MODIFY, 'state' => PermissionCategory::SUPPLIER, ], ], ], - '^.*/supplier/attribute/value/l11n$' => [ + '^.*/supplier/attribute/value/l11n(\?.*|$)$' => [ [ 'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeValueL11nCreate', 'verb' => RouteVerb::PUT, @@ -135,7 +159,7 @@ return [ 'active' => true, 'permission' => [ 'module' => ApiController::NAME, - 'type' => PermissionType::READ, + 'type' => PermissionType::CREATE, 'state' => PermissionCategory::SUPPLIER, ], ], @@ -146,12 +170,12 @@ return [ 'active' => true, 'permission' => [ 'module' => ApiController::NAME, - 'type' => PermissionType::READ, + 'type' => PermissionType::MODIFY, 'state' => PermissionCategory::SUPPLIER, ], ], ], - '^.*/supplier/l11n$' => [ + '^.*/supplier/l11n(\?.*|$)$' => [ [ 'dest' => '\Modules\SupplierManagement\Controller\ApiController:apiSupplierL11nCreate', 'verb' => RouteVerb::PUT, @@ -159,7 +183,7 @@ return [ 'active' => true, 'permission' => [ 'module' => ApiController::NAME, - 'type' => PermissionType::READ, + 'type' => PermissionType::CREATE, 'state' => PermissionCategory::SUPPLIER, ], ], @@ -170,12 +194,12 @@ return [ 'active' => true, 'permission' => [ 'module' => ApiController::NAME, - 'type' => PermissionType::READ, + 'type' => PermissionType::MODIFY, 'state' => PermissionCategory::SUPPLIER, ], ], ], - '^.*/supplier/l11n/type$' => [ + '^.*/supplier/l11n/type(\?.*|$)$' => [ [ 'dest' => '\Modules\SupplierManagement\Controller\ApiController:apiSupplierL11nTypeCreate', 'verb' => RouteVerb::PUT, @@ -183,7 +207,7 @@ return [ 'active' => true, 'permission' => [ 'module' => ApiController::NAME, - 'type' => PermissionType::READ, + 'type' => PermissionType::CREATE, 'state' => PermissionCategory::SUPPLIER, ], ], @@ -194,7 +218,7 @@ return [ 'active' => true, 'permission' => [ 'module' => ApiController::NAME, - 'type' => PermissionType::READ, + 'type' => PermissionType::MODIFY, 'state' => PermissionCategory::SUPPLIER, ], ], diff --git a/Controller/BackendController.php b/Controller/BackendController.php index ae19c61..1267d7a 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -208,6 +208,13 @@ final class BackendController extends Controller * * @return RenderableInterface * + * @feature In the supplier and client view you should be able to select multiple bills and click print for printing + * https://github.com/Karaka-Management/oms-Billing/issues/35 + * + * @feature The send bill as email should have a global settings where you can either define a global email or + * empty = user specific email + * https://github.com/Karaka-Management/oms-Billing/issues/33 + * * @since 1.0.0 * @codeCoverageIgnore */ diff --git a/Theme/Backend/Lang/Navigation.de.lang.php b/Theme/Backend/Lang/Navigation.de.lang.php index 5b9bb82..ceb8b72 100755 --- a/Theme/Backend/Lang/Navigation.de.lang.php +++ b/Theme/Backend/Lang/Navigation.de.lang.php @@ -16,4 +16,5 @@ return ['Navigation' => [ 'Create' => 'Erstellen', 'List' => 'Liste', 'Suppliers' => 'Lieferanten', + 'Attributes' => 'Attribute', ]]; diff --git a/Theme/Backend/Lang/Navigation.en.lang.php b/Theme/Backend/Lang/Navigation.en.lang.php index 86f3a3b..907b3fb 100755 --- a/Theme/Backend/Lang/Navigation.en.lang.php +++ b/Theme/Backend/Lang/Navigation.en.lang.php @@ -16,4 +16,5 @@ return ['Navigation' => [ 'Create' => 'Create', 'List' => 'List', 'Suppliers' => 'Suppliers', + 'Attributes' => 'Attributes', ]]; diff --git a/Theme/Backend/supplier-view.tpl.php b/Theme/Backend/supplier-view.tpl.php index 95cea2e..6e597de 100644 --- a/Theme/Backend/supplier-view.tpl.php +++ b/Theme/Backend/supplier-view.tpl.php @@ -28,6 +28,8 @@ use phpOMS\Localization\RegionEnum; use phpOMS\Message\Http\HttpHeader; use phpOMS\Stdlib\Base\FloatInt; use phpOMS\Stdlib\Base\SmartDateTime; +use phpOMS\System\File\ExtensionType; +use phpOMS\System\File\FileUtils; use phpOMS\Uri\UriFactory; $countryCodes = ISO3166TwoEnum::getConstants(); @@ -48,6 +50,10 @@ $supplierStatus = SupplierStatus::getConstants(); $monthlySalesCosts = $this->data['monthlySalesCosts'] ?? []; +// @performance The client, supplier and item views should not use actual tabs but individual pages for better performance +// Tabs require too many models to be loaded. Implement and then use a tab navigation if it doesn't already exist. +// https://github.com/Karaka-Management/oms-ItemManagement/issues/13 + /** * @var \phpOMS\Views\View $this */ @@ -88,7 +94,10 @@ echo $this->data['nav']->render();
-
+ >
@@ -350,8 +359,10 @@ echo $this->data['nav']->render(); foreach ($supplier->files as $file) : ++$count; $url = UriFactory::build('{/base}/media/view?{?}&id=' . $file->id); + $extensionType = FileUtils::getExtensionType($value->extension); ?> - + > name; ?> extension; ?> createdAt->format('Y-m-d'); ?> diff --git a/info.json b/info.json index 6d38d81..5b2bca0 100755 --- a/info.json +++ b/info.json @@ -19,6 +19,7 @@ "dependencies": { "Admin": "1.0.0", "Media": "1.0.0", + "Purchase": "1.0.0", "Payment": "1.0.0", "Editor": "1.0.0" },