Browse Source

Timeshare Sell fix submit

master
Brian Conway 2 years ago
parent
commit
a787d59086

public/googlea6e63bc009bf908f_2022-09-06 021026 PM.html → public/googlea6e63bc009bf908f.html View File


+ 33
- 25
src/components/timeshare/sell/contentSectionNew.vue View File

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

+ 1
- 2
src/main.js View File

58
 Vue.config.productionTip = false
58
 Vue.config.productionTip = false
59
 axios.defaults.baseURL = 'http://localhost:57260'
59
 axios.defaults.baseURL = 'http://localhost:57260'
60
     //axios.defaults.baseURL = 'https://www.pvsl.co.za:86/'
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
 Vue.prototype.$axios = axios
63
 Vue.prototype.$axios = axios
65
 const pluginOptions = {
64
 const pluginOptions = {

Loading…
Cancel
Save