Skip to content

Commit

Permalink
Merge pull request ohcnetwork#1184 from coronasafe/fix#1166
Browse files Browse the repository at this point in the history
added an alert notification to show no data available in investigation reports
  • Loading branch information
bodhish authored May 24, 2021
2 parents 5dd797b + 69fffb5 commit 45058a8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Components/Facility/Investigations/Reports/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import Autocomplete from "@material-ui/lab/Autocomplete";
import { InputLabel, makeStyles, CircularProgress } from "@material-ui/core";
import { InvestigationResponse } from "./types";
import ReportTable from "./ReportTable";
import * as Notification from "../../../../Utils/Notifications";

const RESULT_PER_PAGE = 15;

Expand Down Expand Up @@ -238,6 +239,12 @@ const InvestigationReports = ({ id }: any) => {
} else {
setIsNextSessionDisabled(false);
setIsLoadMoreDisabled(false);

if (!data.results.length) {
Notification.Error({
msg: "No Investigation data available!",
});
}
dispatch({
type: "set_investigation_table_data",
payload: data.results,
Expand Down

0 comments on commit 45058a8

Please sign in to comment.