Working on settings. Adding .env value take in count when they are present in order to prefill the Settings on startup. Adding the SendEMail Feature and the form in settings.

This commit is contained in:
charles-gauthereau
2024-11-17 16:31:34 +01:00
parent ff9e3ffa67
commit 0de1c4daa2
24 changed files with 1701 additions and 66 deletions
+12 -10
View File
@@ -1,15 +1,17 @@
import {PageParams} from "@/types/next";
import {redirect} from "next/navigation";
export default async function RoutePage(props: PageParams<{}>) {
return (
<div className="flex flex-1 flex-col gap-4 p-4">
<div className="grid auto-rows-min gap-4 md:grid-cols-3">
<div className="aspect-video rounded-xl bg-muted/50"/>
<div className="aspect-video rounded-xl bg-muted/50"/>
<div className="aspect-video rounded-xl bg-muted/50"/>
</div>
<div className="min-h-[100vh] flex-1 rounded-xl bg-muted/50 md:min-h-min"/>
</div>
)
// return (
// <div className="flex flex-1 flex-col gap-4 p-4">
// <div className="grid auto-rows-min gap-4 md:grid-cols-3">
// <div className="aspect-video rounded-xl bg-muted/50"/>
// <div className="aspect-video rounded-xl bg-muted/50"/>
// <div className="aspect-video rounded-xl bg-muted/50"/>
// </div>
// <div className="min-h-[100vh] flex-1 rounded-xl bg-muted/50 md:min-h-min"/>
// </div>
// )
}
+8 -6
View File
@@ -1,12 +1,14 @@
import {PageParams} from "@/types/next";
import {Button} from "@/components/ui/button";
import {redirect} from "next/navigation";
export default async function RoutePage(props: PageParams<{}>) {
redirect("/dashboard/agents")
return(
<div>
<h1>Ok</h1>
<Button>Button</Button>
</div>
)
// return(
// <div>
// <h1>Ok</h1>
// <Button>Button</Button>
// </div>
// )
}
@@ -2,15 +2,12 @@ import {PageParams} from "@/types/next";
import {Page, PageContent, PageDescription, PageHeader, PageTitle} from "@/features/layout/page";
import {prisma} from "@/prisma";
import {requiredCurrentUser} from "@/auth/current-user";
import {DataTableWithPagination} from "@/components/wrappers/table/data-table-with-pagination";
import {usersColumns} from "@/components/wrappers/Dashboard/Settings/SettingsTabs/columns-users";
import {SettingsTabs} from "@/components/wrappers/Dashboard/Settings/SettingsTabs/SettingsTabs";
export default async function RoutePage(props: PageParams<{}>) {
const user = await requiredCurrentUser()
const users = await prisma.user.findMany({
where:{
id: {