diff --git a/src/core/auth/auth-options.ts b/src/core/auth/auth-options.ts index 86a18db..6d3760b 100644 --- a/src/core/auth/auth-options.ts +++ b/src/core/auth/auth-options.ts @@ -161,16 +161,6 @@ export const authOptions: NextAuthOptions = { (session as any).accessToken = token.accessToken; // Surface refresh failure so the client can force a re-login UX. if (token.error) (session as any).error = token.error; - // Temporary diagnostic — confirms whether jwt callback captured a - // refresh_token + expiry on sign-in. Reveal counts/booleans only, - // never the actual tokens. - (session as any).debug = { - hasRefreshToken: !!token.refreshToken, - accessTokenExpiresIn: - typeof token.accessTokenExpires === "number" - ? Math.round((token.accessTokenExpires - Date.now()) / 1000) - : null, - }; // Faza C cutover flag — exposed on session so client components can // branch the same way server routes do (env-driven, evaluated per // request so flag flip + container restart picks up without rebuild). diff --git a/src/modules/geoportal/v2/geoportal-v2.tsx b/src/modules/geoportal/v2/geoportal-v2.tsx index c248ed9..4ce3882 100644 --- a/src/modules/geoportal/v2/geoportal-v2.tsx +++ b/src/modules/geoportal/v2/geoportal-v2.tsx @@ -32,9 +32,12 @@ export function GeoportalV2() { }, []); const handleUatSelect = useCallback((uat: UatHit) => { - // Search response doesn't carry bbox/centroid yet — leave panel + let user pan. - // Future: enrich search response with uat bounding box, then flyTo. - console.info("UAT selected:", uat.siruta, uat.name); + // gis-api search doesn't return UAT bounds today, so we can't flyTo + // server-side. Workaround: deep-link to eterra.live/harta which has + // bbox lookup (their /api/geoportal/uat-bounds + flyTo). Future: + // add GET /api/v1/uat/:siruta/bounds to gis-api and fitBounds here. + const url = `https://eterra.live/harta?siruta=${encodeURIComponent(uat.siruta)}`; + window.open(url, "_blank", "noopener,noreferrer"); }, []); const handleFeatureSelect = useCallback((f: FeatureHit) => {