Make console buildable by removing people related GQL queries

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-02-05 19:50:03 +04:00
parent d7e1703ff3
commit 6b4185aa9b
102 changed files with 539 additions and 2039 deletions

View File

@@ -8,7 +8,7 @@ import { usePeople } from "#/hooks/graph/PeopleGraph";
type Person = {
id: string;
fullName: string;
primaryEmailAddress?: string | null;
emailAddress?: string | null;
};
type Props<T extends FieldValues = FieldValues> = {
@@ -57,7 +57,7 @@ function PeopleMultiSelectWithQuery<T extends FieldValues = FieldValues>(
allPeople.push({
id: selectedPerson.id,
fullName: selectedPerson.fullName,
primaryEmailAddress: selectedPerson.primaryEmailAddress ?? "",
emailAddress: selectedPerson.emailAddress ?? "",
});
}
});
@@ -107,9 +107,9 @@ function PeopleMultiSelectWithQuery<T extends FieldValues = FieldValues>(
/>
<div className="flex flex-col">
<span>{person.fullName}</span>
{person.primaryEmailAddress && (
{person.emailAddress && (
<span className="text-xs text-txt-secondary">
{person.primaryEmailAddress}
{person.emailAddress}
</span>
)}
</div>

View File

@@ -20,7 +20,7 @@ export function PeopleCell(props: Props) {
filter: { excludeContractEnded: true },
}}
items={data =>
data.organization?.peoples?.edges.map(edge => edge.node) ?? []}
data.organization?.profiles?.edges.map(edge => edge.node) ?? []}
itemRenderer={({ item }) => (
<div className="flex gap-2 whitespace-nowrap items-center text-xs">
<Avatar name={item.fullName} />