refactor: use session storage instead
This commit is contained in:
parent
d165d3bb81
commit
425fd71d2c
2 changed files with 66 additions and 49 deletions
|
|
@ -187,21 +187,18 @@ function triggerQuotationDialog(opts: {
|
|||
branchId?: string;
|
||||
}) {
|
||||
const url = new URL('/quotation/add-quotation', window.location.origin);
|
||||
url.searchParams.set(
|
||||
'branchId',
|
||||
opts.branchId !== undefined ? opts.branchId : branchId.value,
|
||||
);
|
||||
url.searchParams.set(
|
||||
'customerBranchId',
|
||||
quotationFormData.value.customerBranchId,
|
||||
);
|
||||
url.searchParams.set('agentPrice', agentPrice.value.toString());
|
||||
url.searchParams.set('special', special.value.toString());
|
||||
url.searchParams.set('statusDialog', opts.statusDialog);
|
||||
|
||||
if (opts.quotationId !== undefined) {
|
||||
url.searchParams.set('quotationId', opts.quotationId);
|
||||
}
|
||||
localStorage.setItem(
|
||||
'new-quotation',
|
||||
JSON.stringify({
|
||||
customerBranchId: quotationFormData.value.customerBranchId,
|
||||
branchId: opts.branchId ?? branchId.value,
|
||||
agentPrice: agentPrice.value,
|
||||
special: special.value,
|
||||
statusDialog: opts.statusDialog,
|
||||
quotationId: opts.quotationId,
|
||||
}),
|
||||
);
|
||||
|
||||
window.open(url.toString(), '_blank');
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue