Save tags on pool rows, show errors in summary table

This commit is contained in:
Eli Ribble 2026-02-16 16:38:04 +00:00
parent 123a4bf590
commit ef569aef18
No known key found for this signature in database
11 changed files with 305 additions and 172 deletions

View file

@ -13,22 +13,22 @@ const ORG_ID={{ .User.Organization.ID }}
function onLoad() {
const map = document.querySelector("map-libre-test");
map.addEventListener("load", (event) => {
map.addSource('tegola-nidus', {
map.addSource('tegola-nidus-fileupload', {
'type': 'vector',
'tiles': [
`{{.URL.Tegola}}maps/nidus/{z}/{x}/{y}?csv_file=${CSV_FILE_ID}&organization_id=${ORG_ID}`
`{{.URL.Tegola}}maps/fileupload/{z}/{x}/{y}?csv_file=${CSV_FILE_ID}&organization_id=${ORG_ID}`
]
});
map.addLayer({
'id': 'pool',
'source': 'tegola-nidus',
'source-layer': 'fileupload_pool',
'source': 'tegola-nidus-fileupload',
'source-layer': 'pool',
'type': 'circle',
'paint': {
'circle-color': "#DC4535",
'circle-color': "#91b979",
'circle-radius': 7,
'circle-stroke-width': 2,
'circle-stroke-color': "#9C1C28"
'circle-stroke-color': "#7aab5f"
}
});
});
@ -129,16 +129,29 @@ document.addEventListener('DOMContentLoaded', onLoad);
<table class="table table-hover table-striped">
<thead class="table-light">
<tr>
<th></th>
<th>Street</th>
<th>City</th>
<th>Post</th>
<th>Status</th>
<th>Condition</th>
<th>Tags</th>
</tr>
</thead>
<tbody>
{{ range .Upload.Pools }}
<tr>
<tr {{ if gt (len .Errors) 0 }}class="has-error"{{ end }}>
<td>
{{ if gt (len .Errors) 0 }}
<i
class="bi bi-info-circle-fill text-primary ms-1"
data-bs-toggle="tooltip"
data-bs-placement="top"
title="{{ range .Errors }}{{ .Message }}{{ end }}"
></i>
{{ end }}
</td>
<td>{{ .Street }}</td>
<td>{{ .City }}</td>
<td>{{ .PostalCode }}</td>
@ -166,6 +179,7 @@ document.addEventListener('DOMContentLoaded', onLoad);
</td>
{{ end }}
<td>{{ .Condition }}</td>
<td>{{ len .Tags }}</td>
</tr>
{{ end }}
</tbody>