Skip to content

Commit

Permalink
AB#263: Add pdf export for report search results
Browse files Browse the repository at this point in the history
  • Loading branch information
anilsonmez-simsoft committed Feb 25, 2022
1 parent ec5d204 commit e96a9c3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions client/src/pages/searches/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,21 @@ const Search = ({
</Dropdown.Toggle>
{/* TODO: Show a warning when there are more than exportUtils.MAX_NR_OF_EXPORTS results */}
<Dropdown.Menu className="super-colors">
{/* PDF export is limited with reports */}
{queryTypes.includes(SEARCH_OBJECT_TYPES.REPORTS) && (
<Dropdown.Item
onClick={() =>
exportResults(
searchQueryParams,
queryTypes,
"pdf",
setError
)
}
>
PDF (pdf)
</Dropdown.Item>
)}
<Dropdown.Item
onClick={() =>
exportResults(searchQueryParams, queryTypes, "xlsx", setError)
Expand Down

0 comments on commit e96a9c3

Please sign in to comment.