feat: update PostUnlock component to display contact information based on annuncio status
This commit is contained in:
parent
c6b462a54d
commit
79354f3833
1 changed files with 45 additions and 23 deletions
|
|
@ -276,7 +276,7 @@ function getNavigationUrl(lat: string, lon: string): string {
|
||||||
|
|
||||||
const PostUnlock = () => {
|
const PostUnlock = () => {
|
||||||
const { servizioId } = useServizio();
|
const { servizioId } = useServizio();
|
||||||
const { annuncioId } = useServizioAnnuncio();
|
const { annuncioId, data: annuncio } = useServizioAnnuncio();
|
||||||
const { data, isLoading } = api.annunci.getProprietarioData.useQuery({
|
const { data, isLoading } = api.annunci.getProprietarioData.useQuery({
|
||||||
annuncioId,
|
annuncioId,
|
||||||
servizioId,
|
servizioId,
|
||||||
|
|
@ -311,6 +311,27 @@ const PostUnlock = () => {
|
||||||
<CredenzaBody className="max-h-[80vh] overflow-auto pb-5 sm:max-w-xl">
|
<CredenzaBody className="max-h-[80vh] overflow-auto pb-5 sm:max-w-xl">
|
||||||
<div className="space-y-10">
|
<div className="space-y-10">
|
||||||
{/* Proprietario Section */}
|
{/* Proprietario Section */}
|
||||||
|
{annuncio.stato === "Sospeso" ? (
|
||||||
|
<section>
|
||||||
|
<h3 className="mb-2 font-semibold">{t.contatto.propietario}:</h3>
|
||||||
|
<p className="mb-2">{t.contatto.nome}: INFOALLOGGI (delegato)</p>
|
||||||
|
<div className="flex flex-wrap items-center gap-5">
|
||||||
|
<a
|
||||||
|
className="flex items-center gap-2 text-blue-600 hover:underline"
|
||||||
|
href={`tel:3453944827`}
|
||||||
|
>
|
||||||
|
<Phone className="size-4" />
|
||||||
|
<span>+39 3453944827</span>
|
||||||
|
</a>
|
||||||
|
<Link href={`https://wa.me/3453944827`} target="_blank">
|
||||||
|
<Button size="sm" variant="success">
|
||||||
|
<WhatsAppIcon2 className="size-4 fill-white" />
|
||||||
|
WhatsApp
|
||||||
|
</Button>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
) : (
|
||||||
<section>
|
<section>
|
||||||
<h3 className="mb-2 font-semibold">{t.contatto.propietario}:</h3>
|
<h3 className="mb-2 font-semibold">{t.contatto.propietario}:</h3>
|
||||||
<p className="mb-2">
|
<p className="mb-2">
|
||||||
|
|
@ -333,6 +354,7 @@ const PostUnlock = () => {
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* Immobile Section */}
|
{/* Immobile Section */}
|
||||||
<section>
|
<section>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue