summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorGrailFinder <wohilas@gmail.com>2024-05-29 08:42:36 +0300
committerGrailFinder <wohilas@gmail.com>2024-05-29 08:42:36 +0300
commitd0ec9f38b17dadf4c244904e28e064d6ad7c5674 (patch)
treec9edf41291ed0a0d3bc12d3293cb013351d62d3b /components
parent9b52a88e971e70facc74778c133244f8a93b1f31 (diff)
Feat: add recommendations [wip]
Diffstat (limited to 'components')
-rw-r--r--components/recommendation.html48
1 files changed, 48 insertions, 0 deletions
diff --git a/components/recommendation.html b/components/recommendation.html
new file mode 100644
index 0000000..5036088
--- /dev/null
+++ b/components/recommendation.html
@@ -0,0 +1,48 @@
+{{define "recommentdation"}}
+<div class="actiontable">
+<p>ActionTypePlus</p>
+<table>
+ <tr>
+ <th>Name</th>
+ <th>Magnitude</th>
+ <th>Repeatable</th>
+ <th>Commit</th>
+ </tr>
+ {{range $action := .Actions}}
+ {{if and (eq $action.Type "ActionTypePlus") (or (not $action.Done) ($action.Repeatable))}}
+ <form hx-post="/done" hx-target="#ancestor" hx-swap="outerHTML">
+ <tr>
+ <td><input class="action_name" name="name" value={{$action.Name}} type="hidden" readonly />{{$action.Name}}</td>
+ <td>{{$action.Magnitude}}</td>
+ <td>{{$action.Repeatable}}</td>
+ <td><input type="submit" value="Done It"></input></td>
+ </tr>
+ </form>
+ {{end}}
+ {{end}}
+</table>
+</div>
+<div class="actiontable">
+<p>ActionTypeMinus</p>
+<table>
+ <tr>
+ <th>Name</th>
+ <th>Magnitude</th>
+ <th>Repeatable</th>
+ <th>Commit</th>
+ </tr>
+ {{range $action := .Actions}}
+ {{if eq $action.Type "ActionTypeMinus"}}
+ <form hx-post="/done" hx-target="#ancestor" hx-swap="outerHTML">
+ <tr>
+ <td><input class="action_name" name="name" value={{$action.Name}} type="hidden" readonly />{{$action.Name}}</td>
+ <td>{{$action.Magnitude}}</td>
+ <td>{{$action.Repeatable}}</td>
+ <td><input type="submit" value="Done It"></input></td>
+ </tr>
+ </form>
+ {{end}}
+ {{end}}
+</table>
+</div>
+{{end}}