forked from vikunja/frontend
feat: move active columns filter to new popup component
This commit is contained in:
parent
0fbe83c362
commit
ec927d6564
|
@ -15,6 +15,7 @@ export default {
|
||||||
const popup = ref(null)
|
const popup = ref(null)
|
||||||
|
|
||||||
const toggle = () => {
|
const toggle = () => {
|
||||||
|
console.log('toggle')
|
||||||
open.value = !open.value
|
open.value = !open.value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,59 +2,63 @@
|
||||||
<div :class="{'is-loading': taskCollectionService.loading}" class="table-view loader-container">
|
<div :class="{'is-loading': taskCollectionService.loading}" class="table-view loader-container">
|
||||||
<div class="filter-container">
|
<div class="filter-container">
|
||||||
<div class="items">
|
<div class="items">
|
||||||
<x-button
|
<popup>
|
||||||
@click.prevent.stop="showActiveColumnsFilter = !showActiveColumnsFilter"
|
<template #trigger="{toggle}">
|
||||||
icon="th"
|
<x-button
|
||||||
type="secondary"
|
@click.prevent.stop="toggle()"
|
||||||
>
|
icon="th"
|
||||||
{{ $t('list.table.columns') }}
|
type="secondary"
|
||||||
</x-button>
|
>
|
||||||
|
{{ $t('list.table.columns') }}
|
||||||
|
</x-button>
|
||||||
|
</template>
|
||||||
|
<template #default>
|
||||||
|
<card class="columns-filter">
|
||||||
|
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.id">#</fancycheckbox>
|
||||||
|
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.done">
|
||||||
|
{{ $t('task.attributes.done') }}
|
||||||
|
</fancycheckbox>
|
||||||
|
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.title">
|
||||||
|
{{ $t('task.attributes.title') }}
|
||||||
|
</fancycheckbox>
|
||||||
|
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.priority">
|
||||||
|
{{ $t('task.attributes.priority') }}
|
||||||
|
</fancycheckbox>
|
||||||
|
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.labels">
|
||||||
|
{{ $t('task.attributes.labels') }}
|
||||||
|
</fancycheckbox>
|
||||||
|
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.assignees">
|
||||||
|
{{ $t('task.attributes.assignees') }}
|
||||||
|
</fancycheckbox>
|
||||||
|
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.dueDate">
|
||||||
|
{{ $t('task.attributes.dueDate') }}
|
||||||
|
</fancycheckbox>
|
||||||
|
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.startDate">
|
||||||
|
{{ $t('task.attributes.startDate') }}
|
||||||
|
</fancycheckbox>
|
||||||
|
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.endDate">
|
||||||
|
{{ $t('task.attributes.endDate') }}
|
||||||
|
</fancycheckbox>
|
||||||
|
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.percentDone">
|
||||||
|
{{ $t('task.attributes.percentDone') }}
|
||||||
|
</fancycheckbox>
|
||||||
|
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.created">
|
||||||
|
{{ $t('task.attributes.created') }}
|
||||||
|
</fancycheckbox>
|
||||||
|
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.updated">
|
||||||
|
{{ $t('task.attributes.updated') }}
|
||||||
|
</fancycheckbox>
|
||||||
|
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.createdBy">
|
||||||
|
{{ $t('task.attributes.createdBy') }}
|
||||||
|
</fancycheckbox>
|
||||||
|
</card>
|
||||||
|
</template>
|
||||||
|
</popup>
|
||||||
<filter-popup
|
<filter-popup
|
||||||
v-model="params"
|
v-model="params"
|
||||||
@update:modelValue="loadTasks()"
|
@update:modelValue="loadTasks()"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<transition name="fade">
|
|
||||||
<card v-if="showActiveColumnsFilter" class="columns-filter">
|
|
||||||
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.id">#</fancycheckbox>
|
|
||||||
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.done">
|
|
||||||
{{ $t('task.attributes.done') }}
|
|
||||||
</fancycheckbox>
|
|
||||||
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.title">
|
|
||||||
{{ $t('task.attributes.title') }}
|
|
||||||
</fancycheckbox>
|
|
||||||
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.priority">
|
|
||||||
{{ $t('task.attributes.priority') }}
|
|
||||||
</fancycheckbox>
|
|
||||||
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.labels">
|
|
||||||
{{ $t('task.attributes.labels') }}
|
|
||||||
</fancycheckbox>
|
|
||||||
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.assignees">
|
|
||||||
{{ $t('task.attributes.assignees') }}
|
|
||||||
</fancycheckbox>
|
|
||||||
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.dueDate">
|
|
||||||
{{ $t('task.attributes.dueDate') }}
|
|
||||||
</fancycheckbox>
|
|
||||||
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.startDate">
|
|
||||||
{{ $t('task.attributes.startDate') }}
|
|
||||||
</fancycheckbox>
|
|
||||||
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.endDate">
|
|
||||||
{{ $t('task.attributes.endDate') }}
|
|
||||||
</fancycheckbox>
|
|
||||||
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.percentDone">
|
|
||||||
{{ $t('task.attributes.percentDone') }}
|
|
||||||
</fancycheckbox>
|
|
||||||
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.created">
|
|
||||||
{{ $t('task.attributes.created') }}
|
|
||||||
</fancycheckbox>
|
|
||||||
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.updated">
|
|
||||||
{{ $t('task.attributes.updated') }}
|
|
||||||
</fancycheckbox>
|
|
||||||
<fancycheckbox @change="saveTaskColumns" v-model="activeColumns.createdBy">
|
|
||||||
{{ $t('task.attributes.createdBy') }}
|
|
||||||
</fancycheckbox>
|
|
||||||
</card>
|
|
||||||
</transition>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<card :padding="false" :has-content="false">
|
<card :padding="false" :has-content="false">
|
||||||
|
@ -192,10 +196,12 @@ import Sort from '../../../components/tasks/partials/sort'
|
||||||
import {saveListView} from '@/helpers/saveListView'
|
import {saveListView} from '@/helpers/saveListView'
|
||||||
import FilterPopup from '@/components/list/partials/filter-popup.vue'
|
import FilterPopup from '@/components/list/partials/filter-popup.vue'
|
||||||
import Pagination from '@/components/misc/pagination.vue'
|
import Pagination from '@/components/misc/pagination.vue'
|
||||||
|
import Popup from '../../../components/misc/popup'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Table',
|
name: 'Table',
|
||||||
components: {
|
components: {
|
||||||
|
Popup,
|
||||||
Done,
|
Done,
|
||||||
FilterPopup,
|
FilterPopup,
|
||||||
Sort,
|
Sort,
|
||||||
|
@ -211,7 +217,6 @@ export default {
|
||||||
],
|
],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showActiveColumnsFilter: false,
|
|
||||||
activeColumns: {
|
activeColumns: {
|
||||||
id: true,
|
id: true,
|
||||||
done: true,
|
done: true,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user