buttons are not working properly - Follow Up Deployment
Browse files- index.html +32 -5
index.html
CHANGED
@@ -231,7 +231,7 @@
|
|
231 |
</td>
|
232 |
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">2 days ago</td>
|
233 |
<td class="px-4 py-4 whitespace-nowrap text-sm font-medium">
|
234 |
-
<button class="text-blue-600 hover:text-blue-900 mr-3"><i class="fas fa-eye"></i></button>
|
235 |
<button class="text-green-600 hover:text-green-900"><i class="fas fa-edit"></i></button>
|
236 |
</td>
|
237 |
</tr>
|
@@ -355,7 +355,7 @@
|
|
355 |
</div>
|
356 |
</div>
|
357 |
</div>
|
358 |
-
<button class="w-full mt-4 py-2 border border-dashed border-gray-300 rounded-lg text-gray-500 hover:text-gray-700 hover:border-gray-400">
|
359 |
<i class="fas fa-plus mr-1"></i> Add Task
|
360 |
</button>
|
361 |
</div>
|
@@ -440,7 +440,7 @@
|
|
440 |
</button>
|
441 |
</div>
|
442 |
<div class="grid grid-cols-2 gap-4">
|
443 |
-
<button class="flex flex-col items-center justify-center p-4 rounded-lg border border-gray-200 hover:border-blue-500 hover:bg-blue-50">
|
444 |
<div class="bg-blue-100 p-3 rounded-full mb-2">
|
445 |
<i class="fas fa-user-plus text-blue-600"></i>
|
446 |
</div>
|
@@ -616,9 +616,25 @@
|
|
616 |
</div>
|
617 |
|
618 |
<script>
|
|
|
|
|
|
|
|
|
619 |
// Authentication state
|
620 |
let currentUser = null;
|
621 |
const authToken = localStorage.getItem('authToken');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
622 |
|
623 |
// Check if user is logged in
|
624 |
if (authToken) {
|
@@ -629,10 +645,21 @@
|
|
629 |
}
|
630 |
|
631 |
// Toggle sidebar
|
632 |
-
document.getElementById('sidebarToggle')
|
633 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
634 |
});
|
635 |
|
|
|
|
|
|
|
|
|
|
|
636 |
// Navigation functions
|
637 |
function showLogin() {
|
638 |
document.getElementById('loginPage').classList.remove('hidden');
|
|
|
231 |
</td>
|
232 |
<td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">2 days ago</td>
|
233 |
<td class="px-4 py-4 whitespace-nowrap text-sm font-medium">
|
234 |
+
<button class="text-blue-600 hover:text-blue-900 mr-3" onclick="openClientModal()"><i class="fas fa-eye"></i></button>
|
235 |
<button class="text-green-600 hover:text-green-900"><i class="fas fa-edit"></i></button>
|
236 |
</td>
|
237 |
</tr>
|
|
|
355 |
</div>
|
356 |
</div>
|
357 |
</div>
|
358 |
+
<button class="w-full mt-4 py-2 border border-dashed border-gray-300 rounded-lg text-gray-500 hover:text-gray-700 hover:border-gray-400" onclick="alert('Add task functionality would open a form here')">
|
359 |
<i class="fas fa-plus mr-1"></i> Add Task
|
360 |
</button>
|
361 |
</div>
|
|
|
440 |
</button>
|
441 |
</div>
|
442 |
<div class="grid grid-cols-2 gap-4">
|
443 |
+
<button class="flex flex-col items-center justify-center p-4 rounded-lg border border-gray-200 hover:border-blue-500 hover:bg-blue-50" onclick="openClientModal()">
|
444 |
<div class="bg-blue-100 p-3 rounded-full mb-2">
|
445 |
<i class="fas fa-user-plus text-blue-600"></i>
|
446 |
</div>
|
|
|
616 |
</div>
|
617 |
|
618 |
<script>
|
619 |
+
// DOM Elements
|
620 |
+
const clientModal = document.getElementById('clientModal');
|
621 |
+
const closeModal = document.getElementById('closeModal');
|
622 |
+
|
623 |
// Authentication state
|
624 |
let currentUser = null;
|
625 |
const authToken = localStorage.getItem('authToken');
|
626 |
+
|
627 |
+
// Modal functions
|
628 |
+
function openClientModal() {
|
629 |
+
clientModal.classList.remove('hidden');
|
630 |
+
}
|
631 |
+
|
632 |
+
function closeClientModal() {
|
633 |
+
clientModal.classList.add('hidden');
|
634 |
+
}
|
635 |
+
|
636 |
+
// Event listeners for modal
|
637 |
+
closeModal.addEventListener('click', closeClientModal);
|
638 |
|
639 |
// Check if user is logged in
|
640 |
if (authToken) {
|
|
|
645 |
}
|
646 |
|
647 |
// Toggle sidebar
|
648 |
+
const sidebarToggle = document.getElementById('sidebarToggle');
|
649 |
+
const sidebar = document.querySelector('.sidebar');
|
650 |
+
|
651 |
+
sidebarToggle.addEventListener('click', function() {
|
652 |
+
sidebar.classList.toggle('collapsed');
|
653 |
+
// Store sidebar state in localStorage
|
654 |
+
const isCollapsed = sidebar.classList.contains('collapsed');
|
655 |
+
localStorage.setItem('sidebarCollapsed', isCollapsed);
|
656 |
});
|
657 |
|
658 |
+
// Initialize sidebar state from localStorage
|
659 |
+
if (localStorage.getItem('sidebarCollapsed') === 'true') {
|
660 |
+
sidebar.classList.add('collapsed');
|
661 |
+
}
|
662 |
+
|
663 |
// Navigation functions
|
664 |
function showLogin() {
|
665 |
document.getElementById('loginPage').classList.remove('hidden');
|