2023-08-25 12:11:23 +00:00
|
|
|
// components
|
|
|
|
import { IssueDescriptionForm, IssueReaction } from "components/issues";
|
|
|
|
// types
|
|
|
|
import { IIssue } from "types";
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
handleUpdateIssue: (formData: Partial<IIssue>) => Promise<void>;
|
|
|
|
issue: IIssue;
|
|
|
|
readOnly: boolean;
|
|
|
|
workspaceSlug: string;
|
|
|
|
};
|
|
|
|
|
2023-11-08 15:01:46 +00:00
|
|
|
export const PeekOverviewIssueDetails: React.FC<Props> = ({ handleUpdateIssue, issue, readOnly, workspaceSlug }) => (
|
2023-08-25 12:11:23 +00:00
|
|
|
<div className="space-y-2">
|
|
|
|
<h6 className="font-medium text-custom-text-200">
|
|
|
|
{issue.project_detail.identifier}-{issue.sequence_id}
|
|
|
|
</h6>
|
|
|
|
<IssueDescriptionForm
|
|
|
|
handleFormSubmit={handleUpdateIssue}
|
|
|
|
isAllowed={!readOnly}
|
|
|
|
issue={{
|
|
|
|
name: issue.name,
|
|
|
|
description_html: issue.description_html,
|
2023-11-01 11:06:37 +00:00
|
|
|
project_id: issue.project_detail.id,
|
2023-08-25 12:11:23 +00:00
|
|
|
}}
|
|
|
|
workspaceSlug={workspaceSlug}
|
|
|
|
/>
|
|
|
|
<IssueReaction workspaceSlug={workspaceSlug} issueId={issue.id} projectId={issue.project} />
|
|
|
|
</div>
|
|
|
|
);
|