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
5d40cd59
Commit
5d40cd59
authored
Jul 11, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update banyak
parent
19a6b4da
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
177 additions
and
106 deletions
+177
-106
index.js
src/api/index.js
+2
-0
BudgetTahunan.js
src/container/BudgetTahunan/BudgetTahunan.js
+48
-28
CashFlow.js
src/container/BudgetTahunan/CashFlow.js
+32
-9
TaxPlanning.js
src/container/BudgetTahunan/TaxPlanning.js
+56
-56
CashFlowMR.js
src/container/MonthlyReport/CashFlowMR.js
+30
-8
MonthlyReport.js
src/container/MonthlyReport/MonthlyReport.js
+9
-5
No files found.
src/api/index.js
View file @
5d40cd59
...
...
@@ -343,6 +343,7 @@ const create = (type = "") => {
//CASH FLOW
const
getDetailReportCF
=
(
body
)
=>
api
.
post
(
'/transaction/cash_flow/master_budget/get_report_hierarki'
,
body
)
const
createReportCF
=
(
body
)
=>
api
.
post
(
'transaction/cash_flow/master_budget/create_submission_report'
,
body
)
const
createReportCFSimulasi
=
(
body
)
=>
api
.
post
(
'transaction/cash_flow/master_budget/create_submission_report/other_currency'
,
body
)
//OUTLOOK PA
const
getOutlookPAID
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/get_outlook_pa_id'
,
body
)
...
...
@@ -759,6 +760,7 @@ const create = (type = "") => {
getReportCFSumaMB
,
getReportCFSumaMR
,
createReportCF
,
createReportCFSimulasi
,
getReportCFSuma
,
getReportPLSuma
,
getReportPLSummary
,
...
...
src/container/BudgetTahunan/BudgetTahunan.js
View file @
5d40cd59
...
...
@@ -1320,7 +1320,26 @@ export default class BudgetTahunan extends Component {
})
}
createCashFlow
(
payload
)
{
createCashFlow
(
payload
,
trigger
)
{
console
.
log
(
trigger
);
if
(
trigger
===
"simulasi"
)
{
api
.
create
().
createReportCFSimulasi
(
payload
).
then
((
res
)
=>
{
console
.
log
(
res
)
// this.getSubmission()
if
(
res
.
data
)
{
if
(
res
.
data
.
status
===
"success"
)
{
this
.
setState
({
visibleCF
:
false
,
visibleBudgetTahunan
:
true
})
this
.
getSubmission
()
}
else
{
if
(
res
.
data
.
message
==
"Please Set Up Rate Currency First"
)
{
this
.
setState
({
visibleAlertSave
:
true
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
res
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
})
}
}
}
})
}
else
{
api
.
create
().
createReportCF
(
payload
).
then
((
res
)
=>
{
console
.
log
(
res
)
// this.getSubmission()
...
...
@@ -1352,6 +1371,7 @@ export default class BudgetTahunan extends Component {
// }
})
}
}
getPL
(
type
,
trigger
)
{
let
PLID
=
null
...
...
src/container/BudgetTahunan/CashFlow.js
View file @
5d40cd59
...
...
@@ -336,7 +336,7 @@ export default class CashFlow extends Component {
this
.
setState
({
alert
:
false
})
}
olahDataCashFlow
(
dataTable2
)
{
olahDataCashFlow
(
dataTable2
,
trigger
)
{
console
.
log
(
dataTable2
)
let
listCF
=
[]
dataTable2
.
map
((
item
,
index
)
=>
{
...
...
@@ -373,10 +373,10 @@ export default class CashFlow extends Component {
})
console
.
log
(
listCF
)
this
.
createCashFlow
(
listCF
)
this
.
createCashFlow
(
listCF
,
trigger
)
}
createCashFlow
(
dbcf
)
{
createCashFlow
(
dbcf
,
trigger
)
{
let
payload
=
{
"submission_id"
:
this
.
props
.
submissionID
,
"company_id"
:
this
.
props
.
company
.
company_id
,
...
...
@@ -388,7 +388,7 @@ export default class CashFlow extends Component {
}
console
.
log
(
dbcf
)
console
.
log
(
JSON
.
stringify
(
payload
))
this
.
props
.
createCashFlow
(
payload
)
this
.
props
.
createCashFlow
(
payload
,
trigger
)
// this.props.onClickClose()
}
...
...
@@ -3339,9 +3339,32 @@ export default class CashFlow extends Component {
<
/div
>
<
/button
>
<
/div
>
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
button
type
=
"button"
// disabled={this.state.buttonError}
onClick
=
{()
=>
// this.state.buttonError ?
// this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' })
// :
this
.
state
.
handleDoubleClick
==
1
?
null
:
this
.
setState
({
handleDoubleClick
:
1
},
()
=>
{
this
.
olahDataCashFlow
(
dataTable2
,
"simulasi"
)
})}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
marginRight
:
15
}}
>
<
div
style
=
{{
backgroundColor
:
'#cd5c5c'
,
width
:
105
,
height
:
25
,
borderRadius
:
3
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
Data
Simulasi
<
/Typography
>
<
/div
>
<
/button
>
{
this
.
props
.
isApprover
===
true
||
dataTable2
.
length
==
0
?
null
:
(
!
this
.
props
.
truelyApprover
)
&&
(
this
.
props
.
lastStatus
===
'SUBMIT'
||
this
.
props
.
lastStatus
===
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
&&
(
this
.
props
.
status
===
'revision'
||
this
.
props
.
status
===
'not-yet'
||
this
.
props
.
status
===
'draft'
||
this
.
props
.
status
===
'submitted'
)
?
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
button
type
=
"button"
// disabled={this.state.buttonError}
...
...
@@ -3364,10 +3387,10 @@ export default class CashFlow extends Component {
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
:
null
}
<
/div
>
<
/div
>
<
/div
>
<
/Paper
>
<
/div
>
<
/div
>
...
...
src/container/BudgetTahunan/TaxPlanning.js
View file @
5d40cd59
This diff is collapsed.
Click to expand it.
src/container/MonthlyReport/CashFlowMR.js
View file @
5d40cd59
...
...
@@ -214,7 +214,7 @@ export default class CashFlowMR extends Component {
}
}
payloadCF
(
dataTable2
)
{
payloadCF
(
dataTable2
,
trigger
)
{
let
listCF
=
[]
console
.
log
(
dataTable2
)
dataTable2
.
map
((
item
,
index
)
=>
{
...
...
@@ -232,10 +232,10 @@ export default class CashFlowMR extends Component {
// }
})
this
.
createCashFlow
(
listCF
)
this
.
createCashFlow
(
listCF
,
trigger
)
}
createCashFlow
(
listCF
)
{
createCashFlow
(
listCF
,
trigger
)
{
let
payload
=
{
"monthly_report_id"
:
this
.
props
.
monthlyReportId
,
"company_id"
:
this
.
props
.
company
.
company_id
,
...
...
@@ -246,7 +246,7 @@ export default class CashFlowMR extends Component {
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"cash_flow"
:
listCF
}
this
.
props
.
createCashFlow
(
payload
)
this
.
props
.
createCashFlow
(
payload
,
trigger
)
}
render
()
{
...
...
@@ -765,7 +765,6 @@ export default class CashFlowMR extends Component {
<
/div
>
<
/button
>
<
/div
>
{
this
.
state
.
viewOnly
&&
<
div
className
=
"col-2"
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
,
maxWidth
:
'100%'
}}
>
<
button
type
=
"button"
...
...
@@ -776,7 +775,7 @@ export default class CashFlowMR extends Component {
// :
this
.
state
.
handleDoubleClick
==
1
?
null
:
this
.
setState
({
handleDoubleClick
:
1
},
()
=>
{
this
.
payloadCF
(
dataTable2
)
this
.
payloadCF
(
dataTable2
,
"simulasi"
)
})}
style
=
{{
backgroundColor
:
'transparent'
,
...
...
@@ -789,10 +788,33 @@ export default class CashFlowMR extends Component {
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#fff'
,
textAlign
:
'center'
}}
>
Save
&
Complete
<
/Typography
>
<
/div
>
<
/button
>
{
this
.
state
.
viewOnly
&&
<
button
type
=
"button"
// disabled={this.state.buttonError}
onClick
=
{()
=>
// this.state.buttonError ?
// this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' })
// :
this
.
state
.
handleDoubleClick
==
1
?
null
:
this
.
setState
({
handleDoubleClick
:
1
},
()
=>
{
this
.
payloadCF
(
dataTable2
)
})}
style
=
{{
backgroundColor
:
'transparent'
,
cursor
:
this
.
state
.
buttonError
===
true
?
'default'
:
'pointer'
,
borderColor
:
'transparent'
,
outline
:
'none'
,
}}
>
<
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
>
<
/div
>
<
/button
>
}
<
/div
>
<
/div
>
<
/div
>
<
/Paper
>
<
/div
>
<
/div
>
...
...
src/container/MonthlyReport/MonthlyReport.js
View file @
5d40cd59
...
...
@@ -1529,13 +1529,17 @@ export default class MonthlyReport extends Component {
})
}
createCashFlow
(
payload
)
{
createCashFlow
(
payload
,
trigger
)
{
console
.
log
(
JSON
.
stringify
(
payload
))
if
(
trigger
===
"simulasi"
)
{
}
else
{
api
.
create
().
createMonthlyReportCF
(
payload
).
then
((
res
)
=>
{
this
.
saveToMonthlyReport
()
console
.
log
(
res
)
})
}
}
getPL
(
type
,
trigger
)
{
let
PLID
=
null
...
...
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