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
eventWaitingListOptions.js
57 lines
| 1 | export default { |
| 2 | namespaced: true, |
| 3 | |
| 4 | state: () => ({ |
| 5 | addingMethod: "Manually", |
| 6 | enabled: false, |
| 7 | maxCapacity: 0, |
| 8 | maxExtraPeople: 0, |
| 9 | maxExtraPeopleEnabled: false, |
| 10 | peopleWaiting: 0, |
| 11 | // * maybe we should change "isAvailable" property name |
| 12 | isAvailable: false, |
| 13 | }), |
| 14 | |
| 15 | getters: { |
| 16 | getAvailability (state) { |
| 17 | return state.isAvailable |
| 18 | }, |
| 19 | |
| 20 | getOptions (state) { |
| 21 | return { |
| 22 | enabled: state.enabled, |
| 23 | maxCapacity: state.maxCapacity, |
| 24 | maxExtraPeople: state.maxExtraPeople, |
| 25 | maxExtraPeopleEnabled: state.maxExtraPeopleEnabled, |
| 26 | peopleWaiting: state.peopleWaiting |
| 27 | } |
| 28 | } |
| 29 | }, |
| 30 | |
| 31 | mutations: { |
| 32 | setAllData (state, payload) { |
| 33 | state.addingMethod = payload.addingMethod |
| 34 | state.enabled = payload.enabled |
| 35 | state.maxCapacity = payload.maxCapacity |
| 36 | state.maxExtraPeople = payload.maxExtraPeople |
| 37 | state.maxExtraPeopleEnabled = payload.maxExtraPeopleEnabled |
| 38 | state.peopleWaiting = payload.peopleWaiting |
| 39 | state.isAvailable = payload.isAvailable |
| 40 | } |
| 41 | }, |
| 42 | |
| 43 | actions: { |
| 44 | resetWaitingOptions ({commit}) { |
| 45 | commit('setAllData', { |
| 46 | addingMethod: "Manually", |
| 47 | enabled: false, |
| 48 | maxCapacity: 0, |
| 49 | maxExtraPeople: 0, |
| 50 | maxExtraPeopleEnabled: false, |
| 51 | peopleWaiting: 0, |
| 52 | isAvailable: false, |
| 53 | }) |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 |