Skip to content

Commit

Permalink
Removes support for exporting All Patients (#7457)
Browse files Browse the repository at this point in the history
  • Loading branch information
rithviknishad authored Mar 22, 2024
1 parent 4cea768 commit e1fb260
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
19 changes: 19 additions & 0 deletions src/Components/Common/Export.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,25 @@ export const ExportMenu = ({
}: ExportMenuProps) => {
const { isExporting, exportFile } = useExport();

if (exportItems.length === 1) {
const item = exportItems[0];

return (
<ButtonV2
disabled={isExporting || disabled}
onClick={() =>
exportFile(item.action, item.filePrefix, item.type, item.parse)
}
border
ghost
className="py-2.5"
>
<CareIcon className="care-l-export" />
{isExporting ? "Exporting..." : label}
</ButtonV2>
);
}

return (
<div key="export-menu" id="export-button">
<DropdownMenu
Expand Down
10 changes: 1 addition & 9 deletions src/Components/Patient/ManagePatients.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -831,18 +831,10 @@ export const PatientManager = () => {
disabled={!isExportAllowed}
exportItems={[
{
label:
tabValue === 0
? "Live patients"
: "Discharged patients",
label: "Export Live patients",
action: exportPatients(true),
parse: preventDuplicatePatientsDuetoPolicyId,
},
{
label: "All patients",
action: exportPatients(false),
parse: preventDuplicatePatientsDuetoPolicyId,
},
]}
/>
)}
Expand Down

0 comments on commit e1fb260

Please sign in to comment.