summaryrefslogtreecommitdiff
path: root/templates/parts/entry.html
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2024-05-26 22:20:40 +0200
committerJulian T <julian@jtle.dk>2024-05-29 22:25:47 +0200
commitafb0a04fe600575b00d551da7dce6a08679ef7b8 (patch)
tree8f90720887cf49045d65a9d17dad984dae06275c /templates/parts/entry.html
parent9b55b16f3b906958171b4f45002b58d5f77b9705 (diff)
Working task selectionHEADmain
Diffstat (limited to 'templates/parts/entry.html')
-rw-r--r--templates/parts/entry.html37
1 files changed, 26 insertions, 11 deletions
diff --git a/templates/parts/entry.html b/templates/parts/entry.html
index 52f2eb3..4be2073 100644
--- a/templates/parts/entry.html
+++ b/templates/parts/entry.html
@@ -16,17 +16,32 @@
</div>
</div>
<div class="entry-box">
- <b>Mærker</b><br>
- <select>
- <option value="-">-</option>
- <option value="SVT-232">SVT-232</option>
- <option value="Ferie">Ferie</option>
- </select><br>
- <select>
- <option value="-">-</option>
- <option value="SVT-232">SVT-232</option>
- <option value="Ferie">Ferie</option>
- </select>
+ <b>Opgaver</b><br>
+ <input readonly style="display: none;" name="task-count" value="{{ .TaskCount }}" />
+ <table>
+ <tbody>
+ {{ if .Entry }}
+ {{ range $x := taskMapToArr .Entry.Tasks }}
+ <tr>
+ <td>
+ <select name="task-{{$x.Key}}-id" hx-trigger="changedTasks from:body" hx-get="/task/select?selected={{$x.Id}}">
+ {{ template "taskEntry.html" arr $.GroupToTasks $x.Id }}
+ </select>
+ </td>
+ <td><input name="task-{{$x.Key}}-part" type="text" class="short" {{if $x.Sel}}value="{{$x.Sel}}"{{end}}/></td>
+ </tr>
+ {{ end }}
+ {{ end }}
+ <tr>
+ <td>
+ <select name="task-new-id" hx-trigger="changedTasks from:body" hx-get="/task/select">
+ {{ template "taskEntry.html" (arr .GroupToTasks -1) }}
+ </select>
+ </td>
+ <td><input disabled name="task-new-part" type="text" class="short" /></td>
+ </tr>
+ </tbody>
+ </table>
</div>
<div class="entry-box">
<b>Kommentar</b><br>