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"}} +
| Report ID | +Reported | +Type | +Address | +Status | +
|---|---|---|---|---|
| #12345 | +2 days ago | +Mosquito Nuisance | +456 Elm Street, Anytown, USA | +Scheduled | +
| #12346 | +3 days ago | +Green Pool | +789 Oak Avenue, Anytown, USA | +Treated | +
| #12347 | +1 week ago | +Mosquito Nuisance | +123 Pine Road, Anytown, USA | +Visited | +
| #12348 | +1 day ago | +Quick Report | +567 Maple Lane, Anytown, USA | +In Review | +
| #12349 | +2 weeks ago | +Green Pool | +890 Cedar Court, Anytown, USA | +Treated | +
| #12350 | +5 days ago | +Mosquito Nuisance | +234 Birch Blvd, Anytown, USA | +Scheduled | +
| #12351 | +3 hours ago | +Quick Report | +678 Spruce Street, Anytown, USA | +In Review | +
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
+Owner: John Smith
+Address: 456 Elm Street, Anytown, USA 12345
+Description: Standing water in abandoned pool
+Owner: John Smith
-Address: 456 Elm Street, Anytown, USA 12345
-Description: Standing water in abandoned pool
-Site visit scheduled for July 19. Technician: Michael Johnson
-Initial assessment completed. Property requires treatment for mosquito larvae.
-Report assigned to field supervisor for initial assessment.
-New mosquito nuisance report submitted by Jane Doe.
+ +Site visit scheduled for July 19. Technician: Michael Johnson
+Initial assessment completed. Property requires treatment for mosquito larvae.
+Report assigned to field supervisor for initial assessment.
+New mosquito nuisance report submitted by Jane Doe.
+