Skip to content

Commit a654071

Browse files
feat: add database seed data and scripts (#60)
Co-authored-by: Manus Agent <manus@agent.ai>
1 parent aea626c commit a654071

17 files changed

Lines changed: 1759 additions & 65 deletions

File tree

apps/web/src/app/dashboard/components/sidebar/app-sidebar.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ interface AppSidebarProps extends React.ComponentProps<typeof Sidebar> {
2323
avatar: string;
2424
initial: string;
2525
isAdmin: boolean;
26+
userId?: string;
2627
};
2728
}
2829

apps/web/src/app/dashboard/components/sidebar/nav-user.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export function NavUser({
2727
email: string;
2828
avatar: string;
2929
initial: string;
30+
userId?: string;
3031
};
3132
}) {
3233
const { isMobile } = useSidebar();
@@ -75,6 +76,11 @@ export function NavUser({
7576
<span className="truncate text-xs text-muted-foreground">
7677
{user.email}
7778
</span>
79+
{user.userId && (
80+
<span className="truncate text-xs text-muted-foreground font-mono">
81+
{user.userId}
82+
</span>
83+
)}
7884
</div>
7985
</div>
8086
</DropdownMenuLabel>

apps/web/src/app/dashboard/layout.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export default async function Layout({
3131
avatar: user?.imageUrl || "",
3232
initial: `${user?.firstName?.[0]}${user?.lastName?.[0]}` || "UU",
3333
isAdmin: Boolean(user?.publicMetadata?.is_admin),
34+
userId:
35+
process.env.NODE_ENV === "development" ? user?.id : undefined,
3436
}}
3537
/>
3638
<SidebarInset>

packages/server/convex/_generated/api.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import type * as schemas_courseOfferings from "../schemas/courseOfferings.js";
2121
import type * as schemas_courses from "../schemas/courses.js";
2222
import type * as schemas_programs from "../schemas/programs.js";
2323
import type * as schemas_students from "../schemas/students.js";
24+
import type * as seed from "../seed.js";
2425
import type * as students from "../students.js";
2526
import type * as userCourseOfferings from "../userCourseOfferings.js";
2627
import type * as userCourses from "../userCourses.js";
@@ -53,6 +54,7 @@ declare const fullApi: ApiFromModules<{
5354
"schemas/courses": typeof schemas_courses;
5455
"schemas/programs": typeof schemas_programs;
5556
"schemas/students": typeof schemas_students;
57+
seed: typeof seed;
5658
students: typeof students;
5759
userCourseOfferings: typeof userCourseOfferings;
5860
userCourses: typeof userCourses;

0 commit comments

Comments
 (0)