fix: default conferencing app not showing the correct value after updated (#7589)

* fix: edge case

* feat: add overflow

* fix: invalidate cache
This commit is contained in:
Nafees Nazik authored and GitHub committed 2023-03-08 16:17:08 +00:00
1 parent e836a042e9
commit 0ee3b26ca8
3 files changed
+15 -4

No files matched your search

@@ -37,7 +37,8 @@ export function BulkEditDefaultConferencingModal(props: { open: boolean; setOpen
<DialogContent
type="creation"
title={t("default_conferencing_bulk_title")}
description={t("default_conferencing_bulk_description")}>
description={t("default_conferencing_bulk_description")}
enableOverflow>
<Form
form={form}
handleSubmit={(values) => {
@@ -844,8 +844,14 @@ export const eventTypesRouter = router({
});
const eventTypesWithLogo = eventTypes.map((eventType) => {
const locationParsed = eventTypeLocationsSchema.parse(eventType.locations);
const app = getAppFromLocationValue(locationParsed[0].type);
const locationParsed = eventTypeLocationsSchema.safeParse(eventType.locations);
// some events has null as location for legacy reasons, so this fallbacks to daily video
const app = getAppFromLocationValue(
locationParsed.success && locationParsed.data?.[0]?.type
? locationParsed.data[0].type
: "integrations:daily"
);
return {
...eventType,
logo: app?.logo,
@@ -856,6 +862,7 @@ export const eventTypesRouter = router({
eventTypes: eventTypesWithLogo,
};
}),
bulkUpdateToDefaultLocation: authedProcedure
.input(
z.object({