Ver código fonte

Merging

master
Lene Scholtz 5 anos atrás
pai
commit
48fb527740

+ 54
- 2
package-lock.json Ver arquivo

@@ -3737,8 +3737,7 @@
3737 3737
     "deep-equal": {
3738 3738
       "version": "1.0.1",
3739 3739
       "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz",
3740
-      "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=",
3741
-      "dev": true
3740
+      "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU="
3742 3741
     },
3743 3742
     "deep-is": {
3744 3743
       "version": "0.1.3",
@@ -5026,6 +5025,11 @@
5026 5025
       "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
5027 5026
       "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
5028 5027
     },
5028
+    "fast-diff": {
5029
+      "version": "1.1.2",
5030
+      "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.1.2.tgz",
5031
+      "integrity": "sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig=="
5032
+    },
5029 5033
     "fast-glob": {
5030 5034
       "version": "2.2.7",
5031 5035
       "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz",
@@ -8498,6 +8502,11 @@
8498 8502
         "no-case": "^2.2.0"
8499 8503
       }
8500 8504
     },
8505
+    "parchment": {
8506
+      "version": "1.1.4",
8507
+      "resolved": "https://registry.npmjs.org/parchment/-/parchment-1.1.4.tgz",
8508
+      "integrity": "sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg=="
8509
+    },
8501 8510
     "parent-module": {
8502 8511
       "version": "1.0.1",
8503 8512
       "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
@@ -9456,6 +9465,41 @@
9456 9465
       "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==",
9457 9466
       "dev": true
9458 9467
     },
9468
+    "quill": {
9469
+      "version": "1.3.7",
9470
+      "resolved": "https://registry.npmjs.org/quill/-/quill-1.3.7.tgz",
9471
+      "integrity": "sha512-hG/DVzh/TiknWtE6QmWAF/pxoZKYxfe3J/d/+ShUWkDvvkZQVTPeVmUJVu1uE6DDooC4fWTiCLh84ul89oNz5g==",
9472
+      "requires": {
9473
+        "clone": "^2.1.1",
9474
+        "deep-equal": "^1.0.1",
9475
+        "eventemitter3": "^2.0.3",
9476
+        "extend": "^3.0.2",
9477
+        "parchment": "^1.1.4",
9478
+        "quill-delta": "^3.6.2"
9479
+      },
9480
+      "dependencies": {
9481
+        "clone": {
9482
+          "version": "2.1.2",
9483
+          "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
9484
+          "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18="
9485
+        },
9486
+        "eventemitter3": {
9487
+          "version": "2.0.3",
9488
+          "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-2.0.3.tgz",
9489
+          "integrity": "sha1-teEHm1n7XhuidxwKmTvgYKWMmbo="
9490
+        }
9491
+      }
9492
+    },
9493
+    "quill-delta": {
9494
+      "version": "3.6.3",
9495
+      "resolved": "https://registry.npmjs.org/quill-delta/-/quill-delta-3.6.3.tgz",
9496
+      "integrity": "sha512-wdIGBlcX13tCHOXGMVnnTVFtGRLoP0imqxM696fIPwIf5ODIYUHIvHbZcyvGlZFiFhK5XzDC2lpjbxRhnM05Tg==",
9497
+      "requires": {
9498
+        "deep-equal": "^1.0.1",
9499
+        "extend": "^3.0.2",
9500
+        "fast-diff": "1.1.2"
9501
+      }
9502
+    },
9459 9503
     "randombytes": {
9460 9504
       "version": "2.1.0",
9461 9505
       "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
@@ -11898,6 +11942,14 @@
11898 11942
         "trix": "^1.1.1"
11899 11943
       }
11900 11944
     },
11945
+    "vue2-editor": {
11946
+      "version": "2.10.2",
11947
+      "resolved": "https://registry.npmjs.org/vue2-editor/-/vue2-editor-2.10.2.tgz",
11948
+      "integrity": "sha512-sjHTPdRoiB9VK9HLSOjFgubxBWHxRydvykqBCNaX7Sv+2KpdWu6AoyguvP5tyEp4ECX7z6PnbBluyD5M57QOng==",
11949
+      "requires": {
11950
+        "quill": "^1.3.6"
11951
+      }
11952
+    },
11901 11953
     "vuetify": {
11902 11954
       "version": "1.5.16",
11903 11955
       "resolved": "https://registry.npmjs.org/vuetify/-/vuetify-1.5.16.tgz",

+ 1
- 0
package.json Ver arquivo

@@ -28,6 +28,7 @@
28 28
     "vue-excel-export": "^0.1.3",
29 29
     "vue-router": "^3.0.7",
30 30
     "vue-trix": "^1.0.0",
31
+    "vue2-editor": "^2.10.2",
31 32
     "vuetify": "^1.5.5",
32 33
     "vuex": "^3.1.1"
33 34
   },

BIN
public/img/no-homes.png Ver arquivo


BIN
public/img/propertyListings.png Ver arquivo


+ 1
- 1
src/components/about/aboutTimeshare.vue Ver arquivo

@@ -20,7 +20,7 @@
20 20
             </div>
21 21
             <div class="col-md-6 col-lg-5 section-md-t3">
22 22
               <p class="color-text-a font-weight-bold" style="text-align:left;">
23
-                found that there was a desperate need for a reputable source for buyers and
23
+                Uni-Vate Properties found that there was a desperate need for a reputable source for buyers and
24 24
                 sellers to turn to with their timeshare needs in South Africa. Over the
25 25
                 years, Uni-Vate has developed a treasure of networking alliances of professional
26 26
                 acquaintances and that has made timeshare resales a pleasure for both buyers and

+ 63
- 61
src/components/property/propertyCard.vue Ver arquivo

@@ -23,73 +23,75 @@
23 23
     </div>
24 24
     <div class="form-group row">
25 25
       <div class="col-md-4" v-for="currentProperty in properties" :key="currentProperty.id">
26
-        <div class="card-box-a card-shadow">
27
-          <div class="img-box-a">
28
-            <img
29
-              :src="currentProperty.displayImage"
30
-              alt
31
-              class="img-a img-fluid"
32
-              style="height:466px; width:350px; object-fit: cover;"
33
-            />
34
-          </div>
35
-          <div class="card-overlay">
36
-            <div class="card-overlay-a-content">
37
-              <div class="card-header-a">
38
-                <h4 class="card-title-a">
39
-                  <router-link
40
-                    :to="`/property/property/${currentProperty.id}`"
41
-                    class="link-a"
42
-                  >{{ currentProperty.shortDescription }}</router-link>
43
-                </h4>
44
-                <h4 class="card-title-c">
26
+        <router-link :to="`/property/property/${currentProperty.id}`">
27
+          <div class="card-box-a card-shadow">
28
+            <div class="img-box-a">
29
+              <img
30
+                :src="currentProperty.displayImage"
31
+                alt
32
+                class="img-a img-fluid"
33
+                style="height:466px; width:350px; object-fit: cover;"
34
+              />
35
+            </div>
36
+            <div class="card-overlay">
37
+              <div class="card-overlay-a-content">
38
+                <div class="card-header-a">
39
+                  <h4 class="card-title-a">
40
+                    <router-link
41
+                      :to="`/property/property/${currentProperty.id}`"
42
+                      class="link-a"
43
+                    >{{ currentProperty.shortDescription }}</router-link>
44
+                  </h4>
45
+                  <h4 class="card-title-c">
46
+                    <router-link :to="`/property/property/${currentProperty.id}`" class="link-a">
47
+                      {{ currentProperty.province }}
48
+                      <br />
49
+                      {{ currentProperty.city }}
50
+                      <br />
51
+                      {{ currentProperty.suburb }}
52
+                    </router-link>
53
+                  </h4>
54
+                </div>
55
+                <div class="card-body-a">
56
+                  <div class="price-box d-flex">
57
+                    <span
58
+                      v-if="currentProperty.isSale"
59
+                      class="price-a"
60
+                    >sale | {{ currentProperty.displayPrice }}</span>
61
+                    <span
62
+                      v-if="!currentProperty.isSale"
63
+                      class="price-a"
64
+                    >rent | {{ currentProperty.displayPrice }}</span>
65
+                  </div>
45 66
                   <router-link :to="`/property/property/${currentProperty.id}`" class="link-a">
46
-                    {{ currentProperty.province }}
47
-                    <br />
48
-                    {{ currentProperty.city }}
49
-                    <br />
50
-                    {{ currentProperty.suburb }}
67
+                    Click here to view
68
+                    <span class="ion-ios-arrow-forward"></span>
51 69
                   </router-link>
52
-                </h4>
53
-              </div>
54
-              <div class="card-body-a">
55
-                <div class="price-box d-flex">
56
-                  <span
57
-                    v-if="currentProperty.isSale"
58
-                    class="price-a"
59
-                  >sale | {{ currentProperty.displayPrice }}</span>
60
-                  <span
61
-                    v-if="!currentProperty.isSale"
62
-                    class="price-a"
63
-                  >rent | {{ currentProperty.displayPrice }}</span>
64 70
                 </div>
65
-                <router-link :to="`/property/property/${currentProperty.id}`" class="link-a">
66
-                  Click here to view
67
-                  <span class="ion-ios-arrow-forward"></span>
68
-                </router-link>
69
-              </div>
70
-              <div class="card-footer-a" v-if="currentProperty.showFooter">
71
-                <ul class="card-info d-flex justify-content-around">
72
-                  <li v-if="currentProperty.area !== null">
73
-                    <h4 class="card-info-title">Area</h4>
74
-                    <span v-html="currentProperty.area"></span>
75
-                  </li>
76
-                  <li v-if="currentProperty.beds !== null">
77
-                    <h4 class="card-info-title">Beds</h4>
78
-                    <span>{{ currentProperty.beds }}</span>
79
-                  </li>
80
-                  <li v-if="currentProperty.baths !== null">
81
-                    <h4 class="card-info-title">Baths</h4>
82
-                    <span>{{ currentProperty.baths }}</span>
83
-                  </li>
84
-                  <li v-if="currentProperty.garages !== null">
85
-                    <h4 class="card-info-title">Garages</h4>
86
-                    <span>{{ currentProperty.garages }}</span>
87
-                  </li>
88
-                </ul>
71
+                <div class="card-footer-a" v-if="currentProperty.showFooter">
72
+                  <ul class="card-info d-flex justify-content-around">
73
+                    <li v-if="currentProperty.area !== null">
74
+                      <h4 class="card-info-title">Area</h4>
75
+                      <span v-html="currentProperty.area"></span>
76
+                    </li>
77
+                    <li v-if="currentProperty.beds !== null">
78
+                      <h4 class="card-info-title">Beds</h4>
79
+                      <span>{{ currentProperty.beds }}</span>
80
+                    </li>
81
+                    <li v-if="currentProperty.baths !== null">
82
+                      <h4 class="card-info-title">Baths</h4>
83
+                      <span>{{ currentProperty.baths }}</span>
84
+                    </li>
85
+                    <li v-if="currentProperty.garages !== null">
86
+                      <h4 class="card-info-title">Garages</h4>
87
+                      <span>{{ currentProperty.garages }}</span>
88
+                    </li>
89
+                  </ul>
90
+                </div>
89 91
               </div>
90 92
             </div>
91 93
           </div>
92
-        </div>
94
+        </router-link>
93 95
         <br />
94 96
       </div>
95 97
     </div>

+ 1
- 0
src/components/property/propertyImage.vue Ver arquivo

@@ -5,6 +5,7 @@
5 5
         Upload
6 6
         <input
7 7
           type="file"
8
+          accept=".jpeg, .jpg, .gif, .png"
8 9
           value="Upload Photo"
9 10
           style="width: 0px;height: 0px;overflow: hidden;"
10 11
           name="images[]"

+ 30
- 24
src/components/property/propertyList.vue Ver arquivo

@@ -12,15 +12,11 @@
12 12
           <div class="col-md-12 col-lg-8">
13 13
             <div class="title-box-d">
14 14
               <h1
15
-                v-if="user !== 'All'"
15
+                v-if="showAdmin"
16 16
                 class="title-d"
17 17
                 style="text-align:left; font-size: 250%"
18
-              >My {{ propertyType }} Properties</h1>
19
-              <h1
20
-                v-else
21
-                class="title-d"
22
-                style="text-align:left; font-size: 250%"
23
-              >All {{ propertyType }} Properties</h1>
18
+              >Admin Properties</h1>
19
+              <h1 v-else class="title-d" style="text-align:left; font-size: 250%">My Properties</h1>
24 20
             </div>
25 21
           </div>
26 22
         </div>
@@ -35,7 +31,9 @@
35 31
             <th>Property ID</th>
36 32
             <th>Size</th>
37 33
             <th>Price</th>
34
+            <th>Usage Type</th>
38 35
             <th>Type</th>
36
+            <th>Sale Type</th>
39 37
             <th>Publish</th>
40 38
             <th>Status</th>
41 39
             <th></th>
@@ -48,7 +46,9 @@
48 46
             <td>{{ item.id }}</td>
49 47
             <td v-html="item.size" />
50 48
             <td>{{ item.price }}</td>
49
+            <td>{{ item.usageType }}</td>
51 50
             <td>{{ item.type }}</td>
51
+            <td>{{ item.saleType }}</td>
52 52
             <!-- <td>{{ item.publish }}</td> -->
53 53
             <td></td>
54 54
             <td>{{ item.status }}</td>
@@ -58,7 +58,6 @@
58 58
                 @click="Edit(item)"
59 59
                 class="btn btn-b-n"
60 60
                 style="width: 85px; height:40px;"
61
-                disabled
62 61
               >Edit</button>
63 62
             </td>
64 63
             <td>
@@ -86,6 +85,7 @@ export default {
86 85
     return {
87 86
       propertyType: '',
88 87
       user: '',
88
+      showAdmin: false,
89 89
     };
90 90
   },
91 91
   methods: {
@@ -99,18 +99,21 @@ export default {
99 99
     },
100 100
   },
101 101
   mounted() {
102
-    this.propertyType = this.$route.params.propertyType;
103
-    this.user = this.$route.params.user;
104
-
105
-    if (this.user === 'MyListings') {
106
-      this.user = 'GeorgeW';
102
+    if (this.$route.params.by === 'my') {
103
+      // eslint-disable-next-line vue/no-side-effects-in-computed-properties
104
+      this.showAdmin = false;
105
+    } else {
106
+      // eslint-disable-next-line vue/no-side-effects-in-computed-properties
107
+      this.showAdmin = true;
107 108
     }
108 109
 
110
+    this.user = 28; // user id
111
+
109 112
     this.getProperties(
110 113
       Object.assign(
111 114
         {},
112 115
         {
113
-          propertyType: this.propertyType,
116
+          propertyType: this.showAdmin ? 'Admin' : 'My',
114 117
           user: this.user,
115 118
         },
116 119
       ),
@@ -118,26 +121,29 @@ export default {
118 121
   },
119 122
   computed: {
120 123
     ...mapState('propertyList', ['properties']),
121
-    TypeChanged() {
122
-      // eslint-disable-next-line vue/no-side-effects-in-computed-properties
123
-      this.propertyType = this.$route.params.propertyType;
124
-      // eslint-disable-next-line vue/no-side-effects-in-computed-properties
125
-      this.user = this.$route.params.user;
124
+    UserChanged() {
125
+      if (this.$route.params.by === 'my') {
126
+        // eslint-disable-next-line vue/no-side-effects-in-computed-properties
127
+        this.showAdmin = false;
128
+      } else {
129
+        // eslint-disable-next-line vue/no-side-effects-in-computed-properties
130
+        this.showAdmin = true;
131
+      }
126 132
       this.getProperties(
127 133
         Object.assign(
128 134
           {},
129 135
           {
130
-            propertyType: this.$route.params.propertyType,
131
-            user: this.$route.params.user,
136
+            propertyType: this.showAdmin ? 'Admin' : 'My',
137
+            user: this.user,
132 138
           },
133 139
         ),
134 140
       );
135
-      return this.propertyType;
141
+      return this.user;
136 142
     },
137 143
   },
138 144
   watch: {
139
-    TypeChanged() {
140
-      console.log(this.propertyType);
145
+    UserChanged() {
146
+      console.log(this.user);
141 147
     },
142 148
   },
143 149
 };

+ 1
- 1
src/components/property/propertyPage.vue Ver arquivo

@@ -127,7 +127,7 @@
127 127
                             name="MakeOffer"
128 128
                             :isMakeOffer="true"
129 129
                             :isProperty="true"
130
-                            :item="{id: property.id, shortDescription: property.shortDescription, description: property.description, price: property.price}"
130
+                            :item="{id: property.id, shortDescription: property.shortDescription, description: property.description, sellPrice: property.price}"
131 131
                           />
132 132
                         </div>
133 133
                       </div>

+ 26
- 10
src/components/property/propertySearchPage.vue Ver arquivo

@@ -1,6 +1,15 @@
1 1
 <template>
2 2
   <!-- eslint-disable max-len -->
3 3
   <div class="container">
4
+    <br />
5
+    <div class="row">
6
+      <div class="col-md-2 offset-4">
7
+        <button type="button" @click="SetType('Residential')" class="btn btn-b-n">Residential</button>
8
+      </div>
9
+      <div class="col-md-2">
10
+        <button type="button" @click="SetType('Commercial')" class="btn btn-b-n">Commercial</button>
11
+      </div>
12
+    </div>
4 13
     <div class="container col-md-12" v-if="propertySearch.propertyUsageType === 'Residential'">
5 14
       <div class="col-sm-12">
6 15
         <div class="about-img-box">
@@ -38,11 +47,11 @@
38 47
           </p>
39 48
           <p>
40 49
             Wish to RENT your property?
41
-            <router-link to="/property/Residential/Rental">Click Here</router-link>
50
+            <router-link to="/property/new/Residential/Rental">Click Here</router-link>
42 51
           </p>
43 52
           <p>
44 53
             Wish to SELL your property?
45
-            <router-link to="/property/Residential/Sale">Click Here</router-link>
54
+            <router-link to="/property/new/Residential/Sale">Click Here</router-link>
46 55
           </p>
47 56
         </div>
48 57
         <div class="col-md-4">
@@ -59,7 +68,7 @@
59 68
       <div>
60 69
         <propertyCard v-if="properties.length > 0" name="propertyholder" :properties="properties" />
61 70
         <div v-if="properties.length === 0">
62
-          <img src="../../../public/img/no-homes.gif" />
71
+          <img src="../../../public/img/no-homes.png" />
63 72
           <br />
64 73
           <br />
65 74
           <p>Sorry no listing where found matching your search</p>
@@ -103,11 +112,11 @@
103 112
           </p>
104 113
           <p>
105 114
             Wish to RENT your property?
106
-            <router-link to="/property/Commercial/Rental">Click Here</router-link>
115
+            <router-link to="/property/new/Commercial/Rental">Click Here</router-link>
107 116
           </p>
108 117
           <p>
109 118
             Wish to SELL your property?
110
-            <router-link to="/property/Commercial/Sale">Click Here</router-link>
119
+            <router-link to="/property/new/Commercial/Sale">Click Here</router-link>
111 120
           </p>
112 121
         </div>
113 122
         <div class="col-md-4">
@@ -124,7 +133,7 @@
124 133
       <div>
125 134
         <propertyCard v-if="properties.length > 0" name="propertyholder" :properties="properties" />
126 135
         <div v-if="properties.length === 0">
127
-          <img src="../../../public/img/no-homes.gif" />
136
+          <img src="../../../public/img/no-homes.png" />
128 137
           <br />
129 138
           <br />
130 139
           <p>Sorry no listing where found matching your search</p>
@@ -158,16 +167,24 @@ export default {
158 167
       },
159 168
     };
160 169
   },
170
+  mounted() {
171
+    if (typeof this.propertySearch.propertyUsageType === 'undefined') {
172
+      this.propertySearch.propertyUsageType = 'Residential';
173
+    }
174
+  },
161 175
   methods: {
162 176
     ...mapActions('propertySearch', ['searchProperties']),
177
+    SetType(item) {
178
+      this.propertySearch.propertyUsageType = item;
179
+    },
163 180
   },
164 181
   computed: {
165 182
     ...mapState('propertySearch', ['properties']),
166 183
     ParamsChanged() {
167
-      if (Object.keys(this.$route.params).length > 0) {
168
-        if (this.$route.params.propertyUsageType) {
184
+      if (Object.keys(this.$route.query).length === 0) {
185
+        if (this.propertySearch.propertyUsageType === 'All') {
169 186
           // eslint-disable-next-line vue/no-side-effects-in-computed-properties
170
-          this.propertySearch.propertyUsageType = this.$route.params.propertyUsageType;
187
+          this.propertySearch.propertyUsageType = 'Residential';
171 188
           // eslint-disable-next-line vue/no-side-effects-in-computed-properties
172 189
           this.propertySearch.keyword = 'All';
173 190
           // eslint-disable-next-line vue/no-side-effects-in-computed-properties
@@ -193,7 +210,6 @@ export default {
193 210
         // eslint-disable-next-line vue/no-side-effects-in-computed-properties
194 211
         this.propertySearch.keyword = 'All';
195 212
       }
196
-
197 213
       this.searchProperties(this.propertySearch);
198 214
       return null;
199 215
     },

+ 48
- 16
src/components/property/propertyeditPage.vue Ver arquivo

@@ -3,6 +3,7 @@
3 3
   <div>
4 4
     <div class="container">
5 5
       <div class="col-sm-12">
6
+        <br />
6 7
         <div class="tobuy-img-box">
7 8
           <img
8 9
             v-if="propertyType === 'Commercial'"
@@ -34,6 +35,26 @@
34 35
       <div class="row mb-3">
35 36
         <div class="container col-md-10" style="text-align:left">
36 37
           <form id="mainForm">
38
+            <div class="form-goup row">
39
+              <div class="col-md-4">
40
+                <label>Usage Type</label>
41
+                <div class="input-group-prepend">
42
+                  <span class="input-group-text" style="color: #60CBEB">
43
+                    <b>U</b>
44
+                  </span>
45
+                  <select
46
+                    class="form-control"
47
+                    name="propertyUsageType"
48
+                    id="propertyUsageType"
49
+                    v-model="propertyType"
50
+                    @change="TypeChanged"
51
+                  >
52
+                    <option value="Residential">Residential</option>
53
+                    <option value="Commercial">Commercial</option>
54
+                  </select>
55
+                </div>
56
+              </div>
57
+            </div>
37 58
             <div class="form-group row">
38 59
               <div class="col-md-4">
39 60
                 <label>Property Type</label>
@@ -240,12 +261,7 @@
240 261
             <div class="form-group row">
241 262
               <div class="col-md-12">
242 263
                 <label for="Property Description">Description</label>
243
-                <TextEditor
244
-                  name="description"
245
-                  v-model="property.description"
246
-                  id="description"
247
-                  style="text-align:left"
248
-                />
264
+                <vue-editor v-model="property.description" :editor-toolbar="customToolbar" />
249 265
                 <br />
250 266
                 <p>* A listing fee of R380 including VAT is payable to list your Property on the Uni-Vate website</p>
251 267
               </div>
@@ -258,7 +274,7 @@
258 274
               :id="1"
259 275
             ></UserField>
260 276
             <div class="form-group row" />
261
-            <div v-for="(item, i) in propertyFields" :key="item.id">
277
+            <div v-for="item in propertyFields" :key="item.id">
262 278
               <div class="row">
263 279
                 <div class="col-sm-12">
264 280
                   <div class="title-box-d">
@@ -302,7 +318,7 @@
302 318
 
303 319
 <script>
304 320
 import { mapState, mapActions } from 'vuex';
305
-import TextEditor from 'vue-trix';
321
+import { VueEditor } from 'vue2-editor';
306 322
 import { setTimeout } from 'timers';
307 323
 import UserField from './propertyUserField.vue';
308 324
 import ImageLoad from './propertyImage.vue';
@@ -312,7 +328,7 @@ export default {
312 328
   components: {
313 329
     UserField,
314 330
     ImageLoad,
315
-    TextEditor,
331
+    VueEditor,
316 332
   },
317 333
   data() {
318 334
     return {
@@ -324,6 +340,19 @@ export default {
324 340
       propertyFieldValues: [],
325 341
       defaultImage: 0,
326 342
       wait: false,
343
+      customToolbar: [
344
+        [{ header: [false, 1, 2, 3, 4, 5, 6] }],
345
+        ['bold', 'italic', 'underline', 'strike'],
346
+        [
347
+          { align: '' },
348
+          { align: 'center' },
349
+          { align: 'right' },
350
+          { align: 'justify' },
351
+        ],
352
+        [{ list: 'ordered' }, { list: 'bullet' }, { list: 'check' }],
353
+        [{ script: 'sub' }, { script: 'super' }],
354
+        [{ indent: '-1' }, { indent: '+1' }],
355
+      ],
327 356
     };
328 357
   },
329 358
   methods: {
@@ -342,6 +371,7 @@ export default {
342 371
       'getPropertySavedFields',
343 372
       'getSavedPropertyData',
344 373
     ]),
374
+    TypeChanged() {},
345 375
     SubmitData() {
346 376
       this.wait = true;
347 377
       if (this.salesType === 'Sale') {
@@ -363,7 +393,7 @@ export default {
363 393
 
364 394
       setTimeout(
365 395
         () => this.$router.push({
366
-            path: '/property/search',
396
+            path: '/property/Search',
367 397
             query: {
368 398
               salesType: this.salesType,
369 399
               propertyUsageType: this.propertyType,
@@ -434,10 +464,12 @@ export default {
434 464
       this.property.description = '';
435 465
     }
436 466
 
437
-    this.propertyType = this.$route.params.propType;
467
+    if (this.$route.params.propertyUsageType) {
468
+      this.propertyType = this.$route.params.propertyUsageType;
469
+    }
438 470
     this.salesType = this.$route.params.saleType;
439 471
 
440
-    this.getPropertyTypes(this.$route.params.propType);
472
+    this.getPropertyTypes(this.propertyType);
441 473
 
442 474
     this.getProvince();
443 475
     if (this.$route.query.id) {
@@ -447,7 +479,7 @@ export default {
447 479
       );
448 480
     } else {
449 481
       this.getPropertyOverviewFields();
450
-      this.getPropertyFields(this.$route.params.propType);
482
+      this.getPropertyFields(this.propertyType);
451 483
     }
452 484
     // if (this.$route.params.id) {
453 485
     //   this.getPropertyEditDisplay(4); // (this.$route.params.id);
@@ -483,12 +515,12 @@ export default {
483 515
     ]),
484 516
     SalesTypeChanged() {
485 517
       // eslint-disable-next-line vue/no-side-effects-in-computed-properties
486
-      this.propertyType = this.$route.params.propType;
518
+      // this.propertyType = this.$route.params.propType;
487 519
       // eslint-disable-next-line vue/no-side-effects-in-computed-properties
488 520
       this.salesType = this.$route.params.saleType;
489 521
       if (!this.$route.query.id) {
490
-        this.getPropertyTypes(this.$route.params.propType);
491
-        this.getPropertyFields(this.$route.params.propType);
522
+        this.getPropertyTypes(this.propertyType);
523
+        this.getPropertyFields(this.propertyType);
492 524
       }
493 525
 
494 526
       return this.propertyType;

+ 31
- 39
src/components/shared/navBar.vue Ver arquivo

@@ -17,7 +17,7 @@
17 17
           <span></span>
18 18
           <span></span>
19 19
         </button>
20
-        <a class="navbar-brand text-brand" @click="routerGoTo('/')">
20
+        <div class="navbar-brand text-brand" style="cursor: pointer;" @click="routerGoTo('/')">
21 21
           <img
22 22
             class="img-fluid"
23 23
             src="/img/logos/UVProp.png"
@@ -26,7 +26,7 @@
26 26
           />
27 27
           Uni-Vate
28 28
           <span class="color-b">Properties</span>
29
-        </a>
29
+        </div>
30 30
         <button
31 31
           type="button"
32 32
           class="btn btn-link nav-search navbar-toggle-box-collapse d-md-none"
@@ -41,9 +41,6 @@
41 41
       <div class="col-md-8">
42 42
         <div class="navbar-collapse collapse justify-content-center" id="navbarDefault">
43 43
           <ul class="navbar-nav">
44
-            <!-- <li class="nav-item">
45
-            <a class="nav-link active" @click="routerGoTo('/')">Home</a>
46
-            </li>-->
47 44
             <li class="nav-item dropdown">
48 45
               <a
49 46
                 class="nav-link dropdown-toggle"
@@ -61,12 +58,14 @@
61 58
                   @click="routerGoTo('/timeshare/sell')"
62 59
                 >To Sell</a>
63 60
                 <a class="dropdown-item cursor-pointer" @click="routerGoTo('/timeshare/faq')">FAQ</a>
64
-                <hr />
65
-                <a
66
-                  v-if="isLoggedIn"
67
-                  class="dropdown-item cursor-pointer"
68
-                  @click="routerGoTo('/timeshare/sell')"
69
-                >My Timeshare Weeks</a>
61
+                <div v-if="isLoggedIn">
62
+                  <hr />
63
+                  <a
64
+                    v-if="isLoggedIn"
65
+                    class="dropdown-item cursor-pointer"
66
+                    @click="routerGoTo('/timeshare/sell')"
67
+                  >My Timeshare Weeks</a>
68
+                </div>
70 69
               </div>
71 70
             </li>
72 71
             <li class="nav-item dropdown">
@@ -82,41 +81,22 @@
82 81
               <div class="dropdown-menu" aria-labelledby="navbarDropdown">
83 82
                 <a
84 83
                   class="dropdown-item cursor-pointer"
85
-                  @click="routerGoTo('/property/Commercial/Search')"
86
-                >Search Commercial Properties</a>
87
-                <a
88
-                  class="dropdown-item cursor-pointer"
89
-                  @click="routerGoTo('/property/Commercial/Sale')"
90
-                >To Sell Commercial Properties</a>
91
-                <a
92
-                  class="dropdown-item cursor-pointer"
93
-                  @click="routerGoTo('/property/Commercial/Rental')"
94
-                >To Rent Commercial Properties</a>
95
-                <hr />
96
-
97
-                <a
98
-                  class="dropdown-item cursor-pointer"
99
-                  @click="routerGoTo('/property/Residential/Search')"
100
-                >Search Residential Properties</a>
84
+                  @click="routerGoTo('/property/Search')"
85
+                >Search</a>
101 86
                 <a
102 87
                   class="dropdown-item cursor-pointer"
103
-                  @click="routerGoTo('/property/Residential/Sale')"
104
-                >To Sell Residential Properties</a>
105
-                <a
106
-                  class="dropdown-item cursor-pointer"
107
-                  @click="routerGoTo('/property/Residential/Rental')"
108
-                >To Rent Residential Properties</a>
109
-                <hr v-if="isLoggedIn" />
88
+                  @click="routerGoTo('/property/new/Sale')"
89
+                >To Sell</a>
110 90
                 <a
111
-                  v-if="isLoggedIn"
112 91
                   class="dropdown-item cursor-pointer"
113
-                  @click="routerGoTo('/property/list/Commercial/MyListings')"
114
-                >My Commercial Properties</a>
92
+                  @click="routerGoTo('/property/new/Rental')"
93
+                >To Rent</a>
94
+                <hr v-if="showLogout" />
115 95
                 <a
116 96
                   v-if="isLoggedIn"
117 97
                   class="dropdown-item cursor-pointer"
118
-                  @click="routerGoTo('/property/list/Residential/MyListings')"
119
-                >My Residential Properties</a>
98
+                  @click="routerGoTo('/property/admin/list/my')"
99
+                >My Properties</a>
120 100
               </div>
121 101
             </li>
122 102
 
@@ -274,3 +254,15 @@ export default {
274 254
   },
275 255
 };
276 256
 </script>
257
+<style scoped>
258
+a {
259
+  border: transparent thin solid;
260
+  padding: 5px 12px;
261
+  font-size: 110%;
262
+}
263
+a:hover {
264
+  background-color: rgba(169, 224, 255, 0.75);
265
+  border-radius: 5px;
266
+  border: silver thin solid;
267
+}
268
+</style>

+ 14
- 0
src/components/timeshare/faqPage.vue Ver arquivo

@@ -32,6 +32,7 @@
32 32
               class="collapse show color-text-a"
33 33
               aria-labelledby="heading1"
34 34
               data-parent="#accordion"
35
+              style="background-color:#E3E3E3"
35 36
             >
36 37
               <div class="card-body" style="text-align:left">
37 38
                 Owning a timeshare means you own a portion of time in a specific unit in a resort. Most commonly the
@@ -57,6 +58,7 @@
57 58
               class="collapse"
58 59
               aria-labelledby="heading2"
59 60
               data-parent="#accordion"
61
+              style="background-color:#E3E3E3"
60 62
             >
61 63
               <div class="card-body" style="text-align:left">
62 64
                 Most timeshare resorts are self-catering which means you have a ‘home away from home” holiday. You will
@@ -81,6 +83,7 @@
81 83
               class="collapse"
82 84
               aria-labelledby="heading3"
83 85
               data-parent="#accordion"
86
+              style="background-color:#E3E3E3"
84 87
             >
85 88
               <div class="card-body" style="text-align:left">
86 89
                 Should the needs or lifestyle change for the timeshare owner, he may decide to sell his week. As a proud
@@ -104,6 +107,7 @@
104 107
               class="collapse"
105 108
               aria-labelledby="heading4"
106 109
               data-parent="#accordion"
110
+              style="background-color:#E3E3E3"
107 111
             >
108 112
               <div class="card-body" style="text-align:left">
109 113
                 Uni-Vate Properties specialise in fixed weeks or flexi week timeshare but are qualified to sell and/or
@@ -126,6 +130,7 @@
126 130
               class="collapse"
127 131
               aria-labelledby="heading5"
128 132
               data-parent="#accordion"
133
+              style="background-color:#E3E3E3"
129 134
             >
130 135
               <div class="card-body" style="text-align:left">
131 136
                 You can complete the on-line details which you will find under the “To Sell” tab. There will be a listing
@@ -149,6 +154,7 @@
149 154
               class="collapse"
150 155
               aria-labelledby="heading6"
151 156
               data-parent="#accordion"
157
+              style="background-color:#E3E3E3"
152 158
             >
153 159
               <div class="card-body" style="text-align:left">
154 160
                 Timeshare is not an appreciating property investment but it is an investment into your vacation lifestyle.
@@ -173,6 +179,7 @@
173 179
               class="collapse"
174 180
               aria-labelledby="heading7"
175 181
               data-parent="#accordion"
182
+              style="background-color:#E3E3E3"
176 183
             >
177 184
               <div class="card-body" style="text-align:left">
178 185
                 Through Uni-Vate Properties your week will be marketed extensively to all of their available channels.
@@ -195,6 +202,7 @@
195 202
               class="collapse"
196 203
               aria-labelledby="heading8"
197 204
               data-parent="#accordion"
205
+              style="background-color:#E3E3E3"
198 206
             >
199 207
               <div class="card-body" style="text-align:left">
200 208
                 All available and verified weeks will be listed on the website for prospective buyers. Once you identify a
@@ -218,6 +226,7 @@
218 226
               class="collapse"
219 227
               aria-labelledby="heading9"
220 228
               data-parent="#accordion"
229
+              style="background-color:#E3E3E3"
221 230
             >
222 231
               <div class="card-body" style="text-align:left">
223 232
                 By law, your money will be held in a trust account while the transfer is being processed. This trust
@@ -240,6 +249,7 @@
240 249
               class="collapse"
241 250
               aria-labelledby="heading10"
242 251
               data-parent="#accordion"
252
+              style="background-color:#E3E3E3"
243 253
             >
244 254
               <div class="card-body" style="text-align:left">
245 255
                 Most definitely! Once the week has been transferred to you, you have a choice of membership with RCI
@@ -264,6 +274,7 @@
264 274
               class="collapse"
265 275
               aria-labelledby="heading"
266 276
               data-parent="#accordion"
277
+              style="background-color:#E3E3E3"
267 278
             >
268 279
               <div class="card-body" style="text-align:left">
269 280
                 Uni-Vate Properties (Pty) Ltd is affiliated to the Estate Agents Board (EAAB) as well as the Institute of
@@ -293,6 +304,7 @@
293 304
               class="collapse"
294 305
               aria-labelledby="heading12"
295 306
               data-parent="#accordion"
307
+              style="background-color:#E3E3E3"
296 308
             >
297 309
               <div class="card-body" style="text-align:left">
298 310
                 Both are equally viable. The difference is either the seller is the developer of a resort marketing
@@ -320,6 +332,7 @@
320 332
               class="collapse"
321 333
               aria-labelledby="heading13"
322 334
               data-parent="#accordion"
335
+              style="background-color:#E3E3E3"
323 336
             >
324 337
               <div class="card-body" style="text-align:left">
325 338
                 The selling price is always market related determined by five factors. Resort quality, season, sleeper
@@ -344,6 +357,7 @@
344 357
               class="collapse"
345 358
               aria-labelledby="heading14"
346 359
               data-parent="#accordion"
360
+              style="background-color:#E3E3E3"
347 361
             >
348 362
               <div class="card-body" style="text-align:left">
349 363
                 Levies are determined by the share block Board of Directors who are accountable to the shareholders. The

+ 80
- 0
src/components/timeshare/resort/resortImage.vue Ver arquivo

@@ -0,0 +1,80 @@
1
+<template>
2
+  <div class="outer">
3
+    <div id="mainImage">
4
+      <img class="img-fluid main-image" :src="imageX" alt="Resort Image" />
5
+    </div>
6
+    <div class="list-images">
7
+      <div class="scrolling-wrapper-flexbox row inner">
8
+        <div v-for="(image, i) in images" :key="i" :class="myClass">
9
+          <a @click="changeImage(i)">
10
+            <img class="small-image" :src="image" alt="Resort Image" />
11
+          </a>
12
+        </div>
13
+      </div>
14
+    </div>
15
+  </div>
16
+</template>
17
+
18
+<script>
19
+import { mapState } from 'vuex';
20
+
21
+export default {
22
+  props: {
23
+    images: [],
24
+  },
25
+  data() {
26
+    return {
27
+      largeImg: 0,
28
+    };
29
+  },
30
+  computed: {
31
+    myClass() {
32
+      if (this.images && this.images.length === 3) {
33
+        return 'col-md-4';
34
+      }
35
+      return 'col-md-3 nopadding';
36
+    },
37
+    imageX() {
38
+      return this.images[this.largeImg];
39
+    },
40
+    ...mapState('resort', ['resort', 'description', 'images', 'layout']),
41
+  },
42
+  methods: {
43
+    changeImage(number) {
44
+      this.largeImg = number;
45
+    },
46
+  },
47
+};
48
+</script>
49
+<style scoped>
50
+.outer {
51
+  background-color: #efefef;
52
+  padding: 10px;
53
+}
54
+.inner {
55
+  padding-left: 15px;
56
+  padding-right: 15px;
57
+}
58
+.nopadding {
59
+  margin: 0px;
60
+  padding: 0px;
61
+}
62
+.main-image {
63
+  max-width: 80%;
64
+  max-height: 412px;
65
+}
66
+.list-images {
67
+  padding: 5px;
68
+  float: left;
69
+  border-top: 1px solid #dedede;
70
+  border-right: 1px solid #dedede;
71
+  border-bottom: 1px solid #dedede;
72
+  background-color: white;
73
+  width: 100%;
74
+  text-align: center;
75
+}
76
+.small-image {
77
+  width: 100%;
78
+  height: 125px;
79
+}
80
+</style>

+ 85
- 201
src/components/timeshare/resort/resortPage.vue Ver arquivo

@@ -1,131 +1,79 @@
1 1
 <template>
2 2
   <!-- eslint-disable max-len -->
3
-  <section>
4
-    <div class="container">
5
-      <br />
6
-      <br />
7
-      <br />
8
-      <br />
3
+  <section class="my-top">
4
+    <div class="my-container">
9 5
       <div class="row">
10 6
         <div class="col-md-12 col-lg-8">
11 7
           <div class="title-box-d">
12
-            <h1 class="title-d" style="text-align:left; font-size: 250%">{{resort.prName}}</h1>
8
+            <h1 class="title-d my-title">{{resort.prName}}</h1>
13 9
           </div>
14 10
           <br />
15 11
         </div>
16 12
         <div class="col-md-6 col-lg-6">
17
-          <div id="images" style="background-color:#efefef;padding:10px;">
18
-            <div style="float:left;width:100%;height:70%" id="mainImage">
19
-              <img
20
-                class="img-fluid"
21
-                :src="largeImg !== undefined ? largeImg : image1"
22
-                alt="Resort Image"
23
-                style="width: inherit;max-width:550px;max-height:412px;"
24
-              />
13
+          <ResortImages :images="images" />
14
+        </div>
15
+        <div class="col-md-6">
16
+          <ul class="nav nav-tabs" id="myTab" role="tablist">
17
+            <li class="nav-item">
18
+              <a
19
+                class="nav-link active"
20
+                id="directions-tab"
21
+                data-toggle="tab"
22
+                href="#directions"
23
+                role="tab"
24
+                aria-controls="directions"
25
+                aria-selected="false"
26
+              >Directions</a>
27
+            </li>
28
+            <li class="nav-item">
29
+              <a
30
+                class="nav-link"
31
+                id="resort-layout-tab"
32
+                data-toggle="tab"
33
+                href="#resort-layout"
34
+                role="tab"
35
+                aria-controls="resort-layout"
36
+                aria-selected="true"
37
+              >Resort Layout</a>
38
+            </li>
39
+          </ul>
40
+          <div class="tab-content" id="myTabContent">
41
+            <div
42
+              class="tab-pane fade show active"
43
+              id="directions"
44
+              role="tabpanel"
45
+              aria-labelledby="directions-tab"
46
+            >
47
+              <iframe
48
+                :src="mapUrl"
49
+                width="100%"
50
+                height="300"
51
+                frameborder="0"
52
+                style="border:0"
53
+                allowfullscreen
54
+              ></iframe>
55
+              <br />
56
+              <small>
57
+                <a
58
+                  :href="mapUrl"
59
+                  style="color:#60CBEB;text-align:left"
60
+                  target="_blank"
61
+                >See map bigger</a>
62
+              </small>
25 63
             </div>
26 64
             <div
27
-              style="padding:5px;float:left;border-top:1px solid #dedede;border-right:1px solid #dedede;border-bottom:1px solid #dedede;background-color:white;width:100%;text-align:center;"
65
+              class="tab-pane fade"
66
+              id="resort-layout"
67
+              role="tabpanel"
68
+              aria-labelledby="resort-layout-tab"
28 69
             >
29
-              <div style="float:left;margin-left:7px;cursor:pointer;cursor:hand;width:24%">
30
-                <a @click="changeImage(1)">
31
-                  <img class="productThumbnail" :src="image1" alt="Resort Image" />
32
-                </a>
33
-              </div>
34
-              <div style="float:left;margin-left:2px;cursor:pointer;cursor:hand;width:24%">
35
-                <a @click="changeImage(2)">
36
-                  <img :src="image2" alt="Resort Image" class="productThumbnail" />
37
-                </a>
38
-              </div>
39
-              <div style="float:left;margin-left:2px;cursor:pointer;cursor:hand;width:24%">
40
-                <a @click="changeImage(3)">
41
-                  <img :src="image3" alt="Resort Image" class="productThumbnail" />
42
-                </a>
43
-              </div>
44
-              <div style="float:left;margin-left:2px;cursor:pointer;cursor:hand;width:24%">
45
-                <a @click="changeImage(4)">
46
-                  <img :src="image4" alt="Resort Image" class="productThumbnail" />
47
-                </a>
48
-              </div>
70
+              <img class="img-fluid" :src="layout" alt="Resort Layout" />
49 71
             </div>
50
-            <div style="clear:both"></div>
51
-          </div>
52
-          <div id="unit" style="display: none;">
53
-            <div id="unit" style="border: 1px solid #dbdbdb;background-color:#efefef;padding:10px;"></div>
54
-          </div>
55
-        </div>
56
-
57
-        <!-- <div class="row mb-4">
58
-          <div class="col-md-4">
59
-            <img class="img-fluid" :src="image1" alt="Resort Image" style="border-radius:10px" />
60
-          </div>
61
-          <div class="col-md-4">
62
-            <img class="img-fluid" :src="image2" alt="Resort Image" style="border-radius:10px" />
63
-          </div>
64
-          <div class="col-md-4">
65
-            <img class="img-fluid" :src="image3" alt="Resort Image" style="border-radius:10px" />
66
-          </div>
67
-        </div>-->
68
-        <!-- <div class="row"> -->
69
-        <!-- <div class="col-md-6 col-lg-6"> -->
70
-        <ul class="nav nav-tabs" id="myTab" role="tablist">
71
-          <li class="nav-item">
72
-            <a
73
-              class="nav-link active"
74
-              id="directions-tab"
75
-              data-toggle="tab"
76
-              href="#directions"
77
-              role="tab"
78
-              aria-controls="directions"
79
-              aria-selected="false"
80
-            >Directions</a>
81
-          </li>
82
-          <li class="nav-item">
83
-            <a
84
-              class="nav-link"
85
-              id="resort-layout-tab"
86
-              data-toggle="tab"
87
-              href="#resort-layout"
88
-              role="tab"
89
-              aria-controls="resort-layout"
90
-              aria-selected="true"
91
-            >Resort Layout</a>
92
-          </li>
93
-        </ul>
94
-        <div class="tab-content" id="myTabContent">
95
-          <div
96
-            class="tab-pane fade show active"
97
-            id="directions"
98
-            role="tabpanel"
99
-            aria-labelledby="directions-tab"
100
-          >
101
-            <iframe
102
-              :src="mapUrl"
103
-              width="150%"
104
-              height="300"
105
-              frameborder="0"
106
-              style="border:0"
107
-              allowfullscreen
108
-            ></iframe>
109
-            <br />
110
-
111
-            <small>
112
-              <a :href="mapUrl" style="color:#60CBEB;text-align:left" target="_blank">See map bigger</a>
113
-            </small>
114
-          </div>
115
-          <div
116
-            class="tab-pane fade"
117
-            id="resort-layout"
118
-            role="tabpanel"
119
-            aria-labelledby="resort-layout-tab"
120
-          >
121
-            <img class="img-fluid" :src="layout" alt="Resort Layout" />
122 72
           </div>
123 73
         </div>
124
-        <!-- </div>
125
-        </div>-->
126 74
       </div>
127 75
     </div>
128
-
76
+    <hr />
129 77
     <div class="myMargin">
130 78
       <div class="row">
131 79
         <div class="col-md-4">
@@ -140,68 +88,6 @@
140 88
           </div>
141 89
           {{description}}
142 90
           <hr />
143
-          <!-- <div class="row">
144
-            <div class="col-md-8">
145
-              <ul class="nav nav-tabs" id="myTab" role="tablist">
146
-                <li class="nav-item">
147
-                  <a
148
-                    class="nav-link active"
149
-                    id="directions-tab"
150
-                    data-toggle="tab"
151
-                    href="#directions"
152
-                    role="tab"
153
-                    aria-controls="directions"
154
-                    aria-selected="false"
155
-                  >Directions</a>
156
-                </li>
157
-                <li class="nav-item">
158
-                  <a
159
-                    class="nav-link"
160
-                    id="resort-layout-tab"
161
-                    data-toggle="tab"
162
-                    href="#resort-layout"
163
-                    role="tab"
164
-                    aria-controls="resort-layout"
165
-                    aria-selected="true"
166
-                  >Resort Layout</a>
167
-                </li>
168
-              </ul>
169
-              <div class="tab-content" id="myTabContent">
170
-                <div
171
-                  class="tab-pane fade show active"
172
-                  id="directions"
173
-                  role="tabpanel"
174
-                  aria-labelledby="directions-tab"
175
-                >
176
-                  <iframe
177
-                    :src="mapUrl"
178
-                    width="100%"
179
-                    height="450"
180
-                    frameborder="0"
181
-                    style="border:0"
182
-                    allowfullscreen
183
-                  ></iframe>
184
-                  <br />
185
-
186
-                  <small>
187
-                    <a
188
-                      :href="mapUrl"
189
-                      style="color:#60CBEB;text-align:left"
190
-                      target="_blank"
191
-                    >See map bigger</a>
192
-                  </small>
193
-                </div>
194
-                <div
195
-                  class="tab-pane fade"
196
-                  id="resort-layout"
197
-                  role="tabpanel"
198
-                  aria-labelledby="resort-layout-tab"
199
-                >
200
-                  <img class="img-fluid" :src="layout" alt="Resort Layout" />
201
-                </div>
202
-              </div>
203
-            </div>
204
-          </div>-->
205 91
         </div>
206 92
       </div>
207 93
     </div>
@@ -211,34 +97,22 @@
211 97
 import { mapState, mapActions } from 'vuex';
212 98
 import WeekList from '../buy/weekListComponent.vue';
213 99
 import FilterComponent from '../searchTimeshare.vue';
100
+import ResortImages from './resortImage.vue';
214 101
 
215 102
 export default {
216 103
   props: {
217 104
     resortCode: {},
218 105
   },
219
-  data() {
220
-    return {
221
-      largeImg: undefined,
222
-    };
223
-  },
224 106
   components: {
225 107
     WeekList,
226 108
     FilterComponent,
109
+    ResortImages,
227 110
   },
228 111
   mounted() {
229 112
     this.initResort(this.resortCode);
230
-    this.largeImg = this.image1;
231 113
   },
232 114
   computed: {
233
-    ...mapState('resort', [
234
-      'resort',
235
-      'description',
236
-      'image1',
237
-      'image2',
238
-      'image3',
239
-      'image4',
240
-      'layout',
241
-    ]),
115
+    ...mapState('resort', ['resort', 'description', 'images', 'layout']),
242 116
     mapUrl() {
243 117
       return this.resort
244 118
         ? `http://maps.google.com/maps?q=${this.resort.prLatitude},${this.resort.prLongitude}&z=15&output=embed`
@@ -250,23 +124,33 @@ export default {
250 124
     routerGoTo(goto) {
251 125
       this.$router.push(goto);
252 126
     },
253
-
254
-    changeImage(number) {
255
-      console.log(number);
256
-      if (number === 2) {
257
-        this.largeImg = this.image2;
258
-      } else if (number === 3) {
259
-        this.largeImg = this.image3;
260
-      } else if (number === 4) {
261
-        this.largeImg = this.image4;
262
-      } else {
263
-        this.largeImg = this.image1;
264
-      }
265
-    },
266 127
   },
267 128
 };
268 129
 </script>
269 130
 <style scoped>
131
+.my-top {
132
+  padding-top: 25px;
133
+}
134
+.my-container {
135
+  padding-left: 200px;
136
+  padding-right: 200px;
137
+}
138
+.my-title {
139
+  text-align: left;
140
+  font-size: 250%;
141
+}
142
+.scrolling-wrapper-flexbox {
143
+  display: flex;
144
+  flex-wrap: nowrap;
145
+  overflow-x: auto;
146
+}
147
+.scrolling-wrapper-flexbox .card {
148
+  flex: 0 0 auto;
149
+}
150
+.nopadding {
151
+  padding: 1px !important;
152
+  margin: 0 !important;
153
+}
270 154
 .myMargin {
271 155
   margin-left: 2%;
272 156
   margin-right: 2%;

+ 140
- 138
src/components/timeshare/resort/unitPage.vue Ver arquivo

@@ -1,163 +1,156 @@
1 1
 <template>
2 2
   <!-- eslint-disable max-len -->
3
-  <div class="container">
3
+  <div class="my-container my-top">
4 4
     <div class="row">
5 5
       <div class="col-md-12 col-lg-8">
6 6
         <div class="title-box-d">
7
-          <h1
8
-            class="title-d"
9
-            style="text-align:left; font-size: 250%"
10
-          >{{week ? week.resortName : ''}}</h1>
7
+          <h1 class="title-d my-title">{{week ? week.resortName : ''}}</h1>
11 8
         </div>
12 9
         <br />
13 10
       </div>
14 11
       <div class="row mb-4">
15
-        <div class="col-md-4">
16
-          <img class="img-fluid" :src="image1" alt="Resort Image" style="border-radius:10px" />
17
-        </div>
18
-        <div class="col-md-4">
19
-          <img class="img-fluid" :src="image2" alt="Resort Image" style="border-radius:10px" />
20
-        </div>
21
-        <div class="col-md-4">
22
-          <img class="img-fluid" :src="image3" alt="Resort Image" style="border-radius:10px" />
23
-        </div>
24
-      </div>
25
-    </div>
26
-    <br />
27
-    <div class="container col-md-12" style="text-align:left;">
28
-      <div class="row">
29 12
         <div class="col-md-6">
30
-          <div class="title-box-d">
31
-            <h3 class="title-d">Property Description</h3>
32
-          </div>
33
-          <p>{{description}}</p>
34
-          <div>
35
-            <div class="title-box-d">
36
-              <h3 class="title-d">Facilities</h3>
37
-            </div>
38
-            <div class="row" v-if="resort.prUnitFacilities">
39
-              <div
40
-                class="col-md-4"
41
-                v-for="(item, i) in resort.prUnitFacilities.split('\n')"
42
-                :key="i"
43
-              >{{item}}</div>
44
-            </div>
45
-          </div>
13
+          <ResortImages :images="images" />
46 14
         </div>
47
-        <div class="col-md-6" v-if="week">
48
-          <form
49
-            id="mainForm"
50
-            method="POST"
51
-            action="/interested-timeshare/"
52
-            accept-charset="UTF-8"
53
-            enctype="multipart/form-data"
54
-          >
55
-            <div class="title-box-d">
56
-              <h3 class="title-d">Summary</h3>
57
-            </div>
58
-            <div class="form-row">
59
-              <div class="col-md-6">
60
-                <label for="resortunit">Unit</label>
61
-                <div class="input-group mb-3">
62
-                  <div class="input-group-prepend">
63
-                    <span class="input-group-text" style="color: #60CBEB">
64
-                      <b>U#</b>
65
-                    </span>
15
+        <div class="col-md-6">
16
+          <hr />
17
+          <div v-if="week">
18
+            <form
19
+              id="mainForm"
20
+              method="POST"
21
+              action="/interested-timeshare/"
22
+              accept-charset="UTF-8"
23
+              enctype="multipart/form-data"
24
+            >
25
+              <div class="title-box-d">
26
+                <h3 class="title-d">Summary</h3>
27
+              </div>
28
+              <div class="form-row">
29
+                <div class="col-md-6">
30
+                  <label for="resortunit">Unit</label>
31
+                  <div class="input-group mb-3">
32
+                    <div class="input-group-prepend">
33
+                      <span class="input-group-text" style="color: #60CBEB">
34
+                        <b>U#</b>
35
+                      </span>
36
+                    </div>
37
+                    <input
38
+                      class="form-control"
39
+                      type="text"
40
+                      id="resort"
41
+                      name="resortunit"
42
+                      :value="week ? week.unitNumber : ''"
43
+                      disabled
44
+                    />
66 45
                   </div>
67
-                  <input
68
-                    class="form-control"
69
-                    type="text"
70
-                    id="resort"
71
-                    name="resortunit"
72
-                    :value="week ? week.unitNumber : ''"
73
-                    disabled
74
-                  />
75 46
                 </div>
76
-              </div>
77
-              <div class="col-md-6">
78
-                <label for="resortWeek">Module / Week Number</label>
79
-                <div class="input-group mb-3">
80
-                  <div class="input-group-prepend">
81
-                    <span class="input-group-text" style="color: #60CBEB">
82
-                      <b>M</b>
83
-                    </span>
47
+                <div class="col-md-6">
48
+                  <label for="resortWeek">Module / Week Number</label>
49
+                  <div class="input-group mb-3">
50
+                    <div class="input-group-prepend">
51
+                      <span class="input-group-text" style="color: #60CBEB">
52
+                        <b>M</b>
53
+                      </span>
54
+                    </div>
55
+                    <input
56
+                      class="form-control"
57
+                      type="text"
58
+                      id="week"
59
+                      name="resortWeek"
60
+                      :value="week ? week.weekNumber : ''"
61
+                      disabled
62
+                    />
84 63
                   </div>
85
-                  <input
86
-                    class="form-control"
87
-                    type="text"
88
-                    id="week"
89
-                    name="resortWeek"
90
-                    :value="week ? week.weekNumber : ''"
91
-                    disabled
92
-                  />
93 64
                 </div>
94
-              </div>
95 65
 
96
-              <div class="col-md-6">
97
-                <label for="resortModule">Current Year Levy</label>
98
-                <div class="input-group mb-3">
99
-                  <div class="input-group-prepend">
100
-                    <span class="input-group-text" style="color: #60CBEB">
101
-                      <b>R</b>
102
-                    </span>
66
+                <div class="col-md-6">
67
+                  <label for="resortModule">Current Year Levy</label>
68
+                  <div class="input-group mb-3">
69
+                    <div class="input-group-prepend">
70
+                      <span class="input-group-text" style="color: #60CBEB">
71
+                        <b>R</b>
72
+                      </span>
73
+                    </div>
74
+                    <input
75
+                      class="form-control"
76
+                      type="text"
77
+                      id="levy"
78
+                      name="levy"
79
+                      :value="formatPrice(week ? week.levyAmount : 0)"
80
+                      disabled
81
+                    />
103 82
                   </div>
104
-                  <input
105
-                    class="form-control"
106
-                    type="text"
107
-                    id="levy"
108
-                    name="levy"
109
-                    :value="formatPrice(week ? week.levyAmount : 0)"
110
-                    disabled
111
-                  />
112 83
                 </div>
113
-              </div>
114
-              <div class="col-md-6">
115
-                <label for="price">Price</label>
116
-                <div class="property-price d-flex">
117
-                  <div class="price-border">
118
-                    <div class="price-label">
119
-                      <b>R {{ formatPrice(week ? week.sellPrice : 0) }}</b>
84
+                <div class="col-md-6">
85
+                  <label for="price">Price</label>
86
+                  <div class="property-price d-flex">
87
+                    <div class="price-border">
88
+                      <div class="price-label">
89
+                        <b>R {{ formatPrice(week ? week.sellPrice : 0) }}</b>
90
+                      </div>
120 91
                     </div>
121 92
                   </div>
122 93
                 </div>
123 94
               </div>
124
-            </div>
125
-            <br />
126
-          </form>
127
-          <br />
128
-          <div class="d-flex justify-content-between">
129
-            <div class="p-1">
130
-              <a class="btn btn-b-c even-width mr-auto" href="javascript:history.back()">Back</a>
131
-            </div>
132
-            <div class="p-1">
133
-              <button
134
-                type="button"
135
-                class="btn btn-lg btn-b-n even-width mr-auto"
136
-                data-toggle="modal"
137
-                data-target="#myModal"
138
-              >Make an Offer</button>
139
-              <div class="col-md-12">
140
-                <div id="myModal" class="modal fade" role="dialog">
141
-                  <div class="modal-dialog modal-lg">
142
-                    <!-- Modal content-->
143
-                    <div class="modal-content">
144
-                      <div class="modal-header">
145
-                        <button type="button" class="close" data-dismiss="modal">&times;</button>
146
-                      </div>
147
-                      <div padding-left="20px">
148
-                        <makeOffer
149
-                          name="MakeOffer"
150
-                          :isMakeOffer="true"
151
-                          :isProperty="false"
152
-                          :item="week"
153
-                        />
95
+            </form>
96
+            <hr />
97
+            <div class="d-flex justify-content-between">
98
+              <div class="p-1">
99
+                <a class="btn btn-b-c even-width mr-auto" href="javascript:history.back()">Back</a>
100
+              </div>
101
+              <div class="p-1">
102
+                <button
103
+                  type="button"
104
+                  class="btn btn-lg btn-b-n even-width mr-auto"
105
+                  data-toggle="modal"
106
+                  data-target="#myModal"
107
+                >Make an Offer</button>
108
+                <div class="col-md-12">
109
+                  <div id="myModal" class="modal fade" role="dialog">
110
+                    <div class="modal-dialog modal-lg">
111
+                      <!-- Modal content-->
112
+                      <div class="modal-content">
113
+                        <div class="modal-header">
114
+                          <button type="button" class="close" data-dismiss="modal">&times;</button>
115
+                        </div>
116
+                        <div padding-left="20px">
117
+                          <makeOffer
118
+                            name="MakeOffer"
119
+                            :isMakeOffer="true"
120
+                            :isProperty="false"
121
+                            :item="week"
122
+                          />
123
+                        </div>
154 124
                       </div>
155 125
                     </div>
156 126
                   </div>
157 127
                 </div>
158 128
               </div>
159 129
             </div>
130
+            <hr />
131
+          </div>
132
+        </div>
133
+        <hr />
134
+        <div class="col-md-12">
135
+          <hr />
136
+        </div>
137
+        <div class="col-md-6">
138
+          <div class="title-box-d">
139
+            <h3 class="title-d">Facilities</h3>
160 140
           </div>
141
+          <div class="row" v-if="resort.prUnitFacilities">
142
+            <div
143
+              class="col-md-4"
144
+              v-for="(item, i) in resort.prUnitFacilities.split('\n')"
145
+              :key="i"
146
+            >{{item}}</div>
147
+          </div>
148
+        </div>
149
+        <div class="col-md-6">
150
+          <div class="title-box-d">
151
+            <h3 class="title-d">Property Description</h3>
152
+          </div>
153
+          <p>{{description}}</p>
161 154
         </div>
162 155
       </div>
163 156
     </div>
@@ -167,11 +160,13 @@
167 160
 <script>
168 161
 import { mapState, mapActions } from 'vuex';
169 162
 import makeOffer from '../../processFlow/makeOffer.vue';
163
+import ResortImages from './resortImage.vue';
170 164
 
171 165
 export default {
172 166
   name: 'unit',
173 167
   components: {
174 168
     makeOffer,
169
+    ResortImages,
175 170
   },
176 171
   props: {
177 172
     resortCode: {},
@@ -182,13 +177,7 @@ export default {
182 177
     this.initWeek(this.weekId);
183 178
   },
184 179
   computed: {
185
-    ...mapState('resort', [
186
-      'resort',
187
-      'description',
188
-      'image1',
189
-      'image2',
190
-      'image3',
191
-    ]),
180
+    ...mapState('resort', ['resort', 'description', 'images']),
192 181
     ...mapState('week', ['week']),
193 182
   },
194 183
   methods: {
@@ -205,6 +194,17 @@ export default {
205 194
 };
206 195
 </script>
207 196
 <style scoped>
197
+.my-top {
198
+  padding-top: 25px;
199
+}
200
+.my-container {
201
+  padding-left: 15%;
202
+  padding-right: 15%;
203
+}
204
+.my-title {
205
+  text-align: left;
206
+  font-size: 250%;
207
+}
208 208
 .btn.btn-b-c {
209 209
   background-color: #ffffff;
210 210
   color: #60cbeb;
@@ -215,6 +215,8 @@ export default {
215 215
   color: #ffffff;
216 216
 }
217 217
 .price-border {
218
+  background-color: #a9e0ff;
219
+  width: 100%;
218 220
   border: solid #60cbeb medium;
219 221
   padding: 0px 20px;
220 222
 }

+ 2
- 2
src/components/timeshare/searchTimeshare.vue Ver arquivo

@@ -93,7 +93,7 @@
93 93
                 step="any"
94 94
                 id="minPrice"
95 95
                 name="minPrice"
96
-                placeholder="Minimum Price"
96
+                placeholder="Min"
97 97
                 v-model="filter.minPrice"
98 98
               />
99 99
               <div class="input-group-append" @click="clearFilter('minPrice')">
@@ -117,7 +117,7 @@
117 117
                 step="any"
118 118
                 id="maxPrice"
119 119
                 name="maxPrice"
120
-                placeholder="Maximum Price"
120
+                placeholder="Max"
121 121
                 v-model="filter.maxPrice"
122 122
               />
123 123
               <div class="input-group-append" @click="clearFilter('maxPrice')">

+ 7
- 2
src/components/timeshare/sell/sellPage.vue Ver arquivo

@@ -489,8 +489,13 @@
489 489
           <br />
490 490
           <br />
491 491
           <p style="text-align:center;">
492
-            To rent your week out
493
-            <a href="https://www.tradeunipoint.com/" target="_blank">click here</a>
492
+            <strong>
493
+              To rent your week out
494
+              <a
495
+                href="https://www.tradeunipoint.com/"
496
+                target="_blank"
497
+              >click here</a>
498
+            </strong>
494 499
           </p>
495 500
         </form>
496 501
       </div>

+ 27
- 25
src/components/user/loginPage.vue Ver arquivo

@@ -3,10 +3,20 @@
3 3
     <!-- eslint-disable max-len -->
4 4
     <div class="login-page">
5 5
       <form id="signIn">
6
-        <div class="form">
6
+        <div class="form col-md-12">
7 7
           <div>
8 8
             <h4>Login</h4>
9 9
           </div>
10
+          <button
11
+            @click="routerGoTo('/user/register')"
12
+            class="btn"
13
+            style="margin:2px; color: #60CBEB"
14
+          >Register</button>
15
+          <button
16
+            @click="routerGoTo('/user/registeragency')"
17
+            class="btn"
18
+            style="margin:2px; color: #60CBEB"
19
+          >Agency Registration</button>
10 20
           <div v-if="this.$store.state.authentication.status === 'error'">
11 21
             <alert
12 22
               :text="'User doesn\'t exist or Username and Password is incorrect'"
@@ -14,7 +24,7 @@
14 24
             />
15 25
           </div>
16 26
           <div class="row">
17
-            <div class="col-md-11" style="margin-bottom: 1em">
27
+            <div class="col-md-12" style="margin-bottom: 1em">
18 28
               <div class="input-group mb-3">
19 29
                 <div class="input-group-prepend">
20 30
                   <span class="input-group-text">
@@ -59,27 +69,15 @@
59 69
               </div>
60 70
             </div>
61 71
           </div>
62
-          <div class="form-group row"></div>
63 72
           <button @click="Login()" class="btn btn-b-n" type="submit">Sign In</button>
64 73
           <hr />
65
-          <button
66
-            @click="routerGoTo('/user/register')"
67
-            class="btn"
68
-            style="margin:2px"
69
-            type="button"
70
-          >Registration</button>
71
-          <button
72
-            @click="routerGoTo('/user/registeragency')"
73
-            class="btn"
74
-            style="margin:2px"
75
-          >Agency Registration</button>
76
-        </div>
77
-      </form>
78
-
79
-      <form id="forgot">
80
-        <div class="form">
81
-          <h5>Trouble signing in?</h5>
82
-          <div>
74
+          <div
75
+            @click="ToggleTrouble()"
76
+            class="btn cursor: pointer;"
77
+            style="margin:2px; color: #60CBEB; font-size:110%;"
78
+          >Trouble signing in?</div>
79
+          <br />
80
+          <div v-if="troubleToggle">
83 81
             <!-- <alert :text="'Username & password request email sent'" :type="'SUCCESS'" /> -->
84 82
             <div class="row">
85 83
               <div class="input-group-prepend">
@@ -89,10 +87,8 @@
89 87
                 <input class="form-control" placeholder="Your Email" type="text" name="email" value />
90 88
               </div>
91 89
             </div>
92
-          </div>
93
-          <div class="form-group row"></div>
94
-          <div class="offset-md-3 col-md-5">
95
-            <button @click="SendMail()" class="btn btn-b-n" type="submit">Get Help</button>
90
+            <br />
91
+            <button @click="SendMail()" class="btn btn-b-n" type="submit">Submit</button>
96 92
           </div>
97 93
         </div>
98 94
       </form>
@@ -119,6 +115,7 @@ export default {
119 115
       text: '',
120 116
       showPassword: false,
121 117
       email: '',
118
+      troubleToggle: false,
122 119
     };
123 120
   },
124 121
   computed: {
@@ -126,6 +123,11 @@ export default {
126 123
   },
127 124
   methods: {
128 125
     ...mapActions('authentication', ['login', 'init']),
126
+    ToggleTrouble() {
127
+      if (this.troubleToggle) {
128
+        this.troubleToggle = false;
129
+      } else this.troubleToggle = true;
130
+    },
129 131
     Login() {
130 132
       this.login().then(() => {
131 133
         if (this.$store.state.authentication.status === 'error') {

+ 9
- 3
src/router/index.js Ver arquivo

@@ -48,6 +48,7 @@ import searchLog from '../components/admin/logs/SearchLogs.vue';
48 48
 Vue.use(Router);
49 49
 
50 50
 export default new Router({
51
+  // eslint-disable-next-line no-unused-vars
51 52
   scrollBehavior(to, from, savedPosition) {
52 53
     return {
53 54
       x: 0,
@@ -126,18 +127,23 @@ export default new Router({
126 127
       component: PropertySearch,
127 128
     },
128 129
     {
129
-      path: '/property/:propType/:saleType',
130
+      path: '/property/new/:saleType',
130 131
       name: 'PropertyNew',
131 132
       component: PropertyEdit,
132 133
     },
134
+    {
135
+      path: '/property/new/:propertyUsageType/:saleType',
136
+      name: 'PropertyNewFromSearch',
137
+      component: PropertyEdit,
138
+    },
133 139
     {
134 140
       path: '/property/edit/:id/:propType/:saleType',
135 141
       name: 'PropertyEdit',
136 142
       component: PropertyEdit,
137 143
     },
138 144
     {
139
-      path: '/property/list/:propertyType/:user',
140
-      name: 'PropertyList',
145
+      path: '/property/admin/list/:by',
146
+      name: 'PropertyListAdmin',
141 147
       component: PropertyList,
142 148
     },
143 149
     {

+ 2
- 1
src/store/modules/property/propertyLists.js Ver arquivo

@@ -13,8 +13,9 @@ export default {
13 13
   getters: {},
14 14
   actions: {
15 15
     getProperties({ commit }, item) {
16
+      console.log(`/api/property/${item.propertyType}/${item.user}`);
16 17
       axios
17
-        .get(`/api/property/${item.propertyType}/All`) // .get(`/api/property/${item.propertyType}/${item.user}`)
18
+        .get(`/api/property/${item.propertyType}/${item.user}`) // .get(`/api/property/${item.propertyType}/${item.user}`)
18 19
         .then(result => commit('setProperties', result.data))
19 20
         .catch(console.error);
20 21
     },

+ 0
- 56
src/store/modules/property/propertySearch.js Ver arquivo

@@ -35,62 +35,6 @@ export default {
35 35
       state.propertySearch[filter] = 'All';
36 36
     },
37 37
   },
38
-  // getters: {
39
-  //   filterProperties: (state) => {
40
-  //     let list = state.properties;
41
-  //     const { propertySearch } = state;
42
-  //     if (propertySearch) {
43
-  //       if (propertySearch.salesType === 'Sale') {
44
-  //         list = _.filter(list, x => x.isSale);
45
-  //       } else {
46
-  //         list = _.filter(list, x => !x.isSale);
47
-  //       }
48
-  //       if (propertySearch.propertyUsageType && propertySearch.propertyUsageType !== 'All') {
49
-  //         list = _.filter(list, x => x.propertyUsageType
50
-  //             .toUpperCase()
51
-  //             // eslint-disable-next-line comma-dangle
52
-  //             .includes(propertySearch.propertyUsageType.toUpperCase()));
53
-  //       }
54
-  //       if (propertySearch.propertyType && propertySearch.propertyType !== 'All') {
55
-  //         list = _.filter(list, x => x.propertyType
56
-  //             .toUpperCase()
57
-  //             // eslint-disable-next-line comma-dangle
58
-  //             .includes(propertySearch.propertyType.toUpperCase()));
59
-  //       }
60
-  //       if (propertySearch.province && propertySearch.province !== 'All') {
61
-  //         list = _.filter(list, x => x.province
62
-  //             .toUpperCase()
63
-  //             // eslint-disable-next-line comma-dangle
64
-  //             .includes(propertySearch.province.toUpperCase()));
65
-  //       }
66
-  //       if (propertySearch.city && propertySearch.city !== 'All') {
67
-  //         list = _.filter(list, x => x.city
68
-  //             .toUpperCase()
69
-  //             // eslint-disable-next-line comma-dangle
70
-  //             .includes(propertySearch.city.toUpperCase()));
71
-  //       }
72
-  //       if (propertySearch.suburb && propertySearch.suburb !== 'All') {
73
-  //         list = _.filter(list, x => x.suburb
74
-  //             .toUpperCase()
75
-  //             // eslint-disable-next-line comma-dangle
76
-  //             .includes(propertySearch.suburb.toUpperCase()));
77
-  //       }
78
-  //       if (propertySearch.suburb && propertySearch.suburb !== 'All') {
79
-  //         list = _.filter(list, x => x.suburb
80
-  //             .toUpperCase()
81
-  //             // eslint-disable-next-line comma-dangle
82
-  //             .includes(propertySearch.suburb.toUpperCase()));
83
-  //       }
84
-  //       if (propertySearch.minPrice) {
85
-  //         list = _.filter(list, x => x.price >= propertySearch.minPrice);
86
-  //       }
87
-  //       if (propertySearch.maxPrice) {
88
-  //         list = _.filter(list, x => x.price <= propertySearch.maxPrice);
89
-  //       }
90
-  //     }
91
-  //     return list;
92
-  //   },
93
-  // },
94 38
   actions: {
95 39
     clearFilter({ commit }, filter) {
96 40
       commit('onClearFilter', filter);

+ 38
- 32
src/store/modules/timeshare/resort.js Ver arquivo

@@ -6,10 +6,7 @@ export default {
6 6
   namespaced: true,
7 7
   state: {
8 8
     resort: {},
9
-    image1: '',
10
-    image2: '',
11
-    image3: '',
12
-    image4: '',
9
+    images: [],
13 10
     layout: '',
14 11
     description: '',
15 12
   },
@@ -20,33 +17,24 @@ export default {
20 17
     setDescription(state, description) {
21 18
       state.description = description;
22 19
     },
20
+    addImage(state, image) {
21
+      state.images.push(`data:image/jpeg;base64,${image}`);
22
+    },
23 23
     clear(state) {
24 24
       state.resort = {};
25
-      state.image1 = '';
26
-      state.image2 = '';
27
-      state.image3 = '';
28
-      state.image4 = '';
25
+      state.images = [];
29 26
       state.layout = '';
30 27
     },
31
-    setImage1(state, image) {
32
-      state.image1 = `data:image/jpeg;base64,${image}`;
33
-    },
34
-    setImage2(state, image) {
35
-      state.image2 = `data:image/jpeg;base64,${image}`;
36
-    },
37
-    setImage3(state, image) {
38
-      state.image3 = `data:image/jpeg;base64,${image}`;
39
-    },
40
-    setImage4(state, image) {
41
-      state.image4 = `data:image/jpeg;base64,${image}`;
42
-    },
43 28
     setLayout(state, image) {
44 29
       state.layout = `data:image/jpeg;base64,${image}`;
45 30
     },
46 31
   },
47 32
   getters: {},
48 33
   actions: {
49
-    initResort({ commit, dispatch }, resortCode) {
34
+    initResort({
35
+      commit,
36
+      dispatch,
37
+    }, resortCode) {
50 38
       commit('clear');
51 39
       dispatch('getResort', resortCode);
52 40
       dispatch('getDescription', resortCode);
@@ -56,7 +44,9 @@ export default {
56 44
       dispatch('getImage4', resortCode);
57 45
       dispatch('getLayout', resortCode);
58 46
     },
59
-    getDescription({ commit }, resortCode) {
47
+    getDescription({
48
+      commit,
49
+    }, resortCode) {
60 50
       axios
61 51
         .get(
62 52
           `https://www.tradeunipoint.com/unibackend/seam/resource/rest/products/${resortCode}/dsc`,
@@ -66,7 +56,9 @@ export default {
66 56
         })
67 57
         .catch(console.error);
68 58
     },
69
-    getResort({ commit }, resortCode) {
59
+    getResort({
60
+      commit,
61
+    }, resortCode) {
70 62
       axios
71 63
         .get(
72 64
           `https://www.tradeunipoint.com/unibackend/seam/resource/rest/products/TRESORT/${resortCode}`,
@@ -76,39 +68,53 @@ export default {
76 68
         })
77 69
         .catch(console.error);
78 70
     },
79
-    getImage1({ commit }, resortCode) {
71
+    getImage1({
72
+      commit,
73
+    }, resortCode) {
80 74
       axios
81 75
         .get(
82 76
           `https://www.tradeunipoint.com/unibackend/seam/resource/rest/products/${resortCode}/image/1`,
83 77
         )
84
-        .then(result => commit('setImage1', result.data))
78
+        .then(result => commit('addImage', result.data))
85 79
         .catch(console.error);
86 80
     },
87
-    getImage2({ commit }, resortCode) {
81
+    getImage2({
82
+      commit,
83
+    }, resortCode) {
88 84
       axios
89 85
         .get(
90 86
           `https://www.tradeunipoint.com/unibackend/seam/resource/rest/products/${resortCode}/image/2`,
91 87
         )
92
-        .then(result => commit('setImage2', result.data))
88
+        .then(result => commit('addImage', result.data))
93 89
         .catch(console.error);
94 90
     },
95
-    getImage3({ commit }, resortCode) {
91
+    getImage3({
92
+      commit,
93
+    }, resortCode) {
96 94
       axios
97 95
         .get(
98 96
           `https://www.tradeunipoint.com/unibackend/seam/resource/rest/products/${resortCode}/image/3`,
99 97
         )
100
-        .then(result => commit('setImage3', result.data))
98
+        .then(result => commit('addImage', result.data))
101 99
         .catch(console.error);
102 100
     },
103
-    getImage4({ commit }, resortCode) {
101
+    getImage4({
102
+      commit,
103
+    }, resortCode) {
104 104
       axios
105 105
         .get(
106 106
           `https://www.tradeunipoint.com/unibackend/seam/resource/rest/products/${resortCode}/image/4`,
107 107
         )
108
-        .then(result => commit('setImage4', result.data))
108
+        .then((result) => {
109
+          if (result.data && result.data.length > 0) {
110
+            commit('addImage', result.data);
111
+          }
112
+        })
109 113
         .catch(console.error);
110 114
     },
111
-    getLayout({ commit }, resortCode) {
115
+    getLayout({
116
+      commit,
117
+    }, resortCode) {
112 118
       axios
113 119
         .get(
114 120
           `https://www.tradeunipoint.com/unibackend/seam/resource/rest/products/${resortCode}/layout`,

+ 1
- 1
vue.config.js Ver arquivo

@@ -2,7 +2,7 @@ module.exports = {
2 2
   devServer: {
3 3
     proxy: {
4 4
       '/api': {
5
-        target: 'http://localhost:57260',
5
+        target: 'http://192.168.6.188:5000',
6 6
         changeOrigin: true,
7 7
       },
8 8
     },

Carregando…
Cancelar
Salvar