Skip to content

Commit

Permalink
fix(fe:FSADT1-1593): prevent issue with addresses null (#1368)
Browse files Browse the repository at this point in the history
* fix: prevent issue with addresses null

* update stub description
  • Loading branch information
fterra-encora authored Dec 18, 2024
1 parent f80df05 commit d162b23
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/pages/ClientDetailsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const compareString = (a: string, b: string) => {
};
const sortedLocations = computed(() =>
data.value.addresses.toSorted((a, b) => compareString(a.clientLocnCode, b.clientLocnCode)),
data.value.addresses?.toSorted((a, b) => compareString(a.clientLocnCode, b.clientLocnCode)),
);
</script>

Expand Down
16 changes: 16 additions & 0 deletions frontend/stub/__files/response-clients-details-null.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"registryCompanyTypeCode": "GP",
"corpRegnNmbr": "{{randomValue length=8 type='NUMERIC'}}",
"clientNumber":"{{randomValue length=4 type='NUMERIC'}}",
"clientName": "KOVACEK, THOMPSON AND BOYER",
"clientAcronym": "KTB",
"clientTypeCode": "P",
"clientTypeDesc": "General Partnership",
"goodStandingInd": "Y",
"clientStatusCode": "A",
"clientStatusDesc": "Active",
"clientComment": "Email from Cheryl Bibby to request any letters for sec deposits be mailed to 3000, 28th St, Vernon",
"wcbFirmNumber": "{{randomValue length=7 type='NUMERIC'}}",
"contacts": null,
"addresses": null
}
15 changes: 15 additions & 0 deletions frontend/stub/mappings/client_details.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,21 @@
"fixedDelayMilliseconds": 500
}
},
{
"name": "Client Details Individual - null addresses and contacts",
"request": {
"urlPattern": "/api/clients/details/null(.*)",
"method": "GET"
},
"response": {
"status": 200,
"bodyFileName": "response-clients-details-null.json",
"transformers": [
"response-template"
],
"fixedDelayMilliseconds": 500
}
},
{
"name": "Client Details - Error 400",
"request": {
Expand Down

0 comments on commit d162b23

Please sign in to comment.