-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.html
More file actions
141 lines (111 loc) · 11.4 KB
/
Copy pathadmin.html
File metadata and controls
141 lines (111 loc) · 11.4 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
<!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"><div class="login-logo">K</div><h2>دخول الإدارة</h2><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>
<aside class="sidebar"><div class="brand"><span>K</span><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>
<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><button id="clearBookings" class="danger">حذف الكل</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" id="priceRegular" value="850">
</label>
<label>التنظيف العميق
<input type="number" id="priceDeep" value="1200">
</label>
<label>تنظيف ما بعد التشطيب
<input type="number" id="priceConstruction" value="1800">
</label>
<label>الفلل والمساحات الكبيرة
<input type="number" id="priceVillas" value="2500">
</label>
<label>الشركات والمكاتب
<input type="number" id="priceCompanies" value="1500">
</label>
<label>العيادات والمراكز الطبية
<input type="number" id="priceClinics" value="1500">
</label>
<h4>🛋️ المفروشات</h4>
<label>تنظيف الكنب
<input type="number" id="priceSofa" value="600">
</label>
<label>تنظيف المرتبة
<input type="number" id="priceMattress" value="350">
</label>
<h4>🧼 التعقيم والتطهير</h4>
<label>شقة صغيرة
<input type="number" id="priceDisinfectSmall" value="600">
</label>
<label>شقة متوسطة
<input type="number" id="priceDisinfectMedium" value="800">
</label>
<label>فيلا أو مساحة كبيرة
<input type="number" id="priceDisinfectLarge" value="1200">
</label>
<h4>🐜 مكافحة الحشرات والآفات</h4>
<label>النمل والحشرات الزاحفة
<input type="number" id="priceAnts" value="600">
</label>
<label>الصراصير
<input type="number" id="priceCockroaches" value="700">
</label>
<label>الحشرات الطائرة
<input type="number" id="priceFlying" value="700">
</label>
<label>القوارض
<input type="number" id="priceRodents" value="900">
</label>
<label>بق الفراش
<input type="number" id="priceBedbugs" value="1200">
</label>
<h4>📦 باقات كاملين</h4>
<label>الاقتصادية
<input type="number" id="priceEconomic" value="850">
</label>
<label>الشاملة
<input type="number" id="priceComplete" value="1200">
</label>
<label>اللمعان
<input type="number" id="priceShine" value="1600">
</label>
<label>الملكية
<input type="number" id="priceRoyal" value="2500">
</label>
<h4>📅 الاشتراكات الشهرية</h4>
<label>4 زيارات
<input type="number" id="priceMonthly4" value="3000">
</label>
<label>8 زيارات
<input type="number" id="priceMonthly8" value="5600">
</label>
<label>12 زيارة
<input type="number" id="priceMonthly12" value="7800">
</label>
<button type="button" class="primary" id="savePricesBtn">
💾 حفظ جميع الأسعار
</button>
</div>
</section>
</main>
<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="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
<script src="admin.js"></script>
</body></html>