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 / views / common / CatalogFormConstruction / Header / Header.vue
ameliabooking / v3 / src / views / common / CatalogFormConstruction / Header Last commit date
Header.vue 1 month ago
Header.vue
156 lines
1 <template>
2 <div class="am-cat__header-inner">
3 <div class="am-cat__back-btn">
4 <AmButton
5 v-if="props.backBtnVisibility"
6 :prefix="arrowLeft"
7 category="secondary"
8 :type="btnType"
9 :size="btnSize"
10 @click="goBack"
11 @keydown.enter="goBack"
12 >
13 {{ props.btnString }}
14 </AmButton>
15 </div>
16 <div v-if="props.cartBtnVisibility" class="am-cat__cart-btn">
17 <span class="am-cat__cart-number">
18 {{ props.cartItemsNumber }}
19 </span>
20 <AmButton
21 aria-label="Go to cart button"
22 category="secondary"
23 :type="btnType"
24 :size="btnSize"
25 :round="true"
26 :icon-only="true"
27 :icon="iconCart"
28 @click="goToCart"
29 >
30 </AmButton>
31 </div>
32 </div>
33 </template>
34
35 <script setup>
36 import AmButton from '../../../_components/button/AmButton.vue'
37 import IconComponent from '../../../_components/icons/IconComponent.vue'
38
39 import { defineComponent } from 'vue'
40 import { useStore } from 'vuex'
41 // * import composable
42 import { useRemoveLastCartItem } from '../../../../assets/js/public/cart'
43
44 let props = defineProps({
45 btnString: {
46 type: String,
47 default: '',
48 },
49 btnType: {
50 type: String,
51 default: 'plain',
52 },
53 btnSize: {
54 type: String,
55 default: 'mini',
56 },
57 backBtnVisibility: {
58 type: Boolean,
59 default: true,
60 },
61 cartBtnVisibility: {
62 type: Boolean,
63 default: false,
64 },
65 cartItemsNumber: {
66 type: Number,
67 default: 0,
68 },
69 })
70
71 let arrowLeft = defineComponent({
72 components: { IconComponent },
73 template: `<IconComponent icon="arrow-left"></IconComponent>`,
74 })
75
76 let iconCart = defineComponent({
77 components: { IconComponent },
78 template: `<IconComponent icon="cart"/>`,
79 })
80
81 let emits = defineEmits(['goBack', 'goToCart'])
82
83 function goBack() {
84 emits('goBack')
85 }
86
87 const store = useStore()
88
89 function goToCart() {
90 useRemoveLastCartItem(store)
91
92 emits('goToCart')
93 }
94 </script>
95
96 <script>
97 export default {
98 name: 'MainHeader',
99 }
100 </script>
101
102 <style lang="scss">
103 @mixin catalog-header {
104 .am-cat {
105 &__header {
106 &-inner {
107 display: flex;
108 align-items: center;
109 justify-content: space-between;
110 width: 100%;
111 }
112 }
113
114 &__back-btn {
115 width: 100%;
116 }
117
118 &__cart {
119 &-btn {
120 position: relative;
121
122 .am-icon-cart {
123 font-size: 24px;
124 }
125 }
126
127 &-number {
128 position: absolute;
129 top: -6px;
130 left: -6px;
131 width: 18px;
132 height: 18px;
133 display: flex;
134 align-items: center;
135 justify-content: center;
136 font-size: 12px;
137 line-height: 1;
138 border-radius: 50%;
139 background-color: var(--am-c-error);
140 color: var(--am-c-cat-main-bgr);
141 }
142 }
143 }
144 }
145
146 // Public
147 .amelia-v2-booking #amelia-container {
148 @include catalog-header;
149 }
150
151 // Admin
152 #amelia-app-backend-new #amelia-container {
153 @include catalog-header;
154 }
155 </style>
156