Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
Resolve tab highlighting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbyhacker0 committed Feb 26, 2024
1 parent fc4d87a commit 1d7673b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
7 changes: 7 additions & 0 deletions module/Olcs/config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,13 @@
'id' => 'dashboard-messaging',
'label' => 'dashboard-nav-messaging',
'route' => 'conversations',
'pages' => array(
array(
'id' => 'messaging-create-conversation',
'label' => 'New Conversation',
'route' => 'conversations/new',
),
),
),
),
),
Expand Down
7 changes: 6 additions & 1 deletion module/Olcs/src/Controller/ConversationsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Dvsa\Olcs\Transfer\Query\Messaging\Conversations\ByOrganisation as ByOrganisationQuery;
use Dvsa\Olcs\Utils\Translation\NiTextTranslation;
use Laminas\Http\Response;
use Laminas\Navigation\Navigation;
use Laminas\View\Model\ViewModel;
use LmcRbacMvc\Service\AuthorizationService;
use Olcs\Form\Model\Form\Message\Reply as ReplyForm;
Expand All @@ -40,11 +41,13 @@ public function __construct(
AuthorizationService $authService,
FlashMessengerHelperService $flashMessengerHelper,
TableFactory $tableFactory,
FormHelperService $formHelperService
FormHelperService $formHelperService,
Navigation $navigationService
) {
$this->flashMessengerHelper = $flashMessengerHelper;
$this->tableFactory = $tableFactory;
$this->formHelperService = $formHelperService;
$this->navigationService = $navigationService;

Check failure on line 50 in module/Olcs/src/Controller/ConversationsController.php

View workflow job for this annotation

GitHub Actions / static-analysis / PHPStan - 7.4

Access to an undefined property Olcs\Controller\ConversationsController::$navigationService.

parent::__construct($niTextTranslationUtil, $authService);
}
Expand Down Expand Up @@ -150,6 +153,8 @@ private function mapFormDataToCommand(\Laminas\Form\Form $form): Create
/** @return ViewModel|Response */
public function viewAction()
{
$this->navigationService->findBy('id', 'dashboard-messaging')->setActive();

Check failure on line 156 in module/Olcs/src/Controller/ConversationsController.php

View workflow job for this annotation

GitHub Actions / static-analysis / PHPStan - 7.4

Access to an undefined property Olcs\Controller\ConversationsController::$navigationService.

$params = [
'page' => $this->params()->fromQuery('page', 1),
'limit' => $this->params()->fromQuery('limit', 10),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ public function __invoke(
$flashMessengerHelper = $container->get(FlashMessengerHelperService::class);
$tableFactory = $container->get(TableFactory::class);
$formHelperService = $container->get(FormHelperService::class);
$navigationService = $container->get('navigation');

return new ConversationsController(
$niTextTranslationUtil,
$authService,
$flashMessengerHelper,
$tableFactory,
$formHelperService,
$navigationService
);
}
}

0 comments on commit 1d7673b

Please sign in to comment.