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
7d5fa451
Commit
7d5fa451
authored
Oct 06, 2020
by
Dida Adams Arizona
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'deni-dev(pc)' into 'master'
ceeeeeebbbbb See merge request
!465
parents
4d85feca
60a0f811
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
205 additions
and
56 deletions
+205
-56
index.js
src/api/index.js
+3
-1
BalanceSheetOLPA.js
src/container/OutlookPA/BalanceSheetOLPA.js
+202
-55
No files found.
src/api/index.js
View file @
7d5fa451
...
...
@@ -230,6 +230,7 @@ const create = (type = "") => {
const
getLastestUpdateOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/get_latest_update'
,
body
)
const
createReportOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/create_outlook_report'
,
body
)
const
checkUploadOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/check_import'
,
body
)
const
validateSubmitReportOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/validate_save'
,
body
)
const
uploadOLPA
=
(
body
)
=>
api
.
post
(
'transaction/outlook_pa/import_outlook_pa'
)
//Template
...
...
@@ -399,7 +400,8 @@ const create = (type = "") => {
getLastestUpdateOLPA
,
createReportOLPA
,
checkUploadOLPA
,
uploadOLPA
uploadOLPA
,
validateSubmitReportOLPA
}
}
...
...
src/container/OutlookPA/BalanceSheetOLPA.js
View file @
7d5fa451
...
...
@@ -113,6 +113,7 @@ export default class BalanceSheetOLPA extends Component {
item
.
balance_sheet
.
october
,
item
.
balance_sheet
.
november
,
item
.
balance_sheet
.
december
,
item
.
balance_sheet
.
total_current_year
,
item
.
order
,
item
.
condition_it_should_be
,
item
.
condition_if_wrong
...
...
@@ -147,6 +148,7 @@ export default class BalanceSheetOLPA extends Component {
item
.
balance_sheet
.
october
,
item
.
balance_sheet
.
november
,
item
.
balance_sheet
.
december
,
item
.
balance_sheet
.
total_current_year
,
item
.
order
,
item
.
condition_it_should_be
,
item
.
condition_if_wrong
...
...
@@ -183,6 +185,7 @@ export default class BalanceSheetOLPA extends Component {
october
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)),
november
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)),
december
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)),
total_current_year
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
)),
})
})
let
payload
=
{
...
...
@@ -245,8 +248,6 @@ export default class BalanceSheetOLPA extends Component {
november
:
i
[
13
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
13
]))
===
false
?
"0"
:
String
(
i
[
13
]).
trim
(),
december
:
i
[
14
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
14
]))
===
false
?
"0"
:
String
(
i
[
14
]).
trim
(),
total_current_year
:
i
[
15
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
15
]))
===
false
?
"0"
:
String
(
i
[
15
]).
trim
(),
total_next_year
:
i
[
16
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
16
]))
===
false
?
"0"
:
String
(
i
[
16
]).
trim
(),
total_more_year
:
i
[
17
]
===
undefined
?
"0"
:
reg
.
test
(
String
(
i
[
17
]))
===
false
?
"0"
:
String
(
i
[
17
]).
trim
()
})
}
})
...
...
@@ -290,6 +291,7 @@ export default class BalanceSheetOLPA extends Component {
item
.
october
,
item
.
november
,
item
.
december
,
item
.
total_current_year
,
item
.
orders
,
item
.
condition_it_should_be
,
item
.
condition_if_wrong
,
...
...
@@ -298,7 +300,7 @@ export default class BalanceSheetOLPA extends Component {
})
this
.
setState
({
dataTable
,
dataLoaded
:
true
,
loading
:
false
,
buttonError
:
false
,
editable
:
true
},
()
=>
{
this
.
state
.
dataTable
.
map
(
item
=>
{
if
(
item
[
2
2
].
length
>
0
)
{
if
(
item
[
2
3
].
length
>
0
)
{
console
.
log
(
'masuk'
)
this
.
setState
({
buttonError
:
true
,
errorPreview
:
true
,
editable
:
true
})
}
...
...
@@ -328,6 +330,7 @@ export default class BalanceSheetOLPA extends Component {
october
:
String
(
Number
(
i
[
16
]).
toFixed
(
1
)),
november
:
String
(
Number
(
i
[
17
]).
toFixed
(
1
)),
december
:
String
(
Number
(
i
[
18
]).
toFixed
(
1
)),
total_current_year
:
String
(
Number
(
i
[
19
]).
toFixed
(
1
)),
})
})
let
body
=
{
...
...
@@ -391,18 +394,19 @@ export default class BalanceSheetOLPA extends Component {
october
:
i
[
0
]
===
3
&&
i
[
16
]
===
""
?
"0"
:
String
(
i
[
16
]),
november
:
i
[
0
]
===
3
&&
i
[
17
]
===
""
?
"0"
:
String
(
i
[
17
]),
december
:
i
[
0
]
===
3
&&
i
[
18
]
===
""
?
"0"
:
String
(
i
[
18
]),
total_current_year
:
i
[
0
]
===
3
&&
i
[
19
]
===
""
?
"0"
:
String
(
i
[
19
]),
})
})
// console.log(JSON.stringify(data))
let
payload
=
{
"
submission_id"
:
this
.
props
.
submissionID
,
"
outlook_pa_id"
:
this
.
props
.
outlook_pa_id
,
"company_id"
:
this
.
props
.
company
.
company_id
,
"periode"
:
this
.
props
.
periode
,
"report_id"
:
this
.
props
.
report_id
,
"balance_sheet"
:
data
,
"status"
:
"submitted"
}
api
.
create
().
validateSubmitReport
(
payload
).
then
((
response
)
=>
{
api
.
create
().
validateSubmitReport
OLPA
(
payload
).
then
((
response
)
=>
{
console
.
log
(
response
)
if
(
response
.
data
.
data
.
result
)
{
this
.
setState
({
loading
:
false
,
buttonError
:
false
,
editable
:
false
})
...
...
@@ -451,7 +455,7 @@ export default class BalanceSheetOLPA extends Component {
let
arrayFormula
=
tableMeta
.
rowData
[
3
].
match
(
/
[
a-zA-Z
]
+|
[
0-9
]
+|
[
-!$%^&*()_+|~=`{}
\[\]
:";'<>?,.
\/]
+
(?:\.[
0-9
]
+@|
)
/g
)
let
arrayJumlah
=
[]
arrayFormula
.
map
((
item
,
indexs
)
=>
{
let
index
=
dataTable2
.
findIndex
((
val
)
=>
val
[
19
]
==
item
)
let
index
=
dataTable2
.
findIndex
((
val
)
=>
val
[
20
]
==
item
)
if
(
index
>
0
)
{
arrayJumlah
.
push
(
dataTable2
[
index
][
tableMeta
.
columnIndex
])
}
else
{
...
...
@@ -496,7 +500,7 @@ export default class BalanceSheetOLPA extends Component {
let
arrayFormula
=
tableMeta
.
rowData
[
3
].
match
(
/
[
a-zA-Z
]
+|
[
0-9
]
+|
[
-!$%^&*()_+|~=`{}
\[\]
:";'<>?,.
\/]
+
(?:\.[
0-9
]
+@|
)
/g
)
let
arrayJumlah
=
[]
arrayFormula
.
map
((
item
,
indexs
)
=>
{
let
index
=
dataTable2
.
findIndex
((
val
)
=>
val
[
19
]
==
item
)
let
index
=
dataTable2
.
findIndex
((
val
)
=>
val
[
20
]
==
item
)
if
(
index
>
0
)
{
arrayJumlah
.
push
(
dataTable2
[
index
][
tableMeta
.
columnIndex
])
}
else
{
...
...
@@ -703,7 +707,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta
.
rowData
[
0
]
===
7
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
0
]).
toFixed
(
1
)
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
1
]).
toFixed
(
1
)
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -719,8 +723,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/> : tableMeta.rowData
[
2
1
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
/> : tableMeta.rowData
[
2
2
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -738,7 +742,7 @@ export default class BalanceSheetOLPA extends Component {
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/LightTooltip>
:
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -846,7 +850,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta
.
rowData
[
0
]
===
7
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
0
]).
toFixed
(
1
)
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
1
]).
toFixed
(
1
)
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -862,8 +866,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/> : tableMeta.rowData
[
2
1
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
/> : tableMeta.rowData
[
2
2
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -881,7 +885,7 @@ export default class BalanceSheetOLPA extends Component {
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/LightTooltip>
:
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -989,7 +993,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta
.
rowData
[
0
]
===
7
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
0
]).
toFixed
(
1
)
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
1
]).
toFixed
(
1
)
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1005,8 +1009,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/> : tableMeta.rowData
[
2
1
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
/> : tableMeta.rowData
[
2
2
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1024,7 +1028,7 @@ export default class BalanceSheetOLPA extends Component {
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/LightTooltip>
:
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1132,7 +1136,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta
.
rowData
[
0
]
===
7
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
0
]).
toFixed
(
1
)
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
1
]).
toFixed
(
1
)
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1148,8 +1152,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/> : tableMeta.rowData
[
2
1
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
/> : tableMeta.rowData
[
2
2
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1167,7 +1171,7 @@ export default class BalanceSheetOLPA extends Component {
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/LightTooltip>
:
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1275,7 +1279,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta
.
rowData
[
0
]
===
7
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
0
]).
toFixed
(
1
)
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
1
]).
toFixed
(
1
)
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1291,8 +1295,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/> : tableMeta.rowData
[
2
1
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
/> : tableMeta.rowData
[
2
2
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1310,7 +1314,7 @@ export default class BalanceSheetOLPA extends Component {
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/LightTooltip>
:
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1418,7 +1422,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta
.
rowData
[
0
]
===
7
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
0
]).
toFixed
(
1
)
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
1
]).
toFixed
(
1
)
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1434,8 +1438,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/> : tableMeta.rowData
[
2
1
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
/> : tableMeta.rowData
[
2
2
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1453,7 +1457,7 @@ export default class BalanceSheetOLPA extends Component {
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/LightTooltip>
:
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1561,7 +1565,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta
.
rowData
[
0
]
===
7
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
0
]).
toFixed
(
1
)
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
1
]).
toFixed
(
1
)
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1577,8 +1581,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/> : tableMeta.rowData
[
2
1
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
/> : tableMeta.rowData
[
2
2
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1596,7 +1600,7 @@ export default class BalanceSheetOLPA extends Component {
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/LightTooltip>
:
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1704,7 +1708,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta
.
rowData
[
0
]
===
7
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
0
]).
toFixed
(
1
)
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
1
]).
toFixed
(
1
)
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1720,8 +1724,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/> : tableMeta.rowData
[
2
1
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
/> : tableMeta.rowData
[
2
2
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1739,7 +1743,7 @@ export default class BalanceSheetOLPA extends Component {
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/LightTooltip>
:
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1847,7 +1851,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta
.
rowData
[
0
]
===
7
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
0
]).
toFixed
(
1
)
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
1
]).
toFixed
(
1
)
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1863,8 +1867,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/> : tableMeta.rowData
[
2
1
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
/> : tableMeta.rowData
[
2
2
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1882,7 +1886,7 @@ export default class BalanceSheetOLPA extends Component {
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/LightTooltip>
:
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -1990,7 +1994,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta
.
rowData
[
0
]
===
7
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
0
]).
toFixed
(
1
)
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
1
]).
toFixed
(
1
)
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -2006,8 +2010,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/> : tableMeta.rowData
[
2
1
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
/> : tableMeta.rowData
[
2
2
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -2025,7 +2029,7 @@ export default class BalanceSheetOLPA extends Component {
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/LightTooltip>
:
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -2133,7 +2137,7 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta
.
rowData
[
0
]
===
7
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
0
]).
toFixed
(
1
)
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
2
1
]).
toFixed
(
1
)
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -2149,8 +2153,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/> : tableMeta.rowData
[
2
1
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
/> : tableMeta.rowData
[
2
2
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -2168,7 +2172,7 @@ export default class BalanceSheetOLPA extends Component {
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/LightTooltip>
:
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -2276,7 +2280,150 @@ export default class BalanceSheetOLPA extends Component {
null
:
tableMeta
.
rowData
[
0
]
===
7
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
20
]).
toFixed
(
1
)
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
21
]).
toFixed
(
1
)
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
,
color
:
'black'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/> : tableMeta.rowData
[
22
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
21
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
,
color
:
'red'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/LightTooltip>
:
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
21
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
,
color
:
'red'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/LightTooltip
>
:
null
}
<
/div
>
)
}
}
},
{
name
:
"Current Total"
,
options
:
{
customHeadRender
:
(
columnMeta
)
=>
(
<
TableCell
style
=
{{
...
style2
,
top
:
0
,
zIndex
:
99
,
backgroundColor
:
'#37b5e6'
,
width
:
96
}}
>
<
Typography
style
=
{{
color
:
'black'
,
fontSize
:
12
,
fontWeight
:
'bold'
,
textAlign
:
'center'
}}
>
{
columnMeta
.
name
}
<
/Typography
>
<
/TableCell
>
),
setCellProps
:
()
=>
({
style2
}),
customBodyRender
:
(
value
,
tableMeta
,
updateValue
)
=>
{
return
(
<
div
style
=
{{
textAlign
:
'right'
}}
>
{
tableMeta
.
rowData
[
0
]
===
3
?
<
div
style
=
{{
flex
:
1
}}
>
<
FormControlLabel
style
=
{{
margin
:
0
}}
value
=
{
value
}
control
=
{
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
color
:
"#5198ea"
,
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
this
.
props
.
isApprover
==
true
?
true
:
((
this
.
props
.
lastStatus
===
'SUBMIT'
||
this
.
props
.
lastStatus
===
'REVISION'
)
&&
this
.
props
.
prevRevision
===
false
&&
(
this
.
props
.
status
===
'revision'
||
this
.
props
.
status
===
'not-yet'
||
this
.
props
.
status
===
'draft'
||
this
.
props
.
status
===
'submitted'
)
?
false
:
true
)}
value
=
{
Number
(
value
).
toFixed
(
1
)}
onBlur
=
{(
event
)
=>
{
// updateValue(event.target.value)
handleChange
(
event
.
target
.
value
,
tableMeta
)
console
.
log
(
dataTable2
)
}}
/
>
}
/
>
<
/div>
:
tableMeta
.
rowData
[
0
]
===
2
?
<
span
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
}}
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValue
(
tableMeta
)).
toFixed
(
1
)}
/
>
<
/span
>
:
tableMeta
.
rowData
[
0
]
===
4
?
null
:
tableMeta
.
rowData
[
0
]
===
6
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
5
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
fontSize
:
12
,
textAlign
:
'right'
,
borderColor
:
'transparent'
,
margin
:
0
,
width
:
96
,
backgroundColor
:
'transparent'
}}
type
=
"text"
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleFormula
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
:
tableMeta
.
rowData
[
0
]
===
1
?
// value === "" ?
// null :
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(value)}
// />
null
:
tableMeta
.
rowData
[
0
]
===
7
?
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)
===
Number
(
tableMeta
.
rowData
[
21
]).
toFixed
(
1
)
?
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -2292,8 +2439,8 @@ export default class BalanceSheetOLPA extends Component {
placeholder
=
""
disabled
=
{
true
}
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/> : tableMeta.rowData
[
2
1
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
/> : tableMeta.rowData
[
2
2
]
=== "STOPPER"
?
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
@@ -2311,7 +2458,7 @@ export default class BalanceSheetOLPA extends Component {
value
=
{
Number
(
handleValidation
(
value
,
tableMeta
)).
toFixed
(
1
)}
/
>
<
/LightTooltip>
:
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
0
]}
`
}
arrow
>
<
LightTooltip
title
=
{
`Value Should be
${
tableMeta
.
rowData
[
2
1
]}
`
}
arrow
>
<
NumberFormat
thousandSeparator
=
{
true
}
style
=
{{
...
...
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