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