|
|
@@ -13,6 +13,8 @@ import { DesktopDatePicker, LocalizationProvider } from '@mui/lab';
|
|
|
|
|
|
export function Password(props) {
|
|
|
|
|
|
+ const [uid,setUID] = React.useState(null);
|
|
|
+
|
|
|
const PasswordSchema = Yup.object().shape({
|
|
|
pwd:
|
|
|
Yup
|
|
|
@@ -50,14 +52,31 @@ export function Password(props) {
|
|
|
<FormikProvider style={{ padding : 25, paddingTop : 5 }} value={formik}>
|
|
|
<Form autoComplete="off" noValidate onSubmit={handleSubmit}>
|
|
|
<Stack spacing={3}>
|
|
|
+
|
|
|
<TextField
|
|
|
fullWidth
|
|
|
type="text"
|
|
|
label="Nombre o identificador"
|
|
|
{...getFieldProps('pwd')}
|
|
|
+ onChange={(event)=>{
|
|
|
+ let value = event.target.value
|
|
|
+ setUID(btoa(value));
|
|
|
+ setValues({
|
|
|
+ ...values,
|
|
|
+ pwd:value
|
|
|
+ })
|
|
|
+ }}
|
|
|
error={Boolean(touched.pwd && errors.pwd)}
|
|
|
helperText={touched.pwd && errors.pwd}
|
|
|
/>
|
|
|
+
|
|
|
+ <TextField
|
|
|
+ value={uid? uid: btoa(values.pwd)}
|
|
|
+ disabled
|
|
|
+ fullWidth
|
|
|
+ type="text"
|
|
|
+ label="Identificador Codificado"
|
|
|
+ />
|
|
|
|
|
|
<Stack direction={{ xs: 'column', sm: 'row' }} spacing={2}>
|
|
|
|