Parcourir la source

Terms and Conditions

master
30117125 il y a 4 ans
Parent
révision
6ebad6c276

+ 78
- 0
src/components/admin/misc/termsConditions.vue Voir le fichier

@@ -0,0 +1,78 @@
1
+<template>
2
+  <main id="main" style="padding-bottom:50px">
3
+    <div class="container">
4
+      <div class="row">
5
+        <div class="col">
6
+          <div class="section-header">
7
+            <h2>Terms And Conditions</h2>
8
+          </div>
9
+        </div>
10
+      </div>
11
+      <div class="row">
12
+        <div class="col-md-6">
13
+          <label for="version" class="uniSelectLabel">Version:</label>
14
+          <input name="version" type="text" v-model="version" class="mt-5 mb-3 ml-2" />
15
+        </div>
16
+        <div class="col-md-6 mt-5">
17
+          <p style="float:right">Last Modified: {{ terms.modified | toDate }}</p>
18
+        </div>
19
+      </div>
20
+      <div class="row">
21
+        <div class="col">
22
+          <vue-editor v-model="termsInput" :editor-toolbar="customToolbar" />
23
+          <button @click="saveTerms()" class="btn-solid-blue">Save</button>
24
+        </div>
25
+      </div>
26
+    </div>
27
+  </main>
28
+</template>
29
+
30
+<script>
31
+/* eslint-disable */
32
+import { VueEditor } from "vue2-editor";
33
+import { mapActions, mapGetters, mapState } from "vuex";
34
+
35
+export default {
36
+  components: {
37
+    VueEditor
38
+  },
39
+  data() {
40
+    return {
41
+      termsInput: "",
42
+      version: "",
43
+      customToolbar: [
44
+        [{ header: [false, 1, 2, 3, 4, 5, 6] }],
45
+        ["bold", "italic", "underline", "strike"],
46
+        [{ align: "" }, { align: "center" }, { align: "right" }, { align: "justify" }],
47
+        [{ list: "ordered" }, { list: "bullet" }, { list: "check" }],
48
+        [{ script: "sub" }, { script: "super" }],
49
+        [{ indent: "-1" }, { indent: "+1" }]
50
+      ]
51
+    };
52
+  },
53
+  mounted() {
54
+    this.populateTerms();
55
+  },
56
+  methods: {
57
+    ...mapActions("termsConditions", ["setTerms", "retrieveTerms"]),
58
+    saveTerms() {
59
+      var termsObj = {
60
+        termsConditions: this.termsInput,
61
+        version: this.version
62
+      };
63
+      this.setTerms(termsObj);
64
+    },
65
+    async populateTerms() {
66
+      await this.retrieveTerms();
67
+      this.version = this.terms.version;
68
+      this.termsInput = this.terms.termsConditions;
69
+    }
70
+  },
71
+  computed: {
72
+    ...mapGetters("termsConditions", ["getTermsAndConditions"]),
73
+    ...mapState("termsConditions", ["terms"])
74
+  }
75
+};
76
+</script>
77
+
78
+<style lang="scss" scoped></style>

+ 0
- 0
src/components/misc/TermsConditions/carouselSection.vue Voir le fichier


+ 38
- 0
src/components/misc/TermsConditions/contentSection.vue Voir le fichier

@@ -0,0 +1,38 @@
1
+<template>
2
+  <div class="container">
3
+    <div class="row">
4
+      <div class="col">
5
+        <div class="section-header">
6
+          <h2>Terms & Conditions</h2>
7
+        </div>
8
+      </div>
9
+    </div>
10
+    <div class="row">
11
+      <div class="col">
12
+        <div v-html="terms.termsConditions"></div>
13
+      </div>
14
+    </div>
15
+  </div>
16
+</template>
17
+
18
+<script>
19
+/* eslint-disable */
20
+import { mapActions, mapGetters, mapState } from "vuex";
21
+export default {
22
+  mounted() {
23
+    this.populateTerms();
24
+  },
25
+  methods: {
26
+    ...mapActions("termsConditions", ["retrieveTerms"]),
27
+    async populateTerms() {
28
+      await this.retrieveTerms();
29
+    }
30
+  },
31
+  computed: {
32
+    ...mapGetters("termsConditions", ["getTermsAndConditions"]),
33
+    ...mapState("termsConditions", ["terms"])
34
+  }
35
+};
36
+</script>
37
+
38
+<style lang="scss" scoped></style>

+ 23
- 0
src/components/misc/TermsConditions/termsConditions.vue Voir le fichier

@@ -0,0 +1,23 @@
1
+<template>
2
+  <div>
3
+    <carouselSection />
4
+    <main id="main">
5
+      <contentSection />
6
+    </main>
7
+  </div>
8
+</template>
9
+
10
+<script>
11
+/* eslint-disable */
12
+
13
+import carouselSection from "./carouselSection";
14
+import contentSection from "./contentSection";
15
+export default {
16
+  components: {
17
+    carouselSection,
18
+    contentSection
19
+  }
20
+};
21
+</script>
22
+
23
+<style lang="scss" scoped></style>

+ 19
- 8
src/components/property/commercial/singleView/contentSection.vue Voir le fichier

@@ -5,6 +5,7 @@
5 5
         <div class="col-md-4">
6 6
           <div class="resPortfolioSection" style="margin-top:-5px">
7 7
             <iframe
8
+              v-if="property.video !== null"
8 9
               width="100%"
9 10
               src="https://www.youtube.com/embed/watch_popup?v=qKgHJYzWtVA"
10 11
               frameborder="0"
@@ -37,12 +38,19 @@
37 38
             <h2>Property Detial</h2>
38 39
             <p v-if="property.showAddress">{{ property.streetNumber }} {{ property.streetName }}</p>
39 40
             <p>{{ property.city }}, {{ property.suburb }}</p>
40
-            <div v-for="field in property.displayData[0].values" :key="field.id">
41
+            <div v-if="property.displayData.length > 0">
42
+              <div v-for="(data, i) in property.displayData" :key="i">
43
+                <div v-for="field in data.values" :key="field.id">
44
+                  <p v-if="field.name === 'Floor Size'">{{ field.value }}M<sup>2</sup></p>
45
+                </div>
46
+              </div>
47
+            </div>
48
+            <!-- <div v-for="field in property.displayData[0].values" :key="field.id">
41 49
               <p v-if="field.name === 'Floor Size'">{{ field.value }}M<sup>2</sup></p>
42 50
               <p v-if="field.name === 'Rates & Taxes'">
43 51
                 Rates & Taxes: R{{ field.value | toCurrency }}
44 52
               </p>
45
-            </div>
53
+            </div> -->
46 54
             <p>{{ property.shortDescription }}</p>
47 55
             <p>{{ property.price | toCurrency }}</p>
48 56
             <div class="btn-white-border"><i class="fa fa-search"></i>BOOK A VIEWING</div>
@@ -77,17 +85,20 @@
77 85
           <h2 v-else>{{ property.propertyName }}</h2>
78 86
           <p>{{ property.shortDescription }}</p>
79 87
           <h4>Property Features</h4>
80
-          <div v-for="(data, i) in property.displayData" :key="i" class="row my-3">
81
-            <div v-for="(field, j) in data.values" :key="j" class="col-md-6">
82
-              <div v-if="field.value.toUpperCase() != 'YES'">
83
-                <i class="fa fa-check-circle"></i> {{ field.value }} {{ field.name }}
88
+          <div v-if="property.displayData.length > 0">
89
+            <div v-for="(data, i) in property.displayData" :key="i" class="row my-3">
90
+              <div v-for="(field, j) in data.values" :key="j" class="col-md-6">
91
+                <div v-if="field.value.toUpperCase() != 'YES'">
92
+                  <i class="fa fa-check-circle"></i> {{ field.value }} {{ field.name }}
93
+                </div>
94
+                <div v-else><i class="fa fa-check-circle"></i> {{ field.name }}</div>
84 95
               </div>
85
-              <div v-else><i class="fa fa-check-circle"></i> {{ field.name }}</div>
86 96
             </div>
87 97
           </div>
88 98
           <div class="mt-5" v-html="property.description"></div>
89
-          <h4 class="mt-5">Video Tour</h4>
99
+          <h4 v-if="property.video !== null" class="mt-5">Video Tour</h4>
90 100
           <iframe
101
+            v-if="property.video !== null"
91 102
             width="100%"
92 103
             src="https://www.youtube.com/embed/watch_popup?v=qKgHJYzWtVA"
93 104
             frameborder="0"

+ 3
- 1
src/components/property/residential/singleView/contentSection.vue Voir le fichier

@@ -5,6 +5,7 @@
5 5
         <div class="col-md-4">
6 6
           <div class="resPortfolioSection">
7 7
             <iframe
8
+              v-if="property.video != ''"
8 9
               width="100%"
9 10
               src="https://www.youtube.com/embed/watch_popup?v=qKgHJYzWtVA"
10 11
               frameborder="0"
@@ -92,8 +93,9 @@
92 93
               </div>
93 94
             </div>
94 95
           </div>
95
-          <h4 class="mt-5">Video Tour</h4>
96
+          <h4 v-if="property.video != ''" class="mt-5">Video Tour</h4>
96 97
           <iframe
98
+            v-if="property.video != ''"
97 99
             width="100%"
98 100
             src="https://www.youtube.com/embed/watch_popup?v=qKgHJYzWtVA"
99 101
             frameborder="0"

+ 3
- 0
src/components/shared/footerSection.vue Voir le fichier

@@ -27,6 +27,9 @@
27 27
               <router-link class="footerText" to="/websiteDisclaimer"
28 28
                 >Website Disclaimer</router-link
29 29
               ><br />
30
+              <router-link class="footerText" to="/termsConditionsView"
31
+                >Terms & Conditions</router-link
32
+              ><br />
30 33
             </p>
31 34
           </div>
32 35
           <div class="col-lg-9 section-header" id="contactFoot">

+ 5
- 0
src/components/shared/navBar.vue Voir le fichier

@@ -280,6 +280,11 @@
280 280
                           <li>
281 281
                             <router-link to="/fees">Fees</router-link>
282 282
                           </li>
283
+                          <li>
284
+                            <router-link to="/termsConditions"
285
+                              >Edit Terms and Conditions</router-link
286
+                            >
287
+                          </li>
283 288
                         </ul>
284 289
                       </li>
285 290
                       <li v-if="ROLE === 'Super Admin'" class="menu-has-children">

+ 2
- 2
src/components/timeshare/sell/contentSection.vue Voir le fichier

@@ -742,9 +742,9 @@
742 742
               </button>
743 743
               <button class="btn-solid-blue" v-else @click="newSale()">NEW WEEK</button>
744 744
             </div>
745
-            <div class="text-center col-12">
745
+            <!-- <div class="text-center col-12">
746 746
               <button class="btn-solid-blue" @click="paygateRedirect()">PayGate</button>
747
-            </div>
747
+            </div> -->
748 748
             <br />
749 749
             <br />
750 750
           </div>

+ 1
- 1
src/components/user/loginPage.vue Voir le fichier

@@ -118,7 +118,7 @@ export default {
118 118
     },
119 119
     Login() {
120 120
       this.login({ username: this.username, password: this.password })
121
-        .then(() => {
121
+        .then(fufilled => {
122 122
           this.$router.push("/");
123 123
         })
124 124
         .catch(err => {

+ 19
- 2
src/components/user/registerAgencySection.vue Voir le fichier

@@ -130,8 +130,25 @@
130 130
         />
131 131
       </div>
132 132
     </div>
133
-
134
-    <button v-on:click="SubmitData()" class="btn-solid-blue" type="submit">
133
+    <div class="row">
134
+      <div class="col">
135
+        <label for="tc"
136
+          ><router-link to="/termsConditionsView">Terms & Conditions</router-link></label
137
+        >
138
+        <input
139
+          name="tc"
140
+          type="checkbox"
141
+          class="ml-3 mt-2"
142
+          v-model="registerAgency.user.acceptedTerms"
143
+        />
144
+      </div>
145
+    </div>
146
+    <button
147
+      v-if="registerAgency.user.acceptedTerms"
148
+      v-on:click="SubmitData()"
149
+      class="btn-solid-blue"
150
+      type="submit"
151
+    >
135 152
       SUBMIT
136 153
     </button>
137 154
     <router-link to="/user/login" class="btn-white-border mb-5" style="float:right" type="submit">

+ 22
- 1
src/components/user/registerIndividual.vue Voir le fichier

@@ -91,8 +91,27 @@
91 91
           />
92 92
         </div>
93 93
       </div>
94
+      <div class="row">
95
+        <div class="col">
96
+          <label for="tc"
97
+            ><router-link to="/termsConditionsView">Terms & Conditions</router-link></label
98
+          >
99
+
100
+          <input
101
+            name="tc"
102
+            type="checkbox"
103
+            class="ml-3 mt-2"
104
+            v-model="registerIndividual.acceptedTerms"
105
+          />
106
+        </div>
107
+      </div>
94 108
 
95
-      <button v-on:click="SubmitData()" class="btn-solid-blue" type="submit">
109
+      <button
110
+        v-if="registerIndividual.acceptedTerms"
111
+        v-on:click="SubmitData()"
112
+        class="btn-solid-blue"
113
+        type="submit"
114
+      >
96 115
         SUBMIT
97 116
       </button>
98 117
       <router-link to="/user/login" class="btn-white-border" style="float:right" type="submit">
@@ -149,6 +168,8 @@ export default {
149 168
       this.isPasswordShown = "password";
150 169
     },
151 170
     SubmitData() {
171
+      console.log(this.registerIndividual);
172
+
152 173
       this.saveIndividual(this.registerIndividual);
153 174
 
154 175
       this.$router.push("/user/login");

+ 2
- 2
src/main.js Voir le fichier

@@ -29,8 +29,8 @@ Vue.use(VueGoogleMaps, {
29 29
 });
30 30
 Vue.config.productionTip = false;
31 31
 //axios.defaults.baseURL = "http://localhost:57260";
32
-axios.defaults.baseURL = "http://training.provision-sa.com:82";
33
-//axios.defaults.baseURL = "http://localhost:8080/";
32
+//axios.defaults.baseURL = "http://training.provision-sa.com:82";
33
+axios.defaults.baseURL = "http://localhost:8080/";
34 34
 
35 35
 Vue.prototype.$axios = axios;
36 36
 const pluginOptions = {

+ 13
- 1
src/router/index.js Voir le fichier

@@ -57,6 +57,8 @@ import ToBuySearch from "../components/timeshare/buy/toBuySearchResults.vue";
57 57
 import ContactUs from "../components/misc/contactUs.vue";
58 58
 import PrivacyPolicy from "../components/misc//privacyPolicy/privacyPolicyPage.vue";
59 59
 import WebsiteDisclaimer from "../components/misc/Disclaimer/WebsiteDisclaimer.vue";
60
+import TermsConditions from "../components/admin/misc/termsConditions.vue";
61
+import TermsConditionsView from "../components/misc/TermsConditions/termsConditions.vue";
60 62
 
61 63
 import MakeOffer from "../components/processFlow/makeOffer.vue";
62 64
 import Offer from "../components/processFlow/offers.vue";
@@ -378,6 +380,16 @@ export default new Router({
378 380
       name: "fees",
379 381
       component: Fees
380 382
     },
383
+    {
384
+      path: "/termsConditions",
385
+      name: "termsConditions",
386
+      component: TermsConditions
387
+    },
388
+    {
389
+      path: "/termsConditionsView",
390
+      name: "termsConditionsView",
391
+      component: TermsConditionsView
392
+    },
381 393
     {
382 394
       path: "/carousel",
383 395
       name: "carousel",
@@ -449,7 +461,7 @@ export default new Router({
449 461
     {
450 462
       path: "/editTimeShare/:id",
451 463
       name: "EditTimeshare",
452
-      component: MyWeeksEdit,
464
+      component: MyWeeksEdit
453 465
     }
454 466
   ]
455 467
 });

+ 2
- 0
src/store/index.js Voir le fichier

@@ -34,6 +34,7 @@ import PlaceHolderFormat from "./modules/misc/placeHolderFormat";
34 34
 import Bank from "./modules/user/bank";
35 35
 import bank from "./modules/user/bank";
36 36
 import Fees from "./modules/financial/fees";
37
+import TermsConditions from "./modules/misc/termsConditions";
37 38
 
38 39
 Vue.use(Vuex);
39 40
 /* eslint no-param-reassign: ["error", { "props": false }] */
@@ -70,6 +71,7 @@ export default new Vuex.Store({
70 71
     campaignItem: CampaignItemModule,
71 72
     placeHolderFormat: PlaceHolderFormat,
72 73
     fees: Fees,
74
+    termsConditions: TermsConditions,
73 75
     bank: bank
74 76
   }
75 77
 });

+ 28
- 0
src/store/modules/misc/termsConditions.js Voir le fichier

@@ -0,0 +1,28 @@
1
+/* eslint-disable */
2
+import axios from "axios";
3
+
4
+export default {
5
+  namespaced: true,
6
+  state: {
7
+    terms: []
8
+  },
9
+  mutations: {
10
+    getTermsAndConditions: (state, fee) => (state.terms = fee),
11
+    newTermsAndConditions: (state, fee) => (state.terms = fee)
12
+  },
13
+  getters: {
14
+    getTermsAndConditions: state => state.terms
15
+  },
16
+  actions: {
17
+    async retrieveTerms({ commit }) {
18
+      await axios.get("api/tc/").then(res => {
19
+        commit("getTermsAndConditions", res.data);
20
+      });
21
+    },
22
+    async setTerms({ commit }, terms) {
23
+      await axios.post("api/tc/", terms).then(res => {
24
+        commit("newTermsAndConditions", res.data);
25
+      });
26
+    }
27
+  }
28
+};

+ 53
- 51
src/store/modules/user/register.js Voir le fichier

@@ -1,4 +1,4 @@
1
-import axios from 'axios';
1
+import axios from "axios";
2 2
 
3 3
 export default {
4 4
   namespaced: true,
@@ -6,27 +6,28 @@ export default {
6 6
     individuals: [],
7 7
     agents: [],
8 8
     registerIndividual: {
9
-      name: '',
10
-      surname: '',
11
-      email: '',
12
-      cellNumber: '',
13
-      username: '',
14
-      password: '',
9
+      name: "",
10
+      surname: "",
11
+      email: "",
12
+      cellNumber: "",
13
+      username: "",
14
+      password: "",
15
+      acceptedTerms: false
15 16
     },
16 17
     registerAgency: {
17
-      name: '',
18
-      eaabeffcNumber: '',
19
-      companyRegNumber: '',
18
+      name: "",
19
+      eaabeffcNumber: "",
20
+      companyRegNumber: "",
20 21
       user: {
21
-        name: '',
22
-        surname: '',
23
-        email: '',
24
-        cellNumber: '',
25
-        username: '',
26
-        password: '',
27
-        role: '',
28
-      },
29
-    },
22
+        name: "",
23
+        surname: "",
24
+        email: "",
25
+        cellNumber: "",
26
+        username: "",
27
+        password: "",
28
+        role: ""
29
+      }
30
+    }
30 31
   },
31 32
   mutations: {
32 33
     setIndividual(state, type) {
@@ -56,31 +57,32 @@ export default {
56 57
     },
57 58
     updateAgency(state, type) {
58 59
       state.registerAgency.find(item => item.id === type.id).eaabeffcNumber = type.eaabeffcNumber;
59
-      state.registerAgency.find(item => item.id === type.id).companyRegNumber = type.companyRegNumber;
60
+      state.registerAgency.find(item => item.id === type.id).companyRegNumber =
61
+        type.companyRegNumber;
60 62
     },
61 63
     clearIndividual(state) {
62 64
       state.registerIndividual = {
63
-        name: '',
64
-        surname: '',
65
-        email: '',
66
-        cellNumber: '',
67
-        username: '',
68
-        password: '',
65
+        name: "",
66
+        surname: "",
67
+        email: "",
68
+        cellNumber: "",
69
+        username: "",
70
+        password: ""
69 71
       };
70 72
     },
71 73
     clearAgency(state) {
72 74
       state.registerAgency = {
73
-        name: '',
74
-        eaabeffcNumber: '',
75
-        companyRegNumber: '',
75
+        name: "",
76
+        eaabeffcNumber: "",
77
+        companyRegNumber: "",
76 78
         user: {
77
-          name: '',
78
-          surname: '',
79
-          email: '',
80
-          cellNumber: '',
81
-          username: '',
82
-          password: '',
83
-        },
79
+          name: "",
80
+          surname: "",
81
+          email: "",
82
+          cellNumber: "",
83
+          username: "",
84
+          password: ""
85
+        }
84 86
       };
85 87
     },
86 88
     removeIndividual(state, id) {
@@ -91,20 +93,20 @@ export default {
91 93
     },
92 94
     removeAgent(state, id) {
93 95
       state.registerAgency.pop(state.registerAgency.find(a => a.id === id));
94
-    },
96
+    }
95 97
   },
96 98
   getters: {},
97 99
   actions: {
98 100
     getIndividuals({ commit }) {
99 101
       axios
100
-        .get('/api/individual')
101
-        .then(result => commit('setIndividuals', result.data))
102
+        .get("/api/individual")
103
+        .then(result => commit("setIndividuals", result.data))
102 104
         .catch(console.error);
103 105
     },
104 106
     getAgents({ commit }) {
105 107
       axios
106
-        .get('/api/agent')
107
-        .then(result => commit('setAgents', result.data))
108
+        .get("/api/agent")
109
+        .then(result => commit("setAgents", result.data))
108 110
         .catch(console.error);
109 111
     },
110 112
     // getAgency({
@@ -118,20 +120,20 @@ export default {
118 120
 
119 121
     saveIndividual({ commit }, item) {
120 122
       axios
121
-        .post('/api/register/register', item)
122
-        .then(result => commit('addIndividual', result.data))
123
+        .post("/api/register/register", item)
124
+        .then(result => commit("addIndividual", result.data))
123 125
         .catch(console.error);
124 126
     },
125 127
     saveAgency({ commit }, item) {
126 128
       axios
127
-        .post('/api/register/registeragency', item)
128
-        .then(result => commit('addAgency', result.data))
129
+        .post("/api/register/registeragency", item)
130
+        .then(result => commit("addAgency", result.data))
129 131
         .catch(console.error);
130 132
     },
131 133
     saveAgent({ commit }, item) {
132 134
       axios
133
-        .post('/api/agent', item)
134
-        .then(result => commit('addAgent', result.data))
135
+        .post("/api/agent", item)
136
+        .then(result => commit("addAgent", result.data))
135 137
         .catch(console.error);
136 138
     },
137 139
     // updateIndividual({
@@ -163,15 +165,15 @@ export default {
163 165
     deleteIndividual({ commit }, id) {
164 166
       axios
165 167
         .delete(`/api/individual/${id}`)
166
-        .then(result => commit('removeIndividual', id))
168
+        .then(result => commit("removeIndividual", id))
167 169
         .catch(console.error);
168 170
     },
169 171
     deleteAgent({ commit }, id) {
170 172
       axios
171 173
         .delete(`/api/agent/${id}`)
172
-        .then(result => commit('removeAgent', id))
174
+        .then(result => commit("removeAgent", id))
173 175
         .catch(console.error);
174
-    },
176
+    }
175 177
     // deleteAgency({
176 178
     //   commit,
177 179
     // }, id) {
@@ -180,5 +182,5 @@ export default {
180 182
     //     .then(result => commit('removeAgency', id))
181 183
     //     .catch(console.error);
182 184
     // },
183
-  },
185
+  }
184 186
 };

+ 2
- 2
vue.config.js Voir le fichier

@@ -2,8 +2,8 @@ module.exports = {
2 2
   devServer: {
3 3
     proxy: {
4 4
       "/api": {
5
-        //target: "http://localhost:57260/",
6
-        target: "http://training.provision-sa.com:82",
5
+        target: "http://localhost:57260/",
6
+        //target: "http://training.provision-sa.com:82",
7 7
         changeOrigin: true
8 8
       },
9 9
       "/nph-srep": {

Chargement…
Annuler
Enregistrer