Merged in hotfix/IO-3020-smart-scheduling-upsell (pull request #2030)
IO-3020 Fix PrintCenter Upsell restrictions
This commit is contained in:
@@ -9,6 +9,7 @@ import { selectTechnician } from "../../redux/tech/tech.selectors";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import { GenerateDocument } from "../../utils/RenderTemplate";
|
||||
import LockWrapperComponent from "../lock-wrapper/lock-wrapper.component";
|
||||
import { HasFeatureAccess } from './../feature-wrapper/feature-wrapper.component';
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
printCenterModal: selectPrintCenter,
|
||||
@@ -43,10 +44,12 @@ export function PrintCenterItemComponent({
|
||||
setLoading(false);
|
||||
};
|
||||
|
||||
if (disabled || item.featureNameRestricted)
|
||||
if (disabled || (item.featureNameRestricted && !HasFeatureAccess({"featureName": item.featureNameRestricted, bodyshop})))
|
||||
return (
|
||||
<li className="print-center-item">
|
||||
<LockWrapperComponent featureName={item.featureNameRestricted}>{item.title}</LockWrapperComponent>
|
||||
<LockWrapperComponent featureName={item.featureNameRestricted} bodyshop={bodyshop}>
|
||||
{item.title}
|
||||
</LockWrapperComponent>
|
||||
</li>
|
||||
);
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user