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
9d215966
Commit
9d215966
authored
Sep 18, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rapihin
parent
d6a7e902
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
39 additions
and
38 deletions
+39
-38
PopUpDeleteAM.js
src/container/ApprovalMatrix/PopUpDeleteAM.js
+1
-1
BudgetTahunan.js
src/container/BudgetTahunan.js
+2
-2
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+11
-10
Home.js
src/container/Home.js
+3
-3
HomePage.js
src/container/HomePage.js
+2
-2
CreatePerusahaan.js
src/container/MasterData/Perusahaan/CreatePerusahaan.js
+1
-1
Profile.js
src/container/Profile.js
+18
-18
Upload.js
src/library/Upload.js
+1
-1
No files found.
src/container/ApprovalMatrix/PopUpDeleteAM.js
View file @
9d215966
...
@@ -52,7 +52,7 @@ export default class PopUpDeleteAM extends Component {
...
@@ -52,7 +52,7 @@ export default class PopUpDeleteAM extends Component {
}
}
onClickDelete
()
{
onClickDelete
()
{
if
(
this
.
props
.
type
==
'delete'
)
{
if
(
this
.
props
.
type
==
=
'delete'
)
{
let
payload
=
this
.
state
.
id
let
payload
=
this
.
state
.
id
this
.
props
.
deleteAM
(
payload
)
this
.
props
.
deleteAM
(
payload
)
}
}
...
...
src/container/BudgetTahunan.js
View file @
9d215966
...
@@ -149,8 +149,8 @@ export default class BudgetTahunan extends Component {
...
@@ -149,8 +149,8 @@ export default class BudgetTahunan extends Component {
options
:
periodeData
,
options
:
periodeData
,
getOptionLabel
:
(
option
)
=>
option
.
periode
,
getOptionLabel
:
(
option
)
=>
option
.
periode
,
};
};
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
==
year
)
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
==
=
year
)
this
.
setState
({
listPeriode
:
defaultProps
,
periode
:
index
==
-
1
?
periodeData
[
0
]
:
periodeData
[
index
]
},
()
=>
{
this
.
setState
({
listPeriode
:
defaultProps
,
periode
:
index
==
=
-
1
?
periodeData
[
0
]
:
periodeData
[
index
]
},
()
=>
{
this
.
getRevision
()
this
.
getRevision
()
this
.
getSubmission
()
this
.
getSubmission
()
})
})
...
...
src/container/BudgetTahunan/BalanceSheet.js
View file @
9d215966
...
@@ -146,11 +146,11 @@ export default class BalanceSheet extends Component {
...
@@ -146,11 +146,11 @@ export default class BalanceSheet extends Component {
handleValue
(
data
)
{
handleValue
(
data
)
{
let
total
=
0
let
total
=
0
this
.
state
.
dataTable
.
map
((
item
,
index
)
=>
{
this
.
state
.
dataTable
.
map
((
item
,
index
)
=>
{
if
(
data
.
rowData
[
1
]
==
item
[
2
])
{
if
(
data
.
rowData
[
1
]
==
=
item
[
2
])
{
total
=
item
[
data
.
columnIndex
]
==
undefined
?
(
Number
(
total
)
+
0
)
:
(
Number
(
total
)
+
Number
(
item
[
data
.
columnIndex
]))
total
=
item
[
data
.
columnIndex
]
==
=
undefined
?
(
Number
(
total
)
+
0
)
:
(
Number
(
total
)
+
Number
(
item
[
data
.
columnIndex
]))
}
}
})
})
let
indexParent
=
this
.
state
.
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
==
this
.
state
.
dataTable
[
data
.
rowIndex
][
2
])
let
indexParent
=
this
.
state
.
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
==
=
this
.
state
.
dataTable
[
data
.
rowIndex
][
2
])
let
a
=
this
.
state
.
dataTable
[
data
.
rowIndex
][
data
.
columnIndex
]
=
total
let
a
=
this
.
state
.
dataTable
[
data
.
rowIndex
][
data
.
columnIndex
]
=
total
// console.log(indexParent);
// console.log(indexParent);
return
a
return
a
...
@@ -159,12 +159,12 @@ export default class BalanceSheet extends Component {
...
@@ -159,12 +159,12 @@ export default class BalanceSheet extends Component {
handleChange
(
value
,
tableMeta
)
{
handleChange
(
value
,
tableMeta
)
{
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
let
data
=
this
.
state
.
dataTable
let
data
=
this
.
state
.
dataTable
let
indexParent
=
data
.
findIndex
((
val
)
=>
val
[
1
]
==
data
[
tableMeta
.
rowIndex
][
2
])
let
indexParent
=
data
.
findIndex
((
val
)
=>
val
[
1
]
==
=
data
[
tableMeta
.
rowIndex
][
2
])
if
(
indexParent
>
0
)
{
if
(
indexParent
>
0
)
{
// console.log(indexParent)
// console.log(indexParent)
let
a
=
data
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
let
a
=
data
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
let
jagain
=
data
[
indexParent
][
tableMeta
.
columnIndex
]
let
jagain
=
data
[
indexParent
][
tableMeta
.
columnIndex
]
a
=
data
[
indexParent
][
tableMeta
.
columnIndex
]
=
jagain
==
undefined
?
(
0
+
Number
(
val
))
:
(
jagain
+
Number
(
val
))
a
=
data
[
indexParent
][
tableMeta
.
columnIndex
]
=
jagain
==
=
undefined
?
(
0
+
Number
(
val
))
:
(
jagain
+
Number
(
val
))
}
else
{
}
else
{
data
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
data
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
}
}
...
@@ -305,6 +305,7 @@ export default class BalanceSheet extends Component {
...
@@ -305,6 +305,7 @@ export default class BalanceSheet extends Component {
})
})
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
},
()
=>
{
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
},
()
=>
{
if
(
this
.
state
.
dataTable
[
22
].
length
>
0
)
{
if
(
this
.
state
.
dataTable
[
22
].
length
>
0
)
{
console
.
log
(
'masuk'
)
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
})
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
})
}
}
})
})
...
@@ -378,12 +379,12 @@ export default class BalanceSheet extends Component {
...
@@ -378,12 +379,12 @@ export default class BalanceSheet extends Component {
const
handleChange
=
(
value
,
tableMeta
)
=>
{
const
handleChange
=
(
value
,
tableMeta
)
=>
{
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
let
val
=
String
(
value
).
split
(
","
).
join
(
""
)
// let data = this.state.dataTable2
// let data = this.state.dataTable2
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
dataTable2
[
tableMeta
.
rowIndex
][
2
])
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
=
dataTable2
[
tableMeta
.
rowIndex
][
2
])
if
(
indexParent
>
0
)
{
if
(
indexParent
>
0
)
{
// console.log(indexParent)
// console.log(indexParent)
let
a
=
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
let
a
=
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
let
jagain
=
dataTable2
[
indexParent
][
tableMeta
.
columnIndex
]
let
jagain
=
dataTable2
[
indexParent
][
tableMeta
.
columnIndex
]
a
=
dataTable2
[
indexParent
][
tableMeta
.
columnIndex
]
=
jagain
==
undefined
?
(
0
+
Number
(
val
))
:
(
jagain
+
Number
(
val
))
a
=
dataTable2
[
indexParent
][
tableMeta
.
columnIndex
]
=
jagain
==
=
undefined
?
(
0
+
Number
(
val
))
:
(
jagain
+
Number
(
val
))
}
else
{
}
else
{
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
dataTable2
[
tableMeta
.
rowIndex
][
tableMeta
.
columnIndex
]
=
Number
(
val
)
}
}
...
@@ -391,11 +392,11 @@ export default class BalanceSheet extends Component {
...
@@ -391,11 +392,11 @@ export default class BalanceSheet extends Component {
const
handleValue
=
(
data
)
=>
{
const
handleValue
=
(
data
)
=>
{
let
total
=
0
let
total
=
0
dataTable2
.
map
((
item
,
index
)
=>
{
dataTable2
.
map
((
item
,
index
)
=>
{
if
(
data
.
rowData
[
1
]
==
item
[
2
])
{
if
(
data
.
rowData
[
1
]
==
=
item
[
2
])
{
total
=
item
[
data
.
columnIndex
]
==
undefined
?
(
Number
(
total
)
+
0
)
:
(
Number
(
total
)
+
Number
(
item
[
data
.
columnIndex
]))
total
=
item
[
data
.
columnIndex
]
==
=
undefined
?
(
Number
(
total
)
+
0
)
:
(
Number
(
total
)
+
Number
(
item
[
data
.
columnIndex
]))
}
}
})
})
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
dataTable2
[
data
.
rowIndex
][
2
])
let
indexParent
=
dataTable2
.
findIndex
((
val
)
=>
val
[
1
]
==
=
dataTable2
[
data
.
rowIndex
][
2
])
let
a
=
dataTable2
[
data
.
rowIndex
][
data
.
columnIndex
]
=
Number
(
total
)
let
a
=
dataTable2
[
data
.
rowIndex
][
data
.
columnIndex
]
=
Number
(
total
)
// console.log(indexParent);
// console.log(indexParent);
return
a
return
a
...
...
src/container/Home.js
View file @
9d215966
...
@@ -311,7 +311,7 @@ export default function MiniDrawer() {
...
@@ -311,7 +311,7 @@ export default function MiniDrawer() {
})
})
React
.
useEffect
(()
=>
{
React
.
useEffect
(()
=>
{
if
(
userFullname
==
""
&&
userEmail
==
""
)
{
if
(
userFullname
==
=
""
&&
userEmail
=
==
""
)
{
getUserData
()
getUserData
()
getMenuHierarki
()
getMenuHierarki
()
}
}
...
@@ -365,7 +365,7 @@ export default function MiniDrawer() {
...
@@ -365,7 +365,7 @@ export default function MiniDrawer() {
let
userId
=
localStorage
.
getItem
(
Constant
.
USER
)
let
userId
=
localStorage
.
getItem
(
Constant
.
USER
)
api
.
create
().
getDetailUser
(
userId
).
then
((
response
)
=>
{
api
.
create
().
getDetailUser
(
userId
).
then
((
response
)
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
==
'success'
)
{
if
(
response
.
data
.
status
==
=
'success'
)
{
setUserFullname
(
response
.
data
.
data
.
fullname
===
null
?
'Anonym'
:
response
.
data
.
data
.
fullname
)
setUserFullname
(
response
.
data
.
data
.
fullname
===
null
?
'Anonym'
:
response
.
data
.
data
.
fullname
)
setUserEmail
(
response
.
data
.
data
.
email
===
null
?
'Anonym@123.xyz'
:
response
.
data
.
data
.
email
)
setUserEmail
(
response
.
data
.
data
.
email
===
null
?
'Anonym@123.xyz'
:
response
.
data
.
data
.
email
)
setUserPhoto
(
response
.
data
.
data
.
photo
===
null
?
""
:
response
.
data
.
data
.
photo
)
setUserPhoto
(
response
.
data
.
data
.
photo
===
null
?
""
:
response
.
data
.
data
.
photo
)
...
@@ -401,7 +401,7 @@ export default function MiniDrawer() {
...
@@ -401,7 +401,7 @@ export default function MiniDrawer() {
const
selectIndex
=
(
e
)
=>
{
const
selectIndex
=
(
e
)
=>
{
setSelectSub
(
""
)
setSelectSub
(
""
)
setSelectedIndex
(
e
)
setSelectedIndex
(
e
)
// if (open == false) {
// if (open ==
=
false) {
// setOpen(true)
// setOpen(true)
// }
// }
}
}
...
...
src/container/HomePage.js
View file @
9d215966
...
@@ -21,7 +21,7 @@ class HomePage extends Component {
...
@@ -21,7 +21,7 @@ class HomePage extends Component {
let
userId
=
localStorage
.
getItem
(
Constant
.
USER
)
let
userId
=
localStorage
.
getItem
(
Constant
.
USER
)
api
.
create
().
getDetailUser
(
userId
).
then
((
response
)
=>
{
api
.
create
().
getDetailUser
(
userId
).
then
((
response
)
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
==
'success'
)
{
if
(
response
.
data
.
status
==
=
'success'
)
{
this
.
setState
({
userData
:
response
.
data
.
data
},
()
=>
{
this
.
setState
({
userData
:
response
.
data
.
data
},
()
=>
{
console
.
log
(
this
.
state
.
userData
)
console
.
log
(
this
.
state
.
userData
)
})
})
...
@@ -111,7 +111,7 @@ class HomePage extends Component {
...
@@ -111,7 +111,7 @@ class HomePage extends Component {
return
(
return
(
<
div
style
=
{{
flex
:
1
,
backgroundColor
:
'#f8f8f8'
}}
>
<
div
style
=
{{
flex
:
1
,
backgroundColor
:
'#f8f8f8'
}}
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
flex
:
1
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
flex
:
1
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'24px'
,
color
:
'white'
}}
>
{
this
.
state
.
userData
==
null
?
''
:
`Selamat Datang,
${
this
.
state
.
userData
.
fullname
}
!`
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'24px'
,
color
:
'white'
}}
>
{
this
.
state
.
userData
==
=
null
?
''
:
`Selamat Datang,
${
this
.
state
.
userData
.
fullname
}
!`
}
<
/Typography
>
<
/div
>
<
/div
>
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
...
...
src/container/MasterData/Perusahaan/CreatePerusahaan.js
View file @
9d215966
...
@@ -122,7 +122,7 @@ export default class CreatePerusahaan extends Component {
...
@@ -122,7 +122,7 @@ export default class CreatePerusahaan extends Component {
console
.
log
(
response
)
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
==
'success'
)
{
if
(
response
.
data
.
status
==
=
'success'
)
{
let
data
=
response
.
data
.
data
let
data
=
response
.
data
.
data
let
currentIndex
=
null
let
currentIndex
=
null
let
perusahaanData
=
data
.
map
((
item
,
index
)
=>
{
let
perusahaanData
=
data
.
map
((
item
,
index
)
=>
{
...
...
src/container/Profile.js
View file @
9d215966
...
@@ -67,17 +67,17 @@ export default class Profile extends Component {
...
@@ -67,17 +67,17 @@ export default class Profile 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
})
console
.
log
(
e
.
target
.
name
);
console
.
log
(
e
.
target
.
name
);
if
(
e
.
target
.
name
==
"password"
)
{
if
(
e
.
target
.
name
==
=
"password"
)
{
this
.
setState
({
errorPassword
:
false
,
msgPassword
:
'Consists of 8 Characters with a Combination of Numbers.'
})
this
.
setState
({
errorPassword
:
false
,
msgPassword
:
'Consists of 8 Characters with a Combination of Numbers.'
})
}
else
if
(
e
.
target
.
name
==
"confirmPassword"
)
{
}
else
if
(
e
.
target
.
name
==
=
"confirmPassword"
)
{
this
.
setState
({
errorConfirmPassword
:
false
,
msgConfirmPassword
:
'Consists of 8 Characters with a Combination of Numbers.'
})
this
.
setState
({
errorConfirmPassword
:
false
,
msgConfirmPassword
:
'Consists of 8 Characters with a Combination of Numbers.'
})
}
else
if
(
e
.
target
.
name
==
"oldPassword"
)
{
}
else
if
(
e
.
target
.
name
==
=
"oldPassword"
)
{
this
.
setState
({
errorOldPassword
:
false
,
msgOldPassword
:
'Consists of 8 Characters with a Combination of Numbers.'
})
this
.
setState
({
errorOldPassword
:
false
,
msgOldPassword
:
'Consists of 8 Characters with a Combination of Numbers.'
})
}
}
}
}
validasi
()
{
validasi
()
{
if
(
this
.
state
.
oldPassword
==
""
)
{
if
(
this
.
state
.
oldPassword
==
=
""
)
{
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old Password Cannot be Empty.'
})
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old Password Cannot be Empty.'
})
}
else
if
(
this
.
state
.
oldPassword
.
length
<
8
)
{
}
else
if
(
this
.
state
.
oldPassword
.
length
<
8
)
{
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old Password Minimum 8 Characters.'
})
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old Password Minimum 8 Characters.'
})
...
@@ -85,7 +85,7 @@ export default class Profile extends Component {
...
@@ -85,7 +85,7 @@ export default class Profile extends Component {
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old Password Format Should Not Use Email.'
})
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old Password Format Should Not Use Email.'
})
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
oldPassword
))
{
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
oldPassword
))
{
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old Password Must be a Combination of Characters, Letters and Numbers.'
})
this
.
setState
({
errorOldPassword
:
true
,
msgOldPassword
:
'Old Password Must be a Combination of Characters, Letters and Numbers.'
})
}
else
if
(
this
.
state
.
password
.
trim
()
==
""
)
{
}
else
if
(
this
.
state
.
password
.
trim
()
==
=
""
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password Cannot be Empty.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password Cannot be Empty.'
})
}
else
if
(
this
.
state
.
password
.
length
<
8
)
{
}
else
if
(
this
.
state
.
password
.
length
<
8
)
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password Minimum 8 Characters.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password Minimum 8 Characters.'
})
...
@@ -93,7 +93,7 @@ export default class Profile extends Component {
...
@@ -93,7 +93,7 @@ export default class Profile extends Component {
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password Format Should Not Use Email.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password Format Should Not Use Email.'
})
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
password
))
{
}
else
if
(
!
this
.
isRegex
(
this
.
state
.
password
))
{
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password Must be a Combination of Characters, Letters and Numbers.'
})
this
.
setState
({
errorPassword
:
true
,
msgPassword
:
'Password Must be a Combination of Characters, Letters and Numbers.'
})
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
""
)
{
}
else
if
(
this
.
state
.
confirmPassword
.
trim
()
==
=
""
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Repeat Password Cannot be Empty.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Repeat Password Cannot be Empty.'
})
}
else
if
(
this
.
state
.
password
!==
this
.
state
.
confirmPassword
)
{
}
else
if
(
this
.
state
.
password
!==
this
.
state
.
confirmPassword
)
{
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password Does Not Match.'
})
this
.
setState
({
errorConfirmPassword
:
true
,
msgConfirmPassword
:
'Password Does Not Match.'
})
...
@@ -157,7 +157,7 @@ export default class Profile extends Component {
...
@@ -157,7 +157,7 @@ export default class Profile extends Component {
console
.
log
(
response
);
console
.
log
(
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
({
company
:
response
.
data
.
data
.
company
,
photo
:
response
.
data
.
data
.
photo
,
name
:
response
.
data
.
data
.
fullname
})
this
.
setState
({
company
:
response
.
data
.
data
.
company
,
photo
:
response
.
data
.
data
.
photo
,
name
:
response
.
data
.
data
.
fullname
})
console
.
log
(
response
)
console
.
log
(
response
)
}
else
{
}
else
{
...
@@ -184,7 +184,7 @@ export default class Profile extends Component {
...
@@ -184,7 +184,7 @@ export default class Profile extends Component {
// console.log(response);
// console.log(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
({
listCompany
:
response
.
data
.
data
})
this
.
setState
({
listCompany
:
response
.
data
.
data
})
console
.
log
(
response
.
data
.
data
)
console
.
log
(
response
.
data
.
data
)
}
else
{
}
else
{
...
@@ -207,8 +207,8 @@ export default class Profile extends Component {
...
@@ -207,8 +207,8 @@ export default class Profile extends Component {
}
}
handleItemChecked
(
item
)
{
handleItemChecked
(
item
)
{
let
indexID
=
this
.
state
.
company
.
findIndex
((
val
)
=>
val
==
item
.
id
)
let
indexID
=
this
.
state
.
company
.
findIndex
((
val
)
=>
val
==
=
item
.
id
)
return
indexID
==
-
1
?
false
:
true
return
indexID
==
=
-
1
?
false
:
true
}
}
renderChildren
=
(
item
,
pad
)
=>
{
renderChildren
=
(
item
,
pad
)
=>
{
...
@@ -269,19 +269,19 @@ export default class Profile extends Component {
...
@@ -269,19 +269,19 @@ export default class Profile extends Component {
}
}
let
pathSelect
=
null
let
pathSelect
=
null
if
(
arrayPath
.
length
==
1
)
{
if
(
arrayPath
.
length
==
=
1
)
{
pathSelect
=
listCompany
[
arrayPath
[
0
]]
pathSelect
=
listCompany
[
arrayPath
[
0
]]
}
else
if
(
arrayPath
.
length
==
2
)
{
}
else
if
(
arrayPath
.
length
==
=
2
)
{
pathSelect
=
listCompany
[
arrayPath
[
0
]].
children
[
arrayPath
[
1
]]
pathSelect
=
listCompany
[
arrayPath
[
0
]].
children
[
arrayPath
[
1
]]
}
else
if
(
arrayPath
.
length
==
3
)
{
}
else
if
(
arrayPath
.
length
==
=
3
)
{
pathSelect
=
listCompany
[
arrayPath
[
0
]].
children
[
arrayPath
[
1
]].
children
[
arrayPath
[
2
]]
pathSelect
=
listCompany
[
arrayPath
[
0
]].
children
[
arrayPath
[
1
]].
children
[
arrayPath
[
2
]]
}
else
if
(
arrayPath
.
length
==
4
)
{
}
else
if
(
arrayPath
.
length
==
=
4
)
{
pathSelect
=
listCompany
[
arrayPath
[
0
]].
children
[
arrayPath
[
1
]].
children
[
arrayPath
[
2
]].
children
[
arrayPath
[
3
]]
pathSelect
=
listCompany
[
arrayPath
[
0
]].
children
[
arrayPath
[
1
]].
children
[
arrayPath
[
2
]].
children
[
arrayPath
[
3
]]
}
else
if
(
arrayPath
.
length
==
5
)
{
}
else
if
(
arrayPath
.
length
==
=
5
)
{
pathSelect
=
listCompany
[
arrayPath
[
0
]].
children
[
arrayPath
[
1
]].
children
[
arrayPath
[
2
]].
children
[
arrayPath
[
3
]].
children
[
arrayPath
[
4
]]
pathSelect
=
listCompany
[
arrayPath
[
0
]].
children
[
arrayPath
[
1
]].
children
[
arrayPath
[
2
]].
children
[
arrayPath
[
3
]].
children
[
arrayPath
[
4
]]
}
else
if
(
arrayPath
.
length
==
6
)
{
}
else
if
(
arrayPath
.
length
==
=
6
)
{
pathSelect
=
listCompany
[
arrayPath
[
0
]].
children
[
arrayPath
[
1
]].
children
[
arrayPath
[
2
]].
children
[
arrayPath
[
3
]].
children
[
arrayPath
[
4
]].
children
[
arrayPath
[
5
]]
pathSelect
=
listCompany
[
arrayPath
[
0
]].
children
[
arrayPath
[
1
]].
children
[
arrayPath
[
2
]].
children
[
arrayPath
[
3
]].
children
[
arrayPath
[
4
]].
children
[
arrayPath
[
5
]]
}
else
if
(
arrayPath
.
length
==
7
)
{
}
else
if
(
arrayPath
.
length
==
=
7
)
{
pathSelect
=
listCompany
[
arrayPath
[
0
]].
children
[
arrayPath
[
1
]].
children
[
arrayPath
[
2
]].
children
[
arrayPath
[
3
]].
children
[
arrayPath
[
4
]].
children
[
arrayPath
[
5
]].
children
[
arrayPath
[
6
]]
pathSelect
=
listCompany
[
arrayPath
[
0
]].
children
[
arrayPath
[
1
]].
children
[
arrayPath
[
2
]].
children
[
arrayPath
[
3
]].
children
[
arrayPath
[
4
]].
children
[
arrayPath
[
5
]].
children
[
arrayPath
[
6
]]
}
}
...
@@ -399,7 +399,7 @@ export default class Profile extends Component {
...
@@ -399,7 +399,7 @@ export default class Profile extends Component {
<
Tab
label
=
"AUTHORIZATION"
style
=
{{
color
:
'#4b4b4b'
,
fontSize
:
11
}}
/
>
<
Tab
label
=
"AUTHORIZATION"
style
=
{{
color
:
'#4b4b4b'
,
fontSize
:
11
}}
/
>
<
/Tabs
>
<
/Tabs
>
<
/AppBar
>
<
/AppBar
>
{
this
.
state
.
tab
==
0
?
{
this
.
state
.
tab
==
=
0
?
<
form
onSubmit
=
{(
e
)
=>
{
<
form
onSubmit
=
{(
e
)
=>
{
e
.
preventDefault
()
e
.
preventDefault
()
this
.
validasi
()
this
.
validasi
()
...
...
src/library/Upload.js
View file @
9d215966
...
@@ -26,7 +26,7 @@ class Upload extends Component {
...
@@ -26,7 +26,7 @@ class Upload extends Component {
completed
:
'0'
,
completed
:
'0'
,
alert
:
false
,
alert
:
false
,
alertMessage
:
''
,
alertMessage
:
''
,
sizeUpload
:
this
.
props
.
sizeUpload
===
undefined
?
0
:
this
.
props
.
sizeUpload
sizeUpload
:
this
.
props
.
sizeUpload
===
undefined
?
1
:
this
.
props
.
sizeUpload
}
}
}
}
...
...
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