diff --git a/client/package.json b/client/package.json
index 4400335dd..b48eaceca 100644
--- a/client/package.json
+++ b/client/package.json
@@ -31,6 +31,7 @@
"eslint-plugin-react": "7.18.0",
"eslint-plugin-react-hooks": "^1.6.1",
"file-loader": "4.3.0",
+ "formik": "^2.1.4",
"fs-extra": "^8.1.0",
"html-webpack-plugin": "4.0.0-beta.11",
"identity-obj-proxy": "3.0.0",
diff --git a/client/src/actions/accounts/index.js b/client/src/actions/accounts/index.js
deleted file mode 100644
index c39948bba..000000000
--- a/client/src/actions/accounts/index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-export const FETCH_ACCOUNTS_CHART = 'FETCH_ACCOUNTS_CHART';
-
diff --git a/client/src/components/App.js b/client/src/components/App.js
index 35f6808e5..778fb89ff 100644
--- a/client/src/components/App.js
+++ b/client/src/components/App.js
@@ -1,10 +1,11 @@
import React from 'react';
import PropTypes from 'prop-types';
import {IntlProvider} from 'react-intl';
-// import {Switch} from 'react-router-dom';
+import {connect} from 'react-redux';
import PrivateRoute from 'components/PrivateRoute';
import Authentication from 'components/Authentication';
import Dashboard from 'components/Dashboard/Dashboard';
+// import {isAuthenticated} from 'reducers/authentication'
import messages from 'lang/en';
import 'style/App.scss';
@@ -12,8 +13,8 @@ function App(props) {
return (
);
@@ -23,6 +24,10 @@ App.defaultProps = {
};
App.propTypes = {
locale: PropTypes.string,
+ isAuthorized: PropTypes.bool,
};
-export default App;
\ No newline at end of file
+const mapStateToProps = (state) => ({
+ isAuthorized: true,
+});
+export default connect(mapStateToProps)(App);
\ No newline at end of file
diff --git a/client/src/components/Authentication.js b/client/src/components/Authentication.js
index 18f549c74..1854985f5 100644
--- a/client/src/components/Authentication.js
+++ b/client/src/components/Authentication.js
@@ -5,23 +5,25 @@ import authenticationRoutes from 'routes/authentication';
export default function({ isAuthenticated =false, ...rest }) {
const to = {pathname: '/dashboard/homepage'};
- return isAuthenticated ?
- (
-
- ) : (
-
-
-
- { authenticationRoutes.map((route, index) => (
-
- ))}
-
-
-
+ return (
+
+ { isAuthenticated ?
+ () : (
+
+
+
+ { authenticationRoutes.map((route, index) => (
+
+ ))}
+
+
+ )
+ }
+
);
}
\ No newline at end of file
diff --git a/client/src/components/Dashboard/Dashboard.js b/client/src/components/Dashboard/Dashboard.js
index dc4ea4b9a..3b6078945 100644
--- a/client/src/components/Dashboard/Dashboard.js
+++ b/client/src/components/Dashboard/Dashboard.js
@@ -1,15 +1,12 @@
import React from 'react';
-import {Route} from 'react-router-dom';
import Sidebar from 'components/Sidebar/Sidebar';
import DashboardContent from 'components/Dashboard/DashboardContent';
export default function() {
return (
-
-
-
-
+
+
)
}
\ No newline at end of file
diff --git a/client/src/components/Dashboard/DashboardActionsBar.js b/client/src/components/Dashboard/DashboardActionsBar.js
new file mode 100644
index 000000000..95cebb510
--- /dev/null
+++ b/client/src/components/Dashboard/DashboardActionsBar.js
@@ -0,0 +1,10 @@
+import React from 'react';
+
+
+export default function DashboardActionsBar() {
+ return (
+
+
+
+ )
+}
\ No newline at end of file
diff --git a/client/src/components/Dashboard/DashboardContent.js b/client/src/components/Dashboard/DashboardContent.js
index d5287ff4b..7277308ae 100644
--- a/client/src/components/Dashboard/DashboardContent.js
+++ b/client/src/components/Dashboard/DashboardContent.js
@@ -1,11 +1,25 @@
import React from 'react';
import { Route, Switch } from 'react-router-dom';
import dashboardRoutes from 'routes/dashboard'
+import DashboardTopbar from 'components/Dashboard/DashboardTopbar';
export default function() {
return (
-
dashboard
+
+
+
+
+ { dashboardRoutes.map((route, index) => (
+
+ ))}
+
+
)
}
\ No newline at end of file
diff --git a/client/src/components/Dashboard/DashboardPageContent.js b/client/src/components/Dashboard/DashboardPageContent.js
new file mode 100644
index 000000000..f3e938628
--- /dev/null
+++ b/client/src/components/Dashboard/DashboardPageContent.js
@@ -0,0 +1,9 @@
+import React from 'react';
+
+export default function DashboardPageContent({ children }) {
+ return (
+
+ { children }
+
+ )
+}
\ No newline at end of file
diff --git a/client/src/components/Dashboard/DashboardTopbar.js b/client/src/components/Dashboard/DashboardTopbar.js
new file mode 100644
index 000000000..6b7c15f00
--- /dev/null
+++ b/client/src/components/Dashboard/DashboardTopbar.js
@@ -0,0 +1,46 @@
+import React from 'react';
+import {
+ Navbar,
+ NavbarGroup,
+ Button,
+ Classes,
+ MenuDivider,
+ MenuItem,
+ Menu,
+ Popover,
+} from '@blueprintjs/core';
+
+export default function DashboardTopbar({ pageTitle }) {
+ const userAvatarDropMenu = (
+
+ );
+ return (
+
+ );
+}
\ No newline at end of file
diff --git a/client/src/components/Sidebar/SidebarHead.js b/client/src/components/Sidebar/SidebarHead.js
index 070b79900..37639d7e2 100644
--- a/client/src/components/Sidebar/SidebarHead.js
+++ b/client/src/components/Sidebar/SidebarHead.js
@@ -1,4 +1,5 @@
import React from 'react';
+import appMeta from 'config/app';
export default function() {
return (
@@ -8,11 +9,15 @@ export default function() {
-
+
+ { appMeta.app_name }
+
-
-
-
+
+
+ { appMeta.app_version }
+
+
);
diff --git a/client/src/components/Sidebar/SidebarMenu.js b/client/src/components/Sidebar/SidebarMenu.js
index d767ec8ff..0db9e2514 100644
--- a/client/src/components/Sidebar/SidebarMenu.js
+++ b/client/src/components/Sidebar/SidebarMenu.js
@@ -1,8 +1,11 @@
import React from 'react';
import {Menu, MenuItem, MenuDivider} from "@blueprintjs/core";
+import {useHistory} from 'react-router-dom';
import sidebarMenuList from 'config/sidebarMenu';
export default function SidebarMenu() {
+ let history = useHistory();
+
const items = sidebarMenuList.map((item) =>
(item.divider) ?
+ disabled={item.disabled}
+ onClick={() => { history.push(item.href); }} />
);
return (