Compare commits

...

2 Commits

Author SHA1 Message Date
Allan Carr
07119e4e7e IO-2438 Remove unneeded imports 2023-11-23 19:14:00 -08:00
Allan Carr
7dcdd64a17 IO-2438 Adjust Start & End dates for timetickets 2023-11-23 19:11:09 -08:00

View File

@@ -2,11 +2,9 @@ import { useQuery } from "@apollo/client";
import { Col, Row } from "antd";
import _ from "lodash";
import moment from "moment";
import queryString from "query-string";
import React, { useMemo } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { useLocation } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import { QUERY_TIME_TICKETS_IN_RANGE_SB } from "../../graphql/timetickets.queries";
import { selectBodyshop } from "../../redux/user/user.selectors";
@@ -31,12 +29,8 @@ export default connect(
export function ScoreboardTimeTicketsStats({ bodyshop }) {
const { t } = useTranslation();
const searchParams = queryString.parse(useLocation().search);
const { start, end } = searchParams;
const startDate = start
? moment(start)
: moment().startOf("week").subtract(7, "days");
const endDate = end ? moment(end) : moment().endOf("week");
const startDate = moment().startOf("month")
const endDate = moment().endOf("month");
const fixedPeriods = useMemo(() => {
const endOfThisMonth = moment().endOf("month");