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

master
Tom Hacohen 6 years ago
parent 66d95216f7
commit 172cc4ce53

@ -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) => {

@ -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) {

Loading…
Cancel
Save