@blocklet/payment-react 1.24.3 → 1.24.4
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.
|
@@ -44,13 +44,20 @@ const getInvoiceDetailLink = (invoiceId, inDashboard) => {
|
|
|
44
44
|
const getSubscriptionDetailLink = (subscriptionId, inDashboard) => {
|
|
45
45
|
let path = `/customer/subscription/${subscriptionId}`;
|
|
46
46
|
if (inDashboard) {
|
|
47
|
-
path = `/admin/
|
|
47
|
+
path = `/admin/billing/${subscriptionId}`;
|
|
48
48
|
}
|
|
49
49
|
return {
|
|
50
50
|
link: createLink(path),
|
|
51
51
|
connect: false
|
|
52
52
|
};
|
|
53
53
|
};
|
|
54
|
+
const getCreditTransactionDetailLink = (transactionId) => {
|
|
55
|
+
const path = `/customer/credit-transaction/${transactionId}`;
|
|
56
|
+
return {
|
|
57
|
+
link: createLink(path),
|
|
58
|
+
connect: false
|
|
59
|
+
};
|
|
60
|
+
};
|
|
54
61
|
const getMeterEventDetailLink = (meterEventId) => {
|
|
55
62
|
const path = `/admin/billing/${meterEventId}`;
|
|
56
63
|
return {
|
|
@@ -77,6 +84,9 @@ const getTransactionDetailLink = (item, inDashboard) => {
|
|
|
77
84
|
}
|
|
78
85
|
return getGrantDetailLink(item.id, inDashboard);
|
|
79
86
|
}
|
|
87
|
+
if (!inDashboard) {
|
|
88
|
+
return getCreditTransactionDetailLink(item.id);
|
|
89
|
+
}
|
|
80
90
|
const meterEventId = getMeterEventId(item);
|
|
81
91
|
if (!meterEventId) {
|
|
82
92
|
return null;
|
|
@@ -53,13 +53,20 @@ const getInvoiceDetailLink = (invoiceId, inDashboard) => {
|
|
|
53
53
|
const getSubscriptionDetailLink = (subscriptionId, inDashboard) => {
|
|
54
54
|
let path = `/customer/subscription/${subscriptionId}`;
|
|
55
55
|
if (inDashboard) {
|
|
56
|
-
path = `/admin/
|
|
56
|
+
path = `/admin/billing/${subscriptionId}`;
|
|
57
57
|
}
|
|
58
58
|
return {
|
|
59
59
|
link: (0, _navigation.createLink)(path),
|
|
60
60
|
connect: false
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
|
+
const getCreditTransactionDetailLink = transactionId => {
|
|
64
|
+
const path = `/customer/credit-transaction/${transactionId}`;
|
|
65
|
+
return {
|
|
66
|
+
link: (0, _navigation.createLink)(path),
|
|
67
|
+
connect: false
|
|
68
|
+
};
|
|
69
|
+
};
|
|
63
70
|
const getMeterEventDetailLink = meterEventId => {
|
|
64
71
|
const path = `/admin/billing/${meterEventId}`;
|
|
65
72
|
return {
|
|
@@ -92,6 +99,9 @@ const getTransactionDetailLink = (item, inDashboard) => {
|
|
|
92
99
|
}
|
|
93
100
|
return getGrantDetailLink(item.id, inDashboard);
|
|
94
101
|
}
|
|
102
|
+
if (!inDashboard) {
|
|
103
|
+
return getCreditTransactionDetailLink(item.id);
|
|
104
|
+
}
|
|
95
105
|
const meterEventId = getMeterEventId(item);
|
|
96
106
|
if (!meterEventId) {
|
|
97
107
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/payment-react",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.4",
|
|
4
4
|
"description": "Reusable react components for payment kit v2",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"@babel/core": "^7.27.4",
|
|
97
97
|
"@babel/preset-env": "^7.27.2",
|
|
98
98
|
"@babel/preset-react": "^7.27.1",
|
|
99
|
-
"@blocklet/payment-types": "1.24.
|
|
99
|
+
"@blocklet/payment-types": "1.24.4",
|
|
100
100
|
"@storybook/addon-essentials": "^7.6.20",
|
|
101
101
|
"@storybook/addon-interactions": "^7.6.20",
|
|
102
102
|
"@storybook/addon-links": "^7.6.20",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"vite-plugin-babel": "^1.3.1",
|
|
128
128
|
"vite-plugin-node-polyfills": "^0.23.0"
|
|
129
129
|
},
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "d4a5f67e657cafa8862912bb8de38a3d56a7919d"
|
|
131
131
|
}
|
|
@@ -75,7 +75,7 @@ const getInvoiceDetailLink = (invoiceId: string, inDashboard: boolean) => {
|
|
|
75
75
|
const getSubscriptionDetailLink = (subscriptionId: string, inDashboard: boolean) => {
|
|
76
76
|
let path = `/customer/subscription/${subscriptionId}`;
|
|
77
77
|
if (inDashboard) {
|
|
78
|
-
path = `/admin/
|
|
78
|
+
path = `/admin/billing/${subscriptionId}`;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
return {
|
|
@@ -84,6 +84,15 @@ const getSubscriptionDetailLink = (subscriptionId: string, inDashboard: boolean)
|
|
|
84
84
|
};
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
+
const getCreditTransactionDetailLink = (transactionId: string) => {
|
|
88
|
+
const path = `/customer/credit-transaction/${transactionId}`;
|
|
89
|
+
|
|
90
|
+
return {
|
|
91
|
+
link: createLink(path),
|
|
92
|
+
connect: false,
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
|
|
87
96
|
const getMeterEventDetailLink = (meterEventId: string) => {
|
|
88
97
|
// Meter event detail page is only available in admin dashboard
|
|
89
98
|
const path = `/admin/billing/${meterEventId}`;
|
|
@@ -121,6 +130,10 @@ const getTransactionDetailLink = (item: any, inDashboard: boolean) => {
|
|
|
121
130
|
return getGrantDetailLink(item.id, inDashboard);
|
|
122
131
|
}
|
|
123
132
|
|
|
133
|
+
if (!inDashboard) {
|
|
134
|
+
return getCreditTransactionDetailLink(item.id);
|
|
135
|
+
}
|
|
136
|
+
|
|
124
137
|
const meterEventId = getMeterEventId(item);
|
|
125
138
|
if (!meterEventId) {
|
|
126
139
|
return null;
|