diff --git a/src/pages/05_quotation/MainPage.vue b/src/pages/05_quotation/MainPage.vue index 33c0618c..4542fe5b 100644 --- a/src/pages/05_quotation/MainPage.vue +++ b/src/pages/05_quotation/MainPage.vue @@ -189,7 +189,10 @@ function triggerQuotationDialog(opts: { quotationId?: string; branchId?: string; }) { - const url = new URL('/quotation/add-quotation', window.location.origin); + const url = new URL( + `/quotation/${opts.statusDialog === 'create' ? 'add' : 'view'}`, + window.location.origin, + ); localStorage.setItem( 'new-quotation', diff --git a/src/router/routes.ts b/src/router/routes.ts index 120984f3..1d35d94a 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -93,10 +93,15 @@ const routes: RouteRecordRaw[] = [ }, { - path: '/quotation/add-quotation', + path: '/quotation/add', name: 'QuotationAdd', component: () => import('pages/05_quotation/QuotationForm.vue'), }, + { + path: '/quotation/view', + name: 'QuotationView', + component: () => import('pages/05_quotation/QuotationForm.vue'), + }, { path: '/quotation/document-view', name: 'QuotationDocumentView',