@burdenoff/microfe-billing 2026.623.3 → 2026.624.2
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/dist/billing/BillingUserRoutes.js +3 -3
- package/dist/billing/BillingUserRoutes.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +34 -34
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +94 -94
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +162 -187
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +146 -153
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +10 -10
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.js +62 -62
- package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js +164 -179
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js +8 -8
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.js +243 -305
- package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +73 -78
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.js +173 -179
- package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +4 -4
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +4 -4
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/SettingsPage.js +181 -173
- package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +111 -99
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +68 -83
- package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js.map +1 -1
- package/dist/billing/shared/components/AccessDenied.js +4 -4
- package/dist/billing/shared/components/AccessDenied.js.map +1 -1
- package/dist/billing/shared/components/ActorIdentity.js +8 -8
- package/dist/billing/shared/components/ActorIdentity.js.map +1 -1
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js +11 -11
- package/dist/billing/shared/components/CurrencyPriceOverridesEditor.js.map +1 -1
- package/dist/billing/shared/ui/MetricCard.js +1 -1
- package/dist/billing/shared/ui/MetricCard.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,87 +14,120 @@ import { addAffiliateCodeNote as d, createAffiliateCode as f, deactivateAffiliat
|
|
|
14
14
|
import { useEffect as v, useMemo as y, useState as b } from "react";
|
|
15
15
|
import { Link2 as x, Plus as S, RefreshCw as C, StickyNote as w, Ticket as T, TrendingUp as E, Users as D } from "lucide-react";
|
|
16
16
|
import { jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
17
|
+
import { ResponsiveTable as A } from "@burdenoff/fe-libs/ui";
|
|
17
18
|
//#region src/billing/modules/affiliate/pages/AffiliateDashboardPage.tsx
|
|
18
|
-
var
|
|
19
|
-
|
|
19
|
+
var j = [
|
|
20
|
+
{
|
|
21
|
+
key: "code",
|
|
22
|
+
header: "Code",
|
|
23
|
+
priority: "primary",
|
|
24
|
+
cell: (e) => e.codeValue
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
key: "product",
|
|
28
|
+
header: "Product",
|
|
29
|
+
cell: (e) => e.productSlug
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
key: "path",
|
|
33
|
+
header: "Path",
|
|
34
|
+
cell: (e) => e.currentPath || e.landingPath || "-"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
key: "country",
|
|
38
|
+
header: "Country",
|
|
39
|
+
cell: (e) => e.geographyCountry || "-"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
key: "status",
|
|
43
|
+
header: "Status",
|
|
44
|
+
cell: (e) => e.status
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
key: "visited",
|
|
48
|
+
header: "Visited",
|
|
49
|
+
cell: (e) => c(e.lastVisitedAt)
|
|
50
|
+
}
|
|
51
|
+
], M = () => {
|
|
52
|
+
let c = u(), { emit: M } = o(), { apiGatewayUrl: N, authToken: P, orgId: F } = e(), [I, L] = b([]), [R, z] = b([]), [B, V] = b(null), [H, U] = b(!0), [W, G] = b(null), [K, q] = b(null), [J, Y] = b({
|
|
20
53
|
label: "",
|
|
21
54
|
description: "",
|
|
22
55
|
notes: "",
|
|
23
56
|
productSlug: "",
|
|
24
57
|
destinationPath: "",
|
|
25
58
|
destinationUrl: ""
|
|
26
|
-
}),
|
|
27
|
-
apiGatewayUrl:
|
|
28
|
-
authToken:
|
|
29
|
-
orgId:
|
|
59
|
+
}), X = y(() => ({
|
|
60
|
+
apiGatewayUrl: N,
|
|
61
|
+
authToken: P,
|
|
62
|
+
orgId: F
|
|
30
63
|
}), [
|
|
31
|
-
M,
|
|
32
64
|
N,
|
|
33
|
-
P
|
|
34
|
-
|
|
35
|
-
|
|
65
|
+
P,
|
|
66
|
+
F
|
|
67
|
+
]), Z = async () => {
|
|
68
|
+
U(!0), G(null);
|
|
36
69
|
try {
|
|
37
70
|
let [e, t, n] = await Promise.all([
|
|
38
|
-
h(
|
|
39
|
-
m(
|
|
40
|
-
g(
|
|
71
|
+
h(X),
|
|
72
|
+
m(X),
|
|
73
|
+
g(X)
|
|
41
74
|
]);
|
|
42
|
-
|
|
75
|
+
L(e), V(t), z(n);
|
|
43
76
|
} catch (e) {
|
|
44
|
-
|
|
77
|
+
G(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load affiliate dashboard"));
|
|
45
78
|
} finally {
|
|
46
|
-
|
|
79
|
+
U(!1);
|
|
47
80
|
}
|
|
48
81
|
};
|
|
49
82
|
if (v(() => {
|
|
50
|
-
|
|
51
|
-
}, [
|
|
52
|
-
if (
|
|
83
|
+
Z();
|
|
84
|
+
}, [X]), !c.canViewBillingAccount) return /* @__PURE__ */ O(t, { message: "You don't have permission to view affiliate analytics." });
|
|
85
|
+
if (W && l(W)) return /* @__PURE__ */ O(a, {
|
|
53
86
|
title: "Affiliate service unavailable",
|
|
54
|
-
message:
|
|
55
|
-
onRetry: () => void
|
|
87
|
+
message: W.message,
|
|
88
|
+
onRetry: () => void Z(),
|
|
56
89
|
showRetry: !0
|
|
57
90
|
});
|
|
58
|
-
let
|
|
59
|
-
if (!
|
|
60
|
-
|
|
91
|
+
let Q = I.find((e) => e.id === K) ?? null, $ = async () => {
|
|
92
|
+
if (!J.productSlug.trim()) {
|
|
93
|
+
G(/* @__PURE__ */ Error("Product slug is required"));
|
|
61
94
|
return;
|
|
62
95
|
}
|
|
63
96
|
try {
|
|
64
|
-
|
|
65
|
-
label:
|
|
66
|
-
description:
|
|
67
|
-
notes:
|
|
68
|
-
destinationPath:
|
|
69
|
-
destinationUrl:
|
|
70
|
-
},
|
|
97
|
+
Q ? (await _(Q.id, {
|
|
98
|
+
label: J.label,
|
|
99
|
+
description: J.description,
|
|
100
|
+
notes: J.notes,
|
|
101
|
+
destinationPath: J.destinationPath,
|
|
102
|
+
destinationUrl: J.destinationUrl
|
|
103
|
+
}, X), M("billing.affiliate_code.updated", {
|
|
71
104
|
route: "/billing/affiliate",
|
|
72
|
-
entityId:
|
|
105
|
+
entityId: Q.id,
|
|
73
106
|
source: "affiliate-dashboard"
|
|
74
|
-
})) :
|
|
107
|
+
})) : M("billing.affiliate_code.created", {
|
|
75
108
|
route: "/billing/affiliate",
|
|
76
109
|
entityId: (await f({
|
|
77
|
-
label:
|
|
78
|
-
description:
|
|
79
|
-
notes:
|
|
80
|
-
productSlug:
|
|
81
|
-
destinationPath:
|
|
82
|
-
destinationUrl:
|
|
83
|
-
},
|
|
110
|
+
label: J.label,
|
|
111
|
+
description: J.description,
|
|
112
|
+
notes: J.notes,
|
|
113
|
+
productSlug: J.productSlug,
|
|
114
|
+
destinationPath: J.destinationPath,
|
|
115
|
+
destinationUrl: J.destinationUrl
|
|
116
|
+
}, X)).id,
|
|
84
117
|
source: "affiliate-dashboard"
|
|
85
|
-
}),
|
|
118
|
+
}), q(null), Y({
|
|
86
119
|
label: "",
|
|
87
120
|
description: "",
|
|
88
121
|
notes: "",
|
|
89
122
|
productSlug: "",
|
|
90
123
|
destinationPath: "",
|
|
91
124
|
destinationUrl: ""
|
|
92
|
-
}), await
|
|
125
|
+
}), await Z();
|
|
93
126
|
} catch (e) {
|
|
94
|
-
|
|
127
|
+
G(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to save affiliate code"));
|
|
95
128
|
}
|
|
96
|
-
},
|
|
97
|
-
|
|
129
|
+
}, ee = (e) => {
|
|
130
|
+
q(e.id), Y({
|
|
98
131
|
label: e.label ?? "",
|
|
99
132
|
description: e.description ?? "",
|
|
100
133
|
notes: e.notes ?? "",
|
|
@@ -102,38 +135,38 @@ var A = () => {
|
|
|
102
135
|
destinationPath: e.destinationPath ?? "",
|
|
103
136
|
destinationUrl: e.destinationUrl ?? ""
|
|
104
137
|
});
|
|
105
|
-
},
|
|
106
|
-
await p(e,
|
|
138
|
+
}, te = async (e) => {
|
|
139
|
+
await p(e, X), M("billing.affiliate_code.deactivated", {
|
|
107
140
|
route: "/billing/affiliate",
|
|
108
141
|
entityId: e,
|
|
109
142
|
source: "affiliate-dashboard"
|
|
110
|
-
}), await
|
|
111
|
-
},
|
|
143
|
+
}), await Z();
|
|
144
|
+
}, ne = async (e) => {
|
|
112
145
|
let t = window.prompt("Add an internal note for this affiliate code");
|
|
113
|
-
t && (await d(e, t,
|
|
146
|
+
t && (await d(e, t, X), M("billing.affiliate_code.note_added", {
|
|
114
147
|
route: "/billing/affiliate",
|
|
115
148
|
entityId: e,
|
|
116
149
|
source: "affiliate-dashboard"
|
|
117
|
-
}), await
|
|
118
|
-
},
|
|
150
|
+
}), await Z());
|
|
151
|
+
}, re = B ? [
|
|
119
152
|
{
|
|
120
153
|
title: "Codes",
|
|
121
|
-
value:
|
|
154
|
+
value: B.totalCodes,
|
|
122
155
|
icon: /* @__PURE__ */ O(T, { className: "size-5" })
|
|
123
156
|
},
|
|
124
157
|
{
|
|
125
158
|
title: "Visits",
|
|
126
|
-
value:
|
|
159
|
+
value: B.totalVisits,
|
|
127
160
|
icon: /* @__PURE__ */ O(D, { className: "size-5" })
|
|
128
161
|
},
|
|
129
162
|
{
|
|
130
163
|
title: "Journeys",
|
|
131
|
-
value:
|
|
164
|
+
value: B.totalJourneys,
|
|
132
165
|
icon: /* @__PURE__ */ O(x, { className: "size-5" })
|
|
133
166
|
},
|
|
134
167
|
{
|
|
135
168
|
title: "Revenue influenced",
|
|
136
|
-
value: s(
|
|
169
|
+
value: s(B.totalRevenueAmount, "USD"),
|
|
137
170
|
icon: /* @__PURE__ */ O(E, { className: "size-5" })
|
|
138
171
|
}
|
|
139
172
|
] : [];
|
|
@@ -145,100 +178,100 @@ var A = () => {
|
|
|
145
178
|
description: "Create referral codes, add internal notes, and monitor attributed journeys.",
|
|
146
179
|
actions: /* @__PURE__ */ k("button", {
|
|
147
180
|
type: "button",
|
|
148
|
-
onClick: () => void
|
|
149
|
-
className: "inline-flex items-center gap-2 rounded-md border border-border bg-
|
|
181
|
+
onClick: () => void Z(),
|
|
182
|
+
className: "inline-flex items-center gap-2 rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm font-medium text-text-primary",
|
|
150
183
|
children: [/* @__PURE__ */ O(C, { className: "size-4" }), "Refresh"]
|
|
151
184
|
})
|
|
152
185
|
}),
|
|
153
|
-
|
|
186
|
+
H ? /* @__PURE__ */ O("div", {
|
|
154
187
|
className: "grid gap-4 md:grid-cols-2 xl:grid-cols-4",
|
|
155
188
|
children: [
|
|
156
189
|
1,
|
|
157
190
|
2,
|
|
158
191
|
3,
|
|
159
192
|
4
|
|
160
|
-
].map((e) => /* @__PURE__ */ O("div", { className: "h-28 animate-pulse rounded-lg border border-border bg-
|
|
161
|
-
}) :
|
|
193
|
+
].map((e) => /* @__PURE__ */ O("div", { className: "h-28 animate-pulse rounded-lg border border-border-subtle bg-bg-surface" }, e))
|
|
194
|
+
}) : B ? /* @__PURE__ */ O("div", {
|
|
162
195
|
className: "grid gap-4 md:grid-cols-2 xl:grid-cols-4",
|
|
163
|
-
children:
|
|
196
|
+
children: re.map((e) => /* @__PURE__ */ O(r, {
|
|
164
197
|
label: e.title,
|
|
165
198
|
value: e.value,
|
|
166
199
|
icon: e.icon
|
|
167
200
|
}, e.title))
|
|
168
201
|
}) : null,
|
|
169
|
-
|
|
170
|
-
className: "rounded-lg border border-border bg-
|
|
171
|
-
children:
|
|
202
|
+
W && !l(W) ? /* @__PURE__ */ O("div", {
|
|
203
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 text-sm text-status-error-text",
|
|
204
|
+
children: W.message
|
|
172
205
|
}) : null,
|
|
173
206
|
/* @__PURE__ */ k("div", {
|
|
174
207
|
className: "grid gap-6 xl:grid-cols-[1.1fr,1.9fr]",
|
|
175
208
|
children: [/* @__PURE__ */ k("section", {
|
|
176
|
-
className: "rounded-lg border border-border bg-
|
|
209
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
177
210
|
children: [
|
|
178
211
|
/* @__PURE__ */ k("div", {
|
|
179
212
|
className: "mb-4 flex items-center justify-between",
|
|
180
213
|
children: [/* @__PURE__ */ O("h2", {
|
|
181
|
-
className: "text-lg font-semibold text-
|
|
182
|
-
children:
|
|
183
|
-
}),
|
|
214
|
+
className: "text-lg font-semibold text-text-primary",
|
|
215
|
+
children: Q ? "Update affiliate code" : "Create affiliate code"
|
|
216
|
+
}), Q ? null : /* @__PURE__ */ O(S, { className: "size-4 text-text-secondary" })]
|
|
184
217
|
}),
|
|
185
218
|
/* @__PURE__ */ k("div", {
|
|
186
219
|
className: "space-y-3",
|
|
187
220
|
children: [
|
|
188
221
|
/* @__PURE__ */ O("input", {
|
|
189
|
-
value:
|
|
190
|
-
onChange: (e) =>
|
|
222
|
+
value: J.label,
|
|
223
|
+
onChange: (e) => Y((t) => ({
|
|
191
224
|
...t,
|
|
192
225
|
label: e.target.value
|
|
193
226
|
})),
|
|
194
227
|
placeholder: "Label",
|
|
195
|
-
className: "w-full rounded-md border border-border bg-
|
|
228
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
196
229
|
}),
|
|
197
230
|
/* @__PURE__ */ O("input", {
|
|
198
|
-
value:
|
|
199
|
-
onChange: (e) =>
|
|
231
|
+
value: J.productSlug,
|
|
232
|
+
onChange: (e) => Y((t) => ({
|
|
200
233
|
...t,
|
|
201
234
|
productSlug: e.target.value
|
|
202
235
|
})),
|
|
203
236
|
placeholder: "Product slug (eg. bigconsole)",
|
|
204
|
-
className: "w-full rounded-md border border-border bg-
|
|
205
|
-
disabled: !!
|
|
237
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
|
|
238
|
+
disabled: !!Q
|
|
206
239
|
}),
|
|
207
240
|
/* @__PURE__ */ O("input", {
|
|
208
|
-
value:
|
|
209
|
-
onChange: (e) =>
|
|
241
|
+
value: J.destinationPath,
|
|
242
|
+
onChange: (e) => Y((t) => ({
|
|
210
243
|
...t,
|
|
211
244
|
destinationPath: e.target.value
|
|
212
245
|
})),
|
|
213
246
|
placeholder: "Destination path (eg. /pricing)",
|
|
214
|
-
className: "w-full rounded-md border border-border bg-
|
|
247
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
215
248
|
}),
|
|
216
249
|
/* @__PURE__ */ O("input", {
|
|
217
|
-
value:
|
|
218
|
-
onChange: (e) =>
|
|
250
|
+
value: J.destinationUrl,
|
|
251
|
+
onChange: (e) => Y((t) => ({
|
|
219
252
|
...t,
|
|
220
253
|
destinationUrl: e.target.value
|
|
221
254
|
})),
|
|
222
255
|
placeholder: "Absolute destination URL (optional)",
|
|
223
|
-
className: "w-full rounded-md border border-border bg-
|
|
256
|
+
className: "w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
224
257
|
}),
|
|
225
258
|
/* @__PURE__ */ O("textarea", {
|
|
226
|
-
value:
|
|
227
|
-
onChange: (e) =>
|
|
259
|
+
value: J.description,
|
|
260
|
+
onChange: (e) => Y((t) => ({
|
|
228
261
|
...t,
|
|
229
262
|
description: e.target.value
|
|
230
263
|
})),
|
|
231
264
|
placeholder: "Description",
|
|
232
|
-
className: "min-h-24 w-full rounded-md border border-border bg-
|
|
265
|
+
className: "min-h-24 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
233
266
|
}),
|
|
234
267
|
/* @__PURE__ */ O("textarea", {
|
|
235
|
-
value:
|
|
236
|
-
onChange: (e) =>
|
|
268
|
+
value: J.notes,
|
|
269
|
+
onChange: (e) => Y((t) => ({
|
|
237
270
|
...t,
|
|
238
271
|
notes: e.target.value
|
|
239
272
|
})),
|
|
240
273
|
placeholder: "Internal notes",
|
|
241
|
-
className: "min-h-24 w-full rounded-md border border-border bg-
|
|
274
|
+
className: "min-h-24 w-full rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary"
|
|
242
275
|
})
|
|
243
276
|
]
|
|
244
277
|
}),
|
|
@@ -246,13 +279,13 @@ var A = () => {
|
|
|
246
279
|
className: "mt-4 flex flex-wrap gap-3",
|
|
247
280
|
children: [/* @__PURE__ */ O("button", {
|
|
248
281
|
type: "button",
|
|
249
|
-
onClick: () => void
|
|
250
|
-
className: "rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-
|
|
251
|
-
children:
|
|
252
|
-
}),
|
|
282
|
+
onClick: () => void $(),
|
|
283
|
+
className: "rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text",
|
|
284
|
+
children: Q ? "Save changes" : "Create code"
|
|
285
|
+
}), Q ? /* @__PURE__ */ O("button", {
|
|
253
286
|
type: "button",
|
|
254
287
|
onClick: () => {
|
|
255
|
-
|
|
288
|
+
q(null), Y({
|
|
256
289
|
label: "",
|
|
257
290
|
description: "",
|
|
258
291
|
notes: "",
|
|
@@ -261,7 +294,7 @@ var A = () => {
|
|
|
261
294
|
destinationUrl: ""
|
|
262
295
|
});
|
|
263
296
|
},
|
|
264
|
-
className: "rounded-md border border-border bg-
|
|
297
|
+
className: "rounded-md border border-border-subtle bg-bg-surface px-4 py-2 text-sm font-medium text-text-primary",
|
|
265
298
|
children: "Cancel"
|
|
266
299
|
}) : null]
|
|
267
300
|
})
|
|
@@ -269,30 +302,30 @@ var A = () => {
|
|
|
269
302
|
}), /* @__PURE__ */ k("section", {
|
|
270
303
|
className: "space-y-4",
|
|
271
304
|
children: [/* @__PURE__ */ k("div", {
|
|
272
|
-
className: "rounded-lg border border-border bg-
|
|
305
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
273
306
|
children: [/* @__PURE__ */ O("h2", {
|
|
274
|
-
className: "mb-4 text-lg font-semibold text-
|
|
307
|
+
className: "mb-4 text-lg font-semibold text-text-primary",
|
|
275
308
|
children: "My codes"
|
|
276
|
-
}),
|
|
309
|
+
}), I.length === 0 && !H ? /* @__PURE__ */ O(i, {
|
|
277
310
|
icon: /* @__PURE__ */ O(T, { className: "size-8" }),
|
|
278
311
|
title: "No affiliate codes yet",
|
|
279
312
|
description: "Create your first code to start tracking attributable journeys."
|
|
280
313
|
}) : /* @__PURE__ */ O("div", {
|
|
281
314
|
className: "space-y-4",
|
|
282
|
-
children:
|
|
315
|
+
children: I.map((e) => {
|
|
283
316
|
let t = e.destinationUrl || `https://${e.productSlug}.com${e.destinationPath || ""}?ref=${e.code}`;
|
|
284
317
|
return /* @__PURE__ */ k("div", {
|
|
285
|
-
className: "rounded-lg border border-border bg-
|
|
318
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
286
319
|
children: [
|
|
287
320
|
/* @__PURE__ */ k("div", {
|
|
288
321
|
className: "flex flex-wrap items-start justify-between gap-4",
|
|
289
322
|
children: [/* @__PURE__ */ k("div", { children: [
|
|
290
323
|
/* @__PURE__ */ O("p", {
|
|
291
|
-
className: "text-sm font-semibold text-
|
|
324
|
+
className: "text-sm font-semibold text-text-primary",
|
|
292
325
|
children: e.label || e.code
|
|
293
326
|
}),
|
|
294
327
|
/* @__PURE__ */ k("p", {
|
|
295
|
-
className: "text-xs text-
|
|
328
|
+
className: "text-xs text-text-secondary",
|
|
296
329
|
children: [
|
|
297
330
|
e.code,
|
|
298
331
|
" · ",
|
|
@@ -300,7 +333,7 @@ var A = () => {
|
|
|
300
333
|
]
|
|
301
334
|
}),
|
|
302
335
|
/* @__PURE__ */ O("p", {
|
|
303
|
-
className: "mt-1 break-all text-xs text-
|
|
336
|
+
className: "mt-1 break-all text-xs text-text-secondary",
|
|
304
337
|
children: t
|
|
305
338
|
})
|
|
306
339
|
] }), /* @__PURE__ */ k("div", {
|
|
@@ -308,20 +341,20 @@ var A = () => {
|
|
|
308
341
|
children: [
|
|
309
342
|
/* @__PURE__ */ O("button", {
|
|
310
343
|
type: "button",
|
|
311
|
-
onClick: () =>
|
|
312
|
-
className: "rounded-md border border-border px-3 py-1.5 text-xs font-medium text-
|
|
344
|
+
onClick: () => ee(e),
|
|
345
|
+
className: "rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary",
|
|
313
346
|
children: "Edit"
|
|
314
347
|
}),
|
|
315
348
|
/* @__PURE__ */ k("button", {
|
|
316
349
|
type: "button",
|
|
317
|
-
onClick: () => void
|
|
318
|
-
className: "inline-flex items-center gap-1 rounded-md border border-border px-3 py-1.5 text-xs font-medium text-
|
|
350
|
+
onClick: () => void ne(e.id),
|
|
351
|
+
className: "inline-flex items-center gap-1 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary",
|
|
319
352
|
children: [/* @__PURE__ */ O(w, { className: "size-3.5" }), "Note"]
|
|
320
353
|
}),
|
|
321
354
|
e.status === "ACTIVE" ? /* @__PURE__ */ O("button", {
|
|
322
355
|
type: "button",
|
|
323
|
-
onClick: () => void
|
|
324
|
-
className: "rounded-md border border-border px-3 py-1.5 text-xs font-medium text-
|
|
356
|
+
onClick: () => void te(e.id),
|
|
357
|
+
className: "rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-status-error-text",
|
|
325
358
|
children: "Deactivate"
|
|
326
359
|
}) : null
|
|
327
360
|
]
|
|
@@ -331,49 +364,49 @@ var A = () => {
|
|
|
331
364
|
className: "mt-4 grid gap-3 sm:grid-cols-2 xl:grid-cols-4",
|
|
332
365
|
children: [
|
|
333
366
|
/* @__PURE__ */ k("div", {
|
|
334
|
-
className: "rounded-md border border-border bg-
|
|
367
|
+
className: "rounded-md border border-border-subtle bg-bg-surface p-3",
|
|
335
368
|
children: [/* @__PURE__ */ O("p", {
|
|
336
|
-
className: "text-xs text-
|
|
369
|
+
className: "text-xs text-text-secondary",
|
|
337
370
|
children: "Visits"
|
|
338
371
|
}), /* @__PURE__ */ O("p", {
|
|
339
|
-
className: "text-lg font-semibold text-
|
|
372
|
+
className: "text-lg font-semibold text-text-primary",
|
|
340
373
|
children: e.totalVisits
|
|
341
374
|
})]
|
|
342
375
|
}),
|
|
343
376
|
/* @__PURE__ */ k("div", {
|
|
344
|
-
className: "rounded-md border border-border bg-
|
|
377
|
+
className: "rounded-md border border-border-subtle bg-bg-surface p-3",
|
|
345
378
|
children: [/* @__PURE__ */ O("p", {
|
|
346
|
-
className: "text-xs text-
|
|
379
|
+
className: "text-xs text-text-secondary",
|
|
347
380
|
children: "Signups"
|
|
348
381
|
}), /* @__PURE__ */ O("p", {
|
|
349
|
-
className: "text-lg font-semibold text-
|
|
382
|
+
className: "text-lg font-semibold text-text-primary",
|
|
350
383
|
children: e.totalSignups
|
|
351
384
|
})]
|
|
352
385
|
}),
|
|
353
386
|
/* @__PURE__ */ k("div", {
|
|
354
|
-
className: "rounded-md border border-border bg-
|
|
387
|
+
className: "rounded-md border border-border-subtle bg-bg-surface p-3",
|
|
355
388
|
children: [/* @__PURE__ */ O("p", {
|
|
356
|
-
className: "text-xs text-
|
|
389
|
+
className: "text-xs text-text-secondary",
|
|
357
390
|
children: "Paid conversions"
|
|
358
391
|
}), /* @__PURE__ */ O("p", {
|
|
359
|
-
className: "text-lg font-semibold text-
|
|
392
|
+
className: "text-lg font-semibold text-text-primary",
|
|
360
393
|
children: e.totalPaidConversions + e.totalStorePurchases
|
|
361
394
|
})]
|
|
362
395
|
}),
|
|
363
396
|
/* @__PURE__ */ k("div", {
|
|
364
|
-
className: "rounded-md border border-border bg-
|
|
397
|
+
className: "rounded-md border border-border-subtle bg-bg-surface p-3",
|
|
365
398
|
children: [/* @__PURE__ */ O("p", {
|
|
366
|
-
className: "text-xs text-
|
|
399
|
+
className: "text-xs text-text-secondary",
|
|
367
400
|
children: "Rewards earned"
|
|
368
401
|
}), /* @__PURE__ */ O("p", {
|
|
369
|
-
className: "text-lg font-semibold text-
|
|
402
|
+
className: "text-lg font-semibold text-text-primary",
|
|
370
403
|
children: s(e.totalRewardAmount, "USD")
|
|
371
404
|
})]
|
|
372
405
|
})
|
|
373
406
|
]
|
|
374
407
|
}),
|
|
375
408
|
e.notes ? /* @__PURE__ */ O("p", {
|
|
376
|
-
className: "mt-3 text-sm text-
|
|
409
|
+
className: "mt-3 text-sm text-text-secondary",
|
|
377
410
|
children: e.notes
|
|
378
411
|
}) : null
|
|
379
412
|
]
|
|
@@ -381,76 +414,18 @@ var A = () => {
|
|
|
381
414
|
})
|
|
382
415
|
})]
|
|
383
416
|
}), /* @__PURE__ */ k("div", {
|
|
384
|
-
className: "rounded-lg border border-border bg-
|
|
417
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface p-4",
|
|
385
418
|
children: [/* @__PURE__ */ O("h2", {
|
|
386
|
-
className: "mb-4 text-lg font-semibold text-
|
|
419
|
+
className: "mb-4 text-lg font-semibold text-text-primary",
|
|
387
420
|
children: "Recent attributed journeys"
|
|
388
|
-
}),
|
|
421
|
+
}), R.length === 0 ? /* @__PURE__ */ O(i, {
|
|
389
422
|
icon: /* @__PURE__ */ O(D, { className: "size-8" }),
|
|
390
423
|
title: "No journeys yet",
|
|
391
424
|
description: "Journeys will appear as visitors land on your affiliate links."
|
|
392
|
-
}) : /* @__PURE__ */ O(
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
children: [/* @__PURE__ */ O("thead", { children: /* @__PURE__ */ k("tr", {
|
|
397
|
-
className: "border-b border-border text-left text-muted-foreground",
|
|
398
|
-
children: [
|
|
399
|
-
/* @__PURE__ */ O("th", {
|
|
400
|
-
className: "px-3 py-2",
|
|
401
|
-
children: "Code"
|
|
402
|
-
}),
|
|
403
|
-
/* @__PURE__ */ O("th", {
|
|
404
|
-
className: "px-3 py-2",
|
|
405
|
-
children: "Product"
|
|
406
|
-
}),
|
|
407
|
-
/* @__PURE__ */ O("th", {
|
|
408
|
-
className: "px-3 py-2",
|
|
409
|
-
children: "Path"
|
|
410
|
-
}),
|
|
411
|
-
/* @__PURE__ */ O("th", {
|
|
412
|
-
className: "px-3 py-2",
|
|
413
|
-
children: "Country"
|
|
414
|
-
}),
|
|
415
|
-
/* @__PURE__ */ O("th", {
|
|
416
|
-
className: "px-3 py-2",
|
|
417
|
-
children: "Status"
|
|
418
|
-
}),
|
|
419
|
-
/* @__PURE__ */ O("th", {
|
|
420
|
-
className: "px-3 py-2",
|
|
421
|
-
children: "Visited"
|
|
422
|
-
})
|
|
423
|
-
]
|
|
424
|
-
}) }), /* @__PURE__ */ O("tbody", { children: L.map((e) => /* @__PURE__ */ k("tr", {
|
|
425
|
-
className: "border-b border-border/70 text-foreground",
|
|
426
|
-
children: [
|
|
427
|
-
/* @__PURE__ */ O("td", {
|
|
428
|
-
className: "px-3 py-2 font-medium",
|
|
429
|
-
children: e.codeValue
|
|
430
|
-
}),
|
|
431
|
-
/* @__PURE__ */ O("td", {
|
|
432
|
-
className: "px-3 py-2",
|
|
433
|
-
children: e.productSlug
|
|
434
|
-
}),
|
|
435
|
-
/* @__PURE__ */ O("td", {
|
|
436
|
-
className: "px-3 py-2",
|
|
437
|
-
children: e.currentPath || e.landingPath || "-"
|
|
438
|
-
}),
|
|
439
|
-
/* @__PURE__ */ O("td", {
|
|
440
|
-
className: "px-3 py-2",
|
|
441
|
-
children: e.geographyCountry || "-"
|
|
442
|
-
}),
|
|
443
|
-
/* @__PURE__ */ O("td", {
|
|
444
|
-
className: "px-3 py-2",
|
|
445
|
-
children: e.status
|
|
446
|
-
}),
|
|
447
|
-
/* @__PURE__ */ O("td", {
|
|
448
|
-
className: "px-3 py-2",
|
|
449
|
-
children: c(e.lastVisitedAt)
|
|
450
|
-
})
|
|
451
|
-
]
|
|
452
|
-
}, e.id)) })]
|
|
453
|
-
})
|
|
425
|
+
}) : /* @__PURE__ */ O(A, {
|
|
426
|
+
data: R,
|
|
427
|
+
rowKey: (e) => e.id,
|
|
428
|
+
columns: j
|
|
454
429
|
})]
|
|
455
430
|
})]
|
|
456
431
|
})]
|
|
@@ -459,6 +434,6 @@ var A = () => {
|
|
|
459
434
|
});
|
|
460
435
|
};
|
|
461
436
|
//#endregion
|
|
462
|
-
export {
|
|
437
|
+
export { M as AffiliateDashboardPage };
|
|
463
438
|
|
|
464
439
|
//# sourceMappingURL=AffiliateDashboardPage.js.map
|