Add subscription ID search to admin team lookup (#284)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -34,9 +34,9 @@ import { isCloud } from "~/utils/common";
|
|||||||
|
|
||||||
const searchSchema = z.object({
|
const searchSchema = z.object({
|
||||||
query: z
|
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()
|
.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>;
|
type SearchInput = z.infer<typeof searchSchema>;
|
||||||
@@ -150,7 +150,7 @@ export default function AdminTeamsPage() {
|
|||||||
<FormLabel>Team lookup</FormLabel>
|
<FormLabel>Team lookup</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Input
|
<Input
|
||||||
placeholder="Team ID, team name, domain, or member email"
|
placeholder="Team ID, team name, domain, member email, or subscription ID"
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value}
|
value={field.value}
|
||||||
|
|||||||
@@ -373,6 +373,13 @@ export const adminRouter = createTRPCRouter({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
subscription: {
|
||||||
|
some: {
|
||||||
|
id: { equals: query, mode: "insensitive" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
select: teamAdminSelection,
|
select: teamAdminSelection,
|
||||||
|
|||||||
Reference in New Issue
Block a user