diff --git a/components/HearingsScheduled/calendarEvents.ts b/components/HearingsScheduled/calendarEvents.ts index 400c25e6a..a426a99c9 100644 --- a/components/HearingsScheduled/calendarEvents.ts +++ b/components/HearingsScheduled/calendarEvents.ts @@ -42,7 +42,7 @@ export const useCalendarEvents = () => { eventList.push({ index, type: e.type, - name: e.content.Name, + name: e.content.Name ?? "Hearing", id: e.content.EventId, location: e.content.Location.LocationName, fullDate: eventDate.toJSDate(), diff --git a/components/db/events.ts b/components/db/events.ts index 31582c738..3172ccae9 100644 --- a/components/db/events.ts +++ b/components/db/events.ts @@ -49,11 +49,11 @@ type Hearing = BaseEvent & { } type HearingContent = BaseContent & { Description: string - Name: string + Name: string | null Status: string HearingHost: { - CommitteeCode: string - GeneralCourtNumber: number + CommitteeCode: string | null + GeneralCourtNumber: number | null } Location: HearingLocation HearingAgendas: { diff --git a/functions/package.json b/functions/package.json index 7eae78574..4f2e5523e 100644 --- a/functions/package.json +++ b/functions/package.json @@ -29,7 +29,7 @@ "luxon": "^2.3.1", "nanoid": "^3.3.2", "object-hash": "^3.0.0", - "runtypes": "6.5.1", + "runtypes": "6.6.0", "ssl-root-cas": "^1.3.1", "typesense": "^1.2.2", "zod": "^3.20.2" diff --git a/functions/src/events/types.ts b/functions/src/events/types.ts index 198b30146..588f97925 100644 --- a/functions/src/events/types.ts +++ b/functions/src/events/types.ts @@ -64,11 +64,11 @@ export const HearingLocation = Record({ export type HearingContent = Static export const HearingContent = BaseEventContent.extend({ Description: String, - Name: String, + Name: Nullable(String), Status: String, HearingHost: Record({ - CommitteeCode: String, - GeneralCourtNumber: Number + CommitteeCode: Nullable(String), + GeneralCourtNumber: Nullable(Number) }), Location: HearingLocation, HearingAgendas: Array( diff --git a/functions/src/hearings/search.ts b/functions/src/hearings/search.ts index 23a693695..878b95d71 100644 --- a/functions/src/hearings/search.ts +++ b/functions/src/hearings/search.ts @@ -104,8 +104,8 @@ export const { startsAt, month: schedule.toFormat("LLLL"), year: schedule.year, - committeeCode: content.HearingHost?.CommitteeCode, - committeeName, + committeeCode: content.HearingHost?.CommitteeCode ?? undefined, + committeeName: committeeName ?? undefined, locationName: content.Location?.LocationName, locationCity: content.Location?.City, chairNames: hearing.committeeChairs ?? [], diff --git a/functions/yarn.lock b/functions/yarn.lock index 9aecc71c9..6579fc2a3 100644 --- a/functions/yarn.lock +++ b/functions/yarn.lock @@ -6532,10 +6532,10 @@ run-async@^2.4.0, run-async@^2.4.1: resolved "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz" integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== -runtypes@6.5.1: - version "6.5.1" - resolved "https://registry.npmjs.org/runtypes/-/runtypes-6.5.1.tgz" - integrity sha512-vYxcAYzC868ZY4BgazBomT9dpWHZnG3CH++5mhlVKGKqf2MzON4itmEmQt3uGTUOyipeUn7GALAN0nQhjPNRtA== +runtypes@6.6.0: + version "6.6.0" + resolved "https://registry.yarnpkg.com/runtypes/-/runtypes-6.6.0.tgz#48e353d8b0f641ab5ec5d80fa96dd7bd41ea3281" + integrity sha512-ddM7sgB3fyboDlBzEYFQ04L674sKjbs4GyW2W32N/5Ae47NRd/GyMASPC2PFw8drPHYGEcZ0mZ26r5RcB8msfQ== rxjs@^7.5.4: version "7.8.2" diff --git a/package.json b/package.json index 6f9f1933a..b790ae255 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "react-select": "^5.2.2", "redux-mock-store": "^1.5.4", "redux-thunk": "^3.1.0", - "runtypes": "6.5.1", + "runtypes": "6.6.0", "sidebar-v2": "^0.4.0", "styled-components": "^5.3.3", "typesense": "^1.2.2", diff --git a/yarn.lock b/yarn.lock index b215b5c5b..bd0e79ed0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15771,10 +15771,10 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -runtypes@6.5.1: - version "6.5.1" - resolved "https://registry.yarnpkg.com/runtypes/-/runtypes-6.5.1.tgz#125d9a50c3b7dd45db6e47d42bb1c411b4f3f008" - integrity sha512-vYxcAYzC868ZY4BgazBomT9dpWHZnG3CH++5mhlVKGKqf2MzON4itmEmQt3uGTUOyipeUn7GALAN0nQhjPNRtA== +runtypes@6.6.0: + version "6.6.0" + resolved "https://registry.yarnpkg.com/runtypes/-/runtypes-6.6.0.tgz#48e353d8b0f641ab5ec5d80fa96dd7bd41ea3281" + integrity sha512-ddM7sgB3fyboDlBzEYFQ04L674sKjbs4GyW2W32N/5Ae47NRd/GyMASPC2PFw8drPHYGEcZ0mZ26r5RcB8msfQ== rxjs@^6.4.0, rxjs@^6.5.x, rxjs@^6.6.0: version "6.6.7"