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
bfa1b3ee
Commit
bfa1b3ee
authored
Jun 14, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check API MB MR
parent
af06568d
Changes
7
Show 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 @
bfa1b3ee
...
...
@@ -662,10 +662,18 @@ 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
{
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
},
()
=>
{
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
)
...
...
@@ -674,6 +682,7 @@ export default class CorporateAnnualTarget extends Component {
}
})
}
}
}
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
(
response
.
data
.
status
===
"success"
)
{
if
(
type
==
'submitted'
)
{
this
.
props
.
saveToMasterBudget
(
payloadBro
,
'CAT'
)
}
else
{
this
.
props
.
saveToMasterBudget
(
payloadBro
)
}
}
else
{
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 @
bfa1b3ee
...
...
@@ -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 @
bfa1b3ee
...
...
@@ -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 @
bfa1b3ee
...
...
@@ -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,17 +721,21 @@ export default class OperatingIndicator extends Component {
String
(
report
[
1
]).
toLocaleLowerCase
().
includes
(
'dec'
)
?
12
:
null
if
(
String
(
report
[
1
]).
toLocaleLowerCase
().
includes
(
'master budget'
))
{
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
}
`
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
];
}
}
catch
(
e
)
{
alert
(
e
)
}
}
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
}
`
...
...
@@ -737,8 +744,12 @@ export default class OperatingIndicator extends Component {
if
(
res
.
status
===
200
)
{
result
=
[...
result
,
res
];
}
}
catch
(
error
)
{
alert
(
error
)
}
}
else
if
(
String
(
report
[
1
]).
toLocaleLowerCase
().
includes
(
'rolling outlook'
))
{
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
}
`
...
...
@@ -747,6 +758,9 @@ export default class OperatingIndicator extends Component {
if
(
res
.
status
===
200
)
{
result
=
[...
result
,
res
];
}
}
catch
(
error
)
{
alert
(
error
)
}
}
}
...
...
src/container/OutlookPA/OutlookPA.js
View file @
bfa1b3ee
...
...
@@ -898,9 +898,21 @@ 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
},
()
=>
{
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
(()
=>
{
...
...
@@ -911,6 +923,7 @@ export default class OutlookPA extends Component {
this
.
getOutlookPAID
()
})
}
}
// else {
// this.setState({ loading: false }, () => {
// // alert(response.data.message)
...
...
@@ -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 @
bfa1b3ee
...
...
@@ -328,7 +328,7 @@ export default class ProfitLossOLPA extends Component {
}
else
{
this
.
props
.
saveToOLPA
(
payload
)
}
this
.
props
.
onClickClose
()
//
this.props.onClickClose()
}
downloadTemplate
=
async
()
=>
{
...
...
@@ -494,7 +494,10 @@ 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
==
"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
)
...
...
@@ -504,6 +507,7 @@ export default class ProfitLossOLPA extends Component {
})
alert
(
response
.
data
.
status
)
}
}
}
else
{
this
.
setState
({
loading
:
false
})
alert
(
response
.
problem
)
...
...
@@ -1742,6 +1746,11 @@ export default class ProfitLossOLPA extends Component {
options
:
{
display
:
false
}
},
{
name
:
""
,
options
:
{
display
:
false
}
}
]
...
...
src/container/OutlookPA/TaxPlanningOLPA.js
View file @
bfa1b3ee
...
...
@@ -514,8 +514,13 @@ export default class TaxPlanningOLPA extends Component {
console
.
log
(
payload
);
// console.log(JSON.stringify(payload));
// this.setState({ loading: false })
if
(
type
==
'submitted'
)
{
this
.
props
.
saveToOLPA
(
payload
,
'TP'
)
}
else
{
this
.
props
.
saveToOLPA
(
payload
)
this
.
props
.
onClickClose
()
}
// 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