mih00 commited on
Commit
0affbca
·
verified ·
1 Parent(s): 12fe652

add options to add / remove and edit customers & suppliers - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +705 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Pharmacy
3
- emoji: 👁
4
- colorFrom: blue
5
- colorTo: blue
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: pharmacy
3
+ emoji: 🐳
4
+ colorFrom: red
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,705 @@
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" dir="ltr">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>PharmaCare - Pharmacy Management System</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script>
9
+ tailwind.config = {
10
+ theme: {
11
+ extend: {
12
+ fontFamily: {
13
+ 'arabic': ['"SF Arabic"', 'Scheherazade New', 'Tahoma', 'sans-serif'],
14
+ 'english': ['Inter', 'system-ui', 'sans-serif']
15
+ }
16
+ }
17
+ }
18
+ }
19
+ </script>
20
+ <link href="https://fonts.googleapis.com/css2?family=Scheherazade+New:wght@400;700&display=swap" rel="stylesheet">
21
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
22
+ <style type="text/css">
23
+ /* Custom styles for RTL/LTR switching and other enhancements */
24
+ :root {
25
+ --primary-color: #2563eb;
26
+ --secondary-color: #0ea5e9;
27
+ --accent-color: #10b981;
28
+ --danger-color: #ef4444;
29
+ --warning-color: #f59e0b;
30
+ --text-primary: #1f2937;
31
+ --text-secondary: #6b7280;
32
+ --bg-light: #f9fafb;
33
+ --border-color: #e5e7eb;
34
+ }
35
+
36
+ [dir="rtl"] {
37
+ font-family: 'Scheherazade New', Tahoma, sans-serif;
38
+ }
39
+
40
+ [dir="ltr"] {
41
+ font-family: Inter, system-ui, sans-serif;
42
+ }
43
+
44
+ .fade-in {
45
+ animation: fadeIn 0.3s ease-in-out;
46
+ }
47
+
48
+ @keyframes fadeIn {
49
+ from { opacity: 0; }
50
+ to { opacity: 1; }
51
+ }
52
+
53
+ .sidebar-item.active {
54
+ border-right: 3px solid var(--primary-color);
55
+ background-color: #dbeafe;
56
+ }
57
+
58
+ [dir="rtl"] .sidebar-item.active {
59
+ border-right: none;
60
+ border-left: 3px solid var(--primary-color);
61
+ }
62
+
63
+ .table-responsive {
64
+ overflow-x: auto;
65
+ }
66
+
67
+ /* Custom checkbox styling */
68
+ input[type="checkbox"] {
69
+ -webkit-appearance: none;
70
+ -moz-appearance: none;
71
+ appearance: none;
72
+ width: 18px;
73
+ height: 18px;
74
+ border: 1px solid #cbd5e1;
75
+ border-radius: 3px;
76
+ outline: none;
77
+ cursor: pointer;
78
+ position: relative;
79
+ }
80
+
81
+ input[type="checkbox"]:checked {
82
+ background-color: var(--primary-color);
83
+ border-color: var(--primary-color);
84
+ }
85
+
86
+ input[type="checkbox"]:checked::before {
87
+ content: "✓";
88
+ position: absolute;
89
+ color: white;
90
+ font-size: 12px;
91
+ top: 50%;
92
+ left: 50%;
93
+ transform: translate(-50%, -50%);
94
+ }
95
+
96
+ /* RTL specific adjustments */
97
+ [dir="rtl"] input[type="checkbox"]:checked::before {
98
+ transform: translate(50%, -50%);
99
+ }
100
+
101
+ /* Custom scrollbar */
102
+ ::-webkit-scrollbar {
103
+ width: 6px;
104
+ height: 6px;
105
+ }
106
+
107
+ ::-webkit-scrollbar-track {
108
+ background: #f1f1f1;
109
+ }
110
+
111
+ ::-webkit-scrollbar-thumb {
112
+ background: #c5c5c5;
113
+ border-radius: 3px;
114
+ }
115
+
116
+ ::-webkit-scrollbar-thumb:hover {
117
+ background: #a8a8a8;
118
+ }
119
+
120
+ /* Print styles for invoices */
121
+ @media print {
122
+ .no-print {
123
+ display: none !important;
124
+ }
125
+
126
+ .print-section {
127
+ display: block !important;
128
+ }
129
+ }
130
+ </style>
131
+ </head>
132
+ <body class="bg-gray-50 flex h-screen" dir="ltr">
133
+ <!-- Sidebar -->
134
+ <div class="w-64 bg-white shadow-md no-print" id="sidebar">
135
+ <div class="p-5 flex items-center justify-between border-b border-gray-200">
136
+ <h1 class="text-xl font-bold text-blue-600" id="app-name">PharmaCare</h1>
137
+ <button id="toggle-sidebar" class="text-gray-500 hover:text-gray-700">
138
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
139
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
140
+ </svg>
141
+ </button>
142
+ </div>
143
+
144
+ <nav class="mt-6">
145
+ <div class="px-4 py-2 text-xs uppercase text-gray-500 font-medium" id="main-nav-label">Main Navigation</div>
146
+ <a href="#" class="sidebar-item active flex items-center px-4 py-3 text-gray-700 hover:bg-blue-50 transition-colors" data-section="dashboard">
147
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-3" fill="none" viewBox="0 0 24 24" stroke="currentColor">
148
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />
149
+ </svg>
150
+ <span id="nav-dashboard">Dashboard</span>
151
+ </a>
152
+ <a href="#" class="sidebar-item flex items-center px-4 py-3 text-gray-700 hover:bg-blue-50 transition-colors" data-section="inventory">
153
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-3" fill="none" viewBox="0 0 24 24" stroke="currentColor">
154
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4" />
155
+ </svg>
156
+ <span id="nav-inventory">Inventory</span>
157
+ </a>
158
+ <a href="#" class="sidebar-item flex items-center px-4 py-3 text-gray-700 hover:bg-blue-50 transition-colors" data-section="pos">
159
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-3" fill="none" viewBox="0 0 24 24" stroke="currentColor">
160
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z" />
161
+ </svg>
162
+ <span id="nav-pos">Point of Sale</span>
163
+ </a>
164
+ <a href="#" class="sidebar-item flex items-center px-4 py-3 text-gray-700 hover:bg-blue-50 transition-colors" data-section="customers">
165
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-3" fill="none" viewBox="0 0 24 24" stroke="currentColor">
166
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" />
167
+ </svg>
168
+ <span id="nav-customers">Customers</span>
169
+ </a>
170
+ <a href="#" class="sidebar-item flex items-center px-4 py-3 text-gray-700 hover:bg-blue-50 transition-colors" data-section="suppliers">
171
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-3" fill="none" viewBox="0 0 24 24" stroke="currentColor">
172
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" />
173
+ </svg>
174
+ <span id="nav-suppliers">Suppliers</span>
175
+ </a>
176
+ <a href="#" class="sidebar-item flex items-center px-4 py-3 text-gray-700 hover:bg-blue-50 transition-colors" data-section="reports">
177
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-3" fill="none" viewBox="0 0 24 24" stroke="currentColor">
178
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" />
179
+ </svg>
180
+ <span id="nav-reports">Reports</span>
181
+ </a>
182
+ </nav>
183
+
184
+ <div class="absolute bottom-0 w-full p-4 border-t border-gray-200">
185
+ <div class="flex items-center justify-between mb-4">
186
+ <span class="text-sm text-gray-600" id="language-label">Language:</span>
187
+ <div class="relative">
188
+ <select id="language-switcher" class="block appearance-none w-full bg-white border border-gray-300 hover:border-gray-400 px-4 py-2 pr-8 rounded shadow leading-tight focus:outline-none focus:shadow-outline text-sm">
189
+ <option value="en">English</option>
190
+ <option value="ar">العربية</option>
191
+ </select>
192
+ <div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
193
+ <svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
194
+ <path d="M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z"/>
195
+ </svg>
196
+ </div>
197
+ </div>
198
+ </div>
199
+ <button id="logout-btn" class="w-full flex items-center justify-center px-4 py-2 bg-gray-100 text-gray-700 rounded-md hover:bg-gray-200 transition-colors text-sm">
200
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
201
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1" />
202
+ </svg>
203
+ <span id="logout-text">Logout</span>
204
+ </button>
205
+ </div>
206
+ </div>
207
+
208
+ <!-- Main Content -->
209
+ <div class="flex-1 flex flex-col overflow-hidden">
210
+ <!-- Top Navigation -->
211
+ <header class="bg-white shadow-sm z-10 no-print">
212
+ <div class="flex items-center justify-between px-6 py-3">
213
+ <div class="flex items-center">
214
+ <h2 class="text-lg font-semibold text-gray-800" id="current-section">Dashboard</h2>
215
+ </div>
216
+
217
+ <div class="flex items-center space-x-4">
218
+ <button class="relative p-2 text-gray-500 hover:text-gray-700 focus:outline-none">
219
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
220
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9" />
221
+ </svg>
222
+ <span class="absolute top-0 right-0 block h-2 w-2 rounded-full bg-red-500"></span>
223
+ </button>
224
+
225
+ <div class="relative">
226
+ <button class="flex items-center focus:outline-none" id="user-menu-button">
227
+ <div class="h-8 w-8 rounded-full bg-blue-500 flex items-center justify-center text-white font-semibold">A</div>
228
+ <span class="ml-2 text-sm font-medium text-gray-700" id="username">Admin User</span>
229
+ <svg xmlns="http://www.w3.org/2000/svg" class="ml-1 h-4 w-4 text-gray-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
230
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" />
231
+ </svg>
232
+ </button>
233
+ </div>
234
+ </div>
235
+ </div>
236
+ </header>
237
+
238
+ <!-- Content Area -->
239
+ <main class="flex-1 overflow-y-auto p-6 bg-gray-50" id="main-content">
240
+ <!-- Dashboard Section -->
241
+ <div class="content-section fade-in" id="dashboard-section">
242
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
243
+ <div class="bg-white rounded-lg shadow p-6">
244
+ <div class="flex items-center">
245
+ <div class="p-3 rounded-full bg-blue-100 text-blue-600">
246
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
247
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4" />
248
+ </svg>
249
+ </div>
250
+ <div class="ml-4">
251
+ <h3 class="text-sm font-medium text-gray-500" id="total-products">Total Products</h3>
252
+ <p class="text-2xl font-semibold text-gray-900">1,248</p>
253
+ </div>
254
+ </div>
255
+ </div>
256
+
257
+ <div class="bg-white rounded-lg shadow p-6">
258
+ <div class="flex items-center">
259
+ <div class="p-3 rounded-full bg-green-100 text-green-600">
260
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
261
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197M13 7a4 4 0 11-8 0 4 4 0 018 0z" />
262
+ </svg>
263
+ </div>
264
+ <div class="ml-4">
265
+ <h3 class="text-sm font-medium text-gray-500" id="total-customers">Total Customers</h3>
266
+ <p class="text-2xl font-semibold text-gray-900">3,587</p>
267
+ </div>
268
+ </div>
269
+ </div>
270
+
271
+ <div class="bg-white rounded-lg shadow p-6">
272
+ <div class="flex items-center">
273
+ <div class="p-3 rounded-full bg-yellow-100 text-yellow-600">
274
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
275
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" />
276
+ </svg>
277
+ </div>
278
+ <div class="ml-4">
279
+ <h3 class="text-sm font-medium text-gray-500" id="total-suppliers">Total Suppliers</h3>
280
+ <p class="text-2xl font-semibold text-gray-900">42</p>
281
+ </div>
282
+ </div>
283
+ </div>
284
+
285
+ <div class="bg-white rounded-lg shadow p-6">
286
+ <div class="flex items-center">
287
+ <div class="p-3 rounded-full bg-purple-100 text-purple-600">
288
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
289
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" />
290
+ </svg>
291
+ </div>
292
+ <div class="ml-4">
293
+ <h3 class="text-sm font-medium text-gray-500" id="today-sales">Today's Sales</h3>
294
+ <p class="text-2xl font-semibold text-gray-900">$4,892</p>
295
+ </div>
296
+ </div>
297
+ </div>
298
+ </div>
299
+
300
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
301
+ <div class="bg-white rounded-lg shadow p-6">
302
+ <h3 class="text-lg font-medium text-gray-800 mb-4" id="recent-sales">Recent Sales</h3>
303
+ <div class="overflow-x-auto">
304
+ <table class="min-w-full divide-y divide-gray-200">
305
+ <thead>
306
+ <tr>
307
+ <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" id="invoice-id">Invoice ID</th>
308
+ <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" id="customer">Customer</th>
309
+ <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" id="date">Date</th>
310
+ <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" id="amount">Amount</th>
311
+ </tr>
312
+ </thead>
313
+ <tbody class="bg-white divide-y divide-gray-200">
314
+ <tr>
315
+ <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-700">INV-00324</td>
316
+ <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-700">Ahmed Hassan</td>
317
+ <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-700">10:30 AM</td>
318
+ <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-700">$124.50</td>
319
+ </tr>
320
+ <tr>
321
+ <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-700">INV-00323</td>
322
+ <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-700">Mohammed Ali</td>
323
+ <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-700">10:15 AM</td>
324
+ <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-700">$89.25</td>
325
+ </tr>
326
+ <tr>
327
+ <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-700">INV-00322</td>
328
+ <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-700">Fatima Mahmoud</td>
329
+ <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-700">09:45 AM</td>
330
+ <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-700">$215.75</td>
331
+ </tr>
332
+ </tbody>
333
+ </table>
334
+ </div>
335
+ </div>
336
+
337
+ <div class="bg-white rounded-lg shadow p-6">
338
+ <h3 class="text-lg font-medium text-gray-800 mb-4" id="low-stock">Low Stock Alert</h3>
339
+ <div class="overflow-x-auto">
340
+ <table class="min-w-full divide-y divide-gray-200">
341
+ <thead>
342
+ <tr>
343
+ <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" id="product-name">Product Name</th>
344
+ <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" id="current-stock">Current Stock</th>
345
+ <th class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" id="status">Status</th>
346
+ </tr>
347
+ </thead>
348
+ <tbody class="bg-white divide-y divide-gray-200">
349
+ <tr>
350
+ <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-700">Paracetamol 500mg</td>
351
+ <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-700">12</td>
352
+ <td class="px-4 py-4 whitespace-nowrap">
353
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">Low</span>
354
+ </td>
355
+ </tr>
356
+ <tr>
357
+ <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-700">Amoxicillin 250mg</td>
358
+ <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-700">8</td>
359
+ <td class="px-4 py-4 whitespace-nowrap">
360
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Critical</span>
361
+ </td>
362
+ </tr>
363
+ <tr>
364
+ <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-700">Vitamin C 1000mg</td>
365
+ <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-700">15</td>
366
+ <td class="px-4 py-4 whitespace-nowrap">
367
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">Low</span>
368
+ </td>
369
+ </tr>
370
+ </tbody>
371
+ </table>
372
+ </div>
373
+ </div>
374
+ </div>
375
+ </div>
376
+
377
+ <!-- Inventory Section (Hidden by default) -->
378
+ <div class="content-section hidden" id="inventory-section">
379
+ <div class="mb-6 flex justify-between items-center">
380
+ <h2 class="text-2xl font-bold text-gray-800" id="inventory-title">Inventory Management</h2>
381
+ <button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md flex items-center">
382
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
383
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" />
384
+ </svg>
385
+ <span id="add-product">Add Product</span>
386
+ </button>
387
+ </div>
388
+
389
+ <div class="bg-white shadow rounded-lg overflow-hidden">
390
+ <div class="px-4 py-5 border-b border-gray-200 sm:px-6">
391
+ <div class="flex flex-wrap items-center justify-between">
392
+ <h3 class="text-lg leading-6 font-medium text-gray-900" id="product-list">Product List</h3>
393
+ <div class="mt-2 flex sm:mt-0">
394
+ <div class="relative rounded-md shadow-sm">
395
+ <input type="text" id="search-products" class="form-input py-2 px-3 block w-full leading-5 rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring focus:ring-blue-500 focus:ring-opacity-50" placeholder="Search products...">
396
+ </div>
397
+ </div>
398
+ </div>
399
+ </div>
400
+ <div class="overflow-x-auto">
401
+ <table class="min-w-full divide-y divide-gray-200">
402
+ <thead>
403
+ <tr>
404
+ <th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" id="table-product">Product</th>
405
+ <th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" id="table-category">Category</th>
406
+ <th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" id="table-stock">Stock</th>
407
+ <th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" id="table-price">Price</th>
408
+ <th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" id="table-expiry">Expiry Date</th>
409
+ <th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" id="table-actions">Actions</th>
410
+ </tr>
411
+ </thead>
412
+ <tbody class="bg-white divide-y divide-gray-200">
413
+ <tr>
414
+ <td class="px-6 py-4 whitespace-nowrap">
415
+ <div class="flex items-center">
416
+ <div class="flex-shrink-0 h-10 w-10 bg-blue-100 rounded-md flex items-center justify-center">
417
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-blue-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
418
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" />
419
+ </svg>
420
+ </div>
421
+ <div class="ml-4">
422
+ <div class="text-sm font-medium text-gray-900">Paracetamol 500mg</div>
423
+ <div class="text-sm text-gray-500">PCT-500</div>
424
+ </div>
425
+ </div>
426
+ </td>
427
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Pain Relief</td>
428
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
429
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">12 Left</span>
430
+ </td>
431
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$5.99</td>
432
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-12-15</td>
433
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
434
+ <a href="#" class="text-blue-600 hover:text-blue-900 mr-3">Edit</a>
435
+ <a href="#" class="text-red-600 hover:text-red-900">Delete</a>
436
+ </td>
437
+ </tr>
438
+ <tr>
439
+ <td class="px-6 py-4 whitespace-nowrap">
440
+ <div class="flex items-center">
441
+ <div class="flex-shrink-0 h-10 w-10 bg-green-100 rounded-md flex items-center justify-center">
442
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-green-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
443
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" />
444
+ </svg>
445
+ </div>
446
+ <div class="ml-4">
447
+ <div class="text-sm font-medium text-gray-900">Amoxicillin 250mg</div>
448
+ <div class="text-sm text-gray-500">AMX-250</div>
449
+ </div>
450
+ </div>
451
+ </td>
452
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Antibiotic</td>
453
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
454
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">8 Left</span>
455
+ </td>
456
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$12.50</td>
457
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2024-03-20</td>
458
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
459
+ <a href="#" class="text-blue-600 hover:text-blue-900 mr-3">Edit</a>
460
+ <a href="#" class="text-red-600 hover:text-red-900">Delete</a>
461
+ </td>
462
+ </tr>
463
+ <tr>
464
+ <td class="px-6 py-4 whitespace-nowrap">
465
+ <div class="flex items-center">
466
+ <div class="flex-shrink-0 h-10 w-10 bg-purple-100 rounded-md flex items-center justify-center">
467
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-purple-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
468
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" />
469
+ </svg>
470
+ </div>
471
+ <div class="ml-4">
472
+ <div class="text-sm font-medium text-gray-900">Vitamin C 1000mg</div>
473
+ <div class="text-sm text-gray-500">VIT-C-1000</div>
474
+ </div>
475
+ </div>
476
+ </td>
477
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Vitamins</td>
478
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
479
+ <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 text-yellow-800">15 Left</span>
480
+ </td>
481
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$8.75</td>
482
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2024-05-10</td>
483
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
484
+ <a href="#" class="text-blue-600 hover:text-blue-900 mr-3">Edit</a>
485
+ <a href="#" class="text-red-600 hover:text-red-900">Delete</a>
486
+ </td>
487
+ </tr>
488
+ </tbody>
489
+ </table>
490
+ </div>
491
+ </div>
492
+ </div>
493
+
494
+ <!-- Other sections would be implemented similarly -->
495
+ </main>
496
+ </div>
497
+
498
+ <script>
499
+ // Translation data
500
+ const translations = {
501
+ en: {
502
+ // App name
503
+ "app-name": "PharmaCare",
504
+
505
+ // Navigation labels
506
+ "main-nav-label": "Main Navigation",
507
+ "nav-dashboard": "Dashboard",
508
+ "nav-inventory": "Inventory",
509
+ "nav-pos": "Point of Sale",
510
+ "nav-customers": "Customers",
511
+ "nav-suppliers": "Suppliers",
512
+ "nav-reports": "Reports",
513
+ "logout-text": "Logout",
514
+
515
+ // Language switcher
516
+ "language-label": "Language:",
517
+
518
+ // Dashboard content
519
+ "current-section": "Dashboard",
520
+ "total-products": "Total Products",
521
+ "total-customers": "Total Customers",
522
+ "total-suppliers": "Total Suppliers",
523
+ "today-sales": "Today's Sales",
524
+ "recent-sales": "Recent Sales",
525
+ "invoice-id": "Invoice ID",
526
+ "customer": "Customer",
527
+ "date": "Date",
528
+ "amount": "Amount",
529
+ "low-stock": "Low Stock Alert",
530
+ "product-name": "Product Name",
531
+ "current-stock": "Current Stock",
532
+ "status": "Status",
533
+
534
+ // Inventory content
535
+ "inventory-title": "Inventory Management",
536
+ "add-product": "Add Product",
537
+ "product-list": "Product List",
538
+ "table-product": "Product",
539
+ "table-category": "Category",
540
+ "table-stock": "Stock",
541
+ "table-price": "Price",
542
+ "table-expiry": "Expiry Date",
543
+ "table-actions": "Actions"
544
+ },
545
+ ar: {
546
+ // App name
547
+ "app-name": "فارما كير",
548
+
549
+ // Navigation labels
550
+ "main-nav-label": "القائمة الرئيسية",
551
+ "nav-dashboard": "لوحة التحكم",
552
+ "nav-inventory": "المخزون",
553
+ "nav-pos": "نقطة البيع",
554
+ "nav-customers": "العملاء",
555
+ "nav-suppliers": "الموردون",
556
+ "nav-reports": "التقارير",
557
+ "logout-text": "تسجيل الخروج",
558
+
559
+ // Language switcher
560
+ "language-label": "اللغة:",
561
+
562
+ // Dashboard content
563
+ "current-section": "لوحة التحكم",
564
+ "total-products": "إجمالي المنتجات",
565
+ "total-customers": "إجمالي العملاء",
566
+ "total-suppliers": "إجمالي الموردين",
567
+ "today-sales": "مبيعات اليوم",
568
+ "recent-sales": "المبيعات الحديثة",
569
+ "invoice-id": "رقم الفاتورة",
570
+ "customer": "العميل",
571
+ "date": "التاريخ",
572
+ "amount": "المبلغ",
573
+ "low-stock": "تنبيه نقص المخزون",
574
+ "product-name": "اسم المنتج",
575
+ "current-stock": "المخزون الحالي",
576
+ "status": "الحالة",
577
+
578
+ // Inventory content
579
+ "inventory-title": "إدارة المخزون",
580
+ "add-product": "إضافة منتج",
581
+ "product-list": "قائمة المنتجات",
582
+ "table-product": "المنتج",
583
+ "table-category": "الفئة",
584
+ "table-stock": "المخزون",
585
+ "table-price": "السعر",
586
+ "table-expiry": "تاريخ الانتهاء",
587
+ "table-actions": "الإجراءات"
588
+ }
589
+ };
590
+
591
+ // Current language state
592
+ let currentLang = 'en';
593
+
594
+ // Function to change language
595
+ function changeLanguage(lang) {
596
+ currentLang = lang;
597
+
598
+ // Update HTML direction
599
+ document.body.dir = lang === 'ar' ? 'rtl' : 'ltr';
600
+
601
+ // Update language switcher value
602
+ document.getElementById('language-switcher').value = lang;
603
+
604
+ // Update all translatable elements
605
+ Object.keys(translations[lang]).forEach(key => {
606
+ const element = document.getElementById(key);
607
+ if (element) {
608
+ element.textContent = translations[lang][key];
609
+ }
610
+ });
611
+
612
+ // Additional RTL/LTR adjustments for UI elements
613
+ if (lang === 'ar') {
614
+ // Adjust sidebar active item border for RTL
615
+ document.querySelectorAll('.sidebar-item').forEach(item => {
616
+ if (item.classList.contains('active')) {
617
+ item.style.borderRight = 'none';
618
+ item.style.borderLeft = '3px solid #2563eb';
619
+ }
620
+ });
621
+
622
+ // Adjust icon positions for RTL
623
+ document.querySelectorAll('.sidebar-item svg').forEach(icon => {
624
+ icon.classList.remove('mr-3');
625
+ icon.classList.add('ml-3');
626
+ });
627
+
628
+ // Adjust dashboard card icon positions
629
+ document.querySelectorAll('.bg-white.rounded-lg.shadow .ml-4').forEach(el => {
630
+ el.classList.remove('ml-4');
631
+ el.classList.add('mr-4');
632
+ });
633
+ } else {
634
+ // Reset to LTR styles
635
+ document.querySelectorAll('.sidebar-item').forEach(item => {
636
+ if (item.classList.contains('active')) {
637
+ item.style.borderLeft = 'none';
638
+ item.style.borderRight = '3px solid #2563eb';
639
+ }
640
+ });
641
+
642
+ document.querySelectorAll('.sidebar-item svg').forEach(icon => {
643
+ icon.classList.remove('ml-3');
644
+ icon.classList.add('mr-3');
645
+ });
646
+
647
+ document.querySelectorAll('.bg-white.rounded-lg.shadow .mr-4').forEach(el => {
648
+ el.classList.remove('mr-4');
649
+ el.classList.add('ml-4');
650
+ });
651
+ }
652
+ }
653
+
654
+ // Initialize language on page load
655
+ document.addEventListener('DOMContentLoaded', function() {
656
+ // Set initial language
657
+ changeLanguage('en');
658
+
659
+ // Add event listener to language switcher
660
+ document.getElementById('language-switcher').addEventListener('change', function(e) {
661
+ changeLanguage(e.target.value);
662
+ });
663
+
664
+ // Navigation functionality
665
+ document.querySelectorAll('.sidebar-item').forEach(item => {
666
+ item.addEventListener('click', function(e) {
667
+ e.preventDefault();
668
+
669
+ // Remove active class from all items
670
+ document.querySelectorAll('.sidebar-item').forEach(i => {
671
+ i.classList.remove('active');
672
+ });
673
+
674
+ // Add active class to clicked item
675
+ this.classList.add('active');
676
+
677
+ // Update current section title
678
+ const section = this.getAttribute('data-section');
679
+ const sectionTitle = document.getElementById('current-section');
680
+ const sectionElement = document.getElementById(`${section}-section`);
681
+
682
+ // Hide all sections
683
+ document.querySelectorAll('.content-section').forEach(s => {
684
+ s.classList.add('hidden');
685
+ });
686
+
687
+ // Show selected section
688
+ sectionElement.classList.remove('hidden');
689
+ sectionElement.classList.add('fade-in');
690
+
691
+ // Update section title based on language
692
+ if (sectionTitle) {
693
+ if (section === 'dashboard') {
694
+ sectionTitle.textContent = currentLang === 'en' ? 'Dashboard' : 'لوحة التحكم';
695
+ } else if (section === 'inventory') {
696
+ sectionTitle.textContent = currentLang === 'en' ? 'Inventory' : 'المخزون';
697
+ }
698
+ // Add other sections as needed
699
+ }
700
+ });
701
+ });
702
+ });
703
+ </script>
704
+ <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=mih00/pharmacy" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
705
+ </html>