diff --git a/src/app/admin/layout.tsx b/src/app/admin/layout.tsx index 16e68aa..15e2217 100644 --- a/src/app/admin/layout.tsx +++ b/src/app/admin/layout.tsx @@ -11,7 +11,7 @@ export default function Dashboard({ children }: { children: ReactNode }) {
-
+
{children}
diff --git a/src/app/admin/organizations/page.tsx b/src/app/admin/organizations/page.tsx index a5fc92e..d6a7ebc 100644 --- a/src/app/admin/organizations/page.tsx +++ b/src/app/admin/organizations/page.tsx @@ -1,8 +1,10 @@ +import Link from "next/link"; export default function Organizations (){ return ( <> + Organization Profile ) } \ No newline at end of file diff --git a/src/app/admin/organizations/profile/page.tsx b/src/app/admin/organizations/profile/page.tsx new file mode 100644 index 0000000..2760aa1 --- /dev/null +++ b/src/app/admin/organizations/profile/page.tsx @@ -0,0 +1,144 @@ +"use client" +import { icons } from "#/assets/icons" +import Image from "next/image" +import axios from "axios"; +import { useSession } from "next-auth/react"; +import { useQuery } from "@tanstack/react-query"; +import { adminProfile } from "#/types"; + +export default function Profile() { + const { data: session, status } = useSession(); + + const { data: adminProfile, isLoading } = useQuery({ + enabled: status === 'authenticated', + queryKey: ["stats", session?.user.access_token], + queryFn: async () => { + try { + const response = await axios.get( + 'https://private-docs-api.intside.co/users/me', { + headers: { + 'Authorization': `Bearer ${session?.user.access_token}` + } + } + ) + + if (response.data) { + return response.data as adminProfile + } + } catch (error: any) { + console.error(error) + } + } + }) + + const { data: adminOrganization } = useQuery({ + enabled: status === 'authenticated', + queryKey: ["stats", session?.user.access_token], + queryFn: async () => { + try { + const response = await axios.get( + 'https://private-docs-api.intside.co/users/me', { + headers: { + 'Authorization': `Bearer ${session?.user.access_token}` + } + } + ) + + if (response.data) { + return response.data as adminProfile + } + } catch (error: any) { + console.error(error) + } + } + }) + + + return ( + <> + {/* { adminProfile.map() } */} + +
+
+
+
+

Pentatonic

+ +
+
+

Détails de l'admin

+
+
+
+ E-mail +
+
+

Adresse e-mail

+

{adminProfile?.email}

+
+
+
+
+ E-mail +
+
+
+

Prénom

+

{adminProfile?.first_name}

+
+
+

Nom

+

{adminProfile?.last_name}

+
+
+
+
+
+
+
+
+
+
+ Documents +
+
+

Documents

+

123

+
+
+
+
+ Documents +
+
+

Utilisateurs

+

24

+
+
+
+
+ Fichiers +
+
+

Taille des fichiers

+

3.41GB

+
+
+
+
+ Horlorge +
+
+

Dernière utilisation

+

26 Jan 2024 - 14h15

+
+
+
+
+
+
+ + ) +} \ No newline at end of file diff --git a/src/app/globals.css b/src/app/globals.css index 27d7f81..e0dabe1 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -14,6 +14,8 @@ --secondary: #9FA8BC; --danger: #F33F19; --cinder: #E7E5E4; + --bluegray: #E9F0FF; + --gray: #E7EBF3; } [ data-theme="dark"] { @@ -73,4 +75,51 @@ body { &:hover { background-color: rgb(22, 77, 185); } -} \ No newline at end of file +} + +.cta{ + padding: 10px 24px; + color: white; + background-color: var(--primary); + font-size: 14px; + font-weight: 600; + border-radius: 100px; +} + + +.bg-bluegray{ + background-color: var(--bluegray); +} +.bg-gray{ + background-color: var(--gray); +} +hr{ + color: var(--gray); +} + + + +/* Scroll Bar */ + +::-webkit-scrollbar { + width: 4px; + padding: 0; + margin: 0; +} + +::-webkit-scrollbar-track { + background: var(--background); +} + +::-webkit-scrollbar-thumb { + background: var(--primary); + border-radius: 6px; +} + +::-webkit-scrollbar-track:hover { + background: var(--background); +} + +::-webkit-scrollbar-thumb:hover { + background: var(--primary); +} diff --git a/src/assets/css/admin.css b/src/assets/css/admin.css index 2b04377..ca8a9e5 100644 --- a/src/assets/css/admin.css +++ b/src/assets/css/admin.css @@ -1,5 +1,6 @@ .sidebar{ border-right: 1px solid var(--cinder); + position: fixed; } .nav-item .nav-home{ @@ -40,9 +41,7 @@ border-radius: 8px; box-shadow: 0 0 24px #0000001A; } -.dropdown-item{ - -} + .dropdown-item a{ width: max-content; padding: 10px 20px; @@ -50,4 +49,20 @@ justify-content: space-between; align-items: center; gap: 10px; +} + +.p-container { + height: 100vh; + border: 1px solid var(--gray); +} + +.icon-rounded{ + width: max-content; + height: max-content; + padding: 8px; + display: flex; + justify-content: center; + align-items: center; + background-color: var(--bluegray); + border-radius: 100px; } \ No newline at end of file diff --git a/src/assets/icons/index.ts b/src/assets/icons/index.ts index 9120b8b..6d9b354 100644 --- a/src/assets/icons/index.ts +++ b/src/assets/icons/index.ts @@ -40,6 +40,8 @@ import arrowUp from "./Vector.svg" import sunIcon from "./sun.svg" import moonIcon from "./moon.svg" import trash from "./trash.svg" +import mailIcon from "./sms.svg" +import personalCard from "./personalcard.svg" export const icons = { @@ -83,8 +85,10 @@ export const icons = { starIcon, arrowUp, sunIcon, - moonIcon , - trash + moonIcon, + trash, + mailIcon, + personalCard } diff --git a/src/assets/icons/personalcard.svg b/src/assets/icons/personalcard.svg new file mode 100644 index 0000000..c35fe25 --- /dev/null +++ b/src/assets/icons/personalcard.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/assets/icons/sms.svg b/src/assets/icons/sms.svg new file mode 100644 index 0000000..b961331 --- /dev/null +++ b/src/assets/icons/sms.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/components/admin/adminHeader.tsx b/src/components/admin/adminHeader.tsx index 2e31708..993ed9f 100644 --- a/src/components/admin/adminHeader.tsx +++ b/src/components/admin/adminHeader.tsx @@ -15,7 +15,7 @@ export default function AdminHeader() { return ( <>