From e7bfe43250fa170fcb4b1c42afa911c76914b1bc Mon Sep 17 00:00:00 2001 From: DeathKaioken Date: Mon, 17 Nov 2025 18:03:29 +0100 Subject: [PATCH] beautify: added all needed sections for profile page --> dummy data --- src/app/profile/page.tsx | 272 ++++++++++++++++++++++++++++++++------- 1 file changed, 223 insertions(+), 49 deletions(-) diff --git a/src/app/profile/page.tsx b/src/app/profile/page.tsx index 3ede887..1f04f6a 100644 --- a/src/app/profile/page.tsx +++ b/src/app/profile/page.tsx @@ -1,6 +1,6 @@ 'use client' -import { useEffect } from 'react' +import React, { useEffect } from 'react' import { useRouter } from 'next/navigation' import useAuthStore from '../store/authStore' import Header from '../components/nav/Header' @@ -49,10 +49,31 @@ export default function ProfilePage() { profileComplete: 95 } + // Dummy data for new sections + const documents = [ + { id: 1, name: 'Passport.pdf', type: 'PDF', uploaded: '2024-05-01' }, + { id: 2, name: 'Invoice_2024.xlsx', type: 'Excel', uploaded: '2024-06-10' }, + { id: 3, name: 'ProfilePhoto.jpg', type: 'Image', uploaded: '2024-04-15' }, + ] + + const [bankInfo, setBankInfo] = React.useState({ + accountHolder: 'Admin User', + iban: 'DE89 3704 0044 0532 0130 00', + bic: 'COBADEFFXXX', + bankName: 'Commerzbank', + }) + const [editingBank, setEditingBank] = React.useState(false) + const [bankDraft, setBankDraft] = React.useState(bankInfo) + + const matrices = [ + { id: 1, name: 'Starter Matrix', level: '1', status: 'Active', joined: '2024-03-01' }, + { id: 2, name: 'Gold Matrix', level: '2', status: 'Pending', joined: '2024-05-15' }, + { id: 3, name: 'Platinum Matrix', level: '3', status: 'Active', joined: '2024-06-01' }, + ] + return (
-
{/* Page Header */} @@ -63,7 +84,7 @@ export default function ProfilePage() {

- {/* Profile Completion */} + {/* 1. Profile Completion */}

Profile Completion

@@ -80,10 +101,10 @@ export default function ProfilePage() {

-
- {/* Profile Information */} + {/* 2. Basic Info + Sidebar */} +
+ {/* Basic Information */}
- {/* Basic Information */}

Basic Information

@@ -147,48 +168,8 @@ export default function ProfilePage() {
- - {/* Account Settings */} -
-

Account Settings

- -
-
-
-

Email Notifications

-

Receive updates about orders and promotions

-
- -
- -
-
-

SMS Notifications

-

Get text messages for important updates

-
- -
- -
-
-

Two-Factor Authentication

-

Add extra security to your account

-
- -
-
-
- - {/* Sidebar */} + {/* Sidebar: Account Status + Quick Actions */}
{/* Account Status */}
@@ -213,7 +194,6 @@ export default function ProfilePage() {
- {/* Quick Actions */}

Quick Actions

@@ -235,9 +215,203 @@ export default function ProfilePage() {
+ + {/* 3. Media, Bank Info, Matrix Overview */} +
+ {/* --- Media Section --- */} +
+

Media & Documents

+
+ + + + + + + + + + + {documents.map(doc => ( + + + + + + + ))} + +
NameTypeUploaded
{doc.name}{doc.type}{doc.uploaded} + + +
+
+
+ {/* --- Edit Bank Information Section --- */} +
+
+

Bank Information

+ {!editingBank && ( + + )} +
+
{ + e.preventDefault() + setBankInfo(bankDraft) + setEditingBank(false) + }} + > +
+ + setBankDraft({ ...bankDraft, accountHolder: e.target.value })} + disabled={!editingBank} + /> +
+
+ + setBankDraft({ ...bankDraft, iban: e.target.value })} + disabled={!editingBank} + /> +
+
+ + setBankDraft({ ...bankDraft, bic: e.target.value })} + disabled={!editingBank} + /> +
+
+ + setBankDraft({ ...bankDraft, bankName: e.target.value })} + disabled={!editingBank} + /> +
+ {editingBank && ( +
+ + +
+ )} +
+
+ {/* --- Matrix Overview Section --- */} +
+

Matrix Overview

+
+ + + + + + + + + + + + {matrices.map(matrix => ( + + + + + + + + ))} + +
Matrix NameLevelStatusJoined
{matrix.name}{matrix.level} + + {matrix.status} + + {matrix.joined} + +
+
+
+
+ + {/* 4. Account Settings */} +
+

Account Settings

+
+
+
+

Email Notifications

+

Receive updates about orders and promotions

+
+ +
+ +
+
+

SMS Notifications

+

Get text messages for important updates

+
+ +
+ +
+
+

Two-Factor Authentication

+

Add extra security to your account

+
+ +
+
+
-