feature/IO-3255-simplified-parts-management - Checkpoint
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user