Improve flat view

This commit is contained in:
Gautier P 2021-02-12 11:51:48 +01:00
parent 67da9a055e
commit 6862648d50

View File

@ -15,7 +15,7 @@
</h2> </h2>
<div class="grid"> <div class="grid">
<div class="left-panel"> <div class="left-panel">
<p> <span>
{{ flat.cost | cost(flat.currency) }} {{ flat.cost | cost(flat.currency) }}
<template v-if="flat.utilities === 'included'"> <template v-if="flat.utilities === 'included'">
{{ $t("flatsDetails.utilities_included") }} {{ $t("flatsDetails.utilities_included") }}
@ -23,13 +23,14 @@
<template v-else-if="flat.utilities === 'excluded'"> <template v-else-if="flat.utilities === 'excluded'">
{{ $t("flatsDetails.utilities_excluded") }} {{ $t("flatsDetails.utilities_excluded") }}
</template> </template>
</p> </span>
<span v-if="flat.flatisfy_postal_code.postal_code">
à {{ flat.flatisfy_postal_code.name }} ({{ flat.flatisfy_postal_code.postal_code }})
</span>
</div> </div>
<p class="right-panel right"> <span class="right-panel right">
{{ flat.area ? flat.area : '?' }} m<sup>2</sup>, <template v-if="flat.area"><span>{{flat.area}} m<sup>2</sup></span></template><template v-if="flat.rooms"><span>, {{flat.rooms}} {{ $tc("flatsDetails.rooms", flat.rooms) }}</span></template><template v-if="flat.bedrooms"><span>/ {{flat.bedrooms}} {{ $tc("flatsDetails.bedrooms", flat.bedrooms) }}</span></template>
{{ flat.rooms ? flat.rooms : '?' }} {{ $tc("flatsDetails.rooms", flat.rooms) }} / </span>
{{ flat.bedrooms ? flat.bedrooms : '?' }} {{ $tc("flatsDetails.bedrooms", flat.bedrooms) }}
</p>
</div> </div>
<div> <div>
<template v-if="flat.photos && flat.photos.length > 0"> <template v-if="flat.photos && flat.photos.length > 0">
@ -116,16 +117,18 @@
<div class="right-panel"> <div class="right-panel">
<h3>{{ $t("flatsDetails.Contact") }}</h3> <h3>{{ $t("flatsDetails.Contact") }}</h3>
<div class="contact"> <div class="contact">
<p>
<template v-if="flat.phone"> <template v-if="flat.phone">
<template v-for="phoneNumber in flat.phone.split(',')"> <p v-for="phoneNumber in flat.phone.split(',')">
<a :href="'tel:+33' + normalizePhoneNumber(phoneNumber)">{{ phoneNumber }}</a><br/> <a :href="'tel:+33' + normalizePhoneNumber(phoneNumber)">{{ phoneNumber }}</a>
</template>
</template>
<template v-else>
{{ $t("flatsDetails.no_phone_found") }}
</template>
</p> </p>
</template>
<template v-if="flat.urls.length == 1">
<a :href="flat.urls[0]" target="_blank">
{{ $tc("common.Original_post", 1) }}
<i class="fa fa-external-link" aria-hidden="true"></i>
</a>
</template>
<template v-else-if="flat.urls.length > 1">
<p>{{ $tc("common.Original_post", flat.urls.length) }} <p>{{ $tc("common.Original_post", flat.urls.length) }}
<ul> <ul>
<li v-for="(url, index) in flat.urls"> <li v-for="(url, index) in flat.urls">
@ -136,6 +139,7 @@
</li> </li>
</ul> </ul>
</p> </p>
</template>
</div> </div>
<h3>{{ $t("flatsDetails.Visit") }}</h3> <h3>{{ $t("flatsDetails.Visit") }}</h3>