File size: 14,581 Bytes
aa61ed8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
336a868
aa61ed8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
336a868
aa61ed8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
336a868
aa61ed8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Crafty Configurator Hub | Admin Dashboard</title>
    <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://unpkg.com/feather-icons"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
    <style>
        .request-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }
        .request-card {
            transition: all 0.2s ease;
        }
        .status-pending {
            background-color: #fef3c7;
            color: #d97706;
        }
        .status-processing {
            background-color: #dbeafe;
            color: #1d4ed8;
        }
        .status-completed {
            background-color: #dcfce7;
            color: #15803d;
        }
    </style>
</head>
<body class="bg-gray-100">
    <div class="min-h-screen">
        <!-- Admin Sidebar -->
        <div class="fixed inset-y-0 left-0 w-64 bg-white shadow-md">
            <div class="flex items-center justify-center h-16 bg-indigo-600">
                <div class="flex items-center">
                    <i data-feather="settings" class="text-white"></i>
                    <span class="ml-2 text-xl font-semibold text-white">Admin Dashboard</span>
                </div>
            </div>
            <nav class="mt-8">
                <div class="px-4 space-y-1">
                    <a href="#" class="bg-gray-100 text-indigo-600 group flex items-center px-4 py-3 text-sm font-medium rounded-md">
                        <i data-feather="inbox" class="text-indigo-600 mr-3"></i>
                        Custom Requests
                    </a>
                    <a href="#" class="text-gray-600 hover:bg-gray-50 hover:text-gray-900 group flex items-center px-4 py-3 text-sm font-medium rounded-md">
                        <i data-feather="users" class="text-gray-400 group-hover:text-gray-500 mr-3"></i>
                        Customers
                    </a>
                    <a href="#" class="text-gray-600 hover:bg-gray-50 hover:text-gray-900 group flex items-center px-4 py-3 text-sm font-medium rounded-md">
                        <i data-feather="package" class="text-gray-400 group-hover:text-gray-500 mr-3"></i>
                        Products
                    </a>
                    <a href="#" class="text-gray-600 hover:bg-gray-50 hover:text-gray-900 group flex items-center px-4 py-3 text-sm font-medium rounded-md">
                        <i data-feather="settings" class="text-gray-400 group-hover:text-gray-500 mr-3"></i>
                        Settings
                    </a>
                </div>
                <div class="mt-8 px-4">
                    <button id="adminLogoutBtn" class="w-full flex items-center justify-center px-4 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-red-600 hover:bg-red-700">
                        <i data-feather="log-out" class="mr-2"></i> Logout
                    </button>
                </div>
            </nav>
        </div>

        <!-- Main Content -->
        <div class="pl-64">
            <!-- Header -->
            <header class="bg-white shadow-sm">
                <div class="max-w-7xl mx-auto py-4 px-4 sm:px-6 lg:px-8">
                    <div class="flex justify-between items-center">
                        <h1 class="text-2xl font-bold text-gray-900">Customization Requests</h1>
                        <div class="flex items-center space-x-4">
                            <div class="relative">
                                <input type="text" placeholder="Search requests..." 
                                    class="pl-10 pr-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-indigo-500 focus:border-indigo-500">
                                <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
                                    <i data-feather="search" class="text-gray-400"></i>
                                </div>
                            </div>
                            <button class="p-2 rounded-full bg-gray-100 text-gray-500 hover:text-gray-600">
                                <i data-feather="bell"></i>
                            </button>
                        </div>
                    </div>
                </div>
            </header>

            <!-- Requests Table -->
            <main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
                <div class="flex justify-between items-center mb-6">
                    <div class="flex items-center space-x-3">
                        <h2 class="text-lg font-medium text-gray-900">All Requests</h2>
                        <span class="px-2 py-1 text-xs font-medium rounded-full bg-indigo-100 text-indigo-800">24 New</span>
                    </div>
                    <div class="flex space-x-3">
                        <select class="border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500">
                            <option>Filter by Status</option>
                            <option>Pending</option>
                            <option>Processing</option>
                            <option>Completed</option>
                        </select>
                        <button class="px-4 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700">
                            Export Data
                        </button>
                    </div>
                </div>

                <div class="bg-white shadow rounded-lg overflow-hidden">
                    <div class="divide-y divide-gray-200">
                        <!-- Request 1 -->
                        <div class="request-card p-6 hover:bg-gray-50">
                            <div class="flex justify-between">
                                <div>
                                    <div class="flex items-center">
                                        <h3 class="text-lg font-medium text-gray-900">Premium Watch</h3>
                                        <span class="ml-3 px-2 py-1 text-xs font-medium rounded-full status-pending">Pending</span>
                                    </div>
                                    <p class="mt-1 text-sm text-gray-600">Custom color: Blue | Material: Metal</p>
                                </div>
                                <div class="text-right">
                                    <p class="text-sm text-gray-500">Requested on <time datetime="2023-05-15">May 15, 2023</time></p>
</div>
                            </div>
                            <div class="mt-4 flex justify-between items-center">
                                <div>
                                    <p class="text-sm text-gray-600">John Doe • [email protected]</p>
                                    <p class="mt-1 text-sm text-gray-500">"Please include initials 'JD' engraved on the back"</p>
                                </div>
                                <div class="flex space-x-2">
                                    <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
                                        View Details
                                    </button>
                                    <button class="px-3 py-1 border border-transparent rounded-md text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
                                        Assign
                                    </button>
                                </div>
                            </div>
                        </div>

                        <!-- Request 2 -->
                        <div class="request-card p-6 hover:bg-gray-50">
                            <div class="flex justify-between">
                                <div>
                                    <div class="flex items-center">
                                        <h3 class="text-lg font-medium text-gray-900">Designer Bag</h3>
                                        <span class="ml-3 px-2 py-1 text-xs font-medium rounded-full status-processing">Processing</span>
                                    </div>
                                    <p class="mt-1 text-sm text-gray-600">Custom color: Red | Material: Leather</p>
                                </div>
                                <div class="text-right">
                                    <p class="text-sm text-gray-500">Requested on <time datetime="2023-05-14">May 14, 2023</time></p>
</div>
                            </div>
                            <div class="mt-4 flex justify-between items-center">
                                <div>
                                    <p class="text-sm text-gray-600">Jane Smith • [email protected]</p>
                                    <p class="mt-1 text-sm text-gray-500">"Need this before May 20th for a gift"</p>
                                </div>
                                <div class="flex space-x-2">
                                    <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
                                        View Details
                                    </button>
                                    <button class="px-3 py-1 border border-transparent rounded-md text-sm font-medium text-white bg-green-600 hover:bg-green-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-500">
                                        Complete
                                    </button>
                                </div>
                            </div>
                        </div>

                        <!-- Request 3 -->
                        <div class="request-card p-6 hover:bg-gray-50">
                            <div class="flex justify-between">
                                <div>
                                    <div class="flex items-center">
                                        <h3 class="text-lg font-medium text-gray-900">Custom Sneakers</h3>
                                        <span class="ml-3 px-2 py-1 text-xs font-medium rounded-full status-completed">Completed</span>
                                    </div>
                                    <p class="mt-1 text-sm text-gray-600">Custom color: Black/White | Material: Canvas</p>
                                </div>
                                <div class="text-right">
                                    <p class="text-sm text-gray-500">Requested on <time datetime="2023-05-10">May 10, 2023</time></p>
</div>
                            </div>
                            <div class="mt-4 flex justify-between items-center">
                                <div>
                                    <p class="text-sm text-gray-600">Michael Brown • [email protected]</p>
                                    <p class="mt-1 text-sm text-gray-500">"Please use premium packaging for gift"</p>
                                </div>
                                <div class="flex space-x-2">
                                    <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
                                        View Details
                                    </button>
                                    <button class="px-3 py-1 border border-transparent rounded-md text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
                                        Re-open
                                    </button>
                                </div>
                            </div>
                        </div>

                        <!-- More requests would be loaded here -->
                    </div>
                </div>

                <!-- Pagination -->
                <div class="mt-6 flex justify-between items-center">
                    <div>
                        <p class="text-sm text-gray-700">
                            Showing <span class="font-medium">1</span> to <span class="font-medium">3</span> of <span class="font-medium">24</span> results
                        </p>
                    </div>
                    <div class="flex space-x-2">
                        <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed" disabled>
                            Previous
                        </button>
                        <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50">
                            1
                        </button>
                        <button class="px-3 py-1 border border-transparent rounded-md text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700">
                            2
                        </button>
                        <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50">
                            3
                        </button>
                        <button class="px-3 py-1 border border-gray-300 rounded-md text-sm font-medium text-gray-700 hover:bg-gray-50">
                            Next
                        </button>
                    </div>
                </div>
            </main>
        </div>
    </div>

    <script>
        feather.replace();
        
        document.getElementById('adminLogoutBtn').addEventListener('click', function() {
            window.location.href = 'index.html';
        });

        // In a real app, you would fetch requests from an API
        // and dynamically populate the table
    </script>
</body>
</html>