-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(fe:FSADT1-1761): Contacts - on Edit associated locations is missing #1515
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the formatting of location titles by including the location code (when applicable) across the Client Details page and related components and tests.
- Introduces a new formatLocation function in the ForestClientService to standardize location title formatting.
- Updates components and pages to use the new formatting, with corresponding test changes in unit, component, and e2e tests.
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
frontend/tests/unittests/services/ForestClientService.spec.ts | Adds unit tests for the new formatLocation function. |
frontend/tests/components/pages/client-details/ContactView.cy.ts | Updates tests to validate the showLocationCode prop in the contact-view. |
frontend/tests/components/components/grouping/StaffContactGroupComponent.cy.ts | Adds tests for location titles when showLocationCode is enabled, including handling of unnamed locations. |
frontend/src/services/ForestClientService.ts | Implements the new formatLocation function to format location titles as "code - name". |
frontend/src/pages/client-details/ContactView.vue | Adds the show-location-code prop for associated locations on the Client Details page. |
frontend/src/pages/ClientDetailsPage.vue | Refactors location title formatting using getUpdatedLocationTitle that leverages formatLocation. |
frontend/src/components/grouping/StaffContactGroupComponent.vue | Updates location list formatting and display logic to include location codes when specified. |
frontend/cypress/e2e/pages/ClientDetailsPage.cy.ts | Updates end-to-end tests to validate the new location title format. |
Files not reviewed (1)
- frontend/stub/__files/response-clients-details-SE.json: Language not supported
Comments suppressed due to low confidence (1)
frontend/src/components/grouping/StaffContactGroupComponent.vue:129
- [nitpick] Consider renaming 'localFormatLocation' to a more descriptive name such as 'getDisplayLocationText' to clearly convey its purpose.
const localFormatLocation = (location: CodeDescrType) => {
As suggested by copilot Co-authored-by: Copilot <[email protected]>
|
Description
Includes the location code in the locations titles in the options of the Associated locations input, but only on the Client Details page.
ie: instead of "Mailing address", shows "00 - Mailing address".
On the other hand, when location name is empty shows it like: "00".
Fixes FSADT1-1761
Type of change
How Has This Been Tested?
Checklist
Further comments
Thanks for the PR!
Deployments, as required, will be available below:
Any successful deployments (not always required) will be available here
Please create PRs in draft mode. Mark as ready to enable:
After merge, new images are deployed in: