Merge pull request #5483 from nextcloud/backport/5458/stable28

This commit is contained in:
Julius Härtl
2024-01-15 17:40:09 +01:00
committed by GitHub
3 changed files with 15 additions and 3 deletions

View File

@@ -37,7 +37,8 @@
<DueDateSelector :card="card" <DueDateSelector :card="card"
:can-edit="canEdit" :can-edit="canEdit"
@change="updateCardDue" /> @change="updateCardDue"
@input="debouncedUpdateCardDue" />
<div v-if="projectsEnabled" class="section-wrapper"> <div v-if="projectsEnabled" class="section-wrapper">
<CollectionList v-if="card.id" <CollectionList v-if="card.id"
@@ -68,6 +69,7 @@ import Description from './Description.vue'
import TagSelector from './TagSelector.vue' import TagSelector from './TagSelector.vue'
import AssignmentSelector from './AssignmentSelector.vue' import AssignmentSelector from './AssignmentSelector.vue'
import DueDateSelector from './DueDateSelector.vue' import DueDateSelector from './DueDateSelector.vue'
import { debounce } from 'lodash'
export default { export default {
name: 'CardSidebarTabDetails', name: 'CardSidebarTabDetails',
@@ -162,6 +164,10 @@ export default {
}) })
}, },
debouncedUpdateCardDue: debounce(function(val) {
this.updateCardDue(val)
}, 500),
addLabelToCard(newLabel) { addLabelToCard(newLabel) {
this.copiedCard.labels.push(newLabel) this.copiedCard.labels.push(newLabel)
const data = { const data = {

View File

@@ -156,7 +156,7 @@ export default defineComponent({
return this.card?.duedate ? new Date(this.card.duedate) : null return this.card?.duedate ? new Date(this.card.duedate) : null
}, },
set(val) { set(val) {
this.$emit('change', val ? new Date(val) : null) this.$emit('input', val ? new Date(val) : null)
}, },
}, },
@@ -216,9 +216,12 @@ export default defineComponent({
}, },
removeDue() { removeDue() {
this.duedate = null this.duedate = null
this.$emit('change', null)
}, },
selectShortcut(shortcut) { selectShortcut(shortcut) {
this.duedate = shortcut.timestamp this.duedate = shortcut.timestamp
this.$emit('change', shortcut.timestamp)
}, },
getTimestamp(momentObject) { getTimestamp(momentObject) {
return momentObject?.minute(0).second(0).millisecond(0).toDate() || null return momentObject?.minute(0).second(0).millisecond(0).toDate() || null

View File

@@ -64,7 +64,10 @@
@select="onSelectUser" @select="onSelectUser"
@remove="onRemoveUser" /> @remove="onRemoveUser" />
<DueDateSelector :card="card" :can-edit="!loading && !!selectedBoard" @change="updateCardDue" /> <DueDateSelector :card="card"
:can-edit="!loading && !!selectedBoard"
@change="updateCardDue"
@input="updateCardDue" />
<Description :key="card.id" <Description :key="card.id"
:card="card" :card="card"