From 4be9c7206069ef0e765b507e7015875a8769ffed Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Tue, 3 Mar 2026 17:26:26 +0000 Subject: [PATCH] Add initial landing for RMO mailer --- html/template/rmo/mailer.html | 148 ++++++++++++++++++++++++++++++++++ html/url.go | 32 +++++++- 2 files changed, 176 insertions(+), 4 deletions(-) create mode 100644 html/template/rmo/mailer.html diff --git a/html/template/rmo/mailer.html b/html/template/rmo/mailer.html new file mode 100644 index 00000000..bf20ffc3 --- /dev/null +++ b/html/template/rmo/mailer.html @@ -0,0 +1,148 @@ +{{ template "rmo/layout/base.html" . }} + +{{ define "title" }}Report Standing Water{{ end }} +{{ define "extraheader" }} + +{{ end }} +{{ define "content" }} +
+ +
+ County Vector Control +
+ + +
+
+ Location + 1 of 4 +
+
+
+
+
+ + +
+

Confirm Property Location

+ + +
+
+
+ +
+
+ + +
+
Detected Address:
+
123 Maple Street, Riverside, CA 92501
+
+ +
+

Is this the correct location of the property in question?

+
+ + + +
+ + +
+

+ If you need assistance, please contact Vector Control at (555) 123-4567 +

+
+
+{{ end }} diff --git a/html/url.go b/html/url.go index 3e7b4f1d..1b0475d1 100644 --- a/html/url.go +++ b/html/url.go @@ -9,6 +9,7 @@ import ( type ContentURL struct { Configuration contentURLConfiguration OAuthRefreshArcGIS string + RMO contentURLRMO Root string Route string Sidebar contentURLSidebar @@ -56,6 +57,18 @@ func newContentURLConfiguration() contentURLConfiguration { } } +type contentURLRMO struct { + Evidence urlWithParams + UpdateLocation urlWithParams +} + +func newContentURLRMO() contentURLRMO { + return contentURLRMO{ + Evidence: makeURLWithParams(config.MakeURLReport, "/mailer/%s/evidence"), + UpdateLocation: makeURLWithParams(config.MakeURLReport, "/mailer/%s/update"), + } +} + type contentURLSidebar struct { Communication string Configuration string @@ -77,10 +90,21 @@ func newContentURLSidebar() contentURLSidebar { } type urlForID = func(int) string +type urlWithParams = func(...string) string -func makeURLForID(pattern string) urlForID { +type urlMaker func(path string, args ...string) string + +func makeURLForID(maker urlMaker, pattern string) urlForID { return func(id int) string { - return config.MakeURLNidus(pattern, strconv.Itoa(id)) + params := []string{ + strconv.Itoa(id), + } + return maker(pattern, params...) + } +} +func makeURLWithParams(maker urlMaker, pattern string, args ...string) urlWithParams { + return func(args ...string) string { + return maker(pattern, args...) } } @@ -95,8 +119,8 @@ type contentURLUpload struct { func newContentURLUpload() contentURLUpload { return contentURLUpload{ - Commit: makeURLForID("/configuration/upload/%s/commit"), - Discard: makeURLForID("/configuration/upload/%s/discard"), + Commit: makeURLForID(config.MakeURLNidus, "/configuration/upload/%s/commit"), + Discard: makeURLForID(config.MakeURLNidus, "/configuration/upload/%s/discard"), Pool: config.MakeURLNidus("/configuration/upload/pool"), PoolFlyover: config.MakeURLNidus("/configuration/upload/pool/flyover"), PoolCustom: config.MakeURLNidus("/configuration/upload/pool/custom"),