|
|
@@ -161,10 +161,16 @@ const EditStaff: React.FC<formProps> = ({ Staff, combos, SalaryEffectiveInfo }) |
|
|
|
})) |
|
|
|
} |
|
|
|
// remove useless data |
|
|
|
if (postData.joinDate === 'Invalid Date') |
|
|
|
if (postData.joinDate === 'Invalid Date') { |
|
|
|
postData.joinDate = null |
|
|
|
if (postData.departDate === 'Invalid Date') |
|
|
|
} else { |
|
|
|
postData.joinDate = dayjs(postData.joinDate).format("YYYY-MM-DD") |
|
|
|
} |
|
|
|
if (postData.departDate === 'Invalid Date') { |
|
|
|
postData.departDate = null |
|
|
|
} else { |
|
|
|
postData.departDate = dayjs(postData.departDate).format("YYYY-MM-DD") |
|
|
|
} |
|
|
|
if (!postData.joinPositionId) |
|
|
|
postData.joinPositionId = null |
|
|
|
|
|
|
|