department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
281 stars 197 forks source link

[FE] My VA C&A: Review logic for how claims and appeals statuses are rendered #85913

Open ajakabcin opened 2 months ago

ajakabcin commented 2 months ago

Background

We received an inquiry via slack as to how we are treating disability benefit claims in claim received status. There seems to be conflicting information though in terms of how we handle claims (where we use the phrasing received on date) vs an appeal (where we seem to be using the phrase submitted on date). We need to first nail down exactly how we're handling the display for claims and appeals independently and then determine how or if the logic needs to be divided.

Tasks

Acceptance Criteria

allisonlu commented 2 months ago

I created a Claims and appeals markdown file under engineering-docs, which i hope will be more evergreen than the comprehensive docs that Angela wrote up from 2022. I was thinking maybe I can start migrating some of these to the new folder.

To answer the question in this ticket:

claim received

claims-and-appeals-01

Date received

This hard-coded copy is handled in lines 47–49 in the Claim component:

<h3 className="vads-u-margin-top--0">
  {capitalizeFirstLetter(getClaimType(claim))} claim received {dateRecd}
</h3>

appeal updated/submitted

claims-and-appeals-02

Updated date

This hard-coded copy is handled in line 80 in the Appeal component:

 appealTitle += ` updated on ${format(
    new Date(replace(updatedEventDateString)),
    'MMMM d, yyyy',
  )}`;

Submitted date

This hard-coded copy is handled in line 107 in the Appeal component:

<p className="vads-u-margin-y--0">
  Submitted on:{' '}
  {format(
    new Date(requestEvent.date.replace(/-/g, '/')),
    'MMMM d, yyyy',
  )}
</p>
ACParker89 commented 2 months ago

@ariperez can you take a look at this?

ajakabcin commented 2 months ago

thank you for this @allisonlu I'm going to roll to next sprint so we can discuss with @mattmarino-adhoc if we should be changing the appeals "submitted" date to align with how we refer to claims "received" date.

Also bringing down to a 1 - if we decide to make a change to the appeals dates that'll be a separate ticket.