Estende alla card degli eventi il fix delle date su iOS.
Il `min-w-0` di 366928b era finito solo in `ProfiloAmministrativo` perché
`Campo` e le classi degli input erano ricopiati identici in tre file: il
form «Nuovo evento» e la dashboard admin («Data tessera» in `grid-cols-2`)
sfondavano ancora la card. Ora `Campo` e `classiInput` stanno una volta
sola in `ui-bits` e le tre copie spariscono.
La regola CSS che rende ridimensionabili i controlli nativi copre anche
`input[type="time"]`, che nel form eventi sta affiancato alla data.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
107407b854
commit
2a1a0839c0
6 files changed
+47
-60
No files matched your search
+1
-14
@@ -16,7 +16,7 @@ import {
|
||||
} from "lucide-react";
|
||||
import { toast } from "sonner";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { PageHeader, Section, StatTile } from "@/components/crapp/ui-bits";
|
||||
import { Campo, classiInput, PageHeader, Section, StatTile } from "@/components/crapp/ui-bits";
|
||||
import { CampiProfilo } from "@/components/crapp/ProfiloAmministrativo";
|
||||
import {
|
||||
nomeCompleto,
|
||||
@@ -76,8 +76,6 @@ const statoClasse: Record<StatoScadenza | "presente" | "assente", string> = {
|
||||
assente: "bg-secondary text-muted-foreground",
|
||||
};
|
||||
|
||||
const classiInput = "w-full rounded-xl border border-border bg-background px-3 py-2 text-sm";
|
||||
|
||||
/** L'unico vincolo unique lato database sulla tabella è l'email: messaggio leggibile invece
|
||||
* del codice Postgres (23505). */
|
||||
function messaggioErrore(e: unknown, fallback: string): string {
|
||||
@@ -87,17 +85,6 @@ function messaggioErrore(e: unknown, fallback: string): string {
|
||||
return e instanceof Error ? e.message : fallback;
|
||||
}
|
||||
|
||||
function Campo({ label, children }: { label: string; children: React.ReactNode }) {
|
||||
return (
|
||||
<label className="block">
|
||||
<span className="text-xs font-bold uppercase tracking-wide text-muted-foreground">
|
||||
{label}
|
||||
</span>
|
||||
<span className="mt-1 block">{children}</span>
|
||||
</label>
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Pannello di modifica dell'admin (DD-017): dati squadra, dati personali e collegamento
|
||||
* all'account. I file restano fuori: l'admin li scarica, non li carica al posto di altri.
|
||||
|
||||
+6
-17
@@ -3,7 +3,7 @@ import { createFileRoute, Link } from "@tanstack/react-router";
|
||||
import { ArrowLeft, CalendarPlus, Loader2, Pencil, Trash2 } from "lucide-react";
|
||||
import { toast } from "sonner";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { PageHeader, Section } from "@/components/crapp/ui-bits";
|
||||
import { Campo, classiInput, PageHeader, Section } from "@/components/crapp/ui-bits";
|
||||
import { formatData } from "@/lib/crapp-data";
|
||||
import { nomeCompleto, useGiocatoriSquadra } from "@/lib/giocatori-squadra";
|
||||
import {
|
||||
@@ -151,7 +151,7 @@ function GestioneEventi() {
|
||||
maxLength={80}
|
||||
onChange={(e) => aggiorna({ titolo: e.target.value })}
|
||||
placeholder="Es. CRAP Volley vs Aurora Nera"
|
||||
className="w-full rounded-xl border border-border bg-background px-3 py-2 text-sm"
|
||||
className={classiInput}
|
||||
/>
|
||||
</Campo>
|
||||
|
||||
@@ -161,7 +161,7 @@ function GestioneEventi() {
|
||||
type="date"
|
||||
value={bozza.data}
|
||||
onChange={(e) => aggiorna({ data: e.target.value })}
|
||||
className="w-full rounded-xl border border-border bg-background px-3 py-2 text-sm"
|
||||
className={classiInput}
|
||||
/>
|
||||
</Campo>
|
||||
<Campo label="Ora">
|
||||
@@ -169,7 +169,7 @@ function GestioneEventi() {
|
||||
type="time"
|
||||
value={bozza.ora}
|
||||
onChange={(e) => aggiorna({ ora: e.target.value })}
|
||||
className="w-full rounded-xl border border-border bg-background px-3 py-2 text-sm"
|
||||
className={classiInput}
|
||||
/>
|
||||
</Campo>
|
||||
</div>
|
||||
@@ -179,7 +179,7 @@ function GestioneEventi() {
|
||||
value={bozza.luogo}
|
||||
maxLength={80}
|
||||
onChange={(e) => aggiorna({ luogo: e.target.value })}
|
||||
className="w-full rounded-xl border border-border bg-background px-3 py-2 text-sm"
|
||||
className={classiInput}
|
||||
/>
|
||||
</Campo>
|
||||
|
||||
@@ -189,7 +189,7 @@ function GestioneEventi() {
|
||||
maxLength={300}
|
||||
rows={2}
|
||||
onChange={(e) => aggiorna({ note: e.target.value })}
|
||||
className="w-full rounded-xl border border-border bg-background px-3 py-2 text-sm"
|
||||
className={classiInput}
|
||||
/>
|
||||
</Campo>
|
||||
|
||||
@@ -322,17 +322,6 @@ function GestioneEventi() {
|
||||
);
|
||||
}
|
||||
|
||||
function Campo({ label, children }: { label: string; children: React.ReactNode }) {
|
||||
return (
|
||||
<label className="block">
|
||||
<span className="text-xs font-bold uppercase tracking-wide text-muted-foreground">
|
||||
{label}
|
||||
</span>
|
||||
<span className="mt-1 block">{children}</span>
|
||||
</label>
|
||||
);
|
||||
}
|
||||
|
||||
function Interruttore({
|
||||
attivo,
|
||||
onClick,
|
||||
|
||||
Reference in new issue
Block a user