Changeset f49ddda
- Timestamp:
- 01/25/25 21:06:36 (3 months ago)
- Branches:
- master
- Children:
- d9884b2
- Parents:
- 78b9d99
- Files:
-
- 10 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
ReserveNGo-frontend/src/PiniaStores/restaurantStore.js
r78b9d99 rf49ddda 8 8 state(){ 9 9 return { 10 id: '', 10 11 name: '', 11 12 address: '', … … 17 18 }, 18 19 actions: { 19 setDetails (name, address, workingHours, availableServices) { 20 setDetails (id, name, address, workingHours, availableServices) { 21 this.id = id 20 22 this.name = name 21 23 this.address = address -
ReserveNGo-frontend/src/components/Project/Locale_.vue
r78b9d99 rf49ddda 1 1 <script> 2 3 import { restaurantStore } from '@/PiniaStores/restaurantStore.js' 2 4 3 5 export default { 4 6 data() { 5 7 return { 6 locale:{ 7 id: 'id', 8 name: 'name_of_local', 9 } 8 locale:{}, 9 10 10 } 11 11 }, 12 mounted() { 13 fetch(`http://localhost:8080/api/locals/${restaurantStore().id}`) 14 .then(res => res.json()) 15 .then(data => this.locale = data) 16 .catch(err => console.log(err)); 17 }, 18 12 19 } 20 /*console.log(restaurantStore().id)*/ 13 21 14 22 </script> … … 16 24 <template> 17 25 <div id="container" class="border my-3 p-2"> 26 18 27 <h3>{{locale.id}}</h3> 19 28 <h5>{{locale.name}}</h5> -
ReserveNGo-frontend/src/components/Project/Locale_details.vue
r78b9d99 rf49ddda 19 19 20 20 <template> 21 <div id="container" class=" borderpx-5 py-2">21 <div id="container" class="px-5 py-2"> 22 22 <p>Local details...</p> 23 23 <p>Working hours: {{restaurantStore.workingHours}}</p> … … 38 38 39 39 font-size: 20px; 40 margin: 30px auto; 41 border: transparent; 42 /*border-radius: 10px;*/ 43 border-left: 3px solid #8377D1; 44 background-color: lightgray; 45 40 46 41 47 } -
ReserveNGo-frontend/src/components/Project/Locale_listing_container.vue
r78b9d99 rf49ddda 28 28 29 29 <template> 30 <div id="container" class=" border">30 <div id="container" class=""> 31 31 <div v-for="locale in locals" :key="locale"> 32 32 <Local_in_local_listing … … 44 44 <style scoped> 45 45 #container { 46 margin: 30px auto; 46 47 } 47 48 </style> -
ReserveNGo-frontend/src/components/Project/local_in_local_listing.vue
r78b9d99 rf49ddda 43 43 let restaurantStore_ = restaurantStore() 44 44 45 restaurantStore_.setDetails(this.local.name, this.local.address, this.local.workingHours, this.local.availableServices) 45 console.log(restaurantStore_) 46 restaurantStore_.setDetails(this.local.id,this.local.name, this.local.address, this.local.workingHours, this.local.availableServices) 46 47 48 console.log(restaurantStore().id) 47 49 48 50 } … … 57 59 <template> 58 60 59 <div id="container" class="border my-3 p-2" @click="handleClick()"> 60 <h3>{{local.name}}</h3> 61 <div id="container" class=" my-3 p-2" @click="handleClick()"> 62 <div class="info"> 63 <h3>{{local.name}}</h3> 61 64 <h5>{{local.address}}</h5> 62 65 </div> 66 <div class="like"> 67 <button class="btn btn-dark">Add to favourites</button> 68 </div> 63 69 </div> 64 70 </template> … … 69 75 70 76 height: 10vh; 77 display: flex; 78 justify-content: space-between; 79 align-items: center; 80 border-left: 3px solid #8377D1; 81 background: #FBFFF1; 82 /*border-radius: 10px;*/ 71 83 72 84
Note:
See TracChangeset
for help on using the changeset viewer.