@burdenoff/microfe-proserviceworld 2026.624.1 → 2026.626.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 +396 -329
- package/dist/proserviceworld/pages/AdminReportsPage.js.map +1 -1
- package/dist/proserviceworld/pages/AdminUsersPage.js +261 -237
- package/dist/proserviceworld/pages/AdminUsersPage.js.map +1 -1
- package/dist/proserviceworld/pages/AnalyticsPage.js +373 -315
- package/dist/proserviceworld/pages/AnalyticsPage.js.map +1 -1
- package/dist/proserviceworld/pages/BookingsPage.js +221 -200
- package/dist/proserviceworld/pages/BookingsPage.js.map +1 -1
- package/dist/proserviceworld/pages/DashboardPage.js +474 -405
- package/dist/proserviceworld/pages/DashboardPage.js.map +1 -1
- package/dist/proserviceworld/pages/DocumentsPage.js +386 -317
- package/dist/proserviceworld/pages/DocumentsPage.js.map +1 -1
- package/dist/proserviceworld/pages/MessagesPage.js +201 -192
- package/dist/proserviceworld/pages/MessagesPage.js.map +1 -1
- package/dist/proserviceworld/pages/PaymentsPage.js +398 -340
- package/dist/proserviceworld/pages/PaymentsPage.js.map +1 -1
- package/dist/proserviceworld/pages/ProjectsPage.js +543 -463
- package/dist/proserviceworld/pages/ProjectsPage.js.map +1 -1
- package/dist/proserviceworld/pages/ProviderDetailPage.js +420 -346
- package/dist/proserviceworld/pages/ProviderDetailPage.js.map +1 -1
- package/dist/proserviceworld/pages/ProvidersPage.js +249 -244
- package/dist/proserviceworld/pages/ProvidersPage.js.map +1 -1
- package/dist/proserviceworld/pages/ReviewsPage.js +93 -76
- package/dist/proserviceworld/pages/ReviewsPage.js.map +1 -1
- package/dist/proserviceworld/pages/ServiceDetailsPage.js +377 -309
- package/dist/proserviceworld/pages/ServiceDetailsPage.js.map +1 -1
- package/dist/proserviceworld/pages/ServicesPage.js +116 -109
- package/dist/proserviceworld/pages/ServicesPage.js.map +1 -1
- package/dist/proserviceworld/pages/VerificationPage.js +264 -251
- 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, NextSteps as k, PagePurpose as A } 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 j() {
|
|
8
|
+
let { transactions: j, paymentMethods: M, invoices: N } = e(), [P, F] = n("overview"), [I, L] = n(""), [R, z] = n("all"), B = j.filter((e) => e.type === "outgoing" && e.status === "completed").reduce((e, t) => e + t.amount, 0), V = j.filter((e) => e.status === "pending").reduce((e, t) => e + t.amount, 0), H = j.filter((e) => e.status === "completed").reduce((e, t) => e + t.fees, 0), U = j.filter((e) => e.type === "refund" && e.status === "completed").reduce((e, t) => e + t.amount, 0), W = t(() => {
|
|
9
|
+
let e = [...j];
|
|
10
|
+
if (R !== "all" && (e = e.filter((e) => e.status === R)), I.trim()) {
|
|
11
|
+
let t = I.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
|
+
j,
|
|
17
|
+
R,
|
|
18
|
+
I
|
|
19
|
+
]), G = (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" }), K = (e) => /* @__PURE__ */ g(y, {
|
|
20
20
|
variant: {
|
|
21
21
|
completed: "default",
|
|
22
22
|
pending: "secondary",
|
|
@@ -24,25 +24,59 @@ function T() {
|
|
|
24
24
|
cancelled: "outline"
|
|
25
25
|
}[e] ?? "secondary",
|
|
26
26
|
children: e
|
|
27
|
-
}),
|
|
27
|
+
}), q = (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
|
}),
|
|
47
|
+
/* @__PURE__ */ g(A, {
|
|
48
|
+
icon: /* @__PURE__ */ g(c, { className: "h-4 w-4" }),
|
|
49
|
+
children: "Your money, end to end. See what you have spent, what is pending, and what has been refunded; search and reconcile individual transactions; manage the cards and bank accounts you pay with; and download invoices for your records."
|
|
50
|
+
}),
|
|
51
|
+
/* @__PURE__ */ g(k, {
|
|
52
|
+
storageKey: "proserviceworld-payments",
|
|
53
|
+
steps: [
|
|
54
|
+
{
|
|
55
|
+
id: "transactions",
|
|
56
|
+
label: "Review your transactions",
|
|
57
|
+
description: "Search and filter every payment, fee, and refund.",
|
|
58
|
+
icon: /* @__PURE__ */ g(p, { className: "h-4 w-4" }),
|
|
59
|
+
onClick: () => F("transactions")
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: "methods",
|
|
63
|
+
label: "Manage payment methods",
|
|
64
|
+
description: "Add or set a default card, bank, or wallet.",
|
|
65
|
+
icon: /* @__PURE__ */ g(s, { className: "h-4 w-4" }),
|
|
66
|
+
onClick: () => F("methods"),
|
|
67
|
+
done: M.length > 0
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: "invoices",
|
|
71
|
+
label: "Check your invoices",
|
|
72
|
+
description: "View and download invoices you create or receive.",
|
|
73
|
+
icon: /* @__PURE__ */ g(u, { className: "h-4 w-4" }),
|
|
74
|
+
onClick: () => F("invoices")
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}),
|
|
44
78
|
/* @__PURE__ */ g("div", {
|
|
45
|
-
className: "flex gap-1 border-b",
|
|
79
|
+
className: "flex flex-wrap gap-1 border-b border-border-seam",
|
|
46
80
|
children: [
|
|
47
81
|
{
|
|
48
82
|
key: "overview",
|
|
@@ -61,304 +95,319 @@ function T() {
|
|
|
61
95
|
label: "Invoices"
|
|
62
96
|
}
|
|
63
97
|
].map(({ key: e, label: t }) => /* @__PURE__ */ g("button", {
|
|
64
|
-
onClick: () =>
|
|
65
|
-
|
|
98
|
+
onClick: () => F(e),
|
|
99
|
+
"aria-pressed": P === e,
|
|
100
|
+
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 ${P === e ? "border-action-primary-bg text-text-primary" : "border-transparent text-text-secondary hover:text-text-primary"}`,
|
|
66
101
|
children: t
|
|
67
102
|
}, e))
|
|
68
103
|
}),
|
|
69
|
-
|
|
104
|
+
P === "overview" && /* @__PURE__ */ _("div", {
|
|
70
105
|
className: "space-y-6",
|
|
71
106
|
children: [/* @__PURE__ */ _("div", {
|
|
72
107
|
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-4",
|
|
73
108
|
children: [
|
|
74
|
-
/* @__PURE__ */ g(
|
|
75
|
-
|
|
109
|
+
/* @__PURE__ */ g(T, {
|
|
110
|
+
treatment: "glass",
|
|
111
|
+
glow: !0,
|
|
112
|
+
className: "border-border-seam",
|
|
76
113
|
children: /* @__PURE__ */ _("div", {
|
|
77
114
|
className: "flex items-center gap-3",
|
|
78
115
|
children: [/* @__PURE__ */ g("div", {
|
|
79
|
-
className: "rounded-lg bg-
|
|
80
|
-
children: /* @__PURE__ */ g(i, { className: "h-5 w-5 text-
|
|
116
|
+
className: "rounded-lg bg-status-error-bg-subtle p-2",
|
|
117
|
+
children: /* @__PURE__ */ g(i, { className: "h-5 w-5 text-status-error-text" })
|
|
81
118
|
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("p", {
|
|
82
|
-
className: "text-2xl font-bold",
|
|
83
|
-
children: ["$",
|
|
119
|
+
className: "text-2xl font-bold tabular-nums",
|
|
120
|
+
children: ["$", B.toLocaleString()]
|
|
84
121
|
}), /* @__PURE__ */ g("p", {
|
|
85
122
|
className: "text-xs text-text-secondary",
|
|
86
123
|
children: "Total Spent"
|
|
87
124
|
})] })]
|
|
88
125
|
})
|
|
89
|
-
})
|
|
90
|
-
/* @__PURE__ */ g(
|
|
91
|
-
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ g(T, {
|
|
128
|
+
treatment: "metric",
|
|
129
|
+
className: "border-border-seam",
|
|
92
130
|
children: /* @__PURE__ */ _("div", {
|
|
93
131
|
className: "flex items-center gap-3",
|
|
94
132
|
children: [/* @__PURE__ */ g("div", {
|
|
95
|
-
className: "rounded-lg bg-
|
|
96
|
-
children: /* @__PURE__ */ g(o, { className: "h-5 w-5 text-
|
|
133
|
+
className: "rounded-lg bg-status-warning-bg-subtle p-2",
|
|
134
|
+
children: /* @__PURE__ */ g(o, { className: "h-5 w-5 text-status-warning-text" })
|
|
97
135
|
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("p", {
|
|
98
|
-
className: "text-2xl font-bold",
|
|
99
|
-
children: ["$",
|
|
136
|
+
className: "text-2xl font-bold tabular-nums",
|
|
137
|
+
children: ["$", V.toLocaleString()]
|
|
100
138
|
}), /* @__PURE__ */ g("p", {
|
|
101
139
|
className: "text-xs text-text-secondary",
|
|
102
140
|
children: "Pending"
|
|
103
141
|
})] })]
|
|
104
142
|
})
|
|
105
|
-
})
|
|
106
|
-
/* @__PURE__ */ g(
|
|
107
|
-
|
|
143
|
+
}),
|
|
144
|
+
/* @__PURE__ */ g(T, {
|
|
145
|
+
treatment: "metric",
|
|
146
|
+
className: "border-border-seam",
|
|
108
147
|
children: /* @__PURE__ */ _("div", {
|
|
109
148
|
className: "flex items-center gap-3",
|
|
110
149
|
children: [/* @__PURE__ */ g("div", {
|
|
111
|
-
className: "rounded-lg bg-
|
|
112
|
-
children: /* @__PURE__ */ g(c, { className: "h-5 w-5 text-blue
|
|
150
|
+
className: "rounded-lg bg-status-info-bg-subtle p-2",
|
|
151
|
+
children: /* @__PURE__ */ g(c, { className: "h-5 w-5 text-accent-blue" })
|
|
113
152
|
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("p", {
|
|
114
|
-
className: "text-2xl font-bold",
|
|
115
|
-
children: ["$",
|
|
153
|
+
className: "text-2xl font-bold tabular-nums",
|
|
154
|
+
children: ["$", H.toLocaleString()]
|
|
116
155
|
}), /* @__PURE__ */ g("p", {
|
|
117
156
|
className: "text-xs text-text-secondary",
|
|
118
157
|
children: "Total Fees"
|
|
119
158
|
})] })]
|
|
120
159
|
})
|
|
121
|
-
})
|
|
122
|
-
/* @__PURE__ */ g(
|
|
123
|
-
|
|
160
|
+
}),
|
|
161
|
+
/* @__PURE__ */ g(T, {
|
|
162
|
+
treatment: "metric",
|
|
163
|
+
className: "border-border-seam",
|
|
124
164
|
children: /* @__PURE__ */ _("div", {
|
|
125
165
|
className: "flex items-center gap-3",
|
|
126
166
|
children: [/* @__PURE__ */ g("div", {
|
|
127
|
-
className: "rounded-lg bg-
|
|
128
|
-
children: /* @__PURE__ */ g(f, { className: "h-5 w-5 text-
|
|
167
|
+
className: "rounded-lg bg-status-success-bg-subtle p-2",
|
|
168
|
+
children: /* @__PURE__ */ g(f, { className: "h-5 w-5 text-status-success-text" })
|
|
129
169
|
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("p", {
|
|
130
|
-
className: "text-2xl font-bold",
|
|
131
|
-
children: ["$",
|
|
170
|
+
className: "text-2xl font-bold tabular-nums",
|
|
171
|
+
children: ["$", U.toLocaleString()]
|
|
132
172
|
}), /* @__PURE__ */ g("p", {
|
|
133
173
|
className: "text-xs text-text-secondary",
|
|
134
174
|
children: "Refunded"
|
|
135
175
|
})] })]
|
|
136
176
|
})
|
|
137
|
-
})
|
|
177
|
+
})
|
|
138
178
|
]
|
|
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-text-secondary",
|
|
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)]
|
|
179
|
+
}), /* @__PURE__ */ _(x, {
|
|
180
|
+
className: "border-border-seam",
|
|
181
|
+
children: [/* @__PURE__ */ g(C, { children: /* @__PURE__ */ _("div", {
|
|
182
|
+
className: "flex items-center justify-between",
|
|
183
|
+
children: [/* @__PURE__ */ g(w, {
|
|
184
|
+
className: "text-base",
|
|
185
|
+
children: "Recent Transactions"
|
|
186
|
+
}), /* @__PURE__ */ g(b, {
|
|
187
|
+
variant: "outline",
|
|
188
|
+
size: "sm",
|
|
189
|
+
onClick: () => F("transactions"),
|
|
190
|
+
children: "View All"
|
|
177
191
|
})]
|
|
178
|
-
},
|
|
179
|
-
|
|
192
|
+
}) }), /* @__PURE__ */ g(S, { children: /* @__PURE__ */ g("div", {
|
|
193
|
+
className: "space-y-3",
|
|
194
|
+
children: j.slice(0, 5).map((e) => /* @__PURE__ */ _("div", {
|
|
195
|
+
className: "flex items-center justify-between rounded-lg border border-border-seam p-3 transition-shadow hover:shadow-pop",
|
|
196
|
+
children: [/* @__PURE__ */ _("div", {
|
|
197
|
+
className: "flex items-center gap-3",
|
|
198
|
+
children: [G(e.type), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
199
|
+
className: "text-sm font-medium",
|
|
200
|
+
children: e.description
|
|
201
|
+
}), /* @__PURE__ */ _("p", {
|
|
202
|
+
className: "text-xs text-text-secondary",
|
|
203
|
+
children: [
|
|
204
|
+
e.counterparty,
|
|
205
|
+
" - ",
|
|
206
|
+
e.createdAt
|
|
207
|
+
]
|
|
208
|
+
})] })]
|
|
209
|
+
}), /* @__PURE__ */ _("div", {
|
|
210
|
+
className: "text-right",
|
|
211
|
+
children: [/* @__PURE__ */ _("p", {
|
|
212
|
+
className: `text-sm font-bold tabular-nums ${e.type === "refund" ? "text-status-success-text" : ""}`,
|
|
213
|
+
children: [
|
|
214
|
+
e.type === "refund" ? "+" : "-",
|
|
215
|
+
"$",
|
|
216
|
+
e.amount.toLocaleString()
|
|
217
|
+
]
|
|
218
|
+
}), K(e.status)]
|
|
219
|
+
})]
|
|
220
|
+
}, e.id))
|
|
221
|
+
}) })]
|
|
222
|
+
})]
|
|
180
223
|
}),
|
|
181
|
-
|
|
224
|
+
P === "transactions" && /* @__PURE__ */ _("div", {
|
|
182
225
|
className: "space-y-4",
|
|
183
226
|
children: [/* @__PURE__ */ _("div", {
|
|
184
227
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center",
|
|
185
228
|
children: [/* @__PURE__ */ _("div", {
|
|
186
229
|
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-text-secondary" }), /* @__PURE__ */ g(
|
|
230
|
+
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
231
|
placeholder: "Search transactions...",
|
|
189
|
-
value:
|
|
190
|
-
onChange: (e) =>
|
|
232
|
+
value: I,
|
|
233
|
+
onChange: (e) => L(e.target.value),
|
|
191
234
|
className: "pl-10"
|
|
192
235
|
})]
|
|
193
236
|
}), /* @__PURE__ */ g("div", {
|
|
194
|
-
className: "flex gap-2",
|
|
237
|
+
className: "flex flex-wrap gap-2",
|
|
195
238
|
children: [
|
|
196
239
|
"all",
|
|
197
240
|
"completed",
|
|
198
241
|
"pending",
|
|
199
242
|
"failed"
|
|
200
|
-
].map((e) => /* @__PURE__ */ g(
|
|
201
|
-
variant:
|
|
243
|
+
].map((e) => /* @__PURE__ */ g(b, {
|
|
244
|
+
variant: R === e ? "default" : "outline",
|
|
202
245
|
size: "sm",
|
|
203
|
-
onClick: () =>
|
|
246
|
+
onClick: () => z(e),
|
|
204
247
|
children: e === "all" ? "All" : e.charAt(0).toUpperCase() + e.slice(1)
|
|
205
248
|
}, e))
|
|
206
249
|
})]
|
|
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.
|
|
250
|
+
}), /* @__PURE__ */ g(x, {
|
|
251
|
+
className: "border-border-seam",
|
|
252
|
+
children: /* @__PURE__ */ g(S, {
|
|
253
|
+
className: "pt-4",
|
|
254
|
+
children: W.length === 0 ? /* @__PURE__ */ g(D, {
|
|
255
|
+
illustration: "empty-search",
|
|
256
|
+
title: "No transactions found",
|
|
257
|
+
description: "No transactions match your current filters."
|
|
258
|
+
}) : /* @__PURE__ */ g("div", {
|
|
259
|
+
className: "overflow-x-auto",
|
|
260
|
+
children: /* @__PURE__ */ _("table", {
|
|
261
|
+
className: "w-full text-sm",
|
|
262
|
+
children: [/* @__PURE__ */ g("thead", { children: /* @__PURE__ */ _("tr", {
|
|
263
|
+
className: "border-b border-border-seam text-left text-text-secondary",
|
|
264
|
+
children: [
|
|
265
|
+
/* @__PURE__ */ g("th", {
|
|
266
|
+
className: "p-3 font-medium",
|
|
267
|
+
children: "Type"
|
|
268
|
+
}),
|
|
269
|
+
/* @__PURE__ */ g("th", {
|
|
270
|
+
className: "p-3 font-medium",
|
|
271
|
+
children: "Description"
|
|
272
|
+
}),
|
|
273
|
+
/* @__PURE__ */ g("th", {
|
|
274
|
+
className: "p-3 font-medium",
|
|
275
|
+
children: "Counterparty"
|
|
276
|
+
}),
|
|
277
|
+
/* @__PURE__ */ g("th", {
|
|
278
|
+
className: "p-3 font-medium",
|
|
279
|
+
children: "Method"
|
|
280
|
+
}),
|
|
281
|
+
/* @__PURE__ */ g("th", {
|
|
282
|
+
className: "p-3 text-right font-medium",
|
|
283
|
+
children: "Amount"
|
|
284
|
+
}),
|
|
285
|
+
/* @__PURE__ */ g("th", {
|
|
286
|
+
className: "p-3 text-right font-medium",
|
|
287
|
+
children: "Fees"
|
|
288
|
+
}),
|
|
289
|
+
/* @__PURE__ */ g("th", {
|
|
290
|
+
className: "p-3 text-right font-medium",
|
|
291
|
+
children: "Net"
|
|
292
|
+
}),
|
|
293
|
+
/* @__PURE__ */ g("th", {
|
|
294
|
+
className: "p-3 font-medium",
|
|
295
|
+
children: "Status"
|
|
296
|
+
}),
|
|
297
|
+
/* @__PURE__ */ g("th", {
|
|
298
|
+
className: "p-3 font-medium",
|
|
299
|
+
children: "Date"
|
|
300
|
+
})
|
|
301
|
+
]
|
|
302
|
+
}) }), /* @__PURE__ */ g("tbody", { children: W.map((e) => /* @__PURE__ */ _("tr", {
|
|
303
|
+
className: "border-b border-border-seam transition-colors hover:bg-bg-sunken/50",
|
|
304
|
+
children: [
|
|
305
|
+
/* @__PURE__ */ g("td", {
|
|
306
|
+
className: "p-3",
|
|
307
|
+
children: G(e.type)
|
|
308
|
+
}),
|
|
309
|
+
/* @__PURE__ */ g("td", {
|
|
310
|
+
className: "p-3 font-medium",
|
|
311
|
+
children: e.description
|
|
312
|
+
}),
|
|
313
|
+
/* @__PURE__ */ g("td", {
|
|
314
|
+
className: "p-3",
|
|
315
|
+
children: e.counterparty
|
|
316
|
+
}),
|
|
317
|
+
/* @__PURE__ */ g("td", {
|
|
318
|
+
className: "p-3",
|
|
319
|
+
children: /* @__PURE__ */ g(y, {
|
|
320
|
+
variant: "outline",
|
|
321
|
+
children: e.method.replace("_", " ")
|
|
322
|
+
})
|
|
323
|
+
}),
|
|
324
|
+
/* @__PURE__ */ _("td", {
|
|
325
|
+
className: `p-3 text-right font-medium tabular-nums ${e.type === "refund" ? "text-status-success-text" : ""}`,
|
|
326
|
+
children: [
|
|
327
|
+
e.type === "refund" ? "+" : "-",
|
|
328
|
+
"$",
|
|
329
|
+
e.amount.toLocaleString()
|
|
330
|
+
]
|
|
331
|
+
}),
|
|
332
|
+
/* @__PURE__ */ _("td", {
|
|
333
|
+
className: "p-3 text-right text-text-secondary tabular-nums",
|
|
334
|
+
children: ["$", e.fees]
|
|
335
|
+
}),
|
|
336
|
+
/* @__PURE__ */ _("td", {
|
|
337
|
+
className: "p-3 text-right tabular-nums",
|
|
338
|
+
children: ["$", e.netAmount.toLocaleString()]
|
|
339
|
+
}),
|
|
340
|
+
/* @__PURE__ */ g("td", {
|
|
341
|
+
className: "p-3",
|
|
342
|
+
children: K(e.status)
|
|
343
|
+
}),
|
|
344
|
+
/* @__PURE__ */ g("td", {
|
|
345
|
+
className: "p-3 text-text-secondary",
|
|
346
|
+
children: e.createdAt
|
|
273
347
|
})
|
|
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-text-secondary",
|
|
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-text-secondary",
|
|
297
|
-
children: e.createdAt
|
|
298
|
-
})
|
|
299
|
-
]
|
|
300
|
-
}, e.id)) })]
|
|
348
|
+
]
|
|
349
|
+
}, e.id)) })]
|
|
350
|
+
})
|
|
301
351
|
})
|
|
302
352
|
})
|
|
303
|
-
})
|
|
353
|
+
})]
|
|
304
354
|
}),
|
|
305
|
-
|
|
355
|
+
P === "methods" && /* @__PURE__ */ g("div", {
|
|
306
356
|
className: "space-y-4",
|
|
307
357
|
children: /* @__PURE__ */ _("div", {
|
|
308
358
|
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, {
|
|
359
|
+
children: [M.map((e) => /* @__PURE__ */ _(T, {
|
|
360
|
+
treatment: "glass",
|
|
361
|
+
glow: e.isDefault,
|
|
362
|
+
className: `border-border-seam ${e.isDefault, ""}`,
|
|
363
|
+
children: [
|
|
364
|
+
/* @__PURE__ */ _("div", {
|
|
365
|
+
className: "flex items-start justify-between",
|
|
366
|
+
children: [/* @__PURE__ */ _("div", {
|
|
367
|
+
className: "flex items-center gap-3",
|
|
368
|
+
children: [/* @__PURE__ */ g("div", {
|
|
369
|
+
className: "rounded-lg border border-border-seam p-2 text-text-primary",
|
|
370
|
+
children: q(e.type)
|
|
371
|
+
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
372
|
+
className: "font-medium",
|
|
373
|
+
children: e.name
|
|
374
|
+
}), /* @__PURE__ */ g("p", {
|
|
375
|
+
className: "text-sm text-text-secondary",
|
|
376
|
+
children: e.details
|
|
377
|
+
})] })]
|
|
378
|
+
}), e.isDefault && /* @__PURE__ */ g(y, { children: "Default" })]
|
|
379
|
+
}),
|
|
380
|
+
/* @__PURE__ */ _("div", {
|
|
381
|
+
className: "mt-4 flex items-center gap-4 text-sm",
|
|
382
|
+
children: [e.isVerified ? /* @__PURE__ */ _("span", {
|
|
383
|
+
className: "flex items-center gap-1 text-status-success-text",
|
|
384
|
+
children: [/* @__PURE__ */ g(m, { className: "h-4 w-4" }), " Verified"]
|
|
385
|
+
}) : /* @__PURE__ */ _("span", {
|
|
386
|
+
className: "flex items-center gap-1 text-status-warning-text",
|
|
387
|
+
children: [/* @__PURE__ */ g(o, { className: "h-4 w-4" }), " Unverified"]
|
|
388
|
+
}), e.lastUsed && /* @__PURE__ */ _("span", {
|
|
389
|
+
className: "text-text-secondary",
|
|
390
|
+
children: ["Last used: ", e.lastUsed]
|
|
391
|
+
})]
|
|
392
|
+
}),
|
|
393
|
+
/* @__PURE__ */ _("div", {
|
|
394
|
+
className: "mt-4 flex gap-2",
|
|
395
|
+
children: [!e.isDefault && /* @__PURE__ */ g(b, {
|
|
396
|
+
variant: "outline",
|
|
397
|
+
size: "sm",
|
|
398
|
+
className: "flex-1",
|
|
399
|
+
children: "Set Default"
|
|
400
|
+
}), /* @__PURE__ */ g(b, {
|
|
401
|
+
variant: "outline",
|
|
402
|
+
size: "sm",
|
|
403
|
+
className: "flex-1",
|
|
404
|
+
children: "Remove"
|
|
405
|
+
})]
|
|
406
|
+
})
|
|
407
|
+
]
|
|
408
|
+
}, e.id)), /* @__PURE__ */ g(x, {
|
|
409
|
+
className: "flex items-center justify-center border-dashed border-border-seam transition-shadow hover:shadow-pop",
|
|
410
|
+
children: /* @__PURE__ */ _(S, {
|
|
362
411
|
className: "py-8 text-center",
|
|
363
412
|
children: [
|
|
364
413
|
/* @__PURE__ */ g(d, { className: "mx-auto h-8 w-8 text-text-secondary" }),
|
|
@@ -375,105 +424,114 @@ function T() {
|
|
|
375
424
|
})]
|
|
376
425
|
})
|
|
377
426
|
}),
|
|
378
|
-
|
|
427
|
+
P === "invoices" && /* @__PURE__ */ g("div", {
|
|
379
428
|
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
|
|
429
|
+
children: /* @__PURE__ */ g(x, {
|
|
430
|
+
className: "border-border-seam",
|
|
431
|
+
children: /* @__PURE__ */ g(S, {
|
|
432
|
+
className: "pt-4",
|
|
433
|
+
children: N.length === 0 ? /* @__PURE__ */ g(D, {
|
|
434
|
+
illustration: "empty-files",
|
|
435
|
+
title: "No invoices yet",
|
|
436
|
+
description: "Invoices you create or receive will appear here."
|
|
437
|
+
}) : /* @__PURE__ */ g("div", {
|
|
438
|
+
className: "overflow-x-auto",
|
|
439
|
+
children: /* @__PURE__ */ _("table", {
|
|
440
|
+
className: "w-full text-sm",
|
|
441
|
+
children: [/* @__PURE__ */ g("thead", { children: /* @__PURE__ */ _("tr", {
|
|
442
|
+
className: "border-b border-border-seam text-left text-text-secondary",
|
|
443
|
+
children: [
|
|
444
|
+
/* @__PURE__ */ g("th", {
|
|
445
|
+
className: "p-3 font-medium",
|
|
446
|
+
children: "Invoice #"
|
|
447
|
+
}),
|
|
448
|
+
/* @__PURE__ */ g("th", {
|
|
449
|
+
className: "p-3 font-medium",
|
|
450
|
+
children: "Description"
|
|
451
|
+
}),
|
|
452
|
+
/* @__PURE__ */ g("th", {
|
|
453
|
+
className: "p-3 font-medium",
|
|
454
|
+
children: "Client"
|
|
455
|
+
}),
|
|
456
|
+
/* @__PURE__ */ g("th", {
|
|
457
|
+
className: "p-3 text-right font-medium",
|
|
458
|
+
children: "Amount"
|
|
459
|
+
}),
|
|
460
|
+
/* @__PURE__ */ g("th", {
|
|
461
|
+
className: "p-3 font-medium",
|
|
462
|
+
children: "Status"
|
|
463
|
+
}),
|
|
464
|
+
/* @__PURE__ */ g("th", {
|
|
465
|
+
className: "p-3 font-medium",
|
|
466
|
+
children: "Due Date"
|
|
467
|
+
}),
|
|
468
|
+
/* @__PURE__ */ g("th", {
|
|
469
|
+
className: "p-3 text-right font-medium",
|
|
470
|
+
children: "Actions"
|
|
446
471
|
})
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
472
|
+
]
|
|
473
|
+
}) }), /* @__PURE__ */ g("tbody", { children: N.map((e) => /* @__PURE__ */ _("tr", {
|
|
474
|
+
className: "border-b border-border-seam transition-colors hover:bg-bg-sunken/50",
|
|
475
|
+
children: [
|
|
476
|
+
/* @__PURE__ */ g("td", {
|
|
477
|
+
className: "p-3 font-medium",
|
|
478
|
+
children: e.number
|
|
479
|
+
}),
|
|
480
|
+
/* @__PURE__ */ g("td", {
|
|
481
|
+
className: "p-3",
|
|
482
|
+
children: e.description
|
|
483
|
+
}),
|
|
484
|
+
/* @__PURE__ */ g("td", {
|
|
485
|
+
className: "p-3",
|
|
486
|
+
children: e.clientName
|
|
487
|
+
}),
|
|
488
|
+
/* @__PURE__ */ _("td", {
|
|
489
|
+
className: "p-3 text-right font-medium tabular-nums",
|
|
490
|
+
children: ["$", e.amount.toLocaleString()]
|
|
491
|
+
}),
|
|
492
|
+
/* @__PURE__ */ g("td", {
|
|
493
|
+
className: "p-3",
|
|
494
|
+
children: /* @__PURE__ */ g(y, {
|
|
495
|
+
variant: {
|
|
496
|
+
paid: "default",
|
|
497
|
+
pending: "secondary",
|
|
498
|
+
overdue: "destructive"
|
|
499
|
+
}[e.status] ?? "secondary",
|
|
500
|
+
children: e.status
|
|
501
|
+
})
|
|
502
|
+
}),
|
|
503
|
+
/* @__PURE__ */ g("td", {
|
|
504
|
+
className: "p-3 text-text-secondary",
|
|
505
|
+
children: e.dueDate
|
|
506
|
+
}),
|
|
507
|
+
/* @__PURE__ */ g("td", {
|
|
508
|
+
className: "p-3 text-right",
|
|
509
|
+
children: /* @__PURE__ */ _("div", {
|
|
510
|
+
className: "flex justify-end gap-1",
|
|
511
|
+
children: [/* @__PURE__ */ g(b, {
|
|
512
|
+
variant: "outline",
|
|
513
|
+
size: "sm",
|
|
514
|
+
"aria-label": "View invoice",
|
|
515
|
+
children: /* @__PURE__ */ g(u, { className: "h-3 w-3" })
|
|
516
|
+
}), /* @__PURE__ */ g(b, {
|
|
517
|
+
variant: "outline",
|
|
518
|
+
size: "sm",
|
|
519
|
+
"aria-label": "Download invoice",
|
|
520
|
+
children: /* @__PURE__ */ g(l, { className: "h-3 w-3" })
|
|
521
|
+
})]
|
|
522
|
+
})
|
|
465
523
|
})
|
|
466
|
-
|
|
467
|
-
]
|
|
468
|
-
}
|
|
524
|
+
]
|
|
525
|
+
}, e.id)) })]
|
|
526
|
+
})
|
|
469
527
|
})
|
|
470
528
|
})
|
|
471
|
-
})
|
|
529
|
+
})
|
|
472
530
|
})
|
|
473
531
|
]
|
|
474
532
|
});
|
|
475
533
|
}
|
|
476
534
|
//#endregion
|
|
477
|
-
export {
|
|
535
|
+
export { j as PaymentsPage };
|
|
478
536
|
|
|
479
537
|
//# sourceMappingURL=PaymentsPage.js.map
|