1
0
forked from vikunja/frontend

Compare commits

..

1 Commits

Author SHA1 Message Date
67d770b95b chore(deps): update pnpm to v8.6.12 2023-08-06 12:05:32 +00:00
2 changed files with 10 additions and 20 deletions

View File

@ -13,7 +13,7 @@
},
"homepage": "https://vikunja.io/",
"funding": "https://opencollective.com/vikunja",
"packageManager": "pnpm@8.6.9",
"packageManager": "pnpm@8.6.12",
"keywords": [
"todo",
"productivity",

View File

@ -85,7 +85,6 @@
</th>
<th v-if="activeColumns.labels">
{{ $t('task.attributes.labels') }}
<Sort :order="sortBy.labels" @click="sort('labels')"/>
</th>
<th v-if="activeColumns.assignees">
{{ $t('task.attributes.assignees') }}
@ -251,24 +250,15 @@ Object.assign(params.value, {
// FIXME: by doing this we can have multiple sort orders
function sort(property: keyof SortBy) {
if (property === 'labels') {
tasks.value.sort((a, b) => {
// Assuming labels is an array and we're sorting by the first label
if (a.labels[0] < b.labels[0]) return -1;
if (a.labels[0] > b.labels[0]) return 1;
return 0;
});
} else {
const order = sortBy.value[property]
if (typeof order === 'undefined' || order === 'none') {
sortBy.value[property] = 'desc'
} else if (order === 'desc') {
sortBy.value[property] = 'asc'
} else {
delete sortBy.value[property]
}
sortByParam.value = sortBy.value
}
const order = sortBy.value[property]
if (typeof order === 'undefined' || order === 'none') {
sortBy.value[property] = 'desc'
} else if (order === 'desc') {
sortBy.value[property] = 'asc'
} else {
delete sortBy.value[property]
}
sortByParam.value = sortBy.value
}
// TODO: re-enable opening task detail in modal