Kobus vor 5 Jahren
Ursprung
Commit
a5679431c0

BIN
public/img/commercial.jpg Datei anzeigen


BIN
public/img/no-homes.gif Datei anzeigen


BIN
public/img/residential.jpg Datei anzeigen


+ 60
- 53
src/components/property/propertyCard.vue Datei anzeigen

1
 <template>
1
 <template>
2
-  <div class="col-md-4">
3
-    <div class="card-box-a card-shadow">
4
-      <div class="img-box-a">
5
-        <img :src="currentProperty.displayImage" alt class="img-a img-fluid" />
6
-      </div>
7
-      <div class="card-overlay">
8
-        <div class="card-overlay-a-content">
9
-          <div class="card-header-a">
10
-            <h3 class="card-title-a">
11
-              <router-link
12
-                :to="`/property/property/${currentProperty.id}`"
13
-                class="link-a"
14
-              >{{ currentProperty.shortDescription }}</router-link>
15
-            </h3>
16
-          </div>
17
-          <div class="card-body-a">
18
-            <div class="price-box d-flex">
19
-              <span
20
-                v-if="currentProperty.isSale"
21
-                class="price-a"
22
-              >sale | {{ currentProperty.displayPrice }}</span>
23
-              <span
24
-                v-if="!currentProperty.isSale"
25
-                class="price-a"
26
-              >rent | {{ currentProperty.displayPrice }}</span>
2
+  <div class="form-group row">
3
+    <div class="col-md-4" v-for="currentProperty in properties" :key="currentProperty.id">
4
+      <div class="card-box-a card-shadow">
5
+        <div class="img-box-a">
6
+          <img
7
+            :src="currentProperty.displayImage"
8
+            alt
9
+            class="img-a img-fluid"
10
+            style="height:466px; width:350px; object-fit: cover;"
11
+          />
12
+        </div>
13
+        <div class="card-overlay">
14
+          <div class="card-overlay-a-content">
15
+            <div class="card-header-a">
16
+              <h4 class="card-title-a">
17
+                <router-link
18
+                  :to="`/property/property/${currentProperty.id}`"
19
+                  class="link-a"
20
+                >{{ currentProperty.shortDescription }}</router-link>
21
+              </h4>
22
+            </div>
23
+            <div class="card-body-a">
24
+              <div class="price-box d-flex">
25
+                <span
26
+                  v-if="currentProperty.isSale"
27
+                  class="price-a"
28
+                >sale | {{ currentProperty.displayPrice }}</span>
29
+                <span
30
+                  v-if="!currentProperty.isSale"
31
+                  class="price-a"
32
+                >rent | {{ currentProperty.displayPrice }}</span>
33
+              </div>
34
+              <router-link :to="`/property/property/${currentProperty.id}`" class="link-a">
35
+                Click here to view
36
+                <span class="ion-ios-arrow-forward"></span>
37
+              </router-link>
38
+            </div>
39
+            <div class="card-footer-a" v-if="currentProperty.showFooter">
40
+              <ul class="card-info d-flex justify-content-around">
41
+                <li v-if="currentProperty.area !== null">
42
+                  <h4 class="card-info-title">Area</h4>
43
+                  <span v-html="currentProperty.area"></span>
44
+                </li>
45
+                <li v-if="currentProperty.beds !== null">
46
+                  <h4 class="card-info-title">Beds</h4>
47
+                  <span>{{ currentProperty.beds }}</span>
48
+                </li>
49
+                <li v-if="currentProperty.baths !== null">
50
+                  <h4 class="card-info-title">Baths</h4>
51
+                  <span>{{ currentProperty.baths }}</span>
52
+                </li>
53
+                <li v-if="currentProperty.garages !== null">
54
+                  <h4 class="card-info-title">Garages</h4>
55
+                  <span>{{ currentProperty.garages }}</span>
56
+                </li>
57
+              </ul>
27
             </div>
58
             </div>
28
-            <router-link :to="`/property/property/${currentProperty.id}`" class="link-a">
29
-              Click here to view
30
-              <span class="ion-ios-arrow-forward"></span>
31
-            </router-link>
32
-          </div>
33
-          <div class="card-footer-a" v-if="currentProperty.showFooter">
34
-            <ul class="card-info d-flex justify-content-around">
35
-              <li v-if="currentProperty.area !== null">
36
-                <h4 class="card-info-title">Area</h4>
37
-                <span>{{ currentProperty.area }}</span>
38
-              </li>
39
-              <li v-if="currentProperty.beds !== null">
40
-                <h4 class="card-info-title">Beds</h4>
41
-                <span>{{ currentProperty.beds }}</span>
42
-              </li>
43
-              <li v-if="currentProperty.baths !== null">
44
-                <h4 class="card-info-title">Baths</h4>
45
-                <span>{{ currentProperty.baths }}</span>
46
-              </li>
47
-              <li v-if="currentProperty.garages !== null">
48
-                <h4 class="card-info-title">Garages</h4>
49
-                <span>{{ currentProperty.garages }}</span>
50
-              </li>
51
-            </ul>
52
           </div>
59
           </div>
53
         </div>
60
         </div>
54
       </div>
61
       </div>
62
+      <br />
55
     </div>
63
     </div>
56
-    <br />
57
   </div>
64
   </div>
58
 </template>
65
 </template>
59
 
66
 
60
 <script>
67
 <script>
61
 export default {
68
 export default {
62
   props: {
69
   props: {
63
-    currentProperty: Object,
64
-  },
70
+    properties: Object
71
+  }
65
 };
72
 };
66
-</script>
73
+</script>

+ 27
- 9
src/components/property/propertyPage.vue Datei anzeigen

34
           <div class="col-sm-12">
34
           <div class="col-sm-12">
35
             <div id="property-single-carousel" class="owl-carousel owl-arrow gallery-property">
35
             <div id="property-single-carousel" class="owl-carousel owl-arrow gallery-property">
36
               <div class="carousel-item-b">
36
               <div class="carousel-item-b">
37
-                <img :src="propertyImages[0]" />
37
+                <img
38
+                  :src="propertyImages[0]"
39
+                  style="height:800px; width:1200px; object-fit: cover;"
40
+                />
38
               </div>
41
               </div>
39
               <div class="carousel-item-b">
42
               <div class="carousel-item-b">
40
-                <img :src="propertyImages[1]" height="500" />
43
+                <img
44
+                  :src="propertyImages[1]"
45
+                  style="height:800px; width:1200px; object-fit: cover;"
46
+                />
47
+              </div>
48
+              <div class="carousel-item-b">
49
+                <img
50
+                  :src="propertyImages[2]"
51
+                  style="height:800px; width:1200px; object-fit: cover;"
52
+                />
53
+              </div>
54
+              <div class="carousel-item-b">
55
+                <img
56
+                  :src="propertyImages[3]"
57
+                  style="height:800px; width:1200px; object-fit: cover;"
58
+                />
41
               </div>
59
               </div>
42
             </div>
60
             </div>
43
             <div class="row justify-content-between">
61
             <div class="row justify-content-between">
62
                     <ul class="list" v-for="item in display.values">
80
                     <ul class="list" v-for="item in display.values">
63
                       <li class="d-flex justify-content-between">
81
                       <li class="d-flex justify-content-between">
64
                         <strong>{{ item.name }}:</strong>
82
                         <strong>{{ item.name }}:</strong>
65
-                        <span>{{ item.value }}</span>
83
+                        <span v-html="item.value"></span>
66
                       </li>
84
                       </li>
67
                     </ul>
85
                     </ul>
68
                   </div>
86
                   </div>
333
 
351
 
334
 <script>
352
 <script>
335
 export default {
353
 export default {
336
-  name: 'Property',
354
+  name: "Property",
337
   data() {
355
   data() {
338
     return {
356
     return {
339
       Property: {},
357
       Property: {},
340
-      propertyImages: [],
358
+      propertyImages: []
341
     };
359
     };
342
   },
360
   },
343
-  mounted() {
344
-    const axios = require('axios');
361
+  created() {
362
+    const axios = require("axios");
345
     axios
363
     axios
346
       .get(`http://localhost:57260/Property/Property/${this.$route.params.id}`)
364
       .get(`http://localhost:57260/Property/Property/${this.$route.params.id}`)
347
       .then(response => (this.Property = response.data));
365
       .then(response => (this.Property = response.data));
348
 
366
 
349
     axios
367
     axios
350
       .get(
368
       .get(
351
-        `http://localhost:57260/property/PropertyImage/getpropertyimages/${this.$route.params.id}`,
369
+        `http://localhost:57260/property/PropertyImage/getpropertyimages/${this.$route.params.id}`
352
       )
370
       )
353
       .then(response => (this.propertyImages = response.data));
371
       .then(response => (this.propertyImages = response.data));
354
-  },
372
+  }
355
 };
373
 };
356
 </script>
374
 </script>

+ 105
- 16
src/components/property/propertySearchPage.vue Datei anzeigen

3
     <div class="col-md-12">
3
     <div class="col-md-12">
4
       <h3 class="my-4">Property Listing</h3>
4
       <h3 class="my-4">Property Listing</h3>
5
     </div>
5
     </div>
6
-
6
+    <br />
7
+    <br />
8
+    <br />
7
     <div>
9
     <div>
8
       <propertyCard
10
       <propertyCard
11
+        v-if="Properties.length > 0"
9
         name="propertyholder"
12
         name="propertyholder"
10
-        v-for="property in Properties"
11
-        :currentProperty="property"
12
-        :key="property.id"
13
+        :properties="Properties"
14
+        :key="propertysearch"
13
       />
15
       />
16
+      <div v-if="Properties.length === 0">
17
+        <img src="../../../public/img/no-homes.gif" />
18
+        <br />
19
+        <br />
20
+        <p>Sorry no listing where found matching your search</p>
21
+      </div>
14
     </div>
22
     </div>
15
     <br />
23
     <br />
16
-    <div class="container">
24
+    <div class="container" v-if="propertyType === 'Residential'">
17
       <div class="row">
25
       <div class="row">
18
         <div class="col-md-12">
26
         <div class="col-md-12">
19
           <h1 class="my-4">About Residential Properties</h1>
27
           <h1 class="my-4">About Residential Properties</h1>
36
           </p>
44
           </p>
37
           <p>
45
           <p>
38
             Wish to RENT your property?
46
             Wish to RENT your property?
39
-            <a href="./ToRent.vue#residential/torent">Click Here</a>
47
+            <router-link to="/property/Residential/Rental">Click Here</router-link>
48
+          </p>
49
+          <p>
50
+            Wish to SELL your property?
51
+            <router-link to="/property/Residential/Sale">Click Here</router-link>
52
+          </p>
53
+        </div>
54
+        <div class="col-md-4 text-center">
55
+          <p>
56
+            <img class="img-fluid" src="./../../../public/img/residential.jpg" alt="About Resale" />
57
+          </p>
58
+        </div>
59
+      </div>
60
+    </div>
61
+    <div class="container" v-if="propertyType === 'Commercial'">
62
+      <div class="row">
63
+        <div class="col-md-12">
64
+          <h1 class="my-4">About Commercial Properties</h1>
65
+        </div>
66
+        <div class="col-md-6">
67
+          <p>
68
+            Commercial properties are characteristically any larger properties that
69
+            generate profit through leasing or rental activities. These properties
70
+            are typically used to conduct business and provide companies with cut-and-dry
71
+            leasing agreements, which keep their involvement in the maintenance of the property
72
+            to a minimum, so they may focus on the growth of their company.
73
+          </p>
74
+          <p>
75
+            Uni-Vate Properties seeks out professional, clean spaces for such companies and acts as
76
+            mediator between the landlord/-lady and the tenants. Uni-Vate Properties provides
77
+            value-adding service to clients and conducts business with a high standard
78
+            and integrity.
79
+          </p>
80
+          <p>
81
+            Wish to RENT your property?
82
+            <router-link to="/property/Commercial/Rental">Click Here</router-link>
40
           </p>
83
           </p>
41
           <p>
84
           <p>
42
             Wish to SELL your property?
85
             Wish to SELL your property?
43
-            <a href="./ToSell.vue#residential/tosell">Click Here</a>
86
+            <router-link to="/property/Commercial/Sale">Click Here</router-link>
44
           </p>
87
           </p>
45
         </div>
88
         </div>
46
         <div class="col-md-4 text-center">
89
         <div class="col-md-4 text-center">
47
           <p>
90
           <p>
48
-            <img class="img-fluid" src alt="About Resale" />
91
+            <img class="img-fluid" src="./../../../public/img/commercial.jpg" alt="About Resale" />
49
           </p>
92
           </p>
50
         </div>
93
         </div>
51
       </div>
94
       </div>
53
   </div>
96
   </div>
54
 </template>
97
 </template>
55
 <script>
98
 <script>
56
-import propertyCard from '../property/propertyCard.vue';
99
+import propertyCard from "../property/propertyCard.vue";
100
+import { isNull } from "util";
57
 
101
 
58
 export default {
102
 export default {
59
-  name: 'ResidentialSearch',
103
+  name: "propertysearch",
60
   components: {
104
   components: {
61
-    propertyCard,
105
+    propertyCard
62
   },
106
   },
63
   data() {
107
   data() {
64
     return {
108
     return {
65
       Properties: [],
109
       Properties: [],
110
+      type: "",
111
+      propertyType: "",
112
+      propertyTypeparam: "",
113
+      province: "",
114
+      city: "",
115
+      suburb: ""
66
     };
116
     };
67
   },
117
   },
68
-  mounted() {
69
-    const axios = require('axios');
70
-    axios
71
-      .get('http://localhost:57260/Property/Property')
72
-      .then(response => (this.Properties = response.data));
118
+  computed: {
119
+    ParamsChanged() {
120
+      this.propertyTypeparam = this.$route.params.propertyType;
121
+      this.type = this.$route.query.type;
122
+      this.propertyType = this.$route.query.propertyType;
123
+      this.province = this.$route.query.province;
124
+      this.city = this.$route.query.city;
125
+      this.suburb = this.$route.query.suburb;
126
+
127
+      if (typeof this.propertyType === "undefined") {
128
+        this.propertyType = this.propertyTypeparam;
129
+      }
130
+
131
+      let search = "";
132
+      if (this.type !== "") {
133
+        search = search + "type:" + this.type;
134
+      }
135
+      if (this.propertyType !== "") {
136
+        search = search + "|propertyType:" + this.propertyType;
137
+      }
138
+      if (this.province !== "") {
139
+        search = search + "|province:" + this.province;
140
+      }
141
+      if (this.city !== "") {
142
+        search = search + "|city:" + this.city;
143
+      }
144
+      if (this.suburb !== "") {
145
+        search = search + "|suburb:" + this.suburb;
146
+      }
147
+
148
+      console.log(search);
149
+
150
+      const axios = require("axios");
151
+      axios
152
+        .get(
153
+          `http://localhost:57260/Property/Property/Search/${this.type}/${this.propertyType}/${this.province}/${this.city}/${this.suburb}`
154
+        )
155
+        .then(response => (this.Properties = response.data));
156
+    }
73
   },
157
   },
158
+  watch: {
159
+    ParamsChanged() {
160
+      console.log(JSON.stringify(this.$route.query));
161
+    }
162
+  }
74
 };
163
 };
75
 </script>
164
 </script>

+ 120
- 36
src/components/property/propertyeditPage.vue Datei anzeigen

1
 <template>
1
 <template>
2
-  <div @submit.prevent="SubmitData">
2
+  <!-- eslint-disable max-len -->
3
+  <div>
3
     <div class="container">
4
     <div class="container">
4
       <section class="intro-single">
5
       <section class="intro-single">
5
         <div class="container">
6
         <div class="container">
21
       </div>
22
       </div>
22
       <div class="row mb-3">
23
       <div class="row mb-3">
23
         <div class="col-md-12">
24
         <div class="col-md-12">
24
-          <form
25
-            id="mainForm"
26
-            method="POST"
27
-            action="/to-sell"
28
-            accept-charset="UTF-8"
29
-            enctype="multipart/form-data"
30
-          >
25
+          <form id="mainForm">
31
             <div class="form-group row">
26
             <div class="form-group row">
32
               <div class="col-md-4">
27
               <div class="col-md-4">
33
                 <label for="Property Type"></label>
28
                 <label for="Property Type"></label>
37
                   id="propertyType"
32
                   id="propertyType"
38
                   v-model="property.propertyTypeId"
33
                   v-model="property.propertyTypeId"
39
                 >
34
                 >
40
-                  <option value="0">Please select Property Type</option>
41
-                  <option v-for="item in propertyTypes" :value="item.id">{{ item.description }}</option>
35
+                  <option value="0">Please Select</option>
36
+                  <option
37
+                    v-for="item in propertyTypes"
38
+                    :value="item.id"
39
+                    :key="item.id"
40
+                  >{{ item.description }}</option>
42
                 </select>
41
                 </select>
43
               </div>
42
               </div>
43
+              <div v-if="propertyType === 'Commercial'" class="col-md-4">
44
+                <label>Property Name</label>
45
+                <input
46
+                  class="form-control form-control-lg form-control-a"
47
+                  type="text"
48
+                  name="propertyName"
49
+                  id="propertyName"
50
+                  v-model="property.propertyName"
51
+                />
52
+              </div>
53
+              <div v-if="propertyType === 'Commercial'" class="col-md-4">
54
+                <label>Unit</label>
55
+                <input
56
+                  class="form-control form-control-lg form-control-a"
57
+                  type="text"
58
+                  name="unit"
59
+                  id="unit"
60
+                  v-model="property.unit"
61
+                />
62
+              </div>
44
             </div>
63
             </div>
45
             <div class="form-group row">
64
             <div class="form-group row">
46
               <div class="col-md-4">
65
               <div class="col-md-4">
91
                   <option
110
                   <option
92
                     v-for="province in provinces"
111
                     v-for="province in provinces"
93
                     :value="province.id"
112
                     :value="province.id"
113
+                    :key="province.id"
94
                   >{{ province.description }}</option>
114
                   >{{ province.description }}</option>
95
                 </select>
115
                 </select>
96
               </div>
116
               </div>
103
                   @change="CitySelected"
123
                   @change="CitySelected"
104
                   v-model="property.cityId"
124
                   v-model="property.cityId"
105
                 >
125
                 >
106
-                  <option value="0">Please select City</option>
107
-                  <option v-for="city in cities" :value="city.id">{{ city.description }}</option>
126
+                  <option value="0">Please Select</option>
127
+                  <option
128
+                    v-for="city in cities"
129
+                    :value="city.id"
130
+                    :key="city.id"
131
+                  >{{ city.description }}</option>
108
                 </select>
132
                 </select>
109
               </div>
133
               </div>
110
               <div class="col-md-4">
134
               <div class="col-md-4">
115
                   id="suburbselector"
139
                   id="suburbselector"
116
                   v-model="property.suburbId"
140
                   v-model="property.suburbId"
117
                 >
141
                 >
118
-                  <option value="0">Please select Suburb</option>
119
-                  <option v-for="suburb in suburbs" :value="suburb.id">{{ suburb.description }}</option>
142
+                  <option value="0">Please Select</option>
143
+                  <option
144
+                    v-for="suburb in suburbs"
145
+                    :value="suburb.id"
146
+                    :key="suburb.id"
147
+                  >{{ suburb.description }}</option>
120
                 </select>
148
                 </select>
121
               </div>
149
               </div>
122
             </div>
150
             </div>
155
                   placeholder="Property Description"
183
                   placeholder="Property Description"
156
                   name="description"
184
                   name="description"
157
                   v-model="property.description"
185
                   v-model="property.description"
186
+                  id="description"
158
                 ></textarea>
187
                 ></textarea>
159
                 <br />
188
                 <br />
160
                 <p>* A listing fee of R380 including VAT is payable to list your Property on the Uni-Vate website</p>
189
                 <p>* A listing fee of R380 including VAT is payable to list your Property on the Uni-Vate website</p>
161
               </div>
190
               </div>
162
             </div>
191
             </div>
163
             <div class="form-group row" />
192
             <div class="form-group row" />
164
-            <UserField v-if="ApiRunning" :fields="propValuesProp[0].fields"></UserField>
193
+            <UserField
194
+              v-if="ApiRunning & propertyType === 'Residential'"
195
+              :fields="propValuesProp[0].fields"
196
+              :id="overviewProps"
197
+              @UpdateUserDefinedFields="UpdateUserDefinedFields"
198
+            ></UserField>
165
             <div class="form-group row" />
199
             <div class="form-group row" />
166
-            <div v-for="item in propertyValues">
200
+            <div v-for="item in propertyValues" :key="item.id">
167
               <div class="row">
201
               <div class="row">
168
                 <div class="col-sm-12">
202
                 <div class="col-sm-12">
169
                   <div class="title-box-d">
203
                   <div class="title-box-d">
171
                   </div>
205
                   </div>
172
                 </div>
206
                 </div>
173
               </div>
207
               </div>
174
-              <UserField :fields="item.fields" :id="item.id" />
208
+              <UserField
209
+                :fields="item.fields"
210
+                :id="item.id"
211
+                @UpdateUserDefinedFields="UpdateUserDefinedFields"
212
+              />
175
             </div>
213
             </div>
176
             <div class="form-group row" />
214
             <div class="form-group row" />
177
             <div class="row">
215
             <div class="row">
181
                 </div>
219
                 </div>
182
               </div>
220
               </div>
183
             </div>
221
             </div>
184
-            <ImageLoad />
185
-            <button type="submit" class="btn btn-b-n" style="width: 85px; height:40px;">Save</button>
222
+            <ImageLoad :loadedImages="loadedImages" />
223
+            <button type="button" @click="SubmitData()" class="btn btn-a">Save</button>
224
+            <!-- <router-link
225
+              to="/property/search"
226
+              @click.stop.prevent="SubmitData()"
227
+              class="btn btn-b"
228
+              tag="button"
229
+            >Save</router-link>-->
186
           </form>
230
           </form>
187
         </div>
231
         </div>
188
       </div>
232
       </div>
193
 <script>
237
 <script>
194
 import UserField from "./propertyUserField.vue";
238
 import UserField from "./propertyUserField.vue";
195
 import ImageLoad from "./propertyImage.vue";
239
 import ImageLoad from "./propertyImage.vue";
196
-
240
+// https://vuejsexamples.com/a-vue-wrapper-around-the-trix-rich-text-editor/
197
 export default {
241
 export default {
198
   name: "PropertyEdit",
242
   name: "PropertyEdit",
199
   components: {
243
   components: {
202
   },
246
   },
203
   data() {
247
   data() {
204
     return {
248
     return {
205
-      ApiRunning: false,
249
+      ApiRunning: true,
206
       propertyType: "Residential",
250
       propertyType: "Residential",
207
       salesType: "Rental",
251
       salesType: "Rental",
208
       imageFile: "",
252
       imageFile: "",
216
       selectedCity: "",
260
       selectedCity: "",
217
       property: {
261
       property: {
218
         propertyTypeId: 0,
262
         propertyTypeId: 0,
263
+        propertyName: "",
264
+        unit: "",
219
         addressLine1: "",
265
         addressLine1: "",
220
         addressLine2: "",
266
         addressLine2: "",
221
         addressLine3: "",
267
         addressLine3: "",
225
         price: "",
271
         price: "",
226
         per: "",
272
         per: "",
227
         description: "",
273
         description: "",
228
-        isSale: false
229
-      }
274
+        isSale: false,
275
+        propertyUserFields: [],
276
+        propertyImages: []
277
+      },
278
+      images: [],
279
+      propertyFieldValues: []
230
     };
280
     };
231
   },
281
   },
232
   methods: {
282
   methods: {
233
     SubmitData() {
283
     SubmitData() {
234
-      const axios = require("axios");
235
-      axios
236
-        .post("http://localhost:57260/Property/Property", this.property, {
237
-          headers: {
238
-            "Content-type": "application/json"
239
-          }
240
-        })
241
-        .then(response => {})
242
-        .catch(e => {
243
-          alert(e);
244
-        });
284
+      // let isDefault = true;
285
+      // this.images.forEach((imagedata) => {
286
+      //   this.property.propertyImages.push({
287
+      //     image: imagedata,
288
+      //     isDefault,
289
+      //   });
290
+      //   isDefault = false;
291
+      // });
292
+
293
+      // this.property.propertyUserFields = this.propertyFieldValues;
294
+
295
+      // const axios = require('axios');
296
+      // axios
297
+      //   .post('http://localhost:57260/Property/Property', this.property)
298
+      //   .then((response) => {})
299
+      //   .catch((e) => {
300
+      //     alert(e);
301
+      //   });
245
 
302
 
246
-      console.log(JSON.stringify(this.property));
303
+      // this.$router.push("/property/search");
304
+      this.$router.push({
305
+        path: "/property/search",
306
+        query: { type: this.salesType, propertyType: this.propertyType }
307
+      });
247
     },
308
     },
248
     ProvinceSelected(item) {
309
     ProvinceSelected(item) {
249
       if (item.target.options.selectedIndex > 0) {
310
       if (item.target.options.selectedIndex > 0) {
270
           )
331
           )
271
           .then(response => (this.suburbs = response.data));
332
           .then(response => (this.suburbs = response.data));
272
       }
333
       }
334
+    },
335
+    loadedImages(values) {
336
+      this.images = values;
337
+    },
338
+    UpdateUserDefinedFields(item) {
339
+      let update = false;
340
+      this.propertyFieldValues.forEach(element => {
341
+        if (element.userDefinedFieldId === item.userDefinedFieldId) {
342
+          element.value = item.value;
343
+          update = true;
344
+        }
345
+      });
346
+      if (!update) {
347
+        this.propertyFieldValues.push(item);
348
+      }
273
     }
349
     }
274
   },
350
   },
275
   mounted() {
351
   mounted() {
282
       .then(response => (this.propValuesProp = response.data));
358
       .then(response => (this.propValuesProp = response.data));
283
 
359
 
284
     axios
360
     axios
285
-      .get("http://localhost:57260/Property/PropertyFields")
361
+      .get(
362
+        `http://localhost:57260/property/propertyfields/Propertytype/${this.propertyType}`
363
+      )
286
       .then(response => (this.propertyValues = response.data));
364
       .then(response => (this.propertyValues = response.data));
287
 
365
 
288
     axios
366
     axios
306
           `http://localhost:57260/Property/PropertyType/type/${this.propertyType}`
384
           `http://localhost:57260/Property/PropertyType/type/${this.propertyType}`
307
         )
385
         )
308
         .then(response => (this.propertyTypes = response.data));
386
         .then(response => (this.propertyTypes = response.data));
387
+
388
+      axios
389
+        .get(
390
+          `http://localhost:57260/property/propertyfields/Propertytype/${this.propertyType}`
391
+        )
392
+        .then(response => (this.propertyValues = response.data));
309
     }
393
     }
310
   },
394
   },
311
   watch: {
395
   watch: {

Laden…
Abbrechen
Speichern