Skip to content

Commit

Permalink
Merge pull request #4104 from dfe-analytical-services/EES-4259
Browse files Browse the repository at this point in the history
EES-4259 switchover to permalink snapshots and FE tidy up
  • Loading branch information
benoutram authored Aug 8, 2023
2 parents 32028c8 + 969920b commit d669639
Show file tree
Hide file tree
Showing 21 changed files with 182 additions and 1,487 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
testDataNoFiltersTableHeadersConfig,
} from '@common/modules/table-tool/components/__tests__/__data__/timePeriodDataTable.data';
import TimePeriodDataTable from '@common/modules/table-tool/components/TimePeriodDataTable';
import { UnmappedTableHeadersConfig } from '@common/services/permalinkService';
import { UnmappedTableHeadersConfig } from '@common/services/permalinkSnapshotService';
import {
ReleaseTableDataQuery,
TableDataResponse,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UnmappedTableHeadersConfig } from '@common/services/permalinkService';
import { UnmappedTableHeadersConfig } from '@common/services/permalinkSnapshotService';
import { TableDataResponse } from '@common/services/tableBuilderService';

export const testData1Table: TableDataResponse = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UnmappedTableHeadersConfig } from '@common/services/permalinkService';
import { UnmappedTableHeadersConfig } from '@common/services/permalinkSnapshotService';
import {
CategoryFilter,
Indicator,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { TableHeadersConfig } from '@common/modules/table-tool/types/tableHeader
import {
TableHeader,
UnmappedTableHeadersConfig,
} from '@common/services/permalinkService';
} from '@common/services/permalinkSnapshotService';

/**
* This function remaps the config filters into
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { TableHeadersConfig } from '@common/modules/table-tool/types/tableHeader
import {
TableHeader,
UnmappedTableHeadersConfig,
} from '@common/services/permalinkService';
} from '@common/services/permalinkSnapshotService';

const mapToTableHeaders = (filters: Filter[]): TableHeader[] => {
return filters.map<TableHeader>(filter => {
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,24 @@ import { TableJson } from '@common/modules/table-tool/utils/mapTableToJson';
import { dataApi } from '@common/services/api';
import { TableDataQuery } from '@common/services/tableBuilderService';
import { Footnote } from '@common/services/types/footnotes';
import { UnmappedTableHeadersConfig } from '@common/services/permalinkService';

export type TableHeader =
| {
type: 'TimePeriod' | 'Indicator' | 'Filter';
value: string;
}
| {
type: 'Location';
value: string;
level: string;
};

export interface UnmappedTableHeadersConfig {
columnGroups: TableHeader[][];
columns: TableHeader[];
rowGroups: TableHeader[][];
rows: TableHeader[];
}

export interface PermalinkSnapshot {
created: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
AxisType,
} from '@common/modules/charts/types/chart';
import { DataSet } from '@common/modules/charts/types/dataSet';
import { UnmappedTableHeadersConfig } from '@common/services/permalinkService';
import { UnmappedTableHeadersConfig } from '@common/services/permalinkSnapshotService';
import { TableDataQuery } from '@common/services/tableBuilderService';
import { OmitStrict } from '@common/types';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UnmappedTableHeadersConfig } from '@common/services/permalinkService';
import { UnmappedTableHeadersConfig } from '@common/services/permalinkSnapshotService';
import { TableDataResponse } from '@common/services/tableBuilderService';

export interface ConfiguredTable {
Expand Down
Loading

0 comments on commit d669639

Please sign in to comment.