1 parent
a3b36e299c
commit
9e7afb8c03
4 files changed
+19
-15
No files matched your search
@@ -14,6 +14,7 @@ import HistoryList from '@/components/HistoryList.vue'
|
||||
import SplitHandle from '@/components/SplitHandle.vue'
|
||||
import { useSplitPane } from '@/composables/useSplitPane.ts'
|
||||
import FileUpload from '@/components/FileUpload.vue'
|
||||
import PriorityMenu from '@/components/PriorityMenu.vue'
|
||||
|
||||
interface Props {
|
||||
ckey: string
|
||||
@@ -22,6 +23,7 @@ interface Props {
|
||||
const emit = defineEmits<{
|
||||
statusChanged: [issue: Issue]
|
||||
assigneeChanged: [issue: Issue]
|
||||
priorityChanged: [issue: Issue]
|
||||
titleChanged: [issue: Issue]
|
||||
dueDateChanged: [issue: Issue]
|
||||
}>()
|
||||
@@ -85,6 +87,16 @@ const onStatusChanged = async (status: Issue['status']) => {
|
||||
}
|
||||
}
|
||||
|
||||
const onPriorityChanged = async (priority: Issue['priority']) => {
|
||||
if (!issue.value) return
|
||||
|
||||
const updated = await issueStore.update(issue.value.id, { priority })
|
||||
if (updated) {
|
||||
issue.value = updated
|
||||
emit('priorityChanged', updated)
|
||||
}
|
||||
}
|
||||
|
||||
const onAssigneeChanged = async (assignee: string) => {
|
||||
if (!issue.value) return
|
||||
|
||||
@@ -116,6 +128,9 @@ defineExpose({
|
||||
<div class="text-medium-emphasis">Status:</div>
|
||||
<status-menu :value="issue.status" @changed="onStatusChanged" />
|
||||
|
||||
<div class="text-medium-emphasis">Priority:</div>
|
||||
<priority-menu :value="issue.priority" @changed="onPriorityChanged" />
|
||||
|
||||
<div class="text-medium-emphasis">Reporter:</div>
|
||||
<reporter-info :user="issue.reporter" />
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ const select = (value: unknown) => {
|
||||
<template v-slot:activator="{ props: activatorProps }">
|
||||
<v-btn
|
||||
slim
|
||||
border
|
||||
:color="currentStatusColor"
|
||||
density="compact"
|
||||
variant="flat"
|
||||
|
||||
@@ -1,26 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, watchEffect } from 'vue'
|
||||
import { useIssueStore } from '@/stores/issue.ts'
|
||||
import IssueDetails from '@/components/IssueDetails.vue'
|
||||
import type { Issue } from '@/api/issue.api.ts'
|
||||
|
||||
interface Props {
|
||||
ckey: string
|
||||
}
|
||||
|
||||
const issueStore = useIssueStore()
|
||||
const issue = ref<Issue>()
|
||||
|
||||
const { ckey } = defineProps<Props>()
|
||||
|
||||
async function fetch() {
|
||||
const res = await issueStore.getByKey(ckey)
|
||||
if (!res) return
|
||||
|
||||
issue.value = res
|
||||
}
|
||||
|
||||
watchEffect(async () => fetch())
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -292,6 +292,9 @@ async function onDeleteBatch() {
|
||||
:ckey="selected[0]"
|
||||
@status-changed="onIssueUpdated"
|
||||
@assignee-changed="onIssueUpdated"
|
||||
@priority-changed="onIssueUpdated"
|
||||
@title-changed="onIssueUpdated"
|
||||
@due-date-changed="onIssueUpdated"
|
||||
/>
|
||||
</v-sheet>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user