From 75454834f470619986bd9d2c6139c7e70cc04880 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Fri, 9 Jan 2026 21:31:45 +0000 Subject: [PATCH] Add mock of report search page --- public-report/routes.go | 1 + public-report/search.go | 21 +++ public-report/template/search.html | 190 +++++++++++++++++++++++ public-report/template/status-by-id.html | 162 +++++++++---------- public-report/template/status.html | 4 +- 5 files changed, 296 insertions(+), 82 deletions(-) create mode 100644 public-report/search.go create mode 100644 public-report/template/search.html diff --git a/public-report/routes.go b/public-report/routes.go index a0a55bb6..cb46b135 100644 --- a/public-report/routes.go +++ b/public-report/routes.go @@ -21,6 +21,7 @@ func Router() chi.Router { r.Get("/quick-submit-complete", getQuickSubmitComplete) r.Post("/register-notifications", postRegisterNotifications) r.Get("/register-notifications-complete", getRegisterNotificationsComplete) + r.Get("/search", getSearch) r.Get("/status", getStatus) r.Get("/status/{report_id}", getStatusByID) localFS := http.Dir("./static") diff --git a/public-report/search.go b/public-report/search.go new file mode 100644 index 00000000..ad8497f3 --- /dev/null +++ b/public-report/search.go @@ -0,0 +1,21 @@ +package publicreport + +import ( + "net/http" + + "github.com/Gleipnir-Technology/nidus-sync/htmlpage" +) + +type ContextSearch struct{} + +var ( + Search = buildTemplate("search", "base") +) + +func getSearch(w http.ResponseWriter, r *http.Request) { + htmlpage.RenderOrError( + w, + Search, + ContextSearch{}, + ) +} diff --git a/public-report/template/search.html b/public-report/template/search.html new file mode 100644 index 00000000..825ad946 --- /dev/null +++ b/public-report/template/search.html @@ -0,0 +1,190 @@ +{{template "base.html" .}} + +{{define "title"}}Status{{end}} +{{define "extraheader"}} + + +{{end}} +{{define "content"}} +
+ + + + +
+
+
Reports Map
+
+
+
+ + +
+
+
+ + +
+
+
Reports Near You
+ 15 Reports Found +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Report IDReportedTypeAddressStatus
#123452 days agoMosquito Nuisance456 Elm Street, Anytown, USAScheduled
#123463 days agoGreen Pool789 Oak Avenue, Anytown, USATreated
#123471 week agoMosquito Nuisance123 Pine Road, Anytown, USAVisited
#123481 day agoQuick Report567 Maple Lane, Anytown, USAIn Review
#123492 weeks agoGreen Pool890 Cedar Court, Anytown, USATreated
#123505 days agoMosquito Nuisance234 Birch Blvd, Anytown, USAScheduled
#123513 hours agoQuick Report678 Spruce Street, Anytown, USAIn Review
+
+
+ +
+ + +
+ +
+ + +
+ +
+
+{{end}} diff --git a/public-report/template/status-by-id.html b/public-report/template/status-by-id.html index 73bf8dac..d42d65cd 100644 --- a/public-report/template/status-by-id.html +++ b/public-report/template/status-by-id.html @@ -40,98 +40,100 @@ {{end}} {{define "content"}} - -
-
-
Report {{.Report.ID|publicReportID}}
- Scheduled -
-
-
-
- Created: - July 15, 2023 - 9:30 AM -
-
- Last Updated: - July 17, 2023 - 2:45 PM -
-
- Next Step: - July 19, 2023 (Estimated) +
+ +
+
+
Report {{.Report.ID|publicReportID}}
+ Scheduled +
+
+
+
+ Created: + July 15, 2023 - 9:30 AM +
+
+ Last Updated: + July 17, 2023 - 2:45 PM +
+
+ Next Step: + July 19, 2023 (Estimated) +
-
- -
-
-
-
-
Reporter Information
+ +
+
+
+
+
Reporter Information
+
+
+

Name: Jane Doe

+

Phone: (555) 123-4567

+

Address: 123 Main Street, Anytown, USA 12345

+
-
-

Name: Jane Doe

-

Phone: (555) 123-4567

-

Address: 123 Main Street, Anytown, USA 12345

+
+
+
+
+
Nuisance Property Information
+
+
+

Owner: John Smith

+

Address: 456 Elm Street, Anytown, USA 12345

+

Description: Standing water in abandoned pool

+
-
-
-
-
Nuisance Property Information
-
-
-

Owner: John Smith

-

Address: 456 Elm Street, Anytown, USA 12345

-

Description: Standing water in abandoned pool

-
-
-
-
- -
-
-
Location Map
-
-
-
- - + +
+
+
Location Map
+
+
+
+ + +
-
- -
-
-
Request History
-
-
-
-
-
July 17, 2023 - 2:45 PM
-
Scheduled for Treatment
-

Site visit scheduled for July 19. Technician: Michael Johnson

-
-
-
July 16, 2023 - 10:30 AM
-
Assessment Complete
-

Initial assessment completed. Property requires treatment for mosquito larvae.

-
-
-
July 15, 2023 - 1:15 PM
-
In Review
-

Report assigned to field supervisor for initial assessment.

-
-
-
July 15, 2023 - 9:30 AM
-
Report Created
-

New mosquito nuisance report submitted by Jane Doe.

+ +
+
+
Request History
+
+
+
+
+
July 17, 2023 - 2:45 PM
+
Scheduled for Treatment
+

Site visit scheduled for July 19. Technician: Michael Johnson

+
+
+
July 16, 2023 - 10:30 AM
+
Assessment Complete
+

Initial assessment completed. Property requires treatment for mosquito larvae.

+
+
+
July 15, 2023 - 1:15 PM
+
In Review
+

Report assigned to field supervisor for initial assessment.

+
+
+
July 15, 2023 - 9:30 AM
+
Report Created
+

New mosquito nuisance report submitted by Jane Doe.

+
diff --git a/public-report/template/status.html b/public-report/template/status.html index b1dfcf18..5348849d 100644 --- a/public-report/template/status.html +++ b/public-report/template/status.html @@ -113,7 +113,7 @@ document.addEventListener('DOMContentLoaded', function() {
-
Example: MMD-2023-12345
+
Example: ABCD-1234-5678
{{ if ne .Error "" }}