Commit to dev branch includes
- Due date on Todos - Dailies segragation to not include non-due Dailies - Checklist-items are now working - Made a completely new wrapper for markdown+emojis, can render emojis in description as well as task name
This commit is contained in:
parent
88fdde519d
commit
22616cbed9
13 changed files with 110 additions and 17 deletions
|
|
@ -1,8 +1,10 @@
|
|||
import * as React from "react";
|
||||
import TodoSubTasks from "./TodoSubTasks";
|
||||
import renderMarkdown from "../markdownRender"
|
||||
import moment from "moment";
|
||||
|
||||
function TodoItem(props: any) {
|
||||
var dueDate = (props.dueDate==null)?"":("Due Date:"+(moment(props.dueDate).format(props.dueDateFormat)));
|
||||
var text_html = renderMarkdown(props.todo_text);
|
||||
var note_html = renderMarkdown(props.todo_notes);
|
||||
return (
|
||||
|
|
@ -11,7 +13,8 @@ function TodoItem(props: any) {
|
|||
<div>
|
||||
<p><span dangerouslySetInnerHTML={{__html: text_html}}></span></p>
|
||||
<div className="description" dangerouslySetInnerHTML={{__html: note_html}}></div>
|
||||
<TodoSubTasks subtasks={props.todo_subtasks} onChange={props.onChange}></TodoSubTasks>
|
||||
<TodoSubTasks todoID={props.id} subtasks={props.todo_subtasks} onChange={props.onChangeChecklistItem}></TodoSubTasks>
|
||||
<div className="due-date">{dueDate}</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ function TodoSubTasks(props: any) {
|
|||
let subtask_text = renderMarkdown(subtask.text);
|
||||
return (
|
||||
<div className="subtask" id={subtask.id}>
|
||||
<input type="checkbox" className="checkbox" onChange={props.onChange} checked={subtask.completed} />
|
||||
<input type="checkbox" className="checkbox" onChange={props.onChange} checked={subtask.completed} id={subtask.id}/>
|
||||
<p id={subtask.id}><span dangerouslySetInnerHTML={{__html: subtask_text}}></span></p>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ export default function Index(props: any){
|
|||
}
|
||||
return <TodoItem key={todo.id} id={todo.id} todo_text={todo.text}
|
||||
todo_notes={todo_notes} todo_subtasks={todo_subtasks}
|
||||
onChange={props.onChange} completed={todo.completed}/>
|
||||
onChange={props.onChange} onChangeChecklistItem={props.onChangeChecklistItem} completed={todo.completed} dueDate={todo.date} dueDateFormat={props.settings.dueDateFormat}/>
|
||||
}
|
||||
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue