Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Merge branch 'develop' into feature/COR-1667-move-non-suffix-keys-to-…
Browse files Browse the repository at this point in the history
…archive
  • Loading branch information
VWSCoronaDashboard29 committed Aug 8, 2023
2 parents ad9f85f + 5879a92 commit 3ba271b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 22 deletions.
13 changes: 2 additions & 11 deletions packages/app/schema/archived_vr_collection/__index.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"last_generated",
"proto_name",
"name",
"code",
"vulnerable_nursing_home_archived_20230711"
"code"
],
"properties": {
"last_generated": {
Expand All @@ -22,20 +21,12 @@
},
"code": {
"$ref": "#/$defs/archived_vr_collection_id"
},
"vulnerable_nursing_home_archived_20230711": {
"type": "array",
"minItems": 25,
"maxItems": 25,
"items": {
"$ref": "vulnerable_nursing_home.json"
}
}
},
"$defs": {
"archived_vr_collection_id": {
"type": "string",
"enum": ["ARCHIVED_VR_COLLECTION"]
"enum": ["VR_COLLECTION"]
}
}
}
10 changes: 0 additions & 10 deletions packages/app/src/components/choropleth/logic/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,6 @@ export type GmDataItem = GmDataCollection[number];
export type ArchivedVrDataCollection = VrCollectionVulnerableNursingHome[];
export type ArchivedVrDataItem = ArchivedVrDataCollection[number];

/**
* Here we map a MapType to a corresponding DataCollection type
*/
export type MappedDataCollection<T extends MapType> = T extends 'gm' ? GmCollection : T extends 'vr' ? VrCollection : never;

/**
* Here we map a MapType to a corresponding DataItem type
*/
export type MappedDataItem<T extends MapType> = T extends 'gm' ? GmDataItem : T extends 'vr' ? VrDataItem : never;

export type ChoroplethDataItem = GmDataItem | VrDataItem | ArchivedVrDataItem;

export type CodedGeoProperties = {
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/static-props/get-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ export function createGetArchivedChoroplethData<T1, T2>(settings?: {
const filterGm = settings?.gm ?? NOOP;

return {
choropleth: {
archivedChoropleth: {
vr: filterVr(json.archived.vrCollection, context) as T1,
gm: filterGm(json.archived.gmCollection, context) as T2,
},
Expand Down
9 changes: 9 additions & 0 deletions packages/common/src/types/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,15 @@ export interface VrCollectionVulnerableNursingHome {
vrcode: string;
}

export type ArchivedVrCollectionId = 'VR_COLLECTION';

export interface ArchivedVrCollection {
last_generated: string;
proto_name: ArchivedVrCollectionId;
name: ArchivedVrCollectionId;
code: ArchivedVrCollectionId;
}

export type GmCode = string;

export interface Gm {
Expand Down

0 comments on commit 3ba271b

Please sign in to comment.