From 3e3f05136c48d9da9c6e9d6e11bd17981528eef0 Mon Sep 17 00:00:00 2001 From: AV77web Date: Thu, 28 May 2026 23:55:28 +0200 Subject: [PATCH] correzione pagina movimenti con colonne distanziate --- src/app/(management)/movimenti/page.tsx | 169 ++++++++++++++---------- 1 file changed, 99 insertions(+), 70 deletions(-) diff --git a/src/app/(management)/movimenti/page.tsx b/src/app/(management)/movimenti/page.tsx index 5fb2b13..4329706 100644 --- a/src/app/(management)/movimenti/page.tsx +++ b/src/app/(management)/movimenti/page.tsx @@ -42,7 +42,7 @@ export default function MovimentiPage() { return (
-
+
{/* Header */}

Movimenti

@@ -94,81 +94,110 @@ export default function MovimentiPage() {

I movimenti appariranno qui quando effettuerai carichi o scarichi

) : ( -
- {movimenti.map((movimento) => ( -
- {/* Icona tipo */} -
- {movimento.tipo_movimento === 1 ? ( - - - - ) : ( - - - - )} -
+
+ {/* Header tabella */} +
+
Tipo
+
Articolo
+
Carico
+
Scarico
+
Magazzino
+
Data / Utente
+
Causale
+
- {/* Info articolo */} -
-

- {movimento.articolo_descrizione} -

-

- {movimento.articolo_codice} -

-
+ {/* Righe */} +
+ {movimenti.map((movimento) => { + const isCarico = movimento.tipo_movimento === 1; + + return ( +
+ {/* Tipo */} +
+
+ {isCarico ? ( + + + + ) : ( + + + + )} +
+
- {/* Quantità */} -
- {movimento.tipo_movimento === 1 ? "+" : "-"}{movimento.quantita} -
+ {/* Articolo */} +
+

+ {movimento.articolo_descrizione} +

+

+ {movimento.articolo_codice} +

+
- {/* Magazzino */} -
-

- {movimento.tipo_movimento === 1 ? "Destinazione" : "Origine"} -

-

- {movimento.tipo_movimento === 1 - ? movimento.magazzino_destinazione - : movimento.magazzino_origine} -

-
+ {/* Quantità Carico */} +
+ {isCarico ? ( + + +{movimento.quantita} + + ) : ( + - + )} +
- {/* Data e utente */} -
-

- {formatDate(movimento.data_movimento)} -

-

- {movimento.utente} -

-
+ {/* Quantità Scarico */} +
+ {!isCarico ? ( + + -{movimento.quantita} + + ) : ( + - + )} +
- {/* Causale */} - {movimento.causale && ( -
-

- {movimento.causale} -

+ {/* Magazzino */} +
+

+ {isCarico ? "Destinazione" : "Origine"} +

+

+ {isCarico + ? movimento.magazzino_destinazione || "-" + : movimento.magazzino_origine || "-"} +

+
+ + {/* Data / Utente */} +
+

+ {formatDate(movimento.data_movimento)} +

+

+ {movimento.utente || "-"} +

+
+ + {/* Causale */} +
+

+ {movimento.causale || "-"} +

+
- )} -
- ))} + ); + })} +
)}