Compare commits
3
Commits
7967654988
...
9e7afb8c03
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e7afb8c03 | ||
|
|
a3b36e299c | ||
|
|
a8241406ce |
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" />
|
||||||
|
|
||||||
|
|||||||
@@ -46,9 +46,9 @@ const cancel = () => {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<v-text-field autofocus class="mb-1" hide-details v-model="draft" variant="outlined" />
|
<div class="d-flex ga-1 align-center">
|
||||||
|
<v-text-field autofocus class="mb-1" hide-details v-model="draft" variant="outlined" @keyup.enter="save" />
|
||||||
|
|
||||||
<div class="d-flex justify-end ga-1">
|
|
||||||
<v-btn density="compact" icon variant="text" @click="cancel">
|
<v-btn density="compact" icon variant="text" @click="cancel">
|
||||||
<v-icon icon="mdi-cancel" />
|
<v-icon icon="mdi-cancel" />
|
||||||
</v-btn>
|
</v-btn>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -1,6 +1,14 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|
||||||
|
interface CalendarEvent {
|
||||||
|
name: string
|
||||||
|
start: Date | string | number
|
||||||
|
end?: Date | string | number
|
||||||
|
color?: string
|
||||||
|
timed?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
const type = ref('month')
|
const type = ref('month')
|
||||||
const types = ['month', 'week', 'day', '4day']
|
const types = ['month', 'week', 'day', '4day']
|
||||||
const mode = ref('stack')
|
const mode = ref('stack')
|
||||||
@@ -13,19 +21,33 @@ const weekdays = [
|
|||||||
{ title: 'Mon, Wed, Fri', value: [1, 3, 5] },
|
{ title: 'Mon, Wed, Fri', value: [1, 3, 5] },
|
||||||
]
|
]
|
||||||
const value = ref('')
|
const value = ref('')
|
||||||
const events = ref([])
|
const events = ref<CalendarEvent[]>([])
|
||||||
const colors = ['blue', 'indigo', 'deep-purple', 'cyan', 'green', 'orange', 'grey-darken-1']
|
const colors = ['blue', 'indigo', 'deep-purple', 'cyan', 'green', 'orange', 'grey-darken-1']
|
||||||
const names = ['Meeting', 'Holiday', 'PTO', 'Travel', 'Event', 'Birthday', 'Conference', 'Party']
|
const names = ['Meeting', 'Holiday', 'PTO', 'Travel', 'Event', 'Birthday', 'Conference', 'Party']
|
||||||
|
|
||||||
function rnd(a: number, b: number) {
|
function rnd(a: number, b: number) {
|
||||||
return Math.floor((b - a + 1) * Math.random()) + a
|
return Math.floor((b - a + 1) * Math.random()) + a
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getEvents() {
|
||||||
|
events.value = [
|
||||||
|
{
|
||||||
|
name: 'test',
|
||||||
|
start: new Date('2026-10-09T13:41:45.213Z'),
|
||||||
|
end: new Date('2026-10-11T13:41:45.213Z'),
|
||||||
|
color: 'primary',
|
||||||
|
timed: true,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<v-sheet height="600">
|
<v-sheet height="600">
|
||||||
<v-calendar></v-calendar>
|
<v-calendar format="24hr" type="month" first-day-of-week="1" @change="getEvents" :events="events">
|
||||||
|
<template #day> aaaa </template>
|
||||||
|
</v-calendar>
|
||||||
</v-sheet>
|
</v-sheet>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in new issue
Block a user