From fdcb22284b7f4339b3c4c0717aeed5a501e5a776 Mon Sep 17 00:00:00 2001 From: Kenny Ong Date: Sat, 23 Mar 2019 22:07:07 +0800 Subject: [PATCH] Accept 1 address for both shipping and billing Prevent user create the same address for different type --- .../customers/Edit/CustomerAddresses.vue | 30 +++++++++++++++---- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/resources/assets/js/components/order-processing/customers/Edit/CustomerAddresses.vue b/resources/assets/js/components/order-processing/customers/Edit/CustomerAddresses.vue index acf380c8..3db906af 100644 --- a/resources/assets/js/components/order-processing/customers/Edit/CustomerAddresses.vue +++ b/resources/assets/js/components/order-processing/customers/Edit/CustomerAddresses.vue @@ -15,8 +15,8 @@ this.resetModel(); }, save() { - this.model.shipping = this.type == 'shipping' ? true : false; - this.model.billing = this.type == 'billing' ? true : false; + // this.model.shipping = this.type == 'shipping' ? true : false; + // this.model.billing = this.type == 'billing' ? true : false; this.model.user_id = this.customer.id; if (this.creating) { @@ -46,11 +46,13 @@ this.creating = false; var address = this.addresses[item]; this.model = address; + /* if (address.shipping) { this.type = 'shipping'; } else { this.type = 'billing'; } + */ this.editing = true; this.title = "Edit Address"; @@ -80,7 +82,7 @@ state: '', zip: '', country: '', - shipping: true, + shipping: false, // true billing: false }; @@ -106,7 +108,8 @@ State Zip Country - Shipping / Billing + + Type @@ -130,8 +133,13 @@ {{ address.zip }} {{ address.country }} + Shipping + / + Billing + @@ -221,10 +229,22 @@
+
    +
  • + + +
  • +
  • + + +
  • +
+
@@ -236,4 +256,4 @@ - \ No newline at end of file +