From 6f3eceb6fb2eaeb23a63331c47311b2025e897f5 Mon Sep 17 00:00:00 2001 From: Thanaphon Frappet Date: Thu, 28 Nov 2024 10:48:34 +0700 Subject: [PATCH] refactor: handle type pre view --- src/pages/05_quotation/MainPage.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/05_quotation/MainPage.vue b/src/pages/05_quotation/MainPage.vue index 6a55b3ee..6eae4b53 100644 --- a/src/pages/05_quotation/MainPage.vue +++ b/src/pages/05_quotation/MainPage.vue @@ -349,7 +349,11 @@ async function storeDataLocal(id: string) { }), ); - window.open('/quotation/document-view', '_blank'); + const url = new URL('/quotation/document-view', window.location.origin); + + url.searchParams.append('type', pageState.currentTab.toLowerCase()); + + window.open(url, '_blank'); }