Commit 45916933 authored by Rifka Kurnia Irfiana's avatar Rifka Kurnia Irfiana

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into rifka

parents dc006cbf 2b07702a
.main-color{ .main-color{
background-color: #1a2d3e !important; background-color: #273b80 !important;
} }
.sub-color{ .sub-color{
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
} }
.blue-color{ .blue-color{
color: #1a2d3e !important; color: #273b80 !important;
} }
.btn-save{ .btn-save{
...@@ -76,7 +76,7 @@ const useStyles = makeStyles((theme) => ({ ...@@ -76,7 +76,7 @@ const useStyles = makeStyles((theme) => ({
easing: theme.transitions.easing.sharp, easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.enteringScreen, duration: theme.transitions.duration.enteringScreen,
}), }),
backgroundColor: '#1a2d3e' backgroundColor: '#273b80'
}, },
topleftClose: { topleftClose: {
borderRight: 0, borderRight: 0,
...@@ -91,7 +91,7 @@ const useStyles = makeStyles((theme) => ({ ...@@ -91,7 +91,7 @@ const useStyles = makeStyles((theme) => ({
width: theme.spacing(7) + 1, width: theme.spacing(7) + 1,
}, },
paddingLeft: 15, paddingLeft: 15,
backgroundColor: '#1a2d3e' backgroundColor: '#273b80'
}, },
drawerOpen: { drawerOpen: {
width: drawerWidth, width: drawerWidth,
......
...@@ -430,8 +430,8 @@ export default class UnitBisnis extends Component { ...@@ -430,8 +430,8 @@ export default class UnitBisnis extends Component {
</Alert> </Alert>
</Snackbar> </Snackbar>
{this.state.visibleUnitBisnis === true ? {this.state.visibleUnitBisnis === true ?
this.state.load && (
<div> <div>
{this.state.load && (
<div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', paddingRight: 25, paddingLeft: 25, marginTop: -118 }}> <div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', paddingRight: 25, paddingLeft: 25, marginTop: -118 }}>
<label style={{ color: 'white', fontSize: 16, alignSelf: 'center', width: '20%', }}>Master Data - Business Unit</label> <label style={{ color: 'white', fontSize: 16, alignSelf: 'center', width: '20%', }}>Master Data - Business Unit</label>
<div style={{ color: 'white', width: '50%', height: 37, display: 'flex', backgroundColor: 'white', borderWidth: 2, alignItems: 'center', borderRadius: 6, paddingLeft: 5, paddingRight: 5, alignSelf: 'center' }}> <div style={{ color: 'white', width: '50%', height: 37, display: 'flex', backgroundColor: 'white', borderWidth: 2, alignItems: 'center', borderRadius: 6, paddingLeft: 5, paddingRight: 5, alignSelf: 'center' }}>
...@@ -508,7 +508,6 @@ export default class UnitBisnis extends Component { ...@@ -508,7 +508,6 @@ export default class UnitBisnis extends Component {
<ReactTooltip border={true} id="create" place="bottom" type="light" effect="solid" /> <ReactTooltip border={true} id="create" place="bottom" type="light" effect="solid" />
</div> </div>
</div> </div>
)}
<div style={{ padding: 25 }}> <div style={{ padding: 25 }}>
<MuiThemeProvider theme={getMuiTheme()}> <MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable <MUIDataTable
...@@ -518,9 +517,9 @@ export default class UnitBisnis extends Component { ...@@ -518,9 +517,9 @@ export default class UnitBisnis extends Component {
options={options} options={options}
/> />
</MuiThemeProvider> </MuiThemeProvider>
</div> </div>
</div> </div>
)
: :
<div> <div>
<div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', paddingRight: 25, paddingLeft: 25, marginTop: -150 }}> <div style={{ display: 'flex', flexDirection: 'row', justifyContent: 'space-between', paddingRight: 25, paddingLeft: 25, marginTop: -150 }}>
......
...@@ -32,7 +32,7 @@ class ResetPassword extends Component { ...@@ -32,7 +32,7 @@ class ResetPassword extends Component {
componentDidMount() { componentDidMount() {
console.log(this.props.match.params.id) console.log(this.props.match.params.id)
let userId = this.props.match.params.id let userId = this.props.match.params.id
this.setState({userId}) this.setState({ userId })
this.checkExpiredLink(userId) this.checkExpiredLink(userId)
// console.log(this.props) // console.log(this.props)
} }
...@@ -96,9 +96,12 @@ class ResetPassword extends Component { ...@@ -96,9 +96,12 @@ class ResetPassword extends Component {
api.create().resetPassword(payload).then((response) => { api.create().resetPassword(payload).then((response) => {
if (response.data) { if (response.data) {
if (response.ok) { if (response.ok) {
if(response.data.status === 'success') { if (response.data.status === 'success') {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' }) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'success' }, () => {
setTimeout(() => {
this.props.history.push('/login') this.props.history.push('/login')
}, 1000);
})
} else { } else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' }) this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning' })
} }
...@@ -117,7 +120,7 @@ class ResetPassword extends Component { ...@@ -117,7 +120,7 @@ class ResetPassword extends Component {
handleChange(e) { handleChange(e) {
let data = this.state let data = this.state
this.setState({...data, [e.target.name] : e.target.value}) this.setState({ ...data, [e.target.name]: e.target.value })
if (e.target.name == "password") { if (e.target.name == "password") {
this.setState({ errorPassword: false, msgPassword: 'Password consists of 8 characters with a combination of numbers.' }) this.setState({ errorPassword: false, msgPassword: 'Password consists of 8 characters with a combination of numbers.' })
} else if (e.target.name == "confirmPassword") { } else if (e.target.name == "confirmPassword") {
...@@ -133,11 +136,11 @@ class ResetPassword extends Component { ...@@ -133,11 +136,11 @@ class ResetPassword extends Component {
{this.state.messageAlert} {this.state.messageAlert}
</Alert> </Alert>
</Snackbar> </Snackbar>
<div style={{padding: 56, display: 'flex', flexDirection: 'column', width: 378, height: 415, borderRadius: 12, boxShadow: '0 2 4 0 rgba(0, 0, 0, 0.2)', backgroundColor: '#ffffff', justifyContent: 'center', alignItems: 'center' }}> <div style={{ padding: 56, display: 'flex', flexDirection: 'column', width: 378, height: 415, borderRadius: 12, boxShadow: '0 2 4 0 rgba(0, 0, 0, 0.2)', backgroundColor: '#ffffff', justifyContent: 'center', alignItems: 'center' }}>
<img src={Images.tia}/> <img src={Images.tia} />
<TextField <TextField
label={<Typography style={{fontSize: 12, fontFamily: 'Nunito Sans, sans-serif'}}>New password *</Typography>} label={<Typography style={{ fontSize: 12, fontFamily: 'Nunito Sans, sans-serif' }}>New password *</Typography>}
id="password" id="password"
type={this.state.showPass ? 'text' : 'password'} type={this.state.showPass ? 'text' : 'password'}
name={"password"} name={"password"}
...@@ -148,23 +151,23 @@ class ResetPassword extends Component { ...@@ -148,23 +151,23 @@ class ResetPassword extends Component {
variant="outlined" variant="outlined"
error={this.state.errorPassword} error={this.state.errorPassword}
style={{ width: 250, height: 51, marginTop: 32 }} style={{ width: 250, height: 51, marginTop: 32 }}
helperText={<Typography style={{fontSize: 9, marginTop: 4, fontFamily: 'Nunito Sans, sans-serif'}}>{this.state.msgPassword}</Typography>} helperText={<Typography style={{ fontSize: 9, marginTop: 4, fontFamily: 'Nunito Sans, sans-serif' }}>{this.state.msgPassword}</Typography>}
InputProps={{ InputProps={{
endAdornment: <InputAdornment position="end"> endAdornment: <InputAdornment position="end">
<IconButton <IconButton
aria-label="toggle password visibility" aria-label="toggle password visibility"
style={{color: '#4b4b4b', opacity: 0.5}} style={{ color: '#4b4b4b', opacity: 0.5 }}
onClick={() => this.setState({showPass: !this.state.showPass})} onClick={() => this.setState({ showPass: !this.state.showPass })}
edge="end" edge="end"
> >
{this.state.showPass ? <Visibility style={{fontSize: 18}} /> : <VisibilityOff style={{fontSize: 18}} />} {this.state.showPass ? <Visibility style={{ fontSize: 18 }} /> : <VisibilityOff style={{ fontSize: 18 }} />}
</IconButton> </IconButton>
</InputAdornment>, </InputAdornment>,
}} }}
/> />
<TextField <TextField
label={<Typography style={{fontSize: 12, fontFamily: 'Nunito Sans, sans-serif'}}>Repeat New Password *</Typography>} label={<Typography style={{ fontSize: 12, fontFamily: 'Nunito Sans, sans-serif' }}>Repeat New Password *</Typography>}
id="confirmPassword" id="confirmPassword"
type={this.state.showPass2 ? 'text' : 'password'} type={this.state.showPass2 ? 'text' : 'password'}
name={"confirmPassword"} name={"confirmPassword"}
...@@ -175,23 +178,23 @@ class ResetPassword extends Component { ...@@ -175,23 +178,23 @@ class ResetPassword extends Component {
variant="outlined" variant="outlined"
error={this.state.errorConfirmPassword} error={this.state.errorConfirmPassword}
style={{ width: 250, height: 51, marginTop: 45 }} style={{ width: 250, height: 51, marginTop: 45 }}
helperText={<Typography style={{fontSize: 9, marginTop: 4, fontFamily: 'Nunito Sans, sans-serif'}}>{this.state.msgConfirmPassword}</Typography>} helperText={<Typography style={{ fontSize: 9, marginTop: 4, fontFamily: 'Nunito Sans, sans-serif' }}>{this.state.msgConfirmPassword}</Typography>}
InputProps={{ InputProps={{
endAdornment: <InputAdornment position="end"> endAdornment: <InputAdornment position="end">
<IconButton <IconButton
aria-label="toggle password visibility" aria-label="toggle password visibility"
style={{color: '#4b4b4b', opacity: 0.5}} style={{ color: '#4b4b4b', opacity: 0.5 }}
onClick={() => this.setState({showPass2: !this.state.showPass2})} onClick={() => this.setState({ showPass2: !this.state.showPass2 })}
edge="end" edge="end"
> >
{this.state.showPass2 ? <Visibility style={{fontSize: 18}} /> : <VisibilityOff style={{fontSize: 18}} />} {this.state.showPass2 ? <Visibility style={{ fontSize: 18 }} /> : <VisibilityOff style={{ fontSize: 18 }} />}
</IconButton> </IconButton>
</InputAdornment>, </InputAdornment>,
}} }}
/> />
<Button name="submit" variant="contained" disabled={this.state.password.trim() == '' && this.state.confirmPassword.trim() == '' ? true : false} onClick={() => this.validateReset()} style={{ marginTop: 50, width: '100%', height: 35, borderRadius: 4, color: this.state.password.trim() == '' && this.state.confirmPassword.trim() == '' ? '#4b4b4b' : '#fff', backgroundColor: this.state.password.trim() == '' && this.state.confirmPassword.trim() == '' ? '#d8d8d8' : '#51c6ea' }}> <Button name="submit" variant="contained" disabled={this.state.password.trim() == '' && this.state.confirmPassword.trim() == '' ? true : false} onClick={() => this.validateReset()} style={{ marginTop: 50, width: '100%', height: 35, borderRadius: 4, color: this.state.password.trim() == '' && this.state.confirmPassword.trim() == '' ? '#4b4b4b' : '#fff', backgroundColor: this.state.password.trim() == '' && this.state.confirmPassword.trim() == '' ? '#d8d8d8' : '#51c6ea' }}>
<Typography style={{fontSize: 12, fontFamily: 'Nunito Sans, sans-serif'}}>Reset Password</Typography> <Typography style={{ fontSize: 12, fontFamily: 'Nunito Sans, sans-serif' }}>Reset Password</Typography>
</Button> </Button>
</div> </div>
</div> </div>
......
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