From 63823d41addec00556a93eabffa455630d169ca6 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sat, 6 Apr 2024 10:26:44 +0530 Subject: added basic (and incomplete) print preview template --- src/assets/placeholderlogo.png | Bin 0 -> 10419 bytes src/assets/placeholderqr.png | Bin 0 -> 6999 bytes src/classes/user.ts | 21 +++ src/components/InvoiceHeaderEditor.vue | 192 ++++++++++++++++++++++++ src/components/PrintPreview.vue | 31 ++++ src/components/PrintPreviewHeader.vue | 99 ++++++++++++ src/components/PrintPreviewItemsList.vue | 59 ++++++++ src/components/PrintPreviewRecipientDetails.vue | 146 ++++++++++++++++++ src/components/invoice_header.vue | 1 - src/components/invoice_header_editor.vue | 164 -------------------- src/views/NewInvoice.vue | 4 +- src/views/ViewInvoice.vue | 40 +---- 12 files changed, 558 insertions(+), 199 deletions(-) create mode 100644 src/assets/placeholderlogo.png create mode 100644 src/assets/placeholderqr.png create mode 100644 src/classes/user.ts create mode 100644 src/components/InvoiceHeaderEditor.vue create mode 100644 src/components/PrintPreview.vue create mode 100644 src/components/PrintPreviewHeader.vue create mode 100644 src/components/PrintPreviewItemsList.vue create mode 100644 src/components/PrintPreviewRecipientDetails.vue delete mode 100644 src/components/invoice_header_editor.vue (limited to 'src') diff --git a/src/assets/placeholderlogo.png b/src/assets/placeholderlogo.png new file mode 100644 index 0000000..6675ddd Binary files /dev/null and b/src/assets/placeholderlogo.png differ diff --git a/src/assets/placeholderqr.png b/src/assets/placeholderqr.png new file mode 100644 index 0000000..634fe46 Binary files /dev/null and b/src/assets/placeholderqr.png differ diff --git a/src/classes/user.ts b/src/classes/user.ts new file mode 100644 index 0000000..dc18717 --- /dev/null +++ b/src/classes/user.ts @@ -0,0 +1,21 @@ +export default class User { + FullName: string + FirmName: string + Gstin: string + Phone: string + Email: string + Website: string + Username: string + IsVerified: bool + + constructor() { + this.FullName = '' + this.FirmName = '' + this.Gstin = '' + this.Phone = '' + this.Email = '' + this.Website = '' + this.Username = '' + this.IsVerified = false + } +} diff --git a/src/components/InvoiceHeaderEditor.vue b/src/components/InvoiceHeaderEditor.vue new file mode 100644 index 0000000..6fe8a25 --- /dev/null +++ b/src/components/InvoiceHeaderEditor.vue @@ -0,0 +1,192 @@ + + + diff --git a/src/components/PrintPreview.vue b/src/components/PrintPreview.vue new file mode 100644 index 0000000..ecbda88 --- /dev/null +++ b/src/components/PrintPreview.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/src/components/PrintPreviewHeader.vue b/src/components/PrintPreviewHeader.vue new file mode 100644 index 0000000..33f82f2 --- /dev/null +++ b/src/components/PrintPreviewHeader.vue @@ -0,0 +1,99 @@ + + + + + diff --git a/src/components/PrintPreviewItemsList.vue b/src/components/PrintPreviewItemsList.vue new file mode 100644 index 0000000..72f0fc1 --- /dev/null +++ b/src/components/PrintPreviewItemsList.vue @@ -0,0 +1,59 @@ + + + + + diff --git a/src/components/PrintPreviewRecipientDetails.vue b/src/components/PrintPreviewRecipientDetails.vue new file mode 100644 index 0000000..6f1f5b7 --- /dev/null +++ b/src/components/PrintPreviewRecipientDetails.vue @@ -0,0 +1,146 @@ + + + + + diff --git a/src/components/invoice_header.vue b/src/components/invoice_header.vue index 5a57fc8..fe35980 100644 --- a/src/components/invoice_header.vue +++ b/src/components/invoice_header.vue @@ -1,5 +1,4 @@ diff --git a/src/components/invoice_header_editor.vue b/src/components/invoice_header_editor.vue deleted file mode 100644 index 83c5281..0000000 --- a/src/components/invoice_header_editor.vue +++ /dev/null @@ -1,164 +0,0 @@ - - - diff --git a/src/views/NewInvoice.vue b/src/views/NewInvoice.vue index 06d3ec7..2e2230c 100644 --- a/src/views/NewInvoice.vue +++ b/src/views/NewInvoice.vue @@ -1,7 +1,7 @@ diff --git a/src/views/ViewInvoice.vue b/src/views/ViewInvoice.vue index 5f2a783..b8b7f2d 100644 --- a/src/views/ViewInvoice.vue +++ b/src/views/ViewInvoice.vue @@ -11,6 +11,8 @@ import invoiceHeader from './../components/invoice_header.vue' import invoiceItemsTable from './../components/invoice_items_table.vue' import invoiceSummary from './../components/invoice_summary.vue' +import PrintPreview from './../components/PrintPreview.vue' + const toast = useToast({ position: 'top-right' }) @@ -52,50 +54,24 @@ onMounted(() => {