Skip to content

Commit

Permalink
Merge pull request #805 from AI4Bharat/minorfix9
Browse files Browse the repository at this point in the history
  • Loading branch information
ishvindersethi22 authored Aug 27, 2024
2 parents 76399b5 + bfb9cc8 commit 5c63d4d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/containers/Organization/OrganizationReport.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ const OrganizationReport = () => {
);
const apiObj = new DownloadOrganizationReportsAPI(
id,
temp[0].downloadEndPoint
temp[0].downloadEndPoint,
taskStartDate,
taskEndDate,
);
dispatch(APITransport(apiObj));
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ import ENDPOINTS from "../../../../config/apiendpoint";
import C from "../../../constants";

export default class DownloadOrganizationReportsAPI extends API {
constructor(id, endPoint, timeout = 2000) {
constructor(id, endPoint, taskStartDate="", taskEndDate="", timeout = 2000) {
super("GET", timeout, false);
this.type = C.DOWNLOAD_ORGANIZATION_REPORTS;
this.endpoint = `${super.apiEndPointAuto()}${
this.endpoint = endPoint === "send_tasks_report_email" ?
`${super.apiEndPointAuto()}${
ENDPOINTS.organization
}${id}/${endPoint}/?taskStartDate=${taskStartDate}&taskEndDate=${taskEndDate}`
:`${super.apiEndPointAuto()}${
ENDPOINTS.organization
}${id}/${endPoint}/`;
}
Expand Down

0 comments on commit 5c63d4d

Please sign in to comment.