From 66d95216f76ed3d84fd08b24e674472d700b579f Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 14 Feb 2019 21:57:19 +0000 Subject: [PATCH] Add support for editing a task's status. --- src/components/TaskEdit.tsx | 22 +++++++++++++++++++++- src/pim-types.ts | 15 +++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/src/components/TaskEdit.tsx b/src/components/TaskEdit.tsx index fafa602..092661a 100644 --- a/src/components/TaskEdit.tsx +++ b/src/components/TaskEdit.tsx @@ -28,7 +28,7 @@ import * as ICAL from 'ical.js'; import * as EteSync from '../api/EteSync'; -import { TaskType } from '../pim-types'; +import { TaskType, TaskStatusType } from '../pim-types'; interface PropsType { collections: Array; @@ -44,6 +44,7 @@ class TaskEdit extends React.PureComponent { state: { uid: string, title: string; + status: TaskStatusType; allDay: boolean; start?: Date; due?: Date; @@ -60,6 +61,7 @@ class TaskEdit extends React.PureComponent { this.state = { uid: '', title: '', + status: TaskStatusType.NeedsAction, allDay: false, location: '', description: '', @@ -73,6 +75,7 @@ class TaskEdit extends React.PureComponent { this.state.uid = event.uid; this.state.title = event.title ? event.title : ''; + this.state.status = event.status; if (event.startDate) { this.state.allDay = event.startDate.isDate; this.state.start = event.startDate.toJSDate(); @@ -162,6 +165,7 @@ class TaskEdit extends React.PureComponent { event.uid = this.state.uid; event.summary = this.state.title; + event.status = this.state.status; if (startDate) { event.startDate = startDate; } @@ -238,6 +242,22 @@ class TaskEdit extends React.PureComponent { + + + Status + + + +