Pārlūkot izejas kodu

Fix to images & UDFs

master
George Williams 4 gadus atpakaļ
vecāks
revīzija
920ddb65b0

+ 33
- 18
src/components/processFlow/makeOffer.vue Parādīt failu

10
         class="btn btn-b-n"
10
         class="btn btn-b-n"
11
         style="width: 150px; height:40px;"
11
         style="width: 150px; height:40px;"
12
         data-dismiss="modal"
12
         data-dismiss="modal"
13
-      >OK</button>
13
+      >
14
+        OK
15
+      </button>
14
     </div>
16
     </div>
15
     <div v-else>
17
     <div v-else>
16
       <div v-if="!isSaved">
18
       <div v-if="!isSaved">
78
             ></textarea>
80
             ></textarea>
79
           </div>
81
           </div>
80
         </div>
82
         </div>
83
+        <div class="form-group row">
84
+          <div class="col-md-12">
85
+            <p>
86
+              *Occupation for the current year is not guaranteed, Uni-Vate Properties will confirm
87
+              upon reply.
88
+            </p>
89
+          </div>
90
+        </div>
81
       </div>
91
       </div>
82
       <div v-if="!isSaved" class="container">
92
       <div v-if="!isSaved" class="container">
83
         <div class="row">
93
         <div class="row">
84
           <div algin="center" class="col">
94
           <div algin="center" class="col">
85
-            <button
86
-              v-if="isMakeOffer"
87
-              type="button"
88
-              @click="SendOffer()"
89
-              class="btn-solid-blue"
90
-            >Send Offer</button>
95
+            <button v-if="isMakeOffer" type="button" @click="SendOffer()" class="btn-solid-blue">
96
+              Send Offer
97
+            </button>
91
             <button
98
             <button
92
               v-if="!isMakeOffer && !isDecline && canEdit"
99
               v-if="!isMakeOffer && !isDecline && canEdit"
93
               type="submit"
100
               type="submit"
94
               @click="Accept()"
101
               @click="Accept()"
95
               class="btn btn-b-n"
102
               class="btn btn-b-n"
96
               style="width: 150px; height:40px;"
103
               style="width: 150px; height:40px;"
97
-            >Accept</button>
104
+            >
105
+              Accept
106
+            </button>
98
             <button
107
             <button
99
               v-if="!isMakeOffer && !isDecline && canEdit"
108
               v-if="!isMakeOffer && !isDecline && canEdit"
100
               type="button"
109
               type="button"
101
               @click="Decline()"
110
               @click="Decline()"
102
               class="btn btn-b-n"
111
               class="btn btn-b-n"
103
               style="width: 150px; height:40px;"
112
               style="width: 150px; height:40px;"
104
-            >Decline</button>
113
+            >
114
+              Decline
115
+            </button>
105
           </div>
116
           </div>
106
         </div>
117
         </div>
107
       </div>
118
       </div>
123
         @click="Complete()"
134
         @click="Complete()"
124
         class="btn btn-b-n"
135
         class="btn btn-b-n"
125
         style="width: 150px; height:40px;"
136
         style="width: 150px; height:40px;"
126
-      >Complete</button>
137
+      >
138
+        Complete
139
+      </button>
127
       <div v-if="isSaved">
140
       <div v-if="isSaved">
128
         <div class="form-group row">
141
         <div class="form-group row">
129
           <br />
142
           <br />
137
           class="btn btn-b-n"
150
           class="btn btn-b-n"
138
           style="width: 150px; height:40px;"
151
           style="width: 150px; height:40px;"
139
           data-dismiss="modal"
152
           data-dismiss="modal"
140
-        >OK</button>
153
+        >
154
+          OK
155
+        </button>
141
       </div>
156
       </div>
142
     </div>
157
     </div>
143
   </div>
158
   </div>
156
     canEdit: Boolean,
171
     canEdit: Boolean,
157
     item: Object,
172
     item: Object,
158
     bidId: Number,
173
     bidId: Number,
159
-    updateItem: Function,
174
+    updateItem: Function
160
   },
175
   },
161
   data() {
176
   data() {
162
     return {
177
     return {
164
       isSaved: false,
179
       isSaved: false,
165
       message: "",
180
       message: "",
166
       isInfo: true,
181
       isInfo: true,
167
-      isLoggedIn: Log.isLoggedIn(),
182
+      isLoggedIn: Log.isLoggedIn()
168
     };
183
     };
169
   },
184
   },
170
   methods: {
185
   methods: {
203
 
218
 
204
       const decline = {
219
       const decline = {
205
         id: this.item.id,
220
         id: this.item.id,
206
-        comment: this.item.declineReason,
221
+        comment: this.item.declineReason
207
       };
222
       };
208
 
223
 
209
       this.declineBid(decline);
224
       this.declineBid(decline);
210
       this.isSaved = true;
225
       this.isSaved = true;
211
       this.message = "Offer Declined.";
226
       this.message = "Offer Declined.";
212
       this.isInfo = false;
227
       this.isInfo = false;
213
-    },
228
+    }
214
   },
229
   },
215
   computed: {
230
   computed: {
216
-    ...mapState("bid", ["bidItem"]),
231
+    ...mapState("bid", ["bidItem"])
217
   },
232
   },
218
   mounted() {
233
   mounted() {
219
     this.getTemplate();
234
     this.getTemplate();
222
     item() {
237
     item() {
223
       this.isSaved = false;
238
       this.isSaved = false;
224
       this.canEdit = this.item.statusCode === "E1";
239
       this.canEdit = this.item.statusCode === "E1";
225
-    },
226
-  },
240
+    }
241
+  }
227
 };
242
 };
228
 </script>
243
 </script>
229
 
244
 

+ 1
- 1
src/components/property/commercial/singleView/carouselSection.vue Parādīt failu

16
           class="item"
16
           class="item"
17
           style="object-fit:cover"
17
           style="object-fit:cover"
18
           v-for="(image, i) in propertyImages"
18
           v-for="(image, i) in propertyImages"
19
-          :src="image"
19
+          :src="image.image"
20
           :key="i"
20
           :key="i"
21
         />
21
         />
22
       </carousel>
22
       </carousel>

+ 15
- 6
src/components/property/commercial/singleView/contentSection.vue Parādīt failu

18
                 <img
18
                 <img
19
                   v-if="i === 0"
19
                   v-if="i === 0"
20
                   style="width:100%; height:201px;object-fit: cover"
20
                   style="width:100%; height:201px;object-fit: cover"
21
-                  :src="image"
21
+                  :src="image.image"
22
                 />
22
                 />
23
                 <div v-else-if="i !== 0">
23
                 <div v-else-if="i !== 0">
24
                   <img
24
                   <img
25
                     v-if="i % 2 === 0"
25
                     v-if="i % 2 === 0"
26
                     style="width:50%; height:140px; float:right;"
26
                     style="width:50%; height:140px; float:right;"
27
-                    :src="image"
27
+                    :src="image.image"
28
                   />
28
                   />
29
-                  <img v-else style="width:50%; height:140px; float:left" :src="image" />
29
+                  <img v-else style="width:50%; height:140px; float:left" :src="image.image" />
30
                 </div>
30
                 </div>
31
               </div>
31
               </div>
32
             </div>
32
             </div>
33
 
33
 
34
-            <gallery :images="propertyImages" :index="index" @close="index = null"></gallery>
34
+            <gallery :images="Images" :index="index" @close="index = null"></gallery>
35
           </div>
35
           </div>
36
 
36
 
37
           <div class="panel-left p-5" style="margin-top:140px;">
37
           <div class="panel-left p-5" style="margin-top:140px;">
41
             <div v-if="property.displayData.length > 0">
41
             <div v-if="property.displayData.length > 0">
42
               <div v-for="(data, i) in property.displayData" :key="i">
42
               <div v-for="(data, i) in property.displayData" :key="i">
43
                 <div v-for="field in data.values" :key="field.id">
43
                 <div v-for="field in data.values" :key="field.id">
44
-                  <p v-if="field.name === 'Floor Size'">{{ field.value }}M<sup>2</sup></p>
44
+                  <p v-if="field.name === 'Floor Size'">{{ field.value }}</p>
45
                 </div>
45
                 </div>
46
               </div>
46
               </div>
47
             </div>
47
             </div>
88
           <div v-if="property.displayData.length > 0">
88
           <div v-if="property.displayData.length > 0">
89
             <div v-for="(data, i) in property.displayData" :key="i" class="row my-3">
89
             <div v-for="(data, i) in property.displayData" :key="i" class="row my-3">
90
               <div v-for="(field, j) in data.values" :key="j" class="col-md-6">
90
               <div v-for="(field, j) in data.values" :key="j" class="col-md-6">
91
-                <div v-if="field.value.toUpperCase() != 'YES'">
91
+                <div v-if="field.value.toUpperCase() != 'TRUE'">
92
                   <i class="fa fa-check-circle"></i> {{ field.value }} {{ field.name }}
92
                   <i class="fa fa-check-circle"></i> {{ field.value }} {{ field.name }}
93
                 </div>
93
                 </div>
94
                 <div v-else><i class="fa fa-check-circle"></i> {{ field.name }}</div>
94
                 <div v-else><i class="fa fa-check-circle"></i> {{ field.name }}</div>
185
       index: null,
185
       index: null,
186
       date: new Date()
186
       date: new Date()
187
     };
187
     };
188
+  },
189
+  computed: {
190
+    Images() {
191
+      const list = [];
192
+      for (let i = 0; i < this.propertyImages.length; i++) {
193
+        list.push(this.propertyImages[i].image);
194
+      }
195
+      return list;
196
+    }
188
   }
197
   }
189
 };
198
 };
190
 </script>
199
 </script>

+ 35
- 29
src/components/property/editProperty/editProperty.vue Parādīt failu

66
                     :disabled="!canEdit"
66
                     :disabled="!canEdit"
67
                   >
67
                   >
68
                     <option value="0">Please select type *</option>
68
                     <option value="0">Please select type *</option>
69
-                    <option
70
-                      v-for="item in propertyTypes"
71
-                      :value="item.id"
72
-                      :key="item.id"
73
-                    >{{ item.description }}</option>
69
+                    <option v-for="item in propertyTypes" :value="item.id" :key="item.id">{{
70
+                      item.description
71
+                    }}</option>
74
                   </select>
72
                   </select>
75
                 </div>
73
                 </div>
76
                 <div v-if="property.propertyUsageType === 'Commercial'" class="col-md-2">
74
                 <div v-if="property.propertyUsageType === 'Commercial'" class="col-md-2">
110
                           for="price"
108
                           for="price"
111
                           class="uniSelectLabel"
109
                           class="uniSelectLabel"
112
                           style="text-transform:uppercase; margin-left:17px; background-color:white"
110
                           style="text-transform:uppercase; margin-left:17px; background-color:white"
113
-                        >{{ property.salesTypeString }} Price</label>
111
+                          >{{ property.salesTypeString }} Price</label
112
+                        >
114
                       </div>
113
                       </div>
115
                       <input
114
                       <input
116
                         class="form-control uniInput"
115
                         class="form-control uniInput"
256
                   </div>
255
                   </div>
257
                   <div class="row my-3">
256
                   <div class="row my-3">
258
                     <div class="col-md-12">
257
                     <div class="col-md-12">
259
-                      <button
260
-                        type="button"
261
-                        @click="clearAddress()"
262
-                        class="btn-solid-blue"
263
-                      >Clear Address</button>
258
+                      <button type="button" @click="clearAddress()" class="btn-solid-blue">
259
+                        Clear Address
260
+                      </button>
264
                     </div>
261
                     </div>
265
                   </div>
262
                   </div>
266
                 </div>
263
                 </div>
295
                         :disabled="!canEdit"
292
                         :disabled="!canEdit"
296
                       />
293
                       />
297
                     </div>
294
                     </div>
298
-                    <div v-else class="display:none"></div>
299
-                    <div v-if="field.type === 'yesno'">
295
+                    <div v-else-if="field.type === 'text'">
300
                       {{ field.name }}
296
                       {{ field.name }}
301
                       <input
297
                       <input
302
-                        type="checkbox"
298
+                        type="text"
299
+                        class="form-control uniInput"
303
                         v-model="field.value"
300
                         v-model="field.value"
304
                         :disabled="!canEdit"
301
                         :disabled="!canEdit"
305
                       />
302
                       />
306
                     </div>
303
                     </div>
304
+                    <div v-else-if="field.type === 'yesno'">
305
+                      {{ field.name }}
306
+                      <input type="checkbox" v-model="field.value" :disabled="!canEdit" />
307
+                    </div>
308
+                    <div v-else class="display:none"></div>
307
                   </div>
309
                   </div>
308
                 </div>
310
                 </div>
309
               </div>
311
               </div>
360
                 @DeleteImage="DeleteImage"
362
                 @DeleteImage="DeleteImage"
361
                 :mayEdit="canEdit"
363
                 :mayEdit="canEdit"
362
               />
364
               />
363
-              <button v-if="!wait" type="button" @click="SubmitData()" class="btn-solid-blue">Save</button>
364
-              <button v-if="!wait" type="button" @click="Close()" class="btn-solid-blue">Close</button>
365
+              <button v-if="!wait" type="button" @click="SubmitData()" class="btn-solid-blue">
366
+                Save
367
+              </button>
368
+              <button v-if="!wait" type="button" @click="Close()" class="btn-solid-blue">
369
+                Close
370
+              </button>
365
               <div v-if="showPropertyTypeError">
371
               <div v-if="showPropertyTypeError">
366
-                <p
367
-                  class="alert myError"
368
-                >Missing fields. Please fill in all required fields. Marked with *</p>
372
+                <p class="alert myError">
373
+                  Missing fields. Please fill in all required fields. Marked with *
374
+                </p>
369
               </div>
375
               </div>
370
               <div v-if="!addressSet">
376
               <div v-if="!addressSet">
371
                 <p class="alert myError">Please enter an address.</p>
377
                 <p class="alert myError">Please enter an address.</p>
390
   name: "PropertyEditPage",
396
   name: "PropertyEditPage",
391
   components: {
397
   components: {
392
     mapSection,
398
     mapSection,
393
-    ImageLoad,
399
+    ImageLoad
394
   },
400
   },
395
   data() {
401
   data() {
396
     return {
402
     return {
398
       defaultImage: 0,
404
       defaultImage: 0,
399
       images: [],
405
       images: [],
400
       wait: false,
406
       wait: false,
401
-      canEdit: true,
407
+      canEdit: true
402
     };
408
     };
403
   },
409
   },
404
   methods: {
410
   methods: {
406
       "getProperty",
412
       "getProperty",
407
       "getPropertyTypes",
413
       "getPropertyTypes",
408
       "getPropertyFields",
414
       "getPropertyFields",
409
-      "updateProperty",
415
+      "updateProperty"
410
     ]),
416
     ]),
411
     StatusChanged(item) {
417
     StatusChanged(item) {
412
       if (
418
       if (
469
         }
475
         }
470
         this.property.newImages.push({
476
         this.property.newImages.push({
471
           image: this.images[i],
477
           image: this.images[i],
472
-          isDefault: setAsDefault,
478
+          isDefault: setAsDefault
473
         });
479
         });
474
       }
480
       }
475
 
481
 
477
 
483
 
478
       //console.log(JSON.stringify(this.property));
484
       //console.log(JSON.stringify(this.property));
479
 
485
 
480
-      this.updateProperty(this.property).then((fulfilled) => {
486
+      this.updateProperty(this.property).then(fulfilled => {
481
         this.$router.push("/PropertyAdmin");
487
         this.$router.push("/PropertyAdmin");
482
       });
488
       });
483
     },
489
     },
498
     },
504
     },
499
     DeleteImage(item) {
505
     DeleteImage(item) {
500
       this.propertyImages[item].isDeleted = true;
506
       this.propertyImages[item].isDeleted = true;
501
-    },
507
+    }
502
   },
508
   },
503
   mounted() {
509
   mounted() {
504
-    this.getProperty(this.$route.params.id).then((fulfilled) => {
510
+    this.getProperty(this.$route.params.id).then(fulfilled => {
505
       this.wait = false;
511
       this.wait = false;
506
       if (
512
       if (
507
         this.property.statusString === "Offer Pending" ||
513
         this.property.statusString === "Offer Pending" ||
520
       "propertyTypes",
526
       "propertyTypes",
521
       "propertyImages",
527
       "propertyImages",
522
       "propertyFields",
528
       "propertyFields",
523
-      "statuses",
529
+      "statuses"
524
     ]),
530
     ]),
525
     savedImages() {
531
     savedImages() {
526
       const list = [];
532
       const list = [];
528
         list.push(this.proeprtyImages[i].image);
534
         list.push(this.proeprtyImages[i].image);
529
       }
535
       }
530
       return list;
536
       return list;
531
-    },
532
-  },
537
+    }
538
+  }
533
 };
539
 };
534
 </script>
540
 </script>
535
 
541
 

+ 1
- 1
src/components/property/residential/singleView/carouselSection.vue Parādīt failu

16
           class="item"
16
           class="item"
17
           style="object-fit:cover"
17
           style="object-fit:cover"
18
           v-for="(image, i) in propertyImages"
18
           v-for="(image, i) in propertyImages"
19
-          :src="image"
19
+          :src="image.image"
20
           :key="i"
20
           :key="i"
21
         />
21
         />
22
       </carousel>
22
       </carousel>

+ 13
- 6
src/components/property/residential/singleView/contentSection.vue Parādīt failu

15
             ></iframe>
15
             ></iframe>
16
             <div v-for="(image, i) in propertyImages" @click="index = i" :key="i">
16
             <div v-for="(image, i) in propertyImages" @click="index = i" :key="i">
17
               <div v-if="i < 3">
17
               <div v-if="i < 3">
18
-                <img v-if="i === 0" style="width:100%" :src="image" />
18
+                <img v-if="i === 0" style="width:100%" :src="image.image" />
19
                 <div v-else-if="i !== 0">
19
                 <div v-else-if="i !== 0">
20
                   <img
20
                   <img
21
                     v-if="i % 2 === 0"
21
                     v-if="i % 2 === 0"
22
                     style="width:50%; height:140px; float:right;"
22
                     style="width:50%; height:140px; float:right;"
23
-                    :src="image"
23
+                    :src="image.image"
24
                   />
24
                   />
25
-                  <img v-else style="width:50%; height:140px; float:left" :src="image" />
25
+                  <img v-else style="width:50%; height:140px; float:left" :src="image.image" />
26
                 </div>
26
                 </div>
27
               </div>
27
               </div>
28
             </div>
28
             </div>
29
 
29
 
30
-            <gallery :images="propertyImages" :index="index" @close="index = null"></gallery>
30
+            <gallery :images="Images" :index="index" @close="index = null"></gallery>
31
           </div>
31
           </div>
32
           <div class="panel-left p-5" style="margin-top:130px">
32
           <div class="panel-left p-5" style="margin-top:130px">
33
             <h2>Property Detial</h2>
33
             <h2>Property Detial</h2>
39
             <p>{{ property.city }}, {{ property.suburb }}</p>
39
             <p>{{ property.city }}, {{ property.suburb }}</p>
40
             <div v-for="(data, i) in property.displayData" :key="i">
40
             <div v-for="(data, i) in property.displayData" :key="i">
41
               <div v-for="field in data.values" :key="field.id">
41
               <div v-for="field in data.values" :key="field.id">
42
-                <p v-if="field.name === 'Floor Size'">{{ field.value }}M<sup>2</sup></p>
42
+                <p v-if="field.name === 'Floor Size'">{{ field.value }}</p>
43
                 <p v-if="field.name === 'Bedrooms'">Bedrooms {{ field.value }}</p>
43
                 <p v-if="field.name === 'Bedrooms'">Bedrooms {{ field.value }}</p>
44
                 <p v-if="field.name === 'Bathrooms'">Bathrooms {{ field.value }}</p>
44
                 <p v-if="field.name === 'Bathrooms'">Bathrooms {{ field.value }}</p>
45
               </div>
45
               </div>
102
 
102
 
103
             <div v-for="(data, i) in property.displayData" :key="i" class="row my-3">
103
             <div v-for="(data, i) in property.displayData" :key="i" class="row my-3">
104
               <div v-for="(field, j) in data.values" :key="j" class="col-md-6">
104
               <div v-for="(field, j) in data.values" :key="j" class="col-md-6">
105
-                <div v-if="field.value.toUpperCase() != 'YES'">
105
+                <div v-if="field.value.toUpperCase() != 'TRUE'">
106
                   <i class="fa fa-check-circle"></i> {{ field.value }} {{ field.name }}
106
                   <i class="fa fa-check-circle"></i> {{ field.value }} {{ field.name }}
107
                 </div>
107
                 </div>
108
                 <div v-else><i class="fa fa-check-circle"></i> {{ field.name }}</div>
108
                 <div v-else><i class="fa fa-check-circle"></i> {{ field.name }}</div>
185
         return url;
185
         return url;
186
       }
186
       }
187
       return "";
187
       return "";
188
+    },
189
+    Images() {
190
+      const list = [];
191
+      for (let i = 0; i < this.propertyImages.length; i++) {
192
+        list.push(this.propertyImages[i].image);
193
+      }
194
+      return list;
188
     }
195
     }
189
   }
196
   }
190
 };
197
 };

+ 1
- 1
src/components/property/residential/singleView/singleResidentialPage.vue Parādīt failu

44
       }
44
       }
45
     }, 100);
45
     }, 100);
46
 
46
 
47
-    this.mayEditProperty(this.$route.params.id);
47
+    //this.mayEditProperty(this.$route.params.id);
48
   },
48
   },
49
   computed: {
49
   computed: {
50
     ...mapState("property", ["property", "propertyImages"]),
50
     ...mapState("property", ["property", "propertyImages"]),

Notiek ielāde…
Atcelt
Saglabāt