diff --git a/html/template/rmo/mailer/confirm.html b/html/template/rmo/mailer/confirm.html new file mode 100644 index 00000000..6679d6a6 --- /dev/null +++ b/html/template/rmo/mailer/confirm.html @@ -0,0 +1,250 @@ +{{ template "rmo/layout/base.html" . }} + +{{ define "title" }}Report Standing Water{{ end }} +{{ define "extraheader" }} + +{{ end }} +{{ define "content" }} +
+ +
+ County Vector Control +
+ + +
+ + + + +
+

Thank You for Your Submission!

+

+ Your green pool report has been successfully submitted. +

+
+ + +
+
Appointment Confirmed
+

Our inspector will visit your property at the scheduled time:

+ +
+
+
Date
+
Thursday, June 22, 2023
+
+
+
Time
+
10:00 AM
+
+
+
Confirmation #
+
GP-23685
+
+
+
+ + +
+
What Happens Next?
+
    +
  • + A confirmation email has been sent to the email address you + provided. +
  • +
  • + You'll receive a reminder notification 24 hours before your + scheduled appointment. +
  • +
  • + Our team will review your report and contact you by the next + business day if any additional information is needed. +
  • +
  • + During the scheduled visit, our inspector will assess the pool + condition and discuss treatment options if necessary. +
  • +
+

+ You can use the link below to track your report status and view the + photos you've submitted. +

+
+ + + +
+ Track Your Report Status +

View photos and check for updates

+
+ +
+ + +
+
Questions or Concerns?
+

+ If you have any questions about your report or need to change your + appointment, please contact us: +

+ +
+ +
+ (555) 123-4567 +
Monday-Friday, 8:00 AM - 5:00 PM
+
+
+ +
+ +
+ greenpool@vectorcontrol.county.gov +
+
+ +

+ Please include your confirmation number (GP-23685) in all + correspondence. +

+
+ + +
+ +
+
+ + +
+

+ Thank you for helping keep our community safe from mosquito-borne + diseases. +

+
+
+{{ end }} diff --git a/html/template/rmo/mailer/contribute.html b/html/template/rmo/mailer/contribute.html new file mode 100644 index 00000000..dde59352 --- /dev/null +++ b/html/template/rmo/mailer/contribute.html @@ -0,0 +1,301 @@ +{{ template "rmo/layout/base.html" . }} + +{{ define "title" }}Report Standing Water{{ end }} +{{ define "extraheader" }} + +{{ end }} +{{ define "content" }} +
+ +
+ County Vector Control +
+ + +
+
+ Upload Photos + 3 of 4 +
+
+
+
+
+ + +
+

Upload Current Pool Photos

+

+ Please provide current photos of your pool to help us assess its + condition. +

+ + +
+
Photo Tips
+
    +
  • + Take photos from as high an angle as possible + (second story window, deck, etc.) +
  • +
  • Try to capture the entire pool in your photo
  • +
  • Ensure photos are clear and well-lit
  • +
  • + You can add multiple photos from different angles +
  • +
+
+ + +
Photo Examples:
+
+
+ Good photo example +
+ Good: High angle, full view +
+
+ +
+ Poor photo example +
+ Poor: Ground level, partial view +
+
+
+ + +
+
+ +
+
Add Pool Photos
+

Take a new photo or upload from your device

+ +
+ + +
+ + +
+ + +
+
Uploaded Photos (2)
+
+
+ Uploaded pool photo + +
+
+ Uploaded pool photo + +
+
+
+ + +
+ You can add up to 5 photos to provide a complete view of your pool + area. We recommend taking photos from multiple angles. +
+ + + +
+ + +
+

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

+
+
+{{ end }} diff --git a/html/template/rmo/mailer/evidence.html b/html/template/rmo/mailer/evidence.html new file mode 100644 index 00000000..a3ab70c3 --- /dev/null +++ b/html/template/rmo/mailer/evidence.html @@ -0,0 +1,284 @@ +{{ template "rmo/layout/base.html" . }} + +{{ define "title" }}Report Standing Water{{ end }} +{{ define "extraheader" }} + +{{ end }} +{{ define "content" }} +
+ +
+ County Vector Control +
+ + +
+
+ Evidence + 2 of 4 +
+
+
+
+
+ + +
+

Evidence of Potential Breeding Site

+ + +
+
+ Aerial Surveillance Photos +
+

+ These photos were taken during routine aerial surveillance of the + area. +

+ + +
+ + +
+
+ Historical Inspection Data +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateInspectorFindingsAction
Mar 15, 2023J. MartinezPool water stagnant, greenTreatment applied, owner notified
Nov 02, 2022L. JohnsonPool water clear, maintainedNo action needed
Aug 18, 2022S. WilliamsMinor algae formationOwner provided maintenance resources
+
+
+ + +
+
+ Mosquito Trap Count Data +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Date CollectedCountDistanceLevel
Jun 12, 2023420.3 milesHigh
Jun 05, 2023360.3 milesHigh
May 29, 2023280.3 milesMedium
May 22, 2023150.3 milesLow
May 15, 2023120.3 milesLow
+
+
+ + +
+
Why This Matters
+

+ The data above shows mosquito activity in your area. Recent trap + counts indicate elevated mosquito populations, which increases the + risk of mosquito-borne diseases like West Nile virus. +

+

+ Unmaintained swimming pools can produce thousands of mosquitoes each + week. By addressing potential breeding sites, you're helping protect + your family and neighbors from these health risks. +

+

+ We need your help to ensure we maintain public health + by keeping mosquito counts low in your neighborhood. Your cooperation + makes a significant difference in community safety. +

+
+ + + +
+ + +
+

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

+
+
+{{ end }} diff --git a/html/template/rmo/mailer.html b/html/template/rmo/mailer/root.html similarity index 96% rename from html/template/rmo/mailer.html rename to html/template/rmo/mailer/root.html index 9e0b4c91..c4e87a2b 100644 --- a/html/template/rmo/mailer.html +++ b/html/template/rmo/mailer/root.html @@ -127,13 +127,13 @@
Correct Update Location diff --git a/html/template/rmo/mailer/schedule.html b/html/template/rmo/mailer/schedule.html new file mode 100644 index 00000000..b9824b83 --- /dev/null +++ b/html/template/rmo/mailer/schedule.html @@ -0,0 +1,347 @@ +{{ template "rmo/layout/base.html" . }} + +{{ define "title" }}Report Standing Water{{ end }} +{{ define "extraheader" }} + +{{ end }} +{{ define "content" }} +
+ +
+ County Vector Control +
+ + +
+
+ Schedule Follow-up + 4 of 4 +
+
+
+
+
+ + +
+ + +
+

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

+
+
+{{ end }} diff --git a/html/template/rmo/mailer/update.html b/html/template/rmo/mailer/update.html new file mode 100644 index 00000000..99ac8f8f --- /dev/null +++ b/html/template/rmo/mailer/update.html @@ -0,0 +1,228 @@ +{{ template "rmo/layout/base.html" . }} + +{{ define "title" }}Report Standing Water{{ end }} +{{ define "extraheader" }} + +{{ end }} +{{ define "content" }} +
+ +
+ County Vector Control +
+ + +
+

Update Property Location

+ + +
+
+ Two Ways to Update Location +
+

+ You can update the property location by either clicking on the map or + entering an address below. Both methods will automatically update each + other. +

+
+ + +
+
Option 1: Select Location on Map
+
+
+
+ +
+
+ Click or tap anywhere on the + map to set the location +
+
+
+ + +
OR
+ + +
+
Option 2: Enter Address
+
+
+ + +
+ +
+
+ + +
+ +
+ + +
+ +
+ + +
+
+
+
+ + +
+
+ Current Coordinates: + 33.9806° N, 117.3755° W +
+
+ + +
+ + Nevermind + + +
+
+ + +
+

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

+
+
+{{ end }} diff --git a/html/url.go b/html/url.go index ee4fcc63..9d345618 100644 --- a/html/url.go +++ b/html/url.go @@ -59,14 +59,32 @@ func newContentURLConfiguration() contentURLConfiguration { } type contentURLRMO struct { - Evidence urlWithParams - UpdateLocation urlWithParams + Mailer contentURLRMOMailer } func newContentURLRMO() contentURLRMO { return contentURLRMO{ - Evidence: makeURLWithParams(config.MakeURLReport, "/mailer/%s/evidence"), - UpdateLocation: makeURLWithParams(config.MakeURLReport, "/mailer/%s/update"), + Mailer: newContentURLRMOMailer(), + } +} + +type contentURLRMOMailer struct { + Confirm urlWithParams + Contribute urlWithParams + Evidence urlWithParams + Root urlWithParams + Schedule urlWithParams + Update urlWithParams +} + +func newContentURLRMOMailer() contentURLRMOMailer { + return contentURLRMOMailer{ + Confirm: makeURLWithParams(config.MakeURLReport, "/mailer/%s/confirm"), + Contribute: makeURLWithParams(config.MakeURLReport, "/mailer/%s/contribute"), + Evidence: makeURLWithParams(config.MakeURLReport, "/mailer/%s/evidence"), + Root: makeURLWithParams(config.MakeURLReport, "/mailer/%s"), + Schedule: makeURLWithParams(config.MakeURLReport, "/mailer/%s/schedule"), + Update: makeURLWithParams(config.MakeURLReport, "/mailer/%s/update"), } } diff --git a/rmo/mailer.go b/rmo/mailer.go index b9efaacb..c4de4c56 100644 --- a/rmo/mailer.go +++ b/rmo/mailer.go @@ -60,10 +60,65 @@ func getMailer(ctx context.Context, r *http.Request) (*html.Response[contentMail return nil, nhttp.NewErrorStatus(http.StatusNotFound, "No compliance report with that public ID") } return html.NewResponse( - "rmo/mailer.html", contentMailer{ + "rmo/mailer/root.html", contentMailer{ Address: report, PublicID: public_id, }, ), nil } +func getMailerConfirm(ctx context.Context, r *http.Request) (*html.Response[contentMailer], *nhttp.ErrorWithStatus) { + public_id := chi.URLParam(r, "public_id") + if public_id == "" { + return nil, nhttp.NewErrorStatus(http.StatusBadRequest, "No 'public_id' in the url params") + } + return html.NewResponse( + "rmo/mailer/confirm.html", contentMailer{ + PublicID: public_id, + }, + ), nil +} +func getMailerContribute(ctx context.Context, r *http.Request) (*html.Response[contentMailer], *nhttp.ErrorWithStatus) { + public_id := chi.URLParam(r, "public_id") + if public_id == "" { + return nil, nhttp.NewErrorStatus(http.StatusBadRequest, "No 'public_id' in the url params") + } + return html.NewResponse( + "rmo/mailer/contribute.html", contentMailer{ + PublicID: public_id, + }, + ), nil +} +func getMailerEvidence(ctx context.Context, r *http.Request) (*html.Response[contentMailer], *nhttp.ErrorWithStatus) { + public_id := chi.URLParam(r, "public_id") + if public_id == "" { + return nil, nhttp.NewErrorStatus(http.StatusBadRequest, "No 'public_id' in the url params") + } + return html.NewResponse( + "rmo/mailer/evidence.html", contentMailer{ + PublicID: public_id, + }, + ), nil +} +func getMailerSchedule(ctx context.Context, r *http.Request) (*html.Response[contentMailer], *nhttp.ErrorWithStatus) { + public_id := chi.URLParam(r, "public_id") + if public_id == "" { + return nil, nhttp.NewErrorStatus(http.StatusBadRequest, "No 'public_id' in the url params") + } + return html.NewResponse( + "rmo/mailer/schedule.html", contentMailer{ + PublicID: public_id, + }, + ), nil +} +func getMailerUpdate(ctx context.Context, r *http.Request) (*html.Response[contentMailer], *nhttp.ErrorWithStatus) { + public_id := chi.URLParam(r, "public_id") + if public_id == "" { + return nil, nhttp.NewErrorStatus(http.StatusBadRequest, "No 'public_id' in the url params") + } + return html.NewResponse( + "rmo/mailer/update.html", contentMailer{ + PublicID: public_id, + }, + ), nil +} diff --git a/rmo/routes.go b/rmo/routes.go index ba5e40a5..09d1f804 100644 --- a/rmo/routes.go +++ b/rmo/routes.go @@ -33,7 +33,11 @@ func Router() chi.Router { r.Get("/email/unsubscribe/report/{report_id}", getEmailReportUnsubscribe) r.Get("/image/{uuid}", getImageByUUID) r.Get("/mailer/{public_id}", html.MakeGet(getMailer)) - r.Route("/mock", addMockRoutes) + r.Get("/mailer/{public_id}/confirm", html.MakeGet(getMailerConfirm)) + r.Get("/mailer/{public_id}/contribute", html.MakeGet(getMailerContribute)) + r.Get("/mailer/{public_id}/evidence", html.MakeGet(getMailerEvidence)) + r.Get("/mailer/{public_id}/schedule", html.MakeGet(getMailerSchedule)) + r.Get("/mailer/{public_id}/update", html.MakeGet(getMailerUpdate)) r.Post("/register-notifications", postRegisterNotifications) r.Get("/register-notifications-complete", getRegisterNotificationsComplete) r.Get("/report/suggest", getReportSuggestion)