mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-20 06:40:31 +00:00
WIP Version 0.0.1
This commit is contained in:
@@ -5,7 +5,7 @@ import { useIntl } from 'react-intl';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
import AppToaster from 'components/AppToaster';
|
||||
import { compose } from 'utils';
|
||||
import AuthenticationConnect from 'connectors/Authentication.connect';
|
||||
import withAuthenticationActions from './withAuthenticationActions';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import {
|
||||
Button,
|
||||
@@ -21,6 +21,7 @@ import AuthInsider from 'containers/Authentication/AuthInsider';
|
||||
import { Link, useHistory } from 'react-router-dom';
|
||||
import useAsync from 'hooks/async';
|
||||
|
||||
|
||||
function Invite({
|
||||
requestInviteAccept,
|
||||
requestInviteMetaByToken,
|
||||
@@ -224,4 +225,6 @@ function Invite({
|
||||
);
|
||||
}
|
||||
|
||||
export default compose(AuthenticationConnect)(Invite);
|
||||
export default compose(
|
||||
withAuthenticationActions,
|
||||
)(Invite);
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import React, { useEffect, useMemo, useState } from 'react';
|
||||
import React, { useMemo, useState } from 'react';
|
||||
import { Link, useHistory } from 'react-router-dom';
|
||||
import * as Yup from 'yup';
|
||||
import { useFormik } from 'formik';
|
||||
import { connect } from 'react-redux';
|
||||
import { useIntl } from 'react-intl';
|
||||
import {
|
||||
Button,
|
||||
@@ -10,13 +9,12 @@ import {
|
||||
Intent,
|
||||
FormGroup,
|
||||
Checkbox,
|
||||
Position,
|
||||
} from '@blueprintjs/core';
|
||||
import Toaster from 'components/AppToaster';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
import AuthInsider from 'containers/Authentication/AuthInsider';
|
||||
import Icon from 'components/Icon';
|
||||
import AuthenticationConnect from 'connectors/Authentication.connect';
|
||||
import withAuthenticationActions from './withAuthenticationActions';
|
||||
import { compose } from 'utils';
|
||||
|
||||
const ERRORS_TYPES = {
|
||||
@@ -162,5 +160,5 @@ function Login({
|
||||
}
|
||||
|
||||
export default compose(
|
||||
AuthenticationConnect
|
||||
withAuthenticationActions,
|
||||
)(Login);
|
||||
@@ -11,12 +11,13 @@ import {
|
||||
} from '@blueprintjs/core';
|
||||
import { Row, Col } from 'react-grid-system';
|
||||
import { Link, useHistory } from 'react-router-dom';
|
||||
import AuthenticationConnect from 'connectors/Authentication.connect';
|
||||
import withAuthenticationActions from './withAuthenticationActions';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
import AppToaster from 'components/AppToaster';
|
||||
import AuthInsider from 'containers/Authentication/AuthInsider';
|
||||
import { compose } from 'utils';
|
||||
import Icon from 'components/Icon';
|
||||
import { If } from 'components';
|
||||
|
||||
function Register({
|
||||
requestRegister,
|
||||
@@ -212,16 +213,16 @@ function Register({
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{ isSubmitting && (
|
||||
<If condition={isSubmitting}>
|
||||
<div class="authentication-page__loading-overlay">
|
||||
<Spinner size={50} />
|
||||
</div>
|
||||
)}
|
||||
</If>
|
||||
</div>
|
||||
</AuthInsider>
|
||||
);
|
||||
}
|
||||
|
||||
export default compose(
|
||||
AuthenticationConnect,
|
||||
withAuthenticationActions,
|
||||
)(Register);
|
||||
|
||||
@@ -13,9 +13,10 @@ import { Link, useParams, useHistory } from 'react-router-dom';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
import AppToaster from 'components/AppToaster';
|
||||
import { compose } from 'utils';
|
||||
import AuthenticationConnect from 'connectors/Authentication.connect';
|
||||
import withAuthenticationActions from './withAuthenticationActions';
|
||||
import AuthInsider from 'containers/Authentication/AuthInsider';
|
||||
|
||||
|
||||
function ResetPassword({
|
||||
requestResetPassword,
|
||||
}) {
|
||||
@@ -131,5 +132,5 @@ function ResetPassword({
|
||||
}
|
||||
|
||||
export default compose(
|
||||
AuthenticationConnect,
|
||||
withAuthenticationActions,
|
||||
)(ResetPassword);
|
||||
|
||||
@@ -5,12 +5,17 @@ import { useIntl } from 'react-intl';
|
||||
import { Link, useHistory } from 'react-router-dom';
|
||||
import { Button, InputGroup, Intent, FormGroup } from '@blueprintjs/core';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
import AuthenticationConnect from 'connectors/Authentication.connect';
|
||||
|
||||
import { compose } from 'utils';
|
||||
|
||||
import AppToaster from 'components/AppToaster';
|
||||
import ErrorMessage from 'components/ErrorMessage';
|
||||
|
||||
import AuthInsider from 'containers/Authentication/AuthInsider';
|
||||
|
||||
import withAuthenticationActions from './withAuthenticationActions';
|
||||
|
||||
|
||||
function SendResetPassword({
|
||||
requestSendResetPassword,
|
||||
}) {
|
||||
@@ -65,6 +70,7 @@ function SendResetPassword({
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
<AuthInsider>
|
||||
<div class='reset-form'>
|
||||
@@ -110,5 +116,5 @@ function SendResetPassword({
|
||||
}
|
||||
|
||||
export default compose(
|
||||
AuthenticationConnect,
|
||||
withAuthenticationActions,
|
||||
)(SendResetPassword);
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import {
|
||||
login,
|
||||
resetPassword,
|
||||
sendResetPassword,
|
||||
inviteAccept,
|
||||
register,
|
||||
inviteMetaByToken,
|
||||
} from 'store/authentication/authentication.actions';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
requestLogin: (form) => dispatch(login({ form })),
|
||||
requestRegister: (form) => dispatch(register({ form })),
|
||||
requestSendResetPassword: (email) => dispatch(sendResetPassword({ email })),
|
||||
requestResetPassword: (form, token) => dispatch(resetPassword({ form, token })),
|
||||
requestInviteAccept: (form, token) => dispatch(inviteAccept({ form, token })),
|
||||
requestInviteMetaByToken: (token) => dispatch(inviteMetaByToken({ token })),
|
||||
});
|
||||
|
||||
export default connect(null, mapDispatchToProps);
|
||||
Reference in New Issue
Block a user