Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/components/Repeat/RepeatEndRepeat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
@update:model-value="changeEndType" />
<NcDateTimePicker v-if="isUntil"
class="repeat-option-end__until"
:value="until"
:model-value="until"
:min="minimumDate"
:append-to-body="true"
type="date"
@input="changeUntil" />
@update:model-value="changeUntil" />
<div v-if="isCount" class="repeat-option-end__count-container">
<input class="repeat-option-end__count-input"
type="number"
Expand Down
3 changes: 2 additions & 1 deletion src/models/task.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
getDefaultRecurrenceRuleObject,
mapRecurrenceRuleValueToRecurrenceRuleObject,
} from './recurrenceRule.js'
import {markRaw} from "vue";

export default class Task {

Expand Down Expand Up @@ -138,7 +139,7 @@ export default class Task {
try {
// Get the ICAL.Recur value and convert directly to RecurValue
const icalRecur = firstRecurrenceRule.getFirstValue()
const recurValue = RecurValue.fromICALJs(icalRecur)
const recurValue = markRaw(RecurValue.fromICALJs(icalRecur))

// Get reference date for the mapping function
const referenceDate = this._due || this._start
Expand Down
10 changes: 7 additions & 3 deletions src/store/tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import moment from '@nextcloud/moment'

import ICAL from 'ical.js'
import { randomUUID } from '../utils/crypto.js'
import {markRaw} from "vue";

/**
* Clone an ICAL.Time without triggering timezone lookups.
Expand Down Expand Up @@ -1716,7 +1717,7 @@ const actions = {

// Update the task model
task._recurrenceRule = {
recurrenceRuleValue: recurrenceValue,
recurrenceRuleValue: markRaw(recurrenceValue),
frequency: recurrenceRule.frequency,
interval: recurrenceRule.interval || 1,
count: recurrenceRule.count || null,
Expand Down Expand Up @@ -1965,8 +1966,11 @@ const actions = {
// Save the updated master task
await context.dispatch('updateTask', freshTask)
} else {
// No more occurrences - keep task completed
// The exception will show as completed, master can be left as-is
// No more occurrences - complete the master task
freshTask.setComplete(100)
freshTask.setCompleted(true)
freshTask.setStatus('COMPLETED')
await context.dispatch('updateTask', freshTask)
}
} catch (error) {
console.error('Error handling recurring task completion:', error)
Expand Down