feat: adding RFI alerts to contractor payment list#1079
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds RFI (Request for Information) alerts to the contractor payments list to notify users when business information requests require attention or are under review. The alerts warn users that payments may be blocked until the information requests are resolved.
Changes:
- Added i18n translation keys for RFI pending response and pending review alerts
- Integrated information requests API to fetch and check for pending RFI statuses
- Modified alert rendering logic to support string-based translation keys in addition to JSX content
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/types/i18next.d.ts | Added TypeScript type definitions for four new translation keys related to RFI alerts |
| src/i18n/en/Contractor.Payments.PaymentsList.json | Added English translations for RFI alert titles and descriptions for both pending response and pending review states |
| src/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.tsx | Enhanced alert content rendering to support translation of string-based content keys |
| src/components/Contractor/Payments/PaymentsList/PaymentsList.tsx | Integrated information requests API, added logic to generate RFI alerts based on request status, and merged them with existing alerts |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| > | ||
| {alert.content ?? null} | ||
| {typeof alert.content === 'string' | ||
| ? t(`alerts.${alert.content}` as never) |
There was a problem hiding this comment.
Would it make sense to do t(alerts.${alert.content} as const) instead of as never to treat the string as a literal instead of having TS ignore it alltogether?
serikjensen
left a comment
There was a problem hiding this comment.
Looking good pending resolution of Kristine's feedback!
Follow up, we now have a dedicated InformationRequestFlow component with a boolean configuration where you can filter it to only payroll blocking. Would it make sense to have navigation to a screen with that component present similar to how we have it in PayrollBlockerList so that the user can resolve the RFIs?
Adding pending RFI alerts to the contractor payments list component:
