| @@ -28,8 +28,9 @@ | ||
| 28 | 28 | import { Table as SharedTable } from "../components/shared/Table"; |
| 29 | 29 | import { SearchFilterToolbar, BulkActionToolbar } from "../components/shared"; |
| 30 | 30 | import { apiClient } from "../lib/api-client"; |
| 31 | 31 | import { __ } from "../lib/i18n"; |
| 32 | +import { toDateValue } from "../lib/dateFormat"; | |
| 32 | 33 | import { formatYatraMoney } from "../lib/currency-display"; |
| 33 | 34 | import PremiumUpgradeCard from "./premium-pages/DynamicPricing"; |
| 34 | 35 | import { |
| 35 | 36 | ResponsiveContainer, |
| @@ -223,9 +224,9 @@ | ||
| 223 | 224 | (stats as any)?.pricing_history_trend_last_30_days, |
| 224 | 225 | ) |
| 225 | 226 | ? (stats as any).pricing_history_trend_last_30_days.map((row: any) => { |
| 226 | 227 | const day = String(row.day || ""); |
| 227 | - const dateLabel = day ? new Date(day).toLocaleDateString() : ""; | |
| 228 | + const dateLabel = day ? toDateValue(day).toLocaleDateString() : ""; | |
| 228 | 229 | return { |
| 229 | 230 | day, |
| 230 | 231 | dateLabel, |
| 231 | 232 | events: Number(row.events) || 0, |
| @@ -1316,9 +1317,9 @@ | ||
| 1316 | 1317 | <XAxis |
| 1317 | 1318 | dataKey="day" |
| 1318 | 1319 | tick={{ fontSize: 12 }} |
| 1319 | 1320 | tickFormatter={(v: any) => |
| 1320 | - v ? new Date(String(v)).toLocaleDateString() : "" | |
| 1321 | + v ? toDateValue(String(v)).toLocaleDateString() : "" | |
| 1321 | 1322 | } |
| 1322 | 1323 | /> |
| 1323 | 1324 | <YAxis |
| 1324 | 1325 | tick={{ fontSize: 12 }} |
| @@ -1382,9 +1383,9 @@ | ||
| 1382 | 1383 | className="border-b border-gray-100 dark:border-gray-800" |
| 1383 | 1384 | > |
| 1384 | 1385 | <td className="py-3 px-4 text-gray-900 dark:text-white"> |
| 1385 | 1386 | {row.day |
| 1386 | - ? new Date( | |
| 1387 | + ? toDateValue( | |
| 1387 | 1388 | String(row.day), |
| 1388 | 1389 | ).toLocaleDateString() |
| 1389 | 1390 | : ""} |
| 1390 | 1391 | </td> |