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() { render() {
const entries = this.props.entries.filter((x) => !x.completed); const entries = this.props.entries.filter((x) => !x.finished);
const sortedEntries = sortSelector(entries); const sortedEntries = sortSelector(entries);
let itemList = sortedEntries.map((entry, idx, array) => { let itemList = sortedEntries.map((entry, idx, array) => {

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

Loading…
Cancel
Save