Skip to content

Commit

Permalink
fix: init shipping fix
Browse files Browse the repository at this point in the history
  • Loading branch information
akelch committed Nov 18, 2024
1 parent e70f234 commit 50bb21e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
10 changes: 2 additions & 8 deletions src/components/ShopOrderShippingMethod.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<template>
{{ shippingStore.state.selectedShippingMethod }}
<loading-handler :isLoading="shippingStore.state.isLoading"
:isUpdating="shippingStore.state.isUpdating"
:hasError="shippingStore.state.hasError"
:errorMessage="shippingStore.state.errorMessage">
<card-selector :options="shippingStore.state.shippingData" v-model:selection="state.shippingSelection">

<card-selector :options="shippingStore.state.shippingData" v-model:selection="shippingStore.state.selectedShippingMethod">
<template v-slot="{option, index}">
<img slot="image">
{{ option['dest']['name'] }}
Expand Down Expand Up @@ -34,7 +33,6 @@ const props = defineProps({
})
const state = reactive({
shippingSelection:null
})
async function requestShippingData(){
Expand All @@ -47,10 +45,6 @@ watch(()=>cartStore.state.isReady, async(newVal, oldVal)=>{
}
})
watch(()=>state.shippingSelection,(newVal,oldVal)=>{
shippingStore.state.selectedShippingMethod = state.shippingSelection
})
onBeforeMount(async () => {
await cartStore.init();
});
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/generic/CardSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const props = defineProps({
})
const state = reactive({
currentSelection:0
currentSelection:null
})
function changeSelection(i){
Expand Down
5 changes: 0 additions & 5 deletions src/stores/shipping.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ export const useShippingStore = defineStore("shippingStore", () => {
state.hasError = true
state.errorMessage = "Keine gültige Versandart gefunden."
}



/*Fetch possible Shipping types*/

}

return {
Expand Down

0 comments on commit 50bb21e

Please sign in to comment.