diff --git a/frontend/src/components/tasks/partials/Reminders.vue b/frontend/src/components/tasks/partials/Reminders.vue
index bba2a0ad1..e3fd23842 100644
--- a/frontend/src/components/tasks/partials/Reminders.vue
+++ b/frontend/src/components/tasks/partials/Reminders.vue
@@ -3,7 +3,7 @@
()
+}>(), {
+ disabled: false,
+})
-const emit = defineEmits(['update:modelValue'])
+const emit = defineEmits<{
+ 'update:modelValue': [ITask]
+}>()
const reminders = ref([])
+const now = useNow({interval: 1000})
+
watch(
- () => modelValue.reminders,
+ () => props.modelValue.reminders,
(newVal) => {
reminders.value = newVal
},
@@ -62,19 +66,19 @@ watch(
)
const defaultRelativeTo = computed(() => {
- if (typeof modelValue === 'undefined') {
+ if (typeof props.modelValue === 'undefined') {
return null
}
- if (modelValue?.dueDate) {
+ if (props.modelValue?.dueDate) {
return REMINDER_PERIOD_RELATIVE_TO_TYPES.DUEDATE
}
- if (modelValue.dueDate === null && modelValue.startDate !== null) {
+ if (props.modelValue.dueDate === null && props.modelValue.startDate !== null) {
return REMINDER_PERIOD_RELATIVE_TO_TYPES.STARTDATE
}
- if (modelValue.dueDate === null && modelValue.startDate === null && modelValue.endDate !== null) {
+ if (props.modelValue.dueDate === null && props.modelValue.startDate === null && props.modelValue.endDate !== null) {
return REMINDER_PERIOD_RELATIVE_TO_TYPES.ENDDATE
}
@@ -83,7 +87,7 @@ const defaultRelativeTo = computed(() => {
function updateData() {
emit('update:modelValue', {
- ...modelValue,
+ ...props.modelValue,
reminders: reminders.value,
})
}