Skip to content

Commit

Permalink
feature/8874-ListViewInformationPillsUpdate (#9142)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Alexander <[email protected]>
  • Loading branch information
Sparowhawk and alexandec authored Aug 12, 2024
1 parent 8f8c1c5 commit 40f0dd1
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 9 deletions.
2 changes: 1 addition & 1 deletion VAMobile/e2e/tests/Claims.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const ClaimsE2eIdConstants = {
CLAIM_1_ID: 'Compensation Received December 05, 2021',
CLAIM_2_ID: 'Compensation Received December 04, 2021',
CLAIM_3_ID: 'Compensation Received July 20, 2021',
CLAIM_4_ID: 'Compensation Received January 01, 2021',
CLAIM_4_ID: 'Compensation More information needed Received January 01, 2021',
CLAIM_5_ID: 'Compensation Received March 22, 2019',
CLAIM_6_ID: 'Dependency Received January 01, 2016',
CLOSED_CLAIM_DECISION_LETTER_ID: 'Compensation Decision letter ready Received January 01, 2021',
Expand Down
4 changes: 4 additions & 0 deletions VAMobile/src/api/types/ClaimsAndAppealsData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,10 @@ export type ClaimsAndAppealsList = {
updatedAt: string
displayTitle: string
decisionLetterSent: boolean
phase?: number | string
claimTypeCode?: string
documentsNeeded?: boolean
developmentLetterSent?: boolean
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ const mockPayload: ClaimsAndAppealsListPayload = {
dateFiled: '2020-10-01',
updatedAt: '2020-10-05',
displayTitle: 'Compensation',
phase: 3,
claimTypeCode: '',
documentsNeeded: true,
developmentLetterSent: false,
},
},
{
Expand All @@ -50,6 +54,22 @@ const mockPayload: ClaimsAndAppealsListPayload = {
displayTitle: 'Insurance on docket appeal',
},
},
{
id: '3',
type: 'claim',
attributes: {
subtype: 'Dependency',
completed: false,
decisionLetterSent: false,
dateFiled: '2020-10-04',
updatedAt: '2020-10-04',
displayTitle: 'Dependency',
phase: 4,
claimTypeCode: '',
documentsNeeded: false,
developmentLetterSent: false,
},
},
],
meta: {
pagination: {
Expand Down Expand Up @@ -104,7 +124,11 @@ context('ClaimsAndAppealsListView', () => {
await waitFor(() => expect(screen.getByText('Insurance on docket appeal')).toBeTruthy())
await waitFor(() => expect(screen.getByText('Received December 22, 2020')).toBeTruthy())

await waitFor(() => expect(screen.getByText('Dependency')).toBeTruthy())
await waitFor(() => expect(screen.getByText('Received October 04, 2020')).toBeTruthy())

await waitFor(() => expect(screen.getByText('Compensation')).toBeTruthy())
await waitFor(() => expect(screen.getByText('More information needed')).toBeTruthy())
await waitFor(() => expect(screen.getByText('Received October 01, 2020')).toBeTruthy())

initializeTestInstance('CLOSED')
Expand All @@ -126,7 +150,7 @@ context('ClaimsAndAppealsListView', () => {
await waitFor(() =>
fireEvent.press(
screen.getByRole('menuitem', {
name: 'Compensation Received October 01, 2020',
name: 'Compensation More information needed Received October 01, 2020',
}),
),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ function ClaimsAndAppealsListView({ claimType, scrollViewRef }: ClaimsAndAppeals
mt: margin,
mb: margin,
})
} else if (attributes.documentsNeeded) {
const margin = theme.dimensions.condensedMarginBetween
textLines.push({
text: t('claims.moreInfoNeeded'),
textTag: { labelType: LabelTagTypeConstants.tagYellow },
mt: margin,
mb: margin,
})
}

textLines.push({ text: t('claimDetails.receivedOn', { date: formatDateMMMMDDYYYY(attributes.dateFiled) }) })
Expand Down
42 changes: 35 additions & 7 deletions VAMobile/src/store/api/demo/mocks/claims.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
"completed": false,
"dateFiled": "2021-07-20",
"updatedAt": "2021-07-20",
"displayTitle": "Compensation"
"displayTitle": "Compensation",
"phase": 2,
"claimTypeCode": "",
"documentsNeeded": false,
"developmentLetterSent": false
}
},
{
Expand All @@ -21,7 +25,11 @@
"completed": false,
"dateFiled": "2021-01-01",
"updatedAt": "2021-05-05",
"displayTitle": "Compensation"
"displayTitle": "Compensation",
"phase": 3,
"claimTypeCode": "",
"documentsNeeded": true,
"developmentLetterSent": false
}
},
{
Expand All @@ -32,7 +40,11 @@
"completed": false,
"dateFiled": "2019-03-22",
"updatedAt": "2019-07-18",
"displayTitle": "Compensation"
"displayTitle": "Compensation",
"phase": 3,
"claimTypeCode": "",
"documentsNeeded": false,
"developmentLetterSent": false
}
},
{
Expand All @@ -43,7 +55,11 @@
"completed": false,
"dateFiled": "2016-01-01",
"updatedAt": "2016-07-30",
"displayTitle": "Dependency"
"displayTitle": "Dependency",
"phase": 4,
"claimTypeCode": "",
"documentsNeeded": false,
"developmentLetterSent": false
}
},
{
Expand All @@ -54,7 +70,11 @@
"completed": false,
"dateFiled": "2021-12-04",
"updatedAt": "2021-12-04",
"displayTitle": "Compensation"
"displayTitle": "Compensation",
"phase": 8,
"claimTypeCode": "",
"documentsNeeded": false,
"developmentLetterSent": false
}
},
{
Expand All @@ -65,7 +85,11 @@
"completed": false,
"dateFiled": "2021-12-05",
"updatedAt": "2021-12-05",
"displayTitle": "Compensation"
"displayTitle": "Compensation",
"phase": 1,
"claimTypeCode": "",
"documentsNeeded": false,
"developmentLetterSent": false
}
},
{
Expand Down Expand Up @@ -494,7 +518,11 @@
"decisionLetterSent": true,
"dateFiled": "2021-01-01",
"updatedAt": "2021-04-09",
"displayTitle": "Compensation"
"displayTitle": "Compensation",
"phase": 8,
"claimTypeCode": "",
"documentsNeeded": false,
"developmentLetterSent": false
}
}
],
Expand Down
1 change: 1 addition & 0 deletions VAMobile/src/translations/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@
"claims.decisionLetterReady": "Decision letter ready",
"claims.decisionLetterReady.alertBody": "You can download your decision letter and other claim letters in the app.",
"claims.defaultClaimType": "disability compensation",
"claims.moreInfoNeeded": "More information needed",
"claims.title": "Claims",
"claims.viewYourActiveClaims": "Review your active claims and appeals",
"claims.viewYourClosedClaims": "Review your closed claims and appeals",
Expand Down

0 comments on commit 40f0dd1

Please sign in to comment.