change format number to fa

This commit is contained in:
MehrdadAdabi 2025-10-21 16:23:30 +03:30
parent 5bb9776ef0
commit ec461d178b

View File

@ -5,17 +5,14 @@ import {
Menu, Menu,
PanelLeft, PanelLeft,
Server, Server,
Settings,
User, User,
} from "lucide-react"; } from "lucide-react";
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { Link } from "react-router";
import { Button } from "~/components/ui/button"; import { Button } from "~/components/ui/button";
import { Calendar as CustomCalendar } from "~/components/ui/Calendar"; import { Calendar as CustomCalendar } from "~/components/ui/Calendar";
import { useAuth } from "~/contexts/auth-context"; import { useAuth } from "~/contexts/auth-context";
import apiService from "~/lib/api"; import apiService from "~/lib/api";
import { cn, EventBus } from "~/lib/utils"; import { cn, EventBus, handleDataValue } from "~/lib/utils";
interface HeaderProps { interface HeaderProps {
onToggleSidebar?: () => void; onToggleSidebar?: () => void;
className?: string; className?: string;
@ -267,12 +264,16 @@ export function Header({
<div className="flex flex-row gap-1.5 w-max"> <div className="flex flex-row gap-1.5 w-max">
<span className="text-md">از</span> <span className="text-md">از</span>
<span className="text-md">{selectedDate?.sinceMonth}</span> <span className="text-md">{selectedDate?.sinceMonth}</span>
<span className="text-md">{currentYear.since}</span> <span className="text-md">
{handleDataValue(currentYear.since)}
</span>
</div> </div>
<div className="flex flex-row gap-1.5 w-max"> <div className="flex flex-row gap-1.5 w-max">
<span className="text-md">تا</span> <span className="text-md">تا</span>
<span className="text-md">{selectedDate?.fromMonth}</span> <span className="text-md">{selectedDate?.fromMonth}</span>
<span className="text-md">{currentYear.until}</span> <span className="text-md">
{handleDataValue(currentYear.until)}
</span>
</div> </div>
</div> </div>
) : ( ) : (
@ -286,7 +287,7 @@ export function Header({
title="از" title="از"
nextYearHandler={prevFromYearHandler} nextYearHandler={prevFromYearHandler}
prevYearHandler={nextFromYearHandler} prevYearHandler={nextFromYearHandler}
currentYear={currentYear?.since} currentYear={handleDataValue(currentYear?.since)}
monthList={monthList} monthList={monthList}
selectedDate={selectedDate?.sinceMonth} selectedDate={selectedDate?.sinceMonth}
selectDateHandler={selectFromDateHandler} selectDateHandler={selectFromDateHandler}
@ -296,7 +297,7 @@ export function Header({
title="تا" title="تا"
nextYearHandler={prevUntilYearHandler} nextYearHandler={prevUntilYearHandler}
prevYearHandler={nextUntilYearHandler} prevYearHandler={nextUntilYearHandler}
currentYear={currentYear?.until} currentYear={handleDataValue(currentYear?.until)}
monthList={monthList} monthList={monthList}
selectedDate={selectedDate?.fromMonth} selectedDate={selectedDate?.fromMonth}
selectDateHandler={selectUntilDateHandler} selectDateHandler={selectUntilDateHandler}