@viur/shop-components 0.6.0 → 0.7.0

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.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Frontend Vue components for the shop module of ViUR",
5
5
  "repository": {
6
6
  "type": "git",
@@ -63,7 +63,6 @@ function optionChanged(type){
63
63
  }
64
64
 
65
65
  onBeforeMount(()=>{
66
- // FIXME: Fetch this after ever country (address) change!
67
66
  fetchPaymentData().then(()=>{
68
67
  state.selection = shopStore.state.order?.['payment_provider']
69
68
  })
@@ -21,9 +21,12 @@ import LoadingHandler from './LoadingHandler.vue';
21
21
  import ViForm from "@viur/vue-utils/forms/ViForm.vue";
22
22
  import {useViurShopStore} from "../shop";
23
23
  import {useAddress} from "../composables/address";
24
+ import { usePayment } from '../composables/payment';
25
+
24
26
 
25
27
  const shopStore = useViurShopStore();
26
28
  const {state:addressState} = useAddress();
29
+ const {state:paymentState, fetchPaymentData} = usePayment()
27
30
 
28
31
  const props = defineProps({
29
32
  formtype:{
@@ -71,6 +74,9 @@ const state = reactive({
71
74
  function formChange(data){
72
75
  if (data.name === "country"){
73
76
  state.language = data.value
77
+ if (state.formtype === 'billing'){
78
+ fetchPaymentData()
79
+ }
74
80
  }
75
81
  }
76
82
 
@@ -271,10 +271,6 @@ function removeArticle(){
271
271
  margin: 0;
272
272
  }
273
273
 
274
- @media (max-width: 600px) {
275
- grid-column: span 2;
276
- }
277
-
278
274
  @media (max-width: 500px) {
279
275
  display: none;
280
276
  }
@@ -289,6 +285,10 @@ function removeArticle(){
289
285
 
290
286
  .viur-shop-cart-leaf-quantity {
291
287
  align-self: center;
288
+ grid-column: span 5;
289
+ @media (min-width: 600px) {
290
+ grid-column: span 2;
291
+ }
292
292
  }
293
293
 
294
294
  .viur-shop-cart-leaf-unitprice {
package/src/shop.js CHANGED
@@ -160,6 +160,10 @@ export const useViurShopStore = defineStore("viurshopStore", () => {
160
160
 
161
161
  const params = useUrlSearchParams('hash')
162
162
  params['step'] = state.currentTab
163
+ window.scrollTo({
164
+ top: 0,
165
+ behavior: 'smooth'
166
+ });
163
167
  }
164
168
 
165
169
  function navigateToNext(){
@@ -36,7 +36,7 @@ export default {
36
36
  'summary_headline': 'Résumé',
37
37
  'summary_subtotal': 'Sous-total',
38
38
  'summary_shipping_total': 'Emballage et envoi',
39
- 'summary_delivery_time': 'Délai de livraison',
39
+ 'summary_delivery_time': 'Délai de livraison estimé',
40
40
  'summary_discount': 'Vous économisez sur votre achat',
41
41
  'summary_checkout': 'Acheter cet article',
42
42
  'summary_total': 'Montant total',