From da69135609d8d73ede20c05815388557ff72e76c Mon Sep 17 00:00:00 2001 From: "Muhammad A. Ghorbani" Date: Mon, 5 Oct 2026 16:07:53 +0330 Subject: [PATCH] feat: initialize Aqila panel frontend with custom trip management and dashboard features --- index.html | 22 + src/app/App.tsx | 2 +- src/components/AqilaLogo.tsx | 9 +- src/components/layout/AppSidebar.tsx | 4 +- src/components/shared/DeleteConfirmDialog.tsx | 22 +- src/components/shared/shimmer_frontend.tsx | 146 +- src/components/ui/dialog.tsx | 22 +- src/features/auth/LoginPage.tsx | 4 +- .../CustomTripDestinationDetailPage.tsx | 1812 +++++++++++------ src/features/custom-trip/CustomTripPage.tsx | 48 +- .../components/CustomTripDestinationsTab.tsx | 288 ++- .../components/CustomTripHotelsTab.tsx | 6 +- .../CustomTripOrderReviewDialog.tsx | 244 +++ .../components/CustomTripOrdersTab.tsx | 454 ++--- .../components/CustomTripOriginsTab.tsx | 551 +++-- .../components/CustomTripTransportsTab.tsx | 6 +- .../custom-trip/services/custom-trip-api.ts | 333 ++- src/features/custom-trip/types.ts | 20 +- src/features/dashboard/DashboardHome.tsx | 631 +++++- .../dashboard/hooks/useLiveDashboard.ts | 69 + .../dashboard/services/dashboard-api.ts | 358 ++++ .../components/ShrinesServiceView.tsx | 29 +- src/icons.tsx | 4 +- src/index.css | 2 - src/locales/ar.json | 92 +- src/locales/en.json | 92 +- src/locales/fa.json | 92 +- 27 files changed, 3969 insertions(+), 1393 deletions(-) create mode 100644 src/features/custom-trip/components/CustomTripOrderReviewDialog.tsx create mode 100644 src/features/dashboard/hooks/useLiveDashboard.ts create mode 100644 src/features/dashboard/services/dashboard-api.ts diff --git a/index.html b/index.html index 2f759a3..b98bb0c 100644 --- a/index.html +++ b/index.html @@ -20,6 +20,28 @@ }); })(); + + + + diff --git a/src/app/App.tsx b/src/app/App.tsx index 7b91ead..ba31ae0 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -41,7 +41,7 @@ function AuthenticatedShell() {
diff --git a/src/components/AqilaLogo.tsx b/src/components/AqilaLogo.tsx index c45003d..16054a4 100644 --- a/src/components/AqilaLogo.tsx +++ b/src/components/AqilaLogo.tsx @@ -7,12 +7,19 @@ interface AqilaLogoProps extends React.SVGProps { /** * آیکون و نشان رسمی عقیله (برگرفته از اپلیکیشن فلاتر و هویت بصری سامانه) */ -export function AqilaLogo({ className = 'size-6', ...props }: AqilaLogoProps) { +export function AqilaLogo({ + className = 'size-6', + width = 24, + height = 24, + ...props +}: AqilaLogoProps) { return ( diff --git a/src/components/layout/AppSidebar.tsx b/src/components/layout/AppSidebar.tsx index a8f5547..7e5f5c4 100644 --- a/src/components/layout/AppSidebar.tsx +++ b/src/components/layout/AppSidebar.tsx @@ -332,8 +332,8 @@ export default function AppSidebar() {
-
- +
+
diff --git a/src/components/shared/DeleteConfirmDialog.tsx b/src/components/shared/DeleteConfirmDialog.tsx index 86be98d..4288d4b 100644 --- a/src/components/shared/DeleteConfirmDialog.tsx +++ b/src/components/shared/DeleteConfirmDialog.tsx @@ -51,16 +51,18 @@ export default function DeleteConfirmDialog({ - + + + {/* Tab 2: Hotels */} @@ -518,25 +850,32 @@ export default function CustomTripDestinationDetailPage() {
{/* ========================================================================= */} - {/* TAB 1: DESTINATION INFO & DESCRIPTION (صفحه اول: مشخصات و توضیحات شهر) */} + {/* TAB 1: DESTINATION INFO */} {/* ========================================================================= */} {currentTab === 'info' && ( -
+
@@ -546,7 +885,7 @@ export default function CustomTripDestinationDetailPage() { اطلاعات و شناسنامه شهر {destination.name}

- ویرایش مشخصات اصلی، موقعیت کشور، اماکن مقدسه و توضیحات شهر برای ماژول سفر اختصاصی (Custom Trip). + ویرایش مشخصات اصلی، موقعیت کشور و توضیحات مقصد

@@ -558,118 +897,147 @@ export default function CustomTripDestinationDetailPage() { )}
- {/* Form Grid */} -
- {/* 1. Country */} + {/* تنظیمات کلی شهر مقصد (کشور و وضعیت) */} +
+ {/* 1. Country Selection with Radix Select */}
- + + + + + {PRESET_DEST_COUNTRIES.map((c) => ( + + + {c.flag} + {c.name} + + + ))} + +
- {/* 2. City Name FA */} + {/* 2. Active Status Toggle Switch with Mini Spinner */}
- setDestName(e.target.value)} - placeholder="مثال: کربلای معلی، نجف اشرف، مشهد مقدس..." - className="h-11 rounded-xl text-xs sm:text-sm" - required - /> +
+
+ + + {destIsActive ? 'شهر فعال' : 'شهر غیرفعال'} + +
+ +
+
- {/* 3. City Name EN */} -
- - setDestNameEn(e.target.value)} - placeholder="e.g. Karbala, Najaf, Mashhad..." - className="h-11 rounded-xl text-xs sm:text-sm font-mono" + {/* ماژول چندزبانه ترجمه با ServiceTranslation */} +
+
+ setActiveLangTab(lang)} + completedLangs={{ + ar: Boolean(names.ar?.trim()), + fa: Boolean(names.fa?.trim()), + en: Boolean(names.en?.trim()), + ru: Boolean(names.ru?.trim()), + id: Boolean(names.id?.trim()), + }} + primaryLang="ar" + title="اطلاعات متنی و چندزبانه مقصد" + required + variant="pills" />
- {/* 4. Active Status Toggle */} -
- - -
-
- - {/* 5. Holy Places */} -
- - setDestHolyPlaces(e.target.value)} - placeholder="مثال: حرم مطهر امام حسین (ع)، حرم حضرت ابوالفضل العباس (ع)، تل زینبیه، مقام علی‌اکبر (ع)..." - className="h-11 rounded-xl text-xs sm:text-sm" - /> -
+
- {/* 6. City Description for Custom Trip (توضیح برای آن شهر که در Custom Trip در توضیحات شهر قرار داده می‌شود) */} -
-
- - - این متن در اپلیکیشن هنگام انتخاب این مقصد به زائر نمایش داده می‌شود. - + {/* توضیحات و راهنمای شهر به زبان انتخاب‌شده */} +
+ +