oms-Billing/Admin/Routes/Web/Api.php
Dennis Eichhorn cfd11cec45
Some checks failed
Image optimization / general_image_workflow (push) Has been cancelled
CI / general_module_workflow_php (push) Has been cancelled
CI / general_module_workflow_js (push) Has been cancelled
bug fixes
2024-10-11 19:17:39 +00:00

100 lines
3.2 KiB
PHP
Executable File

<?php
/**
* Jingga
*
* PHP Version 8.2
*
* @package Modules
* @copyright Dennis Eichhorn
* @license OMS License 2.2
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
use Modules\Billing\Controller\BackendController;
use Modules\Billing\Models\PermissionCategory;
use phpOMS\Account\PermissionType;
use phpOMS\Router\RouteVerb;
return [
'^.*/bill/file(\?.*|$)$' => [
[
'dest' => '\Modules\Billing\Controller\ApiController:apiFileCreate',
'verb' => RouteVerb::PUT,
'csrf' => true,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionCategory::SALES_INVOICE,
],
],
],
'^.*/bill/render(\?.*$|$)' => [
[
'dest' => '\Modules\Billing\Controller\ApiBillController:apiMediaRender',
'verb' => RouteVerb::GET,
'csrf' => true,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionCategory::SALES_INVOICE,
],
],
],
'^.*/bill/render/preview(\?.*$|$)' => [
[
'dest' => '\Modules\Billing\Controller\ApiBillController:apiPreviewRender',
'verb' => RouteVerb::GET,
'csrf' => true,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionCategory::SALES_INVOICE,
],
],
],
'^.*/bill/price(\?.*$|$)' => [
[
'dest' => '\Modules\Billing\Controller\ApiPriceController:apiPriceCreate',
'verb' => RouteVerb::GET,
'csrf' => true,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionCategory::PRICE,
],
],
],
'^.*/bill/parse(\?.*$|$)' => [
[
'dest' => '\Modules\Billing\Controller\ApiPurchaseController:apiInvoiceParse',
'verb' => RouteVerb::SET,
'csrf' => true,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::MODIFY,
'state' => PermissionCategory::PURCHASE_INVOICE,
],
],
],
'^.*/purchase/recognition/upload(\?.*$|$)' => [
[
'dest' => '\Modules\Billing\Controller\ApiPurchaseController:apiPurchaseBillUpload',
'verb' => RouteVerb::SET,
'csrf' => true,
'active' => true,
'permission' => [
'module' => BackendController::NAME,
'type' => PermissionType::CREATE,
'state' => PermissionCategory::PURCHASE_INVOICE,
],
],
],
];