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
9952b840
Commit
9952b840
authored
Apr 20, 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
bfecb1ae
726a7cf1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
11 deletions
+17
-11
MonthlyReport.js
src/container/MonthlyReport.js
+2
-1
CorporateAnnualTargetMR.js
src/container/MonthlyReport/CorporateAnnualTargetMR.js
+9
-6
ProfitLossMR.js
src/container/MonthlyReport/ProfitLossMR.js
+2
-2
OutlookPA.js
src/container/OutlookPA.js
+2
-1
RollingOutlook.js
src/container/RollingOutlook.js
+2
-1
No files found.
src/container/MonthlyReport.js
View file @
9952b840
...
@@ -236,7 +236,8 @@ export default class MonthlyReport extends Component {
...
@@ -236,7 +236,8 @@ export default class MonthlyReport extends Component {
item
.
revision
,
item
.
revision
,
this
.
state
.
isApprovedMB
?
(
this
.
state
.
lastStatus
===
'APPROVED'
?
'CLOSED'
:
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
status_approv
)
:
"CLOSED"
,
this
.
state
.
isApprovedMB
?
(
this
.
state
.
lastStatus
===
'APPROVED'
?
'CLOSED'
:
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
status_approv
)
:
"CLOSED"
,
item
.
report_id
,
item
.
report_id
,
item
.
is_can_upload
,
// item.is_can_upload,
item
.
report_name
===
"Cash Flow"
?
item
.
is_can_upload
:
(
Number
(
item
.
revision
)
>
0
?
(
item
.
current_status
==
"not-yet"
?
false
:
item
.
is_can_upload
)
:
item
.
is_can_upload
),
item
.
revision
item
.
revision
]
]
})
})
...
...
src/container/MonthlyReport/CorporateAnnualTargetMR.js
View file @
9952b840
...
@@ -238,7 +238,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -238,7 +238,7 @@ export default class CorporateAnnualTargetMR extends Component {
item
.
order
item
.
order
])
])
// let index = dataTable.findIndex((val) => val[5] == item.description)
// let index = dataTable.findIndex((val) => val[5] == item.description)
console
.
log
(
index
,
length
-
1
)
//
console.log(index, length - 1)
if
(
index
==
length
-
1
&&
item
.
parent_name
==
"LEARNING & GROWTH PERSPECTIVE"
)
{
if
(
index
==
length
-
1
&&
item
.
parent_name
==
"LEARNING & GROWTH PERSPECTIVE"
)
{
dataTable
.
push
([
dataTable
.
push
([
4
,
4
,
...
@@ -677,6 +677,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -677,6 +677,7 @@ export default class CorporateAnnualTargetMR extends Component {
let
total
=
0
let
total
=
0
let
perfomanceScore
=
''
let
perfomanceScore
=
''
let
totalWeight
=
0
let
totalWeight
=
0
// console.log(datatable2)
let
datatable3
=
datatable2
.
map
((
item
,
index
)
=>
{
let
datatable3
=
datatable2
.
map
((
item
,
index
)
=>
{
// console.log(item[6])
// console.log(item[6])
//total weight
//total weight
...
@@ -746,7 +747,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -746,7 +747,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
}
}
totalAch
=
String
(
totalAch
)
==
'NaN'
||
String
(
totalAch
)
==
'Infinity'
||
String
(
totalAch
)
==
'-Infinity'
?
0
:
totalAch
totalAch
=
String
(
totalAch
)
==
'NaN'
||
String
(
totalAch
)
==
'Infinity'
||
String
(
totalAch
)
==
'-Infinity'
?
0
:
totalAch
totalAch
=
Number
(
totalAch
)
*
100
totalAch
=
this
.
props
.
lastStatus
==
'APPROVED'
?
item
[
13
]
:
Number
(
totalAch
)
*
100
//score
//score
let
listParameter
=
this
.
state
.
parameterScore
let
listParameter
=
this
.
state
.
parameterScore
...
@@ -756,7 +757,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -756,7 +757,7 @@ export default class CorporateAnnualTargetMR extends Component {
let
listParameterFilter
=
listParameter
.
filter
((
val
)
=>
val
.
setting_type
==
String
(
parameterMix
).
toLocaleUpperCase
())
let
listParameterFilter
=
listParameter
.
filter
((
val
)
=>
val
.
setting_type
==
String
(
parameterMix
).
toLocaleUpperCase
())
let
listParameterFilterCompany
=
listParameterFilter
.
filter
((
val
)
=>
val
.
company_id
==
this
.
props
.
company
.
company_id
)
let
listParameterFilterCompany
=
listParameterFilter
.
filter
((
val
)
=>
val
.
company_id
==
this
.
props
.
company
.
company_id
)
let
totalScore
=
0
let
totalScore
=
0
let
achx100
=
item
[
9
]
==
'100%'
&&
(
item
[
8
]
==
'HIB'
||
item
[
8
]
==
'HIG'
)
?
Number
(
totalAch
)
/
100
>
1
?
1
:
Number
(
totalAch
)
/
100
:
Number
(
totalAch
)
/
100
let
achx100
=
item
[
9
]
==
'100%'
&&
(
item
[
8
]
==
'HIB'
||
item
[
8
]
==
'HIG'
)
?
(
Number
(
totalAch
)
/
100
>
1
?
1
:
Number
(
totalAch
)
/
100
)
:
Number
(
totalAch
)
/
100
// if (item[5] == "Max Quality drop from Bor-Barge") {
// if (item[5] == "Max Quality drop from Bor-Barge") {
// console.log(listParameterFilter)
// console.log(listParameterFilter)
// console.log(listParameterFilterCompany)
// console.log(listParameterFilterCompany)
...
@@ -776,7 +777,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -776,7 +777,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
}
})
})
}
}
let
totalScorez
=
Number
(
totalScore
).
toFixed
(
0
)
let
totalScorez
=
this
.
props
.
lastStatus
==
'APPROVED'
?
item
[
14
]
:
Number
(
totalScore
).
toFixed
(
0
)
// if (item[5] == "Max Quality drop from Bor-Barge") {
// if (item[5] == "Max Quality drop from Bor-Barge") {
// console.log(totalScorez)
// console.log(totalScorez)
// }
// }
...
@@ -793,7 +794,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -793,7 +794,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
else
{
}
else
{
totalSW
=
(
Number
(
totalScorez
)
*
Number
(
handlePercent
)
/
100
)
totalSW
=
(
Number
(
totalScorez
)
*
Number
(
handlePercent
)
/
100
)
}
}
totalSW
=
Number
(
totalSW
).
toFixed
(
2
)
totalSW
=
this
.
props
.
lastStatus
==
'APPROVED'
?
item
[
15
]
:
Number
(
totalSW
).
toFixed
(
2
)
if
(
item
[
0
]
!==
1
&&
item
[
0
]
!==
4
)
{
if
(
item
[
0
]
!==
1
&&
item
[
0
]
!==
4
)
{
total
+=
Number
(
totalSW
)
total
+=
Number
(
totalSW
)
}
}
...
@@ -804,6 +805,8 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -804,6 +805,8 @@ export default class CorporateAnnualTargetMR extends Component {
// console.log(listParameterFilterCompany);
// console.log(listParameterFilterCompany);
// console.log(totalScorez)
// console.log(totalScorez)
// console.log(totalSW)
// console.log(totalSW)
// console.log(item[12])
// console.log(item[5])
// console.log(total)
// console.log(total)
return
[
return
[
item
[
0
],
item
[
0
],
...
@@ -1373,7 +1376,7 @@ export default class CorporateAnnualTargetMR extends Component {
...
@@ -1373,7 +1376,7 @@ export default class CorporateAnnualTargetMR extends Component {
let
listParameterFilter
=
listParameter
.
filter
((
val
)
=>
val
.
setting_type
==
String
(
parameterMix
).
toLocaleUpperCase
()
&&
String
(
val
.
company_name
).
toLocaleLowerCase
()
===
"default"
)
let
listParameterFilter
=
listParameter
.
filter
((
val
)
=>
val
.
setting_type
==
String
(
parameterMix
).
toLocaleUpperCase
()
&&
String
(
val
.
company_name
).
toLocaleLowerCase
()
===
"default"
)
let
listParameterFilterCompany
=
listParameterFilter
.
filter
((
val
)
=>
val
.
company_id
==
this
.
props
.
company
.
company_id
)
let
listParameterFilterCompany
=
listParameterFilter
.
filter
((
val
)
=>
val
.
company_id
==
this
.
props
.
company
.
company_id
)
let
totalScore
=
0
let
totalScore
=
0
let
achx100
=
tableMeta
.
rowData
[
9
]
==
'100%'
&&
(
tableMeta
.
rowData
[
8
]
==
'HIB'
||
tableMeta
.
rowData
[
8
]
==
'HIG'
)
?
Number
(
tableMeta
.
rowData
[
13
])
/
100
>
1
?
1
:
Number
(
tableMeta
.
rowData
[
13
])
/
100
:
Number
(
tableMeta
.
rowData
[
13
])
/
100
let
achx100
=
tableMeta
.
rowData
[
9
]
==
'100%'
&&
(
tableMeta
.
rowData
[
8
]
==
'HIB'
||
tableMeta
.
rowData
[
8
]
==
'HIG'
)
?
(
Number
(
tableMeta
.
rowData
[
13
])
/
100
>
1
?
1
:
Number
(
tableMeta
.
rowData
[
13
])
/
100
)
:
Number
(
tableMeta
.
rowData
[
13
])
/
100
if
(
listParameterFilterCompany
.
length
==
0
)
{
if
(
listParameterFilterCompany
.
length
==
0
)
{
listParameterFilter
.
map
((
item
,
index
)
=>
{
listParameterFilter
.
map
((
item
,
index
)
=>
{
if
(
Number
(
achx100
)
>=
Number
(
item
.
min_value
)
&&
Number
(
achx100
)
<=
Number
(
item
.
max_value
))
{
if
(
Number
(
achx100
)
>=
Number
(
item
.
min_value
)
&&
Number
(
achx100
)
<=
Number
(
item
.
max_value
))
{
...
...
src/container/MonthlyReport/ProfitLossMR.js
View file @
9952b840
...
@@ -136,8 +136,8 @@ export default class ProfitLossMR extends Component {
...
@@ -136,8 +136,8 @@ export default class ProfitLossMR extends Component {
checkStatus
=
false
checkStatus
=
false
}
}
//
this.setState({ viewOnly: !checkApprover && checkLastStatus && checkStatus && checkPrevRev })
this
.
setState
({
viewOnly
:
!
checkApprover
&&
checkLastStatus
&&
checkStatus
&&
checkPrevRev
})
this
.
setState
({
viewOnly
:
true
})
//
this.setState({viewOnly: true})
}
}
handleGetFor
(
type
)
{
handleGetFor
(
type
)
{
...
...
src/container/OutlookPA.js
View file @
9952b840
...
@@ -221,7 +221,8 @@ export default class OutlookPA extends Component {
...
@@ -221,7 +221,8 @@ export default class OutlookPA extends Component {
item
.
revision
,
item
.
revision
,
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
item
.
current_status
,
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
item
.
current_status
,
item
.
report_id
,
item
.
report_id
,
Number
(
item
.
revision
)
>
0
?
(
item
.
current_status
==
"not-yet"
?
false
:
item
.
is_can_upload
)
:
item
.
is_can_upload
,
// Number(item.revision) > 0 ? (item.current_status == "not-yet" ? false : item.is_can_upload) : item.is_can_upload,
item
.
report_name
===
"Cash Flow"
?
item
.
is_can_upload
:
(
Number
(
item
.
revision
)
>
0
?
(
item
.
current_status
==
"not-yet"
?
false
:
item
.
is_can_upload
)
:
item
.
is_can_upload
),
item
.
revision
item
.
revision
]
]
})
})
...
...
src/container/RollingOutlook.js
View file @
9952b840
...
@@ -267,7 +267,8 @@ export default class RollingOutlook extends Component {
...
@@ -267,7 +267,8 @@ export default class RollingOutlook extends Component {
item
.
revision
,
item
.
revision
,
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
item
.
current_status
,
this
.
state
.
isSubmit
===
false
?
"CLOSED"
:
item
.
current_status
,
item
.
report_id
,
item
.
report_id
,
Number
(
item
.
revision
)
>
0
?
(
item
.
current_status
==
"not-yet"
?
false
:
item
.
is_can_upload
)
:
item
.
is_can_upload
,
// Number(item.revision) > 0 ? (item.current_status == "not-yet" ? false : item.is_can_upload) : item.is_can_upload,
item
.
report_name
===
"Cash Flow"
?
item
.
is_can_upload
:
(
Number
(
item
.
revision
)
>
0
?
(
item
.
current_status
==
"not-yet"
?
false
:
item
.
is_can_upload
)
:
item
.
is_can_upload
),
item
.
revision
item
.
revision
]
]
})
})
...
...
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