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
488fa13e
Commit
488fa13e
authored
Jan 02, 2024
by
fahrur huzain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update issue CAT total weight
parent
94735bee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
CorporateAnnualTarget.js
src/container/BudgetTahunan/CorporateAnnualTarget.js
+4
-4
No files found.
src/container/BudgetTahunan/CorporateAnnualTarget.js
View file @
488fa13e
...
...
@@ -175,7 +175,7 @@ export default class CorporateAnnualTarget extends Component {
item.level,
"",
item.description,
item
.
type_report_id
==
1
?
`
${
fixNumber
(
Number
(
item
.
weight
)
*
100
)}
%`
:
(
String
(
item
.
cat
.
weight
).
includes
(
'%'
)
?
(
String
(
Number
(
String
(
item
.
cat
.
weight
).
substr
(
0
,
String
(
item
.
cat
.
weight
).
length
-
1
)))
+
'%'
)
:
((
String
(
Number
(
item
.
cat
.
weight
))
+
'%'
)
+
'%'
)),
item.type_report_id == 1 ? `${fixNumber(Number(item.weight) * 100)}%` : (String(item.cat.weight).includes('%') ? (String(Number(String(item.cat.weight).substr(0, String(item.cat.weight).length - 1))) + '%') : ((String(Number(item.cat.weight)) + '%'))),
parentTrue ? item.cat.uom : item.uom,
parentTrue ? item.cat.kpi_type == "" ? null : { value: item.cat.kpi_type } : item.kpi_type == "" ? null : { value: item.kpi_type },
parentTrue ? item.cat.max_ach == "" ? null : { value: titleCase(item.cat.max_ach) } : item.max_ach == "" ? null : { value: titleCase(item.max_ach) },
...
...
@@ -677,7 +677,7 @@ export default class CorporateAnnualTarget extends Component {
})
let body = {
"report_id": this.props.report_id,
// "revision": Number(this.props.revision),
// "revision": Number(this.props.revision),
"periode": this.props.periode,
"company_id": this.props.company.company_id,
"submission_id": this.props.submissionID,
...
...
@@ -842,11 +842,11 @@ export default class CorporateAnnualTarget extends Component {
"status": "submitted",
"cat": data
}
// // // //
console.log(totalWeight)
console.log(totalWeight)
// this.setState({dataTable: dataTampung})
if (handleKosongKPIMAXYTD) {
this.setState({ alert: true, messageAlert: 'KPI / Weight / KPI Type / Max Ach / Formula YTD / Cannot be Empty', tipeAlert: 'warning', loading: false, editable: true })
}
else
if
(
totalWeight
<
100
)
{
} else if (totalWeight < 100
&& totalWeight > 0
) {
this.setState({ alert: true, messageAlert: 'Total weight less than 100%', tipeAlert: 'warning', loading: false, editable: true })
} else {
console.log(JSON.stringify(payload))
...
...
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