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