Bladeren bron

weekPage

master
Kobus 5 jaren geleden
bovenliggende
commit
034469a434
4 gewijzigde bestanden met toevoegingen van 204 en 0 verwijderingen
  1. 153
    0
      src/components/timeshare/resort/unitPage.vue
  2. 7
    0
      src/router/index.js
  3. 2
    0
      src/store/index.js
  4. 42
    0
      src/store/modules/timeshare/week.js

+ 153
- 0
src/components/timeshare/resort/unitPage.vue Bestand weergeven

@@ -0,0 +1,153 @@
1
+<template>
2
+  <div class="container">
3
+    <div class="row mb-4">
4
+      <div class="col-md-12">
5
+        <h1 class="my-4">{{resort.prName}}</h1>
6
+      </div>
7
+      <div class="col-md-6">
8
+        <p>{{description}}</p>
9
+      </div>
10
+      <div class="col-md-6">
11
+        <form
12
+          id="mainForm"
13
+          method="POST"
14
+          action="/interested-timeshare/"
15
+          accept-charset="UTF-8"
16
+          enctype="multipart/form-data"
17
+        >
18
+          <div class="form-row">
19
+            <div class="col-md-6">
20
+              <label for="resortName">Unit</label>
21
+              <input
22
+                class="form-control"
23
+                type="text"
24
+                id="resort"
25
+                name="resortName"
26
+                :value="week.unit"
27
+                disabled
28
+              />
29
+            </div>
30
+            <div class="col-md-6">
31
+              <label for="resortWeek">Week</label>
32
+              <input
33
+                class="form-control"
34
+                type="text"
35
+                id="week"
36
+                name="resortWeek"
37
+                :value="week.week"
38
+                disabled
39
+              />
40
+            </div>
41
+          </div>
42
+          <div class="form-row">
43
+            <div class="col-md-6">
44
+              <label for="resortModule">Module</label>
45
+              <input
46
+                class="form-control"
47
+                type="text"
48
+                id="module"
49
+                name="resortModule"
50
+                :value="week.module"
51
+                disabled
52
+              />
53
+            </div>
54
+            <div class="col-md-6">
55
+              <label for="price">Price</label>
56
+              <input
57
+                class="form-control"
58
+                type="text"
59
+                name="price"
60
+                id="price"
61
+                :value="'R ' + week.price"
62
+                disabled
63
+              />
64
+            </div>
65
+          </div>
66
+          <div class="form-row">
67
+            <div class="col-md-6">
68
+              <label for="resortModule">Current Year Levy</label>
69
+              <input
70
+                class="form-control"
71
+                type="text"
72
+                id="levy"
73
+                name="levy"
74
+                :value="'R ' + week.currentLevy"
75
+                disabled
76
+              />
77
+            </div>
78
+          </div>
79
+          <div class="form-row">
80
+            <div class="col-md-12">
81
+              <input class="form-control" type="text" name="name" placeholder="Name" />
82
+            </div>
83
+          </div>
84
+          <div class="form-row">
85
+            <div class="col-md-12">
86
+              <input class="form-control" type="text" name="mobile" placeholder="Contact Number" />
87
+            </div>
88
+          </div>
89
+          <div class="form-row">
90
+            <div class="col-md-12">
91
+              <input class="form-control" type="email" name="email" placeholder="Email" />
92
+            </div>
93
+          </div>
94
+
95
+          <button class="btn btn-blue even-width mr-auto" type="submit">ENQUIRE NOW</button>
96
+
97
+          <a
98
+            class="btn btn-blue even-width mr-auto"
99
+            href="/share-transfer-initiation-for-purchaser/"
100
+          >MAKE AN OFFER</a>
101
+          <a
102
+            class="btn btn-blue even-width mr-auto"
103
+            href="#"
104
+            data-toggle="modal"
105
+            data-target="#loginOrRegister"
106
+          >MAKE AN OFFER</a>
107
+
108
+          <a class="btn btn-blue even-width mr-auto" href="javascript:history.back()">BACK</a>
109
+        </form>
110
+      </div>
111
+    </div>
112
+    <div class="row mb-4">
113
+      <div class="col-md-4">
114
+        <img class="img-fluid" :src="image1" alt="Resort Image" />
115
+      </div>
116
+      <div class="col-md-4">
117
+        <img class="img-fluid" :src="image2" alt="Resort Image" />
118
+      </div>
119
+      <div class="col-md-4">
120
+        <img class="img-fluid" :src="image3" alt="Resort Image" />
121
+      </div>
122
+    </div>
123
+  </div>
124
+</template>
125
+
126
+<script>
127
+import { mapState, mapActions } from 'vuex';
128
+
129
+export default {
130
+  props: {
131
+    resortCode: {},
132
+    weekId: {},
133
+  },
134
+  mounted() {
135
+    this.initResort(this.resortCode);
136
+    this.initWeek(this.weekId);
137
+  },
138
+  computed: {
139
+    ...mapState('resort', [
140
+      'resort',
141
+      'description',
142
+      'image1',
143
+      'image2',
144
+      'image3',
145
+    ]),
146
+    ...mapState('week', ['week', 'contactDetails']),
147
+  },
148
+  methods: {
149
+    ...mapActions('resort', ['initResort']),
150
+    ...mapActions('week', ['initWeek']),
151
+  },
152
+};
153
+</script>

+ 7
- 0
src/router/index.js Bestand weergeven

@@ -22,6 +22,7 @@ import Status from '../components/admin/status/statusPage.vue';
22 22
 import UnitConfiguration from '../components/admin/unitConfiguration/unitConfigurationPage.vue';
23 23
 
24 24
 import ResortPage from '../components/timeshare/resort/resortPage.vue';
25
+import UnitPage from '../components/timeshare/resort/unitPage.vue';
25 26
 
26 27
 import ContactUs from '../components/misc/contactUs.vue';
27 28
 
@@ -114,5 +115,11 @@ export default new Router({
114 115
     component: ResortPage,
115 116
     props: true,
116 117
   },
118
+  {
119
+    path: '/resort/:resortCode/:weekId',
120
+    name: 'UnitPage',
121
+    component: UnitPage,
122
+    props: true,
123
+  },
117 124
   ],
118 125
 });

+ 2
- 0
src/store/index.js Bestand weergeven

@@ -8,6 +8,7 @@ import UnitConfigurationModule from './modules/timeshare/unitConfiguration';
8 8
 import TimeshareBuyModule from './modules/timeshare/buyPage';
9 9
 import SearchTabModule from './modules/searchTab';
10 10
 import ResortModule from './modules/timeshare/resort';
11
+import WeekModule from './modules/timeshare/week';
11 12
 
12 13
 Vue.use(Vuex);
13 14
 /* eslint no-param-reassign: ["error", { "props": false }] */
@@ -20,5 +21,6 @@ export default new Vuex.Store({
20 21
     timeshareBuy: TimeshareBuyModule,
21 22
     searchTab: SearchTabModule,
22 23
     resort: ResortModule,
24
+    week: WeekModule,
23 25
   },
24 26
 });

+ 42
- 0
src/store/modules/timeshare/week.js Bestand weergeven

@@ -0,0 +1,42 @@
1
+/* eslint-disable no-restricted-syntax */
2
+/* eslint-disable guard-for-in */
3
+import axios from 'axios';
4
+
5
+export default {
6
+  namespaced: true,
7
+  state: {
8
+    week: {
9
+      id: '',
10
+      unit: '',
11
+      week: '',
12
+      module: '',
13
+      price: '',
14
+      currentLevy: '',
15
+    },
16
+    contactDetails: {
17
+      name: '',
18
+      number: '',
19
+      email: '',
20
+    },
21
+  },
22
+  mutations: {
23
+    setWeek(state, week) {
24
+      state.week = week;
25
+    },
26
+  },
27
+  getters: {},
28
+  actions: {
29
+    initWeek({
30
+      commit,
31
+    }, weekId) {
32
+      commit('setWeek', {
33
+        id: weekId,
34
+        unit: '359',
35
+        week: 'N18',
36
+        module: '359/N18 River View',
37
+        price: 85000,
38
+        currentLevy: 5455,
39
+      });
40
+    },
41
+  },
42
+};

Laden…
Annuleren
Opslaan