Report center filtering and shop info instance management.
This commit is contained in:
@@ -18,6 +18,7 @@ import EmployeeSearchSelect from "../employee-search-select/employee-search-sele
|
||||
import VendorSearchSelect from "../vendor-search-select/vendor-search-select.component";
|
||||
import "./report-center-modal.styles.scss";
|
||||
import ReportCenterModalFiltersSortersComponent from "./report-center-modal-filters-sorters-component";
|
||||
import { HasFeatureAccess } from "../feature-wrapper/feature-wrapper.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
reportCenterModal: selectReportCenter,
|
||||
@@ -140,6 +141,10 @@ export function ReportCenterModalComponent({reportCenterModal, bodyshop}) {
|
||||
|
||||
const grouped = _.groupBy(FilteredReportsList, "group");
|
||||
|
||||
const groupExcludeKeyFilter = [...!HasFeatureAccess({featureName: 'bills'})? ["purchases"]:[],
|
||||
...!HasFeatureAccess({featureName: 'timetickets'})? ["payroll"]:[],
|
||||
]
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Form
|
||||
@@ -172,7 +177,7 @@ export function ReportCenterModalComponent({reportCenterModal, bodyshop}) {
|
||||
))} */}
|
||||
|
||||
<Row gutter={[16, 16]}>
|
||||
{Object.keys(grouped).map((key) => (
|
||||
{Object.keys(grouped).filter(key => !groupExcludeKeyFilter.includes(key)).map((key) => (
|
||||
<Col md={8} sm={12} key={key}>
|
||||
<Card.Grid
|
||||
style={{
|
||||
|
||||
Reference in New Issue
Block a user