Explorar el Código

Latest Commit

master
30117125 hace 3 años
padre
commit
4e6ee94899

+ 1134
- 1033
package-lock.json
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero


+ 6
- 3
package.json Ver fichero

@@ -12,13 +12,13 @@
12 12
     "@nuxtjs/axios": "^5.13.1",
13 13
     "animate.css": "^3.7.2",
14 14
     "aos": "^3.0.0-beta.6",
15
-    "axios": "^0.19.2",
15
+    "axios": "^0.24.0",
16 16
     "core-js": "^2.6.12",
17 17
     "crypto-js": "^4.0.0",
18
-    "datatables.net": "^1.10.23",
18
+    "datatables.net": "^1.11.3",
19 19
     "jquery": "^3.6.0",
20 20
     "js-md5": "^0.7.3",
21
-    "jspdf": "^2.3.0",
21
+    "jspdf": "^2.4.0",
22 22
     "jspdf-autotable": "^3.5.14",
23 23
     "lodash": "^4.17.21",
24 24
     "material-design-icons-iconfont": "^3.0.3",
@@ -41,7 +41,9 @@
41 41
     "vue-json-excel": "^0.2.99",
42 42
     "vue-loaders": "^4.1.4",
43 43
     "vue-owl-carousel": "^2.0.3",
44
+    "vue-quill-editor": "^3.0.6",
44 45
     "vue-router": "^3.5.1",
46
+    "vue-sidebar-menu": "^4.8.1",
45 47
     "vue-social-sharing": "^3.0.5",
46 48
     "vue-trix": "^1.2.0",
47 49
     "vue2-editor": "^2.10.2",
@@ -51,6 +53,7 @@
51 53
   },
52 54
   "devDependencies": {
53 55
     "@fortawesome/fontawesome-free": "^5.15.2",
56
+    "@types/uuid": "^8.3.4",
54 57
     "@vue/cli-plugin-babel": "^3.12.1",
55 58
     "@vue/cli-plugin-eslint": "^3.12.1",
56 59
     "@vue/cli-service": "^3.12.1",

+ 5
- 0
public/index.html Ver fichero

@@ -21,6 +21,8 @@
21 21
     <link href="css/bootstrap.min.css" rel="stylesheet">
22 22
     <link href="css/style.css" rel="stylesheet">
23 23
     <link rel="stylesheet" href="css/dragndrop.table.columns.css" />
24
+    <link rel="stylesheet" href="owlcarousel/owl.carousel.min.css">
25
+<link rel="stylesheet" href="owlcarousel/owl.theme.default.min.css">
24 26
   </head>
25 27
 
26 28
   <body>
@@ -38,6 +40,9 @@
38 40
   <script src="lib/owlcarousel/owl.carousel.min.js"></script>
39 41
   <script src="lib/scrollreveal/scrollreveal.min.js"></script>
40 42
   <script src="js/main.js"></script>
43
+  <script src="https://kit.fontawesome.com/your-code-number.js"></script>
44
+  <script src="jquery.min.js"></script>
45
+<script src="owlcarousel/owl.carousel.min.js"></script>
41 46
 
42 47
 
43 48
 </html>

+ 24
- 5
src/components/admin/misc/carouselSearchProperty.vue Ver fichero

@@ -4,7 +4,7 @@
4 4
       <div class="row">
5 5
         <div class="col">
6 6
           <div class="section-header">
7
-            <h2>Search</h2>
7
+            <h2>Search {{ propertyType === "res" ? "Residential" : "Commercial" }}</h2>
8 8
           </div>
9 9
         </div>
10 10
       </div>
@@ -12,7 +12,7 @@
12 12
       <div class="row">
13 13
         <div class="container">
14 14
           <ListView
15
-            :items="properties"
15
+            :items="filteredProperties"
16 16
             :showNew="false"
17 17
             :showColumnChooser="false"
18 18
             @onRowClick="onRowClick"
@@ -40,7 +40,8 @@ import Log from "../../../assets/Log";
40 40
 export default {
41 41
   name: "CarouselSearch",
42 42
   props: {
43
-    name: String
43
+    name: String,
44
+    selectProperty: String
44 45
   },
45 46
   components: {
46 47
     ListView
@@ -48,18 +49,36 @@ export default {
48 49
   data() {
49 50
     return {
50 51
       loaded: false,
51
-      user: Log.getUser()
52
+      user: Log.getUser(),
53
+      propertyType: ""
52 54
     };
53 55
   },
54 56
   mounted() {
55 57
     this.loadData().then(() => {
56 58
       setTimeout(() => {
57 59
         this.loaded = true;
60
+        this.propertyType = this.selectProperty;
61
+        console.log(this.properties);
58 62
       }, 100);
59 63
     });
60 64
   },
61 65
   computed: {
62
-    ...mapState("propertyList", ["properties"])
66
+    ...mapState("propertyList", ["properties"]),
67
+    filteredProperties() {
68
+      var propertyList = [];
69
+      this.properties.forEach(property => {
70
+        if (this.propertyType === "comm") {
71
+          if (property.type === "Commercial") {
72
+            propertyList.push(property);
73
+          }
74
+        } else {
75
+          if (property.type === "Residential") {
76
+            propertyList.push(property);
77
+          }
78
+        }
79
+      });
80
+      return propertyList;
81
+    }
63 82
   },
64 83
   methods: {
65 84
     ...mapActions("propertyList", ["getAdminProperties"]),

+ 47
- 0
src/components/marketing/htmlPreview.vue Ver fichero

@@ -0,0 +1,47 @@
1
+<template>
2
+  <div class="container-fluid">
3
+    <div class="row">
4
+      <div class="col">
5
+        <div class="section-header">
6
+          <h2>Landing Page</h2>
7
+        </div>
8
+      </div>
9
+    </div>
10
+    <div class="row">
11
+      <div class="col-md-12">
12
+        <textarea
13
+          class="form-control"
14
+          type="text"
15
+          rows="10"
16
+          step="any"
17
+          name="levy"
18
+          v-model="someCode"
19
+        />
20
+      </div>
21
+    </div>
22
+    <div class="row">
23
+      <div class="col-md-12" style="border:1px solid black; border-radius:15px;">
24
+        <div class="no-style" v-html="someCode"></div>
25
+      </div>
26
+    </div>
27
+  </div>
28
+</template>
29
+
30
+<script>
31
+/* eslint-disable */
32
+
33
+export default {
34
+  data() {
35
+    return {
36
+      htmlCode: "",
37
+      someCode: ""
38
+    };
39
+  },
40
+  async mounted() {
41
+    this.htmlCode = localStorage.getItem("htmlPreview");
42
+    console.log(this.$route.params.html);
43
+  }
44
+};
45
+</script>
46
+
47
+<style lang="scss" scoped></style>

+ 4
- 6
src/components/marketing/landingPage.vue Ver fichero

@@ -102,11 +102,6 @@
102 102
                 </label>
103 103
               </div>
104 104
               <div class="input-group mb-3">
105
-                <!-- <div class="input-group-prepend">
106
-                    <span class="input-group-text" style="color: #60CBEB">
107
-                      <b>B</b>
108
-                    </span>
109
-                  </div>-->
110 105
                 <textarea
111 106
                   class="form-control"
112 107
                   type="text"
@@ -328,7 +323,10 @@ export default {
328 323
       weekColumns: ["image", "weekUni"],
329 324
       weekFormats: ["image", ""],
330 325
       placeHolderColumns: ["name", "boundTo", "format"],
331
-      defaultPlaceholderClass: this.CheckType
326
+      defaultPlaceholderClass: this.CheckType,
327
+      editorOption: {
328
+        // Some Quill options...
329
+      }
332 330
     };
333 331
   },
334 332
   props: {

+ 6
- 3
src/components/marketing/landingPageAddProperty.vue Ver fichero

@@ -13,7 +13,7 @@
13 13
               FIND PROPERTY
14 14
             </button>
15 15
             <modal name="propSearch" :width="700" :height="900">
16
-              <Search @onSelected="onSelected" />
16
+              <Search :selectProperty="PropertyType" @onSelected="onSelected" />
17 17
             </modal>
18 18
           </div>
19 19
           <div class="col-md-2 mt-3">
@@ -136,6 +136,9 @@ export default {
136 136
     Alert,
137 137
     ListView
138 138
   },
139
+  props: {
140
+    PropertyType: {}
141
+  },
139 142
   data() {
140 143
     return {
141 144
       loaded: false,
@@ -147,7 +150,8 @@ export default {
147 150
       placeHolders: [],
148 151
       showPlaceholder: false,
149 152
       placeHolder: undefined,
150
-      value: undefined
153
+      value: undefined,
154
+      selectedProperty: ""
151 155
     };
152 156
   },
153 157
   methods: {
@@ -157,7 +161,6 @@ export default {
157 161
     },
158 162
     onSelected(item) {
159 163
       this.propertyObj = item;
160
-      console.log(this.propertyObj);
161 164
       this.$modal.hide("propSearch");
162 165
     },
163 166
     checkImage(item) {

+ 28
- 14
src/components/marketing/landingPageProperty.vue Ver fichero

@@ -232,19 +232,38 @@
232 232
       </div>
233 233
       <br />
234 234
       <div class="col-md-12">
235
-        <label>
236
-          <b>Properties</b>
237
-        </label>
238
-        <div class="d-flex">
239
-          <div class="p-2">
240
-            <div class="btn-solid-blue" @click="addWeekClose()" v-if="CanEditWeeks">
241
-              {{ btnCaptionWeek }}
235
+        <div class="row">
236
+          <div class="col-md-12">
237
+            <label>
238
+              <b>Properties</b>
239
+            </label>
240
+          </div>
241
+        </div>
242
+        <div class="row">
243
+          <div class="col-md-6">
244
+            <select
245
+              v-model="selectedPropertyType"
246
+              name="PropertySelector"
247
+              class="form-control uniSelect"
248
+            >
249
+              <option value="res">Residential</option>
250
+              <option value="comm">Commercial</option>
251
+            </select>
252
+          </div>
253
+        </div>
254
+        <div class="row">
255
+          <div class="d-flex">
256
+            <div class="p-2">
257
+              <div class="btn-solid-blue" @click="addWeekClose()" v-if="CanEditWeeks">
258
+                {{ btnCaptionWeek }}
259
+              </div>
242 260
             </div>
243 261
           </div>
244 262
         </div>
245 263
       </div>
264
+
246 265
       <div class="col-md-12" v-if="showNewWeek">
247
-        <WeekAdd @onWeekItemAdd="AddNewProperty" />
266
+        <WeekAdd :PropertyType="selectedPropertyType" @onWeekItemAdd="AddNewProperty" />
248 267
       </div>
249 268
       <div class="col-md-12">
250 269
         <hr />
@@ -315,6 +334,7 @@ export default {
315 334
   data() {
316 335
     return {
317 336
       loaded: false,
337
+      selectedPropertyType: "res",
318 338
       wait: false,
319 339
       isNew: true,
320 340
       showNew: false,
@@ -412,12 +432,6 @@ export default {
412 432
       this.campaign.placeHolders = _.remove(this.campaign.placeHolders, x => x !== item);
413 433
       this.placeHolders = this.campaign.placeHolders;
414 434
     },
415
-    // AddWeek(item) {
416
-    //   // const myList = this.campaign.items ? this.campaign.items : [];
417
-    //   // myList.push(item);
418
-    //   // this.campaign.items = myList;
419
-    //   //this.showNewWeek = false;
420
-    // },
421 435
     AddNewProperty(property) {
422 436
       var item = {
423 437
         image: property.image,

+ 3
- 0
src/components/shared/navBar.vue Ver fichero

@@ -320,6 +320,9 @@
320 320
                       <li v-if="ROLE === 'Super Admin'">
321 321
                         <router-link to="/campaignUpload">Landing Pages / Campaignes</router-link>
322 322
                       </li>
323
+                      <li v-if="ROLE === 'Super Admin'">
324
+                        <router-link to="/landingPages">Landing Pages * / Campaignes</router-link>
325
+                      </li>
323 326
                       <li v-if="ROLE === 'Designer'">
324 327
                         <router-link to="/campaignUpload">Landing Pages / Campaignes</router-link>
325 328
                       </li>

+ 5
- 2
src/components/timeshare/resort/resortPageNew.vue Ver fichero

@@ -67,7 +67,8 @@ export default {
67 67
   },
68 68
   data() {
69 69
     return {
70
-      wait: true
70
+      wait: true,
71
+      rCode: ""
71 72
     };
72 73
   },
73 74
   props: {
@@ -83,7 +84,9 @@ export default {
83 84
     ...mapState("resort", ["resort", "images"])
84 85
   },
85 86
   created() {
86
-    this.getResortData(this.resortCode).then(() => (this.wait = false));
87
+    this.getResortData(this.resortCode.includes("SILV") ? "SILV1" : this.resortCode).then(
88
+      () => (this.wait = false)
89
+    );
87 90
   }
88 91
 };
89 92
 </script>

+ 15
- 7
src/components/timeshare/resort/unit/unitPageNew.vue Ver fichero

@@ -7,7 +7,7 @@
7 7
         <div class="col">
8 8
           <tabSection
9 9
             style="margin-bottom:100px"
10
-            :resortCode="resortCode"
10
+            :resortCode="calculatedCode"
11 11
             :resortCoords="resort.prPostAdd1"
12 12
             :layoutImages="layouts"
13 13
             :resortName="resort.prName"
@@ -55,11 +55,13 @@ export default {
55 55
     //   this.boolLoaded = true;
56 56
     // }, 500);
57 57
     this.wait = true;
58
-    this.getResortData(this.resortCode).then(fulfilled => {
59
-      this.applyResortFilter(this.resortCode);
60
-      this.getWeeks();
61
-      this.wait = false;
62
-    });
58
+    this.getResortData(this.resortCode.includes("SILV") ? "SILV1" : this.resortCode).then(
59
+      fulfilled => {
60
+        this.applyResortFilter(this.resortCode.includes("SILV") ? "SILV1" : this.resortCode);
61
+        this.getWeeks();
62
+        this.wait = false;
63
+      }
64
+    );
63 65
   },
64 66
   computed: {
65 67
     ...mapState("resort", ["resort"]),
@@ -68,12 +70,18 @@ export default {
68 70
       weekById: "weekList/weekById"
69 71
     }),
70 72
     week() {
71
-      return this.weekById(this.resortCode, this.unitNumber);
73
+      return this.weekById(
74
+        this.resortCode.includes("SILV") ? "SILV1" : this.resortCode,
75
+        this.unitNumber
76
+      );
72 77
     },
73 78
     layouts() {
74 79
       var layouts = [];
75 80
       layouts.push(this.resort.layout);
76 81
       return layouts;
82
+    },
83
+    calculatedCode() {
84
+      return this.resortCode.includes("SILV") ? "SILV1" : this.resortCode;
77 85
     }
78 86
     // ...mapState('week', ['currentWeek']),
79 87
   },

+ 2
- 0
src/components/user/loginPage.vue Ver fichero

@@ -81,6 +81,7 @@
81 81
 <script>
82 82
 /* eslint-disable */
83 83
 import { mapActions, mapState } from "vuex";
84
+import uuid from "uuid";
84 85
 import alert from "../shared/alert.vue";
85 86
 import Log from "../../assets/Log";
86 87
 import carousel from "vue-owl-carousel";
@@ -125,6 +126,7 @@ export default {
125 126
       } else this.troubleToggle = true;
126 127
     },
127 128
     Login() {
129
+      console.log(this.username + " " + this.password);
128 130
       this.login({ username: this.username, password: this.password })
129 131
         .then(() => {
130 132
           // console.log(Log.getUser());

+ 36
- 16
src/components/user/registerIndividual.vue Ver fichero

@@ -11,6 +11,11 @@
11 11
           <alert :text="'This username is already in use'" :type="'ERROR'" />
12 12
         </div>
13 13
       </div>
14
+      <div v-if="boolValidationError" class="row">
15
+        <div class="col">
16
+          <alert :text="validationErrorMessage" :type="'ERROR'" />
17
+        </div>
18
+      </div>
14 19
       <div class="row">
15 20
         <div class="col-sm-12 col-md-6 ">
16 21
           <input
@@ -161,7 +166,9 @@ export default {
161 166
       boolMessage: false,
162 167
       terms: false,
163 168
       indivUser: {},
164
-      boolUserExists: false
169
+      boolUserExists: false,
170
+      boolValidationError: false,
171
+      validationErrorMessage: ""
165 172
     };
166 173
   },
167 174
   computed: {
@@ -195,21 +202,34 @@ export default {
195 202
     },
196 203
     SubmitData() {
197 204
       this.indivUser.acceptedTerms = this.terms;
198
-      this.saveIndividual(this.indivUser)
199
-        .then(res => {
200
-          this.boolMessage = true;
201
-          setTimeout(() => {
202
-            if (Log.getUser().role !== "Super Admin") {
203
-              this.$router.push("/user/login");
204
-            } else {
205
-              this.$refs.dataToggle.click();
206
-              this.$router.go();
207
-            }
208
-          }, 500);
209
-        })
210
-        .catch(err => {
211
-          this.boolUserExists = true;
212
-        });
205
+      console.log(this.indivUser.email);
206
+      if (this.indivUser.email) {
207
+        console.log(this.indivUser.username);
208
+        if (this.indivUser.username) {
209
+          this.saveIndividual(this.indivUser)
210
+            .then(res => {
211
+              this.boolMessage = true;
212
+              setTimeout(() => {
213
+                if (Log.getUser().role !== "Super Admin") {
214
+                  this.$router.push("/user/login");
215
+                } else {
216
+                  this.$refs.dataToggle.click();
217
+                  this.$router.go();
218
+                }
219
+              }, 500);
220
+            })
221
+            .catch(err => {
222
+              console.log(err.message);
223
+              this.boolUserExists = true;
224
+            });
225
+        } else {
226
+          this.validationErrorMessage = "Username Required";
227
+          this.boolValidationError = true;
228
+        }
229
+      } else {
230
+        this.validationErrorMessage = "Email Required";
231
+        this.boolValidationError = true;
232
+      }
213 233
     },
214 234
     Close() {
215 235
       this.$router.push("/user/login");

+ 8
- 2
src/main.js Ver fichero

@@ -18,7 +18,13 @@ import VModal from "vue-js-modal";
18 18
 import vueFloatLabel from "vue-float-label";
19 19
 import 'vue-loaders/dist/vue-loaders.css';
20 20
 import VueLoaders from 'vue-loaders';
21
+import VueQuillEditor from 'vue-quill-editor'
21 22
 
23
+import 'quill/dist/quill.core.css' // import styles
24
+import 'quill/dist/quill.snow.css' // for snow theme
25
+import 'quill/dist/quill.bubble.css' // for bubble theme
26
+
27
+Vue.use(VueQuillEditor, /* { default global options } */)
22 28
 Vue.use(VueLoaders);
23 29
 Vue.use(VueSocialSharing);
24 30
 Vue.use(EvaIcons);
@@ -47,8 +53,8 @@ Vue.use(VueAnalytics, {
47 53
 
48 54
 Vue.config.productionTip = false;
49 55
 //axios.defaults.baseURL = "http://localhost:57260";
50
-axios.defaults.baseURL = "https://www.pvsl.co.za:86/";
51
-//axios.defaults.baseURL = "http://training.provision-sa.com:82/";
56
+//axios.defaults.baseURL = "https://www.pvsl.co.za:86/";
57
+axios.defaults.baseURL = "http://training.provision-sa.com:120/";
52 58
 //axios.defaults.baseURL = "http://localhost:8080/"
53 59
 
54 60
 Vue.prototype.$axios = axios;

+ 10
- 0
src/router/index.js Ver fichero

@@ -111,6 +111,8 @@ import MyWeeksEdit from "../components/admin/status/editTimeShareAdminPage.vue";
111 111
 
112 112
 import UserRoles from "../components/user/Roles/userRoles.vue";
113 113
 
114
+import htmlPreview from '../components/marketing/htmlPreview.vue'
115
+
114 116
 Vue.use(VueHead);
115 117
 Vue.use(Router);
116 118
 
@@ -529,6 +531,14 @@ export default new Router({
529 531
       }),
530 532
       component: MyWeeksEdit
531 533
     },
534
+    {
535
+      path: "/htmlPreview",
536
+      name: "HtmlPreview",
537
+      props: route => ({
538
+        ...route.params
539
+      }),
540
+      component: htmlPreview
541
+    },
532 542
     {
533 543
       path: "/user/forgotPassword",
534 544
       name: "forgotPassword",

+ 1
- 0
src/store/modules/timeshare/resort.js Ver fichero

@@ -1,5 +1,6 @@
1 1
 /* eslint-disable no-restricted-syntax */
2 2
 /* eslint-disable guard-for-in */
3
+/* eslint-disable */
3 4
 import axios from "axios";
4 5
 import { reject } from "core-js/fn/promise";
5 6
 

+ 3
- 1
src/store/modules/timeshare/timeshare.js Ver fichero

@@ -191,7 +191,9 @@ export default {
191 191
     getResorts({ commit }) {
192 192
       axios
193 193
         .get("https://www.tradeunipoint.com/unibackend/seam/resource/rest/products/resorts/list/")
194
-        .then(result => commit("addResort", result.data))
194
+        .then(result => {commit("addResort", result.data)
195
+        console.log(result.data);
196
+      })
195 197
         .catch(console.error);
196 198
     },
197 199
     getRegions({ dispatch, commit }) {

+ 2
- 2
vue.config.js Ver fichero

@@ -3,8 +3,8 @@ module.exports = {
3 3
     proxy: {
4 4
       "/api": {
5 5
         //target: "http://localhost:57260/",
6
-        //target: "http://training.provision-sa.com:82/",
7
-        target: "https://www.pvsl.co.za:86/",
6
+        target: "http://training.provision-sa.com:120/",
7
+        //target: "https://www.pvsl.co.za:86/",
8 8
         changeOrigin: true
9 9
       },
10 10
       "/nph-srep": {

Loading…
Cancelar
Guardar