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
9e22657a
Commit
9e22657a
authored
Jun 27, 2021
by
d.arizona
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update banyak
parent
ceac806f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
61 additions
and
36 deletions
+61
-36
index.js
src/api/index.js
+2
-2
ProgressReport.js
src/container/Progress/ProgressReport.js
+32
-7
TableProgressReport.js
src/container/Progress/TableProgressReport.js
+25
-25
CustomTable.js
src/library/CustomTable.js
+2
-2
No files found.
src/api/index.js
View file @
9e22657a
...
...
@@ -474,10 +474,10 @@ const create = (type = "") => {
const
deleteDocument
=
(
id
)
=>
api
.
post
(
`document/delete_document/
${
id
}
`
)
// Monitoring
const
getMonitoringMB
=
(
body
)
=>
api
.
get
(
`transaction/monitoring/master_budget
/
${
body
.
year
}
`
)
const
getMonitoringMB
=
(
body
)
=>
api
.
get
(
`transaction/monitoring/master_budget
?year=
${
body
.
year
}
`
)
const
getMonitoringMR
=
(
body
)
=>
api
.
get
(
`transaction/monitoring/monthly_report/
${
body
.
year
}
/
${
body
.
month
}
`
)
const
getMonitoringRO
=
(
body
)
=>
api
.
get
(
`transaction/monitoring/rolling_outlook/
${
body
.
year
}
/
${
body
.
quarter
}
`
)
const
getMonitoringOLPA
=
(
body
)
=>
api
.
get
(
`transaction/monitoring/outlook_pa
/
${
body
.
year
}
`
)
const
getMonitoringOLPA
=
(
body
)
=>
api
.
get
(
`transaction/monitoring/outlook_pa
?year=
${
body
.
year
}
`
)
// ------
// STEP 3
// ------
...
...
src/container/Progress/ProgressReport.js
View file @
9e22657a
...
...
@@ -169,13 +169,23 @@ class ReportProgress extends Component {
if
(
response
.
data
.
status
===
"success"
)
{
let
data
=
response
.
data
.
data
data
.
map
((
item
,
index
)
=>
{
let
report
=
item
.
report
report
.
push
({
report_name
:
'Operating Indicator'
,
status_report
:
item
.
operating_indicator
},
{
report_name
:
'Submission Status'
,
status_report
:
item
.
submission_status
})
let
report
=
[]
item
.
report
.
map
((
items
,
indexs
)
=>
{
if
(
!
String
(
items
.
report_name
).
includes
(
'Indicator'
)
&&
!
String
(
items
.
report_name
).
includes
(
'OLPA'
))
{
if
(
String
(
items
.
report_name
).
includes
(
'Fixed'
))
{
report
.
push
({...
items
,
status_report
:
(
items
.
report_date
==
null
?
items
.
status_report
:
items
.
status_report
+
' - '
+
items
.
report_date
),
report_name
:
'Fixed Assets Movement'
})
}
else
{
report
.
push
({...
items
,
status_report
:
(
items
.
report_date
==
null
?
items
.
status_report
:
items
.
status_report
+
' - '
+
items
.
report_date
)})
}
}
})
report
.
push
({
report_name
:
'Operating Indicator'
,
status_report
:
item
.
operatingIndicator
},
{
report_name
:
'Submission Status'
,
status_report
:
(
item
.
submissionStatusDate
==
null
?
item
.
submissionStatus
:
item
.
submissionStatus
+
' - '
+
item
.
submissionStatusDate
)})
dataTable
.
push
([
item
.
company
_n
ame
,
item
.
company
N
ame
,
report
])
})
console
.
log
(
dataTable
)
this
.
setState
({
dataTable
,
loading
:
false
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
...
...
@@ -265,12 +275,27 @@ class ReportProgress extends Component {
if
(
response
.
data
.
status
===
"success"
)
{
let
data
=
response
.
data
.
data
data
.
map
((
item
,
index
)
=>
{
let
report
=
item
.
report
report
.
push
({
report_name
:
'Operating Indicator'
,
status_report
:
item
.
operating_indicator
},
{
report_name
:
'OLPA Status'
,
status_report
:
item
.
olpa_status
})
let
report
=
[]
item
.
report
.
map
((
items
,
indexs
)
=>
{
if
(
!
String
(
items
.
report_name
).
includes
(
'Indicator'
)
&&
!
String
(
items
.
report_name
).
includes
(
'OLPA'
))
{
if
(
String
(
items
.
report_name
).
includes
(
'Fixed'
))
{
report
.
push
({...
items
,
status_report
:
(
items
.
report_date
==
null
?
items
.
status_report
:
items
.
status_report
+
' - '
+
items
.
report_date
),
report_name
:
'Fixed Assets Movement'
})
}
else
{
report
.
push
({...
items
,
status_report
:
(
items
.
report_date
==
null
?
items
.
status_report
:
items
.
status_report
+
' - '
+
items
.
report_date
)})
}
}
})
report
.
push
({
report_name
:
'Operating Indicator'
,
status_report
:
item
.
operatingIndicator
},
{
report_name
:
'OLPA Status'
,
status_report
:
(
item
.
submissionStatusDate
==
null
?
item
.
submissionStatus
:
item
.
submissionStatus
+
' - '
+
item
.
submissionStatusDate
)})
dataTable
.
push
([
item
.
company
_n
ame
,
item
.
company
N
ame
,
report
])
// let report = item.report
// report.push({report_name: 'Operating Indicator', status_report: item.operating_indicator}, {report_name: 'OLPA Status', status_report: item.olpa_status})
// dataTable.push([
// item.company_name,
// report
// ])
})
this
.
setState
({
dataTable
,
loading
:
false
})
}
else
{
...
...
@@ -401,7 +426,7 @@ class ReportProgress extends Component {
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Month"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
value
=
{
this
.
state
.
month
}
/>
}
{
this
.
state
.
reportType
!=
null
&&
this
.
state
.
reportType
.
value
==
3
&&
<
Autocomplete
{
this
.
state
.
reportType
!=
null
&&
this
.
state
.
reportType
.
value
==
2
&&
<
Autocomplete
{...
this
.
state
.
listQuarter
}
id
=
"quarter"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
quarter
:
newInputValue
,
loading
:
true
},
()
=>
{
...
...
src/container/Progress/TableProgressReport.js
View file @
9e22657a
...
...
@@ -57,10 +57,10 @@ export default class TableProgressReport extends Component {
name
:
`INPUT MASTER BUDGET`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style
2
,
color
:
'#fff'
,
backgroundColor
:
'#1c71b8'
,
fontSize
:
13
,
fontWeight
:
1
,
borderRight
:
"1px solid rgb(255, 255, 255)"
,
padding
:
0
}}
>
<
th
style
=
{{
...
style
,
top
:
0
,
zIndex
:
103
,
color
:
'#fff'
,
backgroundColor
:
'#1c71b8'
,
fontSize
:
13
,
fontWeight
:
1
,
borderRight
:
"1px solid rgb(255, 255, 255)"
,
padding
:
0
}}
>
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
backgroundColor
:
'#37b5e6'
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
height
:
40
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
className
=
"grid grid-2x"
>
<
div
className
=
"column-1 grid grid-4x"
style
=
{{
...
style2
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1 grid grid-4x"
style
=
{{
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#1c71b8'
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
height
:
45
}}
>
<
span
>
{
"Profit Loss"
}
<
/span
>
<
/div
>
...
...
@@ -74,7 +74,7 @@ export default class TableProgressReport extends Component {
<
span
>
{
"Fixed Assets Movement"
}
<
/span
>
<
/div
>
<
/div
>
<
div
className
=
"column-2 grid grid-4x"
style
=
{{
...
style2
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-2 grid grid-4x"
style
=
{{
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#1c71b8'
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
height
:
45
}}
>
<
span
>
{
"Cash Flow"
}
<
/span
>
<
/div
>
...
...
@@ -95,32 +95,32 @@ export default class TableProgressReport extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
className
=
"grid grid-2x"
>
<
div
className
=
"column-1 grid grid-4x"
style
=
{{
...
style2
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1 grid grid-4x"
style
=
{{
...
style2
,
fontSize
:
12
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
}}
>
<
span
style
=
{{
color
:
'blue'
}}
>
{
"Master Budget (MB)"
}
<
/span
>
<
div
style
=
{{
textAlign
:
'center'
}}
>
{
handleValue
(
tableMeta
,
'Profit Loss'
)}
<
/div
>
<
/div
>
<
div
className
=
"column-2"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
}}
>
<
span
>
{
"Rolling Budget (RB)"
}
<
/span
>
<
div
style
=
{{
textAlign
:
'center'
}}
>
{
handleValue
(
tableMeta
,
'Tax Planning'
)}
<
/div
>
<
/div
>
<
div
className
=
"column-3"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
}}
>
<
span
>
{
"Rolling Budget (RB)"
}
<
/span
>
<
div
style
=
{{
textAlign
:
'center'
}}
>
{
handleValue
(
tableMeta
,
'Balance Sheet'
)}
<
/div
>
<
/div
>
<
div
className
=
"column-4"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
}}
>
<
span
>
{
"Actual"
}
<
/span
>
<
div
style
=
{{
textAlign
:
'center'
}}
>
{
handleValue
(
tableMeta
,
'Fixed Assets Movement'
)}
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"column-2 grid grid-
3x"
style
=
{{
...
style2
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-2 grid grid-
4x"
style
=
{{
...
style2
,
fontSize
:
12
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
}}
>
<
span
>
{
"Master Budget (MB)"
}
<
/span
>
<
div
style
=
{{
textAlign
:
'center'
}}
>
{
handleValue
(
tableMeta
,
'Cash Flow'
)}
<
/div
>
<
/div
>
<
div
className
=
"column-2"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
}}
>
<
span
>
{
"Master Budget (MB)"
}
<
/span
>
<
div
style
=
{{
textAlign
:
'center'
}}
>
{
handleValue
(
tableMeta
,
'CAT'
)}
<
/div
>
<
/div
>
<
div
className
=
"column-3"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
}}
>
<
span
>
{
"Rolling Budget (RB)"
}
<
/span
>
<
div
style
=
{{
textAlign
:
'center'
}}
>
{
handleValue
(
tableMeta
,
'Submission Status'
)}
<
/div
>
<
/div
>
<
div
className
=
"column-4"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
}}
>
<
span
>
{
"Actual"
}
<
/span
>
<
div
style
=
{{
textAlign
:
'center'
}}
>
{
handleValue
(
tableMeta
,
'Operating Indicator'
)}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
@@ -337,10 +337,10 @@ export default class TableProgressReport extends Component {
name
:
`INPUT OUTLOOK PA`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style
2
,
color
:
'#fff'
,
backgroundColor
:
'#1c71b8'
,
fontSize
:
13
,
fontWeight
:
1
,
borderRight
:
"1px solid rgb(255, 255, 255)"
,
padding
:
0
}}
>
<
th
style
=
{{
...
style
,
top
:
0
,
zIndex
:
103
,
color
:
'#fff'
,
backgroundColor
:
'#1c71b8'
,
fontSize
:
13
,
fontWeight
:
1
,
borderRight
:
"1px solid rgb(255, 255, 255)"
,
padding
:
0
}}
>
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
backgroundColor
:
'#37b5e6'
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
height
:
40
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
className
=
"grid grid-2x"
>
<
div
className
=
"column-1 grid grid-4x"
style
=
{{
...
style2
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1 grid grid-4x"
style
=
{{
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#1c71b8'
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
height
:
45
}}
>
<
span
>
{
"Profit Loss"
}
<
/span
>
<
/div
>
...
...
@@ -354,7 +354,7 @@ export default class TableProgressReport extends Component {
<
span
>
{
"Cash Flow"
}
<
/span
>
<
/div
>
<
/div
>
<
div
className
=
"column-2 grid grid-3x"
style
=
{{
...
style2
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-2 grid grid-3x"
style
=
{{
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#1c71b8'
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
height
:
45
}}
>
<
span
>
{
"CAT"
}
<
/span
>
<
/div
>
...
...
@@ -372,29 +372,29 @@ export default class TableProgressReport extends Component {
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
className
=
"grid grid-2x"
>
<
div
className
=
"column-1 grid grid-4x"
style
=
{{
...
style2
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1 grid grid-4x"
style
=
{{
...
style2
,
fontSize
:
12
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
}}
>
<
span
style
=
{{
color
:
'blue'
}}
>
{
"Master Budget (MB)"
}
<
/span
>
<
div
style
=
{{
textAlign
:
'center'
}}
>
{
handleValue
(
tableMeta
,
'Profit Loss'
)}
<
/div
>
<
/div
>
<
div
className
=
"column-2"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
}}
>
<
span
>
{
"Rolling Budget (RB)"
}
<
/span
>
<
div
style
=
{{
textAlign
:
'center'
}}
>
{
handleValue
(
tableMeta
,
'Tax Planning'
)}
<
/div
>
<
/div
>
<
div
className
=
"column-3"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
}}
>
<
span
>
{
"Actual"
}
<
/span
>
<
div
style
=
{{
textAlign
:
'center'
}}
>
{
handleValue
(
tableMeta
,
'Balance Sheet'
)}
<
/div
>
<
/div
>
<
div
className
=
"column-4"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
}}
>
<
span
>
{
"Actual"
}
<
/span
>
<
div
style
=
{{
textAlign
:
'center'
}}
>
{
handleValue
(
tableMeta
,
'Cash Flow'
)}
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"column-2 grid grid-3x"
style
=
{{
...
style2
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-2 grid grid-3x"
style
=
{{
...
style2
,
fontSize
:
12
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
}}
>
<
span
>
{
"Master Budget (MB)"
}
<
/span
>
<
div
style
=
{{
textAlign
:
'center'
}}
>
{
handleValue
(
tableMeta
,
'CAT'
)}
<
/div
>
<
/div
>
<
div
className
=
"column-2"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
}}
>
<
span
>
{
"Rolling Budget (RB)"
}
<
/span
>
<
div
style
=
{{
textAlign
:
'center'
}}
>
{
handleValue
(
tableMeta
,
'OLPA Status'
)}
<
/div
>
<
/div
>
<
div
className
=
"column-3"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
}}
>
<
span
>
{
"Actual"
}
<
/span
>
<
div
style
=
{{
textAlign
:
'center'
}}
>
{
handleValue
(
tableMeta
,
'Operating Indicator'
)}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
src/library/CustomTable.js
View file @
9e22657a
...
...
@@ -595,8 +595,8 @@ export function customTable4() {
root
:
{
display
:
'table-cell'
,
padding
:
7
,
paddingLeft
:
25
,
paddingRight
:
25
,
paddingLeft
:
0
,
paddingRight
:
0
,
fontSize
:
'0.875rem'
,
textAlign
:
'left'
,
fontFamily
:
"Roboto, Helvetica, Arial, sans-serif"
,
...
...
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