2021-11-16 18:53:03 +05:30
|
|
|
import * as React from "react";
|
2022-01-13 12:47:36 -08:00
|
|
|
import DailySubTasks from "./DailySubTasks";
|
2022-01-14 14:39:21 +05:30
|
|
|
import renderMarkdown from "../markdownRender";
|
2021-10-17 21:58:59 -07:00
|
|
|
|
|
|
|
|
function DailyItem(props: any) {
|
2022-01-14 14:39:21 +05:30
|
|
|
var text_html = renderMarkdown(props.daily_text);
|
|
|
|
|
var note_html = renderMarkdown(props.daily_notes);
|
2021-10-17 21:58:59 -07:00
|
|
|
return (
|
|
|
|
|
<div className="todo-item" id={props.id}>
|
2021-11-20 17:11:13 +08:00
|
|
|
<input type="checkbox" className="checkbox" id={props.id} onChange={props.onChange} checked={props.completed} />
|
|
|
|
|
<div>
|
2022-01-14 14:39:21 +05:30
|
|
|
<p><span dangerouslySetInnerHTML={{__html: text_html}}></span></p>
|
|
|
|
|
<div className="description" dangerouslySetInnerHTML={{__html: note_html}}></div>
|
2022-01-14 17:55:47 +05:30
|
|
|
{/* {console.log(props.checklist)} */}
|
|
|
|
|
<DailySubTasks subtasks={props.daily_subtasks} onChangeChecklistItem={props.onChangeChecklistItem}></DailySubTasks>
|
2021-11-20 17:11:13 +08:00
|
|
|
</div>
|
|
|
|
|
|
2021-10-17 21:58:59 -07:00
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default DailyItem
|