-
-
وضعیت تحویل
-
- {getStatusIcon(order.status)}
- {getStatusLabel(order.status)}
-
+ {/* Summary Stats */}
+
+
+
وضعیت تحویل
+
+ {getStatusIcon(order.status)}
+ {getStatusLabel(order.status)}
-
-
کد رهگیری
-
{toPersian(order.trackingNumber)}
+
+
+
کد رهگیری
+
{toPersian(order.trackingNumber)}
+
+
+
زمان ثبت
+
+
+ {toPersian(orderDate.toLocaleTimeString("fa-IR", { hour: '2-digit', minute: '2-digit' }))}
-
-
زمان ثبت
-
-
- {toPersian(orderDate.toLocaleTimeString("fa-IR", { hour: '2-digit', minute: '2-digit' }))}
-
-
-
+
+
- {/* Items List */}
-
-
-
- سبد محصولات خریده شده
+ {/* Items List */}
+
+
+
+ سبد محصولات خریده شده
+
+
+ {(order.items || []).map((item: any) => (
+
+
+
+
+
+
+
{item.product.name}
+
{toPersian(item.quantity)} عدد × {toPersian(item.product.priceValue.toLocaleString())} تومان
+
+
+
+
{toPersian((item.product.priceValue * item.quantity).toLocaleString())} تومان
+
+
+ ))}
+
+
+
+ {/* Shipping & Payment */}
+
+
+
+
+ اطلاعات ارسال
-
- {(order.items || []).map((item: any) => (
-
-
-
-
-
-
-
{item.product.name}
-
{toPersian(item.quantity)} عدد × {toPersian(item.product.priceValue.toLocaleString())} تومان
-
-
-
-
{toPersian((item.product.priceValue * item.quantity).toLocaleString())} تومان
-
-
- ))}
+
+ تهران، خیابان ولیعصر، بالاتر از میدان ونک، بنبست آفتاب، پلاک ۱۲، واحد ۳
+
+
+
+
+
+ جزئیات پرداخت
+
+
+
+ جمع ناخالص
+ {toPersian(order.total.toLocaleString())} تومان
+
+
+ تخفیف هوشمند
+ {toPersian("۰")} تومان
+
+
+ مبلغ نهایی
+ {toPersian(order.total.toLocaleString())} تومان
+
-
-
- {/* Shipping & Payment */}
-
-
-
-
- اطلاعات ارسال
-
-
- تهران، خیابان ولیعصر، بالاتر از میدان ونک، بنبست آفتاب، پلاک ۱۲، واحد ۳
-
-
-
-
-
- جزئیات پرداخت
-
-
-
- جمع ناخالص
- {toPersian(order.total.toLocaleString())} تومان
-
-
- تخفیف هوشمند
- {toPersian("۰")} تومان
-
-
- مبلغ نهایی
- {toPersian(order.total.toLocaleString())} تومان
-
-
-
-
+
+
{/* Footer Actions */}
-
-
+
+
diff --git a/frontend/application/components/PetProfile.tsx b/frontend/application/components/PetProfile.tsx
index 85f55bdc..df6895ca 100644
--- a/frontend/application/components/PetProfile.tsx
+++ b/frontend/application/components/PetProfile.tsx
@@ -4,16 +4,16 @@ import { Product, PetType } from "../lib/data/products";
import { productService } from "../lib/services/productService";
import { motion, AnimatePresence } from "motion/react";
import { PetProfileSkeleton } from "./Skeleton";
-import {
- Dog,
- Cat,
- ChevronRight,
- ChevronLeft,
- Heart,
- Activity,
- Weight,
- Calendar,
- ShieldCheck,
+import {
+ Dog,
+ Cat,
+ ChevronRight,
+ ChevronLeft,
+ Heart,
+ Activity,
+ Weight,
+ Calendar,
+ ShieldCheck,
Stethoscope,
Plus,
Clock,
@@ -37,7 +37,7 @@ import { toPersian, cn } from "../lib/utils";
import { useRouter } from 'next/navigation';
-export default function PetProfile({ initialView, advisorNeed }: {
+export default function PetProfile({ initialView, advisorNeed }: {
initialView?: "index" | "detail" | "add" | "edit",
advisorNeed?: string | null
}) {
@@ -70,7 +70,7 @@ export default function PetProfile({ initialView, advisorNeed }: {
if (isLoading && view === "detail" && activePet) {
return (
);
}
@@ -101,7 +101,7 @@ export default function PetProfile({ initialView, advisorNeed }: {
if (!activePet) return [];
return orders.filter(o => o.petId === activePet.id);
}, [activePet, orders]);
-
+
const [step, setStep] = useState(1);
const [formData, setFormData] = useState
>({
name: "",
@@ -152,7 +152,7 @@ export default function PetProfile({ initialView, advisorNeed }: {
if (activePet) {
const today = new Date().toISOString().split('T')[0];
toggleReminder(activePet.id, reminder.id, today);
-
+
const isCompleting = !reminder.completedDates.includes(today);
if (isCompleting) {
toast.success(`دوز ${reminder.title} تایید شد`);
@@ -162,9 +162,9 @@ export default function PetProfile({ initialView, advisorNeed }: {
const recommendedProducts = useMemo(() => {
if (!activePet || products.length === 0) return [];
-
+
let picks: { product: Product, reason?: string }[] = [];
-
+
// Priority: Medical Conditions
if (activePet.medicalConditions.includes("جراحی مفاصل")) {
const gag = products.find(p => p.id === "canhydrox-gag");
@@ -172,23 +172,23 @@ export default function PetProfile({ initialView, advisorNeed }: {
}
if (activePet.medicalConditions.includes("زایمان اخیر") || activePet.medicalConditions.includes("بارداری")) {
- const booster = products.find(p => p.id === "immun-booster");
- if (booster) picks.push({ product: booster, reason: "حمایت حیاتی دوران بارداری و زایمان" });
+ const booster = products.find(p => p.id === "immun-booster");
+ if (booster) picks.push({ product: booster, reason: "حمایت حیاتی دوران بارداری و زایمان" });
}
if (activePet.medicalConditions.includes("مشکلات گوارشی")) {
- const moor = products.find(p => p.id === "moor-tranke");
- if (moor) picks.push({ product: moor, reason: "تنظیم تخصصی سیستم گوارش" });
+ const moor = products.find(p => p.id === "moor-tranke");
+ if (moor) picks.push({ product: moor, reason: "تنظیم تخصصی سیستم گوارش" });
}
if (activePet.medicalConditions.includes("ریزش موی شدید")) {
- const lachs = products.find(p => p.id === "lachs-ol");
- if (lachs) picks.push({ product: lachs, reason: "تقویت تارهای مو و کنترل ریزش" });
+ const lachs = products.find(p => p.id === "lachs-ol");
+ if (lachs) picks.push({ product: lachs, reason: "تقویت تارهای مو و کنترل ریزش" });
}
if (activePet.medicalConditions.includes("بیاشتهایی")) {
- const energy = products.find(p => p.id === "energy-gel");
- if (energy) picks.push({ product: energy, reason: "تامین فوری انرژی و تحریک اشتها" });
+ const energy = products.find(p => p.id === "energy-gel");
+ if (energy) picks.push({ product: energy, reason: "تامین فوری انرژی و تحریک اشتها" });
}
// Biological factors
@@ -268,22 +268,22 @@ export default function PetProfile({ initialView, advisorNeed }: {
همدمهای من
مدیریت شناسنامههای سلامت و سوابق درمانی