Skip to content

Commit

Permalink
Removed ReportType from configs
Browse files Browse the repository at this point in the history
  • Loading branch information
HarryMytilinaios committed Jul 13, 2023
1 parent 1ddc786 commit dcdab16
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 13 deletions.
5 changes: 2 additions & 3 deletions frontend/src/components/Common/ReportDialog/reportDoc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import { Theme } from '@material-ui/core';
import { TableRow as AnalysisTableRow } from 'context/analysisResultStateSlice';
import { getLegendItemLabel } from 'components/MapView/utils';
import { LegendDefinition, ReportType, ReportTypeEnum } from 'config/types';
import { LegendDefinition, ReportType } from 'config/types';
import { TFunction } from 'utils/data-utils';
import { Column } from 'utils/analysis-utils';
import { PDFLegendDefinition } from './types';
Expand Down Expand Up @@ -128,7 +128,7 @@ const ReportDoc = memo(
return {
value: t(typeLegendDefinitionItem.title),
style: [
reportConfig.type === ReportTypeEnum.TROPICAL_STORMS
typeLegendDefinitionItem?.border
? styles.borderedBox
: styles.box,
{
Expand All @@ -142,7 +142,6 @@ const ReportDoc = memo(
},
);
}, [
reportConfig.type,
reportConfig.typeLegendDefinition.items,
styles.borderedBox,
styles.box,
Expand Down
1 change: 0 additions & 1 deletion frontend/src/config/cambodia/reports.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"flood_extent_report": {
"layer_id": "flood_extent",
"type": "floods",
"title": "Flood Report",
"publication_date_label": "Publication Date",
"sub_text": "This is an automated report. Information should be treated as preliminary",
Expand Down
1 change: 0 additions & 1 deletion frontend/src/config/mozambique/reports.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"adamts_buffers_report": {
"layer_id": "adamts_buffers",
"type": "tropical storms",
"title": "Event name: Storm Report",
"publication_date_label": "Publication Date",
"sub_text": "This is an automated report. Information should be treated as preliminary",
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/config/myanmar/reports.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"flood_extent_report": {
"layer_id": "flood_extent",
"type": "floods",
"title": "Event name: Flood Report",
"publication_date_label": "Publication Date",
"sub_text": "This is an automated report. Information should be treated as preliminary",
Expand Down Expand Up @@ -38,7 +37,6 @@
},
"adamts_buffers_report": {
"layer_id": "adamts_buffers",
"type": "tropical storms",
"title": "Event name: Storm Report",
"publication_date_label": "Publication Date",
"sub_text": "This is an automated report. Information should be treated as preliminary",
Expand Down
6 changes: 0 additions & 6 deletions frontend/src/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -632,11 +632,6 @@ export interface ChartConfig {
colors?: string[]; // Array of hex codes.
}

export enum ReportTypeEnum {
FLOODS = 'floods',
TROPICAL_STORMS = 'tropical storms',
}

export interface ReportLegendDefinitionItem {
title: string;
color: string;
Expand All @@ -651,7 +646,6 @@ export interface ReportLegendDefinition {
export class ReportType {
id: ReportKey;
layerId: LayerKey;
type: ReportTypeEnum;
title: string;
publicationDateLabel: string;

Expand Down

0 comments on commit dcdab16

Please sign in to comment.