This commit is contained in:
Dave Richer
2023-12-11 17:34:05 -05:00
parent 5c164f807d
commit ad79344709
87 changed files with 1100 additions and 1113 deletions

View File

@@ -5,7 +5,7 @@ import queryString from "query-string";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { useNavigate, useLocation } from "react-router-dom";
import { useNavigate, useSearchParams } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import { QUERY_ALL_ACTIVE_JOBS } from "../../graphql/jobs.queries";
import { selectBodyshop } from "../../redux/user/user.selectors";
@@ -19,7 +19,7 @@ const mapStateToProps = createStructuredSelector({
});
export function TechLookupJobsList({ bodyshop }) {
const searchParams = queryString.parse(useLocation().search);
const searchParams = queryString.parse(useSearchParams().toString());
const { selected } = searchParams;
const { loading, error, data, refetch } = useQuery(QUERY_ALL_ACTIVE_JOBS, {
@@ -80,7 +80,7 @@ export function TechLookupJobsList({ bodyshop }) {
const handleOnRowClick = (record) => {
if (record) {
if (record.id) {
history.push({
history({
search: queryString.stringify({
...searchParams,
selected: record.id,