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

@@ -13,6 +13,7 @@ import NotFound from "../../components/not-found/not-found.component";
import InstanceRenderManager from "../../utils/instanceRenderMgr";
import { selectIsPartsEntry } from "../../redux/application/application.selectors";
import { createStructuredSelector } from "reselect";
import getPartsBasePath from "../../utils/getPartsBasePath.js";
const mapStateToProps = createStructuredSelector({
isPartsEntry: selectIsPartsEntry
@@ -27,7 +28,7 @@ const mapDispatchToProps = (dispatch) => ({
export function VehicleDetailContainer({ setBreadcrumbs, addRecentItem, setSelectedHeader, isPartsEntry }) {
const { vehId } = useParams();
const { t } = useTranslation();
const basePath = isPartsEntry ? "/parts" : "/manage";
const basePath = getPartsBasePath(isPartsEntry);
const { loading, data, error, refetch } = useQuery(QUERY_VEHICLE_BY_ID, {
variables: { id: vehId },

View File

@@ -7,6 +7,7 @@ import InstanceRenderManager from "../../utils/instanceRenderMgr";
import { setBreadcrumbs, setSelectedHeader } from "../../redux/application/application.actions";
import { createStructuredSelector } from "reselect";
import { selectIsPartsEntry } from "../../redux/application/application.selectors.js";
import getPartsBasePath from "../../utils/getPartsBasePath.js";
const mapStateToProps = createStructuredSelector({
isPartsEntry: selectIsPartsEntry
@@ -19,7 +20,7 @@ const mapDispatchToProps = (dispatch) => ({
export function VehiclesPageContainer({ setBreadcrumbs, setSelectedHeader, isPartsEntry }) {
const { t } = useTranslation();
const basePath = isPartsEntry ? "/parts" : "/manage";
const basePath = getPartsBasePath(isPartsEntry);
useEffect(() => {
document.title = t("titles.vehicles", {