Task sort payment fixes (#9104)

* Added sorting to dated filter

* Validated payment data type
This commit is contained in:
Keith Holliday
2017-09-29 15:30:28 -05:00
committed by GitHub
parent c1079e4eae
commit ec260016d3
2 changed files with 8 additions and 3 deletions

View File

@@ -159,6 +159,7 @@
<script>
import Task from './task';
import sortBy from 'lodash/sortBy';
import { mapState, mapActions } from 'client/libs/store';
import { shouldDo } from 'common/script/cron';
import inAppRewards from 'common/script/libs/inAppRewards';
@@ -203,7 +204,7 @@ export default {
label: 'todos',
filters: [
{label: 'remaining', filter: t => !t.completed, default: true}, // active
{label: 'scheduled', filter: t => !t.completed && t.date},
{label: 'scheduled', filter: t => !t.completed && t.date, sort: t => t.date},
{label: 'complete2', filter: t => t.completed},
],
},
@@ -316,6 +317,10 @@ export default {
this.loadCompletedTodos();
}
this.activeFilters[type] = filter;
if (filter.sort) {
this.tasks[`${type}s`] = sortBy(this.tasks[`${type}s`], filter.sort);
}
},
setColumnBackgroundVisibility () {
this.$nextTick(() => {