Make it possible to save the pool condition
This commit is contained in:
parent
f1c21a6fba
commit
20025333fa
2 changed files with 7 additions and 7 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 @@
|
|||
<div class="col-sm-9">
|
||||
<select
|
||||
class="form-select"
|
||||
x-model="form.poolCondition"
|
||||
:class="{ 'border-warning': form.poolCondition !== originalValues.poolCondition }"
|
||||
x-model="form.condition"
|
||||
:class="{ 'border-warning': form.condition !== originalValues.condition }"
|
||||
>
|
||||
<option value="">-- Select --</option>
|
||||
<option value="blue">Blue</option>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue