diff --git a/packages/app/schema/archived_vr_collection/__index.json b/packages/app/schema/archived_vr_collection/__index.json index b5c1c6bfee..11b3923afd 100644 --- a/packages/app/schema/archived_vr_collection/__index.json +++ b/packages/app/schema/archived_vr_collection/__index.json @@ -7,8 +7,7 @@ "last_generated", "proto_name", "name", - "code", - "vulnerable_nursing_home_archived_20230711" + "code" ], "properties": { "last_generated": { @@ -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"] } } } \ No newline at end of file diff --git a/packages/app/src/components/choropleth/logic/types.ts b/packages/app/src/components/choropleth/logic/types.ts index d238d7fd55..1c18f7d7ab 100644 --- a/packages/app/src/components/choropleth/logic/types.ts +++ b/packages/app/src/components/choropleth/logic/types.ts @@ -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 'gm' ? GmCollection : T extends 'vr' ? VrCollection : never; - -/** - * Here we map a MapType to a corresponding DataItem type - */ -export type MappedDataItem = T extends 'gm' ? GmDataItem : T extends 'vr' ? VrDataItem : never; - export type ChoroplethDataItem = GmDataItem | VrDataItem | ArchivedVrDataItem; export type CodedGeoProperties = { diff --git a/packages/app/src/static-props/get-data.ts b/packages/app/src/static-props/get-data.ts index 000d7e96dc..0b54d95843 100644 --- a/packages/app/src/static-props/get-data.ts +++ b/packages/app/src/static-props/get-data.ts @@ -311,7 +311,7 @@ export function createGetArchivedChoroplethData(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, }, diff --git a/packages/common/src/types/data.ts b/packages/common/src/types/data.ts index 7803f9f2d0..d68bd7fc02 100644 --- a/packages/common/src/types/data.ts +++ b/packages/common/src/types/data.ts @@ -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 {