-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5a8f9ab
commit f7c3689
Showing
13 changed files
with
158 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
packages/app/src/app/teams/[team]/settings/members/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Separator } from '@/components/ui/separator' | ||
import { SettingsGeneralForm } from '@/components/teams/settings-general-form' | ||
import { PropsWithChildren, Suspense } from 'react' | ||
import { LoadingSpinner } from '@/components/loading-spinner' | ||
|
||
export interface NextPageProps<Team = string> { | ||
params: { team: Team } | ||
searchParams?: { [key: string]: string | string[] | undefined } | ||
} | ||
|
||
export default function Page({ params }: PropsWithChildren<NextPageProps>) { | ||
return ( | ||
<> | ||
<div> | ||
<h3 className="text-lg font-medium">Members</h3> | ||
<p className="text-sm text-muted-foreground"> | ||
Manage the members of your team. | ||
</p> | ||
</div> | ||
<Separator /> | ||
<Suspense fallback={<LoadingSpinner />}> | ||
<SettingsGeneralForm teamId={params.team} /> | ||
</Suspense> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
packages/app/src/components/teams/settings-general-form.schema.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,31 @@ | ||
import { z } from 'zod' | ||
|
||
const reservedSlugs = ['app', 'admin', 'www', 'admin'] | ||
|
||
export const FindAndCountTeamsSchema = z.object({ | ||
limit: z.number().min(0).max(100).default(10), | ||
offset: z.number().min(0).default(0) | ||
}) | ||
export const FindOneTeamSchema = z.string().uuid() | ||
export const CreateTeamSchema = z.object({ | ||
name: z.string().min(3).max(128), | ||
slug: z | ||
.string() | ||
.min(3) | ||
.max(128) | ||
.refine(slug => !reservedSlugs.includes(slug), { | ||
message: "Slug can't be one of reserved slugs" | ||
}), | ||
userId: z.string().uuid(), | ||
description: z.string().min(3).max(255).optional(), | ||
contactEmail: z.string().email().optional() | ||
}) | ||
|
||
export type CreateTeamSchema = z.infer<typeof CreateTeamSchema> | ||
|
||
export const FindOneTeamByNameSlug = z | ||
.string() | ||
.trim() | ||
.toLowerCase() | ||
.min(3) | ||
.max(128) | ||
export type FindOneTeamByNameSlug = z.infer<typeof FindOneTeamByNameSlug> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.