diff --git a/endpoint.go b/endpoint.go
index 390b79fc..aab2269a 100644
--- a/endpoint.go
+++ b/endpoint.go
@@ -12,6 +12,14 @@ func getFavicon(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "static/favicon.ico")
}
+func getReport(w http.ResponseWriter, r *http.Request) {
+ //org := r.URL.Query().Get("org")
+ err := htmlReport(w)
+ if err != nil {
+ respondError(w, "Failed to generate report page", err, http.StatusInternalServerError)
+ }
+}
+
func getRoot(w http.ResponseWriter, r *http.Request) {
user, err := getAuthenticatedUser(r)
if err != nil && !errors.Is(err, &NoCredentialsError{}) {
diff --git a/html.go b/html.go
index 56d38e30..8d76a510 100644
--- a/html.go
+++ b/html.go
@@ -15,6 +15,7 @@ import (
var (
dashboard = newBuiltTemplate("dashboard", "authenticated")
+ report = newBuiltTemplate("report", "base")
signin = newBuiltTemplate("signin", "base")
signup = newBuiltTemplate("signup", "base")
)
@@ -32,6 +33,8 @@ type Link struct {
type ContentDashboard struct {
User User
}
+type ContentPlaceholder struct {
+}
type ContentSignin struct {
InvalidCredentials bool
}
@@ -83,6 +86,11 @@ func htmlDashboard(w io.Writer, user *models.User) error {
return dashboard.ExecuteTemplate(w, data)
}
+func htmlReport(w io.Writer) error {
+ data := ContentPlaceholder{}
+ return report.ExecuteTemplate(w, data)
+}
+
func htmlSignin(w io.Writer, errorCode string) error {
data := ContentSignin{
InvalidCredentials: errorCode == "invalid-credentials",
diff --git a/main.go b/main.go
index c69a9a1e..d70a59a0 100644
--- a/main.go
+++ b/main.go
@@ -58,6 +58,7 @@ func main() {
r.Use(sessionManager.LoadAndSave)
r.Get("/", getRoot)
+ r.Get("/report", getReport)
r.Post("/signin", postSignin)
r.Get("/signup", getSignup)
r.Post("/signup", postSignup)
diff --git a/templates/report.html b/templates/report.html
new file mode 100644
index 00000000..fd321be5
--- /dev/null
+++ b/templates/report.html
@@ -0,0 +1,267 @@
+{{template "base.html" .}}
+
+{{define "title"}}Login{{end}}
+{{define "style"}}
+ .entry-container {
+ max-width: 1000px;
+ margin: 0 auto;
+ }
+ .entry-box {
+ box-shadow: 0 0 15px rgba(0,0,0,0.1);
+ border-radius: 10px;
+ padding: 40px;
+ background-color: #fff;
+ margin-bottom: 30px;
+ }
+ .entry-header {
+ margin-bottom: 25px;
+ text-align: center;
+ }
+ .logo-area {
+ text-align: center;
+ margin-bottom: 30px;
+ }
+ .logo-placeholder {
+ width: 120px;
+ height: 60px;
+ background-color: #e9ecef;
+ margin: 0 auto;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 6px;
+ }
+ .method-section {
+ margin-bottom: 40px;
+ padding: 25px;
+ border-radius: 10px;
+ background-color: #f8f9fa;
+ }
+ .method-title {
+ margin-bottom: 20px;
+ display: flex;
+ align-items: center;
+ }
+ .method-title i {
+ font-size: 1.5rem;
+ margin-right: 10px;
+ }
+ .sms-mockup {
+ max-width: 300px;
+ background-color: #dcf8c6;
+ border-radius: 15px;
+ padding: 15px;
+ position: relative;
+ margin: 20px auto;
+ }
+ .qr-code-placeholder {
+ width: 200px;
+ height: 200px;
+ background-color: #e9ecef;
+ margin: 20px auto;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ border: 1px dashed #ced4da;
+ }
+ .email-mockup {
+ max-width: 550px;
+ background-color: white;
+ border: 1px solid #ddd;
+ border-radius: 10px;
+ padding: 20px;
+ margin: 20px auto;
+ }
+ .email-header {
+ border-bottom: 1px solid #eee;
+ padding-bottom: 10px;
+ margin-bottom: 15px;
+ }
+ .door-hanger {
+ max-width: 300px;
+ background-color: #fff;
+ border: 2px solid #dc3545;
+ border-radius: 10px;
+ padding: 15px;
+ position: relative;
+ margin: 20px auto;
+ text-align: center;
+ }
+ .door-hanger:before {
+ content: "";
+ position: absolute;
+ top: -25px;
+ left: 50%;
+ transform: translateX(-50%);
+ width: 40px;
+ height: 25px;
+ background-color: #fff;
+ border: 2px solid #dc3545;
+ border-bottom: none;
+ border-radius: 20px 20px 0 0;
+ }
+{{end}}
+{{define "content"}}
+
Entry Points Diagnostic Page
+Customers will receive the following text message with a link to begin the reporting process:
+ +SMS Details:
+Inspectors will leave door hangers with a QR code for properties where no one is home:
+ +We visited regarding a potential mosquito breeding site.
+ +Scan this code with your phone camera to report your pool status or schedule an inspection.
+Or visit: greenpool.county.gov/report
+Door Hanger Details:
+Property owners will receive this email as a follow-up to other communication attempts:
+ +Dear Property Owner,
+ +Our recent surveillance has identified a potential unmaintained swimming pool at your property located at 123 Main Street. Untreated pools can become mosquito breeding grounds and pose public health risks, including the spread of West Nile virus and other diseases.
+ + + +Please click the button above or visit https://greenpool.county.gov/report/em29x7 to complete a brief questionnaire about your pool status. This will help us determine if an inspection is needed or if you've already addressed the issue.
+ +Thank you for helping keep our community safe and healthy.
+ +Sincerely,
+ Vector Control Department
+ County Health Services
Email Details:
+