IO-3020 IO-3036 Remove date restriction and lock down feature based reports.

This commit is contained in:
Patrick Fic
2024-12-12 09:46:01 -08:00
parent 53d15b0d45
commit af03a1b4e3
3 changed files with 81 additions and 37 deletions

View File

@@ -8,6 +8,7 @@ import { selectPrintCenter } from "../../redux/modals/modals.selectors";
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";
const mapStateToProps = createStructuredSelector({
printCenterModal: selectPrintCenter,
@@ -42,7 +43,12 @@ export function PrintCenterItemComponent({
setLoading(false);
};
if (disabled) return <li className="print-center-item">{item.title} </li>;
if (disabled || item.featureNameRestricted)
return (
<li className="print-center-item">
<LockWrapperComponent featureName={item.featureNameRestricted}>{item.title}</LockWrapperComponent>
</li>
);
return (
<li>
<Space wrap>