@burdenoff/microfe-proserviceworld 2026.525.1 → 2026.625.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.
- package/dist/proserviceworld/pages/AdminReportsPage.js +368 -335
- package/dist/proserviceworld/pages/AdminReportsPage.js.map +1 -1
- package/dist/proserviceworld/pages/AdminUsersPage.js +262 -242
- package/dist/proserviceworld/pages/AdminUsersPage.js.map +1 -1
- package/dist/proserviceworld/pages/AnalyticsPage.js +346 -318
- package/dist/proserviceworld/pages/AnalyticsPage.js.map +1 -1
- package/dist/proserviceworld/pages/BookingsPage.js +202 -185
- package/dist/proserviceworld/pages/BookingsPage.js.map +1 -1
- package/dist/proserviceworld/pages/DashboardPage.js +400 -363
- package/dist/proserviceworld/pages/DashboardPage.js.map +1 -1
- package/dist/proserviceworld/pages/DocumentsPage.js +389 -324
- package/dist/proserviceworld/pages/DocumentsPage.js.map +1 -1
- package/dist/proserviceworld/pages/MessagesPage.js +77 -82
- package/dist/proserviceworld/pages/MessagesPage.js.map +1 -1
- package/dist/proserviceworld/pages/PaymentsPage.js +373 -346
- package/dist/proserviceworld/pages/PaymentsPage.js.map +1 -1
- package/dist/proserviceworld/pages/ProjectsPage.js +432 -385
- package/dist/proserviceworld/pages/ProjectsPage.js.map +1 -1
- package/dist/proserviceworld/pages/ProviderDetailPage.js +396 -352
- package/dist/proserviceworld/pages/ProviderDetailPage.js.map +1 -1
- package/dist/proserviceworld/pages/ProvidersPage.js +245 -244
- package/dist/proserviceworld/pages/ProvidersPage.js.map +1 -1
- package/dist/proserviceworld/pages/ReviewsPage.js +31 -31
- package/dist/proserviceworld/pages/ReviewsPage.js.map +1 -1
- package/dist/proserviceworld/pages/ServiceDetailsPage.js +349 -316
- package/dist/proserviceworld/pages/ServiceDetailsPage.js.map +1 -1
- package/dist/proserviceworld/pages/ServicesPage.js +163 -160
- package/dist/proserviceworld/pages/ServicesPage.js.map +1 -1
- package/dist/proserviceworld/pages/VerificationPage.js +265 -256
- package/dist/proserviceworld/pages/VerificationPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,21 +2,21 @@ import { useProServiceWorldStore as e } from "../store/proserviceworldStore.js";
|
|
|
2
2
|
import { useMemo as t, useState as n } from "react";
|
|
3
3
|
import { ArrowDownLeft as r, ArrowUpRight as i, Building2 as a, Clock as o, CreditCard as s, DollarSign as c, Download as l, FileText as u, Plus as d, RotateCcw as f, Search as p, Shield as m, Wallet as h } from "lucide-react";
|
|
4
4
|
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
5
|
-
import {
|
|
5
|
+
import { AuroraBackground as v, Badge as y, Button as b, Card as x, CardContent as S, CardHeader as C, CardTitle as w, GlassCard as T, GradientText as E, IllustratedEmptyState as D, Input as O } from "@burdenoff/fe-libs/ui";
|
|
6
6
|
//#region src/proserviceworld/pages/PaymentsPage.tsx
|
|
7
|
-
function
|
|
8
|
-
let { transactions:
|
|
9
|
-
let e = [...
|
|
10
|
-
if (
|
|
11
|
-
let t =
|
|
7
|
+
function k() {
|
|
8
|
+
let { transactions: k, paymentMethods: A, invoices: j } = e(), [M, N] = n("overview"), [P, F] = n(""), [I, L] = n("all"), R = k.filter((e) => e.type === "outgoing" && e.status === "completed").reduce((e, t) => e + t.amount, 0), z = k.filter((e) => e.status === "pending").reduce((e, t) => e + t.amount, 0), B = k.filter((e) => e.status === "completed").reduce((e, t) => e + t.fees, 0), V = k.filter((e) => e.type === "refund" && e.status === "completed").reduce((e, t) => e + t.amount, 0), H = t(() => {
|
|
9
|
+
let e = [...k];
|
|
10
|
+
if (I !== "all" && (e = e.filter((e) => e.status === I)), P.trim()) {
|
|
11
|
+
let t = P.toLowerCase();
|
|
12
12
|
e = e.filter((e) => e.description.toLowerCase().includes(t) || e.counterparty.toLowerCase().includes(t) || (e.serviceName?.toLowerCase().includes(t) ?? !1));
|
|
13
13
|
}
|
|
14
14
|
return e.sort((e, t) => new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime());
|
|
15
15
|
}, [
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
]),
|
|
16
|
+
k,
|
|
17
|
+
I,
|
|
18
|
+
P
|
|
19
|
+
]), U = (e) => e === "outgoing" ? /* @__PURE__ */ g(i, { className: "h-4 w-4 text-status-error-text" }) : e === "refund" ? /* @__PURE__ */ g(f, { className: "h-4 w-4 text-status-success-text" }) : /* @__PURE__ */ g(r, { className: "h-4 w-4 text-accent-blue" }), W = (e) => /* @__PURE__ */ g(y, {
|
|
20
20
|
variant: {
|
|
21
21
|
completed: "default",
|
|
22
22
|
pending: "secondary",
|
|
@@ -24,25 +24,28 @@ function T() {
|
|
|
24
24
|
cancelled: "outline"
|
|
25
25
|
}[e] ?? "secondary",
|
|
26
26
|
children: e
|
|
27
|
-
}),
|
|
27
|
+
}), G = (e) => g(e === "card" ? s : e === "bank" ? a : h, { className: "h-5 w-5" });
|
|
28
28
|
return /* @__PURE__ */ _("div", {
|
|
29
|
-
className: "space-y-6 p-6",
|
|
29
|
+
className: "space-y-6 p-6 bg-bg-canvas min-h-screen",
|
|
30
30
|
children: [
|
|
31
31
|
/* @__PURE__ */ _("div", {
|
|
32
|
-
className: "
|
|
33
|
-
children: [/* @__PURE__ */
|
|
34
|
-
className: "
|
|
35
|
-
children: "
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
className: "relative overflow-hidden rounded-card -mx-2 px-2 pt-1",
|
|
33
|
+
children: [/* @__PURE__ */ g(v, { intensity: "subtle" }), /* @__PURE__ */ _("div", {
|
|
34
|
+
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
35
|
+
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h1", {
|
|
36
|
+
className: "text-2xl font-semibold tracking-tight",
|
|
37
|
+
children: /* @__PURE__ */ g(E, { children: "Payments" })
|
|
38
|
+
}), /* @__PURE__ */ g("p", {
|
|
39
|
+
className: "text-sm text-text-secondary",
|
|
40
|
+
children: "Track transactions, manage payment methods, and view invoices."
|
|
41
|
+
})] }), /* @__PURE__ */ _(b, {
|
|
42
|
+
size: "sm",
|
|
43
|
+
children: [/* @__PURE__ */ g(d, { className: "mr-2 h-4 w-4" }), " Make Payment"]
|
|
44
|
+
})]
|
|
42
45
|
})]
|
|
43
46
|
}),
|
|
44
47
|
/* @__PURE__ */ g("div", {
|
|
45
|
-
className: "flex gap-1 border-b",
|
|
48
|
+
className: "flex flex-wrap gap-1 border-b border-border-seam",
|
|
46
49
|
children: [
|
|
47
50
|
{
|
|
48
51
|
key: "overview",
|
|
@@ -61,313 +64,328 @@ function T() {
|
|
|
61
64
|
label: "Invoices"
|
|
62
65
|
}
|
|
63
66
|
].map(({ key: e, label: t }) => /* @__PURE__ */ g("button", {
|
|
64
|
-
onClick: () =>
|
|
65
|
-
|
|
67
|
+
onClick: () => N(e),
|
|
68
|
+
"aria-pressed": M === e,
|
|
69
|
+
className: `border-b-2 px-4 py-2 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus ${M === e ? "border-action-primary-bg text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"}`,
|
|
66
70
|
children: t
|
|
67
71
|
}, e))
|
|
68
72
|
}),
|
|
69
|
-
|
|
73
|
+
M === "overview" && /* @__PURE__ */ _("div", {
|
|
70
74
|
className: "space-y-6",
|
|
71
75
|
children: [/* @__PURE__ */ _("div", {
|
|
72
76
|
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
73
77
|
children: [
|
|
74
|
-
/* @__PURE__ */ g(
|
|
75
|
-
|
|
78
|
+
/* @__PURE__ */ g(T, {
|
|
79
|
+
treatment: "glass",
|
|
80
|
+
glow: !0,
|
|
81
|
+
className: "border-border-seam",
|
|
76
82
|
children: /* @__PURE__ */ _("div", {
|
|
77
83
|
className: "flex items-center gap-3",
|
|
78
84
|
children: [/* @__PURE__ */ g("div", {
|
|
79
|
-
className: "rounded-lg bg-
|
|
80
|
-
children: /* @__PURE__ */ g(i, { className: "h-5 w-5 text-
|
|
85
|
+
className: "rounded-lg bg-status-error-bg-subtle p-2",
|
|
86
|
+
children: /* @__PURE__ */ g(i, { className: "h-5 w-5 text-status-error-text" })
|
|
81
87
|
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("p", {
|
|
82
|
-
className: "text-2xl font-bold",
|
|
83
|
-
children: ["$",
|
|
88
|
+
className: "text-2xl font-bold tabular-nums",
|
|
89
|
+
children: ["$", R.toLocaleString()]
|
|
84
90
|
}), /* @__PURE__ */ g("p", {
|
|
85
|
-
className: "text-xs text-
|
|
91
|
+
className: "text-xs text-text-secondary",
|
|
86
92
|
children: "Total Spent"
|
|
87
93
|
})] })]
|
|
88
94
|
})
|
|
89
|
-
})
|
|
90
|
-
/* @__PURE__ */ g(
|
|
91
|
-
|
|
95
|
+
}),
|
|
96
|
+
/* @__PURE__ */ g(T, {
|
|
97
|
+
treatment: "metric",
|
|
98
|
+
className: "border-border-seam",
|
|
92
99
|
children: /* @__PURE__ */ _("div", {
|
|
93
100
|
className: "flex items-center gap-3",
|
|
94
101
|
children: [/* @__PURE__ */ g("div", {
|
|
95
|
-
className: "rounded-lg bg-
|
|
96
|
-
children: /* @__PURE__ */ g(o, { className: "h-5 w-5 text-
|
|
102
|
+
className: "rounded-lg bg-status-warning-bg-subtle p-2",
|
|
103
|
+
children: /* @__PURE__ */ g(o, { className: "h-5 w-5 text-status-warning-text" })
|
|
97
104
|
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("p", {
|
|
98
|
-
className: "text-2xl font-bold",
|
|
99
|
-
children: ["$",
|
|
105
|
+
className: "text-2xl font-bold tabular-nums",
|
|
106
|
+
children: ["$", z.toLocaleString()]
|
|
100
107
|
}), /* @__PURE__ */ g("p", {
|
|
101
|
-
className: "text-xs text-
|
|
108
|
+
className: "text-xs text-text-secondary",
|
|
102
109
|
children: "Pending"
|
|
103
110
|
})] })]
|
|
104
111
|
})
|
|
105
|
-
})
|
|
106
|
-
/* @__PURE__ */ g(
|
|
107
|
-
|
|
112
|
+
}),
|
|
113
|
+
/* @__PURE__ */ g(T, {
|
|
114
|
+
treatment: "metric",
|
|
115
|
+
className: "border-border-seam",
|
|
108
116
|
children: /* @__PURE__ */ _("div", {
|
|
109
117
|
className: "flex items-center gap-3",
|
|
110
118
|
children: [/* @__PURE__ */ g("div", {
|
|
111
|
-
className: "rounded-lg bg-
|
|
112
|
-
children: /* @__PURE__ */ g(c, { className: "h-5 w-5 text-blue
|
|
119
|
+
className: "rounded-lg bg-status-info-bg-subtle p-2",
|
|
120
|
+
children: /* @__PURE__ */ g(c, { className: "h-5 w-5 text-accent-blue" })
|
|
113
121
|
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("p", {
|
|
114
|
-
className: "text-2xl font-bold",
|
|
115
|
-
children: ["$",
|
|
122
|
+
className: "text-2xl font-bold tabular-nums",
|
|
123
|
+
children: ["$", B.toLocaleString()]
|
|
116
124
|
}), /* @__PURE__ */ g("p", {
|
|
117
|
-
className: "text-xs text-
|
|
125
|
+
className: "text-xs text-text-secondary",
|
|
118
126
|
children: "Total Fees"
|
|
119
127
|
})] })]
|
|
120
128
|
})
|
|
121
|
-
})
|
|
122
|
-
/* @__PURE__ */ g(
|
|
123
|
-
|
|
129
|
+
}),
|
|
130
|
+
/* @__PURE__ */ g(T, {
|
|
131
|
+
treatment: "metric",
|
|
132
|
+
className: "border-border-seam",
|
|
124
133
|
children: /* @__PURE__ */ _("div", {
|
|
125
134
|
className: "flex items-center gap-3",
|
|
126
135
|
children: [/* @__PURE__ */ g("div", {
|
|
127
|
-
className: "rounded-lg bg-
|
|
128
|
-
children: /* @__PURE__ */ g(f, { className: "h-5 w-5 text-
|
|
136
|
+
className: "rounded-lg bg-status-success-bg-subtle p-2",
|
|
137
|
+
children: /* @__PURE__ */ g(f, { className: "h-5 w-5 text-status-success-text" })
|
|
129
138
|
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("p", {
|
|
130
|
-
className: "text-2xl font-bold",
|
|
131
|
-
children: ["$",
|
|
139
|
+
className: "text-2xl font-bold tabular-nums",
|
|
140
|
+
children: ["$", V.toLocaleString()]
|
|
132
141
|
}), /* @__PURE__ */ g("p", {
|
|
133
|
-
className: "text-xs text-
|
|
142
|
+
className: "text-xs text-text-secondary",
|
|
134
143
|
children: "Refunded"
|
|
135
144
|
})] })]
|
|
136
145
|
})
|
|
137
|
-
})
|
|
146
|
+
})
|
|
138
147
|
]
|
|
139
|
-
}), /* @__PURE__ */ _(
|
|
140
|
-
className: "
|
|
141
|
-
children: [/* @__PURE__ */ g(C, {
|
|
142
|
-
className: "
|
|
143
|
-
children:
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
className: "space-y-3",
|
|
152
|
-
children: T.slice(0, 5).map((e) => /* @__PURE__ */ _("div", {
|
|
153
|
-
className: "flex items-center justify-between rounded-lg border p-3",
|
|
154
|
-
children: [/* @__PURE__ */ _("div", {
|
|
155
|
-
className: "flex items-center gap-3",
|
|
156
|
-
children: [z(e.type), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
157
|
-
className: "text-sm font-medium",
|
|
158
|
-
children: e.description
|
|
159
|
-
}), /* @__PURE__ */ _("p", {
|
|
160
|
-
className: "text-xs text-muted-foreground",
|
|
161
|
-
children: [
|
|
162
|
-
e.counterparty,
|
|
163
|
-
" - ",
|
|
164
|
-
e.createdAt
|
|
165
|
-
]
|
|
166
|
-
})] })]
|
|
167
|
-
}), /* @__PURE__ */ _("div", {
|
|
168
|
-
className: "text-right",
|
|
169
|
-
children: [/* @__PURE__ */ _("p", {
|
|
170
|
-
className: `text-sm font-bold ${e.type === "refund" ? "text-green-600" : ""}`,
|
|
171
|
-
children: [
|
|
172
|
-
e.type === "refund" ? "+" : "-",
|
|
173
|
-
"$",
|
|
174
|
-
e.amount.toLocaleString()
|
|
175
|
-
]
|
|
176
|
-
}), B(e.status)]
|
|
148
|
+
}), /* @__PURE__ */ _(x, {
|
|
149
|
+
className: "border-border-seam",
|
|
150
|
+
children: [/* @__PURE__ */ g(C, { children: /* @__PURE__ */ _("div", {
|
|
151
|
+
className: "flex items-center justify-between",
|
|
152
|
+
children: [/* @__PURE__ */ g(w, {
|
|
153
|
+
className: "text-base",
|
|
154
|
+
children: "Recent Transactions"
|
|
155
|
+
}), /* @__PURE__ */ g(b, {
|
|
156
|
+
variant: "outline",
|
|
157
|
+
size: "sm",
|
|
158
|
+
onClick: () => N("transactions"),
|
|
159
|
+
children: "View All"
|
|
177
160
|
})]
|
|
178
|
-
},
|
|
179
|
-
|
|
161
|
+
}) }), /* @__PURE__ */ g(S, { children: /* @__PURE__ */ g("div", {
|
|
162
|
+
className: "space-y-3",
|
|
163
|
+
children: k.slice(0, 5).map((e) => /* @__PURE__ */ _("div", {
|
|
164
|
+
className: "flex items-center justify-between rounded-lg border border-border-seam p-3 transition-shadow hover:shadow-pop",
|
|
165
|
+
children: [/* @__PURE__ */ _("div", {
|
|
166
|
+
className: "flex items-center gap-3",
|
|
167
|
+
children: [U(e.type), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
168
|
+
className: "text-sm font-medium",
|
|
169
|
+
children: e.description
|
|
170
|
+
}), /* @__PURE__ */ _("p", {
|
|
171
|
+
className: "text-xs text-text-secondary",
|
|
172
|
+
children: [
|
|
173
|
+
e.counterparty,
|
|
174
|
+
" - ",
|
|
175
|
+
e.createdAt
|
|
176
|
+
]
|
|
177
|
+
})] })]
|
|
178
|
+
}), /* @__PURE__ */ _("div", {
|
|
179
|
+
className: "text-right",
|
|
180
|
+
children: [/* @__PURE__ */ _("p", {
|
|
181
|
+
className: `text-sm font-bold tabular-nums ${e.type === "refund" ? "text-status-success-text" : ""}`,
|
|
182
|
+
children: [
|
|
183
|
+
e.type === "refund" ? "+" : "-",
|
|
184
|
+
"$",
|
|
185
|
+
e.amount.toLocaleString()
|
|
186
|
+
]
|
|
187
|
+
}), W(e.status)]
|
|
188
|
+
})]
|
|
189
|
+
}, e.id))
|
|
190
|
+
}) })]
|
|
191
|
+
})]
|
|
180
192
|
}),
|
|
181
|
-
|
|
193
|
+
M === "transactions" && /* @__PURE__ */ _("div", {
|
|
182
194
|
className: "space-y-4",
|
|
183
195
|
children: [/* @__PURE__ */ _("div", {
|
|
184
196
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center",
|
|
185
197
|
children: [/* @__PURE__ */ _("div", {
|
|
186
198
|
className: "relative flex-1",
|
|
187
|
-
children: [/* @__PURE__ */ g(p, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-
|
|
199
|
+
children: [/* @__PURE__ */ g(p, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ g(O, {
|
|
188
200
|
placeholder: "Search transactions...",
|
|
189
|
-
value:
|
|
190
|
-
onChange: (e) =>
|
|
201
|
+
value: P,
|
|
202
|
+
onChange: (e) => F(e.target.value),
|
|
191
203
|
className: "pl-10"
|
|
192
204
|
})]
|
|
193
205
|
}), /* @__PURE__ */ g("div", {
|
|
194
|
-
className: "flex gap-2",
|
|
206
|
+
className: "flex flex-wrap gap-2",
|
|
195
207
|
children: [
|
|
196
208
|
"all",
|
|
197
209
|
"completed",
|
|
198
210
|
"pending",
|
|
199
211
|
"failed"
|
|
200
|
-
].map((e) => /* @__PURE__ */ g(
|
|
201
|
-
variant:
|
|
212
|
+
].map((e) => /* @__PURE__ */ g(b, {
|
|
213
|
+
variant: I === e ? "default" : "outline",
|
|
202
214
|
size: "sm",
|
|
203
|
-
onClick: () =>
|
|
215
|
+
onClick: () => L(e),
|
|
204
216
|
children: e === "all" ? "All" : e.charAt(0).toUpperCase() + e.slice(1)
|
|
205
217
|
}, e))
|
|
206
218
|
})]
|
|
207
|
-
}), /* @__PURE__ */ g(
|
|
208
|
-
className: "
|
|
209
|
-
children: /* @__PURE__ */ g(
|
|
210
|
-
className: "
|
|
211
|
-
children: /* @__PURE__ */
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
children: e.
|
|
219
|
+
}), /* @__PURE__ */ g(x, {
|
|
220
|
+
className: "border-border-seam",
|
|
221
|
+
children: /* @__PURE__ */ g(S, {
|
|
222
|
+
className: "pt-4",
|
|
223
|
+
children: H.length === 0 ? /* @__PURE__ */ g(D, {
|
|
224
|
+
illustration: "empty-search",
|
|
225
|
+
title: "No transactions found",
|
|
226
|
+
description: "No transactions match your current filters."
|
|
227
|
+
}) : /* @__PURE__ */ g("div", {
|
|
228
|
+
className: "overflow-x-auto",
|
|
229
|
+
children: /* @__PURE__ */ _("table", {
|
|
230
|
+
className: "w-full text-sm",
|
|
231
|
+
children: [/* @__PURE__ */ g("thead", { children: /* @__PURE__ */ _("tr", {
|
|
232
|
+
className: "border-b border-border-seam text-left text-text-secondary",
|
|
233
|
+
children: [
|
|
234
|
+
/* @__PURE__ */ g("th", {
|
|
235
|
+
className: "p-3 font-medium",
|
|
236
|
+
children: "Type"
|
|
237
|
+
}),
|
|
238
|
+
/* @__PURE__ */ g("th", {
|
|
239
|
+
className: "p-3 font-medium",
|
|
240
|
+
children: "Description"
|
|
241
|
+
}),
|
|
242
|
+
/* @__PURE__ */ g("th", {
|
|
243
|
+
className: "p-3 font-medium",
|
|
244
|
+
children: "Counterparty"
|
|
245
|
+
}),
|
|
246
|
+
/* @__PURE__ */ g("th", {
|
|
247
|
+
className: "p-3 font-medium",
|
|
248
|
+
children: "Method"
|
|
249
|
+
}),
|
|
250
|
+
/* @__PURE__ */ g("th", {
|
|
251
|
+
className: "p-3 text-right font-medium",
|
|
252
|
+
children: "Amount"
|
|
253
|
+
}),
|
|
254
|
+
/* @__PURE__ */ g("th", {
|
|
255
|
+
className: "p-3 text-right font-medium",
|
|
256
|
+
children: "Fees"
|
|
257
|
+
}),
|
|
258
|
+
/* @__PURE__ */ g("th", {
|
|
259
|
+
className: "p-3 text-right font-medium",
|
|
260
|
+
children: "Net"
|
|
261
|
+
}),
|
|
262
|
+
/* @__PURE__ */ g("th", {
|
|
263
|
+
className: "p-3 font-medium",
|
|
264
|
+
children: "Status"
|
|
265
|
+
}),
|
|
266
|
+
/* @__PURE__ */ g("th", {
|
|
267
|
+
className: "p-3 font-medium",
|
|
268
|
+
children: "Date"
|
|
269
|
+
})
|
|
270
|
+
]
|
|
271
|
+
}) }), /* @__PURE__ */ g("tbody", { children: H.map((e) => /* @__PURE__ */ _("tr", {
|
|
272
|
+
className: "border-b border-border-seam transition-colors hover:bg-bg-sunken/50",
|
|
273
|
+
children: [
|
|
274
|
+
/* @__PURE__ */ g("td", {
|
|
275
|
+
className: "p-3",
|
|
276
|
+
children: U(e.type)
|
|
277
|
+
}),
|
|
278
|
+
/* @__PURE__ */ g("td", {
|
|
279
|
+
className: "p-3 font-medium",
|
|
280
|
+
children: e.description
|
|
281
|
+
}),
|
|
282
|
+
/* @__PURE__ */ g("td", {
|
|
283
|
+
className: "p-3",
|
|
284
|
+
children: e.counterparty
|
|
285
|
+
}),
|
|
286
|
+
/* @__PURE__ */ g("td", {
|
|
287
|
+
className: "p-3",
|
|
288
|
+
children: /* @__PURE__ */ g(y, {
|
|
289
|
+
variant: "outline",
|
|
290
|
+
children: e.method.replace("_", " ")
|
|
291
|
+
})
|
|
292
|
+
}),
|
|
293
|
+
/* @__PURE__ */ _("td", {
|
|
294
|
+
className: `p-3 text-right font-medium tabular-nums ${e.type === "refund" ? "text-status-success-text" : ""}`,
|
|
295
|
+
children: [
|
|
296
|
+
e.type === "refund" ? "+" : "-",
|
|
297
|
+
"$",
|
|
298
|
+
e.amount.toLocaleString()
|
|
299
|
+
]
|
|
300
|
+
}),
|
|
301
|
+
/* @__PURE__ */ _("td", {
|
|
302
|
+
className: "p-3 text-right text-text-secondary tabular-nums",
|
|
303
|
+
children: ["$", e.fees]
|
|
304
|
+
}),
|
|
305
|
+
/* @__PURE__ */ _("td", {
|
|
306
|
+
className: "p-3 text-right tabular-nums",
|
|
307
|
+
children: ["$", e.netAmount.toLocaleString()]
|
|
308
|
+
}),
|
|
309
|
+
/* @__PURE__ */ g("td", {
|
|
310
|
+
className: "p-3",
|
|
311
|
+
children: W(e.status)
|
|
312
|
+
}),
|
|
313
|
+
/* @__PURE__ */ g("td", {
|
|
314
|
+
className: "p-3 text-text-secondary",
|
|
315
|
+
children: e.createdAt
|
|
273
316
|
})
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
children: [
|
|
278
|
-
e.type === "refund" ? "+" : "-",
|
|
279
|
-
"$",
|
|
280
|
-
e.amount.toLocaleString()
|
|
281
|
-
]
|
|
282
|
-
}),
|
|
283
|
-
/* @__PURE__ */ _("td", {
|
|
284
|
-
className: "p-3 text-right text-muted-foreground",
|
|
285
|
-
children: ["$", e.fees]
|
|
286
|
-
}),
|
|
287
|
-
/* @__PURE__ */ _("td", {
|
|
288
|
-
className: "p-3 text-right",
|
|
289
|
-
children: ["$", e.netAmount.toLocaleString()]
|
|
290
|
-
}),
|
|
291
|
-
/* @__PURE__ */ g("td", {
|
|
292
|
-
className: "p-3",
|
|
293
|
-
children: B(e.status)
|
|
294
|
-
}),
|
|
295
|
-
/* @__PURE__ */ g("td", {
|
|
296
|
-
className: "p-3 text-muted-foreground",
|
|
297
|
-
children: e.createdAt
|
|
298
|
-
})
|
|
299
|
-
]
|
|
300
|
-
}, e.id)) })]
|
|
317
|
+
]
|
|
318
|
+
}, e.id)) })]
|
|
319
|
+
})
|
|
301
320
|
})
|
|
302
321
|
})
|
|
303
|
-
})
|
|
322
|
+
})]
|
|
304
323
|
}),
|
|
305
|
-
|
|
324
|
+
M === "methods" && /* @__PURE__ */ g("div", {
|
|
306
325
|
className: "space-y-4",
|
|
307
326
|
children: /* @__PURE__ */ _("div", {
|
|
308
327
|
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
309
|
-
children: [
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
children: /* @__PURE__ */ _(x, {
|
|
328
|
+
children: [A.map((e) => /* @__PURE__ */ _(T, {
|
|
329
|
+
treatment: "glass",
|
|
330
|
+
glow: e.isDefault,
|
|
331
|
+
className: `border-border-seam ${e.isDefault, ""}`,
|
|
332
|
+
children: [
|
|
333
|
+
/* @__PURE__ */ _("div", {
|
|
334
|
+
className: "flex items-start justify-between",
|
|
335
|
+
children: [/* @__PURE__ */ _("div", {
|
|
336
|
+
className: "flex items-center gap-3",
|
|
337
|
+
children: [/* @__PURE__ */ g("div", {
|
|
338
|
+
className: "rounded-lg border border-border-seam p-2 text-text-primary",
|
|
339
|
+
children: G(e.type)
|
|
340
|
+
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
341
|
+
className: "font-medium",
|
|
342
|
+
children: e.name
|
|
343
|
+
}), /* @__PURE__ */ g("p", {
|
|
344
|
+
className: "text-sm text-text-secondary",
|
|
345
|
+
children: e.details
|
|
346
|
+
})] })]
|
|
347
|
+
}), e.isDefault && /* @__PURE__ */ g(y, { children: "Default" })]
|
|
348
|
+
}),
|
|
349
|
+
/* @__PURE__ */ _("div", {
|
|
350
|
+
className: "mt-4 flex items-center gap-4 text-sm",
|
|
351
|
+
children: [e.isVerified ? /* @__PURE__ */ _("span", {
|
|
352
|
+
className: "flex items-center gap-1 text-status-success-text",
|
|
353
|
+
children: [/* @__PURE__ */ g(m, { className: "h-4 w-4" }), " Verified"]
|
|
354
|
+
}) : /* @__PURE__ */ _("span", {
|
|
355
|
+
className: "flex items-center gap-1 text-status-warning-text",
|
|
356
|
+
children: [/* @__PURE__ */ g(o, { className: "h-4 w-4" }), " Unverified"]
|
|
357
|
+
}), e.lastUsed && /* @__PURE__ */ _("span", {
|
|
358
|
+
className: "text-text-secondary",
|
|
359
|
+
children: ["Last used: ", e.lastUsed]
|
|
360
|
+
})]
|
|
361
|
+
}),
|
|
362
|
+
/* @__PURE__ */ _("div", {
|
|
363
|
+
className: "mt-4 flex gap-2",
|
|
364
|
+
children: [!e.isDefault && /* @__PURE__ */ g(b, {
|
|
365
|
+
variant: "outline",
|
|
366
|
+
size: "sm",
|
|
367
|
+
className: "flex-1",
|
|
368
|
+
children: "Set Default"
|
|
369
|
+
}), /* @__PURE__ */ g(b, {
|
|
370
|
+
variant: "outline",
|
|
371
|
+
size: "sm",
|
|
372
|
+
className: "flex-1",
|
|
373
|
+
children: "Remove"
|
|
374
|
+
})]
|
|
375
|
+
})
|
|
376
|
+
]
|
|
377
|
+
}, e.id)), /* @__PURE__ */ g(x, {
|
|
378
|
+
className: "flex items-center justify-center border-dashed border-border-seam transition-shadow hover:shadow-pop",
|
|
379
|
+
children: /* @__PURE__ */ _(S, {
|
|
362
380
|
className: "py-8 text-center",
|
|
363
381
|
children: [
|
|
364
|
-
/* @__PURE__ */ g(d, { className: "mx-auto h-8 w-8 text-
|
|
382
|
+
/* @__PURE__ */ g(d, { className: "mx-auto h-8 w-8 text-text-secondary" }),
|
|
365
383
|
/* @__PURE__ */ g("p", {
|
|
366
384
|
className: "mt-2 text-sm font-medium",
|
|
367
385
|
children: "Add Payment Method"
|
|
368
386
|
}),
|
|
369
387
|
/* @__PURE__ */ g("p", {
|
|
370
|
-
className: "text-xs text-
|
|
388
|
+
className: "text-xs text-text-secondary",
|
|
371
389
|
children: "Add a new card, bank, or PayPal"
|
|
372
390
|
})
|
|
373
391
|
]
|
|
@@ -375,105 +393,114 @@ function T() {
|
|
|
375
393
|
})]
|
|
376
394
|
})
|
|
377
395
|
}),
|
|
378
|
-
|
|
396
|
+
M === "invoices" && /* @__PURE__ */ g("div", {
|
|
379
397
|
className: "space-y-4",
|
|
380
|
-
children: /* @__PURE__ */ g(
|
|
381
|
-
className: "
|
|
382
|
-
children: /* @__PURE__ */ g(
|
|
383
|
-
className: "
|
|
384
|
-
children: /* @__PURE__ */
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
className: "p-3 font-medium",
|
|
423
|
-
children: e.number
|
|
424
|
-
}),
|
|
425
|
-
/* @__PURE__ */ g("td", {
|
|
426
|
-
className: "p-3",
|
|
427
|
-
children: e.description
|
|
428
|
-
}),
|
|
429
|
-
/* @__PURE__ */ g("td", {
|
|
430
|
-
className: "p-3",
|
|
431
|
-
children: e.clientName
|
|
432
|
-
}),
|
|
433
|
-
/* @__PURE__ */ _("td", {
|
|
434
|
-
className: "p-3 text-right font-medium",
|
|
435
|
-
children: ["$", e.amount.toLocaleString()]
|
|
436
|
-
}),
|
|
437
|
-
/* @__PURE__ */ g("td", {
|
|
438
|
-
className: "p-3",
|
|
439
|
-
children: /* @__PURE__ */ g(v, {
|
|
440
|
-
variant: {
|
|
441
|
-
paid: "default",
|
|
442
|
-
pending: "secondary",
|
|
443
|
-
overdue: "destructive"
|
|
444
|
-
}[e.status] ?? "secondary",
|
|
445
|
-
children: e.status
|
|
398
|
+
children: /* @__PURE__ */ g(x, {
|
|
399
|
+
className: "border-border-seam",
|
|
400
|
+
children: /* @__PURE__ */ g(S, {
|
|
401
|
+
className: "pt-4",
|
|
402
|
+
children: j.length === 0 ? /* @__PURE__ */ g(D, {
|
|
403
|
+
illustration: "empty-files",
|
|
404
|
+
title: "No invoices yet",
|
|
405
|
+
description: "Invoices you create or receive will appear here."
|
|
406
|
+
}) : /* @__PURE__ */ g("div", {
|
|
407
|
+
className: "overflow-x-auto",
|
|
408
|
+
children: /* @__PURE__ */ _("table", {
|
|
409
|
+
className: "w-full text-sm",
|
|
410
|
+
children: [/* @__PURE__ */ g("thead", { children: /* @__PURE__ */ _("tr", {
|
|
411
|
+
className: "border-b border-border-seam text-left text-text-secondary",
|
|
412
|
+
children: [
|
|
413
|
+
/* @__PURE__ */ g("th", {
|
|
414
|
+
className: "p-3 font-medium",
|
|
415
|
+
children: "Invoice #"
|
|
416
|
+
}),
|
|
417
|
+
/* @__PURE__ */ g("th", {
|
|
418
|
+
className: "p-3 font-medium",
|
|
419
|
+
children: "Description"
|
|
420
|
+
}),
|
|
421
|
+
/* @__PURE__ */ g("th", {
|
|
422
|
+
className: "p-3 font-medium",
|
|
423
|
+
children: "Client"
|
|
424
|
+
}),
|
|
425
|
+
/* @__PURE__ */ g("th", {
|
|
426
|
+
className: "p-3 text-right font-medium",
|
|
427
|
+
children: "Amount"
|
|
428
|
+
}),
|
|
429
|
+
/* @__PURE__ */ g("th", {
|
|
430
|
+
className: "p-3 font-medium",
|
|
431
|
+
children: "Status"
|
|
432
|
+
}),
|
|
433
|
+
/* @__PURE__ */ g("th", {
|
|
434
|
+
className: "p-3 font-medium",
|
|
435
|
+
children: "Due Date"
|
|
436
|
+
}),
|
|
437
|
+
/* @__PURE__ */ g("th", {
|
|
438
|
+
className: "p-3 text-right font-medium",
|
|
439
|
+
children: "Actions"
|
|
446
440
|
})
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
441
|
+
]
|
|
442
|
+
}) }), /* @__PURE__ */ g("tbody", { children: j.map((e) => /* @__PURE__ */ _("tr", {
|
|
443
|
+
className: "border-b border-border-seam transition-colors hover:bg-bg-sunken/50",
|
|
444
|
+
children: [
|
|
445
|
+
/* @__PURE__ */ g("td", {
|
|
446
|
+
className: "p-3 font-medium",
|
|
447
|
+
children: e.number
|
|
448
|
+
}),
|
|
449
|
+
/* @__PURE__ */ g("td", {
|
|
450
|
+
className: "p-3",
|
|
451
|
+
children: e.description
|
|
452
|
+
}),
|
|
453
|
+
/* @__PURE__ */ g("td", {
|
|
454
|
+
className: "p-3",
|
|
455
|
+
children: e.clientName
|
|
456
|
+
}),
|
|
457
|
+
/* @__PURE__ */ _("td", {
|
|
458
|
+
className: "p-3 text-right font-medium tabular-nums",
|
|
459
|
+
children: ["$", e.amount.toLocaleString()]
|
|
460
|
+
}),
|
|
461
|
+
/* @__PURE__ */ g("td", {
|
|
462
|
+
className: "p-3",
|
|
463
|
+
children: /* @__PURE__ */ g(y, {
|
|
464
|
+
variant: {
|
|
465
|
+
paid: "default",
|
|
466
|
+
pending: "secondary",
|
|
467
|
+
overdue: "destructive"
|
|
468
|
+
}[e.status] ?? "secondary",
|
|
469
|
+
children: e.status
|
|
470
|
+
})
|
|
471
|
+
}),
|
|
472
|
+
/* @__PURE__ */ g("td", {
|
|
473
|
+
className: "p-3 text-text-secondary",
|
|
474
|
+
children: e.dueDate
|
|
475
|
+
}),
|
|
476
|
+
/* @__PURE__ */ g("td", {
|
|
477
|
+
className: "p-3 text-right",
|
|
478
|
+
children: /* @__PURE__ */ _("div", {
|
|
479
|
+
className: "flex justify-end gap-1",
|
|
480
|
+
children: [/* @__PURE__ */ g(b, {
|
|
481
|
+
variant: "outline",
|
|
482
|
+
size: "sm",
|
|
483
|
+
"aria-label": "View invoice",
|
|
484
|
+
children: /* @__PURE__ */ g(u, { className: "h-3 w-3" })
|
|
485
|
+
}), /* @__PURE__ */ g(b, {
|
|
486
|
+
variant: "outline",
|
|
487
|
+
size: "sm",
|
|
488
|
+
"aria-label": "Download invoice",
|
|
489
|
+
children: /* @__PURE__ */ g(l, { className: "h-3 w-3" })
|
|
490
|
+
})]
|
|
491
|
+
})
|
|
465
492
|
})
|
|
466
|
-
|
|
467
|
-
]
|
|
468
|
-
}
|
|
493
|
+
]
|
|
494
|
+
}, e.id)) })]
|
|
495
|
+
})
|
|
469
496
|
})
|
|
470
497
|
})
|
|
471
|
-
})
|
|
498
|
+
})
|
|
472
499
|
})
|
|
473
500
|
]
|
|
474
501
|
});
|
|
475
502
|
}
|
|
476
503
|
//#endregion
|
|
477
|
-
export {
|
|
504
|
+
export { k as PaymentsPage };
|
|
478
505
|
|
|
479
506
|
//# sourceMappingURL=PaymentsPage.js.map
|