* added api/v2 for zoom connect * Update conferencing.controller.ts * fix: added api for ConferencingAppsViewPlatformWrapper * type fixes * added getBulkEventTypes api for bulk-update default location * added bulk-update-to-default-location * fix:bulk-update-to-default-location * invalidated * fixed returnTo and onErrorReturnTo * make logos work for conferencing atoms * smalll improvements * fixup * share common types * type fix, and fixed a typo * fix: type-error * fix: json.parse(json.parse()) * fix: invalidate query * fix: removing app throws error in the main app * undo platform-libraries-1.2.3 * update platform-libraries version --------- Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
49 lines
1.4 KiB
TypeScript
49 lines
1.4 KiB
TypeScript
import { useIsPlatform } from "@calcom/atoms/monorepo";
|
|
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
|
import type { App } from "@calcom/types/App";
|
|
import { Dialog, ConfirmationDialogContent } from "@calcom/ui";
|
|
|
|
export type RemoveAppParams = {
|
|
credentialId: number;
|
|
app?: App["slug"];
|
|
teamId?: number;
|
|
callback: () => void;
|
|
};
|
|
interface DisconnectIntegrationModalProps {
|
|
credentialId: number | null;
|
|
isOpen: boolean;
|
|
handleModelClose: () => void;
|
|
teamId?: number;
|
|
handleRemoveApp: (params: RemoveAppParams) => void;
|
|
app?: App["slug"] | null;
|
|
}
|
|
|
|
export default function DisconnectIntegrationModal({
|
|
credentialId,
|
|
app,
|
|
isOpen,
|
|
handleModelClose,
|
|
teamId,
|
|
handleRemoveApp,
|
|
}: DisconnectIntegrationModalProps) {
|
|
const { t } = useLocale();
|
|
const isPlatform = useIsPlatform();
|
|
return (
|
|
<Dialog open={isOpen} onOpenChange={handleModelClose}>
|
|
<ConfirmationDialogContent
|
|
variety="danger"
|
|
title={t("remove_app")}
|
|
confirmBtnText={t("yes_remove_app")}
|
|
onConfirm={() => {
|
|
if (isPlatform && app && credentialId) {
|
|
handleRemoveApp({ credentialId, app, teamId, callback: () => handleModelClose() });
|
|
} else if (credentialId) {
|
|
handleRemoveApp({ credentialId, teamId, callback: () => handleModelClose() });
|
|
}
|
|
}}>
|
|
<p className="mt-5">{t("are_you_sure_you_want_to_remove_this_app")}</p>
|
|
</ConfirmationDialogContent>
|
|
</Dialog>
|
|
);
|
|
}
|