PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.4.6
Booking for Appointments and Events Calendar – Amelia v2.4.6
2.4.7 2.4.6 2.4.5 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 / assets / js / admin / payment.js
ameliabooking / v3 / src / assets / js / admin Last commit date
admin.js 1 month ago appointment.js 1 month ago booking.js 1 month ago customers.js 1 month ago event.js 1 month ago package.js 1 month ago payment.js 1 month ago socialAuthOptions.js 1 month ago status.js 1 month ago useReactiveCustomize.js 6 days ago
payment.js
61 lines
1 import { reactive } from 'vue'
2
3 const globalLabels = reactive(window.wpAmeliaLabels)
4
5 function usePaymentGatewayName(payment) {
6 if (payment.gateway === 'onSite') {
7 return globalLabels.on_site
8 }
9
10 if (payment.gateway === 'wc') {
11 return payment.gatewayTitle
12 }
13
14 if (payment.gateway) {
15 return payment.gateway.charAt(0).toUpperCase() + payment.gateway.slice(1)
16 }
17 }
18
19 function usePaymentStatusName(status) {
20 switch (status) {
21 case 'paid':
22 return globalLabels.paid
23
24 case 'pending':
25 return globalLabels.pending
26
27 case 'partiallyPaid':
28 return globalLabels.partially_paid
29
30 case 'refunded':
31 return globalLabels.refunded
32 }
33 }
34
35 function usePaymentStatusIcon(status, amColors) {
36 switch (status) {
37 case 'paid':
38 return {
39 icon: 'am-icon-checkmark-circle',
40 color: amColors.colorSuccess,
41 }
42 case 'pending':
43 return {
44 icon: 'am-icon-refresh',
45 color: amColors.colorWarning,
46 }
47 case 'partiallyPaid':
48 return {
49 icon: 'am-icon-prepaid',
50 color: amColors.colorPrimary,
51 }
52 case 'refunded':
53 return {
54 icon: 'am-icon-refund',
55 color: amColors.colorError,
56 }
57 }
58 }
59
60 export { usePaymentGatewayName, usePaymentStatusName, usePaymentStatusIcon }
61