| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <template>
- <div class="ng-signup-dialogs">
- <paystack-payment-dialog
- :visible="paymentVisible"
- :email="paymentEmail"
- :amount="paymentOrder.amount"
- :currency="paymentOrder.currency"
- readonly-email
- :before-close="cancelPayment"
- @continue="$refs.paystack.payWithPaystack()"
- >
- <guest-paystack
- v-if="paymentVisible"
- ref="paystack"
- :access-code="paymentOrder.accessCode"
- :reference="paymentOrder.reference"
- :amount="Number(paymentOrder.amount)"
- :currency="paymentOrder.currency"
- :email="paymentEmail"
- :paystackkey="paystackKey"
- :callback="paid"
- :close="cancelPayment"
- @error="$emit('payment-error', $event)"
- />
- </paystack-payment-dialog>
- <product-details-dialog
- :show-sales-price="false"
- :visible="productVisible"
- :product="product"
- :currency="currency"
- @update:visible="$emit('close-product')"
- />
- </div>
- </template>
- <script>
- import ProductDetailsDialog from '@/ui-refactor/components/ProductDetailsDialog.vue'
- import GuestPaystack from './GuestPaystack'
- import PaystackPaymentDialog from '@/ui-refactor/components/PaystackPaymentDialog.vue'
- export default {
- name: 'SignupDialogs',
- components: { GuestPaystack, ProductDetailsDialog, PaystackPaymentDialog },
- props: {
- paymentVisible: { type: Boolean, default: false },
- paymentOrder: { type: Object, required: true },
- paymentEmail: { type: String, default: '' },
- productVisible: { type: Boolean, default: false },
- product: { type: Object, required: true },
- currency: { type: String, default: '' }
- },
- data() {
- return { paystackKey: process.env.VUE_APP_BASE_PAY_STACK_PUBLIC_KEY || '' }
- },
- methods: {
- cancelPayment() {
- this.$emit('cancel-payment')
- },
- paid(response) {
- this.$emit('paid', response)
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .ng-public-layout .ng-signup-dialogs ::v-deep .el-dialog {
- max-width: calc(100% - 32px);
- }
- .ng-public-layout .ng-signup-dialogs ::v-deep .el-dialog__title {
- overflow-wrap: anywhere;
- }
- .ng-public-layout .ng-signup-dialogs ::v-deep .el-dialog__body {
- padding: 24px;
- }
- @media (max-width: 767px) {
- .ng-public-layout .ng-signup-dialogs ::v-deep .el-dialog__body {
- padding: 16px;
- }
- }
- </style>
|