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:
@@ -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;
|
||||
Reference in New Issue
Block a user