Bläddra i källkod

Timeshare Sell fix submit

master
Brian Conway 2 år sedan
förälder
incheckning
a787d59086
3 ändrade filer med 34 tillägg och 27 borttagningar
  1. 0
    0
      public/googlea6e63bc009bf908f.html
  2. 33
    25
      src/components/timeshare/sell/contentSectionNew.vue
  3. 1
    2
      src/main.js

public/googlea6e63bc009bf908f_2022-09-06 021026 PM.html → public/googlea6e63bc009bf908f.html Visa fil


+ 33
- 25
src/components/timeshare/sell/contentSectionNew.vue Visa fil

@@ -724,11 +724,14 @@
724 724
                         data-msg="Please enter your cell number"
725 725
                         v-model="indiv.cellNumber"
726 726
                         v-bind:class="{
727
-                          'is-valid': indiv.cellNumber,
727
+                          'is-valid':
728
+                            indiv.cellNumber &&
729
+                            validPhoneNumber(indiv.cellNumber),
728 730
                           'is-invalid':
729
-                            !requiredField(
730
-                              validPhoneNumber(indiv.cellNumber),
731
-                            ) && cellNumberLoad,
731
+                            !requiredField(indiv.cellNumber) ||
732
+                            (indiv.cellNumber &&
733
+                              !validPhoneNumber(indiv.cellNumber) &&
734
+                              cellNumberLoad),
732 735
                         }"
733 736
                         v-on:keyup="cellNumberLoad = true"
734 737
                         v-on:blur="cellNumberLoad = true"
@@ -1191,11 +1194,6 @@
1191 1194
                     </p>
1192 1195
                   </div>
1193 1196
                 </div>
1194
-                <div class="form-row">
1195
-                  <div class="col-md-12">
1196
-                    <alert :text="errorMessage" :type="errorOccurred" />
1197
-                  </div>
1198
-                </div>
1199 1197
                 <div align="left" class="custom-control custom-switch mb-2">
1200 1198
                   <div class="row">
1201 1199
                     <div align="center" class="col">
@@ -1221,22 +1219,33 @@
1221 1219
                     v-if="!sellItem.id"
1222 1220
                     @click="submitSale()"
1223 1221
                   >
1224
-                    SUBMIT
1222
+                    Submit
1225 1223
                   </button>
1226 1224
                   <button class="btn-white-border" v-else @click="newSale()">
1227
-                    NEW WEEK
1225
+                    New Week
1228 1226
                   </button>
1229 1227
                 </div>
1228
+                <div class="row">
1229
+                  <div v-if="boolMessage" class="row">
1230
+                    <div class="col">
1231
+                      <alert
1232
+                        :text="'Your Information has been updated!'"
1233
+                        :type="'SUCCESS'"
1234
+                      />
1235
+                    </div>
1236
+                  </div>
1237
+                  <div v-if="boolValidationError" class="row">
1238
+                    <div class="col">
1239
+                      <alert :text="errorMessage" :type="errorOccurred" />
1240
+                    </div>
1241
+                  </div>
1242
+                </div>
1230 1243
                 <!-- <div class="text-center col-12">
1231 1244
               <button class="btn-solid-blue" @click="paygateRedirect()">PayGate</button>
1232 1245
             </div>-->
1233
-                <br />
1234
-                <br />
1235 1246
               </div>
1236 1247
             </div>
1237 1248
           </div>
1238
-          <br />
1239
-          <br />
1240 1249
         </div>
1241 1250
         <div v-if="wait" id="preloader"></div>
1242 1251
       </div>
@@ -1557,6 +1566,7 @@ export default {
1557 1566
             console.log('saveweek')
1558 1567
             this.saveWeek(this.sellItem)
1559 1568
               .then((fulfilled) => {
1569
+                this.boolMessage = true
1560 1570
                 // this.$router.push({
1561 1571
                 //   name: "PaymentOption",
1562 1572
                 //   params: { week: fulfilled, indiv: this.indiv }
@@ -1717,18 +1727,17 @@ export default {
1717 1727
         this.sellItem.levyAmount &&
1718 1728
         this.sellItem.arrivalDate &&
1719 1729
         this.sellItem.departureDate &&
1720
-        this.sellItem.sellPrice &&
1721
-        this.validEmail(individual.emailAddress) &&
1722
-        this.validPhoneNumber(this.sellItem.cellNumber) &&
1723
-        this.validPhoneNumber(this.sellItem.landlineNumber)
1730
+        this.sellItem.sellPrice
1724 1731
       ) {
1725 1732
         if (this.selectedUserType === 'custom') {
1726 1733
           if (
1727
-            this.nameLoad &&
1728
-            this.surnameLoad &&
1729
-            this.emailAddressLoad &&
1730
-            this.cellNumberLoad &&
1731
-            this.spouseEmailLoad
1734
+            this.indiv.name &&
1735
+            this.indiv.surname &&
1736
+            this.indiv.emailAddress &&
1737
+            this.indiv.cellNumber &&
1738
+            this.validEmail(this.indiv.emailAddress) &&
1739
+            this.validPhoneNumber(this.indiv.cellNumber) &&
1740
+            this.validPhoneNumber(this.indiv.landlineNumber)
1732 1741
           ) {
1733 1742
             console.log('passed custom')
1734 1743
             this.errorOccurred = ''
@@ -1741,7 +1750,6 @@ export default {
1741 1750
             this.surnameLoad = true
1742 1751
             this.emailAddressLoad = true
1743 1752
             this.cellNumberLoad = true
1744
-            this.spouseEmailLoad = true
1745 1753
             this.boolValidationError = true
1746 1754
             this.errorOccurred = 'ERROR'
1747 1755
             this.errorMessage =

+ 1
- 2
src/main.js Visa fil

@@ -58,8 +58,7 @@ Vue.use(VueAnalytics, {
58 58
 Vue.config.productionTip = false
59 59
 axios.defaults.baseURL = 'http://localhost:57260'
60 60
     //axios.defaults.baseURL = 'https://www.pvsl.co.za:86/'
61
-    //
62
-axios.defaults.baseURL = 'http://training.provision-sa.com:120/'
61
+    //axios.defaults.baseURL = 'http://training.provision-sa.com:120/'
63 62
 
64 63
 Vue.prototype.$axios = axios
65 64
 const pluginOptions = {

Laddar…
Avbryt
Spara