fix: unify coordinate precision labels
This commit is contained in:
@@ -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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user