From ec461d178bb1925c973ecfa50fbcde79f26308b4 Mon Sep 17 00:00:00 2001 From: MehrdadAdabi <126083584+mehrdadAdabi@users.noreply.github.com> Date: Tue, 21 Oct 2025 16:23:30 +0330 Subject: [PATCH] change format number to fa --- app/components/dashboard/header.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/app/components/dashboard/header.tsx b/app/components/dashboard/header.tsx index e80feaa..d654fc9 100644 --- a/app/components/dashboard/header.tsx +++ b/app/components/dashboard/header.tsx @@ -5,17 +5,14 @@ import { Menu, PanelLeft, Server, - Settings, User, } from "lucide-react"; import React, { useEffect, useRef, useState } from "react"; -import { Link } from "react-router"; import { Button } from "~/components/ui/button"; import { Calendar as CustomCalendar } from "~/components/ui/Calendar"; import { useAuth } from "~/contexts/auth-context"; import apiService from "~/lib/api"; -import { cn, EventBus } from "~/lib/utils"; - +import { cn, EventBus, handleDataValue } from "~/lib/utils"; interface HeaderProps { onToggleSidebar?: () => void; className?: string; @@ -267,12 +264,16 @@ export function Header({
از {selectedDate?.sinceMonth} - {currentYear.since} + + {handleDataValue(currentYear.since)} +
تا {selectedDate?.fromMonth} - {currentYear.until} + + {handleDataValue(currentYear.until)} +
) : ( @@ -286,7 +287,7 @@ export function Header({ title="از" nextYearHandler={prevFromYearHandler} prevYearHandler={nextFromYearHandler} - currentYear={currentYear?.since} + currentYear={handleDataValue(currentYear?.since)} monthList={monthList} selectedDate={selectedDate?.sinceMonth} selectDateHandler={selectFromDateHandler} @@ -296,7 +297,7 @@ export function Header({ title="تا" nextYearHandler={prevUntilYearHandler} prevYearHandler={nextUntilYearHandler} - currentYear={currentYear?.until} + currentYear={handleDataValue(currentYear?.until)} monthList={monthList} selectedDate={selectedDate?.fromMonth} selectDateHandler={selectUntilDateHandler}