diff --git a/src/pages/05_quotation/preview/ViewForm.vue b/src/pages/05_quotation/preview/ViewForm.vue index 6a78f69d..ed897742 100644 --- a/src/pages/05_quotation/preview/ViewForm.vue +++ b/src/pages/05_quotation/preview/ViewForm.vue @@ -113,8 +113,23 @@ function getHeight(el: HTMLElement) { } const details = ref
(); +enum View { + Quotation, + Invoice, + Payment, + Receipt, +} +const view = ref(View.Quotation); onMounted(async () => { + const currentDocumentType = new URL(window.location.href).searchParams.get( + 'type', + ); + + if (currentDocumentType === 'invoice') view.value = View.Invoice; + if (currentDocumentType === 'payment') view.value = View.Payment; + if (currentDocumentType === 'receipt') view.value = View.Receipt; + let str = localStorage.getItem('quotation-preview') || sessionStorage.getItem('quotation-preview'); @@ -234,7 +249,14 @@ function print() {
-
+