Skip to content

Commit

Permalink
Merge pull request #44 from openimis/develop
Browse files Browse the repository at this point in the history
MERGING develop into release/24.04
  • Loading branch information
delcroip authored Apr 23, 2024
2 parents 3e281e8 + fe84a67 commit d78eb42
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/ReportSearcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ import { useSelector } from "react-redux";

import { Box, Button, Tooltip } from "@material-ui/core";
import HelpOutlineIcon from "@material-ui/icons/HelpOutline";
import EditIcon from '@material-ui/icons/Edit';

import {
Searcher,
useTranslations,
useModulesManager,
} from "@openimis/fe-core";
import { RIGHT_REPORT_EDIT, RIGHT_REPORT_ADD } from "../constants";
import { RIGHT_REPORT_EDIT } from "../constants";
import { useReportsQuery } from "../hooks";
import GenerateReportPicker from "./GenerateReportPicker";
import ReportDefinitionEditorDialog from "./ReportDefinitionEditorDialog";
Expand Down Expand Up @@ -66,12 +67,6 @@ const ReportSearcher = () => {
const formatActions = (report) =>
!report.category && (
<Box display="flex" justifyContent={"flex-end"} gridGap={12}>
{rights.includes(RIGHT_REPORT_ADD) &&
rights.includes(RIGHT_REPORT_EDIT) && (
<Button onClick={() => setEditedReport(report)} size="small">
{formatMessage("ReportSearcher.editBtn")}
</Button>
)}
<div
style={{
display: "flex",
Expand All @@ -83,6 +78,11 @@ const ReportSearcher = () => {
<HelpOutlineIcon fontSize="small" />
</Tooltip>
</div>
{rights.includes(RIGHT_REPORT_EDIT) && (
<Button onClick={() => setEditedReport(report)} size="small" startIcon={<EditIcon />}>
{formatMessage("ReportSearcher.editBtn")}
</Button>
)}
<GenerateReportPicker name={report.name} />
</Box>
);
Expand Down

0 comments on commit d78eb42

Please sign in to comment.