From 2cd35c790d378497739ae5d9723072e8ce145d62 Mon Sep 17 00:00:00 2001 From: AI Assistant Date: Wed, 25 Mar 2026 06:25:12 +0200 Subject: [PATCH] =?UTF-8?q?fix(portal):=20mobile=20responsive=20=E2=80=94?= =?UTF-8?q?=20card=20view=20for=20RGI,=20visible=20map=20controls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mobile (< 640px): - RGI: card-based layout instead of table (shows nr cerere, status, solicitant, termen, rezolutie, UAT in compact card) - Header: compact "Portal" title, smaller tab buttons - Map: selection toolbar centered at bottom (always visible) - UAT info card: smaller text, truncated, doesn't overlap basemap switcher - Feature panel: narrower (w-56 vs w-64) - Filter buttons: smaller text Desktop (>= 640px): - Same table view as before (hidden on mobile) Co-Authored-By: Claude Opus 4.6 (1M context) --- src/app/(portal)/portal/page.tsx | 99 +++++++++++++++++++++++++------- 1 file changed, 78 insertions(+), 21 deletions(-) diff --git a/src/app/(portal)/portal/page.tsx b/src/app/(portal)/portal/page.tsx index 0228099..82427cf 100644 --- a/src/app/(portal)/portal/page.tsx +++ b/src/app/(portal)/portal/page.tsx @@ -767,11 +767,11 @@ function RgiContent() { }; return ( -
+
-

Documente Eliberate eTerra

-

- Lucrari depuse cu documente eliberate — descarca direct din eTerra RGI +

Documente Eliberate eTerra

+

+ Lucrari depuse cu documente eliberate

@@ -855,7 +855,7 @@ function RgiContent() { key={opt.id} onClick={() => setFilterMode(opt.id)} className={cn( - "px-3 py-1 text-xs rounded font-medium transition-colors", + "px-2 sm:px-3 py-1 text-[11px] sm:text-xs rounded font-medium transition-colors", filterMode === opt.id ? "bg-background shadow text-foreground" : "text-muted-foreground hover:text-foreground", @@ -906,8 +906,65 @@ function RgiContent() { )} + {/* Mobile card view */} {!loading && processed.length > 0 && ( - +
+ {processed.map((app) => { + const pk = app.applicationPk; + const isExpanded = expandedPk === pk; + const solved = app.hasSolution === 1; + return ( + + +
setExpandedPk(isExpanded ? null : pk)}> + +
+
+ {app.appNo} + + {app.statusName || app.stateCode || "-"} + +
+

{app.requester || app.deponent || "-"}

+
+ Termen: {fmtTs(app.dueDate)} + {app.resolutionName || "-"} + {app.uat && {app.uat}} +
+
+ {isExpanded ? : } +
+ {isExpanded && ( +
+ +
+ )} +
+
+ ); + })} +
+ )} + + {/* Desktop table view */} + {!loading && processed.length > 0 && ( +
@@ -1450,15 +1507,15 @@ function HartaContent() { layerVisibility={layerVisibility} /> - {/* Top-left: UAT info + change button */} -
-
+ {/* Top-left: UAT info + change button (responsive) */} +
+
-

{selectedUat?.name}

-

+

{selectedUat?.name}

+

{selectedUat?.county && `${selectedUat.county} - `}SIRUTA: {selectedSiruta} {selectedUat && selectedUat.localFeatures > 0 && ( - {selectedUat.localFeatures.toLocaleString()} parcele + {selectedUat.localFeatures.toLocaleString()} parcele )}

@@ -1480,10 +1537,10 @@ function HartaContent() {
{/* Top-right: basemap switcher + simple feature info */} -
+
{clickedFeature && selectionMode === "off" && ( -
+

{String(clickedFeature.properties.cadastral_ref ?? clickedFeature.properties.object_id ?? "Parcela")} @@ -1526,8 +1583,8 @@ function HartaContent() { )}

- {/* Bottom-left: selection toolbar */} -
+ {/* Bottom: selection toolbar — centered on mobile */} +
{/* Header */} -
-

Portal Cadastral

+
+

Portal

- - Documente RGI + + RGI - + Harta