Selaa lähdekoodia

update

tags/Baseline_30082024_FRONTEND_UAT
cyril.tsui 1 vuosi sitten
vanhempi
commit
3f31918422
3 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. +1
    -1
      src/components/ChangePassword/ChangePassword.tsx
  2. +1
    -1
      src/components/ChangePassword/ChangePasswordForm.tsx
  3. +3
    -3
      src/components/UserWorkspacePage/ProjectGrid.tsx

+ 1
- 1
src/components/ChangePassword/ChangePassword.tsx Näytä tiedosto

@@ -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


+ 1
- 1
src/components/ChangePassword/ChangePasswordForm.tsx Näytä tiedosto

@@ -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 {


+ 3
- 3
src/components/UserWorkspacePage/ProjectGrid.tsx Näytä tiedosto

@@ -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


Ladataan…
Peruuta
Tallenna