diff --git a/endpoint.go b/endpoint.go index c490a92a..4136deb9 100644 --- a/endpoint.go +++ b/endpoint.go @@ -66,19 +66,6 @@ func getOAuthRefresh(w http.ResponseWriter, r *http.Request) { htmlOauthPrompt(w, user) } -func getPhoneCall(w http.ResponseWriter, r *http.Request) { - htmlPhoneCall(w) -} - -func getDataEntry(w http.ResponseWriter, r *http.Request) { - htmlDataEntry(w) -} -func getDataEntryBad(w http.ResponseWriter, r *http.Request) { - htmlDataEntryBad(w) -} -func getDataEntryGood(w http.ResponseWriter, r *http.Request) { - htmlDataEntryGood(w) -} func getQRCodeReport(w http.ResponseWriter, r *http.Request) { code := chi.URLParam(r, "code") if code == "" { @@ -138,40 +125,6 @@ func getQRCodeReport(w http.ResponseWriter, r *http.Request) { respondError(w, "Error writing response", err, http.StatusInternalServerError) } } -func getReport(w http.ResponseWriter, r *http.Request) { - //org := r.URL.Query().Get("org") - htmlReport(w) -} - -func getReportConfirmation(w http.ResponseWriter, r *http.Request) { - code := chi.URLParam(r, "code") - htmlReportConfirmation(w, code) -} - -func getReportContribute(w http.ResponseWriter, r *http.Request) { - code := chi.URLParam(r, "code") - htmlReportContribute(w, code) -} - -func getReportDetail(w http.ResponseWriter, r *http.Request) { - code := chi.URLParam(r, "code") - htmlReportDetail(w, code) -} - -func getReportEvidence(w http.ResponseWriter, r *http.Request) { - code := chi.URLParam(r, "code") - htmlReportEvidence(w, code) -} - -func getReportSchedule(w http.ResponseWriter, r *http.Request) { - code := chi.URLParam(r, "code") - htmlReportSchedule(w, code) -} - -func getReportUpdate(w http.ResponseWriter, r *http.Request) { - code := chi.URLParam(r, "code") - htmlReportUpdate(w, code) -} func getRoot(w http.ResponseWriter, r *http.Request) { user, err := getAuthenticatedUser(r) @@ -202,39 +155,6 @@ func getRoot(w http.ResponseWriter, r *http.Request) { } } -func getServiceRequest(w http.ResponseWriter, r *http.Request) { - htmlServiceRequest(w) -} - -func getServiceRequestDetail(w http.ResponseWriter, r *http.Request) { - code := chi.URLParam(r, "code") - htmlServiceRequestDetail(w, code) -} - -func getServiceRequestLocation(w http.ResponseWriter, r *http.Request) { - htmlServiceRequestLocation(w) -} - -func getServiceRequestMosquito(w http.ResponseWriter, r *http.Request) { - htmlServiceRequestMosquito(w) -} - -func getServiceRequestPool(w http.ResponseWriter, r *http.Request) { - htmlServiceRequestPool(w) -} - -func getServiceRequestQuick(w http.ResponseWriter, r *http.Request) { - htmlServiceRequestQuick(w) -} - -func getServiceRequestQuickConfirmation(w http.ResponseWriter, r *http.Request) { - htmlServiceRequestQuickConfirmation(w) -} - -func getServiceRequestUpdates(w http.ResponseWriter, r *http.Request) { - htmlServiceRequestUpdates(w) -} - func getSettings(w http.ResponseWriter, r *http.Request, u *models.User) { htmlSettings(w, r, u) } @@ -326,3 +246,13 @@ func postSignup(w http.ResponseWriter, r *http.Request) { http.Redirect(w, r, "/", http.StatusFound) } + +func renderMock(templateName string) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + code := chi.URLParam(r, "code") + if code == "" { + code = "abc-123" + } + htmlMock(templateName, w, code) + } +} diff --git a/html.go b/html.go index f91a22a9..35db1201 100644 --- a/html.go +++ b/html.go @@ -8,7 +8,6 @@ import ( "fmt" "html/template" "io" - "log/slog" "math" "net/http" "os" @@ -41,10 +40,13 @@ var ( // Unauthenticated pages var ( + admin = newBuiltTemplate("admin", "base") dataEntry = newBuiltTemplate("data-entry", "base") dataEntryGood = newBuiltTemplate("data-entry-good", "base") dataEntryBad = newBuiltTemplate("data-entry-bad", "base") - phoneCall = newBuiltTemplate("phone-call", "base") + dispatch = newBuiltTemplate("dispatch", "base") + dispatchResults = newBuiltTemplate("dispatch-results", "base") + mockRoot = newBuiltTemplate("mock-root", "base") report = newBuiltTemplate("report", "base") reportConfirmation = newBuiltTemplate("report-confirmation", "base") reportContribute = newBuiltTemplate("report-contribute", "base") @@ -64,6 +66,7 @@ var ( signup = newBuiltTemplate("signup", "base") ) var components = [...]string{"header", "map"} +var templatesByFilename = make(map[string]BuiltTemplate, 0) type BreedingSourceSummary struct { ID string @@ -99,15 +102,26 @@ type ContentCell struct { Treatments []Treatment User User } -type ContentPhoneCall struct { +type ContentMockURLs struct { + Dispatch string + DispatchResults string + ReportConfirmation string + ReportDetail string + ReportContribute string + ReportEvidence string + ReportSchedule string + ReportUpdate string + Root string +} +type ContentMock struct { DistrictName string + URLs ContentMockURLs } type ContentReportDetail struct { NextURL string UpdateURL string } type ContentReportDiagnostic struct { - URL string } type ContentDashboard struct { CountInspections int @@ -279,21 +293,6 @@ func htmlCell(ctx context.Context, w http.ResponseWriter, user *models.User, c i renderOrError(w, cell, &data) } -func htmlDataEntry(w http.ResponseWriter) { - data := ContentPlaceholder{} - renderOrError(w, dataEntry, data) -} - -func htmlDataEntryBad(w http.ResponseWriter) { - data := ContentPlaceholder{} - renderOrError(w, dataEntryBad, data) -} - -func htmlDataEntryGood(w http.ResponseWriter) { - data := ContentPlaceholder{} - renderOrError(w, dataEntryGood, data) -} - func htmlDashboard(ctx context.Context, w http.ResponseWriter, user *models.User) { org, err := user.Organization().One(ctx, db.PGInstance.BobDB) if err != nil { @@ -355,6 +354,30 @@ func htmlDashboard(ctx context.Context, w http.ResponseWriter, user *models.User renderOrError(w, dashboard, data) } +func htmlMock(t string, w http.ResponseWriter, code string) { + data := ContentMock{ + DistrictName: "Delta MVCD", + URLs: ContentMockURLs{ + Dispatch: "/mock/dispatch", + DispatchResults: "/mock/dispatch-results", + ReportConfirmation: fmt.Sprintf("/mock/report/%s/confirm", code), + ReportDetail: fmt.Sprintf("/mock/report/%s", code), + ReportContribute: fmt.Sprintf("/mock/report/%s/contribute", code), + ReportEvidence: fmt.Sprintf("/mock/report/%s/evidence", code), + ReportSchedule: fmt.Sprintf("/mock/report/%s/schedule", code), + ReportUpdate: fmt.Sprintf("/mock/report/%s/update", code), + Root: "/mock", + }, + } + template, ok := templatesByFilename[t] + if !ok { + log.Error().Str("template", t).Msg("Failed to find template") + respondError(w, "Failed to render template", nil, http.StatusInternalServerError) + return + } + renderOrError(w, &template, data) +} + func htmlOauthPrompt(w http.ResponseWriter, user *models.User) { dp := user.DisplayName data := ContentDashboard{ @@ -367,110 +390,6 @@ func htmlOauthPrompt(w http.ResponseWriter, user *models.User) { renderOrError(w, oauthPrompt, data) } -func htmlPhoneCall(w http.ResponseWriter) { - data := ContentPhoneCall{ - DistrictName: "[District Name]", - } - renderOrError(w, phoneCall, data) -} - -func htmlReport(w http.ResponseWriter) { - url := BaseURL + "/report/t78fd3" - data := ContentReportDiagnostic{ - URL: url, - } - renderOrError(w, report, data) -} - -func htmlReportConfirmation(w http.ResponseWriter, code string) { - url := BaseURL + "/report/" + code + "/history" - data := ContentReportDiagnostic{ - URL: url, - } - renderOrError(w, reportConfirmation, data) -} - -func htmlReportContribute(w http.ResponseWriter, code string) { - nextURL := BaseURL + "/report/" + code + "/schedule" - data := ContentReportDetail{ - NextURL: nextURL, - } - renderOrError(w, reportContribute, data) -} - -func htmlReportDetail(w http.ResponseWriter, code string) { - nextURL := BaseURL + "/report/" + code + "/evidence" - data := ContentReportDetail{ - NextURL: nextURL, - UpdateURL: BaseURL + "/report/" + code + "/update", - } - renderOrError(w, reportDetail, data) -} - -func htmlReportEvidence(w http.ResponseWriter, code string) { - nextURL := BaseURL + "/report/" + code + "/contribute" - data := ContentReportDetail{ - NextURL: nextURL, - } - renderOrError(w, reportEvidence, data) -} - -func htmlReportSchedule(w http.ResponseWriter, code string) { - nextURL := BaseURL + "/report/" + code + "/confirm" - data := ContentReportDetail{ - NextURL: nextURL, - } - renderOrError(w, reportSchedule, data) -} - -func htmlReportUpdate(w http.ResponseWriter, code string) { - nextURL := BaseURL + "/report/" + code + "/evidence" - data := ContentReportDetail{ - NextURL: nextURL, - } - renderOrError(w, reportUpdate, data) -} - -func htmlServiceRequest(w http.ResponseWriter) { - data := ContentPlaceholder{} - renderOrError(w, serviceRequest, data) -} - -func htmlServiceRequestDetail(w http.ResponseWriter, code string) { - data := ContentPlaceholder{} - renderOrError(w, serviceRequestDetail, data) -} - -func htmlServiceRequestLocation(w http.ResponseWriter) { - data := ContentPlaceholder{} - renderOrError(w, serviceRequestLocation, data) -} - -func htmlServiceRequestMosquito(w http.ResponseWriter) { - data := ContentPlaceholder{} - renderOrError(w, serviceRequestMosquito, data) -} - -func htmlServiceRequestPool(w http.ResponseWriter) { - data := ContentPlaceholder{} - renderOrError(w, serviceRequestPool, data) -} - -func htmlServiceRequestQuick(w http.ResponseWriter) { - data := ContentPlaceholder{} - renderOrError(w, serviceRequestQuick, data) -} - -func htmlServiceRequestQuickConfirmation(w http.ResponseWriter) { - data := ContentPlaceholder{} - renderOrError(w, serviceRequestQuickConfirmation, data) -} - -func htmlServiceRequestUpdates(w http.ResponseWriter) { - data := ContentPlaceholder{} - renderOrError(w, serviceRequestUpdates, data) -} - func htmlSettings(w http.ResponseWriter, r *http.Request, user *models.User) { userContent, err := contentForUser(r.Context(), user) if err != nil { @@ -596,7 +515,7 @@ func makeFuncMap() template.FuncMap { } return funcMap } -func newBuiltTemplate(name string, files ...string) BuiltTemplate { +func newBuiltTemplate(name string, files ...string) *BuiltTemplate { files_on_disk := true all_files := append([]string{name}, files...) for _, f := range all_files { @@ -607,18 +526,22 @@ func newBuiltTemplate(name string, files ...string) BuiltTemplate { break } } + var result BuiltTemplate if files_on_disk { - return BuiltTemplate{ + result = BuiltTemplate{ files: all_files, name: name, template: nil, } + } else { + result = BuiltTemplate{ + files: all_files, + name: name, + template: parseEmbedded(all_files), + } } - return BuiltTemplate{ - files: all_files, - name: name, - template: parseEmbedded(all_files), - } + templatesByFilename[name] = result + return &result } func parseEmbedded(files []string) *template.Template { @@ -867,11 +790,11 @@ func trapsBySource(ctx context.Context, org *models.Organization, sourceID strin return traps, nil } -func renderOrError(w http.ResponseWriter, template BuiltTemplate, context interface{}) { +func renderOrError(w http.ResponseWriter, template *BuiltTemplate, context interface{}) { buf := &bytes.Buffer{} err := template.ExecuteTemplate(buf, context) if err != nil { - slog.Error("Failed to render template", slog.String("err", err.Error()), slog.String("template", template.name)) + log.Error().Err(err).Str("template", template.name).Msg("Failed to render template") respondError(w, "Failed to render template", err, http.StatusInternalServerError) return } diff --git a/main.go b/main.go index 1929e567..42a7a923 100644 --- a/main.go +++ b/main.go @@ -94,29 +94,33 @@ func main() { r.Get("/arcgis/oauth/callback", getArcgisOauthCallback) r.Get("/favicon.ico", getFavicon) - r.Get("/mock/data-entry", getDataEntry) - r.Get("/mock/data-entry/bad", getDataEntryBad) - r.Get("/mock/data-entry/good", getDataEntryGood) + r.Get("/mock", renderMock("mock-root")) + r.Get("/mock/admin", renderMock("admin")) + r.Get("/mock/admin/service-request", renderMock("admin-service-request")) + r.Get("/mock/data-entry", renderMock("data-entry")) + r.Get("/mock/data-entry/bad", renderMock("data-entry-bad")) + r.Get("/mock/data-entry/good", renderMock("data-entry-good")) + r.Get("/mock/dispatch", renderMock("dispatch")) + r.Get("/mock/dispatch-results", renderMock("dispatch-results")) + r.Get("/mock/report", renderMock("report")) + r.Get("/mock/report/{code}", renderMock("report-detail")) + r.Get("/mock/report/{code}/confirm", renderMock("report-confirmation")) + r.Get("/mock/report/{code}/contribute", renderMock("report-contribute")) + r.Get("/mock/report/{code}/evidence", renderMock("report-evidence")) + r.Get("/mock/report/{code}/schedule", renderMock("report-schedule")) + r.Get("/mock/report/{code}/update", renderMock("report-update")) + r.Get("/mock/service-request", renderMock("service-request")) + r.Get("/mock/service-request/{code}", renderMock("service-request-detail")) + r.Get("/mock/service-request-location", renderMock("service-request-location")) + r.Get("/mock/service-request-mosquito", renderMock("service-request-mosquito")) + r.Get("/mock/service-request-pool", renderMock("service-request-pool")) + r.Get("/mock/service-request-quick", renderMock("service-request-quick")) + r.Get("/mock/service-request-quick-confirmation", renderMock("service-request-quick-confirmation")) + r.Get("/mock/service-request-updates", renderMock("service-request-updates")) r.Get("/oauth/refresh", getOAuthRefresh) - r.Get("/phone-call", getPhoneCall) r.Get("/qr-code/report/{code}", getQRCodeReport) - r.Get("/report", getReport) - r.Get("/report/{code}", getReportDetail) - r.Get("/report/{code}/confirm", getReportConfirmation) - r.Get("/report/{code}/contribute", getReportContribute) - r.Get("/report/{code}/evidence", getReportEvidence) - r.Get("/report/{code}/schedule", getReportSchedule) - r.Get("/report/{code}/update", getReportUpdate) - r.Get("/service-request", getServiceRequest) - r.Get("/service-request/{code}", getServiceRequestDetail) - r.Get("/service-request-location", getServiceRequestLocation) - r.Get("/service-request-mosquito", getServiceRequestMosquito) - r.Get("/service-request-pool", getServiceRequestPool) - r.Get("/service-request-quick", getServiceRequestQuick) - r.Get("/service-request-quick-confirmation", getServiceRequestQuickConfirmation) - r.Get("/service-request-updates", getServiceRequestUpdates) r.Get("/signin", getSignin) r.Post("/signin", postSignin) r.Get("/signup", getSignup) diff --git a/templates/phone-call.html b/templates/admin.html similarity index 99% rename from templates/phone-call.html rename to templates/admin.html index 70128dc2..5f9e17b2 100644 --- a/templates/phone-call.html +++ b/templates/admin.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Dash{{end}} -{{define "style"}} +{{define "extraheader"}} + {{end}} {{define "content"}} @@ -75,6 +77,7 @@ body { + @@ -117,7 +120,7 @@ body {
Mosquito Activity & Relief
- New Service Request + New Service Request
diff --git a/templates/base.html b/templates/base.html index 929c13f6..f1304fbb 100644 --- a/templates/base.html +++ b/templates/base.html @@ -10,12 +10,7 @@ - - + {{block "extraheader" .}} {{end}} {{template "content" .}} diff --git a/templates/data-entry-bad.html b/templates/data-entry-bad.html index 6cf685b8..271c9a43 100644 --- a/templates/data-entry-bad.html +++ b/templates/data-entry-bad.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Data Entry{{end}} -{{define "style"}} +{{define "extraheader"}} + {{end}} {{define "content"}}
diff --git a/templates/data-entry-good.html b/templates/data-entry-good.html index c1c4d5a2..52329322 100644 --- a/templates/data-entry-good.html +++ b/templates/data-entry-good.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Data Entry{{end}} -{{define "style"}} +{{define "extraheader"}} + {{end}} {{define "content"}}
diff --git a/templates/data-entry.html b/templates/data-entry.html index 26d3550b..48432b72 100644 --- a/templates/data-entry.html +++ b/templates/data-entry.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Data Entry{{end}} -{{define "style"}} +{{define "extraheader"}} + {{end}} {{define "content"}}
diff --git a/templates/dispatch-results.html b/templates/dispatch-results.html new file mode 100644 index 00000000..f9189ee4 --- /dev/null +++ b/templates/dispatch-results.html @@ -0,0 +1,260 @@ +{{template "base.html" .}} + +{{define "title"}}Data Entry{{end}} +{{define "extraheader"}} + + +{{end}} +{{define "content"}} +
+

Route Calculation Results

+ + Edit Parameters + +
+ + +
+
+

Route Map

+
+
+
+
+ +

Interactive Map View

+

Routes are color-coded by technician assignment

+
+
+
+
+ + +
+
+ +
+

Coverage Projection

+

If every day were like today, all pools would be complete on October 27, 2023

+
+
+
+ + +
+
+

Route Summary

+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SelectRouteTechnicianCold Call PoolsDrone InspectionsService CallsWarrantsEst. TimeActions
+
+ +
+
+
A
+
+
+ John Davis + John Davis +
+
120526h 15m + +
+
+ +
+
+
B
+
+
+ Sarah Johnson + Sarah Johnson +
+
83417h 30m + +
+
+ +
+
+
C
+
+
+ Michael Chen + Michael Chen +
+
104307h 45m + +
+
+ +
+
+
D
+
+
+ Jessica Martinez + Jessica Martinez +
+
142638h 00m + +
+
+
+
+ + + +
+ + + +{{end}} diff --git a/templates/dispatch.html b/templates/dispatch.html new file mode 100644 index 00000000..75053f86 --- /dev/null +++ b/templates/dispatch.html @@ -0,0 +1,172 @@ +{{template "base.html" .}} + +{{define "title"}}Data Entry{{end}} +{{define "extraheader"}} + +{{end}} +{{define "content"}} +
+

Technician Routing & Dispatch

+ +
+
+

Technician Roster

+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TechnicianWorking HoursTruck AssignmentWarrant ServiceDrone CertifiedRouting Options
+
+ John Davis +
+
John Davis
+
ID: T-1001
+
+
+
7:00 AM - 3:30 PMTruck #103YesNo +
+ + +
+
+ + +
+
+ + +
+
+
+ Sarah Johnson +
+
Sarah Johnson
+
ID: T-1042
+
+
+
8:00 AM - 4:30 PMTruck #118YesYes +
+ + +
+
+ + +
+
+ + +
+
+
+ Michael Chen +
+
Michael Chen
+
ID: T-1019
+
+
+
6:30 AM - 3:00 PMTruck #107NoYes +
+ + +
+
+ + +
+
+ + +
+
+
+ Jessica Martinez +
+
Jessica Martinez
+
ID: T-1055
+
+
+
7:30 AM - 4:00 PMTruck #112YesYes +
+ + +
+
+ + +
+
+ + +
+
+
+
+
+ + +
+{{end}} diff --git a/templates/empty.html b/templates/empty.html index dde29a29..b419f57d 100644 --- a/templates/empty.html +++ b/templates/empty.html @@ -1,7 +1,7 @@ {{template "base.html" .}} {{define "title"}}Dash{{end}} -{{define "style"}} +{{define "extraheader"}} {{end}} {{define "content"}} {{end}} diff --git a/templates/mock-root.html b/templates/mock-root.html new file mode 100644 index 00000000..47d50d2a --- /dev/null +++ b/templates/mock-root.html @@ -0,0 +1,51 @@ +{{template "base.html" .}} + +{{define "title"}}Data Entry{{end}} +{{define "extraheader"}} +{{end}} +{{define "content"}} +
+

Mock Listing

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
LinkNameDescription
/mock/adminAdminUsed by office admins to handle phone calls and other public-facing responsibilities
/mock/flyover-data-entryFlyover Data EntryUsed to upload CSV files with information about problematic pools
/mock/dispatchDispatchUsed each day to calculate the working routes for technicians
/mock/reportReporting OverviewShows examples of text message contents, printable QR codes, and email bodies for sending to the public to help them self-report
/mock/report/abc-123Self-ReportA page for members of the public to report a green pool.
/mock/service-requestService RequestA page for members of the public to make a direct service request
+
+{{end}} diff --git a/templates/oauth-prompt.html b/templates/oauth-prompt.html index 17ea22d4..f57f32ca 100644 --- a/templates/oauth-prompt.html +++ b/templates/oauth-prompt.html @@ -1,7 +1,8 @@ {{template "authenticated.html" .}} {{define "title"}}Dash{{end}} -{{define "style"}} +{{define "extraheader"}} + {{end}} {{define "content"}}
diff --git a/templates/report-confirmation.html b/templates/report-confirmation.html index b7cf2808..1f089b1b 100644 --- a/templates/report-confirmation.html +++ b/templates/report-confirmation.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Login{{end}} -{{define "style"}} +{{define "extraheader"}} + {{end}} {{define "content"}}
diff --git a/templates/report-contribute.html b/templates/report-contribute.html index 363a868a..afcf31c9 100644 --- a/templates/report-contribute.html +++ b/templates/report-contribute.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Login{{end}} -{{define "style"}} +{{define "extraheader"}} + {{end}} {{define "content"}}
@@ -220,10 +222,10 @@ diff --git a/templates/report-detail.html b/templates/report-detail.html index e863cc95..54354538 100644 --- a/templates/report-detail.html +++ b/templates/report-detail.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Login{{end}} -{{define "style"}} +{{define "extraheader"}} + {{end}} {{define "content"}}
@@ -113,10 +115,10 @@ body { diff --git a/templates/report-evidence.html b/templates/report-evidence.html index 72e54cf8..619d17f4 100644 --- a/templates/report-evidence.html +++ b/templates/report-evidence.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Login{{end}} -{{define "style"}} +{{define "extraheader"}} + {{end}} {{define "content"}}
@@ -227,7 +229,7 @@ diff --git a/templates/report-schedule.html b/templates/report-schedule.html index e83dfca3..61e3324f 100644 --- a/templates/report-schedule.html +++ b/templates/report-schedule.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Login{{end}} -{{define "style"}} +{{define "extraheader"}} + {{end}} {{define "content"}}
@@ -298,10 +300,10 @@ diff --git a/templates/report-update.html b/templates/report-update.html index e5446f32..f7714674 100644 --- a/templates/report-update.html +++ b/templates/report-update.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Login{{end}} -{{define "style"}} +{{define "extraheader"}} + {{end}} {{define "content"}}
diff --git a/templates/report.html b/templates/report.html index 67cbdba4..99f3d410 100644 --- a/templates/report.html +++ b/templates/report.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Login{{end}} -{{define "style"}} +{{define "extraheader"}} + {{end}} {{define "content"}}
@@ -125,7 +127,7 @@

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: {{ .URL }} + Vector Control: We noticed a potential green pool at your property. Please tap the link to report status or schedule inspection: {{ .URLs.ReportDetail }}
@@ -154,7 +156,7 @@

Scan this code with your phone camera to report your pool status or schedule an inspection.

-

Or visit: {{ .URL }}

+

Or visit: {{ .URLs.ReportDetail }}

-

Please click the button above or visit {{ .URL }} 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.

+

Please click the button above or visit {{ .URLs.ReportDetail }} 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.

@@ -214,7 +216,7 @@
diff --git a/templates/service-request-detail.html b/templates/service-request-detail.html index 732a42ba..18ca9363 100644 --- a/templates/service-request-detail.html +++ b/templates/service-request-detail.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Dash{{end}} -{{define "style"}} +{{define "extraheader"}} + {{end}} {{define "content"}} diff --git a/templates/service-request-location.html b/templates/service-request-location.html index 42be3f7f..36814e95 100644 --- a/templates/service-request-location.html +++ b/templates/service-request-location.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Dash{{end}} -{{define "style"}} +{{define "extraheader"}} + {{end}} {{define "content"}} diff --git a/templates/service-request-mosquito.html b/templates/service-request-mosquito.html index 1e8eeddc..2a44adc0 100644 --- a/templates/service-request-mosquito.html +++ b/templates/service-request-mosquito.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Dash{{end}} -{{define "script"}} +{{define "extraheader"}} + + {{end}} {{define "content"}} diff --git a/templates/service-request-pool.html b/templates/service-request-pool.html index 00603199..432e3e1c 100644 --- a/templates/service-request-pool.html +++ b/templates/service-request-pool.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Dash{{end}} -{{define "script"}} +{{define "extraheader"}} + + {{end}} {{define "content"}} @@ -174,7 +176,7 @@ document.addEventListener('DOMContentLoaded', function() {
-

[District Name]

+

{{ .DistrictName }}

@@ -510,7 +512,7 @@ document.addEventListener('DOMContentLoaded', function() {
-

© 2023 [District Name] Mosquito Management District

+

© 2023 {{ .DistrictName }} Mosquito Management District

Contact: (555) 123-4567 | info@mosquitodistrict.gov

diff --git a/templates/service-request-quick-confirmation.html b/templates/service-request-quick-confirmation.html index babd7457..d9b14980 100644 --- a/templates/service-request-quick-confirmation.html +++ b/templates/service-request-quick-confirmation.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Dash{{end}} -{{define "style"}} +{{define "extraheader"}} + {{end}} {{define "content"}} diff --git a/templates/service-request-quick.html b/templates/service-request-quick.html index 7fdc075a..915035cd 100644 --- a/templates/service-request-quick.html +++ b/templates/service-request-quick.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Dash{{end}} -{{define "style"}} +{{define "extraheader"}} + {{end}} {{define "content"}} diff --git a/templates/service-request-updates.html b/templates/service-request-updates.html index 7356b82a..2762863f 100644 --- a/templates/service-request-updates.html +++ b/templates/service-request-updates.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Dash{{end}} -{{define "style"}} +{{define "extraheader"}} + {{end}} {{define "content"}} @@ -40,7 +42,7 @@
-

[District Name]

+

{{ .DistrictName }}

@@ -149,7 +151,7 @@
-

© 2023 [District Name] Mosquito Management District

+

© 2023 {{ .DistrictName }} Mosquito Management District

Contact: (555) 123-4567 | info@mosquitodistrict.gov

diff --git a/templates/service-request.html b/templates/service-request.html index dc1489d1..82821f74 100644 --- a/templates/service-request.html +++ b/templates/service-request.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Dash{{end}} -{{define "style"}} +{{define "extraheader"}} + {{end}} {{define "content"}} @@ -28,7 +30,7 @@
-

[District Name]

+

{{ .DistrictName }}

@@ -61,7 +63,7 @@

On the go?

- Make a Quick Report + Make a Quick Report

Report mosquito issues in under 60 seconds

@@ -84,7 +86,7 @@

Follow-up or Check Status

Check on a previous request or view current mosquito activity in your area.

- Get Updates + Get Updates
@@ -100,7 +102,7 @@

Report a Green Pool

Report stagnant water sources like abandoned pools that may breed mosquitoes.

- Report Source + Report Source
@@ -116,7 +118,7 @@

Report Mosquito Nuisance

Report areas with high adult mosquito activity causing discomfort or concern.

- Report Problem + Report Problem
@@ -133,7 +135,7 @@

Use our streamlined form to report mosquito issues in under 60 seconds

@@ -149,7 +151,7 @@
-

© 2023 [District Name] Mosquito Management District

+

© 2023 {{.DistrictName}}

Contact: (555) 123-4567 | info@mosquitodistrict.gov

diff --git a/templates/settings.html b/templates/settings.html index 37e484aa..fb7444a8 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -1,7 +1,7 @@ {{template "authenticated.html" .}} {{define "title"}}Dash{{end}} -{{define "style"}} +{{define "extraheader"}} {{end}} {{define "content"}}

Imagine settings here

diff --git a/templates/signin.html b/templates/signin.html index 3d85ef5a..7a042fb7 100644 --- a/templates/signin.html +++ b/templates/signin.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Login{{end}} -{{define "style"}} +{{define "extraheader"}} + {{end}} {{define "content"}}
diff --git a/templates/signup.html b/templates/signup.html index 0111243b..70b2d201 100644 --- a/templates/signup.html +++ b/templates/signup.html @@ -1,7 +1,8 @@ {{template "base.html" .}} {{define "title"}}Login{{end}} -{{define "style"}} +{{define "extraheader"}} + {{end}} {{define "content"}}