fix: worker missing

This commit is contained in:
Thanaphon Frappet 2024-12-02 17:47:53 +07:00
parent e76077ba08
commit 127d8c0ebc
2 changed files with 7 additions and 22 deletions

View file

@ -674,21 +674,7 @@ function toggleDeleteProduct(index: number) {
}
async function assignWorkerToSelectedWorker() {
if (quotationFormData.value.customerBranchId) {
const retEmp = await customerStore.fetchBranchEmployee(
quotationFormData.value.customerBranchId,
{ passport: true },
);
if (retEmp) {
workerList.value = retEmp.data.result;
quotationFormData.value.worker.forEach((value) => {
const tempValue: Employee | undefined = retEmp.data.result.find(
(v) => v.id === value.id,
);
if (tempValue !== undefined) selectedWorker.value.push(tempValue);
});
}
}
selectedWorker.value = quotationFormData.value.worker;
}
function convertToTable(nodes: Node[]) {