Lene 4 роки тому
джерело
коміт
0e50526ad0
29 змінених файлів з 22654 додано та 21733 видалено
  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
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 7921
- 7817
public/css/bootstrap.min.css
Різницю між файлами не показано, бо вона завелика
Переглянути файл


BIN
public/img/sort-down.png Переглянути файл


BIN
public/img/sort-up.png Переглянути файл


+ 6043
- 5694
public/lib/bootstrap/css/bootstrap.css
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 8
- 0
src/App.vue Переглянути файл

@@ -136,6 +136,14 @@ html {
136 136
   background-color: #ff8344;
137 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 147
 .noWeeks {
140 148
   background-color: #ff4444;
141 149
 }

+ 2
- 0
src/assets/staticData/itemsPerPageFive.js Переглянути файл

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

+ 156
- 7
src/components/admin/property/propertyList.vue Переглянути файл

@@ -17,9 +17,26 @@
17 17
           <table class="table table-striped table-responsive">
18 18
             <thead>
19 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 40
                 <th scope="col">Unit</th>
24 41
                 <th scope="col">Size</th>
25 42
                 <th scope="col">Price Ex VAT</th>
@@ -28,13 +45,13 @@
28 45
                 <th scope="col">Suburb</th>
29 46
                 <th scope="col">Status</th>
30 47
                 <th scope="col">Type</th>
31
-                <th scope="col">Publish</th>
48
+                <th scope="col">Publish</th>-->
32 49
                 <th scope="col">Edit</th>
33 50
                 <th scope="col">Delete</th>
34 51
               </tr>
35 52
             </thead>
36 53
             <tbody>
37
-              <tr v-for="(item, i) in FilteredProperties" :key="i">
54
+              <tr v-for="(item, i) in DisplayItems" :key="i">
38 55
                 <td>{{ item.owner }}</td>
39 56
                 <td>{{ item.reference }}</td>
40 57
                 <td>{{ item.property }}</td>
@@ -73,6 +90,45 @@
73 90
               </tr>
74 91
             </tbody>
75 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 132
         </div>
77 133
       </div>
78 134
       <div v-if="wait" id="preloader"></div>
@@ -83,14 +139,54 @@
83 139
 <script>
84 140
 import { mapState, mapActions } from "vuex";
85 141
 import Log from "../../../assets/Log";
142
+import BasePagination from "../../shared/basePagination";
143
+import ItemsPerPageList from "../../../assets/staticData/itemsPerPageFive";
86 144
 import _ from "lodash";
87 145
 
88 146
 export default {
147
+  components: {
148
+    BasePagination,
149
+  },
89 150
   data() {
90 151
     return {
152
+      hover: -1,
91 153
       filter: undefined,
92 154
       userId: Log.getUser().id,
93 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 192
   methods: {
@@ -112,6 +208,26 @@ export default {
112 208
     Delete(item) {
113 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 232
   computed: {
117 233
     ...mapState("propertyList", ["properties"]),
@@ -125,18 +241,51 @@ export default {
125 241
                 .indexOf(this.filter.toLowerCase()) > -1
126 242
           )
127 243
         );
128
-        return list;
244
+        return _.orderBy(list, this.sortKey, this.SortDirection);
129 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 269
   mounted() {
135 270
     this.wait = true;
136 271
     this.getAdminProperties(this.userId).then((fulfuilled) => {
137 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 290
 </script>
142 291
 

+ 7
- 3
src/components/admin/status/editTimeShareAdminPage.vue Переглянути файл

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

+ 2
- 0
src/components/admin/status/timeshareAdminPage.vue Переглянути файл

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

+ 35
- 16
src/components/property/ListProperty/contentSection.vue Переглянути файл

@@ -1,5 +1,6 @@
1 1
 <template>
2 2
   <section id="services">
3
+    <div v-if="wait" id="preloader"></div>
3 4
     <div class="container">
4 5
       <div class="col-12">
5 6
         <h1>List your property</h1>
@@ -16,7 +17,6 @@
16 17
               role="tab"
17 18
               aria-controls="pills-residential"
18 19
               aria-selected="true"
19
-              @click="getPropTypeResidential"
20 20
               >RESIDENTIAL</a
21 21
             >
22 22
           </li>
@@ -29,7 +29,6 @@
29 29
               role="tab"
30 30
               aria-controls="pills-commercial"
31 31
               aria-selected="false"
32
-              @click="getPropTypeCommercial"
33 32
               >COMMERCIAL</a
34 33
             >
35 34
           </li>
@@ -44,7 +43,7 @@
44 43
             role="tabpanel"
45 44
             aria-labelledby="pills-residential-tab"
46 45
           >
47
-            <ResidentialCreate />
46
+            <ResidentialCreate :propFields="residentialFields" />
48 47
           </div>
49 48
           <div
50 49
             class="tab-pane fade"
@@ -52,7 +51,7 @@
52 51
             role="tabpanel"
53 52
             aria-labelledby="pills-commercial-tab"
54 53
           >
55
-            <CommercialCreate />
54
+            <CommercialCreate :propFields="commercialFields" />
56 55
           </div>
57 56
         </div>
58 57
       </div>
@@ -70,24 +69,44 @@ export default {
70 69
     ResidentialCreate,
71 70
     CommercialCreate
72 71
   },
72
+  data() {
73
+    return {
74
+      wait: true,
75
+      residentialFields: [],
76
+      commercialFields: []
77
+    };
78
+  },
73 79
   methods: {
74 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 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 111
 </script>
93 112
 

+ 15
- 9
src/components/property/commercial/commercialSearchResults.vue Переглянути файл

@@ -1,12 +1,18 @@
1 1
 <template>
2 2
   <main id="main" style="margin-top:-20px; padding-bottom:50px">
3 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 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 16
         <div class="row justify-content-md-center">
11 17
           <div
12 18
             class="col-lg-3 col-md-6 col-sm-6"
@@ -19,12 +25,12 @@
19 25
                 <h4>{{ currentProperty.displayPrice }}</h4>
20 26
                 <p>
21 27
                   {{ currentProperty.suburb }}, {{ currentProperty.city }} |
22
-                  {{ currentProperty.area }}M<sup>2</sup>
28
+                  {{ currentProperty.area }}
23 29
                 </p>
24 30
                 <p>{{ currentProperty.shortDescription }}</p>
25 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 34
                 <router-link
29 35
                   class="btn-white-border"
30 36
                   :to="`/property/commercial/property/${currentProperty.id}`"
@@ -35,7 +41,7 @@
35 41
           </div>
36 42
         </div>
37 43
       </div>
38
-    </section>
44
+    </section> -->
39 45
     <section v-else id="intro" style="margin-bottom:-50px">
40 46
       <div class="container">
41 47
         <div class="row d-flex justify-content-center">
@@ -72,7 +78,7 @@
72 78
 <script>
73 79
 /* eslint-disable */
74 80
 import { mapState, mapActions } from "vuex";
75
-import propertyCard from "../propertyCard";
81
+import propertyCard from "../propertyCardSearch";
76 82
 import carousel from "vue-owl-carousel";
77 83
 
78 84
 export default {

+ 7
- 12
src/components/property/commercial/createProperty/commercialCreateNew.vue Переглянути файл

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

+ 26
- 15
src/components/property/commercial/singleView/contentSection.vue Переглянути файл

@@ -53,9 +53,6 @@
53 53
             </div>-->
54 54
             <p>{{ property.shortDescription }}</p>
55 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 56
           </div>
60 57
           <div class="panel-left px-5 pb-5 text-center">
61 58
             <h4 class="text-white">Share this Property</h4>
@@ -81,10 +78,9 @@
81 78
         </div>
82 79
         <div class="col-md-8 p-5 resort-profile">
83 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 84
             {{ property.streetNumber }} {{ property.streetName }}
89 85
           </h2>
90 86
           <h2 v-else>{{ property.propertyName }}</h2>
@@ -107,11 +103,26 @@
107 103
 
108 104
           <div class="mt-5" v-html="property.description"></div>
109 105
           <router-link
110
-            style="float:right"
106
+            style="float:right; white-space: nowrap;"
111 107
             class="btn-solid-blue mt-3"
112 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 126
           <iframe
116 127
             v-if="property.video !== null"
117 128
             width="100%"
@@ -179,11 +190,11 @@
179 190
 import gallery from "../../../shared/gallerySlideShow";
180 191
 export default {
181 192
   components: {
182
-    gallery,
193
+    gallery
183 194
   },
184 195
   props: {
185 196
     property: {},
186
-    propertyImages: {},
197
+    propertyImages: {}
187 198
   },
188 199
   mounted() {
189 200
     console.log(this.property);
@@ -191,7 +202,7 @@ export default {
191 202
   data() {
192 203
     return {
193 204
       index: null,
194
-      date: new Date(),
205
+      date: new Date()
195 206
     };
196 207
   },
197 208
   computed: {
@@ -201,11 +212,11 @@ export default {
201 212
         list.push(this.propertyImages[i].image);
202 213
       }
203 214
       return list;
204
-    },
215
+    }
205 216
   },
206 217
   created() {
207 218
     this.$emit("Loaded", true);
208
-  },
219
+  }
209 220
 };
210 221
 </script>
211 222
 

+ 30
- 2
src/components/property/editProperty/editProperty.vue Переглянути файл

@@ -26,7 +26,7 @@
26 26
                     v-model="property.statusString"
27 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 30
                   </select>
31 31
                 </div>
32 32
               </div>
@@ -135,8 +135,9 @@
135 135
                       </select>
136 136
                     </div>
137 137
                   </div>
138
-                  <div class="row my-3">
138
+                  <div v-if="!property.isSale" class="row my-3">
139 139
                     <div class="col-md-12">
140
+                      Date Available
140 141
                       <input
141 142
                         type="date"
142 143
                         class="form-control uniInput"
@@ -146,6 +147,21 @@
146 147
                       />
147 148
                     </div>
148 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 165
                   <div class="row my-3">
150 166
                     <br />
151 167
                   </div>
@@ -540,6 +556,18 @@ export default {
540 556
       }
541 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 573
 </script>

+ 80
- 50
src/components/property/enquireNow/contentSection.vue Переглянути файл

@@ -23,89 +23,106 @@
23 23
                 type="text"
24 24
                 name="name"
25 25
                 class="form-control"
26
-                id="Unit"
27
-                placeholder="Unit"
26
+                id="Suburb"
27
+                placeholder="Suburb"
28 28
                 data-rule="minlen:4"
29
-                v-model="property.unit"
29
+                v-model="property.suburb"
30 30
                 disabled
31 31
               />
32 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 34
               <input
39 35
                 type="text"
40 36
                 name="name"
41 37
                 class="form-control"
42
-                id="Price"
43
-                placeholder="Price"
38
+                id="Unit"
39
+                placeholder="Unit"
44 40
                 data-rule="minlen:4"
45
-                v-model="property.price"
41
+                v-model="property.unit"
46 42
                 disabled
47 43
               />
48
-            </float-label>
44
+            </float-label> -->
49 45
 
50 46
             <div class="validation"></div>
51 47
           </div>
52 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 57
                 class="form-control"
58
-                id="Size"
59
-                placeholder="Size"
60
-                data-rule="minlen:4"
61
-                v-model="size"
62 58
                 disabled
63 59
               />
64 60
             </float-label>
65 61
 
66 62
             <div class="validation"></div>
67 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 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 87
             <float-label>
70 88
               <input
71 89
                 type="text"
72 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 94
                 data-rule="minlen:4"
77
-                v-model="property.suburb"
78
-                disabled
95
+                v-model="indiv.name"
79 96
               />
80 97
             </float-label>
81 98
 
82 99
             <div class="validation"></div>
83 100
           </div>
84
-          <div class="form-group col-md-12 mb-4">
101
+          <div class="form-group col-md-6 mb-4">
85 102
             <float-label>
86 103
               <input
87 104
                 type="text"
88 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 109
                 data-rule="minlen:4"
93
-                v-model="name"
110
+                v-model="indiv.cellNumber"
94 111
               />
95 112
             </float-label>
96 113
 
97 114
             <div class="validation"></div>
98 115
           </div>
99
-          <div class="form-group col-md-12 mb-4">
116
+          <div class="form-group col-md-6">
100 117
             <float-label>
101 118
               <input
102 119
                 type="text"
103 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 124
                 data-rule="minlen:4"
108
-                v-model="contactNumber"
125
+                v-model="indiv.emailAddress"
109 126
               />
110 127
             </float-label>
111 128
 
@@ -113,14 +130,15 @@
113 130
           </div>
114 131
           <div class="form-group col-md-12">
115 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 138
                 id="Email"
121
-                placeholder="Email"
139
+                placeholder="Message"
122 140
                 data-rule="minlen:4"
123
-                v-model="email"
141
+                v-model="message"
124 142
               />
125 143
             </float-label>
126 144
 
@@ -142,10 +160,12 @@
142 160
 /* eslint-disable */
143 161
 import axios from "axios";
144 162
 import alert from "../../shared/alert";
163
+import Log from "../../../assets/Log";
164
+import { mapState, mapGetters, mapActions } from "vuex";
145 165
 
146 166
 export default {
147 167
   components: {
148
-    alert,
168
+    alert
149 169
   },
150 170
   data() {
151 171
     return {
@@ -155,25 +175,35 @@ export default {
155 175
       contactNumber: null,
156 176
       property: null,
157 177
       message: null,
158
-      boolSent: false,
178
+      boolSent: false
159 179
     };
160 180
   },
161 181
   mounted() {
162 182
     this.boolSent = false;
183
+    this.getIndividual(Log.getUser().id);
163 184
   },
164 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 196
   methods: {
197
+    ...mapActions("individual", ["getIndividual"]),
168 198
     async sendMail() {
169 199
       var mailObj = {
170 200
         toAddress: "jlouw365@gmail.com",
171 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 205
         property: this.property.id.toString(),
176
-        message: this.message,
206
+        message: this.message
177 207
       };
178 208
 
179 209
       const response = await axios.post("/api/mail/1", mailObj);
@@ -186,11 +216,11 @@ export default {
186 216
     },
187 217
     countDownChanged(dismissCountDown) {
188 218
       this.dismissCountDown = dismissCountDown;
189
-    },
219
+    }
190 220
   },
191 221
   created() {
192 222
     this.$emit("Loaded", true);
193
-  },
223
+  }
194 224
 };
195 225
 </script>
196 226
 

+ 17
- 15
src/components/property/propertyCard.vue Переглянути файл

@@ -12,11 +12,13 @@
12 12
               <div class="portfolio-item p-4 wow fadeInUp justify-content-md-center">
13 13
                 <div class="feature-top pt-3 mb-2">
14 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 22
                 </div>
21 23
                 <h1>{{ currentProperty.suburb }}</h1>
22 24
                 <p>
@@ -24,16 +26,10 @@
24 26
                   {{ currentProperty.propertyReference }}
25 27
                 </p>
26 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 33
                 </p>
38 34
               </div>
39 35
             </router-link>
@@ -44,7 +40,7 @@
44 40
                 <div class="feature-top pt-3 mb-2">
45 41
                   <h3>{{ currentProperty.displayPrice }}</h3>
46 42
                   <img
47
-                    style="max-height:165px; object-fit: cover;"
43
+                    style="height:165px; object-fit: cover;"
48 44
                     :src="currentProperty.displayImage"
49 45
                     alt
50 46
                   />
@@ -54,6 +50,12 @@
54 50
                   <strong>Property Reference</strong>
55 51
                   {{ currentProperty.propertyReference }}
56 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 59
               </div>
58 60
             </router-link>
59 61
           </div>

+ 111
- 0
src/components/property/propertyCardSearch.vue Переглянути файл

@@ -0,0 +1,111 @@
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 Переглянути файл

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

+ 32
- 42
src/components/property/propertyUserField.vue Переглянути файл

@@ -1,50 +1,38 @@
1 1
 <template>
2 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 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 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 33
           type="checkbox"
47
-          id="currentField.id"
34
+          :id="currentField.id"
35
+          :name="currentField.name"
48 36
           style="margin-left:-5px; margin-top:10px"
49 37
           v-model="setFields[i]"
50 38
           @change="UpdateSetFields(currentField, i)"
@@ -71,7 +59,9 @@ export default {
71 59
         userDefinedFieldId: field.id,
72 60
         value: this.setFields[index]
73 61
       };
74
-      this.$emit("UpdateUserDefinedFields", item);
62
+      if (item) {
63
+        this.$emit("UpdateUserDefinedFields", item);
64
+      }
75 65
     },
76 66
     GetFirstLetter(value) {
77 67
       if (value) {

+ 55
- 83
src/components/property/residential/createProperty/residentialCreateNew.vue Переглянути файл

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

+ 14
- 8
src/components/property/residential/residentialSearchResults.vue Переглянути файл

@@ -1,12 +1,18 @@
1 1
 <template>
2 2
   <main id="main" style="margin-top:-20px; padding-bottom:50px">
3 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 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 16
         <div class="row justify-content-md-center">
11 17
           <div
12 18
             class="col-lg-3 col-md-6 col-sm-6"
@@ -21,7 +27,7 @@
21 27
                 <p>{{ currentProperty.shortDescription }}</p>
22 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 31
                 <router-link
26 32
                   class="btn-white-border"
27 33
                   :to="`/property/residential/property/${currentProperty.id}`"
@@ -32,7 +38,7 @@
32 38
           </div>
33 39
         </div>
34 40
       </div>
35
-    </section>
41
+    </section> -->
36 42
     <section v-else id="intro" style="margin-bottom:-50px">
37 43
       <div class="container">
38 44
         <div class="row d-flex justify-content-center">
@@ -69,7 +75,7 @@
69 75
 <script>
70 76
 /* eslint-disable */
71 77
 import { mapState, mapActions } from "vuex";
72
-import propertyCard from "../propertyCard";
78
+import propertyCard from "../propertyCardSearch";
73 79
 
74 80
 export default {
75 81
   name: "propertysearch",

+ 42
- 23
src/components/property/residential/singleView/contentSection.vue Переглянути файл

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <section>
3
-    <div class="container pb-5">
3
+    <div class="container">
4 4
       <div class="row" id="resort-profile">
5 5
         <div class="col-md-4">
6 6
           <div class="resPortfolioSection">
@@ -44,8 +44,6 @@
44 44
                 <p v-if="field.name === 'Bathrooms'">Bathrooms {{ field.value }}</p>
45 45
               </div>
46 46
             </div>
47
-
48
-            <div class="btn-white-border"><i class="fa fa-search"></i>BOOK A VIEWING</div>
49 47
           </div>
50 48
           <div class="panel-left px-5 pb-5 text-center">
51 49
             <h4 class="text-white">Share this Property</h4>
@@ -91,30 +89,50 @@
91 89
                 <p v-html="property.description"></p>
92 90
               </div>
93 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 110
                 </div>
114 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 120
             </div>
116 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 136
           <iframe
119 137
             v-if="property.video != null"
120 138
             width="100%"
@@ -125,6 +143,7 @@
125 143
             style="margin-bottom:-6px"
126 144
             class="mt-3"
127 145
           ></iframe>
146
+
128 147
           <p></p>
129 148
           <div class="d-flex mt-3">
130 149
             <iframe

+ 78
- 77
src/components/shared/listView.vue Переглянути файл

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

+ 8
- 4
src/components/timeshare/resort/resortPageNew.vue Переглянути файл

@@ -1,9 +1,9 @@
1 1
 <template>
2 2
   <div>
3 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 5
       <section>
6
-        <div class="container">
6
+        <div class="container wider">
7 7
           <div class="row" id="resort-profile">
8 8
             <div class="col-md-3">
9 9
               <img src="img/listings/property1/property1-gallery.jpg" class="img-fluid" alt />
@@ -18,7 +18,7 @@
18 18
               <gallerySection :images="resort.images" />
19 19
               <FilterComponent :hideTop="true" />
20 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 22
               <h2>{{ resort.prName }}</h2>
23 23
               <WeekList :resortCode="resortCode" />
24 24
               <p v-if="resort.description && resort.description !== ''">{{ resort.description }}</p>
@@ -97,4 +97,8 @@ export default {
97 97
 };
98 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 Переглянути файл

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

+ 5
- 2
src/main.js Переглянути файл

@@ -37,7 +37,10 @@ axios.defaults.baseURL = "http://training.provision-sa.com:82";
37 37
 Vue.prototype.$axios = axios;
38 38
 const pluginOptions = {
39 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 45
 Vue.use(VueCurrencyInput, pluginOptions);
43 46
 Vue.prototype.$http = axios;
@@ -63,7 +66,7 @@ Vue.filter("toCurrency", value => {
63 66
     return value;
64 67
   }
65 68
   const formatter = new Intl.NumberFormat("en-US", {
66
-    minimumFractionDigits: 2
69
+    minimumFractionDigits: 0
67 70
   });
68 71
   return `R ${formatter.format(value)}`;
69 72
 });

+ 6
- 4
src/store/modules/property/property.js Переглянути файл

@@ -53,7 +53,9 @@ export default {
53 53
       state.statuses = stats;
54 54
     }
55 55
   },
56
-  getters: {},
56
+  getters: {
57
+    getFields: state => state.propertyFields
58
+  },
57 59
   actions: {
58 60
     getStatuses({ commit }) {
59 61
       axios
@@ -123,9 +125,9 @@ export default {
123 125
         .then(response => commit("setPropertyOverviewFields", response.data));
124 126
     },
125 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 132
     getSavedPropertyFields({ commit }, id) {
131 133
       axios

+ 2
- 2
src/store/modules/timeshare/myWeeks.js Переглянути файл

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

Завантаження…
Відмінити
Зберегти