|
|
@@ -69,8 +69,10 @@ class Login extends Component {
|
|
|
axiosAPI.defaults.headers.common["Authorization"] = auth.data.token;
|
|
|
if (auth.data.user.role.id === 2022) {
|
|
|
Router.push({ pathname: "/pt/pemantauan" });
|
|
|
- } else {
|
|
|
+ } else if ([2020, 2021].includes(auth.data.user.role.id)) {
|
|
|
Router.push({ pathname: "/app/pemantauan" });
|
|
|
+ } else {
|
|
|
+ this.setState({ error: "Akun tidak ada" })
|
|
|
}
|
|
|
}
|
|
|
} catch (error) {
|