Working on bugs, add delete restore. Review the auth style. working on the RBAC.

This commit is contained in:
charlesgauthereau
2025-07-26 16:34:06 +02:00
parent f8f599e4dd
commit 1ffbd6efc8
23 changed files with 419 additions and 194 deletions
+37 -9
View File
@@ -1,19 +1,47 @@
import React from "react";
"use client"
import React, {useEffect, useState} from "react";
import {LayoutAdmin} from "@/components/layout";
import Image from "next/image";
import {env} from "@/env.mjs";
import {useTheme} from "next-themes";
export default async function Layout({children}: { children: React.ReactNode }) {
export default function Layout({children}: { children: React.ReactNode }) {
const { resolvedTheme } = useTheme();
const [mounted, setMounted] = useState(false);
useEffect(() => {
setMounted(true);
}, []);
if (!mounted) return null;
const imageTheme = resolvedTheme === "dark" ? "/images/logo-white.png" : "/images/logo-black.png";
return (
<LayoutAdmin>
<div
className="w-full h-full grid "
>
<div className="flex items-center justify-center py-12">
{children}
<div className="flex min-h-full flex-1 flex-col justify-center py-12 sm:px-6 lg:px-8 ">
<div className="mx-auto w-full max-w-md">
<div className="sm:mx-auto sm:w-full sm:max-w-md flex items-center justify-center space-x-2">
<Image
className="p-12 text-black dark:text-white"
src={imageTheme}
loading="eager"
alt="Logo"
width={1024}
height={1024}
/>
<span
className="text-sm text-muted-foreground -ml-12 -mb-12">
v{env.NEXT_PUBLIC_PROJECT_VERSION}
</span>
</div>
<div>{children}</div>
</div>
</LayoutAdmin>
<footer className="py-4 text-center text-xs justify-items-end text-muted-foreground">
Powered by <span className="font-medium">Soluce Technologies</span>
</footer>
</div>
)
}