mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Working on project front side.
This commit is contained in:
@@ -9,7 +9,6 @@ import {Page, PageActions, PageContent, PageHeader, PageTitle} from "@/features/
|
||||
export default async function RoutePage(props: PageParams<{}>) {
|
||||
|
||||
const agents = await prisma.agent.findMany({})
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<PageHeader>
|
||||
@@ -23,11 +22,8 @@ export default async function RoutePage(props: PageParams<{}>) {
|
||||
</Link>
|
||||
</PageActions>
|
||||
)}
|
||||
|
||||
</PageHeader>
|
||||
|
||||
<PageContent className="mt-10">
|
||||
|
||||
{agents.length > 0 ?
|
||||
<CardsWithPagination
|
||||
data={agents}
|
||||
@@ -41,10 +37,7 @@ export default async function RoutePage(props: PageParams<{}>) {
|
||||
className=" flex item-center justify-center border-2 border-dashed transition-colors border-primary p-8 lg:p-12 w-full rounded-md">
|
||||
Create new Agent
|
||||
</Link>
|
||||
|
||||
}
|
||||
|
||||
|
||||
</PageContent>
|
||||
</Page>
|
||||
)
|
||||
|
||||
@@ -2,5 +2,5 @@ import {PageParams} from "@/types/next";
|
||||
import {redirect} from "next/navigation";
|
||||
|
||||
export default async function RoutePage(props: PageParams<{}>) {
|
||||
redirect("/dashboard/agents")
|
||||
redirect("/dashboard/projects")
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import {PageParams} from "@/types/next";
|
||||
|
||||
|
||||
export default async function RoutePage(props: PageParams<{ projectId: string }>) {
|
||||
return(
|
||||
<></>
|
||||
)
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import {Page, PageContent, PageHeader, PageTitle} from "@/features/layout/page";
|
||||
import {requiredCurrentUser} from "@/auth/current-user";
|
||||
import {prisma} from "@/prisma";
|
||||
import {notFound} from "next/navigation";
|
||||
import {ProjectForm} from "@/components/wrappers/Project/ProjectForm";
|
||||
import {ProjectForm} from "@/components/wrappers/Dashboard/Projects/ProjectsForm/ProjectForm";
|
||||
|
||||
|
||||
export default async function RoutePage(props: PageParams<{
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import {PageParams} from "@/types/next";
|
||||
import {Page, PageActions, PageContent, PageDescription, PageTitle} from "@/features/layout/page";
|
||||
import {buttonVariants} from "@/components/ui/button";
|
||||
|
||||
import {prisma} from "@/prisma";
|
||||
import {GearIcon} from "@radix-ui/react-icons";
|
||||
import Link from "next/link";
|
||||
import {projects} from "@/utils/mock-data";
|
||||
import {ButtonDeleteProject} from "@/components/wrappers/Dashboard/Projects/ButtonDeleteProject/ButtonDeleteProject";
|
||||
import {CardsWithPagination} from "@/components/wrappers/cards-with-pagination";
|
||||
import {ProjectDatabaseCard} from "@/components/wrappers/Dashboard/Projects/ProjectCard/ProjectDatabaseCard";
|
||||
import {notFound} from "next/navigation";
|
||||
|
||||
|
||||
export default async function RoutePage(props: PageParams<{ projectId: string }>) {
|
||||
@@ -21,7 +23,9 @@ export default async function RoutePage(props: PageParams<{ projectId: string }>
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
if(!project){
|
||||
notFound()
|
||||
}
|
||||
|
||||
return (
|
||||
<Page>
|
||||
@@ -34,11 +38,26 @@ export default async function RoutePage(props: PageParams<{ projectId: string }>
|
||||
</Link>
|
||||
</PageTitle>
|
||||
<PageActions className="justify-between">
|
||||
|
||||
<ButtonDeleteProject
|
||||
text={"Delete Project"}
|
||||
/>
|
||||
</PageActions>
|
||||
</div>
|
||||
{/*<PageDescription className="mt-5 sm:mt-0">{Project.description}</PageDescription>*/}
|
||||
<PageDescription>
|
||||
The list of associated databases
|
||||
</PageDescription>
|
||||
<PageContent className="flex flex-col w-full h-full">
|
||||
{project.databases.length > 0 ?
|
||||
<CardsWithPagination
|
||||
data={project.databases}
|
||||
cardItem={ProjectDatabaseCard}
|
||||
cardsPerPage={4}
|
||||
numberOfColumns={1}
|
||||
extendedProps={project}
|
||||
/>
|
||||
:
|
||||
null
|
||||
}
|
||||
</PageContent>
|
||||
</Page>
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {PageParams} from "@/types/next";
|
||||
import {Page, PageContent, PageHeader, PageTitle} from "@/features/layout/page";
|
||||
import {prisma} from "@/prisma";
|
||||
import {ProjectForm} from "@/components/wrappers/Project/ProjectForm";
|
||||
import {ProjectForm} from "@/components/wrappers/Dashboard/Projects/ProjectsForm/ProjectForm";
|
||||
|
||||
|
||||
export default async function RoutePage(props: PageParams<{}>) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import {Button} from "@/components/ui/button";
|
||||
import Link from 'next/link'
|
||||
import {Page, PageActions, PageContent, PageHeader, PageTitle} from "@/features/layout/page";
|
||||
import {projects} from "@/utils/mock-data";
|
||||
import {ProjectCard} from "@/components/wrappers/Project/ProjectCard";
|
||||
import {ProjectCard} from "@/components/wrappers/Dashboard/Projects/ProjectCard/ProjectCard";
|
||||
|
||||
export default async function RoutePage(props: PageParams<{}>) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user