add RegEx for password field and add chnage password option for expert management and a bit debug on update of expert

This commit is contained in:
2023-09-17 15:18:46 +03:30
parent 123eb18a81
commit 0c0fc5515e
7 changed files with 164 additions and 28 deletions

View File

@@ -0,0 +1,33 @@
import {useTranslations} from "next-intl";
import {Dialog, DialogTitle, IconButton, Tooltip} from "@mui/material";
import KeyIcon from '@mui/icons-material/Key';
import {useState} from "react";
import ChangePasswordContent from "./ChangePasswordContent";
const ChangePassword = ({rowId, fetchUrl, mutate}) => {
const t = useTranslations();
const [openChnagePasswordDialog, setOpenChangePasswordDialog] = useState(false);
return (
<>
<Tooltip title={t("ExpertMangement.change_password_tooltip")}>
<IconButton
color="primary"
onClick={() => {
setOpenChangePasswordDialog(true)
}}
>
<KeyIcon/>
</IconButton>
</Tooltip>
<Dialog fullWidth maxWidth={'xs'} open={openChnagePasswordDialog}
PaperProps={{sx: {boxShadow: 'rgba(60, 64, 67, 0.3) 0px 1px 16px 0px, rgba(60, 64, 67, 0.15) 0px 1px 10px 0px'}}}>
<DialogTitle>{t("ExpertMangement.change_password")}</DialogTitle>
<ChangePasswordContent rowId={rowId} mutate={mutate} fetchUrl={fetchUrl}
setOpenChangePasswordDialog={setOpenChangePasswordDialog}/>
</Dialog>
</>
);
};
export default ChangePassword;