Преглед изворни кода

update

tags/Baseline_30082024_FRONTEND_UAT
cyril.tsui пре 1 година
родитељ
комит
3f31918422
3 измењених фајлова са 5 додато и 5 уклоњено
  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 Прегледај датотеку

@@ -28,7 +28,7 @@ const ChangePassword: React.FC<PasswordRulesProps> = ({
try {
let haveError = false;
// 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) {
haveError = true


+ 1
- 1
src/components/ChangePassword/ChangePasswordForm.tsx Прегледај датотеку

@@ -85,7 +85,7 @@ const ChagnePasswordForm: React.FC<PasswordRulesProps> = ({ pwRules:rules }) =>
} else if (index === 3 && rules.number && !/[0-9]/.test(inputValue)) {
//testing for numbers
return "red";
} else if (index === 4 && rules.specialChar && !/[!@#$%^&*(),.?":{}|<>]/.test(inputValue)) {
} else if (index === 4 && rules.specialChar && !/[!@#$%^&-=+_*(),.?":{}|<>]/.test(inputValue)) {
//testing for special characters
return "red";
} else {


+ 3
- 3
src/components/UserWorkspacePage/ProjectGrid.tsx Прегледај датотеку

@@ -52,10 +52,10 @@ const ProjectGrid: React.FC<Props> = ({ projects, maintainNormalStaffWorkspaceAb
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,
)})`}</Typography>
)}`}</Typography>
</Box></>}
{/* Hours Allocated */}
{Boolean(maintainManagementStaffWorkspaceAbility) && <Box


Loading…
Откажи
Сачувај