diff --git a/src/components/AppSidebar/RepeatItem.vue b/src/components/AppSidebar/RepeatItem.vue
index db32e5eb5..631afa772 100644
--- a/src/components/AppSidebar/RepeatItem.vue
+++ b/src/components/AppSidebar/RepeatItem.vue
@@ -34,12 +34,12 @@ License along with this library. If not, see .
+ :recurrence-rule="value" />
@@ -74,6 +74,7 @@ import Pencil from 'vue-material-design-icons/Pencil.vue'
import Check from 'vue-material-design-icons/Check.vue'
import { NcActions as Actions, NcActionButton as ActionButton } from '@nextcloud/vue'
import editableItem from '../../mixins/editableItem.js'
+import logger from '../../utils/logger.js'
export default {
name: 'RepeatItem',
@@ -87,7 +88,10 @@ export default {
},
mixins: [editableItem],
props: {
- recurrenceRule: {
+ /**
+ * The Recurrence object
+ */
+ value: {
type: Object,
required: true,
},
@@ -110,22 +114,23 @@ export default {
},
data() {
return {
- frequency: 'NONE',
- interval: 0,
+ frequency: this.value.frequency,
+ interval: this.value.interval,
}
},
methods: {
t,
isRecurring() {
- return this.recurrenceRule.frequency !== 'NONE'
+ return this.value.frequency !== 'NONE'
},
changeFrequency(value) {
this.frequency = value
- // this.setValue()
+ // this.newValue = this.value.copy(interval = value)
},
changeInterval(value) {
+ logger.info('change Interval to ' + value)
this.interval = value
- // this.setValue()
+ // this.newValue = this.value.copy(interval = value)
},
},
}
diff --git a/src/components/AppSidebar/RepeatItem/RepeatFreqInterval.vue b/src/components/AppSidebar/RepeatItem/RepeatFreqInterval.vue
index 989125622..ce527fe8b 100644
--- a/src/components/AppSidebar/RepeatItem/RepeatFreqInterval.vue
+++ b/src/components/AppSidebar/RepeatItem/RepeatFreqInterval.vue
@@ -26,12 +26,11 @@
{{ repeatEveryLabel }}
+ @input="$emit('update:interval', $event.target.value)">
@@ -54,7 +53,7 @@ export default {
required: true,
},
},
- emits: ['change-frequency', 'change-interval'],
+ emits: ['update:frequency', 'update:interval'],
computed: {
repeatEveryLabel() {
if (this.frequency === 'NONE') {
@@ -68,10 +67,7 @@ export default {
},
methods: {
changeFrequency(value) {
- this.$emit('change-frequency', value)
- },
- changeInterval(value) {
- this.$emit('change-interval', value)
+ this.$emit('update:frequency', value)
},
},
}
diff --git a/src/views/AppSidebar.vue b/src/views/AppSidebar.vue
index b99e6a18a..219a05214 100644
--- a/src/views/AppSidebar.vue
+++ b/src/views/AppSidebar.vue
@@ -261,10 +261,11 @@ License along with this library. If not, see .
-