filter
This commit is contained in:
1 parent
6f651eeaeb
commit
3082794436
2 files changed
+10
-12
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useStatusStore } from '@/stores/status.ts'
|
import { useStatusStore } from '@/stores/status.ts'
|
||||||
import { ref } from 'vue'
|
import { ref, watch } from 'vue'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
status?: string | null
|
status?: string | null
|
||||||
@@ -11,28 +11,25 @@ const emit = defineEmits<{ changed: [value: string] }>()
|
|||||||
const statusStore = useStatusStore()
|
const statusStore = useStatusStore()
|
||||||
const selected = ref(status)
|
const selected = ref(status)
|
||||||
const onUpdate = (val: unknown) => emit('changed', val as string)
|
const onUpdate = (val: unknown) => emit('changed', val as string)
|
||||||
|
watch(
|
||||||
|
() => status,
|
||||||
|
(val) => {
|
||||||
|
selected.value = val
|
||||||
|
},
|
||||||
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<v-btn-toggle
|
<v-btn-toggle
|
||||||
v-model="selected"
|
v-model="selected"
|
||||||
class="border-opacity-25"
|
|
||||||
border
|
|
||||||
divided
|
divided
|
||||||
size="default"
|
size="default"
|
||||||
density="compact"
|
density="compact"
|
||||||
variant="text"
|
variant="text"
|
||||||
@update:model-value="onUpdate"
|
@update:model-value="onUpdate"
|
||||||
>
|
>
|
||||||
<v-btn
|
<v-btn slim v-for="el in statusStore.statuses" :color="el.color" :value="el.alias" :key="el.alias" rounded="0">
|
||||||
slim
|
<div class="text-default">{{ el.name }}</div>
|
||||||
v-for="status in statusStore.statuses"
|
|
||||||
:color="status.color"
|
|
||||||
:value="status.alias"
|
|
||||||
:key="status.alias"
|
|
||||||
rounded="0"
|
|
||||||
>
|
|
||||||
<div class="text-default">{{ status.name }}</div>
|
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-btn-toggle>
|
</v-btn-toggle>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ async function onStatusChanged(value: string | null) {
|
|||||||
async function onClear() {
|
async function onClear() {
|
||||||
text.value = null
|
text.value = null
|
||||||
assigneeId.value = null
|
assigneeId.value = null
|
||||||
|
status.value = null
|
||||||
page.value = 1
|
page.value = 1
|
||||||
|
|
||||||
await load()
|
await load()
|
||||||
|
|||||||
Reference in new issue
Block a user