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 {
|
if up.Condition != nil {
|
||||||
var condition enums.Poolconditiontype
|
var condition enums.Poolconditiontype
|
||||||
err := condition.Scan(up.Condition)
|
err := condition.Scan(*up.Condition)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nhttp.NewErrorStatus(http.StatusBadRequest, "unrecognized condition %s", up.Condition)
|
return nhttp.NewErrorStatus(http.StatusBadRequest, "unrecognized condition %s", up.Condition)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
// Form fields for the selected task
|
// Form fields for the selected task
|
||||||
form: {
|
form: {
|
||||||
poolCondition: "",
|
condition: "",
|
||||||
poolShape: "",
|
poolShape: "",
|
||||||
poolLocation: {
|
poolLocation: {
|
||||||
latitude: 0,
|
latitude: 0,
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
const fields = [
|
const fields = [
|
||||||
{ key: "latitude", label: "Latitude" },
|
{ key: "latitude", label: "Latitude" },
|
||||||
{ key: "longitude", label: "Longitude" },
|
{ key: "longitude", label: "Longitude" },
|
||||||
{ key: "poolCondition", label: "Pool condition" },
|
{ key: "condition", label: "Pool condition" },
|
||||||
{ key: "ownerContact", label: "Owner contact" },
|
{ key: "ownerContact", label: "Owner contact" },
|
||||||
{ key: "residentContact", label: "Resident contact" },
|
{ key: "residentContact", label: "Resident contact" },
|
||||||
{ key: "poolShape", label: "Pool shape" },
|
{ key: "poolShape", label: "Pool shape" },
|
||||||
|
|
@ -130,7 +130,7 @@
|
||||||
this.form = {
|
this.form = {
|
||||||
latitude: task.location.latitude,
|
latitude: task.location.latitude,
|
||||||
longitude: task.location.longitude,
|
longitude: task.location.longitude,
|
||||||
poolCondition: task.condition || "",
|
condition: task.condition || "",
|
||||||
ownerContact: task.ownerContact || "",
|
ownerContact: task.ownerContact || "",
|
||||||
residentContact: task.residentContact || "",
|
residentContact: task.residentContact || "",
|
||||||
poolShape: task.poolShape || "",
|
poolShape: task.poolShape || "",
|
||||||
|
|
@ -247,7 +247,7 @@
|
||||||
} else {
|
} else {
|
||||||
this.selectedTask = null;
|
this.selectedTask = null;
|
||||||
this.form = {
|
this.form = {
|
||||||
poolCondition: "",
|
condition: "",
|
||||||
ownerContact: "",
|
ownerContact: "",
|
||||||
residentContact: "",
|
residentContact: "",
|
||||||
poolShape: "",
|
poolShape: "",
|
||||||
|
|
@ -469,8 +469,8 @@
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<select
|
<select
|
||||||
class="form-select"
|
class="form-select"
|
||||||
x-model="form.poolCondition"
|
x-model="form.condition"
|
||||||
:class="{ 'border-warning': form.poolCondition !== originalValues.poolCondition }"
|
:class="{ 'border-warning': form.condition !== originalValues.condition }"
|
||||||
>
|
>
|
||||||
<option value="">-- Select --</option>
|
<option value="">-- Select --</option>
|
||||||
<option value="blue">Blue</option>
|
<option value="blue">Blue</option>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue