hlxsites / vg-volvotrucks-us

Franklin site for https://www.volvotrucks.us/
https://www.volvotrucks.us/
Apache License 2.0
2 stars 5 forks source link

Integrate the api with the search bar to be able to show the recall information #473

Closed mlee001 closed 8 months ago

mlee001 commented 9 months ago

User Story As a customer, I want to retrieve vehicle information and see the recall history of my vehicle based on the vin I put in the search field.

Acceptance Criteria:

  1. Integration with API:
    • When the user submits a valid VIN, integrate the search block with the external API to retrieve and display:
      • Recalls that are active and have a remedy
      • Recalls that are active and don't have a remedy
      • Recalls that are no longer active
      • Recalls are order by date in ascending order (oldest recall first)
  2. Display Vehicle Information:
    • Once the API response is received, display the relevant recall information using the following format
      • Issue date
      • Brand recall number
      • NHTSA recall number
      • Transport Canada recall number
      • Recall status
      • Description
      • Safety risk
      • Remedy
      • Next steps
    • When displayed on a translated page the translated result will show, if this is unavailable the English version is shown.
    • If no recalls are available an generic message is shown, for example: There are no recalls for this vehicle.
  3. Error Handling:
    • Implement error handling for API requests, providing user-friendly error messages if the API request fails or encounters issues.
  4. API delivers capital letters and need to be displayed within normal case.

Definition of Done:

Out of scope

Tbd

Json example

Andrei-Boiangiu commented 8 months ago

confirmed as done as tested on

VolvoTrucks:

English - https://471-nhtsa-accordion-styling--vg-volvotrucks-us--hlxsites.hlx.page/recalls/ French - https://471-nhtsa-accordion-styling--vg-volvotrucks-us--hlxsites.hlx.page/fr/recalls/

and Mack Trucks https://452-nhtsa-setup--vg-macktrucks-com--hlxsites.hlx.page/nhtsa/