fix: unify coordinate precision labels

This commit is contained in:
ik
2026-09-21 18:12:10 +07:00
parent 31b720f7b3
commit 675cd8ba4e
7 changed files with 23 additions and 11 deletions
+6
View File
@@ -28,6 +28,12 @@ export function freshnessStatus(value: string | null | undefined, now = Date.now
return now - timestamp > 48 * 60 * 60 * 1000 ? "stale" : "fresh";
}
export type CoordinatePrecision = "exact" | "approximate" | "area" | "missing";
export function coordinatePrecisionLabel(value: CoordinatePrecision | string | null | undefined): string {
return ({ exact: "точные", approximate: "приблизительные", area: "район", missing: "не указаны" } as Record<string, string>)[value ?? ""] ?? "не указаны";
}
export type PassportStatus = "verified" | "unverified" | "incomplete" | "insufficient" | "blocked";
export type PassportDisplayStatus = PassportStatus | "conflict" | "stale";