-
Notifications
You must be signed in to change notification settings - Fork 4
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
feature/8942-ClaimFilesSegment #9066
Conversation
…pe, doc type and received date.
VAMobile/src/screens/BenefitsScreen/ClaimsScreen/ClaimDetailsScreen/ClaimDetailsScreen.test.tsx
Show resolved
Hide resolved
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.
Approving with optional suggestions
@@ -16,23 +16,41 @@ function ClaimFiles({ claim }: ClaimFilesProps) { | |||
const { t } = useTranslation(NAMESPACE.COMMON) | |||
const theme = useTheme() | |||
const { attributes } = claim | |||
const documents = attributes.eventsTimeline.filter((event) => event.filename && event.filename.length > 0) | |||
const events = attributes.eventsTimeline.filter( | |||
(event) => (event.filename && event.filename.length > 0) || (event.documents && event.documents.length > 0), |
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.
Optionally could simplify these checks like
(event.filename?.length || event.documents?.length)
if (document.filename) { | ||
const textLines: TextLine[] = [{ text: document.filename, variant: 'MobileBodyBold' }] | ||
if (document.fileType) { | ||
textLines.push({ text: t('appointmentList.requestType', { type: document.fileType }) }) |
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.
Optionally could simplify all these to one-liners like
document.fileType && textLines.push({ text: t('appointmentList.requestType', { type: document.fileType }) })
if (document.uploadDate) { | ||
textLines.push({ text: t('appointmentList.received', { date: document.uploadDate }) }) | ||
} | ||
items.push({ textLines: textLines }) |
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.
Could use shorthand here
Description of Change
Created Files layout and segmented controller title change from details to files. Also created unit tests. This is behind the feature flag. See slack thread for VQA
Screenshots/Video
Testing
yarn test
Reviewer Validations
Use a row component to represent each file associated with claim
Within the row component, display these additional fields associated with each file:
Filename
Request type
Document type
Received
VQA Misty / Lauren
PR Checklist
Reviewer: Confirm the items below as you review
For QA
Run a build for this branch