Browse Source

Feedback Updates

master
30117125 4 years ago
parent
commit
26c6604882

+ 98
- 50
src/components/admin/status/editTimeShareAdminPage.vue View File

217
                   <div class="validation"></div>
217
                   <div class="validation"></div>
218
                 </div>
218
                 </div>
219
                 <div class="form-group col-md-6 mt-2">
219
                 <div class="form-group col-md-6 mt-2">
220
-                  <label v-if="!week.askingPrice" for="tsaPrice" class="uniSelectLabel"
220
+                  <label v-if="week.askingPrice > 0" for="tsaPrice" class="uniSelectLabel"
221
                     >ASKING PRICE</label
221
                     >ASKING PRICE</label
222
                   >
222
                   >
223
                   <float-label label="ASKING PRICE">
223
                   <float-label label="ASKING PRICE">
411
                 </div>
411
                 </div>
412
               </div>
412
               </div>
413
             </div>
413
             </div>
414
-            <div class="section-header">
415
-              <h2>Publish Timeshare Week</h2>
416
-            </div>
417
-            <div class="form">
418
-              <div class="row">
419
-                <div class="form-group col-md-6">
420
-                  <label v-if="!weekParam.weekStatus" class="uniSelectLabel" for="status"
421
-                    >STATUS</label
422
-                  >
423
-                  <float-label label="STATUS" fixed>
424
-                    <select
425
-                      class="form-control uniSelect"
426
-                      name="status"
427
-                      id="status"
428
-                      v-model="weekParam.weekStatus"
414
+            <div v-if="!boolAwaitingPayment">
415
+              <div class="section-header">
416
+                <h2>Publish Timeshare Week</h2>
417
+              </div>
418
+              <div class="form">
419
+                <div class="row">
420
+                  <div class="form-group col-md-6">
421
+                    <label v-if="!weekParam.weekStatus" class="uniSelectLabel" for="status"
422
+                      >STATUS</label
429
                     >
423
                     >
430
-                      <option :key="0">For Sale</option>
431
-                      <option :key="1">Sold</option>
432
-                    </select>
433
-                  </float-label>
424
+                    <float-label label="STATUS" fixed>
425
+                      <select
426
+                        class="form-control uniSelect"
427
+                        name="status"
428
+                        id="status"
429
+                        v-model="weekParam.status.id"
430
+                      >
431
+                        <option :key="status.id" :value="status.id" v-for="status in statusList">{{
432
+                          status.description
433
+                        }}</option>
434
+                      </select>
435
+                    </float-label>
436
+                  </div>
437
+                  <div class="form-group col-md-6">
438
+                    <float-label label="Publish" fixed>
439
+                      <select
440
+                        class="form-control uniSelect"
441
+                        name="publish"
442
+                        id="publish"
443
+                        v-model="weekParam.publish"
444
+                      >
445
+                        <option :key="0" :value="false">No</option>
446
+                        <option :key="1" :value="true">Yes</option>
447
+                      </select>
448
+                    </float-label>
449
+                  </div>
450
+                  <div class="form-group col-md-6 mt-2">
451
+                    <float-label label="DATE PUBLISHED" fixed>
452
+                      <input
453
+                        type="date"
454
+                        class="form-control"
455
+                        name="publishDate"
456
+                        v-model="pubDateParam"
457
+                      />
458
+                    </float-label>
459
+
460
+                    <div class="validation"></div>
461
+                  </div>
434
                 </div>
462
                 </div>
435
-                <div class="form-group col-md-6">
436
-                  <float-label label="Publish" fixed>
437
-                    <select
438
-                      class="form-control uniSelect"
439
-                      name="publish"
440
-                      id="publish"
441
-                      v-model="weekParam.publish"
442
-                    >
443
-                      <option :key="0" :value="false">No</option>
444
-                      <option :key="1" :value="true">Yes</option>
445
-                    </select>
446
-                  </float-label>
463
+              </div>
464
+              <div class="row">
465
+                <div class="text-center col-6">
466
+                  <button class="btn-solid-blue" v-on:click="saveEdit()">Save</button>
447
                 </div>
467
                 </div>
448
-                <div class="form-group col-md-6 mt-2">
449
-                  <float-label label="DATE PUBLISHED" fixed>
450
-                    <input
451
-                      type="date"
452
-                      class="form-control"
453
-                      name="publishDate"
454
-                      v-model="pubDateParam"
455
-                    />
456
-                  </float-label>
457
-
458
-                  <div class="validation"></div>
468
+                <div class="text-center col-6">
469
+                  <button class="btn-solid-blue" v-on:click="backToListView()">Back</button>
459
                 </div>
470
                 </div>
460
               </div>
471
               </div>
461
             </div>
472
             </div>
462
-            <div class="row">
463
-              <div class="text-center col-6">
464
-                <button class="btn-solid-blue" v-on:click="saveEdit()">Save</button>
465
-              </div>
466
-              <div class="text-center col-6">
467
-                <button class="btn-solid-blue" v-on:click="backToListView()">Back</button>
473
+            <div v-else>
474
+              <div class="row">
475
+                <div class="text-center col-6">
476
+                  <button class="btn-solid-blue" v-on:click="paygateRedirect()">
477
+                    MAKE PAYMENT
478
+                  </button>
479
+                </div>
468
               </div>
480
               </div>
469
             </div>
481
             </div>
470
           </div>
482
           </div>
506
       selectedPublish: {},
518
       selectedPublish: {},
507
       dateParam: {},
519
       dateParam: {},
508
       depDateParam: {},
520
       depDateParam: {},
509
-      pubDateParam: {}
521
+      pubDateParam: {},
522
+      boolAwaitingPayment: false
510
     };
523
     };
511
   },
524
   },
512
   components: {
525
   components: {
514
     Alert
527
     Alert
515
   },
528
   },
516
   async mounted() {
529
   async mounted() {
530
+    this.getStatusList();
517
     this.getWeek(this.weekParam.id).then(() => {
531
     this.getWeek(this.weekParam.id).then(() => {
518
       this.wait = false;
532
       this.wait = false;
519
     });
533
     });
544
     this.depDateParam = depDate;
558
     this.depDateParam = depDate;
545
     var datePub = new Date(this.weekParam.pulbishedDate).toISOString().substring(0, 10);
559
     var datePub = new Date(this.weekParam.pulbishedDate).toISOString().substring(0, 10);
546
     this.pubDateParam = datePub;
560
     this.pubDateParam = datePub;
561
+    if (this.weekParam.status.description === "Awaiting Payment") {
562
+      if (this.ROLE !== "Super Admin") {
563
+        this.boolAwaitingPayment = true;
564
+      }
565
+    }
547
   },
566
   },
548
   created() {
567
   created() {
549
     this.initTimeshare(this.weekId);
568
     this.initTimeshare(this.weekId);
566
     ...mapState("individual", ["indiv"]),
585
     ...mapState("individual", ["indiv"]),
567
     ...mapState("authentication", ["isLoggedIn"]),
586
     ...mapState("authentication", ["isLoggedIn"]),
568
     ...mapState("myWeeks", ["items", "week"]),
587
     ...mapState("myWeeks", ["items", "week"]),
588
+    ...mapState("status", ["statusList"]),
569
     ...mapGetters({
589
     ...mapGetters({
570
       user: "authentication/getUser",
590
       user: "authentication/getUser",
571
       person: "authentication/getPerson"
591
       person: "authentication/getPerson"
572
     }),
592
     }),
573
     ...mapState("bank", ["banks"]),
593
     ...mapState("bank", ["banks"]),
594
+    ...mapGetters("fees", ["getListingFee"]),
574
     refAgent() {
595
     refAgent() {
575
       return this.sellItem && this.sellItem.referedByAgent;
596
       return this.sellItem && this.sellItem.referedByAgent;
576
     },
597
     },
598
+    ROLE() {
599
+      var userObj = JSON.parse(localStorage.getItem("user"));
600
+      return userObj.role;
601
+    },
577
     filteredResort() {
602
     filteredResort() {
578
       let list = [];
603
       let list = [];
579
       if (this.week && this.week.region && this.selectedRegion) {
604
       if (this.week && this.week.region && this.selectedRegion) {
598
     ...mapActions("payment", ["addPayment"]),
623
     ...mapActions("payment", ["addPayment"]),
599
     ...mapActions("bank", ["getBanks"]),
624
     ...mapActions("bank", ["getBanks"]),
600
     ...mapActions("myWeeks", ["getItems", "getWeek", "editSave"]),
625
     ...mapActions("myWeeks", ["getItems", "getWeek", "editSave"]),
626
+    ...mapActions("status", ["getStatusList"]),
601
     newSale() {
627
     newSale() {
602
       this.weekId = 0;
628
       this.weekId = 0;
603
       this.getBlankWeek();
629
       this.getBlankWeek();
655
       delete this.weekParam.owner.howMarried;
681
       delete this.weekParam.owner.howMarried;
656
       delete this.weekParam.cellNumber;
682
       delete this.weekParam.cellNumber;
657
       //console.log(JSON.stringify(this.weekParam));
683
       //console.log(JSON.stringify(this.weekParam));
684
+      //console.log(this.weekParam);
658
       this.editSave(this.weekParam).then(() => {
685
       this.editSave(this.weekParam).then(() => {
659
         this.backToListView();
686
         this.backToListView();
660
       });
687
       });
679
     },
706
     },
680
     backToListView() {
707
     backToListView() {
681
       this.$router.push("/status/timeshareAdmin");
708
       this.$router.push("/status/timeshareAdmin");
709
+    },
710
+    paygateRedirect() {
711
+      var amount = this.getListingFee.amount;
712
+      var paymentObj = {
713
+        timeshareWeekId: this.weekParam.id, // this.sellItem.Id,
714
+        propertyId: 0,
715
+        creatydById: Log.getUser().id, //Log.getUser().id,
716
+        amount: amount,
717
+        paymentStatus: "",
718
+        paymentToken: ""
719
+      };
720
+
721
+      this.addPayment(paymentObj).then(res => {
722
+        this.$router.push({
723
+          name: "PaymentGateway",
724
+          params: {
725
+            paymentReqId: res.PAY_REQUEST_ID,
726
+            checksum: res.CHECKSUM
727
+          }
728
+        });
729
+      });
682
     }
730
     }
683
   }
731
   }
684
 };
732
 };

+ 70
- 0
src/components/admin/status/statusEdit.vue View File

1
+<template>
2
+  <main id="main" style="margin-top:200px; padding-bottom:50px">
3
+    <div class="container">
4
+      <div class="row">
5
+        <div class="col">
6
+          <div class="section-header">
7
+            <h2>New Status</h2>
8
+          </div>
9
+        </div>
10
+      </div>
11
+      <div class="row">
12
+        <div class="col">
13
+          <float-label>
14
+            <input
15
+              type="text"
16
+              placeholder="CODE"
17
+              v-model="singleStatus.code"
18
+              class="form-control uniInput"
19
+            />
20
+          </float-label>
21
+        </div>
22
+        <div class="col">
23
+          <float-label>
24
+            <input
25
+              type="text"
26
+              placeholder="DESCRIPTION"
27
+              v-model="singleStatus.description"
28
+              class="form-control uniInput"
29
+            />
30
+          </float-label>
31
+        </div>
32
+      </div>
33
+      <div class="row mt-4">
34
+        <div class="col">
35
+          <button class="btn-solid-blue" @click="pushToApi()">EDIT</button>
36
+        </div>
37
+        <div class="col">
38
+          <router-link class="btn-solid-blue" to="/status/list">BACK</router-link>
39
+        </div>
40
+      </div>
41
+    </div>
42
+  </main>
43
+</template>
44
+
45
+<script>
46
+/* eslint-disable */
47
+import { mapActions, mapState } from "vuex";
48
+
49
+export default {
50
+  data() {
51
+    return {
52
+      status: {}
53
+    };
54
+  },
55
+  created() {
56
+    this.getSingleStatus(this.$route.params.id);
57
+  },
58
+  computed: {
59
+    ...mapState("status", ["singleStatus"])
60
+  },
61
+  methods: {
62
+    ...mapActions("status", ["updateStatus", "getSingleStatus"]),
63
+    pushToApi() {
64
+      this.updateStatus(this.singleStatus).then(this.$router.push("/status/list"));
65
+    }
66
+  }
67
+};
68
+</script>
69
+
70
+<style lang="scss" scoped></style>

+ 63
- 0
src/components/admin/status/statusNew.vue View File

1
+<template>
2
+  <main id="main" style="margin-top:200px; padding-bottom:50px">
3
+    <div class="container">
4
+      <div class="row">
5
+        <div class="col">
6
+          <div class="section-header">
7
+            <h2>New Status</h2>
8
+          </div>
9
+        </div>
10
+      </div>
11
+      <div class="row">
12
+        <div class="col">
13
+          <float-label>
14
+            <input
15
+              type="text"
16
+              placeholder="CODE"
17
+              v-model="status.code"
18
+              class="form-control uniInput"
19
+            />
20
+          </float-label>
21
+        </div>
22
+        <div class="col">
23
+          <float-label>
24
+            <input
25
+              type="text"
26
+              placeholder="DESCRIPTION"
27
+              v-model="status.description"
28
+              class="form-control uniInput"
29
+            />
30
+          </float-label>
31
+        </div>
32
+      </div>
33
+      <div class="row mt-4">
34
+        <div class="col">
35
+          <button class="btn-solid-blue" @click="pushToApi()">SAVE</button>
36
+        </div>
37
+        <div class="col">
38
+          <router-link class="btn-solid-blue" to="/status/list">BACK</router-link>
39
+        </div>
40
+      </div>
41
+    </div>
42
+  </main>
43
+</template>
44
+
45
+<script>
46
+import { mapActions } from "vuex";
47
+/* eslint-disable */
48
+export default {
49
+  data() {
50
+    return {
51
+      status: {}
52
+    };
53
+  },
54
+  methods: {
55
+    ...mapActions("status", ["createNewStatus"]),
56
+    pushToApi() {
57
+      this.createNewStatus(this.status).then(this.$router.push("/status/list"));
58
+    }
59
+  }
60
+};
61
+</script>
62
+
63
+<style lang="scss" scoped></style>

+ 25
- 2
src/components/admin/status/statusPage.vue View File

11
       </div>
11
       </div>
12
     </div>
12
     </div>
13
     <div v-if="checkAccess" class="container">
13
     <div v-if="checkAccess" class="container">
14
-      <ListView :items="statusList" :columnCount="4" :compact="false" :showNew="false" />
14
+      <ListView
15
+        :items="statusList"
16
+        :showColumnChooser="false"
17
+        :columnCount="4"
18
+        :hideSearch="true"
19
+        :compact="false"
20
+        :showNew="true"
21
+        :editable="true"
22
+        :deleteable="true"
23
+        @onEdit="Edit"
24
+        @onDelete="Delete"
25
+        @onNew="New"
26
+      />
15
     </div>
27
     </div>
16
     <div v-else>
28
     <div v-else>
17
       <alert :text="'You don\'t have permission to view this page'" :type="'ERROR'" />
29
       <alert :text="'You don\'t have permission to view this page'" :type="'ERROR'" />
47
     }
59
     }
48
   },
60
   },
49
   methods: {
61
   methods: {
50
-    ...mapActions("status", ["getStatusList"])
62
+    ...mapActions("status", ["getStatusList", "deleteStatus"]),
63
+    New() {
64
+      this.$router.push("/status/new");
65
+    },
66
+    Edit(item) {
67
+      this.$router.push({
68
+        path: `/status/Edit/${item.id}`
69
+      });
70
+    },
71
+    Delete(item) {
72
+      this.deleteStatus(item.id);
73
+    }
51
   }
74
   }
52
 };
75
 };
53
 </script>
76
 </script>

+ 9
- 16
src/components/admin/status/timeshareAdminList.vue View File

62
                 <td>{{ item.region.regionName }}</td>
62
                 <td>{{ item.region.regionName }}</td>
63
                 <td>{{ item.sellPrice | toCurrency }}</td>
63
                 <td>{{ item.sellPrice | toCurrency }}</td>
64
                 <td>{{ item.pulbishedDate | toDate }}</td>
64
                 <td>{{ item.pulbishedDate | toDate }}</td>
65
-                <td>{{ item.weekStatus }}</td>
65
+                <td>{{ item.status.description }}</td>
66
                 <td v-if="!item.publish">
66
                 <td v-if="!item.publish">
67
                   <a v-on:click="Publish(item)">
67
                   <a v-on:click="Publish(item)">
68
                     <img src="../../../../public/img/icons/Upload.png" height="25" width="25" />
68
                     <img src="../../../../public/img/icons/Upload.png" height="25" width="25" />
186
   },
186
   },
187
   methods: {
187
   methods: {
188
     ...mapActions("myWeeks", ["getAllItems"]),
188
     ...mapActions("myWeeks", ["getAllItems"]),
189
-    ...mapActions("myWeeks", ["getItems", "verifyWeek", "editSave"]),
189
+    ...mapActions("myWeeks", ["getItems", "verifyWeek", "editSave", "publishOnly"]),
190
     Publish(item) {
190
     Publish(item) {
191
       var today = new Date();
191
       var today = new Date();
192
       var dd = String(today.getDate()).padStart(2, "0");
192
       var dd = String(today.getDate()).padStart(2, "0");
194
       var yyyy = today.getFullYear();
194
       var yyyy = today.getFullYear();
195
       item.pulbishedDate = today.toISOString().substring(0, 19);
195
       item.pulbishedDate = today.toISOString().substring(0, 19);
196
       item.publish = true;
196
       item.publish = true;
197
-      item.owner = {
198
-        name: item.owner
199
-      };
200
-      item.agent = {
201
-        name: item.agent
202
-      };
197
+      item.status.id = 26;
198
+      item.status.code = "FS";
199
+      item.status.description = "For Sale";
200
+      item.status.statusType = true;
203
       console.log(JSON.stringify(item));
201
       console.log(JSON.stringify(item));
204
-      this.editSave(item);
202
+      this.publishOnly(item);
205
     },
203
     },
206
     Unpublish(item) {
204
     Unpublish(item) {
207
       item.publish = false;
205
       item.publish = false;
208
-      item.owner = {
209
-        name: item.owner
210
-      };
211
-      item.agent = {
212
-        name: item.agent
213
-      };
206
+
214
       console.log(item);
207
       console.log(item);
215
-      this.editSave(item);
208
+      this.publishOnly(item);
216
     },
209
     },
217
     Edit(item) {
210
     Edit(item) {
218
       this.$router.push({ name: "EditTimeshare", params: { weekParam: item } });
211
       this.$router.push({ name: "EditTimeshare", params: { weekParam: item } });

+ 1
- 1
src/components/financial/OrderThankYou.vue View File

5
         <div class="col-md-6">
5
         <div class="col-md-6">
6
           <div class="intro-content box text-center">
6
           <div class="intro-content box text-center">
7
             <h2>Thank you!</h2>
7
             <h2>Thank you!</h2>
8
-            <p>Your payment has been received and your propery will be listed</p>
8
+            <p>Your payment has been received and your property will be listed</p>
9
           </div>
9
           </div>
10
         </div>
10
         </div>
11
       </div>
11
       </div>

+ 65
- 0
src/components/financial/paymentError.vue View File

1
+<template>
2
+  <section id="intro">
3
+    <div class="container">
4
+      <div class="row">
5
+        <div class="col-md-6">
6
+          <div class="intro-content box text-center">
7
+            <h2 style="color:black">Error!</h2>
8
+            <p style="color:black">An error has occcured with your payment.</p>
9
+            <p style="color:black">Error: {{ payment[0].paymentStatus }}</p>
10
+          </div>
11
+        </div>
12
+      </div>
13
+    </div>
14
+
15
+    <carousel
16
+      :nav="false"
17
+      :dots="false"
18
+      :items="1"
19
+      :autoplay="true"
20
+      :loop="true"
21
+      :autoHeight="true"
22
+      id="intro-carousel"
23
+      style="margin-top:-50px;"
24
+      :responsive="{ 0: { items: 1, nav: false }, 600: { items: 1, nav: false } }"
25
+    >
26
+      <img class="item" src="/img/intro-carousel/home-1.jpg" alt="" />
27
+      <img class="item" src="/img/intro-carousel/16.jpg" alt="" />
28
+      <img class="item" src="/img/intro-carousel/comm-1.jpg" alt="" />
29
+      <img class="item" src="/img/intro-carousel/comm-4.jpg" alt="" />
30
+      <img class="item" src="/img/intro-carousel/3.jpg" alt="" />
31
+      <img class="item" src="/img/intro-carousel/home-5.jpg" alt="" />
32
+    </carousel>
33
+  </section>
34
+</template>
35
+
36
+<script>
37
+/* eslint-disable */
38
+import carousel from "vue-owl-carousel";
39
+import { mapActions, mapState } from "vuex";
40
+export default {
41
+  components: {
42
+    carousel
43
+  },
44
+  data() {
45
+    return {
46
+      boolLoaded: false
47
+    };
48
+  },
49
+  created() {
50
+    this.getPayment(this.$route.params.id);
51
+  },
52
+  computed: {
53
+    ...mapState("payment", ["payment"])
54
+  },
55
+  methods: {
56
+    ...mapActions("payment", ["getPayment"])
57
+  }
58
+};
59
+</script>
60
+
61
+<style lang="scss" scoped>
62
+.box {
63
+  background-color: rgba(255, 67, 67, 0.6) !important;
64
+}
65
+</style>

+ 4
- 11
src/components/financial/payments.vue View File

10
       </div>
10
       </div>
11
       <div v-if="checkAccess" class="row">
11
       <div v-if="checkAccess" class="row">
12
         <div class="col">
12
         <div class="col">
13
-          <listView
14
-            :items="payments"
15
-            :showNew="false"
16
-            :editable="true"
17
-            :deleteable="true"
18
-            @onEdit="Edit"
19
-            @onDelete="Delete"
20
-          />
13
+          <listView :items="payments" :showNew="false" @onEdit="Edit" @onDelete="Delete" />
21
         </div>
14
         </div>
22
       </div>
15
       </div>
23
       <div v-else class="row">
16
       <div v-else class="row">
49
     };
42
     };
50
   },
43
   },
51
   methods: {
44
   methods: {
52
-    ...mapActions("Payment", ["getPayments"])
45
+    ...mapActions("payment", ["getPayments"])
53
   },
46
   },
54
   mounted() {
47
   mounted() {
55
-    this.getProperties(Object.assign(this.user.id));
48
+    this.getPayments();
56
   },
49
   },
57
   computed: {
50
   computed: {
58
-    ...mapState("Payment", ["payments"]),
51
+    ...mapState("payment", ["payments"]),
59
     UserChanged() {
52
     UserChanged() {
60
       this.getProperties(Object.assign(this.user.id));
53
       this.getProperties(Object.assign(this.user.id));
61
       return this.user;
54
       return this.user;

+ 2
- 2
src/components/shared/navBar.vue View File

29
                   <a href="#">
29
                   <a href="#">
30
                     <i class="fa fa-youtube"></i>
30
                     <i class="fa fa-youtube"></i>
31
                   </a>
31
                   </a>
32
-                  <a href="tel:0123456789">
32
+                  <a href="tel:012 941 8497">
33
                     <i class="fa fa-phone"></i>
33
                     <i class="fa fa-phone"></i>
34
-                    <span class="phoneIconDetail">+27 (0) 12 492 1238</span>
34
+                    <span class="phoneIconDetail">+27 (0)12 941 8497</span>
35
                   </a>
35
                   </a>
36
                   <a href="#" data-toggle="modal" data-target="#bondcal">
36
                   <a href="#" data-toggle="modal" data-target="#bondcal">
37
                     <i class="fa fa-calculator" aria-hidden="true"></i>
37
                     <i class="fa fa-calculator" aria-hidden="true"></i>

+ 8
- 3
src/components/timeshare/buy/weekListComponent.vue View File

30
             <td>{{ item.season }}</td>
30
             <td>{{ item.season }}</td>
31
             <td>{{ item.weekType }}</td>
31
             <td>{{ item.weekType }}</td>
32
             <td>{{ item.sellPrice | toCurrency }}</td>
32
             <td>{{ item.sellPrice | toCurrency }}</td>
33
-            <td v-if="item.status">{{ item.status.display }}</td>
34
-            <td v-else></td>
33
+            <td v-if="item.status">{{ item.status.description }}</td>
35
             <!-- <td>{{ item.region ? item.region.regionName : "" }}</td>
34
             <!-- <td>{{ item.region ? item.region.regionName : "" }}</td>
36
             <td>{{ item.resort ? item.resort.resortName : "" }}</td>
35
             <td>{{ item.resort ? item.resort.resortName : "" }}</td>
37
 
36
 
123
       getRegions: "weekList/getRegions"
122
       getRegions: "weekList/getRegions"
124
     }),
123
     }),
125
     DisplayItems() {
124
     DisplayItems() {
126
-      const list = this.filteredWeeks;
125
+      const list = [];
126
+      this.filteredWeeks.forEach(week => {
127
+        if (week.publish) {
128
+          list.push(week);
129
+        }
130
+      });
131
+
127
       const startSlice = (this.currentPage - 1) * this.visibleItemsPerPageCount;
132
       const startSlice = (this.currentPage - 1) * this.visibleItemsPerPageCount;
128
       let endSlice = this.currentPage * this.visibleItemsPerPageCount;
133
       let endSlice = this.currentPage * this.visibleItemsPerPageCount;
129
       if (endSlice > list.length) {
134
       if (endSlice > list.length) {

+ 19
- 0
src/router/index.js View File

44
 import Contact from "../components/shared/contact.vue";
44
 import Contact from "../components/shared/contact.vue";
45
 
45
 
46
 import Status from "../components/admin/status/statusPage.vue";
46
 import Status from "../components/admin/status/statusPage.vue";
47
+import StatusNew from '../components/admin/status/statusNew.vue'
48
+import StatusEdit from '../components/admin/status/statusEdit.vue'
49
+
47
 import timeshareAdminPage from "../components/admin/status/timeshareAdminPage.vue";
50
 import timeshareAdminPage from "../components/admin/status/timeshareAdminPage.vue";
48
 import tenderWeekAdminPage from "../components/admin/status/tenderWeekAdminPage.vue";
51
 import tenderWeekAdminPage from "../components/admin/status/tenderWeekAdminPage.vue";
49
 import userManagementPage from "../components/admin/status/userManagementPage.vue";
52
 import userManagementPage from "../components/admin/status/userManagementPage.vue";
83
 import PaymentGateway from "../components/financial/paygate/paygateProcess.vue";
86
 import PaymentGateway from "../components/financial/paygate/paygateProcess.vue";
84
 import Payments from "../components/financial/payments.vue";
87
 import Payments from "../components/financial/payments.vue";
85
 import PaymentSuccess from "../components/financial/OrderThankYou.vue";
88
 import PaymentSuccess from "../components/financial/OrderThankYou.vue";
89
+import PaymentError from '../components/financial/paymentError.vue'
86
 
90
 
87
 import LandingPages from "../components/marketing/landingPages.vue";
91
 import LandingPages from "../components/marketing/landingPages.vue";
88
 import LandingPage from "../components/marketing/landingPage.vue";
92
 import LandingPage from "../components/marketing/landingPage.vue";
437
       name: "PaymentSuccess",
441
       name: "PaymentSuccess",
438
       component: PaymentSuccess
442
       component: PaymentSuccess
439
     },
443
     },
444
+    {
445
+      path: "/payments/error/:id",
446
+      name: "PaymentError",
447
+      component: PaymentError
448
+    },
440
     {
449
     {
441
       path: "/payments",
450
       path: "/payments",
442
       name: "Payments",
451
       name: "Payments",
515
       name: "emailRecipientEdit",
524
       name: "emailRecipientEdit",
516
       component: EmailRecipientEdit,
525
       component: EmailRecipientEdit,
517
     },
526
     },
527
+    {
528
+      path: "/status/new",
529
+      name: "statusNew",
530
+      component: StatusNew,
531
+    },
532
+    {
533
+      path: "/status/Edit/:id",
534
+      name: "statusEdit",
535
+      component: StatusEdit,
536
+    },
518
   ]
537
   ]
519
 });
538
 });

+ 9
- 1
src/store/modules/timeshare/myWeeks.js View File

29
   },
29
   },
30
   getters: {
30
   getters: {
31
     getNeedsVerify(state) {
31
     getNeedsVerify(state) {
32
-      return _.filter(state.items, x => x.status && x.status.code === "A1");
32
+      return state.items
33
     }
33
     }
34
     // removeListing(state, id) {
34
     // removeListing(state, id) {
35
     //   state.myWeeks.pop(state.myWeeks.find(w => w.id === id));
35
     //   state.myWeeks.pop(state.myWeeks.find(w => w.id === id));
76
         })
76
         })
77
         .catch(console.error);
77
         .catch(console.error);
78
     },
78
     },
79
+    async publishOnly({ commit }, week) {
80
+      await axios
81
+        .put(`/api/timeshareweek/publishOnly`, week)
82
+        .then(r => {
83
+          commit("setItem", week);
84
+        })
85
+        .catch(console.error);
86
+    },
79
     async editSave({ commit }, week) {
87
     async editSave({ commit }, week) {
80
       await axios
88
       await axios
81
         .put(`/api/timeshareweek`, week)
89
         .put(`/api/timeshareweek`, week)

+ 45
- 0
src/store/modules/timeshare/status.js View File

1
+/* eslint-disable */
1
 import axios from 'axios';
2
 import axios from 'axios';
2
 
3
 
3
 export default {
4
 export default {
4
   namespaced: true,
5
   namespaced: true,
5
   state: {
6
   state: {
6
     statusList: [],
7
     statusList: [],
8
+    singleStatus: {}
7
   },
9
   },
8
   mutations: {
10
   mutations: {
9
     setStatusList(state, list) {
11
     setStatusList(state, list) {
10
       state.statusList = list;
12
       state.statusList = list;
11
     },
13
     },
14
+    addNewStatus(state, status){
15
+      state.statusList.push(status)
16
+    },
17
+    setSingleStatus(state, status){
18
+      state.singleStatus = status
19
+    },
20
+    deleteStatus(state, id){
21
+      var index = state.statusList.findIndex((stat) => stat.id == id)
22
+      state.statusList.splice(index, 1)
23
+    }
12
   },
24
   },
13
   getters: {},
25
   getters: {},
14
   actions: {
26
   actions: {
18
         .then(result => commit('setStatusList', result.data))
30
         .then(result => commit('setStatusList', result.data))
19
         .catch(console.error);
31
         .catch(console.error);
20
     },
32
     },
33
+    async getSingleStatus({commit}, id){
34
+      await axios.get('/api/status/'+ id)
35
+      .then((result) => {
36
+        commit("setSingleStatus", result.data[0])
37
+      })
38
+      .catch((e) => {
39
+        console.log(e);
40
+      })
41
+    },
42
+    async createNewStatus({commit}, status){
43
+      await axios.post("/api/status", status)
44
+      .then((result) => {
45
+        commit("addNewStatus", result.data)
46
+      })
47
+      .catch((e) => {
48
+        console.log(e);
49
+      })
50
+    },
51
+    async updateStatus({commit}, status){
52
+      await axios.put("/api/status", status)
53
+      .then((result) => {
54
+        
55
+      })
56
+      .catch((e) => {
57
+        console.log(e);
58
+      })
59
+    },
60
+    async deleteStatus({commit}, id){
61
+      await axios.delete('/api/status/'+id)
62
+      .then(() => {
63
+        commit("deleteStatus", id)
64
+      })
65
+    }
21
   },
66
   },
22
 };
67
 };

Loading…
Cancel
Save