feat(helpdesk): align module with core list/drawer standards

- add helpdesk module pages, services, settings and tests

- standardize debtor list on drawer/grid contracts and robust filter drawer behavior

- add helpdesk aside panel navigation and settings visibility provider

- switch primary list slug to helpdesk/debitor and remove helpdesk/search compatibility

- include required core contract updates for list contracts and detail/drawer integration
This commit is contained in:
2026-04-02 17:48:27 +02:00
parent 5d07236758
commit a0d7670dd7
55 changed files with 5977 additions and 11 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace MintyPHP\Module\Helpdesk\Providers;
use MintyPHP\App\AppContainer;
use MintyPHP\App\Module\Contracts\LayoutContextProvider;
use MintyPHP\Service\Access\AuthorizationService;
final class HelpdeskLayoutProvider implements LayoutContextProvider
{
public function provide(array $session, AppContainer $container): array
{
$userId = (int) ($session['user']['id'] ?? 0);
if ($userId <= 0) {
return ['helpdesk.nav' => ['can_manage_settings' => false]];
}
try {
$authorizationService = $container->get(AuthorizationService::class);
$canManageSettings = $authorizationService->authorize('helpdesk.settings.manage', [
'actor_user_id' => $userId,
])->isAllowed();
} catch (\Throwable) {
$canManageSettings = false;
}
return ['helpdesk.nav' => ['can_manage_settings' => $canManageSettings]];
}
}