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
8de41230
Commit
8de41230
authored
Nov 09, 2020
by
Deni Rinaldi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deni-' into 'master'
Deni See merge request
!627
parents
45e1f86d
3e2672ed
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
136 additions
and
36 deletions
+136
-36
index.js
src/api/index.js
+9
-5
MonthlyReport.js
src/container/MonthlyReport.js
+59
-14
BalanceSheetMR.js
src/container/MonthlyReport/BalanceSheetMR.js
+36
-17
ListOfCreditFacilities.js
src/container/MonthlyReport/ListOfCreditFacilities.js
+32
-0
No files found.
src/api/index.js
View file @
8de41230
...
@@ -224,7 +224,6 @@ const create = (type = "") => {
...
@@ -224,7 +224,6 @@ const create = (type = "") => {
const
getLastestUpdateOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/get_latest_update'
,
body
)
const
getLastestUpdateOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/get_latest_update'
,
body
)
const
getLastPeriodeOI
=
(
idCompany
)
=>
api
.
post
(
`transaction/master_budget/get_last_periode/
${
idCompany
}
`
)
const
getLastPeriodeOI
=
(
idCompany
)
=>
api
.
post
(
`transaction/master_budget/get_last_periode/
${
idCompany
}
`
)
const
getReportHierarkiPL
=
(
body
)
=>
api
.
post
(
'transaction/db_report_detail/get_report_hierarki'
,
body
)
const
getReportHierarkiPL
=
(
body
)
=>
api
.
post
(
'transaction/db_report_detail/get_report_hierarki'
,
body
)
const
getReportHierarkiFR
=
(
body
)
=>
api
.
post
(
'transaction/db_ratio/get_report_hierarki'
,
body
)
//CASH FLOW
//CASH FLOW
const
getDetailReportCF
=
(
body
)
=>
api
.
post
(
'/transaction/cash_flow/get_report_hierarki'
,
body
)
const
getDetailReportCF
=
(
body
)
=>
api
.
post
(
'/transaction/cash_flow/get_report_hierarki'
,
body
)
...
@@ -250,6 +249,10 @@ const create = (type = "") => {
...
@@ -250,6 +249,10 @@ const create = (type = "") => {
const
approvalSubmissionOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/approval_submission'
,
body
)
const
approvalSubmissionOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/approval_submission'
,
body
)
const
checkApproverOLPA
=
()
=>
api
.
get
(
'transaction/outlook_pa/is_approver'
)
const
checkApproverOLPA
=
()
=>
api
.
get
(
'transaction/outlook_pa/is_approver'
)
// Monthly
const
getMonthlyReportID
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_bs/get_monthly_report_id'
,
body
)
const
getHierarkiMontlyReport
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report_bs/get_report_hierarki'
,
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
}
`
)
...
@@ -431,9 +434,10 @@ const create = (type = "") => {
...
@@ -431,9 +434,10 @@ const create = (type = "") => {
getSubmitOI
,
getSubmitOI
,
getLastPeriodOI
,
getLastPeriodOI
,
getDashboardUser
,
getDashboardUser
,
getHierarkiMontlyReport
getDetailReportCF
,
getDetailReportCF
,
getReportHierarkiPL
,
getReportHierarkiPL
,
get
ReportHierarkiFR
get
MonthlyReportID
,
}
}
}
}
...
...
src/container/MonthlyReport.js
View file @
8de41230
...
@@ -14,6 +14,7 @@ import BalanceSheetMR from './MonthlyReport/BalanceSheetMR';
...
@@ -14,6 +14,7 @@ import BalanceSheetMR from './MonthlyReport/BalanceSheetMR';
import
ProfitLossMR
from
'./MonthlyReport/ProfitLossMR'
;
import
ProfitLossMR
from
'./MonthlyReport/ProfitLossMR'
;
import
TaxPlanningMR
from
'./MonthlyReport/TaxPlanningMR'
;
import
TaxPlanningMR
from
'./MonthlyReport/TaxPlanningMR'
;
import
FixedAssetsMovementMR
from
'./MonthlyReport/FixedAssetsMovementMR'
;
import
FixedAssetsMovementMR
from
'./MonthlyReport/FixedAssetsMovementMR'
;
import
ListOfCreditFacilities
from
'./MonthlyReport/ListOfCreditFacilities'
export
default
class
MonthlyReport
extends
Component
{
export
default
class
MonthlyReport
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -135,6 +136,10 @@ export default class MonthlyReport extends Component {
...
@@ -135,6 +136,10 @@ export default class MonthlyReport extends Component {
})
})
}
}
onClickClose
(){
this
.
setState
({})
}
getRevision
()
{
getRevision
()
{
let
payload
=
{
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"company_id"
:
this
.
state
.
company
.
company_id
,
...
@@ -155,6 +160,25 @@ export default class MonthlyReport extends Component {
...
@@ -155,6 +160,25 @@ export default class MonthlyReport extends Component {
getOptionLabel
:
(
option
)
=>
option
.
revision
,
getOptionLabel
:
(
option
)
=>
option
.
revision
,
};
};
this
.
setState
({
listRevision
:
defaultProps
,
revision
:
revisionData
[
0
]
},
()
=>
{
this
.
setState
({
listRevision
:
defaultProps
,
revision
:
revisionData
[
0
]
},
()
=>
{
this
.
getMonthlyReportID
()
})
}
}
})
}
getMonthlyReportID
(){
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
,
}
api
.
create
().
getMonthlyReportID
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
setState
({
monthlyReportId
:
response
.
data
.
data
.
monthly_report_id
},
()
=>
{
this
.
getReport
()
this
.
getReport
()
this
.
getReportAttachment
()
this
.
getReportAttachment
()
})
})
...
@@ -178,6 +202,7 @@ export default class MonthlyReport extends Component {
...
@@ -178,6 +202,7 @@ export default class MonthlyReport extends Component {
visibleCAT
:
false
,
visibleCAT
:
false
,
visibleFAM
:
false
,
visibleFAM
:
false
,
visibleTP
:
false
,
visibleTP
:
false
,
visibleLOCF
:
false
,
})
})
}
else
if
(
item
===
'Profit Loss'
)
{
}
else
if
(
item
===
'Profit Loss'
)
{
this
.
setState
({
this
.
setState
({
...
@@ -186,7 +211,8 @@ export default class MonthlyReport extends Component {
...
@@ -186,7 +211,8 @@ export default class MonthlyReport extends Component {
visiblePL
:
true
,
visiblePL
:
true
,
visibleCAT
:
false
,
visibleCAT
:
false
,
visibleFAM
:
false
,
visibleFAM
:
false
,
visibleTP
:
false
visibleTP
:
false
,
visibleLOCF
:
false
,
})
})
}
else
if
(
item
===
'Tax Planning'
)
{
}
else
if
(
item
===
'Tax Planning'
)
{
this
.
setState
({
this
.
setState
({
...
@@ -195,7 +221,8 @@ export default class MonthlyReport extends Component {
...
@@ -195,7 +221,8 @@ export default class MonthlyReport extends Component {
visiblePL
:
false
,
visiblePL
:
false
,
visibleCAT
:
false
,
visibleCAT
:
false
,
visibleFAM
:
false
,
visibleFAM
:
false
,
visibleTP
:
true
visibleTP
:
true
,
visibleLOCF
:
false
,
})
})
}
else
if
(
item
===
'Fixed Assets Movement'
)
{
}
else
if
(
item
===
'Fixed Assets Movement'
)
{
this
.
setState
({
this
.
setState
({
...
@@ -204,7 +231,8 @@ export default class MonthlyReport extends Component {
...
@@ -204,7 +231,8 @@ export default class MonthlyReport extends Component {
visiblePL
:
false
,
visiblePL
:
false
,
visibleCAT
:
false
,
visibleCAT
:
false
,
visibleFAM
:
true
,
visibleFAM
:
true
,
visibleTP
:
false
visibleTP
:
false
,
visibleLOCF
:
false
,
})
})
}
else
if
(
item
===
'CAT'
)
{
}
else
if
(
item
===
'CAT'
)
{
this
.
setState
({
this
.
setState
({
...
@@ -213,7 +241,18 @@ export default class MonthlyReport extends Component {
...
@@ -213,7 +241,18 @@ export default class MonthlyReport extends Component {
visiblePL
:
false
,
visiblePL
:
false
,
visibleCAT
:
true
,
visibleCAT
:
true
,
visibleFAM
:
false
,
visibleFAM
:
false
,
visibleTP
:
false
visibleTP
:
false
,
visibleLOCF
:
false
,
})
}
else
if
(
item
===
'List of Credit Facilities'
)
{
this
.
setState
({
visibleMonthlyReport
:
false
,
visibleBS
:
false
,
visiblePL
:
false
,
visibleCAT
:
false
,
visibleFAM
:
false
,
visibleTP
:
false
,
visibleLOCF
:
true
,
})
})
}
}
})
})
...
@@ -380,8 +419,7 @@ export default class MonthlyReport extends Component {
...
@@ -380,8 +419,7 @@ export default class MonthlyReport 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
.
getReport
()
this
.
getMonthlyReportID
()
this
.
getReportAttachment
()
})}
})}
disableClearable
disableClearable
style
=
{{
width
:
250
}}
style
=
{{
width
:
250
}}
...
@@ -394,8 +432,7 @@ export default class MonthlyReport extends Component {
...
@@ -394,8 +432,7 @@ export default class MonthlyReport 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
.
getReport
()
this
.
getMonthlyReportID
()
this
.
getReportAttachment
()
})}
})}
disableClearable
disableClearable
style
=
{{
width
:
250
}}
style
=
{{
width
:
250
}}
...
@@ -522,9 +559,9 @@ export default class MonthlyReport extends Component {
...
@@ -522,9 +559,9 @@ export default class MonthlyReport extends Component {
company
=
{
this
.
state
.
company
}
company
=
{
this
.
state
.
company
}
revision
=
{
this
.
state
.
revisionTable
}
revision
=
{
this
.
state
.
revisionTable
}
periode
=
{
this
.
state
.
periode
.
periode
}
periode
=
{
this
.
state
.
periode
.
periode
}
submissionID
=
{
this
.
state
.
submissionID
}
monthlyReportId
=
{
this
.
state
.
monthlyReportId
}
// saveToMasterBudget={this.saveToMasterBudget.bind(this)}
// saveToMasterBudget={this.saveToMasterBudget.bind(this)}
onClickClose
=
{()
=>
this
.
setState
({
visibleBS
:
false
,
visible
BudgetTahunan
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleBS
:
false
,
visible
MonthlyReport
:
true
})}
// getReport={this.getCompanyActive.bind(this)}
// getReport={this.getCompanyActive.bind(this)}
/
>
/
>
)}
)}
...
@@ -578,6 +615,14 @@ export default class MonthlyReport extends Component {
...
@@ -578,6 +615,14 @@ export default class MonthlyReport extends Component {
onClickClose
=
{()
=>
this
.
setState
({
visibleCAT
:
false
,
visibleMonthlyReport
:
true
})}
onClickClose
=
{()
=>
this
.
setState
({
visibleCAT
:
false
,
visibleMonthlyReport
:
true
})}
/
>
/
>
)}
)}
{
this
.
state
.
visibleLOCF
&&
(
<
ListOfCreditFacilities
company
=
{
this
.
state
.
company
}
revision
=
{
this
.
state
.
revisionTable
}
periode
=
{
this
.
state
.
periode
.
periode
}
/
>
)}
<
/div
>
<
/div
>
);
);
}
}
...
...
src/container/MonthlyReport/BalanceSheetMR.js
View file @
8de41230
...
@@ -3,6 +3,7 @@ import MUIDataTable from 'mui-datatables';
...
@@ -3,6 +3,7 @@ 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'
;
import
Images
from
'../../assets/Images'
;
import
Images
from
'../../assets/Images'
;
import
api
from
'../../api'
;
var
ct
=
require
(
"../../library/CustomTable"
);
var
ct
=
require
(
"../../library/CustomTable"
);
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable3
());
const
getMuiTheme
=
()
=>
createMuiTheme
(
ct
.
customTable3
());
...
@@ -23,6 +24,24 @@ const style2 = {
...
@@ -23,6 +24,24 @@ const style2 = {
};
};
export
default
class
BalanceSheetMR
extends
Component
{
export
default
class
BalanceSheetMR
extends
Component
{
componentDidMount
(){
this
.
getItemHierarki
()
}
async
getItemHierarki
()
{
let
payload
=
{
"report_id"
:
2
,
"revision"
:
Number
(
this
.
props
.
revision
),
"periode"
:
this
.
props
.
periode
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"monthly_report_id"
:
this
.
props
.
monthlyReportId
}
api
.
create
().
getHierarkiMontlyReport
(
payload
).
then
(
response
=>
{
console
.
log
(
response
);
})
}
render
()
{
render
()
{
let
columns
=
[
let
columns
=
[
{
{
...
@@ -65,11 +84,11 @@ export default class BalanceSheetMR extends Component {
...
@@ -65,11 +84,11 @@ 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
,
color
:
'#fff'
,
backgroundColor
:
'#07a7d0
'
,
fontSize
:
13
,
fontWeight
:
1
,
width
:
150
,
borderRight
:
"1px solid rgb(255, 255, 255)"
,
padding
:
0
}}
>
<
th
style
=
{{
...
style2
,
color
:
'#fff'
,
backgroundColor
:
'#1c71b8
'
,
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"
,
backgroundColor
:
'#07a7d0'
,
textAlign
:
'center'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
style
=
{{
borderBottom
:
"1px #fff solid"
,
backgroundColor
:
'#1c71b8'
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
height
:
50
,
fontSize
:
12
,
fontWeight
:
'bold'
,
padding
:
5
}}
>
{
columnMeta
.
name
}
<
/div
>
<
div
className
=
"grid grid-3x"
style
=
{{
...
style2
,
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"
,
backgroundColor
:
'#07a7d0'
}}
>
<
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
>
...
@@ -77,7 +96,7 @@ export default class BalanceSheetMR extends Component {
...
@@ -77,7 +96,7 @@ export default class BalanceSheetMR extends Component {
<
div
className
=
"column-2"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
borderRight
:
"1px #fff solid"
,
backgroundColor
:
'#07a7d0'
}}
>
<
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
,
backgroundColor
:
'#07a7d0
'
}}
>
<
div
className
=
"column-3"
style
=
{{
placeSelf
:
'center'
,
textAlign
:
'center'
,
padding
:
5
,
backgroundColor
:
'#37b5e6
'
}}
>
<
span
>
{
"Actual"
}
<
/span
>
<
span
>
{
"Actual"
}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
src/container/MonthlyReport/ListOfCreditFacilities.js
0 → 100644
View file @
8de41230
import
React
,
{
Component
}
from
'react'
;
import
{
createMuiTheme
,
MuiThemeProvider
,
Paper
,
TableCell
,
Typography
}
from
'@material-ui/core'
export
default
class
ListOfCreditFacilities
extends
Component
{
render
(){
return
(
<
div
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
flex
:
1
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Monthly
Report
<
/Typography
>
<
/div
>
<
div
style
=
{{
flex
:
1
,
padding
:
20
,
width
:
'100%'
}}
>
<
Paper
style
=
{{
paddingTop
:
10
,
paddingBottom
:
20
}}
>
<
div
style
=
{{
borderBottom
:
'solid 1px #c4c4c4'
}}
>
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Monthly
Report
-
List
Of
Credit
Facilities
<
/Typography
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
}}
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
/div
>
<
/div
>
<
/div
>
<
/Paper
>
<
/div
>
<
/div
>
)
}
}
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