@@ -28,7 +28,7 @@ const ChangePassword: React.FC<PasswordRulesProps> = ({ | |||||
try { | try { | ||||
let haveError = false; | let haveError = false; | ||||
// Minimum eight characters, at least one uppercase letter, one lowercase letter, one number and one special character: | // Minimum eight characters, at least one uppercase letter, one lowercase letter, one number and one special character: | ||||
let regex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&-=+_]{8,}$/ | |||||
let regex = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&-=+_*(),.?":{}|<>])[A-Za-z\d@$!%*?&-=+_*(),.?":{}|<>]{8,}$/ | |||||
if (data.newPassword.length < 8 || data.newPassword.length > 20) { | if (data.newPassword.length < 8 || data.newPassword.length > 20) { | ||||
haveError = true | haveError = true | ||||
@@ -85,7 +85,7 @@ const ChagnePasswordForm: React.FC<PasswordRulesProps> = ({ pwRules:rules }) => | |||||
} else if (index === 3 && rules.number && !/[0-9]/.test(inputValue)) { | } else if (index === 3 && rules.number && !/[0-9]/.test(inputValue)) { | ||||
//testing for numbers | //testing for numbers | ||||
return "red"; | return "red"; | ||||
} else if (index === 4 && rules.specialChar && !/[!@#$%^&*(),.?":{}|<>]/.test(inputValue)) { | |||||
} else if (index === 4 && rules.specialChar && !/[!@#$%^&-=+_*(),.?":{}|<>]/.test(inputValue)) { | |||||
//testing for special characters | //testing for special characters | ||||
return "red"; | return "red"; | ||||
} else { | } else { | ||||
@@ -52,10 +52,10 @@ const ProjectGrid: React.FC<Props> = ({ projects, maintainNormalStaffWorkspaceAb | |||||
alignItems: "baseline", | alignItems: "baseline", | ||||
}} | }} | ||||
> | > | ||||
<Typography variant="caption">{t("(Others)")}</Typography> | |||||
<Typography>{`(${manhourFormatter.format( | |||||
<Typography variant="caption">{t("Others")}</Typography> | |||||
<Typography>{`${manhourFormatter.format( | |||||
Boolean(maintainManagementStaffWorkspaceAbility) ? project.hoursSpentOther : project.currentStaffHoursSpentOther, | Boolean(maintainManagementStaffWorkspaceAbility) ? project.hoursSpentOther : project.currentStaffHoursSpentOther, | ||||
)})`}</Typography> | |||||
)}`}</Typography> | |||||
</Box></>} | </Box></>} | ||||
{/* Hours Allocated */} | {/* Hours Allocated */} | ||||
{Boolean(maintainManagementStaffWorkspaceAbility) && <Box | {Boolean(maintainManagementStaffWorkspaceAbility) && <Box | ||||