* WIP * Fix all TS errors * Move to using isRouter everywhere * wip * Add Router Picker and fix TS issues * Fix tests and add option to connect during duplication * Misc changes * Fixes * Fixes * Fix TS errors * Disable certain options in Router * Fix connected Form fields not updating * Some fixes * reert shell.tsx * Disable already used router instead of removing it * Import prisma from correct place * Simplify loop using Object.entries * SimpliAdd playwright test and fix issues found
21 lines
471 B
TypeScript
21 lines
471 B
TypeScript
import { App_RoutingForms_Form } from "@calcom/prisma/client";
|
|
|
|
export default async function getConnectedForms(
|
|
prisma: typeof import("@calcom/prisma").default,
|
|
form: Pick<App_RoutingForms_Form, "id" | "userId">
|
|
) {
|
|
return await prisma.app_RoutingForms_Form.findMany({
|
|
where: {
|
|
userId: form.userId,
|
|
routes: {
|
|
array_contains: [
|
|
{
|
|
id: form.id,
|
|
isRouter: true,
|
|
},
|
|
],
|
|
},
|
|
},
|
|
});
|
|
}
|