// components import { SingleBoard } from "components/core/views/board-view/single-board"; // icons import { StateGroupIcon } from "components/icons"; // helpers import { addSpaceIfCamelCase } from "helpers/string.helper"; // types import { ICurrentUserResponse, IIssue, IIssueViewProps, IState, UserAuth } from "types"; type Props = { addIssueToGroup: (groupTitle: string) => void; disableUserActions: boolean; disableAddIssueOption?: boolean; dragDisabled: boolean; handleIssueAction: (issue: IIssue, action: "copy" | "delete" | "edit") => void; handleTrashBox: (isDragging: boolean) => void; openIssuesListModal?: (() => void) | null; removeIssue: ((bridgeId: string, issueId: string) => void) | null; states: IState[] | undefined; user: ICurrentUserResponse | undefined; userAuth: UserAuth; viewProps: IIssueViewProps; }; export const AllBoards: React.FC = ({ addIssueToGroup, disableUserActions, disableAddIssueOption = false, dragDisabled, handleIssueAction, handleTrashBox, openIssuesListModal, removeIssue, states, user, userAuth, viewProps, }) => { const { displayFilters, groupedIssues } = viewProps; return ( <> {groupedIssues ? (
{Object.keys(groupedIssues).map((singleGroup, index) => { const currentState = displayFilters?.group_by === "state" ? states?.find((s) => s.id === singleGroup) : null; if (!displayFilters?.show_empty_groups && groupedIssues[singleGroup].length === 0) return null; return ( addIssueToGroup(singleGroup)} currentState={currentState} disableUserActions={disableUserActions} disableAddIssueOption={disableAddIssueOption} dragDisabled={dragDisabled} groupTitle={singleGroup} handleIssueAction={handleIssueAction} handleTrashBox={handleTrashBox} openIssuesListModal={openIssuesListModal ?? null} removeIssue={removeIssue} user={user} userAuth={userAuth} viewProps={viewProps} /> ); })} {!displayFilters?.show_empty_groups && (

Hidden groups

{Object.keys(groupedIssues).map((singleGroup, index) => { const currentState = displayFilters?.group_by === "state" ? states?.find((s) => s.id === singleGroup) : null; if (groupedIssues[singleGroup].length === 0) return (
{currentState && ( )}

{displayFilters?.group_by === "state" ? addSpaceIfCamelCase(currentState?.name ?? "") : addSpaceIfCamelCase(singleGroup)}

0
); })}
)}
) : null} ); };