diff --git a/client/src/components/production-board-kanban/settings/LayoutSettings.jsx b/client/src/components/production-board-kanban/settings/LayoutSettings.jsx index 888503df2..8155a4ace 100644 --- a/client/src/components/production-board-kanban/settings/LayoutSettings.jsx +++ b/client/src/components/production-board-kanban/settings/LayoutSettings.jsx @@ -1,7 +1,15 @@ import { Card, Col, Form, Radio, Row } from "antd"; import PropTypes from "prop-types"; +import { connect } from "react-redux"; +import { createStructuredSelector } from "reselect"; +import { selectBodyshop } from "../../../redux/user/user.selectors"; +import { HasFeatureAccess } from "../../feature-wrapper/feature-wrapper.component"; -const LayoutSettings = ({ t }) => ( +const mapStateToProps = createStructuredSelector({ + bodyshop: selectBodyshop +}); + +const LayoutSettings = ({ t, bodyshop }) => ( {[ @@ -30,14 +38,18 @@ const LayoutSettings = ({ t }) => ( { value: false, label: t("production.labels.wide") } ] }, - { - name: "cardcolor", - label: t("production.labels.cardcolor"), - options: [ - { value: true, label: t("production.labels.on") }, - { value: false, label: t("production.labels.off") } - ] - }, + ...(HasFeatureAccess({ bodyshop, featureName: "smartscheduling" }) + ? [ + { + name: "cardcolor", + label: t("production.labels.cardcolor"), + options: [ + { value: true, label: t("production.labels.on") }, + { value: false, label: t("production.labels.off") } + ] + } + ] + : []), { name: "kiosk", label: t("production.labels.kiosk_mode"), @@ -67,4 +79,4 @@ LayoutSettings.propTypes = { t: PropTypes.func.isRequired }; -export default LayoutSettings; +export default connect(mapStateToProps)(LayoutSettings);