diff --git a/client/src/components/employees/EmployeeList.js b/client/src/components/employees/EmployeeList.js index e45165a..c4b07ff 100644 --- a/client/src/components/employees/EmployeeList.js +++ b/client/src/components/employees/EmployeeList.js @@ -37,12 +37,24 @@ const EmployeeList = () => { navigate(`/employees/${id}`) } + const goToCreate = () => { + navigate(`/employees`) + } + return ( <>
-
All Employees
+
+ All Employees + + {AuthService.canAddOrEditEmployees() && ( + + )} +
diff --git a/client/src/components/login/Login.js b/client/src/components/login/Login.js index 00711b3..e5e2a5f 100644 --- a/client/src/components/login/Login.js +++ b/client/src/components/login/Login.js @@ -28,11 +28,9 @@ const Login = ({ setMenu}) => { localStorage.setItem('user', JSON.stringify(data)); if (AuthService.canAccessLegacySystem()) { navigate(`/landing`); - } - // else { - // navigate(`/admin`); - // } - // navigate(`/admin`); + } else { + navigate(`/dashboard/dashboard`); + } setMenu(); }).catch((error) => { window.alert(error?.response?.data?.message);