diff --git a/frontend/vue-gewoscout/src/assets/emailTemplate.html b/frontend/vue-gewoscout/src/assets/emailTemplate.html new file mode 100644 index 0000000..780fb12 --- /dev/null +++ b/frontend/vue-gewoscout/src/assets/emailTemplate.html @@ -0,0 +1,302 @@ + + + + + + +
+ +
+
+
+ +
+
+
+
Modern 3-Bedroom Apartment in Central Vienna
+
+ 1010 Vienna +
+
+
+
+
+

Rooms

+

3

+
+
+

Area

+

95 m²

+
+
+
+
+
+

+ Availability Date +

+

+ Year Built +

+

+ HWG Energy Class +

+

+ FGEE Energy Class +

+

+ Rent Price Per Month +

+

+ Cooperative Share +

+

+ Sale Price +

+

+ Additional Fees +

+
+
+

2024-09-01

+

2019

+

A

+

A+

+

€ 1200

+

€ 5000

+

€ 350000

+

€ 6500

+
+
+
+ +
+
+
+
+ + \ No newline at end of file diff --git a/frontend/vue-gewoscout/src/components/SearchResultList.vue b/frontend/vue-gewoscout/src/components/SearchResultList.vue index c43d60f..907d4e3 100644 --- a/frontend/vue-gewoscout/src/components/SearchResultList.vue +++ b/frontend/vue-gewoscout/src/components/SearchResultList.vue @@ -3,16 +3,38 @@ import Button from 'primevue/button'; import Card from 'primevue/card'; import ScrollTop from 'primevue/scrolltop'; import ProgressSpinner from 'primevue/progressspinner'; +import Divider from 'primevue/divider'; +import Dialog from 'primevue/dialog'; import { useListingsStore } from '@/common/store'; +import { ref, type Ref } from 'vue'; +import type { Listing } from '@/types/ApiResponseListings'; const listingsStore = useListingsStore(); +const detailsDialogVisible = ref(false); + +const selectedListing: Ref = ref(null); + function redirectToApartment(index: number) { if (listingsStore.listings !== null) { window.open(listingsStore.listings[index].detailsUrl, '_blank'); } } +function redirectToApartmentFromDetails() { + if (selectedListing.value !== null) { + window.open(selectedListing.value.detailsUrl, '_blank'); + } +} + +function openDetails(index: number) { + detailsDialogVisible.value = true; + + if (listingsStore.listings !== null) { + selectedListing.value = listingsStore.listings[index]; + } +} + window.onscroll = () => { const bottomOfWindow = document.documentElement.scrollTop + window.innerHeight === @@ -47,22 +69,24 @@ window.onscroll = () => {