Bläddra i källkod

Terms and Conditions

master
30117125 4 år sedan
förälder
incheckning
6ebad6c276

+ 78
- 0
src/components/admin/misc/termsConditions.vue Visa fil

1
+<template>
2
+  <main id="main" style="padding-bottom:50px">
3
+    <div class="container">
4
+      <div class="row">
5
+        <div class="col">
6
+          <div class="section-header">
7
+            <h2>Terms And Conditions</h2>
8
+          </div>
9
+        </div>
10
+      </div>
11
+      <div class="row">
12
+        <div class="col-md-6">
13
+          <label for="version" class="uniSelectLabel">Version:</label>
14
+          <input name="version" type="text" v-model="version" class="mt-5 mb-3 ml-2" />
15
+        </div>
16
+        <div class="col-md-6 mt-5">
17
+          <p style="float:right">Last Modified: {{ terms.modified | toDate }}</p>
18
+        </div>
19
+      </div>
20
+      <div class="row">
21
+        <div class="col">
22
+          <vue-editor v-model="termsInput" :editor-toolbar="customToolbar" />
23
+          <button @click="saveTerms()" class="btn-solid-blue">Save</button>
24
+        </div>
25
+      </div>
26
+    </div>
27
+  </main>
28
+</template>
29
+
30
+<script>
31
+/* eslint-disable */
32
+import { VueEditor } from "vue2-editor";
33
+import { mapActions, mapGetters, mapState } from "vuex";
34
+
35
+export default {
36
+  components: {
37
+    VueEditor
38
+  },
39
+  data() {
40
+    return {
41
+      termsInput: "",
42
+      version: "",
43
+      customToolbar: [
44
+        [{ header: [false, 1, 2, 3, 4, 5, 6] }],
45
+        ["bold", "italic", "underline", "strike"],
46
+        [{ align: "" }, { align: "center" }, { align: "right" }, { align: "justify" }],
47
+        [{ list: "ordered" }, { list: "bullet" }, { list: "check" }],
48
+        [{ script: "sub" }, { script: "super" }],
49
+        [{ indent: "-1" }, { indent: "+1" }]
50
+      ]
51
+    };
52
+  },
53
+  mounted() {
54
+    this.populateTerms();
55
+  },
56
+  methods: {
57
+    ...mapActions("termsConditions", ["setTerms", "retrieveTerms"]),
58
+    saveTerms() {
59
+      var termsObj = {
60
+        termsConditions: this.termsInput,
61
+        version: this.version
62
+      };
63
+      this.setTerms(termsObj);
64
+    },
65
+    async populateTerms() {
66
+      await this.retrieveTerms();
67
+      this.version = this.terms.version;
68
+      this.termsInput = this.terms.termsConditions;
69
+    }
70
+  },
71
+  computed: {
72
+    ...mapGetters("termsConditions", ["getTermsAndConditions"]),
73
+    ...mapState("termsConditions", ["terms"])
74
+  }
75
+};
76
+</script>
77
+
78
+<style lang="scss" scoped></style>

+ 0
- 0
src/components/misc/TermsConditions/carouselSection.vue Visa fil


+ 38
- 0
src/components/misc/TermsConditions/contentSection.vue Visa fil

1
+<template>
2
+  <div class="container">
3
+    <div class="row">
4
+      <div class="col">
5
+        <div class="section-header">
6
+          <h2>Terms & Conditions</h2>
7
+        </div>
8
+      </div>
9
+    </div>
10
+    <div class="row">
11
+      <div class="col">
12
+        <div v-html="terms.termsConditions"></div>
13
+      </div>
14
+    </div>
15
+  </div>
16
+</template>
17
+
18
+<script>
19
+/* eslint-disable */
20
+import { mapActions, mapGetters, mapState } from "vuex";
21
+export default {
22
+  mounted() {
23
+    this.populateTerms();
24
+  },
25
+  methods: {
26
+    ...mapActions("termsConditions", ["retrieveTerms"]),
27
+    async populateTerms() {
28
+      await this.retrieveTerms();
29
+    }
30
+  },
31
+  computed: {
32
+    ...mapGetters("termsConditions", ["getTermsAndConditions"]),
33
+    ...mapState("termsConditions", ["terms"])
34
+  }
35
+};
36
+</script>
37
+
38
+<style lang="scss" scoped></style>

+ 23
- 0
src/components/misc/TermsConditions/termsConditions.vue Visa fil

1
+<template>
2
+  <div>
3
+    <carouselSection />
4
+    <main id="main">
5
+      <contentSection />
6
+    </main>
7
+  </div>
8
+</template>
9
+
10
+<script>
11
+/* eslint-disable */
12
+
13
+import carouselSection from "./carouselSection";
14
+import contentSection from "./contentSection";
15
+export default {
16
+  components: {
17
+    carouselSection,
18
+    contentSection
19
+  }
20
+};
21
+</script>
22
+
23
+<style lang="scss" scoped></style>

+ 19
- 8
src/components/property/commercial/singleView/contentSection.vue Visa fil

5
         <div class="col-md-4">
5
         <div class="col-md-4">
6
           <div class="resPortfolioSection" style="margin-top:-5px">
6
           <div class="resPortfolioSection" style="margin-top:-5px">
7
             <iframe
7
             <iframe
8
+              v-if="property.video !== null"
8
               width="100%"
9
               width="100%"
9
               src="https://www.youtube.com/embed/watch_popup?v=qKgHJYzWtVA"
10
               src="https://www.youtube.com/embed/watch_popup?v=qKgHJYzWtVA"
10
               frameborder="0"
11
               frameborder="0"
37
             <h2>Property Detial</h2>
38
             <h2>Property Detial</h2>
38
             <p v-if="property.showAddress">{{ property.streetNumber }} {{ property.streetName }}</p>
39
             <p v-if="property.showAddress">{{ property.streetNumber }} {{ property.streetName }}</p>
39
             <p>{{ property.city }}, {{ property.suburb }}</p>
40
             <p>{{ property.city }}, {{ property.suburb }}</p>
40
-            <div v-for="field in property.displayData[0].values" :key="field.id">
41
+            <div v-if="property.displayData.length > 0">
42
+              <div v-for="(data, i) in property.displayData" :key="i">
43
+                <div v-for="field in data.values" :key="field.id">
44
+                  <p v-if="field.name === 'Floor Size'">{{ field.value }}M<sup>2</sup></p>
45
+                </div>
46
+              </div>
47
+            </div>
48
+            <!-- <div v-for="field in property.displayData[0].values" :key="field.id">
41
               <p v-if="field.name === 'Floor Size'">{{ field.value }}M<sup>2</sup></p>
49
               <p v-if="field.name === 'Floor Size'">{{ field.value }}M<sup>2</sup></p>
42
               <p v-if="field.name === 'Rates & Taxes'">
50
               <p v-if="field.name === 'Rates & Taxes'">
43
                 Rates & Taxes: R{{ field.value | toCurrency }}
51
                 Rates & Taxes: R{{ field.value | toCurrency }}
44
               </p>
52
               </p>
45
-            </div>
53
+            </div> -->
46
             <p>{{ property.shortDescription }}</p>
54
             <p>{{ property.shortDescription }}</p>
47
             <p>{{ property.price | toCurrency }}</p>
55
             <p>{{ property.price | toCurrency }}</p>
48
             <div class="btn-white-border"><i class="fa fa-search"></i>BOOK A VIEWING</div>
56
             <div class="btn-white-border"><i class="fa fa-search"></i>BOOK A VIEWING</div>
77
           <h2 v-else>{{ property.propertyName }}</h2>
85
           <h2 v-else>{{ property.propertyName }}</h2>
78
           <p>{{ property.shortDescription }}</p>
86
           <p>{{ property.shortDescription }}</p>
79
           <h4>Property Features</h4>
87
           <h4>Property Features</h4>
80
-          <div v-for="(data, i) in property.displayData" :key="i" class="row my-3">
81
-            <div v-for="(field, j) in data.values" :key="j" class="col-md-6">
82
-              <div v-if="field.value.toUpperCase() != 'YES'">
83
-                <i class="fa fa-check-circle"></i> {{ field.value }} {{ field.name }}
88
+          <div v-if="property.displayData.length > 0">
89
+            <div v-for="(data, i) in property.displayData" :key="i" class="row my-3">
90
+              <div v-for="(field, j) in data.values" :key="j" class="col-md-6">
91
+                <div v-if="field.value.toUpperCase() != 'YES'">
92
+                  <i class="fa fa-check-circle"></i> {{ field.value }} {{ field.name }}
93
+                </div>
94
+                <div v-else><i class="fa fa-check-circle"></i> {{ field.name }}</div>
84
               </div>
95
               </div>
85
-              <div v-else><i class="fa fa-check-circle"></i> {{ field.name }}</div>
86
             </div>
96
             </div>
87
           </div>
97
           </div>
88
           <div class="mt-5" v-html="property.description"></div>
98
           <div class="mt-5" v-html="property.description"></div>
89
-          <h4 class="mt-5">Video Tour</h4>
99
+          <h4 v-if="property.video !== null" class="mt-5">Video Tour</h4>
90
           <iframe
100
           <iframe
101
+            v-if="property.video !== null"
91
             width="100%"
102
             width="100%"
92
             src="https://www.youtube.com/embed/watch_popup?v=qKgHJYzWtVA"
103
             src="https://www.youtube.com/embed/watch_popup?v=qKgHJYzWtVA"
93
             frameborder="0"
104
             frameborder="0"

+ 3
- 1
src/components/property/residential/singleView/contentSection.vue Visa fil

5
         <div class="col-md-4">
5
         <div class="col-md-4">
6
           <div class="resPortfolioSection">
6
           <div class="resPortfolioSection">
7
             <iframe
7
             <iframe
8
+              v-if="property.video != ''"
8
               width="100%"
9
               width="100%"
9
               src="https://www.youtube.com/embed/watch_popup?v=qKgHJYzWtVA"
10
               src="https://www.youtube.com/embed/watch_popup?v=qKgHJYzWtVA"
10
               frameborder="0"
11
               frameborder="0"
92
               </div>
93
               </div>
93
             </div>
94
             </div>
94
           </div>
95
           </div>
95
-          <h4 class="mt-5">Video Tour</h4>
96
+          <h4 v-if="property.video != ''" class="mt-5">Video Tour</h4>
96
           <iframe
97
           <iframe
98
+            v-if="property.video != ''"
97
             width="100%"
99
             width="100%"
98
             src="https://www.youtube.com/embed/watch_popup?v=qKgHJYzWtVA"
100
             src="https://www.youtube.com/embed/watch_popup?v=qKgHJYzWtVA"
99
             frameborder="0"
101
             frameborder="0"

+ 3
- 0
src/components/shared/footerSection.vue Visa fil

27
               <router-link class="footerText" to="/websiteDisclaimer"
27
               <router-link class="footerText" to="/websiteDisclaimer"
28
                 >Website Disclaimer</router-link
28
                 >Website Disclaimer</router-link
29
               ><br />
29
               ><br />
30
+              <router-link class="footerText" to="/termsConditionsView"
31
+                >Terms & Conditions</router-link
32
+              ><br />
30
             </p>
33
             </p>
31
           </div>
34
           </div>
32
           <div class="col-lg-9 section-header" id="contactFoot">
35
           <div class="col-lg-9 section-header" id="contactFoot">

+ 5
- 0
src/components/shared/navBar.vue Visa fil

280
                           <li>
280
                           <li>
281
                             <router-link to="/fees">Fees</router-link>
281
                             <router-link to="/fees">Fees</router-link>
282
                           </li>
282
                           </li>
283
+                          <li>
284
+                            <router-link to="/termsConditions"
285
+                              >Edit Terms and Conditions</router-link
286
+                            >
287
+                          </li>
283
                         </ul>
288
                         </ul>
284
                       </li>
289
                       </li>
285
                       <li v-if="ROLE === 'Super Admin'" class="menu-has-children">
290
                       <li v-if="ROLE === 'Super Admin'" class="menu-has-children">

+ 2
- 2
src/components/timeshare/sell/contentSection.vue Visa fil

742
               </button>
742
               </button>
743
               <button class="btn-solid-blue" v-else @click="newSale()">NEW WEEK</button>
743
               <button class="btn-solid-blue" v-else @click="newSale()">NEW WEEK</button>
744
             </div>
744
             </div>
745
-            <div class="text-center col-12">
745
+            <!-- <div class="text-center col-12">
746
               <button class="btn-solid-blue" @click="paygateRedirect()">PayGate</button>
746
               <button class="btn-solid-blue" @click="paygateRedirect()">PayGate</button>
747
-            </div>
747
+            </div> -->
748
             <br />
748
             <br />
749
             <br />
749
             <br />
750
           </div>
750
           </div>

+ 1
- 1
src/components/user/loginPage.vue Visa fil

118
     },
118
     },
119
     Login() {
119
     Login() {
120
       this.login({ username: this.username, password: this.password })
120
       this.login({ username: this.username, password: this.password })
121
-        .then(() => {
121
+        .then(fufilled => {
122
           this.$router.push("/");
122
           this.$router.push("/");
123
         })
123
         })
124
         .catch(err => {
124
         .catch(err => {

+ 19
- 2
src/components/user/registerAgencySection.vue Visa fil

130
         />
130
         />
131
       </div>
131
       </div>
132
     </div>
132
     </div>
133
-
134
-    <button v-on:click="SubmitData()" class="btn-solid-blue" type="submit">
133
+    <div class="row">
134
+      <div class="col">
135
+        <label for="tc"
136
+          ><router-link to="/termsConditionsView">Terms & Conditions</router-link></label
137
+        >
138
+        <input
139
+          name="tc"
140
+          type="checkbox"
141
+          class="ml-3 mt-2"
142
+          v-model="registerAgency.user.acceptedTerms"
143
+        />
144
+      </div>
145
+    </div>
146
+    <button
147
+      v-if="registerAgency.user.acceptedTerms"
148
+      v-on:click="SubmitData()"
149
+      class="btn-solid-blue"
150
+      type="submit"
151
+    >
135
       SUBMIT
152
       SUBMIT
136
     </button>
153
     </button>
137
     <router-link to="/user/login" class="btn-white-border mb-5" style="float:right" type="submit">
154
     <router-link to="/user/login" class="btn-white-border mb-5" style="float:right" type="submit">

+ 22
- 1
src/components/user/registerIndividual.vue Visa fil

91
           />
91
           />
92
         </div>
92
         </div>
93
       </div>
93
       </div>
94
+      <div class="row">
95
+        <div class="col">
96
+          <label for="tc"
97
+            ><router-link to="/termsConditionsView">Terms & Conditions</router-link></label
98
+          >
99
+
100
+          <input
101
+            name="tc"
102
+            type="checkbox"
103
+            class="ml-3 mt-2"
104
+            v-model="registerIndividual.acceptedTerms"
105
+          />
106
+        </div>
107
+      </div>
94
 
108
 
95
-      <button v-on:click="SubmitData()" class="btn-solid-blue" type="submit">
109
+      <button
110
+        v-if="registerIndividual.acceptedTerms"
111
+        v-on:click="SubmitData()"
112
+        class="btn-solid-blue"
113
+        type="submit"
114
+      >
96
         SUBMIT
115
         SUBMIT
97
       </button>
116
       </button>
98
       <router-link to="/user/login" class="btn-white-border" style="float:right" type="submit">
117
       <router-link to="/user/login" class="btn-white-border" style="float:right" type="submit">
149
       this.isPasswordShown = "password";
168
       this.isPasswordShown = "password";
150
     },
169
     },
151
     SubmitData() {
170
     SubmitData() {
171
+      console.log(this.registerIndividual);
172
+
152
       this.saveIndividual(this.registerIndividual);
173
       this.saveIndividual(this.registerIndividual);
153
 
174
 
154
       this.$router.push("/user/login");
175
       this.$router.push("/user/login");

+ 2
- 2
src/main.js Visa fil

29
 });
29
 });
30
 Vue.config.productionTip = false;
30
 Vue.config.productionTip = false;
31
 //axios.defaults.baseURL = "http://localhost:57260";
31
 //axios.defaults.baseURL = "http://localhost:57260";
32
-axios.defaults.baseURL = "http://training.provision-sa.com:82";
33
-//axios.defaults.baseURL = "http://localhost:8080/";
32
+//axios.defaults.baseURL = "http://training.provision-sa.com:82";
33
+axios.defaults.baseURL = "http://localhost:8080/";
34
 
34
 
35
 Vue.prototype.$axios = axios;
35
 Vue.prototype.$axios = axios;
36
 const pluginOptions = {
36
 const pluginOptions = {

+ 13
- 1
src/router/index.js Visa fil

57
 import ContactUs from "../components/misc/contactUs.vue";
57
 import ContactUs from "../components/misc/contactUs.vue";
58
 import PrivacyPolicy from "../components/misc//privacyPolicy/privacyPolicyPage.vue";
58
 import PrivacyPolicy from "../components/misc//privacyPolicy/privacyPolicyPage.vue";
59
 import WebsiteDisclaimer from "../components/misc/Disclaimer/WebsiteDisclaimer.vue";
59
 import WebsiteDisclaimer from "../components/misc/Disclaimer/WebsiteDisclaimer.vue";
60
+import TermsConditions from "../components/admin/misc/termsConditions.vue";
61
+import TermsConditionsView from "../components/misc/TermsConditions/termsConditions.vue";
60
 
62
 
61
 import MakeOffer from "../components/processFlow/makeOffer.vue";
63
 import MakeOffer from "../components/processFlow/makeOffer.vue";
62
 import Offer from "../components/processFlow/offers.vue";
64
 import Offer from "../components/processFlow/offers.vue";
378
       name: "fees",
380
       name: "fees",
379
       component: Fees
381
       component: Fees
380
     },
382
     },
383
+    {
384
+      path: "/termsConditions",
385
+      name: "termsConditions",
386
+      component: TermsConditions
387
+    },
388
+    {
389
+      path: "/termsConditionsView",
390
+      name: "termsConditionsView",
391
+      component: TermsConditionsView
392
+    },
381
     {
393
     {
382
       path: "/carousel",
394
       path: "/carousel",
383
       name: "carousel",
395
       name: "carousel",
449
     {
461
     {
450
       path: "/editTimeShare/:id",
462
       path: "/editTimeShare/:id",
451
       name: "EditTimeshare",
463
       name: "EditTimeshare",
452
-      component: MyWeeksEdit,
464
+      component: MyWeeksEdit
453
     }
465
     }
454
   ]
466
   ]
455
 });
467
 });

+ 2
- 0
src/store/index.js Visa fil

34
 import Bank from "./modules/user/bank";
34
 import Bank from "./modules/user/bank";
35
 import bank from "./modules/user/bank";
35
 import bank from "./modules/user/bank";
36
 import Fees from "./modules/financial/fees";
36
 import Fees from "./modules/financial/fees";
37
+import TermsConditions from "./modules/misc/termsConditions";
37
 
38
 
38
 Vue.use(Vuex);
39
 Vue.use(Vuex);
39
 /* eslint no-param-reassign: ["error", { "props": false }] */
40
 /* eslint no-param-reassign: ["error", { "props": false }] */
70
     campaignItem: CampaignItemModule,
71
     campaignItem: CampaignItemModule,
71
     placeHolderFormat: PlaceHolderFormat,
72
     placeHolderFormat: PlaceHolderFormat,
72
     fees: Fees,
73
     fees: Fees,
74
+    termsConditions: TermsConditions,
73
     bank: bank
75
     bank: bank
74
   }
76
   }
75
 });
77
 });

+ 28
- 0
src/store/modules/misc/termsConditions.js Visa fil

1
+/* eslint-disable */
2
+import axios from "axios";
3
+
4
+export default {
5
+  namespaced: true,
6
+  state: {
7
+    terms: []
8
+  },
9
+  mutations: {
10
+    getTermsAndConditions: (state, fee) => (state.terms = fee),
11
+    newTermsAndConditions: (state, fee) => (state.terms = fee)
12
+  },
13
+  getters: {
14
+    getTermsAndConditions: state => state.terms
15
+  },
16
+  actions: {
17
+    async retrieveTerms({ commit }) {
18
+      await axios.get("api/tc/").then(res => {
19
+        commit("getTermsAndConditions", res.data);
20
+      });
21
+    },
22
+    async setTerms({ commit }, terms) {
23
+      await axios.post("api/tc/", terms).then(res => {
24
+        commit("newTermsAndConditions", res.data);
25
+      });
26
+    }
27
+  }
28
+};

+ 53
- 51
src/store/modules/user/register.js Visa fil

1
-import axios from 'axios';
1
+import axios from "axios";
2
 
2
 
3
 export default {
3
 export default {
4
   namespaced: true,
4
   namespaced: true,
6
     individuals: [],
6
     individuals: [],
7
     agents: [],
7
     agents: [],
8
     registerIndividual: {
8
     registerIndividual: {
9
-      name: '',
10
-      surname: '',
11
-      email: '',
12
-      cellNumber: '',
13
-      username: '',
14
-      password: '',
9
+      name: "",
10
+      surname: "",
11
+      email: "",
12
+      cellNumber: "",
13
+      username: "",
14
+      password: "",
15
+      acceptedTerms: false
15
     },
16
     },
16
     registerAgency: {
17
     registerAgency: {
17
-      name: '',
18
-      eaabeffcNumber: '',
19
-      companyRegNumber: '',
18
+      name: "",
19
+      eaabeffcNumber: "",
20
+      companyRegNumber: "",
20
       user: {
21
       user: {
21
-        name: '',
22
-        surname: '',
23
-        email: '',
24
-        cellNumber: '',
25
-        username: '',
26
-        password: '',
27
-        role: '',
28
-      },
29
-    },
22
+        name: "",
23
+        surname: "",
24
+        email: "",
25
+        cellNumber: "",
26
+        username: "",
27
+        password: "",
28
+        role: ""
29
+      }
30
+    }
30
   },
31
   },
31
   mutations: {
32
   mutations: {
32
     setIndividual(state, type) {
33
     setIndividual(state, type) {
56
     },
57
     },
57
     updateAgency(state, type) {
58
     updateAgency(state, type) {
58
       state.registerAgency.find(item => item.id === type.id).eaabeffcNumber = type.eaabeffcNumber;
59
       state.registerAgency.find(item => item.id === type.id).eaabeffcNumber = type.eaabeffcNumber;
59
-      state.registerAgency.find(item => item.id === type.id).companyRegNumber = type.companyRegNumber;
60
+      state.registerAgency.find(item => item.id === type.id).companyRegNumber =
61
+        type.companyRegNumber;
60
     },
62
     },
61
     clearIndividual(state) {
63
     clearIndividual(state) {
62
       state.registerIndividual = {
64
       state.registerIndividual = {
63
-        name: '',
64
-        surname: '',
65
-        email: '',
66
-        cellNumber: '',
67
-        username: '',
68
-        password: '',
65
+        name: "",
66
+        surname: "",
67
+        email: "",
68
+        cellNumber: "",
69
+        username: "",
70
+        password: ""
69
       };
71
       };
70
     },
72
     },
71
     clearAgency(state) {
73
     clearAgency(state) {
72
       state.registerAgency = {
74
       state.registerAgency = {
73
-        name: '',
74
-        eaabeffcNumber: '',
75
-        companyRegNumber: '',
75
+        name: "",
76
+        eaabeffcNumber: "",
77
+        companyRegNumber: "",
76
         user: {
78
         user: {
77
-          name: '',
78
-          surname: '',
79
-          email: '',
80
-          cellNumber: '',
81
-          username: '',
82
-          password: '',
83
-        },
79
+          name: "",
80
+          surname: "",
81
+          email: "",
82
+          cellNumber: "",
83
+          username: "",
84
+          password: ""
85
+        }
84
       };
86
       };
85
     },
87
     },
86
     removeIndividual(state, id) {
88
     removeIndividual(state, id) {
91
     },
93
     },
92
     removeAgent(state, id) {
94
     removeAgent(state, id) {
93
       state.registerAgency.pop(state.registerAgency.find(a => a.id === id));
95
       state.registerAgency.pop(state.registerAgency.find(a => a.id === id));
94
-    },
96
+    }
95
   },
97
   },
96
   getters: {},
98
   getters: {},
97
   actions: {
99
   actions: {
98
     getIndividuals({ commit }) {
100
     getIndividuals({ commit }) {
99
       axios
101
       axios
100
-        .get('/api/individual')
101
-        .then(result => commit('setIndividuals', result.data))
102
+        .get("/api/individual")
103
+        .then(result => commit("setIndividuals", result.data))
102
         .catch(console.error);
104
         .catch(console.error);
103
     },
105
     },
104
     getAgents({ commit }) {
106
     getAgents({ commit }) {
105
       axios
107
       axios
106
-        .get('/api/agent')
107
-        .then(result => commit('setAgents', result.data))
108
+        .get("/api/agent")
109
+        .then(result => commit("setAgents", result.data))
108
         .catch(console.error);
110
         .catch(console.error);
109
     },
111
     },
110
     // getAgency({
112
     // getAgency({
118
 
120
 
119
     saveIndividual({ commit }, item) {
121
     saveIndividual({ commit }, item) {
120
       axios
122
       axios
121
-        .post('/api/register/register', item)
122
-        .then(result => commit('addIndividual', result.data))
123
+        .post("/api/register/register", item)
124
+        .then(result => commit("addIndividual", result.data))
123
         .catch(console.error);
125
         .catch(console.error);
124
     },
126
     },
125
     saveAgency({ commit }, item) {
127
     saveAgency({ commit }, item) {
126
       axios
128
       axios
127
-        .post('/api/register/registeragency', item)
128
-        .then(result => commit('addAgency', result.data))
129
+        .post("/api/register/registeragency", item)
130
+        .then(result => commit("addAgency", result.data))
129
         .catch(console.error);
131
         .catch(console.error);
130
     },
132
     },
131
     saveAgent({ commit }, item) {
133
     saveAgent({ commit }, item) {
132
       axios
134
       axios
133
-        .post('/api/agent', item)
134
-        .then(result => commit('addAgent', result.data))
135
+        .post("/api/agent", item)
136
+        .then(result => commit("addAgent", result.data))
135
         .catch(console.error);
137
         .catch(console.error);
136
     },
138
     },
137
     // updateIndividual({
139
     // updateIndividual({
163
     deleteIndividual({ commit }, id) {
165
     deleteIndividual({ commit }, id) {
164
       axios
166
       axios
165
         .delete(`/api/individual/${id}`)
167
         .delete(`/api/individual/${id}`)
166
-        .then(result => commit('removeIndividual', id))
168
+        .then(result => commit("removeIndividual", id))
167
         .catch(console.error);
169
         .catch(console.error);
168
     },
170
     },
169
     deleteAgent({ commit }, id) {
171
     deleteAgent({ commit }, id) {
170
       axios
172
       axios
171
         .delete(`/api/agent/${id}`)
173
         .delete(`/api/agent/${id}`)
172
-        .then(result => commit('removeAgent', id))
174
+        .then(result => commit("removeAgent", id))
173
         .catch(console.error);
175
         .catch(console.error);
174
-    },
176
+    }
175
     // deleteAgency({
177
     // deleteAgency({
176
     //   commit,
178
     //   commit,
177
     // }, id) {
179
     // }, id) {
180
     //     .then(result => commit('removeAgency', id))
182
     //     .then(result => commit('removeAgency', id))
181
     //     .catch(console.error);
183
     //     .catch(console.error);
182
     // },
184
     // },
183
-  },
185
+  }
184
 };
186
 };

+ 2
- 2
vue.config.js Visa fil

2
   devServer: {
2
   devServer: {
3
     proxy: {
3
     proxy: {
4
       "/api": {
4
       "/api": {
5
-        //target: "http://localhost:57260/",
6
-        target: "http://training.provision-sa.com:82",
5
+        target: "http://localhost:57260/",
6
+        //target: "http://training.provision-sa.com:82",
7
         changeOrigin: true
7
         changeOrigin: true
8
       },
8
       },
9
       "/nph-srep": {
9
       "/nph-srep": {

Laddar…
Avbryt
Spara