ameliabooking
/
v3
/
src
/
views
/
public
/
Cabinet
/
common
/
Profile
/
parts
/
Integrations
/
IntegrationConnectBox.vue
ameliabooking
/
v3
/
src
/
views
/
public
/
Cabinet
/
common
/
Profile
/
parts
/
Integrations
Last commit date
AppleCalendarIntegration.vue
1 month ago
EmployeeIntegrations.vue
1 month ago
GoogleCalendarIntegration.vue
1 month ago
IntegrationCard.vue
1 month ago
IntegrationConnectBox.vue
1 month ago
OutlookCalendarIntegration.vue
1 month ago
StripeIntegration.vue
1 month ago
ZoomIntegration.vue
1 month ago
IntegrationConnectBox.vue
145 lines
| 1 | <template> |
| 2 | <div class="am-integration-connect-box"> |
| 3 | <div class="am-integration-connect-box__wrapper"> |
| 4 | <div class="am-integration-connect-box__icon"> |
| 5 | <img |
| 6 | :src="baseUrls.wpAmeliaPluginURL + '/v3/src/assets/img/icons/' + iconName + '.svg'" |
| 7 | height="30" |
| 8 | alt="" |
| 9 | aria-hidden="true" |
| 10 | /> |
| 11 | </div> |
| 12 | |
| 13 | <div class="am-integration-connect-box__content"> |
| 14 | <div class="am-integration-connect-box__info"> |
| 15 | <div class="am-integration-connect-box__title">{{ title }}</div> |
| 16 | <div class="am-integration-connect-box__description"> |
| 17 | {{ description }} |
| 18 | </div> |
| 19 | </div> |
| 20 | |
| 21 | <div v-if="isConnectButtonNeeded" class="am-integration-connect-box__actions"> |
| 22 | <AmButton |
| 23 | size="small" |
| 24 | :category="isConnected ? 'danger' : 'primary'" |
| 25 | :disabled="isDisabled" |
| 26 | @click="!isConnected ? onConnect?.() : onDisconnect?.()" |
| 27 | > |
| 28 | {{ isConnected ? amLabels.disconnect : amLabels.connect }} |
| 29 | </AmButton> |
| 30 | </div> |
| 31 | </div> |
| 32 | </div> |
| 33 | </div> |
| 34 | </template> |
| 35 | |
| 36 | <script setup> |
| 37 | import { inject } from 'vue' |
| 38 | const baseUrls = inject('baseUrls') |
| 39 | import AmButton from '../../../../../../_components/button/AmButton.vue' |
| 40 | |
| 41 | const amLabels = inject('amLabels') |
| 42 | |
| 43 | defineProps({ |
| 44 | title: { |
| 45 | type: String, |
| 46 | required: true, |
| 47 | }, |
| 48 | description: { |
| 49 | type: String, |
| 50 | default: '', |
| 51 | }, |
| 52 | isConnected: { |
| 53 | type: Boolean, |
| 54 | default: false, |
| 55 | }, |
| 56 | isConnectButtonNeeded: { |
| 57 | type: Boolean, |
| 58 | default: true, |
| 59 | }, |
| 60 | iconName: { |
| 61 | type: String, |
| 62 | required: true, |
| 63 | }, |
| 64 | onConnect: { |
| 65 | type: Function, |
| 66 | default: null, |
| 67 | }, |
| 68 | onDisconnect: { |
| 69 | type: Function, |
| 70 | default: null, |
| 71 | }, |
| 72 | isDisabled: { |
| 73 | type: Boolean, |
| 74 | default: false, |
| 75 | }, |
| 76 | }) |
| 77 | </script> |
| 78 | |
| 79 | <style lang="scss"> |
| 80 | @mixin am-integration-connect-box { |
| 81 | .am-integration-connect-box { |
| 82 | width: 100%; |
| 83 | |
| 84 | &__wrapper { |
| 85 | display: flex; |
| 86 | gap: 16px; |
| 87 | padding: 16px; |
| 88 | border-radius: 8px; |
| 89 | border: 1px solid $shade-200; |
| 90 | background: $am-white; |
| 91 | } |
| 92 | |
| 93 | &__icon { |
| 94 | display: flex; |
| 95 | justify-content: center; |
| 96 | align-items: center; |
| 97 | width: 40px; |
| 98 | height: 40px; |
| 99 | } |
| 100 | |
| 101 | &__content { |
| 102 | display: flex; |
| 103 | width: 100%; |
| 104 | justify-content: space-between; |
| 105 | gap: 12px; |
| 106 | |
| 107 | @media (max-width: 768px) { |
| 108 | flex-direction: column; |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | &__info { |
| 113 | display: flex; |
| 114 | flex-direction: column; |
| 115 | gap: 4px; |
| 116 | flex: 1; |
| 117 | } |
| 118 | |
| 119 | &__title { |
| 120 | font-size: 16px; |
| 121 | font-weight: 500; |
| 122 | color: var(--am-c-main-text); |
| 123 | } |
| 124 | |
| 125 | &__description { |
| 126 | font-size: 14px; |
| 127 | font-weight: 400; |
| 128 | line-height: 20px; |
| 129 | color: var(--am-c-main-text); |
| 130 | opacity: 0.7; |
| 131 | } |
| 132 | |
| 133 | &__actions { |
| 134 | display: flex; |
| 135 | align-items: center; |
| 136 | gap: 8px; |
| 137 | } |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | .amelia-v2-booking #amelia-container { |
| 142 | @include am-integration-connect-box; |
| 143 | } |
| 144 | </style> |
| 145 |