@viur/shop-components 0.1.17 → 0.1.18
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
|
@@ -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
|
}
|
|
@@ -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
|
};
|