|
@@ -30,44 +30,47 @@
|
30
|
30
|
>
|
31
|
31
|
<div class="form-group row">
|
32
|
32
|
<div class="col-md-4">
|
33
|
|
- <label>Property Type</label>
|
|
33
|
+ <label for="Property Type"></label>
|
34
|
34
|
<select
|
35
|
|
- class="form-control form-control-lg form-control-a"
|
|
35
|
+ class="form-control"
|
36
|
36
|
name="propertyType"
|
37
|
37
|
id="propertyType"
|
38
|
38
|
v-model="property.propertyTypeId"
|
39
|
39
|
>
|
40
|
|
- <option value="0">Please Select</option>
|
|
40
|
+ <option value="0">Please select Property Type</option>
|
41
|
41
|
<option v-for="item in propertyTypes" :value="item.id">{{ item.description }}</option>
|
42
|
42
|
</select>
|
43
|
43
|
</div>
|
44
|
44
|
</div>
|
45
|
45
|
<div class="form-group row">
|
46
|
46
|
<div class="col-md-4">
|
47
|
|
- <label>Address Line 1</label>
|
|
47
|
+ <label for="Address Line 1"></label>
|
48
|
48
|
<input
|
49
|
|
- class="form-control form-control-lg form-control-a"
|
|
49
|
+ class="form-control"
|
50
|
50
|
type="text"
|
|
51
|
+ placeholder="Address Line 1"
|
51
|
52
|
name="address1"
|
52
|
53
|
id="address1"
|
53
|
54
|
v-model="property.addressLine1"
|
54
|
55
|
/>
|
55
|
56
|
</div>
|
56
|
57
|
<div class="col-md-4">
|
57
|
|
- <label>Address Line 2</label>
|
|
58
|
+ <label for="Address Line 2"></label>
|
58
|
59
|
<input
|
59
|
|
- class="form-control form-control-lg form-control-a"
|
|
60
|
+ class="form-control"
|
60
|
61
|
type="text"
|
|
62
|
+ placeholder="Address Line 2"
|
61
|
63
|
name="address2"
|
62
|
64
|
id="address2"
|
63
|
65
|
v-model="property.addressLine2"
|
64
|
66
|
/>
|
65
|
67
|
</div>
|
66
|
68
|
<div class="col-md-4">
|
67
|
|
- <label>Address Line 3</label>
|
|
69
|
+ <label for="Address Line 3"></label>
|
68
|
70
|
<input
|
69
|
|
- class="form-control form-control-lg form-control-a"
|
|
71
|
+ class="form-control"
|
70
|
72
|
type="text"
|
|
73
|
+ placeholder="Address Line 3"
|
71
|
74
|
name="address3"
|
72
|
75
|
id="address3"
|
73
|
76
|
v-model="property.addressLine3"
|
|
@@ -76,15 +79,15 @@
|
76
|
79
|
</div>
|
77
|
80
|
<div class="form-group row">
|
78
|
81
|
<div class="col-md-4">
|
79
|
|
- <label>Province</label>
|
|
82
|
+ <label for="Province"></label>
|
80
|
83
|
<select
|
81
|
|
- class="form-control form-control-lg form-control-a"
|
|
84
|
+ class="form-control"
|
82
|
85
|
name="propertyType"
|
83
|
86
|
id="propertyType"
|
84
|
87
|
@change="ProvinceSelected"
|
85
|
88
|
v-model="property.provinceId"
|
86
|
89
|
>
|
87
|
|
- <option value="0">Please Select</option>
|
|
90
|
+ <option value="0">Please select Province</option>
|
88
|
91
|
<option
|
89
|
92
|
v-for="province in provinces"
|
90
|
93
|
:value="province.id"
|
|
@@ -92,52 +95,53 @@
|
92
|
95
|
</select>
|
93
|
96
|
</div>
|
94
|
97
|
<div class="col-md-4">
|
95
|
|
- <label>City</label>
|
|
98
|
+ <label for="City"></label>
|
96
|
99
|
<select
|
97
|
|
- class="form-control form-control-lg form-control-a"
|
|
100
|
+ class="form-control"
|
98
|
101
|
name="propertyType"
|
99
|
102
|
id="propertyType"
|
100
|
103
|
@change="CitySelected"
|
101
|
104
|
v-model="property.cityId"
|
102
|
105
|
>
|
103
|
|
- <option value="0">Please Select</option>
|
|
106
|
+ <option value="0">Please select City</option>
|
104
|
107
|
<option v-for="city in cities" :value="city.id">{{ city.description }}</option>
|
105
|
108
|
</select>
|
106
|
109
|
</div>
|
107
|
110
|
<div class="col-md-4">
|
108
|
|
- <label>Suburb</label>
|
|
111
|
+ <label for="Suburb"></label>
|
109
|
112
|
<select
|
110
|
|
- class="form-control form-control-lg form-control-a"
|
|
113
|
+ class="form-control"
|
111
|
114
|
name="propertyType"
|
112
|
115
|
id="suburbselector"
|
113
|
116
|
v-model="property.suburbId"
|
114
|
117
|
>
|
115
|
|
- <option value="0">Please Select</option>
|
|
118
|
+ <option value="0">Please select Suburb</option>
|
116
|
119
|
<option v-for="suburb in suburbs" :value="suburb.id">{{ suburb.description }}</option>
|
117
|
120
|
</select>
|
118
|
121
|
</div>
|
119
|
122
|
</div>
|
120
|
123
|
<div class="form-group row">
|
121
|
124
|
<div class="col-md-4">
|
122
|
|
- <label v-if="salesType === 'Rental'">Rental</label>
|
123
|
|
- <label v-if="salesType !== 'Rental'">Sale Price</label>
|
|
125
|
+ <label v-if="salesType === 'Rental'">Rental Price</label>
|
|
126
|
+ <label v-if="salesType !== 'Rental'">Sales Price</label>
|
124
|
127
|
<input
|
125
|
|
- class="form-control form-control-lg form-control-a"
|
|
128
|
+ class="form-control"
|
126
|
129
|
type="number"
|
127
|
130
|
name="price"
|
128
|
131
|
id="price"
|
|
132
|
+ placeholder="R"
|
129
|
133
|
v-model="property.price"
|
130
|
134
|
/>
|
131
|
135
|
</div>
|
132
|
136
|
<div class="col-md-4" v-if="salesType === 'Rental'">
|
133
|
137
|
<label>Per</label>
|
134
|
138
|
<select
|
135
|
|
- class="form-control form-control-lg form-control-a"
|
|
139
|
+ class="form-control"
|
136
|
140
|
name="propertyType"
|
137
|
141
|
id="propertyType"
|
138
|
142
|
v-model="property.per"
|
139
|
143
|
>
|
140
|
|
- <option value>Please Select</option>
|
|
144
|
+ <option value>Please select</option>
|
141
|
145
|
<option value="month">Month</option>
|
142
|
146
|
<option value="day">Day</option>
|
143
|
147
|
</select>
|
|
@@ -145,12 +149,14 @@
|
145
|
149
|
</div>
|
146
|
150
|
<div class="form-group row">
|
147
|
151
|
<div class="col-md-12">
|
148
|
|
- <label>Property Description</label>
|
|
152
|
+ <label for="Property Description"></label>
|
149
|
153
|
<textarea
|
150
|
|
- class="form-control editor form-control-lg form-control-a"
|
|
154
|
+ class="form-control editor"
|
|
155
|
+ placeholder="Property Description"
|
151
|
156
|
name="description"
|
152
|
157
|
v-model="property.description"
|
153
|
158
|
></textarea>
|
|
159
|
+ <br />
|
154
|
160
|
<p>* A listing fee of R380 including VAT is payable to list your Property on the Uni-Vate website</p>
|
155
|
161
|
</div>
|
156
|
162
|
</div>
|
|
@@ -176,7 +182,7 @@
|
176
|
182
|
</div>
|
177
|
183
|
</div>
|
178
|
184
|
<ImageLoad />
|
179
|
|
- <button type="submit" class="btn btn-a">Save</button>
|
|
185
|
+ <button type="submit" class="btn btn-b-n" style="width: 85px; height:40px;">Save</button>
|
180
|
186
|
</form>
|
181
|
187
|
</div>
|
182
|
188
|
</div>
|
|
@@ -185,55 +191,55 @@
|
185
|
191
|
</template>
|
186
|
192
|
|
187
|
193
|
<script>
|
188
|
|
-import UserField from './propertyUserField.vue';
|
189
|
|
-import ImageLoad from './propertyImage.vue';
|
|
194
|
+import UserField from "./propertyUserField.vue";
|
|
195
|
+import ImageLoad from "./propertyImage.vue";
|
190
|
196
|
|
191
|
197
|
export default {
|
192
|
|
- name: 'PropertyEdit',
|
|
198
|
+ name: "PropertyEdit",
|
193
|
199
|
components: {
|
194
|
200
|
UserField,
|
195
|
|
- ImageLoad,
|
|
201
|
+ ImageLoad
|
196
|
202
|
},
|
197
|
203
|
data() {
|
198
|
204
|
return {
|
199
|
205
|
ApiRunning: false,
|
200
|
|
- propertyType: 'Residential',
|
201
|
|
- salesType: 'Rental',
|
202
|
|
- imageFile: '',
|
|
206
|
+ propertyType: "Residential",
|
|
207
|
+ salesType: "Rental",
|
|
208
|
+ imageFile: "",
|
203
|
209
|
provinces: [],
|
204
|
210
|
cities: [],
|
205
|
211
|
suburbs: [],
|
206
|
212
|
propertyValues: [],
|
207
|
213
|
propValuesProp: [],
|
208
|
214
|
propertyTypes: [],
|
209
|
|
- selectedProvince: '',
|
210
|
|
- selectedCity: '',
|
|
215
|
+ selectedProvince: "",
|
|
216
|
+ selectedCity: "",
|
211
|
217
|
property: {
|
212
|
218
|
propertyTypeId: 0,
|
213
|
|
- addressLine1: '',
|
214
|
|
- addressLine2: '',
|
215
|
|
- addressLine3: '',
|
|
219
|
+ addressLine1: "",
|
|
220
|
+ addressLine2: "",
|
|
221
|
+ addressLine3: "",
|
216
|
222
|
suburbId: 0,
|
217
|
223
|
cityId: 0,
|
218
|
224
|
provinceId: 0,
|
219
|
|
- price: '',
|
220
|
|
- per: '',
|
221
|
|
- description: '',
|
222
|
|
- isSale: false,
|
223
|
|
- },
|
|
225
|
+ price: "",
|
|
226
|
+ per: "",
|
|
227
|
+ description: "",
|
|
228
|
+ isSale: false
|
|
229
|
+ }
|
224
|
230
|
};
|
225
|
231
|
},
|
226
|
232
|
methods: {
|
227
|
233
|
SubmitData() {
|
228
|
|
- const axios = require('axios');
|
|
234
|
+ const axios = require("axios");
|
229
|
235
|
axios
|
230
|
|
- .post('http://localhost:57260/Property/Property', this.property, {
|
|
236
|
+ .post("http://localhost:57260/Property/Property", this.property, {
|
231
|
237
|
headers: {
|
232
|
|
- 'Content-type': 'application/json',
|
233
|
|
- },
|
|
238
|
+ "Content-type": "application/json"
|
|
239
|
+ }
|
234
|
240
|
})
|
235
|
|
- .then((response) => {})
|
236
|
|
- .catch((e) => {
|
|
241
|
+ .then(response => {})
|
|
242
|
+ .catch(e => {
|
237
|
243
|
alert(e);
|
238
|
244
|
});
|
239
|
245
|
|
|
@@ -244,10 +250,10 @@ export default {
|
244
|
250
|
this.selectedProvince = this.provinces[
|
245
|
251
|
item.target.options.selectedIndex - 1
|
246
|
252
|
].description;
|
247
|
|
- const axios = require('axios');
|
|
253
|
+ const axios = require("axios");
|
248
|
254
|
axios
|
249
|
255
|
.get(
|
250
|
|
- `http://localhost:57260/region/city/getby/${this.selectedProvince}`,
|
|
256
|
+ `http://localhost:57260/region/city/getby/${this.selectedProvince}`
|
251
|
257
|
)
|
252
|
258
|
.then(response => (this.cities = response.data));
|
253
|
259
|
}
|
|
@@ -257,36 +263,36 @@ export default {
|
257
|
263
|
this.selectedCity = this.cities[
|
258
|
264
|
item.target.options.selectedIndex - 1
|
259
|
265
|
].description;
|
260
|
|
- const axios = require('axios');
|
|
266
|
+ const axios = require("axios");
|
261
|
267
|
axios
|
262
|
268
|
.get(
|
263
|
|
- `http://localhost:57260/region/Suburb/${this.selectedProvince}/${this.selectedCity}`,
|
|
269
|
+ `http://localhost:57260/region/Suburb/${this.selectedProvince}/${this.selectedCity}`
|
264
|
270
|
)
|
265
|
271
|
.then(response => (this.suburbs = response.data));
|
266
|
272
|
}
|
267
|
|
- },
|
|
273
|
+ }
|
268
|
274
|
},
|
269
|
275
|
mounted() {
|
270
|
276
|
this.propertyType = this.$route.params.propType;
|
271
|
277
|
this.salesType = this.$route.params.saleType;
|
272
|
278
|
|
273
|
|
- const axios = require('axios');
|
|
279
|
+ const axios = require("axios");
|
274
|
280
|
axios
|
275
|
|
- .get('http://localhost:57260/Property/PropertyFields/Property Overview')
|
|
281
|
+ .get("http://localhost:57260/Property/PropertyFields/Property Overview")
|
276
|
282
|
.then(response => (this.propValuesProp = response.data));
|
277
|
283
|
|
278
|
284
|
axios
|
279
|
|
- .get('http://localhost:57260/Property/PropertyFields')
|
|
285
|
+ .get("http://localhost:57260/Property/PropertyFields")
|
280
|
286
|
.then(response => (this.propertyValues = response.data));
|
281
|
287
|
|
282
|
288
|
axios
|
283
|
289
|
.get(
|
284
|
|
- `http://localhost:57260/Property/PropertyType/type/${this.propertyType}`,
|
|
290
|
+ `http://localhost:57260/Property/PropertyType/type/${this.propertyType}`
|
285
|
291
|
)
|
286
|
292
|
.then(response => (this.propertyTypes = response.data));
|
287
|
293
|
|
288
|
294
|
axios
|
289
|
|
- .get('http://localhost:57260/region/province')
|
|
295
|
+ .get("http://localhost:57260/region/province")
|
290
|
296
|
.then(response => (this.provinces = response.data));
|
291
|
297
|
},
|
292
|
298
|
computed: {
|
|
@@ -294,18 +300,18 @@ export default {
|
294
|
300
|
this.propertyType = this.$route.params.propType;
|
295
|
301
|
this.salesType = this.$route.params.saleType;
|
296
|
302
|
|
297
|
|
- const axios = require('axios');
|
|
303
|
+ const axios = require("axios");
|
298
|
304
|
axios
|
299
|
305
|
.get(
|
300
|
|
- `http://localhost:57260/Property/PropertyType/type/${this.propertyType}`,
|
|
306
|
+ `http://localhost:57260/Property/PropertyType/type/${this.propertyType}`
|
301
|
307
|
)
|
302
|
308
|
.then(response => (this.propertyTypes = response.data));
|
303
|
|
- },
|
|
309
|
+ }
|
304
|
310
|
},
|
305
|
311
|
watch: {
|
306
|
312
|
SalesTypeChanged() {
|
307
|
313
|
console.log(this.salesType);
|
308
|
|
- },
|
309
|
|
- },
|
|
314
|
+ }
|
|
315
|
+ }
|
310
|
316
|
};
|
311
|
|
-</script>
|
|
317
|
+</script>
|