Skip to content

Commit

Permalink
Merge pull request #17 from openimis/develop
Browse files Browse the repository at this point in the history
MERGING RELEASE branches
  • Loading branch information
delcroip authored Nov 10, 2022
2 parents 5541250 + 814b494 commit ce64fa6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/components/BillSearcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ const BillSearcher = ({
bills,
billsPageInfo,
billsTotalCount,
actions,
actionsContributionKey
}) => {
const [billToDelete, setBillToDelete] = useState(null);
const [deletedBillUuids, setDeletedBillUuids] = useState([]);
Expand Down Expand Up @@ -200,6 +202,10 @@ const BillSearcher = ({
defaultFilters={defaultFilters()}
rowDisabled={isRowDisabled}
rowLocked={isRowDisabled}
actions={actions}
actionsContributionKey={actionsContributionKey}
withSelection="multiple"
selectionMessage={"bill.selection.count"}
/>
);
};
Expand Down
10 changes: 9 additions & 1 deletion src/pages/BillsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,29 @@ import { injectIntl } from "react-intl";
import { withTheme, withStyles } from "@material-ui/core/styles";
import { connect } from "react-redux";
import { RIGHT_BILL_SEARCH } from "../constants";
import { createInvoiceEventMessage } from "../actions"
import BillSearcher from "../components/BillSearcher";

const styles = (theme) => ({
page: theme.page,
fab: theme.fab,
});

const BILL_SEARCHER_ACTION_CONTRIBUTION_KEY = "invoice.bill.SelectionAction"

const BillsPage = (props) => {
const { intl, classes, rights } = props;

let actions = [];
return (
rights.includes(RIGHT_BILL_SEARCH) && (
<div className={classes.page}>
<Helmet title={formatMessage(props.intl, "bill", "bills.pageTitle")} />
<BillSearcher rights={rights} />
<BillSearcher
rights={rights}
actions={actions}
actionsContributionKey={BILL_SEARCHER_ACTION_CONTRIBUTION_KEY}
/>
</div>
)
);
Expand Down
3 changes: 2 additions & 1 deletion src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@
"message": "Deleting data does not mean erasing it from OpenIMIS database. The data will only be deactivated from the viewed list."
},
"mutationLabel": "Delete Bill {code}"
}
},
"selection.count": "Selected {count} bill(s)"
},
"bills": {
"pageTitle": "Bills",
Expand Down

0 comments on commit ce64fa6

Please sign in to comment.