Skip to content

Commit

Permalink
#68 - removed useless comments
Browse files Browse the repository at this point in the history
  • Loading branch information
szafran89 committed Dec 20, 2018
1 parent a0cf09f commit c27f63a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
6 changes: 2 additions & 4 deletions view/frontend/web/js/components/CustomerEmailField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<script>
import BaseInput from './BaseInput.vue'
import axios from './../utils/checkout-axios.js'
import { requiredIf, email } from 'vuelidate/lib/validators'
import { required, email } from 'vuelidate/lib/validators'
export default {
components: {
Expand All @@ -36,9 +36,7 @@ export default {
validations: {
customer: {
email: {
required: requiredIf(function () {
return !this.isCustomerLoggedIn
}),
required,
email
}
}
Expand Down
7 changes: 0 additions & 7 deletions view/frontend/web/js/components/steps/TheShippingStep.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,13 @@ export default {
this.$store.dispatch('updateShippingMethods', this.address.country_id.value)
},
goToNextStep () {
// show erorrs for customer email field
if (!this.isCustomerLoggedIn) {
this.$refs.customerEmail.touch()
}
// show errors for shipping address form and shipping methods radio buttons
this.$refs.shippingsMethods.touch()
this.$v.$touch()
// check if sth from above is wrong
if (
this.$v.$invalid ||
!this.shippingMethodsReadyToSubmit ||
Expand All @@ -238,21 +235,17 @@ export default {
return
}
// enable loader
this.loader = true
// save shipping address
this.$store.commit(
'setAddress',
{ type: 'shippingAddress', address: this.address }
)
// request for shipping informations and disable loader
this.$store.dispatch('setShippinInformation').then(() => {
this.loader = false
})
// get current totals
this.$store.dispatch('getTotals')
}
}
Expand Down

0 comments on commit c27f63a

Please sign in to comment.