Browse Source

Merging

master
Lene Scholtz 5 years ago
parent
commit
48fb527740

+ 54
- 2
package-lock.json View File

3737
     "deep-equal": {
3737
     "deep-equal": {
3738
       "version": "1.0.1",
3738
       "version": "1.0.1",
3739
       "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz",
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
     "deep-is": {
3742
     "deep-is": {
3744
       "version": "0.1.3",
3743
       "version": "0.1.3",
5026
       "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
5025
       "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
5027
       "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk="
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
     "fast-glob": {
5033
     "fast-glob": {
5030
       "version": "2.2.7",
5034
       "version": "2.2.7",
5031
       "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz",
5035
       "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz",
8498
         "no-case": "^2.2.0"
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
     "parent-module": {
8510
     "parent-module": {
8502
       "version": "1.0.1",
8511
       "version": "1.0.1",
8503
       "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
8512
       "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
9456
       "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==",
9465
       "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==",
9457
       "dev": true
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
     "randombytes": {
9503
     "randombytes": {
9460
       "version": "2.1.0",
9504
       "version": "2.1.0",
9461
       "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
9505
       "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
11898
         "trix": "^1.1.1"
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
     "vuetify": {
11953
     "vuetify": {
11902
       "version": "1.5.16",
11954
       "version": "1.5.16",
11903
       "resolved": "https://registry.npmjs.org/vuetify/-/vuetify-1.5.16.tgz",
11955
       "resolved": "https://registry.npmjs.org/vuetify/-/vuetify-1.5.16.tgz",

+ 1
- 0
package.json View File

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

BIN
public/img/no-homes.png View File


BIN
public/img/propertyListings.png View File


+ 1
- 1
src/components/about/aboutTimeshare.vue View File

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

+ 63
- 61
src/components/property/propertyCard.vue View File

23
     </div>
23
     </div>
24
     <div class="form-group row">
24
     <div class="form-group row">
25
       <div class="col-md-4" v-for="currentProperty in properties" :key="currentProperty.id">
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
                   <router-link :to="`/property/property/${currentProperty.id}`" class="link-a">
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
                   </router-link>
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
                 </div>
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
               </div>
91
               </div>
90
             </div>
92
             </div>
91
           </div>
93
           </div>
92
-        </div>
94
+        </router-link>
93
         <br />
95
         <br />
94
       </div>
96
       </div>
95
     </div>
97
     </div>

+ 1
- 0
src/components/property/propertyImage.vue View File

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

+ 30
- 24
src/components/property/propertyList.vue View File

12
           <div class="col-md-12 col-lg-8">
12
           <div class="col-md-12 col-lg-8">
13
             <div class="title-box-d">
13
             <div class="title-box-d">
14
               <h1
14
               <h1
15
-                v-if="user !== 'All'"
15
+                v-if="showAdmin"
16
                 class="title-d"
16
                 class="title-d"
17
                 style="text-align:left; font-size: 250%"
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
             </div>
20
             </div>
25
           </div>
21
           </div>
26
         </div>
22
         </div>
35
             <th>Property ID</th>
31
             <th>Property ID</th>
36
             <th>Size</th>
32
             <th>Size</th>
37
             <th>Price</th>
33
             <th>Price</th>
34
+            <th>Usage Type</th>
38
             <th>Type</th>
35
             <th>Type</th>
36
+            <th>Sale Type</th>
39
             <th>Publish</th>
37
             <th>Publish</th>
40
             <th>Status</th>
38
             <th>Status</th>
41
             <th></th>
39
             <th></th>
48
             <td>{{ item.id }}</td>
46
             <td>{{ item.id }}</td>
49
             <td v-html="item.size" />
47
             <td v-html="item.size" />
50
             <td>{{ item.price }}</td>
48
             <td>{{ item.price }}</td>
49
+            <td>{{ item.usageType }}</td>
51
             <td>{{ item.type }}</td>
50
             <td>{{ item.type }}</td>
51
+            <td>{{ item.saleType }}</td>
52
             <!-- <td>{{ item.publish }}</td> -->
52
             <!-- <td>{{ item.publish }}</td> -->
53
             <td></td>
53
             <td></td>
54
             <td>{{ item.status }}</td>
54
             <td>{{ item.status }}</td>
58
                 @click="Edit(item)"
58
                 @click="Edit(item)"
59
                 class="btn btn-b-n"
59
                 class="btn btn-b-n"
60
                 style="width: 85px; height:40px;"
60
                 style="width: 85px; height:40px;"
61
-                disabled
62
               >Edit</button>
61
               >Edit</button>
63
             </td>
62
             </td>
64
             <td>
63
             <td>
86
     return {
85
     return {
87
       propertyType: '',
86
       propertyType: '',
88
       user: '',
87
       user: '',
88
+      showAdmin: false,
89
     };
89
     };
90
   },
90
   },
91
   methods: {
91
   methods: {
99
     },
99
     },
100
   },
100
   },
101
   mounted() {
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
     this.getProperties(
112
     this.getProperties(
110
       Object.assign(
113
       Object.assign(
111
         {},
114
         {},
112
         {
115
         {
113
-          propertyType: this.propertyType,
116
+          propertyType: this.showAdmin ? 'Admin' : 'My',
114
           user: this.user,
117
           user: this.user,
115
         },
118
         },
116
       ),
119
       ),
118
   },
121
   },
119
   computed: {
122
   computed: {
120
     ...mapState('propertyList', ['properties']),
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
       this.getProperties(
132
       this.getProperties(
127
         Object.assign(
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
   watch: {
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 View File

127
                             name="MakeOffer"
127
                             name="MakeOffer"
128
                             :isMakeOffer="true"
128
                             :isMakeOffer="true"
129
                             :isProperty="true"
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
                         </div>
132
                         </div>
133
                       </div>
133
                       </div>

+ 26
- 10
src/components/property/propertySearchPage.vue View File

1
 <template>
1
 <template>
2
   <!-- eslint-disable max-len -->
2
   <!-- eslint-disable max-len -->
3
   <div class="container">
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
     <div class="container col-md-12" v-if="propertySearch.propertyUsageType === 'Residential'">
13
     <div class="container col-md-12" v-if="propertySearch.propertyUsageType === 'Residential'">
5
       <div class="col-sm-12">
14
       <div class="col-sm-12">
6
         <div class="about-img-box">
15
         <div class="about-img-box">
38
           </p>
47
           </p>
39
           <p>
48
           <p>
40
             Wish to RENT your property?
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
           </p>
51
           </p>
43
           <p>
52
           <p>
44
             Wish to SELL your property?
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
           </p>
55
           </p>
47
         </div>
56
         </div>
48
         <div class="col-md-4">
57
         <div class="col-md-4">
59
       <div>
68
       <div>
60
         <propertyCard v-if="properties.length > 0" name="propertyholder" :properties="properties" />
69
         <propertyCard v-if="properties.length > 0" name="propertyholder" :properties="properties" />
61
         <div v-if="properties.length === 0">
70
         <div v-if="properties.length === 0">
62
-          <img src="../../../public/img/no-homes.gif" />
71
+          <img src="../../../public/img/no-homes.png" />
63
           <br />
72
           <br />
64
           <br />
73
           <br />
65
           <p>Sorry no listing where found matching your search</p>
74
           <p>Sorry no listing where found matching your search</p>
103
           </p>
112
           </p>
104
           <p>
113
           <p>
105
             Wish to RENT your property?
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
           </p>
116
           </p>
108
           <p>
117
           <p>
109
             Wish to SELL your property?
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
           </p>
120
           </p>
112
         </div>
121
         </div>
113
         <div class="col-md-4">
122
         <div class="col-md-4">
124
       <div>
133
       <div>
125
         <propertyCard v-if="properties.length > 0" name="propertyholder" :properties="properties" />
134
         <propertyCard v-if="properties.length > 0" name="propertyholder" :properties="properties" />
126
         <div v-if="properties.length === 0">
135
         <div v-if="properties.length === 0">
127
-          <img src="../../../public/img/no-homes.gif" />
136
+          <img src="../../../public/img/no-homes.png" />
128
           <br />
137
           <br />
129
           <br />
138
           <br />
130
           <p>Sorry no listing where found matching your search</p>
139
           <p>Sorry no listing where found matching your search</p>
158
       },
167
       },
159
     };
168
     };
160
   },
169
   },
170
+  mounted() {
171
+    if (typeof this.propertySearch.propertyUsageType === 'undefined') {
172
+      this.propertySearch.propertyUsageType = 'Residential';
173
+    }
174
+  },
161
   methods: {
175
   methods: {
162
     ...mapActions('propertySearch', ['searchProperties']),
176
     ...mapActions('propertySearch', ['searchProperties']),
177
+    SetType(item) {
178
+      this.propertySearch.propertyUsageType = item;
179
+    },
163
   },
180
   },
164
   computed: {
181
   computed: {
165
     ...mapState('propertySearch', ['properties']),
182
     ...mapState('propertySearch', ['properties']),
166
     ParamsChanged() {
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
           // eslint-disable-next-line vue/no-side-effects-in-computed-properties
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
           // eslint-disable-next-line vue/no-side-effects-in-computed-properties
188
           // eslint-disable-next-line vue/no-side-effects-in-computed-properties
172
           this.propertySearch.keyword = 'All';
189
           this.propertySearch.keyword = 'All';
173
           // eslint-disable-next-line vue/no-side-effects-in-computed-properties
190
           // eslint-disable-next-line vue/no-side-effects-in-computed-properties
193
         // eslint-disable-next-line vue/no-side-effects-in-computed-properties
210
         // eslint-disable-next-line vue/no-side-effects-in-computed-properties
194
         this.propertySearch.keyword = 'All';
211
         this.propertySearch.keyword = 'All';
195
       }
212
       }
196
-
197
       this.searchProperties(this.propertySearch);
213
       this.searchProperties(this.propertySearch);
198
       return null;
214
       return null;
199
     },
215
     },

+ 48
- 16
src/components/property/propertyeditPage.vue View File

3
   <div>
3
   <div>
4
     <div class="container">
4
     <div class="container">
5
       <div class="col-sm-12">
5
       <div class="col-sm-12">
6
+        <br />
6
         <div class="tobuy-img-box">
7
         <div class="tobuy-img-box">
7
           <img
8
           <img
8
             v-if="propertyType === 'Commercial'"
9
             v-if="propertyType === 'Commercial'"
34
       <div class="row mb-3">
35
       <div class="row mb-3">
35
         <div class="container col-md-10" style="text-align:left">
36
         <div class="container col-md-10" style="text-align:left">
36
           <form id="mainForm">
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
             <div class="form-group row">
58
             <div class="form-group row">
38
               <div class="col-md-4">
59
               <div class="col-md-4">
39
                 <label>Property Type</label>
60
                 <label>Property Type</label>
240
             <div class="form-group row">
261
             <div class="form-group row">
241
               <div class="col-md-12">
262
               <div class="col-md-12">
242
                 <label for="Property Description">Description</label>
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
                 <br />
265
                 <br />
250
                 <p>* A listing fee of R380 including VAT is payable to list your Property on the Uni-Vate website</p>
266
                 <p>* A listing fee of R380 including VAT is payable to list your Property on the Uni-Vate website</p>
251
               </div>
267
               </div>
258
               :id="1"
274
               :id="1"
259
             ></UserField>
275
             ></UserField>
260
             <div class="form-group row" />
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
               <div class="row">
278
               <div class="row">
263
                 <div class="col-sm-12">
279
                 <div class="col-sm-12">
264
                   <div class="title-box-d">
280
                   <div class="title-box-d">
302
 
318
 
303
 <script>
319
 <script>
304
 import { mapState, mapActions } from 'vuex';
320
 import { mapState, mapActions } from 'vuex';
305
-import TextEditor from 'vue-trix';
321
+import { VueEditor } from 'vue2-editor';
306
 import { setTimeout } from 'timers';
322
 import { setTimeout } from 'timers';
307
 import UserField from './propertyUserField.vue';
323
 import UserField from './propertyUserField.vue';
308
 import ImageLoad from './propertyImage.vue';
324
 import ImageLoad from './propertyImage.vue';
312
   components: {
328
   components: {
313
     UserField,
329
     UserField,
314
     ImageLoad,
330
     ImageLoad,
315
-    TextEditor,
331
+    VueEditor,
316
   },
332
   },
317
   data() {
333
   data() {
318
     return {
334
     return {
324
       propertyFieldValues: [],
340
       propertyFieldValues: [],
325
       defaultImage: 0,
341
       defaultImage: 0,
326
       wait: false,
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
   methods: {
358
   methods: {
342
       'getPropertySavedFields',
371
       'getPropertySavedFields',
343
       'getSavedPropertyData',
372
       'getSavedPropertyData',
344
     ]),
373
     ]),
374
+    TypeChanged() {},
345
     SubmitData() {
375
     SubmitData() {
346
       this.wait = true;
376
       this.wait = true;
347
       if (this.salesType === 'Sale') {
377
       if (this.salesType === 'Sale') {
363
 
393
 
364
       setTimeout(
394
       setTimeout(
365
         () => this.$router.push({
395
         () => this.$router.push({
366
-            path: '/property/search',
396
+            path: '/property/Search',
367
             query: {
397
             query: {
368
               salesType: this.salesType,
398
               salesType: this.salesType,
369
               propertyUsageType: this.propertyType,
399
               propertyUsageType: this.propertyType,
434
       this.property.description = '';
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
     this.salesType = this.$route.params.saleType;
470
     this.salesType = this.$route.params.saleType;
439
 
471
 
440
-    this.getPropertyTypes(this.$route.params.propType);
472
+    this.getPropertyTypes(this.propertyType);
441
 
473
 
442
     this.getProvince();
474
     this.getProvince();
443
     if (this.$route.query.id) {
475
     if (this.$route.query.id) {
447
       );
479
       );
448
     } else {
480
     } else {
449
       this.getPropertyOverviewFields();
481
       this.getPropertyOverviewFields();
450
-      this.getPropertyFields(this.$route.params.propType);
482
+      this.getPropertyFields(this.propertyType);
451
     }
483
     }
452
     // if (this.$route.params.id) {
484
     // if (this.$route.params.id) {
453
     //   this.getPropertyEditDisplay(4); // (this.$route.params.id);
485
     //   this.getPropertyEditDisplay(4); // (this.$route.params.id);
483
     ]),
515
     ]),
484
     SalesTypeChanged() {
516
     SalesTypeChanged() {
485
       // eslint-disable-next-line vue/no-side-effects-in-computed-properties
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
       // eslint-disable-next-line vue/no-side-effects-in-computed-properties
519
       // eslint-disable-next-line vue/no-side-effects-in-computed-properties
488
       this.salesType = this.$route.params.saleType;
520
       this.salesType = this.$route.params.saleType;
489
       if (!this.$route.query.id) {
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
       return this.propertyType;
526
       return this.propertyType;

+ 31
- 39
src/components/shared/navBar.vue View File

17
           <span></span>
17
           <span></span>
18
           <span></span>
18
           <span></span>
19
         </button>
19
         </button>
20
-        <a class="navbar-brand text-brand" @click="routerGoTo('/')">
20
+        <div class="navbar-brand text-brand" style="cursor: pointer;" @click="routerGoTo('/')">
21
           <img
21
           <img
22
             class="img-fluid"
22
             class="img-fluid"
23
             src="/img/logos/UVProp.png"
23
             src="/img/logos/UVProp.png"
26
           />
26
           />
27
           Uni-Vate
27
           Uni-Vate
28
           <span class="color-b">Properties</span>
28
           <span class="color-b">Properties</span>
29
-        </a>
29
+        </div>
30
         <button
30
         <button
31
           type="button"
31
           type="button"
32
           class="btn btn-link nav-search navbar-toggle-box-collapse d-md-none"
32
           class="btn btn-link nav-search navbar-toggle-box-collapse d-md-none"
41
       <div class="col-md-8">
41
       <div class="col-md-8">
42
         <div class="navbar-collapse collapse justify-content-center" id="navbarDefault">
42
         <div class="navbar-collapse collapse justify-content-center" id="navbarDefault">
43
           <ul class="navbar-nav">
43
           <ul class="navbar-nav">
44
-            <!-- <li class="nav-item">
45
-            <a class="nav-link active" @click="routerGoTo('/')">Home</a>
46
-            </li>-->
47
             <li class="nav-item dropdown">
44
             <li class="nav-item dropdown">
48
               <a
45
               <a
49
                 class="nav-link dropdown-toggle"
46
                 class="nav-link dropdown-toggle"
61
                   @click="routerGoTo('/timeshare/sell')"
58
                   @click="routerGoTo('/timeshare/sell')"
62
                 >To Sell</a>
59
                 >To Sell</a>
63
                 <a class="dropdown-item cursor-pointer" @click="routerGoTo('/timeshare/faq')">FAQ</a>
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
               </div>
69
               </div>
71
             </li>
70
             </li>
72
             <li class="nav-item dropdown">
71
             <li class="nav-item dropdown">
82
               <div class="dropdown-menu" aria-labelledby="navbarDropdown">
81
               <div class="dropdown-menu" aria-labelledby="navbarDropdown">
83
                 <a
82
                 <a
84
                   class="dropdown-item cursor-pointer"
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
                 <a
86
                 <a
102
                   class="dropdown-item cursor-pointer"
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
                 <a
90
                 <a
111
-                  v-if="isLoggedIn"
112
                   class="dropdown-item cursor-pointer"
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
                 <a
95
                 <a
116
                   v-if="isLoggedIn"
96
                   v-if="isLoggedIn"
117
                   class="dropdown-item cursor-pointer"
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
               </div>
100
               </div>
121
             </li>
101
             </li>
122
 
102
 
274
   },
254
   },
275
 };
255
 };
276
 </script>
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 View File

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

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 View File

1
 <template>
1
 <template>
2
   <!-- eslint-disable max-len -->
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
       <div class="row">
5
       <div class="row">
10
         <div class="col-md-12 col-lg-8">
6
         <div class="col-md-12 col-lg-8">
11
           <div class="title-box-d">
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
           </div>
9
           </div>
14
           <br />
10
           <br />
15
         </div>
11
         </div>
16
         <div class="col-md-6 col-lg-6">
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
             </div>
63
             </div>
26
             <div
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
             </div>
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
           </div>
72
           </div>
123
         </div>
73
         </div>
124
-        <!-- </div>
125
-        </div>-->
126
       </div>
74
       </div>
127
     </div>
75
     </div>
128
-
76
+    <hr />
129
     <div class="myMargin">
77
     <div class="myMargin">
130
       <div class="row">
78
       <div class="row">
131
         <div class="col-md-4">
79
         <div class="col-md-4">
140
           </div>
88
           </div>
141
           {{description}}
89
           {{description}}
142
           <hr />
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
         </div>
91
         </div>
206
       </div>
92
       </div>
207
     </div>
93
     </div>
211
 import { mapState, mapActions } from 'vuex';
97
 import { mapState, mapActions } from 'vuex';
212
 import WeekList from '../buy/weekListComponent.vue';
98
 import WeekList from '../buy/weekListComponent.vue';
213
 import FilterComponent from '../searchTimeshare.vue';
99
 import FilterComponent from '../searchTimeshare.vue';
100
+import ResortImages from './resortImage.vue';
214
 
101
 
215
 export default {
102
 export default {
216
   props: {
103
   props: {
217
     resortCode: {},
104
     resortCode: {},
218
   },
105
   },
219
-  data() {
220
-    return {
221
-      largeImg: undefined,
222
-    };
223
-  },
224
   components: {
106
   components: {
225
     WeekList,
107
     WeekList,
226
     FilterComponent,
108
     FilterComponent,
109
+    ResortImages,
227
   },
110
   },
228
   mounted() {
111
   mounted() {
229
     this.initResort(this.resortCode);
112
     this.initResort(this.resortCode);
230
-    this.largeImg = this.image1;
231
   },
113
   },
232
   computed: {
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
     mapUrl() {
116
     mapUrl() {
243
       return this.resort
117
       return this.resort
244
         ? `http://maps.google.com/maps?q=${this.resort.prLatitude},${this.resort.prLongitude}&z=15&output=embed`
118
         ? `http://maps.google.com/maps?q=${this.resort.prLatitude},${this.resort.prLongitude}&z=15&output=embed`
250
     routerGoTo(goto) {
124
     routerGoTo(goto) {
251
       this.$router.push(goto);
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
 </script>
129
 </script>
269
 <style scoped>
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
 .myMargin {
154
 .myMargin {
271
   margin-left: 2%;
155
   margin-left: 2%;
272
   margin-right: 2%;
156
   margin-right: 2%;

+ 140
- 138
src/components/timeshare/resort/unitPage.vue View File

1
 <template>
1
 <template>
2
   <!-- eslint-disable max-len -->
2
   <!-- eslint-disable max-len -->
3
-  <div class="container">
3
+  <div class="my-container my-top">
4
     <div class="row">
4
     <div class="row">
5
       <div class="col-md-12 col-lg-8">
5
       <div class="col-md-12 col-lg-8">
6
         <div class="title-box-d">
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
         </div>
8
         </div>
12
         <br />
9
         <br />
13
       </div>
10
       </div>
14
       <div class="row mb-4">
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
         <div class="col-md-6">
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
         </div>
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
                   </div>
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
                 </div>
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
                   </div>
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
                 </div>
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
                   </div>
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
                 </div>
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
                     </div>
91
                     </div>
121
                   </div>
92
                   </div>
122
                 </div>
93
                 </div>
123
               </div>
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
                       </div>
124
                       </div>
155
                     </div>
125
                     </div>
156
                   </div>
126
                   </div>
157
                 </div>
127
                 </div>
158
               </div>
128
               </div>
159
             </div>
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
           </div>
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
         </div>
154
         </div>
162
       </div>
155
       </div>
163
     </div>
156
     </div>
167
 <script>
160
 <script>
168
 import { mapState, mapActions } from 'vuex';
161
 import { mapState, mapActions } from 'vuex';
169
 import makeOffer from '../../processFlow/makeOffer.vue';
162
 import makeOffer from '../../processFlow/makeOffer.vue';
163
+import ResortImages from './resortImage.vue';
170
 
164
 
171
 export default {
165
 export default {
172
   name: 'unit',
166
   name: 'unit',
173
   components: {
167
   components: {
174
     makeOffer,
168
     makeOffer,
169
+    ResortImages,
175
   },
170
   },
176
   props: {
171
   props: {
177
     resortCode: {},
172
     resortCode: {},
182
     this.initWeek(this.weekId);
177
     this.initWeek(this.weekId);
183
   },
178
   },
184
   computed: {
179
   computed: {
185
-    ...mapState('resort', [
186
-      'resort',
187
-      'description',
188
-      'image1',
189
-      'image2',
190
-      'image3',
191
-    ]),
180
+    ...mapState('resort', ['resort', 'description', 'images']),
192
     ...mapState('week', ['week']),
181
     ...mapState('week', ['week']),
193
   },
182
   },
194
   methods: {
183
   methods: {
205
 };
194
 };
206
 </script>
195
 </script>
207
 <style scoped>
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
 .btn.btn-b-c {
208
 .btn.btn-b-c {
209
   background-color: #ffffff;
209
   background-color: #ffffff;
210
   color: #60cbeb;
210
   color: #60cbeb;
215
   color: #ffffff;
215
   color: #ffffff;
216
 }
216
 }
217
 .price-border {
217
 .price-border {
218
+  background-color: #a9e0ff;
219
+  width: 100%;
218
   border: solid #60cbeb medium;
220
   border: solid #60cbeb medium;
219
   padding: 0px 20px;
221
   padding: 0px 20px;
220
 }
222
 }

+ 2
- 2
src/components/timeshare/searchTimeshare.vue View File

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

+ 7
- 2
src/components/timeshare/sell/sellPage.vue View File

489
           <br />
489
           <br />
490
           <br />
490
           <br />
491
           <p style="text-align:center;">
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
           </p>
499
           </p>
495
         </form>
500
         </form>
496
       </div>
501
       </div>

+ 27
- 25
src/components/user/loginPage.vue View File

3
     <!-- eslint-disable max-len -->
3
     <!-- eslint-disable max-len -->
4
     <div class="login-page">
4
     <div class="login-page">
5
       <form id="signIn">
5
       <form id="signIn">
6
-        <div class="form">
6
+        <div class="form col-md-12">
7
           <div>
7
           <div>
8
             <h4>Login</h4>
8
             <h4>Login</h4>
9
           </div>
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
           <div v-if="this.$store.state.authentication.status === 'error'">
20
           <div v-if="this.$store.state.authentication.status === 'error'">
11
             <alert
21
             <alert
12
               :text="'User doesn\'t exist or Username and Password is incorrect'"
22
               :text="'User doesn\'t exist or Username and Password is incorrect'"
14
             />
24
             />
15
           </div>
25
           </div>
16
           <div class="row">
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
               <div class="input-group mb-3">
28
               <div class="input-group mb-3">
19
                 <div class="input-group-prepend">
29
                 <div class="input-group-prepend">
20
                   <span class="input-group-text">
30
                   <span class="input-group-text">
59
               </div>
69
               </div>
60
             </div>
70
             </div>
61
           </div>
71
           </div>
62
-          <div class="form-group row"></div>
63
           <button @click="Login()" class="btn btn-b-n" type="submit">Sign In</button>
72
           <button @click="Login()" class="btn btn-b-n" type="submit">Sign In</button>
64
           <hr />
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
             <!-- <alert :text="'Username & password request email sent'" :type="'SUCCESS'" /> -->
81
             <!-- <alert :text="'Username & password request email sent'" :type="'SUCCESS'" /> -->
84
             <div class="row">
82
             <div class="row">
85
               <div class="input-group-prepend">
83
               <div class="input-group-prepend">
89
                 <input class="form-control" placeholder="Your Email" type="text" name="email" value />
87
                 <input class="form-control" placeholder="Your Email" type="text" name="email" value />
90
               </div>
88
               </div>
91
             </div>
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
           </div>
92
           </div>
97
         </div>
93
         </div>
98
       </form>
94
       </form>
119
       text: '',
115
       text: '',
120
       showPassword: false,
116
       showPassword: false,
121
       email: '',
117
       email: '',
118
+      troubleToggle: false,
122
     };
119
     };
123
   },
120
   },
124
   computed: {
121
   computed: {
126
   },
123
   },
127
   methods: {
124
   methods: {
128
     ...mapActions('authentication', ['login', 'init']),
125
     ...mapActions('authentication', ['login', 'init']),
126
+    ToggleTrouble() {
127
+      if (this.troubleToggle) {
128
+        this.troubleToggle = false;
129
+      } else this.troubleToggle = true;
130
+    },
129
     Login() {
131
     Login() {
130
       this.login().then(() => {
132
       this.login().then(() => {
131
         if (this.$store.state.authentication.status === 'error') {
133
         if (this.$store.state.authentication.status === 'error') {

+ 9
- 3
src/router/index.js View File

48
 Vue.use(Router);
48
 Vue.use(Router);
49
 
49
 
50
 export default new Router({
50
 export default new Router({
51
+  // eslint-disable-next-line no-unused-vars
51
   scrollBehavior(to, from, savedPosition) {
52
   scrollBehavior(to, from, savedPosition) {
52
     return {
53
     return {
53
       x: 0,
54
       x: 0,
126
       component: PropertySearch,
127
       component: PropertySearch,
127
     },
128
     },
128
     {
129
     {
129
-      path: '/property/:propType/:saleType',
130
+      path: '/property/new/:saleType',
130
       name: 'PropertyNew',
131
       name: 'PropertyNew',
131
       component: PropertyEdit,
132
       component: PropertyEdit,
132
     },
133
     },
134
+    {
135
+      path: '/property/new/:propertyUsageType/:saleType',
136
+      name: 'PropertyNewFromSearch',
137
+      component: PropertyEdit,
138
+    },
133
     {
139
     {
134
       path: '/property/edit/:id/:propType/:saleType',
140
       path: '/property/edit/:id/:propType/:saleType',
135
       name: 'PropertyEdit',
141
       name: 'PropertyEdit',
136
       component: PropertyEdit,
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
       component: PropertyList,
147
       component: PropertyList,
142
     },
148
     },
143
     {
149
     {

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

13
   getters: {},
13
   getters: {},
14
   actions: {
14
   actions: {
15
     getProperties({ commit }, item) {
15
     getProperties({ commit }, item) {
16
+      console.log(`/api/property/${item.propertyType}/${item.user}`);
16
       axios
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
         .then(result => commit('setProperties', result.data))
19
         .then(result => commit('setProperties', result.data))
19
         .catch(console.error);
20
         .catch(console.error);
20
     },
21
     },

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

35
       state.propertySearch[filter] = 'All';
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
   actions: {
38
   actions: {
95
     clearFilter({ commit }, filter) {
39
     clearFilter({ commit }, filter) {
96
       commit('onClearFilter', filter);
40
       commit('onClearFilter', filter);

+ 38
- 32
src/store/modules/timeshare/resort.js View File

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

+ 1
- 1
vue.config.js View File

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

Loading…
Cancel
Save