|
|
@@ -41,9 +41,7 @@ const CostAndExpenseReport: React.FC<Props> = ({ team, customer }) => { |
|
|
|
{ |
|
|
|
label: t("Remaining Percentage"), |
|
|
|
paramName: "budgetPercentage", |
|
|
|
type: "select", |
|
|
|
options: percentList, |
|
|
|
needAll: true, |
|
|
|
type: "number", |
|
|
|
}, |
|
|
|
], |
|
|
|
[t] |
|
|
@@ -58,8 +56,9 @@ const CostAndExpenseReport: React.FC<Props> = ({ team, customer }) => { |
|
|
|
let postData: CostAndExpenseReportRequest = { |
|
|
|
teamId: null, |
|
|
|
clientId: null, |
|
|
|
budgetPercentage: ">50%" |
|
|
|
budgetPercentage: 0.5 |
|
|
|
} |
|
|
|
console.log(query.budgetPercentage) |
|
|
|
if (query.team.length > 0 && query.team.toLocaleLowerCase() !== "all") { |
|
|
|
index = teamCombo.findIndex(team => team === query.team) |
|
|
|
postData.teamId = team[index].id |
|
|
@@ -68,14 +67,14 @@ const CostAndExpenseReport: React.FC<Props> = ({ team, customer }) => { |
|
|
|
index = custCombo.findIndex(customer => customer === query.customer) |
|
|
|
postData.clientId = customer[index].id |
|
|
|
} |
|
|
|
if (query.budgetPercentage.length > 0 && query.budgetPercentage.toLocaleLowerCase() !== "all") { |
|
|
|
postData.budgetPercentage = query.budgetPercentage |
|
|
|
if (Boolean(query.budgetPercentage)) { |
|
|
|
postData.budgetPercentage = query.budgetPercentage/100 |
|
|
|
} |
|
|
|
console.log(postData) |
|
|
|
const response = await fetchCostAndExpenseReport(postData) |
|
|
|
if (response) { |
|
|
|
downloadFile(new Uint8Array(response.blobValue), response.filename!!) |
|
|
|
} |
|
|
|
const response = await fetchCostAndExpenseReport(postData) |
|
|
|
if (response) { |
|
|
|
downloadFile(new Uint8Array(response.blobValue), response.filename!!) |
|
|
|
} |
|
|
|
}} |
|
|
|
/> |
|
|
|
</> |
|
|
|