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

Commit

Permalink
feat: add "Application referred to PI" checkbox (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
fibble authored Jun 18, 2024
1 parent b22bd6b commit 746f3e6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
20 changes: 11 additions & 9 deletions module/Olcs/src/Controller/Lva/Traits/ApplicationOverviewTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ trait ApplicationOverviewTrait
public function indexAction()
{
/**
* @var \Laminas\Http\Request $request
*/
* @var \Laminas\Http\Request $request
*/
$request = $this->getRequest();

if ($request->isPost() && $this->isButtonPressed('cancel')) {
Expand Down Expand Up @@ -132,13 +132,14 @@ protected function formatDataForForm($application)
{
return [
'details' => [
'receivedDate' => $application['receivedDate'] ?? null,
'targetCompletionDate' => $application['targetCompletionDate'] ?? null,
'leadTcArea' => $application['licence']['organisation']['leadTcArea']['id'] ?? null,
'translateToWelsh' => $application['licence']['translateToWelsh'] ?? null,
'overrideOppositionDate' => $application['overrideOoo'] ?? null,
'version' => $application['version'] ?? null,
'id' => $application['id'] ?? null,
'receivedDate' => $application['receivedDate'] ?? null,
'targetCompletionDate' => $application['targetCompletionDate'] ?? null,
'leadTcArea' => $application['licence']['organisation']['leadTcArea']['id'] ?? null,
'translateToWelsh' => $application['licence']['translateToWelsh'] ?? null,
'overrideOppositionDate' => $application['overrideOoo'] ?? null,
'applicationReferredToPi' => $application['applicationReferredToPi'] ?? null,
'version' => $application['version'] ?? null,
'id' => $application['id'] ?? null,
],
'tracking' => $application['applicationTracking'] ?? null,
];
Expand Down Expand Up @@ -215,6 +216,7 @@ protected function mapData($formData)
'leadTcArea' => $details['leadTcArea'],
'tracking' => $formData['tracking'],
'overrideOppositionDate' => $details['overrideOppositionDate'],
'applicationReferredToPi' => $details['applicationReferredToPi'],
'validateAppCompletion' => true,
];

Expand Down
10 changes: 10 additions & 0 deletions module/Olcs/src/Form/Model/Fieldset/ApplicationOverviewDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ class ApplicationOverviewDetails
*/
public $overrideOppositionDate = null;

/**
* @Form\Options({
* "checked_value":"Y",
* "unchecked_value":"N",
* "label":"overview.fieldset.check.application-referred-to-pi"
* })
* @Form\Type("OlcsCheckbox")
*/
public $applicationReferredToPi = null;

/**
* @Form\Attributes({"value":""})
* @Form\Type("Hidden")
Expand Down

0 comments on commit 746f3e6

Please sign in to comment.