Browse Source

Timeshare sell & Property Listing fix

master
30117125 3 years ago
parent
commit
e60db850f1

+ 18
- 2
src/components/admin/status/editTimeShareAdminPage.vue View File

@@ -648,7 +648,22 @@ export default {
648 648
     this.selectedResort = this.weekParam.resort.resortCode;
649 649
     this.selectedBedrooms = this.weekParam.bedrooms;
650 650
     this.selectedMaxSleep = this.weekParam.maxSleep;
651
-    this.selectedWeekType = this.weekParam.weekType;
651
+    var weekTypeEnum = "";
652
+    switch (this.weekParam.weekType.toUpperCase()) {
653
+      case "FLEXI":
654
+        weekTypeEnum = "0";
655
+        break;
656
+      case "FIXED":
657
+        weekTypeEnum = "1";
658
+        break;
659
+      case "MODULE":
660
+        weekTypeEnum = "2";
661
+        break;
662
+      case "SYNDICATE":
663
+        weekTypeEnum = "3";
664
+        break;
665
+    }
666
+    this.selectedWeekType = weekTypeEnum;
652 667
     this.selectedStatus = this.weekParam.status;
653 668
     this.selectedPublish = this.weekParam.publish;
654 669
     this.fixDates();
@@ -848,13 +863,14 @@ export default {
848 863
       this.weekParam.module = this.week.module;
849 864
       parseFloat(this.weekParam.sellPrice);
850 865
       parseFloat(this.weekParam.levyAmount);
851
-      this.weekParam.weekType = this.selectedWeekType;
866
+      this.weekParam.weekType = parseInt(this.selectedWeekType);
852 867
       delete this.weekParam.Owner;
853 868
       delete this.weekParam.agency;
854 869
       delete this.weekParam.agent;
855 870
       //delete this.status;
856 871
       delete this.weekParam.owner.howMarried;
857 872
       delete this.weekParam.cellNumber;
873
+      console.log(this.weekParam);
858 874
       console.log(this.week.owner);
859 875
       this.week.owner.name =
860 876
         this.week.owner.name.charAt(0).toUpperCase() + this.week.owner.name.slice(1);

+ 10
- 18
src/components/property/commercial/createProperty/commercialCreateNew.vue View File

@@ -371,7 +371,7 @@ export default {
371 371
       addressSet: false,
372 372
       showPropertyTypeError: false,
373 373
       showDateError: false,
374
-      user: Log.getUser(),
374
+      comUser: Log.getUser(),
375 375
       mayEdit: Log.isLoggedIn()
376 376
     };
377 377
   },
@@ -438,18 +438,17 @@ export default {
438 438
         });
439 439
       }
440 440
       this.property.propertyUserFields = this.propertyFieldValues;
441
-
442
-      if (this.user) {
443
-        this.property.userId = this.user.id;
441
+      this.property.propertyUserFields.forEach(field => {
442
+        if (field.type === "yesno") {
443
+          if (field.value) {
444
+            field.value = "true";
445
+          }
446
+        }
447
+      });
448
+      if (this.comUser) {
449
+        this.property.userId = this.comUser.id;
444 450
       }
445 451
 
446
-      // this.property.propertyUserFields.forEach(item => {
447
-      //   if (item.value === true) {
448
-      //     item.value = "yes";
449
-      //   } else if (item.value === false) {
450
-      //     item.value = "no";
451
-      //   }
452
-      // });
453 452
       if (Log.getUser().role === "Agency" || Log.getUser().role === "Agent") {
454 453
         this.retrieveAgency().then(() => {
455 454
           this.property.agentId = this.agent[0].id;
@@ -550,21 +549,14 @@ export default {
550 549
       return display;
551 550
     },
552 551
     SalesTypeChanged() {
553
-      // eslint-disable-next-line vue/no-side-effects-in-computed-properties
554
-      // this.propertyType = this.$route.params.propType;
555
-      // eslint-disable-next-line vue/no-side-effects-in-computed-properties
556 552
       this.salesType = this.$route.params.saleType;
557 553
       if (this.property && this.property.propertyUsageType) {
558
-        // eslint-disable-next-line vue/no-side-effects-in-computed-properties
559 554
         this.propertyType = this.property.propertyUsageType;
560 555
       }
561
-
562 556
       if (!this.$route.query.id) {
563 557
         this.getPropertyFields(this.propertyType);
564 558
       }
565
-
566 559
       this.getPropertyTypes(this.propertyType);
567
-
568 560
       return this.propertyType;
569 561
     }
570 562
   },

+ 13
- 3
src/components/property/propertyUserField.vue View File

@@ -4,7 +4,11 @@
4 4
       <div v-if="!setFields[i] && currentField.type !== 'yesno'">
5 5
         <label class="uniSelectLabel" style="margin-top:10px;">{{ currentField.name }}</label>
6 6
       </div>
7
-      <float-label :label="currentField.name" style="width:100%;top:-1em !important;">
7
+      <float-label
8
+        v-if="currentField.type === 'number'"
9
+        :label="currentField.name"
10
+        style="width:100%;top:-1em !important;"
11
+      >
8 12
         <input
9 13
           v-if="currentField.type === 'number'"
10 14
           class="form-control uniInput"
@@ -15,7 +19,12 @@
15 19
           v-model="setFields[i]"
16 20
           @change="UpdateSetFields(currentField, i)"
17 21
         />
18
-
22
+      </float-label>
23
+      <float-label
24
+        v-if="currentField.type === 'text'"
25
+        :label="currentField.name"
26
+        style="width:100%;top:-1em !important;"
27
+      >
19 28
         <input
20 29
           v-if="currentField.type === 'text'"
21 30
           class="form-control uniInput"
@@ -57,7 +66,8 @@ export default {
57 66
     UpdateSetFields(field, index) {
58 67
       const item = {
59 68
         userDefinedFieldId: field.id,
60
-        value: this.setFields[index]
69
+        value: this.setFields[index],
70
+        type: field.type
61 71
       };
62 72
       if (item) {
63 73
         this.$emit("UpdateUserDefinedFields", item);

+ 8
- 10
src/components/property/residential/createProperty/residentialCreate.vue View File

@@ -440,16 +440,14 @@ export default {
440 440
         this.property.userId = this.user.id;
441 441
       }
442 442
       console.log(this.propertyFieldValues);
443
-
444
-      // this.saveProperty(this.property)
445
-      //   .then((fulfilled) => {
446
-      //     this.$router.push(
447
-      //       `/property/residential/property/${fulfilled.data.id}`
448
-      //     );
449
-      //   })
450
-      //   .catch((error) => {
451
-      //     console.log(error.message);
452
-      //   });
443
+      console.log("It was here");
444
+      this.saveProperty(this.property)
445
+        .then(fulfilled => {
446
+          this.$router.push(`/property/residential/property/${fulfilled.data.id}`);
447
+        })
448
+        .catch(error => {
449
+          console.log(error.message);
450
+        });
453 451
     },
454 452
     Close() {
455 453
       this.$router.push("/property/admin/list/my");

+ 70
- 75
src/components/property/residential/createProperty/residentialCreateNew.vue View File

@@ -4,9 +4,9 @@
4 4
       <div class="container pb-5">
5 5
         <div class="row">
6 6
           <div class="col">
7
-            <label v-if="!salesType" class="uniSelectLabel" for="resSaleType">Sale Type</label>
7
+            <label v-if="!resSalesType" class="uniSelectLabel" for="resSaleType">Sale Type</label>
8 8
             <float-label label="Sale Type">
9
-              <select class="form-control uniSelect mb-3" name="resSaleType" v-model="salesType">
9
+              <select class="form-control uniSelect mb-3" name="resSaleType" v-model="resSalesType">
10 10
                 <option value="Sale">To Sell</option>
11 11
                 <option value="Rental">To Rent</option>
12 12
               </select>
@@ -79,7 +79,7 @@
79 79
                       margin-left: 17px;
80 80
                       background-color: white;
81 81
                     "
82
-                    >{{ salesType }} Price</label
82
+                    >{{ resSalesType }} Price</label
83 83
                   >
84 84
                 </div>
85 85
                 <float-label label="Price">
@@ -93,7 +93,7 @@
93 93
                   />
94 94
                 </float-label>
95 95
               </div>
96
-              <div v-if="salesType === 'Rental'" class="col-md-6">
96
+              <div v-if="resSalesType === 'Rental'" class="col-md-6">
97 97
                 <select
98 98
                   class="form-control uniSelect"
99 99
                   name="resPropertyType"
@@ -229,7 +229,7 @@
229 229
         <div class="row">
230 230
           <div class="col-md-12">
231 231
             <label for="Property Description" style="font-family: 'muli'">Description:</label>
232
-            <vue-editor v-model="property.description" :editor-toolbar="customToolbar" />
232
+            <vue-editor v-model="property.description" :editor-toolbar="resCustomToolbar" />
233 233
             <br />
234 234
             <p>
235 235
               * A listing fee of R{{ getListingFee.amount }} including VAT is payable to list your
@@ -298,15 +298,15 @@
298 298
           :savedImages="propertyImages"
299 299
           @DefaultImage="UpdateDefaultImage"
300 300
         />
301
-        <button v-if="!wait" type="button" @click="SubmitData()" class="btn-solid-blue">
301
+        <button v-if="!resWait" type="button" @click="SubmitData()" class="btn-solid-blue">
302 302
           Save
303 303
         </button>
304
-        <div v-if="showPropertyTypeError">
304
+        <div v-if="resShowPropertyTypeError">
305 305
           <p class="alert myError">
306 306
             Missing fields. Please fill in all required fields. Marked with *
307 307
           </p>
308 308
         </div>
309
-        <div v-if="wait" id="preloader"></div>
309
+        <div v-if="resWait" id="preloader"></div>
310 310
       </div>
311 311
     </main>
312 312
   </div>
@@ -336,13 +336,13 @@ export default {
336 336
   },
337 337
   data() {
338 338
     return {
339
-      propertyType: "Residential",
340
-      salesType: "Rental",
341
-      images: [],
342
-      propertyFieldValues: [],
343
-      defaultImage: 0,
344
-      wait: false,
345
-      customToolbar: [
339
+      resPropertyType: "Residential",
340
+      resSalesType: "Rental",
341
+      resImages: [],
342
+      resPropertyFieldValues: [],
343
+      resDefaultImage: 0,
344
+      resWait: false,
345
+      resCustomToolbar: [
346 346
         [{ header: [false, 1, 2, 3, 4, 5, 6] }],
347 347
         ["bold", "italic", "underline", "strike"],
348 348
         [{ align: "" }, { align: "center" }, { align: "right" }, { align: "justify" }],
@@ -350,13 +350,10 @@ export default {
350 350
         [{ script: "sub" }, { script: "super" }],
351 351
         [{ indent: "-1" }, { indent: "+1" }]
352 352
       ],
353
-      error: "",
354
-      addressSet: false,
355
-      showPropertyTypeError: false,
356
-      showDateError: false,
357
-      user: Log.getUser(),
358
-      mayEdit: Log.isLoggedIn(),
359
-      myprice: "0"
353
+      resAddressSet: false,
354
+      resShowPropertyTypeError: false,
355
+      resShowDateError: false,
356
+      resUser: Log.getUser()
360 357
     };
361 358
   },
362 359
   methods: {
@@ -375,7 +372,7 @@ export default {
375 372
     ]),
376 373
     ...mapActions("register", ["getAgentById"]),
377 374
     updateLocation(place) {
378
-      this.addressSet = true;
375
+      this.resAddressSet = true;
379 376
       this.property.streetNumber = place.streetNumber;
380 377
       this.property.streetName = place.streetName;
381 378
       this.property.suburb = place.suburb;
@@ -387,52 +384,52 @@ export default {
387 384
       this.property.propertCoords = place.coords;
388 385
     },
389 386
     TypeChanged() {
390
-      this.property.propertyUsageType = this.propertyType;
387
+      this.property.propertyUsageType = this.resPropertyType;
391 388
     },
392 389
     SubmitData() {
393 390
       if (this.property.propertyTypeId === 0) {
394
-        this.showPropertyTypeError = true;
391
+        this.resShowPropertyTypeError = true;
395 392
       }
396 393
 
397
-      if (this.salesType === "Rental" && this.property.dateAvailable === "undef") {
398
-        this.showDateError = true;
394
+      if (this.resSalesType === "Rental" && this.property.dateAvailable === "undef") {
395
+        this.resShowDateError = true;
399 396
       }
400 397
 
401
-      if (this.showPropertyTypeError || this.showDateError) {
398
+      if (this.resShowPropertyTypeError || this.resShowDateError) {
402 399
         return;
403 400
       }
404 401
 
405
-      this.wait = true;
406
-      if (this.salesType === "Sale") {
402
+      this.resWait = true;
403
+      if (this.resSalesType === "Sale") {
407 404
         this.property.isSale = true;
408 405
         this.property.dateAvailable = new Date();
409 406
       }
410
-      if (this.images.length > 0) {
407
+      if (this.resImages.length > 0) {
411 408
         this.property.propertyImages = [];
412 409
       }
413 410
       // eslint-disable-next-line no-plusplus
414
-      for (let i = 0; i < this.images.length; i++) {
411
+      for (let i = 0; i < this.resImages.length; i++) {
415 412
         let setAsDefault = false;
416
-        if (i === this.defaultImage) {
413
+        if (i === this.resDefaultImage) {
417 414
           setAsDefault = true;
418 415
         }
419 416
         this.property.propertyImages.push({
420
-          image: this.images[i],
417
+          image: this.resImages[i],
421 418
           isDefault: setAsDefault
422 419
         });
423 420
       }
424
-      this.property.propertyUserFields = this.propertyFieldValues;
425
-
426
-      if (this.user) {
427
-        this.property.userId = this.user.id;
421
+      this.property.propertyUserFields = this.resPropertyFieldValues;
422
+      this.property.propertyUserFields.forEach(field => {
423
+        if (field.type === "yesno") {
424
+          if (field.value) {
425
+            field.value = "true";
426
+          }
427
+        }
428
+      });
429
+      if (this.resUser) {
430
+        this.property.userId = this.resUser.id;
428 431
       }
429
-      // this.property.propertyUserFields.forEach(item => {
430
-      //   if (item.value === true) {
431
-      //     item.value = "yes";
432
-      //   } else if (item.value === false) {
433
-      //     item.value = "no";
434
-      //   }
435
-      // });
432
+
436 433
       if (Log.getUser().role === "Agency" || Log.getUser().role === "Agent") {
437 434
         this.retrieveAgency().then(() => {
438 435
           this.property.agentId = this.agent[0].id;
@@ -440,6 +437,7 @@ export default {
440 437
         });
441 438
       }
442 439
       //console.log(this.property);
440
+      //console.log(JSON.stringify(this.property));
443 441
       this.saveProperty(this.property)
444 442
         .then(fulfilled => {
445 443
           this.$router.push(`/property/residential/property/${fulfilled.data.id}`);
@@ -459,31 +457,40 @@ export default {
459 457
     },
460 458
     PropertyTypeSelected(item) {
461 459
       if (item.target.options.selectedIndex > 0) {
462
-        this.showPropertyTypeError = false;
460
+        this.resShowPropertyTypeError = false;
463 461
       } else {
464
-        this.showPropertyTypeError = true;
462
+        this.resShowPropertyTypeError = true;
465 463
       }
466 464
     },
467 465
     loadedImages(values) {
468
-      this.images = values;
466
+      this.resImages = values;
469 467
     },
470 468
     UpdateUserResidentialFields(item) {
471 469
       let update = false;
472
-      this.propertyFieldValues.forEach(element => {
470
+
471
+      this.resPropertyFieldValues.forEach(element => {
473 472
         if (element.userDefinedFieldId === item.userDefinedFieldId) {
474
-          element.value = item.value;
475
-          update = true;
473
+          if (item.type !== "yesno") {
474
+            element.value = item.value;
475
+            update = true;
476
+          } else {
477
+            if (item.value) {
478
+              element.value = "true";
479
+            } else {
480
+              element.value = "false";
481
+            }
482
+          }
476 483
         }
477 484
       });
478 485
       if (!update) {
479
-        this.propertyFieldValues.push(item);
486
+        this.resPropertyFieldValues.push(item);
480 487
       }
481 488
     },
482 489
     UpdateDefaultImage(item) {
483
-      this.defaultImage = item;
490
+      this.resDefaultImage = item;
484 491
     },
485 492
     clearAddress() {
486
-      this.addressSet = false;
493
+      this.resAddressSet = false;
487 494
       this.property.streetNumber = undefined;
488 495
       this.property.streetName = undefined;
489 496
       this.property.suburb = undefined;
@@ -506,11 +513,11 @@ export default {
506 513
     }
507 514
   },
508 515
   mounted() {
509
-    this.wait = false;
516
+    this.resWait = false;
510 517
     this.getProperty(0);
511 518
     this.clearPropertyImages();
512
-    this.images = [];
513
-    this.defaultImage = 0;
519
+    this.resImages = [];
520
+    this.resDefaultImage = 0;
514 521
 
515 522
     if (this.propertyOverviewFields.length > 0) {
516 523
       this.propertyOverviewFields = [];
@@ -523,9 +530,9 @@ export default {
523 530
     }
524 531
 
525 532
     if (this.$route.params.propertyUsageType) {
526
-      this.propertyType = this.$route.params.propertyUsageType;
533
+      this.resPropertyType = this.$route.params.propertyUsageType;
527 534
     }
528
-    this.salesType = this.$route.params.saleType;
535
+    this.resSalesType = this.$route.params.saleType;
529 536
 
530 537
     this.getPropertyTypesRes();
531 538
 
@@ -543,27 +550,15 @@ export default {
543 550
     ...mapState("authentication", ["user"]),
544 551
     ...mapGetters("fees", ["getListingFee"]),
545 552
     ...mapState("register", ["agent"]),
546
-    sortFields() {
547
-      return this.propertyFields[0].fields.sort((a, b) => (a.rank > b.rank ? 1 : -1));
548
-    },
549 553
     SalesTypeChanged() {
550
-      // eslint-disable-next-line vue/no-side-effects-in-computed-properties
551
-      // this.propertyType = this.$route.params.propType;
552
-      // eslint-disable-next-line vue/no-side-effects-in-computed-properties
553
-      this.salesType = this.$route.params.saleType;
554
+      this.resSalesType = this.$route.params.saleType;
554 555
       if (this.property && this.property.propertyUsageType) {
555
-        // eslint-disable-next-line vue/no-side-effects-in-computed-properties
556
-        this.propertyType = this.property.propertyUsageType;
556
+        this.resPropertyType = this.property.propertyUsageType;
557 557
       }
558
-
559 558
       if (!this.$route.query.id) {
560
-        this.getPropertyFields(this.propertyType);
559
+        this.getPropertyFields(this.resPropertyType);
561 560
       }
562
-
563
-      return this.propertyType;
564
-    },
565
-    userFieldsArr() {
566
-      return this.userFieldsArrFunc(this.propertyFields, 4);
561
+      return this.resPropertyType;
567 562
     }
568 563
   },
569 564
   watch: {

+ 5
- 22
src/components/property/residential/singleView/contentSection.vue View File

@@ -122,8 +122,8 @@
122 122
               <div class="col-md-4">
123 123
                 <button
124 124
                   style="float:right; white-space: nowrap;"
125
-                  :class="checkStatus() ? 'btn-disabled mt-3' : 'btn-solid-blue mt-3'"
126
-                  :disabled="checkStatus()"
125
+                  :class="status ? 'btn-disabled mt-3' : 'btn-solid-blue mt-3'"
126
+                  :disabled="status"
127 127
                   @click="goToSingle()"
128 128
                 >
129 129
                   ENQUIRE NOW
@@ -188,7 +188,8 @@ export default {
188 188
   },
189 189
   props: {
190 190
     property: {},
191
-    propertyImages: {}
191
+    propertyImages: {},
192
+    status: {}
192 193
   },
193 194
   async mounted() {
194 195
     await this.checkForVideos;
@@ -203,7 +204,7 @@ export default {
203 204
   },
204 205
   methods: {
205 206
     //...mapActions("searchTab", ["getListsForPropertyEdit"])
206
-    ...mapActions("status", ["getSingleStatus"]),
207
+
207 208
     checkForVideos() {
208 209
       if (this.property.video === "") {
209 210
         this.property.video = null;
@@ -214,23 +215,10 @@ export default {
214 215
     },
215 216
     goToSingle() {
216 217
       this.$router.push({ name: "EnquireNow", params: { id: this.$route.params.id } });
217
-    },
218
-    checkStatus() {
219
-      this.getSingleStatus(this.property.statusId);
220
-      if (
221
-        this.singleStatus.code === "CIP" ||
222
-        this.singleStatus.code === "S" ||
223
-        this.singleStatus.code === "P"
224
-      ) {
225
-        return true;
226
-      } else {
227
-        return false;
228
-      }
229 218
     }
230 219
   },
231 220
   computed: {
232 221
     //...mapState("searchTab", ["provinces", "cities", "suburbs"]),
233
-    ...mapState("status", ["singleStatus"]),
234 222
     propertyMap() {
235 223
       if (this.property.propertCoords) {
236 224
         var lat = this.property.propertCoords.split(",")[0];
@@ -246,11 +234,6 @@ export default {
246 234
       }
247 235
       return "";
248 236
     },
249
-    propertyFeatures() {
250
-      this.property.displayData.forEach(data => {
251
-        console.log(data);
252
-      });
253
-    },
254 237
     Images() {
255 238
       const list = [];
256 239
       for (let i = 0; i < this.propertyImages.length; i++) {

+ 16
- 24
src/components/property/residential/singleView/singleResidentialPage.vue View File

@@ -1,14 +1,9 @@
1 1
 <template>
2 2
   <div>
3
-    <!-- <carouselSection :propertyImages="propertyImages" @Loaded="CarouselDone" /> -->
4 3
     <main id="main" style="margin-top: 20px">
5
-      <contentSection
6
-        :property="property"
7
-        :propertyImages="propertyImages"
8
-        @Loaded="ContentDone"
9
-      />
4
+      <contentSection :property="property" :propertyImages="propertyImages" :status="checkStatus" />
10 5
     </main>
11
-    <div v-if="Wait" id="preloader"></div>
6
+    <div v-if="wait" id="preloader"></div>
12 7
   </div>
13 8
 </template>
14 9
 
@@ -24,36 +19,39 @@ export default {
24 19
   name: "property",
25 20
   components: {
26 21
     makeOffer,
27
-    contentSection,
22
+    contentSection
28 23
   },
29 24
   data() {
30 25
     return {
31 26
       index: null,
32 27
       date: new Date(),
33 28
       boolLoaded: false,
34
-      wait: false,
35
-      contentloaded: false,
29
+      wait: true
36 30
     };
37 31
   },
38 32
   mounted() {
39 33
     this.clearPropertyImages();
40
-    this.getDisplayProperty(this.$route.params.id).then((data) => {
34
+    this.getDisplayProperty(this.$route.params.id).then(data => {
41 35
       this.wait = false;
42 36
     });
43 37
   },
44 38
   computed: {
45 39
     ...mapState("property", ["property", "propertyImages"]),
46
-    Wait() {
47
-      if (this.wait && !this.contentloaded) {
40
+    checkStatus() {
41
+      if (
42
+        this.property.statusCode === "CIP" ||
43
+        this.property.statusCode === "S" ||
44
+        this.property.statusCode === "P"
45
+      ) {
48 46
         return true;
47
+      } else {
48
+        return false;
49 49
       }
50
-      return false;
51
-    },
50
+    }
52 51
   },
53 52
   methods: {
54 53
     ...mapActions("property", ["getDisplayProperty", "clearPropertyImages"]),
55 54
     ...mapActions("propertyEdit", ["mayEditProperty"]),
56
-
57 55
     formatPrice(value) {
58 56
       const val = (value / 1).toFixed(2);
59 57
       return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
@@ -63,17 +61,11 @@ export default {
63 61
         return `${value}<br/>`;
64 62
       }
65 63
       return "";
66
-    },
67
-    CarouselDone() {
68
-      this.carouselLoaded = true;
69
-    },
70
-    ContentDone() {
71
-      this.contentloaded = true;
72
-    },
64
+    }
73 65
   },
74 66
   beforeDestroy() {
75 67
     this.clearPropertyImages();
76
-  },
68
+  }
77 69
 };
78 70
 </script>
79 71
 

+ 15
- 0
src/components/timeshare/sell/contentSectionNew.vue View File

@@ -332,6 +332,7 @@
332 332
                     type="text"
333 333
                     name="name"
334 334
                     class="form-control"
335
+                    :disabled="ChangeCustomUser"
335 336
                     id="name"
336 337
                     placeholder="Name"
337 338
                     data-rule="minlen:4"
@@ -347,6 +348,7 @@
347 348
                   <input
348 349
                     type="text"
349 350
                     class="form-control"
351
+                    :disabled="ChangeCustomUser"
350 352
                     name="surname"
351 353
                     id="surname"
352 354
                     placeholder="Surname"
@@ -365,6 +367,7 @@
365 367
                     type="text"
366 368
                     name="idnum"
367 369
                     class="form-control"
370
+                    :disabled="ChangeCustomUser"
368 371
                     id="idnum"
369 372
                     placeholder="ID Number"
370 373
                     data-rule="minlen:4"
@@ -380,6 +383,7 @@
380 383
                   <input
381 384
                     type="text"
382 385
                     class="form-control"
386
+                    :disabled="ChangeCustomUser"
383 387
                     name="company"
384 388
                     id="company"
385 389
                     placeholder="Company Reg Number"
@@ -405,6 +409,7 @@
405 409
                     <select
406 410
                       class="form-control uniSelect"
407 411
                       id="howMarried"
412
+                      :disabled="ChangeCustomUser"
408 413
                       v-model="indiv.howMarried"
409 414
                     >
410 415
                       <option v-bind:value="0">N/A</option>
@@ -428,6 +433,7 @@
428 433
                     type="text"
429 434
                     class="form-control"
430 435
                     name="email"
436
+                    :disabled="ChangeCustomUser"
431 437
                     id="email"
432 438
                     placeholder="Email Address"
433 439
                     data-msg="Please enter your email address"
@@ -445,6 +451,7 @@
445 451
                     type="text"
446 452
                     name="cell"
447 453
                     class="form-control"
454
+                    :disabled="ChangeCustomUser"
448 455
                     id="cell"
449 456
                     placeholder="Cell Number"
450 457
                     data-rule="minlen:4"
@@ -460,6 +467,7 @@
460 467
                   <input
461 468
                     type="text"
462 469
                     class="form-control"
470
+                    :disabled="ChangeCustomUser"
463 471
                     name="landline"
464 472
                     id="landline"
465 473
                     placeholder="Landline Number"
@@ -972,6 +980,13 @@ export default {
972 980
       });
973 981
       return notDeletedArr;
974 982
     },
983
+    ChangeCustomUser() {
984
+      if (this.selectedUserType === "myself") {
985
+        return true;
986
+      } else {
987
+        return false;
988
+      }
989
+    },
975 990
     CanSave() {
976 991
       if (this.indiv.howMarried === "In Community Of Property") {
977 992
         if (this.indiv.spouseName || this.indiv.spouseSurname || this.spouseEmail) {

+ 2
- 2
src/router/index.js View File

@@ -23,8 +23,8 @@ import PropertyPage from "../components/property/propertyPage.vue";
23 23
 import PropertyEdit from "../components/property/editProperty/editProperty.vue";
24 24
 
25 25
 import PropertyCreate from "../components/property/propertyCreate.vue";
26
-import CommercialCreate from "../components/property/commercial/createProperty/commercialCreate.vue";
27
-import ResidentialCreate from "../components/property/residential/createProperty/residentialCreate.vue";
26
+import CommercialCreate from "../components/property/commercial/createProperty/commercialCreateNew.vue";
27
+import ResidentialCreate from "../components/property/residential/createProperty/residentialCreateNew.vue";
28 28
 import ListProperty from "../components/property/ListProperty/listPropertyPage.vue";
29 29
 
30 30
 import PropertyAdminList from "../components/admin/property/propertyAdmin.vue";

+ 1
- 0
src/store/modules/property/property.js View File

@@ -97,6 +97,7 @@ export default {
97 97
         .catch(ex => console.log(ex.response));
98 98
     },
99 99
     getSavedPropertyImages({ commit }, id) {
100
+      console.log(id);
100 101
       axios
101 102
         .get(`/api/PropertyImage/GetProperySavedImages/${id}`)
102 103
         .then(result => commit("setPropertyImages", result.data))

Loading…
Cancel
Save