Skip to content

Commit

Permalink
#68 - added addNewAddress method to toggle shipping address
Browse files Browse the repository at this point in the history
  • Loading branch information
szafran89 committed Dec 21, 2018
1 parent 5bc8594 commit 175fb8f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion view/frontend/web/js/components/steps/TheShippingStep.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@
@ready="isReady => customerEmailReadyToSubmit = isReady"
/>
<CustomerAddresses v-if="isCustomerLoggedIn"/>
<BaseButton
text="Add new address"
@click.native="addNewAddress()"
/>
<ShippingAddressForm
v-if="!isCustomerLoggedIn || newAddress"
ref="shippingsAddressForm"
@ready="isReady => shippingAddressReadyToSubmit = isReady"
/>
Expand Down Expand Up @@ -48,7 +53,8 @@ export default {
customerEmailReadyToSubmit: false,
shippingMethodsReadyToSubmit: false,
shippingAddressReadyToSubmit: false,
loader: false
loader: false,
newAddress: false
}
},
computed: {
Expand Down Expand Up @@ -83,6 +89,9 @@ export default {
})
this.$store.dispatch('getTotals')
},
addNewAddress () {
this.newAddress = !this.newAddress
}
}
}
Expand Down

0 comments on commit 175fb8f

Please sign in to comment.