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"}} + + +
+
+
+
+

Green Pool Reporting

+

Entry Points Diagnostic Page

+
+ +
+ + This page demonstrates the various ways customers can access the Green Pool Reporting system. +
+ + +
+
+ +

Text Message Entry Point

+
+ +

Customers will receive the following text message with a link to begin the reporting process:

+ +
+ Vector Control: We noticed a potential green pool at your property. Please tap the link to report status or schedule inspection: https://greenpool.county.gov/report/t78fd3 +
+ +
+

SMS Details:

+
    +
  • Sent via automated system after aerial detection
  • +
  • Contains unique tracking link for each property
  • +
  • Customers tap link to open mobile browser
  • +
+
+
+ + +
+
+ +

Door Hanger QR Code Entry Point

+
+ +

Inspectors will leave door hangers with a QR code for properties where no one is home:

+ +
+
IMPORTANT NOTICE
+

We visited regarding a potential mosquito breeding site.

+ +
+ QR Code Image +
+ +

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:

+
    +
  • Physical notices left on the door handle
  • +
  • QR code contains property-specific link
  • +
  • Fallback URL provided for manual entry
  • +
+
+
+ + +
+
+ +

Email Notification Entry Point

+
+ +

Property owners will receive this email as a follow-up to other communication attempts:

+ + + +
+

Email Details:

+
    +
  • Sent as follow-up or for property owners with registered email addresses
  • +
  • Contains clear call-to-action button and alternative text link
  • +
  • Explains reason for contact and next steps
  • +
+
+
+ + +
+
+
+{{end}}