import { FC } from "react"; // ui icons import { DoubleCircleIcon, UserGroupIcon } from "@plane/ui"; import { CalendarDays, Signal } from "lucide-react"; // components import { IssuePropertyState } from "components/issues/issue-layouts/properties/state"; import { IssuePropertyPriority } from "components/issues/issue-layouts/properties/priority"; import { IssuePropertyAssignee } from "components/issues/issue-layouts/properties/assignee"; import { IssuePropertyDate } from "components/issues/issue-layouts/properties/date"; // types import { IIssue, IState, IUserLite, TIssuePriorities } from "types"; interface IPeekOverviewProperties { issue: IIssue; issueUpdate: (issue: Partial) => void; states: IState[] | null; members: IUserLite[] | null; priorities: any; } export const PeekOverviewProperties: FC = (props) => { const { issue, issueUpdate, states, members, priorities } = props; const handleState = (_state: IState) => { issueUpdate({ ...issue, state: _state.id }); }; const handlePriority = (_priority: TIssuePriorities) => { issueUpdate({ ...issue, priority: _priority }); }; const handleAssignee = (_assignees: string[]) => { issueUpdate({ ...issue, assignees: _assignees }); }; const handleStartDate = (_startDate: string) => { issueUpdate({ ...issue, start_date: _startDate }); }; const handleTargetDate = (_targetDate: string) => { issueUpdate({ ...issue, target_date: _targetDate }); }; return (
{/* state */}
State
{/* assignees */}
Assignees
handleAssignee(ids)} disabled={false} hideDropdownArrow={true} members={members} />
{/* priority */}
Priority
{/* start_date */}
Start date
handleStartDate(date)} disabled={false} placeHolder={`Start date`} />
{/* target_date */}
Target date
handleTargetDate(date)} disabled={false} placeHolder={`Target date`} />
); };