appointment.js
1 year ago
attendee.js
1 year ago
auth.js
1 year ago
bookableType.js
3 years ago
booking.js
1 year ago
cabinet.js
1 year ago
cabinetFilters.js
1 year ago
coupon.js
2 years ago
customFields.js
2 years ago
customerInfo.js
1 year ago
employee.js
1 year ago
entities.js
1 year ago
event.js
1 year ago
eventBooking.js
3 years ago
eventEntities.js
1 year ago
eventWaitingListOptions.js
1 year ago
pagination.js
3 years ago
params.js
1 year ago
payment.js
2 years ago
persons.js
1 year ago
recurring.js
1 year ago
shortcodeParams.js
2 years ago
tickets.js
1 year ago
persons.js
59 lines
| 1 | export default { |
| 2 | namespaced: true, |
| 3 | |
| 4 | state: () => ({ |
| 5 | persons: 1, |
| 6 | max: 1, |
| 7 | min: 1, |
| 8 | }), |
| 9 | |
| 10 | getters: { |
| 11 | getMaxPersons (state) { |
| 12 | return state.max |
| 13 | }, |
| 14 | |
| 15 | getMinPersons (state) { |
| 16 | return state.min |
| 17 | }, |
| 18 | |
| 19 | getPersons (state) { |
| 20 | return state.persons |
| 21 | }, |
| 22 | |
| 23 | getAllData (state) { |
| 24 | return { |
| 25 | persons: state.persons, |
| 26 | max: state.max, |
| 27 | min: state.min |
| 28 | } |
| 29 | } |
| 30 | }, |
| 31 | |
| 32 | mutations: { |
| 33 | setMaxPersons (state, payload) { |
| 34 | state.max = payload |
| 35 | }, |
| 36 | |
| 37 | setMinPersons (state, payload) { |
| 38 | state.min = payload |
| 39 | }, |
| 40 | |
| 41 | setPersons (state, payload) { |
| 42 | state.persons = payload |
| 43 | }, |
| 44 | |
| 45 | setAllData (state, payload) { |
| 46 | state.persons = payload.persons |
| 47 | state.max = payload.max |
| 48 | state.min = payload.min |
| 49 | } |
| 50 | }, |
| 51 | |
| 52 | actions: { |
| 53 | resetPersons ({ commit }) { |
| 54 | commit('setPersons', 1) |
| 55 | commit('setMaxPersons', 1) |
| 56 | commit('setMinPersons', 1) |
| 57 | } |
| 58 | } |
| 59 | } |