Browse Source

update

tags/Baseline_30082024_FRONTEND_UAT
cyril.tsui 1 year ago
parent
commit
92b4994115
2 changed files with 4 additions and 3 deletions
  1. +2
    -2
      src/components/CostAndExpenseReport/CostAndExpenseReport.tsx
  2. +2
    -1
      src/components/ProjectCompletionReport/ProjectCompletionReport.tsx

+ 2
- 2
src/components/CostAndExpenseReport/CostAndExpenseReport.tsx View File

@@ -72,7 +72,7 @@ const CostAndExpenseReport: React.FC<Props> = ({ team, customer, subsidiary, nee
let postData: CostAndExpenseReportRequest = { let postData: CostAndExpenseReportRequest = {
teamId: null, teamId: null,
clientId: null, clientId: null,
budgetPercentage: null,
budgetPercentage: 0.99,
type: "all" type: "all"
} }
console.log(query.budgetPercentage) console.log(query.budgetPercentage)
@@ -88,7 +88,7 @@ const CostAndExpenseReport: React.FC<Props> = ({ team, customer, subsidiary, nee
postData.type = customerIndex >= 0 ? "client" : subsidiaryIndex >= 0 ? "subsidiary" : "all" postData.type = customerIndex >= 0 ? "client" : subsidiaryIndex >= 0 ? "subsidiary" : "all"
} }
if (Boolean(query.budgetPercentage)) { if (Boolean(query.budgetPercentage)) {
postData.budgetPercentage = query.budgetPercentage/100
postData.budgetPercentage = query.budgetPercentage / 100
} }
console.log(postData) console.log(postData)
const response = await fetchCostAndExpenseReport(postData) const response = await fetchCostAndExpenseReport(postData)


+ 2
- 1
src/components/ProjectCompletionReport/ProjectCompletionReport.tsx View File

@@ -57,13 +57,14 @@ const ProjectCompletionReport: React.FC<Props> = (
endDate: dayjs().format(INPUT_DATE_FORMAT).toString(), endDate: dayjs().format(INPUT_DATE_FORMAT).toString(),
outstanding: query.outstanding && query.outstanding === "Outstanding Accounts Receivable" outstanding: query.outstanding && query.outstanding === "Outstanding Accounts Receivable"
}; };
console.log(query)
if (query.startDateTo && query.startDateTo.length > 0) { if (query.startDateTo && query.startDateTo.length > 0) {
postData.endDate = query.startDateTo; postData.endDate = query.startDateTo;
} }
if (teamId) { if (teamId) {
postData.teamId = teamId postData.teamId = teamId
} }
if (query.startDateFrom && query.startDateFrom.length > 0) {
if (query.startDate && query.startDate.length > 0) {
postData.startDate = query.startDate; postData.startDate = query.startDate;
} }
console.log(postData) console.log(postData)


Loading…
Cancel
Save