|
|
@@ -165,7 +165,7 @@ const StaffInfo: React.FC<Props> = ({ combos }) => { |
|
|
|
</Grid> |
|
|
|
<Grid item xs={6}> |
|
|
|
<FormControl fullWidth> |
|
|
|
<InputLabel required>{t("Department")}</InputLabel> |
|
|
|
<InputLabel>{t("Department")}</InputLabel> |
|
|
|
<Controller |
|
|
|
control={control} |
|
|
|
name="departmentId" |
|
|
@@ -377,9 +377,11 @@ const StaffInfo: React.FC<Props> = ({ combos }) => { |
|
|
|
label={t("Emergency Contact Name")} |
|
|
|
fullWidth |
|
|
|
required |
|
|
|
{...register("emergContactName", { |
|
|
|
required: "Emergency Contact Name required!", |
|
|
|
})} |
|
|
|
{...register("emergContactName" |
|
|
|
// , { |
|
|
|
// required: "Emergency Contact Name required!", |
|
|
|
// } |
|
|
|
)} |
|
|
|
error={Boolean(errors.emergContactName)} |
|
|
|
helperText={ |
|
|
|
Boolean(errors.emergContactName) && |
|
|
@@ -394,9 +396,11 @@ const StaffInfo: React.FC<Props> = ({ combos }) => { |
|
|
|
label={t("Emergency Contact Phone")} |
|
|
|
fullWidth |
|
|
|
required |
|
|
|
{...register("emergContactPhone", { |
|
|
|
required: "Emergency Contact Phone required!", |
|
|
|
})} |
|
|
|
{...register("emergContactPhone" |
|
|
|
// , { |
|
|
|
// required: "Emergency Contact Phone required!", |
|
|
|
// } |
|
|
|
)} |
|
|
|
error={Boolean(errors.emergContactPhone)} |
|
|
|
helperText={ |
|
|
|
Boolean(errors.emergContactPhone) && |
|
|
@@ -421,7 +425,7 @@ const StaffInfo: React.FC<Props> = ({ combos }) => { |
|
|
|
}} |
|
|
|
slotProps={{ |
|
|
|
textField: { |
|
|
|
required: true, |
|
|
|
// required: true, |
|
|
|
error: |
|
|
|
joinDate === "Invalid Date" || Boolean(errors.joinDate), |
|
|
|
// value: errors.joinDate?.message, |
|
|
@@ -432,7 +436,7 @@ const StaffInfo: React.FC<Props> = ({ combos }) => { |
|
|
|
</Grid> |
|
|
|
<Grid item xs={6}> |
|
|
|
<FormControl fullWidth> |
|
|
|
<InputLabel required>{t("Join Position")}</InputLabel> |
|
|
|
<InputLabel>{t("Join Position")}</InputLabel> |
|
|
|
<Controller |
|
|
|
control={control} |
|
|
|
name="joinPositionId" |
|
|
|