Spaces:
Running
Running
Add 2 files
Browse files- index.html +434 -253
- prompts.txt +2 -0
index.html
CHANGED
|
@@ -85,28 +85,28 @@
|
|
| 85 |
|
| 86 |
<div class="flex-1 overflow-y-auto">
|
| 87 |
<nav class="p-2">
|
| 88 |
-
<a href="#" class="flex items-center p-3 rounded-lg bg-blue-700 mb-1"
|
| 89 |
<i class="fas fa-home"></i>
|
| 90 |
<span class="sidebar-text mr-3">الرئيسية</span>
|
| 91 |
</a>
|
| 92 |
-
<a href="#" class="flex items-center p-3 rounded-lg hover:bg-blue-700 mb-1"
|
| 93 |
<i class="fas fa-users"></i>
|
| 94 |
<span class="sidebar-text mr-3">إدارة العمال</span>
|
| 95 |
</a>
|
| 96 |
-
<a href="#" class="flex items-center p-3 rounded-lg hover:bg-blue-700 mb-1"
|
| 97 |
<i class="fas fa-file-alt"></i>
|
| 98 |
<span class="sidebar-text mr-3">المستندات</span>
|
| 99 |
</a>
|
| 100 |
-
<a href="#" class="flex items-center p-3 rounded-lg hover:bg-blue-700 mb-1 relative"
|
| 101 |
<i class="fas fa-bell"></i>
|
| 102 |
<span class="sidebar-text mr-3">التنبيهات</span>
|
| 103 |
-
<span class="notification-badge rounded-full h-5 w-5 flex items-center justify-center" id="notificationCount">
|
| 104 |
</a>
|
| 105 |
-
<a href="#" class="flex items-center p-3 rounded-lg hover:bg-blue-700 mb-1"
|
| 106 |
<i class="fas fa-chart-bar"></i>
|
| 107 |
<span class="sidebar-text mr-3">التقارير</span>
|
| 108 |
</a>
|
| 109 |
-
<a href="#" class="flex items-center p-3 rounded-lg hover:bg-blue-700 mb-1"
|
| 110 |
<i class="fas fa-cog"></i>
|
| 111 |
<span class="sidebar-text mr-3">الإعدادات</span>
|
| 112 |
</a>
|
|
@@ -139,7 +139,7 @@
|
|
| 139 |
|
| 140 |
<button class="text-gray-600 hover:text-gray-800 relative" id="notificationButton">
|
| 141 |
<i class="fas fa-bell text-xl"></i>
|
| 142 |
-
<span class="notification-badge rounded-full h-5 w-5 flex items-center justify-center" id="mobileNotificationCount">
|
| 143 |
</button>
|
| 144 |
|
| 145 |
<div class="h-8 w-8 rounded-full bg-blue-100 flex items-center justify-center">
|
|
@@ -210,7 +210,7 @@
|
|
| 210 |
</div>
|
| 211 |
|
| 212 |
<div class="space-y-3" id="recentAlerts">
|
| 213 |
-
<!-- Alerts will be
|
| 214 |
</div>
|
| 215 |
</div>
|
| 216 |
|
|
@@ -230,7 +230,7 @@
|
|
| 230 |
</tr>
|
| 231 |
</thead>
|
| 232 |
<tbody class="bg-white divide-y divide-gray-200" id="recentWorkersTable">
|
| 233 |
-
<!--
|
| 234 |
</tbody>
|
| 235 |
</table>
|
| 236 |
</div>
|
|
@@ -278,7 +278,7 @@
|
|
| 278 |
</tr>
|
| 279 |
</thead>
|
| 280 |
<tbody class="bg-white divide-y divide-gray-200" id="workersTable">
|
| 281 |
-
<!-- Workers will be
|
| 282 |
</tbody>
|
| 283 |
</table>
|
| 284 |
</div>
|
|
@@ -414,17 +414,17 @@
|
|
| 414 |
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
| 415 |
<div>
|
| 416 |
<label for="residenceNumber" class="block text-gray-700 mb-2">رقم إقامة العمل</label>
|
| 417 |
-
<input type="text" id="
|
| 418 |
</div>
|
| 419 |
|
| 420 |
<div>
|
| 421 |
<label for="residenceIssueDate" class="block text-gray-700 mb-2">تاريخ إصدار الإقامة</label>
|
| 422 |
-
<input type="date" id="
|
| 423 |
</div>
|
| 424 |
|
| 425 |
<div>
|
| 426 |
<label for="residenceExpiryDate" class="block text-gray-700 mb-2">تاريخ انتهاء الإقامة</label>
|
| 427 |
-
<input type="date" id="
|
| 428 |
</div>
|
| 429 |
|
| 430 |
<div class="md:col-span-3">
|
|
@@ -450,27 +450,27 @@
|
|
| 450 |
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
| 451 |
<div>
|
| 452 |
<label for="workCardNumber" class="block text-gray-700 mb-2">رقم بطاقة العمل</label>
|
| 453 |
-
<input type="text" id="
|
| 454 |
</div>
|
| 455 |
|
| 456 |
<div>
|
| 457 |
<label for="workCardIssueDate" class="block text-gray-700 mb-2">تاريخ إصدار بطاقة العمل</label>
|
| 458 |
-
<input type="date" id="
|
| 459 |
</div>
|
| 460 |
|
| 461 |
<div>
|
| 462 |
<label for="workCardExpiryDate" class="block text-gray-700 mb-2">تاريخ انتهاء بطاقة العمل</label>
|
| 463 |
-
<input type="date" id="
|
| 464 |
</div>
|
| 465 |
|
| 466 |
<div>
|
| 467 |
<label for="arrivalAirport" class="block text-gray-700 mb-2">مطار الوصول</label>
|
| 468 |
-
<input type="text" id="
|
| 469 |
</div>
|
| 470 |
|
| 471 |
<div>
|
| 472 |
<label for="workType" class="block text-gray-700 mb-2">آلية العمل</label>
|
| 473 |
-
<select id="
|
| 474 |
<option value="">اختر آلية العمل</option>
|
| 475 |
<option value="دوام كامل">دوام كامل</option>
|
| 476 |
<option value="دوام جزئي">دوام جزئي</option>
|
|
@@ -588,7 +588,7 @@
|
|
| 588 |
</tr>
|
| 589 |
</thead>
|
| 590 |
<tbody class="bg-white divide-y divide-gray-200" id="documentsTable">
|
| 591 |
-
<!-- Documents will be
|
| 592 |
</tbody>
|
| 593 |
</table>
|
| 594 |
</div>
|
|
@@ -641,7 +641,7 @@
|
|
| 641 |
</div>
|
| 642 |
|
| 643 |
<div class="space-y-3" id="notificationsList">
|
| 644 |
-
<!-- Notifications will be
|
| 645 |
</div>
|
| 646 |
|
| 647 |
<div class="flex items-center justify-between mt-4">
|
|
@@ -675,15 +675,15 @@
|
|
| 675 |
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
|
| 676 |
<div class="bg-white p-6 rounded-lg shadow-md">
|
| 677 |
<h3 class="text-lg font-semibold mb-4 text-gray-700">توزيع العمال حسب الجنسية</h3>
|
| 678 |
-
<div class="h-64" id="nationalityChart">
|
| 679 |
-
<!-- Chart will be
|
| 680 |
</div>
|
| 681 |
</div>
|
| 682 |
|
| 683 |
<div class="bg-white p-6 rounded-lg shadow-md">
|
| 684 |
<h3 class="text-lg font-semibold mb-4 text-gray-700">حالة الوثائق</h3>
|
| 685 |
-
<div class="h-64" id="documentsStatusChart">
|
| 686 |
-
<!-- Chart will be
|
| 687 |
</div>
|
| 688 |
</div>
|
| 689 |
</div>
|
|
@@ -704,7 +704,7 @@
|
|
| 704 |
</tr>
|
| 705 |
</thead>
|
| 706 |
<tbody class="bg-white divide-y divide-gray-200" id="expiringDocumentsTable">
|
| 707 |
-
<!-- Expiring documents will be
|
| 708 |
</tbody>
|
| 709 |
</table>
|
| 710 |
</div>
|
|
@@ -738,10 +738,6 @@
|
|
| 738 |
</div>
|
| 739 |
</div>
|
| 740 |
</div>
|
| 741 |
-
|
| 742 |
-
<div class="h-96" id="expiryTrendsChart">
|
| 743 |
-
<!-- Chart will be rendered here -->
|
| 744 |
-
</div>
|
| 745 |
</div>
|
| 746 |
</div>
|
| 747 |
|
|
@@ -754,22 +750,22 @@
|
|
| 754 |
<div class="bg-white rounded-lg shadow-md p-6 mb-6">
|
| 755 |
<h3 class="text-lg font-semibold mb-4 text-gray-700 border-b pb-2">إعدادات التنبيهات</h3>
|
| 756 |
|
| 757 |
-
<form id="
|
| 758 |
<div class="space-y-4">
|
| 759 |
<div>
|
| 760 |
-
<label class="block text-gray-700 mb-2">
|
| 761 |
-
<div class="grid grid-cols-1 md:grid-cols-3 gap-
|
| 762 |
<div>
|
| 763 |
-
<label for="passportAlertDays" class="block text-gray-
|
| 764 |
-
<input type="number" id="passportAlertDays" class="w-full border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-blue-500" value="30"
|
| 765 |
</div>
|
| 766 |
<div>
|
| 767 |
-
<label for="residenceAlertDays" class="block text-gray-
|
| 768 |
-
<input type="number" id="residenceAlertDays" class="w-full border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-blue-500" value="30"
|
| 769 |
</div>
|
| 770 |
<div>
|
| 771 |
-
<label for="workCardAlertDays" class="block text-gray-
|
| 772 |
-
<input type="number" id="workCardAlertDays" class="w-full border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-blue-500" value="30"
|
| 773 |
</div>
|
| 774 |
</div>
|
| 775 |
</div>
|
|
@@ -778,16 +774,16 @@
|
|
| 778 |
<label class="block text-gray-700 mb-2">طرق إرسال التنبيهات</label>
|
| 779 |
<div class="space-y-2">
|
| 780 |
<div class="flex items-center">
|
| 781 |
-
<input type="checkbox" id="
|
| 782 |
-
<label for="
|
| 783 |
</div>
|
| 784 |
<div class="flex items-center">
|
| 785 |
-
<input type="checkbox" id="
|
| 786 |
-
<label for="
|
| 787 |
</div>
|
| 788 |
<div class="flex items-center">
|
| 789 |
-
<input type="checkbox" id="
|
| 790 |
-
<label for="
|
| 791 |
</div>
|
| 792 |
</div>
|
| 793 |
</div>
|
|
@@ -807,25 +803,41 @@
|
|
| 807 |
</div>
|
| 808 |
|
| 809 |
<div class="bg-white rounded-lg shadow-md p-6">
|
| 810 |
-
<h3 class="text-lg font-semibold mb-4 text-gray-700 border-b pb-2">نسخ احتياطي للنظام</h3>
|
| 811 |
|
| 812 |
-
<div class="
|
| 813 |
-
<div class="
|
| 814 |
-
<
|
| 815 |
-
|
| 816 |
-
|
| 817 |
-
إنشاء نسخة احتياطية
|
| 818 |
</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 819 |
</div>
|
| 820 |
|
| 821 |
-
<div class="
|
| 822 |
-
<
|
| 823 |
-
<
|
| 824 |
-
|
| 825 |
-
|
| 826 |
-
|
| 827 |
-
|
| 828 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 829 |
</div>
|
| 830 |
</div>
|
| 831 |
</div>
|
|
@@ -834,215 +846,384 @@
|
|
| 834 |
</main>
|
| 835 |
</div>
|
| 836 |
</div>
|
| 837 |
-
|
| 838 |
-
<!--
|
| 839 |
-
<div id="
|
| 840 |
-
<div class="bg-white rounded-lg shadow-xl w-full max-w-4xl max-h-screen overflow-auto">
|
| 841 |
-
<div class="p-
|
| 842 |
-
<
|
| 843 |
-
|
| 844 |
-
<
|
| 845 |
-
|
| 846 |
-
|
| 847 |
-
|
| 848 |
-
|
| 849 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 850 |
</div>
|
| 851 |
-
|
| 852 |
-
|
| 853 |
-
|
| 854 |
-
|
| 855 |
-
|
| 856 |
-
|
| 857 |
-
|
| 858 |
-
|
| 859 |
-
|
| 860 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 861 |
</div>
|
| 862 |
</div>
|
| 863 |
</div>
|
| 864 |
-
|
| 865 |
<!-- Confirmation Modal -->
|
| 866 |
-
<div id="confirmationModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center
|
| 867 |
<div class="bg-white rounded-lg shadow-xl w-full max-w-md">
|
| 868 |
-
<div class="p-
|
| 869 |
-
<
|
| 870 |
-
|
| 871 |
-
|
| 872 |
-
|
| 873 |
-
|
| 874 |
-
|
| 875 |
-
|
| 876 |
-
|
| 877 |
-
|
| 878 |
-
|
| 879 |
-
|
| 880 |
-
|
| 881 |
-
|
| 882 |
-
|
|
|
|
|
|
|
|
|
|
| 883 |
</div>
|
| 884 |
</div>
|
| 885 |
</div>
|
| 886 |
-
|
| 887 |
-
<!--
|
| 888 |
-
<div id="
|
| 889 |
-
<div class="bg-white rounded-lg shadow-xl
|
| 890 |
-
<div class="
|
| 891 |
-
|
| 892 |
-
<button id="closeWorkerDetails" class="text-gray-500 hover:text-gray-700">
|
| 893 |
-
<i class="fas fa-times"></i>
|
| 894 |
-
</button>
|
| 895 |
-
</div>
|
| 896 |
-
|
| 897 |
-
<div class="p-4" id="workerDetailsContent">
|
| 898 |
-
<!-- Worker details will be shown here -->
|
| 899 |
-
</div>
|
| 900 |
-
|
| 901 |
-
<div class="p-4 border-t border-gray-200 flex justify-end sticky bottom-0 bg-white">
|
| 902 |
-
<button class="bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-lg" id="editWorkerBtn">
|
| 903 |
-
<i class="fas fa-edit ml-2"></i>
|
| 904 |
-
تعديل
|
| 905 |
-
</button>
|
| 906 |
-
</div>
|
| 907 |
</div>
|
| 908 |
</div>
|
| 909 |
-
|
| 910 |
<!-- Success Toast -->
|
| 911 |
-
<div id="successToast" class="fixed
|
| 912 |
<i class="fas fa-check-circle mr-2"></i>
|
| 913 |
-
<span id="
|
| 914 |
</div>
|
| 915 |
-
|
| 916 |
<!-- Error Toast -->
|
| 917 |
-
<div id="errorToast" class="fixed
|
| 918 |
<i class="fas fa-exclamation-circle mr-2"></i>
|
| 919 |
-
<span id="
|
| 920 |
</div>
|
| 921 |
-
|
|
|
|
| 922 |
<script>
|
| 923 |
-
// Database
|
| 924 |
-
const
|
| 925 |
-
|
| 926 |
-
|
| 927 |
-
|
| 928 |
-
|
| 929 |
-
|
| 930 |
-
|
| 931 |
-
|
| 932 |
-
|
| 933 |
-
|
| 934 |
-
|
| 935 |
-
|
| 936 |
-
|
| 937 |
-
|
| 938 |
-
|
| 939 |
-
|
| 940 |
-
|
| 941 |
-
|
| 942 |
-
|
| 943 |
-
|
| 944 |
-
|
| 945 |
-
|
| 946 |
-
|
| 947 |
-
|
| 948 |
-
|
| 949 |
-
|
| 950 |
-
|
| 951 |
-
|
| 952 |
-
|
| 953 |
-
|
| 954 |
-
|
| 955 |
-
|
| 956 |
-
|
| 957 |
-
|
| 958 |
-
|
| 959 |
-
|
| 960 |
-
|
| 961 |
-
|
| 962 |
-
|
| 963 |
-
|
| 964 |
-
|
| 965 |
-
|
| 966 |
-
|
| 967 |
-
|
| 968 |
-
|
| 969 |
-
|
| 970 |
-
|
| 971 |
-
|
| 972 |
-
|
| 973 |
-
|
| 974 |
-
|
| 975 |
-
|
| 976 |
-
|
| 977 |
-
|
| 978 |
-
|
| 979 |
-
|
| 980 |
-
|
| 981 |
-
|
| 982 |
-
|
| 983 |
-
|
| 984 |
-
|
| 985 |
-
|
| 986 |
-
|
| 987 |
-
|
| 988 |
-
|
| 989 |
-
|
| 990 |
-
|
| 991 |
-
|
| 992 |
-
|
| 993 |
-
|
| 994 |
-
|
| 995 |
-
|
| 996 |
-
|
| 997 |
-
|
| 998 |
-
|
| 999 |
-
|
| 1000 |
-
|
| 1001 |
-
|
| 1002 |
-
|
| 1003 |
-
|
| 1004 |
-
|
| 1005 |
-
|
| 1006 |
-
|
| 1007 |
-
|
| 1008 |
-
|
| 1009 |
-
|
| 1010 |
-
|
| 1011 |
-
|
| 1012 |
-
|
| 1013 |
-
|
| 1014 |
-
|
| 1015 |
-
|
| 1016 |
-
|
| 1017 |
-
|
| 1018 |
-
|
| 1019 |
-
|
| 1020 |
-
|
| 1021 |
-
|
| 1022 |
-
|
| 1023 |
-
|
| 1024 |
-
|
| 1025 |
-
|
| 1026 |
-
|
| 1027 |
-
|
| 1028 |
-
|
| 1029 |
-
|
| 1030 |
-
|
| 1031 |
-
|
| 1032 |
-
|
| 1033 |
-
|
| 1034 |
-
|
| 1035 |
-
|
| 1036 |
-
|
| 1037 |
-
|
| 1038 |
-
|
| 1039 |
-
|
| 1040 |
-
|
| 1041 |
-
|
| 1042 |
-
|
| 1043 |
-
|
| 1044 |
-
|
| 1045 |
-
|
| 1046 |
-
|
| 1047 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1048 |
</html>
|
|
|
|
| 85 |
|
| 86 |
<div class="flex-1 overflow-y-auto">
|
| 87 |
<nav class="p-2">
|
| 88 |
+
<a href="#" class="flex items-center p-3 rounded-lg bg-blue-700 mb-1 sidebar-link" data-section="dashboardSection">
|
| 89 |
<i class="fas fa-home"></i>
|
| 90 |
<span class="sidebar-text mr-3">الرئيسية</span>
|
| 91 |
</a>
|
| 92 |
+
<a href="#" class="flex items-center p-3 rounded-lg hover:bg-blue-700 mb-1 sidebar-link" data-section="workersSection">
|
| 93 |
<i class="fas fa-users"></i>
|
| 94 |
<span class="sidebar-text mr-3">إدارة العمال</span>
|
| 95 |
</a>
|
| 96 |
+
<a href="#" class="flex items-center p-3 rounded-lg hover:bg-blue-700 mb-1 sidebar-link" data-section="documentsSection">
|
| 97 |
<i class="fas fa-file-alt"></i>
|
| 98 |
<span class="sidebar-text mr-3">المستندات</span>
|
| 99 |
</a>
|
| 100 |
+
<a href="#" class="flex items-center p-3 rounded-lg hover:bg-blue-700 mb-1 sidebar-link relative" data-section="notificationsSection">
|
| 101 |
<i class="fas fa-bell"></i>
|
| 102 |
<span class="sidebar-text mr-3">التنبيهات</span>
|
| 103 |
+
<span class="notification-badge rounded-full h-5 w-5 flex items-center justify-center" id="notificationCount">3</span>
|
| 104 |
</a>
|
| 105 |
+
<a href="#" class="flex items-center p-3 rounded-lg hover:bg-blue-700 mb-1 sidebar-link" data-section="reportsSection">
|
| 106 |
<i class="fas fa-chart-bar"></i>
|
| 107 |
<span class="sidebar-text mr-3">التقارير</span>
|
| 108 |
</a>
|
| 109 |
+
<a href="#" class="flex items-center p-3 rounded-lg hover:bg-blue-700 mb-1 sidebar-link" data-section="settingsSection">
|
| 110 |
<i class="fas fa-cog"></i>
|
| 111 |
<span class="sidebar-text mr-3">الإعدادات</span>
|
| 112 |
</a>
|
|
|
|
| 139 |
|
| 140 |
<button class="text-gray-600 hover:text-gray-800 relative" id="notificationButton">
|
| 141 |
<i class="fas fa-bell text-xl"></i>
|
| 142 |
+
<span class="notification-badge rounded-full h-5 w-5 flex items-center justify-center" id="mobileNotificationCount">3</span>
|
| 143 |
</button>
|
| 144 |
|
| 145 |
<div class="h-8 w-8 rounded-full bg-blue-100 flex items-center justify-center">
|
|
|
|
| 210 |
</div>
|
| 211 |
|
| 212 |
<div class="space-y-3" id="recentAlerts">
|
| 213 |
+
<!-- Alerts will be loaded here via AJAX -->
|
| 214 |
</div>
|
| 215 |
</div>
|
| 216 |
|
|
|
|
| 230 |
</tr>
|
| 231 |
</thead>
|
| 232 |
<tbody class="bg-white divide-y divide-gray-200" id="recentWorkersTable">
|
| 233 |
+
<!-- Recent workers will be loaded here via AJAX -->
|
| 234 |
</tbody>
|
| 235 |
</table>
|
| 236 |
</div>
|
|
|
|
| 278 |
</tr>
|
| 279 |
</thead>
|
| 280 |
<tbody class="bg-white divide-y divide-gray-200" id="workersTable">
|
| 281 |
+
<!-- Workers will be loaded here via AJAX -->
|
| 282 |
</tbody>
|
| 283 |
</table>
|
| 284 |
</div>
|
|
|
|
| 414 |
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
| 415 |
<div>
|
| 416 |
<label for="residenceNumber" class="block text-gray-700 mb-2">رقم إقامة العمل</label>
|
| 417 |
+
<input type="text" id="workerResidenceNumber" class="w-full border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-blue-500" required>
|
| 418 |
</div>
|
| 419 |
|
| 420 |
<div>
|
| 421 |
<label for="residenceIssueDate" class="block text-gray-700 mb-2">تاريخ إصدار الإقامة</label>
|
| 422 |
+
<input type="date" id="workerResidenceIssueDate" class="w-full border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-blue-500" required>
|
| 423 |
</div>
|
| 424 |
|
| 425 |
<div>
|
| 426 |
<label for="residenceExpiryDate" class="block text-gray-700 mb-2">تاريخ انتهاء الإقامة</label>
|
| 427 |
+
<input type="date" id="workerResidenceExpiryDate" class="w-full border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-blue-500" required>
|
| 428 |
</div>
|
| 429 |
|
| 430 |
<div class="md:col-span-3">
|
|
|
|
| 450 |
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
| 451 |
<div>
|
| 452 |
<label for="workCardNumber" class="block text-gray-700 mb-2">رقم بطاقة العمل</label>
|
| 453 |
+
<input type="text" id="workerWorkCardNumber" class="w-full border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-blue-500" required>
|
| 454 |
</div>
|
| 455 |
|
| 456 |
<div>
|
| 457 |
<label for="workCardIssueDate" class="block text-gray-700 mb-2">تاريخ إصدار بطاقة العمل</label>
|
| 458 |
+
<input type="date" id="workerWorkCardIssueDate" class="w-full border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-blue-500" required>
|
| 459 |
</div>
|
| 460 |
|
| 461 |
<div>
|
| 462 |
<label for="workCardExpiryDate" class="block text-gray-700 mb-2">تاريخ انتهاء بطاقة العمل</label>
|
| 463 |
+
<input type="date" id="workerWorkCardExpiryDate" class="w-full border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-blue-500" required>
|
| 464 |
</div>
|
| 465 |
|
| 466 |
<div>
|
| 467 |
<label for="arrivalAirport" class="block text-gray-700 mb-2">مطار الوصول</label>
|
| 468 |
+
<input type="text" id="workerArrivalAirport" class="w-full border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
| 469 |
</div>
|
| 470 |
|
| 471 |
<div>
|
| 472 |
<label for="workType" class="block text-gray-700 mb-2">آلية العمل</label>
|
| 473 |
+
<select id="workerWorkType" class="w-full border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
| 474 |
<option value="">اختر آلية العمل</option>
|
| 475 |
<option value="دوام كامل">دوام كامل</option>
|
| 476 |
<option value="دوام جزئي">دوام جزئي</option>
|
|
|
|
| 588 |
</tr>
|
| 589 |
</thead>
|
| 590 |
<tbody class="bg-white divide-y divide-gray-200" id="documentsTable">
|
| 591 |
+
<!-- Documents will be loaded here via AJAX -->
|
| 592 |
</tbody>
|
| 593 |
</table>
|
| 594 |
</div>
|
|
|
|
| 641 |
</div>
|
| 642 |
|
| 643 |
<div class="space-y-3" id="notificationsList">
|
| 644 |
+
<!-- Notifications will be loaded here via AJAX -->
|
| 645 |
</div>
|
| 646 |
|
| 647 |
<div class="flex items-center justify-between mt-4">
|
|
|
|
| 675 |
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
|
| 676 |
<div class="bg-white p-6 rounded-lg shadow-md">
|
| 677 |
<h3 class="text-lg font-semibold mb-4 text-gray-700">توزيع العمال حسب الجنسية</h3>
|
| 678 |
+
<div class="h-64 flex items-center justify-center" id="nationalityChart">
|
| 679 |
+
<!-- Chart will be loaded here via AJAX -->
|
| 680 |
</div>
|
| 681 |
</div>
|
| 682 |
|
| 683 |
<div class="bg-white p-6 rounded-lg shadow-md">
|
| 684 |
<h3 class="text-lg font-semibold mb-4 text-gray-700">حالة الوثائق</h3>
|
| 685 |
+
<div class="h-64 flex items-center justify-center" id="documentsStatusChart">
|
| 686 |
+
<!-- Chart will be loaded here via AJAX -->
|
| 687 |
</div>
|
| 688 |
</div>
|
| 689 |
</div>
|
|
|
|
| 704 |
</tr>
|
| 705 |
</thead>
|
| 706 |
<tbody class="bg-white divide-y divide-gray-200" id="expiringDocumentsTable">
|
| 707 |
+
<!-- Expiring documents will be loaded here via AJAX -->
|
| 708 |
</tbody>
|
| 709 |
</table>
|
| 710 |
</div>
|
|
|
|
| 738 |
</div>
|
| 739 |
</div>
|
| 740 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 741 |
</div>
|
| 742 |
</div>
|
| 743 |
|
|
|
|
| 750 |
<div class="bg-white rounded-lg shadow-md p-6 mb-6">
|
| 751 |
<h3 class="text-lg font-semibold mb-4 text-gray-700 border-b pb-2">إعدادات التنبيهات</h3>
|
| 752 |
|
| 753 |
+
<form id="alertSettingsForm">
|
| 754 |
<div class="space-y-4">
|
| 755 |
<div>
|
| 756 |
+
<label class="block text-gray-700 mb-2">إعدادات التنبيه قبل انتهاء الوثائق</label>
|
| 757 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
| 758 |
<div>
|
| 759 |
+
<label for="passportAlertDays" class="block text-gray-700 mb-1">جواز السفر (أيام)</label>
|
| 760 |
+
<input type="number" id="passportAlertDays" class="w-full border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-blue-500" value="30">
|
| 761 |
</div>
|
| 762 |
<div>
|
| 763 |
+
<label for="residenceAlertDays" class="block text-gray-700 mb-1">إقامة العمل (أيام)</label>
|
| 764 |
+
<input type="number" id="residenceAlertDays" class="w-full border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-blue-500" value="30">
|
| 765 |
</div>
|
| 766 |
<div>
|
| 767 |
+
<label for="workCardAlertDays" class="block text-gray-700 mb-1">بطاقة العمل (أيام)</label>
|
| 768 |
+
<input type="number" id="workCardAlertDays" class="w-full border border-gray-300 rounded-lg py-2 px-4 focus:outline-none focus:ring-2 focus:ring-blue-500" value="30">
|
| 769 |
</div>
|
| 770 |
</div>
|
| 771 |
</div>
|
|
|
|
| 774 |
<label class="block text-gray-700 mb-2">طرق إرسال التنبيهات</label>
|
| 775 |
<div class="space-y-2">
|
| 776 |
<div class="flex items-center">
|
| 777 |
+
<input type="checkbox" id="systemEmailAlert" class="h-5 w-5 text-blue-600 focus:ring-blue-500 border-gray-300 rounded" checked>
|
| 778 |
+
<label for="systemEmailAlert" class="mr-2 block text-gray-700">البريد الإلكتروني</label>
|
| 779 |
</div>
|
| 780 |
<div class="flex items-center">
|
| 781 |
+
<input type="checkbox" id="systemSmsAlert" class="h-5 w-5 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
|
| 782 |
+
<label for="systemSmsAlert" class="mr-2 block text-gray-700">رسالة SMS</label>
|
| 783 |
</div>
|
| 784 |
<div class="flex items-center">
|
| 785 |
+
<input type="checkbox" id="systemAppAlert" class="h-5 w-5 text-blue-600 focus:ring-blue-500 border-gray-300 rounded" checked>
|
| 786 |
+
<label for="systemAppAlert" class="mr-2 block text-gray-700">إشعار داخل التطبيق</label>
|
| 787 |
</div>
|
| 788 |
</div>
|
| 789 |
</div>
|
|
|
|
| 803 |
</div>
|
| 804 |
|
| 805 |
<div class="bg-white rounded-lg shadow-md p-6">
|
| 806 |
+
<h3 class="text-lg font-semibold mb-4 text-gray-700 border-b pb-2">نسخة احتياطية للنظام</h3>
|
| 807 |
|
| 808 |
+
<div class="space-y-4">
|
| 809 |
+
<div class="flex flex-col md:flex-row md:items-center md:space-x-4 space-y-4 md:space-y-0">
|
| 810 |
+
<button class="bg-green-600 hover:bg-green-700 text-white py-2 px-4 rounded-lg flex items-center justify-center" id="createBackupBtn">
|
| 811 |
+
<i class="fas fa-database ml-2"></i>
|
| 812 |
+
<span>إنشاء نسخة احتياطية</span>
|
|
|
|
| 813 |
</button>
|
| 814 |
+
|
| 815 |
+
<div class="file-upload flex-1">
|
| 816 |
+
<label for="restoreBackup" class="file-upload-label border-2 border-dashed border-gray-300 rounded-lg p-4 flex flex-col items-center justify-center">
|
| 817 |
+
<i class="fas fa-upload text-3xl text-gray-400 mb-2"></i>
|
| 818 |
+
<span class="text-gray-500">استعادة نسخة احتياطية</span>
|
| 819 |
+
<span class="text-sm text-gray-400">(SQL, ZIP)</span>
|
| 820 |
+
<input type="file" id="restoreBackup" accept=".sql,.zip">
|
| 821 |
+
</label>
|
| 822 |
+
</div>
|
| 823 |
</div>
|
| 824 |
|
| 825 |
+
<div class="pt-4 border-t border-gray-200">
|
| 826 |
+
<h4 class="text-md font-medium text-gray-700 mb-2">النسخ الاحتياطية المتاحة</h4>
|
| 827 |
+
<div class="overflow-x-auto">
|
| 828 |
+
<table class="min-w-full divide-y divide-gray-200">
|
| 829 |
+
<thead class="bg-gray-50">
|
| 830 |
+
<tr>
|
| 831 |
+
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">اسم الملف</th>
|
| 832 |
+
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">حجم الملف</th>
|
| 833 |
+
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">تاريخ الإنشاء</th>
|
| 834 |
+
<th class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">إجراءات</th>
|
| 835 |
+
</tr>
|
| 836 |
+
</thead>
|
| 837 |
+
<tbody class="bg-white divide-y divide-gray-200" id="backupFilesTable">
|
| 838 |
+
<!-- Backup files will be loaded here via AJAX -->
|
| 839 |
+
</tbody>
|
| 840 |
+
</table>
|
| 841 |
</div>
|
| 842 |
</div>
|
| 843 |
</div>
|
|
|
|
| 846 |
</main>
|
| 847 |
</div>
|
| 848 |
</div>
|
| 849 |
+
|
| 850 |
+
<!-- View Worker Modal -->
|
| 851 |
+
<div id="viewWorkerModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
| 852 |
+
<div class="bg-white rounded-lg shadow-xl w-full max-w-4xl max-h-screen overflow-y-auto">
|
| 853 |
+
<div class="p-6">
|
| 854 |
+
<div class="flex justify-between items-center mb-4">
|
| 855 |
+
<h3 class="text-xl font-bold text-gray-800" id="viewWorkerName">عرض بيانات العامل</h3>
|
| 856 |
+
<button id="closeViewWorkerModal" class="text-gray-500 hover:text-gray-700">
|
| 857 |
+
<i class="fas fa-times"></i>
|
| 858 |
+
</button>
|
| 859 |
+
</div>
|
| 860 |
+
|
| 861 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-6">
|
| 862 |
+
<div class="col-span-1 flex flex-col items-center">
|
| 863 |
+
<img id="viewWorkerPhoto" src="https://via.placeholder.com/200" alt="Worker Photo" class="worker-photo rounded-lg mb-4">
|
| 864 |
+
<div class="w-full bg-gray-100 p-4 rounded-lg">
|
| 865 |
+
<h4 class="font-medium text-gray-700 mb-2">معلومات الاتصال</h4>
|
| 866 |
+
<p class="text-sm" id="viewWorkerPhone">الهاتف: </p>
|
| 867 |
+
<p class="text-sm" id="viewWorkerEmail">البريد الإلكتروني: </p>
|
| 868 |
+
<p class="text-sm" id="viewWorkerAddress">العنوان: </p>
|
| 869 |
+
</div>
|
| 870 |
+
</div>
|
| 871 |
+
|
| 872 |
+
<div class="col-span-2">
|
| 873 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
|
| 874 |
+
<div class="bg-gray-100 p-4 rounded-lg">
|
| 875 |
+
<h4 class="font-medium text-gray-700 mb-2">البيانات الشخصية</h4>
|
| 876 |
+
<p class="text-sm" id="viewWorkerNationality">الجنسية: </p>
|
| 877 |
+
<p class="text-sm" id="viewWorkerBirthDate">تاريخ الميلاد: </p>
|
| 878 |
+
</div>
|
| 879 |
+
|
| 880 |
+
<div class="bg-gray-100 p-4 rounded-lg">
|
| 881 |
+
<h4 class="font-medium text-gray-700 mb-2">بيانات العمل</h4>
|
| 882 |
+
<p class="text-sm" id="viewWorkerWorkType">آلية العمل: </p>
|
| 883 |
+
<p class="text-sm" id="viewWorkerArrivalAirport">مطار الوصول: </p>
|
| 884 |
+
</div>
|
| 885 |
+
</div>
|
| 886 |
+
|
| 887 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
|
| 888 |
+
<div class="bg-blue-50 p-4 rounded-lg">
|
| 889 |
+
<h4 class="font-medium text-blue-700 mb-2">جواز السفر</h4>
|
| 890 |
+
<p class="text-sm" id="viewWorkerPassportNumber">الرقم: </p>
|
| 891 |
+
<p class="text-sm" id="viewWorkerPassportIssueDate">تاريخ الإصدار: </p>
|
| 892 |
+
<p class="text-sm" id="viewWorkerPassportExpiryDate">تاريخ الانتهاء: </p>
|
| 893 |
+
<p class="text-sm font-medium" id="viewWorkerPassportStatus">الحالة: </p>
|
| 894 |
+
</div>
|
| 895 |
+
|
| 896 |
+
<div class="bg-yellow-50 p-4 rounded-lg">
|
| 897 |
+
<h4 class="font-medium text-yellow-700 mb-2">إقامة العمل</h4>
|
| 898 |
+
<p class="text-sm" id="viewWorkerResidenceNumber">الرقم: </p>
|
| 899 |
+
<p class="text-sm" id="viewWorkerResidenceIssueDate">تاريخ الإصدار: </p>
|
| 900 |
+
<p class="text-sm" id="viewWorkerResidenceExpiryDate">تاريخ الانتهاء: </p>
|
| 901 |
+
<p class="text-sm font-medium" id="viewWorkerResidenceStatus">الحالة: </p>
|
| 902 |
+
</div>
|
| 903 |
+
|
| 904 |
+
<div class="bg-purple-50 p-4 rounded-lg">
|
| 905 |
+
<h4 class="font-medium text-purple-700 mb-2">بطاقة العمل</h4>
|
| 906 |
+
<p class="text-sm" id="viewWorkerWorkCardNumber">الرقم: </p>
|
| 907 |
+
<p class="text-sm" id="viewWorkerWorkCardIssueDate">تاريخ الإصدار: </p>
|
| 908 |
+
<p class="text-sm" id="viewWorkerWorkCardExpiryDate">تاريخ الانتهاء: </p>
|
| 909 |
+
<p class="text-sm font-medium" id="viewWorkerWorkCardStatus">الحالة: </p>
|
| 910 |
+
</div>
|
| 911 |
+
</div>
|
| 912 |
+
|
| 913 |
+
<div class="bg-white border border-gray-200 rounded-lg p-4">
|
| 914 |
+
<h4 class="font-medium text-gray-700 mb-2">المستندات المرفقة</h4>
|
| 915 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-4" id="viewWorkerDocuments">
|
| 916 |
+
<!-- Documents will be loaded here -->
|
| 917 |
+
</div>
|
| 918 |
+
</div>
|
| 919 |
+
</div>
|
| 920 |
+
</div>
|
| 921 |
+
|
| 922 |
+
<div class="flex justify-end mt-4">
|
| 923 |
+
<button id="printWorkerBtn" class="bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-lg flex items-center mr-2">
|
| 924 |
+
<i class="fas fa-print ml-2"></i>
|
| 925 |
+
<span>طباعة</span>
|
| 926 |
+
</button>
|
| 927 |
+
<button id="closeViewWorkerBtn" class="bg-gray-500 hover:bg-gray-600 text-white py-2 px-4 rounded-lg">
|
| 928 |
+
إغلاق
|
| 929 |
+
</button>
|
| 930 |
+
</div>
|
| 931 |
</div>
|
| 932 |
+
</div>
|
| 933 |
+
</div>
|
| 934 |
+
|
| 935 |
+
<!-- View Document Modal -->
|
| 936 |
+
<div id="viewDocumentModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
| 937 |
+
<div class="bg-white rounded-lg shadow-xl w-full max-w-4xl max-h-screen overflow-y-auto">
|
| 938 |
+
<div class="p-6">
|
| 939 |
+
<div class="flex justify-between items-center mb-4">
|
| 940 |
+
<h3 class="text-xl font-bold text-gray-800" id="viewDocumentTitle">عرض المستند</h3>
|
| 941 |
+
<button id="closeViewDocumentModal" class="text-gray-500 hover:text-gray-700">
|
| 942 |
+
<i class="fas fa-times"></i>
|
| 943 |
+
</button>
|
| 944 |
+
</div>
|
| 945 |
+
|
| 946 |
+
<div class="mb-4">
|
| 947 |
+
<div class="flex items-center space-x-4 mb-2">
|
| 948 |
+
<div class="bg-gray-100 p-2 rounded-lg">
|
| 949 |
+
<i class="fas fa-user text-blue-500"></i>
|
| 950 |
+
<span class="mr-2" id="viewDocumentWorkerName">أحمد محمد</span>
|
| 951 |
+
</div>
|
| 952 |
+
<div class="bg-gray-100 p-2 rounded-lg">
|
| 953 |
+
<i class="fas fa-id-card text-yellow-500"></i>
|
| 954 |
+
<span class="mr-2" id="viewDocumentNumber">R987654</span>
|
| 955 |
+
</div>
|
| 956 |
+
<div class="bg-gray-100 p-2 rounded-lg">
|
| 957 |
+
<i class="fas fa-calendar-alt text-purple-500"></i>
|
| 958 |
+
<span class="mr-2" id="viewDocumentExpiryDate">15/09/2023</span>
|
| 959 |
+
</div>
|
| 960 |
+
</div>
|
| 961 |
+
|
| 962 |
+
<div id="viewDocumentStatus" class="inline-block px-3 py-1 rounded-full text-sm font-medium">
|
| 963 |
+
<!-- Status badge will be added here -->
|
| 964 |
+
</div>
|
| 965 |
+
</div>
|
| 966 |
+
|
| 967 |
+
<div class="flex justify-center mb-4">
|
| 968 |
+
<img id="viewDocumentImage" src="https://via.placeholder.com/800x600" alt="Document" class="max-w-full h-auto rounded-lg border border-gray-200">
|
| 969 |
+
</div>
|
| 970 |
+
|
| 971 |
+
<div class="flex justify-end mt-4">
|
| 972 |
+
<button id="downloadDocumentBtn" class="bg-blue-600 hover:bg-blue-700 text-white py-2 px-4 rounded-lg flex items-center mr-2">
|
| 973 |
+
<i class="fas fa-download ml-2"></i>
|
| 974 |
+
<span>تحميل</span>
|
| 975 |
+
</button>
|
| 976 |
+
<button id="closeViewDocumentBtn" class="bg-gray-500 hover:bg-gray-600 text-white py-2 px-4 rounded-lg">
|
| 977 |
+
إغلاق
|
| 978 |
+
</button>
|
| 979 |
+
</div>
|
| 980 |
</div>
|
| 981 |
</div>
|
| 982 |
</div>
|
| 983 |
+
|
| 984 |
<!-- Confirmation Modal -->
|
| 985 |
+
<div id="confirmationModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
| 986 |
<div class="bg-white rounded-lg shadow-xl w-full max-w-md">
|
| 987 |
+
<div class="p-6">
|
| 988 |
+
<div class="flex justify-between items-center mb-4">
|
| 989 |
+
<h3 class="text-xl font-bold text-gray-800" id="confirmationTitle">تأكيد الإجراء</h3>
|
| 990 |
+
<button id="closeConfirmationModal" class="text-gray-500 hover:text-gray-700">
|
| 991 |
+
<i class="fas fa-times"></i>
|
| 992 |
+
</button>
|
| 993 |
+
</div>
|
| 994 |
+
|
| 995 |
+
<p class="mb-6 text-gray-700" id="confirmationMessage">هل أنت متأكد من رغبتك في حذف هذا العامل؟</p>
|
| 996 |
+
|
| 997 |
+
<div class="flex justify-end space-x-4">
|
| 998 |
+
<button id="cancelConfirmationBtn" class="bg-gray-500 hover:bg-gray-600 text-white py-2 px-4 rounded-lg">
|
| 999 |
+
إلغاء
|
| 1000 |
+
</button>
|
| 1001 |
+
<button id="confirmActionBtn" class="bg-red-600 hover:bg-red-700 text-white py-2 px-4 rounded-lg">
|
| 1002 |
+
تأكيد
|
| 1003 |
+
</button>
|
| 1004 |
+
</div>
|
| 1005 |
</div>
|
| 1006 |
</div>
|
| 1007 |
</div>
|
| 1008 |
+
|
| 1009 |
+
<!-- Loading Spinner -->
|
| 1010 |
+
<div id="loadingSpinner" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
|
| 1011 |
+
<div class="bg-white p-6 rounded-lg shadow-xl flex flex-col items-center">
|
| 1012 |
+
<div class="animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-blue-500 mb-4"></div>
|
| 1013 |
+
<p class="text-gray-700">جاري التحميل...</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1014 |
</div>
|
| 1015 |
</div>
|
| 1016 |
+
|
| 1017 |
<!-- Success Toast -->
|
| 1018 |
+
<div id="successToast" class="fixed top-4 right-4 bg-green-500 text-white px-4 py-2 rounded-lg shadow-lg flex items-center transform translate-x-full transition-transform duration-300 z-50">
|
| 1019 |
<i class="fas fa-check-circle mr-2"></i>
|
| 1020 |
+
<span id="successToastMessage">تمت العملية بنجاح</span>
|
| 1021 |
</div>
|
| 1022 |
+
|
| 1023 |
<!-- Error Toast -->
|
| 1024 |
+
<div id="errorToast" class="fixed top-4 right-4 bg-red-500 text-white px-4 py-2 rounded-lg shadow-lg flex items-center transform translate-x-full transition-transform duration-300 z-50">
|
| 1025 |
<i class="fas fa-exclamation-circle mr-2"></i>
|
| 1026 |
+
<span id="errorToastMessage">حدث خطأ ما</span>
|
| 1027 |
</div>
|
| 1028 |
+
|
| 1029 |
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
| 1030 |
<script>
|
| 1031 |
+
// Database configuration
|
| 1032 |
+
const dbConfig = {
|
| 1033 |
+
host: 'localhost',
|
| 1034 |
+
user: 'root',
|
| 1035 |
+
password: '',
|
| 1036 |
+
database: 'workers_management'
|
| 1037 |
+
};
|
| 1038 |
+
|
| 1039 |
+
// Global variables
|
| 1040 |
+
let currentWorkerId = null;
|
| 1041 |
+
let currentDocumentId = null;
|
| 1042 |
+
let currentAction = null;
|
| 1043 |
+
let workersPage = 1;
|
| 1044 |
+
let documentsPage = 1;
|
| 1045 |
+
let notificationsPage = 1;
|
| 1046 |
+
const itemsPerPage = 10;
|
| 1047 |
+
|
| 1048 |
+
// DOM Ready
|
| 1049 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 1050 |
+
// Initialize the dashboard
|
| 1051 |
+
loadDashboardData();
|
| 1052 |
+
loadRecentWorkers();
|
| 1053 |
+
loadRecentAlerts();
|
| 1054 |
+
|
| 1055 |
+
// Setup event listeners
|
| 1056 |
+
setupEventListeners();
|
| 1057 |
+
});
|
| 1058 |
+
|
| 1059 |
+
// Setup all event listeners
|
| 1060 |
+
function setupEventListeners() {
|
| 1061 |
+
// Sidebar toggle
|
| 1062 |
+
document.getElementById('toggleSidebar').addEventListener('click', toggleSidebar);
|
| 1063 |
+
|
| 1064 |
+
// Sidebar navigation
|
| 1065 |
+
const sidebarLinks = document.querySelectorAll('.sidebar-link');
|
| 1066 |
+
sidebarLinks.forEach(link => {
|
| 1067 |
+
link.addEventListener('click', function(e) {
|
| 1068 |
+
e.preventDefault();
|
| 1069 |
+
const sectionId = this.getAttribute('data-section');
|
| 1070 |
+
showSection(sectionId);
|
| 1071 |
+
});
|
| 1072 |
+
});
|
| 1073 |
+
|
| 1074 |
+
// Workers section
|
| 1075 |
+
document.getElementById('addWorkerBtn').addEventListener('click', showAddWorkerForm);
|
| 1076 |
+
document.getElementById('backToWorkersBtn').addEventListener('click', showWorkersSection);
|
| 1077 |
+
document.getElementById('cancelWorkerBtn').addEventListener('click', showWorkersSection);
|
| 1078 |
+
document.getElementById('workerForm').addEventListener('submit', saveWorker);
|
| 1079 |
+
document.getElementById('workerFilter').addEventListener('change', filterWorkers);
|
| 1080 |
+
document.getElementById('workerSearch').addEventListener('input', searchWorkers);
|
| 1081 |
+
document.getElementById('workersPrevPage').addEventListener('click', () => changePage('workers', -1));
|
| 1082 |
+
document.getElementById('workersNextPage').addEventListener('click', () => changePage('workers', 1));
|
| 1083 |
+
|
| 1084 |
+
// Documents section
|
| 1085 |
+
document.getElementById('exportDocumentsBtn').addEventListener('click', exportDocuments);
|
| 1086 |
+
document.getElementById('documentFilter').addEventListener('change', filterDocuments);
|
| 1087 |
+
document.getElementById('documentSearch').addEventListener('input', searchDocuments);
|
| 1088 |
+
document.getElementById('documentsPrevPage').addEventListener('click', () => changePage('documents', -1));
|
| 1089 |
+
document.getElementById('documentsNextPage').addEventListener('click', () => changePage('documents', 1));
|
| 1090 |
+
|
| 1091 |
+
// Notifications section
|
| 1092 |
+
document.getElementById('markAllAsReadBtn').addEventListener('click', markAllAsRead);
|
| 1093 |
+
document.getElementById('notificationFilter').addEventListener('change', filterNotifications);
|
| 1094 |
+
document.getElementById('notificationSearch').addEventListener('input', searchNotifications);
|
| 1095 |
+
document.getElementById('notificationsPrevPage').addEventListener('click', () => changePage('notifications', -1));
|
| 1096 |
+
document.getElementById('notificationsNextPage').addEventListener('click', () => changePage('notifications', 1));
|
| 1097 |
+
|
| 1098 |
+
// Reports section
|
| 1099 |
+
document.getElementById('generateReportBtn').addEventListener('click', generateReport);
|
| 1100 |
+
|
| 1101 |
+
// Settings section
|
| 1102 |
+
document.getElementById('alertSettingsForm').addEventListener('submit', saveAlertSettings);
|
| 1103 |
+
document.getElementById('createBackupBtn').addEventListener('click', createBackup);
|
| 1104 |
+
document.getElementById('restoreBackup').addEventListener('change', restoreBackup);
|
| 1105 |
+
|
| 1106 |
+
// Modals
|
| 1107 |
+
document.getElementById('closeViewWorkerModal').addEventListener('click', closeViewWorkerModal);
|
| 1108 |
+
document.getElementById('closeViewWorkerBtn').addEventListener('click', closeViewWorkerModal);
|
| 1109 |
+
document.getElementById('printWorkerBtn').addEventListener('click', printWorker);
|
| 1110 |
+
document.getElementById('closeViewDocumentModal').addEventListener('click', closeViewDocumentModal);
|
| 1111 |
+
document.getElementById('closeViewDocumentBtn').addEventListener('click', closeViewDocumentModal);
|
| 1112 |
+
document.getElementById('downloadDocumentBtn').addEventListener('click', downloadDocument);
|
| 1113 |
+
document.getElementById('closeConfirmationModal').addEventListener('click', closeConfirmationModal);
|
| 1114 |
+
document.getElementById('cancelConfirmationBtn').addEventListener('click', closeConfirmationModal);
|
| 1115 |
+
document.getElementById('confirmActionBtn').addEventListener('click', confirmAction);
|
| 1116 |
+
|
| 1117 |
+
// File uploads
|
| 1118 |
+
document.getElementById('workerPhoto').addEventListener('change', handleWorkerPhotoUpload);
|
| 1119 |
+
document.getElementById('passportImage').addEventListener('change', handlePassportImageUpload);
|
| 1120 |
+
document.getElementById('residenceImage').addEventListener('change', handleResidenceImageUpload);
|
| 1121 |
+
document.getElementById('workCardImage').addEventListener('change', handleWorkCardImageUpload);
|
| 1122 |
+
}
|
| 1123 |
+
|
| 1124 |
+
// Toggle sidebar
|
| 1125 |
+
function toggleSidebar() {
|
| 1126 |
+
document.querySelector('.sidebar').classList.toggle('collapsed');
|
| 1127 |
+
}
|
| 1128 |
+
|
| 1129 |
+
// Show specific section
|
| 1130 |
+
function showSection(sectionId) {
|
| 1131 |
+
// Hide all sections
|
| 1132 |
+
document.querySelectorAll('main > div').forEach(section => {
|
| 1133 |
+
section.classList.add('hidden');
|
| 1134 |
+
});
|
| 1135 |
+
|
| 1136 |
+
// Show the selected section
|
| 1137 |
+
document.getElementById(sectionId).classList.remove('hidden');
|
| 1138 |
+
|
| 1139 |
+
// Update page title
|
| 1140 |
+
const pageTitle = document.getElementById('pageTitle');
|
| 1141 |
+
switch(sectionId) {
|
| 1142 |
+
case 'dashboardSection':
|
| 1143 |
+
pageTitle.textContent = 'نظام إدارة بيانات العمال الأجانب';
|
| 1144 |
+
break;
|
| 1145 |
+
case 'workersSection':
|
| 1146 |
+
pageTitle.textContent = 'إدارة العمال الأجانب';
|
| 1147 |
+
loadWorkers();
|
| 1148 |
+
break;
|
| 1149 |
+
case 'documentsSection':
|
| 1150 |
+
pageTitle.textContent = 'إدارة المستندات';
|
| 1151 |
+
loadDocuments();
|
| 1152 |
+
break;
|
| 1153 |
+
case 'notificationsSection':
|
| 1154 |
+
pageTitle.textContent = 'إدارة التنبيهات';
|
| 1155 |
+
loadNotifications();
|
| 1156 |
+
break;
|
| 1157 |
+
case 'reportsSection':
|
| 1158 |
+
pageTitle.textContent = 'التقارير والإحصائيات';
|
| 1159 |
+
loadReports();
|
| 1160 |
+
break;
|
| 1161 |
+
case 'settingsSection':
|
| 1162 |
+
pageTitle.textContent = 'إعدادات النظام';
|
| 1163 |
+
loadSettings();
|
| 1164 |
+
break;
|
| 1165 |
+
}
|
| 1166 |
+
}
|
| 1167 |
+
|
| 1168 |
+
// Show workers section
|
| 1169 |
+
function showWorkersSection() {
|
| 1170 |
+
showSection('workersSection');
|
| 1171 |
+
}
|
| 1172 |
+
|
| 1173 |
+
// Show add worker form
|
| 1174 |
+
function showAddWorkerForm() {
|
| 1175 |
+
// Reset form
|
| 1176 |
+
document.getElementById('workerForm').reset();
|
| 1177 |
+
document.getElementById('workerId').value = '';
|
| 1178 |
+
document.getElementById('workerPhotoPreview').src = 'https://via.placeholder.com/150';
|
| 1179 |
+
document.getElementById('passportImagesContainer').innerHTML = '';
|
| 1180 |
+
document.getElementById('residenceImagesContainer').innerHTML = '';
|
| 1181 |
+
document.getElementById('workCardImagesContainer').innerHTML = '';
|
| 1182 |
+
document.getElementById('formTitle').textContent = 'إضافة عامل جديد';
|
| 1183 |
+
|
| 1184 |
+
// Show form section
|
| 1185 |
+
document.getElementById('workersSection').classList.add('hidden');
|
| 1186 |
+
document.getElementById('workerFormSection').classList.remove('hidden');
|
| 1187 |
+
}
|
| 1188 |
+
|
| 1189 |
+
// Show edit worker form
|
| 1190 |
+
function showEditWorkerForm(workerId) {
|
| 1191 |
+
// Show loading spinner
|
| 1192 |
+
showLoading();
|
| 1193 |
+
|
| 1194 |
+
// Simulate API call to get worker data
|
| 1195 |
+
setTimeout(() => {
|
| 1196 |
+
// In a real app, you would fetch the worker data from the server
|
| 1197 |
+
const workerData = {
|
| 1198 |
+
id: workerId,
|
| 1199 |
+
name: 'أحمد محمد',
|
| 1200 |
+
nationality: 'الهند',
|
| 1201 |
+
birthDate: '1990-05-15',
|
| 1202 |
+
phone: '+9647701234567',
|
| 1203 |
+
email: 'ahmed@example.com',
|
| 1204 |
+
address: 'كركوك - العراق',
|
| 1205 |
+
passportNumber: 'A12345678',
|
| 1206 |
+
passportIssueDate: '2020-01-10',
|
| 1207 |
+
passportExpiryDate: '2025-01-10',
|
| 1208 |
+
residenceNumber: 'R987654',
|
| 1209 |
+
residenceIssueDate: '2022-09-15',
|
| 1210 |
+
residenceExpiryDate: '2023-09-15',
|
| 1211 |
+
workCardNumber: 'W456789',
|
| 1212 |
+
workCardIssueDate: '2022-10-01',
|
| 1213 |
+
workCardExpiryDate: '2023-10-01',
|
| 1214 |
+
arrivalAirport: 'مطار بغداد الدولي',
|
| 1215 |
+
workType: 'دوام كامل',
|
| 1216 |
+
passportAlert: true,
|
| 1217 |
+
residenceAlert: true,
|
| 1218 |
+
workCardAlert: true,
|
| 1219 |
+
emailAlert: true,
|
| 1220 |
+
smsAlert: false,
|
| 1221 |
+
appAlert: true
|
| 1222 |
+
};
|
| 1223 |
+
|
| 1224 |
+
// Fill the form with worker data
|
| 1225 |
+
document.getElementById('workerId').value = workerData.id;
|
| 1226 |
+
document.getElementById('workerName').value = workerData.name;
|
| 1227 |
+
document.getElementById('workerNationality').value = workerData.nationality;
|
| 1228 |
+
|
| 1229 |
</html>
|
prompts.txt
CHANGED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
maker sure all buttons are working because in not working when i press it and need to create the other pages
|
| 2 |
+
connect this project with database and make work 100 percent
|