Tasks Modal: add setter for repeatsOn (#10247)

* fix for 10236, add setter to repeatsOn

* remove console.log
This commit is contained in:
Matteo Pagliazzi
2018-04-12 20:30:56 +02:00
committed by Sabe Jones
parent fa945c7689
commit 71c9e7a685

View File

@@ -797,6 +797,9 @@ export default {
return repeatsOn;
},
set (newRepeatsOn) {
this.calculateMonthlyRepeatDays(newRepeatsOn);
},
},
selectedTags () {
return this.getTagsFor(this.task);
@@ -857,10 +860,10 @@ export default {
weekdaysMin (dayNumber) {
return moment.weekdaysMin(dayNumber);
},
calculateMonthlyRepeatDays () {
calculateMonthlyRepeatDays (newRepeatsOn) {
if (!this.task) return;
const task = this.task;
const repeatsOn = this.repeatsOn;
const repeatsOn = newRepeatsOn || this.repeatsOn;
if (task.frequency === 'monthly') {
if (repeatsOn === 'dayOfMonth') {