feat: unify currency display to toman across the application

This commit is contained in:
hamed
2026-07-03 10:31:16 +03:30
parent 79f7df2e4d
commit 5bec4848a2
8 changed files with 116 additions and 12 deletions
+4 -3
View File
@@ -4,6 +4,7 @@ import ArrowLeftB from "@/components/icons/ArrowLeftB";
import { Button, MenuItem, Select, FormControl, InputLabel } from "@mui/material";
import ButtonFixed from "./ButtonFixed";
import { request } from "@/services/response";
import { formatToman } from "@/lib/money";
const PAYMENT_TTL = 900;
@@ -44,7 +45,7 @@ function Paying({ setStep, appointmentId, expiresAt, doctor, data, isForAnother,
return `${m}:${s.toString().padStart(2, "0")}`;
};
const rials = feeRials != null ? feeRials.toLocaleString("fa-IR") : "—";
const toman = feeRials != null ? formatToman(feeRials) : "—";
const patientName = isForAnother
? [data?.name?.value, data?.family?.value].filter(Boolean).join(" ").trim()
: data?.name?.value;
@@ -105,7 +106,7 @@ function Paying({ setStep, appointmentId, expiresAt, doctor, data, isForAnother,
مبلغ قابل پرداخت
</span>
<span className="text-[#3B3B3B] text-[18px] md:text-[20px] font-bold">
{rials} <span className="text-[14px] font-normal text-[#616161]">ریال</span>
{toman} <span className="text-[14px] font-normal text-[#616161]">تومان</span>
</span>
</div>
@@ -203,7 +204,7 @@ function Paying({ setStep, appointmentId, expiresAt, doctor, data, isForAnother,
}
>
<span className={`text-[#FFF] text-[16px] font-medium ${loading ? "opacity-0" : ""}`}>
{testMode ? "پرداخت آزمایشی" : `پرداخت ${rials} ریال`}
{testMode ? "پرداخت آزمایشی" : `پرداخت ${toman} تومان`}
</span>
{!loading && <ArrowLeftB />}
</Button>