Repository navigation
Expand file tree
/
Copy pathadmin.html
More file actions
144 lines (113 loc) · 12.8 KB
/
Copy pathadmin.html
File metadata and controls
144 lines (113 loc) · 12.8 KB
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
<!DOCTYPE html>
<html lang="ar" dir="rtl">
<head>
<meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>كاملين | نظام الإدارة</title>
<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=Cairo:wght@400;600;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="admin.css">
</head><body>
<div id="adminLogin" class="login-screen"><form id="adminLoginForm" class="login-box" autocomplete="off"><img class="login-logo" src="kamlin-logo.png" alt="كاملين"><h2>دخول الإدارة</h2><label class="sr-only" for="adminEmail">البريد الإلكتروني</label><input id="adminEmail" type="email" autocomplete="username" placeholder="البريد الإلكتروني" required><label class="sr-only" for="adminPassword">كلمة المرور</label><input id="adminPassword" type="password" placeholder="كلمة المرور" autocomplete="current-password" required><button class="primary login-submit" type="submit">دخول</button><div id="loginError" class="login-error" aria-live="polite"></div></form></div>
<div id="adminWorkspace" hidden inert><aside class="sidebar"><div class="brand"><img class="admin-logo" src="kamlin-logo.png" alt="كاملين"><div><b>كاملين</b><small>نظام الإدارة</small></div></div>
<button class="nav-link active" data-view="dashboard">📊 لوحة التحكم</button><button class="nav-link" data-view="bookings">📥 الطلبات</button><button class="nav-link" data-view="workers">👷 العمال</button><button class="nav-link" data-view="assignments">📋 التكليفات</button><button class="nav-link" data-view="attendance">🕒 الحضور</button><button class="nav-link" data-view="tools">🧰 تسليم الأدوات</button><button class="nav-link" data-view="customers">👥 العملاء</button><button class="nav-link" data-view="followups">🔄 المتابعات والضمان</button><button class="nav-link" data-view="contracts">📄 العقود والعروض</button><a class="nav-link" href="index.html">🌐 عرض الموقع</a><button class="nav-link" id="logoutBtn">🚪 خروج</button><button class="nav-link" data-view="prices">💰 الخدمات والأسعار</button></aside>
<main class="admin-main"><header class="admin-top"><div><h1>لوحة التحكم</h1><p>إدارة الطلبات والعمال والتكليفات والحضور والأدوات من مكان واحد</p></div><button class="primary" onclick="openNewBooking()">+ طلب جديد</button></header>
<div class="admin-feedback" id="adminFeedback" role="status" aria-live="polite"></div><div class="admin-actions"><button id="refreshData" class="secondary">تحديث البيانات</button><span id="syncTime"></span></div><section id="dashboard" class="view active"><div class="kpis"><div><span>إجمالي الطلبات</span><strong id="kpiTotal">0</strong></div><div><span>طلبات جديدة</span><strong id="kpiNew">0</strong></div><div><span>العمال</span><strong id="kpiWorkers">0</strong></div><div><span>متابعات قادمة</span><strong id="kpiFollow">0</strong></div></div><div class="grid-two"><div class="panel"><div class="panel-head"><h3>أحدث الطلبات</h3><button onclick="switchView('bookings')">عرض الكل</button></div><div id="latestBookings"></div></div><div class="panel"><h3>توزيع الحالات</h3><div id="statusSummary" class="status-summary"></div></div></div></section>
<section id="bookings" class="view"><div class="panel"><div class="panel-head wrap"><h3>طلبات العملاء</h3><div class="filters"><input id="searchInput" placeholder="بحث بالاسم أو الهاتف أو الخدمة"><select id="statusFilter"><option value="">كل الحالات</option><option>جديد</option><option>تم التواصل</option><option>معاينة</option><option>عرض سعر</option><option>مؤكد</option><option>قيد التنفيذ</option><option>مكتمل</option><option>ملغى</option></select><button id="exportBookings" class="secondary">تصدير CSV</button></div></div><div class="table-wrap"><table><thead><tr><th>التاريخ</th><th>العميل</th><th>الهاتف</th><th>الخدمة</th><th>المنطقة</th><th>الحالة</th><th>إجراء</th></tr></thead><tbody id="bookingRows"></tbody></table></div></div></section>
<section id="workers" class="view"><div class="panel"><div class="panel-head"><h3>العمال</h3><button class="primary" onclick="openWorker()">+ عامل جديد</button></div><div class="table-wrap"><table><thead><tr><th>الاسم</th><th>الهاتف</th><th>الوظيفة</th><th>الحالة</th><th>ملاحظات</th><th>إجراء</th></tr></thead><tbody id="workerRows"></tbody></table></div></div></section>
<section id="assignments" class="view"><div class="panel"><div class="panel-head"><h3>التكليفات</h3><button class="primary" onclick="openAssignment()">+ تكليف جديد</button></div><div class="table-wrap"><table><thead><tr><th>التاريخ</th><th>العامل</th><th>المهمة</th><th>الموقع</th><th>الحالة</th><th>إجراء</th></tr></thead><tbody id="assignmentRows"></tbody></table></div></div></section>
<section id="attendance" class="view"><div class="panel"><div class="panel-head"><h3>الحضور</h3><button class="primary" onclick="openAttendance()">+ تسجيل حضور</button></div><div class="table-wrap"><table><thead><tr><th>التاريخ</th><th>العامل</th><th>الحضور</th><th>الانصراف</th><th>ملاحظات</th><th>إجراء</th></tr></thead><tbody id="attendanceRows"></tbody></table></div></div></section>
<section id="tools" class="view"><div class="panel"><div class="panel-head"><h3>تسليم الأدوات</h3><button class="primary" onclick="openTool()">+ تسليم جديد</button></div><div class="table-wrap"><table><thead><tr><th>التاريخ</th><th>العامل</th><th>الأداة</th><th>الكمية</th><th>الحالة</th><th>إجراء</th></tr></thead><tbody id="toolRows"></tbody></table></div></div></section>
<section id="customers" class="view"><div class="panel"><h3>سجل العملاء</h3><div class="table-wrap"><table><thead><tr><th>العميل</th><th>الهاتف</th><th>عدد الطلبات</th><th>آخر خدمة</th><th>آخر حالة</th></tr></thead><tbody id="customerRows"></tbody></table></div></div></section>
<section id="followups" class="view"><div class="panel"><h3>المتابعات والضمانات</h3><div class="table-wrap"><table><thead><tr><th>العميل</th><th>الخدمة</th><th>موعد المتابعة</th><th>الضمان / الملاحظة</th><th>الحالة</th></tr></thead><tbody id="followRows"></tbody></table></div></div></section>
<section id="contracts" class="view"><div class="panel"><h3>العروض والعقود</h3><div class="table-wrap"><table><thead><tr><th>العميل</th><th>الخدمة</th><th>القيمة</th><th>الحالة</th><th>رقم الطلب</th></tr></thead><tbody id="contractRows"></tbody></table></div></div></section>
<section id="prices" class="view">
<div class="panel">
<h3>💰 الخدمات والأسعار</h3>
<h4>🏠 خدمات التنظيف</h4>
<label>التنظيف العادي
<input type="number" min="0" step="0.01" id="priceRegular" placeholder="غير محدد">
</label>
<label>التنظيف العميق
<input type="number" min="0" step="0.01" id="priceDeep" placeholder="غير محدد">
</label>
<label>تنظيف ما بعد التشطيب
<input type="number" min="0" step="0.01" id="priceConstruction" placeholder="غير محدد">
</label>
<label>الفلل والمساحات الكبيرة
<input type="number" min="0" step="0.01" id="priceVillas" placeholder="غير محدد">
</label>
<label>الشركات والمكاتب
<input type="number" min="0" step="0.01" id="priceCompanies" placeholder="غير محدد">
</label>
<label>العيادات والمراكز الطبية
<input type="number" min="0" step="0.01" id="priceClinics" placeholder="غير محدد">
</label>
<h4>🛋️ المفروشات</h4>
<label>تنظيف الكنب
<input type="number" min="0" step="0.01" id="priceSofa" placeholder="غير محدد">
</label>
<label>تنظيف المرتبة
<input type="number" min="0" step="0.01" id="priceMattress" placeholder="غير محدد">
</label>
<h4>🧼 التعقيم والتطهير</h4>
<label>شقة صغيرة
<input type="number" min="0" step="0.01" id="priceDisinfectSmall" placeholder="غير محدد">
</label>
<label>شقة متوسطة
<input type="number" min="0" step="0.01" id="priceDisinfectMedium" placeholder="غير محدد">
</label>
<label>فيلا أو مساحة كبيرة
<input type="number" min="0" step="0.01" id="priceDisinfectLarge" placeholder="غير محدد">
</label>
<h4>🐜 مكافحة الحشرات والآفات</h4>
<label>النمل والحشرات الزاحفة
<input type="number" min="0" step="0.01" id="priceAnts" placeholder="غير محدد">
</label>
<label>الصراصير
<input type="number" min="0" step="0.01" id="priceCockroaches" placeholder="غير محدد">
</label>
<label>الحشرات الطائرة
<input type="number" min="0" step="0.01" id="priceFlying" placeholder="غير محدد">
</label>
<label>القوارض
<input type="number" min="0" step="0.01" id="priceRodents" placeholder="غير محدد">
</label>
<label>بق الفراش
<input type="number" min="0" step="0.01" id="priceBedbugs" placeholder="غير محدد">
</label>
<h4>📦 باقات كاملين</h4>
<label>الاقتصادية
<input type="number" min="0" step="0.01" id="priceEconomic" placeholder="غير محدد">
</label>
<label>الشاملة
<input type="number" min="0" step="0.01" id="priceComplete" placeholder="غير محدد">
</label>
<label>اللمعان
<input type="number" min="0" step="0.01" id="priceShine" placeholder="غير محدد">
</label>
<label>الملكية
<input type="number" min="0" step="0.01" id="priceRoyal" placeholder="غير محدد">
</label>
<h4>📅 الاشتراكات الشهرية</h4>
<label>4 زيارات
<input type="number" min="0" step="0.01" id="priceMonthly4" placeholder="غير محدد">
</label>
<label>8 زيارات
<input type="number" min="0" step="0.01" id="priceMonthly8" placeholder="غير محدد">
</label>
<label>12 زيارة
<input type="number" min="0" step="0.01" id="priceMonthly12" placeholder="غير محدد">
</label>
<button type="button" class="primary" id="savePricesBtn">
💾 حفظ جميع الأسعار
</button>
</div>
</section>
</main></div>
<dialog id="bookingDialog"><form id="editForm"><div class="dialog-head"><h3 id="dialogTitle">طلب جديد</h3><button type="button" class="x" data-close="bookingDialog">×</button></div><input type="hidden" name="id"><div class="form-grid"><label>اسم العميل<input name="name" required></label><label>الهاتف<input name="phone" required></label><label>الخدمة<input name="service" required></label><label>المنطقة<input name="area"></label><label>الحالة<select name="status"><option>جديد</option><option>تم التواصل</option><option>معاينة</option><option>عرض سعر</option><option>مؤكد</option><option>قيد التنفيذ</option><option>مكتمل</option><option>ملغى</option></select></label><label>المسؤول<input name="assignedTo"></label><label>موعد المتابعة<input type="date" name="followUp"></label><label>قيمة العرض / العقد<input type="number" min="0" step="0.01" name="quote"></label><label class="wide">الضمان / خطة المتابعة<input name="warranty"></label><label class="wide">ملاحظات<textarea name="notes" rows="4"></textarea></label></div><div class="dialog-actions"><button type="button" class="secondary" data-close="bookingDialog">إلغاء</button><button class="primary" type="submit">حفظ</button></div></form></dialog>
<dialog id="genericDialog"><form id="genericForm"><div class="dialog-head"><h3 id="genericTitle"></h3><button type="button" class="x" data-close="genericDialog">×</button></div><div id="genericFields" class="form-grid"></div><div class="dialog-actions"><button type="button" class="secondary" data-close="genericDialog">إلغاء</button><button class="primary" type="submit">حفظ</button></div></form></dialog>
<script src="config.js"></script>
<script src="vendor/supabase.js"></script>
<script src="data.js"></script>
<script src="admin.js"></script>
</body></html>