@burdenoff/microfe-devportal 2026.623.6 → 2026.623.8
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/devportal/DevportalRoutes.js +37 -29
- package/dist/devportal/DevportalRoutes.js.map +1 -1
- package/dist/devportal/pages/RevenueDashboardPage.js +291 -342
- package/dist/devportal/pages/RevenueDashboardPage.js.map +1 -1
- package/dist/generated/global-operations.js +9 -3
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,97 +1,73 @@
|
|
|
1
1
|
import { useDevportal as e } from "../providers/DevportalProvider.js";
|
|
2
2
|
import { cn as t } from "../utils/cn.js";
|
|
3
3
|
import { EmptyState as n } from "../components/EmptyState.js";
|
|
4
|
-
import {
|
|
5
|
-
import { getErrorMessage as
|
|
6
|
-
import { PageLayout as
|
|
7
|
-
import { StatCard as
|
|
8
|
-
import { StatusBadge as
|
|
9
|
-
import { DataTable as
|
|
4
|
+
import { useGetMyOrganizationsQuery as ee, useGetRevenueDashboardDataQuery as te, useLinkDevOrgBillingAccountMutation as ne, useMyBillingAccountsQuery as r } from "../../generated/global-operations.js";
|
|
5
|
+
import { getErrorMessage as i } from "../hooks/useGraphQL.js";
|
|
6
|
+
import { PageLayout as a, PageSection as o } from "../components/PageLayout.js";
|
|
7
|
+
import { StatCard as s, StatCardGrid as re } from "../components/StatCard.js";
|
|
8
|
+
import { StatusBadge as c } from "../components/StatusBadge.js";
|
|
9
|
+
import { DataTable as l } from "../components/DataTable.js";
|
|
10
10
|
import "../hooks/index.js";
|
|
11
|
-
import { Tooltip as
|
|
12
|
-
import { ResponsiveContainer as
|
|
13
|
-
import { Bar as
|
|
14
|
-
import { CartesianGrid as
|
|
15
|
-
import { Line as
|
|
16
|
-
import { XAxis as
|
|
17
|
-
import { YAxis as
|
|
18
|
-
import { LineChart as
|
|
19
|
-
import { BarChart as
|
|
20
|
-
import { useTr as
|
|
21
|
-
import { useMemo as
|
|
22
|
-
import { AlertCircle as
|
|
23
|
-
import { useSearchParams as
|
|
24
|
-
import { Fragment as
|
|
11
|
+
import { Tooltip as u } from "../../node_modules/.bun/recharts@2.15.4_21ccd8898788a04d/node_modules/recharts/es6/component/Tooltip.js";
|
|
12
|
+
import { ResponsiveContainer as d } from "../../node_modules/.bun/recharts@2.15.4_21ccd8898788a04d/node_modules/recharts/es6/component/ResponsiveContainer.js";
|
|
13
|
+
import { Bar as ie } from "../../node_modules/.bun/recharts@2.15.4_21ccd8898788a04d/node_modules/recharts/es6/cartesian/Bar.js";
|
|
14
|
+
import { CartesianGrid as f } from "../../node_modules/.bun/recharts@2.15.4_21ccd8898788a04d/node_modules/recharts/es6/cartesian/CartesianGrid.js";
|
|
15
|
+
import { Line as p } from "../../node_modules/.bun/recharts@2.15.4_21ccd8898788a04d/node_modules/recharts/es6/cartesian/Line.js";
|
|
16
|
+
import { XAxis as m } from "../../node_modules/.bun/recharts@2.15.4_21ccd8898788a04d/node_modules/recharts/es6/cartesian/XAxis.js";
|
|
17
|
+
import { YAxis as h } from "../../node_modules/.bun/recharts@2.15.4_21ccd8898788a04d/node_modules/recharts/es6/cartesian/YAxis.js";
|
|
18
|
+
import { LineChart as ae } from "../../node_modules/.bun/recharts@2.15.4_21ccd8898788a04d/node_modules/recharts/es6/chart/LineChart.js";
|
|
19
|
+
import { BarChart as g } from "../../node_modules/.bun/recharts@2.15.4_21ccd8898788a04d/node_modules/recharts/es6/chart/BarChart.js";
|
|
20
|
+
import { useTr as _ } from "../utils/i18n.js";
|
|
21
|
+
import { useMemo as v, useState as y } from "react";
|
|
22
|
+
import { AlertCircle as b, ArrowDownToLine as oe, Building2 as x, Check as S, CreditCard as C, DollarSign as w, Link2 as T, Loader2 as E, Wallet as se } from "lucide-react";
|
|
23
|
+
import { useSearchParams as ce } from "react-router-dom";
|
|
24
|
+
import { Fragment as le, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
25
25
|
//#region src/devportal/pages/RevenueDashboardPage.tsx
|
|
26
|
-
var
|
|
26
|
+
var k = {
|
|
27
27
|
primary: "var(--color-chart-1)",
|
|
28
28
|
secondary: "var(--color-chart-2)",
|
|
29
29
|
tertiary: "var(--color-chart-4)"
|
|
30
|
-
},
|
|
30
|
+
}, ue = {
|
|
31
31
|
"30d": 30,
|
|
32
32
|
"90d": 90,
|
|
33
33
|
"12m": 365
|
|
34
|
-
},
|
|
35
|
-
let
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}),
|
|
39
|
-
let e = new Date(B);
|
|
40
|
-
return e.setDate(e.getDate() - me[A]), e.toISOString();
|
|
41
|
-
}, [B, A]), { data: H, loading: xe, error: U } = ne({ fetchPolicy: "cache-and-network" }), { data: W, loading: Se, error: G } = re({
|
|
34
|
+
}, A = () => {
|
|
35
|
+
let A = _(), { activeOrgId: j } = e(), [M, de] = y("90d"), [N, P] = y(!1), [F, I] = y(null), [fe] = ne(), [L, R] = y(!1), [z, B] = y(null), [pe] = ce(), V = v(() => /* @__PURE__ */ new Date(), []), { data: me, loading: H } = r({ fetchPolicy: "cache-and-network" }), he = v(() => {
|
|
36
|
+
let e = new Date(V);
|
|
37
|
+
return e.setDate(e.getDate() - ue[M]), e.toISOString();
|
|
38
|
+
}, [V, M]), { data: U, loading: ge, error: W } = ee({ fetchPolicy: "cache-and-network" }), { data: G, loading: _e, error: K } = te({
|
|
42
39
|
variables: {
|
|
43
|
-
organizationId:
|
|
40
|
+
organizationId: j ?? "",
|
|
44
41
|
period: "monthly",
|
|
45
|
-
startDate:
|
|
46
|
-
endDate:
|
|
42
|
+
startDate: he,
|
|
43
|
+
endDate: V.toISOString(),
|
|
47
44
|
salesLimit: 10,
|
|
48
45
|
salesOffset: 0,
|
|
49
46
|
payoutsLimit: 10,
|
|
50
47
|
payoutsOffset: 0
|
|
51
48
|
},
|
|
52
|
-
skip: !
|
|
49
|
+
skip: !j,
|
|
53
50
|
fetchPolicy: "cache-and-network"
|
|
54
|
-
}),
|
|
55
|
-
|
|
56
|
-
}, X = async () => {
|
|
57
|
-
if (k) {
|
|
58
|
-
M(!0), P(null);
|
|
59
|
-
try {
|
|
60
|
-
let e = (await _e({ variables: { input: {
|
|
61
|
-
name: K?.name ?? k,
|
|
62
|
-
email: he?.email ?? ""
|
|
63
|
-
} } })).data?.createBillingAccount?.id;
|
|
64
|
-
e && await F({
|
|
65
|
-
variables: {
|
|
66
|
-
organizationId: k,
|
|
67
|
-
billingAccountId: e
|
|
68
|
-
},
|
|
69
|
-
refetchQueries: ["GetMyOrganizations"]
|
|
70
|
-
});
|
|
71
|
-
} catch (e) {
|
|
72
|
-
P(e instanceof Error ? e.message : "Failed to link billing account");
|
|
73
|
-
} finally {
|
|
74
|
-
M(!1), L(!1);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
51
|
+
}), q = v(() => U?.myDeveloperOrganizations?.map((e) => e) ?? [], [U?.myDeveloperOrganizations]).find((e) => e.id === j), J = me?.myBillingAccounts ?? [], Y = J.find((e) => e.id === q?.billingAccountId) ?? null, X = () => {
|
|
52
|
+
B(q?.billingAccountId ?? J.find((e) => e.isDefault)?.id ?? J[0]?.id ?? null), R(!0);
|
|
77
53
|
}, Z = async () => {
|
|
78
|
-
if (!(!
|
|
79
|
-
|
|
54
|
+
if (!(!j || !z)) {
|
|
55
|
+
P(!0), I(null);
|
|
80
56
|
try {
|
|
81
|
-
await
|
|
57
|
+
await fe({
|
|
82
58
|
variables: {
|
|
83
|
-
organizationId:
|
|
84
|
-
billingAccountId:
|
|
59
|
+
organizationId: j,
|
|
60
|
+
billingAccountId: z
|
|
85
61
|
},
|
|
86
62
|
refetchQueries: ["GetMyOrganizations"]
|
|
87
|
-
}),
|
|
63
|
+
}), R(!1);
|
|
88
64
|
} catch (e) {
|
|
89
|
-
|
|
65
|
+
I(e instanceof Error ? e.message : "Failed to link billing account");
|
|
90
66
|
} finally {
|
|
91
|
-
|
|
67
|
+
P(!1);
|
|
92
68
|
}
|
|
93
69
|
}
|
|
94
|
-
}, Q =
|
|
70
|
+
}, Q = G?.developerOrgRevenueSummary, ve = [...G?.developerOrgRevenueAnalytics ?? []].sort((e, t) => new Date(e.date).getTime() - new Date(t.date).getTime()), ye = G?.developerOrgSales?.edges?.map((e) => e.node) ?? [], be = G?.developerOrgPayouts?.edges?.map((e) => e.node) ?? [], $ = ve.map((e) => ({
|
|
95
71
|
date: new Date(e.date).toLocaleDateString(void 0, {
|
|
96
72
|
month: "short",
|
|
97
73
|
day: "numeric"
|
|
@@ -102,338 +78,311 @@ var D = {
|
|
|
102
78
|
refunds: e.refunds,
|
|
103
79
|
salesCount: e.salesCount
|
|
104
80
|
}));
|
|
105
|
-
return
|
|
106
|
-
title:
|
|
107
|
-
description:
|
|
108
|
-
children: /* @__PURE__ */
|
|
81
|
+
return ge && !U ? /* @__PURE__ */ D(a, {
|
|
82
|
+
title: A("devportal.revenue.title", "Revenue"),
|
|
83
|
+
description: A("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
|
|
84
|
+
children: /* @__PURE__ */ D("div", {
|
|
109
85
|
className: "flex items-center justify-center py-16 text-muted-foreground",
|
|
110
|
-
children: /* @__PURE__ */
|
|
86
|
+
children: /* @__PURE__ */ D(E, { className: "h-8 w-8 animate-spin" })
|
|
111
87
|
})
|
|
112
|
-
}) :
|
|
113
|
-
title:
|
|
114
|
-
description:
|
|
115
|
-
children: /* @__PURE__ */
|
|
116
|
-
icon: /* @__PURE__ */
|
|
88
|
+
}) : W ? /* @__PURE__ */ D(a, {
|
|
89
|
+
title: A("devportal.revenue.title", "Revenue"),
|
|
90
|
+
description: A("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
|
|
91
|
+
children: /* @__PURE__ */ D(n, {
|
|
92
|
+
icon: /* @__PURE__ */ D(b, {
|
|
117
93
|
size: 32,
|
|
118
94
|
className: "text-status-error-text"
|
|
119
95
|
}),
|
|
120
|
-
title:
|
|
121
|
-
description:
|
|
96
|
+
title: A("devportal.revenue.errorLoadOrgs", "Unable to load organizations"),
|
|
97
|
+
description: i(W)
|
|
122
98
|
})
|
|
123
|
-
}) :
|
|
124
|
-
title:
|
|
125
|
-
description:
|
|
126
|
-
children: /* @__PURE__ */
|
|
127
|
-
icon: /* @__PURE__ */
|
|
99
|
+
}) : j ? K ? /* @__PURE__ */ D(a, {
|
|
100
|
+
title: A("devportal.revenue.title", "Revenue"),
|
|
101
|
+
description: A("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
|
|
102
|
+
children: /* @__PURE__ */ D(n, {
|
|
103
|
+
icon: /* @__PURE__ */ D(b, {
|
|
128
104
|
size: 32,
|
|
129
105
|
className: "text-status-error-text"
|
|
130
106
|
}),
|
|
131
|
-
title:
|
|
132
|
-
description:
|
|
107
|
+
title: A("devportal.revenue.errorLoadData", "Unable to load revenue data"),
|
|
108
|
+
description: i(K)
|
|
133
109
|
})
|
|
134
|
-
}) : /* @__PURE__ */
|
|
135
|
-
title:
|
|
136
|
-
description:
|
|
137
|
-
actions: /* @__PURE__ */
|
|
110
|
+
}) : /* @__PURE__ */ O(a, {
|
|
111
|
+
title: A("devportal.revenue.title", "Revenue"),
|
|
112
|
+
description: q ? `${A("devportal.revenue.financialPerformanceFor", "Financial performance for")} ${q.name}` : A("devportal.revenue.shortDescription", "Track revenue, sales, and payouts"),
|
|
113
|
+
actions: /* @__PURE__ */ D("div", {
|
|
138
114
|
className: "flex flex-wrap gap-2",
|
|
139
|
-
children: /* @__PURE__ */
|
|
140
|
-
value:
|
|
141
|
-
onChange: (e) =>
|
|
142
|
-
"aria-label":
|
|
115
|
+
children: /* @__PURE__ */ O("select", {
|
|
116
|
+
value: M,
|
|
117
|
+
onChange: (e) => de(e.target.value),
|
|
118
|
+
"aria-label": A("devportal.revenue.selectRangeAria", "Select time range"),
|
|
143
119
|
className: "rounded-md border bg-background px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary",
|
|
144
120
|
children: [
|
|
145
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ D("option", {
|
|
146
122
|
value: "30d",
|
|
147
|
-
children:
|
|
123
|
+
children: A("devportal.revenue.range.30d", "Last 30 days")
|
|
148
124
|
}),
|
|
149
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ D("option", {
|
|
150
126
|
value: "90d",
|
|
151
|
-
children:
|
|
127
|
+
children: A("devportal.revenue.range.90d", "Last 90 days")
|
|
152
128
|
}),
|
|
153
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ D("option", {
|
|
154
130
|
value: "12m",
|
|
155
|
-
children:
|
|
131
|
+
children: A("devportal.revenue.range.12m", "Last 12 months")
|
|
156
132
|
})
|
|
157
133
|
]
|
|
158
134
|
})
|
|
159
135
|
}),
|
|
160
136
|
children: [
|
|
161
|
-
|
|
137
|
+
q && !q.billingAccountId && /* @__PURE__ */ O("div", {
|
|
162
138
|
className: "mb-6 rounded-lg border border-border-subtle bg-status-info-bg-subtle p-4 flex flex-col gap-3",
|
|
163
|
-
children: [
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
onClick: Y,
|
|
190
|
-
disabled: j || V,
|
|
191
|
-
className: "inline-flex items-center gap-2 rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50 flex-shrink-0",
|
|
192
|
-
children: [j || V ? /* @__PURE__ */ T(C, {
|
|
193
|
-
size: 14,
|
|
194
|
-
className: "animate-spin"
|
|
195
|
-
}) : /* @__PURE__ */ T(S, { size: 14 }), j ? O("devportal.revenue.linking", "Linking...") : O("devportal.revenue.linkBillingAccount", "Link Billing Account")]
|
|
196
|
-
})
|
|
197
|
-
]
|
|
198
|
-
}), I && q.length > 0 && /* @__PURE__ */ E("div", {
|
|
199
|
-
className: "rounded-lg border border-border bg-card p-4 ml-8 space-y-3",
|
|
200
|
-
children: [
|
|
201
|
-
/* @__PURE__ */ T("p", {
|
|
202
|
-
className: "text-sm font-medium",
|
|
203
|
-
children: O("devportal.revenue.chooseBillingAccount", "Choose a billing account to link")
|
|
204
|
-
}),
|
|
205
|
-
/* @__PURE__ */ E("div", {
|
|
206
|
-
className: "space-y-2",
|
|
207
|
-
children: [q.map((e) => /* @__PURE__ */ E("button", {
|
|
208
|
-
type: "button",
|
|
209
|
-
onClick: () => z(e.id ?? null),
|
|
210
|
-
className: t("flex w-full items-center gap-3 rounded-md border px-3 py-2.5 text-sm text-left transition-colors", R === e.id ? "border-primary bg-primary/5 text-foreground" : "border-border hover:bg-accent text-foreground"),
|
|
211
|
-
children: [/* @__PURE__ */ T(y, {
|
|
212
|
-
size: 14,
|
|
213
|
-
className: t("flex-shrink-0", R === e.id ? "opacity-100 text-primary" : "opacity-0")
|
|
214
|
-
}), /* @__PURE__ */ E("div", {
|
|
215
|
-
className: "flex-1 min-w-0",
|
|
216
|
-
children: [/* @__PURE__ */ T("p", {
|
|
217
|
-
className: "font-medium truncate",
|
|
218
|
-
children: e.name
|
|
219
|
-
}), e.isDefault && /* @__PURE__ */ T("p", {
|
|
220
|
-
className: "text-xs text-muted-foreground",
|
|
221
|
-
children: O("devportal.revenue.defaultAccount", "Default")
|
|
222
|
-
})]
|
|
223
|
-
})]
|
|
224
|
-
}, e.id)), /* @__PURE__ */ E("button", {
|
|
139
|
+
children: [
|
|
140
|
+
/* @__PURE__ */ O("div", {
|
|
141
|
+
className: "flex items-start gap-3",
|
|
142
|
+
children: [
|
|
143
|
+
/* @__PURE__ */ D(T, {
|
|
144
|
+
size: 20,
|
|
145
|
+
className: "text-accent-blue flex-shrink-0 mt-0.5"
|
|
146
|
+
}),
|
|
147
|
+
/* @__PURE__ */ O("div", {
|
|
148
|
+
className: "flex-1 min-w-0",
|
|
149
|
+
children: [
|
|
150
|
+
/* @__PURE__ */ D("p", {
|
|
151
|
+
className: "text-sm font-medium text-status-info-text",
|
|
152
|
+
children: A("devportal.revenue.billingNotLinkedTitle", "Link a billing account to receive store revenue")
|
|
153
|
+
}),
|
|
154
|
+
/* @__PURE__ */ D("p", {
|
|
155
|
+
className: "mt-1 text-sm text-status-info-text",
|
|
156
|
+
children: A("devportal.revenue.billingNotLinkedDesc", "Once linked, net earnings from app sales will appear in your billing credits — you can spend them on platform services or withdraw to your bank.")
|
|
157
|
+
}),
|
|
158
|
+
F && /* @__PURE__ */ D("p", {
|
|
159
|
+
className: "mt-2 text-sm text-status-error-text",
|
|
160
|
+
children: F
|
|
161
|
+
})
|
|
162
|
+
]
|
|
163
|
+
}),
|
|
164
|
+
/* @__PURE__ */ O("button", {
|
|
225
165
|
type: "button",
|
|
226
|
-
onClick:
|
|
227
|
-
|
|
228
|
-
|
|
166
|
+
onClick: X,
|
|
167
|
+
disabled: N || H,
|
|
168
|
+
className: "inline-flex items-center gap-2 rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50 flex-shrink-0",
|
|
169
|
+
children: [N || H ? /* @__PURE__ */ D(E, {
|
|
229
170
|
size: 14,
|
|
230
|
-
className:
|
|
231
|
-
})
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
171
|
+
className: "animate-spin"
|
|
172
|
+
}) : /* @__PURE__ */ D(T, { size: 14 }), N ? A("devportal.revenue.linking", "Linking...") : A("devportal.revenue.linkBillingAccount", "Link Billing Account")]
|
|
173
|
+
})
|
|
174
|
+
]
|
|
175
|
+
}),
|
|
176
|
+
L && J.length === 0 && /* @__PURE__ */ D("div", {
|
|
177
|
+
className: "rounded-lg border border-border bg-card p-4 ml-8 text-sm text-muted-foreground",
|
|
178
|
+
children: A("devportal.revenue.noBillingAccounts", "You don't have any billing accounts yet. Create one from your account billing settings first.")
|
|
179
|
+
}),
|
|
180
|
+
L && J.length > 0 && /* @__PURE__ */ O("div", {
|
|
181
|
+
className: "rounded-lg border border-border bg-card p-4 ml-8 space-y-3",
|
|
182
|
+
children: [
|
|
183
|
+
/* @__PURE__ */ D("p", {
|
|
184
|
+
className: "text-sm font-medium",
|
|
185
|
+
children: A("devportal.revenue.chooseBillingAccount", "Choose a billing account to link")
|
|
186
|
+
}),
|
|
187
|
+
/* @__PURE__ */ D("div", {
|
|
188
|
+
className: "space-y-2",
|
|
189
|
+
children: J.map((e) => /* @__PURE__ */ O("button", {
|
|
190
|
+
type: "button",
|
|
191
|
+
onClick: () => B(e.id ?? null),
|
|
192
|
+
className: t("flex w-full items-center gap-3 rounded-md border px-3 py-2.5 text-sm text-left transition-colors", z === e.id ? "border-primary bg-primary/5 text-foreground" : "border-border hover:bg-accent text-foreground"),
|
|
193
|
+
children: [/* @__PURE__ */ D(S, {
|
|
194
|
+
size: 14,
|
|
195
|
+
className: t("flex-shrink-0", z === e.id ? "opacity-100 text-primary" : "opacity-0")
|
|
196
|
+
}), /* @__PURE__ */ O("div", {
|
|
197
|
+
className: "flex-1 min-w-0",
|
|
198
|
+
children: [/* @__PURE__ */ D("p", {
|
|
199
|
+
className: "font-medium truncate",
|
|
200
|
+
children: e.name
|
|
201
|
+
}), e.isDefault && /* @__PURE__ */ D("p", {
|
|
202
|
+
className: "text-xs text-muted-foreground",
|
|
203
|
+
children: A("devportal.revenue.defaultAccount", "Default")
|
|
204
|
+
})]
|
|
239
205
|
})]
|
|
206
|
+
}, e.id))
|
|
207
|
+
}),
|
|
208
|
+
/* @__PURE__ */ O("div", {
|
|
209
|
+
className: "flex items-center justify-end gap-2 pt-1",
|
|
210
|
+
children: [/* @__PURE__ */ D("button", {
|
|
211
|
+
type: "button",
|
|
212
|
+
onClick: () => {
|
|
213
|
+
R(!1), I(null);
|
|
214
|
+
},
|
|
215
|
+
className: "rounded-md px-3 py-1.5 text-xs font-medium text-muted-foreground hover:bg-accent transition-colors",
|
|
216
|
+
children: A("devportal.cancel", "Cancel")
|
|
217
|
+
}), /* @__PURE__ */ O("button", {
|
|
218
|
+
type: "button",
|
|
219
|
+
disabled: N || !z,
|
|
220
|
+
onClick: () => void Z(),
|
|
221
|
+
className: "inline-flex items-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
222
|
+
children: [N ? /* @__PURE__ */ D(E, {
|
|
223
|
+
size: 13,
|
|
224
|
+
className: "animate-spin"
|
|
225
|
+
}) : /* @__PURE__ */ D(T, { size: 13 }), A("devportal.revenue.confirm", "Confirm")]
|
|
240
226
|
})]
|
|
241
|
-
})
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
children: [/* @__PURE__ */ T("button", {
|
|
246
|
-
type: "button",
|
|
247
|
-
onClick: () => {
|
|
248
|
-
L(!1), P(null);
|
|
249
|
-
},
|
|
250
|
-
className: "rounded-md px-3 py-1.5 text-xs font-medium text-muted-foreground hover:bg-accent transition-colors",
|
|
251
|
-
children: O("devportal.cancel", "Cancel")
|
|
252
|
-
}), /* @__PURE__ */ E("button", {
|
|
253
|
-
type: "button",
|
|
254
|
-
disabled: j,
|
|
255
|
-
onClick: () => R ? Z() : X(),
|
|
256
|
-
className: "inline-flex items-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
257
|
-
children: [j ? /* @__PURE__ */ T(C, {
|
|
258
|
-
size: 13,
|
|
259
|
-
className: "animate-spin"
|
|
260
|
-
}) : /* @__PURE__ */ T(S, { size: 13 }), O("devportal.revenue.confirm", "Confirm")]
|
|
261
|
-
})]
|
|
262
|
-
})
|
|
263
|
-
]
|
|
264
|
-
})]
|
|
227
|
+
})
|
|
228
|
+
]
|
|
229
|
+
})
|
|
230
|
+
]
|
|
265
231
|
}),
|
|
266
|
-
|
|
232
|
+
q?.billingAccountId && /* @__PURE__ */ O("div", {
|
|
267
233
|
className: "mb-6 rounded-lg border border-border bg-card p-3 flex flex-col gap-3",
|
|
268
|
-
children: [/* @__PURE__ */
|
|
234
|
+
children: [/* @__PURE__ */ O("div", {
|
|
269
235
|
className: "flex items-center gap-3",
|
|
270
236
|
children: [
|
|
271
|
-
/* @__PURE__ */
|
|
237
|
+
/* @__PURE__ */ D(C, {
|
|
272
238
|
size: 16,
|
|
273
239
|
className: "text-muted-foreground flex-shrink-0"
|
|
274
240
|
}),
|
|
275
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ O("div", {
|
|
276
242
|
className: "flex-1 min-w-0",
|
|
277
|
-
children: [/* @__PURE__ */
|
|
243
|
+
children: [/* @__PURE__ */ D("p", {
|
|
278
244
|
className: "text-sm font-medium truncate",
|
|
279
|
-
children:
|
|
280
|
-
}), /* @__PURE__ */
|
|
245
|
+
children: Y?.name ?? A("devportal.revenue.billingAccount", "Billing account")
|
|
246
|
+
}), /* @__PURE__ */ D("p", {
|
|
281
247
|
className: "text-xs text-muted-foreground truncate",
|
|
282
|
-
children:
|
|
248
|
+
children: Y ? `${Y.currency}${Y.email ? ` · ${Y.email}` : ""}` : q.billingAccountId
|
|
283
249
|
})]
|
|
284
250
|
}),
|
|
285
|
-
!
|
|
251
|
+
!L && /* @__PURE__ */ D("button", {
|
|
286
252
|
type: "button",
|
|
287
|
-
onClick:
|
|
288
|
-
disabled:
|
|
253
|
+
onClick: X,
|
|
254
|
+
disabled: H,
|
|
289
255
|
className: "text-xs text-muted-foreground hover:text-foreground transition-colors flex-shrink-0 disabled:opacity-50",
|
|
290
|
-
children:
|
|
256
|
+
children: A("devportal.revenue.changeBillingAccount", "Change")
|
|
291
257
|
})
|
|
292
258
|
]
|
|
293
|
-
}),
|
|
259
|
+
}), L && J.length > 0 && /* @__PURE__ */ O("div", {
|
|
294
260
|
className: "rounded-lg border border-border bg-background p-4 space-y-3",
|
|
295
261
|
children: [
|
|
296
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ D("p", {
|
|
297
263
|
className: "text-sm font-medium",
|
|
298
|
-
children:
|
|
264
|
+
children: A("devportal.revenue.chooseBillingAccount", "Choose a billing account to link")
|
|
299
265
|
}),
|
|
300
|
-
/* @__PURE__ */
|
|
266
|
+
/* @__PURE__ */ D("div", {
|
|
301
267
|
className: "space-y-2",
|
|
302
|
-
children:
|
|
268
|
+
children: J.map((e) => /* @__PURE__ */ O("button", {
|
|
303
269
|
type: "button",
|
|
304
|
-
onClick: () =>
|
|
305
|
-
className: t("flex w-full items-center gap-3 rounded-md border px-3 py-2.5 text-sm text-left transition-colors",
|
|
306
|
-
children: [/* @__PURE__ */
|
|
270
|
+
onClick: () => B(e.id ?? null),
|
|
271
|
+
className: t("flex w-full items-center gap-3 rounded-md border px-3 py-2.5 text-sm text-left transition-colors", z === e.id ? "border-primary bg-primary/5 text-foreground" : "border-border hover:bg-accent text-foreground"),
|
|
272
|
+
children: [/* @__PURE__ */ D(S, {
|
|
307
273
|
size: 14,
|
|
308
|
-
className: t("flex-shrink-0",
|
|
309
|
-
}), /* @__PURE__ */
|
|
274
|
+
className: t("flex-shrink-0", z === e.id ? "opacity-100 text-primary" : "opacity-0")
|
|
275
|
+
}), /* @__PURE__ */ O("div", {
|
|
310
276
|
className: "flex-1 min-w-0",
|
|
311
|
-
children: [/* @__PURE__ */
|
|
277
|
+
children: [/* @__PURE__ */ D("p", {
|
|
312
278
|
className: "font-medium truncate",
|
|
313
279
|
children: e.name
|
|
314
|
-
}), e.isDefault && /* @__PURE__ */
|
|
315
|
-
className: "text-xs text-muted-foreground",
|
|
316
|
-
children: O("devportal.revenue.defaultAccount", "Default")
|
|
317
|
-
})]
|
|
318
|
-
})]
|
|
319
|
-
}, e.id)), /* @__PURE__ */ E("button", {
|
|
320
|
-
type: "button",
|
|
321
|
-
onClick: () => z(null),
|
|
322
|
-
className: t("flex w-full items-center gap-3 rounded-md border px-3 py-2.5 text-sm text-left transition-colors", R === null ? "border-primary bg-primary/5 text-foreground" : "border-border hover:bg-accent text-foreground"),
|
|
323
|
-
children: [/* @__PURE__ */ T(y, {
|
|
324
|
-
size: 14,
|
|
325
|
-
className: t("flex-shrink-0", R === null ? "opacity-100 text-primary" : "opacity-0")
|
|
326
|
-
}), /* @__PURE__ */ E("div", {
|
|
327
|
-
className: "flex-1",
|
|
328
|
-
children: [/* @__PURE__ */ E("p", {
|
|
329
|
-
className: "font-medium flex items-center gap-1.5",
|
|
330
|
-
children: [/* @__PURE__ */ T(w, { size: 13 }), O("devportal.revenue.createNewBillingAccount", "Create a new billing account")]
|
|
331
|
-
}), /* @__PURE__ */ T("p", {
|
|
280
|
+
}), e.isDefault && /* @__PURE__ */ D("p", {
|
|
332
281
|
className: "text-xs text-muted-foreground",
|
|
333
|
-
children:
|
|
282
|
+
children: A("devportal.revenue.defaultAccount", "Default")
|
|
334
283
|
})]
|
|
335
284
|
})]
|
|
336
|
-
})
|
|
285
|
+
}, e.id))
|
|
337
286
|
}),
|
|
338
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ O("div", {
|
|
339
288
|
className: "flex items-center justify-end gap-2 pt-1",
|
|
340
|
-
children: [/* @__PURE__ */
|
|
289
|
+
children: [/* @__PURE__ */ D("button", {
|
|
341
290
|
type: "button",
|
|
342
291
|
onClick: () => {
|
|
343
|
-
|
|
292
|
+
R(!1), I(null);
|
|
344
293
|
},
|
|
345
294
|
className: "rounded-md px-3 py-1.5 text-xs font-medium text-muted-foreground hover:bg-accent transition-colors",
|
|
346
|
-
children:
|
|
347
|
-
}), /* @__PURE__ */
|
|
295
|
+
children: A("devportal.cancel", "Cancel")
|
|
296
|
+
}), /* @__PURE__ */ O("button", {
|
|
348
297
|
type: "button",
|
|
349
|
-
disabled:
|
|
350
|
-
onClick: () =>
|
|
298
|
+
disabled: N || !z,
|
|
299
|
+
onClick: () => void Z(),
|
|
351
300
|
className: "inline-flex items-center gap-1.5 rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 transition-colors disabled:opacity-50",
|
|
352
|
-
children: [
|
|
301
|
+
children: [N ? /* @__PURE__ */ D(E, {
|
|
353
302
|
size: 13,
|
|
354
303
|
className: "animate-spin"
|
|
355
|
-
}) : /* @__PURE__ */ T
|
|
304
|
+
}) : /* @__PURE__ */ D(T, { size: 13 }), A("devportal.revenue.confirm", "Confirm")]
|
|
356
305
|
})]
|
|
357
306
|
}),
|
|
358
|
-
|
|
307
|
+
F && /* @__PURE__ */ D("p", {
|
|
359
308
|
className: "text-xs text-status-error-text",
|
|
360
|
-
children:
|
|
309
|
+
children: F
|
|
361
310
|
})
|
|
362
311
|
]
|
|
363
312
|
})]
|
|
364
313
|
}),
|
|
365
|
-
|
|
314
|
+
_e && !Q ? /* @__PURE__ */ D("div", {
|
|
366
315
|
className: "flex items-center justify-center py-16 text-muted-foreground",
|
|
367
|
-
children: /* @__PURE__ */
|
|
368
|
-
}) : Q ? /* @__PURE__ */
|
|
369
|
-
/* @__PURE__ */
|
|
316
|
+
children: /* @__PURE__ */ D(E, { className: "h-8 w-8 animate-spin" })
|
|
317
|
+
}) : Q ? /* @__PURE__ */ O(le, { children: [
|
|
318
|
+
/* @__PURE__ */ O(re, {
|
|
370
319
|
columns: 4,
|
|
371
320
|
children: [
|
|
372
|
-
/* @__PURE__ */
|
|
373
|
-
title:
|
|
321
|
+
/* @__PURE__ */ D(s, {
|
|
322
|
+
title: A("devportal.revenue.grossRevenue", "Gross Revenue"),
|
|
374
323
|
value: `$${Q.totalGrossRevenue.toLocaleString()}`,
|
|
375
|
-
icon: /* @__PURE__ */
|
|
324
|
+
icon: /* @__PURE__ */ D(w, { size: 20 })
|
|
376
325
|
}),
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
-
title:
|
|
326
|
+
/* @__PURE__ */ D(s, {
|
|
327
|
+
title: A("devportal.revenue.netRevenue", "Net Revenue"),
|
|
379
328
|
value: `$${Q.totalNetRevenue.toLocaleString()}`,
|
|
380
|
-
icon: /* @__PURE__ */
|
|
329
|
+
icon: /* @__PURE__ */ D(se, { size: 20 })
|
|
381
330
|
}),
|
|
382
|
-
/* @__PURE__ */
|
|
383
|
-
title:
|
|
331
|
+
/* @__PURE__ */ D(s, {
|
|
332
|
+
title: A("devportal.revenue.pendingBalance", "Pending Balance"),
|
|
384
333
|
value: `$${Q.pendingBalance.toLocaleString()}`,
|
|
385
|
-
icon: /* @__PURE__ */
|
|
386
|
-
description: Q.nextPayoutDate ? `${
|
|
334
|
+
icon: /* @__PURE__ */ D(C, { size: 20 }),
|
|
335
|
+
description: Q.nextPayoutDate ? `${A("devportal.revenue.nextPayout", "Next payout")} ${new Date(Q.nextPayoutDate).toLocaleDateString()}` : A("devportal.revenue.noPayoutScheduled", "No payout scheduled")
|
|
387
336
|
}),
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
title:
|
|
337
|
+
/* @__PURE__ */ D(s, {
|
|
338
|
+
title: A("devportal.revenue.platformFees", "Platform Fees"),
|
|
390
339
|
value: `$${Q.totalPlatformFees.toLocaleString()}`,
|
|
391
|
-
icon: /* @__PURE__ */
|
|
392
|
-
description: `${Q.totalRefundsCount} ${
|
|
340
|
+
icon: /* @__PURE__ */ D(oe, { size: 20 }),
|
|
341
|
+
description: `${Q.totalRefundsCount} ${A("devportal.revenue.refunds", "refunds")}`
|
|
393
342
|
})
|
|
394
343
|
]
|
|
395
344
|
}),
|
|
396
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ O("div", {
|
|
397
346
|
className: "grid gap-6 xl:grid-cols-2",
|
|
398
|
-
children: [/* @__PURE__ */
|
|
399
|
-
title:
|
|
400
|
-
children: /* @__PURE__ */
|
|
347
|
+
children: [/* @__PURE__ */ D(o, {
|
|
348
|
+
title: A("devportal.revenue.revenueTrend", "Revenue trend"),
|
|
349
|
+
children: /* @__PURE__ */ D("div", {
|
|
401
350
|
className: "rounded-lg border bg-card p-4",
|
|
402
|
-
children: /* @__PURE__ */
|
|
351
|
+
children: /* @__PURE__ */ D(d, {
|
|
403
352
|
width: "100%",
|
|
404
353
|
height: 300,
|
|
405
|
-
children: /* @__PURE__ */
|
|
354
|
+
children: /* @__PURE__ */ O(ae, {
|
|
406
355
|
data: $,
|
|
407
356
|
children: [
|
|
408
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ D(f, {
|
|
409
358
|
strokeDasharray: "3 3",
|
|
410
359
|
stroke: "var(--color-chart-grid)"
|
|
411
360
|
}),
|
|
412
|
-
/* @__PURE__ */
|
|
361
|
+
/* @__PURE__ */ D(m, {
|
|
413
362
|
dataKey: "date",
|
|
414
363
|
stroke: "var(--color-chart-axis)",
|
|
415
364
|
fontSize: 12
|
|
416
365
|
}),
|
|
417
|
-
/* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ D(h, {
|
|
418
367
|
stroke: "var(--color-chart-axis)",
|
|
419
368
|
fontSize: 12
|
|
420
369
|
}),
|
|
421
|
-
/* @__PURE__ */
|
|
370
|
+
/* @__PURE__ */ D(u, { contentStyle: {
|
|
422
371
|
backgroundColor: "var(--color-card)",
|
|
423
372
|
border: "1px solid var(--color-border-default)",
|
|
424
373
|
borderRadius: 12
|
|
425
374
|
} }),
|
|
426
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ D(p, {
|
|
427
376
|
type: "monotone",
|
|
428
377
|
dataKey: "grossRevenue",
|
|
429
|
-
stroke:
|
|
378
|
+
stroke: k.primary,
|
|
430
379
|
strokeWidth: 2,
|
|
431
380
|
dot: !1
|
|
432
381
|
}),
|
|
433
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ D(p, {
|
|
434
383
|
type: "monotone",
|
|
435
384
|
dataKey: "netRevenue",
|
|
436
|
-
stroke:
|
|
385
|
+
stroke: k.secondary,
|
|
437
386
|
strokeWidth: 2,
|
|
438
387
|
dot: !1
|
|
439
388
|
})
|
|
@@ -441,33 +390,33 @@ var D = {
|
|
|
441
390
|
})
|
|
442
391
|
})
|
|
443
392
|
})
|
|
444
|
-
}), /* @__PURE__ */
|
|
445
|
-
title:
|
|
446
|
-
children: Q.topApps.length > 0 ? /* @__PURE__ */
|
|
393
|
+
}), /* @__PURE__ */ D(o, {
|
|
394
|
+
title: A("devportal.revenue.topApps", "Top applications by revenue"),
|
|
395
|
+
children: Q.topApps.length > 0 ? /* @__PURE__ */ D("div", {
|
|
447
396
|
className: "space-y-2",
|
|
448
|
-
children: Q.topApps.map((e) => /* @__PURE__ */
|
|
397
|
+
children: Q.topApps.map((e) => /* @__PURE__ */ D("div", {
|
|
449
398
|
className: "rounded-lg border bg-card p-4",
|
|
450
|
-
children: /* @__PURE__ */
|
|
399
|
+
children: /* @__PURE__ */ O("div", {
|
|
451
400
|
className: "flex items-start justify-between gap-3",
|
|
452
|
-
children: [/* @__PURE__ */
|
|
401
|
+
children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
|
|
453
402
|
className: "font-medium",
|
|
454
403
|
children: e.applicationName
|
|
455
|
-
}), /* @__PURE__ */
|
|
404
|
+
}), /* @__PURE__ */ O("p", {
|
|
456
405
|
className: "text-sm text-muted-foreground",
|
|
457
406
|
children: [
|
|
458
407
|
e.salesCount,
|
|
459
408
|
" ",
|
|
460
|
-
|
|
409
|
+
A("devportal.revenue.sales", "sales")
|
|
461
410
|
]
|
|
462
|
-
})] }), /* @__PURE__ */
|
|
411
|
+
})] }), /* @__PURE__ */ O("div", {
|
|
463
412
|
className: "text-right",
|
|
464
|
-
children: [/* @__PURE__ */
|
|
413
|
+
children: [/* @__PURE__ */ O("p", {
|
|
465
414
|
className: "font-semibold",
|
|
466
415
|
children: ["$", e.grossRevenue.toLocaleString()]
|
|
467
|
-
}), /* @__PURE__ */
|
|
416
|
+
}), /* @__PURE__ */ O("p", {
|
|
468
417
|
className: "text-sm text-muted-foreground",
|
|
469
418
|
children: [
|
|
470
|
-
|
|
419
|
+
A("devportal.revenue.net", "Net"),
|
|
471
420
|
" $",
|
|
472
421
|
e.netRevenue.toLocaleString()
|
|
473
422
|
]
|
|
@@ -475,44 +424,44 @@ var D = {
|
|
|
475
424
|
})]
|
|
476
425
|
})
|
|
477
426
|
}, e.applicationId))
|
|
478
|
-
}) : /* @__PURE__ */
|
|
479
|
-
icon: /* @__PURE__ */
|
|
480
|
-
title:
|
|
481
|
-
description:
|
|
427
|
+
}) : /* @__PURE__ */ D(n, {
|
|
428
|
+
icon: /* @__PURE__ */ D(x, { size: 24 }),
|
|
429
|
+
title: A("devportal.revenue.noLeadersTitle", "No revenue leaders yet"),
|
|
430
|
+
description: A("devportal.revenue.noLeadersDescription", "Top-performing applications will appear here once revenue is recorded.")
|
|
482
431
|
})
|
|
483
432
|
})]
|
|
484
433
|
}),
|
|
485
|
-
/* @__PURE__ */
|
|
486
|
-
title:
|
|
487
|
-
children: /* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ D(o, {
|
|
435
|
+
title: A("devportal.revenue.salesVolume", "Sales volume"),
|
|
436
|
+
children: /* @__PURE__ */ D("div", {
|
|
488
437
|
className: "rounded-lg border bg-card p-4",
|
|
489
|
-
children: /* @__PURE__ */
|
|
438
|
+
children: /* @__PURE__ */ D(d, {
|
|
490
439
|
width: "100%",
|
|
491
440
|
height: 280,
|
|
492
|
-
children: /* @__PURE__ */
|
|
441
|
+
children: /* @__PURE__ */ O(g, {
|
|
493
442
|
data: $,
|
|
494
443
|
children: [
|
|
495
|
-
/* @__PURE__ */
|
|
444
|
+
/* @__PURE__ */ D(f, {
|
|
496
445
|
strokeDasharray: "3 3",
|
|
497
446
|
stroke: "var(--color-chart-grid)"
|
|
498
447
|
}),
|
|
499
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ D(m, {
|
|
500
449
|
dataKey: "date",
|
|
501
450
|
stroke: "var(--color-chart-axis)",
|
|
502
451
|
fontSize: 12
|
|
503
452
|
}),
|
|
504
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ D(h, {
|
|
505
454
|
stroke: "var(--color-chart-axis)",
|
|
506
455
|
fontSize: 12
|
|
507
456
|
}),
|
|
508
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ D(u, { contentStyle: {
|
|
509
458
|
backgroundColor: "var(--color-card)",
|
|
510
459
|
border: "1px solid var(--color-border-default)",
|
|
511
460
|
borderRadius: 12
|
|
512
461
|
} }),
|
|
513
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ D(ie, {
|
|
514
463
|
dataKey: "salesCount",
|
|
515
|
-
fill:
|
|
464
|
+
fill: k.tertiary,
|
|
516
465
|
radius: [
|
|
517
466
|
6,
|
|
518
467
|
6,
|
|
@@ -525,59 +474,59 @@ var D = {
|
|
|
525
474
|
})
|
|
526
475
|
})
|
|
527
476
|
}),
|
|
528
|
-
/* @__PURE__ */
|
|
477
|
+
/* @__PURE__ */ O("div", {
|
|
529
478
|
className: "grid gap-6 xl:grid-cols-2",
|
|
530
|
-
children: [/* @__PURE__ */
|
|
531
|
-
title:
|
|
532
|
-
children: /* @__PURE__ */
|
|
533
|
-
data:
|
|
479
|
+
children: [/* @__PURE__ */ D(o, {
|
|
480
|
+
title: A("devportal.revenue.recentSales", "Recent sales"),
|
|
481
|
+
children: /* @__PURE__ */ D(l, {
|
|
482
|
+
data: ye,
|
|
534
483
|
keyField: "id",
|
|
535
484
|
columns: [
|
|
536
485
|
{
|
|
537
486
|
key: "application",
|
|
538
|
-
header:
|
|
539
|
-
render: (e) => e.application?.name || e.planName ||
|
|
487
|
+
header: A("devportal.revenue.application", "Application"),
|
|
488
|
+
render: (e) => e.application?.name || e.planName || A("devportal.common.unknown", "Unknown")
|
|
540
489
|
},
|
|
541
490
|
{
|
|
542
491
|
key: "grossAmount",
|
|
543
|
-
header:
|
|
492
|
+
header: A("devportal.revenue.gross", "Gross"),
|
|
544
493
|
render: (e) => `$${e.grossAmount.toLocaleString()}`
|
|
545
494
|
},
|
|
546
495
|
{
|
|
547
496
|
key: "netAmount",
|
|
548
|
-
header:
|
|
497
|
+
header: A("devportal.revenue.net", "Net"),
|
|
549
498
|
render: (e) => `$${e.netAmount.toLocaleString()}`
|
|
550
499
|
},
|
|
551
500
|
{
|
|
552
501
|
key: "status",
|
|
553
|
-
header:
|
|
554
|
-
render: (e) => /* @__PURE__ */
|
|
502
|
+
header: A("devportal.revenue.status", "Status"),
|
|
503
|
+
render: (e) => /* @__PURE__ */ D(c, {
|
|
555
504
|
status: e.status,
|
|
556
505
|
type: "app"
|
|
557
506
|
})
|
|
558
507
|
}
|
|
559
508
|
]
|
|
560
509
|
})
|
|
561
|
-
}), /* @__PURE__ */
|
|
562
|
-
title:
|
|
563
|
-
children: /* @__PURE__ */
|
|
564
|
-
data:
|
|
510
|
+
}), /* @__PURE__ */ D(o, {
|
|
511
|
+
title: A("devportal.revenue.payoutHistory", "Payout history"),
|
|
512
|
+
children: /* @__PURE__ */ D(l, {
|
|
513
|
+
data: be,
|
|
565
514
|
keyField: "id",
|
|
566
515
|
columns: [
|
|
567
516
|
{
|
|
568
517
|
key: "periodLabel",
|
|
569
|
-
header:
|
|
518
|
+
header: A("devportal.revenue.period", "Period"),
|
|
570
519
|
render: (e) => e.periodLabel
|
|
571
520
|
},
|
|
572
521
|
{
|
|
573
522
|
key: "netAmount",
|
|
574
|
-
header:
|
|
523
|
+
header: A("devportal.revenue.netPayout", "Net payout"),
|
|
575
524
|
render: (e) => `$${e.netAmount.toLocaleString()}`
|
|
576
525
|
},
|
|
577
526
|
{
|
|
578
527
|
key: "status",
|
|
579
|
-
header:
|
|
580
|
-
render: (e) => /* @__PURE__ */
|
|
528
|
+
header: A("devportal.revenue.status", "Status"),
|
|
529
|
+
render: (e) => /* @__PURE__ */ D(c, {
|
|
581
530
|
status: e.status,
|
|
582
531
|
type: "app"
|
|
583
532
|
})
|
|
@@ -586,26 +535,26 @@ var D = {
|
|
|
586
535
|
})
|
|
587
536
|
})]
|
|
588
537
|
})
|
|
589
|
-
] }) : /* @__PURE__ */
|
|
590
|
-
icon: /* @__PURE__ */
|
|
591
|
-
title:
|
|
592
|
-
description:
|
|
538
|
+
] }) : /* @__PURE__ */ D(n, {
|
|
539
|
+
icon: /* @__PURE__ */ D(w, { size: 32 }),
|
|
540
|
+
title: A("devportal.revenue.noDataTitle", "No revenue data yet"),
|
|
541
|
+
description: A("devportal.revenue.noDataDescription", "Revenue metrics will appear after this organization starts recording marketplace sales.")
|
|
593
542
|
})
|
|
594
543
|
]
|
|
595
|
-
}) : /* @__PURE__ */
|
|
596
|
-
title:
|
|
597
|
-
description:
|
|
598
|
-
children: /* @__PURE__ */
|
|
599
|
-
icon: /* @__PURE__ */
|
|
544
|
+
}) : /* @__PURE__ */ D(a, {
|
|
545
|
+
title: A("devportal.revenue.title", "Revenue"),
|
|
546
|
+
description: A("devportal.revenue.description", "Track real revenue, sales, and payout activity for your developer organizations"),
|
|
547
|
+
children: /* @__PURE__ */ D(n, {
|
|
548
|
+
icon: /* @__PURE__ */ D(x, {
|
|
600
549
|
size: 32,
|
|
601
550
|
className: "text-muted-foreground"
|
|
602
551
|
}),
|
|
603
|
-
title:
|
|
604
|
-
description:
|
|
552
|
+
title: A("devportal.revenue.selectOrgTitle", "Select an organization"),
|
|
553
|
+
description: A("devportal.revenue.selectOrgHint", "Use the organization switcher in the nav bar above to choose which organization's revenue to view.")
|
|
605
554
|
})
|
|
606
555
|
});
|
|
607
556
|
};
|
|
608
557
|
//#endregion
|
|
609
|
-
export {
|
|
558
|
+
export { A as RevenueDashboardPage };
|
|
610
559
|
|
|
611
560
|
//# sourceMappingURL=RevenueDashboardPage.js.map
|