Commit d29f2f6c authored by qorri_di's avatar qorri_di

Screen Maintenance versi hardcode

parent 7c899035
......@@ -97,7 +97,10 @@ class Login extends Component {
if (response.data) {
if (response.ok) {
if (response.data.status === 'success') {
// console.log(response.data.data)
// console.log(response.data.data
if (response.data.data.role_id === 185 || response.data.data.role_id === 1){
this.props.history.push('/maintenance')
} else {
localStorage.setItem(Constant.TOKEN, response.data.data.token)
localStorage.setItem(Constant.USER, response.data.data.user_id)
if (this.state.rememberMe) {
......@@ -109,6 +112,7 @@ class Login extends Component {
localStorage.setItem(Constant.PASSWORD, '')
}
this.props.history.push('/home/beranda')
}
} else {
if (response.data.message == 'Password is Not Correct') {
this.setState({ errorPassword: true, msgPassword: 'Incorrect Password' })
......
import React, { Component } from 'react';
import Images from '../../assets/Images';
class Maintenance extends Component {
constructor(props) {
super(props)
this.state = {
width: 0,
height: 0
}
}
getWindowDimensions() {
const { innerWidth: width, innerHeight: height } = window;
this.setState({
width,
height
})
}
render() {
return (
<div style={{ flex: 1, display: 'flex' }}>
<div style={{ width: '50%', display: 'grid' }}>
<img src={Images.meeting} style={{ objectFit: 'fill', width: '100%', height: '100%' }} alt={'TIA 4.0'}/>
</div>
<div style={{ width: '50%', height: '100vh', backgroundColor: '#4B0082', display: 'flex', justifyContent: 'center', alignItems: 'left', flexDirection: 'column', padding: '5vh'}}>
<p style={{fontSize: '1rem'}}>
<span style={{color: 'white', fontWeight:'bold'}}>
TIA 4.0 is down for Maintenance!<br/>
Thank you for your patience, we expect to be back shortly.<br/>
<br/>
We apologize for any inconvenience.<br/>
For more information, please contact our email : <a style={{color: 'white'}} href={'mailto:tia4.0@triputra-group.com'}>tia4.0@triputra-group.com</a>.
</span>
</p>
</div>
</div >
);
}
}
export default Maintenance;
\ No newline at end of file
......@@ -22,6 +22,7 @@ import MasterDataCAT from '../container/MasterData/MasterDataCAT/MasterDataCAT';
import ProgressReport from '../container/ProgressReport/ProgressReport';
import CafrmDocument from "../container/CAFRM/CafrmDocument";
import ReportCafrm from "../container/ReportCarfm/RepotrCafrm";
import Maintenance from "../container/Auth/Maintenance";
const routes = [
{
......@@ -131,6 +132,10 @@ const routes = [
{
path: "*",
main: screen404
},
{
path:"/maintenance",
main: Maintenance
}
];
......
......@@ -15,6 +15,7 @@ import SetPassword from '../container/Auth/SetPassword'
import EmailVerification from "../container/Auth/EmailVerification";
import Constant from "../library/Constant";
import ShadowScreen from "../container/ShadowScreen";
import Maintenance from "../container/Auth/Maintenance";
export default function BasicExample() {
......@@ -35,6 +36,7 @@ export default function BasicExample() {
<Route path="/email-verification" component={EmailVerification} />
<Route path="/register" component={Register}/>
<Route path="/cronjob/:type" component={ShadowScreen}/>
<Route path="/maintenance" component={Maintenance}/>
<PrivateRoute path="/home">
<Home/>
</PrivateRoute>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment