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
814f6c50
Commit
814f6c50
authored
Aug 19, 2020
by
EKSAD
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into riri
parents
7e0381a9
90ca8295
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
231 additions
and
147 deletions
+231
-147
Parameter.js
src/container/MasterData/Parameter/Parameter.js
+3
-3
CreatePerusahaan.js
src/container/MasterData/Perusahaan/CreatePerusahaan.js
+3
-3
EditPerusahaan.js
src/container/MasterData/Perusahaan/EditPerusahaan.js
+4
-2
CreateUnitBisnis.js
src/container/MasterData/formUnitBisnis/CreateUnitBisnis.js
+2
-2
AddUser.js
src/container/Otorisasi/User/AddUser.js
+104
-72
EditUser.js
src/container/Otorisasi/User/EditUser.js
+82
-50
UserRole.js
src/container/Otorisasi/UserRole.js
+2
-1
Profile.js
src/container/Profile.js
+31
-14
No files found.
src/container/MasterData/Parameter/Parameter.js
View file @
814f6c50
...
...
@@ -644,8 +644,8 @@ export default class Parameter extends Component {
{
this
.
state
.
visibleParameter
===
true
?
<
div
>
<
div
style
=
{{
display
:
'flex'
,
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
paddingRight
:
25
,
paddingLeft
:
25
,
marginTop
:
-
150
}}
>
<
label
style
=
{{
color
:
'white'
,
fontSize
:
16
,
alignSelf
:
'center'
}}
>
Parameter
<
/label
>
<
div
style
=
{{
color
:
'white'
,
width
:
'50%'
,
height
:
37
,
display
:
'flex'
,
backgroundColor
:
'white'
,
borderWidth
:
2
,
alignItems
:
'center'
,
borderRadius
:
6
,
paddingLeft
:
5
,
paddingRight
:
5
}}
>
<
label
style
=
{{
color
:
'white'
,
fontSize
:
16
,
alignSelf
:
'center'
,
width
:
'20%'
,
}}
>
Parameter
<
/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'
}}
>
<
img
src
=
{
Images
.
searchBlack
}
style
=
{{
marginRight
:
10
}}
/
>
<
InputBase
style
=
{{
width
:
'100%'
}}
...
...
@@ -655,7 +655,7 @@ export default class Parameter extends Component {
inputProps
=
{{
'aria-label'
:
'naked'
}}
/
>
<
/div
>
<
div
style
=
{{
width
:
'
20%'
,
justifyContent
:
'flex-end'
,
display
:
'flex
'
}}
>
<
div
style
=
{{
width
:
'
30%'
,
justifyContent
:
'flex-end'
,
display
:
'flex'
,
flexFlow
:
'wrap
'
}}
>
<
a
data
-
tip
=
{
'Download Template'
}
data
-
for
=
"template"
>
<
button
style
=
{{
...
...
src/container/MasterData/Perusahaan/CreatePerusahaan.js
View file @
814f6c50
...
...
@@ -112,7 +112,7 @@ export default class CreatePerusahaan extends Component {
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
=
"popup-panel grid grid-2x
main-color"
style
=
{{
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
>
...
...
@@ -230,8 +230,8 @@ export default class CreatePerusahaan extends Component {
<
/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
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
Dibuat
:
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
11
}}
>
Diubah
:
<
/Typography
>
<
/div
>
<
/div
>
...
...
src/container/MasterData/Perusahaan/EditPerusahaan.js
View file @
814f6c50
...
...
@@ -13,11 +13,13 @@ export default class EditPerusahaan extends Component {
this
.
state
=
{
id
:
''
,
company
:
''
,
companyID
:
''
,
parent
:
''
,
unitBisnis
:
''
,
totalReport
:
''
,
startDate
:
''
,
endDate
:
''
,
status
:
''
,
types
:
null
,
getTypes
:
null
,
perusahaan
:
null
,
...
...
@@ -166,7 +168,7 @@ export default class EditPerusahaan extends Component {
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
=
"popup-panel grid grid-2x
main-color"
style
=
{{
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'
}}
>
Ubah
Data
<
/span
>
...
...
@@ -189,7 +191,7 @@ export default class EditPerusahaan extends Component {
<
div
style
=
{{
backgroundColor
:
'#e8e8e8'
,
padding
:
10
,
borderRadius
:
5
}}
>
<
TextField
style
=
{{
width
:
'100%'
}}
value
=
{
this
.
state
.
business
ID
}
value
=
{
this
.
state
.
company
ID
}
id
=
"id"
label
=
"ID"
disabled
...
...
src/container/MasterData/formUnitBisnis/CreateUnitBisnis.js
View file @
814f6c50
...
...
@@ -119,9 +119,9 @@ export default class CreateUnitBisnis extends Component {
validasiCreate
()
{
if
(
R
.
isEmpty
(
this
.
state
.
name
))
{
this
.
setState
({
errorName
:
true
,
msgErrorName
:
'Unit Bisnis tidak boleh kosong'
})
}
else
if
(
R
.
is
Empty
(
this
.
state
.
startDate
))
{
}
else
if
(
R
.
is
Nil
(
this
.
state
.
startDate
))
{
this
.
setState
({
errorStartDate
:
true
,
msgErrorStartDate
:
'Berlaku Mulai tidak boleh kosong'
})
}
else
if
(
R
.
is
Empty
(
this
.
state
.
endDate
))
{
}
else
if
(
R
.
is
Nil
(
this
.
state
.
endDate
))
{
this
.
setState
({
errorEndDate
:
true
,
msgErrorEndDate
:
'Berkahir Hingga tidak boleh kosong'
})
}
else
{
let
payload
=
{
...
...
src/container/Otorisasi/User/AddUser.js
View file @
814f6c50
This diff is collapsed.
Click to expand it.
src/container/Otorisasi/User/EditUser.js
View file @
814f6c50
This diff is collapsed.
Click to expand it.
src/container/Otorisasi/UserRole.js
View file @
814f6c50
...
...
@@ -100,6 +100,7 @@ class UserRole extends Component {
name
:
"Action"
,
options
:
{
customBodyRender
:
(
val
,
tableMeta
)
=>
{
console
.
log
(
tableMeta
);
return
(
<
div
style
=
{{
display
:
'flex'
}}
>
<
button
...
...
@@ -112,7 +113,7 @@ class UserRole extends Component {
onClick
=
{()
=>
this
.
setState
({
edit
:
true
,
indexData
:
tableMeta
.
rowData
[
1
]
})}
>
<
div
style
=
{{
display
:
'flex'
}}
>
{
tableMeta
.
rowData
[
4
]
===
"Aktif"
?
{
tableMeta
.
rowData
[
2
]
!==
"superadmin"
&&
tableMeta
.
rowData
[
4
]
===
"Aktif"
?
<
img
src
=
{
Images
.
editCopy
}
/>
:
null
}
...
...
src/container/Profile.js
View file @
814f6c50
...
...
@@ -253,18 +253,8 @@ export default class Profile extends Component {
};
async
onDrop
(
pictureFiles
)
{
let
formData
=
new
FormData
()
formData
.
append
(
'file'
,
pictureFiles
[
0
])
let
response
=
await
api
.
create
().
uploadFoto
(
formData
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
uploadVisible
:
false
},
()
=>
{
alert
(
response
.
data
.
message
)
this
.
getUser
()
window
.
location
.
reload
()
})
}
}
console
.
log
(
pictureFiles
);
this
.
setState
({
pictures
:
pictureFiles
})
// console.log(response);
// console.log(pictureFiles);
// console.log(pictureDataURLs);
...
...
@@ -273,6 +263,23 @@ export default class Profile extends Component {
// });
}
async
uploadFoto
(){
let
formData
=
new
FormData
()
formData
.
append
(
'file'
,
this
.
state
.
pictures
[
0
])
api
.
create
().
uploadFoto
(
formData
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
uploadVisible
:
false
},
()
=>
{
alert
(
response
.
data
.
message
)
this
.
getUser
()
window
.
location
.
reload
()
})
}
}
})
}
render
()
{
return
(
<
div
style
=
{{
height
:
this
.
props
.
height
,
backgroundColor
:
'#f8f8f8'
,
marginBottom
:
100
,
minHeight
:
1000
}}
>
...
...
@@ -487,11 +494,21 @@ export default class Profile extends Component {
<
/div
>
<
ImageUploader
withIcon
=
{
true
}
buttonText
=
'Choose images'
withPreview
buttonText
=
'Pilih Gambar'
onChange
=
{
this
.
onDrop
}
imgExtension
=
{[
'.jpg'
,
'.gif'
,
'.png'
,
'.gif'
,
'.jpeg'
]}
maxFileSize
=
{
5242880
}
maxFileSize
=
{
1000000
}
label
=
{
"Max file size: 1 Mb, accepted: jpg or png"
}
/
>
{
this
.
state
.
pictures
.
length
>
0
?
<
div
style
=
{{
display
:
'grid'
,
margin
:
20
}}
>
<
div
style
=
{{
justifySelf
:
'center'
}}
>
<
span
className
=
"main-color"
style
=
{{
color
:
'#fff'
,
padding
:
20
,
paddingBottom
:
10
,
paddingTop
:
10
,
borderRadius
:
15
,
cursor
:
'pointer'
}}
onClick
=
{()
=>
this
.
uploadFoto
()}
>
Upload
Foto
<
/span
>
<
/div
>
<
/div> : nul
l
}
<
/div
>
<
/div
>
)}
...
...
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