Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
) : null}
<label for="timestamp" id="timestampLabel">
Timestamp
</label>
<label for="systolic" id="systolicLabel">
Systolic
</label>
ID
) : null}
<label for="name" id="nameLabel">
Name
</label>
<label for="py" id="pyLabel">
Py
</label>
<label for="resetDate" id="resetDateLabel">
Reset Date
</label>
<label for="createdBy" id="createdByLabel">
Created By
</label>
/>
<label for="createdId" id="createdIdLabel">
Created Id
</label>
<label for="targetDate" id="targetDateLabel">
Target Date
</label>
export const saveAccountSettings = account => async (dispatch, getState) => {
await dispatch({
type: ACTION_TYPES.UPDATE_ACCOUNT,
payload: axios.post(apiUrl, account),
meta: {
successMessage: translate('settings.messages.success')
}
});
if (Storage.session.get(`locale`)) {
Storage.session.remove(`locale`);
}
await dispatch(getSession());
};
name="confirmPassword"
label={translate('global.form.confirmpassword.label')}
placeholder={translate('global.form.confirmpassword.placeholder')}
type="password"
validate={{
required: {
value: true,
errorMessage: translate('global.messages.validate.confirmpassword.required')
},
minLength: {
value: 4,
errorMessage: translate('global.messages.validate.confirmpassword.minlength')
},
maxLength: {
value: 50,
errorMessage: translate('global.messages.validate.confirmpassword.maxlength')
},
match: {
value: 'newPassword',
errorMessage: translate('global.messages.error.dontmatch')
}
}}
/>
<button type="submit" color="success">
Save
</button>
);
};
const getResetForm = () => {
return (
if (action.meta && action.meta.successMessage) {
toast.success(action.meta.successMessage);
} else if (response && response.action && response.action.payload && response.action.payload.headers) {
const headers = response.action.payload.headers;
let alert: string = null;
let alertParams: string = null;
Object.entries(headers).forEach(([k, v]: [string, string]) => {
if (k.toLowerCase().endsWith('app-alert')) {
alert = v;
} else if (k.toLowerCase().endsWith('app-params')) {
alertParams = v;
}
});
if (alert) {
const alertParam = alertParams;
toast.success(translate(alert, { param: alertParam }));
}
}
return Promise.resolve(response);
})
.catch(error => {
type="email"
validate={{
required: { value: true, errorMessage: translate('global.messages.validate.email.required') },
minLength: { value: 5, errorMessage: translate('global.messages.validate.email.minlength') },
maxLength: { value: 254, errorMessage: translate('global.messages.validate.email.maxlength') }
}}
/>
}
placeholder={translate('global.form.newpassword.placeholder')}
type="password"
onChange={this.updatePassword}
validate={{
required: { value: true, errorMessage: translate('global.messages.validate.newpassword.required') },
minLength: { value: 4, errorMessage: translate('global.messages.validate.newpassword.minlength') },
maxLength: { value: 50, errorMessage: translate('global.messages.validate.newpassword.maxlength') }
}}
/>
}
placeholder={translate('global.form.confirmpassword.placeholder')}
type="password"
validate={{
required: { value: true, errorMessage: translate('global.messages.validate.confirmpassword.required') },
minLength: { value: 4, errorMessage: translate('global.messages.validate.confirmpassword.minlength') },
maxLength: { value: 50, errorMessage: translate('global.messages.validate.confirmpassword.maxlength') },
match: { value: 'firstPassword', errorMessage: translate('global.messages.error.dontmatch') }
}}
/>
validate={{
required: { value: true, errorMessage: translate('global.messages.validate.email.required') },
minLength: { value: 5, errorMessage: translate('global.messages.validate.email.minlength') },
maxLength: { value: 254, errorMessage: translate('global.messages.validate.email.maxlength') }
}}
/>
<button type="submit" color="primary" id="register-submit"></button>