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
f9f8d2dd
Commit
f9f8d2dd
authored
Mar 24, 2021
by
faisalhamdi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/d.arizona/tia-dev
into faisal
parents
596417ef
90a82d4d
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
730 additions
and
750 deletions
+730
-750
index.js
src/api/index.js
+12
-4
MonthlyReport.js
src/container/MonthlyReport.js
+1
-1
OperatingIndicator.js
src/container/OprIndicator/OperatingIndicator.js
+1
-1
OutlookPA.js
src/container/OutlookPA.js
+10
-9
BalanceSheetOLPA.js
src/container/OutlookPA/BalanceSheetOLPA.js
+1
-0
ProfitLossOLPA.js
src/container/OutlookPA/ProfitLossOLPA.js
+1
-0
TaxPlanningOLPA.js
src/container/OutlookPA/TaxPlanningOLPA.js
+1
-0
RollingOutlook.js
src/container/RollingOutlook.js
+206
-65
OperatingIndicatorRO.js
src/container/RollingOutlook/OperatingIndicatorRO.js
+35
-45
ProfitLossRO.js
src/container/RollingOutlook/ProfitLossRO.js
+45
-45
TaxPlanningRO.js
src/container/RollingOutlook/TaxPlanningRO.js
+417
-580
No files found.
src/api/index.js
View file @
f9f8d2dd
...
...
@@ -260,8 +260,10 @@ const create = (type = "") => {
const
createRollingOutlookPL
=
(
body
)
=>
api
.
post
(
'transaction/profit_loss/rolling_outlook/create_rolling_outlook'
,
body
)
const
checkImportRollingOutlookPL
=
(
body
)
=>
api
.
post
(
'transaction/profit_loss/rolling_outlook/check_import'
,
body
)
const
importRollingOutlookPL
=
(
body
)
=>
api
.
post
(
'transaction/profit_loss/rolling_outlook/import_rolling_outlook'
,
body
)
const
getRollingOutlookTP
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/tax_planning/get_report_hierarki'
,
body
)
const
createRollingOutlookTP
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/tax_planning/store_ro_tax_planning'
,
body
)
const
getRollingOutlookTP
=
(
body
)
=>
api
.
post
(
'transaction/tax_planning/rolling_outlook/get_report_hierarki'
,
body
)
const
createRollingOutlookTP
=
(
body
)
=>
api
.
post
(
'transaction/tax_planning/rolling_outlook/create_rolling_outlook'
,
body
)
const
checkImportRollingOutlookTP
=
(
body
)
=>
api
.
post
(
'transaction/tax_planning/rolling_outlook/check_import'
,
body
)
const
importRollingOutlookTP
=
(
body
)
=>
api
.
post
(
'transaction/tax_planning/rolling_outlook/import_rolling_outlook'
,
body
)
const
getRollingOutlookCAT
=
(
body
)
=>
api
.
post
(
'transaction/cat/rolling_outlook/get_report_hierarki'
,
body
)
const
createRollingOutlookCAT
=
(
body
)
=>
api
.
post
(
'transaction/cat/rolling_outlook/create_rolling_outlook'
,
body
)
const
checkImportRollingOutlookCAT
=
(
body
)
=>
api
.
post
(
'transaction/cat/rolling_outlook/check_import'
,
body
)
...
...
@@ -274,6 +276,7 @@ const create = (type = "") => {
const
checkUploadRollingOutlookOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/rolling_outlook/check_import'
,
body
)
const
uploadRollingOutlookOI
=
(
body
)
=>
api
.
post
(
'transaction/operating_indicator/rolling_outlook/import_rolling_outlook'
,
body
)
const
submitRollingOutlook
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/submit_rolling_outlook'
,
body
)
const
getRollingOutlookCompanySubmitted
=
(
body
)
=>
api
.
post
(
'transaction/rolling_outlook/get_company_submitted'
,
body
)
//REPORT NEW
const
getAllReportBS
=
(
body
)
=>
api
.
post
(
'/transaction/db_balance_sheet/get_report_hierarki'
,
body
)
...
...
@@ -346,8 +349,9 @@ const create = (type = "") => {
const
uploadAttOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/upload_attachment'
,
body
)
const
deleteAttOLPA
=
(
id
)
=>
api
.
post
(
`transaction/outlook_pa/delete_attachment/
${
id
}
`
)
const
getReportOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/get_all_report'
,
body
)
const
approvalSubmissionOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/approval_
submission
'
,
body
)
const
approvalSubmissionOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/approval_
outlook
'
,
body
)
const
checkApproverOLPA
=
()
=>
api
.
get
(
'transaction/outlook_pa/is_approver'
)
const
createPeriodeRevisionOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/create_periode_revision'
,
body
)
// Monthly
const
getMonthlyReport
=
(
body
)
=>
api
.
post
(
'transaction/monthly_report/get_all_report'
,
body
)
...
...
@@ -729,6 +733,8 @@ const create = (type = "") => {
createRollingOutlookBS
,
getRollingOutlookTP
,
createRollingOutlookTP
,
checkImportRollingOutlookTP
,
importRollingOutlookTP
,
getAllMasterDataCat
,
getParentItemReport
,
saveMasterDataCat
,
...
...
@@ -762,7 +768,9 @@ const create = (type = "") => {
getLastestUpdateROOI
,
checkUploadRollingOutlookOI
,
uploadRollingOutlookOI
,
submitRollingOutlook
submitRollingOutlook
,
getRollingOutlookCompanySubmitted
,
createPeriodeRevisionOLPA
}
}
...
...
src/container/MonthlyReport.js
View file @
f9f8d2dd
...
...
@@ -492,7 +492,7 @@ export default class MonthlyReport extends Component {
"months"
:
this
.
state
.
month
.
month_id
,
"status"
:
selectedStatus
}
this
.
setState
({
isApprovedMB
:
true
})
//
this.setState({ isApprovedMB: true })
api
.
create
().
getCompanySubmittedMonthly
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
...
...
src/container/OprIndicator/OperatingIndicator.js
View file @
f9f8d2dd
...
...
@@ -564,7 +564,7 @@ export default class OperatingIndicator extends Component {
{
this
.
state
.
visibleOperatingIndicator
&&
(
<
div
>
<
div
className
=
{
"main-color"
}
style
=
{{
height
:
78
,
display
:
'flex'
,
alignItems
:
'center'
,
paddingLeft
:
20
}}
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Operating
Indicator
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'16px'
,
color
:
'white'
}}
>
Operating
Indicator
Submission
<
/Typography
>
<
/div
>
<
div
style
=
{{
padding
:
20
,
width
:
'100%'
}}
>
<
Paper
style
=
{{
paddingTop
:
10
}}
>
...
...
src/container/OutlookPA.js
View file @
f9f8d2dd
...
...
@@ -99,7 +99,7 @@ export default class OutlookPA extends Component {
"periode"
:
this
.
state
.
periode
.
periode
}
api
.
create
().
getCompanySubmittedOLPA
(
body
).
then
(
response
=>
{
//
console.log(response);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
let
data
=
response
.
data
.
data
...
...
@@ -233,7 +233,7 @@ export default class OutlookPA extends Component {
getCompanyActive
()
{
api
.
create
().
getPerusahaanActive
().
then
((
response
)
=>
{
//
console.log(response);
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
let
data
=
response
.
data
.
data
...
...
@@ -291,8 +291,9 @@ export default class OutlookPA extends Component {
getLastPeriod
()
{
api
.
create
().
getLastPeriodOLPA
(
this
.
state
.
company
.
company_id
).
then
(
response
=>
{
// console.log(response);
let
currentYear
=
new
Date
().
getFullYear
()
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
lastPeriod
:
response
.
data
.
data
.
last_periode
,
latestPeriode
:
response
.
data
.
data
.
latest_periode
},
()
=>
{
this
.
setState
({
lastPeriod
:
Number
(
response
.
data
.
data
.
last_periode
)
<
Number
(
currentYear
)?
String
(
currentYear
)
:
response
.
data
.
data
.
last_periode
,
latestPeriode
:
response
.
data
.
data
.
latest_periode
},
()
=>
{
this
.
getPeriode
()
})
}
...
...
@@ -314,7 +315,7 @@ export default class OutlookPA extends Component {
data
.
push
(
item
)
}
}
else
{
if
((
item
>=
2000
)
&&
(
item
==
Number
(
this
.
state
.
lastPeriod
)
+
1
||
item
<
Number
(
this
.
state
.
lastPeriod
)
+
1
))
{
if
((
item
>=
2000
)
&&
(
item
==
Number
(
this
.
state
.
lastPeriod
)
||
item
<
Number
(
this
.
state
.
lastPeriod
)
))
{
data
.
push
(
item
)
}
}
...
...
@@ -328,7 +329,7 @@ export default class OutlookPA extends Component {
options
:
periodeData
,
getOptionLabel
:
(
option
)
=>
option
.
periode
,
};
let
periode
=
(
this
.
state
.
lastPeriod
==
""
?
String
(
Number
(
currentYear
)
+
1
)
:
Number
(
this
.
state
.
lastPeriod
)
+
1
)
let
periode
=
(
this
.
state
.
lastPeriod
==
""
?
String
(
Number
(
currentYear
)
+
1
)
:
Number
(
this
.
state
.
lastPeriod
))
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
==
periode
)
// console.log(data)
// console.log(this.state.lastPeriod)
...
...
@@ -449,13 +450,13 @@ export default class OutlookPA extends Component {
"max_periode"
:
moment
(
this
.
state
.
maxDateRevision
).
format
(
'YYYY-MM-DD'
)
}
// console.log(payload)
api
.
create
().
approvalSubmission
(
body
).
then
((
res
)
=>
{
//
console.log(res)
api
.
create
().
approvalSubmission
OLPA
(
body
).
then
((
res
)
=>
{
console
.
log
(
res
)
this
.
setState
({
loading
:
false
},
()
=>
{
this
.
get
Submission
()
this
.
get
OutlookPAID
()
})
if
(
type
==
'revision'
)
{
api
.
create
().
createPeriodeRevision
(
payload
).
then
((
res
)
=>
console
.
log
(
res
))
api
.
create
().
createPeriodeRevision
OLPA
(
payload
).
then
((
res
)
=>
console
.
log
(
res
))
}
})
}
...
...
src/container/OutlookPA/BalanceSheetOLPA.js
View file @
f9f8d2dd
...
...
@@ -144,6 +144,7 @@ export default class BalanceSheetOLPA extends Component {
"outlook_pa_id"
:
this
.
props
.
outlook_pa_id
,
"report_id"
:
this
.
props
.
report_id
,
"revision"
:
this
.
props
.
revision
,
"get_for"
:
this
.
state
.
get_for
,
"periode"
:
this
.
props
.
periode
,
"company_id"
:
this
.
props
.
company
.
company_id
}
...
...
src/container/OutlookPA/ProfitLossOLPA.js
View file @
f9f8d2dd
...
...
@@ -122,6 +122,7 @@ export default class ProfitLossOLPA extends Component {
let
payload
=
{
"report_id"
:
this
.
props
.
report_id
,
"revision"
:
Number
(
this
.
props
.
revision
),
"get_for"
:
this
.
state
.
get_for
,
"periode"
:
this
.
props
.
periode
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"outlook_pa_id"
:
this
.
props
.
outlook_pa_id
...
...
src/container/OutlookPA/TaxPlanningOLPA.js
View file @
f9f8d2dd
...
...
@@ -146,6 +146,7 @@ export default class TaxPlanningOLPA extends Component {
let
payload
=
{
"outlook_pa_id"
:
this
.
props
.
outlook_pa_id
,
"report_id"
:
this
.
props
.
report_id
,
"get_for"
:
this
.
state
.
get_for
,
"revision"
:
this
.
props
.
revision
,
"periode"
:
this
.
props
.
periode
,
"company_id"
:
this
.
props
.
company
.
company_id
...
...
src/container/RollingOutlook.js
View file @
f9f8d2dd
...
...
@@ -64,10 +64,12 @@ export default class RollingOutlook extends Component {
minDateRevision
:
new
Date
(),
maxDateRevision
:
new
Date
(),
btnApprove
:
false
,
listStatus
:
[],
selectedStatus
:
[],
quarterList
:
[
{
value
:
'q1'
,
name
:
'Q1'
},
{
value
:
'q2'
,
name
:
'Q2'
},
{
value
:
'q3'
,
name
:
'Q3'
},
{
value
:
'q1'
,
name
:
'Q1'
},
{
value
:
'q2'
,
name
:
'Q2'
},
{
value
:
'q3'
,
name
:
'Q3'
},
// {value: 'ol_pa', name: 'OL PA'},
],
quarter
:
null
...
...
@@ -87,56 +89,126 @@ export default class RollingOutlook extends Component {
// this.checkApprover()
// })
// } else {
this
.
checkApprover
()
this
.
getPermission
()
// }
}
getPermission
()
{
let
payload
=
{
menu
:
"rolling outlook & cat revision"
}
api
.
create
().
getPermission
(
payload
).
then
(
response
=>
{
console
.
log
(
response
)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
this
.
setState
({
btnCreate
:
response
.
data
.
data
.
create
,
btnEdit
:
response
.
data
.
data
.
edit
},
()
=>
{
this
.
checkApprover
()
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
problem
,
tipeAlert
:
'error'
})
}
})
}
checkApprover
()
{
let
listStatus1
=
[
{
name
:
'Open'
,
value
:
'not-yet'
},
{
name
:
'Submitted'
,
value
:
'approval_review'
},
{
name
:
'Waiting for Review / Approval'
,
value
:
'approval_proccess'
},
{
name
:
'Approved'
,
value
:
'approved'
},
]
let
listStatus2
=
[
{
name
:
'Open'
,
value
:
'not-yet'
},
{
name
:
'Submitted'
,
value
:
'approval_review'
},
{
name
:
'Approved'
,
value
:
'approved'
},
]
api
.
create
().
getRollingOutlookIsApprover
().
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
.
data
.
is_approver
===
true
)
{
this
.
setState
({
isApprover
:
true
,
checkApprover
:
true
},
()
=>
this
.
setState
({
isApprover
:
true
,
checkApprover
:
true
,
listStatus
:
listStatus1
,
selectedStatus
:
listStatus1
},
()
=>
this
.
getPeriode
())
}
else
{
this
.
setState
({
isApprover
:
false
,
checkApprover
:
false
},
()
=>
this
.
getDetailUser
())
this
.
setState
({
isApprover
:
false
,
checkApprover
:
false
,
listStatus
:
listStatus2
,
selectedStatus
:
listStatus2
},
()
=>
this
.
getPeriode
())
// this.getDetailUser())
}
})
}
getCompanySubmitted
()
{
let
selectedStatus
=
this
.
state
.
selectedStatus
.
map
((
item
)
=>
{
return
item
.
value
})
let
body
=
{
"periode"
:
this
.
state
.
periode
.
periode
"periode"
:
this
.
state
.
periode
.
periode
,
"quartal"
:
this
.
state
.
quarter
.
value
,
"status"
:
selectedStatus
}
api
.
create
().
getCompanySubmitted
(
body
).
then
(
response
=>
{
// this.setState({ isApprovedMB: true })
api
.
create
().
getRollingOutlookCompanySubmitted
(
body
).
then
(
response
=>
{
console
.
log
(
response
);
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
'success'
)
{
let
data
=
response
.
data
.
data
let
companyData
=
data
.
map
((
item
)
=>
{
return
{
company_id
:
item
.
company_id
,
company_name
:
item
.
company_name
,
}
})
if
(
response
.
data
.
data
.
length
>
0
)
{
let
data
=
response
.
data
.
data
let
companyData
=
data
.
map
((
item
)
=>
{
return
{
company_id
:
item
.
company_id
,
company_name
:
item
.
company_name
,
}
})
if
(
companyData
.
length
>
0
)
{
companyData
=
companyData
.
sort
((
a
,
b
)
=>
a
.
company_name
.
localeCompare
(
b
.
company_name
))
}
let
arrayBaru
=
[]
this
.
state
.
userCompany
.
map
((
item
,
index
)
=>
{
let
indexID
=
companyData
.
findIndex
((
val
)
=>
val
.
company_id
==
item
)
if
(
indexID
!==
-
1
)
{
arrayBaru
.
push
(
companyData
[
indexID
])
}
})
let
defaultProps
=
{
options
:
companyData
,
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
company_name
),
};
this
.
setState
({
listCompany
:
defaultProps
,
company
:
companyData
[
0
]
},
()
=>
{
// console.log(response.data.data);
if
(
response
.
data
.
data
.
length
>
0
)
{
this
.
getRevision
()
}
else
{
this
.
setState
({
listRevision
:
null
,
revision
:
null
,
dataTable
:
[],
loading
:
false
,
checkApprover
:
false
,
lastRevision
:
""
,
visibleTableHistory
:
false
})
if
(
arrayBaru
.
length
>
0
)
{
arrayBaru
=
arrayBaru
.
sort
((
a
,
b
)
=>
a
.
company_name
.
localeCompare
(
b
.
company_name
))
}
//
})
let
defaultProps
=
{
options
:
arrayBaru
,
getOptionLabel
:
(
option
)
=>
titleCase
(
option
.
company_name
),
}
let
indexID
=
null
if
(
this
.
state
.
rawData
!==
undefined
)
{
indexID
=
arrayBaru
.
findIndex
((
val
)
=>
val
.
company_id
==
this
.
state
.
rawData
.
company_id
)
}
// console.log(response.data.data.length)
this
.
setState
({
listCompany
:
defaultProps
,
company
:
indexID
==
null
?
arrayBaru
[
0
]
:
arrayBaru
[
indexID
],
company_submit
:
defaultProps
},
()
=>
{
// console.log(response.data.data.length)
if
(
response
.
data
.
data
.
length
>
0
)
{
this
.
getRevision
()
}
else
{
// console.log(this.state.listCompany)
// console.log(this.state.company_submit)
this
.
setState
({
listRevision
:
null
,
revision
:
null
,
dataTable
:
[],
lastRevision
:
""
,
visibleTableHistory
:
false
})
}
//
})
}
else
{
this
.
setState
({
listRevision
:
null
,
revision
:
null
,
listCompany
:
null
,
company
:
null
,
dataTable
:
[],
lastRevision
:
""
,
visibleTableHistory
:
false
,
loading
:
false
},
()
=>
{
document
.
body
.
style
.
overflow
=
'unset'
;
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
...
...
@@ -235,8 +307,9 @@ export default class RollingOutlook extends Component {
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
'success'
)
{
this
.
getRole
(
response
.
data
.
data
.
role_id
)
this
.
setState
({
userCompany
:
response
.
data
.
data
.
company
},
()
=>
{
this
.
getCompany
Active
()
this
.
getCompany
Submitted
()
})
}
}
...
...
@@ -244,6 +317,35 @@ export default class RollingOutlook extends Component {
})
}
getRole
(
id
)
{
api
.
create
().
getDetailRole
(
id
).
then
((
response
)
=>
{
if
(
response
.
data
)
{
if
(
response
.
ok
)
{
if
(
response
.
data
.
status
===
'success'
)
{
// this.setState({ tempData: response.data.data, privileges: response.data.data.privileges })
// // // console.log(response.data.data)
if
(
String
(
response
.
data
.
data
.
role_name
).
toLocaleLowerCase
()
==
'superadmin'
)
{
this
.
setState
({
isAdmin
:
true
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
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'
})
}
})
}
getCompanyActive
()
{
api
.
create
().
getPerusahaanActive
().
then
((
response
)
=>
{
console
.
log
(
response
);
...
...
@@ -259,7 +361,7 @@ export default class RollingOutlook extends Component {
})
if
(
companyData
.
length
>
0
)
{
companyData
=
companyData
.
sort
((
a
,
b
)
=>
a
.
company_name
.
localeCompare
(
b
.
company_name
))
companyData
=
companyData
.
sort
((
a
,
b
)
=>
a
.
company_name
.
localeCompare
(
b
.
company_name
))
}
let
arrayBaru
=
[]
...
...
@@ -271,7 +373,7 @@ export default class RollingOutlook extends Component {
})
if
(
arrayBaru
.
length
>
0
)
{
arrayBaru
=
arrayBaru
.
sort
((
a
,
b
)
=>
a
.
company_name
.
localeCompare
(
b
.
company_name
))
arrayBaru
=
arrayBaru
.
sort
((
a
,
b
)
=>
a
.
company_name
.
localeCompare
(
b
.
company_name
))
}
let
defaultProps
=
{
...
...
@@ -311,20 +413,21 @@ export default class RollingOutlook extends Component {
getPeriode
()
{
api
.
create
().
getPeriodeTransaction
().
then
(
response
=>
{
// let dateNow = new Date
// let year = this.state.rawData ? this.state.rawData.periode : format(dateNow, 'yyyy')
console
.
log
(
response
)
let
currentYear
=
new
Date
().
getFullYear
()
// console.log(currentYear)
if
(
response
.
data
)
{
if
(
response
.
data
.
status
===
"success"
)
{
let
data
=
[]
response
.
data
.
data
.
map
((
item
)
=>
{
if
(
this
.
state
.
isApprover
)
{
if
(
item
>=
2000
&&
item
<=
(
Number
(
currentYear
)
+
1
))
{
if
(
item
>=
2000
&&
item
<=
(
Number
(
currentYear
)))
{
data
.
push
(
item
)
}
}
else
{
if
((
item
>=
2000
)
&&
(
item
==
this
.
state
.
lastPeriod
||
item
<
this
.
state
.
lastPeriod
))
{
// if ((item >= 2000) && (item == this.state.lastPeriod || item < this.state.lastPeriod)) {
// data.push(item)
// }
if
((
item
>=
2000
)
&&
(
item
==
currentYear
||
item
<=
currentYear
))
{
data
.
push
(
item
)
}
}
...
...
@@ -338,25 +441,42 @@ export default class RollingOutlook extends Component {
options
:
periodeData
,
getOptionLabel
:
(
option
)
=>
option
.
periode
,
};
let
periode
=
(
this
.
state
.
lastPeriod
==
""
?
String
(
Number
(
currentYear
))
:
this
.
state
.
lastPeriod
===
undefined
?
String
(
Number
(
currentYear
))
:
this
.
state
.
lastPeriod
)
let
dateNow
=
new
Date
()
dateNow
.
setMonth
(
dateNow
.
getMonth
()
-
1
);
let
yearNow
=
dateNow
.
getFullYear
()
// let indexMonthMR = MR.findIndex((val) => val.value == yearNow)
// console.log(yearNow)
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
==
yearNow
)
// console.log(data)
// console.log(this.state.lastPeriod)
// console.log(periodeData)
// console.log(index)
let
defaultPropsQuarter
=
{
options
:
this
.
state
.
quarterList
,
getOptionLabel
:
(
option
)
=>
option
.
name
}
let
index
=
data
.
sort
((
a
,
b
)
=>
a
-
b
).
findIndex
((
val
)
=>
val
===
(
this
.
state
.
lastPeriod
==
""
?
String
(
Number
(
currentYear
)
+
1
)
:
this
.
state
.
latestPeriode
))
// console.log(data)
console
.
log
(
this
.
state
.
lastPeriod
)
// console.log(periodeData)
// console.log(index)
this
.
setState
({
listQuarter
:
defaultPropsQuarter
,
quarter
:
this
.
state
.
quarterList
[
0
],
listPeriode
:
defaultProps
,
periode
:
index
===
-
1
?
periodeData
[
0
]
:
periodeData
[
index
]
},
()
=>
{
if
(
this
.
state
.
isApprover
===
true
)
{
this
.
getCompanySubmitted
()
}
else
{
this
.
getRevision
()
this
.
setState
({
listPeriode
:
defaultProps
,
listQuarter
:
defaultPropsQuarter
,
quarter
:
this
.
state
.
quarterList
[
0
],
periode
:
index
===
-
1
?
periodeData
[
0
]
:
periodeData
[
index
]
},
()
=>
{
// if (this.state.isApprover === true && this.state.submittedOnly) {
this
.
getDetailUser
()
// this.getCompanySubmitted()
// console.log('masuk')
// } else {
// this.getRevision()
// }
})
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'warning'
},
()
=>
{
if
(
response
.
data
.
message
.
includes
(
"Someone Logged In"
))
{
setTimeout
(()
=>
{
localStorage
.
removeItem
(
Constant
.
TOKEN
)
window
.
location
.
reload
();
},
1000
);
}
})
}
}
else
{
this
.
setState
({
alert
:
true
,
messageAlert
:
response
.
data
.
message
,
tipeAlert
:
'error'
})
}
})
}
...
...
@@ -517,7 +637,7 @@ export default class RollingOutlook extends Component {
visibleCAT
:
false
,
visibleTP
:
true
,
})
}
else
if
(
item
===
'CAT'
)
{
}
else
if
(
item
===
'CAT'
)
{
this
.
setState
({
visibleRollingOutlook
:
false
,
visibleBS
:
false
,
...
...
@@ -525,7 +645,7 @@ export default class RollingOutlook extends Component {
visibleCAT
:
true
,
visibleTP
:
false
,
})
}
}
})
}
...
...
@@ -618,8 +738,8 @@ export default class RollingOutlook extends Component {
let
cobaSplit
=
String
(
fileName
).
split
(
"-"
)
let
mapSplit
=
""
cobaSplit
.
map
((
item
,
index
)
=>
{
if
(
item
!=
""
){
mapSplit
+=
index
==
0
?
`
${
titleCase
(
item
)}
`
:
`
${
item
}
`
if
(
item
!=
""
)
{
mapSplit
+=
index
==
0
?
`
${
titleCase
(
item
)}
`
:
`
${
item
}
`
}
})
// console.log(mapSplit);
...
...
@@ -634,7 +754,7 @@ export default class RollingOutlook extends Component {
let
url
=
window
.
URL
.
createObjectURL
(
res
);
let
a
=
document
.
createElement
(
'a'
);
a
.
href
=
url
;
a
.
download
=
"(Rolling Outlook Attachment) - "
+
mapSplit
;
a
.
download
=
"(Rolling Outlook Attachment) - "
+
mapSplit
;
a
.
click
();
}
}
...
...
@@ -682,7 +802,7 @@ export default class RollingOutlook extends Component {
validateRevision
()
{
let
arrayRevisi
=
this
.
state
.
detailRevisiCheck
let
remarksKosong
=
0
arrayRevisi
.
map
((
item
,
index
)
=>
{
arrayRevisi
.
map
((
item
,
index
)
=>
{
if
(
item
.
remarks
==
""
)
{
remarksKosong
+=
1
}
...
...
@@ -697,7 +817,7 @@ export default class RollingOutlook extends Component {
render
()
{
const
handleMaxDate
=
()
=>
{
let
handleDate
=
Number
(
moment
(
this
.
state
.
maxDateRevision
).
format
(
'YYYYMMDD'
))
-
Number
(
moment
(
this
.
state
.
minDateRevision
).
format
(
'YYYYMMDD'
))
return
handleDate
<
0
?
moment
(
this
.
state
.
minDateRevision
).
format
(
'YYYY/MM/DD'
)
:
moment
(
this
.
state
.
maxDateRevision
).
format
(
'YYYY/MM/DD'
)
return
handleDate
<
0
?
moment
(
this
.
state
.
minDateRevision
).
format
(
'YYYY/MM/DD'
)
:
moment
(
this
.
state
.
maxDateRevision
).
format
(
'YYYY/MM/DD'
)
}
const
columns
=
[
"#"
,
"Report Type"
,
{
...
...
@@ -775,7 +895,7 @@ export default class RollingOutlook extends Component {
onClick
=
{()
=>
tableMeta
.
rowData
[
5
]
==
true
?
this
.
clickDetail
(
tableMeta
.
rowData
[
1
],
tableMeta
.
rowData
[
4
],
tableMeta
.
rowData
[
2
],
tableMeta
.
rowData
[
3
])
:
null
:
null
}
>
{
/* {this.state.isApprover == true ?
...
...
@@ -943,10 +1063,10 @@ export default class RollingOutlook extends Component {
{...
this
.
state
.
listPeriode
}
id
=
"periode"
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
periode
:
newInputValue
},
()
=>
{
if
(
this
.
state
.
isApprover
===
true
)
{
this
.
setState
({
visibleTableHistory
:
false
})
if
(
this
.
state
.
listCompany
==
null
)
{
this
.
getCompanySubmitted
()
}
else
{
this
.
setState
({
visibleTableHistory
:
false
})
this
.
getRevision
()
}
})}
...
...
@@ -966,14 +1086,35 @@ export default class RollingOutlook extends Component {
disabled
=
{
this
.
state
.
intent
===
'Home'
?
true
:
false
}
onChange
=
{(
event
,
newInputValue
)
=>
this
.
setState
({
quarter
:
newInputValue
},
()
=>
{
this
.
setState
({
visibleTableHistory
:
false
})
this
.
getRevision
()
if
(
this
.
state
.
listCompany
==
null
)
{
this
.
getCompanySubmitted
()
}
else
{
this
.
getRevision
()
}
})}
disableClearable
style
=
{{
width
:
250
}}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"
Company
"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"
Quarter
"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
value
=
{
this
.
state
.
quarter
}
/
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
Autocomplete
multiple
id
=
"tags-standard"
options
=
{
this
.
state
.
listStatus
}
getOptionLabel
=
{(
option
)
=>
option
.
name
}
style
=
{{
width
:
250
}}
onChange
=
{(
event
,
newInputValue
)
=>
{
this
.
setState
({
selectedStatus
:
newInputValue
,
loading
:
true
},
()
=>
{
console
.
log
(
newInputValue
);
this
.
getCompanySubmitted
()
})
}}
value
=
{
this
.
state
.
selectedStatus
}
renderInput
=
{(
params
)
=>
<
TextField
{...
params
}
label
=
"Submission Status"
margin
=
"normal"
style
=
{{
marginTop
:
7
}}
/>
}
/>
<
/div
>
<
div
style
=
{{
marginTop
:
20
}}
>
<
Autocomplete
{...
this
.
state
.
listCompany
}
...
...
@@ -1372,7 +1513,7 @@ export default class RollingOutlook extends Component {
id
=
"startDate"
label
=
"Valid From"
format
=
"dd-MM-yyyy"
onChange
=
{(
e
)
=>
this
.
setState
({
minDateRevision
:
moment
(
e
).
format
(
'YYYY/MM/DD'
)},
()
=>
this
.
setState
({
maxDateRevision
:
handleMaxDate
()
}))}
onChange
=
{(
e
)
=>
this
.
setState
({
minDateRevision
:
moment
(
e
).
format
(
'YYYY/MM/DD'
)
},
()
=>
this
.
setState
({
maxDateRevision
:
handleMaxDate
()
}))}
value
=
{
moment
(
this
.
state
.
minDateRevision
).
format
(
'YYYY/MM/DD'
)}
KeyboardButtonProps
=
{{
'aria-label'
:
'change date'
,
...
...
@@ -1399,7 +1540,7 @@ export default class RollingOutlook extends Component {
id
=
"startDate"
label
=
"Valid To"
format
=
"dd-MM-yyyy"
onChange
=
{(
e
)
=>
this
.
setState
({
maxDateRevision
:
moment
(
e
).
format
(
'YYYY/MM/DD'
)
})}
onChange
=
{(
e
)
=>
this
.
setState
({
maxDateRevision
:
moment
(
e
).
format
(
'YYYY/MM/DD'
)
})}
minDate
=
{
moment
(
this
.
state
.
minDateRevision
).
format
(
'YYYY/MM/DD'
)}
value
=
{
moment
(
this
.
state
.
maxDateRevision
).
format
(
'YYYY/MM/DD'
)}
KeyboardButtonProps
=
{{
...
...
src/container/RollingOutlook/OperatingIndicatorRO.js
View file @
f9f8d2dd
...
...
@@ -173,9 +173,9 @@ export default class OperatingIndicatorRO extends Component {
item
.
level
,
item
.
description
,
item
.
uom
,
item
.
rolling_outlook
.
january
,
item
.
rolling_outlook
.
february
,
item
.
rolling_outlook
.
march
,
item
.
rolling_outlook
.
january
===
""
?
"0"
:
item
.
rolling_outlook
.
january
,
item
.
rolling_outlook
.
february
===
""
?
"0"
:
item
.
rolling_outlook
.
february
,
item
.
rolling_outlook
.
march
===
""
?
"0"
:
item
.
rolling_outlook
.
march
,
item
.
rolling_outlook
.
april
===
""
?
"0"
:
item
.
rolling_outlook
.
april
,
item
.
rolling_outlook
.
may
===
""
?
"0"
:
item
.
rolling_outlook
.
may
,
item
.
rolling_outlook
.
june
===
""
?
"0"
:
item
.
rolling_outlook
.
june
,
...
...
@@ -206,9 +206,9 @@ export default class OperatingIndicatorRO extends Component {
item
.
level
,
item
.
description
,
item
.
uom
,
item
.
rolling_outlook
.
january
,
item
.
rolling_outlook
.
february
,
item
.
rolling_outlook
.
march
,
item
.
rolling_outlook
.
january
===
""
?
"0"
:
item
.
rolling_outlook
.
january
,
item
.
rolling_outlook
.
february
===
""
?
"0"
:
item
.
rolling_outlook
.
february
,
item
.
rolling_outlook
.
march
===
""
?
"0"
:
item
.
rolling_outlook
.
march
,
item
.
rolling_outlook
.
april
===
""
?
"0"
:
item
.
rolling_outlook
.
april
,
item
.
rolling_outlook
.
may
===
""
?
"0"
:
item
.
rolling_outlook
.
may
,
item
.
rolling_outlook
.
june
===
""
?
"0"
:
item
.
rolling_outlook
.
june
,
...
...
@@ -827,7 +827,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
===
""
?
""
:
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
value
===
"
0
"
?
""
:
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
/
>
...
...
@@ -846,7 +846,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
===
""
?
""
:
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
value
===
"
0
"
?
""
:
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
...
...
@@ -868,7 +868,7 @@ export default class OperatingIndicatorRO extends Component {
type
=
"text"
placeholder
=
""
// value={Number(value).toFixed(1)}
value
=
{
value
===
""
?
""
:
Number
(
value
).
toFixed
(
1
)}
value
=
{
value
===
"
0
"
?
""
:
Number
(
value
).
toFixed
(
1
)}
decimalScale
=
{
1
}
disabled
=
{
true
}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
...
...
@@ -923,7 +923,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
===
""
?
""
:
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
value
===
"
0
"
?
""
:
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
/
>
...
...
@@ -942,7 +942,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
===
""
?
""
:
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
value
===
"
0
"
?
""
:
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
...
...
@@ -964,7 +964,7 @@ export default class OperatingIndicatorRO extends Component {
type
=
"text"
placeholder
=
""
// value={Number(value).toFixed(1)}
value
=
{
value
===
""
?
""
:
Number
(
value
).
toFixed
(
1
)}
value
=
{
value
===
"
0
"
?
""
:
Number
(
value
).
toFixed
(
1
)}
decimalScale
=
{
1
}
disabled
=
{
true
}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
...
...
@@ -1018,7 +1018,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
===
""
?
""
:
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
value
===
"
0
"
?
""
:
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
/
>
...
...
@@ -1037,7 +1037,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
===
""
?
""
:
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
value
===
"
0
"
?
""
:
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
...
...
@@ -1058,7 +1058,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
value
===
""
?
""
:
Number
(
value
).
toFixed
(
1
)}
value
=
{
value
===
"
0
"
?
""
:
Number
(
value
).
toFixed
(
1
)}
// value={Number(value).toFixed(1)}
decimalScale
=
{
1
}
disabled
=
{
true
}
...
...
@@ -1113,7 +1113,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quartal
==
'q2'
||
this
.
props
.
quartal
==
'q3'
?
(
value
===
"0"
?
""
:
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
))
:
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
/
>
...
...
@@ -1132,7 +1132,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quartal
==
'q2'
||
this
.
props
.
quartal
==
'q3'
?
(
value
===
"0"
?
""
:
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
))
:
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
...
...
@@ -1153,7 +1153,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
color
:
this
.
props
.
quartal
==
'q1'
?
"#5198ea"
:
'#555252'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
value
=
{
this
.
props
.
quartal
==
'q2'
||
this
.
props
.
quartal
==
'q3'
?
(
value
===
"0"
?
""
:
Number
(
value
).
toFixed
(
1
))
:
Number
(
value
).
toFixed
(
1
)}
decimalScale
=
{
1
}
disabled
=
{
this
.
props
.
quartal
==
'q1'
?
false
:
true
}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
...
...
@@ -1206,7 +1206,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quartal
==
'q2'
||
this
.
props
.
quartal
==
'q3'
?
(
value
===
"0"
?
""
:
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
))
:
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
/
>
...
...
@@ -1225,7 +1225,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quartal
==
'q2'
||
this
.
props
.
quartal
==
'q3'
?
(
value
===
"0"
?
""
:
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
))
:
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
...
...
@@ -1246,7 +1246,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
color
:
this
.
props
.
quartal
==
'q1'
?
"#5198ea"
:
'#555252'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
value
=
{
this
.
props
.
quartal
==
'q2'
||
this
.
props
.
quartal
==
'q3'
?
(
value
===
"0"
?
""
:
Number
(
value
).
toFixed
(
1
))
:
Number
(
value
).
toFixed
(
1
)}
decimalScale
=
{
1
}
disabled
=
{
this
.
props
.
quartal
==
'q1'
?
false
:
true
}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
...
...
@@ -1299,7 +1299,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quartal
==
'q2'
||
this
.
props
.
quartal
==
'q3'
?
(
value
===
"0"
?
""
:
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
))
:
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
/
>
...
...
@@ -1318,7 +1318,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quartal
==
'q2'
||
this
.
props
.
quartal
==
'q3'
?
(
value
===
"0"
?
""
:
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
))
:
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
...
...
@@ -1339,7 +1339,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
color
:
this
.
props
.
quartal
==
'q1'
?
"#5198ea"
:
'#555252'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
value
=
{
this
.
props
.
quartal
==
'q2'
||
this
.
props
.
quartal
==
'q3'
?
(
value
===
"0"
?
""
:
Number
(
value
).
toFixed
(
1
))
:
Number
(
value
).
toFixed
(
1
)}
decimalScale
=
{
1
}
disabled
=
{
this
.
props
.
quartal
==
'q1'
?
false
:
true
}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
...
...
@@ -1392,7 +1392,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quartal
==
'q3'
?
(
value
===
"0"
?
""
:
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
))
:
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
/
>
...
...
@@ -1411,7 +1411,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quartal
==
'q3'
?
(
value
===
"0"
?
""
:
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
))
:
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
...
...
@@ -1432,7 +1432,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
color
:
this
.
props
.
quartal
==
'q1'
||
this
.
props
.
quartal
==
'q2'
?
"#5198ea"
:
'#555252'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
value
=
{
this
.
props
.
quartal
==
'q3'
?
(
value
===
"0"
?
""
:
Number
(
value
).
toFixed
(
1
))
:
Number
(
value
).
toFixed
(
1
)}
decimalScale
=
{
1
}
disabled
=
{
this
.
props
.
quartal
==
'q1'
||
this
.
props
.
quartal
==
'q2'
?
false
:
true
}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
...
...
@@ -1485,7 +1485,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quartal
==
'q3'
?
(
value
===
"0"
?
""
:
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
))
:
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
/
>
...
...
@@ -1504,7 +1504,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quartal
==
'q3'
?
(
value
===
"0"
?
""
:
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
))
:
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
...
...
@@ -1525,7 +1525,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
color
:
this
.
props
.
quartal
==
'q1'
||
this
.
props
.
quartal
==
'q2'
?
"#5198ea"
:
'#555252'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
value
=
{
this
.
props
.
quartal
==
'q3'
?
(
value
===
"0"
?
""
:
Number
(
value
).
toFixed
(
1
))
:
Number
(
value
).
toFixed
(
1
)}
decimalScale
=
{
1
}
disabled
=
{
this
.
props
.
quartal
==
'q1'
||
this
.
props
.
quartal
==
'q2'
?
false
:
true
}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
...
...
@@ -1578,7 +1578,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quartal
==
'q3'
?
(
value
===
"0"
?
""
:
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
))
:
Number
(
handleParent
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
/
>
...
...
@@ -1597,7 +1597,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quartal
==
'q3'
?
(
value
===
"0"
?
""
:
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
))
:
Number
(
handleFormula
(
tableMeta
)).
toFixed
(
1
)}
disabled
=
{
true
}
decimalScale
=
{
1
}
onBlur
=
{(
event
)
=>
{
...
...
@@ -1618,7 +1618,7 @@ export default class OperatingIndicatorRO extends Component {
style
=
{{
color
:
this
.
props
.
quartal
==
'q1'
||
this
.
props
.
quartal
==
'q2'
?
"#5198ea"
:
'#555252'
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
value
=
{
Number
(
value
).
toFixed
(
1
)}
value
=
{
this
.
props
.
quartal
==
'q3'
?
(
value
===
"0"
?
""
:
Number
(
value
).
toFixed
(
1
))
:
Number
(
value
).
toFixed
(
1
)}
decimalScale
=
{
1
}
disabled
=
{
this
.
props
.
quartal
==
'q1'
||
this
.
props
.
quartal
==
'q2'
?
false
:
true
}
// disabled={!this.props.permission.create || !this.props.permission.edit || !this.props.isSubmit}
...
...
@@ -2045,12 +2045,7 @@ export default class OperatingIndicatorRO extends Component {
{
!
this
.
state
.
emptyData
&&
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
}}
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
data
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
data
.
periode
}
{
this
.
props
.
quartal
===
"q1"
?
' Q1 '
:
this
.
props
.
quartal
===
"q2"
?
' Q2 '
:
this
.
props
.
quartal
===
"q3"
?
' Q3 '
:
''
}
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
data
.
periode
}
{
String
(
this
.
props
.
quartal
).
toLocaleUpperCase
()}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
/div
>
...
...
@@ -2234,12 +2229,7 @@ export default class OperatingIndicatorRO extends Component {
<
div
style
=
{{
padding
:
25
}}
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
data
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
data
.
periode
}
{
this
.
props
.
quartal
===
"q1"
?
' Q1 '
:
this
.
props
.
quartal
===
"q2"
?
' Q2 '
:
this
.
props
.
quartal
===
"q3"
?
' Q3 '
:
''
}
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
data
.
periode
}
{
String
(
this
.
props
.
quartal
).
toLocaleUpperCase
()}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
/div
>
...
...
src/container/RollingOutlook/ProfitLossRO.js
View file @
f9f8d2dd
...
...
@@ -246,9 +246,9 @@ export default class ProfitLossROO extends Component {
item
.
description
,
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
last_year_total
===
""
?
"0"
:
item
.
profit_loss
.
last_year_total
,
item
.
profit_loss
.
january
,
item
.
profit_loss
.
february
,
item
.
profit_loss
.
march
,
item
.
profit_loss
.
january
===
""
?
"0"
:
item
.
profit_loss
.
january
,
item
.
profit_loss
.
february
===
""
?
"0"
:
item
.
profit_loss
.
february
,
item
.
profit_loss
.
march
===
""
?
"0"
:
item
.
profit_loss
.
march
,
item
.
profit_loss
.
april
===
""
?
"0"
:
item
.
profit_loss
.
april
,
item
.
profit_loss
.
may
===
""
?
"0"
:
item
.
profit_loss
.
may
,
item
.
profit_loss
.
june
===
""
?
"0"
:
item
.
profit_loss
.
june
,
...
...
@@ -281,9 +281,9 @@ export default class ProfitLossROO extends Component {
item
.
description
,
item
.
profit_loss
.
notes
,
item
.
profit_loss
.
last_year_total
===
""
?
"0"
:
item
.
profit_loss
.
last_year_total
,
item
.
profit_loss
.
january
,
item
.
profit_loss
.
february
,
item
.
profit_loss
.
march
,
item
.
profit_loss
.
january
===
""
?
"0"
:
item
.
profit_loss
.
january
,
item
.
profit_loss
.
february
===
""
?
"0"
:
item
.
profit_loss
.
february
,
item
.
profit_loss
.
march
===
""
?
"0"
:
item
.
profit_loss
.
march
,
item
.
profit_loss
.
april
===
""
?
"0"
:
item
.
profit_loss
.
april
,
item
.
profit_loss
.
may
===
""
?
"0"
:
item
.
profit_loss
.
may
,
item
.
profit_loss
.
june
===
""
?
"0"
:
item
.
profit_loss
.
june
,
...
...
@@ -397,7 +397,7 @@ export default class ProfitLossROO extends Component {
"report_id"
:
this
.
props
.
report_id
,
"quartal"
:
this
.
props
.
quarter
,
"status"
:
type
,
"
balance_sheet
"
:
data
"
profit_loss
"
:
data
}
console
.
log
(
payload
);
// console.log(JSON.stringify(payload));
...
...
@@ -1040,7 +1040,7 @@ export default class ProfitLossROO extends Component {
placeholder
=
""
disabled
=
{
true
}
// value={Number(val).toFixed(1)}
value
=
{
val
===
""
?
""
:
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
)}
value
=
{
val
===
"
0
"
?
""
:
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1057,7 +1057,7 @@ export default class ProfitLossROO extends Component {
placeholder
=
""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled
=
{
true
}
value
=
{
val
===
""
?
""
:
Number
(
val
).
toFixed
(
1
)}
value
=
{
val
===
"
0
"
?
""
:
Number
(
val
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
}}
...
...
@@ -1078,7 +1078,7 @@ export default class ProfitLossROO extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
val
===
""
?
""
:
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
)}
value
=
{
val
===
"
0
"
?
""
:
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
)}
/
>
}
/
>
...
...
@@ -1095,7 +1095,7 @@ export default class ProfitLossROO extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
val
===
""
?
""
:
Number
(
val
).
toFixed
(
1
)}
value
=
{
val
===
"
0
"
?
""
:
Number
(
val
).
toFixed
(
1
)}
/
>
}
/
>
...
...
@@ -1138,7 +1138,7 @@ export default class ProfitLossROO extends Component {
placeholder
=
""
disabled
=
{
true
}
// value={Number(val).toFixed(1)}
value
=
{
val
===
""
?
""
:
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
)}
value
=
{
val
===
"
0
"
?
""
:
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1155,7 +1155,7 @@ export default class ProfitLossROO extends Component {
placeholder
=
""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled
=
{
true
}
value
=
{
val
===
""
?
""
:
Number
(
val
).
toFixed
(
1
)}
value
=
{
val
===
"
0
"
?
""
:
Number
(
val
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
}}
...
...
@@ -1176,7 +1176,7 @@ export default class ProfitLossROO extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
val
===
""
?
""
:
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
)}
value
=
{
val
===
"
0
"
?
""
:
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
)}
/
>
}
/
>
...
...
@@ -1193,7 +1193,7 @@ export default class ProfitLossROO extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
val
===
""
?
""
:
Number
(
val
).
toFixed
(
1
)}
value
=
{
val
===
"
0
"
?
""
:
Number
(
val
).
toFixed
(
1
)}
/
>
}
/
>
...
...
@@ -1236,7 +1236,7 @@ export default class ProfitLossROO extends Component {
placeholder
=
""
disabled
=
{
true
}
// value={Number(val).toFixed(1)}
value
=
{
val
===
""
?
""
:
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
)}
value
=
{
val
===
"
0
"
?
""
:
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1253,7 +1253,7 @@ export default class ProfitLossROO extends Component {
placeholder
=
""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled
=
{
true
}
value
=
{
val
===
""
?
""
:
Number
(
val
).
toFixed
(
1
)}
value
=
{
val
===
"
0
"
?
""
:
Number
(
val
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
}}
...
...
@@ -1274,7 +1274,7 @@ export default class ProfitLossROO extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
val
===
""
?
""
:
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
)}
value
=
{
val
===
"
0
"
?
""
:
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
)}
/
>
}
/
>
...
...
@@ -1291,7 +1291,7 @@ export default class ProfitLossROO extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
val
===
""
?
""
:
Number
(
val
).
toFixed
(
1
)}
value
=
{
val
===
"
0
"
?
""
:
Number
(
val
).
toFixed
(
1
)}
/
>
}
/
>
...
...
@@ -1334,7 +1334,7 @@ export default class ProfitLossROO extends Component {
placeholder
=
""
disabled
=
{
true
}
// value={Number(val).toFixed(1)}
value
=
{
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q2'
||
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
))
:
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1351,7 +1351,7 @@ export default class ProfitLossROO extends Component {
placeholder
=
""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled
=
{
this
.
props
.
quarter
==
'q1'
?
false
:
true
}
value
=
{
Number
(
val
).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q2'
||
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
val
).
toFixed
(
1
))
:
Number
(
val
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
}}
...
...
@@ -1372,7 +1372,7 @@ export default class ProfitLossROO extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q2'
||
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
))
:
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
)}
/
>
}
/
>
...
...
@@ -1389,7 +1389,7 @@ export default class ProfitLossROO extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
val
).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q2'
||
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
val
).
toFixed
(
1
))
:
Number
(
val
).
toFixed
(
1
)}
/
>
}
/
>
...
...
@@ -1432,7 +1432,7 @@ export default class ProfitLossROO extends Component {
placeholder
=
""
disabled
=
{
true
}
// value={Number(val).toFixed(1)}
value
=
{
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q2'
||
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
))
:
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1449,7 +1449,7 @@ export default class ProfitLossROO extends Component {
placeholder
=
""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled
=
{
this
.
props
.
quarter
==
'q1'
?
false
:
true
}
value
=
{
Number
(
val
).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q2'
||
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
val
).
toFixed
(
1
))
:
Number
(
val
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
}}
...
...
@@ -1470,7 +1470,7 @@ export default class ProfitLossROO extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q2'
||
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
))
:
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
)}
/
>
}
/
>
...
...
@@ -1487,7 +1487,7 @@ export default class ProfitLossROO extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
val
).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q2'
||
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
val
).
toFixed
(
1
))
:
Number
(
val
).
toFixed
(
1
)}
/
>
}
/
>
...
...
@@ -1530,7 +1530,7 @@ export default class ProfitLossROO extends Component {
placeholder
=
""
disabled
=
{
true
}
// value={Number(val).toFixed(1)}
value
=
{
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q2'
||
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
))
:
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1547,7 +1547,7 @@ export default class ProfitLossROO extends Component {
placeholder
=
""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled
=
{
this
.
props
.
quarter
==
'q1'
?
false
:
true
}
value
=
{
Number
(
val
).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q2'
||
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
val
).
toFixed
(
1
))
:
Number
(
val
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
}}
...
...
@@ -1568,7 +1568,7 @@ export default class ProfitLossROO extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q2'
||
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
))
:
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
)}
/
>
}
/
>
...
...
@@ -1585,7 +1585,7 @@ export default class ProfitLossROO extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
val
).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q2'
||
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
val
).
toFixed
(
1
))
:
Number
(
val
).
toFixed
(
1
)}
/
>
}
/
>
...
...
@@ -1628,7 +1628,7 @@ export default class ProfitLossROO extends Component {
placeholder
=
""
disabled
=
{
true
}
// value={Number(val).toFixed(1)}
value
=
{
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
))
:
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1645,7 +1645,7 @@ export default class ProfitLossROO extends Component {
placeholder
=
""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled
=
{
this
.
props
.
quarter
==
'q1'
||
this
.
props
.
quarter
==
'q2'
?
false
:
true
}
value
=
{
Number
(
val
).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
val
).
toFixed
(
1
))
:
Number
(
val
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
}}
...
...
@@ -1666,7 +1666,7 @@ export default class ProfitLossROO extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
))
:
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
)}
/
>
}
/
>
...
...
@@ -1683,7 +1683,7 @@ export default class ProfitLossROO extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
val
).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
val
).
toFixed
(
1
))
:
Number
(
val
).
toFixed
(
1
)}
/
>
}
/
>
...
...
@@ -1726,7 +1726,7 @@ export default class ProfitLossROO extends Component {
placeholder
=
""
disabled
=
{
true
}
// value={Number(val).toFixed(1)}
value
=
{
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
))
:
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1743,7 +1743,7 @@ export default class ProfitLossROO extends Component {
placeholder
=
""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled
=
{
this
.
props
.
quarter
==
'q1'
||
this
.
props
.
quarter
==
'q2'
?
false
:
true
}
value
=
{
Number
(
val
).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
val
).
toFixed
(
1
))
:
Number
(
val
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
}}
...
...
@@ -1764,7 +1764,7 @@ export default class ProfitLossROO extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
))
:
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
)}
/
>
}
/
>
...
...
@@ -1781,7 +1781,7 @@ export default class ProfitLossROO extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
val
).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
val
).
toFixed
(
1
))
:
Number
(
val
).
toFixed
(
1
)}
/
>
}
/
>
...
...
@@ -1824,7 +1824,7 @@ export default class ProfitLossROO extends Component {
placeholder
=
""
disabled
=
{
true
}
// value={Number(val).toFixed(1)}
value
=
{
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
))
:
Number
(
handleValue
(
val
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
...
...
@@ -1841,7 +1841,7 @@ export default class ProfitLossROO extends Component {
placeholder
=
""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled
=
{
this
.
props
.
quarter
==
'q1'
||
this
.
props
.
quarter
==
'q2'
?
false
:
true
}
value
=
{
Number
(
val
).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
val
).
toFixed
(
1
))
:
Number
(
val
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
handleChange
(
event
.
target
.
value
,
tableMeta
)
}}
...
...
@@ -1862,7 +1862,7 @@ export default class ProfitLossROO extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
))
:
Number
(
handleFormula
(
val
,
tableMeta
,
1
)).
toFixed
(
1
)}
/
>
}
/
>
...
...
@@ -1879,7 +1879,7 @@ export default class ProfitLossROO extends Component {
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
val
).
toFixed
(
1
)}
value
=
{
this
.
props
.
quarter
==
'q3'
?
(
val
===
"0"
?
""
:
Number
(
val
).
toFixed
(
1
))
:
Number
(
val
).
toFixed
(
1
)}
/
>
}
/
>
...
...
@@ -2316,7 +2316,7 @@ export default class ProfitLossROO extends Component {
<
div
style
=
{{
display
:
'flex'
,
justifyContent
:
'space-between'
}}
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
(
rev
.{
this
.
props
.
revision
})
{
String
(
this
.
props
.
quarter
).
toLocaleUpperCase
()}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
/div
>
<
div
style
=
{{
width
:
'50%'
}}
>
...
...
@@ -2540,7 +2540,7 @@ export default class ProfitLossROO extends Component {
<
div
style
=
{{
padding
:
20
}}
>
<
div
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
{
this
.
props
.
company
.
company_name
}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
(
rev
.{
this
.
props
.
revision
})
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
Period
:
{
this
.
props
.
periode
}
(
rev
.{
this
.
props
.
revision
})
{
String
(
this
.
props
.
quarter
).
toLocaleUpperCase
()}
<
/Typography
>
<
Typography
style
=
{{
fontSize
:
'11px'
,
color
:
'#4b4b4b'
}}
>
in
IDR
mn
<
/Typography
>
<
/div
>
<
div
style
=
{{
marginTop
:
20
,
width
:
this
.
props
.
width
-
(
this
.
props
.
open
===
true
?
400
:
150
)
}}
>
...
...
src/container/RollingOutlook/TaxPlanningRO.js
View file @
f9f8d2dd
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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