Просмотр исходного кода

Updated Communication and added logs

master
30117125 3 лет назад
Родитель
Сommit
43f412b1d2

+ 4
- 0
src/components/admin/property/propertyList.vue Просмотреть файл

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

+ 81
- 0
src/components/communication/contactUsLog.vue Просмотреть файл

@@ -0,0 +1,81 @@
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 Просмотреть файл

@@ -0,0 +1,90 @@
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 Просмотреть файл

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

+ 14
- 2
src/components/property/enquireNow/contentSection.vue Просмотреть файл

@@ -129,6 +129,16 @@
129 129
             <div class="validation"></div>
130 130
           </div>
131 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 142
             <float-label>
133 143
               <textarea
134 144
                 type="textArea"
@@ -175,7 +185,8 @@ export default {
175 185
       contactNumber: null,
176 186
       property: null,
177 187
       message: null,
178
-      boolSent: false
188
+      boolSent: false,
189
+      heardFrom: ""
179 190
     };
180 191
   },
181 192
   mounted() {
@@ -203,7 +214,8 @@ export default {
203 214
         email: this.indiv.emailAddress,
204 215
         phone: this.indiv.cellNumber,
205 216
         property: this.property.id.toString(),
206
-        message: this.message
217
+        message: this.message,
218
+        heardFrom: this.heardFrom
207 219
       };
208 220
 
209 221
       const response = await axios.post("/api/mail/1", mailObj);

+ 1
- 1
src/components/property/residential/singleView/contentSection.vue Просмотреть файл

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

+ 6
- 0
src/components/shared/navBar.vue Просмотреть файл

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

+ 12
- 0
src/router/index.js Просмотреть файл

@@ -66,6 +66,8 @@ import PrivacyPolicy from "../components/misc//privacyPolicy/privacyPolicyPage.v
66 66
 import WebsiteDisclaimer from "../components/misc/Disclaimer/WebsiteDisclaimer.vue";
67 67
 import TermsConditions from "../components/admin/misc/termsConditions.vue";
68 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 72
 import MakeOffer from "../components/processFlow/makeOffer.vue";
71 73
 import Offer from "../components/processFlow/offers.vue";
@@ -564,6 +566,16 @@ export default new Router({
564 566
       name: "emailRecipientEdit",
565 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 580
       path: "/status/new",
569 581
       name: "statusNew",

+ 29
- 2
src/store/modules/communication/template.js Просмотреть файл

@@ -10,7 +10,9 @@ export default {
10 10
     item: {},
11 11
     message: undefined,
12 12
     recipients: [],
13
-    recipient: {}
13
+    recipient: {},
14
+    contactUsLog: [],
15
+    enquireNowLog: []
14 16
   },
15 17
   mutations: {
16 18
     setList(state, list) {
@@ -32,7 +34,14 @@ export default {
32 34
     deleteTemplate(state, id){
33 35
       var index = state.list.findIndex((template) => template.id == id)
34 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 46
   getters: {
38 47
   },
@@ -123,6 +132,24 @@ export default {
123 132
       .catch((e) => {
124 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
 };

Загрузка…
Отмена
Сохранить