fix: default conferencing app not showing the correct value after updated (#7589)
* fix: edge case * feat: add overflow * fix: invalidate cachepull/7098/head^2
parent
e836a042e9
commit
0ee3b26ca8
|
@ -69,7 +69,10 @@ const ConferencingLayout = () => {
|
|||
}, []);
|
||||
|
||||
const updateDefaultAppMutation = trpc.viewer.updateUserDefaultConferencingApp.useMutation({
|
||||
onSuccess: onSuccessCallback,
|
||||
onSuccess: async () => {
|
||||
await utils.viewer.getUsersDefaultConferencingApp.invalidate();
|
||||
onSuccessCallback();
|
||||
},
|
||||
onError: (error) => {
|
||||
showToast(`Error: ${error.message}`, "error");
|
||||
},
|
||||
|
|
|
@ -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({
|
||||
|
|
Loading…
Reference in New Issue