-
+
+ {doctorsList.length > 0 && (
+
+ )}
setFormData({ ...formData, doctor: e.target.value })}
- placeholder="دکتر کلاوس هنینگ"
- className="w-full bg-gray-50 border border-gray-200 rounded-xl py-3 px-4 text-sm focus:outline-none focus:ring-2 focus:ring-purple-500/20 font-bold"
+ placeholder="نام نمایشی پزشک (مثلاً: دکتر کلاوس هنینگ)"
+ className="w-full bg-gray-50 border border-gray-200 rounded-xl py-2.5 px-4 text-xs focus:outline-none focus:ring-2 focus:ring-purple-500/20 font-bold"
/>
diff --git a/frontend/admin-panel/src/routes/adminRoutes.tsx b/frontend/admin-panel/src/routes/adminRoutes.tsx
index eaeebaf4..182d8710 100644
--- a/frontend/admin-panel/src/routes/adminRoutes.tsx
+++ b/frontend/admin-panel/src/routes/adminRoutes.tsx
@@ -35,9 +35,9 @@ const FinancialSettingsPage = lazy(() => import('../pages/FinancialSettingsPage'
const SystemSettingsPage = lazy(() => import('../pages/SystemSettingsPage'));
const SmsSettingsPage = lazy(() => import('../pages/SmsSettingsPage'));
const SslSettingsPage = lazy(() => import('../pages/SslSettingsPage'));
-const Transactions = lazy(() => import('../pages/Transactions'));
const Tickets = lazy(() => import('../pages/Tickets'));
const Reviews = lazy(() => import('../pages/Reviews'));
+const DoctorsManager = lazy(() => import('../pages/DoctorsManager'));
export interface AdminRouteConfig {
path: string;
@@ -74,6 +74,7 @@ export const router = createBrowserRouter([
{ path: 'blogs/*', element:
},
{ path: 'wiki/*', element:
},
{ path: 'videos/*', element:
},
+ { path: 'doctors/*', element:
},
{ path: 'pets/*', element:
},
{ path: 'ui-texts/*', element:
},
{ path: 'media/*', element:
},
diff --git a/frontend/application/app/HomeClient.tsx b/frontend/application/app/HomeClient.tsx
index fbc24dc6..935cdf82 100644
--- a/frontend/application/app/HomeClient.tsx
+++ b/frontend/application/app/HomeClient.tsx
@@ -5,6 +5,7 @@ import Hero from "../components/Hero";
import SmartAdvisor from "../components/SmartAdvisor";
import FeaturedProducts from "../components/FeaturedProducts";
import VetGallery from "../components/VetGallery";
+import TestimonialsSection from "../components/TestimonialsSection";
import BannerPlacement from "../components/BannerPlacement";
import Link from 'next/link';
import { toPersian } from "../lib/utils";
@@ -62,6 +63,7 @@ export default function HomeClient({ initialData }: HomeClientProps) {
+
{/* Navigation to Sections */}
diff --git a/frontend/application/components/SafeImage.tsx b/frontend/application/components/SafeImage.tsx
index c3fdd66b..8d7805e0 100644
--- a/frontend/application/components/SafeImage.tsx
+++ b/frontend/application/components/SafeImage.tsx
@@ -55,7 +55,7 @@ export default function SafeImage({
alt={alt}
width={500}
height={500}
- unoptimized
+ loading="lazy"
className={cn(
"transition-all duration-700 w-full h-full",
imgClassName,
diff --git a/frontend/application/components/TestimonialsSection.tsx b/frontend/application/components/TestimonialsSection.tsx
new file mode 100644
index 00000000..51f613d5
--- /dev/null
+++ b/frontend/application/components/TestimonialsSection.tsx
@@ -0,0 +1,151 @@
+"use client";
+import React, { useEffect, useState } from "react";
+import { Star, MessageSquareQuote, ShieldCheck, UserCheck } from "lucide-react";
+import { motion } from "motion/react";
+import SafeImage from "./SafeImage";
+import { useSettingsStore } from "../lib/store/settingsStore";
+import api, { BASE_DOMAIN } from "../lib/services/api";
+
+export interface Testimonial {
+ id: string;
+ authorName: string;
+ roleTitle?: string;
+ avatarUrl?: string;
+ content: string;
+ rating: number;
+ isFeatured: boolean;
+ isActive: boolean;
+}
+
+export default function TestimonialsSection() {
+ const getText = useSettingsStore(state => state.getText);
+ const [testimonials, setTestimonials] = useState([]);
+ const [isLoading, setIsLoading] = useState(true);
+
+ useEffect(() => {
+ async function loadTestimonials() {
+ try {
+ setIsLoading(true);
+ const res = await api.get('/cms/testimonials');
+ const raw = res.data;
+ const list = Array.isArray(raw?.testimonials)
+ ? raw.testimonials
+ : Array.isArray(raw?.data?.testimonials)
+ ? raw.data.testimonials
+ : Array.isArray(raw?.data)
+ ? raw.data
+ : Array.isArray(raw)
+ ? raw
+ : [];
+ setTestimonials(list.filter((t: Testimonial) => t.isActive !== false));
+ } catch (err) {
+ console.error('Failed to load testimonials:', err);
+ setTestimonials([]);
+ } finally {
+ setIsLoading(false);
+ }
+ }
+ loadTestimonials();
+ }, []);
+
+ if (!isLoading && testimonials.length === 0) {
+ return null; // Gracefully hide section if no testimonials exist in backend
+ }
+
+ return (
+
+
+ {/* Section Header */}
+
+
+
+ {getText('testimonials_badge', "گواهی کیفیت و اصالت")}
+
+
+ {getText('testimonials_title', "دیدگاه دامپزشکان و همراهان")} {getText('testimonials_title_highlight', "کنینا")}
+
+
+ {getText('testimonials_subtitle', "تجربه متخصصان، کلینیکهای همکار و سرپرستان حیوانات خانگی از نتایج مکملهای آلمانی کنینا")}
+
+
+
+ {/* Testimonials Grid */}
+ {isLoading ? (
+
+ {[1, 2, 3].map((i) => (
+
+ ))}
+
+ ) : (
+
+ {testimonials.map((item, index) => {
+ const avatar = item.avatarUrl?.startsWith('http')
+ ? item.avatarUrl
+ : (item.avatarUrl ? `${BASE_DOMAIN}${item.avatarUrl}` : '');
+
+ return (
+
+
+ {/* Rating stars */}
+
+ {Array.from({ length: item.rating || 5 }).map((_, r) => (
+
+ ))}
+
+
+ {/* Content Quote */}
+
+ «{item.content}»
+
+
+
+ {/* Author footer */}
+
+
+ {avatar ? (
+
+ ) : (
+
+ )}
+
+
+
+ {item.authorName}
+
+ {item.roleTitle && (
+
+ {item.roleTitle}
+
+ )}
+
+
+
+ );
+ })}
+
+ )}
+
+
+ );
+}
diff --git a/frontend/application/components/VetGallery.tsx b/frontend/application/components/VetGallery.tsx
index ec8cc67f..e7ad41f9 100644
--- a/frontend/application/components/VetGallery.tsx
+++ b/frontend/application/components/VetGallery.tsx
@@ -71,31 +71,29 @@ interface DisplayVideoItem {
export default function VetGallery({ testimonials = [] }: { testimonials?: TestimonialItem[] }) {
const getText = useSettingsStore(state => state.getText);
const [apiVideos, setApiVideos] = useState
-