Browse Source

Add Consent Timeshare Sell and ContactUs

master
Brian Conway 2 years ago
parent
commit
cd4c6eb9f6

+ 1
- 0
src/components/communication/contactUsLog.vue View File

@@ -62,6 +62,7 @@ export default {
62 62
         'phone',
63 63
         'message',
64 64
         'mailSource',
65
+        'consent',
65 66
         'error',
66 67
       ],
67 68
     }

+ 42
- 32
src/components/financial/payments.vue View File

@@ -1,21 +1,31 @@
1 1
 <template>
2
-  <main id="main" style="margin-top:-20px;padding-bottom:300px">
2
+  <main id="main" style="margin-top: -20px; padding-bottom: 300px;">
3 3
     <div class="container">
4
-      <div class="row">
5
-        <div class="col-md-12 col-lg-8">
6
-          <div class="section-header">
7
-            <h2>Payments</h2>
4
+      <div class="form">
5
+        <div class="row">
6
+          <div class="col-md-12 col-lg-8">
7
+            <div class="section-header">
8
+              <h2>Payments</h2>
9
+            </div>
8 10
           </div>
9 11
         </div>
10
-      </div>
11
-      <div v-if="checkAccess" class="row">
12
-        <div class="col">
13
-          <listView :items="payments" :showNew="false" @onEdit="Edit" @onDelete="Delete" />
12
+        <div v-if="checkAccess" class="row">
13
+          <div class="col">
14
+            <listView
15
+              :items="payments"
16
+              :showNew="false"
17
+              @onEdit="Edit"
18
+              @onDelete="Delete"
19
+            />
20
+          </div>
14 21
         </div>
15
-      </div>
16
-      <div v-else class="row">
17
-        <div class="col">
18
-          <alert :text="'You don\'t have permission to view this page'" :type="'ERROR'" />
22
+        <div v-else class="row">
23
+          <div class="col">
24
+            <alert
25
+              :text="'You don\'t have permission to view this page'"
26
+              :type="'ERROR'"
27
+            />
28
+          </div>
19 29
         </div>
20 30
       </div>
21 31
     </div>
@@ -24,42 +34,42 @@
24 34
 
25 35
 <script>
26 36
 /* eslint-disable */
27
-import { mapState, mapActions } from "vuex";
37
+import { mapState, mapActions } from 'vuex'
28 38
 
29
-import Log from "../../assets/Log";
30
-import alert from "../shared/alert";
31
-import listView from "../shared/listView.vue";
39
+import Log from '../../assets/Log'
40
+import alert from '../shared/alert'
41
+import listView from '../shared/listView.vue'
32 42
 
33 43
 export default {
34
-  name: "PaymentList",
44
+  name: 'PaymentList',
35 45
   components: {
36 46
     listView,
37
-    alert
47
+    alert,
38 48
   },
39 49
   data() {
40 50
     return {
41
-      userId: Log.getUser().Id
42
-    };
51
+      userId: Log.getUser().Id,
52
+    }
43 53
   },
44 54
   methods: {
45
-    ...mapActions("payment", ["getPayments"])
55
+    ...mapActions('payment', ['getPayments']),
46 56
   },
47 57
   mounted() {
48
-    this.getPayments();
58
+    this.getPayments()
49 59
   },
50 60
   computed: {
51
-    ...mapState("payment", ["payments"]),
61
+    ...mapState('payment', ['payments']),
52 62
     UserChanged() {
53
-      this.getProperties(Object.assign(this.user.id));
54
-      return this.user;
63
+      this.getProperties(Object.assign(this.user.id))
64
+      return this.user
55 65
     },
56 66
     checkAccess() {
57
-      if (Log.getUser().role === "Super Admin") {
58
-        return true;
67
+      if (Log.getUser().role === 'Super Admin') {
68
+        return true
59 69
       } else {
60
-        return false;
70
+        return false
61 71
       }
62
-    }
63
-  }
64
-};
72
+    },
73
+  },
74
+}
65 75
 </script>

+ 65
- 56
src/components/processFlow/offers.vue View File

@@ -1,41 +1,50 @@
1 1
 <template>
2
-  <main id="main" style="margin-top:-20px; padding-bottom:50px">
2
+  <main id="main" style="margin-top: -20px; padding-bottom: 50px;">
3 3
     <div class="container">
4
-      <div class="row">
5
-        <div class="col-md-12 col-lg-8">
6
-          <div class="section-header">
7
-            <h2>Bid Offers</h2>
4
+      <div class="form">
5
+        <div class="row">
6
+          <div class="col-md-12 col-lg-8">
7
+            <div class="section-header">
8
+              <h2>Bid Offers</h2>
9
+            </div>
8 10
           </div>
9 11
         </div>
10
-      </div>
11
-      <div class="container">
12
-        <listView
13
-          :items="bidItems"
14
-          :showNew="false"
15
-          :editable="true"
16
-          :deleteable="false"
17
-          :displayColumns="columns"
18
-          :displayFormats="formats"
19
-          :displayHeaders="columnHeaders"
20
-          :sortKey="'date'"
21
-          @onEdit="Edit"
22
-        />
23
-      </div>
24
-      <div :id="'myModalOffer'" class="modal fade" role="dialog" :ref="'MyModalForm'">
25
-        <div class="modal-dialog modal-lg">
26
-          <!-- Modal content-->
27
-          <div class="modal-content">
28
-            <div class="modal-header">
29
-              <button type="button" class="close" data-dismiss="modal">&times;</button>
30
-            </div>
31
-            <div padding-left="20px">
32
-              <makeOffer
33
-                name="MakeOffer"
34
-                :isMakeOffer="false"
35
-                :isProperty="item.type === 'Property'"
36
-                :canEdit="item.statusCode === 'E1'"
37
-                :item="item"
38
-              />
12
+        <div class="container">
13
+          <listView
14
+            :items="bidItems"
15
+            :showNew="false"
16
+            :editable="true"
17
+            :deleteable="false"
18
+            :displayColumns="columns"
19
+            :displayFormats="formats"
20
+            :displayHeaders="columnHeaders"
21
+            :sortKey="'date'"
22
+            @onEdit="Edit"
23
+          />
24
+        </div>
25
+        <div
26
+          :id="'myModalOffer'"
27
+          class="modal fade"
28
+          role="dialog"
29
+          :ref="'MyModalForm'"
30
+        >
31
+          <div class="modal-dialog modal-lg">
32
+            <!-- Modal content-->
33
+            <div class="modal-content">
34
+              <div class="modal-header">
35
+                <button type="button" class="close" data-dismiss="modal">
36
+                  &times;
37
+                </button>
38
+              </div>
39
+              <div padding-left="20px">
40
+                <makeOffer
41
+                  name="MakeOffer"
42
+                  :isMakeOffer="false"
43
+                  :isProperty="item.type === 'Property'"
44
+                  :canEdit="item.statusCode === 'E1'"
45
+                  :item="item"
46
+                />
47
+              </div>
39 48
             </div>
40 49
           </div>
41 50
         </div>
@@ -45,44 +54,44 @@
45 54
 </template>
46 55
 
47 56
 <script>
48
-import { mapState, mapActions } from "vuex";
49
-import makeOffer from "./makeOffer.vue";
50
-import listView from "../shared/listView.vue";
51
-import Log from "../../assets/Log";
57
+import { mapState, mapActions } from 'vuex'
58
+import makeOffer from './makeOffer.vue'
59
+import listView from '../shared/listView.vue'
60
+import Log from '../../assets/Log'
52 61
 
53 62
 export default {
54
-  name: "offers",
63
+  name: 'offers',
55 64
   components: { makeOffer, listView },
56 65
   data() {
57 66
     return {
58 67
       item: {},
59 68
       columns: [
60
-        "date",
61
-        "type",
62
-        "shortDescription",
63
-        "status",
64
-        "price",
65
-        "offer",
66
-        "madeBy",
69
+        'date',
70
+        'type',
71
+        'shortDescription',
72
+        'status',
73
+        'price',
74
+        'offer',
75
+        'madeBy',
67 76
       ],
68
-      formats: ["date", "text", "text", "text", "money", "money", "text"],
69
-      columnHeaders: ["", "", "description", "", "", "offerPrice", "offerBy"],
70
-    };
77
+      formats: ['date', 'text', 'text', 'text', 'money', 'money', 'text'],
78
+      columnHeaders: ['', '', 'description', '', '', 'offerPrice', 'offerBy'],
79
+    }
71 80
   },
72 81
   methods: {
73
-    ...mapActions("bid", ["getBids"]),
82
+    ...mapActions('bid', ['getBids']),
74 83
     Edit(item) {
75
-      this.item = item;
84
+      this.item = item
76 85
 
77
-      const element = this.$refs.MyModalForm;
78
-      $(element).modal("show");
86
+      const element = this.$refs.MyModalForm
87
+      $(element).modal('show')
79 88
     },
80 89
   },
81 90
   computed: {
82
-    ...mapState("bid", ["bidItems"]),
91
+    ...mapState('bid', ['bidItems']),
83 92
   },
84 93
   mounted() {
85
-    this.getBids(Log.getUser().username);
94
+    this.getBids(Log.getUser().username)
86 95
   },
87
-};
96
+}
88 97
 </script>

+ 44
- 1
src/components/shared/contactUsSection.vue View File

@@ -101,6 +101,43 @@
101 101
       </div>
102 102
 
103 103
       <div class="form-group"></div>
104
+      <textarea
105
+        class="form-control"
106
+        name="message"
107
+        rows="5"
108
+        data-rule="required"
109
+        data-msg="Please write something for us"
110
+        placeholder="Message"
111
+        v-model="message"
112
+        v-bind:class="{
113
+          'is-valid': message,
114
+          'is-invalid': !requiredField(message) && messageLoad,
115
+        }"
116
+        v-on:keyup="messageLoad = true"
117
+        v-on:blur="messageLoad = true"
118
+      ></textarea>
119
+      <div class="invalid-feedback">
120
+        Message is required!
121
+      </div>
122
+      <div align="left" class="custom-control custom-switch mb-2">
123
+        <div class="row">
124
+          <div align="center" class="col">
125
+            <label class="mr-5">
126
+              I wish to receive future listings and special campaigns?
127
+            </label>
128
+            <input
129
+              type="checkbox"
130
+              class="custom-control-input"
131
+              id="contactUscustomSwitch1"
132
+              :checked="consent"
133
+              @change="changeConsent"
134
+            />
135
+            <label class="custom-control-label" for="contactUscustomSwitch1">
136
+              {{ consent ? 'Yes' : 'No' }}
137
+            </label>
138
+          </div>
139
+        </div>
140
+      </div>
104 141
       <div class="text-center">
105 142
         <button class="btn-white-border" @click="sendMail()">Send</button>
106 143
       </div>
@@ -132,6 +169,7 @@ export default {
132 169
       contactemail: '',
133 170
       phone: '',
134 171
       property: '',
172
+      consent: true,
135 173
       message: '',
136 174
       boolSent: false,
137 175
       errorOccurred: '',
@@ -169,6 +207,7 @@ export default {
169 207
           property: this.property,
170 208
           message: this.message,
171 209
           mailSourceId: this.mailSourceId,
210
+          consent: this.consent,
172 211
         }
173 212
         await axios
174 213
           .post('/api/mail/0', mailObj)
@@ -200,6 +239,7 @@ export default {
200 239
         this.phone = ''
201 240
         this.property = ''
202 241
         this.message = ''
242
+        this.consent = true
203 243
         this.mailSource = ''
204 244
         this.nameLoad = false
205 245
         this.contactemailLoad = false
@@ -212,7 +252,7 @@ export default {
212 252
     },
213 253
     validatePage: function () {
214 254
       //console.log('validatePage')
215
-      if (this.name && this.contactemail && this.mailSource) {
255
+      if (this.name && this.contactemail && this.mailSource && this.message) {
216 256
         this.errorOccurred = ''
217 257
         this.errorMessage = ''
218 258
         this.boolValidationError = false
@@ -228,6 +268,9 @@ export default {
228 268
         return false
229 269
       }
230 270
     },
271
+    changeConsent() {
272
+      this.consent = !this.consent
273
+    },
231 274
     requiredField: function (tfield) {
232 275
       if (tfield) {
233 276
         return true

+ 23
- 0
src/components/timeshare/sell/contentSectionNew.vue View File

@@ -1196,6 +1196,25 @@
1196 1196
                     <alert :text="errorMessage" :type="errorOccurred" />
1197 1197
                   </div>
1198 1198
                 </div>
1199
+                <div align="left" class="custom-control custom-switch mb-2">
1200
+                  <div class="row">
1201
+                    <div align="center" class="col">
1202
+                      <label class="mr-5">
1203
+                        I wish to receive future listings and special campaigns?
1204
+                      </label>
1205
+                      <input
1206
+                        type="checkbox"
1207
+                        class="custom-control-input"
1208
+                        id="customSwitch5"
1209
+                        :checked="sellItem.consent"
1210
+                        @change="changeConsent"
1211
+                      />
1212
+                      <label class="custom-control-label" for="customSwitch5">
1213
+                        {{ sellItem.consent ? 'Yes' : 'No' }}
1214
+                      </label>
1215
+                    </div>
1216
+                  </div>
1217
+                </div>
1199 1218
                 <div class="text-center col-12" v-if="CanSave">
1200 1219
                   <button
1201 1220
                     class="btn-white-border"
@@ -1591,6 +1610,9 @@ export default {
1591 1610
       this.sellItem.agency = undefined
1592 1611
       this.sellItem.referedByAgent = !this.sellItem.referedByAgent
1593 1612
     },
1613
+    changeConsent() {
1614
+      this.sellItem.consent = !this.sellItem.consent
1615
+    },
1594 1616
     changeLeviesPaidInFull() {
1595 1617
       this.sellItem.leviesPaidInFull = !this.sellItem.leviesPaidInFull
1596 1618
     },
@@ -1656,6 +1678,7 @@ export default {
1656 1678
         this.sellItem.mandateDate = undefined
1657 1679
       }
1658 1680
     },
1681
+
1659 1682
     requiredField: function (tfield) {
1660 1683
       if (tfield) {
1661 1684
         return true

+ 37
- 35
src/components/user/forgotPassword.vue View File

@@ -1,44 +1,46 @@
1 1
 <template>
2 2
   <main id="main" style="padding-top: 10px; padding-bottom: 50px;">
3
-    <div class="form">
4
-      <div class="row">
5
-        <div class="col">
6
-          <div class="section-header">
7
-            <h2>Forgot Password</h2>
3
+    <div class="container">
4
+      <div class="form">
5
+        <div class="row">
6
+          <div class="col">
7
+            <div class="section-header">
8
+              <h2>Forgot Password</h2>
9
+            </div>
8 10
           </div>
9 11
         </div>
10
-      </div>
11
-      <div class="row mb-4">
12
-        <div class="col">
13
-          <alert :text="errorMessage" :type="errorOccurred" />
12
+        <div class="row mb-4">
13
+          <div class="col">
14
+            <alert :text="errorMessage" :type="errorOccurred" />
15
+          </div>
14 16
         </div>
15
-      </div>
16
-      <div class="row">
17
-        <div class="col-md-6">
18
-          <float-label label="Email" style="width: 100%;">
19
-            <input
20
-              type="email"
21
-              id="email"
22
-              name="email"
23
-              placeholder="Email"
24
-              class="form-control uniInput"
25
-              v-model="email"
26
-              v-bind:class="{
27
-                'is-valid': email,
28
-                'is-invalid': !validEmail(email) && emailLoad,
29
-              }"
30
-              v-on:keyup="emailLoad = true"
31
-              v-on:blur="emailLoad = true"
32
-              required
33
-              icon
34
-            />
35
-            <div class="invalid-feedback">Valid Email is required!</div>
36
-          </float-label>
17
+        <div class="row">
18
+          <div class="col-md-6">
19
+            <float-label label="Email" style="width: 100%;">
20
+              <input
21
+                type="email"
22
+                id="email"
23
+                name="email"
24
+                placeholder="Email"
25
+                class="form-control uniInput"
26
+                v-model="email"
27
+                v-bind:class="{
28
+                  'is-valid': email,
29
+                  'is-invalid': !validEmail(email) && emailLoad,
30
+                }"
31
+                v-on:keyup="emailLoad = true"
32
+                v-on:blur="emailLoad = true"
33
+                required
34
+                icon
35
+              />
36
+              <div class="invalid-feedback">Valid Email is required!</div>
37
+            </float-label>
38
+          </div>
37 39
         </div>
38
-      </div>
39
-      <div class="row mt-2">
40
-        <div class="col-md-6">
41
-          <button class="btn-white-border" @click="checkMail()">SEND</button>
40
+        <div class="row mt-2">
41
+          <div class="col-md-6">
42
+            <button class="btn-white-border" @click="checkMail()">SEND</button>
43
+          </div>
42 44
         </div>
43 45
       </div>
44 46
     </div>

+ 154
- 152
src/store/modules/communication/template.js View File

@@ -1,155 +1,157 @@
1 1
 /* eslint-disable */
2
-import axios from 'axios';
3
-import { result } from 'lodash';
2
+import axios from 'axios'
3
+import { result } from 'lodash'
4 4
 
5 5
 export default {
6
-  namespaced: true,
7
-  state: {
8
-    list: [],
9
-    singleTemp: {},
10
-    item: {},
11
-    message: undefined,
12
-    recipients: [],
13
-    recipient: {},
14
-    contactUsLog: [],
15
-    enquireNowLog: []
16
-  },
17
-  mutations: {
18
-    setList(state, list) {
19
-      state.list = list;
20
-    },
21
-    setSingle(state, template){
22
-      state.singleTemp = template
23
-    },
24
-    setRecipients(state, recips){
25
-      state.recipients = recips
26
-    },
27
-    setRecipient(state, recip){
28
-      state.recipient = recip
29
-    },
30
-    removeRecipient(state, id){
31
-      var index = state.recipients.findIndex((recip) => recip.id == id)
32
-      state.recipients.splice(index, 1)
33
-    },
34
-    deleteTemplate(state, id){
35
-      var index = state.list.findIndex((template) => template.id == id)
36
-      state.list.splice(index, 1)
37
-    },
38
-    setContactUsLog(state, log){
39
-      state.contactUsLog = log
40
-    },
41
-    setEnquireNowLog(state, log){
42
-      console.log(log);
43
-      state.enquireNowLog = log
44
-    },
45
-  },
46
-  getters: {
47
-  },
48
-  actions: {
49
-    getList({
50
-      commit,
51
-    }) {
52
-      axios
53
-        .get('/api/template/getSimple')
54
-        .then(result => commit('setList', result.data))
55
-        .catch(ex => console.log(ex.response));
56
-    },
57
-    async getSingleTemplate({commit}, id){
58
-      await axios.get('/api/template/' + id)
59
-      .then(result => commit('setSingle', result.data[0]))
60
-      .catch(ex => console.log(ex.response))
61
-    },
62
-    addItem({
63
-      dispatch,
64
-    }, item) {
65
-      axios
66
-        .post('/api/template', item)
67
-        .then(() => dispatch('getList'))
68
-        .catch((ex) => {
69
-          return Promise.reject(ex.response)
70
-        });
71
-    },
72
-    editItem({
73
-      dispatch,
74
-    }, item) {
75
-      axios
76
-        .put(`/api/template/${item.id}`, item)
77
-        .then(() => dispatch('getList'))
78
-        .catch((ex) => {
79
-          return Promise.reject(ex.response)
80
-        });
81
-    },
82
-    async deleteMailTemplate({commit}, id){
83
-      await axios.delete('/api/template/'+ id)
84
-      .then(() => {
85
-        commit("deleteTemplate", id)
86
-      })
87
-      .catch((ex) => {
88
-        return Promise.reject(ex.response)
89
-      })
90
-    },
91
-    async getMailRecipients({commit}){
92
-      await axios.get('/api/mail/mailrecipients')
93
-      .then((result) => {
94
-        commit("setRecipients", result.data)
95
-      })
96
-      .catch((e) => {
97
-        console.log(e.response);
98
-      })
99
-    },
100
-    async getMailRecipientById({commit}, id){
101
-      await axios.get('/api/mail/mailrecipient/' + id)
102
-      .then((result) => {
103
-        commit("setRecipient", result.data)
104
-      })
105
-      .catch((e) => {
106
-        console.log(e.response);
107
-      })
108
-    },
109
-    async addMailRecipient({commit}, rec){
110
-      await axios.post('/api/mail/mailrecipient', rec)
111
-      .then((result) => {
112
-        console.log(result);
113
-      })
114
-      .catch((e) => {
115
-        console.log(e.response);
116
-      })
117
-    },
118
-    async updateMailRecipient({commit}, rec){
119
-      await axios.put('/api/mail/mailrecipients', rec)
120
-      .then((result) => {
121
-        console.log(result);
122
-      })
123
-      .catch((e) => {
124
-        console.log(e.response);
125
-      })
126
-    },
127
-    async deleteMailRecipient({commit}, id){
128
-      await axios.delete('/api/mail/mailrecipient/'+ id)
129
-      .then(() => {
130
-        commit("removeRecipient", id)
131
-      })
132
-      .catch((e) => {
133
-        console.log(e.response);
134
-      })
135
-    },
136
-    async getContactUsLog({commit}){
137
-      await axios.get('/api/mail/getContactLog/')
138
-      .then((result) => {
139
-        commit("setContactUsLog", result.data)
140
-      })
141
-      .catch((response) => {
142
-        console.log(response.response);
143
-      })
144
-    },
145
-    async getEnquireNowLog({commit}){
146
-      await axios.get('/api/mail/getEnquireLog/')
147
-      .then((result) => {
148
-        commit("setEnquireNowLog", result.data)
149
-      })
150
-      .catch((response) => {
151
-        console.log(response.response);
152
-      })
153
-    }
154
-  },
155
-};
6
+    namespaced: true,
7
+    state: {
8
+        list: [],
9
+        singleTemp: {},
10
+        item: {},
11
+        message: undefined,
12
+        recipients: [],
13
+        recipient: {},
14
+        contactUsLog: [],
15
+        enquireNowLog: [],
16
+    },
17
+    mutations: {
18
+        setList(state, list) {
19
+            state.list = list
20
+        },
21
+        setSingle(state, template) {
22
+            state.singleTemp = template
23
+        },
24
+        setRecipients(state, recips) {
25
+            state.recipients = recips
26
+        },
27
+        setRecipient(state, recip) {
28
+            state.recipient = recip
29
+        },
30
+        removeRecipient(state, id) {
31
+            var index = state.recipients.findIndex((recip) => recip.id == id)
32
+            state.recipients.splice(index, 1)
33
+        },
34
+        deleteTemplate(state, id) {
35
+            var index = state.list.findIndex((template) => template.id == id)
36
+            state.list.splice(index, 1)
37
+        },
38
+        setContactUsLog(state, log) {
39
+            state.contactUsLog = log
40
+        },
41
+        setEnquireNowLog(state, log) {
42
+            console.log(log)
43
+            state.enquireNowLog = log
44
+        },
45
+    },
46
+    getters: {},
47
+    actions: {
48
+        getList({ commit }) {
49
+            axios
50
+                .get('/api/template/getSimple')
51
+                .then((result) => commit('setList', result.data))
52
+                .catch((ex) => console.log(ex.response))
53
+        },
54
+        async getSingleTemplate({ commit }, id) {
55
+            await axios
56
+                .get('/api/template/' + id)
57
+                .then((result) => commit('setSingle', result.data[0]))
58
+                .catch((ex) => console.log(ex.response))
59
+        },
60
+        addItem({ dispatch }, item) {
61
+            axios
62
+                .post('/api/template', item)
63
+                .then(() => dispatch('getList'))
64
+                .catch((ex) => {
65
+                    return Promise.reject(ex.response)
66
+                })
67
+        },
68
+        editItem({ dispatch }, item) {
69
+            axios
70
+                .put(`/api/template/${item.id}`, item)
71
+                .then(() => dispatch('getList'))
72
+                .catch((ex) => {
73
+                    return Promise.reject(ex.response)
74
+                })
75
+        },
76
+        async deleteMailTemplate({ commit }, id) {
77
+            await axios
78
+                .delete('/api/template/' + id)
79
+                .then(() => {
80
+                    commit('deleteTemplate', id)
81
+                })
82
+                .catch((ex) => {
83
+                    return Promise.reject(ex.response)
84
+                })
85
+        },
86
+        async getMailRecipients({ commit }) {
87
+            await axios
88
+                .get('/api/mail/mailrecipients')
89
+                .then((result) => {
90
+                    commit('setRecipients', result.data)
91
+                })
92
+                .catch((e) => {
93
+                    console.log(e.response)
94
+                })
95
+        },
96
+        async getMailRecipientById({ commit }, id) {
97
+            await axios
98
+                .get('/api/mail/mailrecipient/' + id)
99
+                .then((result) => {
100
+                    commit('setRecipient', result.data)
101
+                })
102
+                .catch((e) => {
103
+                    console.log(e.response)
104
+                })
105
+        },
106
+        async addMailRecipient({ commit }, rec) {
107
+            await axios
108
+                .post('/api/mail/mailrecipient', rec)
109
+                .then((result) => {
110
+                    console.log(result)
111
+                })
112
+                .catch((e) => {
113
+                    console.log(e.response)
114
+                })
115
+        },
116
+        async updateMailRecipient({ commit }, rec) {
117
+            await axios
118
+                .put('/api/mail/mailrecipients', rec)
119
+                .then((result) => {
120
+                    console.log(result)
121
+                })
122
+                .catch((e) => {
123
+                    console.log(e.response)
124
+                })
125
+        },
126
+        async deleteMailRecipient({ commit }, id) {
127
+            await axios
128
+                .delete('/api/mail/mailrecipient/' + id)
129
+                .then(() => {
130
+                    commit('removeRecipient', id)
131
+                })
132
+                .catch((e) => {
133
+                    console.log(e.response)
134
+                })
135
+        },
136
+        async getContactUsLog({ commit }) {
137
+            await axios
138
+                .get('/api/mail/getContactLog/')
139
+                .then((result) => {
140
+                    commit('setContactUsLog', result.data)
141
+                })
142
+                .catch((response) => {
143
+                    console.log(response.response)
144
+                })
145
+        },
146
+        async getEnquireNowLog({ commit }) {
147
+            await axios
148
+                .get('/api/mail/getEnquireLog/')
149
+                .then((result) => {
150
+                    commit('setEnquireNowLog', result.data)
151
+                })
152
+                .catch((response) => {
153
+                    console.log(response.response)
154
+                })
155
+        },
156
+    },
157
+}

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

@@ -53,6 +53,7 @@ export default {
53 53
             agentCommission: undefined,
54 54
             mandate: undefined,
55 55
             status: undefined,
56
+            consent: true,
56 57
             owner: {
57 58
                 address: {},
58 59
                 bankingDetails: {},

Loading…
Cancel
Save