MAJOR CHANGE: Renamed invoices to bills BOD-410
This commit is contained in:
@@ -5,13 +5,14 @@ import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import AccountingPayablesTable from "../../components/accounting-payables-table/accounting-payables-table.component";
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
import { QUERY_INVOICES_FOR_EXPORT } from "../../graphql/accounting.queries";
|
||||
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||
import { QUERY_BILLS_FOR_EXPORT } from "../../graphql/accounting.queries";
|
||||
import {
|
||||
setBreadcrumbs,
|
||||
setSelectedHeader,
|
||||
} from "../../redux/application/application.actions";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
});
|
||||
@@ -20,6 +21,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)),
|
||||
setSelectedHeader: (key) => dispatch(setSelectedHeader(key)),
|
||||
});
|
||||
|
||||
export function AccountingPayablesContainer({
|
||||
bodyshop,
|
||||
setBreadcrumbs,
|
||||
@@ -38,7 +40,7 @@ export function AccountingPayablesContainer({
|
||||
]);
|
||||
}, [t, setBreadcrumbs, setSelectedHeader]);
|
||||
|
||||
const { loading, error, data } = useQuery(QUERY_INVOICES_FOR_EXPORT);
|
||||
const { loading, error, data } = useQuery(QUERY_BILLS_FOR_EXPORT);
|
||||
|
||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||
|
||||
@@ -47,7 +49,7 @@ export function AccountingPayablesContainer({
|
||||
<RbacWrapper action="accounting:payables">
|
||||
<AccountingPayablesTable
|
||||
loadaing={loading}
|
||||
invoices={data ? data.invoices : []}
|
||||
bills={data ? data.bills : []}
|
||||
/>
|
||||
</RbacWrapper>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user