source: ReserveNGo-frontend/src/PiniaStores/restaurantStore.js

Last change on this file was dad25fc, checked in by Aleksandarj03 <138524804+Aleksandarj03@…>, 37 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
RevLine 
[590f667]1
2
3import {defineStore} from 'pinia'
4
5
6export const restaurantStore = defineStore('restaurantStore', {
7
8 state(){
9 return {
[f49ddda]10 id: '',
[590f667]11 name: '',
[f9ef3e8]12 address: '',
[ff641e1]13 workingHours: '',
[f9ef3e8]14 availableServices: [],
15 averageRating: 0
[590f667]16
17 }
18 },
19 actions: {
[f49ddda]20 setDetails (id, name, address, workingHours, availableServices) {
21 this.id = id
[590f667]22 this.name = name
[f9ef3e8]23 this.address = address
24 this.workingHours = workingHours
[ff641e1]25 this.availableServices = availableServices
[dad25fc]26 },
27 newRestaurant (id) {
28 this.id = id
[590f667]29 }
30 },
31 getters: {
32
33 }
34
35
36
37})
Note: See TracBrowser for help on using the repository browser.