WritingGuru commited on
Commit
c2bcdff
·
verified ·
1 Parent(s): 0ee541f

write for me a code for payroll system with the kenyan taxation and statutory n integrated and can print payslips and p9 for about 1000 employees. the code should be executable in visual code - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +233 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Payroll
3
- emoji: 🚀
4
- colorFrom: gray
5
- colorTo: red
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: payroll
3
+ emoji: 🐳
4
+ colorFrom: pink
5
+ colorTo: pink
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,233 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Kenyan Payroll System</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
9
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
10
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.18.5/xlsx.full.min.js"></script>
11
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
12
+ <style>
13
+ @media print {
14
+ .no-print {
15
+ display: none !important;
16
+ }
17
+ body {
18
+ background-color: white !important;
19
+ color: black !important;
20
+ }
21
+ .payslip-container, .p9-container {
22
+ box-shadow: none !important;
23
+ border: none !important;
24
+ margin: 0 !important;
25
+ padding: 0 !important;
26
+ width: 100% !important;
27
+ }
28
+ }
29
+ .sidebar {
30
+ transition: all 0.3s ease;
31
+ }
32
+ .sidebar.collapsed {
33
+ width: 70px;
34
+ }
35
+ .sidebar.collapsed .sidebar-text {
36
+ display: none;
37
+ }
38
+ .sidebar.collapsed .menu-item {
39
+ justify-content: center;
40
+ }
41
+ </style>
42
+ </head>
43
+ <body class="bg-gray-100">
44
+ <div class="flex h-screen overflow-hidden">
45
+ <!-- Sidebar -->
46
+ <div class="sidebar bg-blue-800 text-white w-64 flex flex-col">
47
+ <div class="p-4 flex items-center justify-between border-b border-blue-700">
48
+ <div class="flex items-center">
49
+ <i class="fas fa-money-bill-wave text-2xl mr-3"></i>
50
+ <span class="sidebar-text text-xl font-bold">Kenya Payroll</span>
51
+ </div>
52
+ <button id="toggleSidebar" class="text-white focus:outline-none">
53
+ <i class="fas fa-bars"></i>
54
+ </button>
55
+ </div>
56
+ <nav class="flex-1 overflow-y-auto">
57
+ <ul class="py-4">
58
+ <li>
59
+ <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('dashboard')">
60
+ <i class="fas fa-tachometer-alt mr-3"></i>
61
+ <span class="sidebar-text">Dashboard</span>
62
+ </a>
63
+ </li>
64
+ <li>
65
+ <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('employees')">
66
+ <i class="fas fa-users mr-3"></i>
67
+ <span class="sidebar-text">Employees</span>
68
+ </a>
69
+ </li>
70
+ <li>
71
+ <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('payroll')">
72
+ <i class="fas fa-calculator mr-3"></i>
73
+ <span class="sidebar-text">Payroll Processing</span>
74
+ </a>
75
+ </li>
76
+ <li>
77
+ <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('tax')">
78
+ <i class="fas fa-file-invoice-dollar mr-3"></i>
79
+ <span class="sidebar-text">Tax & Statutory</span>
80
+ </a>
81
+ </li>
82
+ <li>
83
+ <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('reports')">
84
+ <i class="fas fa-chart-bar mr-3"></i>
85
+ <span class="sidebar-text">Reports</span>
86
+ </a>
87
+ </li>
88
+ <li>
89
+ <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('p9')">
90
+ <i class="fas fa-file-alt mr-3"></i>
91
+ <span class="sidebar-text">P9 Forms</span>
92
+ </a>
93
+ </li>
94
+ <li>
95
+ <a href="#" class="menu-item flex items-center px-4 py-3 hover:bg-blue-700 transition" onclick="showSection('settings')">
96
+ <i class="fas fa-cog mr-3"></i>
97
+ <span class="sidebar-text">Settings</span>
98
+ </a>
99
+ </li>
100
+ </ul>
101
+ </nav>
102
+ <div class="p-4 border-t border-blue-700">
103
+ <div class="flex items-center">
104
+ <div class="w-10 h-10 rounded-full bg-blue-600 flex items-center justify-center">
105
+ <i class="fas fa-user"></i>
106
+ </div>
107
+ <div class="ml-3 sidebar-text">
108
+ <div class="font-medium">Admin User</div>
109
+ <div class="text-xs text-blue-200">Administrator</div>
110
+ </div>
111
+ </div>
112
+ </div>
113
+ </div>
114
+
115
+ <!-- Main Content -->
116
+ <div class="flex-1 overflow-auto">
117
+ <!-- Header -->
118
+ <header class="bg-white shadow-sm py-4 px-6 flex justify-between items-center">
119
+ <h1 class="text-2xl font-bold text-gray-800" id="pageTitle">Dashboard</h1>
120
+ <div class="flex items-center space-x-4">
121
+ <div class="relative">
122
+ <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">
123
+ <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
124
+ </div>
125
+ <button class="p-2 rounded-full bg-gray-100 text-gray-600 hover:bg-gray-200">
126
+ <i class="fas fa-bell"></i>
127
+ </button>
128
+ </div>
129
+ </header>
130
+
131
+ <!-- Main Content Sections -->
132
+ <main class="p-6">
133
+ <!-- Dashboard Section -->
134
+ <div id="dashboard" class="section-content">
135
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
136
+ <div class="bg-white rounded-lg shadow p-6">
137
+ <div class="flex items-center justify-between">
138
+ <div>
139
+ <p class="text-gray-500">Total Employees</p>
140
+ <h3 class="text-3xl font-bold" id="totalEmployees">1,024</h3>
141
+ </div>
142
+ <div class="p-3 rounded-full bg-blue-100 text-blue-600">
143
+ <i class="fas fa-users text-2xl"></i>
144
+ </div>
145
+ </div>
146
+ <div class="mt-4">
147
+ <span class="text-green-500 text-sm font-medium">+5.2% from last month</span>
148
+ </div>
149
+ </div>
150
+ <div class="bg-white rounded-lg shadow p-6">
151
+ <div class="flex items-center justify-between">
152
+ <div>
153
+ <p class="text-gray-500">Monthly Payroll</p>
154
+ <h3 class="text-3xl font-bold" id="monthlyPayroll">KSh 12,450,000</h3>
155
+ </div>
156
+ <div class="p-3 rounded-full bg-green-100 text-green-600">
157
+ <i class="fas fa-money-bill-wave text-2xl"></i>
158
+ </div>
159
+ </div>
160
+ <div class="mt-4">
161
+ <span class="text-green-500 text-sm font-medium">+3.8% from last month</span>
162
+ </div>
163
+ </div>
164
+ <div class="bg-white rounded-lg shadow p-6">
165
+ <div class="flex items-center justify-between">
166
+ <div>
167
+ <p class="text-gray-500">PAYE Tax</p>
168
+ <h3 class="text-3xl font-bold" id="payeTax">KSh 2,890,000</h3>
169
+ </div>
170
+ <div class="p-3 rounded-full bg-red-100 text-red-600">
171
+ <i class="fas fa-file-invoice-dollar text-2xl"></i>
172
+ </div>
173
+ </div>
174
+ <div class="mt-4">
175
+ <span class="text-red-500 text-sm font-medium">+4.1% from last month</span>
176
+ </div>
177
+ </div>
178
+ <div class="bg-white rounded-lg shadow p-6">
179
+ <div class="flex items-center justify-between">
180
+ <div>
181
+ <p class="text-gray-500">NSSF Contributions</p>
182
+ <h3 class="text-3xl font-bold" id="nssfContributions">KSh 204,800</h3>
183
+ </div>
184
+ <div class="p-3 rounded-full bg-yellow-100 text-yellow-600">
185
+ <i class="fas fa-shield-alt text-2xl"></i>
186
+ </div>
187
+ </div>
188
+ <div class="mt-4">
189
+ <span class="text-green-500 text-sm font-medium">+5.2% from last month</span>
190
+ </div>
191
+ </div>
192
+ </div>
193
+
194
+ <div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6">
195
+ <div class="bg-white rounded-lg shadow p-6 lg:col-span-2">
196
+ <div class="flex justify-between items-center mb-4">
197
+ <h3 class="text-lg font-semibold">Payroll Overview</h3>
198
+ <div class="flex space-x-2">
199
+ <button class="px-3 py-1 text-sm bg-blue-100 text-blue-600 rounded">Monthly</button>
200
+ <button class="px-3 py-1 text-sm bg-gray-100 text-gray-600 rounded">Quarterly</button>
201
+ <button class="px-3 py-1 text-sm bg-gray-100 text-gray-600 rounded">Yearly</button>
202
+ </div>
203
+ </div>
204
+ <canvas id="payrollChart" height="300"></canvas>
205
+ </div>
206
+ <div class="bg-white rounded-lg shadow p-6">
207
+ <h3 class="text-lg font-semibold mb-4">Recent Payslips</h3>
208
+ <div class="space-y-4">
209
+ <div class="flex items-center justify-between p-3 bg-gray-50 rounded">
210
+ <div class="flex items-center">
211
+ <div class="w-10 h-10 rounded-full bg-blue-100 text-blue-600 flex items-center justify-center mr-3">
212
+ <i class="fas fa-user"></i>
213
+ </div>
214
+ <div>
215
+ <p class="font-medium">John Doe</p>
216
+ <p class="text-sm text-gray-500">ID: EMP001</p>
217
+ </div>
218
+ </div>
219
+ <span class="text-green-500 font-medium">KSh 85,420</span>
220
+ </div>
221
+ <div class="flex items-center justify-between p-3 bg-gray-50 rounded">
222
+ <div class="flex items-center">
223
+ <div class="w-10 h-10 rounded-full bg-blue-100 text-blue-600 flex items-center justify-center mr-3">
224
+ <i class="fas fa-user"></i>
225
+ </div>
226
+ <div>
227
+ <p class="font-medium">Jane Smith</p>
228
+ <p class="text-sm text-gray-500">ID: EMP002</p>
229
+ </div>
230
+ </div>
231
+ <span class="text-green-500 font-medium">KSh
232
+ <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>
233
+ </html>