Skip to content

Commit

Permalink
Add first attachment implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
maximilianruesch committed Dec 6, 2023
1 parent d8b16a9 commit 4156385
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/components/EpicDetailView/EpicDetailView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
Text,
Title,
} from "@mantine/core"
import { Issue, User } from "types"
import {Attachment, Issue, User} from "types"
import { useQueryClient } from "@tanstack/react-query";
import { AssigneeMenu } from "../DetailView/Components/AssigneeMenu"
import { Description } from "../DetailView/Components/Description"
Expand All @@ -19,6 +19,7 @@ import { ReporterMenu } from "../DetailView/Components/ReporterMenu"
import { DeleteIssue } from "../DetailView/Components/DeleteIssue"
import { ColorSchemeToggle } from "../common/ColorSchemeToggle"
import { IssueIcon } from "../BacklogView/Issue/IssueIcon"
import {Attachments} from "../DetailView/Components/Attachments/Attachments";

export function EpicDetailView({
issueKey,
Expand All @@ -28,6 +29,7 @@ export function EpicDetailView({
description,
created,
updated,
attachments,
closeModal,
}: {
issueKey: string
Expand All @@ -37,6 +39,7 @@ export function EpicDetailView({
description: string
created: string
updated: string
attachments: Attachment[]
closeModal: () => void
}) {
const queryClient = useQueryClient()
Expand Down Expand Up @@ -114,6 +117,16 @@ export function EpicDetailView({
</Accordion.Panel>
</Accordion.Item>
</Accordion>
<Accordion variant="contained" mb={20}>
<Accordion.Item value="Attachments">
<Accordion.Control sx={{ textAlign: "left" }}>
Attachments
</Accordion.Control>
<Accordion.Panel>
<Attachments issueKey={issueKey} attachments={attachments} />
</Accordion.Panel>
</Accordion.Item>
</Accordion>
<Text size="xs" color="dimmed">
Created{" "}
{dateFormat.format(new Date(created))}
Expand Down

0 comments on commit 4156385

Please sign in to comment.