diff --git a/apps/infoalloggi/src/components/servizio/annuncio_card.tsx b/apps/infoalloggi/src/components/servizio/annuncio_card.tsx index c2ad616..ef26396 100644 --- a/apps/infoalloggi/src/components/servizio/annuncio_card.tsx +++ b/apps/infoalloggi/src/components/servizio/annuncio_card.tsx @@ -1,9 +1,6 @@ -import { ExternalLink } from "lucide-react"; import Image from "next/image"; -import Link from "next/link"; import { AnnuncioActions } from "~/components/servizio/annuncio_actions"; import { Interactions } from "~/components/servizio/interactions"; -import { Button } from "~/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle } from "~/components/ui/card"; import { handleConsegna } from "~/lib/annuncio_details"; import { getStorageUrl } from "~/lib/storage_utils"; @@ -45,35 +42,40 @@ export const BasicAnnuncioCard = ({ const { t } = useTranslation(); return ( - - - Codice: {data.codice} + + + Annuncio {data.codice} {actions} - -
- {data.codice} -
- {interactions} + +
+
+
+ {data.codice} +
-
+
+ {data.titolo_it} +
+ +
{handleConsegna({ @@ -84,25 +86,15 @@ export const BasicAnnuncioCard = ({ subito: t.card.consegna_subito, })} - {formatCurrency(data.prezzo / 1e2)} + + {formatCurrency(data.prezzo / 1e2)} +
-
- {data.titolo_it || data.codice} -
- - {data.stato !== "Sospeso" && data.web && ( - - - - )} -
+
+
+
{interactions}
diff --git a/apps/infoalloggi/src/components/servizio/annuncio_dettaglio.tsx b/apps/infoalloggi/src/components/servizio/annuncio_dettaglio.tsx index 894108e..ce7d65a 100644 --- a/apps/infoalloggi/src/components/servizio/annuncio_dettaglio.tsx +++ b/apps/infoalloggi/src/components/servizio/annuncio_dettaglio.tsx @@ -1,4 +1,4 @@ -import { ExternalLink, UnfoldVertical } from "lucide-react"; +import { Expand, ExternalLink } from "lucide-react"; import Link from "next/link"; import { replaceWithBr } from "~/lib/newlineToBr"; import { cn, formatCurrency } from "~/lib/utils"; @@ -6,16 +6,17 @@ import { useTranslation } from "~/providers/I18nProvider"; import type { Annunci } from "~/schemas/public/Annunci"; import type { AnnuncioRicerca } from "~/server/controllers/annunci.controller"; import { CarouselAnnuncio } from "../annuncio_card"; +import { + Credenza, + CredenzaBody, + CredenzaContent, + CredenzaDescription, + CredenzaHeader, + CredenzaTitle, + CredenzaTrigger, +} from "../custom_ui/credenza"; import { Badge } from "../ui/badge"; import { Button } from "../ui/button"; -import { - Dialog, - DialogContent, - DialogDescription, - DialogHeader, - DialogTitle, - DialogTrigger, -} from "../ui/dialog"; export const TipoBadge = ({ tipo }: { tipo: Annunci["tipo"] }) => { return ( @@ -37,70 +38,78 @@ export const AnnuncioDettaglio = ({ data }: { data: AnnuncioRicerca }) => { const { locale, t } = useTranslation(); return ( - - - - - - - Annuncio {data.codice} + + + + + Annuncio {data.codice} + - - Annuncio {data.codice} - - -
-
- -
- -
-
- - {data.stato === "Trattativa" && ( - - Annuncio in Trattativa - - )} + + Dettaglio + + + +
+
+
-
-
-
-
{t.card.codice}
+
+
+ + {data.stato === "Trattativa" && ( + + Annuncio in Trattativa + + )} +
-
Cod: {data.codice}
+
+
+
+
{t.card.codice}
+ +
+ Cod: {data.codice} +
+
+
+
{t.card.prezzo}
+ +
+ {formatCurrency(data.prezzo / 1e2)} +
+
-
-
{t.card.prezzo}
-
- {formatCurrency(data.prezzo / 1e2)} +
+
{t.card.titolo}
+ +
+ {locale === "it" ? data.titolo_it : data.titolo_en}
-
-
-
{t.card.titolo}
- -
- {locale === "it" ? data.titolo_it : data.titolo_en} -
-
- -
-
{
-
- -
+ + + ); }; diff --git a/apps/infoalloggi/src/components/servizio/interactions.tsx b/apps/infoalloggi/src/components/servizio/interactions.tsx index d15d34d..9cfff27 100644 --- a/apps/infoalloggi/src/components/servizio/interactions.tsx +++ b/apps/infoalloggi/src/components/servizio/interactions.tsx @@ -190,7 +190,7 @@ export const Interactions = () => { const { data } = useServizioAnnuncio(); return ( -
+
diff --git a/apps/infoalloggi/src/components/servizio/main.tsx b/apps/infoalloggi/src/components/servizio/main.tsx index fdbc6eb..2a5bcf6 100644 --- a/apps/infoalloggi/src/components/servizio/main.tsx +++ b/apps/infoalloggi/src/components/servizio/main.tsx @@ -43,7 +43,7 @@ const ServizioCard = ({ return ( @@ -218,32 +218,6 @@ export const ServizioContent = () => { - {/*
-
-
-
- - Contatti sbloccati -
- - {openContattiAnnunci.length} / 10 - -
- -
-
-
- - Durata servizio: -
- - {`${new Date(servizio.decorrenza).toLocaleDateString("it-IT")} - ${new Date(add(servizio.decorrenza, { days: 60 })).toLocaleDateString("it-IT")}`} - -
-
*/} {annuncioConfermato.length > 0 && (
diff --git a/apps/infoalloggi/src/components/servizio/modale_contatti.tsx b/apps/infoalloggi/src/components/servizio/modale_contatti.tsx index a7f6667..430173a 100644 --- a/apps/infoalloggi/src/components/servizio/modale_contatti.tsx +++ b/apps/infoalloggi/src/components/servizio/modale_contatti.tsx @@ -49,7 +49,7 @@ export const ContattiProprietarioModal = () => { {isUnlocked ? (