PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.4.8
Booking for Appointments and Events Calendar – Amelia v2.4.8
2.4.9 2.4.8 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 / views / admin / customize / steps / Cabinet / common / parts / PaymentButton.vue
ameliabooking / v3 / src / views / admin / customize / steps / Cabinet / common / parts Last commit date
CollapseCard 1 month ago AppointmentBooking.vue 1 month ago CancelPopup.vue 1 month ago DeleteProfile.vue 1 month ago Filters.vue 1 month ago PaymentButton.vue 1 month ago Skeleton.vue 1 month ago TimeZoneSelect.vue 1 month ago
PaymentButton.vue
76 lines
1 <template>
2 <AmButton :size="props.btnSize" :suffix="arrowDown" class="am-button-single" :class="props.class">
3 {{ labelsDisplay('pay_now_btn') }}
4 </AmButton>
5 </template>
6
7 <script setup>
8 // * Import from Vue
9 import { computed, inject, defineComponent } from 'vue'
10
11 // * Components
12 import AmButton from '../../../../../../_components/button/AmButton.vue'
13 import IconComponent from '../../../../../../_components/icons/IconComponent.vue'
14
15 // * Composables
16 import { useReactiveCustomize } from '../../../../../../../assets/js/admin/useReactiveCustomize.js'
17
18 let props = defineProps({
19 reservation: {
20 type: Object,
21 default: () => {},
22 },
23 bookable: {
24 type: Object,
25 default: () => {},
26 },
27 btnSize: {
28 type: String,
29 default: 'mini',
30 },
31 class: {
32 type: String,
33 default: '',
34 },
35 })
36
37 let arrowDown = defineComponent({
38 components: { IconComponent },
39 template: `<IconComponent icon="arrow-down"></IconComponent>`,
40 })
41
42 /*************
43 * Customize *
44 *************/
45 // * Customize
46 const { amCustomize } = useReactiveCustomize()
47
48 // * Labels
49 let langKey = inject('langKey')
50 let amLabels = inject('labels')
51
52 let pageRenderKey = inject('pageRenderKey')
53 let stepName = inject('stepName')
54
55 // * Label computed function
56 function labelsDisplay(label) {
57 let computedLabel = computed(() => {
58 return amCustomize.value[pageRenderKey.value][stepName.value].translations &&
59 amCustomize.value[pageRenderKey.value][stepName.value].translations[label] &&
60 amCustomize.value[pageRenderKey.value][stepName.value].translations[label][langKey.value]
61 ? amCustomize.value[pageRenderKey.value][stepName.value].translations[label][langKey.value]
62 : amLabels[label]
63 })
64
65 return computedLabel.value
66 }
67 </script>
68
69 <script>
70 export default {
71 name: 'PaymentButton',
72 }
73 </script>
74
75 <style lang="scss"></style>
76