AddToCalendar.vue
1 month ago
AppointmentInfo.vue
5 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
CustomerCongratsInfo.vue
106 lines
| 1 | <template> |
| 2 | <div class="am-congrats__info-item" :class="responsiveClass"> |
| 3 | <span class="am-congrats__info-item__label"> {{ labelsDisplay('your_name_colon') }}: </span> |
| 4 | <span class="am-congrats__info-item__value"> |
| 5 | {{ `${customer.firstName} ${customer.lastName}` }} |
| 6 | </span> |
| 7 | </div> |
| 8 | <div class="am-congrats__info-item" :class="responsiveClass"> |
| 9 | <span class="am-congrats__info-item__label"> {{ labelsDisplay('email_address_colon') }}: </span> |
| 10 | <span class="am-congrats__info-item__value"> |
| 11 | {{ customer.email }} |
| 12 | </span> |
| 13 | </div> |
| 14 | <div class="am-congrats__info-item" :class="responsiveClass"> |
| 15 | <span class="am-congrats__info-item__label"> {{ labelsDisplay('phone_number_colon') }}: </span> |
| 16 | <span class="am-congrats__info-item__value"> |
| 17 | {{ customer.phone }} |
| 18 | </span> |
| 19 | </div> |
| 20 | </template> |
| 21 | |
| 22 | <script setup> |
| 23 | // * Import from Vue |
| 24 | import { inject, computed, ref } from 'vue' |
| 25 | |
| 26 | // * Composables |
| 27 | import { useResponsiveClass } from '../../../../../assets/js/common/responsive' |
| 28 | import { useReactiveCustomize } from '../../../../../assets/js/admin/useReactiveCustomize.js' |
| 29 | |
| 30 | // * Customize Object |
| 31 | const { amCustomize } = useReactiveCustomize() |
| 32 | |
| 33 | // * Form string recognition |
| 34 | let pageRenderKey = inject('pageRenderKey') |
| 35 | |
| 36 | // * Form step string recognition |
| 37 | let stepName = inject('stepName') |
| 38 | |
| 39 | // * Language string recognition |
| 40 | let langKey = inject('langKey') |
| 41 | |
| 42 | // * Labels |
| 43 | let amLabels = inject('labels') |
| 44 | |
| 45 | function labelsDisplay(label) { |
| 46 | let computedLabel = computed(() => { |
| 47 | let translations = amCustomize.value[pageRenderKey.value][stepName.value].translations |
| 48 | return translations && translations[label] && translations[label][langKey.value] |
| 49 | ? translations[label][langKey.value] |
| 50 | : amLabels[label] |
| 51 | }) |
| 52 | |
| 53 | return computedLabel.value |
| 54 | } |
| 55 | |
| 56 | let customer = ref({ |
| 57 | firstName: 'John', |
| 58 | lastName: 'Doe', |
| 59 | email: 'john.doe@amelia.com', |
| 60 | phone: '+12025550119', |
| 61 | }) |
| 62 | |
| 63 | // * Responsive - Container Width |
| 64 | let cWidth = inject('containerWidth') |
| 65 | |
| 66 | let componentWidth = computed(() => { |
| 67 | return cWidth.value |
| 68 | }) |
| 69 | |
| 70 | let responsiveClass = computed(() => useResponsiveClass(componentWidth.value)) |
| 71 | </script> |
| 72 | |
| 73 | <script> |
| 74 | export default { |
| 75 | name: 'CustomerCongratsInfo', |
| 76 | } |
| 77 | </script> |
| 78 | |
| 79 | <style lang="scss"> |
| 80 | @mixin congrats-info-item-block { |
| 81 | .am-congrats__info-item { |
| 82 | display: flex; |
| 83 | align-items: center; |
| 84 | justify-content: space-between; |
| 85 | margin-bottom: 12px; |
| 86 | |
| 87 | * { |
| 88 | font-size: 14px; |
| 89 | line-height: 1.42857; |
| 90 | } |
| 91 | |
| 92 | &__label { |
| 93 | color: var(--am-c-atc-text-op40); |
| 94 | } |
| 95 | |
| 96 | &__value { |
| 97 | color: var(--am-c-atc-text); |
| 98 | } |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | #amelia-app-backend-new #amelia-container { |
| 103 | @include congrats-info-item-block; |
| 104 | } |
| 105 | </style> |
| 106 |