forked from verdnatura/hedera-web
Fix ticket print
This commit is contained in:
parent
533c7560dc
commit
2176c6e259
|
@ -15,6 +15,7 @@ const route = useRoute();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const { isHeaderMounted } = storeToRefs(appStore);
|
const { isHeaderMounted } = storeToRefs(appStore);
|
||||||
|
const { user, token } = storeToRefs(userStore);
|
||||||
|
|
||||||
const ticket = ref({});
|
const ticket = ref({});
|
||||||
const rows = ref([]);
|
const rows = ref([]);
|
||||||
|
@ -39,8 +40,8 @@ onMounted(async () => {
|
||||||
|
|
||||||
const onPrintClick = () => {
|
const onPrintClick = () => {
|
||||||
const params = new URLSearchParams({
|
const params = new URLSearchParams({
|
||||||
access_token: userStore.token,
|
access_token: token.value,
|
||||||
recipientId: userStore.id,
|
recipientId: user.value.id,
|
||||||
type: 'deliveryNote'
|
type: 'deliveryNote'
|
||||||
});
|
});
|
||||||
window.open(
|
window.open(
|
||||||
|
@ -60,10 +61,7 @@ const onPrintClick = () => {
|
||||||
/>
|
/>
|
||||||
</Teleport>
|
</Teleport>
|
||||||
<QPage>
|
<QPage>
|
||||||
<TicketDetails
|
<TicketDetails :rows="rows" :ticket="ticket" />
|
||||||
:rows="rows"
|
|
||||||
:ticket="ticket"
|
|
||||||
/>
|
|
||||||
</QPage>
|
</QPage>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue