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 @@ -338,7 +338,7 @@ export default class Task {
338
338
* @readonly
339
339
* @memberof Task
340
340
*/
341
- get recurrence ( ) {
341
+ get recurrenceRule ( ) {
342
342
if ( this . _recurrence === undefined || this . _recurrence === null ) {
343
343
return getDefaultRecurrenceRuleObject ( )
344
344
}
@@ -754,7 +754,7 @@ export default class Task {
754
754
*/
755
755
completeRecurring ( ) {
756
756
// Get recurrence iterator, starting at start date
757
- const iter = this . recurrence . iterator ( this . start )
757
+ const iter = this . recurrenceRule . iterator ( this . start )
758
758
// Skip the start date itself
759
759
iter . next ( )
760
760
// If there is a next recurrence, update the start date to next recurrence date
Original file line number Diff line number Diff line change @@ -224,8 +224,8 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
224
224
@add-tag="updateTag"
225
225
@set-tags="updateTags" />
226
226
<RepeatItem v-show="!readOnly || task.recurring"
227
- :recurrence="task.recurrence "
228
- :disabled="readOnly "
227
+ :recurrence-rule ="task.recurrenceRule "
228
+ :disabled="false "
229
229
:placeholder="t('tasks', 'No recurrence')"
230
230
icon="IconRepeat" />
231
231
</div>
You can’t perform that action at this time.
0 commit comments