PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / trunk
Booking for Appointments and Events Calendar – Amelia vtrunk
2.4.4 2.4.3 2.4.2 2.4.1 2.4 trunk 1.2.1 1.2.10 1.2.11 1.2.12 1.2.13 1.2.14 1.2.15 1.2.16 1.2.17 1.2.18 1.2.19 1.2.2 1.2.20 1.2.21 1.2.22 1.2.23 1.2.24 1.2.25 1.2.26 1.2.27 1.2.28 1.2.29 1.2.3 1.2.30 1.2.31 1.2.32 1.2.33 1.2.34 1.2.35 1.2.36 1.2.37 1.2.38 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.1.3 2.2 2.2.1 2.3
ameliabooking / v3 / src / store / modules / coupon.js
ameliabooking / v3 / src / store / modules Last commit date
appointment.js 5 days ago appointmentWaitingListOptions.js 5 days ago attendee.js 5 days ago auth.js 5 days ago bookableType.js 5 days ago booking.js 5 days ago cabinet.js 5 days ago cabinetFilters.js 5 days ago coupon.js 5 days ago customFields.js 5 days ago customerInfo.js 5 days ago employee.js 5 days ago entities.js 5 days ago event.js 5 days ago eventBooking.js 5 days ago eventEntities.js 5 days ago eventWaitingListOptions.js 5 days ago pagination.js 5 days ago params.js 5 days ago payment.js 5 days ago persons.js 5 days ago recurring.js 5 days ago shortcodeParams.js 5 days ago stepByStepFilters.js 5 days ago tickets.js 5 days ago
coupon.js
82 lines
1 export default {
2 namespaced: true,
3
4 state: () => ({
5 code: '',
6 discount: '',
7 deduction: '',
8 limit: '',
9 error: '',
10 loading: false,
11 required: false,
12 servicesIds: [],
13 }),
14
15 getters: {
16 getCoupon(state) {
17 return {
18 code: state.code,
19 discount: state.discount,
20 deduction: state.deduction,
21 limit: state.limit,
22 required: state.required,
23 servicesIds: state.servicesIds,
24 }
25 },
26
27 getCouponValidated(state) {
28 return !state.required || state.code !== ''
29 },
30
31 getCode(state) {
32 return state.code
33 },
34
35 getError(state) {
36 return state.error
37 },
38
39 getLoading(state) {
40 return state.loading
41 },
42 },
43
44 mutations: {
45 setCoupon(state, payload) {
46 state.code = payload.code
47 state.discount = payload.discount
48 state.deduction = payload.deduction
49 state.limit = payload.limit
50 state.servicesIds = payload.servicesIds
51 },
52
53 setCode(state, payload) {
54 state.code = payload
55 },
56
57 setError(state, payload) {
58 state.error = payload
59 },
60
61 setLoading(state, payload) {
62 state.loading = payload
63 },
64
65 setCouponRequired(state, payload) {
66 state.required = payload
67 },
68 },
69
70 actions: {
71 resetCoupon({ commit }) {
72 commit('setCoupon', {
73 code: '',
74 discount: '',
75 deduction: '',
76 limit: '',
77 servicesIds: [],
78 })
79 },
80 },
81 }
82