forked from verdnatura/salix-front
descriptor menu show invoice actions
This commit is contained in:
parent
41e5110a8a
commit
6ace34cbb1
|
@ -4,6 +4,9 @@ import { useI18n } from 'vue-i18n';
|
|||
|
||||
import TransferInvoiceForm from 'src/components/TransferInvoiceForm.vue';
|
||||
|
||||
import { useSession } from 'src/composables/useSession';
|
||||
import { usePrintService } from 'composables/usePrintService';
|
||||
|
||||
const $props = defineProps({
|
||||
invoiceOutData: {
|
||||
type: Object,
|
||||
|
@ -11,13 +14,23 @@ const $props = defineProps({
|
|||
},
|
||||
});
|
||||
|
||||
const session = useSession();
|
||||
const token = session.getToken();
|
||||
const { t } = useI18n();
|
||||
const { openReport } = usePrintService();
|
||||
|
||||
const transferInvoiceDialogRef = ref();
|
||||
|
||||
const showInvoicePdf = () => {};
|
||||
const showInvoicePdf = () => {
|
||||
const url = `api/InvoiceOuts/${$props.invoiceOutData.id}/download?access_token=${token}`;
|
||||
window.open(url, '_blank');
|
||||
};
|
||||
|
||||
const showInvoiceCsv = () => {};
|
||||
const showInvoiceCsv = () => {
|
||||
openReport(`InvoiceOuts/${$props.invoiceOutData.ref}/invoice-csv`, {
|
||||
recipientId: $props.invoiceOutData.client.id,
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
Loading…
Reference in New Issue