diff --git a/htmlpage/public-reports/page.go b/htmlpage/public-reports/page.go index 3154949c..5fb1b0d5 100644 --- a/htmlpage/public-reports/page.go +++ b/htmlpage/public-reports/page.go @@ -13,13 +13,19 @@ var embeddedFiles embed.FS //go:embed static/* var EmbeddedStaticFS embed.FS -type RootContext struct{} +type ContextNuisance struct{} +type ContextPool struct{} +type ContextRoot struct{} +type ContextStatus struct{} var ( + Nuisance = buildTemplate("nuisance", "base") + Pool = buildTemplate("pool", "base") Root = buildTemplate("root", "base") + Status = buildTemplate("status", "base") ) -var components = [...]string{} +var components = [...]string{"footer"} func buildTemplate(files ...string) *htmlpage.BuiltTemplate { subdir := "htmlpage/public-reports" @@ -28,7 +34,7 @@ func buildTemplate(files ...string) *htmlpage.BuiltTemplate { full_files = append(full_files, fmt.Sprintf("%s/template/%s.html", subdir, f)) } for _, c := range components { - full_files = append(full_files, fmt.Sprintf("%s/template/components/%s.html", subdir, c)) + full_files = append(full_files, fmt.Sprintf("%s/template/component/%s.html", subdir, c)) } return htmlpage.NewBuiltTemplate(embeddedFiles, "htmlpage/public-reports/", full_files...) } diff --git a/htmlpage/public-reports/template/base.html b/htmlpage/public-reports/template/base.html index f1304fbb..61abeec2 100644 --- a/htmlpage/public-reports/template/base.html +++ b/htmlpage/public-reports/template/base.html @@ -14,6 +14,7 @@ {{template "content" .}} +{{template "footer" .}} diff --git a/htmlpage/public-reports/template/component/footer.html b/htmlpage/public-reports/template/component/footer.html new file mode 100644 index 00000000..910cb8d7 --- /dev/null +++ b/htmlpage/public-reports/template/component/footer.html @@ -0,0 +1,14 @@ +{{define "footer"}} + +{{end}} diff --git a/htmlpage/public-reports/template/nuisance.html b/htmlpage/public-reports/template/nuisance.html new file mode 100644 index 00000000..2a44adc0 --- /dev/null +++ b/htmlpage/public-reports/template/nuisance.html @@ -0,0 +1,541 @@ +{{template "base.html" .}} + +{{define "title"}}Dash{{end}} +{{define "extraheader"}} + + +{{end}} +{{define "content"}} + +
+
+
+
+

[District Name]

+
+
+ +
+
+
+
+ + +
+
+ +
+
+

Report Mosquito Nuisance

+

Help us identify mosquito activity in your area

+
+
+ + +
+
+ +
+
+ + +
+ +
+
+ +

Mosquito Activity Information

+ optional +
+

The time when mosquitoes are active can help us identify the species and likely breeding sources.

+ + +
+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+ + +
+ + +
+
+
Minor
+ Occasional mosquito +
+
+
Moderate
+ Regular presence +
+
+
Severe
+ Many mosquitoes +
+
+
+ Current selection: 3/5 +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +

Potential Mosquito Sources

+ optional +
+

Have you noticed any of these common mosquito breeding sources in your area?

+ +
+
+
Did you know?
+

Mosquitoes can breed in as little as a bottle cap of water! Eliminating standing water is the most effective way to reduce mosquito populations.

+
+
+ +
+ +
+
+
+
+ +
+
Stagnant Water
+

Green pools, ponds, fountains, or birdbaths that aren't maintained

+
+ + +
+
+
+
+ + +
+
+
+
+ +
+
Containers
+

Buckets, planters, toys, tires, or any items that collect rainwater

+
+ + +
+
+
+
+ + +
+
+
+
+ +
+
Roof & Gutters
+

Clogged gutters, flat roofs, or AC units that collect water

+
+ + +
+
+
+
+
+ + + +
+
+ + +
+
+
+ + +
+
+ +

Inspection Request

+
+

Would you like our technicians to inspect for potential mosquito sources?

+ +
+
+
+
Property Inspection
+

Request a technician to inspect your property for mosquito sources. We'll contact you to schedule a convenient time.

+
+ + +
+
+
+ +
+
+
Neighborhood Inspection
+

Request a general inspection of your neighborhood. We'll survey the area for potential mosquito breeding sources.

+
+ + +
+
+
+
+ + + +
+ + +
+
+ +

Location & Contact Information

+
+ +
+
+ + +
+
+ +
+
+ + +
+
+ + +
+
+ + +
We'll use this to send you a confirmation and follow-up information.
+
+
+
+ + +
+
+ +

Additional Information

+ optional +
+ +
+
+ + +
+
+
+ + +
+
+
+

Thank you for reporting this mosquito issue.

+

After submission, you'll receive a confirmation with a report ID and further information.

+
+
+ +
+
+
+
+ + + +
+
+ + + +{{end}} diff --git a/htmlpage/public-reports/template/pool.html b/htmlpage/public-reports/template/pool.html new file mode 100644 index 00000000..9c8e2da6 --- /dev/null +++ b/htmlpage/public-reports/template/pool.html @@ -0,0 +1,495 @@ +{{template "base.html" .}} + +{{define "title"}}Green Pool{{end}} +{{define "extraheader"}} + + +{{end}} +{{define "content"}} + +
+
+ +
+
+

Report a Green Pool or Mosquito Source

+

Help us locate and treat potential mosquito breeding sources in your area

+
+
+ + +
+
+ +
+
+ + +
+ +
+
+ +

Photos

+ optional +
+

Photos help us identify the severity of the issue and may contain location data that can help us find the source.

+ +
+ +
+ +
+

Drag and drop photos here

+

- or -

+ +

You can upload multiple photos (maximum 5)

+
+ + +
+ +
+
+ + +
+
+ +

Location

+ optional +
+

Please provide the location of the potential mosquito breeding source. We may be able to extract this information from your photos if they contain location data.

+ +
+
+ + +
+
+ +

You can also click on the map to mark the location precisely

+
+
+ +

Interactive Map

+

Click to set the location of the mosquito source

+
+
+
+ + +
+
+ +

Source Details

+ optional +
+ +
+
+ + +
+ +
+ +
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ +

Access Information

+ optional +
+

Please provide any details about how to access the mosquito source. This helps our technicians when they visit the site.

+ +
+
+ + +
+
+ +
+
+ +
+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+ +

Contact Information

+ optional +
+ + +
Property Owner Information (if known)
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
Your Contact Information (for updates)
+
+
+ + +
+
+ + +
+
+ + +
+
+
+ + +
+
+
+
+ + +
+
+ +

Additional Information

+ optional +
+

Please provide any other information that might help us address this mosquito source.

+ +
+
+ + +
+
+
+ + +
+
+
+

Thank you for helping us keep our community safe from mosquito-borne illnesses.

+

After submission, you will receive a confirmation with a report ID for tracking purposes.

+
+
+ +
+
+
+
+ + + +
+
+ + + +{{end}} diff --git a/htmlpage/public-reports/template/root.html b/htmlpage/public-reports/template/root.html index 4dc19e78..57acfc4f 100644 --- a/htmlpage/public-reports/template/root.html +++ b/htmlpage/public-reports/template/root.html @@ -49,7 +49,7 @@

On the go?

- Make a Quick Report + Make a Quick Report

Report mosquito issues in under 60 seconds

@@ -72,7 +72,7 @@

Follow-up or Check Status

Check on a previous request or view current mosquito activity in your area.

- Get Updates + Get Status @@ -88,7 +88,7 @@

Report a Green Pool

Report stagnant water sources like abandoned pools that may breed mosquitoes.

- Report Source + Report Source @@ -104,7 +104,7 @@

Report Mosquito Nuisance

Report areas with high adult mosquito activity causing discomfort or concern.

- Report Problem + Report Problem @@ -121,7 +121,7 @@

Use our streamlined form to report mosquito issues in under 60 seconds

- Quick Report + Quick Report
@@ -132,18 +132,4 @@ - - - {{end}} diff --git a/htmlpage/public-reports/template/status.html b/htmlpage/public-reports/template/status.html new file mode 100644 index 00000000..8e8a0b52 --- /dev/null +++ b/htmlpage/public-reports/template/status.html @@ -0,0 +1,133 @@ +{{template "base.html" .}} + +{{define "title"}}Status{{end}} +{{define "extraheader"}} + +{{end}} +{{define "content"}} +
+ +
+
+

Check Status or Follow-up

+
+
+ + +
+
+
+
+

+ Choose one of the following options to check on mosquito activity or follow up on a previous report. +

+
+
+ +
+ +
+
+
+
+ + + + +
+

Look up by Report ID

+

+ If you have a report ID from a previous request, enter it below to view the details and current status. +

+ +
+
+ + +
Example: MMD-2023-12345
+
+ +
+
+
+
+ + +
+
+
+ + +
+
+
+
+ + + + +
+

Look up by Location

+

+ Don't have a report ID? You can check mosquito activity and reports in your area by providing your location information. +

+

+ This option will guide you through selecting your location to find relevant information about mosquito activity near you. +

+ +
+
+
+
+ + + +
+
+
+{{end}} diff --git a/report/endpoint.go b/report/endpoint.go index 9255e100..383b02fb 100644 --- a/report/endpoint.go +++ b/report/endpoint.go @@ -11,6 +11,9 @@ import ( func Router() chi.Router { r := chi.NewRouter() r.Get("/", getRoot) + r.Get("/nuisance", getNuisance) + r.Get("/pool", getPool) + r.Get("/status", getStatus) localFS := http.Dir("./static") htmlpage.FileServer(r, "/static", localFS, publicreports.EmbeddedStaticFS, "static") return r @@ -20,6 +23,28 @@ func getRoot(w http.ResponseWriter, r *http.Request) { htmlpage.RenderOrError( w, publicreports.Root, - publicreports.RootContext{}, + publicreports.ContextRoot{}, + ) +} + +func getNuisance(w http.ResponseWriter, r *http.Request) { + htmlpage.RenderOrError( + w, + publicreports.Nuisance, + publicreports.ContextNuisance{}, + ) +} +func getPool(w http.ResponseWriter, r *http.Request) { + htmlpage.RenderOrError( + w, + publicreports.Pool, + publicreports.ContextPool{}, + ) +} +func getStatus(w http.ResponseWriter, r *http.Request) { + htmlpage.RenderOrError( + w, + publicreports.Status, + publicreports.ContextStatus{}, ) }