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
498a0b3e
Commit
498a0b3e
authored
Sep 30, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
++
parent
da660f5d
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
503 additions
and
466 deletions
+503
-466
index.js
src/api/index.js
+1
-1
BudgetTahunan.js
src/container/BudgetTahunan.js
+27
-17
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+36
-22
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+439
-426
No files found.
src/api/index.js
View file @
498a0b3e
...
@@ -38,7 +38,7 @@ const create = (type = "") => {
...
@@ -38,7 +38,7 @@ const create = (type = "") => {
'Content-Type'
:
'application/json'
,
'Content-Type'
:
'application/json'
,
},
},
// 40 second timeout...
// 40 second timeout...
timeout
:
6
0000
timeout
:
10
0000
})
})
break
;
break
;
default
:
default
:
...
...
src/container/BudgetTahunan.js
View file @
498a0b3e
...
@@ -268,7 +268,7 @@ export default class BudgetTahunan extends Component {
...
@@ -268,7 +268,7 @@ export default class BudgetTahunan extends Component {
this
.
setState
({
this
.
setState
({
submissionID
:
response
.
data
.
data
.
submission_id
,
isSubmit
:
false
,
submissionID
:
response
.
data
.
data
.
submission_id
,
isSubmit
:
false
,
submitter
:
response
.
data
.
data
.
submitter
,
submitter
:
response
.
data
.
data
.
submitter
,
approverID
:
response
.
data
.
data
.
approve_id
,
pic
:
response
.
data
.
data
.
approver
==
null
?
''
:
response
.
data
.
data
.
approver
,
approverID
:
response
.
data
.
data
.
approve_id
,
pic
:
response
.
data
.
data
.
approver
==
null
?
''
:
response
.
data
.
data
.
approver
,
lastStatus
:
response
.
data
.
data
.
last_status
===
null
?
'SUBMIT'
:
response
.
data
.
data
.
last_status
lastStatus
:
response
.
data
.
data
.
last_status
===
null
?
'SUBMIT'
:
response
.
data
.
data
.
last_status
},
()
=>
{
},
()
=>
{
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
})
...
@@ -319,15 +319,15 @@ export default class BudgetTahunan extends Component {
...
@@ -319,15 +319,15 @@ export default class BudgetTahunan extends Component {
}
}
approvalSubmission
(
type
)
{
approvalSubmission
(
type
)
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
let
body
=
{
let
body
=
{
"approval_id"
:
this
.
props
.
location
.
state
==
undefined
?
this
.
state
.
approverID
:
this
.
state
.
rawData
.
approval_id
,
"approval_id"
:
this
.
props
.
location
.
state
==
undefined
?
this
.
state
.
approverID
:
this
.
state
.
rawData
.
approval_id
,
"status"
:
type
,
"status"
:
type
,
"detail"
:
this
.
state
.
detailRevisiCheck
"detail"
:
this
.
state
.
detailRevisiCheck
}
}
api
.
create
().
approvalSubmission
(
body
).
then
((
res
)
=>
{
api
.
create
().
approvalSubmission
(
body
).
then
((
res
)
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
checkApprover
()
this
.
checkApprover
()
})
})
})
})
...
@@ -462,12 +462,22 @@ export default class BudgetTahunan extends Component {
...
@@ -462,12 +462,22 @@ export default class BudgetTahunan extends Component {
console
.
log
(
response
);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
getCompanyActive
()
this
.
getSubmission
()
this
.
getReport
()
this
.
getReportAttachment
()
}
else
{
}
else
{
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
getSubmission
()
this
.
getReport
()
this
.
getReportAttachment
()
})
}
}
}
else
{
}
else
{
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
getSubmission
()
this
.
getReport
()
this
.
getReportAttachment
()
})
}
}
})
})
}
}
...
@@ -624,8 +634,8 @@ export default class BudgetTahunan extends Component {
...
@@ -624,8 +634,8 @@ export default class BudgetTahunan extends Component {
value
=
{
val
}
value
=
{
val
}
control
=
{
control
=
{
<
Checkbox
<
Checkbox
checked
=
{
this
.
state
.
detailRevisiCheck
.
findIndex
((
val
)
=>
val
.
report_id
==
tableMeta
.
rowData
[
0
])
==
-
1
?
false
:
true
}
checked
=
{
this
.
state
.
detailRevisiCheck
.
findIndex
((
val
)
=>
val
.
report_id
==
tableMeta
.
rowData
[
0
])
==
-
1
?
false
:
true
}
onClick
=
{()
=>
handleCheckRevision
(
tableMeta
.
rowData
)}
/
>
onClick
=
{()
=>
handleCheckRevision
(
tableMeta
.
rowData
)}
/
>
}
}
/
>
/
>
<
/div
>
<
/div
>
...
@@ -675,7 +685,7 @@ export default class BudgetTahunan extends Component {
...
@@ -675,7 +685,7 @@ export default class BudgetTahunan extends Component {
detailRevisiCheck
[
indexId
].
remarks
=
value
detailRevisiCheck
[
indexId
].
remarks
=
value
}
}
this
.
setState
({
dataTableRevision
,
detailRevisiCheck
})
this
.
setState
({
dataTableRevision
,
detailRevisiCheck
})
}
}
const
handleCheckRevision
=
(
value
)
=>
{
const
handleCheckRevision
=
(
value
)
=>
{
...
@@ -691,7 +701,7 @@ export default class BudgetTahunan extends Component {
...
@@ -691,7 +701,7 @@ export default class BudgetTahunan extends Component {
}
else
{
}
else
{
detailRevisiCheck
.
splice
(
indexId
,
1
)
detailRevisiCheck
.
splice
(
indexId
,
1
)
}
}
this
.
setState
({
detailRevisiCheck
})
this
.
setState
({
detailRevisiCheck
})
console
.
log
(
detailRevisiCheck
)
console
.
log
(
detailRevisiCheck
)
}
}
...
@@ -926,7 +936,7 @@ export default class BudgetTahunan extends Component {
...
@@ -926,7 +936,7 @@ export default class BudgetTahunan extends Component {
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
outline
:
'none'
,
}}
}}
onClick
=
{()
=>
this
.
setState
({
visibleRevision
:
true
})}
onClick
=
{()
=>
this
.
setState
({
visibleRevision
:
true
})}
>
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
div
style
=
{{
backgroundColor
:
'#019ce5'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Revision
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Revision
<
/Typography
>
...
@@ -1214,7 +1224,7 @@ export default class BudgetTahunan extends Component {
...
@@ -1214,7 +1224,7 @@ export default class BudgetTahunan extends Component {
<
div
className
=
"column-1"
style
=
{{
alignSelf
:
'center'
}}
>
<
div
className
=
"column-1"
style
=
{{
alignSelf
:
'center'
}}
>
<
button
<
button
type
=
"button"
type
=
"button"
onClick
=
{()
=>
this
.
setState
({
visibleRevision
:
false
})}
onClick
=
{()
=>
this
.
setState
({
visibleRevision
:
false
})}
>
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
border
:
'solid 1px #354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
border
:
'solid 1px #354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#354960'
,
fontSize
:
11
}}
>
Cancel
<
/span
>
<
span
style
=
{{
color
:
'#354960'
,
fontSize
:
11
}}
>
Cancel
<
/span
>
...
@@ -1224,7 +1234,7 @@ export default class BudgetTahunan extends Component {
...
@@ -1224,7 +1234,7 @@ export default class BudgetTahunan extends Component {
<
div
className
=
"column-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
alignItems
:
'center'
}}
>
<
div
className
=
"column-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
alignItems
:
'center'
}}
>
<
button
<
button
type
=
"button"
type
=
"button"
onClick
=
{()
=>
this
.
setState
({
visibleRevision
:
false
},
()
=>
this
.
approvalSubmission
(
'revision'
))}
onClick
=
{()
=>
this
.
setState
({
visibleRevision
:
false
},
()
=>
this
.
approvalSubmission
(
'revision'
))}
>
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
div
style
=
{{
width
:
102
,
height
:
30
,
backgroundColor
:
'#354960'
,
borderRadius
:
5
,
alignItems
:
'center'
,
display
:
'flex'
,
justifyContent
:
'center'
}}
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
Revision
<
/span
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
Revision
<
/span
>
...
...
src/container/BudgetTahunan/BalanceSheet.js
View file @
498a0b3e
...
@@ -331,11 +331,11 @@ export default class BalanceSheet extends Component {
...
@@ -331,11 +331,11 @@ export default class BalanceSheet extends Component {
item
.
error
item
.
error
]
]
})
})
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
},
()
=>
{
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
editable
:
true
},
()
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
if
(
item
[
23
].
length
>
0
)
{
if
(
item
[
23
].
length
>
0
)
{
console
.
log
(
'masuk'
)
console
.
log
(
'masuk'
)
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
})
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
,
editable
:
true
})
}
}
})
})
// console.log(this.state.dataTable);
// console.log(this.state.dataTable);
...
@@ -2220,7 +2220,7 @@ export default class BalanceSheet extends Component {
...
@@ -2220,7 +2220,7 @@ export default class BalanceSheet extends Component {
onClick
=
{()
=>
{
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
setState
({
loading
:
false
,
buttonError
:
this
.
state
.
errorPreview
===
true
?
true
:
false
})
this
.
setState
({
loading
:
false
,
buttonError
:
this
.
state
.
errorPreview
===
true
?
true
:
false
,
editable
:
false
})
},
100
);
},
100
);
})
})
}}
}}
...
@@ -2231,16 +2231,23 @@ export default class BalanceSheet extends Component {
...
@@ -2231,16 +2231,23 @@ export default class BalanceSheet extends Component {
<
/button
>
<
/button
>
<
button
<
button
type
=
"button"
type
=
"button"
disabled
=
{
this
.
state
.
buttonError
}
style
=
{{
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
editable
!==
true
?
'pointer'
:
'default'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
20
}}
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
uploadBalanceSheet
(
'draft'
)
this
.
uploadBalanceSheet
(
'draft'
)
},
100
);
},
100
);
})
})
)}
}
style
=
{{
marginRight
:
20
}}
>
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
as
Draft
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
as
Draft
<
/Typography
>
...
@@ -2248,15 +2255,22 @@ export default class BalanceSheet extends Component {
...
@@ -2248,15 +2255,22 @@ export default class BalanceSheet extends Component {
<
/button
>
<
/button
>
<
button
<
button
type
=
"button"
type
=
"button"
disabled
=
{
this
.
state
.
buttonError
}
style
=
{{
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
editable
!==
true
?
'pointer'
:
'default'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
}}
onClick
=
{()
=>
this
.
state
.
editable
===
true
?
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
state
.
handleTekTekTek
==
1
?
null
:
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
this
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
uploadBalanceSheet
(
'submitted'
)
this
.
uploadBalanceSheet
(
'submitted'
)
},
100
);
},
100
);
})
})
)
}
}
>
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
div
style
=
{{
backgroundColor
:
'#354960'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete
<
/Typography
>
...
...
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
498a0b3e
This diff is collapsed.
Click to expand it.
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