Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

jeffredodd
Copy link
Contributor

@jeffredodd jeffredodd commented Sep 18, 2025

🎯 Overview

This PR implements the complete PayrollHistory component with enhanced date formatting and comprehensive i18n support.

πŸ”§ Technical Improvements

  • Added locale-aware date formatting with parseDateStringToLocal
  • Implemented dynamic i18n namespace loading in test environment

Screenshots

Screenshot 2025-09-18 at 11 33 04β€―AM Screenshot 2025-09-18 at 11 33 11β€―AM


renderWithProviders(<ManageSignatories />)

expect(screen.getByRole('heading')).toHaveTextContent('otherSignatoryTitle')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made some changes to our translation provider and now these keys render as a by product.

@@ -1,27 +1,34 @@
import type { ReactElement } from 'react'
import type React from 'react'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes here should allow all translation files to be loaded into tests w/o issue.

@jeffredodd jeffredodd marked this pull request as ready for review September 18, 2025 18:56
@Copilot Copilot AI review requested due to automatic review settings September 18, 2025 18:56
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements the complete PayrollHistory component with enhanced date formatting and comprehensive i18n support. The implementation includes locale-aware date formatting, dynamic i18n namespace loading in the test environment, and proper integration with the existing payroll management system.

  • Implements PayrollHistory component with locale-aware date formatting using parseDateStringToLocal
  • Adds comprehensive test coverage for both the main component and presentation layer
  • Updates i18n configuration to dynamically load translation namespaces in test environments

Reviewed Changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/test-utils/renderWithProviders.tsx Replaces static i18n initialization with dynamic namespace loading using Vite's glob function
src/shared/constants.ts Adds new payroll-related event constants for summary/receipt viewing and cancellation
src/i18n/en/payroll.payrollhistory.json Removes unused engineeringStaff label from translations
src/components/Payroll/index.ts Exports the new PayrollHistory component
src/components/Payroll/helpers.ts Adds utility functions for payroll type and status determination
src/components/Payroll/helpers.test.ts Comprehensive tests for the new utility functions
src/components/Payroll/PayrollList/PayrollList.tsx Refactors to use shared getPayrollType helper function
src/components/Payroll/PayrollHistory/PayrollHistoryPresentation.tsx Implements presentation component with DataView table and time filtering
src/components/Payroll/PayrollHistory/PayrollHistoryPresentation.test.tsx Complete test suite for the presentation component
src/components/Payroll/PayrollHistory/PayrollHistory.tsx Main component with API integration and business logic
src/components/Payroll/PayrollHistory/PayrollHistory.test.tsx Integration tests covering API calls and user interactions
src/components/Payroll/PayrollHistory/PayrollHistory.stories.tsx Updates story imports and data types
src/components/Company/DocumentSigner/DocumentList/ManageSignatories.test.tsx Updates to use renderWithProviders helper

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jeffredodd jeffredodd force-pushed the jdj/payroll-history-api-connection branch from e6a23d0 to d40a8f7 Compare September 18, 2025 19:01
…ng and i18n

- Add PayrollHistory component with comprehensive test coverage (707 tests passing)
- Implement proper date formatting for pay periods (July 16–July 30, 2025)
- Format pay dates as readable text (Aug 15, 2025 instead of 2025-08-15)
- Add comprehensive i18n namespace loading in test environment
- Remove hardcoded placeholder text and styling inconsistencies
- Add proper locale-aware date formatting with parseDateStringToLocal
- Include PayrollHistory types, stories, and complete API integration
- Export PayrollHistory component for partner consumption
- Fix i18n test infrastructure to support all translation namespaces
- Change namespace from 'Payroll.PayrollHistory' to 'payroll.payrollhistory'
- Rename translation file to match expected format
- Fix TypeScript errors in CI build
- Maintain same functionality with corrected naming convention
- Rename translation file to Payroll.PayrollHistory.json for correct casing
- Update component usage to use 'Payroll.PayrollHistory' namespace
- Regenerate TypeScript types with proper interface mapping
- All tests passing with correct i18n integration
- Fixes CI TypeScript errors while maintaining proper namespace conventions
@jeffredodd jeffredodd force-pushed the jdj/payroll-history-api-connection branch from 90d8c5e to fc27613 Compare September 18, 2025 21:03
Copy link
Member

@serikjensen serikjensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few things on this one, i think the only hard one is to update the cancel payroll menu item to be hidden according to the logic outline below unless you plan on doing it in a follow up

@serikjensen serikjensen enabled auto-merge (squash) September 19, 2025 17:23
@serikjensen serikjensen merged commit 39d6ea9 into main Sep 19, 2025
3 checks passed
@serikjensen serikjensen deleted the jdj/payroll-history-api-connection branch September 19, 2025 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants