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

Skip to content

Conversation

jeffredodd
Copy link
Contributor

@jeffredodd jeffredodd commented Sep 22, 2025

Summary

Introduces a Payroll Landing component that centralizes Payroll History and Run Payroll flows inside tabbed navigation.
Also resolves type errors in the PayrollListPresentation component.
These errors occurred because the embedded API model now exposes nullable date fields, but parseDateStringToLocal expects string parameters.

Changes

  • Centralized Payroll History and Run Payroll flows inside tabs on the new Payroll Landing component.
  • Updated the entry point to the Run Payroll flow to align with the new tabbed structure.

Screenshots

Screenshot 2025-09-22 at 9 32 25 AM Screenshot 2025-09-22 at 9 40 55 AM

- Add PayrollLanding component with RunPayroll and PayrollHistory tabs
- Fix TypeScript interface to include resource key generic
- Add comprehensive unit tests focused on component orchestration
- Add translation support with Payroll.PayrollLanding namespace
- Fix ESLint import order in PayrollHistory.stories.tsx
- Fix failing test in PayrollHistoryPresentation with waitFor
- Add demo story for PayrollLanding (uses presentation components directly)
- Update PayrollLanding to use proper BaseComponentInterface typing
<Flex flexDirection="column" alignItems="center" gap={24}>
<div className={styles.doneIcon}></div>
<Text>{t('emptyState')}</Text>
<Flex flexDirection="column" gap={16}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wrapped this in the same flex layout I've been using in Payroll History for consistent spacing

@@ -0,0 +1,18 @@
import { I18nextProvider } from 'react-i18next'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seemed like the best way to bring app i18n context to a story that had compound i18n dictionaries.

@jeffredodd jeffredodd marked this pull request as ready for review September 22, 2025 16:41
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 introduces a centralized Payroll Landing component that consolidates the Payroll History and Run Payroll flows into a tabbed navigation interface. It also fixes type safety issues in the PayrollListPresentation component where nullable date fields from the embedded API model were being passed to functions expecting non-null strings.

  • Centralizes payroll flows into a new tabbed interface structure
  • Resolves type errors by adding null checks before date parsing operations
  • Updates component exports and entry points to use the new landing component

Reviewed Changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/i18n/en/Payroll.PayrollList.json Adds "title" translation for upcoming payroll section
src/i18n/en/Payroll.PayrollLanding.json New translation file for tab labels and accessibility text
src/components/Payroll/index.ts Exports the new PayrollLanding component
src/components/Payroll/RunPayrollFlow/RunPayrollFlow.tsx Simplifies to use PayrollLanding instead of direct RunPayroll
src/components/Payroll/PayrollList/PayrollListPresentation.tsx Fixes type safety with null checks for date parsing
src/components/Payroll/PayrollLanding/PayrollLanding.tsx New tabbed interface component for payroll flows
src/components/Payroll/PayrollLanding/PayrollLanding.test.tsx Comprehensive test coverage for the new component
src/components/Payroll/PayrollLanding/PayrollLanding.stories.tsx Storybook implementation for design system integration
src/components/Payroll/PayrollHistory/PayrollHistoryPresentation.tsx Minor layout alignment adjustment
src/components/Payroll/PayrollHistory/PayrollHistory.stories.tsx Adds I18n wrapper for proper localization
.ladle/helpers/I18nWrapper.tsx New helper component for storybook internationalization

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

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.

1 participant