Last change
on this file since faaad0c was 6662a14, checked in by Aleksandarj03 <138524804+Aleksandarj03@…>, 8 weeks ago |
Finished logic for customer and reorganized the components
|
-
Property mode
set to
100644
|
File size:
1.4 KB
|
Line | |
---|
1 |
|
---|
2 |
|
---|
3 | import {defineStore} from 'pinia'
|
---|
4 |
|
---|
5 |
|
---|
6 | export const restaurantStore = defineStore('restaurantStore', {
|
---|
7 |
|
---|
8 | state(){
|
---|
9 | return {
|
---|
10 | id: '',
|
---|
11 | name: '',
|
---|
12 | description: '',
|
---|
13 | address: '',
|
---|
14 | workingHours: '',
|
---|
15 | availableServices: [],
|
---|
16 | averageRating: 0,
|
---|
17 | events: [],
|
---|
18 | restaurantPhotos: [],
|
---|
19 | menuPhoto: '',
|
---|
20 | menuLink: '',
|
---|
21 | contact: '',
|
---|
22 | logo: '',
|
---|
23 | }
|
---|
24 | },
|
---|
25 | actions: {
|
---|
26 | setRestaurant (id, name, description, address, workingHours, logo, averageRating) {
|
---|
27 | this.id = id
|
---|
28 | this.name = name
|
---|
29 | this.description = description
|
---|
30 | this.address = address
|
---|
31 | this.workingHours = workingHours
|
---|
32 | this.logo = logo
|
---|
33 | this.averageRating = averageRating
|
---|
34 | },
|
---|
35 | setRestaurantDetails (id, name, description, address, workingHours, availableServices, averageRating, events, restaurantPhotos, menuPhoto, menuLink, contact, logo) {
|
---|
36 | this.id=id;
|
---|
37 | this.name = name;
|
---|
38 | this.description = description
|
---|
39 | this.address = address
|
---|
40 | this.workingHours = workingHours
|
---|
41 | this.availableServices = availableServices
|
---|
42 | this.averageRating = averageRating
|
---|
43 | this.events = events
|
---|
44 | this.restaurantPhotos = restaurantPhotos
|
---|
45 | this.menuPhoto = menuPhoto
|
---|
46 | this.menuLink = menuLink
|
---|
47 | this.contact = contact
|
---|
48 | this.logo = logo
|
---|
49 | },
|
---|
50 | newRestaurant (id) {
|
---|
51 | this.id = id
|
---|
52 | },
|
---|
53 | clearRestaurant () {
|
---|
54 | this.setRestaurant(null)
|
---|
55 | }
|
---|
56 | },
|
---|
57 | getters: {
|
---|
58 |
|
---|
59 | }
|
---|
60 |
|
---|
61 |
|
---|
62 |
|
---|
63 | })
|
---|
Note:
See
TracBrowser
for help on using the repository browser.