source: ReserveNGo-frontend/src/PiniaStores/restaurantStore.js@ 7d8eeab

Last change on this file since 7d8eeab was dad25fc, checked in by Aleksandarj03 <138524804+Aleksandarj03@…>, 38 hours ago

Rewrote logic for login and register and added Add Restaurant functionality for the admin

  • Property mode set to 100644
File size: 592 bytes
Line 
1
2
3import {defineStore} from 'pinia'
4
5
6export const restaurantStore = defineStore('restaurantStore', {
7
8 state(){
9 return {
10 id: '',
11 name: '',
12 address: '',
13 workingHours: '',
14 availableServices: [],
15 averageRating: 0
16
17 }
18 },
19 actions: {
20 setDetails (id, name, address, workingHours, availableServices) {
21 this.id = id
22 this.name = name
23 this.address = address
24 this.workingHours = workingHours
25 this.availableServices = availableServices
26 },
27 newRestaurant (id) {
28 this.id = id
29 }
30 },
31 getters: {
32
33 }
34
35
36
37})
Note: See TracBrowser for help on using the repository browser.