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
288b9ede
Commit
288b9ede
authored
Aug 13, 2020
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update didim
parent
334761c6
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
267 additions
and
16 deletions
+267
-16
package-lock.json
package-lock.json
+16
-0
Login.js
src/container/Login.js
+2
-0
User.js
src/container/Otorisasi/User.js
+243
-13
AddUser.js
src/container/Otorisasi/User/AddUser.js
+5
-2
Constant.js
src/library/Constant.js
+1
-1
No files found.
package-lock.json
View file @
288b9ede
...
@@ -12135,6 +12135,22 @@
...
@@ -12135,6 +12135,22 @@
"prop-types"
:
"^15.7.2"
"prop-types"
:
"^15.7.2"
}
}
},
},
"react-tooltip"
:
{
"version"
:
"4.2.8"
,
"resolved"
:
"https://registry.npmjs.org/react-tooltip/-/react-tooltip-4.2.8.tgz"
,
"integrity"
:
"sha512-pDWa0/khTAgIfldp95tHgyuYyBhWNlfaU2LF9ubAKxpoqNe15uyf+uLlnhK/Lstb6FU8E8/SL28Wp6oEO9xw3g=="
,
"requires"
:
{
"prop-types"
:
"^15.7.2"
,
"uuid"
:
"^7.0.3"
},
"dependencies"
:
{
"uuid"
:
{
"version"
:
"7.0.3"
,
"resolved"
:
"https://registry.npmjs.org/uuid/-/uuid-7.0.3.tgz"
,
"integrity"
:
"sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg=="
}
}
},
"react-transition-group"
:
{
"react-transition-group"
:
{
"version"
:
"4.4.1"
,
"version"
:
"4.4.1"
,
"resolved"
:
"https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.1.tgz"
,
"resolved"
:
"https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.1.tgz"
,
...
...
src/container/Login.js
View file @
288b9ede
...
@@ -75,7 +75,9 @@ class Login extends Component {
...
@@ -75,7 +75,9 @@ class Login extends Component {
}
}
api
.
create
().
login
(
payload
).
then
((
response
)
=>
{
api
.
create
().
login
(
payload
).
then
((
response
)
=>
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
console
.
log
(
response
.
data
.
data
)
localStorage
.
setItem
(
Constant
.
TOKEN
,
response
.
data
.
data
.
token
)
localStorage
.
setItem
(
Constant
.
TOKEN
,
response
.
data
.
data
.
token
)
localStorage
.
setItem
(
Constant
.
USER
,
response
.
data
.
data
.
user_id
)
if
(
this
.
state
.
rememberMe
)
{
if
(
this
.
state
.
rememberMe
)
{
localStorage
.
setItem
(
Constant
.
EMAIL
,
this
.
state
.
email
)
localStorage
.
setItem
(
Constant
.
EMAIL
,
this
.
state
.
email
)
localStorage
.
setItem
(
Constant
.
PASSWORD
,
this
.
state
.
password
)
localStorage
.
setItem
(
Constant
.
PASSWORD
,
this
.
state
.
password
)
...
...
src/container/Otorisasi/User.js
View file @
288b9ede
This diff is collapsed.
Click to expand it.
src/container/Otorisasi/User/AddUser.js
View file @
288b9ede
...
@@ -3,6 +3,8 @@ import { TextField, Divider, Typography, Checkbox, withStyles } from '@material-
...
@@ -3,6 +3,8 @@ import { TextField, Divider, Typography, Checkbox, withStyles } from '@material-
import
api
from
'../../../api'
;
import
api
from
'../../../api'
;
import
Autocomplete
from
'@material-ui/lab/Autocomplete'
;
import
Autocomplete
from
'@material-ui/lab/Autocomplete'
;
import
{
titleCase
}
from
'../../../library/Utils'
;
import
{
titleCase
}
from
'../../../library/Utils'
;
import
localeID
from
"date-fns/locale/id"
import
format
from
"date-fns/format"
;
const
CustomCheckbox
=
withStyles
({
const
CustomCheckbox
=
withStyles
({
root
:
{
root
:
{
...
@@ -29,7 +31,8 @@ export default class AddUser extends Component {
...
@@ -29,7 +31,8 @@ export default class AddUser extends Component {
startDate
:
null
,
startDate
:
null
,
endDate
:
null
,
endDate
:
null
,
company
:
[],
company
:
[],
listRole
:
null
listRole
:
null
,
date
:
new
Date
(),
}
}
}
}
...
@@ -247,7 +250,7 @@ export default class AddUser extends Component {
...
@@ -247,7 +250,7 @@ export default class AddUser extends Component {
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
style
=
{{
flexDirection
:
'column'
,
display
:
'flex'
,
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
div
style
=
{{
flexDirection
:
'column'
,
display
:
'flex'
,
paddingLeft
:
20
,
paddingRight
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
12
}}
>
{
`Dibuat :
${
this
.
state
.
tempData
==
null
?
''
:
this
.
state
.
tempData
.
created
}
`
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
12
}}
>
{
`Dibuat :
${
format
(
this
.
state
.
date
,
'dd MMMM yyyy'
,
{
locale
:
localeID
})
}
`
}
<
/Typography
>
{
/* <Typography style={{fontSize: 12}}>{`Diubah: ${this.state.tempData == null? '' : this.state.tempData.updated}`}</Typography> */
}
{
/* <Typography style={{fontSize: 12}}>{`Diubah: ${this.state.tempData == null? '' : this.state.tempData.updated}`}</Typography> */
}
<
/div
>
<
/div
>
<
Divider
style
=
{{
margin
:
20
}}
/
>
<
Divider
style
=
{{
margin
:
20
}}
/
>
...
...
src/library/Constant.js
View file @
288b9ede
const
Constant
=
{
const
Constant
=
{
TOKEN
:
null
,
TOKEN
:
null
,
USER
:
null
,
USER
:
0
,
EMAIL
:
'TOKEN'
,
EMAIL
:
'TOKEN'
,
PASSWORD
:
'PASSWORD'
PASSWORD
:
'PASSWORD'
...
...
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