@@ -78,10 +104,12 @@ const Plant = ({id}) => {
let lastTask = false
if (history()[action.id]) {
lastTask = new Date(history()[action.id])
- isDone = lastTask.addDays(Number(action.frequency)) < (new Date())
+ isDone = lastTask.addDays(Number(action.frequency)).toSQLDate() >= (new Date()).toSQLDate()
}
return
-
+
+
+
{action.action_type}
every {action.frequency} days
last task {lastTask ? lastTask.toFrDate() : 'never'}
@@ -104,6 +132,24 @@ const Plant = ({id}) => {
,
app
)}
+
+ {createPortal(
+
+
+ Edit Plant
+
+
+ ,
+ app
+ )}
}