forked from LeVo011/FINSERVE
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadmin.html
79 lines (72 loc) · 2.8 KB
/
admin.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FINSERVE Admin Dashboard</title>
<link rel="stylesheet" href="styles.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&family=Roboto:wght@400;700&display=swap" rel="stylesheet">
</head>
<body>
<div class="admin-container">
<h2>Loan Applications</h2>
<table>
<caption>List of Loan Applications</caption>
<thead>
<tr>
<th>Applicant Name</th>
<th>Loan Amount</th>
<th>Income</th>
<th>Credit Score</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody id="loan-table">
<tr>
<td>Lavanay Sharma</td>
<td>20,0000</td>
<td>50,0000</td>
<td>720</td>
<td class="status">Pending</td>
<td>
<button aria-label="Approve Loan" onclick="approveLoan(this)">Approve</button>
<button aria-label="Decline Loan" onclick="declineLoan(this)">Decline</button>
</td>
</tr>
</tbody>
</table>
</div>
<script>
function approveLoan(button) {
const row = button.closest('tr');
row.querySelector('.status').innerText = 'Approved';
alert('Loan Approved');
button.disabled = true;
button.nextElementSibling.disabled = true;
}
function declineLoan(button) {
const row = button.closest('tr');
row.querySelector('.status').innerText = 'Declined';
alert('Loan Declined');
button.disabled = true;
button.previousElementSibling.disabled = true;
}
</script>
<div class="chatbot-icon" onclick="toggleChatbot()">
<img src="chat-icon.png" alt="Chatbot Icon">
</div>
<div id="chatbot-container" class="chatbot-container hidden">
<div id="chatbot-header">
<h4>Finbot</h4>
<button onclick="toggleChatbot()">X</button>
</div>
<div id="chatbot-messages"></div>
<input type="text" id="chatbot-input" placeholder="Ask about loans..." />
<button onclick="sendChatMessage()">Send</button>
</div>
<script src="chatbot.js"></script>
</body>
</html>