diff --git a/client/src/App/App.jsx b/client/src/App/App.jsx
index 34481232c..85f54240c 100644
--- a/client/src/App/App.jsx
+++ b/client/src/App/App.jsx
@@ -58,7 +58,7 @@ export function App({ bodyshop, checkUserSession, currentUser, online, setOnline
useEffect(() => {
const pathname = window.location.pathname;
- const isParts = pathname.startsWith("/parts/") && bodyshop?.external_shop_id;
+ const isParts = pathname === "/parts" || pathname.startsWith("/parts/") || bodyshop?.external_shop_id;
setIsPartsEntry(isParts);
}, [setIsPartsEntry, bodyshop?.external_shop_id]);
diff --git a/client/src/components/breadcrumbs/breadcrumbs.component.jsx b/client/src/components/breadcrumbs/breadcrumbs.component.jsx
index f90af8a11..0fda5d047 100644
--- a/client/src/components/breadcrumbs/breadcrumbs.component.jsx
+++ b/client/src/components/breadcrumbs/breadcrumbs.component.jsx
@@ -1,10 +1,9 @@
import { HomeFilled } from "@ant-design/icons";
import { Breadcrumb, Col, Row } from "antd";
-import React from "react";
+import { selectBreadcrumbs, selectIsPartsEntry } from "../../redux/application/application.selectors";
import { connect } from "react-redux";
import { Link } from "react-router-dom";
import { createStructuredSelector } from "reselect";
-import { selectBreadcrumbs } from "../../redux/application/application.selectors";
import { selectBodyshop, selectPartsManagementOnly } from "../../redux/user/user.selectors";
import GlobalSearch from "../global-search/global-search.component";
import GlobalSearchOs from "../global-search/global-search-os.component";
@@ -14,10 +13,11 @@ import { useSplitTreatments } from "@splitsoftware/splitio-react";
const mapStateToProps = createStructuredSelector({
breadcrumbs: selectBreadcrumbs,
bodyshop: selectBodyshop,
- partsManagementOnly: selectPartsManagementOnly
+ partsManagementOnly: selectPartsManagementOnly,
+ isPartsEntry: selectIsPartsEntry
});
-export function BreadCrumbs({ breadcrumbs, bodyshop, partsManagementOnly }) {
+export function BreadCrumbs({ breadcrumbs, bodyshop, partsManagementOnly, isPartsEntry }) {
const {
treatments: { OpenSearch }
} = useSplitTreatments({
@@ -35,7 +35,7 @@ export function BreadCrumbs({ breadcrumbs, bodyshop, partsManagementOnly }) {
{
key: "home",
title: (
-
+
{(bodyshop && bodyshop.shopname && `(${bodyshop.shopname})`) || ""}
)
diff --git a/client/src/pages/parts-settings/parts-settings.page.component.jsx b/client/src/pages/parts-settings/parts-settings.page.component.jsx
index 1fd47bbbb..d8d949a9a 100644
--- a/client/src/pages/parts-settings/parts-settings.page.component.jsx
+++ b/client/src/pages/parts-settings/parts-settings.page.component.jsx
@@ -1,6 +1,6 @@
import { Tabs } from "antd";
import queryString from "query-string";
-import React, { useEffect } from "react";
+import { useEffect } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { useLocation, useNavigate } from "react-router-dom";
@@ -8,20 +8,17 @@ import { createStructuredSelector } from "reselect";
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
import ShopVendorPageComponent from "../shop-vendor/shop-vendor.page.component";
import { setBreadcrumbs, setSelectedHeader } from "../../redux/application/application.actions";
-import { selectBodyshop } from "../../redux/user/user.selectors";
import InstanceRenderManager from "../../utils/instanceRenderMgr";
import PartsShopInfoContainer from "../../components/parts-shop-info/parts-shop-info.container";
-const mapStateToProps = createStructuredSelector({
- bodyshop: selectBodyshop
-});
+const mapStateToProps = createStructuredSelector({});
const mapDispatchToProps = (dispatch) => ({
setSelectedHeader: (key) => dispatch(setSelectedHeader(key)),
setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs))
});
-export function PartsSettingsPage({ bodyshop, setSelectedHeader, setBreadcrumbs }) {
+export function PartsSettingsPage({ setSelectedHeader, setBreadcrumbs }) {
const { t } = useTranslation();
const history = useNavigate();
const search = queryString.parse(useLocation().search);
@@ -53,7 +50,7 @@ export function PartsSettingsPage({ bodyshop, setSelectedHeader, setBreadcrumbs
const items = [
{
key: "shop",
- label: t("bodyshop.labels.shop_management"),
+ label: t("bodyshop.labels.parts_shop_management"),
children: (
@@ -62,7 +59,7 @@ export function PartsSettingsPage({ bodyshop, setSelectedHeader, setBreadcrumbs
},
{
key: "vendors",
- label: t("bodyshop.labels.vendor_management"),
+ label: t("bodyshop.labels.parts_vendor_management"),
children: (
diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json
index 482fa095f..bdac476d7 100644
--- a/client/src/translations/en_us/common.json
+++ b/client/src/translations/en_us/common.json
@@ -657,6 +657,8 @@
"zip_post": "Zip/Postal Code"
},
"labels": {
+ "parts_shop_management": "Shop Management",
+ "parts_vendor_management": "Vendor Management",
"2tiername": "Name => RO",
"2tiersetup": "2 Tier Setup",
"2tiersource": "Source => RO",
@@ -1259,6 +1261,7 @@
"vehicle": "Vehicle"
},
"labels": {
+ "settings": "Settings",
"actions": "Actions",
"areyousure": "Are you sure?",
"barcode": "Barcode",
@@ -3526,6 +3529,9 @@
"all_tasks": "All Tasks",
"app": "",
"bc": {
+ "simplified-parts-jobs": "Jobs",
+ "parts": "Jobs",
+ "parts_settings": "Settings",
"accounting-payables": "Payables",
"accounting-payments": "Payments",
"accounting-receivables": "Receivables",
diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json
index 28b7af48e..6ee30051d 100644
--- a/client/src/translations/es/common.json
+++ b/client/src/translations/es/common.json
@@ -657,6 +657,8 @@
"zip_post": ""
},
"labels": {
+ "parts_shop_management": "",
+ "parts_vendor_management": "",
"2tiername": "",
"2tiersetup": "",
"2tiersource": "",
@@ -1260,6 +1262,7 @@
},
"labels": {
"actions": "Comportamiento",
+ "settings": "",
"areyousure": "",
"barcode": "código de barras",
"cancel": "",
@@ -3526,6 +3529,9 @@
"all_tasks": "",
"app": "",
"bc": {
+ "simplified-parts-jobs": "",
+ "parts": "",
+ "parts_settings": "",
"accounting-payables": "",
"accounting-payments": "",
"accounting-receivables": "",
diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json
index e667cc379..05a6d5d3b 100644
--- a/client/src/translations/fr/common.json
+++ b/client/src/translations/fr/common.json
@@ -657,6 +657,8 @@
"zip_post": ""
},
"labels": {
+ "parts_shop_management": "",
+ "parts_vendor_management": "",
"2tiername": "",
"2tiersetup": "",
"2tiersource": "",
@@ -1259,6 +1261,7 @@
"vehicle": ""
},
"labels": {
+ "settings": "",
"actions": "actes",
"areyousure": "",
"barcode": "code à barre",
@@ -3526,6 +3529,9 @@
"all_tasks": "",
"app": "",
"bc": {
+ "simplified-parts-jobs": "",
+ "parts": "",
+ "parts_settings": "",
"accounting-payables": "",
"accounting-payments": "",
"accounting-receivables": "",