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

This commit is contained in:
Dave
2025-08-13 15:05:57 -04:00
parent de6bb3d634
commit 898b97151f
4 changed files with 54 additions and 39 deletions

View File

@@ -3,15 +3,16 @@ import PropTypes from "prop-types";
import { ProductFruits } from "react-product-fruits";
import dayjs from "dayjs";
const ProductFruitsWrapper = React.memo(({ currentUser, bodyshop, workspaceCode }) => {
const ProductFruitsWrapper = React.memo(({ currentUser, bodyshop, workspaceCode, isPartsEntry }) => {
const featureProps = bodyshop?.features
? Object.entries(bodyshop.features).reduce((acc, [key, value]) => {
acc[key] = value === true || (typeof value === "string" && dayjs(value).isAfter(dayjs()));
return acc;
}, {})
: {};
return (
!isPartsEntry &&
workspaceCode &&
currentUser?.authorized === true &&
currentUser?.email && (
@@ -30,6 +31,8 @@ const ProductFruitsWrapper = React.memo(({ currentUser, bodyshop, workspaceCode
);
});
ProductFruitsWrapper.displayName = "ProductFruitsWrapper";
export default ProductFruitsWrapper;
ProductFruitsWrapper.propTypes = {