From 20025333fad828a4584f434dcf5ba217918fd74e Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Wed, 11 Mar 2026 23:59:50 +0000 Subject: [PATCH] Make it possible to save the pool condition --- api/review.go | 2 +- html/template/sync/review/pool.html | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/api/review.go b/api/review.go index 3188dc6c..23a2e673 100644 --- a/api/review.go +++ b/api/review.go @@ -91,7 +91,7 @@ func commitReviewPool(ctx context.Context, txn bob.Tx, user *models.User, req cr } if up.Condition != nil { var condition enums.Poolconditiontype - err := condition.Scan(up.Condition) + err := condition.Scan(*up.Condition) if err != nil { return nhttp.NewErrorStatus(http.StatusBadRequest, "unrecognized condition %s", up.Condition) } diff --git a/html/template/sync/review/pool.html b/html/template/sync/review/pool.html index c2475131..709c2a8e 100644 --- a/html/template/sync/review/pool.html +++ b/html/template/sync/review/pool.html @@ -36,7 +36,7 @@ // Form fields for the selected task form: { - poolCondition: "", + condition: "", poolShape: "", poolLocation: { latitude: 0, @@ -56,7 +56,7 @@ const fields = [ { key: "latitude", label: "Latitude" }, { key: "longitude", label: "Longitude" }, - { key: "poolCondition", label: "Pool condition" }, + { key: "condition", label: "Pool condition" }, { key: "ownerContact", label: "Owner contact" }, { key: "residentContact", label: "Resident contact" }, { key: "poolShape", label: "Pool shape" }, @@ -130,7 +130,7 @@ this.form = { latitude: task.location.latitude, longitude: task.location.longitude, - poolCondition: task.condition || "", + condition: task.condition || "", ownerContact: task.ownerContact || "", residentContact: task.residentContact || "", poolShape: task.poolShape || "", @@ -247,7 +247,7 @@ } else { this.selectedTask = null; this.form = { - poolCondition: "", + condition: "", ownerContact: "", residentContact: "", poolShape: "", @@ -469,8 +469,8 @@