improvement: rtl direction, solar calendar and persian formatting added for persian users.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
'use client';
|
||||
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useLocale, useTranslations } from 'next-intl';
|
||||
import { TreatmentDetailSummaryRow } from '@/components/ui/treatment/TreatmentDetailSummaryRow';
|
||||
import { APP_DATE, formatAppDate } from '@/lib/i18n/format';
|
||||
import type { LinkedOrganizationOption, PastTreatment } from '@/types/treatment';
|
||||
import type { TreatmentCatalogEntry } from '@/types/treatment-catalog';
|
||||
|
||||
@@ -23,6 +24,7 @@ export function TreatmentPreviewCard({
|
||||
orgs,
|
||||
embedded = false,
|
||||
}: TreatmentPreviewCardProps) {
|
||||
const locale = useLocale();
|
||||
const t = useTranslations('treatment');
|
||||
|
||||
return (
|
||||
@@ -38,12 +40,7 @@ export function TreatmentPreviewCard({
|
||||
className="text-xs text-text-muted tabular-nums block"
|
||||
dateTime={treatment.treatmentAt}
|
||||
>
|
||||
{new Date(treatment.treatmentAt).toLocaleDateString(undefined, {
|
||||
weekday: 'short',
|
||||
year: 'numeric',
|
||||
month: 'short',
|
||||
day: 'numeric',
|
||||
})}
|
||||
{formatAppDate(treatment.treatmentAt, locale, APP_DATE.withWeekday)}
|
||||
</time>
|
||||
) : null}
|
||||
<div className="space-y-2 max-h-[min(280px,40vh)] overflow-y-auto pr-1">
|
||||
|
||||
Reference in New Issue
Block a user