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
22fdf53b
Commit
22fdf53b
authored
Jun 14, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev/riri' into 'ENV-DEV'
Check API MB MR See merge request
!1832
parents
79a169cb
5353c3cd
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
166 additions
and
60 deletions
+166
-60
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+38
-13
DownloadReport.js
src/container/DownloadReport/DownloadReport.js
+4
-0
ListOfCreditFacilitiesMR.js
src/container/MonthlyReport/ListOfCreditFacilitiesMR.js
+1
-1
OperatingIndicator.js
src/container/OperatingIndicator/OperatingIndicator.js
+38
-24
OutlookPA.js
src/container/OutlookPA/OutlookPA.js
+59
-10
ProfitLossOLPA.js
src/container/OutlookPA/ProfitLossOLPA.js
+19
-10
TaxPlanningOLPA.js
src/container/OutlookPA/TaxPlanningOLPA.js
+7
-2
No files found.
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
22fdf53b
...
...
@@ -662,17 +662,26 @@ export default class CorporateAnnualTarget extends Component {
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
onClickClose
()
this
.
props
.
getReport
()
if
(
type
==
'submitted'
)
{
this
.
props
.
saveToMasterBudget
(
body
,
'CAT'
)
}
else
{
this
.
props
.
saveToMasterBudget
(
body
)
}
// this.props.onClickClose()
// this.props.getReport()
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
if
(
response
.
data
?.
message
==
"Please Set Up Rate Currency First"
)
{
this
.
setState
({
visibleAlertSave
:
true
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
,
loading
:
false
})
...
...
@@ -899,11 +908,27 @@ export default class CorporateAnnualTarget extends Component {
// api.create().validateSubmitReport(payloadBro).then((response) => {
// // // // // console.log(response)
// if (response.data.data.result) {
if
(
type
==
'submitted'
)
{
this
.
props
.
saveToMasterBudget
(
payloadBro
,
'CAT'
)
if
(
response
.
data
.
status
===
"success"
)
{
if
(
type
==
'submitted'
)
{
this
.
props
.
saveToMasterBudget
(
payloadBro
,
'CAT'
)
}
else
{
this
.
props
.
saveToMasterBudget
(
payloadBro
)
}
}
else
{
this
.
props
.
saveToMasterBudget
(
payloadBro
)
if
(
response
.
data
?.
message
==
"Please Set Up Rate Currency First"
)
{
this
.
setState
({
visibleAlertSave
:
true
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
// this.props.saveToMasterBudget(payloadBro)
// this.props.onClickClose()
// } else {
...
...
src/container/DownloadReport/DownloadReport.js
View file @
22fdf53b
...
...
@@ -97,6 +97,10 @@ class DownloadReport extends Component {
return
()
=>
clearInterval
(
interval
);
}
closeAlert
()
{
this
.
setState
({
alert
:
false
})
}
getListDownload
()
{
api
.
create
().
getListDownload
().
then
((
response
)
=>
{
// console.log(response);
...
...
src/container/MonthlyReport/ListOfCreditFacilitiesMR.js
View file @
22fdf53b
...
...
@@ -884,7 +884,7 @@ export default class ListOfCreditFacilities extends Component {
downloadTemplate
=
async
()
=>
{
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/locf/monthly_report/download_template?report_id=
${
this
.
props
.
report_id
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&months=
${
this
.
props
.
month
.
month_id
}
`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/locf/monthly_report/download_template?report_id=
${
this
.
props
.
report_id
}
&&company_id=
${
this
.
props
.
company
.
company_id
}
&&year=
${
this
.
props
.
periode
}
&&months=
${
this
.
props
.
month
.
month_id
}
&¤cy_id=
${
this
.
props
.
defaultCurrency
.
id
}
`
)
res
=
await
res
.
blob
()
// console.log(this.props.report_id)
...
...
src/container/OperatingIndicator/OperatingIndicator.js
View file @
22fdf53b
...
...
@@ -92,6 +92,10 @@ export default class OperatingIndicator extends Component {
this
.
getPermission
()
}
closeAlert
()
{
this
.
setState
({
alert
:
false
})
}
getPermission
()
{
let
payload
=
{
menu
:
"operating indicator"
...
...
@@ -691,8 +695,7 @@ export default class OperatingIndicator extends Component {
// }, 200);
// }
// }
async
handleGenerateReport
(
data
)
{
handleGenerateReport
=
async
(
data
)
=>
{
let
{
selectReport
,
operatingIndID
,
company
,
periode
,
downloadedFileReportId
,
defaultCurrency
}
=
this
.
state
if
(
selectReport
.
length
>
0
)
{
let
result
=
[]
...
...
@@ -718,34 +721,45 @@ export default class OperatingIndicator extends Component {
String
(
report
[
1
]).
toLocaleLowerCase
().
includes
(
'dec'
)
?
12
:
null
if
(
String
(
report
[
1
]).
toLocaleLowerCase
().
includes
(
'master budget'
))
{
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/operating_indicator/master_budget/export_master_budget?operating_indicator_id=
${
operatingIndID
==
null
?
""
:
operatingIndID
}
&&report_id=
${
report
[
3
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
console
.
log
(
url
);
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/operating_indicator/master_budget/export_master_budget?operating_indicator_id=
${
operatingIndID
==
null
?
""
:
operatingIndID
}
&&report_id=
${
report
[
3
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
)
if
(
res
.
status
===
200
)
{
result
=
[...
result
,
res
];
try
{
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/operating_indicator/master_budget/export_master_budget?operating_indicator_id=
${
operatingIndID
==
null
?
""
:
operatingIndID
}
&&report_id=
${
report
[
3
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/operating_indicator/master_budget/export_master_budget?operating_indicator_id=
${
operatingIndID
==
null
?
""
:
operatingIndID
}
&&report_id=
${
report
[
3
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
)
if
(
res
.
status
===
200
)
{
result
=
[...
result
,
res
];
}
}
catch
(
e
)
{
alert
(
e
)
}
}
else
if
(
String
(
report
[
1
]).
toLocaleLowerCase
().
includes
(
'monthly report'
))
{
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/operating_indicator/monthly_report/export_monthly_report?operating_indicator_id=
${
operatingIndID
==
null
?
""
:
operatingIndID
}
&&report_id=
${
report
[
3
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&months=
${
month
}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/operating_indicator/monthly_report/export_monthly_report?operating_indicator_id=
${
operatingIndID
===
null
?
""
:
operatingIndID
}
&&report_id=
${
report
[
3
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&months=
${
month
}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
)
if
(
res
.
status
===
200
)
{
result
=
[...
result
,
res
];
}
else
if
(
String
(
report
[
1
]).
toLocaleLowerCase
().
includes
(
'monthly report'
))
{
try
{
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/operating_indicator/monthly_report/export_monthly_report?operating_indicator_id=
${
operatingIndID
==
null
?
""
:
operatingIndID
}
&&report_id=
${
report
[
3
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&months=
${
month
}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/operating_indicator/monthly_report/export_monthly_report?operating_indicator_id=
${
operatingIndID
===
null
?
""
:
operatingIndID
}
&&report_id=
${
report
[
3
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&months=
${
month
}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
)
if
(
res
.
status
===
200
)
{
result
=
[...
result
,
res
];
}
}
catch
(
error
)
{
alert
(
error
)
}
}
else
if
(
String
(
report
[
1
]).
toLocaleLowerCase
().
includes
(
'rolling outlook'
))
{
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/operating_indicator/rolling_outlook/export_rolling_outlook?operating_indicator_id=
${
operatingIndID
==
null
?
""
:
operatingIndID
}
&&report_id=
${
report
[
3
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&quartal=
${
quarter
}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/operating_indicator/rolling_outlook/export_rolling_outlook?operating_indicator_id=
${
operatingIndID
===
null
?
""
:
operatingIndID
}
&&report_id=
${
report
[
3
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&quartal=
${
quarter
}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
)
if
(
res
.
status
===
200
)
{
result
=
[...
result
,
res
];
try
{
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/operating_indicator/rolling_outlook/export_rolling_outlook?operating_indicator_id=
${
operatingIndID
==
null
?
""
:
operatingIndID
}
&&report_id=
${
report
[
3
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&quartal=
${
quarter
}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/operating_indicator/rolling_outlook/export_rolling_outlook?operating_indicator_id=
${
operatingIndID
===
null
?
""
:
operatingIndID
}
&&report_id=
${
report
[
3
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&quartal=
${
quarter
}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
)
if
(
res
.
status
===
200
)
{
result
=
[...
result
,
res
];
}
}
catch
(
error
)
{
alert
(
error
)
}
}
}
...
...
src/container/OutlookPA/OutlookPA.js
View file @
22fdf53b
...
...
@@ -898,18 +898,31 @@ export default class OutlookPA extends Component {
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
if
(
type
===
"PL"
)
{
this
.
setState
({
visiblePL
:
false
,
visibleOutlookPA
:
true
})
}
else
if
(
type
===
"TP"
)
{
this
.
setState
({
visibleTP
:
false
,
visibleOutlookPA
:
true
})
}
else
if
(
type
===
"BS"
)
{
this
.
setState
({
visibleBS
:
false
,
visibleOutlookPA
:
true
})
}
else
{
this
.
setState
({
visibleOutlookPA
:
true
,
loading
:
false
})
}
this
.
getOutlookPAID
(
type
)
}
else
{
this
.
setState
({
visibleAlertSave
:
true
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
this
.
getOutlookPAID
()
})
if
(
response
.
data
.
message
==
"Please Set Up Rate Currency First"
)
{
this
.
setState
({
visibleAlertSave
:
true
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
this
.
getOutlookPAID
()
})
}
}
// else {
// this.setState({ loading: false }, () => {
...
...
@@ -2714,6 +2727,42 @@ export default class OutlookPA extends Component {
<
/div
>
<
/div
>
)}
{
this
.
state
.
visibleAlertSave
&&
(
<
div
className
=
"test app-popup-show"
>
<
div
className
=
"popup-content border-radius"
style
=
{{
background
:
'#FFF27D'
,
borderRadius
:
10
,
width
:
715
,
height
:
238
}}
>
<
div
style
=
{{
margin
:
30
}}
>
<
div
style
=
{{
display
:
'flex'
,
marginTop
:
76
,
marginBottom
:
43
}}
>
<
div
style
=
{{
alignSelf
:
'center'
,
marginRight
:
25
}}
>
<
img
src
=
{
Images
.
warning
}
/
>
<
/div
>
<
div
style
=
{{
justifyContent
:
'center'
,
fontSize
:
20
,
color
:
'#1D2995'
,
marginTop
:
10
}}
>
<
b
>
Rate
Currency
USD
<
/b> pada periode yang dipilih <b>belum</
b
>
diatur
.
<
br
/>
Silahkan
menghubungi
Superadmin
<
/div
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'flex-end'
}}
>
<
button
className
=
"button"
type
=
"button"
style
=
{{
background
:
'#F6F7F9'
,
cursor
:
'pointer'
,
border
:
'1px solid #3549609e'
,
outline
:
'none'
,
marginRight
:
20
,
borderRadius
:
9
}}
onClick
=
{()
=>
this
.
setState
({
visibleAlertSave
:
false
,
loading
:
false
})}
>
<
div
style
=
{{
backgroundColor
:
'#fff'
,
width
:
105
,
height
:
30
,
borderRadius
:
9
,
justifyContent
:
'center'
,
display
:
'flex'
,
alignItems
:
'center'
,
border
:
'solid 1px #3549609e'
}}
>
<
Typography
style
=
{{
fontSize
:
'15px'
,
color
:
'#354960'
,
textAlign
:
'center'
}}
>
Close
<
/Typography
>
<
/div
>
<
/button
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
)}
<
/div
>
);
}
...
...
src/container/OutlookPA/ProfitLossOLPA.js
View file @
22fdf53b
...
...
@@ -328,7 +328,7 @@ export default class ProfitLossOLPA extends Component {
}
else
{
this
.
props
.
saveToOLPA
(
payload
)
}
this
.
props
.
onClickClose
()
//
this.props.onClickClose()
}
downloadTemplate
=
async
()
=>
{
...
...
@@ -494,15 +494,19 @@ export default class ProfitLossOLPA extends Component {
this
.
props
.
getReport
()
}
}
else
{
this
.
setState
({
visibleAlertSave
:
true
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
alert
(
response
.
data
.
status
)
if
(
response
.
data
.
message
==
"Please Set Up Rate Currency First"
)
{
this
.
setState
({
visibleAlertSave
:
true
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
alert
(
response
.
data
.
status
)
}
}
}
else
{
this
.
setState
({
loading
:
false
})
...
...
@@ -1742,6 +1746,11 @@ export default class ProfitLossOLPA extends Component {
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
}
]
...
...
src/container/OutlookPA/TaxPlanningOLPA.js
View file @
22fdf53b
...
...
@@ -514,8 +514,13 @@ export default class TaxPlanningOLPA extends Component {
console
.
log
(
payload
);
// console.log(JSON.stringify(payload));
// this.setState({ loading: false })
this
.
props
.
saveToOLPA
(
payload
)
this
.
props
.
onClickClose
()
if
(
type
==
'submitted'
)
{
this
.
props
.
saveToOLPA
(
payload
,
'TP'
)
}
else
{
this
.
props
.
saveToOLPA
(
payload
)
}
// this.props.saveToOLPA(payload)
// this.props.onClickClose()
}
fileHandler
=
(
event
)
=>
{
...
...
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