PluginProbe ʕ •ᴥ•ʔ
Booking for Appointments and Events Calendar – Amelia / 2.4.8
Booking for Appointments and Events Calendar – Amelia v2.4.8
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 / parts / CartItemHead.vue
ameliabooking / v3 / src / views / admin / customize / steps / parts Last commit date
AddToCalendar.vue 1 month ago AppointmentInfo.vue 4 days ago AppointmentInfoService.vue 1 month ago Calendar.vue 1 month ago CartItemBody.vue 1 month ago CartItemHead.vue 1 month ago CustomerCongratsInfo.vue 1 month ago PackageInfo.vue 1 month ago PackageInfoService.vue 1 month ago PaymentCongratsInfo.vue 1 month ago PaymentPackageInfo.vue 1 month ago
CartItemHead.vue
178 lines
1 <template>
2 <div class="am-fs__cserv" :class="useResponsiveClass(wrapperWidth)" :style="cssVars">
3 <div class="am-fs__cserv-heading" :class="useResponsiveClass(wrapperWidth)">
4 <span
5 class="am-fs__cserv-heading-img"
6 :style="{ backgroundColor: `${props.data.service.color}` }"
7 >
8 {{ imagePlaceholder(props.data.service.name) }}
9 </span>
10 <p class="am-fs__cserv-name">
11 {{ props.data.service.name }}
12 </p>
13 </div>
14 <div class="am-fs__cserv-price" :class="useResponsiveClass(wrapperWidth)">
15 <span class="am-price">
16 {{ useFormattedPrice(servicePrice + extrasPrice) }}
17 </span>
18 </div>
19 </div>
20 </template>
21
22 <script setup>
23 // * Import from Vue
24 import { computed, inject } from 'vue'
25
26 // * Composable
27 import { useFormattedPrice } from '../../../../../assets/js/common/formatting'
28 import { useColorTransparency } from '../../../../../assets/js/common/colorManipulation'
29 import { useResponsiveClass } from '../../../../../assets/js/common/responsive'
30
31 let props = defineProps({
32 data: {
33 type: Object,
34 default: null,
35 },
36 globalClass: {
37 type: String,
38 default: '',
39 },
40 })
41
42 // * Features
43 let features = inject('features')
44
45 function imagePlaceholder(label) {
46 let shortLabel = ''
47
48 label.split(' ').forEach((item) => {
49 shortLabel += item.charAt(0).toUpperCase()
50 })
51
52 if (shortLabel.length > 3) shortLabel = shortLabel.slice(0, 3)
53
54 return shortLabel
55 }
56
57 let wrapperWidth = inject('wrapperWidth')
58 const baseUrls = inject('baseUrls')
59
60 let servicePrice = computed(() => {
61 return props.data.service.price * props.data.service.persons
62 })
63
64 let extrasPrice = computed(() => {
65 let price = 0
66 if (features.value.extras) {
67 props.data.extras.forEach((extra) => {
68 price += extra.price * extra.quantity * props.data.service.persons
69 })
70 }
71
72 return price
73 })
74
75 let amColors = inject('amColors')
76
77 let cssVars = computed(() => {
78 return {
79 '--am-c-cart-text': amColors.value.colorMainText,
80 '--am-c-cart-primary': amColors.value.colorPrimary,
81 '--am-c-cart-primary-op10': useColorTransparency(amColors.value.colorPrimary, 0.1),
82 }
83 })
84 </script>
85
86 <script>
87 export default {
88 name: 'CartItemHead',
89 }
90 </script>
91
92 <style lang="scss">
93 #amelia-app-backend-new {
94 #amelia-container {
95 // am - amelia
96 // fs - form steps
97 // cserv - cart service
98 .am-fs__cserv {
99 display: flex;
100 align-items: center;
101 justify-content: space-between;
102 width: 100%;
103
104 &.am-rw-360 {
105 flex-wrap: wrap;
106 }
107
108 * {
109 word-break: break-word;
110 }
111
112 img {
113 width: 40px;
114 height: 40px;
115 border-radius: 4px;
116 margin: 0 12px 0 0;
117 }
118
119 &-heading {
120 display: flex;
121 align-items: center;
122 justify-content: center;
123
124 &.am-rw-360 {
125 width: 100%;
126 justify-content: flex-start;
127 }
128
129 &-img {
130 width: 40px;
131 height: 40px;
132 border-radius: 4px;
133 font-size: 16px;
134 display: flex;
135 align-items: center;
136 justify-content: center;
137 flex: 0 0 auto;
138 color: var(--am-c-main-bgr);
139 margin-right: 12px;
140 }
141 }
142
143 &-name {
144 font-size: 15px;
145 font-weight: 500;
146 line-height: 1.6;
147 /* $shade-900 */
148 color: var(--am-c-cart-text);
149 }
150
151 &-price {
152 display: flex;
153 flex: 0 0 auto;
154 align-items: center;
155 justify-content: center;
156 padding: 2px 9px;
157 border-radius: 12px;
158 background-color: var(--am-c-cart-primary-op10);
159
160 &.am-rw-360 {
161 width: 100%;
162 margin-top: 8px;
163 }
164
165 .am-price {
166 display: block;
167 font-size: 14px;
168 font-weight: 500;
169 line-height: 1.42857;
170 /* $shade-900 */
171 color: var(--am-c-cart-primary);
172 }
173 }
174 }
175 }
176 }
177 </style>
178