diff options
Diffstat (limited to 'src/views/ViewInvoice.vue')
-rw-r--r-- | src/views/ViewInvoice.vue | 56 |
1 files changed, 47 insertions, 9 deletions
diff --git a/src/views/ViewInvoice.vue b/src/views/ViewInvoice.vue index 5cc04b8..4ac8325 100644 --- a/src/views/ViewInvoice.vue +++ b/src/views/ViewInvoice.vue @@ -51,25 +51,63 @@ onMounted(() => { </script> <template> - <invoiceHeader - :invoice="invoice" /> - <invoiceItemsTable - :items="items" - :isLoading="itemsTableIsLoading" /> - <invoiceSummary - :items="items" - :isLoading="itemsTableIsLoading" - /> + <div id="print-preview" class="bg-light text-black"> + <invoiceHeader + :invoice="invoice" /> + <invoiceItemsTable + preview=true + :items="items" + :isLoading="itemsTableIsLoading" /> + <invoiceSummary + :items="items" + :isLoading="itemsTableIsLoading" + /> + </div> <button id="print-button" class="btn btn-primary" @click="handlePrint">Print</button> </template> <style> +#print-preview { + width: 670px; +} +#print-preview * { + font-size: 12pt !important; +} +#print-preview .sup { + display: none; +} +#print-preview table { + width: 100%; +} +#print-preview table * { + font-size: 10pt !important; +} +#print-preview .invoice-items-table { + margin-bottom: auto !important; +} +#print-preview .invoice-summary { + margin-top: auto !important; +} @media print { + #print-preview { + width: auto !important; + } #sidebar, #navbar, #print-button, .btn { display: none !important; } ::-webkit-scrollbar { display: none; } + main { + width: 100% !important; + overflow-x: visible !important; + margin: 0 !important; + padding: 0 !important; + } + #app { + display: block; + max-height: auto !important; + overflow-y: visible !important; + } } </style> |