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