Fixing issue with pull request when task is changed to monthly but that start date isn't updated.

This commit is contained in:
Travis Husman
2018-03-27 16:17:46 -07:00
committed by SabreCat
parent 3b3fcbdfce
commit e64bc2e39a
@@ -727,9 +727,10 @@ export default {
if (this.task) this.checklist = clone(this.task.checklist);
},
'task.startDate' () {
if (this.task && this.repeatsOn) {
this.calculateMonthlyRepeatDays(this.repeatsOn);
}
this.calculateMonthlyRepeatDays();
},
'task.frequency' () {
this.calculateMonthlyRepeatDays();
},
},
computed: {
@@ -796,9 +797,6 @@ export default {
return repeatsOn;
},
set (newValue) {
this.calculateMonthlyRepeatDays(newValue);
},
},
selectedTags () {
return this.getTagsFor(this.task);
@@ -859,8 +857,10 @@ export default {
weekdaysMin (dayNumber) {
return moment.weekdaysMin(dayNumber);
},
calculateMonthlyRepeatDays (repeatsOn) {
calculateMonthlyRepeatDays () {
if (!this.task) return;
const task = this.task;
const repeatsOn = this.repeatsOn;
if (task.frequency === 'monthly') {
if (repeatsOn === 'dayOfMonth') {