Resolved date searching issues that would include an extra day RPS-72

This commit is contained in:
Patrick Fic
2020-12-18 11:47:22 -08:00
parent 287e8a619c
commit 54a693744e
2 changed files with 5 additions and 1 deletions

View File

@@ -34,6 +34,7 @@ export function ReportingDatesMolecule({ queryReportingData }) {
rules={[{ type: "array", required: true }]}
>
<DatePicker.RangePicker
format="YYYY-MM-DD"
ranges={{
Today: [moment(), moment()],
"Last 14 days": [moment().subtract(14, "days"), moment()],

View File

@@ -28,7 +28,10 @@ export function* onQueryReportData() {
export function* queryReportingData({ payload: { startDate, endDate } }) {
const result = yield client.query({
query: REPORTING_GET_JOBS,
variables: { startDate, endDate },
variables: {
startDate: startDate.format("YYYY-MM-DD"),
endDate: endDate.format("YYYY-MM-DD"),
},
});
if (result.errors) {
log.error("Error fetching report data.", result.errors);