@designcrowd/fe-shared-lib 1.1.3-kp-1 → 1.1.3-kp-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -13,19 +13,32 @@
|
|
|
13
13
|
</template>
|
|
14
14
|
<template #default>
|
|
15
15
|
<div class="tw-text-center tw-w-full tw-border-0 tw-border-solid tw-border-grayscale-400 tw-border-t tw-p-4">
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
<div v-if="isLoading" class="tw-flex tw-justify-center">
|
|
17
|
+
<Loader />
|
|
18
|
+
</div>
|
|
19
|
+
<div v-else>
|
|
20
|
+
<div class="tw-text-center tw-w-full">
|
|
21
|
+
<p class="tw-text-grayscale-600">Are you sure you want to delete this payment provider?</p>
|
|
22
|
+
<p class="tw-text-grayscale-600">
|
|
23
|
+
Once deleted, your site will no longer show any payment options to visitors. You won’t be able to accept
|
|
24
|
+
payments unless you set up a new provider.
|
|
25
|
+
</p>
|
|
26
|
+
</div>
|
|
22
27
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
<div
|
|
29
|
+
class="tw-font-sans tw-text-center tw-flex tw-gap-2 tw-justify-center tw-mt-4 tw-border-0 tw-border-solid tw-border-grayscale-400 tw-border-t"
|
|
30
|
+
:style="isMobile ? 'padding-left: 1.5rem; padding-right: 1.5rem;' : ''"
|
|
31
|
+
>
|
|
32
|
+
<Button label="Cancel" size="large" variant="outline" class="tw-my-4" @on-click="onCloseModal" />
|
|
33
|
+
<Button
|
|
34
|
+
label="Delete Provider"
|
|
35
|
+
variant="primary"
|
|
36
|
+
size="large"
|
|
37
|
+
class="tw-my-4"
|
|
38
|
+
@on-click="onConfirmDelete"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
29
42
|
</div>
|
|
30
43
|
</template>
|
|
31
44
|
</Modal>
|
|
@@ -33,11 +46,13 @@
|
|
|
33
46
|
<script>
|
|
34
47
|
import Modal from '../../../../src/atoms/components/Modal/Modal.vue';
|
|
35
48
|
import Button from '../../../../src/atoms/components/Button/Button.vue';
|
|
49
|
+
import Loader from '../../../../src/atoms/components/Loader/Loader.vue';
|
|
36
50
|
import brandPageApiClient from './../../clients/brand-page-api.client';
|
|
37
51
|
export default {
|
|
38
52
|
components: {
|
|
39
53
|
Modal,
|
|
40
54
|
Button,
|
|
55
|
+
Loader,
|
|
41
56
|
},
|
|
42
57
|
emits: ['close-modal'],
|
|
43
58
|
props: {
|
|
@@ -46,14 +61,22 @@ export default {
|
|
|
46
61
|
required: true,
|
|
47
62
|
default: () => ({}),
|
|
48
63
|
},
|
|
64
|
+
brandPageToken: {
|
|
65
|
+
type: String,
|
|
66
|
+
required: false,
|
|
67
|
+
},
|
|
49
68
|
},
|
|
69
|
+
data: () => ({
|
|
70
|
+
isLoading: false,
|
|
71
|
+
}),
|
|
50
72
|
methods: {
|
|
51
73
|
onCloseModal() {
|
|
52
74
|
this.$emit('close-modal');
|
|
53
75
|
},
|
|
54
76
|
|
|
55
77
|
async onConfirmDelete() {
|
|
56
|
-
|
|
78
|
+
debugger;
|
|
79
|
+
const paymentConfigId = this.paymentConfig.id;
|
|
57
80
|
if (!this.brandPageToken) {
|
|
58
81
|
if (process.env.NODE_ENV !== 'production') {
|
|
59
82
|
console.error(`brandPageToken is required`);
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
<PaymentConfigDeleteConfigModal
|
|
55
55
|
v-if="showDeleteConfirmationModal"
|
|
56
56
|
:payment-config="selectedPaymentConfig"
|
|
57
|
+
:brand-page-token="brandPageToken"
|
|
57
58
|
@close-modal="onCloseModal"
|
|
58
59
|
/>
|
|
59
60
|
</template>
|
|
@@ -100,6 +101,7 @@ export default {
|
|
|
100
101
|
this.activeStripeOptionIndex = null;
|
|
101
102
|
},
|
|
102
103
|
onLoadPaymentConfigs(paymentConfigId) {
|
|
104
|
+
this.showDeleteConfirmationModal = false;
|
|
103
105
|
this.paymentConfigs = result.filter((p) => this.paymentConfigs.some((p) => p.id === paymentConfigId));
|
|
104
106
|
this.$emit('on-load', this.paymentConfigs);
|
|
105
107
|
},
|
|
@@ -111,6 +113,6 @@ export default {
|
|
|
111
113
|
</script>
|
|
112
114
|
<style>
|
|
113
115
|
.top-class {
|
|
114
|
-
top:
|
|
116
|
+
top: 3rem;
|
|
115
117
|
}
|
|
116
118
|
</style>
|