diff --git a/app/internal/.phpstorm.meta.php b/app/internal/.phpstorm.meta.php new file mode 100644 index 0000000000..1ad9a190e3 --- /dev/null +++ b/app/internal/.phpstorm.meta.php @@ -0,0 +1,10 @@ + '\Common\Form\Form' + ]) + ); +} diff --git a/app/internal/composer.lock b/app/internal/composer.lock index 75671a942f..d4f1db4d7c 100644 --- a/app/internal/composer.lock +++ b/app/internal/composer.lock @@ -4191,16 +4191,16 @@ }, { "name": "olcs/olcs-common", - "version": "5.0.0-beta.10", + "version": "v5.1.1", "source": { "type": "git", "url": "https://github.com/dvsa/olcs-common.git", - "reference": "530e47d0d8bc3574ded6ed980694c866894979ba" + "reference": "73b1c0cf809b50138dd1f5b471905361f1cd868e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dvsa/olcs-common/zipball/530e47d0d8bc3574ded6ed980694c866894979ba", - "reference": "530e47d0d8bc3574ded6ed980694c866894979ba", + "url": "https://api.github.com/repos/dvsa/olcs-common/zipball/73b1c0cf809b50138dd1f5b471905361f1cd868e", + "reference": "73b1c0cf809b50138dd1f5b471905361f1cd868e", "shasum": "" }, "require": { @@ -4258,9 +4258,9 @@ "notification-url": "https://packagist.org/downloads/", "description": "Common library for the OLCS Project", "support": { - "source": "https://github.com/dvsa/olcs-common/tree/5.0.0-beta.10" + "source": "https://github.com/dvsa/olcs-common/tree/v5.1.1" }, - "time": "2024-02-12T10:53:54+00:00" + "time": "2024-02-16T10:40:20+00:00" }, { "name": "olcs/olcs-logging", @@ -4316,16 +4316,16 @@ }, { "name": "olcs/olcs-transfer", - "version": "5.0.0-beta.8", + "version": "v5.1.0", "source": { "type": "git", "url": "https://github.com/dvsa/olcs-transfer.git", - "reference": "9b20f1f18e02c42775e85b87ed362765a2177ed3" + "reference": "b1fe910e1dafbf495367d16fe1953cf1aa9f88b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dvsa/olcs-transfer/zipball/9b20f1f18e02c42775e85b87ed362765a2177ed3", - "reference": "9b20f1f18e02c42775e85b87ed362765a2177ed3", + "url": "https://api.github.com/repos/dvsa/olcs-transfer/zipball/b1fe910e1dafbf495367d16fe1953cf1aa9f88b6", + "reference": "b1fe910e1dafbf495367d16fe1953cf1aa9f88b6", "shasum": "" }, "require": { @@ -4365,9 +4365,9 @@ "notification-url": "https://packagist.org/downloads/", "description": "OLCS Transfer", "support": { - "source": "https://github.com/dvsa/olcs-transfer/tree/5.0.0-beta.8" + "source": "https://github.com/dvsa/olcs-transfer/tree/v5.1.0" }, - "time": "2024-01-25T22:35:27+00:00" + "time": "2024-02-16T10:21:39+00:00" }, { "name": "olcs/olcs-utils", diff --git a/app/internal/module/Olcs/assets/js/inline/forms/message-categories.js b/app/internal/module/Olcs/assets/js/inline/forms/message-categories.js new file mode 100644 index 0000000000..0c0b9c73d3 --- /dev/null +++ b/app/internal/module/Olcs/assets/js/inline/forms/message-categories.js @@ -0,0 +1,12 @@ +OLCS.ready(function() { + "use strict"; + + var form = "form[name=NewMessage]"; + + OLCS.cascadeInput({ + source: form + " #category", + dest: form + " #subCategory", + url: "/list/task-sub-categories", + emptyLabel: "Please select" + }); +}); diff --git a/app/internal/module/Olcs/config/module.config.php b/app/internal/module/Olcs/config/module.config.php index 0ca5058bc7..2b19eca72f 100644 --- a/app/internal/module/Olcs/config/module.config.php +++ b/app/internal/module/Olcs/config/module.config.php @@ -11,9 +11,10 @@ use Common\Data\Object\Search\Publication; use Common\Data\Object\Search\User; use Common\Data\Object\Search\Vehicle; -use Common\Form\Elements\Validators\TableRequiredValidator; use Common\Service\Data as CommonDataService; use Laminas\Cache\Service\StorageCacheAbstractServiceFactory; +use Laminas\Http\Request; +use Laminas\Router\RouteStackInterface; use Olcs\Auth; use Olcs\Controller\Application as ApplicationControllers; use Olcs\Controller\Application\ApplicationController; @@ -42,6 +43,7 @@ use Olcs\Controller\Factory\SearchControllerFactory; use Olcs\Controller\Factory\SplitScreenControllerFactory; use Olcs\Controller\Factory\TaskControllerFactory; +use Olcs\Controller\Factory\TransportManager as TransportManagerControllerFactories; use Olcs\Controller\Factory\TransportManager\Details\TransportManagerDetailsPreviousHistoryControllerFactory; use Olcs\Controller\Factory\TransportManager\Processing\TransportManagerProcessingTaskControllerFactory; use Olcs\Controller\Factory\TransportManager\TransportManagerDocumentControllerFactory; @@ -68,6 +70,14 @@ use Olcs\Controller\Lva\Factory\Controller\Variation as LvaVariationControllerFactories; use Olcs\Controller\Lva\Licence as LvaLicenceControllers; use Olcs\Controller\Lva\Variation as LvaVariationControllers; +use Olcs\Controller\Messages\ApplicationConversationListController; +use Olcs\Controller\Messages\ApplicationCreateConversationController; +use Olcs\Controller\Messages\ApplicationConversationMessagesController; +use Olcs\Controller\Messages\ApplicationEnableDisableMessagingController; +use Olcs\Controller\Messages\LicenceConversationListController; +use Olcs\Controller\Messages\LicenceConversationMessagesController; +use Olcs\Controller\Messages\LicenceCreateConversationController; +use Olcs\Controller\Messages\LicenceEnableDisableMessagingController; use Olcs\Controller\Operator as OperatorControllers; use Olcs\Controller\Operator\HistoryController; use Olcs\Controller\Operator\OperatorBusinessDetailsController; @@ -76,6 +86,7 @@ use Olcs\Controller\Sla\LicenceDocumentSlaTargetDateController; use Olcs\Controller\TaskController; use Olcs\Controller\TransportManager as TmCntr; +use Olcs\Controller\TransportManager as TransportManagerControllers; use Olcs\Controller\TransportManager\Details\TransportManagerDetailsDetailController; use Olcs\Controller\TransportManager\Details\TransportManagerDetailsDetailControllerFactory; use Olcs\Controller\TransportManager\Details\TransportManagerDetailsPreviousHistoryController; @@ -120,8 +131,6 @@ use Olcs\View\Helper\SlaIndicator; use Olcs\View\Helper\SubmissionSectionMultipleTablesFactory; use Olcs\View\Helper\SubmissionSectionTableFactory; -use Olcs\Controller\TransportManager as TransportManagerControllers; -use Olcs\Controller\Factory\TransportManager as TransportManagerControllerFactories; return array( 'router' => [ @@ -291,27 +300,31 @@ LvaVariationControllers\SafetyController::class => LvaVariationControllerFactories\SafetyControllerFactory::class, LvaVariationControllers\SubmitController::class => LvaVariationControllerFactories\SubmitControllerFactory::class, LvaVariationControllers\TaxiPhvController::class => LvaVariationControllerFactories\TaxiPhvControllerFactory::class, - LvaVariationControllers\TransportManagersController::class => LvaVariationControllerFactories\TransportManagersControllerFactory::class, - LvaVariationControllers\TypeOfLicenceController::class => LvaVariationControllerFactories\TypeOfLicenceControllerFactory::class, - LvaVariationControllers\VehiclesController::class => LvaVariationControllerFactories\VehiclesControllerFactory::class, - LvaVariationControllers\VehiclesDeclarationsController::class => LvaVariationControllerFactories\VehiclesDeclarationsControllerFactory::class, - LvaVariationControllers\VehiclesPsvController::class => LvaVariationControllerFactories\VehiclesPsvControllerFactory::class, - LvaVariationControllers\WithdrawController::class => LvaVariationControllerFactories\WithdrawControllerFactory::class, - Olcs\Controller\IndexController::class => Olcs\Controller\Factory\IndexControllerFactory::class, - Olcs\Controller\Messages\LicenceConversationMessagesController::class => Olcs\Controller\Factory\Messages\LicenceConversationMessagesControllerFactory::class, - Olcs\Controller\Messages\ApplicationConversationListController::class => Olcs\Controller\Factory\Messages\ApplicationConversationListControllerFactory::class, - Olcs\Controller\Messages\LicenceConversationListController::class=> Olcs\Controller\Factory\Messages\LicenceConversationListControllerFactory::class, - Olcs\Controller\Messages\LicenceDisableConversationListController::class=> Olcs\Controller\Factory\Messages\LicenceDisableConversationListControllerFactory::class, - Olcs\Controller\Messages\LicenceNewConversationController::class=> Olcs\Controller\Factory\Messages\LicenceNewConversationControllerFactory::class, - Olcs\Controller\Messages\LicenceCloseConversationController::class => Olcs\Controller\Factory\Messages\LicenceCloseConversationControllerFactory::class, - OperatorControllers\OperatorFeesController::class => OperatorControllerFactories\OperatorFeesControllerFactory::class, - OperatorControllers\OperatorProcessingTasksController::class => OperatorControllerFactories\OperatorProcessingTasksControllerFactory::class, - OperatorControllers\UnlicensedBusinessDetailsController::class => OperatorControllerFactories\UnlicensedBusinessDetailsControllerFactory::class, - OperatorControllers\HistoryController::class => OperatorControllerFactories\HistoryControllerFactory::class, - OperatorControllers\Cases\UnlicensedCasesOperatorController::class => OperatorControllerFactories\Cases\UnlicensedCasesOperatorControllerFactory::class, - OperatorControllers\Docs\OperatorDocsController::class => OperatorControllerFactories\Docs\OperatorDocsControllerFactory::class, - OperatorControllers\OperatorController::class => OperatorControllerFactories\OperatorControllerFactory::class, - ApplicationControllers\ApplicationController::class => ApplicationControllerFactories\ApplicationControllerFactory::class, + LvaVariationControllers\TransportManagersController::class => LvaVariationControllerFactories\TransportManagersControllerFactory::class, + LvaVariationControllers\TypeOfLicenceController::class => LvaVariationControllerFactories\TypeOfLicenceControllerFactory::class, + LvaVariationControllers\VehiclesController::class => LvaVariationControllerFactories\VehiclesControllerFactory::class, + LvaVariationControllers\VehiclesDeclarationsController::class => LvaVariationControllerFactories\VehiclesDeclarationsControllerFactory::class, + LvaVariationControllers\VehiclesPsvController::class => LvaVariationControllerFactories\VehiclesPsvControllerFactory::class, + LvaVariationControllers\WithdrawController::class => LvaVariationControllerFactories\WithdrawControllerFactory::class, + Olcs\Controller\IndexController::class => Olcs\Controller\Factory\IndexControllerFactory::class, + Olcs\Controller\Messages\ApplicationConversationMessagesController::class => Olcs\Controller\Factory\Messages\ApplicationConversationMessagesControllerFactory::class, + Olcs\Controller\Messages\LicenceConversationMessagesController::class => Olcs\Controller\Factory\Messages\LicenceConversationMessagesControllerFactory::class, + Olcs\Controller\Messages\ApplicationConversationListController::class => Olcs\Controller\Factory\Messages\ApplicationConversationListControllerFactory::class, + Olcs\Controller\Messages\LicenceConversationListController::class => Olcs\Controller\Factory\Messages\LicenceConversationListControllerFactory::class, + Olcs\Controller\Messages\ApplicationEnableDisableMessagingController::class => Olcs\Controller\Factory\Messages\ApplicationEnableDisableMessagingControllerFactory::class, + Olcs\Controller\Messages\LicenceEnableDisableMessagingController::class => Olcs\Controller\Factory\Messages\LicenceEnableDisableMessagingControllerFactory::class, + Olcs\Controller\Messages\ApplicationCreateConversationController::class => Olcs\Controller\Factory\Messages\ApplicationCreateConversationControllerFactory::class, + Olcs\Controller\Messages\LicenceCreateConversationController::class => Olcs\Controller\Factory\Messages\LicenceCreateConversationControllerFactory::class, + Olcs\Controller\Messages\ApplicationCloseConversationController::class => Olcs\Controller\Factory\Messages\ApplicationCloseConversationControllerFactory::class, + Olcs\Controller\Messages\LicenceCloseConversationController::class => Olcs\Controller\Factory\Messages\LicenceCloseConversationControllerFactory::class, + OperatorControllers\OperatorFeesController::class => OperatorControllerFactories\OperatorFeesControllerFactory::class, + OperatorControllers\OperatorProcessingTasksController::class => OperatorControllerFactories\OperatorProcessingTasksControllerFactory::class, + OperatorControllers\UnlicensedBusinessDetailsController::class => OperatorControllerFactories\UnlicensedBusinessDetailsControllerFactory::class, + OperatorControllers\HistoryController::class => OperatorControllerFactories\HistoryControllerFactory::class, + OperatorControllers\Cases\UnlicensedCasesOperatorController::class => OperatorControllerFactories\Cases\UnlicensedCasesOperatorControllerFactory::class, + OperatorControllers\Docs\OperatorDocsController::class => OperatorControllerFactories\Docs\OperatorDocsControllerFactory::class, + OperatorControllers\OperatorController::class => OperatorControllerFactories\OperatorControllerFactory::class, + ApplicationControllers\ApplicationController::class => ApplicationControllerFactories\ApplicationControllerFactory::class, ApplicationControllers\Docs\ApplicationDocsController::class => ApplicationControllerFactories\Docs\ApplicationDocsControllerFactory::class, ApplicationControllers\Fees\ApplicationFeesController::class => ApplicationControllerFactories\Fees\ApplicationFeesControllerFactory::class, ApplicationControllers\Processing\ApplicationProcessingOverviewController::class => ApplicationControllerFactories\Processing\ApplicationProcessingOverviewControllerFactory::class, @@ -674,7 +687,9 @@ 'Helper\ApplicationOverview' => HelperService\ApplicationOverviewHelperService::class, 'Helper\LicenceOverview' => HelperService\LicenceOverviewHelperService::class, 'Processing\CreateVariation' => ProcessingService\CreateVariationProcessingServiceFactory::class, - 'LicenceListener' => LicenceListener::class + 'LicenceListener' => LicenceListener::class, + RouteStackInterface::class => 'Router', + Request::class => 'Request', ], 'invokables' => [ 'ApplicationUtility' => 'Olcs\Service\Utility\ApplicationUtility', @@ -708,20 +723,21 @@ ApplicationFurniture::class => ApplicationFurniture::class, LicenceFurniture::class => LicenceFurniture::class, OrganisationFurniture::class => OrganisationFurniture::class, - VariationFurniture::class => VariationFurniture::class, - BusRegFurniture::class => BusRegFurniture::class, - CasesFurniture::class => CasesFurniture::class, - SubmissionsFurniture::class => SubmissionsFurniture::class, - TransportManagerFurniture::class => TransportManagerFurniture::class, - IrhpApplicationFurniture::class => IrhpApplicationFurniture::class, - Olcs\Listener\RouteParam\Cases::class => Olcs\Listener\RouteParam\Cases::class, - 'Olcs\Listener\RouteParam\CaseMarker' => 'Olcs\Listener\RouteParam\CaseMarker', - RouteParam\Organisation::class => RouteParam\Organisation::class, - 'Olcs\Navigation\RightHandNavigation' => 'Olcs\Navigation\RightHandNavigationFactory', - HeaderSearch::class => HeaderSearch::class, + VariationFurniture::class => VariationFurniture::class, + BusRegFurniture::class => BusRegFurniture::class, + CasesFurniture::class => CasesFurniture::class, + SubmissionsFurniture::class => SubmissionsFurniture::class, + TransportManagerFurniture::class => TransportManagerFurniture::class, + IrhpApplicationFurniture::class => IrhpApplicationFurniture::class, + Olcs\Listener\RouteParam\Cases::class => Olcs\Listener\RouteParam\Cases::class, + 'Olcs\Listener\RouteParam\CaseMarker' => 'Olcs\Listener\RouteParam\CaseMarker', + RouteParam\Organisation::class => RouteParam\Organisation::class, + RouteParam\Conversation::class => RouteParam\Conversation::class, + 'Olcs\Navigation\RightHandNavigation' => 'Olcs\Navigation\RightHandNavigationFactory', + HeaderSearch::class => HeaderSearch::class, Olcs\Data\Mapper\BilateralApplicationValidationModifier::class => Olcs\Data\Mapper\BilateralApplicationValidationModifierFactory::class, - Olcs\Data\Mapper\IrhpApplication::class => + Olcs\Data\Mapper\IrhpApplication::class => Olcs\Data\Mapper\IrhpApplicationFactory::class, Olcs\Service\Permits\Bilateral\ApplicationFormPopulator::class => @@ -829,6 +845,30 @@ RouteParam\LicenceFurniture::class, RouteParam\Licence::class, ], + ApplicationEnableDisableMessagingController::class => [ + RouteParam\Conversation::class, + ], + LicenceEnableDisableMessagingController::class => [ + RouteParam\Conversation::class, + ], + ApplicationConversationListController::class => [ + RouteParam\Conversation::class, + ], + LicenceConversationListController::class => [ + RouteParam\Conversation::class, + ], + LicenceConversationMessagesController::class => [ + RouteParam\Conversation::class, + ], + ApplicationConversationMessagesController::class => [ + RouteParam\Conversation::class, + ], + LicenceCreateConversationController::class => [ + RouteParam\Conversation::class, + ], + ApplicationCreateConversationController::class => [ + RouteParam\Conversation::class, + ], ], 'search' => [ 'invokables' => [ diff --git a/app/internal/module/Olcs/config/navigation.config.php b/app/internal/module/Olcs/config/navigation.config.php index df0a01ca90..0b5ef2f80f 100644 --- a/app/internal/module/Olcs/config/navigation.config.php +++ b/app/internal/module/Olcs/config/navigation.config.php @@ -918,7 +918,7 @@ ], [ - 'id' => 'conversation_list_new_conversation', + 'id' => 'licence_new_conversation', 'label' => 'New Conversation', 'route' => 'licence/conversation/new', 'class' => 'govuk-link--no-visited-state', @@ -931,6 +931,13 @@ 'route' => 'licence/conversation/disable', 'class' => 'govuk-link--no-visited-state', 'use_route_match' => true, + ], + [ + 'id' => 'conversation_list_enable_messaging', + 'label' => 'Enable Messaging', + 'route' => 'licence/conversation/enable', + 'class' => 'govuk-link--no-visited-state', + 'use_route_match' => true, ] ], ], @@ -1396,18 +1403,25 @@ 'use_route_match' => true, ], [ - 'id' => 'conversation_list_new_conversation', - 'label' => 'New Message', + 'id' => 'application_new_conversation', + 'label' => 'New Conversation', 'route' => 'lva-application/conversation/new', 'class' => 'govuk-link--no-visited-state', 'use_route_match' => true, ], [ - 'id' => 'conversation_list_disable_messaging', + 'id' => 'application_conversation_list_disable_messaging', 'label' => 'Disable Messaging', 'route' => 'lva-application/conversation/disable', 'class' => 'govuk-link--no-visited-state', 'use_route_match' => true, + ], + [ + 'id' => 'application_conversation_list_enable_messaging', + 'label' => 'Enable Messaging', + 'route' => 'lva-application/conversation/enable', + 'class' => 'govuk-link--no-visited-state', + 'use_route_match' => true, ] ], ], diff --git a/app/internal/module/Olcs/config/routes.config.php b/app/internal/module/Olcs/config/routes.config.php index 12ed51ab01..4852482083 100644 --- a/app/internal/module/Olcs/config/routes.config.php +++ b/app/internal/module/Olcs/config/routes.config.php @@ -769,8 +769,8 @@ 'route' => 'new[/]', 'verb' => 'GET', 'defaults' => [ - 'controller' => Olcs\Controller\Messages\LicenceNewConversationController::class, - 'action' => 'index' + 'controller' => Olcs\Controller\Messages\LicenceCreateConversationController::class, + 'action' => 'add' ], ], 'may_terminate' => true, @@ -788,15 +788,59 @@ ], 'disable' => [ 'type' => 'segment', - 'options' => [ - 'route' => 'disable[/]', - 'verb' => 'GET', - 'defaults' => [ - 'controller' => Olcs\Controller\Messages\LicenceDisableConversationListController::class, - 'action' => 'index' - ] - ], - 'may_terminate' => true, + 'options' => [ + 'route' => 'disable[/]', + 'verb' => 'GET', + 'defaults' => [ + 'controller' => Olcs\Controller\Messages\LicenceEnableDisableMessagingController::class, + 'action' => 'index', + 'type' => 'disable', + ] + ], + 'may_terminate' => true, + 'child_routes' => [ + 'popup' => [ + 'type' => 'segment', + 'options' => [ + 'route' => 'popup[/]', + 'verb' => 'POST', + 'defaults' => [ + 'controller' => Olcs\Controller\Messages\LicenceEnableDisableMessagingController::class, + 'action' => 'popup', + 'type' => 'disable', + ], + ], + 'may_terminate' => true, + ], + ], + ], + 'enable' => [ + 'type' => 'segment', + 'options' => [ + 'route' => 'enable[/]', + 'verb' => 'GET', + 'defaults' => [ + 'controller' => Olcs\Controller\Messages\LicenceEnableDisableMessagingController::class, + 'action' => 'index', + 'type' => 'enable', + ] + ], + 'may_terminate' => true, + 'child_routes' => [ + 'popup' => [ + 'type' => 'segment', + 'options' => [ + 'route' => 'popup[/]', + 'verb' => 'POST', + 'defaults' => [ + 'controller' => Olcs\Controller\Messages\LicenceEnableDisableMessagingController::class, + 'action' => 'popup', + 'type' => 'enable', + ], + ], + 'may_terminate' => true, + ], + ], ], ], ], @@ -2600,10 +2644,10 @@ 'print-receipt' => $feePrintReceiptRoute, ) ), - 'conversation' => [ + 'conversation' => [ 'type' => 'segment', 'options' => [ - 'route' => 'conversation', + 'route' => 'conversation[/]', 'verb' => 'GET', 'defaults' => [ 'controller' => Olcs\Controller\Messages\ApplicationConversationListController::class, @@ -2618,9 +2662,9 @@ 'route' => ':conversation[/]', 'verb' => 'GET', 'defaults' => [ - 'controller' => Olcs\Controller\Messages\LicenceConversationMessagesController::class, + 'controller' => Olcs\Controller\Messages\ApplicationConversationMessagesController::class, 'action' => 'index' - ], + ], ], 'may_terminate' => true, ], @@ -2630,8 +2674,19 @@ 'route' => 'new[/]', 'verb' => 'GET', 'defaults' => [ - 'controller' => Olcs\Controller\Messages\LicenceNewConversationController::class, - 'action' => 'index' + 'controller' => Olcs\Controller\Messages\ApplicationCreateConversationController::class, + 'action' => 'add' + ], + ], + 'may_terminate' => true, + ], + 'close' => [ + 'type' => 'segment', + 'options' => [ + 'route' => ':conversation/close[/]', + 'defaults' => [ + 'controller' => Olcs\Controller\Messages\ApplicationCloseConversationController::class, + 'action' => 'confirm' ], ], 'may_terminate' => true, @@ -2642,11 +2697,55 @@ 'route' => 'disable[/]', 'verb' => 'GET', 'defaults' => [ - 'controller' => Olcs\Controller\Messages\LicenceDisableConversationListController::class, - 'action' => 'index' + 'controller' => Olcs\Controller\Messages\ApplicationEnableDisableMessagingController::class, + 'action' => 'index', + 'type' => 'disable', + ] + ], + 'may_terminate' => true, + 'child_routes' => [ + 'popup' => [ + 'type' => 'segment', + 'options' => [ + 'route' => 'popup[/]', + 'verb' => 'POST', + 'defaults' => [ + 'controller' => Olcs\Controller\Messages\ApplicationEnableDisableMessagingController::class, + 'action' => 'popup', + 'type' => 'disable', + ], + ], + 'may_terminate' => true, ], ], + ], + 'enable' => [ + 'type' => 'segment', + 'options' => [ + 'route' => 'enable[/]', + 'verb' => 'GET', + 'defaults' => [ + 'controller' => Olcs\Controller\Messages\ApplicationEnableDisableMessagingController::class, + 'action' => 'index', + 'type' => 'enable', + ] + ], 'may_terminate' => true, + 'child_routes' => [ + 'popup' => [ + 'type' => 'segment', + 'options' => [ + 'route' => 'popup[/]', + 'verb' => 'POST', + 'defaults' => [ + 'controller' => Olcs\Controller\Messages\ApplicationEnableDisableMessagingController::class, + 'action' => 'popup', + 'type' => 'enable', + ], + ], + 'may_terminate' => true, + ], + ], ], ], ], diff --git a/app/internal/module/Olcs/src/Controller/AbstractInternalController.php b/app/internal/module/Olcs/src/Controller/AbstractInternalController.php index cabc974bf6..dd2a845a95 100644 --- a/app/internal/module/Olcs/src/Controller/AbstractInternalController.php +++ b/app/internal/module/Olcs/src/Controller/AbstractInternalController.php @@ -344,7 +344,7 @@ public function detailsAction() } /** - * Add's an entity + * Adds an entity * * @return mixed|ViewModel */ @@ -857,7 +857,7 @@ public function redirectConfig(array $restResponse) $action = $this->params()->fromRoute('action', null); $action = strtolower($action); - // intercept cancelled forms to allow alternative redirect config + // Intercept cancelled forms to allow alternative redirect config if ($this->hasCancelledForm() && isset($this->redirectConfig['cancel'])) { $action = 'cancel'; } @@ -870,12 +870,12 @@ public function redirectConfig(array $restResponse) $config = $this->redirectConfig[$action]; - //overrides the default action - case overview controller would use "details" here + // Overrides the default action - case overview controller would use "details" here if (isset($config['action'])) { $params['action'] = $config['action']; } - //allows us to reuse some route params but not others (with reUseParams set to false) + // Allows us to reuse some route params but not others (with reUseParams set to false) if (isset($config['routeMap'])) { foreach ($config['routeMap'] as $routeIdentifier => $routeParam) { $params[$routeIdentifier] = $this->params()->fromRoute($routeParam, null); @@ -892,22 +892,22 @@ public function redirectConfig(array $restResponse) $redirect = []; - //if we're overriding the default route + // If we're overriding the default route if (isset($config['route'])) { $redirect['route'] = $config['route']; } - //if we're adding params + // If we're adding params if (!empty($params)) { $redirect['params'] = $params; } - //whether we're reusing params + // Whether we're reusing params if (isset($config['reUseParams'])) { $redirect['reUseParams'] = $config['reUseParams']; } - // options + // Options if (isset($config['options'])) { $redirect['options'] = $config['options']; } diff --git a/app/internal/module/Olcs/src/Controller/Factory/Messages/ApplicationCloseConversationControllerFactory.php b/app/internal/module/Olcs/src/Controller/Factory/Messages/ApplicationCloseConversationControllerFactory.php new file mode 100644 index 0000000000..e069b8b3b8 --- /dev/null +++ b/app/internal/module/Olcs/src/Controller/Factory/Messages/ApplicationCloseConversationControllerFactory.php @@ -0,0 +1,38 @@ +get(ScriptFactory::class); + $formHelper = $container->get(FormHelperService::class); + $tableFactory = $container->get(TableFactory::class); + $viewHelperManager = $container->get(HelperPluginManager::class); + $flashMessengerHelperService = $container->get(FlashMessengerHelperService::class); + + return new ApplicationCloseConversationController( + $scriptFactory, + $formHelper, + $tableFactory, + $viewHelperManager, + $flashMessengerHelperService, + ); + } +} diff --git a/app/internal/module/Olcs/src/Controller/Factory/Messages/ApplicationConversationListControllerFactory.php b/app/internal/module/Olcs/src/Controller/Factory/Messages/ApplicationConversationListControllerFactory.php index 0424917168..4c13bbaf1c 100644 --- a/app/internal/module/Olcs/src/Controller/Factory/Messages/ApplicationConversationListControllerFactory.php +++ b/app/internal/module/Olcs/src/Controller/Factory/Messages/ApplicationConversationListControllerFactory.php @@ -5,8 +5,7 @@ use Common\Service\Helper\FlashMessengerHelperService; use Common\Service\Helper\FormHelperService; use Common\Service\Helper\TranslationHelperService; -use Laminas\Navigation\Navigation; -use Interop\Container\ContainerInterface; +use Psr\Container\ContainerInterface; use Laminas\ServiceManager\Factory\FactoryInterface; use Olcs\Controller\Messages\ApplicationConversationListController; @@ -21,16 +20,12 @@ class ApplicationConversationListControllerFactory implements FactoryInterface public function __invoke(ContainerInterface $container, $requestedName, array $options = null): ApplicationConversationListController { $formHelper = $container->get(FormHelperService::class); - assert($formHelper instanceof FormHelperService); $translationHelper = $container->get(TranslationHelperService::class); - assert($translationHelper instanceof TranslationHelperService); $flashMessenger = $container->get(FlashMessengerHelperService::class); - assert($flashMessenger instanceof FlashMessengerHelperService); $navigation = $container->get('navigation'); - assert($navigation instanceof Navigation); return new ApplicationConversationListController( $translationHelper, diff --git a/app/internal/module/Olcs/src/Controller/Factory/Messages/ApplicationConversationMessagesControllerFactory.php b/app/internal/module/Olcs/src/Controller/Factory/Messages/ApplicationConversationMessagesControllerFactory.php new file mode 100644 index 0000000000..c80ccce6e0 --- /dev/null +++ b/app/internal/module/Olcs/src/Controller/Factory/Messages/ApplicationConversationMessagesControllerFactory.php @@ -0,0 +1,34 @@ +get(FormHelperService::class); + $translationHelper = $container->get(TranslationHelperService::class); + $flashMessenger = $container->get(FlashMessengerHelperService::class); + $scriptsFactory = $container->get(ScriptFactory::class); + + $navigation = $container->get('navigation'); + + return new ApplicationConversationMessagesController( + $translationHelper, + $formHelper, + $flashMessenger, + $navigation, + $scriptsFactory + ); + } +} diff --git a/app/internal/module/Olcs/src/Controller/Factory/Messages/LicenceNewConversationControllerFactory.php b/app/internal/module/Olcs/src/Controller/Factory/Messages/ApplicationCreateConversationControllerFactory.php similarity index 57% rename from app/internal/module/Olcs/src/Controller/Factory/Messages/LicenceNewConversationControllerFactory.php rename to app/internal/module/Olcs/src/Controller/Factory/Messages/ApplicationCreateConversationControllerFactory.php index ca99aefd70..224c6bd022 100644 --- a/app/internal/module/Olcs/src/Controller/Factory/Messages/LicenceNewConversationControllerFactory.php +++ b/app/internal/module/Olcs/src/Controller/Factory/Messages/ApplicationCreateConversationControllerFactory.php @@ -5,34 +5,31 @@ use Common\Service\Helper\FlashMessengerHelperService; use Common\Service\Helper\FormHelperService; use Common\Service\Helper\TranslationHelperService; -use Laminas\Navigation\Navigation; -use Interop\Container\ContainerInterface; +use Psr\Container\ContainerInterface; use Laminas\ServiceManager\Factory\FactoryInterface; -use Olcs\Controller\Messages\LicenceNewConversationController; +use Olcs\Controller\Messages\ApplicationCreateConversationController; -class LicenceNewConversationControllerFactory implements FactoryInterface +class ApplicationCreateConversationControllerFactory implements FactoryInterface { /** * @param ContainerInterface $container * @param $requestedName * @param array|null $options - * @return LicenceNewConversationController + * @return ApplicationCreateConversationController */ - public function __invoke(ContainerInterface $container, $requestedName, array $options = null): LicenceNewConversationController + public function __invoke(ContainerInterface $container, $requestedName, array $options = null): ApplicationCreateConversationController { + $container = method_exists($container, 'getServiceLocator') ? $container->getServiceLocator() : $container; + $formHelper = $container->get(FormHelperService::class); - assert($formHelper instanceof FormHelperService); $translationHelper = $container->get(TranslationHelperService::class); - assert($translationHelper instanceof TranslationHelperService); $flashMessenger = $container->get(FlashMessengerHelperService::class); - assert($flashMessenger instanceof FlashMessengerHelperService); $navigation = $container->get('navigation'); - assert($navigation instanceof Navigation); - return new LicenceNewConversationController( + return new ApplicationCreateConversationController( $translationHelper, $formHelper, $flashMessenger, diff --git a/app/internal/module/Olcs/src/Controller/Factory/Messages/ApplicationEnableDisableMessagingControllerFactory.php b/app/internal/module/Olcs/src/Controller/Factory/Messages/ApplicationEnableDisableMessagingControllerFactory.php new file mode 100644 index 0000000000..965c17b477 --- /dev/null +++ b/app/internal/module/Olcs/src/Controller/Factory/Messages/ApplicationEnableDisableMessagingControllerFactory.php @@ -0,0 +1,46 @@ +get(ScriptFactory::class); + $formHelper = $container->get(FormHelperService::class); + $tableFactory = $container->get(TableFactory::class); + $viewHelperManager = $container->get(HelperPluginManager::class); + $dataServiceManager = $container->get(PluginManager::class); + $oppositionHelper = $container->get(OppositionHelperService::class); + $complaintsHelper = $container->get(ComplaintsHelperService::class); + $flashMessengerHelper = $container->get(FlashMessengerHelperService::class); + $urlHelper = $container->get(UrlHelperService::class); + + return new ApplicationEnableDisableMessagingController( + $scriptFactory, + $formHelper, + $tableFactory, + $viewHelperManager, + $dataServiceManager, + $oppositionHelper, + $complaintsHelper, + $flashMessengerHelper, + $urlHelper, + ); + } +} diff --git a/app/internal/module/Olcs/src/Controller/Factory/Messages/LicenceCloseConversationControllerFactory.php b/app/internal/module/Olcs/src/Controller/Factory/Messages/LicenceCloseConversationControllerFactory.php index c3e93b6ca4..8d40ac385b 100644 --- a/app/internal/module/Olcs/src/Controller/Factory/Messages/LicenceCloseConversationControllerFactory.php +++ b/app/internal/module/Olcs/src/Controller/Factory/Messages/LicenceCloseConversationControllerFactory.php @@ -17,7 +17,7 @@ class LicenceCloseConversationControllerFactory implements FactoryInterface { public function __invoke( ContainerInterface $container, - string $requestedName, + $requestedName, ?array $options = null ): LicenceCloseConversationController { diff --git a/app/internal/module/Olcs/src/Controller/Factory/Messages/LicenceCreateConversationControllerFactory.php b/app/internal/module/Olcs/src/Controller/Factory/Messages/LicenceCreateConversationControllerFactory.php new file mode 100644 index 0000000000..e393bf737b --- /dev/null +++ b/app/internal/module/Olcs/src/Controller/Factory/Messages/LicenceCreateConversationControllerFactory.php @@ -0,0 +1,41 @@ +get(FormHelperService::class); + + $translationHelper = $container->get(TranslationHelperService::class); + + $flashMessenger = $container->get(FlashMessengerHelperService::class); + + $navigation = $container->get('navigation'); + + return new LicenceCreateConversationController( + $translationHelper, + $formHelper, + $flashMessenger, + $navigation + ); + } +} diff --git a/app/internal/module/Olcs/src/Controller/Factory/Messages/LicenceDisableConversationListControllerFactory.php b/app/internal/module/Olcs/src/Controller/Factory/Messages/LicenceDisableConversationListControllerFactory.php deleted file mode 100644 index b57a72290c..0000000000 --- a/app/internal/module/Olcs/src/Controller/Factory/Messages/LicenceDisableConversationListControllerFactory.php +++ /dev/null @@ -1,42 +0,0 @@ -get(FormHelperService::class); - assert($formHelper instanceof FormHelperService); - - $translationHelper = $container->get(TranslationHelperService::class); - assert($translationHelper instanceof TranslationHelperService); - - $flashMessenger = $container->get(FlashMessengerHelperService::class); - assert($flashMessenger instanceof FlashMessengerHelperService); - - $navigation = $container->get('navigation'); - assert($navigation instanceof Navigation); - - return new LicenceDisableConversationListController( - $translationHelper, - $formHelper, - $flashMessenger, - $navigation - ); - } -} diff --git a/app/internal/module/Olcs/src/Controller/Factory/Messages/LicenceEnableDisableMessagingControllerFactory.php b/app/internal/module/Olcs/src/Controller/Factory/Messages/LicenceEnableDisableMessagingControllerFactory.php new file mode 100644 index 0000000000..bf46a0791b --- /dev/null +++ b/app/internal/module/Olcs/src/Controller/Factory/Messages/LicenceEnableDisableMessagingControllerFactory.php @@ -0,0 +1,46 @@ +get(ScriptFactory::class); + $formHelper = $container->get(FormHelperService::class); + $tableFactory = $container->get(TableFactory::class); + $viewHelperManager = $container->get(HelperPluginManager::class); + $dataServiceManager = $container->get(PluginManager::class); + $oppositionHelper = $container->get(OppositionHelperService::class); + $complaintsHelper = $container->get(ComplaintsHelperService::class); + $flashMessengerHelper = $container->get(FlashMessengerHelperService::class); + $urlHelper = $container->get(UrlHelperService::class); + + return new LicenceEnableDisableMessagingController( + $scriptFactory, + $formHelper, + $tableFactory, + $viewHelperManager, + $dataServiceManager, + $oppositionHelper, + $complaintsHelper, + $flashMessengerHelper, + $urlHelper, + ); + } +} diff --git a/app/internal/module/Olcs/src/Controller/IndexController.php b/app/internal/module/Olcs/src/Controller/IndexController.php index 9b548b03ef..bfef46bd71 100644 --- a/app/internal/module/Olcs/src/Controller/IndexController.php +++ b/app/internal/module/Olcs/src/Controller/IndexController.php @@ -2,6 +2,7 @@ namespace Olcs\Controller; +use Common\FeatureToggle; use Common\RefData; use Common\Service\Helper\FlashMessengerHelperService; use Common\Service\Helper\FormHelperService; @@ -10,6 +11,7 @@ use Laminas\View\HelperPluginManager; use Laminas\View\Model\JsonModel; use Laminas\View\Model\ViewModel; +use Dvsa\Olcs\Transfer\Query\FeatureToggle\IsEnabled as IsEnabledQry; use Olcs\Controller\Interfaces\LeftViewProvider; use Olcs\Controller\Traits\TaskSearchTrait; use Olcs\Service\Data\DocumentSubCategory; @@ -95,8 +97,8 @@ public function indexAction() $filters = $this->mapTaskFilters(); /** - * @var \Common\Service\Table\TableBuilder $table -*/ + * @var \Common\Service\Table\TableBuilder $table + */ $table = null; // assignedToTeam or Category must be selected @@ -138,6 +140,11 @@ public function getLeftView() $form = $this->getTaskForm($filters) ->remove('showTasks'); + $messagingEnabled = $this->handleQuery(IsEnabledQry::create(['ids' => [FeatureToggle::MESSAGING]]))->getResult()['isEnabled']; + if (!$messagingEnabled) { + $form->remove('messaging'); + } + $left = new ViewModel(['form' => $form]); $left->setTemplate('sections/home/partials/left'); @@ -162,13 +169,12 @@ public function entityListAction() break; case 'task-allocation-users': /** - * @var \Olcs\Service\Data\UserListInternal $srv -*/ + * @var \Olcs\Service\Data\UserListInternal $srv + */ $srv = $this->userListInternalDataService; $srv->setTeamId($value); - $results = - [ + $results = [ '' => 'Unassigned', 'alpha-split' => 'Alpha split', ] + @@ -177,61 +183,53 @@ public function entityListAction() break; case 'users-internal': /** - * @var \Olcs\Service\Data\UserListInternal $srv -*/ + * @var \Olcs\Service\Data\UserListInternal $srv + */ $srv = $this->userListInternalDataService; $srv->setTeamId($value); - $results = - [ + $results = [ '' => ((int)$value > 0 ? 'Unassigned' : 'Please select'), - ] + - $srv->fetchListOptions(null); + ] + $srv->fetchListOptions(null); break; case 'users-internal-exclude-limited-read-only': /** - * @var \Olcs\Service\Data\UserListInternalExcludingLimitedReadOnlyUsers $srv -*/ + * @var \Olcs\Service\Data\UserListInternalExcludingLimitedReadOnlyUsers $srv + */ $srv = $this->userListInternalExcludingDataService; $srv->setTeamId($value); - $results = - [ + $results = [ '' => ((int)$value > 0 ? 'Unassigned' : 'Please select'), - ] + - $srv->fetchListOptions(null); + ] + $srv->fetchListOptions(null); + break; case 'users': $results = $this->getListDataUser($value, 'All'); break; case 'sub-categories': - $srv = $this->subCategoryDataService - ->setCategory($value); + $srv = $this->subCategoryDataService->setCategory($value); $results = ['' => 'All'] + $srv->fetchListOptions(); break; case 'sub-categories-no-first-option': $results = $this->subCategoryDataService - ->setCategory($value) - ->fetchListOptions(); + ->setCategory($value) + ->fetchListOptions(); break; case 'task-sub-categories': - $srv = $this->taskSubCategoryDataService - ->setCategory($value); + $srv = $this->taskSubCategoryDataService->setCategory($value); $results = ['' => 'All'] + $srv->fetchListOptions(); break; case 'document-sub-categories': - $srv = $this->documentSubCategoryDataService - ->setCategory($value); + $srv = $this->documentSubCategoryDataService->setCategory($value); $results = ['' => 'All'] + $srv->fetchListOptions(); break; case 'document-sub-categories-with-docs': - $srv = $this->documentSubCategoryWithDocsDataService - ->setCategory($value); + $srv = $this->documentSubCategoryWithDocsDataService->setCategory($value); $results = ['' => 'All'] + $srv->fetchListOptions(); break; case 'scanning-sub-categories': - $srv = $this->scannerSubCategoryDataService - ->setCategory($value); + $srv = $this->scannerSubCategoryDataService->setCategory($value); $results = ['' => 'All'] + $srv->fetchListOptions(); break; case 'document-templates': @@ -239,28 +237,29 @@ public function entityListAction() break; case 'sub-category-descriptions': $results = $this->subCategoryDescriptionDataService - ->setSubCategory($value) - ->fetchListOptions(); + ->setSubCategory($value) + ->fetchListOptions(); break; case 'irhp-permit-print-country': $srv = $this->irhpPermitPrintCountryDataService - ->setIrhpPermitType($value); + ->setIrhpPermitType($value); $results = ['' => 'Please select'] + $srv->fetchListOptions(); break; case 'irhp-permit-print-stock-by-country': $srv = $this->irhpPermitPrintStockDataService - ->setIrhpPermitType(RefData::IRHP_BILATERAL_PERMIT_TYPE_ID) - ->setCountry($value); + ->setIrhpPermitType(RefData::IRHP_BILATERAL_PERMIT_TYPE_ID) + ->setCountry($value); $results = ['' => 'Please select'] + $srv->fetchListOptions(); + break; case 'irhp-permit-print-stock-by-type': $srv = $this->irhpPermitPrintStockDataService - ->setIrhpPermitType($value); + ->setIrhpPermitType($value); $results = ['' => 'Please select'] + $srv->fetchListOptions(); break; case 'irhp-permit-print-range-type-by-stock': $srv = $this->irhpPermitPrintRangeTypeDataService - ->setIrhpPermitStock($value); + ->setIrhpPermitStock($value); $results = ['' => 'Please select'] + $srv->fetchListOptions(); break; default: diff --git a/app/internal/module/Olcs/src/Controller/Messages/AbstractCloseConversationController.php b/app/internal/module/Olcs/src/Controller/Messages/AbstractCloseConversationController.php new file mode 100644 index 0000000000..0ee9501095 --- /dev/null +++ b/app/internal/module/Olcs/src/Controller/Messages/AbstractCloseConversationController.php @@ -0,0 +1,72 @@ + [FeatureToggle::MESSAGING], + ]; + private FlashMessengerHelperService $flashMessengerHelperService; + + public function __construct( + ScriptFactory $scriptFactory, + FormHelperService $formHelper, + TableFactory $tableFactory, + HelperPluginManager $viewHelperManager, + FlashMessengerHelperService $flashMessengerHelperService + ) { + parent::__construct($scriptFactory, $formHelper, $tableFactory, $viewHelperManager); + + $this->flashMessengerHelperService = $flashMessengerHelperService; + } + + abstract protected function getRedirect(): Response; + + /** + * @return ViewModel|Response + */ + public function confirmAction() + { + $form = $this->getForm(CloseConversation::class); + $form->get('id')->setValue($this->params()->fromRoute('conversation')); + + if ($this->getRequest()->isPost()) { + $closeCommand = Close::create(['id' => $this->params()->fromRoute('conversation')]); + $response = $this->handleCommand($closeCommand); + + if ($response->isOk()) { + $this->flashMessengerHelperService->addSuccessMessage('conversation-closed-success'); + + return $this->getRedirect(); + } else { + if ($response->isClientError()) { + Task::mapFormErrors($response->getResult()['messages'], $form, $this->flashMessengerHelperService); + } else { + $this->flashMessengerHelperService->addUnknownError(); + } + } + } + + $view = new ViewModel(['form' => $form]); + $view->setTemplate('pages/form'); + + return $this->renderView($view, 'End Conversation'); + } +} diff --git a/app/internal/module/Olcs/src/Controller/Messages/AbstractConversationMessagesController.php b/app/internal/module/Olcs/src/Controller/Messages/AbstractConversationMessagesController.php new file mode 100644 index 0000000000..3a527d5c20 --- /dev/null +++ b/app/internal/module/Olcs/src/Controller/Messages/AbstractConversationMessagesController.php @@ -0,0 +1,145 @@ + [ + FeatureToggle::MESSAGING + ], + ]; + protected ScriptFactory $scriptFactory; + + public function __construct( + TranslationHelperService $translationHelper, + FormHelperService $formHelper, + FlashMessengerHelperService $flashMessenger, + Navigation $navigation, + ScriptFactory $scriptFactory + ) + { + parent::__construct($translationHelper, $formHelper, $flashMessenger, $navigation); + + $this->scriptFactory = $scriptFactory; + } + + /** + * @inheritDoc + */ + public function indexAction() + { + $this->scriptFactory->loadFiles(['table-actions']); + + $paramProvider = (new GenericList($this->listVars, $this->defaultTableSortField, $this->defaultTableOrderField)) + ->setDefaultLimit($this->defaultTableLimit); + $paramProvider->setParams($this->plugin('params')); + $providedParameters = $this->modifyListQueryParameters($paramProvider->provideParameters()); + $response = $this->handleQuery($this->listDto::create($providedParameters)); + + $replyForm = $this->getForm(LicenceMessageReply::class); + $replyForm->get('id')->setValue($this->params()->fromRoute('conversation')); + $this->placeholder()->setPlaceholder('send-reply', $replyForm); + + $actionsForm = $this->getForm(LicenceMessageActions::class); + $actionsForm->get('id')->setValue($this->params()->fromRoute('conversation')); + + if ($response->getResult()['extra']['conversation']['isClosed']) { + $actionsForm->get('form-actions')->get('close')->setAttribute('disabled', 'disabled'); + $actionsForm->get('form-actions')->get('close')->setAttribute( + 'class', + 'govuk-button govuk-button--warning govuk-button--disabled' + ); + } + + $this->placeholder()->setPlaceholder('message-actions', $actionsForm); + + if (!$this->getRequest()->isPost()) { + return parent::indexAction(); + } + + $action = strtolower($this->params()->fromPost('action')); + switch ($action) { + case 'end and archive conversation': + $params = [ + 'application' => $this->params()->fromRoute('application'), + 'licence' => $this->params()->fromRoute('licence'), + 'conversation' => $this->params()->fromRoute('conversation'), + 'action' => $this->params()->fromRoute('confirm'), + ]; + $route = $this->topNavigationId === 'application' ? 'lva-application' : 'licence'; + return $this->redirect()->toRoute($route . '/conversation/close', $params); + case 'reply': + return $this->parseReply($replyForm); + } + } + + /** @return Response|ViewModel */ + protected function parseReply(Form $form) + { + $form->setData((array)$this->params()->fromPost()); + $form->get('id')->setValue($this->params()->fromRoute('conversation')); + + if (!$form->isValid()) { + return parent::indexAction(); + } + + $response = $this->handleCommand(CreateMessageCommand::create([ + 'conversation' => $this->params()->fromRoute('conversation'), + 'messageContent' => $form->get('form-actions')->get('reply')->getValue() + ])); + + if ($response->isOk()) { + $this->flashMessengerHelperService->addSuccessMessage('Reply submitted successfully'); + $route = $this->topNavigationId === 'application' ? 'lva-application' : 'licence'; + return $this->redirect()->toRoute($route . '/conversation/view', $this->params()->fromRoute()); + } + + $this->handleErrors($response->getResult()); + + return parent::indexAction(); + } + + public function getLeftView(): ViewModel + { + $view = new ViewModel(['navigationId' => $this->navigationId]); + $view->setTemplate('sections/messages/partials/left'); + + return $view; + } + + public function getNavigationId() + { + return $this->topNavigationId; + } +} diff --git a/app/internal/module/Olcs/src/Controller/Messages/AbstractCreateConversationController.php b/app/internal/module/Olcs/src/Controller/Messages/AbstractCreateConversationController.php new file mode 100644 index 0000000000..4290b9f670 --- /dev/null +++ b/app/internal/module/Olcs/src/Controller/Messages/AbstractCreateConversationController.php @@ -0,0 +1,128 @@ + [ + FeatureToggle::MESSAGING + ], + ]; + + protected $inlineScripts = [ + 'addAction' => ['forms/message-categories'] + ]; + + public function getLeftView(): ViewModel + { + $view = new ViewModel(['navigationId' => $this->navigationId]); + $view->setTemplate('sections/messages/partials/left'); + + return $view; + } + + public function alterFormForAdd($form) + { + $appLicNoSelect = $form->get('fields')->get('appOrLicNo'); + + if ($this->params()->fromRoute('licence')){ + $licenceId = $this->params()->fromRoute('licence'); + $data = $this->handleQuery( + ByLicenceToOrganisation::create(['licence' => $licenceId]) + ); + } elseif ($this->params()->fromRoute('application')) { + $applicationId = $this->params()->fromRoute('application'); + $data = $this->handleQuery( + ByApplicationToOrganisation::create(['application' => $applicationId]) + ); + } else { + throw new RuntimeException('Error: licence or application required'); + } + + $applicationLicenceArray = json_decode($data->getHttpResponse()->getBody(), true); + + $this->prefixArrayKey($applicationLicenceArray['results']['licences'], 'L'); + $this->prefixArrayKey($applicationLicenceArray['results']['applications'], 'A'); + + $options = []; + + if($applicationLicenceArray['results']['licences']){ + $options['licence'] = [ + 'label' => 'Licences', + 'options' => $applicationLicenceArray['results']['licences'], + ]; + } + + if($applicationLicenceArray['results']['applications']){ + $options['application'] = [ + 'label' => 'Applications', + 'options' => $applicationLicenceArray['results']['applications'], + ]; + } + + $appLicNoSelect->setValueOptions($options); + + return $form; + } + + public function onDispatch(MvcEvent $e) + { + if ($this->getRequest()->isPost()) { + $postData = $this->getRequest()->getPost(); + $postFields = $postData->get('fields'); + $appOrLicNo = $postFields['appOrLicNo'] ?? null; + if (!empty($appOrLicNo)) { + switch ( str_split($appOrLicNo, 1)[0] ) + { + case 'A': + $postFields['application'] = substr_replace($appOrLicNo, '', 0, 1); + $postFields['licence'] = ''; + break; + case 'L': + $postFields['licence'] = substr_replace($appOrLicNo, '', 0, 1); + $postFields['application'] = ''; + break; + default: + throw new \Laminas\Validator\Exception\RuntimeException('Unexpected prefix in appOrLicNo'); + } + $postData->set('fields', $postFields); + $this->getRequest()->setPost($postData); + } + } + + return parent::onDispatch($e); + } + + private function prefixArrayKey(array &$array, string $prefix): void + { + foreach ($array as $k => $v) + { + $array[$prefix . $k] = $v; + unset($array[$k]); + } + } +} diff --git a/app/internal/module/Olcs/src/Controller/Messages/AbstractEnableDisableMessagingController.php b/app/internal/module/Olcs/src/Controller/Messages/AbstractEnableDisableMessagingController.php new file mode 100644 index 0000000000..0a7bfe1b7d --- /dev/null +++ b/app/internal/module/Olcs/src/Controller/Messages/AbstractEnableDisableMessagingController.php @@ -0,0 +1,114 @@ + [FeatureToggle::MESSAGING], + ]; + + abstract protected function getRoutePrefix(): string; + abstract protected function getOrganisationId(): int; + + public function indexAction() + { + $this->scriptFactory->loadFiles(['table-actions']); + + $action = $this->params()->fromRoute('type'); + + if ($this->getRequest()->isPost()) { + return $this->redirect()->toRoute( + $this->getRoutePrefix() . '/conversation/' . $action . '/popup', + $this->params()->fromRoute(), + ); + } + + if ($action === 'enable') { + $title = 'Enable messaging'; + $form = $this->getForm(EnableConversations::class); + } else { + $title = 'Disable messaging'; + $form = $this->getForm(DisableConversations::class); + } + + $view = new ViewModel(['form' => $form]); + $view->setTemplate('pages/form'); + + return $this->render($view, $title); + } + + /** @return ViewModel|Response */ + public function popupAction() + { + $organisationId = $this->getOrganisationId(); + $action = $this->params()->fromRoute('type'); + + if ($action === 'enable') { + $title = 'Enable messaging'; + $form = $this->getForm(EnableConversationsPopup::class); + } else { + $title = 'Disable messaging'; + $form = $this->getForm(DisableConversationsPopup::class); + } + + if ($this->getRequest()->isPost()) { + if ($action === 'enable') { + $message = 'messaging-enabled-success'; + $commandResponse = $this->handleCommand( + EnableCommand::create(['organisation' => $organisationId]), + ); + } else { + $message = 'messaging-disabled-success'; + $commandResponse = $this->handleCommand( + DisableCommand::create(['organisation' => $organisationId]), + ); + } + + if ($commandResponse->isOk()) { + $this->flashMessengerHelper->addSuccessMessage($message); + + return $this->redirect()->toRouteAjax( + $this->getRoutePrefix() . '/conversation', + $this->params()->fromRoute(), + ); + } elseif ($commandResponse->isClientError()) { + Task::mapFormErrors($commandResponse->getResult()['messages'], $form, $this->flashMessengerHelper); + } else { + $this->flashMessengerHelper->addUnknownError(); + } + } + + $view = new ViewModel(['form' => $form]); + $view->setTemplate('pages/form'); + + return $this->render($view, $title); + } + + public function getNavigationId() + { + return $this->navigationId; + } +} diff --git a/app/internal/module/Olcs/src/Controller/Messages/ApplicationCloseConversationController.php b/app/internal/module/Olcs/src/Controller/Messages/ApplicationCloseConversationController.php new file mode 100644 index 0000000000..9c7c584653 --- /dev/null +++ b/app/internal/module/Olcs/src/Controller/Messages/ApplicationCloseConversationController.php @@ -0,0 +1,32 @@ + $this->params()->fromRoute('application'), + 'action' => 'close', + + ]; + return $this->redirect()->toRouteAjax('lva-application/conversation', $params); + } +} diff --git a/app/internal/module/Olcs/src/Controller/Messages/ApplicationConversationListController.php b/app/internal/module/Olcs/src/Controller/Messages/ApplicationConversationListController.php index 9659987d51..9ad024703c 100644 --- a/app/internal/module/Olcs/src/Controller/Messages/ApplicationConversationListController.php +++ b/app/internal/module/Olcs/src/Controller/Messages/ApplicationConversationListController.php @@ -10,7 +10,9 @@ use Olcs\Controller\Interfaces\ApplicationControllerInterface; use Olcs\Controller\Interfaces\LeftViewProvider; -class ApplicationConversationListController extends AbstractInternalController implements LeftViewProvider, ApplicationControllerInterface, ToggleAwareInterface +class ApplicationConversationListController + extends AbstractInternalController + implements LeftViewProvider, ApplicationControllerInterface, ToggleAwareInterface { protected $navigationId = 'application_conversations'; protected $listVars = ['application']; @@ -26,7 +28,7 @@ class ApplicationConversationListController extends AbstractInternalController i */ public function getLeftView() { - $view = new ViewModel(); + $view = new ViewModel(['navigationId' => $this->navigationId]); $view->setTemplate('sections/messages/partials/left'); return $view; @@ -44,4 +46,4 @@ public function getRightView() return $view; } -} \ No newline at end of file +} diff --git a/app/internal/module/Olcs/src/Controller/Messages/ApplicationConversationMessagesController.php b/app/internal/module/Olcs/src/Controller/Messages/ApplicationConversationMessagesController.php new file mode 100644 index 0000000000..3b6d05eb66 --- /dev/null +++ b/app/internal/module/Olcs/src/Controller/Messages/ApplicationConversationMessagesController.php @@ -0,0 +1,19 @@ + [ + 'route' => 'lva-application/conversation/view', + 'resultIdMap' => [ + 'application' => 'application', + 'conversation' => 'conversation', + ], + 'reUseParams' => true + ] + ]; +} diff --git a/app/internal/module/Olcs/src/Controller/Messages/ApplicationEnableDisableMessagingController.php b/app/internal/module/Olcs/src/Controller/Messages/ApplicationEnableDisableMessagingController.php new file mode 100644 index 0000000000..8b05034c68 --- /dev/null +++ b/app/internal/module/Olcs/src/Controller/Messages/ApplicationEnableDisableMessagingController.php @@ -0,0 +1,52 @@ +getRequest()->isXmlHttpRequest()) { + return null; + } + + $view = new ViewModel(['navigationId' => 'application_conversations']); + $view->setTemplate('sections/messages/partials/left'); + + return $view; + } + + protected function getRoutePrefix(): string + { + return 'lva-application'; + } + + protected function getOrganisationId(): int + { + $queryResponse = $this->handleQuery(Application::create(['id' => $this->params()->fromRoute('application')])); + if (!$queryResponse->isOk()) { + throw new Exception( + sprintf( + 'Unexpected error when querying application for organisation ID. Response: HTTP %s :: %s', + $queryResponse->getStatusCode(), + $queryResponse->getBody(), + ) + ); + } + $queryResult = $queryResponse->getResult(); + + return $queryResult['licence']['organisation']['id']; + } +} diff --git a/app/internal/module/Olcs/src/Controller/Messages/LicenceCloseConversationController.php b/app/internal/module/Olcs/src/Controller/Messages/LicenceCloseConversationController.php index 3c0d9d6e04..6967ad2804 100644 --- a/app/internal/module/Olcs/src/Controller/Messages/LicenceCloseConversationController.php +++ b/app/internal/module/Olcs/src/Controller/Messages/LicenceCloseConversationController.php @@ -18,56 +18,15 @@ use Olcs\Data\Mapper\Task; use Olcs\Form\Model\Form\CloseConversation; -class LicenceCloseConversationController extends AbstractController implements ToggleAwareInterface +class LicenceCloseConversationController extends AbstractCloseConversationController { - protected array $toggleConfig = [ - 'default' => [FeatureToggle::MESSAGING], - ]; - private FlashMessengerHelperService $flashMessengerHelperService; - - public function __construct( - ScriptFactory $scriptFactory, - FormHelperService $formHelper, - TableFactory $tableFactory, - HelperPluginManager $viewHelperManager, - FlashMessengerHelperService $flashMessengerHelperService - ) - { - parent::__construct($scriptFactory, $formHelper, $tableFactory, $viewHelperManager); - - $this->flashMessengerHelperService = $flashMessengerHelperService; - } - - /** - * @return ViewModel|Response - */ - public function confirmAction() + protected function getRedirect(): Response { - $form = $this->getForm(CloseConversation::class); - $form->get('id')->setValue($this->params()->fromRoute('conversation')); - - if ($this->getRequest()->isPost()) { - $closeCommand = Close::create(['id' => $this->params()->fromRoute('conversation')]); - $response = $this->handleCommand($closeCommand); - - if ($response->isOk()) { - $this->flashMessengerHelperService->addSuccessMessage('conversation-closed-success'); - - $params = [ - 'licence' => $this->params()->fromRoute('licence'), - 'action' => 'close', - ]; - return $this->redirect()->toRouteAjax('licence/conversation', $params); - } else if ($response->isClientError()) { - Task::mapFormErrors($response->getResult()['messages'], $form, $this->flashMessengerHelperService); - } else { - $this->flashMessengerHelperService->addUnknownError(); - } - } - - $view = new ViewModel(['form' => $form]); - $view->setTemplate('pages/form'); + $params = [ + 'licence' => $this->params()->fromRoute('licence'), + 'action' => 'close', - return $this->renderView($view, 'End Conversation'); + ]; + return $this->redirect()->toRouteAjax('licence/conversation', $params); } } diff --git a/app/internal/module/Olcs/src/Controller/Messages/LicenceConversationListController.php b/app/internal/module/Olcs/src/Controller/Messages/LicenceConversationListController.php index f424362693..bee3d1cb67 100644 --- a/app/internal/module/Olcs/src/Controller/Messages/LicenceConversationListController.php +++ b/app/internal/module/Olcs/src/Controller/Messages/LicenceConversationListController.php @@ -10,7 +10,9 @@ use Olcs\Controller\Interfaces\LeftViewProvider; use Olcs\Controller\Interfaces\LicenceControllerInterface; -class LicenceConversationListController extends AbstractInternalController implements LeftViewProvider, LicenceControllerInterface, ToggleAwareInterface +class LicenceConversationListController + extends AbstractInternalController + implements LeftViewProvider, LicenceControllerInterface, ToggleAwareInterface { protected $navigationId = 'conversations'; protected $listVars = ['licence']; @@ -26,7 +28,7 @@ class LicenceConversationListController extends AbstractInternalController imple */ public function getLeftView() { - $view = new ViewModel(); + $view = new ViewModel(['navigationId' => $this->navigationId]); $view->setTemplate('sections/messages/partials/left'); return $view; @@ -44,4 +46,4 @@ public function getRightView() return $view; } -} \ No newline at end of file +} diff --git a/app/internal/module/Olcs/src/Controller/Messages/LicenceConversationMessagesController.php b/app/internal/module/Olcs/src/Controller/Messages/LicenceConversationMessagesController.php index ec4bccb0f1..b43e4be5b6 100644 --- a/app/internal/module/Olcs/src/Controller/Messages/LicenceConversationMessagesController.php +++ b/app/internal/module/Olcs/src/Controller/Messages/LicenceConversationMessagesController.php @@ -1,103 +1,16 @@ [ - FeatureToggle::MESSAGING - ], - ]; - protected ScriptFactory $scriptFactory; - - public function __construct( - TranslationHelperService $translationHelper, - FormHelperService $formHelper, - FlashMessengerHelperService $flashMessenger, - Navigation $navigation, - ScriptFactory $scriptFactory - ) - { - parent::__construct($translationHelper, $formHelper, $flashMessenger, $navigation); - - $this->scriptFactory = $scriptFactory; - } - - /** - * @inheritDoc - */ - public function indexAction() - { - $this->scriptFactory->loadFiles(['table-actions']); - - if (!$this->getRequest()->isPost()) { - return parent::indexAction(); - } - - $action = strtolower($this->params()->fromPost('action')); - switch ($action) { - case 'end and archive conversation': - $params = [ - 'licence' => $this->params()->fromRoute('licence'), - 'conversation' => $this->params()->fromRoute('conversation'), - 'action' => $this->params()->fromRoute('confirm'), - ]; - return $this->redirect()->toRoute('licence/conversation/close', $params); - } - } - - /** - * @param TableBuilder $table - * @param array $data - */ - protected function alterTable($table, $data): TableBuilder - { - if (!$data['extra']['conversation']['isClosed']) { - return $table; - } - - $crud = $table->getSetting('crud'); - $crud['actions']['end and archive conversation']['class'] .= ' govuk-button--disabled'; - $crud['actions']['end and archive conversation']['disabled'] = 'disabled'; - $table->setSetting('crud', $crud); - - return $table; - } - - public function getLeftView(): ViewModel - { - $view = new ViewModel(); - $view->setTemplate('sections/messages/partials/left'); - - return $view; - } - - public function getRightView(): ViewModel - { - $view = new ViewModel(); - $view->setTemplate('sections/licence/partials/right'); - - return $view; - } } diff --git a/app/internal/module/Olcs/src/Controller/Messages/LicenceCreateConversationController.php b/app/internal/module/Olcs/src/Controller/Messages/LicenceCreateConversationController.php new file mode 100644 index 0000000000..f20a16a04b --- /dev/null +++ b/app/internal/module/Olcs/src/Controller/Messages/LicenceCreateConversationController.php @@ -0,0 +1,25 @@ + [ + 'route' => 'licence/conversation/view', + 'resultIdMap' => [ + 'conversation' => 'conversation', + 'licence' => 'licence' + ], + 'reUseParams' => true + ] + ]; +} diff --git a/app/internal/module/Olcs/src/Controller/Messages/LicenceDisableConversationListController.php b/app/internal/module/Olcs/src/Controller/Messages/LicenceDisableConversationListController.php deleted file mode 100644 index 2c819739c9..0000000000 --- a/app/internal/module/Olcs/src/Controller/Messages/LicenceDisableConversationListController.php +++ /dev/null @@ -1,35 +0,0 @@ -setTemplate('sections/messages/partials/left'); - - return $view; - } - -} \ No newline at end of file diff --git a/app/internal/module/Olcs/src/Controller/Messages/LicenceEnableDisableMessagingController.php b/app/internal/module/Olcs/src/Controller/Messages/LicenceEnableDisableMessagingController.php new file mode 100644 index 0000000000..d461a02342 --- /dev/null +++ b/app/internal/module/Olcs/src/Controller/Messages/LicenceEnableDisableMessagingController.php @@ -0,0 +1,52 @@ +getRequest()->isXmlHttpRequest()) { + return null; + } + + $view = new ViewModel(['navigationId' => 'conversations']); + $view->setTemplate('sections/messages/partials/left'); + + return $view; + } + + protected function getRoutePrefix(): string + { + return 'licence'; + } + + protected function getOrganisationId(): int + { + $queryResponse = $this->handleQuery(Licence::create(['id' => $this->params()->fromRoute('licence')])); + if (!$queryResponse->isOk()) { + throw new Exception( + sprintf( + 'Unexpected error when querying licence for organisation ID. Response: HTTP %s :: %s', + $queryResponse->getStatusCode(), + $queryResponse->getBody(), + ) + ); + } + $queryResult = $queryResponse->getResult(); + + return $queryResult['organisation']['id']; + } +} diff --git a/app/internal/module/Olcs/src/Controller/Messages/LicenceNewConversationController.php b/app/internal/module/Olcs/src/Controller/Messages/LicenceNewConversationController.php deleted file mode 100644 index 269c5162b7..0000000000 --- a/app/internal/module/Olcs/src/Controller/Messages/LicenceNewConversationController.php +++ /dev/null @@ -1,34 +0,0 @@ -setTemplate('sections/messages/partials/left'); - - return $view; - } -} \ No newline at end of file diff --git a/app/internal/module/Olcs/src/Controller/Traits/TaskSearchTrait.php b/app/internal/module/Olcs/src/Controller/Traits/TaskSearchTrait.php index 8ee1ee67a4..e2fff1de53 100644 --- a/app/internal/module/Olcs/src/Controller/Traits/TaskSearchTrait.php +++ b/app/internal/module/Olcs/src/Controller/Traits/TaskSearchTrait.php @@ -2,6 +2,7 @@ namespace Olcs\Controller\Traits; +use Common\FeatureToggle; use Dvsa\Olcs\Transfer\Query\Task\TaskDetails; use Dvsa\Olcs\Transfer\Query\Task\TaskList; use Dvsa\Olcs\Utils\Constants\FilterOptions; @@ -109,9 +110,6 @@ protected function getTaskForm(array $filters = []) */ protected function getTaskTable($filters = [], $noCreate = false) { - /** - * @var \Common\Service\Cqrs\Response $response -*/ $response = $this->handleQuery(TaskList::create($filters)); $tasks = $response->getResult(); diff --git a/app/internal/module/Olcs/src/Form/Model/Fieldset/Conversation.php b/app/internal/module/Olcs/src/Form/Model/Fieldset/Conversation.php new file mode 100644 index 0000000000..51122355a6 --- /dev/null +++ b/app/internal/module/Olcs/src/Form/Model/Fieldset/Conversation.php @@ -0,0 +1,55 @@ +listeners[] = $events->attach( + RouteParams::EVENT_PARAM . 'licence', + [$this, 'onConversation'], + $priority, + ); + } + + public function onConversation(EventInterface $e): void + { + $routeParam = $e->getTarget(); + + $licence = $this->getLicence((int)$routeParam->getValue()); + $isMessagingDisabled = $licence['organisation']['isMessagingDisabled']; + + /** @var AbstractContainer $navigationPlugin */ + $navigationPlugin = $this->navigationPlugin->__invoke('navigation'); + + if ($isMessagingDisabled) { + $navigationPlugin->findBy('id', 'conversation_list_disable_messaging')->setVisible(false); + $navigationPlugin->findBy('id', 'application_conversation_list_disable_messaging')->setVisible(false); + } else { + $navigationPlugin->findBy('id', 'conversation_list_enable_messaging')->setVisible(false); + $navigationPlugin->findBy('id', 'application_conversation_list_enable_messaging')->setVisible(false); + } + } + + private function getLicence(int $id): array + { + $query = $this->annotationBuilder->createQuery(LicenceQuery::create(['id' => $id])); + $response = $this->queryService->send($query); + + if (!$response->isOk()) { + throw new ResourceNotFoundException("Licence id [$id] not found"); + } + + return $response->getResult(); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null): Conversation + { + $this->annotationBuilder = $container->get(AnnotationBuilder::class); + $this->queryService = $container->get(QueryService::class); + $this->navigationPlugin = $container->get('ViewHelperManager')->get('Navigation'); + + return $this; + } + + public function getAnnotationBuilder(): AnnotationBuilder + { + return $this->annotationBuilder; + } + + public function getQueryService(): QueryService + { + return $this->queryService; + } + + public function getNavigationPlugin(): Navigation + { + return $this->navigationPlugin; + } + + public function setAnnotationBuilder(AnnotationBuilder $annotationBuilder): void + { + $this->annotationBuilder = $annotationBuilder; + } + + public function setQueryService(QueryService $queryService): void + { + $this->queryService = $queryService; + } + + public function setNavigationPlugin(Navigation $navigationPlugin): void + { + $this->navigationPlugin = $navigationPlugin; + } +} diff --git a/app/internal/module/Olcs/src/Service/Data/SubCategory.php b/app/internal/module/Olcs/src/Service/Data/SubCategory.php index 28e779fe4a..6cf4bbd03c 100644 --- a/app/internal/module/Olcs/src/Service/Data/SubCategory.php +++ b/app/internal/module/Olcs/src/Service/Data/SubCategory.php @@ -70,6 +70,7 @@ public function fetchListData($context = null) 'isDocCategory' => (self::TYPE_IS_DOC === $this->catType ? 'Y' : null), 'isTaskCategory' => (self::TYPE_IS_TASK === $this->catType ? 'Y' : null), 'isOnlyWithItems' => ($this->isOnlyWithItems ? 'Y' : null), + 'isMessagingCategory' => (self::TYPE_IS_TASK === $this->catType ? 'Y' : null), ] ); diff --git a/app/internal/module/Olcs/src/Table/Tables/conversations-list.table.php b/app/internal/module/Olcs/src/Table/Tables/conversations-list.table.php index 3ced7ba7b1..3f713e1618 100644 --- a/app/internal/module/Olcs/src/Table/Tables/conversations-list.table.php +++ b/app/internal/module/Olcs/src/Table/Tables/conversations-list.table.php @@ -1,6 +1,6 @@ [ [ 'name' => 'id', - 'formatter' => InternalLicenceConversationLink::class + 'formatter' => InternalConversationLink::class ], ], ]; diff --git a/app/internal/module/Olcs/src/Table/Tables/messages-list.table.php b/app/internal/module/Olcs/src/Table/Tables/messages-list.table.php index 5eb437f189..ad60a73acb 100644 --- a/app/internal/module/Olcs/src/Table/Tables/messages-list.table.php +++ b/app/internal/module/Olcs/src/Table/Tables/messages-list.table.php @@ -12,15 +12,6 @@ 'empty_message' => 'There are no message records linked to this conversation to display' ], 'settings' => [ - 'crud' => [ - 'actions' => [ - 'end and archive conversation' => [ - 'requireRows' => true, - 'class' => 'govuk-button govuk-button--warning', - 'label' => 'End and Archive Conversation', - ], - ], - ], 'paginate' => [ 'limit' => [ 'options' => [10, 25, 50], diff --git a/app/internal/module/Olcs/view/olcs/messages/licence-disable-messaging.phtml b/app/internal/module/Olcs/view/olcs/messages/licence-disable-messaging.phtml new file mode 100644 index 0000000000..ced58fca78 --- /dev/null +++ b/app/internal/module/Olcs/view/olcs/messages/licence-disable-messaging.phtml @@ -0,0 +1,8 @@ +placeholder('form')->getValue(); + $contentTitle = $this->getPlaceholder('contentTitle')->asString(); + + $this->placeholder('contentTitle')->set(trim($contentTitle)); + echo $this->formErrors($form); + echo $this->form($form); + diff --git a/app/internal/module/Olcs/view/pages/conversation/messages.phtml b/app/internal/module/Olcs/view/pages/conversation/messages.phtml new file mode 100644 index 0000000000..f2d058d76c --- /dev/null +++ b/app/internal/module/Olcs/view/pages/conversation/messages.phtml @@ -0,0 +1,32 @@ +flashMessengerAll(); ?> + +