@burdenoff/microfe-devportal 2026.916.3 → 2026.916.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrganizationsPage.d.ts","sourceRoot":"","sources":["../../../src/devportal/pages/OrganizationsPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"OrganizationsPage.d.ts","sourceRoot":"","sources":["../../../src/devportal/pages/OrganizationsPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AA8BhC;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAyQ/B,CAAC"}
|
|
@@ -6,117 +6,180 @@ import { useGetMyOrganizationsQuery as a } from "../../generated/global-operatio
|
|
|
6
6
|
import { getErrorMessage as o } from "../hooks/useGraphQL.js";
|
|
7
7
|
import { PageLayout as s } from "../components/PageLayout.js";
|
|
8
8
|
import { StatusBadge as c, VerifiedBadge as l } from "../components/StatusBadge.js";
|
|
9
|
-
import {
|
|
9
|
+
import { DataTable as u } from "../components/DataTable.js";
|
|
10
|
+
import { PermissionGuard as d } from "../components/PermissionGuard.js";
|
|
10
11
|
import "../components/index.js";
|
|
11
12
|
import "../hooks/index.js";
|
|
12
|
-
import { AlertCircle as
|
|
13
|
-
import {
|
|
14
|
-
import { EmphasisPanel as
|
|
13
|
+
import { AlertCircle as f, AppWindow as p, Building2 as m, CheckCircle as h, Eye as g, Loader2 as _, Plus as v, Users as y } from "lucide-react";
|
|
14
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
15
|
+
import { EmphasisPanel as S, GlassCard as C } from "@burdenoff/fe-libs/ui";
|
|
15
16
|
//#region src/devportal/pages/OrganizationsPage.tsx
|
|
16
|
-
var
|
|
17
|
-
let { navigate:
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
return
|
|
21
|
-
title:
|
|
22
|
-
description:
|
|
23
|
-
children: /* @__PURE__ */
|
|
17
|
+
var w = () => {
|
|
18
|
+
let { navigate: p, basePath: h } = e(), y = t(), w = i(), { data: E, loading: D, error: O, refetch: k } = a({ fetchPolicy: "cache-and-network" }), A = (E?.myDeveloperOrganizations ?? []).filter((e) => w ? e.kind === "PHYSICAL" : e.kind !== "PHYSICAL"), j = (e) => {
|
|
19
|
+
p?.(`${h}${e}`);
|
|
20
|
+
}, M = r(w, "new"), N = (e) => r(w, e), P = w ? y("devportal.sellerOrganizations", "Seller Organizations") : y("devportal.developerOrganizations", "Developer Organizations"), F = w ? y("devportal.manageYourSellerOrgs", "Manage the organizations you sell physical goods under") : y("devportal.manageYourDevTeams", "Manage your development teams");
|
|
21
|
+
return D && !E ? /* @__PURE__ */ b(s, {
|
|
22
|
+
title: P,
|
|
23
|
+
description: F,
|
|
24
|
+
children: /* @__PURE__ */ x("div", {
|
|
24
25
|
className: "flex items-center justify-center py-12",
|
|
25
|
-
children: [/* @__PURE__ */
|
|
26
|
+
children: [/* @__PURE__ */ b(_, { className: "h-8 w-8 animate-spin text-text-secondary" }), /* @__PURE__ */ b("span", {
|
|
26
27
|
className: "ml-2 text-text-secondary",
|
|
27
|
-
children:
|
|
28
|
+
children: y("devportal.loadingOrganizations", "Loading organizations...")
|
|
28
29
|
})]
|
|
29
30
|
})
|
|
30
|
-
}) :
|
|
31
|
-
title:
|
|
32
|
-
description:
|
|
33
|
-
children: /* @__PURE__ */
|
|
31
|
+
}) : O ? /* @__PURE__ */ b(s, {
|
|
32
|
+
title: P,
|
|
33
|
+
description: F,
|
|
34
|
+
children: /* @__PURE__ */ x("div", {
|
|
34
35
|
className: "rounded-lg border border-status-error-border/50 bg-status-error-bg/10 p-6 text-center",
|
|
35
36
|
children: [
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ b(f, { className: "mx-auto h-8 w-8 text-status-error-text" }),
|
|
38
|
+
/* @__PURE__ */ b("h3", {
|
|
38
39
|
className: "mt-2 font-medium text-status-error-text",
|
|
39
|
-
children:
|
|
40
|
+
children: y("devportal.failedToLoadOrganizations", "Failed to load organizations")
|
|
40
41
|
}),
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
+
/* @__PURE__ */ b("p", {
|
|
42
43
|
className: "mt-1 text-sm text-text-secondary",
|
|
43
|
-
children: o(
|
|
44
|
+
children: o(O)
|
|
44
45
|
}),
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
onClick: () =>
|
|
46
|
+
/* @__PURE__ */ b("button", {
|
|
47
|
+
onClick: () => k(),
|
|
47
48
|
className: "mt-4 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
48
|
-
children:
|
|
49
|
+
children: y("devportal.tryAgain", "Try Again")
|
|
49
50
|
})
|
|
50
51
|
]
|
|
51
52
|
})
|
|
52
|
-
}) : /* @__PURE__ */
|
|
53
|
+
}) : /* @__PURE__ */ b(d, {
|
|
53
54
|
authOnly: !0,
|
|
54
|
-
children: /* @__PURE__ */
|
|
55
|
-
title:
|
|
56
|
-
description:
|
|
57
|
-
purpose:
|
|
58
|
-
actions: /* @__PURE__ */
|
|
59
|
-
onClick: () =>
|
|
55
|
+
children: /* @__PURE__ */ x(s, {
|
|
56
|
+
title: P,
|
|
57
|
+
description: F,
|
|
58
|
+
purpose: w ? y("devportal.sellerOrganizationsPurpose", "A seller organization owns your physical listings, orders, and revenue. It's created automatically the first time you list an item, or you can create one here.") : y("devportal.organizationsPurpose", "An organization is the team that owns your apps, members, and revenue. Create one so collaborators can share access to the same applications, billing, and store presence instead of working in isolation."),
|
|
59
|
+
actions: /* @__PURE__ */ x("button", {
|
|
60
|
+
onClick: () => j(M),
|
|
60
61
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
61
|
-
children: [/* @__PURE__ */
|
|
62
|
+
children: [/* @__PURE__ */ b(v, { size: 16 }), y("devportal.createOrganization", "Create Organization")]
|
|
62
63
|
}),
|
|
63
|
-
children: [
|
|
64
|
+
children: [!w && A.length > 0 && /* @__PURE__ */ b(S, {
|
|
64
65
|
className: "mb-6",
|
|
65
|
-
children: /* @__PURE__ */
|
|
66
|
-
className:
|
|
67
|
-
children: [
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
className: "
|
|
82
|
-
children:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
66
|
+
children: /* @__PURE__ */ x("div", {
|
|
67
|
+
className: "grid grid-cols-2 gap-4 sm:grid-cols-3",
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ x(C, {
|
|
70
|
+
treatment: "metric",
|
|
71
|
+
className: "p-4",
|
|
72
|
+
children: [/* @__PURE__ */ b("p", {
|
|
73
|
+
className: "text-sm text-text-secondary",
|
|
74
|
+
children: y("devportal.organizations", "Organizations")
|
|
75
|
+
}), /* @__PURE__ */ b("p", {
|
|
76
|
+
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
77
|
+
children: A.length
|
|
78
|
+
})]
|
|
79
|
+
}),
|
|
80
|
+
/* @__PURE__ */ x(C, {
|
|
81
|
+
treatment: "metric",
|
|
82
|
+
className: "p-4",
|
|
83
|
+
children: [/* @__PURE__ */ b("p", {
|
|
84
|
+
className: "text-sm text-text-secondary",
|
|
85
|
+
children: y("devportal.totalApps", "Total Apps")
|
|
86
|
+
}), /* @__PURE__ */ b("p", {
|
|
87
|
+
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
88
|
+
children: A.reduce((e, t) => e + (t.totalApps ?? 0), 0)
|
|
89
|
+
})]
|
|
90
|
+
}),
|
|
91
|
+
/* @__PURE__ */ x(C, {
|
|
92
|
+
treatment: "metric",
|
|
93
|
+
className: "p-4",
|
|
94
|
+
children: [/* @__PURE__ */ b("p", {
|
|
95
|
+
className: "text-sm text-text-secondary",
|
|
96
|
+
children: y("devportal.activeInstalls", "Active Installs")
|
|
97
|
+
}), /* @__PURE__ */ b("p", {
|
|
98
|
+
className: "mt-1 text-2xl font-semibold tabular-nums",
|
|
99
|
+
children: A.reduce((e, t) => e + (t.activeInstalls ?? 0), 0).toLocaleString()
|
|
100
|
+
})]
|
|
101
|
+
})
|
|
102
|
+
]
|
|
98
103
|
})
|
|
99
|
-
}),
|
|
104
|
+
}), A.length > 0 ? w ? /* @__PURE__ */ b(u, {
|
|
105
|
+
data: A,
|
|
106
|
+
keyField: "id",
|
|
107
|
+
onRowClick: (e) => j(N(e.id)),
|
|
108
|
+
columns: [
|
|
109
|
+
{
|
|
110
|
+
key: "name",
|
|
111
|
+
header: y("devportal.organization", "Organization"),
|
|
112
|
+
render: (e) => /* @__PURE__ */ x("div", {
|
|
113
|
+
className: "flex items-center gap-3",
|
|
114
|
+
children: [e.logoUrl ? /* @__PURE__ */ b("img", {
|
|
115
|
+
src: e.logoUrl,
|
|
116
|
+
alt: e.name,
|
|
117
|
+
className: "h-8 w-8 rounded-md object-cover"
|
|
118
|
+
}) : /* @__PURE__ */ b("div", {
|
|
119
|
+
className: "flex h-8 w-8 items-center justify-center rounded-md bg-action-primary-bg/10 text-primary",
|
|
120
|
+
children: /* @__PURE__ */ b(m, { size: 16 })
|
|
121
|
+
}), /* @__PURE__ */ x("div", {
|
|
122
|
+
className: "min-w-0",
|
|
123
|
+
children: [/* @__PURE__ */ x("div", {
|
|
124
|
+
className: "flex items-center gap-2",
|
|
125
|
+
children: [/* @__PURE__ */ b("span", {
|
|
126
|
+
className: "font-medium text-text-primary",
|
|
127
|
+
children: e.name
|
|
128
|
+
}), e.isVerified && /* @__PURE__ */ b(l, { verified: !0 })]
|
|
129
|
+
}), e.description && /* @__PURE__ */ b("p", {
|
|
130
|
+
className: "truncate text-xs text-text-secondary",
|
|
131
|
+
children: e.description
|
|
132
|
+
})]
|
|
133
|
+
})]
|
|
134
|
+
})
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
key: "tier",
|
|
138
|
+
header: y("devportal.tier", "Tier"),
|
|
139
|
+
render: (e) => /* @__PURE__ */ b(c, {
|
|
140
|
+
status: e.tier,
|
|
141
|
+
type: "tier"
|
|
142
|
+
})
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
key: "members",
|
|
146
|
+
header: y("devportal.members", "Members"),
|
|
147
|
+
render: (e) => e.members?.length || 0
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
key: "actions",
|
|
151
|
+
header: "",
|
|
152
|
+
className: "text-right",
|
|
153
|
+
render: (e) => /* @__PURE__ */ x("button", {
|
|
154
|
+
onClick: (t) => {
|
|
155
|
+
t.stopPropagation(), j(N(e.id));
|
|
156
|
+
},
|
|
157
|
+
className: "inline-flex items-center gap-1.5 rounded-md border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
|
|
158
|
+
children: [/* @__PURE__ */ b(g, { size: 14 }), y("devportal.view", "View")]
|
|
159
|
+
})
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
}) : /* @__PURE__ */ b("div", {
|
|
100
163
|
className: "grid gap-6",
|
|
101
|
-
children:
|
|
164
|
+
children: A.map((e) => /* @__PURE__ */ b(T, {
|
|
102
165
|
org: e,
|
|
103
|
-
onClick: () =>
|
|
166
|
+
onClick: () => j(N(e.id))
|
|
104
167
|
}, e.id))
|
|
105
|
-
}) : /* @__PURE__ */
|
|
168
|
+
}) : /* @__PURE__ */ b(n, {
|
|
106
169
|
illustration: "empty-people",
|
|
107
|
-
title:
|
|
108
|
-
description:
|
|
109
|
-
action: /* @__PURE__ */
|
|
110
|
-
onClick: () =>
|
|
170
|
+
title: w ? y("devportal.noSellerOrganizationsYet", "No seller organizations yet") : y("devportal.noOrganizationsYet", "No organizations yet"),
|
|
171
|
+
description: w ? y("devportal.createSellerOrgToSell", "Create a seller organization to start selling physical products, or list your first item and one will be set up for you") : y("devportal.createOrgToCollaborate", "Create an organization to collaborate with your team and manage apps together"),
|
|
172
|
+
action: /* @__PURE__ */ x("button", {
|
|
173
|
+
onClick: () => j(M),
|
|
111
174
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
112
|
-
children: [/* @__PURE__ */
|
|
175
|
+
children: [/* @__PURE__ */ b(v, { size: 16 }), y("devportal.createOrganization", "Create Organization")]
|
|
113
176
|
})
|
|
114
177
|
})]
|
|
115
178
|
})
|
|
116
179
|
});
|
|
117
|
-
},
|
|
180
|
+
}, T = ({ org: e, onClick: n }) => {
|
|
118
181
|
let r = t();
|
|
119
|
-
return /* @__PURE__ */
|
|
182
|
+
return /* @__PURE__ */ x("div", {
|
|
120
183
|
role: "button",
|
|
121
184
|
tabIndex: 0,
|
|
122
185
|
onClick: n,
|
|
@@ -124,69 +187,69 @@ var C = () => {
|
|
|
124
187
|
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), n());
|
|
125
188
|
},
|
|
126
189
|
className: "cursor-pointer rounded-card border border-border-seam bg-bg-surface p-6 shadow-[var(--shadow-pop)] transition-[box-shadow,border-color] hover:shadow-[var(--shadow-pop-hover)] hover:border-border-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
127
|
-
children: [/* @__PURE__ */
|
|
190
|
+
children: [/* @__PURE__ */ x("div", {
|
|
128
191
|
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
129
|
-
children: [/* @__PURE__ */
|
|
192
|
+
children: [/* @__PURE__ */ x("div", {
|
|
130
193
|
className: "flex items-start gap-4",
|
|
131
|
-
children: [e.logoUrl ? /* @__PURE__ */
|
|
194
|
+
children: [e.logoUrl ? /* @__PURE__ */ b("img", {
|
|
132
195
|
src: e.logoUrl,
|
|
133
196
|
alt: e.name,
|
|
134
197
|
className: "h-16 w-16 rounded-lg object-cover"
|
|
135
|
-
}) : /* @__PURE__ */
|
|
198
|
+
}) : /* @__PURE__ */ b("div", {
|
|
136
199
|
className: "flex h-16 w-16 items-center justify-center rounded-lg bg-action-primary-bg/10 text-primary",
|
|
137
|
-
children: /* @__PURE__ */
|
|
138
|
-
}), /* @__PURE__ */
|
|
139
|
-
/* @__PURE__ */
|
|
200
|
+
children: /* @__PURE__ */ b(m, { size: 32 })
|
|
201
|
+
}), /* @__PURE__ */ x("div", { children: [
|
|
202
|
+
/* @__PURE__ */ x("div", {
|
|
140
203
|
className: "flex items-center gap-2 flex-wrap",
|
|
141
204
|
children: [
|
|
142
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ b("h3", {
|
|
143
206
|
className: "text-lg font-semibold",
|
|
144
207
|
children: e.name
|
|
145
208
|
}),
|
|
146
|
-
e.isVerified && /* @__PURE__ */
|
|
147
|
-
e.isCertified && /* @__PURE__ */
|
|
209
|
+
e.isVerified && /* @__PURE__ */ b(l, { verified: !0 }),
|
|
210
|
+
e.isCertified && /* @__PURE__ */ x("span", {
|
|
148
211
|
className: "inline-flex items-center gap-1 rounded-full bg-status-info-bg-subtle px-2 py-0.5 text-xs font-medium text-status-info-text",
|
|
149
212
|
children: [
|
|
150
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ b(h, { size: 12 }),
|
|
151
214
|
" ",
|
|
152
215
|
r("devportal.certified", "Certified")
|
|
153
216
|
]
|
|
154
217
|
})
|
|
155
218
|
]
|
|
156
219
|
}),
|
|
157
|
-
e.description && /* @__PURE__ */
|
|
220
|
+
e.description && /* @__PURE__ */ b("p", {
|
|
158
221
|
className: "mt-1 text-sm text-text-secondary",
|
|
159
222
|
children: e.description
|
|
160
223
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ x("div", {
|
|
162
225
|
className: "mt-2 flex flex-wrap items-center gap-2",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
226
|
+
children: [/* @__PURE__ */ b(c, {
|
|
164
227
|
status: e.tier,
|
|
165
228
|
type: "tier"
|
|
166
|
-
}), e.partnerTier && /* @__PURE__ */
|
|
229
|
+
}), e.partnerTier && /* @__PURE__ */ b(c, {
|
|
167
230
|
status: e.partnerTier,
|
|
168
231
|
type: "partner"
|
|
169
232
|
})]
|
|
170
233
|
})
|
|
171
234
|
] })]
|
|
172
|
-
}), /* @__PURE__ */
|
|
235
|
+
}), /* @__PURE__ */ x("div", {
|
|
173
236
|
className: "flex flex-wrap gap-6 text-sm",
|
|
174
|
-
children: [/* @__PURE__ */
|
|
237
|
+
children: [/* @__PURE__ */ x("div", {
|
|
175
238
|
className: "flex items-center gap-2",
|
|
176
|
-
children: [/* @__PURE__ */ y
|
|
239
|
+
children: [/* @__PURE__ */ b(y, {
|
|
177
240
|
size: 16,
|
|
178
241
|
className: "text-text-secondary"
|
|
179
|
-
}), /* @__PURE__ */
|
|
242
|
+
}), /* @__PURE__ */ x("span", { children: [
|
|
180
243
|
e.members?.length || 0,
|
|
181
244
|
" ",
|
|
182
245
|
r("devportal.membersLower", "members")
|
|
183
246
|
] })]
|
|
184
|
-
}), e.kind !== "PHYSICAL" && /* @__PURE__ */
|
|
247
|
+
}), e.kind !== "PHYSICAL" && /* @__PURE__ */ x("div", {
|
|
185
248
|
className: "flex items-center gap-2",
|
|
186
|
-
children: [/* @__PURE__ */
|
|
249
|
+
children: [/* @__PURE__ */ b(p, {
|
|
187
250
|
size: 16,
|
|
188
251
|
className: "text-text-secondary"
|
|
189
|
-
}), /* @__PURE__ */
|
|
252
|
+
}), /* @__PURE__ */ x("span", { children: [
|
|
190
253
|
e.publishedApps,
|
|
191
254
|
" / ",
|
|
192
255
|
e.totalApps,
|
|
@@ -195,34 +258,34 @@ var C = () => {
|
|
|
195
258
|
] })]
|
|
196
259
|
})]
|
|
197
260
|
})]
|
|
198
|
-
}), e.kind !== "PHYSICAL" && /* @__PURE__ */
|
|
261
|
+
}), e.kind !== "PHYSICAL" && /* @__PURE__ */ x("div", {
|
|
199
262
|
className: "mt-4 grid grid-cols-2 gap-4 rounded-lg bg-bg-sunken/50 p-4 sm:grid-cols-4",
|
|
200
263
|
children: [
|
|
201
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
202
265
|
className: "text-xs text-text-secondary",
|
|
203
266
|
children: r("devportal.totalInstalls", "Total Installs")
|
|
204
|
-
}), /* @__PURE__ */
|
|
267
|
+
}), /* @__PURE__ */ b("p", {
|
|
205
268
|
className: "text-lg font-semibold",
|
|
206
269
|
children: (e.totalInstalls || 0).toLocaleString()
|
|
207
270
|
})] }),
|
|
208
|
-
/* @__PURE__ */
|
|
271
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
209
272
|
className: "text-xs text-text-secondary",
|
|
210
273
|
children: r("devportal.activeInstalls", "Active Installs")
|
|
211
|
-
}), /* @__PURE__ */
|
|
274
|
+
}), /* @__PURE__ */ b("p", {
|
|
212
275
|
className: "text-lg font-semibold",
|
|
213
276
|
children: (e.activeInstalls || 0).toLocaleString()
|
|
214
277
|
})] }),
|
|
215
|
-
/* @__PURE__ */
|
|
278
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
216
279
|
className: "text-xs text-text-secondary",
|
|
217
280
|
children: r("devportal.apiCalls", "API Calls")
|
|
218
|
-
}), /* @__PURE__ */
|
|
281
|
+
}), /* @__PURE__ */ b("p", {
|
|
219
282
|
className: "text-lg font-semibold",
|
|
220
283
|
children: e.totalApiCalls ? `${(parseInt(e.totalApiCalls) / 1e6).toFixed(1)}M` : "0"
|
|
221
284
|
})] }),
|
|
222
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
223
286
|
className: "text-xs text-text-secondary",
|
|
224
287
|
children: r("devportal.avgRating", "Avg Rating")
|
|
225
|
-
}), /* @__PURE__ */
|
|
288
|
+
}), /* @__PURE__ */ b("p", {
|
|
226
289
|
className: "text-lg font-semibold",
|
|
227
290
|
children: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : r("devportal.notAvailable", "N/A")
|
|
228
291
|
})] })
|
|
@@ -231,6 +294,6 @@ var C = () => {
|
|
|
231
294
|
});
|
|
232
295
|
};
|
|
233
296
|
//#endregion
|
|
234
|
-
export {
|
|
297
|
+
export { w as OrganizationsPage };
|
|
235
298
|
|
|
236
299
|
//# sourceMappingURL=OrganizationsPage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrganizationsPage.js","names":[],"sources":["../../../src/devportal/pages/OrganizationsPage.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport {\n Plus,\n Building2,\n Users,\n AppWindow,\n CheckCircle,\n AlertCircle,\n Loader2,\n} from \"lucide-react\";\nimport { EmphasisPanel, GlassCard } from \"@burdenoff/fe-libs/ui\";\nimport { PageLayout } from \"../components/PageLayout\";\nimport { EmptyState } from \"../components/EmptyState\";\nimport { StatusBadge, VerifiedBadge } from \"../components/StatusBadge\";\nimport { useDevportal } from \"../providers/DevportalProvider\";\nimport { PermissionGuard } from \"../components\";\nimport { useTr } from \"../utils/i18n\";\nimport {\n useIsSellerSection,\n orgSectionPath,\n} from \"../hooks/useIsSellerSection\";\nimport type { DeveloperOrganization } from \"../types\";\nimport {\n useGetMyOrganizationsQuery,\n getErrorMessage,\n type OrganizationFieldsFragment,\n} from \"../hooks\";\n\n/**\n * Organizations listing page\n *\n * Displays all developer organizations the current user is a member of.\n * Uses GraphQL to fetch real data from the DevPortal backend.\n */\nexport const OrganizationsPage: FC = () => {\n const { navigate, basePath } = useDevportal();\n const tr = useTr();\n const isSeller = useIsSellerSection();\n\n // Fetch organizations from GraphQL API\n const { data, loading, error, refetch } = useGetMyOrganizationsQuery({\n fetchPolicy: \"cache-and-network\",\n });\n\n // Shared page for both DIGITAL orgs (regular devportal) and PHYSICAL orgs\n // (seller portal) — filtered by which section it's reached from. See\n // DeveloperOrgKind (BOFF-7285).\n const organizations = (data?.myDeveloperOrganizations ?? []).filter(\n (org: OrganizationFieldsFragment) =>\n isSeller ? org.kind === \"PHYSICAL\" : org.kind !== \"PHYSICAL\",\n );\n\n const handleNavigate = (path: string) => {\n navigate?.(`${basePath}${path}`);\n };\n\n const createPath = orgSectionPath(isSeller, \"new\");\n const detailPath = (orgId: string) => orgSectionPath(isSeller, orgId);\n\n const pageTitle = isSeller\n ? tr(\"devportal.sellerOrganizations\", \"Seller Organizations\")\n : tr(\"devportal.developerOrganizations\", \"Developer Organizations\");\n const pageDescription = isSeller\n ? tr(\n \"devportal.manageYourSellerOrgs\",\n \"Manage the organizations you sell physical goods under\",\n )\n : tr(\"devportal.manageYourDevTeams\", \"Manage your development teams\");\n\n // Loading state\n if (loading && !data) {\n return (\n <PageLayout title={pageTitle} description={pageDescription}>\n <div className=\"flex items-center justify-center py-12\">\n <Loader2 className=\"h-8 w-8 animate-spin text-text-secondary\" />\n <span className=\"ml-2 text-text-secondary\">\n {tr(\"devportal.loadingOrganizations\", \"Loading organizations...\")}\n </span>\n </div>\n </PageLayout>\n );\n }\n\n // Error state\n if (error) {\n return (\n <PageLayout title={pageTitle} description={pageDescription}>\n <div className=\"rounded-lg border border-status-error-border/50 bg-status-error-bg/10 p-6 text-center\">\n <AlertCircle className=\"mx-auto h-8 w-8 text-status-error-text\" />\n <h3 className=\"mt-2 font-medium text-status-error-text\">\n {tr(\n \"devportal.failedToLoadOrganizations\",\n \"Failed to load organizations\",\n )}\n </h3>\n <p className=\"mt-1 text-sm text-text-secondary\">\n {getErrorMessage(error)}\n </p>\n <button\n onClick={() => refetch()}\n className=\"mt-4 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90\"\n >\n {tr(\"devportal.tryAgain\", \"Try Again\")}\n </button>\n </div>\n </PageLayout>\n );\n }\n\n return (\n <PermissionGuard authOnly>\n <PageLayout\n title={pageTitle}\n description={pageDescription}\n purpose={\n isSeller\n ? tr(\n \"devportal.sellerOrganizationsPurpose\",\n \"A seller organization owns your physical listings, orders, and revenue. It's created automatically the first time you list an item, or you can create one here.\",\n )\n : tr(\n \"devportal.organizationsPurpose\",\n \"An organization is the team that owns your apps, members, and revenue. Create one so collaborators can share access to the same applications, billing, and store presence instead of working in isolation.\",\n )\n }\n actions={\n <button\n onClick={() => handleNavigate(createPath)}\n className=\"inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <Plus size={16} />\n {tr(\"devportal.createOrganization\", \"Create Organization\")}\n </button>\n }\n >\n {organizations.length > 0 && (\n <EmphasisPanel className=\"mb-6\">\n <div\n className={\n isSeller\n ? \"grid grid-cols-1 gap-4 sm:max-w-xs\"\n : \"grid grid-cols-2 gap-4 sm:grid-cols-3\"\n }\n >\n <GlassCard treatment=\"metric\" className=\"p-4\">\n <p className=\"text-sm text-text-secondary\">\n {tr(\"devportal.organizations\", \"Organizations\")}\n </p>\n <p className=\"mt-1 text-2xl font-semibold tabular-nums\">\n {organizations.length}\n </p>\n </GlassCard>\n {/* Total Apps / Active Installs are app-marketplace concepts —\n meaningless for PHYSICAL (seller) orgs, which sell items,\n not apps. */}\n {!isSeller && (\n <>\n <GlassCard treatment=\"metric\" className=\"p-4\">\n <p className=\"text-sm text-text-secondary\">\n {tr(\"devportal.totalApps\", \"Total Apps\")}\n </p>\n <p className=\"mt-1 text-2xl font-semibold tabular-nums\">\n {organizations.reduce(\n (acc: number, org: OrganizationFieldsFragment) =>\n acc + (org.totalApps ?? 0),\n 0,\n )}\n </p>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"p-4\">\n <p className=\"text-sm text-text-secondary\">\n {tr(\"devportal.activeInstalls\", \"Active Installs\")}\n </p>\n <p className=\"mt-1 text-2xl font-semibold tabular-nums\">\n {organizations\n .reduce(\n (acc: number, org: OrganizationFieldsFragment) =>\n acc + (org.activeInstalls ?? 0),\n 0,\n )\n .toLocaleString()}\n </p>\n </GlassCard>\n </>\n )}\n </div>\n </EmphasisPanel>\n )}\n {organizations.length > 0 ? (\n <div className=\"grid gap-6\">\n {organizations.map((org: OrganizationFieldsFragment) => (\n <OrganizationCard\n key={org.id}\n org={org as DeveloperOrganization}\n onClick={() => handleNavigate(detailPath(org.id))}\n />\n ))}\n </div>\n ) : (\n <EmptyState\n illustration=\"empty-people\"\n title={\n isSeller\n ? tr(\n \"devportal.noSellerOrganizationsYet\",\n \"No seller organizations yet\",\n )\n : tr(\"devportal.noOrganizationsYet\", \"No organizations yet\")\n }\n description={\n isSeller\n ? tr(\n \"devportal.createSellerOrgToSell\",\n \"Create a seller organization to start selling physical products, or list your first item and one will be set up for you\",\n )\n : tr(\n \"devportal.createOrgToCollaborate\",\n \"Create an organization to collaborate with your team and manage apps together\",\n )\n }\n action={\n <button\n onClick={() => handleNavigate(createPath)}\n className=\"inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90\"\n >\n <Plus size={16} />\n {tr(\"devportal.createOrganization\", \"Create Organization\")}\n </button>\n }\n />\n )}\n </PageLayout>\n </PermissionGuard>\n );\n};\n\n// Organization card component\nconst OrganizationCard: FC<{\n org: DeveloperOrganization;\n onClick: () => void;\n}> = ({ org, onClick }) => {\n const tr = useTr();\n return (\n <div\n role=\"button\"\n tabIndex={0}\n onClick={onClick}\n onKeyDown={(event) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n onClick();\n }\n }}\n className=\"cursor-pointer rounded-card border border-border-seam bg-bg-surface p-6 shadow-[var(--shadow-pop)] transition-[box-shadow,border-color] hover:shadow-[var(--shadow-pop-hover)] hover:border-border-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n >\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n {/* Left side - Info */}\n <div className=\"flex items-start gap-4\">\n {org.logoUrl ? (\n <img\n src={org.logoUrl}\n alt={org.name}\n className=\"h-16 w-16 rounded-lg object-cover\"\n />\n ) : (\n <div className=\"flex h-16 w-16 items-center justify-center rounded-lg bg-action-primary-bg/10 text-primary\">\n <Building2 size={32} />\n </div>\n )}\n <div>\n <div className=\"flex items-center gap-2 flex-wrap\">\n <h3 className=\"text-lg font-semibold\">{org.name}</h3>\n {org.isVerified && <VerifiedBadge verified />}\n {org.isCertified && (\n <span className=\"inline-flex items-center gap-1 rounded-full bg-status-info-bg-subtle px-2 py-0.5 text-xs font-medium text-status-info-text\">\n <CheckCircle size={12} />{\" \"}\n {tr(\"devportal.certified\", \"Certified\")}\n </span>\n )}\n </div>\n {org.description && (\n <p className=\"mt-1 text-sm text-text-secondary\">\n {org.description}\n </p>\n )}\n <div className=\"mt-2 flex flex-wrap items-center gap-2\">\n <StatusBadge status={org.tier} type=\"tier\" />\n {org.partnerTier && (\n <StatusBadge status={org.partnerTier} type=\"partner\" />\n )}\n </div>\n </div>\n </div>\n\n {/* Right side - Stats. Installs/API calls/avg rating/apps count are\n app-marketplace concepts that don't apply to a PHYSICAL (seller)\n org, so it only gets a member count here — everything real for a\n seller org (revenue, items) is one click away on its detail\n page. */}\n <div className=\"flex flex-wrap gap-6 text-sm\">\n <div className=\"flex items-center gap-2\">\n <Users size={16} className=\"text-text-secondary\" />\n <span>\n {org.members?.length || 0}{\" \"}\n {tr(\"devportal.membersLower\", \"members\")}\n </span>\n </div>\n {org.kind !== \"PHYSICAL\" && (\n <div className=\"flex items-center gap-2\">\n <AppWindow size={16} className=\"text-text-secondary\" />\n <span>\n {org.publishedApps} / {org.totalApps}{\" \"}\n {tr(\"devportal.appsLower\", \"apps\")}\n </span>\n </div>\n )}\n </div>\n </div>\n\n {org.kind !== \"PHYSICAL\" && (\n <div className=\"mt-4 grid grid-cols-2 gap-4 rounded-lg bg-bg-sunken/50 p-4 sm:grid-cols-4\">\n <div>\n <p className=\"text-xs text-text-secondary\">\n {tr(\"devportal.totalInstalls\", \"Total Installs\")}\n </p>\n <p className=\"text-lg font-semibold\">\n {(org.totalInstalls || 0).toLocaleString()}\n </p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">\n {tr(\"devportal.activeInstalls\", \"Active Installs\")}\n </p>\n <p className=\"text-lg font-semibold\">\n {(org.activeInstalls || 0).toLocaleString()}\n </p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">\n {tr(\"devportal.apiCalls\", \"API Calls\")}\n </p>\n <p className=\"text-lg font-semibold\">\n {org.totalApiCalls\n ? `${(parseInt(org.totalApiCalls) / 1000000).toFixed(1)}M`\n : \"0\"}\n </p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">\n {tr(\"devportal.avgRating\", \"Avg Rating\")}\n </p>\n <p className=\"text-lg font-semibold\">\n {org.averageRating\n ? `${org.averageRating.toFixed(1)} ★`\n : tr(\"devportal.notAvailable\", \"N/A\")}\n </p>\n </div>\n </div>\n )}\n </div>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AAkCA,IAAa,UAA8B;CACzC,IAAM,EAAE,aAAU,gBAAa,GAAc,EACvC,IAAK,GAAO,EACZ,IAAW,GAAoB,EAG/B,EAAE,SAAM,YAAS,UAAO,eAAY,EAA2B,EACnE,aAAa,qBACd,CAAC,EAKI,KAAiB,GAAM,4BAA4B,EAAE,EAAE,QAC1D,MACC,IAAW,EAAI,SAAS,aAAa,EAAI,SAAS,WACrD,EAEK,KA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,"file":"OrganizationsPage.js","names":[],"sources":["../../../src/devportal/pages/OrganizationsPage.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport {\n Plus,\n Building2,\n Users,\n AppWindow,\n CheckCircle,\n AlertCircle,\n Loader2,\n Eye,\n} from \"lucide-react\";\nimport { EmphasisPanel, GlassCard } from \"@burdenoff/fe-libs/ui\";\nimport { PageLayout } from \"../components/PageLayout\";\nimport { EmptyState } from \"../components/EmptyState\";\nimport { StatusBadge, VerifiedBadge } from \"../components/StatusBadge\";\nimport { DataTable } from \"../components/DataTable\";\nimport { useDevportal } from \"../providers/DevportalProvider\";\nimport { PermissionGuard } from \"../components\";\nimport { useTr } from \"../utils/i18n\";\nimport {\n useIsSellerSection,\n orgSectionPath,\n} from \"../hooks/useIsSellerSection\";\nimport type { DeveloperOrganization } from \"../types\";\nimport {\n useGetMyOrganizationsQuery,\n getErrorMessage,\n type OrganizationFieldsFragment,\n} from \"../hooks\";\n\n/**\n * Organizations listing page\n *\n * Displays all developer organizations the current user is a member of.\n * Uses GraphQL to fetch real data from the DevPortal backend.\n */\nexport const OrganizationsPage: FC = () => {\n const { navigate, basePath } = useDevportal();\n const tr = useTr();\n const isSeller = useIsSellerSection();\n\n // Fetch organizations from GraphQL API\n const { data, loading, error, refetch } = useGetMyOrganizationsQuery({\n fetchPolicy: \"cache-and-network\",\n });\n\n // Shared page for both DIGITAL orgs (regular devportal) and PHYSICAL orgs\n // (seller portal) — filtered by which section it's reached from. See\n // DeveloperOrgKind (BOFF-7285).\n const organizations = (data?.myDeveloperOrganizations ?? []).filter(\n (org: OrganizationFieldsFragment) =>\n isSeller ? org.kind === \"PHYSICAL\" : org.kind !== \"PHYSICAL\",\n );\n\n const handleNavigate = (path: string) => {\n navigate?.(`${basePath}${path}`);\n };\n\n const createPath = orgSectionPath(isSeller, \"new\");\n const detailPath = (orgId: string) => orgSectionPath(isSeller, orgId);\n\n const pageTitle = isSeller\n ? tr(\"devportal.sellerOrganizations\", \"Seller Organizations\")\n : tr(\"devportal.developerOrganizations\", \"Developer Organizations\");\n const pageDescription = isSeller\n ? tr(\n \"devportal.manageYourSellerOrgs\",\n \"Manage the organizations you sell physical goods under\",\n )\n : tr(\"devportal.manageYourDevTeams\", \"Manage your development teams\");\n\n // Loading state\n if (loading && !data) {\n return (\n <PageLayout title={pageTitle} description={pageDescription}>\n <div className=\"flex items-center justify-center py-12\">\n <Loader2 className=\"h-8 w-8 animate-spin text-text-secondary\" />\n <span className=\"ml-2 text-text-secondary\">\n {tr(\"devportal.loadingOrganizations\", \"Loading organizations...\")}\n </span>\n </div>\n </PageLayout>\n );\n }\n\n // Error state\n if (error) {\n return (\n <PageLayout title={pageTitle} description={pageDescription}>\n <div className=\"rounded-lg border border-status-error-border/50 bg-status-error-bg/10 p-6 text-center\">\n <AlertCircle className=\"mx-auto h-8 w-8 text-status-error-text\" />\n <h3 className=\"mt-2 font-medium text-status-error-text\">\n {tr(\n \"devportal.failedToLoadOrganizations\",\n \"Failed to load organizations\",\n )}\n </h3>\n <p className=\"mt-1 text-sm text-text-secondary\">\n {getErrorMessage(error)}\n </p>\n <button\n onClick={() => refetch()}\n className=\"mt-4 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90\"\n >\n {tr(\"devportal.tryAgain\", \"Try Again\")}\n </button>\n </div>\n </PageLayout>\n );\n }\n\n return (\n <PermissionGuard authOnly>\n <PageLayout\n title={pageTitle}\n description={pageDescription}\n purpose={\n isSeller\n ? tr(\n \"devportal.sellerOrganizationsPurpose\",\n \"A seller organization owns your physical listings, orders, and revenue. It's created automatically the first time you list an item, or you can create one here.\",\n )\n : tr(\n \"devportal.organizationsPurpose\",\n \"An organization is the team that owns your apps, members, and revenue. Create one so collaborators can share access to the same applications, billing, and store presence instead of working in isolation.\",\n )\n }\n actions={\n <button\n onClick={() => handleNavigate(createPath)}\n className=\"inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <Plus size={16} />\n {tr(\"devportal.createOrganization\", \"Create Organization\")}\n </button>\n }\n >\n {/* Summary metrics panel — Total Apps / Active Installs are\n app-marketplace concepts that don't apply to PHYSICAL (seller)\n orgs, and a bare \"Organizations: N\" count next to a list that's\n already showing all N of them is pure redundancy, so the seller\n section skips this panel entirely rather than showing a\n half-empty one. */}\n {!isSeller && organizations.length > 0 && (\n <EmphasisPanel className=\"mb-6\">\n <div className=\"grid grid-cols-2 gap-4 sm:grid-cols-3\">\n <GlassCard treatment=\"metric\" className=\"p-4\">\n <p className=\"text-sm text-text-secondary\">\n {tr(\"devportal.organizations\", \"Organizations\")}\n </p>\n <p className=\"mt-1 text-2xl font-semibold tabular-nums\">\n {organizations.length}\n </p>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"p-4\">\n <p className=\"text-sm text-text-secondary\">\n {tr(\"devportal.totalApps\", \"Total Apps\")}\n </p>\n <p className=\"mt-1 text-2xl font-semibold tabular-nums\">\n {organizations.reduce(\n (acc: number, org: OrganizationFieldsFragment) =>\n acc + (org.totalApps ?? 0),\n 0,\n )}\n </p>\n </GlassCard>\n <GlassCard treatment=\"metric\" className=\"p-4\">\n <p className=\"text-sm text-text-secondary\">\n {tr(\"devportal.activeInstalls\", \"Active Installs\")}\n </p>\n <p className=\"mt-1 text-2xl font-semibold tabular-nums\">\n {organizations\n .reduce(\n (acc: number, org: OrganizationFieldsFragment) =>\n acc + (org.activeInstalls ?? 0),\n 0,\n )\n .toLocaleString()}\n </p>\n </GlassCard>\n </div>\n </EmphasisPanel>\n )}\n {organizations.length > 0 ? (\n isSeller ? (\n <DataTable\n data={organizations}\n keyField=\"id\"\n onRowClick={(org) => handleNavigate(detailPath(org.id))}\n columns={[\n {\n key: \"name\",\n header: tr(\"devportal.organization\", \"Organization\"),\n render: (org: DeveloperOrganization) => (\n <div className=\"flex items-center gap-3\">\n {org.logoUrl ? (\n <img\n src={org.logoUrl}\n alt={org.name}\n className=\"h-8 w-8 rounded-md object-cover\"\n />\n ) : (\n <div className=\"flex h-8 w-8 items-center justify-center rounded-md bg-action-primary-bg/10 text-primary\">\n <Building2 size={16} />\n </div>\n )}\n <div className=\"min-w-0\">\n <div className=\"flex items-center gap-2\">\n <span className=\"font-medium text-text-primary\">\n {org.name}\n </span>\n {org.isVerified && <VerifiedBadge verified />}\n </div>\n {org.description && (\n <p className=\"truncate text-xs text-text-secondary\">\n {org.description}\n </p>\n )}\n </div>\n </div>\n ),\n },\n {\n key: \"tier\",\n header: tr(\"devportal.tier\", \"Tier\"),\n render: (org: DeveloperOrganization) => (\n <StatusBadge status={org.tier} type=\"tier\" />\n ),\n },\n {\n key: \"members\",\n header: tr(\"devportal.members\", \"Members\"),\n render: (org: DeveloperOrganization) =>\n org.members?.length || 0,\n },\n {\n key: \"actions\",\n header: \"\",\n className: \"text-right\",\n render: (org: DeveloperOrganization) => (\n <button\n onClick={(event) => {\n event.stopPropagation();\n handleNavigate(detailPath(org.id));\n }}\n className=\"inline-flex items-center gap-1.5 rounded-md border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken\"\n >\n <Eye size={14} />\n {tr(\"devportal.view\", \"View\")}\n </button>\n ),\n },\n ]}\n />\n ) : (\n <div className=\"grid gap-6\">\n {organizations.map((org: OrganizationFieldsFragment) => (\n <OrganizationCard\n key={org.id}\n org={org as DeveloperOrganization}\n onClick={() => handleNavigate(detailPath(org.id))}\n />\n ))}\n </div>\n )\n ) : (\n <EmptyState\n illustration=\"empty-people\"\n title={\n isSeller\n ? tr(\n \"devportal.noSellerOrganizationsYet\",\n \"No seller organizations yet\",\n )\n : tr(\"devportal.noOrganizationsYet\", \"No organizations yet\")\n }\n description={\n isSeller\n ? tr(\n \"devportal.createSellerOrgToSell\",\n \"Create a seller organization to start selling physical products, or list your first item and one will be set up for you\",\n )\n : tr(\n \"devportal.createOrgToCollaborate\",\n \"Create an organization to collaborate with your team and manage apps together\",\n )\n }\n action={\n <button\n onClick={() => handleNavigate(createPath)}\n className=\"inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90\"\n >\n <Plus size={16} />\n {tr(\"devportal.createOrganization\", \"Create Organization\")}\n </button>\n }\n />\n )}\n </PageLayout>\n </PermissionGuard>\n );\n};\n\n// Organization card component\nconst OrganizationCard: FC<{\n org: DeveloperOrganization;\n onClick: () => void;\n}> = ({ org, onClick }) => {\n const tr = useTr();\n return (\n <div\n role=\"button\"\n tabIndex={0}\n onClick={onClick}\n onKeyDown={(event) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n onClick();\n }\n }}\n className=\"cursor-pointer rounded-card border border-border-seam bg-bg-surface p-6 shadow-[var(--shadow-pop)] transition-[box-shadow,border-color] hover:shadow-[var(--shadow-pop-hover)] hover:border-border-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\"\n >\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n {/* Left side - Info */}\n <div className=\"flex items-start gap-4\">\n {org.logoUrl ? (\n <img\n src={org.logoUrl}\n alt={org.name}\n className=\"h-16 w-16 rounded-lg object-cover\"\n />\n ) : (\n <div className=\"flex h-16 w-16 items-center justify-center rounded-lg bg-action-primary-bg/10 text-primary\">\n <Building2 size={32} />\n </div>\n )}\n <div>\n <div className=\"flex items-center gap-2 flex-wrap\">\n <h3 className=\"text-lg font-semibold\">{org.name}</h3>\n {org.isVerified && <VerifiedBadge verified />}\n {org.isCertified && (\n <span className=\"inline-flex items-center gap-1 rounded-full bg-status-info-bg-subtle px-2 py-0.5 text-xs font-medium text-status-info-text\">\n <CheckCircle size={12} />{\" \"}\n {tr(\"devportal.certified\", \"Certified\")}\n </span>\n )}\n </div>\n {org.description && (\n <p className=\"mt-1 text-sm text-text-secondary\">\n {org.description}\n </p>\n )}\n <div className=\"mt-2 flex flex-wrap items-center gap-2\">\n <StatusBadge status={org.tier} type=\"tier\" />\n {org.partnerTier && (\n <StatusBadge status={org.partnerTier} type=\"partner\" />\n )}\n </div>\n </div>\n </div>\n\n {/* Right side - Stats. Installs/API calls/avg rating/apps count are\n app-marketplace concepts that don't apply to a PHYSICAL (seller)\n org, so it only gets a member count here — everything real for a\n seller org (revenue, items) is one click away on its detail\n page. */}\n <div className=\"flex flex-wrap gap-6 text-sm\">\n <div className=\"flex items-center gap-2\">\n <Users size={16} className=\"text-text-secondary\" />\n <span>\n {org.members?.length || 0}{\" \"}\n {tr(\"devportal.membersLower\", \"members\")}\n </span>\n </div>\n {org.kind !== \"PHYSICAL\" && (\n <div className=\"flex items-center gap-2\">\n <AppWindow size={16} className=\"text-text-secondary\" />\n <span>\n {org.publishedApps} / {org.totalApps}{\" \"}\n {tr(\"devportal.appsLower\", \"apps\")}\n </span>\n </div>\n )}\n </div>\n </div>\n\n {org.kind !== \"PHYSICAL\" && (\n <div className=\"mt-4 grid grid-cols-2 gap-4 rounded-lg bg-bg-sunken/50 p-4 sm:grid-cols-4\">\n <div>\n <p className=\"text-xs text-text-secondary\">\n {tr(\"devportal.totalInstalls\", \"Total Installs\")}\n </p>\n <p className=\"text-lg font-semibold\">\n {(org.totalInstalls || 0).toLocaleString()}\n </p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">\n {tr(\"devportal.activeInstalls\", \"Active Installs\")}\n </p>\n <p className=\"text-lg font-semibold\">\n {(org.activeInstalls || 0).toLocaleString()}\n </p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">\n {tr(\"devportal.apiCalls\", \"API Calls\")}\n </p>\n <p className=\"text-lg font-semibold\">\n {org.totalApiCalls\n ? `${(parseInt(org.totalApiCalls) / 1000000).toFixed(1)}M`\n : \"0\"}\n </p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">\n {tr(\"devportal.avgRating\", \"Avg Rating\")}\n </p>\n <p className=\"text-lg font-semibold\">\n {org.averageRating\n ? `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