started with template fixes

This commit is contained in:
Dennis Eichhorn 2024-03-29 15:26:00 +00:00
parent 9d3a5fd8c0
commit 95b57f9acb
9 changed files with 96 additions and 3 deletions

View File

@ -49,7 +49,7 @@
"type": 3,
"subtype": 1,
"name": "Attributes",
"uri": "{/base}/contract/attribute/list?{?}",
"uri": "{/base}/contract/attribute/type/list?{?}",
"target": "self",
"icon": null,
"order": 1,

View File

@ -22,6 +22,7 @@ return [
[
'dest' => '\Modules\ContractManagement\Controller\ApiContractTypeController:apiContractTypeCreate',
'verb' => RouteVerb::PUT,
'csrf' => true,
'permission' => [
'module' => Controller::NAME,
'type' => PermissionType::READ,
@ -31,6 +32,7 @@ return [
[
'dest' => '\Modules\ContractManagement\Controller\ApiContractTypeController:apiContractTypeUpdate',
'verb' => RouteVerb::SET,
'csrf' => true,
'permission' => [
'module' => Controller::NAME,
'type' => PermissionType::READ,
@ -43,6 +45,7 @@ return [
[
'dest' => '\Modules\ContractManagement\Controller\ApiController:apiContractCreate',
'verb' => RouteVerb::PUT,
'csrf' => true,
'permission' => [
'module' => Controller::NAME,
'type' => PermissionType::READ,
@ -52,6 +55,7 @@ return [
[
'dest' => '\Modules\ContractManagement\Controller\ApiController:apiContractUpdate',
'verb' => RouteVerb::SET,
'csrf' => true,
'permission' => [
'module' => Controller::NAME,
'type' => PermissionType::READ,
@ -64,6 +68,7 @@ return [
[
'dest' => '\Modules\ContractManagement\Controller\ApiAttributeController:apiContractAttributeCreate',
'verb' => RouteVerb::PUT,
'csrf' => true,
'permission' => [
'module' => Controller::NAME,
'type' => PermissionType::READ,
@ -73,6 +78,7 @@ return [
[
'dest' => '\Modules\ContractManagement\Controller\ApiAttributeController:apiContractAttributeUpdate',
'verb' => RouteVerb::SET,
'csrf' => true,
'permission' => [
'module' => Controller::NAME,
'type' => PermissionType::READ,

View File

@ -40,6 +40,17 @@ return [
],
],
],
'^.*/contract/create(\?.*$|$)' => [
[
'dest' => '\Modules\ContractManagement\Controller\BackendController:viewContractCreate',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionCategory::CONTRACT,
],
],
],
'^.*/contract/type/list(\?.*$|$)' => [
[
'dest' => '\Modules\ContractManagement\Controller\BackendController:viewContractTypeList',
@ -62,4 +73,70 @@ return [
],
],
],
'^.*/contract/type/create(\?.*$|$)' => [
[
'dest' => '\Modules\ContractManagement\Controller\BackendController:viewContractTypeCreate',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionCategory::CONTRACT_TYPE,
],
],
],
'^.*/contract/attribute/type/list(\?.*$|$)' => [
[
'dest' => '\Modules\ContractManagement\Controller\BackendController:viewContractManagementAttributeTypeList',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionCategory::ATTRIBUTE,
],
],
],
'^.*/contract/attribute/type/view(\?.*$|$)' => [
[
'dest' => '\Modules\ContractManagement\Controller\BackendController:viewContractManagementAttributeType',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionCategory::ATTRIBUTE,
],
],
],
'^.*/contract/attribute/type/create(\?.*$|$)' => [
[
'dest' => '\Modules\ContractManagement\Controller\BackendController:viewContractManagementAttributeTypeCreate',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionCategory::ATTRIBUTE,
],
],
],
'^.*/contract/attribute/value/view(\?.*$|$)' => [
[
'dest' => '\Modules\ContractManagement\Controller\BackendController:viewContractManagementAttributeValue',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionCategory::ATTRIBUTE,
],
],
],
'^.*/contract/attribute/value/create(\?.*$|$)' => [
[
'dest' => '\Modules\ContractManagement\Controller\BackendController:viewContractManagementAttributeValueCreate',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionCategory::ATTRIBUTE,
],
],
],
];

View File

@ -31,4 +31,6 @@ abstract class PermissionCategory extends Enum
public const CONTRACT_TYPE = 2;
public const NOTE = 3;
public const ATTRIBUTE = 4;
}

View File

@ -30,4 +30,5 @@ return ['ContractManagement' => [
'Type' => 'Typ',
'Unit' => 'Unit',
'With' => 'Mit',
'ContractTypes' => 'Vertragsarten',
]];

View File

@ -30,4 +30,5 @@ return ['ContractManagement' => [
'Type' => 'Type',
'Unit' => 'Unit',
'With' => 'With',
'ContractTypes' => 'Contract Types',
]];

View File

@ -99,10 +99,12 @@ echo $this->data['nav']->render(); ?>
<?php endif; ?>
</table>
</div>
<!--
<div class="portlet-foot">
<a tabindex="0" class="button" href="<?= UriFactory::build($previous); ?>"><?= $this->getHtml('Previous', '0', '0'); ?></a>
<a tabindex="0" class="button" href="<?= UriFactory::build($next); ?>"><?= $this->getHtml('Next', '0', '0'); ?></a>
</div>
-->
</div>
</div>
</div>

View File

@ -22,7 +22,11 @@ echo $this->data['nav']->render(); ?>
<div class="row">
<div class="col-xs-12">
<section class="portlet">
<div class="portlet-head"><?= $this->getHtml('ContractTypes', 'Contract', 'Backend'); ?><i class="g-icon download btn end-xs">download</i></div>
<div class="portlet-head">
<?= $this->getHtml('ContractTypes'); ?>
<a class="button end-xs save" href="<?= UriFactory::build('{/base}/'); ?>contract/type/create"><?= $this->getHtml('New', '0', '0'); ?></a>
<i class="g-icon download btn end-xs">download</i>
</div>
<div class="slider">
<table id="iContractTypeList" class="default sticky">
<thead>

View File

@ -131,7 +131,7 @@ echo $this->data['nav']->render(); ?>
$contract->attributes,
$this->data['attributeTypes'] ?? [],
$this->data['units'] ?? [],
'{/api}contract/attribute',
'{/api}contract/attribute?csrf={$CSRF}',
$contract->id
);
?>