feat/alphabetical-sort #1162
|
@ -195,7 +195,7 @@ import NamespaceService from '@/services/namespace'
|
|||
import EditLabels from '@/components/tasks/partials/editLabels.vue'
|
||||
|
||||
import {objectToSnakeCase} from '@/helpers/case'
|
||||
import {getDefaultParams} from "../../tasks/mixins/taskList"
|
||||
import {getDefaultParams} from '../../tasks/mixins/taskList'
|
||||
dpschen marked this conversation as resolved
Outdated
|
||||
|
||||
// FIXME: merge with DEFAULT_PARAMS in taskList.js
|
||||
const DEFAULT_PARAMS = {
|
||||
|
@ -226,6 +226,8 @@ const DEFAULT_FILTERS = {
|
|||
namespace: '',
|
||||
}
|
||||
|
||||
const ALPHABETICAL_SORT = ['title']
|
||||
|
||||
export default {
|
||||
name: 'filters',
|
||||
components: {
|
||||
|
@ -503,7 +505,7 @@ export default {
|
|||
this.params.sort_by = getDefaultParams().sort_by
|
||||
this.sortAlphabetically = false
|
||||
konrad marked this conversation as resolved
Outdated
konrad
commented
Please use a const for that. Please use a const for that.
|
||||
} else {
|
||||
this.params.sort_by = ['title']
|
||||
this.params.sort_by = ALPHABETICAL_SORT
|
||||
this.sortAlphabetically = true
|
||||
}
|
||||
this.change()
|
||||
|
|
|
@ -373,7 +373,6 @@
|
|||
"includeNulls": "Zahrnout úkoly, které nemají nastavenou hodnotu",
|
||||
"requireAll": "Vyžaduje aby všechny filtry odpovídaly, aby se úkol zobrazil",
|
||||
"showDoneTasks": "Zobrazit dokončené úkoly",
|
||||
"sortAlphabetically": "Sort Alphabetically",
|
||||
"enablePriority": "Povolit filtrování podle priority",
|
||||
konrad marked this conversation as resolved
Outdated
konrad
commented
This will be synced from crowdin automatically - please don't include it in this PR, only the string in This will be synced from crowdin automatically - please don't include it in this PR, only the string in `en.json`.
|
||||
"enablePercentDone": "Povolit filtrování dle dokončenosti",
|
||||
"dueDateRange": "Rozsah termínu",
|
||||
|
|
|
@ -373,7 +373,6 @@
|
|||
"includeNulls": "Aufgaben ohne Werte einbeziehen",
|
||||
"requireAll": "Alle Filterkriterien müssen erfüllt sein, damit eine Aufgabe angezeigt wird",
|
||||
"showDoneTasks": "Erledigte Aufgaben anzeigen",
|
||||
"sortAlphabetically": "Sort Alphabetically",
|
||||
"enablePriority": "Filter nach Priorität aktivieren",
|
||||
"enablePercentDone": "Filter nach % Erledigt aktivieren",
|
||||
"dueDateRange": "Fälligkeitsbereich",
|
||||
|
|
|
@ -373,7 +373,6 @@
|
|||
"includeNulls": "Uufgabe ohni Wert iihbezieh",
|
||||
"requireAll": "Alli Filter mend wahr sii, demits die Uufgab ahzeigt",
|
||||
"showDoneTasks": "Zeig die fertige Uufgabe",
|
||||
"sortAlphabetically": "Sort Alphabetically",
|
||||
"enablePriority": "Filter nach Priorität aktiviere",
|
||||
"enablePercentDone": "Filter nach Prozent iihschalte",
|
||||
"dueDateRange": "Fälligkeitsberiich",
|
||||
|
|
|
@ -373,7 +373,6 @@
|
|||
"includeNulls": "Include Tasks which don't have a value set",
|
||||
"requireAll": "Require all filters to be true for a task to show up",
|
||||
"showDoneTasks": "Show Done Tasks",
|
||||
"sortAlphabetically": "Sort Alphabetically",
|
||||
"enablePriority": "Enable Filter By Priority",
|
||||
"enablePercentDone": "Enable Filter By Percent Done",
|
||||
"dueDateRange": "Due Date Range",
|
||||
|
|
|
@ -373,7 +373,6 @@
|
|||
"includeNulls": "Inclure les tâches sans valeurs",
|
||||
"requireAll": "Exiger tous les filtres pour qu’une tâche s’affiche",
|
||||
"showDoneTasks": "Afficher les tâches terminées",
|
||||
"sortAlphabetically": "Sort Alphabetically",
|
||||
"enablePriority": "Activer le filtre par priorité",
|
||||
"enablePercentDone": "Par % d’achèvement",
|
||||
"dueDateRange": "Plage de dates d’échéance",
|
||||
|
|
|
@ -373,7 +373,6 @@
|
|||
"includeNulls": "Includi attività che non hanno un valore impostato",
|
||||
"requireAll": "Tutti i filtri devono essere veri affinché l'attività venga mostrata",
|
||||
"showDoneTasks": "Mostra Attività Fatte",
|
||||
"sortAlphabetically": "Sort Alphabetically",
|
||||
"enablePriority": "Abilita Filtro Per Priorità",
|
||||
"enablePercentDone": "Abilitare Filtro Per Percentuale Fatta",
|
||||
"dueDateRange": "Intervallo Data Di Scadenza",
|
||||
|
|
|
@ -373,7 +373,6 @@
|
|||
"includeNulls": "Include Tasks which don't have a value set",
|
||||
"requireAll": "Require all filters to be true for a task to show up",
|
||||
"showDoneTasks": "Show Done Tasks",
|
||||
"sortAlphabetically": "Sort Alphabetically",
|
||||
"enablePriority": "Enable Filter By Priority",
|
||||
"enablePercentDone": "Enable Filter By Percent Done",
|
||||
"dueDateRange": "Due Date Range",
|
||||
|
|
|
@ -373,7 +373,6 @@
|
|||
"includeNulls": "Include Tasks which don't have a value set",
|
||||
"requireAll": "Require all filters to be true for a task to show up",
|
||||
"showDoneTasks": "Show Done Tasks",
|
||||
"sortAlphabetically": "Sort Alphabetically",
|
||||
"enablePriority": "Enable Filter By Priority",
|
||||
"enablePercentDone": "Enable Filter By Percent Done",
|
||||
"dueDateRange": "Due Date Range",
|
||||
|
|
|
@ -373,7 +373,6 @@
|
|||
"includeNulls": "Include Tasks which don't have a value set",
|
||||
"requireAll": "Require all filters to be true for a task to show up",
|
||||
"showDoneTasks": "Show Done Tasks",
|
||||
"sortAlphabetically": "Sort Alphabetically",
|
||||
"enablePriority": "Enable Filter By Priority",
|
||||
"enablePercentDone": "Enable Filter By Percent Done",
|
||||
"dueDateRange": "Due Date Range",
|
||||
|
|
|
@ -373,7 +373,6 @@
|
|||
"includeNulls": "Include Tasks which don't have a value set",
|
||||
"requireAll": "Require all filters to be true for a task to show up",
|
||||
"showDoneTasks": "Show Done Tasks",
|
||||
"sortAlphabetically": "Sort Alphabetically",
|
||||
"enablePriority": "Enable Filter By Priority",
|
||||
"enablePercentDone": "Enable Filter By Percent Done",
|
||||
"dueDateRange": "Due Date Range",
|
||||
|
|
|
@ -373,7 +373,6 @@
|
|||
"includeNulls": "Включать задачи, у которых не установлено значение",
|
||||
"requireAll": "Для отображения задачи требовать истинность всех фильтров",
|
||||
"showDoneTasks": "Показывать завершённые задачи",
|
||||
"sortAlphabetically": "Sort Alphabetically",
|
||||
"enablePriority": "Вкл. фильтр по приоритету",
|
||||
"enablePercentDone": "По % завершения",
|
||||
"dueDateRange": "Диапазон срока",
|
||||
|
|
|
@ -373,7 +373,6 @@
|
|||
"includeNulls": "Include Tasks which don't have a value set",
|
||||
"requireAll": "Require all filters to be true for a task to show up",
|
||||
"showDoneTasks": "Show Done Tasks",
|
||||
"sortAlphabetically": "Sort Alphabetically",
|
||||
"enablePriority": "Enable Filter By Priority",
|
||||
"enablePercentDone": "Enable Filter By Percent Done",
|
||||
"dueDateRange": "Due Date Range",
|
||||
|
|
|
@ -373,7 +373,6 @@
|
|||
"includeNulls": "Include Tasks which don't have a value set",
|
||||
"requireAll": "Require all filters to be true for a task to show up",
|
||||
"showDoneTasks": "Show Done Tasks",
|
||||
"sortAlphabetically": "Sort Alphabetically",
|
||||
"enablePriority": "Enable Filter By Priority",
|
||||
"enablePercentDone": "Enable Filter By Percent Done",
|
||||
"dueDateRange": "Due Date Range",
|
||||
|
|
|
@ -373,7 +373,6 @@
|
|||
"includeNulls": "Bao gồm các Công việc không có bộ giá trị",
|
||||
"requireAll": "Yêu cầu tất cả các bộ lọc phải đúng để một công việc được hiển thị",
|
||||
"showDoneTasks": "Hiển thị các công việc đã hoàn thành",
|
||||
"sortAlphabetically": "Sort Alphabetically",
|
||||
"enablePriority": "Bật Bộ lọc theo mức độ ưu tiên",
|
||||
"enablePercentDone": "Bật Bộ lọc theo tỉ lệ % hoàn thành",
|
||||
"dueDateRange": "Phạm vi ngày đến hạn",
|
||||
|
|
|
@ -261,11 +261,6 @@ export default {
|
|||
this.$refs.newTaskInput.$refs.newTaskInput.focus()
|
||||
},
|
||||
updateTaskList() {
|
||||
// const tasks = [
|
||||
// task,
|
||||
// ...this.tasks,
|
||||
// ]
|
||||
// this.tasks = tasks
|
||||
this.$store.commit(HAS_TASKS, true)
|
||||
this.reloadTasksWithCurrentFilterAndSorting()
|
||||
dpschen marked this conversation as resolved
Outdated
konrad
commented
Still not quite happy with reloading everything. This gives a very noticable load flickering. I get why it is nessecary though. Maybe only reload if there are filters set and otherwise prepend the task as done already? Still not quite happy with reloading everything. This gives a very noticable load flickering. I get why it is nessecary though. Maybe only reload if there are filters set and otherwise prepend the task as done already?
dpschen
commented
The sorting should probably happen on client and server side. The sorting should probably happen on client _and_ server side.
This way the client can sort already what he is aware of and fetches an update.
konrad
commented
Since this would require a bit of work, I think we should do this in another PR and keep the current logic of prepending new tasks to the list. Since this would require a bit of work, I think we should do this in another PR and keep the current logic of prepending new tasks to the list.
Michaelpalacce
commented
So should I do reload only if filters and/or sorts are set ? So should I do reload only if filters and/or sorts are set ?
konrad
commented
I think that would be a good idea. I think that would be a good idea.
|
||||
},
|
||||
dpschen marked this conversation as resolved
dpschen
commented
Instead of putting this in a new function just make a comment:
Instead of putting this in a new function just make a comment:
```js
// reload tasks with current filter and sorting
this.loadTasks(1, undefined, undefined, true)
```
|
||||
|
|
Use
@