Browse Source

Updated Communication and added logs

master
30117125 3 years ago
parent
commit
43f412b1d2

+ 4
- 0
src/components/admin/property/propertyList.vue View File

62
             </thead>
62
             </thead>
63
             <tbody>
63
             <tbody>
64
               <tr v-for="(item, i) in DisplayItems" :key="i">
64
               <tr v-for="(item, i) in DisplayItems" :key="i">
65
+                <td>#{{ item.id }}</td>
65
                 <td>{{ item.owner }}</td>
66
                 <td>{{ item.owner }}</td>
66
                 <td>{{ item.reference }}</td>
67
                 <td>{{ item.reference }}</td>
67
                 <td>{{ item.property }}</td>
68
                 <td>{{ item.property }}</td>
145
 </template>
146
 </template>
146
 
147
 
147
 <script>
148
 <script>
149
+/* eslint-disable */
148
 import { mapState, mapActions } from "vuex";
150
 import { mapState, mapActions } from "vuex";
149
 import Log from "../../../assets/Log";
151
 import Log from "../../../assets/Log";
150
 import BasePagination from "../../shared/basePagination";
152
 import BasePagination from "../../shared/basePagination";
168
       reverse: true,
170
       reverse: true,
169
       sortKey: "id",
171
       sortKey: "id",
170
       displayColumns: [
172
       displayColumns: [
173
+        "ID",
171
         "Owner",
174
         "Owner",
172
         "Reference",
175
         "Reference",
173
         "Property",
176
         "Property",
182
         "Publish"
185
         "Publish"
183
       ],
186
       ],
184
       columns: [
187
       columns: [
188
+        "id",
185
         "owner",
189
         "owner",
186
         "reference",
190
         "reference",
187
         "property",
191
         "property",

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

1
+<template>
2
+  <div v-if="!boolLoaded" id="preloader"></div>
3
+  <main v-else id="main" style="margin-top:-20px; padding-bottom:50px">
4
+    <div class="container">
5
+      <div class="row">
6
+        <div class="col">
7
+          <div class="section-header">
8
+            <h2>Contact Us Log</h2>
9
+          </div>
10
+        </div>
11
+      </div>
12
+      <div v-if="checkAccess">
13
+        <div class="container">
14
+          <div class="row">
15
+            <div class="col-md-12">
16
+              <ListView
17
+                :items="contactUsLog"
18
+                :showColumnChooser="false"
19
+                :hideSearch="false"
20
+                :compact="false"
21
+                :showNew="false"
22
+                :editable="false"
23
+                :deleteable="false"
24
+                :displayColumns="columns"
25
+              />
26
+            </div>
27
+          </div>
28
+        </div>
29
+      </div>
30
+      <div v-else>
31
+        <alert :text="'You don\'t have permission to view this page'" :type="'ERROR'" />
32
+      </div>
33
+    </div>
34
+  </main>
35
+</template>
36
+
37
+<script>
38
+/* eslint-disable */
39
+import { mapActions, mapState } from "vuex";
40
+import Log from "../../assets/Log";
41
+import alert from "../shared/alert.vue";
42
+import ListView from "../shared/listView";
43
+
44
+export default {
45
+  components: {
46
+    ListView,
47
+    alert
48
+  },
49
+  data() {
50
+    return {
51
+      boolLoaded: false,
52
+      columns: ["id", "created", "name", "email", "phone", "message", "heardFrom", "error"]
53
+    };
54
+  },
55
+  methods: {
56
+    ...mapActions("template", ["getContactUsLog"]),
57
+    async loadData() {
58
+      await this.getContactUsLog();
59
+    }
60
+  },
61
+  mounted() {
62
+    this.loadData().then(() => {
63
+      setTimeout(() => {
64
+        this.boolLoaded = true;
65
+      }, 100);
66
+    });
67
+  },
68
+  computed: {
69
+    ...mapState("template", ["contactUsLog"]),
70
+    checkAccess() {
71
+      if (Log.getUser().role === "Super Admin") {
72
+        return true;
73
+      } else {
74
+        return false;
75
+      }
76
+    }
77
+  }
78
+};
79
+</script>
80
+
81
+<style lang="scss" scoped></style>

+ 90
- 0
src/components/communication/enquireNowLog.vue View File

1
+<template>
2
+  <div v-if="!boolLoaded" id="preloader"></div>
3
+  <main v-else id="main" style="margin-top:-20px; padding-bottom:50px">
4
+    <div class="container">
5
+      <div class="row">
6
+        <div class="col">
7
+          <div class="section-header">
8
+            <h2>Enquire Now Log</h2>
9
+          </div>
10
+        </div>
11
+      </div>
12
+      <div v-if="checkAccess">
13
+        <div class="container">
14
+          <div class="row">
15
+            <div class="col-md-12">
16
+              <ListView
17
+                :items="enquireNowLog"
18
+                :showColumnChooser="false"
19
+                :hideSearch="false"
20
+                :compact="false"
21
+                :showNew="false"
22
+                :editable="false"
23
+                :deleteable="false"
24
+                :displayColumns="columns"
25
+              />
26
+            </div>
27
+          </div>
28
+        </div>
29
+      </div>
30
+      <div v-else>
31
+        <alert :text="'You don\'t have permission to view this page'" :type="'ERROR'" />
32
+      </div>
33
+    </div>
34
+  </main>
35
+</template>
36
+
37
+<script>
38
+/* eslint-disable */
39
+import { mapActions, mapState } from "vuex";
40
+import Log from "../../assets/Log";
41
+import alert from "../shared/alert.vue";
42
+import ListView from "../shared/listView";
43
+export default {
44
+  components: {
45
+    ListView,
46
+    alert
47
+  },
48
+  data() {
49
+    return {
50
+      boolLoaded: false,
51
+      columns: [
52
+        "id",
53
+        "property",
54
+        "created",
55
+        "name",
56
+        "email",
57
+        "phone",
58
+        "message",
59
+        "heardFrom",
60
+        "error"
61
+      ]
62
+    };
63
+  },
64
+  methods: {
65
+    ...mapActions("template", ["getEnquireNowLog"]),
66
+    async loadData() {
67
+      await this.getEnquireNowLog();
68
+    }
69
+  },
70
+  mounted() {
71
+    this.loadData().then(() => {
72
+      setTimeout(() => {
73
+        this.boolLoaded = true;
74
+      }, 100);
75
+    });
76
+  },
77
+  computed: {
78
+    ...mapState("template", ["enquireNowLog"]),
79
+    checkAccess() {
80
+      if (Log.getUser().role === "Super Admin") {
81
+        return true;
82
+      } else {
83
+        return false;
84
+      }
85
+    }
86
+  }
87
+};
88
+</script>
89
+
90
+<style lang="scss" scoped></style>

+ 1
- 1
src/components/property/commercial/singleView/contentSection.vue View File

39
             class="panel-left p-5"
39
             class="panel-left p-5"
40
             :class="propertyImages.length > 0 ? 'galleryImages' : 'noGalleryImages'"
40
             :class="propertyImages.length > 0 ? 'galleryImages' : 'noGalleryImages'"
41
           >
41
           >
42
-            <h2>Property Detial</h2>
42
+            <h2>Property Detail</h2>
43
             <p v-if="property.showAddress">{{ property.streetNumber }} {{ property.streetName }}</p>
43
             <p v-if="property.showAddress">{{ property.streetNumber }} {{ property.streetName }}</p>
44
             <p>{{ property.city }}, {{ property.suburb }}</p>
44
             <p>{{ property.city }}, {{ property.suburb }}</p>
45
             <div v-if="property.displayData.length > 0">
45
             <div v-if="property.displayData.length > 0">

+ 14
- 2
src/components/property/enquireNow/contentSection.vue View File

129
             <div class="validation"></div>
129
             <div class="validation"></div>
130
           </div>
130
           </div>
131
           <div class="form-group col-md-12">
131
           <div class="form-group col-md-12">
132
+            <float-label fixed label="How did you hear about this property?">
133
+              <select v-model="heardFrom" name="heardFrom" id="" class="form-control uniSelect">
134
+                <option value="Referred by someone">Referred by someone</option>
135
+                <option value="Website Search">Website Search</option>
136
+                <option value="Google Search">Google Search</option>
137
+                <option value="Social Media">Social Media</option>
138
+              </select>
139
+            </float-label>
140
+          </div>
141
+          <div class="form-group col-md-12 mt-3">
132
             <float-label>
142
             <float-label>
133
               <textarea
143
               <textarea
134
                 type="textArea"
144
                 type="textArea"
175
       contactNumber: null,
185
       contactNumber: null,
176
       property: null,
186
       property: null,
177
       message: null,
187
       message: null,
178
-      boolSent: false
188
+      boolSent: false,
189
+      heardFrom: ""
179
     };
190
     };
180
   },
191
   },
181
   mounted() {
192
   mounted() {
203
         email: this.indiv.emailAddress,
214
         email: this.indiv.emailAddress,
204
         phone: this.indiv.cellNumber,
215
         phone: this.indiv.cellNumber,
205
         property: this.property.id.toString(),
216
         property: this.property.id.toString(),
206
-        message: this.message
217
+        message: this.message,
218
+        heardFrom: this.heardFrom
207
       };
219
       };
208
 
220
 
209
       const response = await axios.post("/api/mail/1", mailObj);
221
       const response = await axios.post("/api/mail/1", mailObj);

+ 1
- 1
src/components/property/residential/singleView/contentSection.vue View File

30
             <gallery :images="Images" :index="index" @close="index = null"></gallery>
30
             <gallery :images="Images" :index="index" @close="index = null"></gallery>
31
           </div>
31
           </div>
32
           <div class="panel-left p-5" style="margin-top:130px">
32
           <div class="panel-left p-5" style="margin-top:130px">
33
-            <h2>Property Detial</h2>
33
+            <h2>Property Detail</h2>
34
 
34
 
35
             <!-- TODO: Make it dynamic -->
35
             <!-- TODO: Make it dynamic -->
36
 
36
 

+ 6
- 0
src/components/shared/navBar.vue View File

244
                           style="margin-top:-10px;text-align:left;width:250px"
244
                           style="margin-top:-10px;text-align:left;width:250px"
245
                           :class="submenu1Class"
245
                           :class="submenu1Class"
246
                         >
246
                         >
247
+                          <li>
248
+                            <router-link to="/contactUsLog">Contact Us Log</router-link>
249
+                          </li>
247
                           <li>
250
                           <li>
248
                             <router-link to="/termsConditions">Edit Terms & Conditions</router-link>
251
                             <router-link to="/termsConditions">Edit Terms & Conditions</router-link>
249
                           </li>
252
                           </li>
253
                           <li>
256
                           <li>
254
                             <router-link to="/emailRecipient">Email Recipients</router-link>
257
                             <router-link to="/emailRecipient">Email Recipients</router-link>
255
                           </li>
258
                           </li>
259
+                          <li>
260
+                            <router-link to="/enquireNowLog">Enquire Now Log</router-link>
261
+                          </li>
256
                           <li>
262
                           <li>
257
                             <router-link to="/fees">Fees</router-link>
263
                             <router-link to="/fees">Fees</router-link>
258
                           </li>
264
                           </li>

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

66
 import WebsiteDisclaimer from "../components/misc/Disclaimer/WebsiteDisclaimer.vue";
66
 import WebsiteDisclaimer from "../components/misc/Disclaimer/WebsiteDisclaimer.vue";
67
 import TermsConditions from "../components/admin/misc/termsConditions.vue";
67
 import TermsConditions from "../components/admin/misc/termsConditions.vue";
68
 import TermsConditionsView from "../components/misc/TermsConditions/termsConditions.vue";
68
 import TermsConditionsView from "../components/misc/TermsConditions/termsConditions.vue";
69
+import ContactUsLog from '../components/communication/contactUsLog.vue'
70
+import EnquireNowLog from '../components/communication/enquireNowLog.vue'
69
 
71
 
70
 import MakeOffer from "../components/processFlow/makeOffer.vue";
72
 import MakeOffer from "../components/processFlow/makeOffer.vue";
71
 import Offer from "../components/processFlow/offers.vue";
73
 import Offer from "../components/processFlow/offers.vue";
564
       name: "emailRecipientEdit",
566
       name: "emailRecipientEdit",
565
       component: EmailRecipientEdit,
567
       component: EmailRecipientEdit,
566
     },
568
     },
569
+    {
570
+      path: "/enquireNowLog",
571
+      name: "enquireNowLog",
572
+      component: EnquireNowLog,
573
+    },
574
+    {
575
+      path: "/contactUsLog",
576
+      name: "contactUsLog",
577
+      component: ContactUsLog,
578
+    },
567
     {
579
     {
568
       path: "/status/new",
580
       path: "/status/new",
569
       name: "statusNew",
581
       name: "statusNew",

+ 29
- 2
src/store/modules/communication/template.js View File

10
     item: {},
10
     item: {},
11
     message: undefined,
11
     message: undefined,
12
     recipients: [],
12
     recipients: [],
13
-    recipient: {}
13
+    recipient: {},
14
+    contactUsLog: [],
15
+    enquireNowLog: []
14
   },
16
   },
15
   mutations: {
17
   mutations: {
16
     setList(state, list) {
18
     setList(state, list) {
32
     deleteTemplate(state, id){
34
     deleteTemplate(state, id){
33
       var index = state.list.findIndex((template) => template.id == id)
35
       var index = state.list.findIndex((template) => template.id == id)
34
       state.list.splice(index, 1)
36
       state.list.splice(index, 1)
35
-    }
37
+    },
38
+    setContactUsLog(state, log){
39
+      state.contactUsLog = log
40
+    },
41
+    setEnquireNowLog(state, log){
42
+      console.log(log);
43
+      state.enquireNowLog = log
44
+    },
36
   },
45
   },
37
   getters: {
46
   getters: {
38
   },
47
   },
123
       .catch((e) => {
132
       .catch((e) => {
124
         console.log(e.response);
133
         console.log(e.response);
125
       })
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
+      })
126
     }
153
     }
127
   },
154
   },
128
 };
155
 };

Loading…
Cancel
Save