1
0

fix(filters): lint

This commit is contained in:
kolaente 2024-03-13 17:21:20 +01:00
parent 15215b30a0
commit fc4eed6eb4
No known key found for this signature in database
GPG Key ID: F40E70337AB24C9B
5 changed files with 168 additions and 200 deletions

View File

@ -2,6 +2,7 @@
<x-button <x-button
variant="secondary" variant="secondary"
icon="filter" icon="filter"
:class="{'has-filters': hasFilters}"
@click="() => modalOpen = true" @click="() => modalOpen = true"
> >
{{ $t('filters.title') }} {{ $t('filters.title') }}
@ -68,10 +69,6 @@ const hasFilters = computed(() => {
}) })
const modalOpen = ref(false) const modalOpen = ref(false)
function clearFilters() {
value.value = {...getDefaultTaskFilterParams()}
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">

View File

@ -27,8 +27,8 @@
> >
<x-button <x-button
variant="secondary" variant="secondary"
@click.prevent.stop="clearFiltersAndEmit"
class="mr-2" class="mr-2"
@click.prevent.stop="clearFiltersAndEmit"
> >
{{ $t('filters.clear') }} {{ $t('filters.clear') }}
</x-button> </x-button>

View File

@ -45,7 +45,7 @@
v-tooltip="$t('project.kanban.doneBucketHint')" v-tooltip="$t('project.kanban.doneBucketHint')"
class="icon is-small has-text-success mr-2" class="icon is-small has-text-success mr-2"
> >
<icon icon="check-double"/> <icon icon="check-double" />
</span> </span>
<h2 <h2
class="title input" class="title input"

View File

@ -73,7 +73,7 @@
> >
<template v-if="canWrite"> <template v-if="canWrite">
<span class="icon handle"> <span class="icon handle">
<icon icon="grip-lines"/> <icon icon="grip-lines" />
</span> </span>
</template> </template>
</SingleTaskInProject> </SingleTaskInProject>
@ -97,7 +97,6 @@ export default {name: 'List'}
<script setup lang="ts"> <script setup lang="ts">
import {ref, computed, nextTick, onMounted, watch} from 'vue' import {ref, computed, nextTick, onMounted, watch} from 'vue'
import draggable from 'zhyswan-vuedraggable' import draggable from 'zhyswan-vuedraggable'
import {useRoute, useRouter} from 'vue-router'
import ProjectWrapper from '@/components/project/ProjectWrapper.vue' import ProjectWrapper from '@/components/project/ProjectWrapper.vue'
import ButtonLink from '@/components/misc/ButtonLink.vue' import ButtonLink from '@/components/misc/ButtonLink.vue'
@ -126,7 +125,6 @@ const {
}>() }>()
const ctaVisible = ref(false) const ctaVisible = ref(false)
const showTaskSearch = ref(false)
const drag = ref(false) const drag = ref(false)
const DRAG_OPTIONS = { const DRAG_OPTIONS = {
@ -140,7 +138,6 @@ const {
totalPages, totalPages,
currentPage, currentPage,
loadTasks, loadTasks,
searchTerm,
params, params,
sortByParam, sortByParam,
} = useTaskList(() => projectId, {position: 'asc'}) } = useTaskList(() => projectId, {position: 'asc'})
@ -198,32 +195,6 @@ onMounted(async () => {
ctaVisible.value = true ctaVisible.value = true
}) })
const route = useRoute()
const router = useRouter()
function searchTasks() {
// Only search if the search term changed
if (route.query as unknown as string === searchTerm.value) {
return
}
router.push({
name: 'project.list',
query: {search: searchTerm.value},
})
}
function hideSearchBar() {
// This is a workaround.
// When clicking on the search button, @blur from the input is fired. If we
// would then directly hide the whole search bar directly, no click event
// from the button gets fired. To prevent this, we wait 200ms until we hide
// everything so the button has a chance of firing the search event.
setTimeout(() => {
showTaskSearch.value = false
}, 200)
}
const addTaskRef = ref<typeof AddTask | null>(null) const addTaskRef = ref<typeof AddTask | null>(null)
function focusNewTaskInput() { function focusNewTaskInput() {

View File

@ -67,7 +67,7 @@
</card> </card>
</template> </template>
</Popup> </Popup>
<FilterPopup v-model="params"/> <FilterPopup v-model="params" />
</div> </div>
</div> </div>
</template> </template>
@ -207,7 +207,7 @@
/> />
</td> </td>
<td v-if="activeColumns.labels"> <td v-if="activeColumns.labels">
<Labels :labels="t.labels"/> <Labels :labels="t.labels" />
</td> </td>
<td v-if="activeColumns.assignees"> <td v-if="activeColumns.assignees">
<AssigneeList <AssigneeList