Files
calendar/packages/app-store/ee/routing-forms/lib/getConnectedForms.ts
T
Hariom BalharaandGitHub 38b3563350 Feature/Routing Forms: Add the concepts of reusable Router and Router Linked Fields. (#5566)
* 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
2023-01-04 13:30:46 +00:00

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,
},
],
},
},
});
}