Lene 4 years ago
parent
commit
0e50526ad0
29 changed files with 22654 additions and 21733 deletions
  1. 7921
    7817
      public/css/bootstrap.css
  2. 7921
    7817
      public/css/bootstrap.min.css
  3. BIN
      public/img/sort-down.png
  4. BIN
      public/img/sort-up.png
  5. 6043
    5694
      public/lib/bootstrap/css/bootstrap.css
  6. 8
    0
      src/App.vue
  7. 2
    0
      src/assets/staticData/itemsPerPageFive.js
  8. 156
    7
      src/components/admin/property/propertyList.vue
  9. 7
    3
      src/components/admin/status/editTimeShareAdminPage.vue
  10. 2
    0
      src/components/admin/status/timeshareAdminPage.vue
  11. 35
    16
      src/components/property/ListProperty/contentSection.vue
  12. 15
    9
      src/components/property/commercial/commercialSearchResults.vue
  13. 7
    12
      src/components/property/commercial/createProperty/commercialCreateNew.vue
  14. 26
    15
      src/components/property/commercial/singleView/contentSection.vue
  15. 30
    2
      src/components/property/editProperty/editProperty.vue
  16. 80
    50
      src/components/property/enquireNow/contentSection.vue
  17. 17
    15
      src/components/property/propertyCard.vue
  18. 111
    0
      src/components/property/propertyCardSearch.vue
  19. 9
    9
      src/components/property/propertyImage.vue
  20. 32
    42
      src/components/property/propertyUserField.vue
  21. 55
    83
      src/components/property/residential/createProperty/residentialCreateNew.vue
  22. 14
    8
      src/components/property/residential/residentialSearchResults.vue
  23. 42
    23
      src/components/property/residential/singleView/contentSection.vue
  24. 78
    77
      src/components/shared/listView.vue
  25. 8
    4
      src/components/timeshare/resort/resortPageNew.vue
  26. 22
    22
      src/components/timeshare/sell/contentSection.vue
  27. 5
    2
      src/main.js
  28. 6
    4
      src/store/modules/property/property.js
  29. 2
    2
      src/store/modules/timeshare/myWeeks.js

+ 7921
- 7817
public/css/bootstrap.css
File diff suppressed because it is too large
View File


+ 7921
- 7817
public/css/bootstrap.min.css
File diff suppressed because it is too large
View File


BIN
public/img/sort-down.png View File


BIN
public/img/sort-up.png View File


+ 6043
- 5694
public/lib/bootstrap/css/bootstrap.css
File diff suppressed because it is too large
View File


+ 8
- 0
src/App.vue View File

136
   background-color: #ff8344;
136
   background-color: #ff8344;
137
   color: white;
137
   color: white;
138
 }
138
 }
139
+.redText {
140
+  background-color: #eb5252;
141
+  color: white;
142
+}
143
+.greenText {
144
+  background-color: #43e243;
145
+  color: white;
146
+}
139
 .noWeeks {
147
 .noWeeks {
140
   background-color: #ff4444;
148
   background-color: #ff4444;
141
 }
149
 }

+ 2
- 0
src/assets/staticData/itemsPerPageFive.js View File

1
+const items = [5, 10, 15, 20, 25, 50, 100];
2
+export default items;

+ 156
- 7
src/components/admin/property/propertyList.vue View File

17
           <table class="table table-striped table-responsive">
17
           <table class="table table-striped table-responsive">
18
             <thead>
18
             <thead>
19
               <tr>
19
               <tr>
20
-                <th scope="col">Owner</th>
21
-                <th scope="col">Reference</th>
22
-                <th scope="col">Property</th>
20
+                <th scope="col" v-for="(col, c) in displayColumns" :key="c">
21
+                  <div @click="sortBy(columns[c])" style="cursor: pointer;">
22
+                    <div class="d-flex bd-highlight">
23
+                      <div class="w-100 bd-highlight">{{ col }}</div>
24
+                      <div class="flex-shrink-1 bd-highlight">
25
+                        <img
26
+                          src="../../../../public/img/sort-up.png"
27
+                          height="8px;"
28
+                          v-if="sortKey === columns[c] && reverse"
29
+                        />
30
+                        <img
31
+                          src="../../../../public/img/sort-down.png"
32
+                          height="8px;"
33
+                          v-if="sortKey === columns[c] && !reverse"
34
+                        />
35
+                      </div>
36
+                    </div>
37
+                  </div>
38
+                </th>
39
+                <!-- <th scope="col">Property</th>
23
                 <th scope="col">Unit</th>
40
                 <th scope="col">Unit</th>
24
                 <th scope="col">Size</th>
41
                 <th scope="col">Size</th>
25
                 <th scope="col">Price Ex VAT</th>
42
                 <th scope="col">Price Ex VAT</th>
28
                 <th scope="col">Suburb</th>
45
                 <th scope="col">Suburb</th>
29
                 <th scope="col">Status</th>
46
                 <th scope="col">Status</th>
30
                 <th scope="col">Type</th>
47
                 <th scope="col">Type</th>
31
-                <th scope="col">Publish</th>
48
+                <th scope="col">Publish</th>-->
32
                 <th scope="col">Edit</th>
49
                 <th scope="col">Edit</th>
33
                 <th scope="col">Delete</th>
50
                 <th scope="col">Delete</th>
34
               </tr>
51
               </tr>
35
             </thead>
52
             </thead>
36
             <tbody>
53
             <tbody>
37
-              <tr v-for="(item, i) in FilteredProperties" :key="i">
54
+              <tr v-for="(item, i) in DisplayItems" :key="i">
38
                 <td>{{ item.owner }}</td>
55
                 <td>{{ item.owner }}</td>
39
                 <td>{{ item.reference }}</td>
56
                 <td>{{ item.reference }}</td>
40
                 <td>{{ item.property }}</td>
57
                 <td>{{ item.property }}</td>
73
               </tr>
90
               </tr>
74
             </tbody>
91
             </tbody>
75
           </table>
92
           </table>
93
+          <div class="d-flex justify-content-between" v-if="showPager">
94
+            <div class="p-1">
95
+              {{
96
+              currentPage +
97
+              " / " +
98
+              PageCount +
99
+              (" - (" + FilteredProperties.length + " items)")
100
+              }}
101
+            </div>
102
+            <div class="p-1">
103
+              <BasePagination
104
+                :currentPage="currentPage"
105
+                :pageCount="PageCount"
106
+                @nextPage="pageChangeHandle('next')"
107
+                @previousPage="pageChangeHandle('previous')"
108
+                @loadPage="pageChangeHandle"
109
+              />
110
+            </div>
111
+            <div class="p-2">
112
+              <div class="d-flex flex-row">
113
+                <div>
114
+                  <select
115
+                    class="form-control uniSelect"
116
+                    v-model="visibleItemsPerPageCount"
117
+                    @change="onChangeItemsPerPage()"
118
+                  >
119
+                    <option v-for="(item, i) in itemsPerPageList" :key="i">{{ item }}</option>
120
+                  </select>
121
+                </div>
122
+              </div>
123
+            </div>
124
+          </div>
125
+          <div class="p-2">
126
+            <div class="d-flex flex-row">
127
+              <div>
128
+                <button v-if="sortKey !== 'id'" class="btn-solid-blue" @click="ClearSort">Clear Sort</button>
129
+              </div>
130
+            </div>
131
+          </div>
76
         </div>
132
         </div>
77
       </div>
133
       </div>
78
       <div v-if="wait" id="preloader"></div>
134
       <div v-if="wait" id="preloader"></div>
83
 <script>
139
 <script>
84
 import { mapState, mapActions } from "vuex";
140
 import { mapState, mapActions } from "vuex";
85
 import Log from "../../../assets/Log";
141
 import Log from "../../../assets/Log";
142
+import BasePagination from "../../shared/basePagination";
143
+import ItemsPerPageList from "../../../assets/staticData/itemsPerPageFive";
86
 import _ from "lodash";
144
 import _ from "lodash";
87
 
145
 
88
 export default {
146
 export default {
147
+  components: {
148
+    BasePagination,
149
+  },
89
   data() {
150
   data() {
90
     return {
151
     return {
152
+      hover: -1,
91
       filter: undefined,
153
       filter: undefined,
92
       userId: Log.getUser().id,
154
       userId: Log.getUser().id,
93
       wait: true,
155
       wait: true,
156
+      showPager: true,
157
+      visibleItemsPerPageCount: 10,
158
+      itemsPerPageList: ItemsPerPageList,
159
+      currentPage: 1,
160
+      reverse: true,
161
+      sortKey: "id",
162
+      displayColumns: [
163
+        "Owner",
164
+        "Reference",
165
+        "Property",
166
+        "Unit",
167
+        "Size",
168
+        "Price Ex VAT",
169
+        "Region",
170
+        "Town",
171
+        "Suburb",
172
+        "Status",
173
+        "Type",
174
+        "Publish",
175
+      ],
176
+      columns: [
177
+        "owner",
178
+        "reference",
179
+        "property",
180
+        "unit",
181
+        "size",
182
+        "price",
183
+        "region",
184
+        "town",
185
+        "suburb",
186
+        "status",
187
+        "type",
188
+        "isPublished",
189
+      ],
94
     };
190
     };
95
   },
191
   },
96
   methods: {
192
   methods: {
112
     Delete(item) {
208
     Delete(item) {
113
       this.deleteProperty(item.id);
209
       this.deleteProperty(item.id);
114
     },
210
     },
211
+    async pageChangeHandle(value) {
212
+      switch (value) {
213
+        case "next":
214
+          this.currentPage += 1;
215
+          break;
216
+        case "previous":
217
+          this.currentPage -= 1;
218
+          break;
219
+        default:
220
+          this.currentPage = value;
221
+      }
222
+    },
223
+    sortBy(sortKey) {
224
+      this.reverse = this.sortKey === sortKey ? !this.reverse : false;
225
+      this.sortKey = sortKey;
226
+    },
227
+    ClearSort() {
228
+      this.reverse = true;
229
+      this.sortKey = "id";
230
+    },
115
   },
231
   },
116
   computed: {
232
   computed: {
117
     ...mapState("propertyList", ["properties"]),
233
     ...mapState("propertyList", ["properties"]),
125
                 .indexOf(this.filter.toLowerCase()) > -1
241
                 .indexOf(this.filter.toLowerCase()) > -1
126
           )
242
           )
127
         );
243
         );
128
-        return list;
244
+        return _.orderBy(list, this.sortKey, this.SortDirection);
129
       } else {
245
       } else {
130
-        return this.properties;
246
+        return _.orderBy(this.properties, this.sortKey, this.SortDirection);
131
       }
247
       }
132
     },
248
     },
249
+    PageCount() {
250
+      return this.visibleItemsPerPageCount !== 0
251
+        ? Math.ceil(
252
+            this.FilteredProperties.length / this.visibleItemsPerPageCount
253
+          )
254
+        : 1;
255
+    },
256
+    DisplayItems() {
257
+      const list = this.FilteredProperties;
258
+      const startSlice = (this.currentPage - 1) * this.visibleItemsPerPageCount;
259
+      let endSlice = this.currentPage * this.visibleItemsPerPageCount;
260
+      if (endSlice > list.length) {
261
+        endSlice = list.length;
262
+      }
263
+      return list.slice(startSlice, endSlice);
264
+    },
265
+    SortDirection() {
266
+      return this.reverse ? "desc" : "asc";
267
+    },
133
   },
268
   },
134
   mounted() {
269
   mounted() {
135
     this.wait = true;
270
     this.wait = true;
136
     this.getAdminProperties(this.userId).then((fulfuilled) => {
271
     this.getAdminProperties(this.userId).then((fulfuilled) => {
137
       this.wait = false;
272
       this.wait = false;
273
+      if (this.itemsPerPageList && this.itemsPerPageList.length > 0) {
274
+        const [startItem] = this.itemsPerPageList;
275
+        this.visibleItemsPerPageCount = startItem;
276
+      }
138
     });
277
     });
139
   },
278
   },
279
+  watch: {
280
+    filter: {
281
+      immediate: true,
282
+      handler(val, oldVal) {
283
+        if (val != oldVal) {
284
+          this.currentPage = 1;
285
+        }
286
+      },
287
+    },
288
+  },
140
 };
289
 };
141
 </script>
290
 </script>
142
 
291
 

+ 7
- 3
src/components/admin/status/editTimeShareAdminPage.vue View File

1
 <template>
1
 <template>
2
   <main id="main">
2
   <main id="main">
3
-    <section id="contact2">
3
+    <div v-if="wait" id="preloader"></div>
4
+    <section v-else id="contact2">
4
       <div class="container">
5
       <div class="container">
5
         <div class="row">
6
         <div class="row">
6
           <div class="col-lg-12">
7
           <div class="col-lg-12">
473
   },
474
   },
474
   data() {
475
   data() {
475
     return {
476
     return {
476
-      wait: false,
477
+      wait: true,
477
       userLoggedIn: Log.isLoggedIn(),
478
       userLoggedIn: Log.isLoggedIn(),
478
       listedWeekId: this.$route.params.id,
479
       listedWeekId: this.$route.params.id,
479
       selectedItems: [],
480
       selectedItems: [],
495
     Alert
496
     Alert
496
   },
497
   },
497
   async mounted() {
498
   async mounted() {
499
+    this.getWeek(this.weekParam.id).then(() => {
500
+      this.wait = false;
501
+    });
498
     if (this.sellItem.id) {
502
     if (this.sellItem.id) {
499
       this.newSale();
503
       this.newSale();
500
     }
504
     }
506
     this.initTimeshare(0);
510
     this.initTimeshare(0);
507
     this.getIndividual(Log.getUser().id);
511
     this.getIndividual(Log.getUser().id);
508
     this.getBanks();
512
     this.getBanks();
509
-    this.getWeek(this.weekParam.id);
513
+    //this.getWeek(this.weekParam.id);
510
     this.selectedRegion = this.weekParam.region.regionCode;
514
     this.selectedRegion = this.weekParam.region.regionCode;
511
     this.selectedResort = this.weekParam.resort.resortCode;
515
     this.selectedResort = this.weekParam.resort.resortCode;
512
     this.selectedBedrooms = this.weekParam.bedrooms;
516
     this.selectedBedrooms = this.weekParam.bedrooms;

+ 2
- 0
src/components/admin/status/timeshareAdminPage.vue View File

68
             :CustomActionHeading="'Publish'"
68
             :CustomActionHeading="'Publish'"
69
             :showColumnChooser="false"
69
             :showColumnChooser="false"
70
             :displayColumns="columns"
70
             :displayColumns="columns"
71
+            :displayFormats="displayFormats"
71
             @onRowClick="onRowClick"
72
             @onRowClick="onRowClick"
72
             @onClearSelected="onClearSelected"
73
             @onClearSelected="onClearSelected"
73
             @onEdit="onEdit"
74
             @onEdit="onEdit"
117
         "region",
118
         "region",
118
         "sellPrice"
119
         "sellPrice"
119
       ],
120
       ],
121
+      displayFormats: ["", "", "", "", "", "", "", "", "money"],
120
       // selectedItems: [],
122
       // selectedItems: [],
121
       showMessage: false,
123
       showMessage: false,
122
       region: ""
124
       region: ""

+ 35
- 16
src/components/property/ListProperty/contentSection.vue View File

1
 <template>
1
 <template>
2
   <section id="services">
2
   <section id="services">
3
+    <div v-if="wait" id="preloader"></div>
3
     <div class="container">
4
     <div class="container">
4
       <div class="col-12">
5
       <div class="col-12">
5
         <h1>List your property</h1>
6
         <h1>List your property</h1>
16
               role="tab"
17
               role="tab"
17
               aria-controls="pills-residential"
18
               aria-controls="pills-residential"
18
               aria-selected="true"
19
               aria-selected="true"
19
-              @click="getPropTypeResidential"
20
               >RESIDENTIAL</a
20
               >RESIDENTIAL</a
21
             >
21
             >
22
           </li>
22
           </li>
29
               role="tab"
29
               role="tab"
30
               aria-controls="pills-commercial"
30
               aria-controls="pills-commercial"
31
               aria-selected="false"
31
               aria-selected="false"
32
-              @click="getPropTypeCommercial"
33
               >COMMERCIAL</a
32
               >COMMERCIAL</a
34
             >
33
             >
35
           </li>
34
           </li>
44
             role="tabpanel"
43
             role="tabpanel"
45
             aria-labelledby="pills-residential-tab"
44
             aria-labelledby="pills-residential-tab"
46
           >
45
           >
47
-            <ResidentialCreate />
46
+            <ResidentialCreate :propFields="residentialFields" />
48
           </div>
47
           </div>
49
           <div
48
           <div
50
             class="tab-pane fade"
49
             class="tab-pane fade"
52
             role="tabpanel"
51
             role="tabpanel"
53
             aria-labelledby="pills-commercial-tab"
52
             aria-labelledby="pills-commercial-tab"
54
           >
53
           >
55
-            <CommercialCreate />
54
+            <CommercialCreate :propFields="commercialFields" />
56
           </div>
55
           </div>
57
         </div>
56
         </div>
58
       </div>
57
       </div>
70
     ResidentialCreate,
69
     ResidentialCreate,
71
     CommercialCreate
70
     CommercialCreate
72
   },
71
   },
72
+  data() {
73
+    return {
74
+      wait: true,
75
+      residentialFields: [],
76
+      commercialFields: []
77
+    };
78
+  },
73
   methods: {
79
   methods: {
74
     ...mapActions("property", ["getPropertyTypes", "getPropertyFields"]),
80
     ...mapActions("property", ["getPropertyTypes", "getPropertyFields"]),
75
-    getPropTypeResidential() {
76
-      this.getPropertyTypes("Residential");
77
-      this.getPropertyFields("Residential");
81
+    async loadResidentialFields() {
82
+      await this.getPropertyFields("Residential");
78
     },
83
     },
79
-    getPropTypeCommercial() {
80
-      this.getPropertyTypes("Commercial");
81
-      this.getPropertyFields("Commercial");
84
+    async loadCommercialFields() {
85
+      await this.getPropertyFields("Commercial");
82
     }
86
     }
83
   },
87
   },
84
-  mounted() {
85
-    this.getPropertyTypes("Residential");
86
-    this.getPropertyFields("Residential");
87
-  },
88
   computed: {
88
   computed: {
89
-    ...mapState("property", ["propertyTypes"])
90
-  }
89
+    ...mapState("property", ["propertyTypes", "propertyFields"]),
90
+    propFields() {
91
+      if (!this.wait) {
92
+        return this.propertyFields[0].fields;
93
+      }
94
+    }
95
+  },
96
+  created() {
97
+    this.loadResidentialFields().then(() => {
98
+      this.residentialFields = this.propertyFields[0].fields.sort((a, b) =>
99
+        a.rank > b.rank ? 1 : -1
100
+      );
101
+      this.loadCommercialFields().then(() => {
102
+        this.wait = false;
103
+        this.commercialFields = this.propertyFields[0].fields.sort((a, b) =>
104
+          a.rank > b.rank ? 1 : -1
105
+        );
106
+      });
107
+    });
108
+  },
109
+  mounted() {}
91
 };
110
 };
92
 </script>
111
 </script>
93
 
112
 

+ 15
- 9
src/components/property/commercial/commercialSearchResults.vue View File

1
 <template>
1
 <template>
2
   <main id="main" style="margin-top:-20px; padding-bottom:50px">
2
   <main id="main" style="margin-top:-20px; padding-bottom:50px">
3
     <div v-if="wait" id="preloader"></div>
3
     <div v-if="wait" id="preloader"></div>
4
-    <section v-if="properties.length > 0">
4
+    <div class="row pt-5 justify-content-md-center">
5
+      <h3 v-if="propertySearch.salesType === 'Sale'">COMMERCIAL PROPERTIES FOR SALE</h3>
6
+      <h3 v-else-if="propertySearch.salesType === 'Rent'">COMMERCIAL PROPERTIES FOR RENT</h3>
7
+    </div>
8
+    <propertyCard
9
+      v-if="properties.length > 0"
10
+      name="propertyholder"
11
+      :properties="properties"
12
+      :showSort="false"
13
+    />
14
+    <!-- <section v-if="properties.length > 0">
5
       <div class="container">
15
       <div class="container">
6
-        <div class="row pt-5 justify-content-md-center">
7
-          <h3 v-if="propertySearch.salesType === 'Sale'">COMMERCIAL PROPERTIES FOR SALE</h3>
8
-          <h3 v-else-if="propertySearch.salesType === 'Rent'">COMMERCIAL PROPERTIES FOR RENT</h3>
9
-        </div>
10
         <div class="row justify-content-md-center">
16
         <div class="row justify-content-md-center">
11
           <div
17
           <div
12
             class="col-lg-3 col-md-6 col-sm-6"
18
             class="col-lg-3 col-md-6 col-sm-6"
19
                 <h4>{{ currentProperty.displayPrice }}</h4>
25
                 <h4>{{ currentProperty.displayPrice }}</h4>
20
                 <p>
26
                 <p>
21
                   {{ currentProperty.suburb }}, {{ currentProperty.city }} |
27
                   {{ currentProperty.suburb }}, {{ currentProperty.city }} |
22
-                  {{ currentProperty.area }}M<sup>2</sup>
28
+                  {{ currentProperty.area }}
23
                 </p>
29
                 </p>
24
                 <p>{{ currentProperty.shortDescription }}</p>
30
                 <p>{{ currentProperty.shortDescription }}</p>
25
                 <br />
31
                 <br />
26
 
32
 
27
-                <!-- <a href="commercialproperty-page.php" class="btn-white-border">VIEW</a> -->
33
+                <a href="commercialproperty-page.php" class="btn-white-border">VIEW</a>
28
                 <router-link
34
                 <router-link
29
                   class="btn-white-border"
35
                   class="btn-white-border"
30
                   :to="`/property/commercial/property/${currentProperty.id}`"
36
                   :to="`/property/commercial/property/${currentProperty.id}`"
35
           </div>
41
           </div>
36
         </div>
42
         </div>
37
       </div>
43
       </div>
38
-    </section>
44
+    </section> -->
39
     <section v-else id="intro" style="margin-bottom:-50px">
45
     <section v-else id="intro" style="margin-bottom:-50px">
40
       <div class="container">
46
       <div class="container">
41
         <div class="row d-flex justify-content-center">
47
         <div class="row d-flex justify-content-center">
72
 <script>
78
 <script>
73
 /* eslint-disable */
79
 /* eslint-disable */
74
 import { mapState, mapActions } from "vuex";
80
 import { mapState, mapActions } from "vuex";
75
-import propertyCard from "../propertyCard";
81
+import propertyCard from "../propertyCardSearch";
76
 import carousel from "vue-owl-carousel";
82
 import carousel from "vue-owl-carousel";
77
 
83
 
78
 export default {
84
 export default {

+ 7
- 12
src/components/property/commercial/createProperty/commercialCreateNew.vue View File

251
         <div class="section-header">
251
         <div class="section-header">
252
           <h2>Property Information</h2>
252
           <h2>Property Information</h2>
253
         </div>
253
         </div>
254
-        <div v-for="item in propertyFields" :key="item.id">
254
+        <!-- <div v-for="item in propertyFields" :key="item.id">
255
           <div v-if="item.name === 'Commercial Fields'">
255
           <div v-if="item.name === 'Commercial Fields'">
256
-            <UserField
257
-              :fields="sortFields"
258
-              :id="item.name"
259
-              @UpdateUserDefinedFields="UpdateUserDefinedFields"
260
-              :fieldValues="item.fields"
261
-            />
256
+            
262
           </div>
257
           </div>
263
-        </div>
264
-
258
+        </div> -->
259
+        <UserField :fields="propFields" @UpdateUserDefinedFields="UpdateUserDefinedFields" />
265
         <div class="row">
260
         <div class="row">
266
           <div class="col-sm-12">
261
           <div class="col-sm-12">
267
             <div class="section-header">
262
             <div class="section-header">
348
     carouselSection,
343
     carouselSection,
349
     mapSection
344
     mapSection
350
   },
345
   },
346
+  props: {
347
+    propFields: {}
348
+  },
351
   data() {
349
   data() {
352
     return {
350
     return {
353
       propertyType: "Commercial",
351
       propertyType: "Commercial",
539
     ...mapGetters("fees", ["getListingFee"]),
537
     ...mapGetters("fees", ["getListingFee"]),
540
     sortFields() {
538
     sortFields() {
541
       var display = [];
539
       var display = [];
542
-
543
       display = this.propertyFields[0].fields.sort((a, b) => (a.rank > b.rank ? 1 : -1));
540
       display = this.propertyFields[0].fields.sort((a, b) => (a.rank > b.rank ? 1 : -1));
544
-      console.log(display);
545
-
546
       return display;
541
       return display;
547
     },
542
     },
548
     SalesTypeChanged() {
543
     SalesTypeChanged() {

+ 26
- 15
src/components/property/commercial/singleView/contentSection.vue View File

53
             </div>-->
53
             </div>-->
54
             <p>{{ property.shortDescription }}</p>
54
             <p>{{ property.shortDescription }}</p>
55
             <p>{{ property.price | toCurrency }}</p>
55
             <p>{{ property.price | toCurrency }}</p>
56
-            <div class="btn-white-border">
57
-              <i class="fa fa-search"></i>BOOK A VIEWING
58
-            </div>
59
           </div>
56
           </div>
60
           <div class="panel-left px-5 pb-5 text-center">
57
           <div class="panel-left px-5 pb-5 text-center">
61
             <h4 class="text-white">Share this Property</h4>
58
             <h4 class="text-white">Share this Property</h4>
81
         </div>
78
         </div>
82
         <div class="col-md-8 p-5 resort-profile">
79
         <div class="col-md-8 p-5 resort-profile">
83
           <h2 v-if="property.showAddress">
80
           <h2 v-if="property.showAddress">
84
-            <div
85
-              style="display:inline"
86
-              v-if="property.propertyName !== null"
87
-            >{{ property.propertyName }} /</div>
81
+            <div style="display:inline" v-if="property.propertyName !== null">
82
+              {{ property.propertyName }} /
83
+            </div>
88
             {{ property.streetNumber }} {{ property.streetName }}
84
             {{ property.streetNumber }} {{ property.streetName }}
89
           </h2>
85
           </h2>
90
           <h2 v-else>{{ property.propertyName }}</h2>
86
           <h2 v-else>{{ property.propertyName }}</h2>
107
 
103
 
108
           <div class="mt-5" v-html="property.description"></div>
104
           <div class="mt-5" v-html="property.description"></div>
109
           <router-link
105
           <router-link
110
-            style="float:right"
106
+            style="float:right; white-space: nowrap;"
111
             class="btn-solid-blue mt-3"
107
             class="btn-solid-blue mt-3"
112
             :to="{ name: 'EnquireNow', params: { id: $route.params.id } }"
108
             :to="{ name: 'EnquireNow', params: { id: $route.params.id } }"
113
-          >MORE INFO...</router-link>
114
-          <h4 v-if="property.video !== null" class="mt-5">Video Tour</h4>
109
+            >ENQUIRE NOW</router-link
110
+          >
111
+
112
+          <h4 v-if="property.virtualTour !== null" style="margin-top:150px">Virtual Tour</h4>
113
+          <iframe
114
+            v-if="property.virtualTour !== null"
115
+            width="100%"
116
+            height="500px"
117
+            :src="property.virtualTour"
118
+            frameborder="0"
119
+            allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
120
+            allowfullscreen
121
+            style="margin-bottom:-6px"
122
+            class="mt-3"
123
+          ></iframe>
124
+
125
+          <h4 v-if="property.video !== null" class="mt-5">Video</h4>
115
           <iframe
126
           <iframe
116
             v-if="property.video !== null"
127
             v-if="property.video !== null"
117
             width="100%"
128
             width="100%"
179
 import gallery from "../../../shared/gallerySlideShow";
190
 import gallery from "../../../shared/gallerySlideShow";
180
 export default {
191
 export default {
181
   components: {
192
   components: {
182
-    gallery,
193
+    gallery
183
   },
194
   },
184
   props: {
195
   props: {
185
     property: {},
196
     property: {},
186
-    propertyImages: {},
197
+    propertyImages: {}
187
   },
198
   },
188
   mounted() {
199
   mounted() {
189
     console.log(this.property);
200
     console.log(this.property);
191
   data() {
202
   data() {
192
     return {
203
     return {
193
       index: null,
204
       index: null,
194
-      date: new Date(),
205
+      date: new Date()
195
     };
206
     };
196
   },
207
   },
197
   computed: {
208
   computed: {
201
         list.push(this.propertyImages[i].image);
212
         list.push(this.propertyImages[i].image);
202
       }
213
       }
203
       return list;
214
       return list;
204
-    },
215
+    }
205
   },
216
   },
206
   created() {
217
   created() {
207
     this.$emit("Loaded", true);
218
     this.$emit("Loaded", true);
208
-  },
219
+  }
209
 };
220
 };
210
 </script>
221
 </script>
211
 
222
 

+ 30
- 2
src/components/property/editProperty/editProperty.vue View File

26
                     v-model="property.statusString"
26
                     v-model="property.statusString"
27
                     @change="StatusChanged"
27
                     @change="StatusChanged"
28
                   >
28
                   >
29
-                    <option v-for="(item, i) in statuses" :key="i">{{ item }}</option>
29
+                    <option v-for="(item, i) in Statuses" :key="i">{{ item }}</option>
30
                   </select>
30
                   </select>
31
                 </div>
31
                 </div>
32
               </div>
32
               </div>
135
                       </select>
135
                       </select>
136
                     </div>
136
                     </div>
137
                   </div>
137
                   </div>
138
-                  <div class="row my-3">
138
+                  <div v-if="!property.isSale" class="row my-3">
139
                     <div class="col-md-12">
139
                     <div class="col-md-12">
140
+                      Date Available
140
                       <input
141
                       <input
141
                         type="date"
142
                         type="date"
142
                         class="form-control uniInput"
143
                         class="form-control uniInput"
146
                       />
147
                       />
147
                     </div>
148
                     </div>
148
                   </div>
149
                   </div>
150
+                  <div
151
+                    class="row my-3"
152
+                    v-if="property.statusString === 'Sold' || property.statusString ==='Rented Out'"
153
+                  >
154
+                    <div class="col-md-12">
155
+                      Hide Property After
156
+                      <input
157
+                        type="date"
158
+                        class="form-control uniInput"
159
+                        name="date"
160
+                        v-model="property.cutOffDisplayDateString"
161
+                      />
162
+                    </div>
163
+                  </div>
164
+
149
                   <div class="row my-3">
165
                   <div class="row my-3">
150
                     <br />
166
                     <br />
151
                   </div>
167
                   </div>
540
       }
556
       }
541
       return list;
557
       return list;
542
     },
558
     },
559
+    Statuses() {
560
+      const list = [];
561
+      for (let i = 0; i < this.statuses.length; i++) {
562
+        if (this.property.isSale && this.statuses[i] !== "Rented Out") {
563
+          list.push(this.statuses[i]);
564
+        }
565
+        if (!this.property.isSale && this.statuses[i] !== "Sold") {
566
+          list.push(this.statuses[i]);
567
+        }
568
+      }
569
+      return list;
570
+    },
543
   },
571
   },
544
 };
572
 };
545
 </script>
573
 </script>

+ 80
- 50
src/components/property/enquireNow/contentSection.vue View File

23
                 type="text"
23
                 type="text"
24
                 name="name"
24
                 name="name"
25
                 class="form-control"
25
                 class="form-control"
26
-                id="Unit"
27
-                placeholder="Unit"
26
+                id="Suburb"
27
+                placeholder="Suburb"
28
                 data-rule="minlen:4"
28
                 data-rule="minlen:4"
29
-                v-model="property.unit"
29
+                v-model="property.suburb"
30
                 disabled
30
                 disabled
31
               />
31
               />
32
             </float-label>
32
             </float-label>
33
-
34
-            <div class="validation"></div>
35
-          </div>
36
-          <div class="form-group col-md-6">
37
-            <float-label>
33
+            <!-- <float-label>
38
               <input
34
               <input
39
                 type="text"
35
                 type="text"
40
                 name="name"
36
                 name="name"
41
                 class="form-control"
37
                 class="form-control"
42
-                id="Price"
43
-                placeholder="Price"
38
+                id="Unit"
39
+                placeholder="Unit"
44
                 data-rule="minlen:4"
40
                 data-rule="minlen:4"
45
-                v-model="property.price"
41
+                v-model="property.unit"
46
                 disabled
42
                 disabled
47
               />
43
               />
48
-            </float-label>
44
+            </float-label> -->
49
 
45
 
50
             <div class="validation"></div>
46
             <div class="validation"></div>
51
           </div>
47
           </div>
52
           <div class="form-group col-md-6">
48
           <div class="form-group col-md-6">
53
-            <float-label>
54
-              <input
55
-                type="text"
56
-                name="name"
49
+            <float-label label="PRICE">
50
+              <currency-input
51
+                onclick="this.setSelectionRange(0, this.value.length)"
52
+                name="resPrice"
53
+                :value="property.price"
54
+                @input="property.price = $event"
55
+                v-model="property.price"
56
+                id="resPrice"
57
                 class="form-control"
57
                 class="form-control"
58
-                id="Size"
59
-                placeholder="Size"
60
-                data-rule="minlen:4"
61
-                v-model="size"
62
                 disabled
58
                 disabled
63
               />
59
               />
64
             </float-label>
60
             </float-label>
65
 
61
 
66
             <div class="validation"></div>
62
             <div class="validation"></div>
67
           </div>
63
           </div>
64
+
65
+          <div class="form-group col-md-6">
66
+            <div v-for="(el, i) in property.displayData[0].values" :key="i">
67
+              <float-label v-if="el.name === 'Erf Size'">
68
+                <input
69
+                  type="text"
70
+                  name="name"
71
+                  class="form-control"
72
+                  id="Size"
73
+                  placeholder="Size"
74
+                  data-rule="minlen:4"
75
+                  v-model="el.value"
76
+                  disabled
77
+                />
78
+              </float-label>
79
+            </div>
80
+
81
+            <div class="validation"></div>
82
+          </div>
68
           <div class="form-group col-md-6 mb-4">
83
           <div class="form-group col-md-6 mb-4">
84
+            <div class="validation"></div>
85
+          </div>
86
+          <div class="form-group col-md-12 mb-4 mt-2">
69
             <float-label>
87
             <float-label>
70
               <input
88
               <input
71
                 type="text"
89
                 type="text"
72
                 name="name"
90
                 name="name"
73
-                class="form-control"
74
-                id="Suburb"
75
-                placeholder="Suburb"
91
+                class="form-control uniInput"
92
+                id="Name"
93
+                placeholder="Name"
76
                 data-rule="minlen:4"
94
                 data-rule="minlen:4"
77
-                v-model="property.suburb"
78
-                disabled
95
+                v-model="indiv.name"
79
               />
96
               />
80
             </float-label>
97
             </float-label>
81
 
98
 
82
             <div class="validation"></div>
99
             <div class="validation"></div>
83
           </div>
100
           </div>
84
-          <div class="form-group col-md-12 mb-4">
101
+          <div class="form-group col-md-6 mb-4">
85
             <float-label>
102
             <float-label>
86
               <input
103
               <input
87
                 type="text"
104
                 type="text"
88
                 name="name"
105
                 name="name"
89
-                class="form-control"
90
-                id="Name"
91
-                placeholder="Name"
106
+                class="form-control uniInput"
107
+                id="ContactNumber"
108
+                placeholder="ContactNumber"
92
                 data-rule="minlen:4"
109
                 data-rule="minlen:4"
93
-                v-model="name"
110
+                v-model="indiv.cellNumber"
94
               />
111
               />
95
             </float-label>
112
             </float-label>
96
 
113
 
97
             <div class="validation"></div>
114
             <div class="validation"></div>
98
           </div>
115
           </div>
99
-          <div class="form-group col-md-12 mb-4">
116
+          <div class="form-group col-md-6">
100
             <float-label>
117
             <float-label>
101
               <input
118
               <input
102
                 type="text"
119
                 type="text"
103
                 name="name"
120
                 name="name"
104
-                class="form-control"
105
-                id="ContactNumber"
106
-                placeholder="ContactNumber"
121
+                class="form-control uniInput"
122
+                id="Email"
123
+                placeholder="Email"
107
                 data-rule="minlen:4"
124
                 data-rule="minlen:4"
108
-                v-model="contactNumber"
125
+                v-model="indiv.emailAddress"
109
               />
126
               />
110
             </float-label>
127
             </float-label>
111
 
128
 
113
           </div>
130
           </div>
114
           <div class="form-group col-md-12">
131
           <div class="form-group col-md-12">
115
             <float-label>
132
             <float-label>
116
-              <input
117
-                type="text"
118
-                name="name"
119
-                class="form-control"
133
+              <textarea
134
+                type="textArea"
135
+                style="height:130px"
136
+                name="message"
137
+                class="form-control uniInput"
120
                 id="Email"
138
                 id="Email"
121
-                placeholder="Email"
139
+                placeholder="Message"
122
                 data-rule="minlen:4"
140
                 data-rule="minlen:4"
123
-                v-model="email"
141
+                v-model="message"
124
               />
142
               />
125
             </float-label>
143
             </float-label>
126
 
144
 
142
 /* eslint-disable */
160
 /* eslint-disable */
143
 import axios from "axios";
161
 import axios from "axios";
144
 import alert from "../../shared/alert";
162
 import alert from "../../shared/alert";
163
+import Log from "../../../assets/Log";
164
+import { mapState, mapGetters, mapActions } from "vuex";
145
 
165
 
146
 export default {
166
 export default {
147
   components: {
167
   components: {
148
-    alert,
168
+    alert
149
   },
169
   },
150
   data() {
170
   data() {
151
     return {
171
     return {
155
       contactNumber: null,
175
       contactNumber: null,
156
       property: null,
176
       property: null,
157
       message: null,
177
       message: null,
158
-      boolSent: false,
178
+      boolSent: false
159
     };
179
     };
160
   },
180
   },
161
   mounted() {
181
   mounted() {
162
     this.boolSent = false;
182
     this.boolSent = false;
183
+    this.getIndividual(Log.getUser().id);
163
   },
184
   },
164
   props: {
185
   props: {
165
-    property: {},
186
+    property: {}
187
+  },
188
+  computed: {
189
+    ...mapState("individual", ["indiv"]),
190
+    ...mapState("authentication", ["isLoggedIn", "user"])
191
+    // ...mapGetters({
192
+    //   user: "authentication/getUser",
193
+    //   person: "authentication/getPerson"
194
+    // })
166
   },
195
   },
167
   methods: {
196
   methods: {
197
+    ...mapActions("individual", ["getIndividual"]),
168
     async sendMail() {
198
     async sendMail() {
169
       var mailObj = {
199
       var mailObj = {
170
         toAddress: "jlouw365@gmail.com",
200
         toAddress: "jlouw365@gmail.com",
171
         fromAddress: "jlouw365@gmail.com",
201
         fromAddress: "jlouw365@gmail.com",
172
-        name: this.name,
173
-        email: this.email,
174
-        phone: this.contactNumber,
202
+        name: this.indiv.name,
203
+        email: this.indiv.emailAddress,
204
+        phone: this.indiv.cellNumber,
175
         property: this.property.id.toString(),
205
         property: this.property.id.toString(),
176
-        message: this.message,
206
+        message: this.message
177
       };
207
       };
178
 
208
 
179
       const response = await axios.post("/api/mail/1", mailObj);
209
       const response = await axios.post("/api/mail/1", mailObj);
186
     },
216
     },
187
     countDownChanged(dismissCountDown) {
217
     countDownChanged(dismissCountDown) {
188
       this.dismissCountDown = dismissCountDown;
218
       this.dismissCountDown = dismissCountDown;
189
-    },
219
+    }
190
   },
220
   },
191
   created() {
221
   created() {
192
     this.$emit("Loaded", true);
222
     this.$emit("Loaded", true);
193
-  },
223
+  }
194
 };
224
 };
195
 </script>
225
 </script>
196
 
226
 

+ 17
- 15
src/components/property/propertyCard.vue View File

12
               <div class="portfolio-item p-4 wow fadeInUp justify-content-md-center">
12
               <div class="portfolio-item p-4 wow fadeInUp justify-content-md-center">
13
                 <div class="feature-top pt-3 mb-2">
13
                 <div class="feature-top pt-3 mb-2">
14
                   <h3>{{ currentProperty.displayPrice }}</h3>
14
                   <h3>{{ currentProperty.displayPrice }}</h3>
15
-                  <img
16
-                    style="max-height:165px; object-fit: cover;"
17
-                    :src="currentProperty.displayImage"
18
-                    alt
19
-                  />
15
+                  <div>
16
+                    <img
17
+                      style="height:165px; object-fit: cover;"
18
+                      :src="currentProperty.displayImage"
19
+                      alt
20
+                    />
21
+                  </div>
20
                 </div>
22
                 </div>
21
                 <h1>{{ currentProperty.suburb }}</h1>
23
                 <h1>{{ currentProperty.suburb }}</h1>
22
                 <p>
24
                 <p>
24
                   {{ currentProperty.propertyReference }}
26
                   {{ currentProperty.propertyReference }}
25
                 </p>
27
                 </p>
26
                 <p
28
                 <p
27
-                  v-if="!currentProperty.isSale"
28
-                  :class="[currentProperty.hasPendingOffer ? 'pendingOffer' : 'normalText']"
29
-                >
30
-                  <strong>{{ currentProperty.available }}</strong>
31
-                </p>
32
-                <p
33
-                  v-if="currentProperty.isSale  && currentProperty.hasPendingOffer"
34
-                  class="pendingOffer"
29
+                  v-if="currentProperty.displayText != ''"
30
+                  :class="[currentProperty.displayColor === 'green' ? 'greenText' : currentProperty.displayColor === 'orange' ? 'pendingOffer' : currentProperty.displayColor === 'red' ? 'redText' : 'normalText']"
35
                 >
31
                 >
36
-                  <strong>{{ currentProperty.available }}</strong>
32
+                  <strong>{{ currentProperty.displayText }}</strong>
37
                 </p>
33
                 </p>
38
               </div>
34
               </div>
39
             </router-link>
35
             </router-link>
44
                 <div class="feature-top pt-3 mb-2">
40
                 <div class="feature-top pt-3 mb-2">
45
                   <h3>{{ currentProperty.displayPrice }}</h3>
41
                   <h3>{{ currentProperty.displayPrice }}</h3>
46
                   <img
42
                   <img
47
-                    style="max-height:165px; object-fit: cover;"
43
+                    style="height:165px; object-fit: cover;"
48
                     :src="currentProperty.displayImage"
44
                     :src="currentProperty.displayImage"
49
                     alt
45
                     alt
50
                   />
46
                   />
54
                   <strong>Property Reference</strong>
50
                   <strong>Property Reference</strong>
55
                   {{ currentProperty.propertyReference }}
51
                   {{ currentProperty.propertyReference }}
56
                 </p>
52
                 </p>
53
+                <p
54
+                  v-if="currentProperty.displayText != ''"
55
+                  :class="[currentProperty.displayColor === 'green' ? 'greenText' : currentProperty.displayColor === 'orange' ? 'pendingOffer' : currentProperty.displayColor === 'red' ? 'redText' : 'normalText']"
56
+                >
57
+                  <strong>{{ currentProperty.displayText }}</strong>
58
+                </p>
57
               </div>
59
               </div>
58
             </router-link>
60
             </router-link>
59
           </div>
61
           </div>

+ 111
- 0
src/components/property/propertyCardSearch.vue View File

1
+<template>
2
+  <section id="portfolio">
3
+    <div class="container-fluid">
4
+      <div class="row">
5
+        <div
6
+          class="col-lg-3 col-md-6 col-sm-6 my-3"
7
+          v-for="currentProperty in properties"
8
+          :key="currentProperty.id"
9
+        >
10
+          <div v-if="currentProperty.propertyUsageType === 'Residential'">
11
+            <router-link :to="`/property/residential/property/${currentProperty.id}`">
12
+              <div class="portfolio-item p-4 wow fadeInUp justify-content-md-center">
13
+                <div class="feature-top pt-3 mb-2">
14
+                  <h3 style="color:white !important">{{ currentProperty.displayPrice }}</h3>
15
+                  <img
16
+                    style="height:165px; object-fit: cover;"
17
+                    :src="currentProperty.displayImage"
18
+                    alt
19
+                  />
20
+                </div>
21
+                <h1>{{ currentProperty.suburb }}</h1>
22
+                <p>
23
+                  <strong>Property Reference</strong>
24
+                  {{ currentProperty.propertyReference }}
25
+                </p>
26
+                <p
27
+                  v-if="currentProperty.displayText != ''"
28
+                  :class="[currentProperty.displayColor === 'green' ? 'greenText' : currentProperty.displayColor === 'orange' ? 'pendingOffer' : currentProperty.displayColor === 'red' ? 'redText' : 'normalText']"
29
+                >
30
+                  <strong>{{ currentProperty.displayText }}</strong>
31
+                </p>
32
+              </div>
33
+            </router-link>
34
+          </div>
35
+          <div v-else-if="currentProperty.propertyUsageType === 'Commercial'">
36
+            <router-link :to="`/property/commercial/property/${currentProperty.id}`">
37
+              <div class="portfolio-item p-4 wow fadeInUp justify-content-md-center">
38
+                <div class="feature-top pt-3 mb-2">
39
+                  <h3>{{ currentProperty.displayPrice }}</h3>
40
+                  <img
41
+                    style="height:165px; object-fit: cover;"
42
+                    :src="currentProperty.displayImage"
43
+                    alt
44
+                  />
45
+                </div>
46
+                <h1>{{ currentProperty.suburb }}</h1>
47
+                <p>
48
+                  <strong>Property Reference</strong>
49
+                  {{ currentProperty.propertyReference }}
50
+                </p>
51
+              </div>
52
+            </router-link>
53
+          </div>
54
+        </div>
55
+      </div>
56
+    </div>
57
+  </section>
58
+  <!-- #listings -->
59
+</template>
60
+
61
+<script>
62
+/* eslint-disable */
63
+
64
+export default {
65
+  props: {
66
+    properties: { type: Array, default: () => [] },
67
+    showSort: { type: Boolean, default: true },
68
+    salesType: { type: String, default: "Rent" },
69
+  },
70
+  methods: {
71
+    sortHighPrice() {
72
+      function compare(a, b) {
73
+        if (a.price < b.price) return 1;
74
+        if (a.price > b.price) return -1;
75
+        return 0;
76
+      }
77
+
78
+      return this.properties.sort(compare);
79
+    },
80
+    sortLowPrice() {
81
+      function compare(a, b) {
82
+        if (a.price < b.price) return -1;
83
+        if (a.price > b.price) return 1;
84
+        return 0;
85
+      }
86
+
87
+      return this.properties.sort(compare);
88
+    },
89
+    sortNewest() {
90
+      function compare(a, b) {
91
+        if (a.dateCreated < b.dateCreated) return 1;
92
+        if (a.dateCreated > b.dateCreated) return -1;
93
+        return 0;
94
+      }
95
+
96
+      return this.properties.sort(compare);
97
+    },
98
+    sortDateAvailable() {
99
+      function compare(a, b) {
100
+        if (a.dateAvailable > b.dateAvailable) return 1;
101
+        if (a.dateAvailable < b.dateAvailable) return -1;
102
+        return 0;
103
+      }
104
+
105
+      return this.properties.sort(compare);
106
+    },
107
+  },
108
+};
109
+</script>
110
+
111
+<style lang="scss" scoped></style>

+ 9
- 9
src/components/property/propertyImage.vue View File

22
           v-if="allowMultiple"
22
           v-if="allowMultiple"
23
           type="checkbox"
23
           type="checkbox"
24
           id="checkbox"
24
           id="checkbox"
25
+          name="checkbox"
25
           v-model="imagesDefault[i]"
26
           v-model="imagesDefault[i]"
26
           @change="updateList(i)"
27
           @change="updateList(i)"
27
           :disabled="!mayEdit"
28
           :disabled="!mayEdit"
47
     loadedImages: Function,
48
     loadedImages: Function,
48
     mayEdit: { type: Boolean, default: () => true },
49
     mayEdit: { type: Boolean, default: () => true },
49
     allowMultiple: { type: Boolean, default: () => true },
50
     allowMultiple: { type: Boolean, default: () => true },
50
-    savedImages: { type: Array, default: () => [] },
51
+    savedImages: { type: Array, default: () => [] }
51
   },
52
   },
52
   data() {
53
   data() {
53
     return {
54
     return {
54
       images: {},
55
       images: {},
55
       image: [],
56
       image: [],
56
       imagesDefault: [],
57
       imagesDefault: [],
57
-      maxSavedIndex: 0,
58
+      maxSavedIndex: 0
58
     };
59
     };
59
   },
60
   },
60
   // Commented out for now.
61
   // Commented out for now.
87
         const reader = new FileReader();
88
         const reader = new FileReader();
88
         var vm = this;
89
         var vm = this;
89
 
90
 
90
-        reader.onload = (e) => {
91
+        reader.onload = e => {
91
           vm.image.push(e.target.result);
92
           vm.image.push(e.target.result);
92
         };
93
         };
93
         reader.readAsDataURL(file[i]);
94
         reader.readAsDataURL(file[i]);
117
         }
118
         }
118
         this.$emit("DefaultImage", index);
119
         this.$emit("DefaultImage", index);
119
       }
120
       }
120
-    },
121
+    }
121
   },
122
   },
122
   watch: {
123
   watch: {
123
     savedImages: {
124
     savedImages: {
132
             this.maxSavedIndex = i;
133
             this.maxSavedIndex = i;
133
           }
134
           }
134
         }
135
         }
135
-      },
136
-    },
137
-  },
136
+      }
137
+    }
138
+  }
138
 };
139
 };
139
 </script>
140
 </script>
140
 
141
 
143
   background: #d9534f;
144
   background: #d9534f;
144
   border-width: 0px;
145
   border-width: 0px;
145
   width: 150px;
146
   width: 150px;
146
-  margin-left: 0;
147
   font-family: "Muli";
147
   font-family: "Muli";
148
   font-size: 15px;
148
   font-size: 15px;
149
   letter-spacing: 1px;
149
   letter-spacing: 1px;
151
   padding: 10px 32px;
151
   padding: 10px 32px;
152
   border-radius: 2px;
152
   border-radius: 2px;
153
   transition-duration: 5s;
153
   transition-duration: 5s;
154
-  margin: 10px;
154
+  margin-top: 10px;
155
   color: #fff;
155
   color: #fff;
156
 }
156
 }
157
 
157
 

+ 32
- 42
src/components/property/propertyUserField.vue View File

1
 <template>
1
 <template>
2
   <div class="row">
2
   <div class="row">
3
-    <div class="col-md-4 mb-3 mt-2" v-for="(currentField, i) in fields" :key="i">
4
-      <div class="input-group-prepend">
5
-        <!-- <span class="input-group-text" style="color: #60CBEB">
6
-          <b>{{ GetFirstLetter(currentField.name) }}</b>
7
-        </span> -->
8
-        <div v-if="!setFields[i] && currentField.type !== 'yesno'">
9
-          <label class="uniSelectLabel" style="margin-top:-10px">{{ currentField.name }}</label>
10
-        </div>
11
-        <float-label :label="currentField.name" style="width:100%;top:-1em !important;">
12
-          <input
13
-            v-if="currentField.type === 'number'"
14
-            class="form-control uniInput"
15
-            type="number"
16
-            name="currentField.name"
17
-            id="currentField.id"
18
-            v-model="setFields[i]"
19
-            @change="UpdateSetFields(currentField, i)"
20
-          />
21
-
22
-          <input
23
-            v-if="currentField.type === 'text'"
24
-            class="form-control uniInput"
25
-            type="text"
26
-            name="currentField.name"
27
-            id="currentField.id"
28
-            v-model="setFields[i]"
29
-            @change="UpdateSetFields(currentField, i)"
30
-          />
31
-        </float-label>
3
+    <div class="col-md-4" v-for="(currentField, i) in fields" :key="i">
4
+      <div v-if="!setFields[i] && currentField.type !== 'yesno'">
5
+        <label class="uniSelectLabel" style="margin-top:10px;">{{ currentField.name }}</label>
32
       </div>
6
       </div>
33
-    </div>
34
-
35
-    <div class="col-md-4 mb-2" v-for="(currentField, i) in fields" :key="'checkField' + i">
36
-      <div class="input-group-prepend">
37
-        <!-- <span class="input-group-text" style="color: #60CBEB">
38
-          <b>{{ GetFirstLetter(currentField.name) }}</b>
39
-        </span> -->
40
-        <div v-if="currentField.type === 'yesno'">
41
-          <label class="uniSelectLabel">{{ currentField.name }}</label>
42
-        </div>
7
+      <float-label :label="currentField.name" style="width:100%;top:-1em !important;">
8
+        <input
9
+          v-if="currentField.type === 'number'"
10
+          class="form-control uniInput"
11
+          type="number"
12
+          style="margin-top:20px;"
13
+          :name="currentField.name"
14
+          :id="currentField.id"
15
+          v-model="setFields[i]"
16
+          @change="UpdateSetFields(currentField, i)"
17
+        />
43
 
18
 
44
         <input
19
         <input
45
-          v-if="currentField.type === 'yesno'"
20
+          v-if="currentField.type === 'text'"
21
+          class="form-control uniInput"
22
+          type="text"
23
+          style="margin-top:20px;"
24
+          :name="currentField.name"
25
+          :id="currentField.id"
26
+          v-model="setFields[i]"
27
+          @change="UpdateSetFields(currentField, i)"
28
+        />
29
+      </float-label>
30
+      <div class="input-group" v-if="currentField.type === 'yesno'">
31
+        <label class="uniSelectLabel" :for="currentField.name">{{ currentField.name }}</label>
32
+        <input
46
           type="checkbox"
33
           type="checkbox"
47
-          id="currentField.id"
34
+          :id="currentField.id"
35
+          :name="currentField.name"
48
           style="margin-left:-5px; margin-top:10px"
36
           style="margin-left:-5px; margin-top:10px"
49
           v-model="setFields[i]"
37
           v-model="setFields[i]"
50
           @change="UpdateSetFields(currentField, i)"
38
           @change="UpdateSetFields(currentField, i)"
71
         userDefinedFieldId: field.id,
59
         userDefinedFieldId: field.id,
72
         value: this.setFields[index]
60
         value: this.setFields[index]
73
       };
61
       };
74
-      this.$emit("UpdateUserDefinedFields", item);
62
+      if (item) {
63
+        this.$emit("UpdateUserDefinedFields", item);
64
+      }
75
     },
65
     },
76
     GetFirstLetter(value) {
66
     GetFirstLetter(value) {
77
       if (value) {
67
       if (value) {

+ 55
- 83
src/components/property/residential/createProperty/residentialCreateNew.vue View File

4
       <div class="container pb-5">
4
       <div class="container pb-5">
5
         <div class="row">
5
         <div class="row">
6
           <div class="col">
6
           <div class="col">
7
-            <label v-if="!salesType" class="uniSelectLabel" for="saleType">Sale Type</label>
7
+            <label v-if="!salesType" class="uniSelectLabel" for="resSaleType">Sale Type</label>
8
             <float-label label="Sale Type">
8
             <float-label label="Sale Type">
9
-              <select class="form-control uniSelect mb-3" name="saleType" v-model="salesType">
9
+              <select class="form-control uniSelect mb-3" name="resSaleType" v-model="salesType">
10
                 <option value="Sale">To Sell</option>
10
                 <option value="Sale">To Sell</option>
11
                 <option value="Rental">To Rent</option>
11
                 <option value="Rental">To Rent</option>
12
               </select>
12
               </select>
22
               <input
22
               <input
23
                 class="form-control uniInput"
23
                 class="form-control uniInput"
24
                 type="text"
24
                 type="text"
25
-                name="propertyName"
25
+                name="resPropertyName"
26
                 v-model="property.propertyName"
26
                 v-model="property.propertyName"
27
               />
27
               />
28
             </float-label>
28
             </float-label>
35
               <input
35
               <input
36
                 class="form-control uniInput"
36
                 class="form-control uniInput"
37
                 type="text"
37
                 type="text"
38
-                name="propertyRef"
38
+                name="resPropertyRef"
39
                 v-model="property.propertyRef"
39
                 v-model="property.propertyRef"
40
               />
40
               />
41
             </float-label>
41
             </float-label>
45
           <div class="col-md-6">
45
           <div class="col-md-6">
46
             <select
46
             <select
47
               class="form-control uniSelect"
47
               class="form-control uniSelect"
48
-              name="propertyType"
49
-              id="propertyType"
48
+              name="resPropertyType"
49
+              id="resPropertyType"
50
               v-model="property.propertyTypeId"
50
               v-model="property.propertyTypeId"
51
               @change="PropertyTypeSelected"
51
               @change="PropertyTypeSelected"
52
             >
52
             >
53
               <option value="0">Please select type *</option>
53
               <option value="0">Please select type *</option>
54
-              <option v-for="item in propertyTypes" :value="item.id" :key="item.id">
55
-                {{ item.description }}
56
-              </option>
54
+              <option v-for="item in propertyTypes" :value="item.id" :key="item.id">{{
55
+                item.description
56
+              }}</option>
57
             </select>
57
             </select>
58
           </div>
58
           </div>
59
         </div>
59
         </div>
72
               <div class="col-md-6">
72
               <div class="col-md-6">
73
                 <div v-if="property.price < 1">
73
                 <div v-if="property.price < 1">
74
                   <label
74
                   <label
75
-                    for="price"
75
+                    for="resPrice"
76
                     class="uniSelectLabel"
76
                     class="uniSelectLabel"
77
                     style="text-transform:uppercase; margin-left:17px; background-color:white"
77
                     style="text-transform:uppercase; margin-left:17px; background-color:white"
78
                     >{{ salesType }} Price</label
78
                     >{{ salesType }} Price</label
79
                   >
79
                   >
80
                 </div>
80
                 </div>
81
                 <float-label label="Price">
81
                 <float-label label="Price">
82
-                  <currency-input <<<<<<< HEAD ======= onclick="this.setSelectionRange(0,
83
-                  this.value.length)" >>>>>>> 6bbfd86e089da859d019dcbda5cc0fe053af8db2 name="price"
84
-                  :value="property.price" @input="property.price = $event" v-model="property.price"
85
-                  id="price" class="form-control uniInput" />
82
+                  <currency-input
83
+                    onclick="this.setSelectionRange(0, this.value.length)"
84
+                    name="resPrice"
85
+                    :value="property.price"
86
+                    @input="property.price = $event"
87
+                    v-model="property.price"
88
+                    id="resPrice"
89
+                    class="form-control uniInput"
90
+                  />
86
                 </float-label>
91
                 </float-label>
87
               </div>
92
               </div>
88
               <div v-if="salesType === 'Rental'" class="col-md-6">
93
               <div v-if="salesType === 'Rental'" class="col-md-6">
89
                 <select
94
                 <select
90
                   class="form-control uniSelect"
95
                   class="form-control uniSelect"
91
-                  name="propertyType"
92
-                  id="propertyType"
96
+                  name="resPropertyType"
97
+                  id="resPropertyType"
93
                   v-model="property.pricePer"
98
                   v-model="property.pricePer"
94
                 >
99
                 >
95
                   <option value>Please select</option>
100
                   <option value>Please select</option>
103
                 <input
108
                 <input
104
                   type="date"
109
                   type="date"
105
                   class="form-control uniInput"
110
                   class="form-control uniInput"
106
-                  name="date"
111
+                  name="resDate"
107
                   v-model="property.dateAvailable"
112
                   v-model="property.dateAvailable"
108
                 />
113
                 />
109
               </div>
114
               </div>
114
             <div class="row my-3">
119
             <div class="row my-3">
115
               <div class="col-md-12">
120
               <div class="col-md-12">
116
                 <div v-if="!property.streetNumber">
121
                 <div v-if="!property.streetNumber">
117
-                  <label for="streetNumber" class="uniSelectLabel">STREET NUMBER</label>
122
+                  <label for="resStreetNumber" class="uniSelectLabel">STREET NUMBER</label>
118
                 </div>
123
                 </div>
119
                 <input
124
                 <input
120
                   class="form-control uniInput"
125
                   class="form-control uniInput"
121
                   type="text"
126
                   type="text"
122
-                  name="streetNumber"
123
-                  id="streetNumber"
127
+                  name="resStreetNumber"
128
+                  id="resStreetNumber"
124
                   v-model="property.streetNumber"
129
                   v-model="property.streetNumber"
125
                 />
130
                 />
126
               </div>
131
               </div>
128
             <div class="row my-3">
133
             <div class="row my-3">
129
               <div class="col-md-12">
134
               <div class="col-md-12">
130
                 <div v-if="!property.streetName">
135
                 <div v-if="!property.streetName">
131
-                  <label for="streetName" class="uniSelectLabel">STREET NAME</label>
136
+                  <label for="resStreetName" class="uniSelectLabel">STREET NAME</label>
132
                 </div>
137
                 </div>
133
                 <input
138
                 <input
134
                   class="form-control uniInput"
139
                   class="form-control uniInput"
135
                   type="text"
140
                   type="text"
136
-                  name="streetName"
137
-                  id="streetName"
141
+                  name="resStreetName"
142
+                  id="resStreetName"
138
                   v-model="property.streetName"
143
                   v-model="property.streetName"
139
                 />
144
                 />
140
               </div>
145
               </div>
142
             <div class="row my-3">
147
             <div class="row my-3">
143
               <div class="col-md-12">
148
               <div class="col-md-12">
144
                 <div v-if="!property.suburb">
149
                 <div v-if="!property.suburb">
145
-                  <label for="suburb" class="uniSelectLabel">SUBURB</label>
150
+                  <label for="resSuburb" class="uniSelectLabel">SUBURB</label>
146
                 </div>
151
                 </div>
147
                 <input
152
                 <input
148
                   class="form-control uniInput"
153
                   class="form-control uniInput"
149
                   type="text"
154
                   type="text"
150
-                  name="suburb"
151
-                  id="suburb"
155
+                  name="resSuburb"
156
+                  id="resSuburb"
152
                   v-model="property.suburb"
157
                   v-model="property.suburb"
153
                 />
158
                 />
154
               </div>
159
               </div>
156
             <div class="row my-3">
161
             <div class="row my-3">
157
               <div class="col-md-12">
162
               <div class="col-md-12">
158
                 <div v-if="!property.city">
163
                 <div v-if="!property.city">
159
-                  <label for="city" class="uniSelectLabel">CITY</label>
164
+                  <label for="resCity" class="uniSelectLabel">CITY</label>
160
                 </div>
165
                 </div>
161
                 <input
166
                 <input
162
                   class="form-control uniInput"
167
                   class="form-control uniInput"
163
                   type="text"
168
                   type="text"
164
-                  name="city"
165
-                  id="city"
169
+                  name="resCity"
170
+                  id="resCity"
166
                   v-model="property.city"
171
                   v-model="property.city"
167
                 />
172
                 />
168
               </div>
173
               </div>
170
             <div class="row my-3">
175
             <div class="row my-3">
171
               <div class="col-md-12">
176
               <div class="col-md-12">
172
                 <div v-if="!property.province">
177
                 <div v-if="!property.province">
173
-                  <label for="province" class="uniSelectLabel">PROVINCE</label>
178
+                  <label for="resProvince" class="uniSelectLabel">PROVINCE</label>
174
                 </div>
179
                 </div>
175
                 <input
180
                 <input
176
                   class="form-control uniInput"
181
                   class="form-control uniInput"
177
                   type="text"
182
                   type="text"
178
-                  name="province"
179
-                  id="province"
183
+                  name="resProvince"
184
+                  id="resProvince"
180
                   v-model="property.province"
185
                   v-model="property.province"
181
                 />
186
                 />
182
               </div>
187
               </div>
184
             <div class="row my-3">
189
             <div class="row my-3">
185
               <div class="col-md-12">
190
               <div class="col-md-12">
186
                 <div v-if="!property.postalCode">
191
                 <div v-if="!property.postalCode">
187
-                  <label for="postalCode" class="uniSelectLabel">POSTAL CODE</label>
192
+                  <label for="resPostalCode" class="uniSelectLabel">POSTAL CODE</label>
188
                 </div>
193
                 </div>
189
                 <input
194
                 <input
190
                   class="form-control uniInput"
195
                   class="form-control uniInput"
191
                   type="text"
196
                   type="text"
192
-                  name="postalCode"
193
-                  id="postalCode"
197
+                  name="resPostalCode"
198
+                  id="resPostalCode"
194
                   v-model="property.postalCode"
199
                   v-model="property.postalCode"
195
                 />
200
                 />
196
               </div>
201
               </div>
198
             <div class="row my-3">
203
             <div class="row my-3">
199
               <div class="col-md-12">
204
               <div class="col-md-12">
200
                 <div v-if="!property.country">
205
                 <div v-if="!property.country">
201
-                  <label for="country" class="uniSelectLabel">COUNTRY</label>
206
+                  <label for="resCountry" class="uniSelectLabel">COUNTRY</label>
202
                 </div>
207
                 </div>
203
                 <input
208
                 <input
204
                   class="form-control uniInput"
209
                   class="form-control uniInput"
205
                   type="text"
210
                   type="text"
206
-                  name="country"
207
-                  id="country"
211
+                  name="resCountry"
212
+                  id="resCountry"
208
                   v-model="property.country"
213
                   v-model="property.country"
209
                 />
214
                 />
210
               </div>
215
               </div>
233
         <div class="section-header">
238
         <div class="section-header">
234
           <h2>Property Information</h2>
239
           <h2>Property Information</h2>
235
         </div>
240
         </div>
236
-
237
-        <div v-for="item in propertyFields" :key="item.id">
238
-          <div v-if="item.name === 'Residential Fields'">
239
-            <UserField
240
-              :fields="item.fields"
241
-              :id="item.name"
242
-              @UpdateUserDefinedFields="UpdateUserDefinedFields"
243
-              :fieldValues="item.fields"
244
-            />
245
-          </div>
246
-        </div>
247
-        <!-- <UserField
248
-          v-if="propertyOverviewFields.length > 0"
249
-          :fields="propertyOverviewFields[0].fields"
250
-          @UpdateUserDefinedFields="UpdateUserDefinedFields"
251
-          :id="1"
252
-        ></UserField> -->
253
-        <!-- <div class="row">
254
-          <div class="col-md-12">
255
-            <div v-for="item in propertyFields" :key="item.id">
256
-              <div class="row">
257
-                <div class="col-sm-12">
258
-                  <div class="section-header">
259
-                    <h2>{{ item.name }}</h2>
260
-                  </div>
261
-                </div>
262
-              </div>
263
-              <UserField
264
-                :fields="item.fields"
265
-                :id="item.name"
266
-                @UpdateUserDefinedFields="UpdateUserDefinedFields"
267
-                :fieldValues="item.fields"
268
-              />
269
-            </div>
270
-          </div>
271
-        </div>-->
241
+        <UserField
242
+          :fields="propFields"
243
+          @UpdateUserDefinedFields="UpdateUserResidentialFields"
244
+        ></UserField>
272
         <div class="row">
245
         <div class="row">
273
           <div class="col-sm-12">
246
           <div class="col-sm-12">
274
             <div class="section-header">
247
             <div class="section-header">
284
                 <input
257
                 <input
285
                   class="form-control uniInput"
258
                   class="form-control uniInput"
286
                   type="link"
259
                   type="link"
287
-                  name="vtlink"
288
-                  id="vtlink"
260
+                  name="resVtlink"
261
+                  id="resVtlink"
289
                   v-model="property.virtualTour"
262
                   v-model="property.virtualTour"
290
                 />
263
                 />
291
               </float-label>
264
               </float-label>
300
                 <input
273
                 <input
301
                   class="form-control uniInput"
274
                   class="form-control uniInput"
302
                   type="link"
275
                   type="link"
303
-                  name="vlink"
304
-                  id="vlink"
276
+                  name="resVlink"
277
+                  id="resVlink"
305
                   v-model="property.video"
278
                   v-model="property.video"
306
                 />
279
                 />
307
               </float-label>
280
               </float-label>
355
     carouselSection,
328
     carouselSection,
356
     mapSection
329
     mapSection
357
   },
330
   },
331
+  props: {
332
+    propFields: {}
333
+  },
358
   data() {
334
   data() {
359
     return {
335
     return {
360
       propertyType: "Residential",
336
       propertyType: "Residential",
477
     loadedImages(values) {
453
     loadedImages(values) {
478
       this.images = values;
454
       this.images = values;
479
     },
455
     },
480
-    UpdateUserDefinedFields(item) {
456
+    UpdateUserResidentialFields(item) {
481
       let update = false;
457
       let update = false;
482
       this.propertyFieldValues.forEach(element => {
458
       this.propertyFieldValues.forEach(element => {
483
-        console.log(element);
484
-
485
         if (element.userDefinedFieldId === item.userDefinedFieldId) {
459
         if (element.userDefinedFieldId === item.userDefinedFieldId) {
486
           element.value = item.value;
460
           element.value = item.value;
487
           update = true;
461
           update = true;
518
     }
492
     }
519
   },
493
   },
520
   mounted() {
494
   mounted() {
521
-    console.log(this.propertyFields);
522
-
523
     this.wait = false;
495
     this.wait = false;
524
     this.getProperty(0);
496
     this.getProperty(0);
525
     this.clearPropertyImages();
497
     this.clearPropertyImages();

+ 14
- 8
src/components/property/residential/residentialSearchResults.vue View File

1
 <template>
1
 <template>
2
   <main id="main" style="margin-top:-20px; padding-bottom:50px">
2
   <main id="main" style="margin-top:-20px; padding-bottom:50px">
3
     <div v-if="wait" id="preloader"></div>
3
     <div v-if="wait" id="preloader"></div>
4
-    <section v-if="properties.length > 0">
4
+    <div class="row pt-5 justify-content-md-center">
5
+      <h3 v-if="propertySearch.salesType === 'Sale'">RESIDENTIAL PROPERTIES FOR SALE</h3>
6
+      <h3 v-else-if="propertySearch.salesType === 'Rent'">RESIDENTIAL PROPERTIES FOR RENT</h3>
7
+    </div>
8
+    <propertyCard
9
+      v-if="properties.length > 0"
10
+      name="propertyholder"
11
+      :properties="properties"
12
+      :showSort="false"
13
+    />
14
+    <!-- <section v-if="properties.length > 0">
5
       <div class="container">
15
       <div class="container">
6
-        <div class="row pt-5 justify-content-md-center">
7
-          <h3 v-if="propertySearch.salesType === 'Sale'">RESIDENTIAL PROPERTIES FOR SALE</h3>
8
-          <h3 v-else-if="propertySearch.salesType === 'Rent'">RESIDENTIAL PROPERTIES FOR RENT</h3>
9
-        </div>
10
         <div class="row justify-content-md-center">
16
         <div class="row justify-content-md-center">
11
           <div
17
           <div
12
             class="col-lg-3 col-md-6 col-sm-6"
18
             class="col-lg-3 col-md-6 col-sm-6"
21
                 <p>{{ currentProperty.shortDescription }}</p>
27
                 <p>{{ currentProperty.shortDescription }}</p>
22
                 <br />
28
                 <br />
23
 
29
 
24
-                <!-- <a href="commercialproperty-page.php" class="btn-white-border">VIEW</a> -->
30
+                <a href="commercialproperty-page.php" class="btn-white-border">VIEW</a>
25
                 <router-link
31
                 <router-link
26
                   class="btn-white-border"
32
                   class="btn-white-border"
27
                   :to="`/property/residential/property/${currentProperty.id}`"
33
                   :to="`/property/residential/property/${currentProperty.id}`"
32
           </div>
38
           </div>
33
         </div>
39
         </div>
34
       </div>
40
       </div>
35
-    </section>
41
+    </section> -->
36
     <section v-else id="intro" style="margin-bottom:-50px">
42
     <section v-else id="intro" style="margin-bottom:-50px">
37
       <div class="container">
43
       <div class="container">
38
         <div class="row d-flex justify-content-center">
44
         <div class="row d-flex justify-content-center">
69
 <script>
75
 <script>
70
 /* eslint-disable */
76
 /* eslint-disable */
71
 import { mapState, mapActions } from "vuex";
77
 import { mapState, mapActions } from "vuex";
72
-import propertyCard from "../propertyCard";
78
+import propertyCard from "../propertyCardSearch";
73
 
79
 
74
 export default {
80
 export default {
75
   name: "propertysearch",
81
   name: "propertysearch",

+ 42
- 23
src/components/property/residential/singleView/contentSection.vue View File

1
 <template>
1
 <template>
2
   <section>
2
   <section>
3
-    <div class="container pb-5">
3
+    <div class="container">
4
       <div class="row" id="resort-profile">
4
       <div class="row" id="resort-profile">
5
         <div class="col-md-4">
5
         <div class="col-md-4">
6
           <div class="resPortfolioSection">
6
           <div class="resPortfolioSection">
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>
46
             </div>
46
             </div>
47
-
48
-            <div class="btn-white-border"><i class="fa fa-search"></i>BOOK A VIEWING</div>
49
           </div>
47
           </div>
50
           <div class="panel-left px-5 pb-5 text-center">
48
           <div class="panel-left px-5 pb-5 text-center">
51
             <h4 class="text-white">Share this Property</h4>
49
             <h4 class="text-white">Share this Property</h4>
91
                 <p v-html="property.description"></p>
89
                 <p v-html="property.description"></p>
92
               </div>
90
               </div>
93
             </div>
91
             </div>
94
-          </div>
95
-          <div>
96
-            <router-link
97
-              style="float:right"
98
-              class="btn-solid-blue mt-3"
99
-              :to="{ name: 'EnquireNow', params: { id: $route.params.id } }"
100
-              >MORE INFO...</router-link
101
-            >
102
-            <h4>Property Features</h4>
103
-            {{ propertyFeatures }}
104
-            <div v-for="(data, i) in property.displayData" :key="i" class="row my-3">
105
-              <div v-for="(field, j) in data.values" :key="j" class="col-md-6">
106
-                <div v-if="field.value.toUpperCase() != 'TRUE'">
107
-                  <i class="fa fa-check-circle"></i>
108
-                  {{ field.value }} {{ field.name }}
109
-                </div>
110
-                <div v-else>
111
-                  <i class="fa fa-check-circle"></i>
112
-                  {{ field.name }}
92
+            <div class="row">
93
+              <div class="col">
94
+                <h4>Property Features</h4>
95
+              </div>
96
+            </div>
97
+            <div class="row">
98
+              <div class="col-md-8">
99
+                <div v-for="(data, i) in property.displayData" :key="i" class="row my-3">
100
+                  <div v-for="(field, j) in data.values" :key="j" class="col-md-6">
101
+                    <div v-if="field.value !== 'yes'">
102
+                      <i class="fa fa-check-circle"></i>
103
+                      {{ field.value }} {{ field.name }}
104
+                    </div>
105
+                    <div v-else>
106
+                      <i class="fa fa-check-circle"></i>
107
+                      {{ field.name }}
108
+                    </div>
109
+                  </div>
113
                 </div>
110
                 </div>
114
               </div>
111
               </div>
112
+              <div class="col-md-4">
113
+                <router-link
114
+                  style="float:right; white-space: nowrap;"
115
+                  class="btn-solid-blue mt-3"
116
+                  :to="{ name: 'EnquireNow', params: { id: $route.params.id } }"
117
+                  >ENQUIRE NOW</router-link
118
+                >
119
+              </div>
115
             </div>
120
             </div>
116
           </div>
121
           </div>
117
-          <h4 v-if="property.video != null" class="mt-5">Video Tour</h4>
122
+
123
+          <h4 v-if="property.virtualTour != null" style="margin-top:150px">Virtual Tour</h4>
124
+          <iframe
125
+            v-if="property.virtualTour != null"
126
+            width="100%"
127
+            :src="property.virtualTour"
128
+            frameborder="0"
129
+            allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
130
+            allowfullscreen
131
+            style="margin-bottom:-6px"
132
+            class="mt-3"
133
+          ></iframe>
134
+
135
+          <h4 v-if="property.video != null" class="mt-5">Video</h4>
118
           <iframe
136
           <iframe
119
             v-if="property.video != null"
137
             v-if="property.video != null"
120
             width="100%"
138
             width="100%"
125
             style="margin-bottom:-6px"
143
             style="margin-bottom:-6px"
126
             class="mt-3"
144
             class="mt-3"
127
           ></iframe>
145
           ></iframe>
146
+
128
           <p></p>
147
           <p></p>
129
           <div class="d-flex mt-3">
148
           <div class="d-flex mt-3">
130
             <iframe
149
             <iframe

+ 78
- 77
src/components/shared/listView.vue View File

1
 /* eslint-disable no-restricted-syntax */ /* eslint-disable guard-for-in */
1
 /* eslint-disable no-restricted-syntax */ /* eslint-disable guard-for-in */
2
 <template>
2
 <template>
3
   <div>
3
   <div>
4
-    <div style="height:5px"></div>
5
-    <div class="d-flex justify-content-between">
6
-      <div class="p-2" v-if="!hideSearch">
7
-        <float-label label="SEARCH">
8
-          <input v-model="searchItem" class="form-control uniInput mt-3" placeholder="Search..." />
4
+    <div class="row">
5
+      <div align="center" class="col">
6
+        <float-label class="mb-3" label="SEARCH" style="width:50%; float:center">
7
+          <input v-model="searchItem" class="form-control uniInput mt-3" placeholder="SEARCH" />
9
         </float-label>
8
         </float-label>
10
       </div>
9
       </div>
10
+    </div>
11
+
12
+    <div class="d-flex justify-content-between">
13
+      <div class="p-2" v-if="!hideSearch"></div>
11
       <div class="p-2" v-if="title">
14
       <div class="p-2" v-if="title">
12
         <h2>{{ title }}</h2>
15
         <h2>{{ title }}</h2>
13
       </div>
16
       </div>
14
       <div class="p-2">
17
       <div class="p-2">
15
         <div class="d-flex flex-row">
18
         <div class="d-flex flex-row">
16
           <div class="p2" v-if="showColumnChooser">
19
           <div class="p2" v-if="showColumnChooser">
17
-            <div
18
-              class="btn-solid-blue cursor-pointer"
19
-              data-toggle="modal"
20
-              data-target="#myModal"
21
-            >Column Chooser</div>
20
+            <div class="btn-solid-blue cursor-pointer" data-toggle="modal" data-target="#myModal">
21
+              Column Chooser
22
+            </div>
22
             <div class="col-md-12">
23
             <div class="col-md-12">
23
               <div id="myModal" class="modal fade" role="dialog">
24
               <div id="myModal" class="modal fade" role="dialog">
24
                 <div class="modal-dialog modal-lg" style="width:500px">
25
                 <div class="modal-dialog modal-lg" style="width:500px">
37
             </div>
38
             </div>
38
           </div>
39
           </div>
39
           <div class="p2" v-if="selectedItems.length > 0">
40
           <div class="p2" v-if="selectedItems.length > 0">
40
-            <div class="btn-solid-blue cursor-pointer" @click="onClearSelected()">Clear Selected</div>
41
+            <div class="btn-solid-blue cursor-pointer" @click="onClearSelected()">
42
+              Clear Selected
43
+            </div>
41
           </div>
44
           </div>
42
           <div class="p2" v-if="showNew">
45
           <div class="p2" v-if="showNew">
43
             <div class="btn-solid-blue cursor-pointer" @click="onNew()">New</div>
46
             <div class="btn-solid-blue cursor-pointer" @click="onNew()">New</div>
62
                 :class="{ active: hover === c }"
65
                 :class="{ active: hover === c }"
63
               >
66
               >
64
                 <div class="d-flex bd-highlight">
67
                 <div class="d-flex bd-highlight">
65
-                  <div
66
-                    v-if="displayHeaders.length === 0"
67
-                    class="p-2 w-100 bd-highlight"
68
-                  >{{ column | toProper }}</div>
69
-                  <div
70
-                    v-else
71
-                    class="p-2 w-100 bd-highlight"
72
-                  >{{ displayHeaders[c] !== "" ? displayHeaders[c] : column | toProper }}</div>
68
+                  <div v-if="displayHeaders.length === 0" class="p-2 w-100 bd-highlight">
69
+                    {{ column | toProper }}
70
+                  </div>
71
+                  <div v-else class="p-2 w-100 bd-highlight">
72
+                    {{ displayHeaders[c] !== "" ? displayHeaders[c] : column | toProper }}
73
+                  </div>
73
                   <div class="p-2 flex-shrink-1 bd-highlight">
74
                   <div class="p-2 flex-shrink-1 bd-highlight">
74
                     <img
75
                     <img
75
                       src="../../../public/img/sort-up.png"
76
                       src="../../../public/img/sort-up.png"
90
             <th v-if="deleteable"></th>
91
             <th v-if="deleteable"></th>
91
           </tr>
92
           </tr>
92
         </thead>
93
         </thead>
93
-        <tbody class="table">
94
+
95
+        <tbody>
94
           <tr
96
           <tr
95
             v-for="(item, i) in DisplayItems"
97
             v-for="(item, i) in DisplayItems"
96
             :key="i"
98
             :key="i"
98
             :class="{ selected: isSelected(i), 'cursor-pointer': allowSelect }"
100
             :class="{ selected: isSelected(i), 'cursor-pointer': allowSelect }"
99
           >
101
           >
100
             <td v-for="(column, c) in Columns" :key="c">
102
             <td v-for="(column, c) in Columns" :key="c">
101
-              <div
102
-                v-if="displayFormats.length === 0"
103
-              >{{ isObject(item[column]) ? item[column].display : item[column] }}</div>
103
+              <div v-if="displayFormats.length === 0">
104
+                {{ isObject(item[column]) ? item[column].display : item[column] }}
105
+              </div>
104
               <div v-else-if="displayFormats.length > 0 && displayFormats[c] === 'date'">
106
               <div v-else-if="displayFormats.length > 0 && displayFormats[c] === 'date'">
105
-                <div
106
-                  v-if="item[column] !== '0001-01-01T00:00:00'"
107
-                >{{ isObject(item[column]) ? item[column].display : item[column] | toDate }}</div>
107
+                <div v-if="item[column] !== '0001-01-01T00:00:00'">
108
+                  {{ isObject(item[column]) ? item[column].display : item[column] | toDate }}
109
+                </div>
108
               </div>
110
               </div>
109
               <div
111
               <div
112
+                style="padding-left:10px;white-space: nowrap;"
110
                 v-else-if="displayFormats.length > 0 && displayFormats[c] === 'money'"
113
                 v-else-if="displayFormats.length > 0 && displayFormats[c] === 'money'"
111
-              >{{ isObject(item[column]) ? item[column].display : item[column] | toCurrency }}</div>
114
+              >
115
+                {{ isObject(item[column]) ? item[column].display : item[column] | toCurrency }}
116
+              </div>
112
               <div v-else-if="displayFormats.length > 0 && displayFormats[c] === 'image'">
117
               <div v-else-if="displayFormats.length > 0 && displayFormats[c] === 'image'">
113
                 <img :src="item[column]" style="height:100px; width:100px; object-fit: cover;" />
118
                 <img :src="item[column]" style="height:100px; width:100px; object-fit: cover;" />
114
               </div>
119
               </div>
115
               <div v-else>{{ isObject(item[column]) ? item[column].display : item[column] }}</div>
120
               <div v-else>{{ isObject(item[column]) ? item[column].display : item[column] }}</div>
116
             </td>
121
             </td>
117
             <td v-if="showCustomAction" class="my-width">
122
             <td v-if="showCustomAction" class="my-width">
118
-              <button
119
-                type="button"
120
-                class="btn my-btn"
121
-                @click="onCustomClick(item)"
122
-              >{{ CustomActionHeading }}</button>
123
+              <button type="button" class="btn my-btn" @click="onCustomClick(item)">
124
+                <p v-if="CustomActionHeading !== 'Publish'">{{ CustomActionHeading }}</p>
125
+                <img v-else src="../../../public/img/icons/Upload.png" height="25" width="25" />
126
+              </button>
123
             </td>
127
             </td>
128
+
124
             <td v-if="editable" class="my-width">
129
             <td v-if="editable" class="my-width">
125
               <a @click="onEdit(item)" class="p-3">
130
               <a @click="onEdit(item)" class="p-3">
126
                 <img src="../../../public/img/icons/Edit.png" height="25" width="25" />
131
                 <img src="../../../public/img/icons/Edit.png" height="25" width="25" />
139
       <div class="d-flex justify-content-between" v-if="showPager">
144
       <div class="d-flex justify-content-between" v-if="showPager">
140
         <div class="p-1">
145
         <div class="p-1">
141
           {{
146
           {{
142
-          currentPage +
143
-          " / " +
144
-          PageCount +
145
-          (!hideItemCount ? " - (" + FilteredItems.length + " items)" : "")
147
+            currentPage +
148
+              " / " +
149
+              PageCount +
150
+              (!hideItemCount ? " - (" + FilteredItems.length + " items)" : "")
146
           }}
151
           }}
147
         </div>
152
         </div>
148
         <div class="p-1">
153
         <div class="p-1">
187
   components: {
192
   components: {
188
     BasePagination,
193
     BasePagination,
189
     Alert,
194
     Alert,
190
-    ListViewControl,
195
+    ListViewControl
191
   },
196
   },
192
   mounted() {
197
   mounted() {
193
     try {
198
     try {
203
   },
208
   },
204
   props: {
209
   props: {
205
     compact: {
210
     compact: {
206
-      default: true,
211
+      default: false
207
     },
212
     },
208
     allowSelect: {
213
     allowSelect: {
209
-      default: true,
214
+      default: true
210
     },
215
     },
211
     allowMultipleSelect: {
216
     allowMultipleSelect: {
212
-      default: false,
217
+      default: false
213
     },
218
     },
214
     hideSearch: {
219
     hideSearch: {
215
-      default: false,
220
+      default: false
216
     },
221
     },
217
     showNew: {
222
     showNew: {
218
-      default: true,
223
+      default: true
219
     },
224
     },
220
     items: undefined,
225
     items: undefined,
221
     editable: {
226
     editable: {
222
-      default: false,
227
+      default: false
223
     },
228
     },
224
     deleteable: {
229
     deleteable: {
225
-      default: false,
230
+      default: false
226
     },
231
     },
227
     columnCount: {
232
     columnCount: {
228
-      default: 6,
233
+      default: 6
229
     },
234
     },
230
     showPager: {
235
     showPager: {
231
-      default: true,
236
+      default: true
232
     },
237
     },
233
     title: {
238
     title: {
234
-      default: undefined,
239
+      default: undefined
235
     },
240
     },
236
     sortKey: {
241
     sortKey: {
237
-      default: "id",
242
+      default: "id"
238
     },
243
     },
239
     hideItemCount: {
244
     hideItemCount: {
240
-      default: false,
245
+      default: false
241
     },
246
     },
242
     currentPage: {
247
     currentPage: {
243
-      default: 1,
248
+      default: 1
244
     },
249
     },
245
     bordered: {
250
     bordered: {
246
-      default: true,
251
+      default: false
247
     },
252
     },
248
     striped: {
253
     striped: {
249
-      default: true,
254
+      default: true
250
     },
255
     },
251
     showColumnChooser: {
256
     showColumnChooser: {
252
-      default: true,
257
+      default: true
253
     },
258
     },
254
     displayColumns: {
259
     displayColumns: {
255
       type: Array,
260
       type: Array,
256
-      default: () => [],
261
+      default: () => []
257
     },
262
     },
258
     displayFormats: {
263
     displayFormats: {
259
       type: Array,
264
       type: Array,
260
-      default: () => [],
265
+      default: () => []
261
     },
266
     },
262
     displayHeaders: {
267
     displayHeaders: {
263
       type: Array,
268
       type: Array,
264
-      default: () => [],
269
+      default: () => []
265
     },
270
     },
266
     showCustomAction: {
271
     showCustomAction: {
267
-      default: false,
272
+      default: false
268
     },
273
     },
269
     CustomActionHeading: {
274
     CustomActionHeading: {
270
-      default: "",
275
+      default: ""
271
     },
276
     },
272
     CustomActionCondition: {
277
     CustomActionCondition: {
273
-      default: "",
274
-    },
278
+      default: ""
279
+    }
275
   },
280
   },
276
   data() {
281
   data() {
277
     return {
282
     return {
284
       visibleItemsPerPageCount: 20,
289
       visibleItemsPerPageCount: 20,
285
       itemsPerPageList: ItemsPerPageList,
290
       itemsPerPageList: ItemsPerPageList,
286
       visibleColumn: [],
291
       visibleColumn: [],
287
-      allColumn: [],
292
+      allColumn: []
288
     };
293
     };
289
   },
294
   },
290
   methods: {
295
   methods: {
306
         for (const i in Object.keys(this.items)) {
311
         for (const i in Object.keys(this.items)) {
307
           const item = this.items[i];
312
           const item = this.items[i];
308
           for (const o in Object.keys(item)) {
313
           for (const o in Object.keys(item)) {
309
-            if (
310
-              !listAll.includes(Object.keys(item)[o]) &&
311
-              !Array.isArray(Object.values(item)[o])
312
-            ) {
314
+            if (!listAll.includes(Object.keys(item)[o]) && !Array.isArray(Object.values(item)[o])) {
313
               const columnName = Object.keys(item)[o];
315
               const columnName = Object.keys(item)[o];
314
-              if (!listAll.some((x) => x.column === columnName)) {
316
+              if (!listAll.some(x => x.column === columnName)) {
315
                 listAll.push({
317
                 listAll.push({
316
                   column: columnName,
318
                   column: columnName,
317
-                  show:
318
-                    _.filter(listAll, (x) => x.show).length < this.columnCount,
319
+                  show: _.filter(listAll, x => x.show).length < this.columnCount
319
                 });
320
                 });
320
               }
321
               }
321
             }
322
             }
330
     },
331
     },
331
     isSelected(i) {
332
     isSelected(i) {
332
       const ind = this.getActualIndex(i);
333
       const ind = this.getActualIndex(i);
333
-      return _.some(this.selectedItems, (x) => x === ind);
334
+      return _.some(this.selectedItems, x => x === ind);
334
     },
335
     },
335
     onNew() {
336
     onNew() {
336
       this.$emit("onNew");
337
       this.$emit("onNew");
366
     },
367
     },
367
     onRowClick(item, i) {
368
     onRowClick(item, i) {
368
       const ind = this.getActualIndex(i);
369
       const ind = this.getActualIndex(i);
369
-      if (_.some(this.selectedItems, (x) => x === ind)) {
370
-        this.selectedItems = this.selectedItems.filter((x) => x !== ind);
370
+      if (_.some(this.selectedItems, x => x === ind)) {
371
+        this.selectedItems = this.selectedItems.filter(x => x !== ind);
371
       } else {
372
       } else {
372
         if (!this.allowMultipleSelect) {
373
         if (!this.allowMultipleSelect) {
373
           this.selectedItems = [];
374
           this.selectedItems = [];
420
         if (array[i] === value) return true;
421
         if (array[i] === value) return true;
421
       }
422
       }
422
       return false;
423
       return false;
423
-    },
424
+    }
424
   },
425
   },
425
   computed: {
426
   computed: {
426
     ListWidth() {
427
     ListWidth() {
447
           listColumns.push(this.displayColumns[i]);
448
           listColumns.push(this.displayColumns[i]);
448
         }
449
         }
449
       } else {
450
       } else {
450
-        const list = _.filter(this.allColumn, (x) => x.show);
451
+        const list = _.filter(this.allColumn, x => x.show);
451
         for (const i in list) {
452
         for (const i in list) {
452
           const item = list[i];
453
           const item = list[i];
453
           if (item) {
454
           if (item) {
464
       return list;
465
       return list;
465
     },
466
     },
466
     FilteredItems() {
467
     FilteredItems() {
467
-      const list = _.filter(this.items, (item) =>
468
+      const list = _.filter(this.items, item =>
468
         Object.values(item).some(
469
         Object.values(item).some(
469
-          (i) =>
470
+          i =>
470
             JSON.stringify(i)
471
             JSON.stringify(i)
471
               .toLowerCase()
472
               .toLowerCase()
472
               .indexOf(this.searchItem.toLowerCase()) > -1
473
               .indexOf(this.searchItem.toLowerCase()) > -1
484
       return list.slice(startSlice, endSlice);
485
       return list.slice(startSlice, endSlice);
485
     },
486
     },
486
 
487
 
487
-    GetAllColumn() {},
488
-  },
488
+    GetAllColumn() {}
489
+  }
489
 };
490
 };
490
 </script>
491
 </script>
491
 <style scoped>
492
 <style scoped>

+ 8
- 4
src/components/timeshare/resort/resortPageNew.vue View File

1
 <template>
1
 <template>
2
   <div>
2
   <div>
3
     <carouselSection v-if="!wait" :resortImages="resort.images" />
3
     <carouselSection v-if="!wait" :resortImages="resort.images" />
4
-    <main id="main" style="margin-top:-20px">
4
+    <main id="main" style="margin-top:-20px;">
5
       <section>
5
       <section>
6
-        <div class="container">
6
+        <div class="container wider">
7
           <div class="row" id="resort-profile">
7
           <div class="row" id="resort-profile">
8
             <div class="col-md-3">
8
             <div class="col-md-3">
9
               <img src="img/listings/property1/property1-gallery.jpg" class="img-fluid" alt />
9
               <img src="img/listings/property1/property1-gallery.jpg" class="img-fluid" alt />
18
               <gallerySection :images="resort.images" />
18
               <gallerySection :images="resort.images" />
19
               <FilterComponent :hideTop="true" />
19
               <FilterComponent :hideTop="true" />
20
             </div>
20
             </div>
21
-            <div class="col-md-9 p-5 resort-profile">
21
+            <div class="col-md-9 resort-profile" style="margin-top:15px; margin-bottom:15px;">
22
               <h2>{{ resort.prName }}</h2>
22
               <h2>{{ resort.prName }}</h2>
23
               <WeekList :resortCode="resortCode" />
23
               <WeekList :resortCode="resortCode" />
24
               <p v-if="resort.description && resort.description !== ''">{{ resort.description }}</p>
24
               <p v-if="resort.description && resort.description !== ''">{{ resort.description }}</p>
97
 };
97
 };
98
 </script>
98
 </script>
99
 
99
 
100
-<style lang="scss" scoped></style>
100
+<style lang="scss" scoped>
101
+.wider {
102
+  width: 1600px;
103
+}
104
+</style>

+ 22
- 22
src/components/timeshare/sell/contentSection.vue View File

843
   name: "TimeshareToSell",
843
   name: "TimeshareToSell",
844
   props: {
844
   props: {
845
     weekId: {
845
     weekId: {
846
-      default: 0
847
-    }
846
+      default: 0,
847
+    },
848
   },
848
   },
849
   data() {
849
   data() {
850
     return {
850
     return {
851
       wait: false,
851
       wait: false,
852
-      userLoggedIn: Log.isLoggedIn()
852
+      userLoggedIn: Log.isLoggedIn(),
853
     };
853
     };
854
   },
854
   },
855
   components: {
855
   components: {
856
     addressAutoComplete,
856
     addressAutoComplete,
857
-    Alert
857
+    Alert,
858
   },
858
   },
859
   mounted() {
859
   mounted() {
860
     if (this.sellItem.id) {
860
     if (this.sellItem.id) {
880
       "sellItem",
880
       "sellItem",
881
       "agencies",
881
       "agencies",
882
       "agents",
882
       "agents",
883
-      "getTemplate"
883
+      "getTemplate",
884
     ]),
884
     ]),
885
     ...mapState("individual", ["indiv"]),
885
     ...mapState("individual", ["indiv"]),
886
     ...mapState("authentication", ["isLoggedIn"]),
886
     ...mapState("authentication", ["isLoggedIn"]),
887
     ...mapGetters({
887
     ...mapGetters({
888
       user: "authentication/getUser",
888
       user: "authentication/getUser",
889
-      person: "authentication/getPerson"
889
+      person: "authentication/getPerson",
890
     }),
890
     }),
891
     ...mapState("bank", ["banks"]),
891
     ...mapState("bank", ["banks"]),
892
     refAgent() {
892
     refAgent() {
901
         this.sellItem.region.regionCode
901
         this.sellItem.region.regionCode
902
       ) {
902
       ) {
903
         const item = this.detailedRegion.find(
903
         const item = this.detailedRegion.find(
904
-          region => region.region.regionCode === this.sellItem.region.regionCode
904
+          (region) =>
905
+            region.region.regionCode === this.sellItem.region.regionCode
905
         );
906
         );
906
         if (item) {
907
         if (item) {
907
           list = item.children;
908
           list = item.children;
909
       } else {
910
       } else {
910
         list = this.resorts;
911
         list = this.resorts;
911
       }
912
       }
912
-      return _.sortBy(list, x => x.resortName);
913
+      return _.sortBy(list, (x) => x.resortName);
913
     },
914
     },
914
     isLoggedIn() {
915
     isLoggedIn() {
915
       return this.user && this.person;
916
       return this.user && this.person;
916
     },
917
     },
917
     displayNotDeletedAgents() {
918
     displayNotDeletedAgents() {
918
       var notDeletedArr = [];
919
       var notDeletedArr = [];
919
-      this.agents.forEach(agent => {
920
+      this.agents.forEach((agent) => {
920
         if (!agent.isDeleted) {
921
         if (!agent.isDeleted) {
921
           if (agent.agencyId === this.sellItem.agencyId) {
922
           if (agent.agencyId === this.sellItem.agencyId) {
922
             notDeletedArr.push(agent);
923
             notDeletedArr.push(agent);
937
         return false;
938
         return false;
938
       }
939
       }
939
       return true;
940
       return true;
940
-    }
941
+    },
941
   },
942
   },
942
   methods: {
943
   methods: {
943
     ...mapActions("individual", ["getIndividual"]),
944
     ...mapActions("individual", ["getIndividual"]),
945
       "initTimeshare",
946
       "initTimeshare",
946
       "onResortChange",
947
       "onResortChange",
947
       "saveWeek",
948
       "saveWeek",
948
-      "getBlankWeek"
949
+      "getBlankWeek",
949
     ]),
950
     ]),
950
     ...mapActions("payment", ["addPayment"]),
951
     ...mapActions("payment", ["addPayment"]),
951
     ...mapActions("bank", ["getBanks"]),
952
     ...mapActions("bank", ["getBanks"]),
957
       if (this.userLoggedIn) {
958
       if (this.userLoggedIn) {
958
         this.sellItem.ownerObject = this.indiv;
959
         this.sellItem.ownerObject = this.indiv;
959
         this.sellItem.status = undefined;
960
         this.sellItem.status = undefined;
960
-        console.log(this.sellItem);
961
-        //   this.saveWeek(this.sellItem).then(fulfilled => {
962
-        //     this.paygateRedirect();
963
-        //   });
961
+        this.saveWeek(this.sellItem).then((fulfilled) => {
962
+          this.paygateRedirect();
963
+        });
964
       }
964
       }
965
     },
965
     },
966
     paygateRedirect() {
966
     paygateRedirect() {
971
         creatydById: Log.getUser().id, //Log.getUser().id,
971
         creatydById: Log.getUser().id, //Log.getUser().id,
972
         amount: amount,
972
         amount: amount,
973
         paymentStatus: "",
973
         paymentStatus: "",
974
-        paymentToken: ""
974
+        paymentToken: "",
975
       };
975
       };
976
 
976
 
977
-      this.addPayment(paymentObj).then(res => {
977
+      this.addPayment(paymentObj).then((res) => {
978
         this.$router.push({
978
         this.$router.push({
979
           name: "PaymentGateway",
979
           name: "PaymentGateway",
980
           params: {
980
           params: {
981
             paymentReqId: res.PAY_REQUEST_ID,
981
             paymentReqId: res.PAY_REQUEST_ID,
982
-            checksum: res.CHECKSUM
983
-          }
982
+            checksum: res.CHECKSUM,
983
+          },
984
         });
984
         });
985
       });
985
       });
986
     },
986
     },
1005
     resortChange() {
1005
     resortChange() {
1006
       this.onResortChange({
1006
       this.onResortChange({
1007
         resortName: this.sellItem.resort.resortName,
1007
         resortName: this.sellItem.resort.resortName,
1008
-        resortCode: this.sellItem.resort.resortCode
1008
+        resortCode: this.sellItem.resort.resortCode,
1009
       });
1009
       });
1010
 
1010
 
1011
       if (this.sellItem && this.sellItem.resort === "Other") {
1011
       if (this.sellItem && this.sellItem.resort === "Other") {
1035
       } else {
1035
       } else {
1036
         this.sellItem.mandateDate = undefined;
1036
         this.sellItem.mandateDate = undefined;
1037
       }
1037
       }
1038
-    }
1039
-  }
1038
+    },
1039
+  },
1040
 };
1040
 };
1041
 </script>
1041
 </script>
1042
 
1042
 

+ 5
- 2
src/main.js View File

37
 Vue.prototype.$axios = axios;
37
 Vue.prototype.$axios = axios;
38
 const pluginOptions = {
38
 const pluginOptions = {
39
   /* see config reference */
39
   /* see config reference */
40
-  globalOptions: { currency: ["ZAR", null, { prefix: "R" }][2] }
40
+  globalOptions: {
41
+    currency: ["ZAR", null, { prefix: "R" }][2],
42
+    precision: 0
43
+  }
41
 };
44
 };
42
 Vue.use(VueCurrencyInput, pluginOptions);
45
 Vue.use(VueCurrencyInput, pluginOptions);
43
 Vue.prototype.$http = axios;
46
 Vue.prototype.$http = axios;
63
     return value;
66
     return value;
64
   }
67
   }
65
   const formatter = new Intl.NumberFormat("en-US", {
68
   const formatter = new Intl.NumberFormat("en-US", {
66
-    minimumFractionDigits: 2
69
+    minimumFractionDigits: 0
67
   });
70
   });
68
   return `R ${formatter.format(value)}`;
71
   return `R ${formatter.format(value)}`;
69
 });
72
 });

+ 6
- 4
src/store/modules/property/property.js View File

53
       state.statuses = stats;
53
       state.statuses = stats;
54
     }
54
     }
55
   },
55
   },
56
-  getters: {},
56
+  getters: {
57
+    getFields: state => state.propertyFields
58
+  },
57
   actions: {
59
   actions: {
58
     getStatuses({ commit }) {
60
     getStatuses({ commit }) {
59
       axios
61
       axios
123
         .then(response => commit("setPropertyOverviewFields", response.data));
125
         .then(response => commit("setPropertyOverviewFields", response.data));
124
     },
126
     },
125
     getPropertyFields({ commit }, propertyType) {
127
     getPropertyFields({ commit }, propertyType) {
126
-      axios
127
-        .get(`/api/propertyFields/PropertyType/${propertyType}`)
128
-        .then(response => commit("setPropertyFields", response.data));
128
+      return axios.get(`/api/propertyFields/PropertyType/${propertyType}`).then(response => {
129
+        commit("setPropertyFields", response.data);
130
+      });
129
     },
131
     },
130
     getSavedPropertyFields({ commit }, id) {
132
     getSavedPropertyFields({ commit }, id) {
131
       axios
133
       axios

+ 2
- 2
src/store/modules/timeshare/myWeeks.js View File

58
     //   .then(result => commit('removeListing', id))
58
     //   .then(result => commit('removeListing', id))
59
     //   .catch(console.error);
59
     //   .catch(console.error);
60
     // }
60
     // }
61
-    getWeek({ commit }, id) {
62
-      axios
61
+    async getWeek({ commit }, id) {
62
+      await axios
63
         .get(`/api/timeshareweek/${id}`)
63
         .get(`/api/timeshareweek/${id}`)
64
         .then(r => {
64
         .then(r => {
65
           console.log(JSON.stringify(r));
65
           console.log(JSON.stringify(r));

Loading…
Cancel
Save