feat: add reusable EmployeeTable shell component (SDK-539)#1398
Open
krisxcrash wants to merge 1 commit intokw/feat/sdk-547from
Open
feat: add reusable EmployeeTable shell component (SDK-539)#1398krisxcrash wants to merge 1 commit intokw/feat/sdk-547from
krisxcrash wants to merge 1 commit intokw/feat/sdk-547from
Conversation
Add a presentational EmployeeTable component under TimeOff/shared that composes a search input, DataView, and PaginationControl. The component is consumed by 4 TimeOff contexts (SelectEmployees, SetBalances, PTO/Sick Employees tab, Holiday Employees tab) with configurable columns, optional selection, and optional item menus. - Create EmployeeTable with search (search-lg icon + clear button), fixed Name/Job title columns, and additionalColumns prop - Consolidate shared employeeTable i18n keys into a dedicated Company.TimeOff.EmployeeTable namespace; remove duplicates from CreateTimeOffPolicy, HolidayPolicy, and TimeOffPolicyDetails - Add Storybook stories for all 4 consumer variants plus empty, empty search, pagination, and loading states - Add 17 unit tests covering columns, search, selection, menus, empty states, and pagination - Left-align all data columns; right-align only the actions column - Add balanceInput utility class using toRem(90) for constrained inputs Made-with: Cursor
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.
Summary
EmployeeTableshell component underTimeOff/TimeOffManagement/shared/that composes a search input (with search icon + clear button),DataViewwith fixed Name/Job title columns plus configurableadditionalColumns, and optionalPaginationControlemployeeTablei18n keys into a dedicatedCompany.TimeOff.EmployeeTablenamespace and removes duplicated keys fromCreateTimeOffPolicy,HolidayPolicy, andTimeOffPolicyDetailsDetails
The component supports 4 consumer contexts via its props:
'multiple'toRem(90))All data columns are left-aligned; only the actions/menu column is right-aligned.
Out of scope
emptySearchStateprop with a generic default)Test plan
npm run test -- --run)npx tsc --noEmit)npm run storybook)Resolves SDK-539