Skip to content

Commit

Permalink
Adds in feature flag for General Incident
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorylavery committed Jul 15, 2024
1 parent 778818d commit adda424
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ export const generateComplaintRequestPayload = (

switch (complaintType) {
case COMPLAINT_TYPES.GIR:
return {
...common,
} as ComplaintRequestPayload;
case COMPLAINT_TYPES.ERS:
return {
...common,
Expand Down Expand Up @@ -162,6 +165,7 @@ export const ComplaintList: FC<Props> = ({ type, searchQuery }) => {
sortDirection={sortDirection}
/>
);

case COMPLAINT_TYPES.GIR:
return (
<GeneralComplaintListHeader
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/app/types/app/complaint-types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import config from "../../../config";

export const COMPLAINT_TYPES = {
HWCR: "HWCR",
ERS: "ERS",
Expand All @@ -11,7 +13,7 @@ export const complaintTypeToName = (complaintType: string | undefined | null, si
case COMPLAINT_TYPES.HWCR:
return singular ? "Human Wildlife Conflict" : "Human Wildlife Conflicts";
case COMPLAINT_TYPES.GIR:
return "General Incident";
return config.SHOW_EXPERIMENTAL_FEATURES === false ? "" : "General Incident";
default:
return "";
}
Expand Down

0 comments on commit adda424

Please sign in to comment.