@burdenoff/microfe-coolandlovely 2026.1024.4 → 2026.1027.1

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.
Files changed (40) hide show
  1. package/dist/coolandlovely/CoolAndLovelyRoutes.d.ts.map +1 -1
  2. package/dist/coolandlovely/CoolAndLovelyRoutes.js +20 -12
  3. package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -1
  4. package/dist/coolandlovely/components/FulfilmentTimeline.d.ts +7 -0
  5. package/dist/coolandlovely/components/FulfilmentTimeline.d.ts.map +1 -0
  6. package/dist/coolandlovely/components/FulfilmentTimeline.js +77 -0
  7. package/dist/coolandlovely/components/FulfilmentTimeline.js.map +1 -0
  8. package/dist/coolandlovely/components/RefundPanel.d.ts +8 -0
  9. package/dist/coolandlovely/components/RefundPanel.d.ts.map +1 -0
  10. package/dist/coolandlovely/components/RefundPanel.js +113 -0
  11. package/dist/coolandlovely/components/RefundPanel.js.map +1 -0
  12. package/dist/coolandlovely/components/StatusBadge.d.ts.map +1 -1
  13. package/dist/coolandlovely/components/StatusBadge.js +17 -1
  14. package/dist/coolandlovely/components/StatusBadge.js.map +1 -1
  15. package/dist/coolandlovely/hooks/useBrandOrdersApi.d.ts +12 -0
  16. package/dist/coolandlovely/hooks/useBrandOrdersApi.d.ts.map +1 -0
  17. package/dist/coolandlovely/hooks/useBrandOrdersApi.js +124 -0
  18. package/dist/coolandlovely/hooks/useBrandOrdersApi.js.map +1 -0
  19. package/dist/coolandlovely/hooks/useCommerceApi.d.ts +4 -0
  20. package/dist/coolandlovely/hooks/useCommerceApi.d.ts.map +1 -1
  21. package/dist/coolandlovely/hooks/useCommerceApi.js +28 -23
  22. package/dist/coolandlovely/hooks/useCommerceApi.js.map +1 -1
  23. package/dist/coolandlovely/pages/brands/BrandDetailPage.d.ts.map +1 -1
  24. package/dist/coolandlovely/pages/brands/BrandDetailPage.js +157 -148
  25. package/dist/coolandlovely/pages/brands/BrandDetailPage.js.map +1 -1
  26. package/dist/coolandlovely/pages/commerce/BrandOrdersPage.d.ts +14 -0
  27. package/dist/coolandlovely/pages/commerce/BrandOrdersPage.d.ts.map +1 -0
  28. package/dist/coolandlovely/pages/commerce/BrandOrdersPage.js +362 -0
  29. package/dist/coolandlovely/pages/commerce/BrandOrdersPage.js.map +1 -0
  30. package/dist/coolandlovely/pages/commerce/CartPage.js +4 -4
  31. package/dist/coolandlovely/pages/commerce/CreatorEarningsPage.d.ts.map +1 -1
  32. package/dist/coolandlovely/pages/commerce/CreatorEarningsPage.js +108 -106
  33. package/dist/coolandlovely/pages/commerce/CreatorEarningsPage.js.map +1 -1
  34. package/dist/coolandlovely/pages/commerce/OrdersPage.d.ts +2 -1
  35. package/dist/coolandlovely/pages/commerce/OrdersPage.d.ts.map +1 -1
  36. package/dist/coolandlovely/pages/commerce/OrdersPage.js +206 -123
  37. package/dist/coolandlovely/pages/commerce/OrdersPage.js.map +1 -1
  38. package/dist/coolandlovely/types/commerce.d.ts +98 -1
  39. package/dist/coolandlovely/types/commerce.d.ts.map +1 -1
  40. package/package.json +1 -1
@@ -1,177 +1,179 @@
1
- import { PageLayout as e } from "../../components/PageLayout.js";
2
- import { MetricsCard as t } from "../../components/MetricsCard.js";
3
- import { useTr as n } from "../../hooks/useTr.js";
1
+ import { cn as e } from "../../utils/cn.js";
2
+ import { PageLayout as t } from "../../components/PageLayout.js";
3
+ import { MetricsCard as n } from "../../components/MetricsCard.js";
4
+ import { useTr as r } from "../../hooks/useTr.js";
4
5
  import "../../hooks/index.js";
5
- import { StatusBadge as r } from "../../components/StatusBadge.js";
6
- import { ErrorView as i, LoadingView as a } from "../../components/StateViews.js";
7
- import { formatDate as o, formatPrice as s } from "../../utils/formatters.js";
8
- import { EmptyState as c } from "../../components/EmptyState.js";
9
- import { TextField as l } from "../../components/Field.js";
10
- import { useMyCreatorEarnings as u, useMyCreatorEarningsSummary as d, useRequestCreatorPayout as f } from "../../hooks/useCommerceApi.js";
11
- import { useState as p } from "react";
12
- import { Loader2 as m, Wallet as h } from "lucide-react";
13
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
14
- import { GlassCard as v } from "@burdenoff/fe-libs/ui";
6
+ import { StatusBadge as i } from "../../components/StatusBadge.js";
7
+ import { ErrorView as a, LoadingView as o } from "../../components/StateViews.js";
8
+ import { formatDate as s, formatPrice as c } from "../../utils/formatters.js";
9
+ import { EmptyState as l } from "../../components/EmptyState.js";
10
+ import { TextField as u } from "../../components/Field.js";
11
+ import { useMyCreatorEarnings as d, useMyCreatorEarningsSummary as f, useRequestCreatorPayout as p } from "../../hooks/useCommerceApi.js";
12
+ import { useState as m } from "react";
13
+ import { Loader2 as h, Wallet as g } from "lucide-react";
14
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
15
+ import { GlassCard as y } from "@burdenoff/fe-libs/ui";
15
16
  //#region src/coolandlovely/pages/commerce/CreatorEarningsPage.tsx
16
- function y() {
17
- let y = n(), b = d(), x = u(), S = f(), [C, w] = p(""), T = y("coolandlovely.earnings.title", "Creator earnings");
18
- if (b.isLoading || x.isLoading) return /* @__PURE__ */ g(e, {
19
- title: T,
20
- children: /* @__PURE__ */ g(a, {})
17
+ function b() {
18
+ let b = r(), x = f(), S = d(), C = p(), [w, T] = m(""), E = b("coolandlovely.earnings.title", "Creator earnings");
19
+ if (x.isLoading || S.isLoading) return /* @__PURE__ */ _(t, {
20
+ title: E,
21
+ children: /* @__PURE__ */ _(o, {})
21
22
  });
22
- if (b.isError || x.isError || !b.data || !x.data) return /* @__PURE__ */ g(e, {
23
- title: T,
24
- children: /* @__PURE__ */ g(i, { onRetry: () => {
25
- b.refetch(), x.refetch();
23
+ if (x.isError || S.isError || !x.data || !S.data) return /* @__PURE__ */ _(t, {
24
+ title: E,
25
+ children: /* @__PURE__ */ _(a, { onRetry: () => {
26
+ x.refetch(), S.refetch();
26
27
  } })
27
28
  });
28
- let E = b.data, D = E.currency ?? "USD", O = Number(C), k = E.currency !== null && O > 0 && O <= E.availableAmount;
29
- return /* @__PURE__ */ _(e, {
30
- title: T,
31
- description: y("coolandlovely.earnings.description", "You earn {{rate}}% of every piece bought from your looks. Commissions become available {{days}} days after payment.", {
32
- rate: Math.round(E.commissionRate * 100),
33
- days: E.holdDays
29
+ let D = x.data, O = D.currency ?? "USD", k = Number(w), A = D.currency !== null && k > 0 && k <= D.availableAmount;
30
+ return /* @__PURE__ */ v(t, {
31
+ title: E,
32
+ description: b("coolandlovely.earnings.description", "You earn {{rate}}% of every piece bought from your looks. Commissions become available {{days}} days after payment.", {
33
+ rate: Math.round(D.commissionRate * 100),
34
+ days: D.holdDays
34
35
  }),
35
36
  children: [
36
- /* @__PURE__ */ _("div", {
37
+ /* @__PURE__ */ v("div", {
37
38
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
38
39
  "data-testid": "earnings-summary",
39
40
  children: [
40
- /* @__PURE__ */ g(t, {
41
- icon: /* @__PURE__ */ g(h, { className: "h-5 w-5" }),
42
- label: y("coolandlovely.earnings.available", "Available"),
43
- value: s(E.availableAmount, D)
41
+ /* @__PURE__ */ _(n, {
42
+ icon: /* @__PURE__ */ _(g, { className: "h-5 w-5" }),
43
+ label: b("coolandlovely.earnings.available", "Available"),
44
+ value: c(D.availableAmount, O)
44
45
  }),
45
- /* @__PURE__ */ g(t, {
46
- icon: /* @__PURE__ */ g(h, { className: "h-5 w-5" }),
47
- label: y("coolandlovely.earnings.pending", "In return window"),
48
- value: s(E.pendingAmount, D)
46
+ /* @__PURE__ */ _(n, {
47
+ icon: /* @__PURE__ */ _(g, { className: "h-5 w-5" }),
48
+ label: b("coolandlovely.earnings.pending", "In return window"),
49
+ value: c(D.pendingAmount, O)
49
50
  }),
50
- /* @__PURE__ */ g(t, {
51
- icon: /* @__PURE__ */ g(h, { className: "h-5 w-5" }),
52
- label: y("coolandlovely.earnings.reserved", "Payout requested"),
53
- value: s(E.reservedAmount, D)
51
+ /* @__PURE__ */ _(n, {
52
+ icon: /* @__PURE__ */ _(g, { className: "h-5 w-5" }),
53
+ label: b("coolandlovely.earnings.reserved", "Payout requested"),
54
+ value: c(D.reservedAmount, O)
54
55
  }),
55
- /* @__PURE__ */ g(t, {
56
- icon: /* @__PURE__ */ g(h, { className: "h-5 w-5" }),
57
- label: y("coolandlovely.earnings.paid", "Paid out"),
58
- value: s(E.paidAmount, D)
56
+ /* @__PURE__ */ _(n, {
57
+ icon: /* @__PURE__ */ _(g, { className: "h-5 w-5" }),
58
+ label: b("coolandlovely.earnings.paid", "Paid out"),
59
+ value: c(D.paidAmount, O)
59
60
  })
60
61
  ]
61
62
  }),
62
- !E.billingAvailable && /* @__PURE__ */ g("p", {
63
+ !D.billingAvailable && /* @__PURE__ */ _("p", {
63
64
  className: "mt-3 text-sm text-status-warning-text",
64
- children: y("coolandlovely.earnings.billingUnavailable", "Balances could not be confirmed with billing just now; the figures above come from your commission history.")
65
+ children: b("coolandlovely.earnings.billingUnavailable", "Balances could not be confirmed with billing just now; the figures above come from your commission history.")
65
66
  }),
66
- /* @__PURE__ */ _("div", {
67
+ /* @__PURE__ */ v("div", {
67
68
  className: "mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3",
68
- children: [/* @__PURE__ */ _("section", {
69
+ children: [/* @__PURE__ */ v("section", {
69
70
  className: "lg:col-span-2",
70
- children: [/* @__PURE__ */ g("h3", {
71
+ children: [/* @__PURE__ */ _("h3", {
71
72
  className: "mb-3 text-lg font-semibold text-text-primary",
72
- children: y("coolandlovely.earnings.history", "Commission history")
73
- }), x.data.items.length === 0 ? /* @__PURE__ */ g(c, {
74
- icon: /* @__PURE__ */ g(h, { className: "h-8 w-8" }),
75
- title: y("coolandlovely.earnings.emptyTitle", "No commissions yet"),
76
- description: y("coolandlovely.earnings.emptyDescription", "Publish looks with catalogue pieces. When someone buys from your look, the commission shows up here.")
77
- }) : /* @__PURE__ */ g("div", {
73
+ children: b("coolandlovely.earnings.history", "Commission history")
74
+ }), S.data.items.length === 0 ? /* @__PURE__ */ _(l, {
75
+ icon: /* @__PURE__ */ _(g, { className: "h-8 w-8" }),
76
+ title: b("coolandlovely.earnings.emptyTitle", "No commissions yet"),
77
+ description: b("coolandlovely.earnings.emptyDescription", "Publish looks with catalogue pieces. When someone buys from your look, the commission shows up here.")
78
+ }) : /* @__PURE__ */ _("div", {
78
79
  className: "overflow-x-auto rounded-xl border border-border-seam",
79
- children: /* @__PURE__ */ _("table", {
80
+ children: /* @__PURE__ */ v("table", {
80
81
  className: "w-full text-sm",
81
- children: [/* @__PURE__ */ g("thead", {
82
+ children: [/* @__PURE__ */ _("thead", {
82
83
  className: "bg-bg-sunken text-left text-xs uppercase tracking-wide text-text-secondary",
83
- children: /* @__PURE__ */ _("tr", { children: [
84
- /* @__PURE__ */ g("th", {
84
+ children: /* @__PURE__ */ v("tr", { children: [
85
+ /* @__PURE__ */ _("th", {
85
86
  className: "px-4 py-2",
86
- children: y("coolandlovely.earnings.order", "Order")
87
+ children: b("coolandlovely.earnings.order", "Order")
87
88
  }),
88
- /* @__PURE__ */ g("th", {
89
+ /* @__PURE__ */ _("th", {
89
90
  className: "px-4 py-2 text-right",
90
- children: y("coolandlovely.earnings.sale", "Sale")
91
+ children: b("coolandlovely.earnings.sale", "Sale")
91
92
  }),
92
- /* @__PURE__ */ g("th", {
93
+ /* @__PURE__ */ _("th", {
93
94
  className: "px-4 py-2 text-right",
94
- children: y("coolandlovely.earnings.commission", "Commission")
95
+ children: b("coolandlovely.earnings.commission", "Commission")
95
96
  }),
96
- /* @__PURE__ */ g("th", {
97
+ /* @__PURE__ */ _("th", {
97
98
  className: "px-4 py-2",
98
- children: y("coolandlovely.earnings.availableOn", "Available on")
99
+ children: b("coolandlovely.earnings.availableOn", "Available on")
99
100
  }),
100
- /* @__PURE__ */ g("th", {
101
+ /* @__PURE__ */ _("th", {
101
102
  className: "px-4 py-2",
102
- children: y("coolandlovely.earnings.ledger", "Ledger")
103
+ children: b("coolandlovely.earnings.ledger", "Ledger")
103
104
  })
104
105
  ] })
105
- }), /* @__PURE__ */ g("tbody", { children: x.data.items.map((e) => /* @__PURE__ */ _("tr", {
106
+ }), /* @__PURE__ */ _("tbody", { children: S.data.items.map((t) => /* @__PURE__ */ v("tr", {
106
107
  className: "border-t border-border-seam",
107
108
  children: [
108
- /* @__PURE__ */ g("td", {
109
+ /* @__PURE__ */ _("td", {
109
110
  className: "px-4 py-2 font-mono text-text-primary",
110
- children: e.orderNumber ?? "—"
111
+ children: t.orderNumber ?? "—"
111
112
  }),
112
- /* @__PURE__ */ g("td", {
113
+ /* @__PURE__ */ _("td", {
113
114
  className: "px-4 py-2 text-right tabular-nums text-text-secondary",
114
- children: s(e.saleAmount, e.currency)
115
+ children: c(t.saleAmount, t.currency)
115
116
  }),
116
- /* @__PURE__ */ g("td", {
117
- className: "px-4 py-2 text-right font-semibold tabular-nums text-text-primary",
118
- children: s(e.amount, e.currency)
117
+ /* @__PURE__ */ _("td", {
118
+ className: e("px-4 py-2 text-right font-semibold tabular-nums text-text-primary", t.reversalStatus === "REVERSED" && "text-text-secondary line-through"),
119
+ children: c(t.amount, t.currency)
119
120
  }),
120
- /* @__PURE__ */ g("td", {
121
+ /* @__PURE__ */ _("td", {
121
122
  className: "px-4 py-2 text-text-secondary",
122
- children: o(e.availableAt, {
123
+ children: s(t.availableAt, {
123
124
  hour: void 0,
124
125
  minute: void 0
125
126
  })
126
127
  }),
127
- /* @__PURE__ */ g("td", {
128
+ /* @__PURE__ */ _("td", {
128
129
  className: "px-4 py-2",
129
- children: /* @__PURE__ */ g(r, { status: e.billingSyncStatus })
130
+ "data-testid": "earning-ledger-status",
131
+ children: /* @__PURE__ */ _(i, { status: t.reversalStatus === "REVERSED" || t.reversalStatus === "NOT_REVERSIBLE" ? t.reversalStatus : t.billingSyncStatus })
130
132
  })
131
133
  ]
132
- }, e.id)) })]
134
+ }, t.id)) })]
133
135
  })
134
136
  })]
135
- }), /* @__PURE__ */ _(v, {
137
+ }), /* @__PURE__ */ v(y, {
136
138
  treatment: "glass",
137
139
  className: "h-fit space-y-4 p-6",
138
140
  children: [
139
- /* @__PURE__ */ g("h3", {
141
+ /* @__PURE__ */ _("h3", {
140
142
  className: "text-base font-semibold text-text-primary",
141
- children: y("coolandlovely.earnings.requestTitle", "Request a payout")
143
+ children: b("coolandlovely.earnings.requestTitle", "Request a payout")
142
144
  }),
143
- /* @__PURE__ */ g("p", {
145
+ /* @__PURE__ */ _("p", {
144
146
  className: "text-sm text-text-secondary",
145
- children: y("coolandlovely.earnings.requestHint", "Payouts are reviewed by the platform and sent to the payout account on your billing profile.")
147
+ children: b("coolandlovely.earnings.requestHint", "Payouts are reviewed by the platform and sent to the payout account on your billing profile.")
146
148
  }),
147
- /* @__PURE__ */ g(l, {
149
+ /* @__PURE__ */ _(u, {
148
150
  id: "coo-payout-amount",
149
151
  type: "number",
150
- label: y("coolandlovely.earnings.amount", "Amount ({{currency}})", { currency: D }),
151
- value: C,
152
- onChange: w,
153
- hint: y("coolandlovely.earnings.maxHint", "Up to {{amount}}", { amount: s(E.availableAmount, D) })
152
+ label: b("coolandlovely.earnings.amount", "Amount ({{currency}})", { currency: O }),
153
+ value: w,
154
+ onChange: T,
155
+ hint: b("coolandlovely.earnings.maxHint", "Up to {{amount}}", { amount: c(D.availableAmount, O) })
154
156
  }),
155
- S.error && /* @__PURE__ */ g("p", {
157
+ C.error && /* @__PURE__ */ _("p", {
156
158
  className: "text-sm text-status-error-text",
157
- children: S.error.message
159
+ children: C.error.message
158
160
  }),
159
- S.data && /* @__PURE__ */ g("p", {
161
+ C.data && /* @__PURE__ */ _("p", {
160
162
  className: "text-sm text-status-success-text",
161
- children: y("coolandlovely.earnings.requested", "Payout of {{amount}} requested ({{status}}).", {
162
- amount: s(S.data.requestedAmount, S.data.currency),
163
- status: S.data.status
163
+ children: b("coolandlovely.earnings.requested", "Payout of {{amount}} requested ({{status}}).", {
164
+ amount: c(C.data.requestedAmount, C.data.currency),
165
+ status: C.data.status
164
166
  })
165
167
  }),
166
- /* @__PURE__ */ _("button", {
168
+ /* @__PURE__ */ v("button", {
167
169
  type: "button",
168
- disabled: !k || S.isPending,
169
- onClick: () => S.mutate({
170
- amount: O,
171
- currency: D
172
- }, { onSuccess: () => w("") }),
170
+ disabled: !A || C.isPending,
171
+ onClick: () => C.mutate({
172
+ amount: k,
173
+ currency: O
174
+ }, { onSuccess: () => T("") }),
173
175
  className: "inline-flex w-full items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2.5 text-sm font-semibold text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-50",
174
- children: [S.isPending && /* @__PURE__ */ g(m, { className: "h-4 w-4 animate-spin" }), y("coolandlovely.earnings.requestButton", "Request payout")]
176
+ children: [C.isPending && /* @__PURE__ */ _(h, { className: "h-4 w-4 animate-spin" }), b("coolandlovely.earnings.requestButton", "Request payout")]
175
177
  })
176
178
  ]
177
179
  })]
@@ -180,6 +182,6 @@ function y() {
180
182
  });
181
183
  }
182
184
  //#endregion
183
- export { y as CreatorEarningsPage };
185
+ export { b as CreatorEarningsPage };
184
186
 
185
187
  //# sourceMappingURL=CreatorEarningsPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreatorEarningsPage.js","names":[],"sources":["../../../../src/coolandlovely/pages/commerce/CreatorEarningsPage.tsx"],"sourcesContent":["/**\n * Creator Earnings Page (BOFF-3370)\n * @module coolandlovely/pages/commerce\n *\n * A creator's look commissions: every piece bought from one of their published looks earns\n * them a commission once the order is paid. Balances come from global-billing's earnings\n * ledger (`cooMyCreatorEarningsSummary`); a creator can ask for a payout of the available\n * balance (`cooRequestCreatorPayout`), which billing queues for payout review.\n */\n\nimport { useState } from 'react';\nimport { Loader2, Wallet } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\n\nimport { EmptyState } from '../../components/EmptyState';\nimport { TextField } from '../../components/Field';\nimport { MetricsCard } from '../../components/MetricsCard';\nimport { PageLayout } from '../../components/PageLayout';\nimport { ErrorView, LoadingView } from '../../components/StateViews';\nimport { StatusBadge } from '../../components/StatusBadge';\nimport { useTr } from '../../hooks';\nimport {\n useMyCreatorEarnings,\n useMyCreatorEarningsSummary,\n useRequestCreatorPayout,\n} from '../../hooks/useCommerceApi';\nimport { formatDate, formatPrice } from '../../utils/formatters';\n\nexport function CreatorEarningsPage() {\n const tr = useTr();\n const summary = useMyCreatorEarningsSummary();\n const earnings = useMyCreatorEarnings();\n const payout = useRequestCreatorPayout();\n const [amount, setAmount] = useState('');\n const title = tr('coolandlovely.earnings.title', 'Creator earnings');\n\n if (summary.isLoading || earnings.isLoading) {\n return (\n <PageLayout title={title}>\n <LoadingView />\n </PageLayout>\n );\n }\n if (summary.isError || earnings.isError || !summary.data || !earnings.data) {\n return (\n <PageLayout title={title}>\n <ErrorView\n onRetry={() => {\n void summary.refetch();\n void earnings.refetch();\n }}\n />\n </PageLayout>\n );\n }\n\n const s = summary.data;\n const currency = s.currency ?? 'USD';\n const requested = Number(amount);\n const canRequest = s.currency !== null && requested > 0 && requested <= s.availableAmount;\n\n return (\n <PageLayout\n title={title}\n description={tr(\n 'coolandlovely.earnings.description',\n 'You earn {{rate}}% of every piece bought from your looks. Commissions become available {{days}} days after payment.',\n { rate: Math.round(s.commissionRate * 100), days: s.holdDays }\n )}\n >\n <div\n className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\"\n data-testid=\"earnings-summary\"\n >\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n label={tr('coolandlovely.earnings.available', 'Available')}\n value={formatPrice(s.availableAmount, currency)}\n />\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n label={tr('coolandlovely.earnings.pending', 'In return window')}\n value={formatPrice(s.pendingAmount, currency)}\n />\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n label={tr('coolandlovely.earnings.reserved', 'Payout requested')}\n value={formatPrice(s.reservedAmount, currency)}\n />\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n label={tr('coolandlovely.earnings.paid', 'Paid out')}\n value={formatPrice(s.paidAmount, currency)}\n />\n </div>\n {!s.billingAvailable && (\n <p className=\"mt-3 text-sm text-status-warning-text\">\n {tr(\n 'coolandlovely.earnings.billingUnavailable',\n 'Balances could not be confirmed with billing just now; the figures above come from your commission history.'\n )}\n </p>\n )}\n\n <div className=\"mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3\">\n <section className=\"lg:col-span-2\">\n <h3 className=\"mb-3 text-lg font-semibold text-text-primary\">\n {tr('coolandlovely.earnings.history', 'Commission history')}\n </h3>\n {earnings.data.items.length === 0 ? (\n <EmptyState\n icon={<Wallet className=\"h-8 w-8\" />}\n title={tr('coolandlovely.earnings.emptyTitle', 'No commissions yet')}\n description={tr(\n 'coolandlovely.earnings.emptyDescription',\n 'Publish looks with catalogue pieces. When someone buys from your look, the commission shows up here.'\n )}\n />\n ) : (\n <div className=\"overflow-x-auto rounded-xl border border-border-seam\">\n <table className=\"w-full text-sm\">\n <thead className=\"bg-bg-sunken text-left text-xs uppercase tracking-wide text-text-secondary\">\n <tr>\n <th className=\"px-4 py-2\">{tr('coolandlovely.earnings.order', 'Order')}</th>\n <th className=\"px-4 py-2 text-right\">\n {tr('coolandlovely.earnings.sale', 'Sale')}\n </th>\n <th className=\"px-4 py-2 text-right\">\n {tr('coolandlovely.earnings.commission', 'Commission')}\n </th>\n <th className=\"px-4 py-2\">\n {tr('coolandlovely.earnings.availableOn', 'Available on')}\n </th>\n <th className=\"px-4 py-2\">{tr('coolandlovely.earnings.ledger', 'Ledger')}</th>\n </tr>\n </thead>\n <tbody>\n {earnings.data.items.map((earning) => (\n <tr key={earning.id} className=\"border-t border-border-seam\">\n <td className=\"px-4 py-2 font-mono text-text-primary\">\n {earning.orderNumber ?? '—'}\n </td>\n <td className=\"px-4 py-2 text-right tabular-nums text-text-secondary\">\n {formatPrice(earning.saleAmount, earning.currency)}\n </td>\n <td className=\"px-4 py-2 text-right font-semibold tabular-nums text-text-primary\">\n {formatPrice(earning.amount, earning.currency)}\n </td>\n <td className=\"px-4 py-2 text-text-secondary\">\n {formatDate(earning.availableAt, { hour: undefined, minute: undefined })}\n </td>\n <td className=\"px-4 py-2\">\n <StatusBadge status={earning.billingSyncStatus} />\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )}\n </section>\n\n <GlassCard treatment=\"glass\" className=\"h-fit space-y-4 p-6\">\n <h3 className=\"text-base font-semibold text-text-primary\">\n {tr('coolandlovely.earnings.requestTitle', 'Request a payout')}\n </h3>\n <p className=\"text-sm text-text-secondary\">\n {tr(\n 'coolandlovely.earnings.requestHint',\n 'Payouts are reviewed by the platform and sent to the payout account on your billing profile.'\n )}\n </p>\n <TextField\n id=\"coo-payout-amount\"\n type=\"number\"\n label={tr('coolandlovely.earnings.amount', 'Amount ({{currency}})', { currency })}\n value={amount}\n onChange={setAmount}\n hint={tr('coolandlovely.earnings.maxHint', 'Up to {{amount}}', {\n amount: formatPrice(s.availableAmount, currency),\n })}\n />\n {payout.error && <p className=\"text-sm text-status-error-text\">{payout.error.message}</p>}\n {payout.data && (\n <p className=\"text-sm text-status-success-text\">\n {tr(\n 'coolandlovely.earnings.requested',\n 'Payout of {{amount}} requested ({{status}}).',\n {\n amount: formatPrice(payout.data.requestedAmount, payout.data.currency),\n status: payout.data.status,\n }\n )}\n </p>\n )}\n <button\n type=\"button\"\n disabled={!canRequest || payout.isPending}\n onClick={() =>\n payout.mutate({ amount: requested, currency }, { onSuccess: () => setAmount('') })\n }\n className=\"inline-flex w-full items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2.5 text-sm font-semibold text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-50\"\n >\n {payout.isPending && <Loader2 className=\"h-4 w-4 animate-spin\" />}\n {tr('coolandlovely.earnings.requestButton', 'Request payout')}\n </button>\n </GlassCard>\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AA4BA,SAAgB,IAAsB;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CAAC;OAEpF,WAAU;iBANZ,CAQG,EAAO,aAAa,kBAAC,GAAD,EAAS,WAAU,wBAAyB,CAAA,EAChE,EAAG,wCAAwC,iBAAiB,CACtD;;MACC;OACR;;GACK"}
1
+ {"version":3,"file":"CreatorEarningsPage.js","names":[],"sources":["../../../../src/coolandlovely/pages/commerce/CreatorEarningsPage.tsx"],"sourcesContent":["/**\n * Creator Earnings Page (BOFF-3370)\n * @module coolandlovely/pages/commerce\n *\n * A creator's look commissions: every piece bought from one of their published looks earns\n * them a commission once the order is paid. Balances come from global-billing's earnings\n * ledger (`cooMyCreatorEarningsSummary`); a creator can ask for a payout of the available\n * balance (`cooRequestCreatorPayout`), which billing queues for payout review.\n */\n\nimport { useState } from 'react';\nimport { Loader2, Wallet } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\n\nimport { EmptyState } from '../../components/EmptyState';\nimport { TextField } from '../../components/Field';\nimport { MetricsCard } from '../../components/MetricsCard';\nimport { PageLayout } from '../../components/PageLayout';\nimport { ErrorView, LoadingView } from '../../components/StateViews';\nimport { StatusBadge } from '../../components/StatusBadge';\nimport { useTr } from '../../hooks';\nimport {\n useMyCreatorEarnings,\n useMyCreatorEarningsSummary,\n useRequestCreatorPayout,\n} from '../../hooks/useCommerceApi';\nimport { cn } from '../../utils/cn';\nimport { formatDate, formatPrice } from '../../utils/formatters';\n\nexport function CreatorEarningsPage() {\n const tr = useTr();\n const summary = useMyCreatorEarningsSummary();\n const earnings = useMyCreatorEarnings();\n const payout = useRequestCreatorPayout();\n const [amount, setAmount] = useState('');\n const title = tr('coolandlovely.earnings.title', 'Creator earnings');\n\n if (summary.isLoading || earnings.isLoading) {\n return (\n <PageLayout title={title}>\n <LoadingView />\n </PageLayout>\n );\n }\n if (summary.isError || earnings.isError || !summary.data || !earnings.data) {\n return (\n <PageLayout title={title}>\n <ErrorView\n onRetry={() => {\n void summary.refetch();\n void earnings.refetch();\n }}\n />\n </PageLayout>\n );\n }\n\n const s = summary.data;\n const currency = s.currency ?? 'USD';\n const requested = Number(amount);\n const canRequest = s.currency !== null && requested > 0 && requested <= s.availableAmount;\n\n return (\n <PageLayout\n title={title}\n description={tr(\n 'coolandlovely.earnings.description',\n 'You earn {{rate}}% of every piece bought from your looks. Commissions become available {{days}} days after payment.',\n { rate: Math.round(s.commissionRate * 100), days: s.holdDays }\n )}\n >\n <div\n className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\"\n data-testid=\"earnings-summary\"\n >\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n label={tr('coolandlovely.earnings.available', 'Available')}\n value={formatPrice(s.availableAmount, currency)}\n />\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n label={tr('coolandlovely.earnings.pending', 'In return window')}\n value={formatPrice(s.pendingAmount, currency)}\n />\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n label={tr('coolandlovely.earnings.reserved', 'Payout requested')}\n value={formatPrice(s.reservedAmount, currency)}\n />\n <MetricsCard\n icon={<Wallet className=\"h-5 w-5\" />}\n label={tr('coolandlovely.earnings.paid', 'Paid out')}\n value={formatPrice(s.paidAmount, currency)}\n />\n </div>\n {!s.billingAvailable && (\n <p className=\"mt-3 text-sm text-status-warning-text\">\n {tr(\n 'coolandlovely.earnings.billingUnavailable',\n 'Balances could not be confirmed with billing just now; the figures above come from your commission history.'\n )}\n </p>\n )}\n\n <div className=\"mt-6 grid grid-cols-1 gap-6 lg:grid-cols-3\">\n <section className=\"lg:col-span-2\">\n <h3 className=\"mb-3 text-lg font-semibold text-text-primary\">\n {tr('coolandlovely.earnings.history', 'Commission history')}\n </h3>\n {earnings.data.items.length === 0 ? (\n <EmptyState\n icon={<Wallet className=\"h-8 w-8\" />}\n title={tr('coolandlovely.earnings.emptyTitle', 'No commissions yet')}\n description={tr(\n 'coolandlovely.earnings.emptyDescription',\n 'Publish looks with catalogue pieces. When someone buys from your look, the commission shows up here.'\n )}\n />\n ) : (\n <div className=\"overflow-x-auto rounded-xl border border-border-seam\">\n <table className=\"w-full text-sm\">\n <thead className=\"bg-bg-sunken text-left text-xs uppercase tracking-wide text-text-secondary\">\n <tr>\n <th className=\"px-4 py-2\">{tr('coolandlovely.earnings.order', 'Order')}</th>\n <th className=\"px-4 py-2 text-right\">\n {tr('coolandlovely.earnings.sale', 'Sale')}\n </th>\n <th className=\"px-4 py-2 text-right\">\n {tr('coolandlovely.earnings.commission', 'Commission')}\n </th>\n <th className=\"px-4 py-2\">\n {tr('coolandlovely.earnings.availableOn', 'Available on')}\n </th>\n <th className=\"px-4 py-2\">{tr('coolandlovely.earnings.ledger', 'Ledger')}</th>\n </tr>\n </thead>\n <tbody>\n {earnings.data.items.map((earning) => (\n <tr key={earning.id} className=\"border-t border-border-seam\">\n <td className=\"px-4 py-2 font-mono text-text-primary\">\n {earning.orderNumber ?? '—'}\n </td>\n <td className=\"px-4 py-2 text-right tabular-nums text-text-secondary\">\n {formatPrice(earning.saleAmount, earning.currency)}\n </td>\n <td\n className={cn(\n 'px-4 py-2 text-right font-semibold tabular-nums text-text-primary',\n earning.reversalStatus === 'REVERSED' &&\n 'text-text-secondary line-through'\n )}\n >\n {formatPrice(earning.amount, earning.currency)}\n </td>\n <td className=\"px-4 py-2 text-text-secondary\">\n {formatDate(earning.availableAt, { hour: undefined, minute: undefined })}\n </td>\n <td className=\"px-4 py-2\" data-testid=\"earning-ledger-status\">\n {/* A refunded line's commission is reversed (BOFF-9702). */}\n <StatusBadge\n status={\n earning.reversalStatus === 'REVERSED' ||\n earning.reversalStatus === 'NOT_REVERSIBLE'\n ? earning.reversalStatus\n : earning.billingSyncStatus\n }\n />\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n )}\n </section>\n\n <GlassCard treatment=\"glass\" className=\"h-fit space-y-4 p-6\">\n <h3 className=\"text-base font-semibold text-text-primary\">\n {tr('coolandlovely.earnings.requestTitle', 'Request a payout')}\n </h3>\n <p className=\"text-sm text-text-secondary\">\n {tr(\n 'coolandlovely.earnings.requestHint',\n 'Payouts are reviewed by the platform and sent to the payout account on your billing profile.'\n )}\n </p>\n <TextField\n id=\"coo-payout-amount\"\n type=\"number\"\n label={tr('coolandlovely.earnings.amount', 'Amount ({{currency}})', { currency })}\n value={amount}\n onChange={setAmount}\n hint={tr('coolandlovely.earnings.maxHint', 'Up to {{amount}}', {\n amount: formatPrice(s.availableAmount, currency),\n })}\n />\n {payout.error && <p className=\"text-sm text-status-error-text\">{payout.error.message}</p>}\n {payout.data && (\n <p className=\"text-sm text-status-success-text\">\n {tr(\n 'coolandlovely.earnings.requested',\n 'Payout of {{amount}} requested ({{status}}).',\n {\n amount: formatPrice(payout.data.requestedAmount, payout.data.currency),\n status: payout.data.status,\n }\n )}\n </p>\n )}\n <button\n type=\"button\"\n disabled={!canRequest || payout.isPending}\n onClick={() =>\n payout.mutate({ amount: requested, currency }, { onSuccess: () => setAmount('') })\n }\n className=\"inline-flex w-full items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2.5 text-sm font-semibold text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-50\"\n >\n {payout.isPending && <Loader2 className=\"h-4 w-4 animate-spin\" />}\n {tr('coolandlovely.earnings.requestButton', 'Request payout')}\n </button>\n </GlassCard>\n </div>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA6BA,SAAgB,IAAsB;CACpC,IAAM,IAAK,GAAO,EACZ,IAAU,GAA6B,EACvC,IAAW,GAAsB,EACjC,IAAS,GAAyB,EAClC,CAAC,GAAQ,KAAa,EAAS,GAAG,EAClC,IAAQ,EAAG,gCAAgC,mBAAmB;AAEpE,KAAI,EAAQ,aAAa,EAAS,UAChC,QACE,kBAAC,GAAD;EAAmB;YACjB,kBAAC,GAAD,EAAe,CAAA;EACJ,CAAA;AAGjB,KAAI,EAAQ,WAAW,EAAS,WAAW,CAAC,EAAQ,QAAQ,CAAC,EAAS,KACpE,QACE,kBAAC,GAAD;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oBAEpC,kBAAC,GAAD,EACE,QACE,EAAQ,mBAAmB,cAC3B,EAAQ,mBAAmB,mBACvB,EAAQ,iBACR,EAAQ,mBAEd,CAAA;UACC,CAAA;SACF;UA9BI,EAAQ,GA8BZ,CACL,EACI,CAAA,CACF;;MACJ,CAAA,CAEA;QAEV,kBAAC,GAAD;KAAW,WAAU;KAAQ,WAAU;eAAvC;MACE,kBAAC,MAAD;OAAI,WAAU;iBACX,EAAG,uCAAuC,mBAAmB;OAC3D,CAAA;MACL,kBAAC,KAAD;OAAG,WAAU;iBACV,EACC,sCACA,+FACD;OACC,CAAA;MACJ,kBAAC,GAAD;OACE,IAAG;OACH,MAAK;OACL,OAAO,EAAG,iCAAiC,yBAAyB,EAAE,aAAU,CAAC;OACjF,OAAO;OACP,UAAU;OACV,MAAM,EAAG,kCAAkC,oBAAoB,EAC7D,QAAQ,EAAY,EAAE,iBAAiB,EAAS,EACjD,CAAC;OACF,CAAA;MACD,EAAO,SAAS,kBAAC,KAAD;OAAG,WAAU;iBAAkC,EAAO,MAAM;OAAY,CAAA;MACxF,EAAO,QACN,kBAAC,KAAD;OAAG,WAAU;iBACV,EACC,oCACA,gDACA;QACE,QAAQ,EAAY,EAAO,KAAK,iBAAiB,EAAO,KAAK,SAAS;QACtE,QAAQ,EAAO,KAAK;QACrB,CACF;OACC,CAAA;MAEN,kBAAC,UAAD;OACE,MAAK;OACL,UAAU,CAAC,KAAc,EAAO;OAChC,eACE,EAAO,OAAO;QAAE,QAAQ;QAAW;QAAU,EAAE,EAAE,iBAAiB,EAAU,GAAG,EAAE,CAAC;OAEpF,WAAU;iBANZ,CAQG,EAAO,aAAa,kBAAC,GAAD,EAAS,WAAU,wBAAyB,CAAA,EAChE,EAAG,wCAAwC,iBAAiB,CACtD;;MACC;OACR;;GACK"}
@@ -4,7 +4,8 @@
4
4
  *
5
5
  * The shopper's own orders (`cooMyOrders` / `cooMyOrder`). An unpaid order can be paid
6
6
  * (`cooResumeOrderPayment` re-uses its billing order), re-checked against billing
7
- * (`cooSyncOrderPayment`) or cancelled (`cooCancelOrder`).
7
+ * (`cooSyncOrderPayment`) or cancelled (`cooCancelOrder`). Brand refunds (BOFF-9702) show on
8
+ * the order with their amount and reason.
8
9
  */
9
10
  export declare function OrdersPage(): import("react").JSX.Element;
10
11
  export declare function OrderDetailPage(): import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"OrdersPage.d.ts","sourceRoot":"","sources":["../../../../src/coolandlovely/pages/commerce/OrdersPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAgDH,wBAAgB,UAAU,gCAwEzB;AAED,wBAAgB,eAAe,gCAgL9B"}
1
+ {"version":3,"file":"OrdersPage.d.ts","sourceRoot":"","sources":["../../../../src/coolandlovely/pages/commerce/OrdersPage.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAuDH,wBAAgB,UAAU,gCAwEzB;AAED,wBAAgB,eAAe,gCAiQ9B"}