feature/IO-3255-simplified-parts-management - Cleanup

This commit is contained in:
Dave
2025-08-13 17:24:46 -04:00
parent 7158676562
commit 7ed7b6117f
10 changed files with 52 additions and 33 deletions

View File

@@ -8,6 +8,7 @@ import { pageLimit } from "../../utils/config";
import { connect } from "react-redux";
import { selectIsPartsEntry } from "../../redux/application/application.selectors";
import { createStructuredSelector } from "reselect";
import getPartsBasePath from "../../utils/getPartsBasePath.js";
const mapStateToProps = createStructuredSelector({
isPartsEntry: selectIsPartsEntry
@@ -16,7 +17,7 @@ const mapStateToProps = createStructuredSelector({
export function VehiclesListContainer({ isPartsEntry }) {
const searchParams = queryString.parse(useLocation().search);
const { page, sortcolumn, sortorder, search } = searchParams;
const basePath = isPartsEntry ? "/parts" : "/manage";
const basePath = getPartsBasePath(isPartsEntry);
const { loading, error, data, refetch } = useQuery(QUERY_ALL_VEHICLES_PAGINATED, {
variables: {