From fbb68b9592adaa9f3ab7349140c9cfd6c8aff19b Mon Sep 17 00:00:00 2001 From: Muhammad Amin Ghorbani Date: Mon, 19 Oct 2026 17:54:36 +0330 Subject: [PATCH] fixing bugs --- .agents/AGENTS.md | 21 + index.html | 4 + src/app/router.tsx | 7 +- src/components/layout/ServerStatusDialog.tsx | 6 +- src/components/shared/FilterBar.tsx | 8 +- src/components/shared/UniversalDatePicker.tsx | 455 ++-- src/components/ui/alert-dialog.tsx | 2 +- src/components/ui/command.tsx | 2 +- src/components/ui/dialog.tsx | 2 +- src/components/ui/table.tsx | 6 +- .../utils/dev-click-to-component.tsx | 482 +++-- src/config/navigation.ts | 27 +- src/features/billing/BillingDetailPage.tsx | 1131 ++++++++++ src/features/billing/BillingPage.tsx | 629 +++--- .../billing/components/BillingDetailModal.tsx | 153 +- .../components/ReceiptLightboxDialog.tsx | 10 +- .../billing/components/RejectFactorDialog.tsx | 3 +- src/features/billing/services/billing-api.ts | 12 +- src/features/billing/types.ts | 45 + .../CustomTripDestinationDetailPage.tsx | 37 +- .../custom-trip/CustomTripOrderDetailPage.tsx | 1897 +++++++++++++++++ src/features/custom-trip/CustomTripPage.tsx | 164 +- .../components/CustomTripDestinationsTab.tsx | 5 +- .../components/CustomTripHotelsTab.tsx | 23 +- .../CustomTripOrderReviewDialog.tsx | 1613 ++++++++++++-- .../components/CustomTripOrdersTab.tsx | 236 +- .../components/CustomTripOriginsTab.tsx | 2 +- .../components/CustomTripTransportsTab.tsx | 12 +- .../custom-trip/services/custom-trip-api.ts | 235 +- src/features/custom-trip/types.ts | 19 + .../components/CategoriesServiceView.tsx | 31 +- .../components/CreateLocationDialog.tsx | 2 +- .../services/components/DuasServiceView.tsx | 24 +- .../services/components/FaqServiceView.tsx | 8 +- .../components/LocationDetailSheet.tsx | 2 +- .../services/components/SimcardFormDialog.tsx | 8 +- .../services/components/StoreServiceView.tsx | 14 +- .../components/SupportServiceView.tsx | 2 +- src/features/settings/SettingsPage.tsx | 109 +- .../components/AdminManagementTab.tsx | 16 +- .../settings/components/CreateAdminModal.tsx | 4 +- .../settings/components/SetPasswordModal.tsx | 20 +- .../components/SocialMediaSettingsTab.tsx | 8 +- .../tours/components/CreateTourDialog.tsx | 64 +- .../tours/components/TourDetailDialog.tsx | 46 +- .../tours/components/TourDetailSheet.tsx | 12 +- .../components/TourTranslationsDialog.tsx | 32 +- src/features/users/UserDetailPage.tsx | 12 +- src/icons.tsx | 4 + src/lib/date-utils.ts | 134 +- src/locales/ar.json | 117 +- src/locales/en.json | 117 +- src/locales/fa.json | 117 +- vite.config.ts | 180 +- 54 files changed, 7183 insertions(+), 1148 deletions(-) create mode 100644 .agents/AGENTS.md create mode 100644 src/features/billing/BillingDetailPage.tsx create mode 100644 src/features/custom-trip/CustomTripOrderDetailPage.tsx diff --git a/.agents/AGENTS.md b/.agents/AGENTS.md new file mode 100644 index 0000000..b8047fc --- /dev/null +++ b/.agents/AGENTS.md @@ -0,0 +1,21 @@ +# Admin Panel Agent Rules & Guidelines - Aqila (پنل مدیریت عقیله) + +این سند شامل قوانین، استانداردها و اصول مهندسی الزامی برای توسعه بخش پنل مدیریت ادمین (`aqila_panel`) است. + +--- + +## ۱. استانداردهای توسعه رابط کاربری و معماری +- **فناوری و ساختار:** پروژه بر پایه Vite + React + TypeScript توسعه یافته است. +- **تایپوگرافی و جهت متن (RTL/LTR):** رعایت فونت‌های `Vazirmatn` و `Plus Jakarta Sans`، استفاده از `rtlUtils.ts` جهت تشخیص خودکار جهت متن ورودی کاربران و حفظ ثبات کرسر. +- **چندزبانه بودن کامل پنل مدیریت (۳ زبان):** پنل مدیریت منحصراً از ۳ زبان (`fa` فارسی، `ar` عربی، `en` انگلیسی) در مسیر `src/locales/` استفاده می‌کند. تمام متون جدول‌ها، فیلدها، دکمه‌ها و نشان‌ها باید در هر ۳ فایل دیکشنری زبان (`fa.json`, `ar.json`, `en.json`) تعریف و همگام شوند. + - **قانون هماهنگی ترجمه:** هیچ تغییری نباید تک‌زبانه باشد؛ هر کلید جدید یا اصلاح‌شده در یکی از این ۳ زبان باید همزمان در دو زبان دیگر اعمال شود تا تست `locales.test.ts` کاملاً پاس شود و هیچ کلید ناقص یا نامتعادلی وجود نداشته باشد. + +--- + +## ۲. بررسی الزامی سلامت و ران بودن پروژه پس از هر تغییر کد (Mandatory Runtime Check) +در انتهای هر پاسخ، تسک یا پیامی که در آن کدی ایجاد یا تغییر داده می‌شود: +- **بررسی سریع و بلادرنگ ران بودن پنل مدیریت (Immediate Runtime & Health Check):** + - بلافاصله بررسی شود که تغییرات در کامپوننت‌ها، هوک‌ها، تایپ‌ها یا استایل‌ها باعث خطای کامپایل TypeScript، خطای بیلد Vite یا کرش داشبورد نشده باشد. + - سلامت ران بودن با بررسی تایپ‌ها (`npm run typecheck` / `tsc --noEmit`) یا وضعیت سرور Vite تضمین شود. +- **رفع فوری مشکل تا بازگشت به وضعیت ران (Self-Healing & Auto-Fix):** + - در صورتی که تغییر کد باعث بروز هرگونه خطا، شکست کامپایل یا توقف ران بودن پنل شود، بلافاصله باید منشأ ارور شناسایی و اصلاح گردد تا پنل مدیریت مجدداً در حالت ران، سالم و پایدار قرار گیرد. diff --git a/index.html b/index.html index b98bb0c..956f933 100644 --- a/index.html +++ b/index.html @@ -8,6 +8,10 @@ + + + + پنل مدیریت عقیله