직원정보수정오류 해결
This commit is contained in:
@@ -217,10 +217,15 @@ async function updateEmployee() {
|
||||
try {
|
||||
await $fetch(`/api/employee/${route.params.id}/update`, {
|
||||
method: 'PUT',
|
||||
body: form.value
|
||||
body: {
|
||||
...form.value,
|
||||
joinDate: form.value.joinDate || null,
|
||||
employeePhone: form.value.employeePhone || null,
|
||||
employeePosition: form.value.employeePosition || null
|
||||
}
|
||||
})
|
||||
alert('저장되었습니다.')
|
||||
await loadEmployee()
|
||||
router.push('/employee')
|
||||
} catch (e: any) {
|
||||
alert(e.data?.message || e.message || '저장에 실패했습니다.')
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user