Spaces:
Running
Running
when click pending request its not working resolved the contain sections - Follow Up Deployment
Browse files- index.html +80 -2
index.html
CHANGED
|
@@ -174,7 +174,7 @@
|
|
| 174 |
</div>
|
| 175 |
</div>
|
| 176 |
<div class="mt-4">
|
| 177 |
-
<a href="#" class="text-blue-600 text-sm font-medium hover:underline">View requests</a>
|
| 178 |
</div>
|
| 179 |
</div>
|
| 180 |
<div class="bg-white rounded-lg shadow p-6">
|
|
@@ -537,9 +537,87 @@
|
|
| 537 |
requestLeaveLink: 'Request Leave',
|
| 538 |
leaveHistoryLink: 'Leave History',
|
| 539 |
reportsLink: 'Reports',
|
| 540 |
-
settingsLink: 'Settings'
|
|
|
|
| 541 |
};
|
| 542 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 543 |
Object.keys(navLinks).forEach(linkId => {
|
| 544 |
document.getElementById(linkId).addEventListener('click', function(e) {
|
| 545 |
e.preventDefault();
|
|
|
|
| 174 |
</div>
|
| 175 |
</div>
|
| 176 |
<div class="mt-4">
|
| 177 |
+
<a href="#pending" class="text-blue-600 text-sm font-medium hover:underline">View requests</a>
|
| 178 |
</div>
|
| 179 |
</div>
|
| 180 |
<div class="bg-white rounded-lg shadow p-6">
|
|
|
|
| 537 |
requestLeaveLink: 'Request Leave',
|
| 538 |
leaveHistoryLink: 'Leave History',
|
| 539 |
reportsLink: 'Reports',
|
| 540 |
+
settingsLink: 'Settings',
|
| 541 |
+
pendingRequestsLink: 'Pending Requests'
|
| 542 |
};
|
| 543 |
|
| 544 |
+
// Add click handler for pending requests link
|
| 545 |
+
document.querySelector('a[href="#pending"]').addEventListener('click', function(e) {
|
| 546 |
+
e.preventDefault();
|
| 547 |
+
document.querySelector('h1').textContent = 'Pending Requests';
|
| 548 |
+
document.querySelector('main').innerHTML = `
|
| 549 |
+
<div class="p-6">
|
| 550 |
+
<h2 class="text-lg font-semibold text-gray-800 mb-4">Pending Leave Requests</h2>
|
| 551 |
+
<div class="bg-white rounded-lg shadow overflow-hidden">
|
| 552 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 553 |
+
<thead class="bg-gray-50">
|
| 554 |
+
<tr>
|
| 555 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Type</th>
|
| 556 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Dates</th>
|
| 557 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
|
| 558 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
|
| 559 |
+
</tr>
|
| 560 |
+
</thead>
|
| 561 |
+
<tbody class="bg-white divide-y divide-gray-200">
|
| 562 |
+
<tr>
|
| 563 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 564 |
+
<div class="flex items-center">
|
| 565 |
+
<div class="flex-shrink-0 h-10 w-10 bg-yellow-100 rounded-full flex items-center justify-center">
|
| 566 |
+
<i class="fas fa-clock text-yellow-600"></i>
|
| 567 |
+
</div>
|
| 568 |
+
<div class="ml-4">
|
| 569 |
+
<div class="text-sm font-medium text-gray-900">Annual Leave</div>
|
| 570 |
+
<div class="text-sm text-gray-500">Vacation</div>
|
| 571 |
+
</div>
|
| 572 |
+
</div>
|
| 573 |
+
</td>
|
| 574 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 575 |
+
<div class="text-sm text-gray-900">Jun 20 - Jun 22</div>
|
| 576 |
+
<div class="text-sm text-gray-500">2023</div>
|
| 577 |
+
</td>
|
| 578 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 579 |
+
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">
|
| 580 |
+
Pending
|
| 581 |
+
</span>
|
| 582 |
+
</td>
|
| 583 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 584 |
+
<button class="text-blue-600 hover:text-blue-900 mr-3">Edit</button>
|
| 585 |
+
<button class="text-red-600 hover:text-red-900">Cancel</button>
|
| 586 |
+
</td>
|
| 587 |
+
</tr>
|
| 588 |
+
<tr>
|
| 589 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 590 |
+
<div class="flex items-center">
|
| 591 |
+
<div class="flex-shrink-0 h-10 w-10 bg-yellow-100 rounded-full flex items-center justify-center">
|
| 592 |
+
<i class="fas fa-clock text-yellow-600"></i>
|
| 593 |
+
</div>
|
| 594 |
+
<div class="ml-4">
|
| 595 |
+
<div class="text-sm font-medium text-gray-900">Sick Leave</div>
|
| 596 |
+
<div class="text-sm text-gray-500">Medical</div>
|
| 597 |
+
</div>
|
| 598 |
+
</div>
|
| 599 |
+
</td>
|
| 600 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 601 |
+
<div class="text-sm text-gray-900">Jun 25 - Jun 26</div>
|
| 602 |
+
<div class="text-sm text-gray-500">2023</div>
|
| 603 |
+
</td>
|
| 604 |
+
<td class="px-6 py-4 whitespace-nowrap">
|
| 605 |
+
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">
|
| 606 |
+
Pending
|
| 607 |
+
</span>
|
| 608 |
+
</td>
|
| 609 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
| 610 |
+
<button class="text-blue-600 hover:text-blue-900 mr-3">Edit</button>
|
| 611 |
+
<button class="text-red-600 hover:text-red-900">Cancel</button>
|
| 612 |
+
</td>
|
| 613 |
+
</tr>
|
| 614 |
+
</tbody>
|
| 615 |
+
</table>
|
| 616 |
+
</div>
|
| 617 |
+
</div>
|
| 618 |
+
`;
|
| 619 |
+
});
|
| 620 |
+
|
| 621 |
Object.keys(navLinks).forEach(linkId => {
|
| 622 |
document.getElementById(linkId).addEventListener('click', function(e) {
|
| 623 |
e.preventDefault();
|