fix(rgi+portal): default sort desc by termen, fix overlaps, tooltip

RGI (both pages):
- Default sort: Termen descrescator (cel mai in viitor sus)

Portal map:
- Basemap switcher moved left (right-12) to avoid zoom controls overlap
- Selection toolbar moved up (bottom-8) to avoid attribution overlap
- Download button has title tooltip on mobile cards

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
AI Assistant
2026-03-25 06:52:22 +02:00
parent 2cd35c790d
commit 6f46a85ff3
2 changed files with 7 additions and 6 deletions
+1 -1
View File
@@ -577,7 +577,7 @@ export default function RgiTestPage() {
"solved",
);
const [searchQuery, setSearchQuery] = useState("");
const [sortState, setSortState] = useState<SortState>(null);
const [sortState, setSortState] = useState<SortState>({ key: "dueDate", dir: "desc" });
// Column visibility
const [visibleCols, setVisibleCols] = useState<Set<string>>(
+6 -5
View File
@@ -588,7 +588,7 @@ function RgiContent() {
const [downloadingAppPk, setDownloadingAppPk] = useState<number | null>(null);
const [filterMode, setFilterMode] = useState<"all" | "solved" | "confirmed">("solved");
const [searchQuery, setSearchQuery] = useState("");
const [sortState, setSortState] = useState<SortState>(null);
const [sortState, setSortState] = useState<SortState>({ key: "dueDate", dir: "desc" });
const [visibleCols, setVisibleCols] = useState<Set<string>>(
() => new Set(ALL_COLUMNS.filter((c) => c.defaultVisible).map((c) => c.key)),
@@ -920,6 +920,7 @@ function RgiContent() {
<button
type="button"
className="mt-0.5 shrink-0"
title={`Descarca toate documentele cererii ${app.appNo}`}
onClick={(e) => { e.stopPropagation(); void downloadAllForApp(app); }}
disabled={downloadingAppPk === pk}
>
@@ -1536,8 +1537,8 @@ function HartaContent() {
</div>
</div>
{/* Top-right: basemap switcher + simple feature info */}
<div className="absolute top-2 right-2 z-10 flex flex-col items-end gap-2">
{/* Top-right: basemap switcher + simple feature info (offset to avoid zoom controls) */}
<div className="absolute top-2 right-12 z-10 flex flex-col items-end gap-2">
<PortalBasemapSwitcher value={basemap} onChange={setBasemap} />
{clickedFeature && selectionMode === "off" && (
<div className="bg-background/95 backdrop-blur-sm border rounded-lg shadow-lg w-56 sm:w-64 overflow-hidden">
@@ -1583,8 +1584,8 @@ function HartaContent() {
)}
</div>
{/* Bottom: selection toolbar — centered on mobile */}
<div className="absolute bottom-4 left-1/2 -translate-x-1/2 sm:left-3 sm:translate-x-0 z-10">
{/* Bottom: selection toolbar — centered on mobile, above attribution */}
<div className="absolute bottom-8 left-1/2 -translate-x-1/2 sm:left-3 sm:translate-x-0 z-10">
<SelectionToolbar
selectedFeatures={selectedFeatures}
selectionMode={selectionMode}