File tree 4 files changed +70
-7
lines changed
4 files changed +70
-7
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
27
27
<component :is="icon" :size="20" />
28
28
</div>
29
29
<RepeatSummary class="property-repeat__summary__content"
30
- :recurrence-rule="recurrence " />
30
+ :recurrence-rule="recurrenceRule " />
31
31
<Actions>
32
32
<ActionButton @click="toggleOptions">
33
33
<template #icon>
@@ -38,7 +38,9 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
38
38
</Actions>
39
39
40
40
<div v-if="showOptions" class="property-repeat__options">
41
- options
41
+ options {{ recurrenceRule.interval }}
42
+ <RepeatFreqInterval :frequency="recurrenceRule.frequency"
43
+ :interval="recurrenceRule.interval" />
42
44
</div>
43
45
</div>
44
46
</template>
@@ -47,20 +49,22 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
47
49
48
50
import { translate as t } from '@nextcloud/l10n'
49
51
import RepeatSummary from './RepeatItem/RepeatSummary.vue'
52
+ import RepeatFreqInterval from './RepeatItem/RepeatFreqInterval.vue'
50
53
import Pencil from 'vue-material-design-icons/Pencil.vue'
51
54
import Check from 'vue-material-design-icons/Check.vue'
52
55
import { NcActions as Actions, NcActionButton as ActionButton } from '@nextcloud/vue'
53
56
54
57
export default {
55
58
components: {
56
59
RepeatSummary,
60
+ RepeatFreqInterval,
57
61
Actions,
58
62
ActionButton,
59
63
Pencil,
60
64
Check,
61
65
},
62
66
props: {
63
- recurrence : {
67
+ recurrenceRule : {
64
68
type: Object,
65
69
required: true,
66
70
},
Original file line number Diff line number Diff line change
1
+ <!--
2
+ - @copyright Copyright (c) 2019 Georg Ehrke <oc.list @georgehrke .com >
3
+ -
4
+ - @author Georg Ehrke <
[email protected] >
5
+ -
6
+ - @license AGPL-3.0-or-later
7
+ -
8
+ - This program is free software: you can redistribute it and/or modify
9
+ - it under the terms of the GNU Affero General Public License as
10
+ - published by the Free Software Foundation, either version 3 of the
11
+ - License, or (at your option) any later version.
12
+ -
13
+ - This program is distributed in the hope that it will be useful,
14
+ - but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ - GNU Affero General Public License for more details.
17
+ -
18
+ - You should have received a copy of the GNU Affero General Public License
19
+ - along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ -
21
+ -->
22
+
23
+ <template>
24
+ <div class="repeat-option-set repeat-option-set--interval-freq">
25
+ <span class="repeat-option-set__label">
26
+ {{ repeatEveryLabel }}
27
+ </span>
28
+ <input class="intervalInput"
29
+ type="number"
30
+ min="1"
31
+ max="366"
32
+ :value="interval">
33
+ </div>
34
+ </template>
35
+
36
+ <script>
37
+
38
+ export default {
39
+ name: 'RepeatFreqInterval',
40
+ props: {
41
+ frequency: {
42
+ type: String,
43
+ required: true,
44
+ },
45
+ interval: {
46
+ type: Number,
47
+ required: true,
48
+ },
49
+ },
50
+ computed: {
51
+ repeatEveryLabel() {
52
+ if (this.frequency === 'NONE') {
53
+ return t('tasks', 'Repeat')
54
+ }
55
+ return t('tasks', 'Repeat every')
56
+ },
57
+ },
58
+ }
59
+ </script>
Original file line number Diff line number Diff line change @@ -336,7 +336,7 @@ export default class Task {
336
336
* @readonly
337
337
* @memberof Task
338
338
*/
339
- get recurrence ( ) {
339
+ get recurrenceRule ( ) {
340
340
if ( this . _recurrence === undefined || this . _recurrence === null ) {
341
341
return getDefaultRecurrenceRuleObject ( )
342
342
}
@@ -707,7 +707,7 @@ export default class Task {
707
707
*/
708
708
completeRecurring ( ) {
709
709
// Get recurrence iterator, starting at start date
710
- const iter = this . recurrence . iterator ( this . start )
710
+ const iter = this . recurrenceRule . iterator ( this . start )
711
711
// Skip the start date itself
712
712
iter . next ( )
713
713
// If there is a next recurrence, update the start date to next recurrence date
Original file line number Diff line number Diff line change @@ -193,8 +193,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
193
193
@add-tag="updateTag"
194
194
@set-tags="updateTags" />
195
195
<RepeatItem v-show="!readOnly || task.recurring"
196
- :recurrence="task.recurrence "
197
- :disabled="readOnly "
196
+ :recurrence-rule ="task.recurrenceRule "
197
+ :disabled="false "
198
198
:placeholder="t('tasks', 'No recurrence')"
199
199
icon="IconRepeat" />
200
200
</div>
You can’t perform that action at this time.
0 commit comments