File size: 13,657 Bytes
c2bcdff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Kenyan Payroll System</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        @media print {
            .no-print {
                display: none !important;
            }
            body {
                background-color: white !important;
                color: black !important;
            }
            .payslip-container, .p9-container {
                box-shadow: none !important;
                border: none !important;
                margin: 0 !important;
                padding: 0 !important;
                width: 100% !important;
            }
        }
        .sidebar {
            transition: all 0.3s ease;
        }
        .sidebar.collapsed {
            width: 70px;
        }
        .sidebar.collapsed .sidebar-text {
            display: none;
        }
        .sidebar.collapsed .menu-item {
            justify-content: center;
        }
    </style>
</head>
<body class="bg-gray-100">
    <div class="flex h-screen overflow-hidden">
        <!-- Sidebar -->
        <div class="sidebar bg-blue-800 text-white w-64 flex flex-col">
            <div class="p-4 flex items-center justify-between border-b border-blue-700">
                <div class="flex items-center">
                    <i class="fas fa-money-bill-wave text-2xl mr-3"></i>
                    <span class="sidebar-text text-xl font-bold">Kenya Payroll</span>
                </div>
                <button id="toggleSidebar" class="text-white focus:outline-none">
                    <i class="fas fa-bars"></i>
                </button>
            </div>
            <nav class="flex-1 overflow-y-auto">
                <ul class="py-4">
                    <li>
                        <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('dashboard')">
                            <i class="fas fa-tachometer-alt mr-3"></i>
                            <span class="sidebar-text">Dashboard</span>
                        </a>
                    </li>
                    <li>
                        <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('employees')">
                            <i class="fas fa-users mr-3"></i>
                            <span class="sidebar-text">Employees</span>
                        </a>
                    </li>
                    <li>
                        <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('payroll')">
                            <i class="fas fa-calculator mr-3"></i>
                            <span class="sidebar-text">Payroll Processing</span>
                        </a>
                    </li>
                    <li>
                        <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('tax')">
                            <i class="fas fa-file-invoice-dollar mr-3"></i>
                            <span class="sidebar-text">Tax & Statutory</span>
                        </a>
                    </li>
                    <li>
                        <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('reports')">
                            <i class="fas fa-chart-bar mr-3"></i>
                            <span class="sidebar-text">Reports</span>
                        </a>
                    </li>
                    <li>
                        <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('p9')">
                            <i class="fas fa-file-alt mr-3"></i>
                            <span class="sidebar-text">P9 Forms</span>
                        </a>
                    </li>
                    <li>
                        <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('settings')">
                            <i class="fas fa-cog mr-3"></i>
                            <span class="sidebar-text">Settings</span>
                        </a>
                    </li>
                </ul>
            </nav>
            <div class="p-4 border-t border-blue-700">
                <div class="flex items-center">
                    <div class="w-10 h-10 rounded-full bg-blue-600 flex items-center justify-center">
                        <i class="fas fa-user"></i>
                    </div>
                    <div class="ml-3 sidebar-text">
                        <div class="font-medium">Admin User</div>
                        <div class="text-xs text-blue-200">Administrator</div>
                    </div>
                </div>
            </div>
        </div>

        <!-- Main Content -->
        <div class="flex-1 overflow-auto">
            <!-- Header -->
            <header class="bg-white shadow-sm py-4 px-6 flex justify-between items-center">
                <h1 class="text-2xl font-bold text-gray-800" id="pageTitle">Dashboard</h1>
                <div class="flex items-center space-x-4">
                    <div class="relative">
                        <input type="text" placeholder="Search..." class="pl-10 pr-4 py-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent">
                        <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
                    </div>
                    <button class="p-2 rounded-full bg-gray-100 text-gray-600 hover:bg-gray-200">
                        <i class="fas fa-bell"></i>
                    </button>
                </div>
            </header>

            <!-- Main Content Sections -->
            <main class="p-6">
                <!-- Dashboard Section -->
                <div id="dashboard" class="section-content">
                    <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
                        <div class="bg-white rounded-lg shadow p-6">
                            <div class="flex items-center justify-between">
                                <div>
                                    <p class="text-gray-500">Total Employees</p>
                                    <h3 class="text-3xl font-bold" id="totalEmployees">1,024</h3>
                                </div>
                                <div class="p-3 rounded-full bg-blue-100 text-blue-600">
                                    <i class="fas fa-users text-2xl"></i>
                                </div>
                            </div>
                            <div class="mt-4">
                                <span class="text-green-500 text-sm font-medium">+5.2% from last month</span>
                            </div>
                        </div>
                        <div class="bg-white rounded-lg shadow p-6">
                            <div class="flex items-center justify-between">
                                <div>
                                    <p class="text-gray-500">Monthly Payroll</p>
                                    <h3 class="text-3xl font-bold" id="monthlyPayroll">KSh 12,450,000</h3>
                                </div>
                                <div class="p-3 rounded-full bg-green-100 text-green-600">
                                    <i class="fas fa-money-bill-wave text-2xl"></i>
                                </div>
                            </div>
                            <div class="mt-4">
                                <span class="text-green-500 text-sm font-medium">+3.8% from last month</span>
                            </div>
                        </div>
                        <div class="bg-white rounded-lg shadow p-6">
                            <div class="flex items-center justify-between">
                                <div>
                                    <p class="text-gray-500">PAYE Tax</p>
                                    <h3 class="text-3xl font-bold" id="payeTax">KSh 2,890,000</h3>
                                </div>
                                <div class="p-3 rounded-full bg-red-100 text-red-600">
                                    <i class="fas fa-file-invoice-dollar text-2xl"></i>
                                </div>
                            </div>
                            <div class="mt-4">
                                <span class="text-red-500 text-sm font-medium">+4.1% from last month</span>
                            </div>
                        </div>
                        <div class="bg-white rounded-lg shadow p-6">
                            <div class="flex items-center justify-between">
                                <div>
                                    <p class="text-gray-500">NSSF Contributions</p>
                                    <h3 class="text-3xl font-bold" id="nssfContributions">KSh 204,800</h3>
                                </div>
                                <div class="p-3 rounded-full bg-yellow-100 text-yellow-600">
                                    <i class="fas fa-shield-alt text-2xl"></i>
                                </div>
                            </div>
                            <div class="mt-4">
                                <span class="text-green-500 text-sm font-medium">+5.2% from last month</span>
                            </div>
                        </div>
                    </div>

                    <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6">
                        <div class="bg-white rounded-lg shadow p-6 lg:col-span-2">
                            <div class="flex justify-between items-center mb-4">
                                <h3 class="text-lg font-semibold">Payroll Overview</h3>
                                <div class="flex space-x-2">
                                    <button class="px-3 py-1 text-sm bg-blue-100 text-blue-600 rounded">Monthly</button>
                                    <button class="px-3 py-1 text-sm bg-gray-100 text-gray-600 rounded">Quarterly</button>
                                    <button class="px-3 py-1 text-sm bg-gray-100 text-gray-600 rounded">Yearly</button>
                                </div>
                            </div>
                            <canvas id="payrollChart" height="300"></canvas>
                        </div>
                        <div class="bg-white rounded-lg shadow p-6">
                            <h3 class="text-lg font-semibold mb-4">Recent Payslips</h3>
                            <div class="space-y-4">
                                <div class="flex items-center justify-between p-3 bg-gray-50 rounded">
                                    <div class="flex items-center">
                                        <div class="w-10 h-10 rounded-full bg-blue-100 text-blue-600 flex items-center justify-center mr-3">
                                            <i class="fas fa-user"></i>
                                        </div>
                                        <div>
                                            <p class="font-medium">John Doe</p>
                                            <p class="text-sm text-gray-500">ID: EMP001</p>
                                        </div>
                                    </div>
                                    <span class="text-green-500 font-medium">KSh 85,420</span>
                                </div>
                                <div class="flex items-center justify-between p-3 bg-gray-50 rounded">
                                    <div class="flex items-center">
                                        <div class="w-10 h-10 rounded-full bg-blue-100 text-blue-600 flex items-center justify-center mr-3">
                                            <i class="fas fa-user"></i>
                                        </div>
                                        <div>
                                            <p class="font-medium">Jane Smith</p>
                                            <p class="text-sm text-gray-500">ID: EMP002</p>
                                        </div>
                                    </div>
                                    <span class="text-green-500 font-medium">KSh
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=WritingGuru/payroll" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>