File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export default function JottingOptionsBar(props) {
1212 await deleteJotting ( props ) ;
1313 Jotting . closeJotting ( router ) ;
1414 } catch {
15- alert ( "The note was not deleted due to a system error" ) ;
15+ alert ( "The jotting was not deleted due to a system error" ) ;
1616 }
1717 } ;
1818
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export default function NoteOptionsBar(props) {
1212 } ;
1313
1414 return (
15- < JottingOptionsBar { ...props } >
15+ < JottingOptionsBar jotType = "note" { ...props } >
1616 < button onClick = { handleShareClick } >
1717 < Image height = { 35 } width = { 55 } src = "/images/share.png" alt = "share icon" title = "Share jotting" />
1818 </ button >
Original file line number Diff line number Diff line change @@ -5,29 +5,38 @@ import JottingOptionsBar from "./JottingOptionsBar";
55import SubtaskList from "./subtaskList" ;
66import CreateJottingButton from "../CreateJottingButton/createJottingButton" ;
77import { useState } from "react" ;
8+ import StyledCheckbox from "../StyledCheckbox/styledCheckbox" ;
89
910export default function Task ( task ) {
1011 return (
1112 < Jotting jotType = "task" { ...task } >
12- < JottingOptionsBar { ...task } />
13+ < JottingOptionsBar jotType = "task" { ...task } >
14+ < div >
15+ < StyledCheckbox
16+ id = { task . id }
17+ prefix = "task-completion-box-"
18+ completed = { task . completed == 1 }
19+ />
20+ </ div >
21+ </ JottingOptionsBar >
1322 < JottingDetails jotType = "task" jottingInfo = { task } />
1423 < SubtasksControl task = { task } />
1524 </ Jotting >
1625 ) ;
1726}
1827
19- function SubtasksControl ( { task} ) {
28+ function SubtasksControl ( { task } ) {
2029 const [ subtasks , setSubtasks ] = useState ( null ) ;
2130 return (
2231 < div className = { jotting . subtasksControl } >
2332 < h3 className = { jotting . subtaskHeading } > Subtasks</ h3 >
24- < SubtaskList id = { task . id } subtasksState = { [ subtasks , setSubtasks ] } />
33+ < SubtaskList id = { task . id } subtasksState = { [ subtasks , setSubtasks ] } />
2534 < CreateJottingButton
2635 requestFunc = "createSubtask"
2736 jotType = "subtask"
28- jots = { subtasks }
29- setJots = { setSubtasks }
30- requestArg1 = { task . id }
37+ jots = { subtasks }
38+ setJots = { setSubtasks }
39+ requestArg1 = { task . id }
3140 />
3241 </ div >
3342 ) ;
You can’t perform that action at this time.
0 commit comments