From f81f8def1c6dc714fae5cf15aa3f8f62a05d8935 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Sun, 8 Feb 2026 03:47:48 +0000 Subject: [PATCH] Move data entry good mock to be part of upload flow --- html/template/sync/data-entry-good.html | 243 ------------------------ sync/mock.go | 1 - sync/pool.go | 12 ++ sync/routes.go | 2 +- 4 files changed, 13 insertions(+), 245 deletions(-) delete mode 100644 html/template/sync/data-entry-good.html diff --git a/html/template/sync/data-entry-good.html b/html/template/sync/data-entry-good.html deleted file mode 100644 index 823ef123..00000000 --- a/html/template/sync/data-entry-good.html +++ /dev/null @@ -1,243 +0,0 @@ -{{ template "sync/layout/base.html" . }} - -{{ define "title" }}Data Entry{{ end }} -{{ define "extraheader" }} - -{{ end }} -{{ define "content" }} -
-
-

Upload Results: pools-data-2023.csv

- - File Parsed Successfully - -
- -
-
-
-
-

45

-
Existing Pools
-

Matches found in previous records

-
-
-
-
-
-
-

23

-
New Pools
-

Not found in existing records

-
-
-
-
-
-
-

4

-
Outside District
-

Potential geocoding errors

-
-
-
-
- -
-
-
Data Preview
-
- - -
-
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Plat IDLatitudeLongitudeStreet AddressStatusIn District
P1234537.7749-122.4194123 Main St, Anytown, CA - Existing - - Yes -
P2345637.3352-121.8811456 Oak Ave, Someville, CA - Existing - - Yes -
P3456738.5816-121.4944789 Pine Rd, Outtown, CANew - - No - Outside northern boundary -
P4567837.4419-122.1430101 Elm St, Cityville, CANew - Yes -
P5678937.3541-121.9552202 Maple Dr, Townburg, CA - Existing - - Yes -
P6789035.3733-119.0187303 Cedar Ln, Farville, CANew - - No - Outside southern boundary -
P7890137.8044-122.2712404 Birch Ave, Metroburg, CA - Existing - - Yes -
P8901237.4032-123.9612505 Walnut St, Edgetown, CANew - - No - Outside western boundary -
-
- - -
-
- -
-
-
Notes & Recommendations
-
-
-
-

Issues detected:

-
    -
  • - 4 pools appear to be outside district boundaries (possible - geocoding errors) -
  • -
  • All required fields are present and properly formatted
  • -
-
- - -
-
- -
- - Upload Edited File - - -
-
-{{ end }} diff --git a/sync/mock.go b/sync/mock.go index a70b4313..f5c5d1d1 100644 --- a/sync/mock.go +++ b/sync/mock.go @@ -16,7 +16,6 @@ import ( /* admin = buildTemplate("admin", "base") dataEntry = buildTemplate("data-entry", "base") - dataEntryGood = buildTemplate("data-entry-good", "base") dataEntryBad = buildTemplate("data-entry-bad", "base") dispatch = buildTemplate("dispatch", "base") dispatchResults = buildTemplate("dispatch-results", "base") diff --git a/sync/pool.go b/sync/pool.go index 03b4c2bc..36411851 100644 --- a/sync/pool.go +++ b/sync/pool.go @@ -44,6 +44,18 @@ func getPoolUpload(w http.ResponseWriter, r *http.Request, u *models.User) { } html.RenderOrError(w, "sync/pool-csv-upload.html", data) } +func getPoolUploadByID(w http.ResponseWriter, r *http.Request, u *models.User) { + userContent, err := contentForUser(r.Context(), u) + if err != nil { + respondError(w, "Failed to get user", err, http.StatusInternalServerError) + return + } + data := ContentPoolUpload{ + URL: newContentURL(), + User: userContent, + } + html.RenderOrError(w, "sync/pool-by-id.html", data) +} func postPoolUpload(w http.ResponseWriter, r *http.Request, u *models.User) { err := r.ParseMultipartForm(32 << 10) // 32 MB buffer if err != nil { diff --git a/sync/routes.go b/sync/routes.go index e5f069cc..29f39460 100644 --- a/sync/routes.go +++ b/sync/routes.go @@ -22,7 +22,6 @@ func Router() chi.Router { r.Get("/mock/admin/service-request", renderMock("admin-service-request.html")) r.Get("/mock/data-entry", renderMock("data-entry.html")) r.Get("/mock/data-entry/bad", renderMock("data-entry-bad.html")) - r.Get("/mock/data-entry/good", renderMock("data-entry-good.html")) r.Get("/mock/dispatch", renderMock("dispatch.html")) r.Get("/mock/dispatch-results", renderMock("dispatch-results.html")) r.Get("/mock/report", renderMock("report.html")) @@ -64,6 +63,7 @@ func Router() chi.Router { r.Method("GET", "/layout-test", auth.NewEnsureAuth(getLayoutTest)) r.Method("GET", "/pool", auth.NewEnsureAuth(getPoolList)) r.Method("GET", "/pool/upload", auth.NewEnsureAuth(getPoolUpload)) + r.Method("GET", "/pool/upload/{id}", auth.NewEnsureAuth(getPoolUploadByID)) r.Method("POST", "/pool/upload", auth.NewEnsureAuth(postPoolUpload)) r.Method("GET", "/settings", auth.NewEnsureAuth(getSettings)) r.Method("GET", "/signout", auth.NewEnsureAuth(getSignout))