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 } from "types"; interface IPeekOverviewProperties { issue: IIssue; issueUpdate: (issue: Partial) => void; states: any; members: any; priorities: any; } export const PeekOverviewProperties: FC = (props) => { const { issue, issueUpdate, states, members, priorities } = props; const handleState = (_state: string) => { if (issueUpdate) issueUpdate({ ...issue, state: _state }); }; const handlePriority = (_priority: any) => { if (issueUpdate) issueUpdate({ ...issue, priority: _priority }); }; const handleAssignee = (_assignees: string[]) => { if (issueUpdate) issueUpdate({ ...issue, assignees: _assignees }); }; const handleStartDate = (_startDate: string) => { if (issueUpdate) issueUpdate({ ...issue, start_date: _startDate }); }; const handleTargetDate = (_targetDate: string) => { if (issueUpdate) issueUpdate({ ...issue, target_date: _targetDate }); }; return (
{/* state */}
State
handleState(id)} disabled={false} list={states} />
{/* assignees */}
Assignees
handleAssignee(ids)} disabled={false} list={members} />
{/* priority */}
Priority
handlePriority(id)} disabled={false} list={priorities} />
{/* start_date */}
Start date
handleStartDate(date)} disabled={false} placeHolder={`Start date`} />
{/* target_date */}
Target date
handleTargetDate(date)} disabled={false} placeHolder={`Target date`} />
); };