@viur/shop-components 0.1.0 → 0.1.2

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.0",
3
+ "version": "0.1.2",
4
4
  "description": "Frontend Vue components for the shop module of ViUR",
5
5
  "repository": {
6
6
  "type": "git",
package/src/Shop.vue CHANGED
@@ -60,7 +60,7 @@
60
60
 
61
61
 
62
62
  <script setup>
63
- import { onBeforeMount } from 'vue';
63
+ import { onBeforeMount, watch } from 'vue';
64
64
  import ShopOrderStepper from './ShopOrderStepper.vue'
65
65
  import ShopSummary from "./ShopSummary.vue"
66
66
  import {useViurShopStore} from './shop'
@@ -73,6 +73,9 @@ const shopStore = useViurShopStore()
73
73
  const {fetchOrder} = useOrder()
74
74
  const {fetchCart} = useCart()
75
75
 
76
+ const emit = defineEmits('change')
77
+
78
+
76
79
  const props = defineProps({
77
80
  summary:{
78
81
  default:false
@@ -120,14 +123,14 @@ onBeforeMount(()=>{
120
123
  }else{
121
124
  shopStore.navigateToTab('cart')
122
125
  }
126
+ })
123
127
 
124
128
 
125
-
126
-
129
+ watch(()=>shopStore.state.currentTab, (newVal,oldVal)=>{
130
+ emit('change', newVal)
127
131
  })
128
132
 
129
133
 
130
-
131
134
  </script>
132
135
 
133
136
  <style scoped>
@@ -29,7 +29,7 @@
29
29
  <script setup>
30
30
  import {reactive,onBeforeMount} from "vue";
31
31
  import CardSelector from "../components/CardSelector.vue";
32
- import LoadingHandler from "../../old/components/generic/loadinghandler.vue";
32
+ import LoadingHandler from "../components/LoadingHandler.vue";
33
33
  import {useShipping} from "../composables/shipping";
34
34
  import {useCart} from "../composables/cart";
35
35
  import { useOrder } from "../composables/order";