Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
Tia-dev
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dida Adams Arizona
Tia-dev
Commits
5c2b7079
Commit
5c2b7079
authored
Aug 12, 2020
by
EKSAD
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reset & MD Item Laporan
parent
f60e4cb9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
392 additions
and
27 deletions
+392
-27
ForgotPassword.js
src/container/ForgotPassword.js
+9
-2
ItemLaporan.js
src/container/MasterData/ItemLaporan.js
+36
-12
CreateItemLaporan.js
...container/MasterData/formItemLaporan/CreateItemLaporan.js
+320
-0
ResetPassword.js
src/container/ResetPassword.js
+26
-12
homeRoutes.js
src/router/homeRoutes.js
+1
-1
No files found.
src/container/ForgotPassword.js
View file @
5c2b7079
...
@@ -23,9 +23,18 @@ class ForgotPassword extends Component {
...
@@ -23,9 +23,18 @@ class ForgotPassword extends Component {
}
}
}
}
isEmail
(
email
)
{
const
re
=
/^
(([^
<>()
\[\]\\
.,;:
\s
@"
]
+
(\.[^
<>()
\[\]\\
.,;:
\s
@"
]
+
)
*
)
|
(
".+"
))
@
((\[[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\.[
0-9
]{1,3}\])
|
(([
a-zA-Z
\-
0-9
]
+
\.)
+
[
a-zA-Z
]{2,}))
$/
;
return
re
.
test
(
String
(
email
).
toLowerCase
());
}
validateEmail
()
{
validateEmail
()
{
var
isEmail
=
this
.
isEmail
(
this
.
state
.
email
)
if
(
this
.
state
.
email
.
trim
()
==
""
)
{
if
(
this
.
state
.
email
.
trim
()
==
""
)
{
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email harus diisi!'
})
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Email harus diisi!'
})
}
else
if
(
!
isEmail
)
{
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
'Format email tidak sesuai!'
})
}
else
{
}
else
{
this
.
verification
()
this
.
verification
()
}
}
...
@@ -40,9 +49,7 @@ class ForgotPassword extends Component {
...
@@ -40,9 +49,7 @@ class ForgotPassword extends Component {
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
props
.
history
.
push
(
'/email-verification'
)
this
.
props
.
history
.
push
(
'/email-verification'
)
}
else
{
}
else
{
if
(
response
.
data
.
message
==
'Akun Tidak Ditemukan!'
)
{
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
response
.
data
.
message
})
this
.
setState
({
errorEmail
:
true
,
msgEmail
:
response
.
data
.
message
})
}
}
}
})
})
}
}
...
...
src/container/ItemLaporan.js
→
src/container/
MasterData/
ItemLaporan.js
View file @
5c2b7079
...
@@ -2,17 +2,37 @@ import React, { Component } from "react";
...
@@ -2,17 +2,37 @@ import React, { Component } from "react";
import
{
Container
,
Row
,
Col
}
from
"react-bootstrap"
;
import
{
Container
,
Row
,
Col
}
from
"react-bootstrap"
;
import
{
makeStyles
,
createMuiTheme
,
MuiThemeProvider
}
from
'@material-ui/core/styles'
;
import
{
makeStyles
,
createMuiTheme
,
MuiThemeProvider
}
from
'@material-ui/core/styles'
;
import
SearchIcon
from
'@material-ui/icons/Search'
;
import
SearchIcon
from
'@material-ui/icons/Search'
;
import
Images
from
"../assets/Images"
;
import
Images
from
"../
../
assets/Images"
;
import
MUIDataTable
from
"mui-datatables"
;
import
MUIDataTable
from
"mui-datatables"
;
import
{
TextField
,
InputBase
}
from
"@material-ui/core"
;
import
{
TextField
,
InputBase
}
from
"@material-ui/core"
;
import
{
ExcelRenderer
}
from
'react-excel-renderer'
;
import
{
ExcelRenderer
}
from
'react-excel-renderer'
;
import
CreateItemLaporan
from
"./formItemLaporan/CreateItemLaporan"
;
var
ct
=
require
(
"../library/CustomTable"
);
var
ct
=
require
(
"../
../
library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
const
options
=
ct
.
customOptions
();
const
options
=
ct
.
customOptions
();
const
options2
=
ct
.
customOptions2
();
const
options2
=
ct
.
customOptions2
();
class
ItemLaporan
extends
Component
{
export
default
class
ItemLaporan
extends
Component
{
constructor
(
props
)
{
super
(
props
)
this
.
state
=
{
dataTable
:
[],
listData
:
[],
data
:
[],
add
:
false
,
edit
:
false
}
}
closeEdit
()
{
this
.
setState
({
edit
:
false
})
}
closeAdd
()
{
this
.
setState
({
add
:
false
})
}
render
()
{
render
()
{
const
columns
=
[{
const
columns
=
[{
name
:
"Action"
,
name
:
"Action"
,
...
@@ -34,13 +54,13 @@ class ItemLaporan extends Component {
...
@@ -34,13 +54,13 @@ class ItemLaporan extends Component {
);
);
}
}
}
}
},
"ID"
,
"
Tipe Persetujuan"
,
"Order"
,
"Nama Pemberi Persetujuan"
,
"Operator
"
,
"Status"
]
},
"ID"
,
"
Jenis Laporan"
,
"Perusahaan"
,
"Order"
,
"Deskripsi"
,
"Parent ID"
,
"UOM"
,
"Weight"
,
"Tipe Data
"
,
"Status"
]
const
data
=
[
const
data
=
[
[
""
,
"1"
,
"
Yearly"
,
"1"
,
"John Doe"
,
"-
"
,
"Aktif"
],
[
""
,
"1"
,
"
KPI"
,
"TIA"
,
"1"
,
"Financial Perspective"
,
"0"
,
"-"
,
"35%"
,
"Formula
"
,
"Aktif"
],
[
""
,
"2"
,
"
Yearly"
,
"2"
,
"John Doe"
,
"-
"
,
"Aktif"
],
[
""
,
"2"
,
"
KPI"
,
"TIA"
,
"2"
,
"Trading Profit"
,
"1"
,
"Rp Bio"
,
"35%"
,
"Formula
"
,
"Aktif"
],
[
""
,
"3"
,
"
Yearly"
,
"2"
,
"John Doe"
,
"AND
"
,
"Aktif"
],
[
""
,
"3"
,
"
KPI"
,
"TIA"
,
"3"
,
"Revenue"
,
"1"
,
"Rp Bio"
,
"0%"
,
"Formula
"
,
"Aktif"
],
[
""
,
"4"
,
"
Yearly"
,
"2"
,
"John Doe"
,
"AND
"
,
"Non Aktif"
],
[
""
,
"4"
,
"
KPI"
,
"TIA"
,
"4"
,
"EBITDA"
,
"1"
,
"Rp Bio"
,
"0%"
,
"Formula
"
,
"Non Aktif"
],
[
""
,
"
5"
,
"Yearly"
,
"3"
,
"John Doe"
,
"-"
,
"Non Aktif
"
],
[
""
,
"
-"
,
"-"
,
"-"
,
"-"
,
"-"
,
"-"
,
"-"
,
"-"
,
"-"
,
"-
"
],
]
]
const
options
=
{
const
options
=
{
filter
:
false
,
filter
:
false
,
...
@@ -100,7 +120,7 @@ class ItemLaporan extends Component {
...
@@ -100,7 +120,7 @@ class ItemLaporan extends Component {
cursor
:
'pointer'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
borderColor
:
'transparent'
}}
}}
onClick
=
{()
=>
this
.
setState
({
visibleCreate
:
true
})}
onClick
=
{()
=>
this
.
setState
({
add
:
true
})}
>
>
<
img
src
=
{
Images
.
add
}
/
>
<
img
src
=
{
Images
.
add
}
/
>
<
/button
>
<
/button
>
...
@@ -118,9 +138,13 @@ class ItemLaporan extends Component {
...
@@ -118,9 +138,13 @@ class ItemLaporan extends Component {
<
/div
>
<
/div
>
<
/div
>
<
/div
>
{
this
.
state
.
add
&&
(
<
CreateItemLaporan
onClickClose
=
{
this
.
closeAdd
.
bind
(
this
)}
data
=
{
this
.
state
.
indexData
}
/
>
)}
<
/div
>
<
/div
>
);
);
}
}
}
}
export
default
ItemLaporan
;
\ No newline at end of file
src/container/MasterData/formItemLaporan/CreateItemLaporan.js
0 → 100644
View file @
5c2b7079
import
React
,
{
Component
}
from
'react'
;
import
{
TextField
,
Typography
}
from
'@material-ui/core'
;
export
default
class
CreateItemLaporan
extends
Component
{
render
()
{
let
{
type
}
=
this
.
props
return
type
===
'edit'
?
this
.
renderEdit
()
:
this
.
renderCreate
()
}
componentDidMount
()
{
console
.
log
(
this
.
props
.
data
);
}
renderEdit
()
{
return
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"popup-content background-white border-radius"
style
=
{{
borderRadius
:
8
}}
>
<
div
className
=
"popup-panel grid grid-2x"
style
=
{{
backgroundColor
:
'#51c6ea'
,
height
:
64
,
borderTopRightRadius
:
8
,
borderTopLeftRadius
:
8
}}
>
<
div
className
=
"col-1"
style
=
{{
maxWidth
:
"inherit"
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
div
className
=
"popup-title"
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
16
,
fontWeight
:
'bold'
}}
>
Edit
Data
<
/span
>
<
/div
>
<
/div
>
<
div
className
=
"col-2 content-right"
style
=
{{
maxWidth
:
"inherit"
,
alignSelf
:
'center'
}}
>
<
button
type
=
"button"
className
=
"btn btn-circle btn-white"
onClick
=
{()
=>
this
.
props
.
onClickClose
()}
>
<
i
className
=
"fa fa-lg fa-times"
style
=
{{
color
:
'white'
}}
/
>
<
/button
>
<
/div
>
<
/div
>
<
div
className
=
"border-bottom grid grid-2x grid-mobile-none gap-15px"
style
=
{{
padding
:
20
}}
>
<
div
className
=
"column-1"
>
<
div
style
=
{{
backgroundColor
:
'#e8e8e8'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
value
=
{
this
.
props
.
data
.
business_unit_id
}
id
=
"status"
label
=
"ID"
disabled
inputProps
=
{{
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
/
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"periode"
value
=
{
"1 Januari 2020"
}
label
=
"Berlaku Mulai"
onChange
=
{(
e
)
=>
null
}
inputProps
=
{{
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
>
<
/TextField
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
backgroundColor
:
'#e8e8e8'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
value
=
{
this
.
props
.
data
.
status
}
id
=
"status"
label
=
"Status"
disabled
inputProps
=
{{
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
/
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'20%'
}}
>
Dibuat
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
:
{
this
.
props
.
data
.
created
}
<
/Typography
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Typography
style
=
{{
fontSize
:
11
,
width
:
'20%'
}}
>
Diubah
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
:
{
this
.
props
.
data
.
updated
==-
null
?
""
:
this
.
props
.
data
.
updated
}
<
/Typography
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"unit"
label
=
"Unit Bisnis"
value
=
{
this
.
props
.
data
.
business_unit_name
}
inputProps
=
{{
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
>
<
/TextField
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"unit"
label
=
"Berlaku Hingga"
defaultValue
=
{
"31 Desember 2100"
}
inputProps
=
{{
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
>
<
/TextField
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"border-top grid grid-2x"
style
=
{{
height
:
56
,
backgroundColor
:
'#f5f5f5'
,
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
style
=
{{
alignSelf
:
'center'
}}
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
props
.
onClickClose
()}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
border
:
'solid 1px #354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#354960'
,
fontSize
:
11
}}
>
Batal
<
/span
>
<
/div
>
<
/button
>
<
/div
>
<
div
className
=
"column-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
alignItems
:
'center'
}}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
Simpan
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
)
}
renderCreate
()
{
return
(
<
div
className
=
"test app-popup-show"
style
=
{{
paddingTop
:
100
}}
>
<
div
className
=
"popup-content background-white border-radius"
style
=
{{
borderRadius
:
8
}}
>
<
div
className
=
"popup-panel grid grid-2x"
style
=
{{
backgroundColor
:
'#51c6ea'
,
height
:
64
,
borderTopRightRadius
:
8
,
borderTopLeftRadius
:
8
}}
>
<
div
className
=
"col-1"
style
=
{{
maxWidth
:
"inherit"
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
div
className
=
"popup-title"
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
16
,
fontWeight
:
'bold'
}}
>
Create
Data
<
/span
>
<
/div
>
<
/div
>
<
div
className
=
"col-2 content-right"
style
=
{{
maxWidth
:
"inherit"
,
alignSelf
:
'center'
}}
>
<
button
type
=
"button"
className
=
"btn btn-circle btn-white"
onClick
=
{()
=>
this
.
props
.
onClickClose
()}
>
<
i
className
=
"fa fa-lg fa-times"
style
=
{{
color
:
'white'
}}
/
>
<
/button
>
<
/div
>
<
/div
>
<
div
className
=
"border-bottom grid grid-2x grid-mobile-none gap-15px"
style
=
{{
padding
:
20
}}
>
<
div
className
=
"column-1"
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"periode"
value
=
{
"1 Januari 2020"
}
label
=
"Berlaku Mulai"
// value={this.state.periode}
onChange
=
{(
e
)
=>
null
}
inputProps
=
{{
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
>
<
/TextField
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
,
backgroundColor
:
'#e8e8e8'
,
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
defaultValue
=
{
"Aktif"
}
id
=
"status"
label
=
"Status"
disabled
inputProps
=
{{
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
/
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
Dibuat
:
Admin
-
21
Jul
2020
,
18
:
45
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
Diubah
:
Admin
-
21
Jul
2020
,
18
:
45
<
/Typography
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
>
<
div
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"unit"
label
=
"Unit Bisnis"
defaultValue
=
{
"Agrobisnis"
}
inputProps
=
{{
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
>
<
/TextField
>
<
/div
>
<
div
className
=
"margin-top-10px"
style
=
{{
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
id
=
"unit"
label
=
"Berlaku Hingga"
defaultValue
=
{
"31 Desember 2100"
}
inputProps
=
{{
style
:
{
fontSize
:
11
}
}}
InputLabelProps
=
{{
style
:
{
fontSize
:
11
,
color
:
'#7e8085'
}
}}
>
<
/TextField
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"border-top grid grid-2x"
style
=
{{
height
:
56
,
backgroundColor
:
'#f5f5f5'
,
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
className
=
"column-1"
style
=
{{
alignSelf
:
'center'
}}
>
<
button
type
=
"button"
onClick
=
{()
=>
this
.
props
.
onClickClose
()}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
border
:
'solid 1px #354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#354960'
,
fontSize
:
11
}}
>
Batal
<
/span
>
<
/div
>
<
/button
>
<
/div
>
<
div
className
=
"column-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
alignItems
:
'center'
}}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
Simpan
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
);
}
}
src/container/ResetPassword.js
View file @
5c2b7079
...
@@ -16,8 +16,8 @@ class ResetPassword extends Component {
...
@@ -16,8 +16,8 @@ class ResetPassword extends Component {
showPass2
:
false
,
showPass2
:
false
,
errorPassword
:
false
,
errorPassword
:
false
,
errorConfirmPassword
:
false
,
errorConfirmPassword
:
false
,
msgPassword
:
''
,
msgPassword
:
'
Terdiri 8 karakter dengan kombinasi angka.
'
,
msgConfirmPassword
:
''
,
msgConfirmPassword
:
'
Terdiri 8 karakter dengan kombinasi angka.
'
,
userId
:
0
userId
:
0
}
}
}
}
...
@@ -29,13 +29,27 @@ class ResetPassword extends Component {
...
@@ -29,13 +29,27 @@ class ResetPassword extends Component {
// console.log(this.props)
// console.log(this.props)
}
}
validateReset
()
{
if
(
this
.
state
.
password
.
trim
()
==
""
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password harus diisi!'
})
}
else
if
(
this
.
state
.
password
.
length
<
8
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password minimal 8 karakter!'
})
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
""
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Konfirmasi Password harus diisi!'
})
}
else
if
(
this
.
state
.
confirmPassword
.
length
<
8
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Konfirmasi Password minimal 8 karakter!'
})
}
else
{
this
.
confirmPassword
()
}
}
confirmPassword
()
{
confirmPassword
()
{
let
payload
=
{
let
payload
=
{
"password"
:
this
.
state
.
password
,
"password"
:
this
.
state
.
password
,
"confirm
P
assword"
:
this
.
state
.
confirmPassword
,
"confirm
_p
assword"
:
this
.
state
.
confirmPassword
,
"user
I
d"
:
this
.
state
.
userId
"user
_i
d"
:
this
.
state
.
userId
}
}
api
.
create
().
confirm
Password
(
payload
).
then
((
response
)
=>
{
api
.
create
().
reset
Password
(
payload
).
then
((
response
)
=>
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
alert
(
'success'
)
alert
(
'success'
)
this
.
props
.
history
.
push
(
'/login'
)
this
.
props
.
history
.
push
(
'/login'
)
...
@@ -49,9 +63,9 @@ class ResetPassword extends Component {
...
@@ -49,9 +63,9 @@ class ResetPassword extends Component {
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
:
''
})
this
.
setState
({
errorPassword
:
false
,
msgPassword
:
'
Terdiri 8 karakter dengan kombinasi angka.
'
})
}
else
if
(
e
.
target
.
name
)
{
}
else
if
(
e
.
target
.
name
==
"confirmPassword"
)
{
this
.
setState
({
errorConfirmPassword
:
false
,
msgConfirmPassword
:
''
})
this
.
setState
({
errorConfirmPassword
:
false
,
msgConfirmPassword
:
'
Terdiri 8 karakter dengan kombinasi angka.
'
})
}
}
}
}
...
@@ -73,7 +87,7 @@ class ResetPassword extends Component {
...
@@ -73,7 +87,7 @@ 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'
}}
>
Terdiri
8
karakter
dengan
kombinasi
angka
.
<
/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
...
@@ -99,8 +113,8 @@ class ResetPassword extends Component {
...
@@ -99,8 +113,8 @@ class ResetPassword extends Component {
}}
}}
variant
=
"outlined"
variant
=
"outlined"
error
=
{
this
.
state
.
errorConfirmPassword
}
error
=
{
this
.
state
.
errorConfirmPassword
}
style
=
{{
width
:
250
,
height
:
51
,
marginTop
:
3
0
}}
style
=
{{
width
:
250
,
height
:
51
,
marginTop
:
4
0
}}
helperText
=
{
<
Typography
style
=
{{
fontSize
:
9
,
marginTop
:
4
,
fontFamily
:
'Nunito Sans, sans-serif'
}}
>
Terdiri
8
karakter
dengan
kombinasi
angka
.
<
/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
...
@@ -115,7 +129,7 @@ class ResetPassword extends Component {
...
@@ -115,7 +129,7 @@ class ResetPassword extends Component {
}}
}}
/
>
/
>
<
Button
name
=
"submit"
variant
=
"contained"
disabled
=
{
this
.
state
.
password
.
trim
()
==
''
&&
this
.
state
.
confirmPassword
.
trim
()
==
''
?
true
:
false
}
onClick
=
{()
=>
this
.
confirmPassword
()}
style
=
{{
marginTop
:
30
,
width
:
'100%'
,
height
:
35
,
borderRadius
:
4
,
color
:
this
.
state
.
password
.
trim
()
==
''
&&
this
.
state
.
confirmPassword
.
trim
()
==
''
?
'#ffffff
'
:
'#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
:
40
,
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'
}}
>
Lanjut
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
12
,
fontFamily
:
'Nunito Sans, sans-serif'
}}
>
Lanjut
<
/Typography
>
<
/Button
>
<
/Button
>
<
/div
>
<
/div
>
...
...
src/router/homeRoutes.js
View file @
5c2b7079
...
@@ -7,9 +7,9 @@ import BudgetTahunan from '../container/BudgetTahunan';
...
@@ -7,9 +7,9 @@ import BudgetTahunan from '../container/BudgetTahunan';
import
HomePage
from
'../container/HomePage'
;
import
HomePage
from
'../container/HomePage'
;
import
BalanceSheet
from
'../container/BudgetTahunan/BalanceSheet'
;
import
BalanceSheet
from
'../container/BudgetTahunan/BalanceSheet'
;
import
Profile
from
'../container/Profile'
;
import
Profile
from
'../container/Profile'
;
import
ItemLaporan
from
'../container/ItemLaporan'
;
import
Perusahaan
from
'../container/MasterData/Perusahaan/Perusahaan'
;
import
Perusahaan
from
'../container/MasterData/Perusahaan/Perusahaan'
;
import
UnitBisnis
from
'../container/MasterData/UnitBisnis'
import
UnitBisnis
from
'../container/MasterData/UnitBisnis'
import
ItemLaporan
from
'../container/MasterData/ItemLaporan'
const
routes
=
[
const
routes
=
[
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment