diff --git a/apps/client-ts/src/components/RootLayout/index.tsx b/apps/client-ts/src/components/RootLayout/index.tsx index 9644b7ef2..6feed2b9b 100644 --- a/apps/client-ts/src/components/RootLayout/index.tsx +++ b/apps/client-ts/src/components/RootLayout/index.tsx @@ -12,8 +12,6 @@ import { useStytchUser } from '@stytch/nextjs'; import useProfile from '@/hooks/useProfile'; import useProfileStore from '@/state/profileStore'; import useProjectStore from '@/state/projectStore'; -import useProjectsByUser from '@/hooks/useProjectsByUser'; -import useProjects from '@/hooks/useProjects'; const useDeviceSize = () => { @@ -34,7 +32,6 @@ const useDeviceSize = () => { }, []); return [width, height] - } export const RootLayout = () => { diff --git a/apps/client-ts/src/components/shared/team-switcher.tsx b/apps/client-ts/src/components/shared/team-switcher.tsx index 73d0bb3e6..74557c1e7 100644 --- a/apps/client-ts/src/components/shared/team-switcher.tsx +++ b/apps/client-ts/src/components/shared/team-switcher.tsx @@ -49,16 +49,13 @@ import { import useProjectMutation from "@/hooks/mutations/useProjectMutation" import { useEffect, useState } from "react" import useProjectStore from "@/state/projectStore" -import useOrganisationStore from "@/state/organisationStore" import useProfileStore from "@/state/profileStore" -import useProjectsByUser from '@/hooks/useProjectsByUser'; import { Skeleton } from "../ui/skeleton" //import useOrganisations from "@/hooks/useOrganisations" import { zodResolver } from "@hookform/resolvers/zod" import { useForm } from "react-hook-form" import * as z from "zod" import config from "@/lib/config" -import useProjectsStore from "@/state/projectsStore" import useProjects from "@/hooks/useProjects" diff --git a/packages/api/prisma/schema.prisma b/packages/api/prisma/schema.prisma index adde91bb6..ff8bb5b14 100644 --- a/packages/api/prisma/schema.prisma +++ b/packages/api/prisma/schema.prisma @@ -107,11 +107,10 @@ model webhooks_reponses { /// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments model connection_strategies { - id_connection_strategy String @id(map: "pk_connection_strategies") @db.Uuid + id_connection_strategy String @id(map: "pk_connection_strategies") @db.Uuid status Boolean type String - id_project String? @db.Uuid - cs_entities cs_entities[] + id_project String? @db.Uuid } model tcg_collections { @@ -171,9 +170,9 @@ model connections { expiration_timestamp DateTime? @db.Timestamp(6) created_at DateTime @db.Timestamp(6) connection_token String? - vertical String id_project String @db.Uuid id_linked_user String @db.Uuid + vertical String? linked_users linked_users @relation(fields: [id_linked_user], references: [id_linked_user], onDelete: NoAction, onUpdate: NoAction, map: "fk_11") projects projects @relation(fields: [id_project], references: [id_project], onDelete: NoAction, onUpdate: NoAction, map: "fk_9") @@ -414,26 +413,21 @@ model crm_users { } model cs_attributes { - id_cs_attribute String @id(map: "pk_ct_attributes") @db.Uuid + id_cs_attribute String @id(map: "pk_ct_attributes") @db.Uuid attribute_slug String data_type String - id_cs_entity String @db.Uuid - cs_entities cs_entities @relation(fields: [id_cs_entity], references: [id_cs_entity], onDelete: NoAction, onUpdate: NoAction, map: "fk_cs_entity") - cs_values cs_values[] + id_cs_entity String @db.Uuid } model cs_entities { - id_cs_entity String @id(map: "pk_ct_entities") @db.Uuid - id_connection_strategy String @db.Uuid - cs_attributes cs_attributes[] - connection_strategies connection_strategies @relation(fields: [id_connection_strategy], references: [id_connection_strategy], onDelete: NoAction, onUpdate: NoAction, map: "fk_cs_id") + id_cs_entity String @id(map: "pk_ct_entities") @db.Uuid + id_connection_strategy String @db.Uuid } model cs_values { - id_cs_value String @id(map: "pk_ct_values") @db.Uuid + id_cs_value String @id(map: "pk_ct_values") @db.Uuid value String - id_cs_attribute String @db.Uuid - cs_attributes cs_attributes @relation(fields: [id_cs_attribute], references: [id_cs_attribute], onDelete: NoAction, onUpdate: NoAction, map: "fk_cs_attribute") + id_cs_attribute String @db.Uuid } /// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments