Ver a proveniência

update

tags/Baseline_30082024_FRONTEND_UAT
MSI\derek há 1 ano
ascendente
cometimento
2f8520c6ee
1 ficheiros alterados com 2 adições e 2 eliminações
  1. +2
    -2
      src/components/EditStaff/EditStaff.tsx

+ 2
- 2
src/components/EditStaff/EditStaff.tsx Ver ficheiro

@@ -108,7 +108,7 @@ const EditStaff: React.FC<formProps> = ({ Staff, combos }) => {
haveError = true
formProps.setError("phone1", { message: t("Please Enter Correct Phone No.."), type: "required" })
}
if(!regex_phone.test(data.emergContactPhone)) {
if(data.emergContactPhone && !regex_phone.test(data.emergContactPhone)) {
haveError = true
formProps.setError("emergContactPhone", { message: t("Please Enter Correct Phone No.."), type: "required" })
}
@@ -150,7 +150,7 @@ const EditStaff: React.FC<formProps> = ({ Staff, combos }) => {
haveError = true
formProps.setError("joinDate", { message: t("Please Enter Join Date."), type: "required" })
}
if (data.departDate && new Date(data.departDate) <= new Date(data.joinDate)) {
if (data.joinDate &&data.departDate && new Date(data.departDate) <= new Date(data.joinDate)) {
haveError = true
formProps.setError("departDate", { message: t("Depart Date cannot be earlier than Join Date."), type: "required" })
}


Carregando…
Cancelar
Guardar