fix: worker missing
This commit is contained in:
parent
e76077ba08
commit
127d8c0ebc
2 changed files with 7 additions and 22 deletions
|
|
@ -6,9 +6,10 @@ import { ref } from 'vue';
|
|||
// NOTE: Import types
|
||||
import {
|
||||
QuotationPayload,
|
||||
EmployeeWorker,
|
||||
QuotationFull,
|
||||
EmployeeWorker,
|
||||
} from 'src/stores/quotations/types';
|
||||
import { Employee } from 'src/stores/employee/types';
|
||||
|
||||
import { InvoicePayload } from 'src/stores/payment/types';
|
||||
|
||||
|
|
@ -139,15 +140,13 @@ export const useQuotationForm = defineStore('form-quotation', () => {
|
|||
name: p.name,
|
||||
amount: p.amount,
|
||||
})),
|
||||
worker: data.worker.map((v) =>
|
||||
Object.assign(v.employee, {
|
||||
dateOfBirth: new Date(v.employee.dateOfBirth),
|
||||
}),
|
||||
),
|
||||
worker: data.worker.map((v) => v.employee),
|
||||
});
|
||||
|
||||
currentFormData.value = structuredClone(resetFormData);
|
||||
|
||||
console.log(currentFormData.value);
|
||||
|
||||
currentFormState.value.createdBy = (locale) =>
|
||||
locale === 'eng'
|
||||
? data.createdBy.firstNameEN + ' ' + data.createdBy.lastNameEN
|
||||
|
|
@ -203,7 +202,7 @@ export const useQuotationForm = defineStore('form-quotation', () => {
|
|||
|
||||
function injectNewEmployee(
|
||||
obj: {
|
||||
data: EmployeeWorker & {
|
||||
data: Employee & {
|
||||
attachment?: {
|
||||
name?: string;
|
||||
group?: string;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue