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({
|
const updateDefaultAppMutation = trpc.viewer.updateUserDefaultConferencingApp.useMutation({
|
||||||
onSuccess: onSuccessCallback,
|
onSuccess: async () => {
|
||||||
|
await utils.viewer.getUsersDefaultConferencingApp.invalidate();
|
||||||
|
onSuccessCallback();
|
||||||
|
},
|
||||||
onError: (error) => {
|
onError: (error) => {
|
||||||
showToast(`Error: ${error.message}`, "error");
|
showToast(`Error: ${error.message}`, "error");
|
||||||
},
|
},
|
||||||
|
|
|
@ -37,7 +37,8 @@ export function BulkEditDefaultConferencingModal(props: { open: boolean; setOpen
|
||||||
<DialogContent
|
<DialogContent
|
||||||
type="creation"
|
type="creation"
|
||||||
title={t("default_conferencing_bulk_title")}
|
title={t("default_conferencing_bulk_title")}
|
||||||
description={t("default_conferencing_bulk_description")}>
|
description={t("default_conferencing_bulk_description")}
|
||||||
|
enableOverflow>
|
||||||
<Form
|
<Form
|
||||||
form={form}
|
form={form}
|
||||||
handleSubmit={(values) => {
|
handleSubmit={(values) => {
|
||||||
|
|
|
@ -844,8 +844,14 @@ export const eventTypesRouter = router({
|
||||||
});
|
});
|
||||||
|
|
||||||
const eventTypesWithLogo = eventTypes.map((eventType) => {
|
const eventTypesWithLogo = eventTypes.map((eventType) => {
|
||||||
const locationParsed = eventTypeLocationsSchema.parse(eventType.locations);
|
const locationParsed = eventTypeLocationsSchema.safeParse(eventType.locations);
|
||||||
const app = getAppFromLocationValue(locationParsed[0].type);
|
|
||||||
|
// 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 {
|
return {
|
||||||
...eventType,
|
...eventType,
|
||||||
logo: app?.logo,
|
logo: app?.logo,
|
||||||
|
@ -856,6 +862,7 @@ export const eventTypesRouter = router({
|
||||||
eventTypes: eventTypesWithLogo,
|
eventTypes: eventTypesWithLogo,
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
|
|
||||||
bulkUpdateToDefaultLocation: authedProcedure
|
bulkUpdateToDefaultLocation: authedProcedure
|
||||||
.input(
|
.input(
|
||||||
z.object({
|
z.object({
|
||||||
|
|
Loading…
Reference in New Issue