Fix FutureForecast settlement info

This commit is contained in:
2569718930@qq.com
2026-03-18 00:41:54 +08:00
parent f2547e11b6
commit 15a2fb91d1
3 changed files with 83 additions and 27 deletions
@@ -534,6 +534,28 @@ export function FutureForecastModal() {
);
const ai = parseAiAnalysis(detail.ai_analysis);
const risk = detail.risk || {};
const settlementSourceCode = String(
detail.current?.settlement_source || "",
).toLowerCase();
const isOfficialSettlementSource =
settlementSourceCode === "hko" || settlementSourceCode === "cwa";
const settlementProfileLabel = isOfficialSettlementSource
? locale === "en-US"
? "Settlement source"
: "结算源"
: t("section.airport");
const settlementProfileValue =
settlementSourceCode === "hko"
? locale === "en-US"
? "Hong Kong Observatory (HKO)"
: "香港天文台 (HKO)"
: settlementSourceCode === "cwa"
? locale === "en-US"
? "Central Weather Administration (CWA)"
: "交通部中央气象署 (CWA)"
: risk.airport
? `${risk.airport}${risk.icao ? ` (${risk.icao})` : ""}`
: "--";
return (
<div
@@ -899,12 +921,9 @@ export function FutureForecastModal() {
<>
<div className="risk-row">
<span className="risk-label">
{t("section.airport")}
</span>
<span>
{risk.airport}
{risk.icao ? ` (${risk.icao})` : ""}
{settlementProfileLabel}
</span>
<span>{settlementProfileValue}</span>
</div>
<div className="risk-row">
<span className="risk-label">