浏览代码

Added Address Fields to property create pages.

master
George Williams 4 年前
父节点
当前提交
67cde91312

+ 133
- 8
src/components/property/commercial/createProperty/commercialCreate.vue 查看文件

@@ -108,17 +108,130 @@
108 108
                 />
109 109
               </div>
110 110
             </div>
111
-            <div class="row">
111
+            <div class="row my-3">
112
+              <br />
113
+            </div>
114
+            <div class="row my-3">
112 115
               <div class="col-md-12">
113
-                <label for="Property Description" style="font-family:'muli'">Description:</label>
114
-                <vue-editor v-model="property.description" :editor-toolbar="customToolbar" />
115
-                <br />
116
-                <p>
117
-                  * A listing fee of R380 including VAT is payable to list your Property on the
118
-                  Uni-Vate website
119
-                </p>
116
+                <div v-if="!property.streetNumber">
117
+                  <label for="streetNumber" class="uniSelectLabel">STREET NUMBER</label>
118
+                </div>
119
+                <input
120
+                  class="form-control uniInput"
121
+                  type="text"
122
+                  name="streetNumber"
123
+                  id="unit"
124
+                  v-model="property.streetNumber"
125
+                  disabled
126
+                />
120 127
               </div>
121 128
             </div>
129
+            <div class="row my-3">
130
+              <div class="col-md-12">
131
+                <div v-if="!property.streetName">
132
+                  <label for="streetName" class="uniSelectLabel">STREET NAME</label>
133
+                </div>
134
+                <input
135
+                  class="form-control uniInput"
136
+                  type="text"
137
+                  name="streetName"
138
+                  id="unit"
139
+                  v-model="property.streetName"
140
+                  disabled
141
+                />
142
+              </div>
143
+            </div>
144
+            <div class="row my-3">
145
+              <div class="col-md-12">
146
+                <div v-if="!property.suburb">
147
+                  <label for="suburb" class="uniSelectLabel">SUBURB</label>
148
+                </div>
149
+                <input
150
+                  class="form-control uniInput"
151
+                  type="text"
152
+                  name="suburb"
153
+                  id="unit"
154
+                  v-model="property.suburb"
155
+                  disabled
156
+                />
157
+              </div>
158
+            </div>
159
+            <div class="row my-3">
160
+              <div class="col-md-12">
161
+                <div v-if="!property.city">
162
+                  <label for="city" class="uniSelectLabel">CITY</label>
163
+                </div>
164
+                <input
165
+                  class="form-control uniInput"
166
+                  type="text"
167
+                  name="city"
168
+                  id="unit"
169
+                  v-model="property.city"
170
+                  disabled
171
+                />
172
+              </div>
173
+            </div>
174
+            <div class="row my-3">
175
+              <div class="col-md-12">
176
+                <div v-if="!property.province">
177
+                  <label for="province" class="uniSelectLabel">PROVINCE</label>
178
+                </div>
179
+                <input
180
+                  class="form-control uniInput"
181
+                  type="text"
182
+                  name="province"
183
+                  id="unit"
184
+                  v-model="property.province"
185
+                  disabled
186
+                />
187
+              </div>
188
+            </div>
189
+            <div class="row my-3">
190
+              <div class="col-md-12">
191
+                <div v-if="!property.postalCode">
192
+                  <label for="postalCode" class="uniSelectLabel">POSTAL CODE</label>
193
+                </div>
194
+                <input
195
+                  class="form-control uniInput"
196
+                  type="text"
197
+                  name="postalCode"
198
+                  id="unit"
199
+                  v-model="property.postalCode"
200
+                  disabled
201
+                />
202
+              </div>
203
+            </div>
204
+            <div class="row my-3">
205
+              <div class="col-md-12">
206
+                <div v-if="!property.country">
207
+                  <label for="country" class="uniSelectLabel">COUNTRY</label>
208
+                </div>
209
+                <input
210
+                  class="form-control uniInput"
211
+                  type="text"
212
+                  name="country"
213
+                  id="unit"
214
+                  v-model="property.country"
215
+                  disabled
216
+                />
217
+              </div>
218
+            </div>
219
+            <div class="row my-3">
220
+              <div class="col-md-12">
221
+                <button type="button" @click="clearAddress()" class="btn-solid-blue">Clear Address</button>
222
+              </div>
223
+            </div>
224
+          </div>
225
+        </div>
226
+        <div class="row">
227
+          <div class="col-md-12">
228
+            <label for="Property Description" style="font-family:'muli'">Description:</label>
229
+            <vue-editor v-model="property.description" :editor-toolbar="customToolbar" />
230
+            <br />
231
+            <p>
232
+              * A listing fee of R380 including VAT is payable to list your Property on the
233
+              Uni-Vate website
234
+            </p>
122 235
           </div>
123 236
         </div>
124 237
         <div class="row">
@@ -361,6 +474,18 @@ export default {
361 474
     UpdateDefaultImage(item) {
362 475
       this.defaultImage = item;
363 476
     },
477
+    clearAddress() {
478
+      this.addressSet = false;
479
+      this.property.streetNumber = undefined;
480
+      this.property.streetName = undefined;
481
+      this.property.suburb = undefined;
482
+      this.property.city = undefined;
483
+      this.property.province = undefined;
484
+      this.property.country = undefined;
485
+      this.property.postalCode = undefined;
486
+      this.property.addressUrl = undefined;
487
+      this.property.propertCoords = undefined;
488
+    },
364 489
   },
365 490
   mounted() {
366 491
     this.wait = false;

+ 133
- 8
src/components/property/residential/createProperty/residentialCreate.vue 查看文件

@@ -109,17 +109,130 @@
109 109
                 />
110 110
               </div>
111 111
             </div>
112
-            <div class="row">
112
+            <div class="row my-3">
113
+              <br />
114
+            </div>
115
+            <div class="row my-3">
113 116
               <div class="col-md-12">
114
-                <label for="Property Description" style="font-family:'muli'">Description:</label>
115
-                <vue-editor v-model="property.description" :editor-toolbar="customToolbar" />
116
-                <br />
117
-                <p>
118
-                  * A listing fee of R380 including VAT is payable to list your Property on the
119
-                  Uni-Vate website
120
-                </p>
117
+                <div v-if="!property.streetNumber">
118
+                  <label for="streetNumber" class="uniSelectLabel">STREET NUMBER</label>
119
+                </div>
120
+                <input
121
+                  class="form-control uniInput"
122
+                  type="text"
123
+                  name="streetNumber"
124
+                  id="unit"
125
+                  v-model="property.streetNumber"
126
+                  disabled
127
+                />
121 128
               </div>
122 129
             </div>
130
+            <div class="row my-3">
131
+              <div class="col-md-12">
132
+                <div v-if="!property.streetName">
133
+                  <label for="streetName" class="uniSelectLabel">STREET NAME</label>
134
+                </div>
135
+                <input
136
+                  class="form-control uniInput"
137
+                  type="text"
138
+                  name="streetName"
139
+                  id="unit"
140
+                  v-model="property.streetName"
141
+                  disabled
142
+                />
143
+              </div>
144
+            </div>
145
+            <div class="row my-3">
146
+              <div class="col-md-12">
147
+                <div v-if="!property.suburb">
148
+                  <label for="suburb" class="uniSelectLabel">SUBURB</label>
149
+                </div>
150
+                <input
151
+                  class="form-control uniInput"
152
+                  type="text"
153
+                  name="suburb"
154
+                  id="unit"
155
+                  v-model="property.suburb"
156
+                  disabled
157
+                />
158
+              </div>
159
+            </div>
160
+            <div class="row my-3">
161
+              <div class="col-md-12">
162
+                <div v-if="!property.city">
163
+                  <label for="city" class="uniSelectLabel">CITY</label>
164
+                </div>
165
+                <input
166
+                  class="form-control uniInput"
167
+                  type="text"
168
+                  name="city"
169
+                  id="unit"
170
+                  v-model="property.city"
171
+                  disabled
172
+                />
173
+              </div>
174
+            </div>
175
+            <div class="row my-3">
176
+              <div class="col-md-12">
177
+                <div v-if="!property.province">
178
+                  <label for="province" class="uniSelectLabel">PROVINCE</label>
179
+                </div>
180
+                <input
181
+                  class="form-control uniInput"
182
+                  type="text"
183
+                  name="province"
184
+                  id="unit"
185
+                  v-model="property.province"
186
+                  disabled
187
+                />
188
+              </div>
189
+            </div>
190
+            <div class="row my-3">
191
+              <div class="col-md-12">
192
+                <div v-if="!property.postalCode">
193
+                  <label for="postalCode" class="uniSelectLabel">POSTAL CODE</label>
194
+                </div>
195
+                <input
196
+                  class="form-control uniInput"
197
+                  type="text"
198
+                  name="postalCode"
199
+                  id="unit"
200
+                  v-model="property.postalCode"
201
+                  disabled
202
+                />
203
+              </div>
204
+            </div>
205
+            <div class="row my-3">
206
+              <div class="col-md-12">
207
+                <div v-if="!property.country">
208
+                  <label for="country" class="uniSelectLabel">COUNTRY</label>
209
+                </div>
210
+                <input
211
+                  class="form-control uniInput"
212
+                  type="text"
213
+                  name="country"
214
+                  id="unit"
215
+                  v-model="property.country"
216
+                  disabled
217
+                />
218
+              </div>
219
+            </div>
220
+            <div class="row my-3">
221
+              <div class="col-md-12">
222
+                <button type="button" @click="clearAddress()" class="btn-solid-blue">Clear Address</button>
223
+              </div>
224
+            </div>
225
+          </div>
226
+        </div>
227
+        <div class="row">
228
+          <div class="col-md-12">
229
+            <label for="Property Description" style="font-family:'muli'">Description:</label>
230
+            <vue-editor v-model="property.description" :editor-toolbar="customToolbar" />
231
+            <br />
232
+            <p>
233
+              * A listing fee of R380 including VAT is payable to list your Property on the
234
+              Uni-Vate website
235
+            </p>
123 236
           </div>
124 237
         </div>
125 238
         <div class="row" />
@@ -371,6 +484,18 @@ export default {
371 484
     UpdateDefaultImage(item) {
372 485
       this.defaultImage = item;
373 486
     },
487
+    clearAddress() {
488
+      this.addressSet = false;
489
+      this.property.streetNumber = undefined;
490
+      this.property.streetName = undefined;
491
+      this.property.suburb = undefined;
492
+      this.property.city = undefined;
493
+      this.property.province = undefined;
494
+      this.property.country = undefined;
495
+      this.property.postalCode = undefined;
496
+      this.property.addressUrl = undefined;
497
+      this.property.propertCoords = undefined;
498
+    },
374 499
   },
375 500
   mounted() {
376 501
     this.wait = false;

正在加载...
取消
保存