source: interfejs/dashboard.html

main
Last change on this file was 69f2a41, checked in by Klimentina Efremova <klimentina08642@…>, 7 months ago

Initial commit

  • Property mode set to 100644
File size: 3.3 KB
Line 
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>Dashboard - Handcraft Marketplace</title>
7 <link rel="stylesheet" href="style.css">
8</head>
9<body>
10<header>
11 <div class="logo-container">
12 <img src="../images/administrative/logo.jpg" alt="Handcraft Marketplace Logo" onerror="this.style.display='none'">
13 <h1>🎨 Handcraft Marketplace</h1>
14 </div>
15 <nav>
16 <ul>
17 <li><a href="index.html">Home</a></li>
18 <li><a href="products.html">Products</a></li>
19 <li><a href="#" id="dashboard-link" class="active">Dashboard</a></li>
20 </ul>
21 </nav>
22</header>
23
24<main>
25 <div class="dashboard-header">
26 <h2>Welcome, <span id="user-name">User</span>!</h2>
27 <p>Your personalized dashboard</p>
28 </div>
29
30 <div class="dashboard-stats">
31 <div class="stat-card pink">
32 <h3>Account Type</h3>
33 <div class="stat-number" id="user-type">Loading...</div>
34 </div>
35 <div class="stat-card blue">
36 <h3>Member Since</h3>
37 <div class="stat-number" id="member-since">Loading...</div>
38 </div>
39 </div>
40
41 <div class="dashboard-section">
42 <h3>Quick Actions</h3>
43 <div style="display: flex; gap: 1rem; flex-wrap: wrap;">
44 <a href="products.html" class="btn-primary">Browse Products</a>
45 <a href="#" id="view-profile" class="btn-secondary">View Profile</a>
46 </div>
47 </div>
48
49 <div class="dashboard-section">
50 <h3>Recent Activity</h3>
51 <div id="recent-activity">
52 <div class="loading">Loading activity...</div>
53 </div>
54 </div>
55</main>
56
57<footer>
58 <div class="footer-content">
59 <div class="footer-section">
60 <h3>Handcraft Marketplace</h3>
61 <p>Connecting artisans with buyers worldwide</p>
62 </div>
63 <div class="footer-section">
64 <h3>Quick Links</h3>
65 <ul>
66 <li><a href="index.html">Home</a></li>
67 <li><a href="products.html">Products</a></li>
68 </ul>
69 </div>
70 <div class="footer-section">
71 <h3>Contact</h3>
72 <p>Email: support@handcraft.com</p>
73 </div>
74 </div>
75 <div class="footer-bottom">
76 <p>&copy; 2025 Handcraft Marketplace. All rights reserved.</p>
77 </div>
78</footer>
79
80<script src="script.js"></script>
81<script>
82 document.addEventListener('DOMContentLoaded', async () => {
83 const user = await loadUserData();
84 if (!user) return;
85
86 // Redirect based on user type
87 if (user.userType === 'client') {
88 window.location.href = 'client-dashboard.html';
89 } else if (user.userType === 'store_owner') {
90 window.location.href = 'store-owner.html';
91 } else if (user.userType === 'store_employee') {
92 window.location.href = 'store-employee.html';
93 } else if (user.userType === 'admin') {
94 window.location.href = 'admin.html';
95 }
96
97 // Display user info
98 document.getElementById('user-name').textContent =
99 user.firstName ? `${user.firstName} ${user.lastName || ''}` : user.username || 'User';
100 document.getElementById('user-type').textContent =
101 user.userType ? user.userType.replace('_', ' ') : 'User';
102
103 // Mock member since date
104 document.getElementById('member-since').textContent = '2025';
105
106 // Load recent activity
107 const activityDiv = document.getElementById('recent-activity');
108 activityDiv.innerHTML = '<p>No recent activity to display.</p>';
109 });
110</script>
111</body>
112</html>
Note: See TracBrowser for help on using the repository browser.