filter
This commit is contained in:
1 parent
baf0fa186e
commit
6f651eeaeb
5 files changed
+68
-5
No files matched your search
@@ -129,7 +129,7 @@ function openProject(project: Project) {
|
||||
|
||||
<v-row density="compact">
|
||||
<v-col cols="12" md="8">
|
||||
<v-card>
|
||||
<v-card border>
|
||||
<v-card-title class="d-flex align-center justify-space-between">
|
||||
<span>Мои задачи</span>
|
||||
<v-btn size="small" variant="text" to="/issues">Все задачи</v-btn>
|
||||
@@ -177,7 +177,7 @@ function openProject(project: Project) {
|
||||
</v-col>
|
||||
|
||||
<v-col cols="12" md="4">
|
||||
<v-card>
|
||||
<v-card border>
|
||||
<v-card-title class="d-flex align-center justify-space-between">
|
||||
<span>Проекты</span>
|
||||
<v-btn size="small" variant="text" to="/settings/projects">Все проекты</v-btn>
|
||||
|
||||
@@ -27,6 +27,7 @@ const serverItems = ref<Issue[]>([])
|
||||
|
||||
const text = ref<string | null>(null)
|
||||
const assigneeId = ref<string | null>(null)
|
||||
const status = ref<string | null>(null)
|
||||
const selected = ref<[string] | []>([])
|
||||
const batch = ref<number[]>([])
|
||||
const deleting = ref(false)
|
||||
@@ -36,6 +37,7 @@ async function fetch() {
|
||||
page: page.value,
|
||||
limit: itemsPerPage.value,
|
||||
text: text.value,
|
||||
status: status.value,
|
||||
assigneeId: assigneeId.value,
|
||||
projectId: currentProjectId.value,
|
||||
})
|
||||
@@ -55,6 +57,7 @@ function syncQuery() {
|
||||
|
||||
if (text.value) query.text = text.value
|
||||
if (assigneeId.value) query.assignee = assigneeId.value
|
||||
if (status.value) query.status = status.value
|
||||
if (selected.value.length) query.selected_issue = selected.value[0]
|
||||
|
||||
router.replace({ query })
|
||||
@@ -66,6 +69,7 @@ watch(
|
||||
page.value = query.page ? Number(query.page) : 1
|
||||
text.value = query.text ? String(query.text) : null
|
||||
assigneeId.value = query.assignee ? String(query.assignee) : null
|
||||
status.value = query.status ? String(query.status) : null
|
||||
selected.value = query.selected_issue ? [String(query.selected_issue)] : []
|
||||
},
|
||||
{ immediate: true },
|
||||
@@ -102,6 +106,12 @@ async function onAssigneeChanged(value: string | null) {
|
||||
await load()
|
||||
}
|
||||
|
||||
async function onStatusChanged(value: string | null) {
|
||||
status.value = value
|
||||
page.value = 1
|
||||
await load()
|
||||
}
|
||||
|
||||
async function onClear() {
|
||||
text.value = null
|
||||
assigneeId.value = null
|
||||
@@ -175,8 +185,10 @@ async function onDeleteBatch() {
|
||||
class="mb-2"
|
||||
:text="text"
|
||||
:assignee-id="assigneeId"
|
||||
:status="status"
|
||||
@update:text="onTextChanged"
|
||||
@update:assignee-id="onAssigneeChanged"
|
||||
@update:status="onStatusChanged"
|
||||
@update:clear="onClear"
|
||||
/>
|
||||
<v-list class="pa-0" density="compact" v-model:selected="selected" mandatory>
|
||||
@@ -198,7 +210,10 @@ async function onDeleteBatch() {
|
||||
</template>
|
||||
|
||||
<template #append>
|
||||
<issue-stats />
|
||||
<div class="d-flex ga-4 align-center">
|
||||
<issue-stats />
|
||||
<v-btn density="compact" icon="mdi-dots-horizontal"></v-btn>
|
||||
</div>
|
||||
</template>
|
||||
</v-list-item>
|
||||
|
||||
|
||||
Reference in new issue
Block a user