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
b0268411
Commit
b0268411
authored
Sep 30, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deni-dev(pc)' into 'master'
++ See merge request
!403
parents
da660f5d
498a0b3e
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 @
b0268411
...
...
@@ -38,7 +38,7 @@ const create = (type = "") => {
'Content-Type'
:
'application/json'
,
},
// 40 second timeout...
timeout
:
6
0000
timeout
:
10
0000
})
break
;
default
:
...
...
src/container/BudgetTahunan.js
View file @
b0268411
...
...
@@ -268,7 +268,7 @@ export default class BudgetTahunan extends Component {
this
.
setState
({
submissionID
:
response
.
data
.
data
.
submission_id
,
isSubmit
:
false
,
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
},
()
=>
{
this
.
setState
({
loading
:
false
})
...
...
@@ -319,15 +319,15 @@ export default class BudgetTahunan extends Component {
}
approvalSubmission
(
type
)
{
this
.
setState
({
loading
:
true
})
this
.
setState
({
loading
:
true
})
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
,
"detail"
:
this
.
state
.
detailRevisiCheck
}
api
.
create
().
approvalSubmission
(
body
).
then
((
res
)
=>
{
console
.
log
(
res
)
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
checkApprover
()
})
})
...
...
@@ -462,12 +462,22 @@ export default class BudgetTahunan extends Component {
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
getCompanyActive
()
this
.
getSubmission
()
this
.
getReport
()
this
.
getReportAttachment
()
}
else
{
this
.
setState
({
loading
:
false
})
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
getSubmission
()
this
.
getReport
()
this
.
getReportAttachment
()
})
}
}
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 {
value
=
{
val
}
control
=
{
<
Checkbox
checked
=
{
this
.
state
.
detailRevisiCheck
.
findIndex
((
val
)
=>
val
.
report_id
==
tableMeta
.
rowData
[
0
])
==
-
1
?
false
:
true
}
onClick
=
{()
=>
handleCheckRevision
(
tableMeta
.
rowData
)}
/
>
checked
=
{
this
.
state
.
detailRevisiCheck
.
findIndex
((
val
)
=>
val
.
report_id
==
tableMeta
.
rowData
[
0
])
==
-
1
?
false
:
true
}
onClick
=
{()
=>
handleCheckRevision
(
tableMeta
.
rowData
)}
/
>
}
/
>
<
/div
>
...
...
@@ -675,7 +685,7 @@ export default class BudgetTahunan extends Component {
detailRevisiCheck
[
indexId
].
remarks
=
value
}
this
.
setState
({
dataTableRevision
,
detailRevisiCheck
})
this
.
setState
({
dataTableRevision
,
detailRevisiCheck
})
}
const
handleCheckRevision
=
(
value
)
=>
{
...
...
@@ -691,7 +701,7 @@ export default class BudgetTahunan extends Component {
}
else
{
detailRevisiCheck
.
splice
(
indexId
,
1
)
}
this
.
setState
({
detailRevisiCheck
})
this
.
setState
({
detailRevisiCheck
})
console
.
log
(
detailRevisiCheck
)
}
...
...
@@ -926,7 +936,7 @@ export default class BudgetTahunan extends Component {
borderColor
:
'transparent'
,
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'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Revision
<
/Typography
>
...
...
@@ -1214,7 +1224,7 @@ export default class BudgetTahunan extends Component {
<
div
className
=
"column-1"
style
=
{{
alignSelf
:
'center'
}}
>
<
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'
}}
>
<
span
style
=
{{
color
:
'#354960'
,
fontSize
:
11
}}
>
Cancel
<
/span
>
...
...
@@ -1224,7 +1234,7 @@ export default class BudgetTahunan extends Component {
<
div
className
=
"column-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
alignItems
:
'center'
}}
>
<
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'
}}
>
<
span
style
=
{{
color
:
'#fff'
,
fontSize
:
11
}}
>
Revision
<
/span
>
...
...
src/container/BudgetTahunan/BalanceSheet.js
View file @
b0268411
...
...
@@ -331,11 +331,11 @@ export default class BalanceSheet extends Component {
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
=>
{
if
(
item
[
23
].
length
>
0
)
{
console
.
log
(
'masuk'
)
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
})
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
,
editable
:
true
})
}
})
// console.log(this.state.dataTable);
...
...
@@ -2220,7 +2220,7 @@ export default class BalanceSheet extends Component {
onClick
=
{()
=>
{
this
.
setState
({
loading
:
true
},
()
=>
{
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
);
})
}}
...
...
@@ -2231,16 +2231,23 @@ export default class BalanceSheet extends Component {
<
/button
>
<
button
type
=
"button"
disabled
=
{
this
.
state
.
buttonError
}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
style
=
{{
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
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
setTimeout
(()
=>
{
this
.
uploadBalanceSheet
(
'draft'
)
},
100
);
})
)}
style
=
{{
marginRight
:
20
}}
}
>
<
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
>
...
...
@@ -2248,15 +2255,22 @@ export default class BalanceSheet extends Component {
<
/button
>
<
button
type
=
"button"
disabled
=
{
this
.
state
.
buttonError
}
onClick
=
{()
=>
this
.
setState
({
loading
:
true
},
()
=>
style
=
{{
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
.
setState
({
handleTekTekTek
:
1
},
()
=>
{
setTimeout
(()
=>
{
this
.
uploadBalanceSheet
(
'submitted'
)
},
100
);
})
)
}
}
>
<
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
>
...
...
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
b0268411
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