| @@ -56,11 +56,11 @@ const EditStaff: React.FC<formProps> = ({ Staff, combos }) => { | |||||
| name: Staff.name, | name: Staff.name, | ||||
| companyId: Staff.company.id, | companyId: Staff.company.id, | ||||
| teamId: Staff.team?.id, | teamId: Staff.team?.id, | ||||
| departmentId: Staff.department.id, | |||||
| gradeId: Staff.department.id, | |||||
| departmentId: Staff.department?.id, | |||||
| gradeId: Staff.grade?.id, | |||||
| skillSetId: defaultSkillset, | skillSetId: defaultSkillset, | ||||
| // removeSkillSetId: [], | // removeSkillSetId: [], | ||||
| currentPositionId: Staff.currentPosition.id, | |||||
| currentPositionId: Staff.currentPosition?.id, | |||||
| salaryId: Staff.salary.id, | salaryId: Staff.salary.id, | ||||
| employType: Staff.employType, | employType: Staff.employType, | ||||
| email: Staff.email, | email: Staff.email, | ||||
| @@ -69,7 +69,7 @@ const EditStaff: React.FC<formProps> = ({ Staff, combos }) => { | |||||
| emergContactName: Staff.emergContactName, | emergContactName: Staff.emergContactName, | ||||
| emergContactPhone: Staff.emergContactPhone, | emergContactPhone: Staff.emergContactPhone, | ||||
| joinDate: dayjs(Staff.joinDate).toString() || "", | joinDate: dayjs(Staff.joinDate).toString() || "", | ||||
| joinPositionId: Staff.joinPosition.id, | |||||
| joinPositionId: Staff.joinPosition?.id, | |||||
| departDate: dayjs(Staff.departDate).toString() || "", | departDate: dayjs(Staff.departDate).toString() || "", | ||||
| departReason: Staff.departReason, | departReason: Staff.departReason, | ||||
| remark: Staff.remark, | remark: Staff.remark, | ||||
| @@ -188,11 +188,11 @@ const EditStaff: React.FC<formProps> = ({ Staff, combos }) => { | |||||
| name: Staff.name, | name: Staff.name, | ||||
| companyId: Staff.company.id, | companyId: Staff.company.id, | ||||
| teamId: Staff.team?.id, | teamId: Staff.team?.id, | ||||
| departmentId: Staff.department.id, | |||||
| gradeId: Staff.department.id, | |||||
| departmentId: Staff.department?.id, | |||||
| gradeId: Staff.grade?.id, | |||||
| skillSetId: defaultSkillset, | skillSetId: defaultSkillset, | ||||
| // removeSkillSetId: [], | // removeSkillSetId: [], | ||||
| currentPositionId: Staff.currentPosition.id, | |||||
| currentPositionId: Staff.currentPosition?.id, | |||||
| salaryId: Staff.salary.id, | salaryId: Staff.salary.id, | ||||
| employType: Staff.employType, | employType: Staff.employType, | ||||
| email: Staff.email, | email: Staff.email, | ||||
| @@ -201,7 +201,7 @@ const EditStaff: React.FC<formProps> = ({ Staff, combos }) => { | |||||
| emergContactName: Staff.emergContactName, | emergContactName: Staff.emergContactName, | ||||
| emergContactPhone: Staff.emergContactPhone, | emergContactPhone: Staff.emergContactPhone, | ||||
| joinDate: dayjs(Staff.joinDate).format(INPUT_DATE_FORMAT) || "", | joinDate: dayjs(Staff.joinDate).format(INPUT_DATE_FORMAT) || "", | ||||
| joinPositionId: Staff.joinPosition.id, | |||||
| joinPositionId: Staff.joinPosition?.id, | |||||
| departDate: !Staff.departDate ? "" : dayjs(Staff.departDate).format(INPUT_DATE_FORMAT), | departDate: !Staff.departDate ? "" : dayjs(Staff.departDate).format(INPUT_DATE_FORMAT), | ||||
| departReason: Staff.departReason, | departReason: Staff.departReason, | ||||
| remark: Staff.remark, | remark: Staff.remark, | ||||