From 06767ff39a5b392f8eaf7b592ddd1507dba49b9e Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Thu, 8 Jan 2026 22:21:59 +0000 Subject: [PATCH] First indication that the location geocoder is working --- public-report/endpoint.go | 5 +- public-report/page.go | 6 +- .../component/location-geocode-header.html | 108 ++++++++++++++++++ .../template/component/location-geocode.html | 15 +++ public-report/template/pool.html | 4 +- 5 files changed, 133 insertions(+), 5 deletions(-) create mode 100644 public-report/template/component/location-geocode-header.html create mode 100644 public-report/template/component/location-geocode.html diff --git a/public-report/endpoint.go b/public-report/endpoint.go index a32a0c26..d8cb8041 100644 --- a/public-report/endpoint.go +++ b/public-report/endpoint.go @@ -8,6 +8,7 @@ import ( "strconv" "time" + "github.com/Gleipnir-Technology/nidus-sync/config" "github.com/Gleipnir-Technology/nidus-sync/db" "github.com/Gleipnir-Technology/nidus-sync/db/enums" "github.com/Gleipnir-Technology/nidus-sync/db/models" @@ -70,7 +71,9 @@ func getPool(w http.ResponseWriter, r *http.Request) { htmlpage.RenderOrError( w, Pool, - ContextPool{}, + ContextPool{ + MapboxToken: config.MapboxToken, + }, ) } func getQuick(w http.ResponseWriter, r *http.Request) { diff --git a/public-report/page.go b/public-report/page.go index cd1efd70..284cbc0e 100644 --- a/public-report/page.go +++ b/public-report/page.go @@ -17,7 +17,9 @@ type ContextNuisance struct{} type ContextNuisanceSubmitComplete struct { ReportID string } -type ContextPool struct{} +type ContextPool struct{ + MapboxToken string +} type ContextQuick struct{} type ContextQuickSubmitComplete struct { ReportID string @@ -39,7 +41,7 @@ var ( Status = buildTemplate("status", "base") ) -var components = [...]string{"footer", "photo-upload", "photo-upload-header"} +var components = [...]string{"footer", "location-geocode", "location-geocode-header", "photo-upload", "photo-upload-header"} func buildTemplate(files ...string) *htmlpage.BuiltTemplate { subdir := "public-report" diff --git a/public-report/template/component/location-geocode-header.html b/public-report/template/component/location-geocode-header.html new file mode 100644 index 00000000..a21405d1 --- /dev/null +++ b/public-report/template/component/location-geocode-header.html @@ -0,0 +1,108 @@ +{{define "location-geocode-header"}} + + +{{end}} diff --git a/public-report/template/component/location-geocode.html b/public-report/template/component/location-geocode.html new file mode 100644 index 00000000..83665783 --- /dev/null +++ b/public-report/template/component/location-geocode.html @@ -0,0 +1,15 @@ +{{define "location-geocode"}} +
+

Address Search

+
+ + +
+
+
+
Selected Location Details:
+
No location selected
+
+
+{{end}} diff --git a/public-report/template/pool.html b/public-report/template/pool.html index 0ea0e6c7..636206fb 100644 --- a/public-report/template/pool.html +++ b/public-report/template/pool.html @@ -2,6 +2,7 @@ {{define "title"}}Green Pool{{end}} {{define "extraheader"}} +{{template "location-geocode-header" .}} {{template "photo-upload-header"}}