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
77b32080
Commit
77b32080
authored
May 30, 2023
by
Riri Novita
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Banyak (MR, OLPA, Fixing Issue)
parent
abeb94ee
Changes
17
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
2111 additions
and
1495 deletions
+2111
-1495
BudgetTahunan.js
src/container/BudgetTahunan/BudgetTahunan.js
+8
-1
CreateCompany.js
src/container/MasterData/Company/CreateCompany.js
+38
-20
EditCompany.js
src/container/MasterData/Company/EditCompany.js
+1
-0
BalanceSheetMR.js
src/container/MonthlyReport/BalanceSheetMR.js
+67
-18
CashFlowMR.js
src/container/MonthlyReport/CashFlowMR.js
+5
-1
CorporateAnnualTargetMR.js
src/container/MonthlyReport/CorporateAnnualTargetMR.js
+81
-33
FixedAssetsMovementMR.js
src/container/MonthlyReport/FixedAssetsMovementMR.js
+67
-18
ListOfCreditFacilitiesMR.js
src/container/MonthlyReport/ListOfCreditFacilitiesMR.js
+1328
-1278
MonthlyReport.js
src/container/MonthlyReport/MonthlyReport.js
+36
-0
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+18
-15
TaxPlanningMR.js
src/container/MonthlyReport/TaxPlanningMR.js
+77
-28
BalanceSheetOLPA.js
src/container/OutlookPA/BalanceSheetOLPA.js
+68
-19
CashFlowOLPA.js
src/container/OutlookPA/CashFlowOLPA.js
+4
-0
CorporateAnnualTargetOLPA.js
src/container/OutlookPA/CorporateAnnualTargetOLPA.js
+67
-19
OutlookPA.js
src/container/OutlookPA/OutlookPA.js
+104
-8
ProfitLossOLPA.js
src/container/OutlookPA/ProfitLossOLPA.js
+75
-18
TaxPlanningOLPA.js
src/container/OutlookPA/TaxPlanningOLPA.js
+67
-19
No files found.
src/container/BudgetTahunan/BudgetTahunan.js
View file @
77b32080
...
...
@@ -1299,7 +1299,14 @@ export default class BudgetTahunan extends Component {
createCashFlow
(
payload
)
{
api
.
create
().
createReportCF
(
payload
).
then
((
res
)
=>
{
// console.log(res)
// this.getSubmission()
if
(
res
.
data
)
{
if
(
res
.
data
.
status
===
"success"
)
{
this
.
getSubmission
()
}
else
{
this
.
setState
({
visibleAlertSave
:
true
})
}
}
// if (response.data) {
// if (response.data.status === "success") {
// this.props.saveToMonthlyReport()
...
...
src/container/MasterData/Company/CreateCompany.js
View file @
77b32080
...
...
@@ -49,6 +49,7 @@ export default class CreatePerusahaan extends Component {
alert
:
false
,
tipeAlert
:
''
,
messageAlert
:
''
,
optionCurrecy
:
[]
}
}
...
...
@@ -94,6 +95,9 @@ export default class CreatePerusahaan extends Component {
// console.log(response.data.data.default_currency, datas);
}
let
index
=
datas
.
findIndex
((
val
)
=>
val
.
id
==
response
.
data
.
data
.
default_currency
)
let
findIdx
=
datas
.
findIndex
(
e
=>
e
.
id
===
2
)
let
bizpar
=
findIdx
>=
0
?
datas
.
filter
(
e
=>
e
.
id
===
2
)
:
datas
console
.
log
(
bizpar
);
this
.
setState
({
businessID
:
response
.
data
.
data
.
business_unit_id
,
companyID
:
response
.
data
.
data
.
company_id
,
...
...
@@ -108,7 +112,8 @@ export default class CreatePerusahaan extends Component {
updated
:
response
.
data
.
data
.
updated
===
null
?
""
:
response
.
data
.
data
.
updated
,
defaultCurrencyID
:
response
.
data
.
data
.
default_currency
,
currency
:
datas
,
defaultCurrency
:
index
==
-
1
?
null
:
datas
[
index
]
defaultCurrency
:
index
==
-
1
?
null
:
datas
[
index
],
optionCurrecy
:
bizpar
,
},
()
=>
{
// setTimeout(() => {
this
.
getAllUnitBisnis
()
...
...
@@ -477,13 +482,20 @@ export default class CreatePerusahaan extends Component {
options
=
{
this
.
state
.
dataCurrency
}
getOptionLabel
=
{(
option
)
=>
option
.
value
}
getOptionSelected
=
{(
option
,
value
)
=>
option
.
id
===
value
.
id
}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
currency
:
newInputValue
},
()
=>
{
onChange
=
{(
event
,
newInputValue
)
=>
{
let
findIdx
=
newInputValue
.
findIndex
(
e
=>
e
.
id
===
2
)
let
bizpar
=
findIdx
>=
0
?
this
.
state
.
dataCurrency
.
filter
(
e
=>
e
.
id
===
2
)
:
newInputValue
this
.
setState
({
optionCurrecy
:
bizpar
,
currency
:
newInputValue
},
()
=>
{
if
(
this
.
state
.
defaultCurrency
)
{
const
result
=
this
.
state
.
currency
.
find
((
elem
)
=>
elem
.
id
===
this
.
state
.
defaultCurrency
.
id
)
this
.
setState
({
defaultCurrency
:
result
})
}
})}
})
}}
renderInput
=
{(
params
)
=>
(
<
TextField
{...
params
}
...
...
@@ -594,7 +606,7 @@ export default class CreatePerusahaan extends Component {
<
Autocomplete
debug
id
=
"tipe"
options
=
{
this
.
state
.
curren
cy
}
options
=
{
this
.
state
.
optionCurre
cy
}
getOptionLabel
=
{(
option
)
=>
option
.
value
}
value
=
{
this
.
state
.
defaultCurrency
}
disableClearable
=
{
!
this
.
state
.
defaultCurrency
}
...
...
@@ -751,14 +763,20 @@ export default class CreatePerusahaan extends Component {
multiple
options
=
{
this
.
state
.
dataCurrency
}
getOptionLabel
=
{(
option
)
=>
option
.
value
}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
currency
:
newInputValue
},
()
=>
{
onChange
=
{(
event
,
newInputValue
)
=>
{
let
findIdx
=
newInputValue
.
findIndex
(
e
=>
e
.
id
===
2
)
let
bizpar
=
findIdx
>=
0
?
this
.
state
.
dataCurrency
.
filter
(
e
=>
e
.
id
===
2
)
:
newInputValue
this
.
setState
({
optionCurrecy
:
bizpar
,
currency
:
newInputValue
},
()
=>
{
if
(
this
.
state
.
defaultCurrency
)
{
console
.
log
(
"tes"
);
const
result
=
this
.
state
.
currency
.
find
((
elem
)
=>
elem
.
id
===
this
.
state
.
defaultCurrency
.
id
)
this
.
setState
({
defaultCurrency
:
result
})
}
})}
})
}}
renderInput
=
{(
params
)
=>
(
<
TextField
{...
params
}
...
...
@@ -874,7 +892,7 @@ export default class CreatePerusahaan extends Component {
<
Autocomplete
debug
id
=
"tipe"
options
=
{
this
.
state
.
curren
cy
}
options
=
{
this
.
state
.
optionCurre
cy
}
getOptionLabel
=
{(
option
)
=>
option
.
value
}
value
=
{
this
.
state
.
defaultCurrency
}
disableClearable
=
{
!
this
.
state
.
defaultCurrency
}
...
...
src/container/MasterData/Company/EditCompany.js
View file @
77b32080
...
...
@@ -34,6 +34,7 @@ export default class EditPerusahaan extends Component {
msgErrorSD
:
''
,
msgErrorED
:
''
,
msgErrorJL
:
''
,
optionCurrecy
:
[]
}
}
...
...
src/container/MonthlyReport/BalanceSheetMR.js
View file @
77b32080
...
...
@@ -55,7 +55,9 @@ export default class BalanceSheetMR extends Component {
judulColumn
:
null
,
get_for
:
"view"
,
viewOnly
:
true
,
kansas
:
0
kansas
:
0
,
defaultCurrencyUpload
:
this
.
props
.
defaultCurrency
,
visibleAlertSave
:
false
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
...
...
@@ -174,6 +176,7 @@ export default class BalanceSheetMR extends Component {
"company_id"
:
this
.
props
.
company
.
company_id
,
"monthly_report_id"
:
this
.
props
.
monthlyReportId
,
"months"
:
this
.
props
.
month
.
month_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"get_for"
:
this
.
state
.
get_for
}
api
.
create
().
getHierarkiMontlyReportBS
(
payload
).
then
(
response
=>
{
...
...
@@ -367,7 +370,11 @@ export default class BalanceSheetMR extends Component {
}
checkUpload
()
{
api
.
create
().
checkUploadMonthlyReportBS
(
this
.
state
.
payload
).
then
(
response
=>
{
let
payload
=
{
...
this
.
state
.
payload
,
currency_id
:
this
.
state
.
defaultCurrencyUpload
?.
id
}
api
.
create
().
checkUploadMonthlyReportBS
(
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
console
.
log
(
response
)
if
(
response
.
data
)
{
...
...
@@ -466,6 +473,7 @@ export default class BalanceSheetMR extends Component {
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"status"
:
type
,
"months"
:
this
.
props
.
month
.
month_id
,
"balance_sheet"
:
data
...
...
@@ -497,7 +505,7 @@ export default class BalanceSheetMR extends Component {
this
.
setState
({
loading
:
false
,
handleDoubleClick
:
0
})
// this.props.getReport()
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
this
.
setState
({
visibleAlertSave
:
true
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
...
...
@@ -539,6 +547,7 @@ export default class BalanceSheetMR extends Component {
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"status"
:
type
,
"months"
:
this
.
props
.
month
.
month_id
,
"balance_sheet"
:
data
...
...
@@ -658,6 +667,7 @@ export default class BalanceSheetMR extends Component {
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"status"
:
"submitted"
,
"months"
:
this
.
props
.
month
.
month_id
,
"balance_sheet"
:
data
...
...
@@ -2992,6 +3002,7 @@ export default class BalanceSheetMR extends Component {
<
/button
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
'25px 30px'
}}
>
<
UploadFile
type
=
{
this
.
state
.
uploadStatus
}
percentage
=
{
this
.
state
.
percentage
}
...
...
@@ -3008,6 +3019,44 @@ export default class BalanceSheetMR extends Component {
}}
/
>
<
/div
>
<
div
style
=
{{
padding
:
'0px 30px 29px'
,
fontSize
:
17
,
color
:
'red'
}}
><
b
>
Warning
:
<
/b> Valid currency for uploading data is <b>{this.props.defaultCurrency.id == 1
?
"IDR" : "USD"}</
b
><
/div
>
<
/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
})}
>
<
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/MonthlyReport/CashFlowMR.js
View file @
77b32080
...
...
@@ -48,7 +48,9 @@ export default class CashFlowMR extends Component {
// valueThreshold: 0,
minValue
:
0
,
maxValue
:
0
,
viewOnly
:
true
viewOnly
:
true
,
defaultCurrencyUpload
:
this
.
props
.
defaultCurrency
,
visibleAlertSave
:
false
}
}
...
...
@@ -139,6 +141,7 @@ export default class CashFlowMR extends Component {
"company_id"
:
this
.
props
.
company
.
company_id
,
"monthly_report_id"
:
this
.
props
.
monthlyReportId
,
"months"
:
this
.
props
.
month
.
month_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"get_for"
:
"edit"
}
...
...
@@ -240,6 +243,7 @@ export default class CashFlowMR extends Component {
"report_id"
:
13
,
"status"
:
"submitted"
,
"months"
:
this
.
props
.
month
.
month_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"cash_flow"
:
listCF
}
this
.
props
.
createCashFlow
(
payload
)
...
...
src/container/MonthlyReport/CorporateAnnualTargetMR.js
View file @
77b32080
...
...
@@ -76,7 +76,9 @@ export default class CorporateAnnualTargetMR extends Component {
buttonError
:
true
,
viewOnly
:
true
,
aa
:
0
,
perfomanceScoreColor
:
'#fff'
perfomanceScoreColor
:
'#fff'
,
defaultCurrencyUpload
:
this
.
props
.
defaultCurrency
,
visibleAlertSave
:
false
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
...
...
@@ -201,6 +203,7 @@ export default class CorporateAnnualTargetMR extends Component {
"company_id"
:
this
.
props
.
company
.
company_id
,
"monthly_report_id"
:
this
.
props
.
monthlyReportId
,
"months"
:
this
.
props
.
month
.
month_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"get_for"
:
this
.
state
.
get_for
}
...
...
@@ -215,8 +218,8 @@ export default class CorporateAnnualTargetMR extends Component {
let
indexIDzz
=
dataTable
.
findIndex
((
val
)
=>
val
[
1
]
===
item
.
id
)
if
(
indexIDzz
===
-
1
)
{
let
parentTrue
=
item
.
parent_name
==
'INTERNAL BUSINESS PROCESS PERSPECTIVE'
||
item
.
parent_name
==
'CUSTOMER PERSPECTIVE'
let
weight
=
String
(
item
.
weight
).
includes
(
'%'
)?
String
(
item
.
weight
).
substr
(
0
,
String
(
item
.
weight
).
length
-
1
)
:
String
(
item
.
weight
)
let
weightTB
=
String
(
item
.
corporate_annual_target
.
weight
).
includes
(
'%'
)?
String
(
item
.
corporate_annual_target
.
weight
).
substr
(
0
,
String
(
item
.
corporate_annual_target
.
weight
).
length
-
1
)
:
String
(
item
.
corporate_annual_target
.
weight
)
let
weight
=
String
(
item
.
weight
).
includes
(
'%'
)
?
String
(
item
.
weight
).
substr
(
0
,
String
(
item
.
weight
).
length
-
1
)
:
String
(
item
.
weight
)
let
weightTB
=
String
(
item
.
corporate_annual_target
.
weight
).
includes
(
'%'
)
?
String
(
item
.
corporate_annual_target
.
weight
).
substr
(
0
,
String
(
item
.
corporate_annual_target
.
weight
).
length
-
1
)
:
String
(
item
.
corporate_annual_target
.
weight
)
// console.log(weight)
dataTable
.
push
([
item
.
type_report_id
,
...
...
@@ -408,7 +411,11 @@ export default class CorporateAnnualTargetMR extends Component {
checkUpload
()
{
this
.
setState
({
loading
:
true
})
api
.
create
().
checkUploadMonthlyReportCAT
(
this
.
state
.
payload
).
then
(
response
=>
{
let
payload
=
{
...
this
.
state
.
payload
,
currency_id
:
this
.
state
.
defaultCurrencyUpload
?.
id
}
api
.
create
().
checkUploadMonthlyReportCAT
(
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
console
.
log
(
this
.
state
.
payload
)
console
.
log
(
response
)
...
...
@@ -491,6 +498,7 @@ export default class CorporateAnnualTargetMR extends Component {
"report_id"
:
this
.
props
.
report_id
,
"status"
:
type
,
"months"
:
this
.
props
.
month
.
month_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"corporate_annual_target"
:
data
,
"total_score"
:
this
.
state
.
totalScore
,
"performance"
:
this
.
state
.
perfomanceScore
...
...
@@ -504,7 +512,7 @@ export default class CorporateAnnualTargetMR extends Component {
this
.
props
.
onClickClose
()
// this.props.getReport()
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
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
)
...
...
@@ -638,6 +646,7 @@ export default class CorporateAnnualTargetMR extends Component {
"report_id"
:
this
.
props
.
report_id
,
"status"
:
type
,
"months"
:
this
.
props
.
month
.
month_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"corporate_annual_target"
:
data
,
"total_score"
:
this
.
state
.
totalScore
,
"performance"
:
this
.
state
.
perfomanceScore
...
...
@@ -651,7 +660,7 @@ export default class CorporateAnnualTargetMR extends Component {
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
saveToMonthlyReport
()
}
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
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
...
...
@@ -756,7 +765,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
totalAch
=
String
(
totalAch
)
==
'NaN'
||
String
(
totalAch
)
==
'Infinity'
||
String
(
totalAch
)
==
'-Infinity'
?
0
:
totalAch
totalAch
=
this
.
props
.
lastStatus
==
'APPROVED'
?
item
[
13
]
:
Number
(
totalAch
)
*
100
totalAch
=
this
.
props
.
lastStatus
==
'APPROVED'
?
item
[
13
]
:
Number
(
totalAch
)
*
100
//score
let
listParameter
=
this
.
state
.
parameterScore
...
...
@@ -786,7 +795,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
})
}
let
totalScorez
=
this
.
props
.
lastStatus
==
'APPROVED'
?
item
[
14
]
:
Number
(
totalScore
).
toFixed
(
0
)
let
totalScorez
=
this
.
props
.
lastStatus
==
'APPROVED'
?
item
[
14
]
:
Number
(
totalScore
).
toFixed
(
0
)
// if (item[5] == "Max Quality drop from Bor-Barge") {
// console.log(totalScorez)
// }
...
...
@@ -803,7 +812,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
else
{
totalSW
=
(
Number
(
totalScorez
)
*
Number
(
handlePercent
)
/
100
)
}
totalSW
=
this
.
props
.
lastStatus
==
'APPROVED'
?
item
[
15
]
:
Number
(
totalSW
).
toFixed
(
2
)
totalSW
=
this
.
props
.
lastStatus
==
'APPROVED'
?
item
[
15
]
:
Number
(
totalSW
).
toFixed
(
2
)
if
(
item
[
0
]
!==
1
&&
item
[
0
]
!==
4
)
{
total
+=
Number
(
totalSW
)
}
...
...
@@ -2040,9 +2049,9 @@ export default class CorporateAnnualTargetMR extends Component {
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
,
maxWidth
:
'100%'
,
paddingLeft
:
15
,
paddingRight
:
15
,
marginTop
:
5
}}
>
<
div
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
,
marginTop
:
20
}}
>
Last
Updated
by
:
<
/Typography
>
<
div
style
=
{{
marginLeft
:
10
,
overflowY
:
'scroll'
,
height
:
this
.
state
.
updateBy
.
length
<
2
?
25
:
75
,
marginTop
:
10
}}
>
<
div
style
=
{{
marginLeft
:
10
,
overflowY
:
'scroll'
,
height
:
this
.
state
.
updateBy
.
length
<
2
?
25
:
75
,
marginTop
:
10
}}
>
{
this
.
state
.
updateBy
.
length
>
0
?
this
.
state
.
updateBy
.
reverse
().
map
((
item
,
index
)
=>
{
return
(
...
...
@@ -2223,9 +2232,9 @@ export default class CorporateAnnualTargetMR extends Component {
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
,
maxWidth
:
'100%'
,
paddingLeft
:
15
,
paddingRight
:
15
,
marginTop
:
5
}}
>
<
div
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
div
style
=
{{
display
:
'flex'
}}
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
,
marginTop
:
20
}}
>
Last
Updated
by
:
<
/Typography
>
<
div
style
=
{{
marginLeft
:
10
,
overflowY
:
'scroll'
,
height
:
this
.
state
.
updateBy
.
length
<
2
?
25
:
75
,
marginTop
:
10
}}
>
<
div
style
=
{{
marginLeft
:
10
,
overflowY
:
'scroll'
,
height
:
this
.
state
.
updateBy
.
length
<
2
?
25
:
75
,
marginTop
:
10
}}
>
{
this
.
state
.
updateBy
.
length
>
0
?
this
.
state
.
updateBy
.
reverse
().
map
((
item
,
index
)
=>
{
return
(
...
...
@@ -2376,6 +2385,7 @@ export default class CorporateAnnualTargetMR extends Component {
<
/button
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
'25px 30px'
}}
>
<
UploadFile
type
=
{
this
.
state
.
uploadStatus
}
percentage
=
{
this
.
state
.
percentage
}
...
...
@@ -2392,6 +2402,44 @@ export default class CorporateAnnualTargetMR extends Component {
}}
/
>
<
/div
>
<
div
style
=
{{
padding
:
'0px 30px 29px'
,
fontSize
:
17
,
color
:
'red'
}}
><
b
>
Warning
:
<
/b> Valid currency for uploading data is <b>{this.props.defaultCurrency.id == 1
?
"IDR" : "USD"}</
b
><
/div
>
<
/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
})}
>
<
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/MonthlyReport/FixedAssetsMovementMR.js
View file @
77b32080
...
...
@@ -51,7 +51,9 @@ export default class FixedAssetsMovementMR extends Component {
get_for
:
'view'
,
saveDraft
:
true
,
buttonError
:
true
,
viewOnly
:
true
viewOnly
:
true
,
defaultCurrencyUpload
:
this
.
props
.
defaultCurrency
,
visibleAlertSave
:
false
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
}
...
...
@@ -142,6 +144,7 @@ export default class FixedAssetsMovementMR extends Component {
"company_id"
:
this
.
props
.
company
.
company_id
,
"monthly_report_id"
:
this
.
props
.
monthlyReportId
,
"months"
:
this
.
props
.
month
.
month_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"get_for"
:
this
.
state
.
get_for
}
api
.
create
().
getHierarkiMontlyReportFAM
(
payload
).
then
(
response
=>
{
...
...
@@ -297,7 +300,11 @@ export default class FixedAssetsMovementMR extends Component {
}
checkUpload
()
{
api
.
create
().
checkUploadMonthlyReportFAM
(
this
.
state
.
payload
).
then
(
response
=>
{
let
payload
=
{
...
this
.
state
.
payload
,
currency_id
:
this
.
state
.
defaultCurrencyUpload
?.
id
}
api
.
create
().
checkUploadMonthlyReportFAM
(
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
// console.log(this.state.payload)
console
.
log
(
response
)
...
...
@@ -371,6 +378,7 @@ export default class FixedAssetsMovementMR extends Component {
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"status"
:
type
,
"months"
:
this
.
props
.
month
.
month_id
,
"fixed_asset_movement"
:
data
...
...
@@ -388,7 +396,7 @@ export default class FixedAssetsMovementMR extends Component {
}
// this.props.getReport()
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
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
)
...
...
@@ -424,6 +432,7 @@ export default class FixedAssetsMovementMR extends Component {
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"status"
:
type
,
"months"
:
this
.
props
.
month
.
month_id
,
"fixed_asset_movement"
:
data
...
...
@@ -489,6 +498,7 @@ export default class FixedAssetsMovementMR extends Component {
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"status"
:
"submitted"
,
"months"
:
this
.
props
.
month
.
month_id
,
"fixed_asset_movement"
:
data
...
...
@@ -1709,6 +1719,7 @@ export default class FixedAssetsMovementMR extends Component {
<
/button
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
'25px 30px'
}}
>
<
UploadFile
type
=
{
this
.
state
.
uploadStatus
}
percentage
=
{
this
.
state
.
percentage
}
...
...
@@ -1725,6 +1736,44 @@ export default class FixedAssetsMovementMR extends Component {
}}
/
>
<
/div
>
<
div
style
=
{{
padding
:
'0px 30px 29px'
,
fontSize
:
17
,
color
:
'red'
}}
><
b
>
Warning
:
<
/b> Valid currency for uploading data is <b>{this.props.defaultCurrency.id == 1
?
"IDR" : "USD"}</
b
><
/div
>
<
/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
})}
>
<
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/MonthlyReport/ListOfCreditFacilitiesMR.js
View file @
77b32080
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/container/MonthlyReport/MonthlyReport.js
View file @
77b32080
...
...
@@ -3730,6 +3730,42 @@ export default class MonthlyReport 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
})}
>
<
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/MonthlyReport/ProfitLossMR.js
View file @
77b32080
...
...
@@ -2426,6 +2426,7 @@ export default class ProfitLossMR extends Component {
<
/button
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
'25px 30px'
}}
>
<
UploadFile
type
=
{
this
.
state
.
uploadStatus
}
percentage
=
{
this
.
state
.
percentage
}
...
...
@@ -2442,6 +2443,8 @@ export default class ProfitLossMR extends Component {
}}
/
>
<
/div
>
<
div
style
=
{{
padding
:
'0px 30px 29px'
,
fontSize
:
17
,
color
:
'red'
}}
><
b
>
Warning
:
<
/b> Valid currency for uploading data is <b>{this.props.defaultCurrency.id == 1
?
"IDR" : "USD"}</
b
><
/div
>
<
/div
>
<
/div
>
)}
...
...
src/container/MonthlyReport/TaxPlanningMR.js
View file @
77b32080
...
...
@@ -56,7 +56,9 @@ export default class TaxPlanningMR extends Component {
saveDraft
:
true
,
buttonError
:
true
,
get_for
:
"view"
,
viewOnly
:
true
viewOnly
:
true
,
defaultCurrencyUpload
:
this
.
props
.
defaultCurrency
,
visibleAlertSave
:
false
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
...
@@ -182,6 +184,7 @@ export default class TaxPlanningMR extends Component {
"company_id"
:
this
.
props
.
company
.
company_id
,
"monthly_report_id"
:
this
.
props
.
monthlyReportId
,
"months"
:
this
.
props
.
month
.
month_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"get_for"
:
this
.
state
.
get_for
}
api
.
create
().
getHierarkiMontlyReportTP
(
payload
).
then
(
response
=>
{
...
...
@@ -315,6 +318,7 @@ export default class TaxPlanningMR extends Component {
"report_id"
:
this
.
props
.
report_id
,
"status"
:
type
,
"months"
:
this
.
props
.
month
.
month_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"tax_planning"
:
data
}
...
...
@@ -385,7 +389,11 @@ export default class TaxPlanningMR extends Component {
}
checkUpload
()
{
api
.
create
().
checkUploadMonthlyReportTP
(
this
.
state
.
payload
).
then
(
response
=>
{
let
payload
=
{
...
this
.
state
.
payload
,
currency_id
:
this
.
state
.
defaultCurrencyUpload
?.
id
}
api
.
create
().
checkUploadMonthlyReportTP
(
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
console
.
log
(
this
.
state
.
payload
)
console
.
log
(
response
)
...
...
@@ -460,6 +468,7 @@ export default class TaxPlanningMR extends Component {
"report_id"
:
this
.
props
.
report_id
,
"status"
:
type
,
"months"
:
this
.
props
.
month
.
month_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"tax_planning"
:
data
}
// console.log(data);
...
...
@@ -471,7 +480,7 @@ export default class TaxPlanningMR extends Component {
if
(
response
.
data
.
status
===
"success"
)
{
this
.
props
.
saveToMonthlyReport
()
}
else
{
this
.
setState
({
loading
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
this
.
setState
({
visibleAlertSave
:
true
,
loading
:
false
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
...
...
@@ -530,6 +539,7 @@ export default class TaxPlanningMR extends Component {
"report_id"
:
this
.
props
.
report_id
,
"status"
:
"submitted"
,
"months"
:
this
.
props
.
month
.
month_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"tax_planning"
:
data
}
api
.
create
().
validateSubmitReportMRTP
(
payload
).
then
((
response
)
=>
{
...
...
@@ -1871,6 +1881,7 @@ export default class TaxPlanningMR extends Component {
<
/button
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
'25px 30px'
}}
>
<
UploadFile
type
=
{
this
.
state
.
uploadStatus
}
percentage
=
{
this
.
state
.
percentage
}
...
...
@@ -1887,6 +1898,44 @@ export default class TaxPlanningMR extends Component {
}}
/
>
<
/div
>
<
div
style
=
{{
padding
:
'0px 30px 29px'
,
fontSize
:
17
,
color
:
'red'
}}
><
b
>
Warning
:
<
/b> Valid currency for uploading data is <b>{this.props.defaultCurrency.id == 1
?
"IDR" : "USD"}</
b
><
/div
>
<
/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
})}
>
<
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/BalanceSheetOLPA.js
View file @
77b32080
...
...
@@ -54,7 +54,9 @@ export default class BalanceSheetOLPA extends Component {
get_for
:
'view'
,
minValue
:
"0"
,
maxValue
:
"0"
,
kansas
:
0
kansas
:
0
,
defaultCurrencyUpload
:
this
.
props
.
defaultCurrency
,
visibleAlertSave
:
false
}
this
.
handleValue
=
this
.
handleValue
.
bind
(
this
)
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
...
@@ -179,7 +181,8 @@ export default class BalanceSheetOLPA extends Component {
"revision"
:
this
.
props
.
revision
,
"periode"
:
this
.
props
.
periode
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"get_for"
:
this
.
state
.
get_for
"get_for"
:
this
.
state
.
get_for
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
}
let
response
=
await
api
.
create
().
getDetailReportOLPA
(
payload
)
console
.
log
(
payload
);
...
...
@@ -320,6 +323,7 @@ export default class BalanceSheetOLPA extends Component {
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"status"
:
type
,
"balance_sheet"
:
data
}
...
...
@@ -407,7 +411,11 @@ export default class BalanceSheetOLPA extends Component {
}
checkUpload
()
{
api
.
create
().
checkUploadOLPA
(
this
.
state
.
payload
).
then
(
response
=>
{
let
payload
=
{
...
this
.
state
.
payload
,
currency_id
:
this
.
state
.
defaultCurrencyUpload
?.
id
}
api
.
create
().
checkUploadOLPA
(
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
console
.
log
(
response
)
if
(
response
.
data
)
{
...
...
@@ -492,6 +500,7 @@ export default class BalanceSheetOLPA extends Component {
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
report_id
:
this
.
props
.
report_id
,
currency_id
:
this
.
state
.
defaultCurrencyUpload
?.
id
,
balance_sheet
:
data
,
status
:
type
}
...
...
@@ -518,7 +527,7 @@ export default class BalanceSheetOLPA extends Component {
this
.
props
.
getReport
()
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
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
)
...
...
@@ -601,6 +610,7 @@ export default class BalanceSheetOLPA extends Component {
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"balance_sheet"
:
data
,
"status"
:
"submitted"
}
...
...
@@ -2215,6 +2225,7 @@ export default class BalanceSheetOLPA extends Component {
<
/button
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
'25px 30px'
}}
>
<
UploadFile
type
=
{
this
.
state
.
uploadStatus
}
percentage
=
{
this
.
state
.
percentage
}
...
...
@@ -2231,6 +2242,44 @@ export default class BalanceSheetOLPA extends Component {
}}
/
>
<
/div
>
<
div
style
=
{{
padding
:
'0px 30px 29px'
,
fontSize
:
17
,
color
:
'red'
}}
><
b
>
Warning
:
<
/b> Valid currency for uploading data is <b>{this.props.defaultCurrency.id == 1
?
"IDR" : "USD"}</
b
><
/div
>
<
/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
})}
>
<
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/CashFlowOLPA.js
View file @
77b32080
...
...
@@ -44,6 +44,8 @@ export default class CashFlow extends Component {
maxValue
:
"0"
,
handleDoubleClick
:
0
,
viewOnly
:
true
,
defaultCurrencyUpload
:
this
.
props
.
defaultCurrency
,
visibleAlertSave
:
false
}
}
...
...
@@ -144,6 +146,7 @@ export default class CashFlow extends Component {
"report_id"
:
this
.
props
.
report_id
,
"revision"
:
Number
(
this
.
props
.
revision
),
"outlook_pa_id"
:
this
.
props
.
outlook_pa_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
}
api
.
create
().
getHierarkiCFOLPA
(
payload
).
then
(
response
=>
{
let
dataTable
=
[]
...
...
@@ -345,6 +348,7 @@ export default class CashFlow extends Component {
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"status"
:
"submitted"
,
// "quartal": this.props.quarter,
"cash_flow"
:
dbcf
...
...
src/container/OutlookPA/CorporateAnnualTargetOLPA.js
View file @
77b32080
...
...
@@ -72,6 +72,8 @@ export default class CorporateAnnualTargetRO extends Component {
editable
:
false
,
get_for
:
'view'
,
viewOnly
:
true
,
defaultCurrencyUpload
:
this
.
props
.
defaultCurrency
,
visibleAlertSave
:
false
}
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
...
@@ -127,6 +129,7 @@ export default class CorporateAnnualTargetRO extends Component {
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"revision"
:
Number
(
this
.
props
.
revision
),
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
// "rolling_outlook_id": this.props.rollingOutlookID,
"outlook_pa_id"
:
this
.
props
.
outlook_pa_id
,
}
...
...
@@ -422,6 +425,7 @@ export default class CorporateAnnualTargetRO extends Component {
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"quartal"
:
'q1'
,
"status"
:
type
,
"cat"
:
data
,
...
...
@@ -524,8 +528,12 @@ export default class CorporateAnnualTargetRO extends Component {
}
checkUpload
()
{
let
payload
=
{
...
this
.
state
.
payload
,
currency_id
:
this
.
state
.
defaultCurrencyUpload
?.
id
}
this
.
setState
({
loading
:
true
,
dataTable
:
[]
})
api
.
create
().
checkUploadOLPA
(
this
.
state
.
payload
).
then
(
response
=>
{
api
.
create
().
checkUploadOLPA
(
payload
).
then
(
response
=>
{
console
.
log
(
JSON
.
stringify
(
this
.
state
.
payload
));
console
.
log
(
this
.
state
.
payload
)
console
.
log
(
response
)
...
...
@@ -547,7 +555,7 @@ export default class CorporateAnnualTargetRO extends Component {
item
.
formula
,
item
.
level
,
item
.
item_report
,
Number
(
String
(
item
.
weight
).
substr
(
0
,
String
(
item
.
weight
).
length
-
1
)),
Number
(
String
(
item
.
weight
).
substr
(
0
,
String
(
item
.
weight
).
length
-
1
)),
item
.
uom
,
item
.
kpi_type
==
""
||
item
.
kpi_type
==
null
?
null
:
{
value
:
item
.
kpi_type
},
item
.
max_ach
==
""
||
item
.
max_ach
==
null
?
null
:
{
value
:
titleCase
(
item
.
max_ach
)
},
...
...
@@ -650,6 +658,7 @@ export default class CorporateAnnualTargetRO extends Component {
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"currency_id"
:
this
.
state
.
defaultCurrencyUpload
?.
id
,
"quartal"
:
'q1'
,
"status"
:
type
,
"cat"
:
data
,
...
...
@@ -669,7 +678,7 @@ export default class CorporateAnnualTargetRO extends Component {
// this.props.refresh()
this
.
props
.
getReport
()
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
this
.
setState
({
visibleAlertSave
:
true
,
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
)
||
response
.
data
.
message
.
includes
(
"Token Expired"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
...
...
@@ -2465,6 +2474,7 @@ export default class CorporateAnnualTargetRO extends Component {
<
/button
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
'25px 30px'
}}
>
<
UploadFile
type
=
{
this
.
state
.
uploadStatus
}
percentage
=
{
this
.
state
.
percentage
}
...
...
@@ -2480,6 +2490,44 @@ export default class CorporateAnnualTargetRO extends Component {
this
.
setState
({
alert
:
true
,
messageAlert
:
"Invalid Template"
,
tipeAlert
:
'warning'
})
}}
/
>
<
div
style
=
{{
padding
:
'0px 30px 29px'
,
fontSize
:
17
,
color
:
'red'
}}
><
b
>
Warning
:
<
/b> Valid currency for uploading data is <b>{this.props.defaultCurrency.id == 1
?
"IDR" : "USD"}</
b
><
/div
>
<
/div
>
<
/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
})}
>
<
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
>
)}
...
...
src/container/OutlookPA/OutlookPA.js
View file @
77b32080
...
...
@@ -88,7 +88,21 @@ export default class OutlookPA extends Component {
isCheckAll
:
false
,
downloadedFileReportId
:
null
,
arrayReport
:
[],
popupDownload
:
false
popupDownload
:
false
,
defaultCurrency
:
null
,
dataCurrency
:
[],
currency
:
[],
visibleAlertSave
:
false
,
dataCurrency
:
[
{
"id"
:
1
,
"value"
:
"IDR"
},
{
"id"
:
2
,
"value"
:
"USD"
,
}
]
}
this
.
myRef
=
React
.
createRef
()
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
...
@@ -144,6 +158,50 @@ export default class OutlookPA extends Component {
})
}
getCurrency
(
companyID
)
{
// console.log(companyID);
api
.
create
().
getDetailPerusahaan
(
companyID
).
then
(
response
=>
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
data
=
response
.
data
.
data
let
datas
=
[]
if
(
response
.
data
.
data
.
currency
.
length
>
0
)
{
response
.
data
.
data
.
currency
.
map
((
item
)
=>
{
// console.log(item);
datas
.
push
({
id
:
item
.
currencyId
,
value
:
item
.
currencyName
})
})
}
let
index
=
datas
.
findIndex
((
val
)
=>
val
.
id
==
response
.
data
.
data
.
default_currency
)
this
.
setState
({
defaultCurrencyID
:
response
.
data
.
data
.
default_currency
,
currency
:
datas
,
defaultCurrency
:
index
==
-
1
?
null
:
datas
[
index
]
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
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'
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
})
}
getCompanySubmitted
()
{
let
selectedStatus
=
this
.
state
.
selectedStatus
.
map
((
item
)
=>
{
return
item
.
value
...
...
@@ -201,6 +259,7 @@ export default class OutlookPA extends Component {
console
.
log
(
response
.
data
.
data
);
if
(
response
.
data
.
data
.
length
>
0
)
{
this
.
getRevision
()
this
.
getCurrency
(
this
.
state
.
company
.
company_id
)
}
else
{
this
.
setState
({
listRevision
:
null
,
revision
:
null
,
dataTable
:
[],
checkApprover
:
false
,
lastRevision
:
""
,
visibleTableHistory
:
false
,
loading
:
false
})
}
...
...
@@ -257,6 +316,7 @@ export default class OutlookPA extends Component {
let
payload
=
{
"company_id"
:
this
.
state
.
company
.
company_id
,
"periode"
:
this
.
state
.
periode
.
periode
,
"currency_id"
:
this
.
state
.
defaultCurrency
.
id
,
"report_type"
:
"Outlook PA"
,
}
api
.
create
().
getReportOLPA
(
payload
).
then
(
response
=>
{
...
...
@@ -482,6 +542,7 @@ export default class OutlookPA extends Component {
// this.getRevision()
// }
this
.
getDetailUser
()
// this.getCurrency(this.state.company.company_id)
})
}
}
...
...
@@ -838,7 +899,7 @@ export default class OutlookPA extends Component {
if
(
response
.
data
.
status
===
"success"
)
{
this
.
getOutlookPAID
(
type
)
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
,
handleDoubleClick
:
0
},
()
=>
{
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
(()
=>
{
...
...
@@ -1504,7 +1565,7 @@ export default class OutlookPA extends Component {
// }
async
handleGenerateReport
(
data
)
{
let
{
selectReport
,
outlook_pa_id
,
company
,
periode
,
month
,
downloadedFileReportId
,
quarter
}
=
this
.
state
let
{
selectReport
,
outlook_pa_id
,
company
,
periode
,
month
,
downloadedFileReportId
,
quarter
,
defaultCurrency
}
=
this
.
state
if
(
selectReport
.
length
>
0
)
{
let
result
=
[]
console
.
log
(
'mulai hit'
)
...
...
@@ -1512,18 +1573,18 @@ export default class OutlookPA extends Component {
let
datas
=
data
.
findIndex
((
val
)
=>
val
[
4
]
==
items
)
let
report
=
data
[
datas
]
if
(
items
===
38
)
{
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/cash_flow/outlook_pa/export_outlook_pa?outlook_pa_id=
${
outlook_pa_id
}
&&report_id=
${
report
[
4
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&&download_file_report_id=
${
downloadedFileReportId
}
`
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/cash_flow/outlook_pa/export_outlook_pa?outlook_pa_id=
${
outlook_pa_id
}
&&report_id=
${
report
[
4
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/cash_flow/outlook_pa/export_outlook_pa?outlook_pa_id=
${
outlook_pa_id
===
null
?
""
:
outlook_pa_id
}
&&report_id=
${
report
[
4
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&&download_file_report_id=
${
downloadedFileReportId
}
`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/cash_flow/outlook_pa/export_outlook_pa?outlook_pa_id=
${
outlook_pa_id
===
null
?
""
:
outlook_pa_id
}
&&report_id=
${
report
[
4
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
)
if
(
res
.
status
===
200
)
{
result
=
[...
result
,
res
];
}
}
else
{
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=
${
outlook_pa_id
}
&&report_id=
${
report
[
4
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&&download_file_report_id=
${
downloadedFileReportId
}
`
let
url
=
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=
${
outlook_pa_id
}
&&report_id=
${
report
[
4
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
let
res
=
await
fetch
(
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=
${
outlook_pa_id
===
null
?
""
:
outlook_pa_id
}
&&report_id=
${
report
[
4
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&&download_file_report_id=
${
downloadedFileReportId
}
`
`
${
process
.
env
.
REACT_APP_URL_MAIN_BE
}
/public/transaction/outlook_pa/export_outlook_pa?outlook_pa_id=
${
outlook_pa_id
===
null
?
""
:
outlook_pa_id
}
&&report_id=
${
report
[
4
]}
&&company_id=
${
company
.
company_id
}
&&year=
${
periode
.
periode
}
&&revision=
${
report
[
2
]}
&&download_file_report_id=
${
downloadedFileReportId
}
&¤cy_id=
${
defaultCurrency
.
id
}
`
)
if
(
res
.
status
===
200
)
{
...
...
@@ -1897,7 +1958,7 @@ export default class OutlookPA extends Component {
<
Typography
style
=
{{
fontSize
:
'12px'
,
color
:
'#4b4b4b'
,
margin
:
10
}}
>
Outlook
Performance
Appraisal
<
/Typography
>
<
/div
>
<
div
style
=
{{
padding
:
20
}}
>
<
div
>
<
div
style
=
{{
display
:
"flex"
}}
>
<
Autocomplete
{...
this
.
state
.
listPeriode
}
id
=
"periode"
...
...
@@ -1919,6 +1980,30 @@ export default class OutlookPA extends Component {
/>
}
value
=
{
this
.
state
.
periode
}
/
>
<
Autocomplete
id
=
"tipe"
disableClearable
options
=
{
this
.
state
.
currency
}
getOptionLabel
=
{(
option
)
=>
option
.
value
}
value
=
{
this
.
state
.
defaultCurrency
}
// onChange={(event, newInputValue) => this.setState({ defaultCurrency: newInputValue })}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
defaultCurrency
:
newInputValue
},
()
=>
{
this
.
getRevision
()
})}
style
=
{{
width
:
250
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
variant
=
"standard"
label
=
"Currency"
margin
=
"normal"
style
=
{{
marginTop
:
7
,
marginLeft
:
20
}}
// InputProps={{ ...params.InputProps, style: { fontSize: 11 } }}
// InputLabelProps={{ style: { fontSize: 11, color: '#7e8085' } }}
/
>
}
/
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
Autocomplete
...
...
@@ -1945,6 +2030,7 @@ export default class OutlookPA extends Component {
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
company
:
newInputValue
},
()
=>
{
this
.
setState
({
visibleTableHistory
:
false
})
this
.
getRevision
()
this
.
getCurrency
(
newInputValue
.
company_id
)
})}
disableClearable
style
=
{{
width
:
250
}}
...
...
@@ -2315,6 +2401,8 @@ export default class OutlookPA extends Component {
height
=
{
this
.
props
.
height
}
width
=
{
this
.
props
.
width
}
company
=
{
this
.
state
.
company
}
defaultCurrency
=
{
this
.
state
.
defaultCurrency
}
currency
=
{
this
.
state
.
currency
}
revision
=
{
this
.
state
.
revisionTable
}
periode
=
{
this
.
state
.
periode
.
periode
}
outlook_pa_id
=
{
this
.
state
.
outlook_pa_id
}
...
...
@@ -2334,6 +2422,8 @@ export default class OutlookPA extends Component {
height
=
{
this
.
props
.
height
}
width
=
{
this
.
props
.
width
}
company
=
{
this
.
state
.
company
}
defaultCurrency
=
{
this
.
state
.
defaultCurrency
}
currency
=
{
this
.
state
.
currency
}
revision
=
{
this
.
state
.
revisionTable
}
periode
=
{
this
.
state
.
periode
.
periode
}
outlook_pa_id
=
{
this
.
state
.
outlook_pa_id
}
...
...
@@ -2354,6 +2444,8 @@ export default class OutlookPA extends Component {
height
=
{
this
.
props
.
height
}
width
=
{
this
.
props
.
width
}
company
=
{
this
.
state
.
company
}
defaultCurrency
=
{
this
.
state
.
defaultCurrency
}
currency
=
{
this
.
state
.
currency
}
revision
=
{
this
.
state
.
revisionTable
}
periode
=
{
this
.
state
.
periode
.
periode
}
outlook_pa_id
=
{
this
.
state
.
outlook_pa_id
}
...
...
@@ -2373,6 +2465,8 @@ export default class OutlookPA extends Component {
height
=
{
this
.
props
.
height
}
width
=
{
this
.
props
.
width
}
company
=
{
this
.
state
.
company
}
defaultCurrency
=
{
this
.
state
.
defaultCurrency
}
currency
=
{
this
.
state
.
currency
}
revision
=
{
this
.
state
.
revisionTable
}
periode
=
{
this
.
state
.
periode
.
periode
}
outlook_pa_id
=
{
this
.
state
.
outlook_pa_id
}
...
...
@@ -2393,6 +2487,8 @@ export default class OutlookPA extends Component {
height
=
{
this
.
props
.
height
}
width
=
{
this
.
props
.
width
}
company
=
{
this
.
state
.
company
}
defaultCurrency
=
{
this
.
state
.
defaultCurrency
}
currency
=
{
this
.
state
.
currency
}
revision
=
{
this
.
state
.
revisionTable
}
periode
=
{
this
.
state
.
periode
.
periode
}
outlook_pa_id
=
{
this
.
state
.
outlook_pa_id
}
...
...
src/container/OutlookPA/ProfitLossOLPA.js
View file @
77b32080
...
...
@@ -64,7 +64,9 @@ export default class ProfitLossOLPA extends Component {
buttonDraft
:
true
,
handleDoubleClick
:
0
,
viewOnly
:
true
,
get_for
:
'view'
get_for
:
'view'
,
defaultCurrencyUpload
:
this
.
props
.
defaultCurrency
,
visibleAlertSave
:
false
}
this
.
handleValue
=
this
.
handleValue
.
bind
(
this
)
this
.
fileHandler
=
this
.
fileHandler
.
bind
(
this
);
...
...
@@ -158,7 +160,8 @@ export default class ProfitLossOLPA extends Component {
"revision"
:
this
.
props
.
revision
,
"periode"
:
this
.
props
.
periode
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"get_for"
:
this
.
state
.
get_for
"get_for"
:
this
.
state
.
get_for
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
}
console
.
log
(
payload
)
let
response
=
await
api
.
create
().
getDetailReportOLPA
(
payload
)
...
...
@@ -314,6 +317,7 @@ export default class ProfitLossOLPA extends Component {
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"status"
:
type
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"profit_loss"
:
data
}
console
.
log
(
data
);
...
...
@@ -391,7 +395,11 @@ export default class ProfitLossOLPA extends Component {
}
checkUpload
()
{
api
.
create
().
checkUploadOLPA
(
this
.
state
.
payload
).
then
(
response
=>
{
let
payload
=
{
...
this
.
state
.
payload
,
currency_id
:
this
.
state
.
defaultCurrencyUpload
?.
id
}
api
.
create
().
checkUploadOLPA
(
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
console
.
log
(
response
)
if
(
response
.
data
)
{
...
...
@@ -469,6 +477,7 @@ export default class ProfitLossOLPA extends Component {
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
report_id
:
this
.
props
.
report_id
,
currency_id
:
this
.
state
.
defaultCurrencyUpload
?.
id
,
profit_loss
:
data
,
status
:
type
}
...
...
@@ -484,6 +493,14 @@ 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
)
}
}
else
{
...
...
@@ -539,6 +556,7 @@ export default class ProfitLossOLPA extends Component {
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"profit_loss"
:
data
,
"status"
:
"submitted"
}
...
...
@@ -2124,6 +2142,7 @@ export default class ProfitLossOLPA extends Component {
<
/button
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
'25px 30px'
}}
>
<
UploadFile
type
=
{
this
.
state
.
uploadStatus
}
percentage
=
{
this
.
state
.
percentage
}
...
...
@@ -2140,6 +2159,44 @@ export default class ProfitLossOLPA extends Component {
}}
/
>
<
/div
>
<
div
style
=
{{
padding
:
'0px 30px 29px'
,
fontSize
:
17
,
color
:
'red'
}}
><
b
>
Warning
:
<
/b> Valid currency for uploading data is <b>{this.props.defaultCurrency.id == 1
?
"IDR" : "USD"}</
b
><
/div
>
<
/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
})}
>
<
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/TaxPlanningOLPA.js
View file @
77b32080
...
...
@@ -52,7 +52,9 @@ export default class TaxPlanningOLPA extends Component {
buttonDraft
:
true
,
handleDoubleClick
:
0
,
get_for
:
"view"
,
viewOnly
:
true
viewOnly
:
true
,
defaultCurrencyUpload
:
this
.
props
.
defaultCurrency
,
visibleAlertSave
:
false
}
this
.
handleValue
=
this
.
handleValue
.
bind
(
this
)
...
...
@@ -169,7 +171,8 @@ export default class TaxPlanningOLPA extends Component {
"revision"
:
this
.
props
.
revision
,
"periode"
:
this
.
props
.
periode
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"get_for"
:
this
.
state
.
get_for
"get_for"
:
this
.
state
.
get_for
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
}
api
.
create
().
getDetailReportOLPA
(
payload
).
then
(
response
=>
{
console
.
log
(
payload
);
...
...
@@ -505,6 +508,7 @@ export default class TaxPlanningOLPA extends Component {
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"status"
:
type
,
"currency_id"
:
this
.
props
.
defaultCurrency
.
id
,
"tax_planning"
:
data
}
console
.
log
(
payload
);
...
...
@@ -619,7 +623,11 @@ export default class TaxPlanningOLPA extends Component {
}
checkUpload
()
{
api
.
create
().
checkUploadOLPA
(
this
.
state
.
payload
).
then
(
response
=>
{
let
payload
=
{
...
this
.
state
.
payload
,
currency_id
:
this
.
state
.
defaultCurrencyUpload
?.
id
}
api
.
create
().
checkUploadOLPA
(
payload
).
then
(
response
=>
{
// console.log(JSON.stringify(this.state.payload));
console
.
log
(
response
)
if
(
response
.
data
)
{
...
...
@@ -801,6 +809,7 @@ export default class TaxPlanningOLPA extends Component {
company_id
:
this
.
props
.
company
.
company_id
,
periode
:
this
.
props
.
periode
,
report_id
:
this
.
props
.
report_id
,
currency_id
:
this
.
state
.
defaultCurrencyUpload
?.
id
,
tax_planning
:
data
,
status
:
type
}
...
...
@@ -813,7 +822,7 @@ export default class TaxPlanningOLPA extends Component {
this
.
props
.
getReport
()
}
else
{
// this.setState({ alert: true, messageAlert: response.data.status, tipeAlert: 'error', loading: false })
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
,
loading
:
false
},
()
=>
{
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
)
...
...
@@ -3561,6 +3570,7 @@ export default class TaxPlanningOLPA extends Component {
<
/button
>
<
/div
>
<
/div
>
<
div
style
=
{{
padding
:
'25px 30px'
}}
>
<
UploadFile
type
=
{
this
.
state
.
uploadStatus
}
percentage
=
{
this
.
state
.
percentage
}
...
...
@@ -3577,6 +3587,44 @@ export default class TaxPlanningOLPA extends Component {
}}
/
>
<
/div
>
<
div
style
=
{{
padding
:
'0px 30px 29px'
,
fontSize
:
17
,
color
:
'red'
}}
><
b
>
Warning
:
<
/b> Valid currency for uploading data is <b>{this.props.defaultCurrency.id == 1
?
"IDR" : "USD"}</
b
><
/div
>
<
/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
})}
>
<
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
>
...
...
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