diff --git a/html/template/sync/message-list.html b/html/template/sync/message-list.html new file mode 100644 index 00000000..b65bf97c --- /dev/null +++ b/html/template/sync/message-list.html @@ -0,0 +1,364 @@ +{{ template "sync/layout/authenticated.html" . }} + +{{ define "title" }}Dash{{ end }} +{{ define "extraheader" }} + +{{ end }} +{{ define "content" }} +
+
+
+

Message Center

+

+ Manage incoming communications from the public and field technicians +

+
+
+
+ + +
+
+
+ + + + + +
+
+
+ + +
+
+
+
+ + +
+
+
+ + +
+
+ New Messages +
+
+ +
+
+
+
+ SJ +
+
+
+ Sarah Johnson + Technician +
+

+ Completed larvicide application at Thompson Creek. Water level + higher than expected, may need follow-up next week. +

+
+
+
+ 20 minutes ago +
+ + + +
+
+
+
+ + +
+
+
+
+ +
+
+
+ Robert Miller + Public Report +
+

+ Large standing water in abandoned lot at 1234 Maple Street. + Many mosquitoes in the area making it impossible to use + backyard. +

+
+
+
+ 1 hour ago +
+ + + +
+
+
+
+ + +
+
+
+
+ +
+
+
+ Emily Wilson + Service Request +
+

+ Following up on appointment #2315. When will the technician be + arriving? I need to make sure someone is home. +

+
+
+
+ 3 hours ago +
+ + +
+
+
+
+ + +
+
+
+
+ MT +
+
+
+ Mike Torres Technician +
+

+ Trap collection complete for sectors 4, 5, and 6. Samples + being delivered to lab this afternoon. High counts in sector + 5. +

+
+
+
+ 5 hours ago +
+ + +
+
+
+
+ + +
+
+
+
+ +
+
+
+ Jennifer Adams + Public Report +
+

+ Storm drain on corner of Oak and Pine appears to be clogged + and creating standing water. Mosquitoes are bad in this area. +

+
+
+
+ Yesterday +
+ + +
+
+
+
+
+
+ + +
+
+ Earlier Messages + View all +
+
+ +
+
+
+
+ DC +
+
+
+ David Chen Technician +
+

+ Weekly surveillance report submitted for Western District. All + traps processed. +

+
+
+
+ 2 days ago +
+ + +
+
+
+
+ + +
+
+
+{{ end }} diff --git a/sync/messages.go b/sync/messages.go new file mode 100644 index 00000000..7db90a2b --- /dev/null +++ b/sync/messages.go @@ -0,0 +1,14 @@ +package sync + +import ( + "context" + + "github.com/Gleipnir-Technology/nidus-sync/db/models" +) + +type contentMessageList struct{} + +func getMessageList(ctx context.Context, user *models.User) (string, interface{}, *errorWithStatus) { + content := contentMessageList{} + return "sync/message-list.html", content, nil +} diff --git a/sync/routes.go b/sync/routes.go index 3fc2d78d..66e05ec4 100644 --- a/sync/routes.go +++ b/sync/routes.go @@ -49,6 +49,7 @@ func Router() chi.Router { r.Route("/api", api.AddRoutes) r.Method("GET", "/cell/{cell}", auth.NewEnsureAuth(getCellDetails)) r.Method("GET", "/layout-test", auth.NewEnsureAuth(getLayoutTest)) + r.Method("GET", "/message", authenticatedHandler(getMessageList)) r.Method("GET", "/notification", auth.NewEnsureAuth(getNotificationList)) r.Method("GET", "/pool", auth.NewEnsureAuth(getPoolList)) r.Method("GET", "/pool/upload", auth.NewEnsureAuth(getPoolUpload))