Task: rename the completed property to finished and include cancelled.

master
Tom Hacohen 2019-02-14 22:00:13 +00:00
parent 66d95216f7
commit 172cc4ce53
2 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@ class TaskList extends React.PureComponent {
};
render() {
const entries = this.props.entries.filter((x) => !x.completed);
const entries = this.props.entries.filter((x) => !x.finished);
const sortedEntries = sortSelector(entries);
let itemList = sortedEntries.map((entry, idx, array) => {

View File

@ -71,9 +71,9 @@ export class TaskType extends EventType {
super(comp ? comp : new ICAL.Component('vtodo'));
}
get completed() {
const status = this.component.getFirstPropertyValue('status');
return status === 'COMPLETED';
get finished() {
return this.status === TaskStatusType.Completed ||
this.status === TaskStatusType.Cancelled;
}
set status(status: TaskStatusType) {