@viur/shop-components 0.1.17 → 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 +1 -1
- package/src/Shop.vue +2 -2
- package/src/ShopSummary.vue +5 -7
- package/src/Steps/ShopCart.vue +0 -1
- package/src/Steps/ShopOrderConfirm.vue +3 -3
- package/src/Steps/ShopShippingMethod.vue +1 -1
- package/src/Steps/ShopUserDataGuest.vue +1 -2
- package/src/components/CardSelector.vue +19 -14
- package/src/components/CartItemSmall.vue +4 -3
- package/src/composables/address.js +5 -2
- package/src/custombones/EmailCheckBone.vue +1 -6
- package/src/custombones/PhoneCheckBone.vue +0 -1
- package/src/translations/de.js +1 -1
- package/src/translations/fr.js +1 -1
package/package.json
CHANGED
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>
|
package/src/ShopSummary.vue
CHANGED
|
@@ -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
|
-
|
|
99
|
-
|
|
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
|
}
|
package/src/Steps/ShopCart.vue
CHANGED
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
<component :is="params['additionalComponent']" v-if="params['additionalComponent']" ref="additionalComponent">
|
|
72
72
|
</component>
|
|
73
73
|
|
|
74
|
-
<
|
|
75
|
-
<sl-button size="
|
|
76
|
-
</
|
|
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
|
-
|
|
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>
|
|
@@ -88,12 +88,11 @@ async function nextStep(){
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
let result = await saveAddresses(addressState.billingIsShipping)
|
|
91
|
-
if (result['action'] && result['action'].endsWith('Success')){
|
|
91
|
+
if (result?.['action'] && result['action'].endsWith('Success')){
|
|
92
92
|
return true
|
|
93
93
|
}
|
|
94
94
|
return false
|
|
95
95
|
} catch(error){
|
|
96
|
-
console.log(error)
|
|
97
96
|
return false
|
|
98
97
|
}
|
|
99
98
|
}
|
|
@@ -37,7 +37,7 @@ function changeSelection(i){
|
|
|
37
37
|
state.currentSelection = i
|
|
38
38
|
selection.value = props.options[i]
|
|
39
39
|
}
|
|
40
|
-
emits("change",
|
|
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-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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:
|
|
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:
|
|
191
|
+
align-self: flex-end;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
.viur-shop-cart-leaf-unitprice {
|
|
195
|
-
align-self:
|
|
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,
|
|
@@ -47,13 +47,16 @@ export const useAddress = defineStore("useAddressStore", () => {
|
|
|
47
47
|
state[`${type}IsUpdating`] = true
|
|
48
48
|
return state[`${type}Form`].sendData().then(async (resp)=>{
|
|
49
49
|
let data = await resp.json()
|
|
50
|
-
|
|
50
|
+
|
|
51
51
|
if (['addSuccess','editSuccess'].includes(data['action'])){
|
|
52
52
|
state[`${type}Data`] = data['values']
|
|
53
53
|
await updateAddresses(type, billingIsShipping)
|
|
54
54
|
}
|
|
55
55
|
state[`${type}IsUpdating`] = undefined
|
|
56
56
|
return data
|
|
57
|
+
}).catch(error=>{
|
|
58
|
+
state[`${type}Form`].state.loading = false
|
|
59
|
+
return {'action':"error"}
|
|
57
60
|
})
|
|
58
61
|
}
|
|
59
62
|
|
|
@@ -92,4 +95,4 @@ export const useAddress = defineStore("useAddressStore", () => {
|
|
|
92
95
|
updateAddresses,
|
|
93
96
|
saveAddresses
|
|
94
97
|
}
|
|
95
|
-
})
|
|
98
|
+
})
|
|
@@ -56,11 +56,9 @@ import { useI18n } from "vue-i18n"
|
|
|
56
56
|
const emailBone2 = ref(null)
|
|
57
57
|
|
|
58
58
|
function changeEvent(event) {
|
|
59
|
-
console.dir(event.target)
|
|
60
59
|
if(emailBone.value.value!==emailBone2.value.value){
|
|
61
|
-
emailBone.value.setCustomValidity(i18n.t("messages.
|
|
60
|
+
emailBone.value.setCustomValidity(i18n.t("messages.email_equal_error"))
|
|
62
61
|
emailBone.value.reportValidity()
|
|
63
|
-
console.log(event.target.classList)
|
|
64
62
|
if (!event.target.classList.contains('widget-bone-email-repeat')){
|
|
65
63
|
emit("change", props.name, event.target.value, props.lang, props.index,false)
|
|
66
64
|
}
|
|
@@ -68,9 +66,6 @@ import { useI18n } from "vue-i18n"
|
|
|
68
66
|
emailBone.value.setCustomValidity('')
|
|
69
67
|
emit("change", props.name, event.target.value, props.lang, props.index,true)
|
|
70
68
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
69
|
}
|
|
75
70
|
|
|
76
71
|
watchEffect(() => {
|
|
@@ -91,7 +91,6 @@ import { useI18n } from "vue-i18n"
|
|
|
91
91
|
if(stringBone.value.value!==stringBone2.value.value){
|
|
92
92
|
stringBone.value.setCustomValidity(i18n.t("messages.phone_equal_error"))
|
|
93
93
|
stringBone.value.reportValidity()
|
|
94
|
-
console.log(event.target.classList)
|
|
95
94
|
if (!event.target.classList.contains('widget-bone-string-repeat')){
|
|
96
95
|
emit("change", props.name, event.target.value, props.lang, props.index,false)
|
|
97
96
|
}
|
package/src/translations/de.js
CHANGED
|
@@ -60,7 +60,7 @@ export default {
|
|
|
60
60
|
wait_for_payment: 'Warte auf Zahlung...',
|
|
61
61
|
remove_article_from_cart: 'Wollen sie den Artikel wirklich entfernen?',
|
|
62
62
|
order_check_later: 'Sie können Ihre Bestellung am Ende noch einmal überprüfen.',
|
|
63
|
-
|
|
63
|
+
email_equal_error: 'E-Mail-Adressen stimmen nicht überein.',
|
|
64
64
|
phone_equal_error: "Telefonnummern stimmen nicht überein."
|
|
65
65
|
},
|
|
66
66
|
};
|
package/src/translations/fr.js
CHANGED
|
@@ -54,7 +54,7 @@ export default {
|
|
|
54
54
|
wait_for_payment: 'Warte auf Zahlung...',
|
|
55
55
|
remove_article_from_cart: 'Désirez-vous vraiment supprimer cet article du panier?',
|
|
56
56
|
order_check_later: 'Vous pourrez revérifier vos données avant de valider votre commande.',
|
|
57
|
-
|
|
57
|
+
email_equal_error: "Les adresses e-mail ne correspondent pas.",
|
|
58
58
|
phone_equal_error: "Les numéros de téléphone ne correspondent pas."
|
|
59
59
|
},
|
|
60
60
|
};
|