feat: unify currency display to toman across the application
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user