mirror of
https://github.com/Karaka-Management/oms-SupplierManagement.git
synced 2026-02-16 08:38:40 +00:00
Went through todos
This commit is contained in:
parent
7109168e4d
commit
c61518fa61
|
|
@ -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',
|
'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeCreate',
|
||||||
'verb' => RouteVerb::PUT,
|
'verb' => RouteVerb::PUT,
|
||||||
|
|
@ -39,7 +63,7 @@ return [
|
||||||
'active' => true,
|
'active' => true,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => ApiController::NAME,
|
'module' => ApiController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::CREATE,
|
||||||
'state' => PermissionCategory::SUPPLIER,
|
'state' => PermissionCategory::SUPPLIER,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
@ -50,12 +74,12 @@ return [
|
||||||
'active' => true,
|
'active' => true,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => ApiController::NAME,
|
'module' => ApiController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::MODIFY,
|
||||||
'state' => PermissionCategory::SUPPLIER,
|
'state' => PermissionCategory::SUPPLIER,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'^.*/supplier/attribute/type$' => [
|
'^.*/supplier/attribute/type(\?.*|$)$' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeTypeCreate',
|
'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeTypeCreate',
|
||||||
'verb' => RouteVerb::PUT,
|
'verb' => RouteVerb::PUT,
|
||||||
|
|
@ -64,7 +88,7 @@ return [
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => ApiController::NAME,
|
'module' => ApiController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::READ,
|
||||||
'state' => PermissionCategory::SUPPLIER,
|
'state' => PermissionCategory::ATTRIBUTE,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
|
@ -75,11 +99,11 @@ return [
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => ApiController::NAME,
|
'module' => ApiController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::READ,
|
||||||
'state' => PermissionCategory::SUPPLIER,
|
'state' => PermissionCategory::ATTRIBUTE,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'^.*/supplier/attribute/type/l11n$' => [
|
'^.*/supplier/attribute/type/l11n(\?.*|$)$' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeTypeL11nCreate',
|
'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeTypeL11nCreate',
|
||||||
'verb' => RouteVerb::PUT,
|
'verb' => RouteVerb::PUT,
|
||||||
|
|
@ -87,8 +111,8 @@ return [
|
||||||
'active' => true,
|
'active' => true,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => ApiController::NAME,
|
'module' => ApiController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::CREATE,
|
||||||
'state' => PermissionCategory::SUPPLIER,
|
'state' => PermissionCategory::ATTRIBUTE,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
|
@ -98,12 +122,12 @@ return [
|
||||||
'active' => true,
|
'active' => true,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => ApiController::NAME,
|
'module' => ApiController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::MODIFY,
|
||||||
'state' => PermissionCategory::SUPPLIER,
|
'state' => PermissionCategory::ATTRIBUTE,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'^.*/supplier/attribute/value$' => [
|
'^.*/supplier/attribute/value(\?.*|$)$' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeValueCreate',
|
'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeValueCreate',
|
||||||
'verb' => RouteVerb::PUT,
|
'verb' => RouteVerb::PUT,
|
||||||
|
|
@ -111,7 +135,7 @@ return [
|
||||||
'active' => true,
|
'active' => true,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => ApiController::NAME,
|
'module' => ApiController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::CREATE,
|
||||||
'state' => PermissionCategory::SUPPLIER,
|
'state' => PermissionCategory::SUPPLIER,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
@ -122,12 +146,12 @@ return [
|
||||||
'active' => true,
|
'active' => true,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => ApiController::NAME,
|
'module' => ApiController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::MODIFY,
|
||||||
'state' => PermissionCategory::SUPPLIER,
|
'state' => PermissionCategory::SUPPLIER,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'^.*/supplier/attribute/value/l11n$' => [
|
'^.*/supplier/attribute/value/l11n(\?.*|$)$' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeValueL11nCreate',
|
'dest' => '\Modules\SupplierManagement\Controller\ApiAttributeController:apiSupplierAttributeValueL11nCreate',
|
||||||
'verb' => RouteVerb::PUT,
|
'verb' => RouteVerb::PUT,
|
||||||
|
|
@ -135,7 +159,7 @@ return [
|
||||||
'active' => true,
|
'active' => true,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => ApiController::NAME,
|
'module' => ApiController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::CREATE,
|
||||||
'state' => PermissionCategory::SUPPLIER,
|
'state' => PermissionCategory::SUPPLIER,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
@ -146,12 +170,12 @@ return [
|
||||||
'active' => true,
|
'active' => true,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => ApiController::NAME,
|
'module' => ApiController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::MODIFY,
|
||||||
'state' => PermissionCategory::SUPPLIER,
|
'state' => PermissionCategory::SUPPLIER,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'^.*/supplier/l11n$' => [
|
'^.*/supplier/l11n(\?.*|$)$' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\SupplierManagement\Controller\ApiController:apiSupplierL11nCreate',
|
'dest' => '\Modules\SupplierManagement\Controller\ApiController:apiSupplierL11nCreate',
|
||||||
'verb' => RouteVerb::PUT,
|
'verb' => RouteVerb::PUT,
|
||||||
|
|
@ -159,7 +183,7 @@ return [
|
||||||
'active' => true,
|
'active' => true,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => ApiController::NAME,
|
'module' => ApiController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::CREATE,
|
||||||
'state' => PermissionCategory::SUPPLIER,
|
'state' => PermissionCategory::SUPPLIER,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
@ -170,12 +194,12 @@ return [
|
||||||
'active' => true,
|
'active' => true,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => ApiController::NAME,
|
'module' => ApiController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::MODIFY,
|
||||||
'state' => PermissionCategory::SUPPLIER,
|
'state' => PermissionCategory::SUPPLIER,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'^.*/supplier/l11n/type$' => [
|
'^.*/supplier/l11n/type(\?.*|$)$' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\SupplierManagement\Controller\ApiController:apiSupplierL11nTypeCreate',
|
'dest' => '\Modules\SupplierManagement\Controller\ApiController:apiSupplierL11nTypeCreate',
|
||||||
'verb' => RouteVerb::PUT,
|
'verb' => RouteVerb::PUT,
|
||||||
|
|
@ -183,7 +207,7 @@ return [
|
||||||
'active' => true,
|
'active' => true,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => ApiController::NAME,
|
'module' => ApiController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::CREATE,
|
||||||
'state' => PermissionCategory::SUPPLIER,
|
'state' => PermissionCategory::SUPPLIER,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
@ -194,7 +218,7 @@ return [
|
||||||
'active' => true,
|
'active' => true,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => ApiController::NAME,
|
'module' => ApiController::NAME,
|
||||||
'type' => PermissionType::READ,
|
'type' => PermissionType::MODIFY,
|
||||||
'state' => PermissionCategory::SUPPLIER,
|
'state' => PermissionCategory::SUPPLIER,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -208,6 +208,13 @@ final class BackendController extends Controller
|
||||||
*
|
*
|
||||||
* @return RenderableInterface
|
* @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
|
* @since 1.0.0
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -16,4 +16,5 @@ return ['Navigation' => [
|
||||||
'Create' => 'Erstellen',
|
'Create' => 'Erstellen',
|
||||||
'List' => 'Liste',
|
'List' => 'Liste',
|
||||||
'Suppliers' => 'Lieferanten',
|
'Suppliers' => 'Lieferanten',
|
||||||
|
'Attributes' => 'Attribute',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -16,4 +16,5 @@ return ['Navigation' => [
|
||||||
'Create' => 'Create',
|
'Create' => 'Create',
|
||||||
'List' => 'List',
|
'List' => 'List',
|
||||||
'Suppliers' => 'Suppliers',
|
'Suppliers' => 'Suppliers',
|
||||||
|
'Attributes' => 'Attributes',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@ use phpOMS\Localization\RegionEnum;
|
||||||
use phpOMS\Message\Http\HttpHeader;
|
use phpOMS\Message\Http\HttpHeader;
|
||||||
use phpOMS\Stdlib\Base\FloatInt;
|
use phpOMS\Stdlib\Base\FloatInt;
|
||||||
use phpOMS\Stdlib\Base\SmartDateTime;
|
use phpOMS\Stdlib\Base\SmartDateTime;
|
||||||
|
use phpOMS\System\File\ExtensionType;
|
||||||
|
use phpOMS\System\File\FileUtils;
|
||||||
use phpOMS\Uri\UriFactory;
|
use phpOMS\Uri\UriFactory;
|
||||||
|
|
||||||
$countryCodes = ISO3166TwoEnum::getConstants();
|
$countryCodes = ISO3166TwoEnum::getConstants();
|
||||||
|
|
@ -48,6 +50,10 @@ $supplierStatus = SupplierStatus::getConstants();
|
||||||
|
|
||||||
$monthlySalesCosts = $this->data['monthlySalesCosts'] ?? [];
|
$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
|
* @var \phpOMS\Views\View $this
|
||||||
*/
|
*/
|
||||||
|
|
@ -88,7 +94,10 @@ echo $this->data['nav']->render();
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<section class="portlet">
|
<section class="portlet">
|
||||||
<form id="supplierForm" method="<?= $isNew ? 'PUT' : 'POST'; ?>" action="<?= UriFactory::build('{/api}purchase/supplier?csrf={$CSRF}'); ?>">
|
<form id="supplierForm"
|
||||||
|
method="<?= $isNew ? 'PUT' : 'POST'; ?>"
|
||||||
|
action="<?= UriFactory::build('{/api}supplier?csrf={$CSRF}'); ?>"
|
||||||
|
<?= $isNew ? 'data-redirect="' . UriFactory::build('{/base}/purchase/supplier/view') . '?id={/0/response/id}"' : ''; ?>>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="iId"><?= $this->getHtml('ID', '0', '0'); ?></label>
|
<label for="iId"><?= $this->getHtml('ID', '0', '0'); ?></label>
|
||||||
|
|
@ -350,8 +359,10 @@ echo $this->data['nav']->render();
|
||||||
foreach ($supplier->files as $file) :
|
foreach ($supplier->files as $file) :
|
||||||
++$count;
|
++$count;
|
||||||
$url = UriFactory::build('{/base}/media/view?{?}&id=' . $file->id);
|
$url = UriFactory::build('{/base}/media/view?{?}&id=' . $file->id);
|
||||||
|
$extensionType = FileUtils::getExtensionType($value->extension);
|
||||||
?>
|
?>
|
||||||
<tr data-href="<?= $url; ?>">
|
<tr data-href="<?= $url; ?>"
|
||||||
|
<?= \in_array($extensionType, [ExtensionType::IMAGE, ExtensionType::PDF]) ? 'data-preview="' . UriFactory::build('{/api}media/export?id=' . $file->id . '&type=html&csrf={$CSRF}') . '"' : ''; ?>>
|
||||||
<td><a href="<?= $url; ?>"><?= $file->name; ?></a>
|
<td><a href="<?= $url; ?>"><?= $file->name; ?></a>
|
||||||
<td><a href="<?= $url; ?>"><?= $file->extension; ?></a>
|
<td><a href="<?= $url; ?>"><?= $file->extension; ?></a>
|
||||||
<td><a href="<?= $url; ?>"><?= $file->createdAt->format('Y-m-d'); ?></a>
|
<td><a href="<?= $url; ?>"><?= $file->createdAt->format('Y-m-d'); ?></a>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user