Skip to content

Commit

Permalink
Merge pull request #5483 from nextcloud/backport/5458/stable28
Browse files Browse the repository at this point in the history
  • Loading branch information
juliusknorr authored Jan 15, 2024
2 parents ee0b6bf + ec11bf0 commit fc41410
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/components/card/CardSidebarTabDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@

<DueDateSelector :card="card"
:can-edit="canEdit"
@change="updateCardDue" />
@change="updateCardDue"
@input="debouncedUpdateCardDue" />

<div v-if="projectsEnabled" class="section-wrapper">
<CollectionList v-if="card.id"
Expand Down Expand Up @@ -68,6 +69,7 @@ import Description from './Description.vue'
import TagSelector from './TagSelector.vue'
import AssignmentSelector from './AssignmentSelector.vue'
import DueDateSelector from './DueDateSelector.vue'
import { debounce } from 'lodash'

export default {
name: 'CardSidebarTabDetails',
Expand Down Expand Up @@ -162,6 +164,10 @@ export default {
})
},

debouncedUpdateCardDue: debounce(function(val) {
this.updateCardDue(val)
}, 500),

addLabelToCard(newLabel) {
this.copiedCard.labels.push(newLabel)
const data = {
Expand Down
5 changes: 4 additions & 1 deletion src/components/card/DueDateSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export default defineComponent({
return this.card?.duedate ? new Date(this.card.duedate) : null
},
set(val) {
this.$emit('change', val ? new Date(val) : null)
this.$emit('input', val ? new Date(val) : null)
},
},
Expand Down Expand Up @@ -216,9 +216,12 @@ export default defineComponent({
},
removeDue() {
this.duedate = null
this.$emit('change', null)
},
selectShortcut(shortcut) {
this.duedate = shortcut.timestamp
this.$emit('change', shortcut.timestamp)
},
getTimestamp(momentObject) {
return momentObject?.minute(0).second(0).millisecond(0).toDate() || null
Expand Down
5 changes: 4 additions & 1 deletion src/views/CreateNewCardCustomPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@
@select="onSelectUser"
@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"
:card="card"
Expand Down

0 comments on commit fc41410

Please sign in to comment.