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
7991b197
Commit
7991b197
authored
Sep 29, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cek
parent
a695d679
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
142 additions
and
31 deletions
+142
-31
index.js
src/api/index.js
+3
-1
BudgetTahunan.js
src/container/BudgetTahunan.js
+44
-13
BalanceSheet.js
src/container/BudgetTahunan/BalanceSheet.js
+2
-1
BalanceSheetMR.js
src/container/MonthlyReport/BalanceSheetMR.js
+92
-15
Profile.js
src/container/Profile.js
+1
-1
No files found.
src/api/index.js
View file @
7991b197
...
@@ -200,6 +200,7 @@ const create = (type = "") => {
...
@@ -200,6 +200,7 @@ const create = (type = "") => {
const
getMonthTransaction
=
()
=>
api
.
get
(
'transaction/get_default_month'
)
const
getMonthTransaction
=
()
=>
api
.
get
(
'transaction/get_default_month'
)
const
countingFormula
=
(
body
)
=>
api
.
post
(
'transaction/counting_formula'
,
body
)
const
countingFormula
=
(
body
)
=>
api
.
post
(
'transaction/counting_formula'
,
body
)
const
submitMasterBudget
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/submit_master_budget'
,
body
)
const
submitMasterBudget
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/submit_master_budget'
,
body
)
const
checkIsSubmit
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/is_can_submit'
,
body
)
const
getOpetratingIndID
=
(
body
)
=>
api
.
post
(
'transaction/get_operating_indicator_id'
,
body
)
const
getOpetratingIndID
=
(
body
)
=>
api
.
post
(
'transaction/get_operating_indicator_id'
,
body
)
const
getAllOperatingInd
=
(
body
)
=>
api
.
post
(
'transaction/get_all_operating_indicator_report'
,
body
)
const
getAllOperatingInd
=
(
body
)
=>
api
.
post
(
'transaction/get_all_operating_indicator_report'
,
body
)
...
@@ -354,7 +355,8 @@ const create = (type = "") => {
...
@@ -354,7 +355,8 @@ const create = (type = "") => {
uploadOperatingInd
,
uploadOperatingInd
,
getLastestUpdateMB
,
getLastestUpdateMB
,
countingFormula
,
countingFormula
,
submitMasterBudget
submitMasterBudget
,
checkIsSubmit
}
}
}
}
...
...
src/container/BudgetTahunan.js
View file @
7991b197
...
@@ -17,7 +17,6 @@ import { format } from 'date-fns';
...
@@ -17,7 +17,6 @@ import { format } from 'date-fns';
import
Constant
from
'../library/Constant'
;
import
Constant
from
'../library/Constant'
;
import
PropagateLoader
from
"react-spinners/PropagateLoader"
import
PropagateLoader
from
"react-spinners/PropagateLoader"
import
CashFlow
from
'./BudgetTahunan/CashFlow'
;
import
CashFlow
from
'./BudgetTahunan/CashFlow'
;
import
{
validate
}
from
'@material-ui/pickers'
;
var
ct
=
require
(
"../library/CustomTable"
);
var
ct
=
require
(
"../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable
());
...
@@ -49,7 +48,8 @@ export default class BudgetTahunan extends Component {
...
@@ -49,7 +48,8 @@ export default class BudgetTahunan extends Component {
alert
:
false
,
alert
:
false
,
tipeAlert
:
''
,
tipeAlert
:
''
,
messageAlert
:
''
,
messageAlert
:
''
,
submissionID
:
null
submissionID
:
null
,
isSubmit
:
false
}
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
}
...
@@ -119,7 +119,7 @@ export default class BudgetTahunan extends Component {
...
@@ -119,7 +119,7 @@ export default class BudgetTahunan extends Component {
options
:
companyData
,
options
:
companyData
,
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
company_name
),
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
company_name
),
};
};
this
.
setState
({
listCompany
:
defaultProps
,
company
:
companyData
[
0
]
},
()
=>
{
this
.
setState
({
listCompany
:
defaultProps
,
company
:
companyData
[
0
]
,
isSubmit
:
false
},
()
=>
{
this
.
getPeriode
()
this
.
getPeriode
()
})
})
}
else
{
}
else
{
...
@@ -199,9 +199,12 @@ export default class BudgetTahunan extends Component {
...
@@ -199,9 +199,12 @@ export default class BudgetTahunan extends Component {
"periode"
:
this
.
state
.
periode
.
periode
"periode"
:
this
.
state
.
periode
.
periode
}
}
api
.
create
().
getSubmission
(
payload
).
then
(
response
=>
{
api
.
create
().
getSubmission
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
)
{
if
(
response
)
{
if
(
response
.
data
.
data
)
{
if
(
response
.
data
.
data
)
{
this
.
setState
({
submissionID
:
response
.
data
.
data
.
submission_id
})
this
.
setState
({
submissionID
:
response
.
data
.
data
.
submission_id
},
()
=>
{
this
.
checkIsSubmit
()
})
}
else
{
}
else
{
this
.
setState
({
submissionID
:
null
})
this
.
setState
({
submissionID
:
null
})
}
}
...
@@ -209,6 +212,19 @@ export default class BudgetTahunan extends Component {
...
@@ -209,6 +212,19 @@ export default class BudgetTahunan extends Component {
})
})
}
}
checkIsSubmit
()
{
let
body
=
{
"submission_id"
:
this
.
state
.
submissionID
}
api
.
create
().
checkIsSubmit
(
body
).
then
(
response
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
isSubmit
:
true
})
}
}
})
}
clickDetail
(
item
,
id
,
revision
,
status
)
{
clickDetail
(
item
,
id
,
revision
,
status
)
{
console
.
log
(
item
);
console
.
log
(
item
);
this
.
setState
({
this
.
setState
({
...
@@ -358,11 +374,17 @@ export default class BudgetTahunan extends Component {
...
@@ -358,11 +374,17 @@ export default class BudgetTahunan extends Component {
array
.
push
(
item
[
3
])
array
.
push
(
item
[
3
])
}
}
})
})
if
(
array
.
includes
(
"not-yet"
||
"draft"
))
{
// if (array.includes("not-yet" || "draft")) {
console
.
log
(
'gagal'
);
// console.log('gagal');
}
else
{
// } else {
console
.
log
(
'masuk'
);
// console.log('masuk');
// }
let
body
=
{
submission_id
:
this
.
state
.
submissionID
}
}
api
.
create
().
submitMasterBudget
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
})
}
}
render
()
{
render
()
{
...
@@ -409,10 +431,14 @@ export default class BudgetTahunan extends Component {
...
@@ -409,10 +431,14 @@ export default class BudgetTahunan extends Component {
{
val
===
"submitted"
||
val
===
"approved"
?
{
val
===
"submitted"
||
val
===
"approved"
?
<
img
src
=
{
Images
.
ceklis
}
style
=
{{
width
:
31
,
height
:
24
}}
/>
:
<
img
src
=
{
Images
.
ceklis
}
style
=
{{
width
:
31
,
height
:
24
}}
/>
:
val
===
"draft"
?
val
===
"draft"
?
<
img
src
=
{
Images
.
cross
}
style
=
{{
width
:
31
,
height
:
24
}}
/
>
:
<
span
>
Draft
<
/span
>
:
val
===
"revision"
?
val
===
"revision"
?
<
span
>
Revisi
<
/span>
:
<
span
>
Revisi
<
/span>
:
null
val
===
"approval_proccess"
?
<
span
>
Approval
Proccess
<
/span>
:
val
===
"not-yet"
?
null
:
<
img
src
=
{
Images
.
cross
}
style
=
{{
width
:
31
,
height
:
24
}}
/
>
}
}
<
/div
>
<
/div
>
);
);
...
@@ -432,7 +458,9 @@ export default class BudgetTahunan extends Component {
...
@@ -432,7 +458,9 @@ export default class BudgetTahunan extends Component {
borderColor
:
'transparent'
borderColor
:
'transparent'
}}
}}
onClick
=
{()
=>
onClick
=
{()
=>
tableMeta
.
rowData
[
5
]
?
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
:
null
// tableMeta.rowData[5] ?
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
// : null
}
}
>
>
<
Typography
style
=
{{
color
:
tableMeta
.
rowData
[
5
]
?
'#5198ea'
:
'GrayText'
,
fontSize
:
12
,
}}
>
Detail
<
/Typography
>
<
Typography
style
=
{{
color
:
tableMeta
.
rowData
[
5
]
?
'#5198ea'
:
'GrayText'
,
fontSize
:
12
,
}}
>
Detail
<
/Typography
>
...
@@ -601,11 +629,11 @@ export default class BudgetTahunan extends Component {
...
@@ -601,11 +629,11 @@ export default class BudgetTahunan extends Component {
<
button
<
button
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
'pointe
r'
,
cursor
:
this
.
state
.
isSubmit
?
'pointer'
:
'curso
r'
,
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
outline
:
'none'
,
}}
}}
onClick
=
{()
=>
this
.
validate
()
}
onClick
=
{()
=>
this
.
state
.
isSubmit
?
this
.
validate
()
:
null
}
>
>
<
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'
}}
>
Submit
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Submit
<
/Typography
>
...
@@ -680,6 +708,7 @@ export default class BudgetTahunan extends Component {
...
@@ -680,6 +708,7 @@ export default class BudgetTahunan extends Component {
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visiblePL
:
false
,
visibleBudgetTahunan
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visiblePL
:
false
,
visibleBudgetTahunan
:
true
})}
getReport
=
{
this
.
getReport
.
bind
(
this
)}
getReport
=
{
this
.
getReport
.
bind
(
this
)}
status
=
{
this
.
state
.
status
}
/
>
/
>
)}
)}
...
@@ -696,6 +725,7 @@ export default class BudgetTahunan extends Component {
...
@@ -696,6 +725,7 @@ export default class BudgetTahunan extends Component {
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleTP
:
false
,
visibleBudgetTahunan
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleTP
:
false
,
visibleBudgetTahunan
:
true
})}
getReport
=
{
this
.
getCompanyActive
.
bind
(
this
)}
getReport
=
{
this
.
getCompanyActive
.
bind
(
this
)}
status
=
{
this
.
state
.
status
}
/
>
/
>
)}
)}
{
this
.
state
.
visibleFAM
&&
(
{
this
.
state
.
visibleFAM
&&
(
...
@@ -711,6 +741,7 @@ export default class BudgetTahunan extends Component {
...
@@ -711,6 +741,7 @@ export default class BudgetTahunan extends Component {
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
saveToMasterBudget
=
{
this
.
saveToMasterBudget
.
bind
(
this
)}
onClickClose
=
{()
=>
this
.
setState
({
visibleFAM
:
false
,
visibleBudgetTahunan
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleFAM
:
false
,
visibleBudgetTahunan
:
true
})}
getReport
=
{
this
.
getCompanyActive
.
bind
(
this
)}
getReport
=
{
this
.
getCompanyActive
.
bind
(
this
)}
status
=
{
this
.
state
.
status
}
/
>
/
>
)}
)}
{
this
.
state
.
visibleCAT
&&
(
{
this
.
state
.
visibleCAT
&&
(
...
...
src/container/BudgetTahunan/BalanceSheet.js
View file @
7991b197
...
@@ -612,7 +612,8 @@ export default class BalanceSheet extends Component {
...
@@ -612,7 +612,8 @@ export default class BalanceSheet extends Component {
<
div
style
=
{{
textAlign
:
'right'
}}
>
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
4
?
{
tableMeta
.
rowData
[
0
]
===
4
?
null
null
:
:
tableMeta
.
rowData
[
0
]
===
1
?
null
:
<
div
style
=
{{
flex
:
1
}}
>
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
<
FormControlLabel
style
=
{{
margin
:
0
}}
style
=
{{
margin
:
0
}}
...
...
src/container/MonthlyReport/BalanceSheetMR.js
View file @
7991b197
import
{
createMuiTheme
,
MuiThemeProvider
,
Paper
,
Typography
}
from
'@material-ui/core'
import
{
createMuiTheme
,
MuiThemeProvider
,
Paper
,
T
ableCell
,
T
ypography
}
from
'@material-ui/core'
import
MUIDataTable
from
'mui-datatables'
;
import
MUIDataTable
from
'mui-datatables'
;
import
React
,
{
Component
}
from
'react'
import
React
,
{
Component
}
from
'react'
import
ReactTooltip
from
'react-tooltip'
;
import
ReactTooltip
from
'react-tooltip'
;
...
@@ -25,10 +25,33 @@ const style2 = {
...
@@ -25,10 +25,33 @@ const style2 = {
export
default
class
BalanceSheetMR
extends
Component
{
export
default
class
BalanceSheetMR
extends
Component
{
render
()
{
render
()
{
let
columns
=
[
let
columns
=
[
"Account"
,
{
name
:
"Account"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
key
=
{
columnMeta
.
index
}
style
=
{{
...
style
,
top
:
0
,
zIndex
:
102
,
backgroundColor
:
'#1c71b8'
,
width
:
300
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'left'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style
}),
customBodyRender
:
(
val
,
tableMeta
)
=>
{
return
(
<
div
style
=
{{
width
:
300
}}
>
{
val
}
<
/div
>
)
}
}
},
{
{
name
:
"Rolling Outlook (FY2021)"
,
name
:
"Rolling Outlook (FY2021)"
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#07a7d0'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
...
@@ -42,19 +65,19 @@ export default class BalanceSheetMR extends Component {
...
@@ -42,19 +65,19 @@ export default class BalanceSheetMR extends Component {
name
:
`Month To Date (MTD)`
,
name
:
`Month To Date (MTD)`
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff
'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
,
padding
:
0
}}
>
<
th
style
=
{{
...
style2
,
color
:
'#fff'
,
backgroundColor
:
'#07a7d0
'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
,
padding
:
0
}}
>
{
/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
{
/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> */
}
</TableCell> */
}
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
textAlign
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
backgroundColor
:
'#1c71b8'
,
textAlign
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
className
=
"grid grid-3x"
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"grid grid-3x"
style
=
{{
...
style2
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
}}
>
<
span
>
{
"Master Budget (MB)"
}
<
/span
>
<
span
>
{
"Master Budget (MB)"
}
<
/span
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
}}
>
<
div
className
=
"column-2"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
}}
>
<
span
>
{
"Rolling Budget (RB)"
}
<
/span
>
<
span
>
{
"Rolling Budget (RB)"
}
<
/span
>
<
/div
>
<
/div
>
<
div
className
=
"column-3"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
}}
>
<
div
className
=
"column-3"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
backgroundColor
:
'#37b5e6'
}}
>
<
span
>
{
"Actual"
}
<
/span
>
<
span
>
{
"Actual"
}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
@@ -89,6 +112,12 @@ export default class BalanceSheetMR extends Component {
...
@@ -89,6 +112,12 @@ export default class BalanceSheetMR extends Component {
{
{
name
:
"Actual Previous Month"
,
name
:
"Actual Previous Month"
,
options
:
{
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'white'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
return
(
return
(
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
...
@@ -105,20 +134,20 @@ export default class BalanceSheetMR extends Component {
...
@@ -105,20 +134,20 @@ export default class BalanceSheetMR extends Component {
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
}}
>
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
textAlign
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
textAlign
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
className
=
"grid grid-3x"
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"grid grid-3x"
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
border
:
'1px #fff solid'
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
border
:
'1px #fff solid'
,
backgroundColor
:
'#37b5e6'
}}
>
<
div
style
=
{{
borderBottom
:
'1px #fff solid'
}}
>
<
div
style
=
{{
borderBottom
:
'1px #fff solid'
,
backgroundColor
:
'#37b5e6'
}}
>
<
span
>
{
"Act vs Previous Month"
}
<
/span
>
<
span
>
{
"Act vs Previous Month"
}
<
/span
>
<
/div
>
<
/div
>
<
div
className
=
"grid grid-2x"
>
<
div
className
=
"grid grid-2x"
>
<
div
className
=
"column-1"
style
=
{{
borderRight
:
'1px #fff solid'
}}
>
<
div
className
=
"column-1"
style
=
{{
borderRight
:
'1px #fff solid'
,
backgroundColor
:
'#37b5e6'
}}
>
<
span
>
{
"Amount"
}
<
/span
>
<
span
>
{
"Amount"
}
<
/span
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
style
=
{{
borderLeft
:
'1px #fff solid'
}}
>
<
div
className
=
"column-2"
style
=
{{
borderLeft
:
'1px #fff solid'
,
backgroundColor
:
'#37b5e6'
}}
>
<
span
>
{
"%"
}
<
/span
>
<
span
>
{
"%"
}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"column-2"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
border
:
'1px #fff solid'
}}
>
<
div
className
=
"column-2"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
border
:
'1px #fff solid'
,
backgroundColor
:
'#07a7d0'
}}
>
<
div
style
=
{{
borderBottom
:
'1px #fff solid'
}}
>
<
div
style
=
{{
borderBottom
:
'1px #fff solid'
}}
>
<
span
>
{
"Act vs MB"
}
<
/span
>
<
span
>
{
"Act vs MB"
}
<
/span
>
<
/div
>
<
/div
>
...
@@ -131,7 +160,7 @@ export default class BalanceSheetMR extends Component {
...
@@ -131,7 +160,7 @@ export default class BalanceSheetMR extends Component {
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
"column-3"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
border
:
'1px #fff solid'
}}
>
<
div
className
=
"column-3"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
border
:
'1px #fff solid'
,
backgroundColor
:
'#07a7d0'
}}
>
<
div
style
=
{{
borderBottom
:
'1px #fff solid'
}}
>
<
div
style
=
{{
borderBottom
:
'1px #fff solid'
}}
>
<
span
>
{
"Act vs RB"
}
<
/span
>
<
span
>
{
"Act vs RB"
}
<
/span
>
<
/div
>
<
/div
>
...
@@ -200,9 +229,57 @@ export default class BalanceSheetMR extends Component {
...
@@ -200,9 +229,57 @@ export default class BalanceSheetMR extends Component {
}
}
}
}
},
},
{
name
:
`MTD Explanation`
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
th
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
,
padding
:
0
}}
>
{
/* <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96 }}>
<Typography style={{ color: 'white', fontSize: 12, fontWeight: 'bold', textAlign: 'center' }}>{columnMeta.name}</Typography>
</TableCell> */
}
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
textAlign
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
className
=
"grid grid-3x"
style
=
{{
...
style2
,
backgroundColor
:
'#1c71b8'
,
color
:
'#fff'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
position
:
"sticky"
}}
>
<
div
className
=
"column-1"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
}}
>
<
span
>
{
"vs Prev Month"
}
<
/span
>
<
/div
>
<
div
className
=
"column-2"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
}}
>
<
span
>
{
"vs MB"
}
<
/span
>
<
/div
>
<
div
className
=
"column-3"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
}}
>
<
span
>
{
"vs RB"
}
<
/span
>
<
/div
>
<
/div
>
<
/th
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
val
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
>
<
div
className
=
"grid grid-3x content-center"
>
<
div
className
=
"col-1"
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
{
val
.
a
}
<
/div
>
<
/div
>
<
div
className
=
"col-2"
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
{
val
.
b
}
<
/div
>
<
/div
>
<
div
className
=
"col-3"
>
<
div
style
=
{{
textAlign
:
'right'
,
width
:
90
}}
>
{
val
.
c
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
)
}
}
},
]
]
let
data
=
[
let
data
=
[
[
"Total Assets"
,
"1"
,
{
a
:
"2"
,
b
:
"3"
,
c
:
"4"
},
"5"
,
{
a
:
"6"
,
b
:
"7"
,
c
:
"8"
,
d
:
"9"
,
e
:
"10"
,
f
:
"11"
}],
[
"Total Assets"
,
"1"
,
{
a
:
"2"
,
b
:
"3"
,
c
:
"4"
},
"5"
,
{
a
:
"6"
,
b
:
"7"
,
c
:
"8"
,
d
:
"9"
,
e
:
"10"
,
f
:
"11"
}
,
{
a
:
"12"
,
b
:
"13"
,
c
:
"14"
}
],
[
"Total Assets"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
,
"8"
,
"9"
,
"10"
,
"11"
]
[
"Total Assets"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
,
"8"
,
"9"
,
"10"
,
"11"
]
]
]
return
(
return
(
...
...
src/container/Profile.js
View file @
7991b197
...
@@ -181,7 +181,7 @@ export default class Profile extends Component {
...
@@ -181,7 +181,7 @@ export default class Profile extends Component {
getPerusahaan
()
{
getPerusahaan
()
{
api
.
create
().
getPerusahaanHierarki
().
then
((
response
)
=>
{
api
.
create
().
getPerusahaanHierarki
().
then
((
response
)
=>
{
//
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'
)
{
...
...
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