@viur/shop-components 0.14.6 → 0.14.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viur/shop-components",
3
- "version": "0.14.6",
3
+ "version": "0.14.7",
4
4
  "description": "Frontend Vue components for the shop module of ViUR",
5
5
  "repository": {
6
6
  "type": "git",
@@ -3,10 +3,11 @@
3
3
  ref="stepper"
4
4
  class="viur-shop-order-tabgroup"
5
5
  no-scroll-controls
6
+ :data-steppervisible="shopStore.state.stepperVisible"
6
7
  >
7
8
  <template v-for="(tab,name) in shopStore.state.tabs">
8
9
  <StepperTab
9
- v-show="shopStore.state.currentTab!=='complete'"
10
+ v-show="shopStore.state.stepperVisible"
10
11
  :tab="name"
11
12
  >
12
13
  </StepperTab>
@@ -106,4 +107,8 @@ sl-tab-panel {
106
107
  }
107
108
  }
108
109
 
110
+ .viur-shop-order-tabgroup[data-steppervisible='false']::part(nav){
111
+ visibility: hidden;
112
+ }
113
+
109
114
  </style>
@@ -96,7 +96,12 @@ export const useAddress = defineStore('useAddressStore', () => {
96
96
  // The address skel is the same, we just need to reload the relation
97
97
  fetchCart();
98
98
  } else {
99
- await updateCart({shipping_address_key: key});
99
+ let resp = await updateCart({shipping_address_key: key});
100
+ const data = await resp.json()
101
+ shopStore.state.cartRoot['shipping_address'] = data['shipping_address']
102
+ if (shopStore.state.cartRoot.discount){
103
+ shopStore.state.discounts = {[shopStore.state.cartRoot.discount.dest.key]:shopStore.state.cartRoot.discount}
104
+ }
100
105
  }
101
106
  } else if (type === 'billing') {
102
107
  const {addOrUpdateOrder, fetchOrder, billingAddressKey} = useOrder();
package/src/shop.js CHANGED
@@ -125,7 +125,13 @@ export const useViurShopStore = defineStore("viurshopStore", () => {
125
125
  paymentProviderData:null,
126
126
  UserDataLayout: shallowRef(AddressFormLayout),
127
127
  discounts:{},
128
- stepperActionComponent:shallowRef(ShopOrderStepperAction)
128
+ stepperActionComponent:shallowRef(ShopOrderStepperAction),
129
+
130
+ //stepper rules:
131
+ stepperVisible: computed(()=>{
132
+ return state.currentTab!=='complete'
133
+ })
134
+
129
135
  })
130
136
 
131
137
  function addTab({name, component, displayname, iconname, iconlibrary,active})