Skip to content

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Eichhorn committed Apr 2, 2024
1 parent 35f6f36 commit 3b837d6
Show file tree
Hide file tree
Showing 94 changed files with 218 additions and 217 deletions.
2 changes: 1 addition & 1 deletion Build
Submodule Build updated 1 files
+4 −4 Backup/local.sh
8 changes: 2 additions & 6 deletions Cli/CliApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -395,15 +395,11 @@ private function create403Response(CliResponse $response, View $pageView) : void
*/
private function createDefaultPageView(CliRequest $request, CliResponse $response, CliView $pageView) : void
{
/** @var \Modules\Organization\Models\Unit[] $unit */
$unit = UnitMapper::getAll()->execute();
$pageView->setOrganizations($unit);
$pageView->organizations = UnitMapper::getAll()->executeGetArray();

/** @var \Modules\Profile\Models\Profile $profile */
$profile = ProfileMapper::get()
$pageView->profile = ProfileMapper::get()
->where('account', $request->header->account)
->execute();
$pageView->profile = $profile;

$pageView->setTemplate('/Cli/index');
}
Expand Down
17 changes: 1 addition & 16 deletions Cli/CliView.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class CliView extends View
* @var Unit[]
* @since 1.0.0
*/
protected array $organizations = [];
public array $organizations = [];

/**
* Constructor
Expand All @@ -71,19 +71,4 @@ public function __construct(L11nManager $l11n = null, RequestAbstract $request =

$this->profile = new NullProfile();
}

/**
* Set organizations
*
* @param Unit[] $organizations Organizations
*
* @return void
*
* @since 1.0.0
* @codeCoverageIgnore
*/
public function setOrganizations(array $organizations) : void
{
$this->organizations = $organizations;
}
}
5 changes: 0 additions & 5 deletions Cli/Hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
'callback' => [
0 => '\Modules\Admin\Controller\CliController:runEncryptionChangeFromHook',
1 => '\Modules\Media\Controller\CliController:runEncryptionChangeFromHook',
2 => '\Modules\Admin\Controller\CliController:runEncryptionChangeFromHook',
3 => '\Modules\Media\Controller\CliController:runEncryptionChangeFromHook',
4 => '\Modules\Admin\Controller\CliController:runEncryptionChangeFromHook',
5 => '\Modules\Media\Controller\CliController:runEncryptionChangeFromHook',
6 => '\Modules\Media\Controller\CliController:runEncryptionChangeFromHook',
],
],
'/.*/' => [
Expand Down
28 changes: 14 additions & 14 deletions Cli/Routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,22 @@
'verb' => 16,
],
],
'^/billing/bill/purchase/parse( .*$|$)' => [
'^.*/admin/monitoring/log( .*$|$)' => [
0 => [
'dest' => '\Modules\Billing\Controller\CliController:cliParseSupplierBill',
'dest' => '\Modules\Monitoring\Controller\CliController:cliLogReport',
'verb' => 16,
],
],
'^.*/admin/monitoring/log( .*$|$)' => [
'^.*/workflow/instance( .*$|$)' => [
0 => [
'dest' => '\Modules\Monitoring\Controller\CliController:cliLogReport',
'dest' => '\Modules\Workflow\Controller\CliController:cliWorkflowInstanceCreate',
'verb' => 16,
],
],
'^.*/orw/check -i all*$' => [
'^/billing/bill/purchase/parse( .*$|$)' => [
0 => [
'dest' => '\Modules\OnlineResourceWatcher\Controller\ApiController:apiCheckResources',
'permission' => [
'module' => 'OnlineResourceWatcher',
'type' => 4,
'state' => 1,
],
'dest' => '\Modules\Billing\Controller\CliController:cliParseSupplierBill',
'verb' => 16,
],
],
'^/purchase/order/suggestion/create( .*$|$)' => [
Expand All @@ -51,10 +47,14 @@
'verb' => 16,
],
],
'^.*/workflow/instance( .*$|$)' => [
'^.*/orw/check -i all*$' => [
0 => [
'dest' => '\Modules\Workflow\Controller\CliController:cliWorkflowInstanceCreate',
'verb' => 16,
'dest' => '\Modules\OnlineResourceWatcher\Controller\ApiController:apiCheckResources',
'permission' => [
'module' => 'OnlineResourceWatcher',
'type' => 4,
'state' => 1,
],
],
],
];
17 changes: 12 additions & 5 deletions Install/Application/Backend/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -431,15 +431,22 @@ private function initResponseHead(Head $head, HttpRequest $request, HttpResponse

/* Load assets */
$head->addAsset(AssetType::CSS, 'cssOMS/styles.css?v=' . self::VERSION, ['defer']);
//$head->addAsset(AssetType::CSS, 'Web/Backend/css/backend-dark.css?v=1.0.0', ['media' => '(prefers-color-scheme: dark)', 'defer']);
$head->addAsset(AssetType::CSS, 'cssOMS/print.css?v=' . self::VERSION, ['media' => 'print', 'defer']);

// Framework
$head->addAsset(AssetType::JS, 'Web/Backend/js/backend.min.js?v=' . self::VERSION, ['nonce' => $scriptSrc, 'type' => 'module', 'defer']);

if ($request->hasData('debug')) {
$head->addAsset(AssetType::CSS, 'cssOMS/debug.css?v=' . self::VERSION);
\phpOMS\DataStorage\Database\Query\Builder::$log = true;
// @feature Make user setting by storing it in the localstorage of the user
if ($request->hasKey('darkmode')) {
$head->addAsset(AssetType::CSS, 'Web/Backend/css/backend-dark.css?v=1.0.0', ['defer']);
}

if ($request->hasKey('debug')) {
$account = $this->app->accountManager->get($request->header->account);
if ($account->hasPermission(PermissionType::CREATE, $this->app->unitId, $this->app->appId)) {
$head->addAsset(AssetType::CSS, 'cssOMS/debug.css?v=' . self::VERSION);
\phpOMS\DataStorage\Database\Query\Builder::$log = true;
}
}

$css = \file_get_contents(__DIR__ . '/css/backend-small.css');
Expand Down Expand Up @@ -496,7 +503,7 @@ private function createBaseLoggedOutResponse(HttpRequest $request, HttpResponse
private function createDefaultPageView(HttpRequest $request, HttpResponse $response, BackendView $pageView) : void
{
/** @var \Modules\Organization\Models\Unit[] $units */
$units = UnitMapper::getAll()->execute();
$units = UnitMapper::getAll()->executeGetArray();
$pageView->setOrganizations($units);

/** @var \Modules\Profile\Models\Profile $profile */
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3b837d6

Please sign in to comment.