|
@@ -13,6 +13,8 @@ import { DesktopDatePicker, LocalizationProvider } from '@mui/lab';
|
13
|
13
|
|
14
|
14
|
export function Password(props) {
|
15
|
15
|
|
|
16
|
+ const [uid,setUID] = React.useState(null);
|
|
17
|
+
|
16
|
18
|
const PasswordSchema = Yup.object().shape({
|
17
|
19
|
pwd:
|
18
|
20
|
Yup
|
|
@@ -50,14 +52,31 @@ export function Password(props) {
|
50
|
52
|
<FormikProvider style={{ padding : 25, paddingTop : 5 }} value={formik}>
|
51
|
53
|
<Form autoComplete="off" noValidate onSubmit={handleSubmit}>
|
52
|
54
|
<Stack spacing={3}>
|
|
55
|
+
|
53
|
56
|
<TextField
|
54
|
57
|
fullWidth
|
55
|
58
|
type="text"
|
56
|
59
|
label="Nombre o identificador"
|
57
|
60
|
{...getFieldProps('pwd')}
|
|
61
|
+ onChange={(event)=>{
|
|
62
|
+ let value = event.target.value
|
|
63
|
+ setUID(btoa(value));
|
|
64
|
+ setValues({
|
|
65
|
+ ...values,
|
|
66
|
+ pwd:value
|
|
67
|
+ })
|
|
68
|
+ }}
|
58
|
69
|
error={Boolean(touched.pwd && errors.pwd)}
|
59
|
70
|
helperText={touched.pwd && errors.pwd}
|
60
|
71
|
/>
|
|
72
|
+
|
|
73
|
+ <TextField
|
|
74
|
+ value={uid? uid: btoa(values.pwd)}
|
|
75
|
+ disabled
|
|
76
|
+ fullWidth
|
|
77
|
+ type="text"
|
|
78
|
+ label="Identificador Codificado"
|
|
79
|
+ />
|
61
|
80
|
|
62
|
81
|
<Stack direction={{ xs: 'column', sm: 'row' }} spacing={2}>
|
63
|
82
|
|