source: ReserveNGo-frontend/src/components/Project/Locale_listing_container.vue

Last change on this file was f49ddda, checked in by Aleksandarj03 <138524804+Aleksandarj03@…>, 4 months ago

Added more details page

  • Property mode set to 100644
File size: 1.1 KB
Line 
1<script>
2import Local_in_local_listing from '@/components/Project/local_in_local_listing.vue'
3import { defineComponent } from 'vue'
4
5export default defineComponent({
6 components: { Local_in_local_listing },
7
8 data() {
9 return {
10 /*locale: {
11 name: 'Restaurant name',
12 address: 'Restaurant address',
13 workingHours: '00:00',
14 availableServices: ['pet Friendly', 'WiFI'],
15 averageRating: 0,
16 },*/
17 locals: [],
18 }
19 },
20 mounted() {
21 fetch('http://localhost:8080/api/locals')
22 .then(res => res.json())
23 .then(data => this.locals = data)
24 .catch(err => console.log(err));
25 },
26})
27</script>
28
29<template>
30 <div id="container" class="">
31 <div v-for="locale in locals" :key="locale">
32 <Local_in_local_listing
33 :local="locale"/>
34 <!-- <Local_in_local_listing/>-->
35 </div>
36
37 <!-- <Local_in_local_listing/>
38 <Local_in_local_listing/>
39 <Local_in_local_listing/>
40 <Local_in_local_listing/>-->
41 </div>
42</template>
43
44<style scoped>
45#container {
46 margin: 30px auto;
47}
48</style>
Note: See TracBrowser for help on using the repository browser.