瀏覽代碼

Fix team selection not align with optput result

tags/Baseline_180220205_Frontend
MSI\2Fi 1 年之前
父節點
當前提交
4c76e4d929
共有 1 個文件被更改,包括 9 次插入3 次删除
  1. +9
    -3
      src/components/ResourceOverconsumptionReport/ResourceOverconsumptionReport.tsx

+ 9
- 3
src/components/ResourceOverconsumptionReport/ResourceOverconsumptionReport.tsx 查看文件

@@ -83,9 +83,15 @@ return (
status: "All",
lowerLimit: 0.9
}
if (query.team.length > 0 && query.team.toLocaleLowerCase() !== "all") {
index = teamCombo.findIndex(team => team === query.team)
postData.teamId = team[index].id
if (query.team.length > 0 && query.team.toLocaleLowerCase() !== "all") {
// index = teamCombo.findIndex(team => team === query.team)
// console.log(index)
// console.log(teamCombo)
// console.log(team)
// 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
}
if (Boolean(query.lowerLimit)) {
postData.lowerLimit = query.lowerLimit/100


Loading…
取消
儲存