Add subscription ID search to admin team lookup (#284)

Co-authored-by: Claude <[email protected]>
This commit is contained in:
KM KoushikandClaude authored and GitHub committed 2025-10-26 09:40:11 +11:00
1 parent 4fe354b85a
commit 7edff5b783
2 files changed
+10 -3

No files matched your search

@@ -34,9 +34,9 @@ import { isCloud } from "~/utils/common";
const searchSchema = z.object({
query: z
.string({ required_error: "Enter a team ID, name, domain, or member email" })
.string({ required_error: "Enter a team ID, name, domain, member email, or subscription ID" })
.trim()
.min(1, "Enter a team ID, name, domain, or member email"),
.min(1, "Enter a team ID, name, domain, member email, or subscription ID"),
});
type SearchInput = z.infer<typeof searchSchema>;
@@ -150,7 +150,7 @@ export default function AdminTeamsPage() {
<FormLabel>Team lookup</FormLabel>
<FormControl>
<Input
placeholder="Team ID, team name, domain, or member email"
placeholder="Team ID, team name, domain, member email, or subscription ID"
autoComplete="off"
{...field}
value={field.value}
+7
View File
@@ -373,6 +373,13 @@ export const adminRouter = createTRPCRouter({
},
},
},
{
subscription: {
some: {
id: { equals: query, mode: "insensitive" },
},
},
},
],
},
select: teamAdminSelection,