Browse Source

Univate.2 > Additions to buy Timeshare

master
George Williams 4 years ago
parent
commit
f86f37025e

BIN
public/img/apple-touch-icon.png View File


BIN
public/img/icons/Walking.png View File


BIN
public/img/icons/YouTube.png View File


BIN
public/img/icons/facebook.png View File


BIN
public/img/icons/twitter.png View File


BIN
public/img/icons/www.png View File


+ 61
- 0
src/components/timeshare/resort/unit/media.vue View File

1
+<template>
2
+  <div class="container">
3
+    <div class="row justify-content-md-center">
4
+      <div v-for="(media, i) in resortMedia" :key="i">
5
+        <div v-if="media.prCategory === 'Facebook'">
6
+          <a :href="`${media.prSite}`" target="_blank">
7
+            <img src="../../../../../public/img/icons/facebook.png" class="img_media" />
8
+          </a>
9
+        </div>
10
+        <div v-if="media.prCategory === 'Twitter'">
11
+          <a :href="`${media.prSite}`" target="_blank">
12
+            <img src="../../../../../public/img/icons/twitter.png" class="img_media" />
13
+          </a>
14
+        </div>
15
+        <div v-if="media.prCategory === 'YouTube'">
16
+          <a :href="`${media.prSite}`" target="_blank">
17
+            <img src="../../../../../public/img/icons/YouTube.png" class="img_media" />
18
+          </a>
19
+        </div>
20
+        <div v-if="media.prCategory === 'Website'">
21
+          <a :href="`${media.prSite}`" target="_blank">
22
+            <img src="../../../../../public/img/icons/www.png" class="img_media" />
23
+          </a>
24
+        </div>
25
+        <div v-if="media.prCategory === 'WalkThrough'">
26
+          <a :href="`${media.prSite}`" target="_blank">
27
+            <img src="../../../../../public/img/icons/Walking.png" class="img_media" />
28
+          </a>
29
+        </div>
30
+      </div>
31
+    </div>
32
+  </div>
33
+</template>
34
+
35
+<script>
36
+import { mapState, mapActions } from "vuex";
37
+
38
+export default {
39
+  name: "resortMedia",
40
+  props: {
41
+    resortCode: ""
42
+  },
43
+  methods: {
44
+    ...mapActions("resort", ["getResortMedia"])
45
+  },
46
+  computed: {
47
+    ...mapState("resort", ["resortMedia"])
48
+  },
49
+  mounted() {
50
+    this.getResortMedia(this.resortCode);
51
+  }
52
+};
53
+</script>
54
+
55
+<style lang="scss" scoped>
56
+.img_media {
57
+  height: 100px;
58
+  width: 100px;
59
+  margin: 10px;
60
+}
61
+</style>

+ 8
- 10
src/components/timeshare/resort/unit/summarySection.vue View File

14
       <div class="col-md-12 col-lg-8 summarySection">
14
       <div class="col-md-12 col-lg-8 summarySection">
15
         <h4>
15
         <h4>
16
           Unit {{ week ? week.unitNumber : "" }} | {{ week ? week.bedrooms : "" }} Bedroom/{{
16
           Unit {{ week ? week.unitNumber : "" }} | {{ week ? week.bedrooms : "" }} Bedroom/{{
17
-            week ? week.maxSleep : ""
17
+          week ? week.maxSleep : ""
18
           }}
18
           }}
19
           Sleeper
19
           Sleeper
20
         </h4>
20
         </h4>
54
               style="color:white"
54
               style="color:white"
55
               data-toggle="modal"
55
               data-toggle="modal"
56
               data-target="#myModal"
56
               data-target="#myModal"
57
-            >
58
-              Make an Offer
59
-            </button>
57
+            >Make an Offer</button>
60
             <div class="col-md-12">
58
             <div class="col-md-12">
61
               <div id="myModal" class="modal fade" role="dialog">
59
               <div id="myModal" class="modal fade" role="dialog">
62
                 <div class="modal-dialog modal-lg">
60
                 <div class="modal-dialog modal-lg">
92
 export default {
90
 export default {
93
   components: {
91
   components: {
94
     makeOffer,
92
     makeOffer,
95
-    gallerySection
93
+    gallerySection,
96
   },
94
   },
97
   computed: {
95
   computed: {
98
     ...mapState("resort", ["resort", "description", "images", "layout"]),
96
     ...mapState("resort", ["resort", "description", "images", "layout"]),
99
 
97
 
100
     ...mapGetters({
98
     ...mapGetters({
101
-      weekById: "weekList/weekById"
99
+      weekById: "weekList/weekById",
102
     }),
100
     }),
103
     week() {
101
     week() {
104
       return this.weekById(this.resortCode, this.unitNumber);
102
       return this.weekById(this.resortCode, this.unitNumber);
105
-    }
103
+    },
106
     // ...mapState('week', ['currentWeek']),
104
     // ...mapState('week', ['currentWeek']),
107
   },
105
   },
108
   props: {
106
   props: {
109
     resortCode: {},
107
     resortCode: {},
110
-    unitNumber: {}
108
+    unitNumber: {},
111
   },
109
   },
112
   methods: {
110
   methods: {
113
     ...mapActions("weekList", ["getWeeks", "applyResortFilter"]),
111
     ...mapActions("weekList", ["getWeeks", "applyResortFilter"]),
119
         return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
117
         return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
120
       }
118
       }
121
       return "";
119
       return "";
122
-    }
123
-  }
120
+    },
121
+  },
124
 };
122
 };
125
 </script>
123
 </script>
126
 
124
 

+ 15
- 9
src/components/timeshare/resort/unit/tabSection.vue View File

10
           role="tab"
10
           role="tab"
11
           aria-controls="home"
11
           aria-controls="home"
12
           aria-selected="true"
12
           aria-selected="true"
13
-          ><h2>Facilities</h2>
13
+        >
14
+          <h2>Facilities</h2>
14
         </a>
15
         </a>
15
       </li>
16
       </li>
16
       <li class="nav-item">
17
       <li class="nav-item">
22
           role="tab"
23
           role="tab"
23
           aria-controls="profile"
24
           aria-controls="profile"
24
           aria-selected="false"
25
           aria-selected="false"
25
-          ><h2>Directions</h2>
26
+        >
27
+          <h2>Directions</h2>
26
         </a>
28
         </a>
27
       </li>
29
       </li>
28
       <li class="nav-item">
30
       <li class="nav-item">
34
           role="tab"
36
           role="tab"
35
           aria-controls="contact"
37
           aria-controls="contact"
36
           aria-selected="false"
38
           aria-selected="false"
37
-          ><h2>Layout</h2>
39
+        >
40
+          <h2>Layout</h2>
38
         </a>
41
         </a>
39
       </li>
42
       </li>
40
       <li class="nav-item">
43
       <li class="nav-item">
46
           role="tab"
49
           role="tab"
47
           aria-controls="contact"
50
           aria-controls="contact"
48
           aria-selected="false"
51
           aria-selected="false"
49
-          ><h2>Media</h2>
52
+        >
53
+          <h2>Media</h2>
50
         </a>
54
         </a>
51
       </li>
55
       </li>
52
     </ul>
56
     </ul>
67
         <gallery :images="layoutImages" :index="index" @close="index = null"></gallery>
71
         <gallery :images="layoutImages" :index="index" @close="index = null"></gallery>
68
       </div>
72
       </div>
69
       <div class="tab-pane fade" id="media" role="tabpanel" aria-labelledby="contact-tab">
73
       <div class="tab-pane fade" id="media" role="tabpanel" aria-labelledby="contact-tab">
70
-        ...
74
+        <media :resortCode="resortCode" />
71
       </div>
75
       </div>
72
     </div>
76
     </div>
73
   </div>
77
   </div>
80
 import gallery from "../../../shared/gallerySlideShow";
84
 import gallery from "../../../shared/gallerySlideShow";
81
 import AOS from "aos";
85
 import AOS from "aos";
82
 import "aos/dist/aos.css";
86
 import "aos/dist/aos.css";
87
+import media from "./media";
83
 
88
 
84
 export default {
89
 export default {
85
   components: {
90
   components: {
86
     facilities,
91
     facilities,
87
     directions,
92
     directions,
88
-    gallery
93
+    gallery,
94
+    media,
89
   },
95
   },
90
   created() {
96
   created() {
91
     AOS.init();
97
     AOS.init();
92
   },
98
   },
93
   data() {
99
   data() {
94
     return {
100
     return {
95
-      index: null
101
+      index: null,
96
     };
102
     };
97
   },
103
   },
98
   props: {
104
   props: {
99
     resortCode: {},
105
     resortCode: {},
100
     resortCoords: {},
106
     resortCoords: {},
101
     layoutImages: {},
107
     layoutImages: {},
102
-    resortName: ""
103
-  }
108
+    resortName: "",
109
+  },
104
 };
110
 };
105
 </script>
111
 </script>
106
 
112
 

+ 6
- 6
src/components/timeshare/resort/unit/unitPage.vue View File

32
     gallerySection,
32
     gallerySection,
33
     tabSection,
33
     tabSection,
34
     summarySection,
34
     summarySection,
35
-    carouselSection
35
+    carouselSection,
36
   },
36
   },
37
   props: {
37
   props: {
38
     resortCode: {},
38
     resortCode: {},
39
-    unitNumber: {}
39
+    unitNumber: {},
40
   },
40
   },
41
   mounted() {
41
   mounted() {
42
     this.initResort(this.resortCode);
42
     this.initResort(this.resortCode);
51
     ...mapState("resort", ["resort", "description", "images", "layout"]),
51
     ...mapState("resort", ["resort", "description", "images", "layout"]),
52
 
52
 
53
     ...mapGetters({
53
     ...mapGetters({
54
-      weekById: "weekList/weekById"
54
+      weekById: "weekList/weekById",
55
     }),
55
     }),
56
     week() {
56
     week() {
57
       return this.weekById(this.resortCode, this.unitNumber);
57
       return this.weekById(this.resortCode, this.unitNumber);
60
       var layouts = [];
60
       var layouts = [];
61
       layouts.push(this.layout);
61
       layouts.push(this.layout);
62
       return layouts;
62
       return layouts;
63
-    }
63
+    },
64
     // ...mapState('week', ['currentWeek']),
64
     // ...mapState('week', ['currentWeek']),
65
   },
65
   },
66
   methods: {
66
   methods: {
73
         return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
73
         return val.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
74
       }
74
       }
75
       return "";
75
       return "";
76
-    }
77
-  }
76
+    },
77
+  },
78
 };
78
 };
79
 </script>
79
 </script>
80
 
80
 

+ 12
- 1
src/store/modules/timeshare/resort.js View File

9
     resort: {},
9
     resort: {},
10
     images: [],
10
     images: [],
11
     layout: "",
11
     layout: "",
12
-    description: ""
12
+    description: "",
13
+    resortMedia: undefined
13
   },
14
   },
14
   mutations: {
15
   mutations: {
15
     setResort(state, resort) {
16
     setResort(state, resort) {
31
     },
32
     },
32
     setResorts(state, list) {
33
     setResorts(state, list) {
33
       state.resorts = list;
34
       state.resorts = list;
35
+    },
36
+    setResortMedia(state, media) {
37
+      state.resortMedia = media;
34
     }
38
     }
35
   },
39
   },
36
   getters: {},
40
   getters: {},
123
           })
127
           })
124
           .catch(error => reject(new Error(error.message)));
128
           .catch(error => reject(new Error(error.message)));
125
       });
129
       });
130
+    },
131
+    getResortMedia({ commit }, resortCode) {
132
+      axios
133
+        .get(
134
+          `https://www.tradeunipoint.com/unibackend/seam/resource/rest/products/social/${resortCode}`
135
+        )
136
+        .then(result => commit("setResortMedia", result.data));
126
     }
137
     }
127
   }
138
   }
128
 };
139
 };

Loading…
Cancel
Save