refactor: map value passport
This commit is contained in:
parent
82d28cc3aa
commit
ba717813a1
1 changed files with 2 additions and 11 deletions
|
|
@ -819,7 +819,7 @@ export const useEmployeeForm = defineStore('form-employee', () => {
|
|||
state.value.currentIndexPassport
|
||||
].id !== undefined
|
||||
) {
|
||||
const { id, ...payload } =
|
||||
const { id, employeeId, updatedAt, createdAt, ...payload } =
|
||||
currentFromDataEmployee.value.employeePassport?.[
|
||||
state.value.currentIndexPassport
|
||||
];
|
||||
|
|
@ -1145,16 +1145,7 @@ export const useEmployeeForm = defineStore('form-employee', () => {
|
|||
employeePassport: structuredClone(
|
||||
payload.employeePassport?.length === 0
|
||||
? defaultFormData.employeePassport
|
||||
: payload.employeePassport?.map((item) => ({
|
||||
id: item.id,
|
||||
number: item.number,
|
||||
type: item.type,
|
||||
issueDate: item.issueDate,
|
||||
expireDate: item.expireDate,
|
||||
issueCountry: item.issueCountry,
|
||||
issuePlace: item.issuePlace,
|
||||
previousPassportRef: item.previousPassportRef,
|
||||
})),
|
||||
: payload.employeePassport,
|
||||
),
|
||||
|
||||
employeeVisa: structuredClone(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue