Merged
Conversation
Contributor
dmortal
commented
Jan 7, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements a payment history view feature for contractor payments, refactoring the PaymentHistory component to display actual payment data from the API and improving the UI with proper formatting and actions.
Key changes:
- Refactored PaymentHistory component to fetch and display real contractor payment group data
- Enhanced UI with improved date formatting, currency display, and conditional menu actions
- Removed unused Modal styles and simplified component props by deriving companyId from payment data
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/Contractor/Payments/PaymentHistory/PaymentHistory.tsx | Added API data fetching for payment groups and contractors, removed companyId prop |
| src/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.tsx | Refactored to use real payment data with proper formatting and conditional cancel actions |
| src/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.module.scss | Added icon styling for menu items |
| src/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.tsx | Removed companyId prop from PaymentHistoryContextual component |
| src/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.tsx | Moved action column to itemMenu prop in DataView |
| src/i18n/en/Contractor.Payments.PaymentHistory.json | Updated translation strings with improved formatting and new error message |
| src/shared/constants.ts | Added new payment event constants for view details and cancel actions |
| src/types/i18next.d.ts | Updated type definitions to match translation changes |
| src/styles/sdk.scss | Removed unused Modal import |
| src/styles/_Modal.scss | Deleted unused Modal styles file |
| src/assets/icons/slash-circle.svg | Added new cancel icon SVG |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+109
to
117
| render: ({ wageTotal, reimbursement, bonus }) => ( | ||
| <Text> | ||
| {wageTotal | ||
| ? currencyFormatter( | ||
| Number(wageTotal) + Number(reimbursement) + Number(bonus), | ||
| ) | ||
| : '–'} | ||
| </Text> | ||
| ), |
There was a problem hiding this comment.
The total calculation assumes reimbursement and bonus are always defined. If either is undefined or null, Number() will convert them to NaN, resulting in an incorrect total. These values should be coerced to 0 when falsy before addition.
src/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.module.scss
Show resolved
Hide resolved
serikjensen
approved these changes
Jan 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.