diff --git a/src/api/issue.api.ts b/src/api/issue.api.ts index 5749f9e..0994b71 100644 --- a/src/api/issue.api.ts +++ b/src/api/issue.api.ts @@ -31,6 +31,7 @@ export interface CreateIssueInput { status?: Issue['status'] priority?: Issue['priority'] assignee?: string + dueDate?: string | null } export type UpdateIssueInput = Partial diff --git a/src/components/IssueContent.vue b/src/components/IssueContent.vue index 70db638..d980d4f 100644 --- a/src/components/IssueContent.vue +++ b/src/components/IssueContent.vue @@ -46,8 +46,8 @@ const cancel = () => {
- - + +
diff --git a/src/components/IssueDate.vue b/src/components/IssueDate.vue index dacefa2..3369ca7 100644 --- a/src/components/IssueDate.vue +++ b/src/components/IssueDate.vue @@ -36,24 +36,33 @@ const cancel = () => { - + diff --git a/src/components/IssueDetails.vue b/src/components/IssueDetails.vue index 17b8be8..c372e26 100644 --- a/src/components/IssueDetails.vue +++ b/src/components/IssueDetails.vue @@ -8,6 +8,7 @@ import StatusMenu from '@/components/StatusMenu.vue' import AssigneeMenu from '@/components/AssigneeMenu.vue' import ReporterInfo from '@/components/ReporterInfo.vue' import IssueTitle from '@/components/IssueTitle.vue' +import IssueDate from '@/components/IssueDate.vue' interface Props { ckey: string @@ -16,6 +17,8 @@ interface Props { const emit = defineEmits<{ statusChanged: [issue: Issue] assigneeChanged: [issue: Issue] + titleChanged: [issue: Issue] + dueDateChanged: [issue: Issue] }>() const issueStore = useIssueStore() @@ -46,7 +49,16 @@ const onTitleChanged = async (title: string) => { const updated = await issueStore.update(issue.value.id, { title }) if (updated) { issue.value = updated - emit('assigneeChanged', updated) + emit('titleChanged', updated) + } +} + +const onDueDateChanged = async (date: string) => { + if (!issue.value) return + const updated = await issueStore.update(issue.value.id, { dueDate: date }) + if (updated) { + issue.value = updated + emit('dueDateChanged', updated) } } @@ -106,7 +118,7 @@ defineExpose({
{{ createdAtFormatted }}
Due Date:
-
{{ issue.dueDate }}
+ diff --git a/src/components/IssueTitle.vue b/src/components/IssueTitle.vue index bcb3369..692cd1c 100644 --- a/src/components/IssueTitle.vue +++ b/src/components/IssueTitle.vue @@ -48,8 +48,8 @@ const cancel = () => {
- - + +