Skip to content

Commit

Permalink
Feature/query management (#1749)
Browse files Browse the repository at this point in the history
* fix branch

* change modifier activatedRoute

* revert change

* bump version

* fix alert service

* fix error

* EUI-8396

* EUI-8412

* bump version

* amendment

* Feature/e UI 8396 (#1467)

* EUI-8396 and fix case full access view test

* EUI-8396

* 8396

* bump version

* revert change

* bump version

* EUI-8396

* return type

* pr comment

* bump version

* pipe  transform

* bump version

* fix test & bump version

* fix test

* fix sonarcloud

* fix

* fix ngOnInit sonarcloud issue

* EUI-8379

* EUI-8379

* fix test and bump version

* remove unused scss file

* move attachment back to document

* refactor query-write-respond-to-query and query-write-raise-query to reduce duplication

* bump version

* fix lint errors

* bump version

* EUI-8453 QM raise a query error scenarios

* EUI-8452

* lint errors

* small fixes

* bump version

* fix package.json

* bump package version

* fix tests + bump version

* add legend -- sonarcloud fix

* pr comments

* EUI-8453 QM raise a query error scenarios

* EUI-8453 QM raise a query error scenarios

* Feature/e UI 8379 (#1471)

* EUI-8412

* EUI-8412

* EUI-8396 and fix case full access view test

* EUI-8396

* 8396

* bump version

* changes

* fix branch

* change modifier activatedRoute

* revert change

* bump version

* fix alert service

* fix error

* EUI-8396

* EUI-8412

* bump version

* amendment

* return type

* pr comment

* bump version

* pipe  transform

* bump version

* fix test & bump version

* fix test

* fix sonarcloud

* fix

* fix ngOnInit sonarcloud issue

* EUI-8379

* EUI-8379

* fix test and bump version

* remove unused scss file

* move attachment back to document

* refactor query-write-respond-to-query and query-write-raise-query to reduce duplication

* bump version

* fix lint errors

* bump version

* fix add document label

* EUI-8453 QM raise a query error scenarios

* EUI-8453 QM raise a query error scenarios

* Feature/EUI 8386 (#1472)

* EUI-8148

* EUI-8148

* fix sonarcloud issues and bump version

* remove unused import

* bump version

* Revert "Update npmpublish.yml to node 16"

This reverts commit 97f42ad.

* update version

* v5

* update

* bump version

* update ccd toolkit version

* margin top for back link

* text change

* text change

* bump version

* last minute change

* bump version

* EUI-8425

* EUI-8425

* fix file

* add another test

* fix sonarcloud warning

* fix formatting issues

* EUI-8412

* EUI-8412

* EUI-8396 and fix case full access view test

* EUI-8396

* 8396

* bump version

* changes

* fix branch

* change modifier activatedRoute

* revert change

* bump version

* fix alert service

* fix error

* EUI-8396

* EUI-8412

* bump version

* amendment

* return type

* pr comment

* bump version

* pipe  transform

* bump version

* fix test & bump version

* fix test

* fix sonarcloud

* fix

* fix ngOnInit sonarcloud issue

* fix conflicts

* EUI-8379

* Show summary

Update version

Show summary page

* EUI-8379

* fix test and bump version

* remove unused scss file

* move attachment back to document

* refactor query-write-respond-to-query and query-write-raise-query to reduce duplication

* bump version

* fix lint errors

* add spaces

* review comments fixes

* form group

* retain value

* fix test

* update version

* EUI-8397

* Run all test

---------

Co-authored-by: Matei Baciu <[email protected]>

* EUI-8453 QM raise a query error scenarios

* EUI-8453 QM raise a query error scenarios

* EUI-8453 QM raise a query error scenarios

* Feature/EUI 8454 (#1476)

* EUI-8148

* EUI-8148

* fix sonarcloud issues and bump version

* remove unused import

* bump version

* Revert "Update npmpublish.yml to node 16"

This reverts commit 97f42ad.

* update version

* v5

* update

* bump version

* update ccd toolkit version

* margin top for back link

* text change

* text change

* bump version

* last minute change

* bump version

* EUI-8425

* EUI-8425

* fix file

* add another test

* fix sonarcloud warning

* fix formatting issues

* EUI-8412

* EUI-8412

* EUI-8396 and fix case full access view test

* EUI-8396

* 8396

* bump version

* changes

* fix branch

* change modifier activatedRoute

* revert change

* bump version

* fix alert service

* fix error

* EUI-8396

* EUI-8412

* bump version

* amendment

* return type

* pr comment

* bump version

* pipe  transform

* bump version

* fix test & bump version

* fix test

* fix sonarcloud

* fix

* fix ngOnInit sonarcloud issue

* fix conflicts

* EUI-8379

* Show summary

Update version

Show summary page

* EUI-8379

* fix test and bump version

* remove unused scss file

* move attachment back to document

* refactor query-write-respond-to-query and query-write-raise-query to reduce duplication

* bump version

* fix lint errors

* add spaces

* review comments fixes

* form group

* retain value

* fix test

* update version

* Review comments

Follow up summary

summary for follow up

Follow up query display

* review comments

* fix lint

---------

Co-authored-by: Matei Baciu <[email protected]>

* EUI-8453 QM raise a query error scenarios

* Feature/e UI 8397 (#1481)

* EUI-8148

* EUI-8148

* fix sonarcloud issues and bump version

* remove unused import

* bump version

* Revert "Update npmpublish.yml to node 16"

This reverts commit 97f42ad.

* update version

* v5

* update

* bump version

* update ccd toolkit version

* margin top for back link

* text change

* text change

* bump version

* last minute change

* bump version

* EUI-8425

* EUI-8425

* fix file

* add another test

* fix sonarcloud warning

* fix formatting issues

* fix conflicts

* Show summary

Update version

Show summary page

* add spaces

* review comments fixes

* form group

* retain value

* fix test

* update version

* EUI-8397

* bump version

* fix conflicts

* fix duplicate title

---------

Co-authored-by: DavidJayakumar <[email protected]>

* Feature/e UI 8428 (#1478)

* change top text link

* bump version

* Feature/e UI 8483 (#1477)

* added full name

* bump ccd case ui toolkit version

* fixes

* bump version

* fix scenario 3

* bump version

* bump ccd version

* EUI-8522 QQ create data model and mock data

* EUI-8522 QQ create data model and mock data

* EUI-8522 QQ create data model and mock data

* EUI-8523 QQ create component

* EUI-8522 QQ create data model and mock data

* EUI-8523 QQ create component

* EUI-8523 QQ create component

* EUI-8523 QQ create component

* EUI-8523 QQ create component

* Sonarcloud fixes

* EUI-8523 QQ create component

* EUI-8524 QQ create component step 2

* EUI-8523 QQ create component

* Feature/EUI 8372 (#1484)

* EUI-8148

* EUI-8148

* fix sonarcloud issues and bump version

* remove unused import

* bump version

* Revert "Update npmpublish.yml to node 16"

This reverts commit 97f42ad.

* update version

* v5

* update

* bump version

* update ccd toolkit version

* margin top for back link

* text change

* text change

* bump version

* last minute change

* bump version

* EUI-8425

* EUI-8425

* fix file

* add another test

* fix sonarcloud warning

* fix formatting issues

* fix conflicts

* Show summary

Update version

Show summary page

* add spaces

* review comments fixes

* form group

* retain value

* fix test

* update version

* Review comments

Follow up summary

summary for follow up

Follow up query display

* review comments

* remove code

Query details navigation

* Review comments

* Fix issue

* Update version

* Fix review comment

---------

Co-authored-by: Matei Baciu <[email protected]>

* EUI-8523 QQ create component

* EUI-8523 QQ create component

* EUI-8525

* bump version after merge

* bump version after rebasing onto EUI-8523

* EUI-8524 QQ create component step 2

* EUI-8524 QQ create component step 2

* EUI-8524 QQ create component step 2

* EUI-8425 (#1490)

* EUI-8425

* bump version

* 8425 + 8482

* bump version

* query-create-context

* bump version

* bump version

* EUI-8425

* Feature/e UI 8455 (#1501)

* EUI-8455

* 8455

* EUI-8455

* fix duplicate code

* bump version and fix test

* fix unused ngOnInit

* EUI-8455

* EUI-8455

* fix sonar code smells

* EUI-8455

* query details v4

* fixes

* EUI-8455

* bump version

* fix error

* Feature/e UI 8451 (#1489)

* EUI-8148

* EUI-8148

* fix sonarcloud issues and bump version

* remove unused import

* bump version

* Revert "Update npmpublish.yml to node 16"

This reverts commit 97f42ad.

* update version

* v5

* update

* bump version

* update ccd toolkit version

* margin top for back link

* text change

* text change

* bump version

* last minute change

* bump version

* EUI-8425

* EUI-8425

* fix file

* add another test

* fix sonarcloud warning

* fix formatting issues

* fix conflicts

* Show summary

Update version

Show summary page

* add spaces

* review comments fixes

* form group

* retain value

* fix test

* update version

* Review comments

Follow up summary

summary for follow up

Follow up query display

* review comments

* EUI-8397

* bump version

* fix build and bump version

* fix issue

* 8483

* EUI-8451

* bump ccd toolkit

* bump

* bump ccd version

* EUI-8451

* QWR

* EUI-8451

* fix date format

* fixes

* EUI-8451

* bump version

* fixes

* 8451

* fix template issues

---------

Co-authored-by: DavidJayakumar <[email protected]>

* EUI-8526 (#1502)

* EUI-8526

* EUI-8526

* 6.16.0-query-details-name-pre-filled-v3

* EUI-8395 fix

* bump version

* quick changes

* bump version

* EUI-8526

* EUI-8526

* EUI-8604 QM Query tab changes

* EUI-8607 QM follow up query cya

* EUI-8603 QM raise a query cya

* EUI-8602 QM raise a query changes

* EUI-8603 QM raise a query cya

* EUI-8607 QM follow up query cya

* EUI-8401 (#1503)

* EUI-8401

* EUI-8401

* lint warnings

* bump version EUI-8401

* EUI-8401

* EUI-8401

* bump version

* EUI-8602 QM raise a query changes

* EUI-8602 QM raise a query changes

* EUI-8602 QM raise a query changes

* EUI-8623 QM remove grey bar

* EUI-8604 QM Query tab changes

* EUI-8604 QM Query tab changes

* EUI-8607 QM follow up query cya

* EUI-8607 QM follow up query cya

* EUI-8623 QM remove grey bar

* Show caseworker name (#1507)

* UI changes (#1510)

* UI changes

* Fix test

* Correct version

* Fix test

* Update Release branch with master (#1518)

* Upgrade ccpay component

* 6.16.2a-ccpay-upgrade - CCPAY component 5.2.8

* Update yarn lock

* EUI-8630: Increase CCD Toolkit unit test coverage (#1516)

Fix and re-enable unit tests for the `CaseEditPageComponent`, which account for a significant proportion of the missing coverage. Also implement clean-up of several subscriptions to `Observable`s.

* Fix test failures caused by missing RpxTranslatePipe dependency

---------

Co-authored-by: Dean Bullock <[email protected]>
Co-authored-by: Bradley Wadsworth <[email protected]>
Co-authored-by: bradley-hmcts <[email protected]>

* UI changes (#1512)

* UI changes

* Fix subject

* Bump version

* Feature/e UI 8481 (#1508)

* EUI-8481

* EUI-8481

* EUI-8481

* Fix build issue

* Fix merge conflicts

* Added translation

---------

Co-authored-by: DavidJayakumar <[email protected]>
Co-authored-by: David Rajkumar Jayakumar <[email protected]>

* EUI-8636 QM amend mock data

* EUI-8636 QM amend mock data

* EUI-8636 QM amend mock data

* EUI-8636 QM amend mock data

* Merge from master

* Merge from master

* EUI-8709 Case flags v2.1 Add comments warning message

* EUI-8709 Case flags v2.1 Add comments warning message

* EUI-8709 Case flags v2.1 Add comments warning message

* Merge branch 'master' into Release (#1540)

* add temporary console logs

* Update projects/ccd-case-ui-toolkit/src/lib/shared/components/case-viewer/services/case.resolver.ts

* EUI-8601/8687/8732: JudicialUser field fixes (#1532)

* EUI-8515/EUI-8550: Release 6.16 hotfixes

EUI-8515: Fix Case Flags and Linked Cases submissions not to depend on presence of "Check your answers" page. Also includes some refactoring for better code maintainability.

* Fix invalid package version

* Fix issue with showEventNotes

* Add test for show summary

* update package

* Update logic

* fix lint

* Fix - show summary true for null

* Update spec

* Update package

* Fix review comment

* Update package

* Add back ignored test to increase coverage

* Add unit test

* Bump version to 6.16.1-hotfixes-EUI-8515-8550 following rebase with master branch

* EUI-8601

* EUI-8601: JudicialUser field not working when used in a collection

Re-implement `WriteJudicialUserField` component to extend `WriteComplexFieldComponent`, to ensure correct working when used in a collection.

* EUI-8601: JudicialUser field not working when used in a collection

Fix judicial user display to include email address, as per PR review comment from @johnbenjamin-hmcts.

* EUI-8687/8732: Fix JudicialUser field validation logic and error handling

EUI-8687: Fix validation logic for `WriteJudicialUserField` component; EUI-8732: Fix `WriteJudicialUserField` error handling to allow user to continue searching if an error occurs on calling `getJudicialUsersSearch` API endpoint.

* Fix test failure caused by change to FirstErrorPipe as a result of Welsh Translation work

---------

Co-authored-by: DavidJayakumar <[email protected]>
Co-authored-by: John Benjamin <[email protected]>

* correct version progress

* EUI-8738: Remove JudicialUser FormControls from FormGroup displayed on "Check your answers" (CYA) page (#1535)

Ensure that all instances of JudicialUser `FormControl`s are removed from the `FormGroup`, prior to display on the CYA page. Such `FormControl`s are added only for value selection and validation but are not intended for display otherwise (values are stored elsewhere in the data).

---------

Co-authored-by: mutlu <[email protected]>
Co-authored-by: Dan Lysiak <[email protected]>
Co-authored-by: DavidJayakumar <[email protected]>
Co-authored-by: John Benjamin <[email protected]>
Co-authored-by: codaimaster <[email protected]>

* Update case flags v2 after merge from master

* Revert "Update case flags v2 after merge from master"

This reverts commit e5d2b22.

* Case flags v2 reasonable adjustments - updating latest from master

* Move modules (#1549)

* Move modules

* Fix tests

* Remove unwanted changes

* Add new test

* update version

* remove code

* Chore/update release with master (#1558)

* Fixing exception in unit tests (#1555)

* EUI-8679/8770: WorkbasketFiltersComponent and JudicialUser field fixes (#1553)

* updated

* updated

* updated

* Updated

* Initial fixes for EXUI-623

* Fix issue via making the jurisdiction model object optionally contain the selected case type

* create new toolkit version

* Update release notes

* Fix tests

* EUI-8679/8770: WorkbasketFiltersComponent and JudicialUser field fixes

EUI-8679: Remove JudicialUser FormControl values from the overall FormGroup value stored and passed as search criteria by the `WorkbasketFiltersComponent` when applying filters; EUI-8770: Ensure the `WorkbasketFiltersComponent` announces the selected jurisdiction and case type via the `JurisdictionService`; in the `WriteJudicialUserField` component, get the current jurisdiction and case type from the `JurisdictionService` if no case info is present.

* Fix import ordering

* EUI-8679/8770: WorkbasketFiltersComponent and JudicialUser field fixes

Re-tag for formal release. Also includes partial reversion of EXUI-623 (`WriteDocumentFieldComponent` changes) due to deficient unit test coverage.

---------

Co-authored-by: Muhammad Anjum <[email protected]>
Co-authored-by: Andy Wilkins <[email protected]>
Co-authored-by: Andy Wilkins <[email protected]>

---------

Co-authored-by: Andy Wilkins <[email protected]>
Co-authored-by: Muhammad Anjum <[email protected]>
Co-authored-by: Andy Wilkins <[email protected]>

* EUI-8711: Case Flags v2.1 - Group internal and external flag collections by groupId for internal users (#1561)

* EUI-8711: Case Flags v2.1 - Group internal and external flag collections by groupId for internal users

Ensure internal and external collections of flag data are grouped by groupId into one instance of the `Flags` object per party, for internal users.

* EUI-8705 Case flags v2.1 New checkbox when other flag type is selected

* Fix release notes ordering

* EUI-8706: Case Flags v2.1 - Determine correct location for adding new flags (#1570)

Determine the correct location for a flag to be added - either internal or external - based on whether the flag is marked as "internal only" if of type "Other", or its `externallyAvailable` attribute if not of type "Other".

* Fix headings

* Dan's review fix

* Remove spec reporter

* EUI-8711/EUI-8706: Case Flags v2.1 functionality

Re-tag for formal release. Also includes EUI-8734.

---------

Co-authored-by: John Benjamin <[email protected]>
Co-authored-by: DavidJayakumar <[email protected]>

* EUI-8460 QM Raise a query submission

* EUI-8460 QM Raise a query submission

* EUI-8840: Case Flags v2 - Update flag for external users fix (#1585)

Use flagUpdateComment field for persisting flag comments on update by external users.

* EUI-8844: Case Flags v2.1 - Prevent display of duplicate parties on "Select flag location" page (#1575)

Remove duplicate party locations where an internal and external `Flags` object (with the same groupId) exists for a party.

* EUI-8460 QM Raise a query submission

* EUI-8460 QM Raise a query submission

* EUI-8460 QM Raise a query submission

* EUI-8460 QM Raise a query submission

* EUI-8460 QM Raise a query submission

* Feature/EUI 8895 (#1586)

* display changes

* fix lint

* Fix review comments

* update package

* fix lint

* update version

* fix space

* Load tab even if the hearings tab is translated (#1597)

* EUI-8819: Case Flags v2.1 consolidation - Final release (#1588)

* Case flags v2

* EUI-8779 Merge unmerged RA code

* EUI-8779 Merge unmerged RA code

* EUI-8779 Merge unmerged RA code

* EUI-8779 Merge unmerged RA code

* Merge pull request #1552 from hmcts/feature/EUI-8779---Merge-unmerged-RA-code

EUI-8779 Reasonable adjustments - update base branch with un-merged code

* EUI-8778: Prevent flag status tag text from wrapping in Case Flags table

Ensure the status tag text is displayed on a single line, irrespective of screen width.

* EUI-8778: Prevent flag status tag text from wrapping in Case Flags table (#1554)

Ensure the status tag text is displayed on a single line, irrespective of screen width.

* EUI-8819: Case Flags v2.1 consolidation - Minor UI display changes

Colour changes for "Active" and "Requested" flag status tags on Case Flags page; flag status now displayed for all users, and on both flag creation and update, on Case Flag Summary (CYA) page.

* EUI-8819: Case Flags v2.1 consolidation - Interim release

Interim release of Case Flags v2.1 consolidation; includes minor UI display changes (flag status tag colour changes; flag status displayed on Case Flag Summary page always).

* EUI-8819: Case Flags v2.1 consolidation - Final release

Final release of Case Flags v2.1 consolidation; includes support for "dual mode" operation, allowing the Case Flags feature to be run as either v1 or v2.1.

---------

Co-authored-by: John Benjamin <[email protected]>
Co-authored-by: John Benjamin <[email protected]>

* EUI-8914/EUI-8913/EUI-8915/EUI-8916: Case Flags v2.1 fixes (#1598)

* Case flags v2

* EUI-8779 Merge unmerged RA code

* EUI-8779 Merge unmerged RA code

* EUI-8779 Merge unmerged RA code

* EUI-8779 Merge unmerged RA code

* Merge pull request #1552 from hmcts/feature/EUI-8779---Merge-unmerged-RA-code

EUI-8779 Reasonable adjustments - update base branch with un-merged code

* EUI-8778: Prevent flag status tag text from wrapping in Case Flags table

Ensure the status tag text is displayed on a single line, irrespective of screen width.

* EUI-8778: Prevent flag status tag text from wrapping in Case Flags table (#1554)

Ensure the status tag text is displayed on a single line, irrespective of screen width.

* EUI-8819: Case Flags v2.1 consolidation - Minor UI display changes

Colour changes for "Active" and "Requested" flag status tags on Case Flags page; flag status now displayed for all users, and on both flag creation and update, on Case Flag Summary (CYA) page.

* EUI-8819: Case Flags v2.1 consolidation - Interim release

Interim release of Case Flags v2.1 consolidation; includes minor UI display changes (flag status tag colour changes; flag status displayed on Case Flag Summary page always).

* EUI-8819: Case Flags v2.1 consolidation - Final release

Final release of Case Flags v2.1 consolidation; includes support for "dual mode" operation, allowing the Case Flags feature to be run as either v1 or v2.1.

* EUI-8914/EUI-8913/EUI-8915/EUI-8916: Case Flags v2.1 fixes

EUI-8914: Fix case-level flag creation to work when the case-level `Flags` object in the form data is an empty object initially; EUI-8913: Remove the "Previous" button from the Case Flag Summary (CYA) page; EUI-8915: Remove the "Change" link for the "Status" item on the Case Flag Summary (CYA) page if Case Flags v2.1 is not enabled; EUI-8916: Fix "Change" link navigations from the Case Flag Summary (CYA) page when Case Flags v2.1 is enabled.

---------

Co-authored-by: John Benjamin <[email protected]>
Co-authored-by: John Benjamin <[email protected]>

* EUI-8935: Case Flags v2.1 fixes (#1602)

* Case flags v2

* EUI-8779 Merge unmerged RA code

* EUI-8779 Merge unmerged RA code

* EUI-8779 Merge unmerged RA code

* EUI-8779 Merge unmerged RA code

* Merge pull request #1552 from hmcts/feature/EUI-8779---Merge-unmerged-RA-code

EUI-8779 Reasonable adjustments - update base branch with un-merged code

* EUI-8778: Prevent flag status tag text from wrapping in Case Flags table

Ensure the status tag text is displayed on a single line, irrespective of screen width.

* EUI-8778: Prevent flag status tag text from wrapping in Case Flags table (#1554)

Ensure the status tag text is displayed on a single line, irrespective of screen width.

* EUI-8819: Case Flags v2.1 consolidation - Minor UI display changes

Colour changes for "Active" and "Requested" flag status tags on Case Flags page; flag status now displayed for all users, and on both flag creation and update, on Case Flag Summary (CYA) page.

* EUI-8819: Case Flags v2.1 consolidation - Interim release

Interim release of Case Flags v2.1 consolidation; includes minor UI display changes (flag status tag colour changes; flag status displayed on Case Flag Summary page always).

* EUI-8819: Case Flags v2.1 consolidation - Final release

Final release of Case Flags v2.1 consolidation; includes support for "dual mode" operation, allowing the Case Flags feature to be run as either v1 or v2.1.

* EUI-8914/EUI-8913/EUI-8915/EUI-8916: Case Flags v2.1 fixes

EUI-8914: Fix case-level flag creation to work when the case-level `Flags` object in the form data is an empty object initially; EUI-8913: Remove the "Previous" button from the Case Flag Summary (CYA) page; EUI-8915: Remove the "Change" link for the "Status" item on the Case Flag Summary (CYA) page if Case Flags v2.1 is not enabled; EUI-8916: Fix "Change" link navigations from the Case Flag Summary (CYA) page when Case Flags v2.1 is enabled.

* EUI-8935: Case Flags v2.1 fixes

Fix incorrect logic for setting flag status on flag creation.

---------

Co-authored-by: John Benjamin <[email protected]>
Co-authored-by: John Benjamin <[email protected]>

* EUI-8944: Case Flags v2.1 fixes (#1604)

Fix missing header on "Manage case flags" page when Case Flags v2.1 is enabled.

* EUI-8947: Case Flags - Fix bug caused by EXUI-848 (#1605)

Fix bug introduced by change to `CaseEditComponent` case event data generation in EXUI-848.

* update codebase with latest code

* Update query-check-your-answers.component.ts

* fixing test issues

* Update case-flag-summary-list.component.html

* Update query-check-your-answers.component.spec.ts

* code tidy; fix broken test

* Update query-check-your-answers.component.ts (#1752)

* activating confirmation page

* update config

* updated version

* Code tidy

* retrieve real 'Query management' data - partially completed

* Update query-check-your-answers.component.spec.ts

* Update read-query-management-field.component.spec.ts

* Update sonar-project.properties

* Update sonar-project.properties

* version update

* Update yarn.lock

* update unity test and fix sonar issue

* Updated dase data structure for the query with dynamic property name

* version update

* code tidy

* Update query-check-your-answers.component.ts

* display data

* version update fix issue fpl integration

* code tidy

* refactor codebase to get data from  event data (#1774)

* refactor codebase to get data from  event data

* code tidy

* code tidy

* GUID added to caseMessage ID

* version update

* Making respond to query button available for test (#1777)

* Making respond to query button available for test

* Remove extract link

* Update read-query-management-field.component.html

* Update query-details.component.html

* Update query-check-your-answers.component.spec.ts

* version update

* Exui 2095 work around case collection issue (#1779)

* Workaround for multiple qmCaseQueriesCollections that are not to be appearing in the eventData

* Update query-check-your-answers.component.ts

* version update

* version update

* Fix issue with properties missing from preview userDetail

* Exui 2421 (#1783)

* Fix issue with properties missing from preview userDetail

* testing

* fix issue with query not show up immediately

* fix date formatting issue (#1784)

* version update

* Exui 2450 caption link update (#1789)

* Copy and link update

* fix with when no documents attached change link seen

* Update qualifying-question-options.component.spec.ts

* Exui 2426 back btn (#1787)

* fix issue with radio button not persisting

* Update qualifying-question.service.ts

* Update palette.module.ts

* Exui 2449 document missing (#1790)

* fix issue with attachment missing

* Update query-details.component.html

* Update query-attachments-read.component.spec.ts

* version update

* MultiParty Queries table fixed (#1792)

* version update

* fix issue with missing CaseName and Case Reference (#1793)

* version update

* Testing

update

* cve update

* clear radio button for qualifying Question

* Copy update

* toolkit version updaye

* fix isHearingRelated Field Value Mismatch (#1803)

* Update version for release

* resolve sonar issue - empty method

* resolve sonar issue - brain overload

* resolve sonar issue: brain overload

* Update version number for release

---------

Co-authored-by: Matei Baciu <[email protected]>
Co-authored-by: Matei <[email protected]>
Co-authored-by: John Benjamin <[email protected]>
Co-authored-by: David Rajkumar Jayakumar <[email protected]>
Co-authored-by: John Benjamin <[email protected]>
Co-authored-by: DavidJayakumar <[email protected]>
Co-authored-by: Daniel Lam <[email protected]>
Co-authored-by: Dean Bullock <[email protected]>
Co-authored-by: Bradley Wadsworth <[email protected]>
Co-authored-by: bradley-hmcts <[email protected]>
Co-authored-by: mutlu <[email protected]>
Co-authored-by: Dan Lysiak <[email protected]>
Co-authored-by: codaimaster <[email protected]>
Co-authored-by: Ritesh Dsouza <[email protected]>
Co-authored-by: Andy Wilkins <[email protected]>
Co-authored-by: Muhammad Anjum <[email protected]>
Co-authored-by: Andy Wilkins <[email protected]>
  • Loading branch information
18 people authored Nov 12, 2024
1 parent d80548e commit 1558ef9
Show file tree
Hide file tree
Showing 60 changed files with 5,761 additions and 2,174 deletions.
9 changes: 8 additions & 1 deletion demo/src/app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ export class AppConfig extends AbstractAppConfig {
'access_management_mode': true,
'refunds_url': '/api/refunds',
'payment_return_url': 'https://paymentoutcome-web.demo.platform.hmcts.net/',
'case_flags_refdata_api_url': '/refdata/commondata/caseflags/service-id=:sid'
'case_flags_refdata_api_url': '/refdata/commondata/caseflags/service-id=:sid',
'events_to_hide': [
'queryManagementRespondQuery'
]
};

constructor(private http: HttpClient) {
Expand Down Expand Up @@ -187,4 +190,8 @@ export class AppConfig extends AbstractAppConfig {
public getCaseFlagsRefdataApiUrl(): string {
return this.config.case_flags_refdata_api_url;
}

public getEventsToHide(): string[] {
return this.config.events_to_hide;
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmcts/ccd-case-ui-toolkit",
"version": "7.0.75",
"version": "7.1.15",
"engines": {
"node": ">=18.19.0"
},
Expand Down
2 changes: 1 addition & 1 deletion projects/ccd-case-ui-toolkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hmcts/ccd-case-ui-toolkit",
"version": "7.0.75",
"version": "7.1.15",
"engines": {
"node": ">=18.19.0"
},
Expand Down
10 changes: 8 additions & 2 deletions projects/ccd-case-ui-toolkit/src/lib/app-config.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,20 +207,26 @@ export class AppMockConfig implements AbstractAppConfig {
return '';
}

public getEventsToHide(): string[] {
return [];
}

public getEnableRestrictedCaseAccessConfig(): boolean {
return true;
}

public getEnableCaseFileViewVersion1_1(): boolean {
return true;
}

public getIcpEnable(): boolean {
return false;
}

public getIcpJurisdictions(): string[] {
return ['', ''];
}
public logMessage(): void {

public logMessage(msg: string): void {
console.log(msg);
}
}
2 changes: 2 additions & 0 deletions projects/ccd-case-ui-toolkit/src/lib/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export abstract class AbstractAppConfig {
public abstract getCaseFlagsRefdataApiUrl(): string;
public abstract getRDCommonDataApiUrl(): string;
public abstract getCaseDataStoreApiUrl(): string;
public abstract getEventsToHide(): string[];
public abstract getEnableRestrictedCaseAccessConfig(): boolean;
public abstract getEnableCaseFileViewVersion1_1(): boolean;
}
Expand Down Expand Up @@ -194,4 +195,5 @@ export class CaseEditorConfig {
public enable_case_file_view_version_1_1: boolean;
public icp_enabled: boolean;
public icp_jurisdictions: string[];
public events_to_hide: string[];
}
Original file line number Diff line number Diff line change
Expand Up @@ -1396,6 +1396,46 @@ describe('CaseEditComponent', () => {
expect(mockWorkAllocationService.completeTask).not.toHaveBeenCalled();
});

it('should submit the case for a Case Flags submission', () => {
const mockClass = {
submit: () => of({})
};
spyOn(mockClass, 'submit').and.returnValue(of({
id: 'id',
/* tslint:disable:object-literal-key-quotes */
'callback_response_status': 'CALLBACK_HASNOT_COMPLETED',
/* tslint:disable:object-literal-key-quotes */
'after_submit_callback_response': {
/* tslint:disable:object-literal-key-quotes */
'confirmation_header': 'confirmation_header',
/* tslint:disable:object-literal-key-quotes */
'confirmation_body': 'confirmation_body'
}
}));

spyOn(component, 'confirm');

component.isCaseFlagSubmission = true;
component.confirmation = {} as unknown as Confirmation;

formValueService.sanitise.and.returnValue({name: 'sweet'});
component.onEventCanBeCompleted({
eventTrigger: component.eventTrigger,
eventCanBeCompleted: true,
caseDetails: component.caseDetails,
form: component.form,
submit: mockClass.submit,
});

expect(component.confirm).toHaveBeenCalled();
expect(formValueService.populateLinkedCasesDetailsFromCaseFields).toHaveBeenCalled();
expect(formValueService.removeCaseFieldsOfType)
.toHaveBeenCalledWith(jasmine.any(Object), jasmine.any(Array), ['FlagLauncher', 'ComponentLauncher']);
expect(formValueService.repopulateFormDataFromCaseFieldValues).toHaveBeenCalled();
expect(validPageListCaseFieldsService.deleteNonValidatedFields).toHaveBeenCalled();
expect(formValueService.removeUnnecessaryFields).not.toHaveBeenCalled();
});

it('should NOT submit the case due to error', () => {
const mockClass = {
submit: () => of({})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,43 +404,51 @@ export class CaseEditComponent implements OnInit, OnDestroy {
if (caseField && caseField.retain_hidden_value &&
(caseField.hidden || (caseField.hidden !== false && parentField && parentField.hidden))) {
if (caseField.field_type.type === 'Complex') {
// Note: Deliberate use of equality (==) and non-equality (!=) operators for null checks throughout, to
// handle both null and undefined values
if (caseField.value != null) {
// Call this function recursively to replace the Complex field's sub-fields as necessary, passing the
// CaseField itself (the sub-fields do not contain any values, so these need to be obtained from the
// parent)
// Update rawFormValueData for this field
// creating form group and adding control into it in case caseField is of complext type and and part of formGroup
const form: FormGroup = new FormGroup({});
if (formGroup.controls[key].value) {
Object.keys(formGroup.controls[key].value).forEach((item) => {
form.addControl(item, new FormControl(formGroup.controls[key].value[item]));
});
}
rawFormValueData[key] = this.replaceHiddenFormValuesWithOriginalCaseData(
form, caseField.field_type.complex_fields, caseField);
}
this.handleComplexField(caseField, formGroup, key, rawFormValueData);
} else {
// Default case also handles collections of *all* types; the entire collection in rawFormValueData will be
// replaced with the original from formatted_value
// Use the CaseField's existing *formatted_value* from the parent, if available. (This is necessary for
// Complex fields, whose sub-fields do not hold any values in the model.) Otherwise, use formatted_value
// from the CaseField itself.
if (parentField && parentField.formatted_value) {
rawFormValueData[key] = parentField.formatted_value[caseField.id];
} else {
if (!(caseField.hidden && caseField.retain_hidden_value)) {
rawFormValueData[key] = caseField.formatted_value;
}
}
this.handleNonComplexField(parentField, rawFormValueData, key, caseField);
}
}
});

return rawFormValueData;
}

private handleNonComplexField(parentField: CaseField, rawFormValueData, key: string, caseField: CaseField) {
// Default case also handles collections of *all* types; the entire collection in rawFormValueData will be
// replaced with the original from formatted_value
// Use the CaseField's existing *formatted_value* from the parent, if available. (This is necessary for
// Complex fields, whose sub-fields do not hold any values in the model.) Otherwise, use formatted_value
// from the CaseField itself.
if (parentField && parentField.formatted_value) {
rawFormValueData[key] = parentField.formatted_value[caseField.id];
} else {
if (!(caseField.hidden && caseField.retain_hidden_value)) {
rawFormValueData[key] = caseField.formatted_value;
}
}
}

private handleComplexField(caseField: CaseField, formGroup: FormGroup<any>, key: string, rawFormValueData) {
// Note: Deliberate use of equality (==) and non-equality (!=) operators for null checks throughout, to
// handle both null and undefined values
if (caseField.value != null) {
// Call this function recursively to replace the Complex field's sub-fields as necessary, passing the
// CaseField itself (the sub-fields do not contain any values, so these need to be obtained from the
// parent)
// Update rawFormValueData for this field
// creating form group and adding control into it in case caseField is of complext type and and part of formGroup
const form: FormGroup = new FormGroup({});
if (formGroup.controls[key].value) {
Object.keys(formGroup.controls[key].value).forEach((item) => {
form.addControl(item, new FormControl(formGroup.controls[key].value[item]));
});
}
rawFormValueData[key] = this.replaceHiddenFormValuesWithOriginalCaseData(
form, caseField.field_type.complex_fields, caseField);
}
}

private caseSubmit({ form, caseEventData, submit }: CaseEditCaseSubmit): void {
const loadingSpinnerToken = this.loadingService.register();
// keep the initial event response to finalise process after task completion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,17 @@ import { Draft } from '../../domain/draft.model';
})

export class CaseHeaderComponent implements OnInit {

@Input()
public caseDetails: CaseView;
@Input() public caseDetails: CaseView;
public caseTitle: CaseField;
public caseFields: CaseField[];

public ngOnInit(): void {
this.caseTitle = new CaseField();
if (!this.isDraft() && this.caseDetails.state.title_display) {
this.caseTitle.label = this.caseDetails.state.title_display;
this.caseFields = this.getCaseFields();
}
}

public isDraft(): boolean {
return Draft.isDraft(this.caseDetails.case_id);
this.caseTitle.label = this.caseDetails.state.title_display;
this.caseFields = this.getCaseFieldsInfo();
}

private getCaseFields(): CaseField[] {
private getCaseFieldsInfo(): CaseField[] {
const caseDataFields = this.caseDetails.tabs.reduce((acc, tab) => {
return acc.concat(tab.fields);
}, []);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,6 @@ let caseNotifier: jasmine.SpyObj<CaseNotifier>;
let navigationNotifierService: NavigationNotifierService;
let errorNotifierService: ErrorNotifierService;


describe('CaseFullAccessViewComponent', () => {
let caseViewData: CaseView;
let FIELDS: CaseField[];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { DebugElement } from '@angular/core';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { ReactiveFormsModule } from '@angular/forms';
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
import { By } from '@angular/platform-browser';
import { AbstractAppConfig } from '../../../app.config';
import { CaseViewTrigger } from '../../domain';
import { OrderService } from '../../services';
import { attr, text } from '../../test/helpers';
Expand Down Expand Up @@ -29,6 +30,12 @@ describe('EventTriggerComponent', () => {
name: 'Create a bundle',
description: 'Create a bundle',
order: 3
},
{
id: 'queryManagementRespondQuery',
name: 'QueryManagementRespondQuery',
description: 'Query Management Respond to a query',
order: 4
}
];

Expand All @@ -52,7 +59,7 @@ describe('EventTriggerComponent', () => {
const $EVENT_TRIGGER_FORM = By.css('.event-trigger');

let orderService: any;

let appConfig: jasmine.SpyObj<AbstractAppConfig>;
let fixture: ComponentFixture<EventTriggerComponent>;
let component: EventTriggerComponent;
let de: DebugElement;
Expand All @@ -61,6 +68,8 @@ describe('EventTriggerComponent', () => {
beforeEach(waitForAsync(() => {
orderService = createSpyObj<OrderService>('orderService', ['sort']);
orderService.sort.and.returnValue(SORTED_TRIGGERS);
appConfig = createSpyObj<AbstractAppConfig>('appConfig', ['getEventsToHide']);
appConfig.getEventsToHide.and.returnValue(['']);

TestBed
.configureTestingModule({
Expand All @@ -72,7 +81,8 @@ describe('EventTriggerComponent', () => {
MockRpxTranslatePipe
],
providers: [
{provide: OrderService, useValue: orderService}
{provide: OrderService, useValue: orderService},
{provide: AbstractAppConfig, useValue: appConfig}
]
})
.compileComponents();
Expand Down Expand Up @@ -106,7 +116,7 @@ describe('EventTriggerComponent', () => {
it('should render a <select> with an <option> for every trigger', () => {
const options = de.queryAll($SELECT_OPTIONS);

expect(options.length).toBe(3);
expect(options.length).toBe(4);

TRIGGERS.forEach(trigger => {
const optionDe = options.find(option => text(option) === trigger.name);
Expand Down Expand Up @@ -222,6 +232,8 @@ describe('EventTriggerComponent', () => {
beforeEach(waitForAsync(() => {
orderService = createSpyObj<OrderService>('orderService', ['sort']);
orderService.sort.and.returnValue([ TRIGGERS[0] ]);
appConfig = createSpyObj<AbstractAppConfig>('appConfig', ['getEventsToHide']);
appConfig.getEventsToHide.and.returnValue(['queryManagementRespondQuery']);

TestBed
.configureTestingModule({
Expand All @@ -233,7 +245,8 @@ describe('EventTriggerComponent', () => {
MockRpxTranslatePipe
],
providers: [
{provide: OrderService, useValue: orderService}
{provide: OrderService, useValue: orderService},
{provide: AbstractAppConfig, useValue: appConfig}
]
})
.compileComponents();
Expand Down Expand Up @@ -261,4 +274,54 @@ describe('EventTriggerComponent', () => {
expect(component.triggerForm.valid).toBeTruthy();
});
});

describe('Hide events', () => {
beforeEach(waitForAsync(() => {
orderService = createSpyObj<OrderService>('orderService', ['sort']);
appConfig = createSpyObj<AbstractAppConfig>('appConfig', ['getEventsToHide']);

TestBed.configureTestingModule({
imports: [
ReactiveFormsModule
],
declarations: [
EventTriggerComponent,
MockRpxTranslatePipe
],
providers: [
{provide: OrderService, useValue: orderService},
{provide: AbstractAppConfig, useValue: appConfig}
]
})
.compileComponents();

fixture = TestBed.createComponent(EventTriggerComponent);
component = fixture.componentInstance;
component.triggerForm = new FormGroup({
trigger: new FormControl('')
});
component.triggers = TRIGGERS;
fixture.detectChanges();
}));

it('should hide the respond to query event from the dropdown', () => {
orderService.sort.and.returnValue([TRIGGERS[0], TRIGGERS[1]]);
appConfig.getEventsToHide.and.returnValue(['queryManagementRespondQuery']);
component.ngOnChanges(trigersChangeDummy(TRIGGERS));
fixture.detectChanges();
const triggerIds = component.triggers.map((trigger) => trigger.id);
expect(triggerIds.includes('queryManagementRespondQuery')).toBe(false);
expect(component.triggers.length).toEqual(2);
});

it('should show the respond to query event from the dropdown', () => {
orderService.sort.and.returnValue(TRIGGERS);
appConfig.getEventsToHide.and.returnValue(['']);
component.ngOnChanges(trigersChangeDummy(TRIGGERS));
fixture.detectChanges();
const triggerIds = component.triggers.map((trigger) => trigger.id);
expect(triggerIds.includes('queryManagementRespondQuery')).toBe(true);
expect(component.triggers.length).toEqual(4);
});
});
});
Loading

0 comments on commit 1558ef9

Please sign in to comment.