This commit is contained in:
Dennis Eichhorn 2024-01-02 23:34:17 +00:00
parent 6ce269c837
commit 9c21043ca9
6 changed files with 57 additions and 1 deletions

View File

@ -12,5 +12,32 @@
*/
declare(strict_types=1);
use Modules\CashManagement\Controller\BackendController;
use Modules\CashManagement\Models\PermissionCategory;
use phpOMS\Account\PermissionType;
use phpOMS\Router\RouteVerb;
return [
'^.*/accounting/cash/list.*$' => [
[
'dest' => '\Modules\CashManagement\Controller\BackendController:viewCashList',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionCategory::CASH,
],
],
],
'^.*/accounting/cash/register.*$' => [
[
'dest' => '\Modules\CashManagement\Controller\BackendController:viewCashList',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::READ,
'state' => PermissionCategory::CASH,
],
],
],
];

0
Models/CashRegister.php Normal file
View File

View File

View File

View File

@ -0,0 +1,30 @@
<?php
/**
* Jingga
*
* PHP Version 8.1
*
* @package Modules\CashManagement\Models
* @copyright Dennis Eichhorn
* @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
namespace Modules\CashManagement\Models;
use phpOMS\Stdlib\Base\Enum;
/**
* Permission category enum.
*
* @package Modules\CashManagement\Models
* @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
abstract class PermissionCategory extends Enum
{
public const CASH = 1;
}

View File

@ -14,7 +14,6 @@
"name": "Jingga",
"website": "jingga.app"
},
"description": "The administration module.",
"directory": "CashManagement",
"dependencies": {
"Admin": "1.0.0",