@viur/shop-components 0.1.18 → 0.1.19

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.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "Frontend Vue components for the shop module of ViUR",
5
5
  "repository": {
6
6
  "type": "git",
package/src/Shop.vue CHANGED
@@ -3,7 +3,7 @@
3
3
  <div class="viur-shop-stepper-wrap"
4
4
  :class="{ 'full-width': (!summary || summary==='bottom' || shopStore.state.currentTab==='complete') }"
5
5
  >
6
- <shop-order-stepper >
6
+ <shop-order-stepper>
7
7
  <template #template_cart>
8
8
  <slot name="template_cart"></slot>
9
9
  </template>
@@ -53,7 +53,7 @@
53
53
  paid: {{ shopStore.state.order?.['is_paid'] }}<br><br>
54
54
 
55
55
  OrderObject: {{shopStore.state.order}}
56
-
56
+
57
57
  </sl-details>
58
58
  </template>
59
59
  <div id="dialogs"></div>
@@ -27,7 +27,7 @@
27
27
  <sl-format-number lang="de" type="currency" currency="EUR" :value="state.shippingTotal">
28
28
  </sl-format-number>
29
29
  </div>
30
- <div class="viur-shop-cart-shipping-item" v-if="shopStore.state.order?.cart?.dest?.shipping">
30
+ <div class="viur-shop-cart-sidebar-info viur-shop-cart-shipping-item" v-if="shopStore.state.order?.cart?.dest?.shipping">
31
31
  <span v-html="$t('viur.shop.summary_delivery_time')"></span>
32
32
  <span>
33
33
  {{
@@ -94,11 +94,9 @@ const state = reactive({
94
94
  }),
95
95
  shippingTotal: computed(() => {
96
96
  let total = 0
97
-
98
- // let hasOrder = Object.keys(shopStore.state.order).length ? true : false
99
- // let hasShipping = Object.keys(shopStore.state.order.cart.dest.shipping).length ? true : false
100
-
101
- if( shopStore.state?.order?.cart?.dest?.shipping?.dest?.shipping_cost > 0 ) {
97
+ if (shopStore.state.cartRoot.shipping?.dest?.shipping_cost>=0 ){
98
+ total += shopStore.state.cartRoot.shipping?.dest?.shipping_cost
99
+ }else if( shopStore.state?.order?.cart?.dest?.shipping?.dest?.shipping_cost) {
102
100
  total += shopStore.state.order.cart.dest.shipping.dest.shipping_cost
103
101
  }
104
102
 
@@ -150,7 +148,7 @@ function calc_percent(val){
150
148
  display: flex;
151
149
  flex-direction: row;
152
150
  flex-wrap: nowrap;
153
- span {
151
+ span:first-of-type {
154
152
  margin-right: auto;
155
153
  }
156
154
  }
@@ -65,7 +65,6 @@ onBeforeMount(()=>{
65
65
  async function nextStep(){
66
66
  try{
67
67
  let resp = await addOrUpdateOrder()
68
- console.log(resp)
69
68
  return true
70
69
 
71
70
  } catch(error){
@@ -71,9 +71,9 @@
71
71
  <component :is="params['additionalComponent']" v-if="params['additionalComponent']" ref="additionalComponent">
72
72
  </component>
73
73
 
74
- <div class="wrapper">
75
- <sl-button size="small" @click="startCheckout" :disabled="!shopStore.state.canCheckout" variant="success">{{ $t('viur.shop.order_pay') }}</sl-button>
76
- </div>
74
+ <sl-bar class="wrapper">
75
+ <sl-button slot="right" size="large" @click="startCheckout" :disabled="!shopStore.state.canCheckout" variant="success">{{ $t('viur.shop.order_pay') }}</sl-button>
76
+ </sl-bar>
77
77
 
78
78
  <template v-if="shopStore.state.order?.['payment_provider'] !== null && shopStore.state.order?.['payment_provider'].startsWith('unzer-')">
79
79
  <sl-dialog v-if="state.paymentPopup" label="Zahlung" :open="state.paymentPopup" @sl-after-hide="state.paymentPopup=false">
@@ -13,7 +13,7 @@
13
13
  @change="updateShippingMethod"
14
14
  >
15
15
  <template v-slot="{option, index}">
16
- <img slot="image">
16
+ <!--<img slot="image">-->
17
17
 
18
18
  <sl-format-number lang="de" type="currency" currency="EUR" :value=" option['dest']['shipping_cost']" v-if="option['dest']['shipping_cost']">
19
19
  </sl-format-number>
@@ -37,7 +37,7 @@ function changeSelection(i){
37
37
  state.currentSelection = i
38
38
  selection.value = props.options[i]
39
39
  }
40
- emits("change", selection.value)
40
+ emits("change", props.options[i])
41
41
  }
42
42
 
43
43
  onMounted(()=>{
@@ -50,19 +50,24 @@ onMounted(()=>{
50
50
  </script>
51
51
 
52
52
  <style scoped>
53
- sl-card{
54
- width: 100%;
55
- &[selected]::part(base){
56
- border:1px solid var(--sl-color-primary-500);
57
- box-shadow: 0 0 0 var(--sl-focus-ring-width) var(--sl-input-focus-ring-color);
58
- }
53
+ sl-radio-group {
54
+ margin-top: var(--ignt-spacing-small);
55
+ }
59
56
 
60
- &::part(body){
61
- display:flex;
62
- flex-direction: row;
63
- justify-content: space-between;
64
- align-items: center;
65
- }
57
+ sl-card {
58
+ width: calc(100% - 6px);
59
+ margin-left: 3px;
60
+ &[selected]::part(base){
61
+ border:1px solid var(--sl-color-primary-500);
62
+ box-shadow: 0 0 0 var(--sl-focus-ring-width) var(--sl-input-focus-ring-color);
63
+ }
64
+
65
+ &::part(body){
66
+ display:flex;
67
+ flex-direction: row;
68
+ justify-content: space-between;
69
+ align-items: center;
70
+ }
66
71
  }
67
72
 
68
- </style>
73
+ </style>
@@ -183,17 +183,18 @@ function removeArticle(){
183
183
  }
184
184
 
185
185
  .viur-shop-cart-leaf-article-number {
186
- align-self: center;
186
+ align-self: flex-end;
187
187
  grid-column: span 2;
188
188
  }
189
189
 
190
190
  .viur-shop-cart-leaf-quantity {
191
- align-self: center;
191
+ align-self: flex-end;
192
192
  }
193
193
 
194
194
  .viur-shop-cart-leaf-unitprice {
195
- align-self: center;
195
+ align-self: flex-end;
196
196
  grid-column: 4 / span 1;
197
+ text-align: right;
197
198
  }
198
199
 
199
200
  .viur-shop-cart-leaf-label,