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