forked from verdnatura/hedera-web
Merge pull request 'Basket view' (!81) from wbuezas/hedera-web-mindshore:feature/Basket into 4922-vueMigration
Reviewed-on: verdnatura/hedera-web#81
This commit is contained in:
commit
d736ea716b
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
import { onBeforeMount, ref, inject, onMounted } from 'vue';
|
||||
import { onBeforeMount, ref, inject } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import { useAppStore } from 'stores/app';
|
||||
|
@ -17,14 +17,12 @@ const rows = ref([]);
|
|||
const ticket = ref({});
|
||||
const orderId = ref(null);
|
||||
|
||||
onBeforeMount(() => {
|
||||
appStore.check();
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
onBeforeMount(async () => {
|
||||
await appStore.check();
|
||||
orderId.value = route.params.id || basketOrderId.value;
|
||||
if (orderId.value) await fetchData();
|
||||
});
|
||||
|
||||
const getOrder = async () => {
|
||||
try {
|
||||
const [data] = await jApi.query(
|
||||
|
|
|
@ -87,7 +87,7 @@ export const useAppStore = defineStore('hedera', {
|
|||
if (this.basketOrderId) {
|
||||
return await this.checkRedirect(checkoutContinue);
|
||||
} else {
|
||||
this.redirect();
|
||||
await this.redirect();
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue