Skip to content

Commit

Permalink
Fix some todos, wip
Browse files Browse the repository at this point in the history
  • Loading branch information
martha committed Jan 17, 2025
1 parent d2968b0 commit daabab9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/elements/table/GenericTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ const GenericTable = <T extends { id: string }>({
}
checked={
selectableRowIds.length > 0 &&
selectedValue.length === selectableRowIds.length
// >= instead of === accommodates disabling de-selection on rows that are selected
selectedValue.length >= selectableRowIds.length
}
disabled={selectableRowIds.length === 0}
onChange={handleSelectAllClick}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const ConflictingEnrollmentAlert = ({
<Stack direction='column' gap={2}>
{clientBriefName(joiningClient)} has another enrollment in this project
that conflicts with this entry date. You have two options:
{/*todo @martha - add back, see designg*/}
<Stack direction='row' gap={2}>
<Button color='warning' onClick={onClickJoinEnrollment}>
Join Enrollments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ const JoinHouseholdSelectClients = ({

const isRowSelectable = useCallback(
(row: HouseholdClientFieldsFragment) => {
// todo @martha - want to be able to select all and then deselect all.
if (donorHoh && selectedClientIds.includes(donorHoh.id)) {
// Visually disable de-selecting other clients if the HoH is selected
// (This is also functionally disabled by the logic in setSelectedClientIds above)
Expand Down

0 comments on commit daabab9

Please sign in to comment.