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
0b643fd5
Commit
0b643fd5
authored
Aug 27, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deni-dev(pc)' into 'master'
login + isu user See merge request
!191
parents
a2e7d408
853ed80c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
32 deletions
+45
-32
Images.js
src/assets/Images.js
+3
-1
meeting.jpg
src/assets/meeting.jpg
+0
-0
triputra-black.jpg
src/assets/triputra-black.jpg
+0
-0
Login.js
src/container/Login.js
+18
-7
User.js
src/container/Otorisasi/User.js
+22
-1
EditUser.js
src/container/Otorisasi/User/EditUser.js
+2
-23
No files found.
src/assets/Images.js
View file @
0b643fd5
...
...
@@ -46,7 +46,9 @@ const Images = {
failedCopy
:
require
(
'./failed-copy.svg'
),
triputraLogo
:
require
(
'./triputra-logo.png'
),
photo
:
require
(
'./photo.svg'
),
camera
:
require
(
'./camera.svg'
)
camera
:
require
(
'./camera.svg'
),
meeting
:
require
(
'./meeting.jpg'
),
triputraBlack
:
require
(
'./triputra-black.jpg'
),
}
...
...
src/assets/meeting.jpg
0 → 100644
View file @
0b643fd5
This diff is collapsed.
Click to expand it.
src/assets/triputra-black.jpg
0 → 100644
View file @
0b643fd5
26.5 KB
src/container/Login.js
View file @
0b643fd5
...
...
@@ -36,7 +36,9 @@ class Login extends Component {
rememberMe
:
false
,
alert
:
false
,
tipeAlert
:
''
,
messageAlert
:
''
messageAlert
:
''
,
width
:
0
,
height
:
0
}
}
...
...
@@ -47,6 +49,14 @@ class Login extends Component {
console
.
log
(
email
)
}
getWindowDimensions
()
{
const
{
innerWidth
:
width
,
innerHeight
:
height
}
=
window
;
this
.
setState
({
width
,
height
})
}
handleChange
(
e
)
{
let
data
=
this
.
state
this
.
setState
({
...
data
,
[
e
.
target
.
name
]:
e
.
target
.
value
})
...
...
@@ -136,19 +146,19 @@ class Login extends Component {
{
this
.
state
.
messageAlert
}
<
/Alert
>
<
/Snackbar
>
<
div
style
=
{{
width
:
'50%'
,
height
:
'100vh'
,
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
flexDirection
:
'column
'
}}
>
<
img
src
=
{
Images
.
tia
}
/
>
<
img
src
=
{
Images
.
imageLogin
}
style
=
{{
marginTop
:
30
}}
/
>
<
div
style
=
{{
width
:
'50%'
,
display
:
'grid
'
}}
>
<
img
src
=
{
Images
.
meeting
}
style
=
{{
objectFit
:
'fill'
,
width
:
'100%'
,
height
:
'100%'
}}
/
>
{
/* <img src={Images.imageLogin} style={{ marginTop: 30 }} /> */
}
<
/div
>
<
div
style
=
{{
width
:
'50%'
,
height
:
'100vh'
,
backgroundColor
:
'#
152d4
0'
,
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
flexDirection
:
'column'
}}
>
<
div
style
=
{{
width
:
'50%'
,
height
:
'100vh'
,
backgroundColor
:
'#
263b8
0'
,
display
:
'flex'
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
flexDirection
:
'column'
}}
>
<
form
onSubmit
=
{(
e
)
=>
{
e
.
preventDefault
()
this
.
validateLogin
()
}}
>
<
div
style
=
{{
paddingTop
:
56
,
padding
Left
:
54
,
paddingRight
:
54
,
display
:
'flex'
,
flexDirection
:
'column'
,
width
:
388
,
height
:
(
this
.
state
.
msgEmail
.
length
>
45
?
466
:
441
),
borderRadius
:
12
,
boxShadow
:
'0 2 4 0 rgba(0, 0, 0, 0.2)'
,
backgroundColor
:
'#ffffff'
}}
>
<
img
src
=
{
Images
.
t
ia
}
/
>
<
div
style
=
{{
paddingTop
:
56
,
padding
:
65
,
display
:
'flex'
,
flexDirection
:
'column'
,
height
:
(
this
.
state
.
msgEmail
.
length
>
45
?
466
:
441
),
borderRadius
:
12
,
boxShadow
:
'0 2 4 0 rgba(0, 0, 0, 0.2)'
,
backgroundColor
:
'#ffffff'
}}
>
<
img
src
=
{
Images
.
t
riputraBlack
}
style
=
{{
height
:
59
,
width
:
175
,
alignSelf
:
'center'
}
}
/
>
<
TextField
label
=
{
<
Typography
style
=
{{
fontSize
:
12
,
fontFamily
:
'Nunito Sans, sans-serif'
}}
>
Email
*<
/Typography>
}
...
...
@@ -207,6 +217,7 @@ class Login extends Component {
backgroundColor
:
'transparent'
,
cursor
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
}}
disabled
=
{
this
.
state
.
email
.
trim
()
==
''
&&
this
.
state
.
password
.
trim
()
==
''
?
true
:
false
}
// onClick={() => this.validateLogin()}
...
...
src/container/Otorisasi/User.js
View file @
0b643fd5
...
...
@@ -292,6 +292,27 @@ export default class UserRole extends Component {
}
}
updateUser
(
payload
)
{
api
.
create
().
updateUser
(
payload
).
then
((
response
)
=>
{
console
.
log
(
response
.
data
.
message
)
console
.
log
(
response
.
data
.
status
)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
this
.
closeEdit
()
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
})
}
_handleKeyDown
(
e
)
{
if
(
e
.
key
===
'Enter'
)
{
if
(
this
.
state
.
search
.
length
>
0
)
{
...
...
@@ -308,7 +329,6 @@ export default class UserRole extends Component {
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
console
.
log
(
response
)
alert
(
response
.
data
.
message
)
this
.
getUser
()
this
.
setState
({
visibleUser
:
true
})
}
else
{
...
...
@@ -598,6 +618,7 @@ export default class UserRole extends Component {
<
EditUser
onClickClose
=
{
this
.
closeEdit
.
bind
(
this
)}
refresh
=
{
this
.
getUser
.
bind
(
this
)}
updateUser
=
{
this
.
updateUser
.
bind
(
this
)}
data
=
{
this
.
state
.
indexData
}
/
>
)}
...
...
src/container/Otorisasi/User/EditUser.js
View file @
0b643fd5
...
...
@@ -186,7 +186,7 @@ export default class EditUser extends Component {
}
}
updateUser
()
{
updateUser
(){
let
payload
=
{
"user_id"
:
this
.
state
.
tempData
.
user_id
,
"role_id"
:
this
.
state
.
role
.
role_id
,
...
...
@@ -196,28 +196,7 @@ export default class EditUser extends Component {
"start_date"
:
this
.
state
.
tempData
.
start_date
,
"end_date"
:
this
.
state
.
tempData
.
end_date
}
api
.
create
().
updateUser
(
payload
).
then
((
response
)
=>
{
console
.
log
(
response
.
data
.
message
)
console
.
log
(
response
.
data
.
status
)
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'success'
})
setTimeout
(()
=>
{
this
.
props
.
onClickClose
()
this
.
props
.
refresh
()
},
750
);
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
})
this
.
props
.
updateUser
(
payload
)
}
getRole
()
{
...
...
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