refactor: assign worker to selectedWorker
This commit is contained in:
parent
4e736a2c96
commit
d5c8ce85b6
3 changed files with 62 additions and 7 deletions
|
|
@ -221,7 +221,10 @@ function triggerAddQuotationDialog() {
|
|||
// TODO: form and state controll
|
||||
}
|
||||
|
||||
function triggerQuotationDialog(statusDialog: 'info' | 'edit' | 'create') {
|
||||
function triggerQuotationDialog(
|
||||
statusDialog: 'info' | 'edit' | 'create',
|
||||
quotationId?: string,
|
||||
) {
|
||||
const url = new URL('/quotation/add-quotation', window.location.origin);
|
||||
url.searchParams.set('branchId', branchId.value);
|
||||
url.searchParams.set(
|
||||
|
|
@ -232,6 +235,10 @@ function triggerQuotationDialog(statusDialog: 'info' | 'edit' | 'create') {
|
|||
url.searchParams.set('special', special.value.toString());
|
||||
url.searchParams.set('statusDialog', statusDialog);
|
||||
|
||||
if (quotationId !== undefined) {
|
||||
url.searchParams.set('quotationId', quotationId);
|
||||
}
|
||||
|
||||
window.open(url.toString(), '_blank');
|
||||
}
|
||||
|
||||
|
|
@ -613,8 +620,12 @@ watch(() => pageState.currentTab, fetchQuotationList);
|
|||
"
|
||||
:reporter="v.actorName"
|
||||
:total-price="v.totalPrice"
|
||||
@view="quotationFormStore.assignFormData(v.id)"
|
||||
@edit="quotationFormStore.assignFormData(v.id, 'edit')"
|
||||
@view="
|
||||
() => {
|
||||
triggerQuotationDialog('info', v.id);
|
||||
}
|
||||
"
|
||||
@edit="triggerQuotationDialog('edit', v.id)"
|
||||
@link="console.log('link')"
|
||||
@upload="console.log('upload')"
|
||||
@delete="triggerDialogDeleteQuottaion(v.id)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue