Compare commits

..
3 Commits
Author SHA1 Message Date
vadim 9e7afb8c03 small fixes
Gitea Actions Demo / Deploy (push) Successful in 25s
2026-10-10 21:07:19 +03:00
vadim a3b36e299c calendar wip 2026-10-10 20:58:26 +03:00
vadim a8241406ce title save on enter 2026-10-10 20:58:04 +03:00
6 changed files with 45 additions and 19 deletions

No files matched your search

+15
View File
@@ -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" />
+2 -2
View File
@@ -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>
+1
View File
@@ -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"
-15
View File
@@ -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>
+3
View File
@@ -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>
+24 -2
View File
@@ -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>