Skip to content

feat(SDK-553): add PolicyList functional component#1413

Draft
krisxcrash wants to merge 8 commits intokw/feat/sdk-551-policy-list-storiesfrom
kw/feat/sdk-553-policy-list-functional
Draft

feat(SDK-553): add PolicyList functional component#1413
krisxcrash wants to merge 8 commits intokw/feat/sdk-551-policy-list-storiesfrom
kw/feat/sdk-553-policy-list-functional

Conversation

@krisxcrash
Copy link
Copy Markdown
Contributor

@krisxcrash krisxcrash commented Mar 30, 2026

Summary

  • Replaces the skeleton PolicyList.tsx with a fully wired functional component
  • Adds barrel index.ts for the PolicyList directory

Changes

  • PolicyList.tsx: BaseComponent + Root pattern; fetches policies via useTimeOffPoliciesGetAllSuspense, handles delete via useTimeOffPoliciesDeactivateMutation with invalidateAllTimeOffPoliciesGetAll, maps API data to PolicyListItem[], fires state machine events with { policyId, policyType } payloads
  • index.ts: Barrel export for PolicyList, PolicyListPresentation, and types

Related

Testing

  • Integration tests will be added in a follow-up PR
  • npx tsc --noEmit passes with no errors

Stateless presentation component for the time off policy list. Renders
a DataView table with Name/Enrolled columns, per-row overflow menu
(Edit/Delete), Finish setup button for incomplete policies, delete
confirmation dialog, dismissible success alert, and empty state.

Also updates translations to match Figma designs.

Made-with: Cursor
@krisxcrash krisxcrash marked this pull request as draft March 30, 2026 20:44
Stories covering all visual states: default (with incomplete policy),
empty state, post-delete success alert, and deleting-in-progress.

Made-with: Cursor
@krisxcrash krisxcrash force-pushed the kw/feat/sdk-551-policy-list-stories branch from bb138f7 to f1a509f Compare March 30, 2026 20:45
Wire up data fetching and event handling for the time off policy list.
Fetches policies via useTimeOffPoliciesGetAllSuspense, handles delete
via useTimeOffPoliciesDeactivateMutation with query invalidation, and
fires state machine events with policyId/policyType payloads for
navigation to detail screens.

Made-with: Cursor
@krisxcrash krisxcrash force-pushed the kw/feat/sdk-553-policy-list-functional branch from a4110ff to 8a68f32 Compare March 30, 2026 20:46
@krisxcrash krisxcrash force-pushed the kw/feat/sdk-551-policy-list-stories branch 2 times, most recently from 8374d6f to 4125b65 Compare April 2, 2026 19:04
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