Sum format function

This commit is contained in:
anime committed 2024-09-18 17:17:17 +06:00
1 parent 3fecbcd880
commit f7a1bef554
3 files changed
+8 -13

No files matched your search

+8 -1
View File
@@ -30,6 +30,12 @@ const TenderCard: React.FC<Props> = ({
plan_summ_decimal,
address_of_organization,
}: Props) => {
function formatNumber(value: string) {
return new Intl.NumberFormat("ru-RU", {
style: "decimal",
useGrouping: true,
}).format(parseInt(value));
}
return (
<div className="w-full min-h-[213px] bg-white shadow-sm rounded-sm flex gap-[82px] items-center p-6">
<div className="w-[830px] flex flex-col">
@@ -51,9 +57,10 @@ const TenderCard: React.FC<Props> = ({
<div className="w-[290px]">
<p className="text-[14px] leading-6 mb-[6px]">Планируемая сумма</p>
<Title
text={`${parseInt(plan_summ_decimal)} сом`}
text={`${formatNumber(plan_summ_decimal)} сом`}
className="font-extrabold text-[24px] leading-[38px] mb-4"
/>
<p className="text-[14px] leading-6 mb-4">
Окончание приема заявок: {date_of_offer_datetime.slice(0, 10)}
</p>