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
a536f64a
Commit
a536f64a
authored
Sep 29, 2020
by
EKSAD
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into riri
parents
8d7c9263
f7ad9481
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
195 additions
and
38 deletions
+195
-38
index.js
src/api/index.js
+6
-2
BudgetTahunan.js
src/container/BudgetTahunan.js
+94
-19
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 @
a536f64a
...
@@ -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
getIdDeleteFromExcel
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/delete_from_excel'
,
body
)
const
getIdDeleteFromExcel
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/delete_from_excel'
,
body
)
const
getOpetratingIndID
=
(
body
)
=>
api
.
post
(
'transaction/get_operating_indicator_id'
,
body
)
const
getOpetratingIndID
=
(
body
)
=>
api
.
post
(
'transaction/get_operating_indicator_id'
,
body
)
...
@@ -208,7 +209,8 @@ const create = (type = "") => {
...
@@ -208,7 +209,8 @@ const create = (type = "") => {
const
createOpetaingInd
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/create_submission_report'
,
body
)
const
createOpetaingInd
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/create_submission_report'
,
body
)
const
checkUploadOperatingInd
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/check_import'
,
body
)
const
checkUploadOperatingInd
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/check_import'
,
body
)
const
uploadOperatingInd
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/import_operating_indicator'
,
body
)
const
uploadOperatingInd
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/import_operating_indicator'
,
body
)
const
getDashboard
=
(
body
)
=>
api
.
get
(
'transaction/master_budget/get_dashboard'
)
const
getDashboard
=
(
body
)
=>
api
.
get
(
'transaction/get_dashboard'
)
const
historyApproval
=
(
body
)
=>
api
.
post
(
'transaction/master_budget/history_approval'
,
body
)
//Template
//Template
const
downloadTemplate
=
(
fileName
,
fileType
)
=>
api
.
get
(
`attachment/download_file?fileName=
${
fileName
}
&&fileType=
${
fileType
}
`
)
const
downloadTemplate
=
(
fileName
,
fileType
)
=>
api
.
get
(
`attachment/download_file?fileName=
${
fileName
}
&&fileType=
${
fileType
}
`
)
...
@@ -356,8 +358,10 @@ const create = (type = "") => {
...
@@ -356,8 +358,10 @@ const create = (type = "") => {
getLastestUpdateMB
,
getLastestUpdateMB
,
countingFormula
,
countingFormula
,
submitMasterBudget
,
submitMasterBudget
,
checkIsSubmit
,
getIdDeleteFromExcel
,
getIdDeleteFromExcel
,
getDashboard
getDashboard
,
historyApproval
}
}
}
}
...
...
src/container/BudgetTahunan.js
View file @
a536f64a
...
@@ -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,9 @@ export default class BudgetTahunan extends Component {
...
@@ -49,7 +48,9 @@ export default class BudgetTahunan extends Component {
alert
:
false
,
alert
:
false
,
tipeAlert
:
''
,
tipeAlert
:
''
,
messageAlert
:
''
,
messageAlert
:
''
,
submissionID
:
null
submissionID
:
null
,
isSubmit
:
false
,
visibleTableHistory
:
false
}
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
}
...
@@ -110,12 +111,12 @@ export default class BudgetTahunan extends Component {
...
@@ -110,12 +111,12 @@ export default class BudgetTahunan extends Component {
if
(
response
.
data
)
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
'success'
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
userCompany
:
response
.
data
.
data
.
company
},
()
=>
{
this
.
setState
({
userCompany
:
response
.
data
.
data
.
company
},
()
=>
{
this
.
getCompanyActive
()
this
.
getCompanyActive
()
})
})
}
}
}
}
}
}
})
})
}
}
...
@@ -130,20 +131,20 @@ export default class BudgetTahunan extends Component {
...
@@ -130,20 +131,20 @@ export default class BudgetTahunan extends Component {
company_name
:
item
.
company_name
,
company_name
:
item
.
company_name
,
}
}
})
})
let
arrayBaru
=
[]
let
arrayBaru
=
[]
this
.
state
.
userCompany
.
map
((
item
,
index
)
=>
{
this
.
state
.
userCompany
.
map
((
item
,
index
)
=>
{
let
indexID
=
companyData
.
findIndex
((
val
)
=>
val
.
company_id
==
item
)
let
indexID
=
companyData
.
findIndex
((
val
)
=>
val
.
company_id
==
item
)
if
(
indexID
!==
-
1
)
{
if
(
indexID
!==
-
1
)
{
arrayBaru
.
push
(
companyData
[
indexID
])
arrayBaru
.
push
(
companyData
[
indexID
])
}
}
})
})
let
defaultProps
=
{
let
defaultProps
=
{
options
:
arrayBaru
,
options
:
arrayBaru
,
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
company_name
),
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
company_name
),
};
};
this
.
setState
({
listCompany
:
defaultProps
,
company
:
arrayBaru
[
0
]
},
()
=>
{
this
.
setState
({
listCompany
:
defaultProps
,
company
:
arrayBaru
[
0
]
},
()
=>
{
this
.
getPeriode
()
this
.
getPeriode
()
})
})
...
@@ -223,9 +224,13 @@ export default class BudgetTahunan extends Component {
...
@@ -223,9 +224,13 @@ 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
,
isSubmit
:
false
},
()
=>
{
this
.
checkIsSubmit
()
this
.
historyApproval
()
})
}
else
{
}
else
{
this
.
setState
({
submissionID
:
null
})
this
.
setState
({
submissionID
:
null
})
}
}
...
@@ -233,6 +238,41 @@ export default class BudgetTahunan extends Component {
...
@@ -233,6 +238,41 @@ export default class BudgetTahunan extends Component {
})
})
}
}
historyApproval
()
{
let
body
=
{
"submission_id"
:
this
.
state
.
submissionID
}
api
.
create
().
historyApproval
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
.
data
.
length
>
0
)
{
let
dataTableHistory
=
response
.
data
.
data
.
map
(
item
=>
{
return
[
item
.
pic
,
item
.
status_approval
,
item
.
remarks
,
item
.
item_revision
,
item
.
history_approval_date
]
})
this
.
setState
({
dataTableHistory
,
visibleTableHistory
:
true
})
}
})
}
checkIsSubmit
()
{
let
body
=
{
"submission_id"
:
this
.
state
.
submissionID
}
api
.
create
().
checkIsSubmit
(
body
).
then
(
response
=>
{
// console.log(response);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"Success"
)
{
this
.
setState
({
isSubmit
:
response
.
data
.
data
.
result
})
}
}
})
}
clickDetail
(
item
,
id
,
revision
,
status
)
{
clickDetail
(
item
,
id
,
revision
,
status
)
{
console
.
log
(
item
);
console
.
log
(
item
);
this
.
setState
({
this
.
setState
({
...
@@ -382,10 +422,22 @@ export default class BudgetTahunan extends Component {
...
@@ -382,10 +422,22 @@ 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
}
if
(
this
.
state
.
isSubmit
===
true
)
{
api
.
create
().
submitMasterBudget
(
body
).
then
(
response
=>
{
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"Success"
)
{
this
.
getCompanyActive
()
}
}
})
}
}
}
}
...
@@ -433,10 +485,14 @@ export default class BudgetTahunan extends Component {
...
@@ -433,10 +485,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
>
);
);
...
@@ -456,7 +512,9 @@ export default class BudgetTahunan extends Component {
...
@@ -456,7 +512,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
>
...
@@ -472,6 +530,10 @@ export default class BudgetTahunan extends Component {
...
@@ -472,6 +530,10 @@ export default class BudgetTahunan extends Component {
name
:
""
,
name
:
""
,
options
:
{
display
:
false
}
options
:
{
display
:
false
}
}]
}]
const
columnsHistory
=
[
"Name"
,
"Status"
,
"Remarks"
,
"Revision Item"
,
"Date"
]
const
options
=
{
const
options
=
{
filter
:
false
,
filter
:
false
,
sort
:
false
,
sort
:
false
,
...
@@ -518,6 +580,7 @@ export default class BudgetTahunan extends Component {
...
@@ -518,6 +580,7 @@ export default class BudgetTahunan extends Component {
{...
this
.
state
.
listPeriode
}
{...
this
.
state
.
listPeriode
}
id
=
"periode"
id
=
"periode"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periode
:
newInputValue
},
()
=>
{
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periode
:
newInputValue
},
()
=>
{
this
.
getRevision
()
this
.
getReport
()
this
.
getReport
()
this
.
getReportAttachment
()
this
.
getReportAttachment
()
this
.
getSubmission
()
this
.
getSubmission
()
...
@@ -535,6 +598,7 @@ export default class BudgetTahunan extends Component {
...
@@ -535,6 +598,7 @@ export default class BudgetTahunan extends Component {
{...
this
.
state
.
listCompany
}
{...
this
.
state
.
listCompany
}
id
=
"company"
id
=
"company"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
},
()
=>
{
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
},
()
=>
{
this
.
getRevision
()
this
.
getReport
()
this
.
getReport
()
this
.
getReportAttachment
()
this
.
getReportAttachment
()
this
.
getSubmission
()
this
.
getSubmission
()
...
@@ -620,16 +684,27 @@ export default class BudgetTahunan extends Component {
...
@@ -620,16 +684,27 @@ export default class BudgetTahunan extends Component {
}
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
{
this
.
state
.
visibleTableHistory
&&
(
<
div
style
=
{{
marginTop
:
20
}}
>
<
MuiThemeProvider
theme
=
{
getMuiTheme
()}
>
<
MUIDataTable
data
=
{
this
.
state
.
dataTableHistory
}
columns
=
{
columnsHistory
}
options
=
{
options
}
/
>
<
/MuiThemeProvider
>
<
/div
>
)}
<
/div
>
<
/div
>
<
div
style
=
{{
borderTop
:
'solid 1px #c4c4c4'
,
padding
:
10
,
backgroundColor
:
'#f5f5f5'
,
width
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'flex-end'
}}
>
<
div
style
=
{{
borderTop
:
'solid 1px #c4c4c4'
,
padding
:
10
,
backgroundColor
:
'#f5f5f5'
,
width
:
'100%'
,
display
:
'flex'
,
justifyContent
:
'flex-end'
}}
>
<
button
<
button
style
=
{{
style
=
{{
backgroundColor
:
'transparent'
,
backgroundColor
:
'transparent'
,
cursor
:
'pointe
r'
,
cursor
:
this
.
state
.
isSubmit
===
true
?
'pointer'
:
'curso
r'
,
borderColor
:
'transparent'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
outline
:
'none'
,
}}
}}
onClick
=
{()
=>
this
.
validate
()
}
onClick
=
{()
=>
this
.
state
.
isSubmit
===
true
?
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
>
...
...
src/container/BudgetTahunan/BalanceSheet.js
View file @
a536f64a
...
@@ -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 @
a536f64a
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 @
a536f64a
...
@@ -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