[refactor] app routes, [add] progress table
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-12-31 23:12:46 -05:00
parent a69f20d5a9
commit d3d89b36f6
14 changed files with 807 additions and 579 deletions

View File

@@ -129,7 +129,7 @@
</div>
</div>
</a>
<div class="w-full">
<a href="./progress" class="w-full">
<div
class="flex gap-4 w-full p-4 bg-white shadow-lg dark:bg-gray-700 rounded"
>
@@ -142,7 +142,7 @@
<p class="text-sm text-gray-400">Progress Records</p>
</div>
</div>
</div>
</a>
<div class="w-full">
<div
class="flex gap-4 w-full p-4 bg-white shadow-lg dark:bg-gray-700 rounded"

View File

@@ -122,7 +122,7 @@
</button>
</form>
<div class="pt-12 pb-12 text-center">
{{ if .RegistrationEnabled }} {{ if .Register }}
{{ if .Config.RegistrationEnabled }} {{ if .Register }}
<p>
Trying to login?
<a href="./login" class="font-semibold underline">

View File

@@ -0,0 +1,49 @@
{{template "base" .}} {{define "title"}}Progress{{end}} {{define "header"}}
<a href="./progress">Progress</a>
{{end}} {{define "content"}}
<div class="overflow-x-auto">
<div class="inline-block min-w-full overflow-hidden rounded shadow">
<table class="min-w-full leading-normal bg-white dark:bg-gray-700 text-sm">
<thead class="text-gray-800 dark:text-gray-400">
<tr>
<th class="p-3 font-normal text-left uppercase border-b border-gray-200 dark:border-gray-800">
Document
</th>
<th class="p-3 font-normal text-left uppercase border-b border-gray-200 dark:border-gray-800">
Device
</th>
<th class="p-3 font-normal text-left uppercase border-b border-gray-200 dark:border-gray-800">
Percent
</th>
<th class="p-3 font-normal text-left uppercase border-b border-gray-200 dark:border-gray-800">
Time
</th>
</tr>
</thead>
<tbody class="text-black dark:text-white">
{{ if not .Data }}
<tr>
<td class="text-center p-3" colspan="4">No Results</td>
</tr>
{{ end }}
{{range $progress := .Data }}
<tr>
<td class="p-3 border-b border-gray-200">
<a href="./documents/{{ $progress.DocumentID }}">{{ $progress.Author }} - {{ $progress.Title }}</p></a>
</td>
<td class="p-3 border-b border-gray-200">
<p>{{ $progress.DeviceName }}</p>
</td>
<td class="p-3 border-b border-gray-200">
<p>{{ $progress.Percentage }}%</p>
</td>
<td class="p-3 border-b border-gray-200">
<p>{{ $progress.CreatedAt }}</p>
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
</div>
{{end}}

View File

@@ -89,14 +89,7 @@
>
{{ range $item := GetUTCOffsets }}
<option
{{
if
(eq
$item.Value
$.Data.Settings.TimeOffset)
}}selected{{
end
}}
{{ if (eq $item.Value $.Data.TimeOffset) }}selected{{ end }}
value="{{ $item.Value }}"
>
{{ $item.Name }}