Spaces:
Running
Running
یک آپ تحت وب cmms نیاز دارم که برای وارد کردن اطلاعات دستگاهها و ثبت اطلاعات ان - Initial Deployment
82a301d verified Download index.html from Toshishan13/mpm-net: direct link, hf CLI and curl.
- Browser
- Download file 33.2 kB
-
https://huggingface.co/spaces/Toshishan13/mpm-net/resolve/main/index.html
- Command line
-
hf download hf://spaces/Toshishan13/mpm-net/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Toshishan13/mpm-net/resolve/main/index.html
33.2 kB
| <html lang="fa" dir="rtl"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>سیستم مدیریت نگهداری و تعمیرات تجهیزات</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <script> | |
| tailwind.config = { | |
| theme: { | |
| extend: { | |
| colors: { | |
| primary: '#2563eb', | |
| secondary: '#1d4ed8', | |
| accent: '#3b82f6', | |
| dark: '#1e293b', | |
| light: '#f8fafc' | |
| } | |
| } | |
| } | |
| } | |
| </script> | |
| <style> | |
| @import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap'); | |
| body { | |
| font-family: 'Vazirmatn', sans-serif; | |
| } | |
| .dashboard-card { | |
| transition: transform 0.3s ease, box-shadow 0.3s ease; | |
| } | |
| .dashboard-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1); | |
| } | |
| .fab-btn { | |
| position: fixed; | |
| bottom: 2rem; | |
| right: 2rem; | |
| box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | |
| } | |
| .device-status { | |
| display: inline-block; | |
| padding: 0.25rem 0.75rem; | |
| border-radius: 9999px; | |
| font-size: 0.75rem; | |
| font-weight: 500; | |
| } | |
| .active-tab { | |
| border-bottom: 3px solid #2563eb; | |
| color: #2563eb; | |
| font-weight: 600; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-100 text-gray-800"> | |
| <!-- Navigation Bar --> | |
| <nav class="bg-white shadow-md sticky top-0 z-50"> | |
| <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> | |
| <div class="flex justify-between h-16"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 flex items-center"> | |
| <i class="fas fa-tools text-accent text-2xl"></i> | |
| <span class="ml-2 text-xl font-bold text-dark">مدیریت نگهداری تجهیزات</span> | |
| </div> | |
| <div class="hidden md:block mr-10"> | |
| <div class="ml-10 flex items-baseline space-x-4"> | |
| <a href="#" class="active-tab px-3 py-4">دستگاهها</a> | |
| <a href="#" class="text-gray-600 hover:text-gray-900 px-3 py-4">تعمیرات</a> | |
| <a href="#" class="text-gray-600 hover:text-gray-900 px-3 py-4">گزارشات</a> | |
| <a href="#" class="text-gray-600 hover:text-gray-900 px-3 py-4">تنظیمات</a> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0"> | |
| <div class="relative"> | |
| <button class="relative flex bg-gray-200 text-sm rounded-full focus:outline-none" id="notification-btn"> | |
| <i class="fas fa-bell text-gray-600 p-2"></i> | |
| <span class="absolute top-0 right-0 block h-2 w-2 rounded-full bg-red-500"></span> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="mr-3 flex items-center"> | |
| <div> | |
| <div class="relative"> | |
| <button class="flex text-sm rounded-full" id="user-menu"> | |
| <img class="h-8 w-8 rounded-full" src="https://ui-avatars.com/api/?name=مدیر+سیستم&background=2563eb&color=fff" alt="پروفایل کاربر"> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="mr-2"> | |
| <span class="text-sm font-medium text-gray-700">مدیر سیستم</span> | |
| <span class="block text-xs text-gray-500">ادمین</span> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </nav> | |
| <!-- Main Content --> | |
| <main class="py-6"> | |
| <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> | |
| <!-- Dashboard Cards --> | |
| <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 mb-8"> | |
| <div class="dashboard-card bg-white rounded-lg shadow-sm overflow-hidden"> | |
| <div class="px-6 py-4 flex items-center"> | |
| <div class="bg-blue-100 p-3 rounded-full mr-3"> | |
| <i class="fas fa-microchip text-accent text-xl"></i> | |
| </div> | |
| <div> | |
| <div class="text-sm font-medium text-gray-500">تعداد دستگاهها</div> | |
| <div class="text-2xl font-semibold text-dark">47</div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="dashboard-card bg-white rounded-lg shadow-sm overflow-hidden"> | |
| <div class="px-6 py-4 flex items-center"> | |
| <div class="bg-green-100 p-3 rounded-full mr-3"> | |
| <i class="fas fa-check-circle text-green-500 text-xl"></i> | |
| </div> | |
| <div> | |
| <div class="text-sm font-medium text-gray-500">دستگاههای فعال</div> | |
| <div class="text-2xl font-semibold text-dark">42</div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="dashboard-card bg-white rounded-lg shadow-sm overflow-hidden"> | |
| <div class="px-6 py-4 flex items-center"> | |
| <div class="bg-yellow-100 p-3 rounded-full mr-3"> | |
| <i class="fas fa-wrench text-yellow-500 text-xl"></i> | |
| </div> | |
| <div> | |
| <div class="text-sm font-medium text-gray-500">در حال تعمیر</div> | |
| <div class="text-2xl font-semibold text-dark">3</div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="dashboard-card bg-white rounded-lg shadow-sm overflow-hidden"> | |
| <div class="px-6 py-4 flex items-center"> | |
| <div class="bg-red-100 p-3 rounded-full mr-3"> | |
| <i class="fas fa-times-circle text-red-500 text-xl"></i> | |
| </div> | |
| <div> | |
| <div class="text-sm font-medium text-gray-500">نیاز به بررسی</div> | |
| <div class="text-2xl font-semibold text-dark">2</div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Actions & Filter Section --> | |
| <div class="mb-6 flex flex-col md:flex-row justify-between items-start md:items-center"> | |
| <div class="mb-4 md:mb-0"> | |
| <h2 class="text-xl font-bold text-dark">لیست دستگاهها</h2> | |
| <p class="text-sm text-gray-500">مدیریت تجهیزات و اطلاعات مربوط به دستگاهها</p> | |
| </div> | |
| <div class="flex flex-col sm:flex-row w-full md:w-auto"> | |
| <div class="relative mb-3 sm:mb-0 sm:mr-3 w-full sm:w-64"> | |
| <div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"> | |
| <i class="fas fa-search text-gray-400"></i> | |
| </div> | |
| <input type="text" placeholder="جستجوی دستگاه..." class="block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent"> | |
| </div> | |
| <div class="flex"> | |
| <button class="px-4 py-2 bg-gray-200 text-gray-700 rounded-md hover:bg-gray-300 transition"> | |
| <i class="fas fa-filter mr-1"></i> | |
| فیلتر | |
| </button> | |
| <button class="px-4 py-2 bg-accent text-white rounded-md hover:bg-secondary transition mr-2"> | |
| گزارش | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Devices Table --> | |
| <div class="bg-white shadow-sm rounded-lg overflow-hidden mb-6"> | |
| <div class="overflow-x-auto"> | |
| <table class="min-w-full divide-y divide-gray-200"> | |
| <thead class="bg-gray-50"> | |
| <tr> | |
| <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">نام دستگاه</th> | |
| <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">کد شناسایی</th> | |
| <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">محل استقرار</th> | |
| <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">مدل</th> | |
| <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">وضعیت</th> | |
| <th scope="col" class="px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider">اقدامات</th> | |
| </tr> | |
| </thead> | |
| <tbody class="bg-white divide-y divide-gray-200"> | |
| <!-- Device 1 --> | |
| <tr class="hover:bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 h-10 w-10 bg-blue-100 rounded-md flex items-center justify-center"> | |
| <i class="fas fa-print text-blue-500"></i> | |
| </div> | |
| <div class="mr-4"> | |
| <div class="text-sm font-medium text-gray-900">چاپگر لیزری</div> | |
| <div class="text-sm text-gray-500">تولید: کونیکا مینولتا</div> | |
| </div> | |
| </div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="text-sm text-gray-900">PRT-0471</div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="text-sm text-gray-900">اتاق فکر</div> | |
| <div class="text-sm text-gray-500">طبقه دوم</div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | |
| Bizhub C250i | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="device-status bg-green-100 text-green-800">فعال</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium"> | |
| <button class="text-blue-600 hover:text-blue-900 mx-2"><i class="fas fa-edit"></i></button> | |
| <button class="text-red-600 hover:text-red-900 mx-2"><i class="fas fa-trash"></i></button> | |
| <button class="text-yellow-600 hover:text-yellow-900 mx-2"><i class="fas fa-chart-line"></i></button> | |
| </td> | |
| </tr> | |
| <!-- Device 2 --> | |
| <tr class="hover:bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 h-10 w-10 bg-purple-100 rounded-md flex items-center justify-center"> | |
| <i class="fas fa-server text-purple-500"></i> | |
| </div> | |
| <div class="mr-4"> | |
| <div class="text-sm font-medium text-gray-900">سرور مرکزی</div> | |
| <div class="text-sm text-gray-500">دیتابیس سازمانی</div> | |
| </div> | |
| </div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="text-sm text-gray-900">SRV-0021</div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="text-sm text-gray-900">اتاق سرور</div> | |
| <div class="text-sm text-gray-500">راک A</div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | |
| Dell PowerEdge R740 | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="device-status bg-yellow-100 text-yellow-800">نیازمند توجه</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium"> | |
| <button class="text-blue-600 hover:text-blue-900 mx-2"><i class="fas fa-edit"></i></button> | |
| <button class="text-red-600 hover:text-red-900 mx-2"><i class="fas fa-trash"></i></button> | |
| <button class="text-yellow-600 hover:text-yellow-900 mx-2"><i class="fas fa-chart-line"></i></button> | |
| </td> | |
| </tr> | |
| <!-- Device 3 --> | |
| <tr class="hover:bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 h-10 w-10 bg-green-100 rounded-md flex items-center justify-center"> | |
| <i class="fas fa-desktop text-green-500"></i> | |
| </div> | |
| <div class="mr-4"> | |
| <div class="text-sm font-medium text-gray-900">دستگاه CNC</div> | |
| <div class="text-sm text-gray-500">کارگاه تولیدی</div> | |
| </div> | |
| </div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="text-sm text-gray-900">CNC-0129</div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="text-sm text-gray-900">سالن تولید</div> | |
| <div class="text-sm text-gray-500">بخش A</div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | |
| HAAS VF-2SS | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="device-status bg-red-100 text-red-800">در حال تعمیر</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium"> | |
| <button class="text-blue-600 hover:text-blue-900 mx-2"><i class="fas fa-edit"></i></button> | |
| <button class="text-red-600 hover:text-red-900 mx-2"><i class="fas fa-trash"></i></button> | |
| <button class="text-yellow-600 hover:text-yellow-900 mx-2"><i class="fas fa-chart-line"></i></button> | |
| </td> | |
| </tr> | |
| <!-- Device 4 --> | |
| <tr class="hover:bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 h-10 w-10 bg-orange-100 rounded-md flex items-center justify-center"> | |
| <i class="fas fa-fan text-orange-500"></i> | |
| </div> | |
| <div class="mr-4"> | |
| <div class="text-sm font-medium text-gray-900">سیستم تهویه</div> | |
| <div class="text-sm text-gray-500">مرکزی</div> | |
| </div> | |
| </div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="text-sm text-gray-900">AC-0365</div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="text-sm text-gray-900">پشت بام</div> | |
| <div class="text-sm text-gray-500">واحد 2</div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | |
| Gree GWH24QC-S3 | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="device-status bg-gray-100 text-gray-800">خاموش</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium"> | |
| <button class="text-blue-600 hover:text-blue-900 mx-2"><i class="fas fa-edit"></i></button> | |
| <button class="text-red-600 hover:text-red-900 mx-2"><i class="fas fa-trash"></i></button> | |
| <button class="text-yellow-600 hover:text-yellow-900 mx-2"><i class="fas fa-chart-line"></i></button> | |
| </td> | |
| </tr> | |
| <!-- Device 5 --> | |
| <tr class="hover:bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 h-10 w-10 bg-indigo-100 rounded-md flex items-center justify-center"> | |
| <i class="fas fa-projector text-indigo-500"></i> | |
| </div> | |
| <div class="mr-4"> | |
| <div class="text-sm font-medium text-gray-900">دیتا پروژکتور</div> | |
| <div class="text-sm text-gray-500">اتاق جلسات</div> | |
| </div> | |
| </div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="text-sm text-gray-900">PJR-0094</div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="text-sm text-gray-900">سالن کنفرانس</div> | |
| <div class="text-sm text-gray-500">طبقه سوم</div> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | |
| Epson EB-1781W | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="device-status bg-green-100 text-green-800">فعال</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium"> | |
| <button class="text-blue-600 hover:text-blue-900 mx-2"><i class="fas fa-edit"></i></button> | |
| <button class="text-red-600 hover:text-red-900 mx-2"><i class="fas fa-trash"></i></button> | |
| <button class="text-yellow-600 hover:text-yellow-900 mx-2"><i class="fas fa-chart-line"></i></button> | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| <!-- Pagination --> | |
| <div class="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6 rounded-b-lg"> | |
| <div class="flex flex-1 justify-between sm:hidden"> | |
| <button class="relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50">قبلی</button> | |
| <button class="relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50">بعدی</button> | |
| </div> | |
| <div class="hidden sm:flex sm:flex-1 sm:items-center sm:justify-between"> | |
| <div> | |
| <p class="text-sm text-gray-700"> | |
| نمایش | |
| <span class="font-medium">1</span> | |
| تا | |
| <span class="font-medium">5</span> | |
| از | |
| <span class="font-medium">47</span> | |
| نتیجه | |
| </p> | |
| </div> | |
| <div> | |
| <nav class="isolate inline-flex -space-x-px rounded-md shadow-sm" aria-label="Pagination"> | |
| <button class="relative inline-flex items-center rounded-r-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0"> | |
| <span class="sr-only">بعدی</span> | |
| <i class="fas fa-chevron-right h-5 w-5"></i> | |
| </button> | |
| <button class="relative inline-flex items-center px-4 py-2 text-sm font-semibold text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20">1</button> | |
| <button class="relative inline-flex items-center px-4 py-2 text-sm font-semibold text-gray-500 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20">2</button> | |
| <button class="relative hidden items-center px-4 py-2 text-sm font-semibold text-gray-500 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 md:inline-flex focus:z-20">3</button> | |
| <span class="relative inline-flex items-center px-4 py-2 text-sm font-semibold text-gray-700 ring-1 ring-inset ring-gray-300 focus:outline-offset-0">...</span> | |
| <button class="relative hidden items-center px-4 py-2 text-sm font-semibold text-gray-500 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 md:inline-flex focus:z-20">8</button> | |
| <button class="relative inline-flex items-center rounded-l-md px-2 py-2 text-gray-400 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-20 focus:outline-offset-0"> | |
| <span class="sr-only">قبلی</span> | |
| <i class="fas fa-chevron-left h-5 w-5"></i> | |
| </button> | |
| </nav> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| <!-- Add Device Button --> | |
| <button class="fab-btn bg-accent hover:bg-secondary text-white rounded-full w-16 h-16 flex items-center justify-center shadow-lg"> | |
| <i class="fas fa-plus text-xl"></i> | |
| </button> | |
| <!-- New Device Modal --> | |
| <div id="addDeviceModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden"> | |
| <div class="bg-white rounded-lg shadow-xl w-full max-w-2xl"> | |
| <div class="border-b px-6 py-4"> | |
| <h3 class="text-xl font-semibold text-gray-800">ثبت دستگاه جدید</h3> | |
| </div> | |
| <div class="px-6 py-4"> | |
| <form> | |
| <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">نام دستگاه</label> | |
| <input type="text" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-accent focus:border-transparent"> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">کد شناسایی</label> | |
| <input type="text" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-accent focus:border-transparent"> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">نوع دستگاه</label> | |
| <select class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-accent focus:border-transparent"> | |
| <option>تولیدی</option> | |
| <option>اداری</option> | |
| <option>آزمایشگاهی</option> | |
| <option>بایگانی</option> | |
| </select> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">وضعیت</label> | |
| <select class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-accent focus:border-transparent"> | |
| <option>فعال</option> | |
| <option>نیازمند توجه</option> | |
| <option>در حال تعمیر</option> | |
| <option>خاموش</option> | |
| <option>از سرویس خارج</option> | |
| </select> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">محل استقرار</label> | |
| <input type="text" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-accent focus:border-transparent"> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">تاریخ نصب</label> | |
| <input type="date" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-accent focus:border-transparent"> | |
| </div> | |
| <div class="md:col-span-2"> | |
| <label class="block text-sm font-medium text-gray-700 mb-1">توضیحات</label> | |
| <textarea rows="3" class="w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-accent focus:border-transparent"></textarea> | |
| </div> | |
| </div> | |
| </form> | |
| </div> | |
| <div class="border-t px-6 py-4 bg-gray-50 rounded-b-lg flex justify-end"> | |
| <button type="reset" class="px-4 py-2 bg-gray-200 text-gray-700 rounded-md hover:bg-gray-300 mr-2"> | |
| انصراف | |
| </button> | |
| <button type="submit" class="px-4 py-2 bg-accent text-white rounded-md hover:bg-secondary"> | |
| ثبت دستگاه | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- JavaScript --> | |
| <script> | |
| // Toggle modal | |
| const fabBtn = document.querySelector('.fab-btn'); | |
| const modal = document.getElementById('addDeviceModal'); | |
| fabBtn.addEventListener('click', function() { | |
| modal.classList.toggle('hidden'); | |
| modal.classList.toggle('flex'); | |
| }); | |
| // Close modal when clicking outside | |
| modal.addEventListener('click', function(e) { | |
| if (e.target === modal) { | |
| modal.classList.toggle('hidden'); | |
| modal.classList.toggle('flex'); | |
| } | |
| }); | |
| // Edit device functionality | |
| const editButtons = document.querySelectorAll('button.text-blue-600'); | |
| editButtons.forEach(button => { | |
| button.addEventListener('click', function() { | |
| alert('ویرایش دستگاه...'); | |
| // In a real app, this would open an edit form | |
| // with pre-filled device data | |
| }); | |
| }); | |
| // Delete device functionality | |
| const deleteButtons = document.querySelectorAll('button.text-red-600'); | |
| deleteButtons.forEach(button => { | |
| button.addEventListener('click', function() { | |
| if (confirm('آیا از حذف این دستگاه اطمینان دارید؟')) { | |
| alert('دستگاه با موفقیت حذف شد!'); | |
| // This would remove the device from the table | |
| // and update the data source | |
| } | |
| }); | |
| }); | |
| // Status colors | |
| const statusElements = document.querySelectorAll('.device-status'); | |
| statusElements.forEach(element => { | |
| const status = element.textContent; | |
| if (status === 'نیازمند توجه') { | |
| element.classList.remove('bg-yellow-100', 'text-yellow-800'); | |
| element.classList.add('bg-yellow-100', 'text-yellow-800'); | |
| } else if (status === 'در حال تعمیر') { | |
| element.classList.remove('bg-red-100', 'text-red-800'); | |
| element.classList.add('bg-red-100', 'text-red-800'); | |
| } | |
| }); | |
| </script> | |
| <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=Toshishan13/mpm-net" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |