Skip to content

Commit

Permalink
Merge pull request #57 from openimis/develop
Browse files Browse the repository at this point in the history
MERGING develop into release/24.10
  • Loading branch information
delcroip authored Oct 22, 2024
2 parents 159abdd + c00e09f commit c37f32d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ const formatPaymentInvoiceGQL = (payment, subjectId, subjectType) =>
`
${!!payment.id ? `id: "${payment.id}"` : ""}
${!!subjectId ? `subjectId: "${subjectId}"` : ""}
${!!subjectType ? `subjectType: "${subjectType}"` : ""}
${!!subjectType ? `subjectTypeName "${subjectType}"` : ""}
${!!payment.status ? `status: ${payment.status}` : ""}
${!!payment.reconciliationStatus ? `reconciliationStatus: ${payment.reconciliationStatus}` : ""}
${!!payment.codeExt ? `codeExt: "${payment.codeExt}"` : ""}
Expand Down Expand Up @@ -326,7 +326,11 @@ export function createInvoiceEventMessage(invoiceEvent, clientMutationLabel) {

//bill
export function fetchBills(params) {
const payload = formatPageQueryWithCount("bill", params, BILL_FULL_PROJECTION);
let updatedArr = params
.map(str => str.includes('subjectType:') ? str.replace('subjectType', 'subjectTypeFilter') : str)
.map(str => str.includes('thirdpartyType:') ? str.replace('thirdpartyType', 'thirdpartyTypeFilter') : str);

const payload = formatPageQueryWithCount("bill", updatedArr, BILL_FULL_PROJECTION);
return graphql(payload, ACTION_TYPE.SEARCH_BILLS);
}

Expand Down
6 changes: 4 additions & 2 deletions src/components/BillSearcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { injectIntl } from "react-intl";

import { IconButton, Tooltip, Button, Dialog, DialogActions, DialogTitle, DialogContent } from "@material-ui/core";
import EditIcon from "@material-ui/icons/Edit";
import VisibilityIcon from '@material-ui/icons/Visibility';
import DeleteIcon from "@material-ui/icons/Delete";

import {
Expand Down Expand Up @@ -170,13 +171,13 @@ const BillSearcher = ({
(bill) => (
<div style={{ textAlign: "right" }}>
{rights.includes(RIGHT_BILL_SEARCH) && (
<Tooltip title={formatMessage(intl, "invoice", "editButtonTooltip")}>
<Tooltip title={formatMessage(intl, "invoice", isWorker ? "viewDetailsButtonTooltip" : "editButtonTooltip")}>
<IconButton
href={billUpdatePageUrl(bill)}
onClick={(e) => e.stopPropagation() && onDoubleClick(bill)}
disabled={deletedBillUuids.includes(bill.id)}
>
<EditIcon />
{isWorker ? <VisibilityIcon /> : <EditIcon />}
</IconButton>
</Tooltip>
)}
Expand Down Expand Up @@ -331,6 +332,7 @@ const BillSearcher = ({
"status": "Status",
}}
additionalExportFields={additionalExportFields}
downloadWithIconButton={isWorker}
/>
{failedExport && (
<Dialog open={failedExport} fullWidth maxWidth="sm">
Expand Down
1 change: 1 addition & 0 deletions src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"emptyLabel": " ",
"any": "Any",
"editButtonTooltip": "Edit",
"viewDetailsButtonTooltip": "View details",
"deleteButtonTooltip": "Delete",
"dialog": {
"create": "Create",
Expand Down

0 comments on commit c37f32d

Please sign in to comment.