Browse Source

no message

tags/Baseline_180220205_Frontend
MSI\2Fi 1 year ago
parent
commit
08b82b9ea3
1 changed files with 8 additions and 5 deletions
  1. +8
    -5
      src/components/ResourceOverconsumptionReport/ResourceOverconsumptionReport.tsx

+ 8
- 5
src/components/ResourceOverconsumptionReport/ResourceOverconsumptionReport.tsx View File

@@ -84,14 +84,17 @@ return (
lowerLimit: 0.9 lowerLimit: 0.9
} }
if (query.team.length > 0 && query.team.toLocaleLowerCase() !== "all") { if (query.team.length > 0 && query.team.toLocaleLowerCase() !== "all") {
// index = teamCombo.findIndex(team => team === query.team)
index = teamCombo.findIndex(team => team === query.team)
// console.log(index) // console.log(index)
// console.log(teamCombo) // console.log(teamCombo)
// console.log(team)
const sortedTeam = team.sort((a, b) => a.code.localeCompare(b.code))
// console.log(sortedTeam)
const sortedId = sortedTeam[index].id
// console.log(sortedId)
// console.log(team.find(team => query.team === `${team.code} - Team ${team.staffName}`)?.id) // console.log(team.find(team => query.team === `${team.code} - Team ${team.staffName}`)?.id)
const teamId = team.find(team => query.team === `${team.code} - Team ${team.staffName}`)?.id
// postData.teamId = team.sort()[index].id
postData.teamId = teamId
// const teamId = team.find(team => query.team === `${team.code} - Team ${team.staffName}`)?.id
postData.teamId = sortedId
// postData.teamId = teamId
} }
if (Boolean(query.lowerLimit)) { if (Boolean(query.lowerLimit)) {
postData.lowerLimit = query.lowerLimit/100 postData.lowerLimit = query.lowerLimit/100


Loading…
Cancel
Save