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 / common / SbsFormConstruction / MainContent / parts / MainProfileFooter.vue
ameliabooking / v3 / src / views / common / SbsFormConstruction / MainContent / parts Last commit date
MainContentFooter.vue 5 days ago MainContentHeader.vue 2 weeks ago MainPanelHeader.vue 1 month ago MainProfileFooter.vue 1 month ago
MainProfileFooter.vue
158 lines
1 <template>
2 <div class="am-cappf" :style="cssVars">
3 <div
4 class="am-cappf__options"
5 :class="{
6 'am-only-one': display === 'second' || !amSettings.roles.allowCustomerDeleteProfile,
7 }"
8 >
9 <div v-if="display === 'first' && amSettings.roles.allowCustomerDeleteProfile">
10 <AmButton
11 category="danger"
12 :size="props.parentWidth <= 360 ? 'small' : 'default'"
13 :type="props.deleteFooterType"
14 class="am-cappf__delete"
15 :disabled="loading"
16 @click="deleteProfileDialog = true"
17 >
18 {{ displayLabels('delete_profile') }}
19 </AmButton>
20 </div>
21 <div v-if="display === 'first' || display === 'third'">
22 <AmButton
23 :type="props.saveFooterButton"
24 :size="props.parentWidth <= 360 ? 'small' : 'default'"
25 :disabled="loading"
26 @click="display === 'first' ? saveProfileChanges() : saveCustomerCustomFields()"
27 >
28 {{ displayLabels('save_changes') }}
29 </AmButton>
30 </div>
31 <div v-if="display === 'second'">
32 <AmButton
33 :type="props.passFooterButton"
34 :size="props.parentWidth <= 360 ? 'small' : 'default'"
35 :disabled="loading"
36 @click="changeProfilePassword()"
37 >
38 {{ displayLabels('change_password') }}
39 </AmButton>
40 </div>
41 </div>
42 </div>
43 </template>
44
45 <script setup>
46 // * _components
47 import AmButton from '../../../../_components/button/AmButton.vue'
48
49 // * Import from Vue
50 import { inject, computed, ref } from 'vue'
51
52 // * Composables
53 import { useColorTransparency } from '../../../../../assets/js/common/colorManipulation'
54
55 // * Components properties
56 let props = defineProps({
57 parentWidth: {
58 type: Number,
59 default: 1200,
60 },
61 display: {
62 type: String,
63 default: 'first',
64 },
65 loading: {
66 type: Boolean,
67 default: false,
68 },
69 customizedLabels: {
70 type: Object,
71 default: () => {
72 return {}
73 },
74 },
75 deleteFooterType: {
76 type: String,
77 default: 'plain',
78 },
79 saveFooterButton: {
80 type: String,
81 default: 'filled',
82 },
83 passFooterButton: {
84 type: String,
85 default: 'filled',
86 },
87 })
88
89 // * Labels
90 const amLabels = inject('labels')
91 function displayLabels(label) {
92 return Object.keys(props.customizedLabels).length && props.customizedLabels[label]
93 ? props.customizedLabels[label]
94 : amLabels[label]
95 }
96
97 // * Settings
98 const amSettings = inject('settings')
99
100 // * Injected Functions
101 let deleteProfileDialog = inject('deleteProfileDialog', ref(false))
102 let saveProfileChanges = inject('saveProfileChanges', () => {})
103 let saveCustomerCustomFields = inject('saveCustomerCustomFields', () => {})
104 let changeProfilePassword = inject('changeProfilePassword', () => {})
105
106 // * Colors
107 let amColors = inject('amColors')
108
109 let cssVars = computed(() => {
110 return {
111 // am - amelia
112 // cappf - cabinet panel profile footer
113 '--am-c-cappf-bgr': amColors.value.colorMainBgr,
114 '--am-c-cappf-text': amColors.value.colorMainText,
115 '--am-c-cappf-text-op15': useColorTransparency(amColors.value.colorMainText, 0.15),
116 }
117 })
118 </script>
119
120 <script>
121 export default {
122 name: 'MainProfileFooter',
123 }
124 </script>
125
126 <style lang="scss">
127 @mixin profile-footer-block {
128 // am - amelia
129 // cappf - cabinet panel profile footer
130 .am-cappf {
131 position: absolute;
132 bottom: 0;
133 left: 0;
134 width: 100%;
135 padding: 12px;
136 background-color: var(--am-c-cappf-bgr);
137 box-shadow: 0 -2px 3px var(--am-c-cappf-text-op15);
138
139 &__options {
140 display: flex;
141 justify-content: space-between;
142
143 &.am-only-one {
144 justify-content: flex-end;
145 }
146 }
147 }
148 }
149
150 .amelia-v2-booking #amelia-container {
151 @include profile-footer-block;
152 }
153
154 #amelia-app-backend-new #amelia-container {
155 @include profile-footer-block;
156 }
157 </style>
158