@burdenoff/microfe-proserviceworld 2026.1028.1 → 2026.1031.2
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/generated/global-types.d.ts +9699 -583
- package/dist/generated/global-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.d.ts +18076 -2999
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/proserviceworld/__tests__/schemaStub.d.ts +20 -0
- package/dist/proserviceworld/__tests__/schemaStub.d.ts.map +1 -0
- package/dist/proserviceworld/components/CredentialDirectory.js +44 -43
- package/dist/proserviceworld/components/CredentialDirectory.js.map +1 -1
- package/dist/proserviceworld/components/CredentialReminderPanel.js +5 -4
- package/dist/proserviceworld/components/CredentialReminderPanel.js.map +1 -1
- package/dist/proserviceworld/components/ui.d.ts +7 -3
- package/dist/proserviceworld/components/ui.d.ts.map +1 -1
- package/dist/proserviceworld/components/ui.js +135 -121
- package/dist/proserviceworld/components/ui.js.map +1 -1
- package/dist/proserviceworld/hooks/useProServiceWorldApi.d.ts.map +1 -1
- package/dist/proserviceworld/hooks/useProServiceWorldApi.js.map +1 -1
- package/dist/proserviceworld/hooks/useTr.d.ts +49 -8
- package/dist/proserviceworld/hooks/useTr.d.ts.map +1 -1
- package/dist/proserviceworld/hooks/useTr.js +45 -21
- package/dist/proserviceworld/hooks/useTr.js.map +1 -1
- package/dist/proserviceworld/i18n/catalog/analytics.d.ts +5 -0
- package/dist/proserviceworld/i18n/catalog/analytics.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/catalog/analytics.js +271 -0
- package/dist/proserviceworld/i18n/catalog/analytics.js.map +1 -0
- package/dist/proserviceworld/i18n/catalog/common.d.ts +9 -0
- package/dist/proserviceworld/i18n/catalog/common.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/catalog/common.js +163 -0
- package/dist/proserviceworld/i18n/catalog/common.js.map +1 -0
- package/dist/proserviceworld/i18n/catalog/compliance.d.ts +5 -0
- package/dist/proserviceworld/i18n/catalog/compliance.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/catalog/compliance.js +157 -0
- package/dist/proserviceworld/i18n/catalog/compliance.js.map +1 -0
- package/dist/proserviceworld/i18n/catalog/conflicts.d.ts +5 -0
- package/dist/proserviceworld/i18n/catalog/conflicts.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/catalog/conflicts.js +145 -0
- package/dist/proserviceworld/i18n/catalog/conflicts.js.map +1 -0
- package/dist/proserviceworld/i18n/catalog/documents.d.ts +5 -0
- package/dist/proserviceworld/i18n/catalog/documents.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/catalog/documents.js +157 -0
- package/dist/proserviceworld/i18n/catalog/documents.js.map +1 -0
- package/dist/proserviceworld/i18n/catalog/enums.d.ts +10 -0
- package/dist/proserviceworld/i18n/catalog/enums.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/catalog/enums.js +481 -0
- package/dist/proserviceworld/i18n/catalog/enums.js.map +1 -0
- package/dist/proserviceworld/i18n/catalog/index.d.ts +9 -0
- package/dist/proserviceworld/i18n/catalog/index.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/catalog/index.js +25 -0
- package/dist/proserviceworld/i18n/catalog/index.js.map +1 -0
- package/dist/proserviceworld/i18n/catalog/invoices.d.ts +5 -0
- package/dist/proserviceworld/i18n/catalog/invoices.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/catalog/invoices.js +247 -0
- package/dist/proserviceworld/i18n/catalog/invoices.js.map +1 -0
- package/dist/proserviceworld/i18n/catalog/practiceAreas.d.ts +5 -0
- package/dist/proserviceworld/i18n/catalog/practiceAreas.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/catalog/practiceAreas.js +97 -0
- package/dist/proserviceworld/i18n/catalog/practiceAreas.js.map +1 -0
- package/dist/proserviceworld/i18n/catalog/time.d.ts +5 -0
- package/dist/proserviceworld/i18n/catalog/time.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/catalog/time.js +301 -0
- package/dist/proserviceworld/i18n/catalog/time.js.map +1 -0
- package/dist/proserviceworld/i18n/index.d.ts +10 -9
- package/dist/proserviceworld/i18n/index.d.ts.map +1 -1
- package/dist/proserviceworld/i18n/index.js +16 -12
- package/dist/proserviceworld/i18n/index.js.map +1 -1
- package/dist/proserviceworld/i18n/types.d.ts +13 -0
- package/dist/proserviceworld/i18n/types.d.ts.map +1 -0
- package/dist/proserviceworld/i18n/types.js +18 -0
- package/dist/proserviceworld/i18n/types.js.map +1 -0
- package/dist/proserviceworld/pages/AnalyticsPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/AnalyticsPage.js +209 -197
- package/dist/proserviceworld/pages/AnalyticsPage.js.map +1 -1
- package/dist/proserviceworld/pages/ClientDetailPage.js +99 -98
- package/dist/proserviceworld/pages/ClientDetailPage.js.map +1 -1
- package/dist/proserviceworld/pages/ClientsPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/ClientsPage.js +181 -181
- package/dist/proserviceworld/pages/ClientsPage.js.map +1 -1
- package/dist/proserviceworld/pages/CompliancePage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/CompliancePage.js +210 -209
- package/dist/proserviceworld/pages/CompliancePage.js.map +1 -1
- package/dist/proserviceworld/pages/ConflictsPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/ConflictsPage.js +139 -138
- package/dist/proserviceworld/pages/ConflictsPage.js.map +1 -1
- package/dist/proserviceworld/pages/DocumentsPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/DocumentsPage.js +150 -149
- package/dist/proserviceworld/pages/DocumentsPage.js.map +1 -1
- package/dist/proserviceworld/pages/EngagementDetailPage.js +105 -104
- package/dist/proserviceworld/pages/EngagementDetailPage.js.map +1 -1
- package/dist/proserviceworld/pages/EngagementsPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/EngagementsPage.js +137 -137
- package/dist/proserviceworld/pages/EngagementsPage.js.map +1 -1
- package/dist/proserviceworld/pages/InvoicesPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/InvoicesPage.js +257 -256
- package/dist/proserviceworld/pages/InvoicesPage.js.map +1 -1
- package/dist/proserviceworld/pages/MattersPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/MattersPage.js +166 -166
- package/dist/proserviceworld/pages/MattersPage.js.map +1 -1
- package/dist/proserviceworld/pages/PracticeAreasPage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/PracticeAreasPage.js +100 -99
- package/dist/proserviceworld/pages/PracticeAreasPage.js.map +1 -1
- package/dist/proserviceworld/pages/PractitionerCredentialsPage.js +30 -29
- package/dist/proserviceworld/pages/PractitionerCredentialsPage.js.map +1 -1
- package/dist/proserviceworld/pages/TimePage.d.ts.map +1 -1
- package/dist/proserviceworld/pages/TimePage.js +343 -350
- package/dist/proserviceworld/pages/TimePage.js.map +1 -1
- package/dist/proserviceworld/utils/humanize.d.ts +3 -0
- package/dist/proserviceworld/utils/humanize.d.ts.map +1 -0
- package/dist/proserviceworld/utils/humanize.js +6 -0
- package/dist/proserviceworld/utils/humanize.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,191 +1,192 @@
|
|
|
1
1
|
import { useCancelInvoice as e, useClients as t, useCreateInvoice as n, useEngagements as r, useInvoice as i, useInvoices as a, useMarkInvoicePaid as o, useSendInvoice as s } from "../hooks/useProServiceWorldApi.js";
|
|
2
2
|
import { cn as c } from "../utils/cn.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { plural as l, useEnumLabel as u, useTr as d } from "../hooks/useTr.js";
|
|
4
|
+
import { Banner as f, Empty as p, ErrorState as m, Field as h, LoadingBlock as g, MetricCard as _, Modal as v, NativeSelect as y, PageHeader as b, SectionCard as ee, StatusPill as x, TableWrap as S, Td as C, TextArea as w, TextInput as T, Th as E, enumOptions as te, fmtDate as D, fmtMoney as O } from "../components/ui.js";
|
|
5
|
+
import { useAnalytics as ne } from "../hooks/useAnalytics.js";
|
|
6
|
+
import { useDeferredValue as k, useMemo as re, useState as A } from "react";
|
|
7
|
+
import { AlertCircle as ie, CheckCircle2 as ae, Eye as oe, Plus as j, Receipt as M, Search as N, Send as se, Wallet as ce, XCircle as P } from "lucide-react";
|
|
8
|
+
import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
|
|
9
|
+
import { Button as R } from "@burdenoff/fe-libs/ui";
|
|
9
10
|
//#region src/proserviceworld/pages/InvoicesPage.tsx
|
|
10
|
-
var
|
|
11
|
+
var le = [
|
|
11
12
|
"DRAFT",
|
|
12
13
|
"SENT",
|
|
13
14
|
"PAID",
|
|
14
15
|
"OVERDUE",
|
|
15
16
|
"CANCELLED"
|
|
16
|
-
],
|
|
17
|
-
let
|
|
18
|
-
status:
|
|
19
|
-
search:
|
|
20
|
-
}), { emitFact:
|
|
21
|
-
return /* @__PURE__ */
|
|
17
|
+
], z = () => {
|
|
18
|
+
let n = d(), r = u(), [i, h] = A(""), [v, w] = A(""), F = k(v), [z, B] = A(!1), [V, H] = A(null), [U, W] = A(null), { data: G, isLoading: fe, error: K, refetch: pe } = a({
|
|
19
|
+
status: i || void 0,
|
|
20
|
+
search: F.trim() || void 0
|
|
21
|
+
}), { emitFact: me } = ne(), q = s(), J = o(), Y = e(), X = t({ pagination: { limit: 100 } }), Z = re(() => new Map((X.data?.items ?? []).map((e) => [e.id, e.name])), [X.data]), Q = (G?.items ?? []).filter((e) => e.status === "SENT" || e.status === "OVERDUE"), $ = (G?.items ?? []).filter((e) => e.status === "PAID"), he = Q.reduce((e, t) => e + t.total, 0), ge = $.reduce((e, t) => e + t.total, 0);
|
|
22
|
+
return /* @__PURE__ */ L("div", {
|
|
22
23
|
className: "space-y-6",
|
|
23
24
|
children: [
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
title: "Invoices",
|
|
26
|
-
subtitle: "Assemble invoices from time, milestones and fixed-fee schedules — and track what's outstanding.",
|
|
27
|
-
icon: /* @__PURE__ */
|
|
28
|
-
actions: /* @__PURE__ */ R
|
|
29
|
-
onClick: () =>
|
|
30
|
-
children: [/* @__PURE__ */
|
|
25
|
+
/* @__PURE__ */ I(b, {
|
|
26
|
+
title: n("psw.invoices.title", "Invoices"),
|
|
27
|
+
subtitle: n("psw.invoices.subtitle", "Assemble invoices from time, milestones and fixed-fee schedules — and track what's outstanding."),
|
|
28
|
+
icon: /* @__PURE__ */ I(M, { className: "h-6 w-6" }),
|
|
29
|
+
actions: /* @__PURE__ */ L(R, {
|
|
30
|
+
onClick: () => B(!0),
|
|
31
|
+
children: [/* @__PURE__ */ I(j, { className: "me-1.5 h-4 w-4" }), n("psw.invoices.new", "New invoice")]
|
|
31
32
|
})
|
|
32
33
|
}),
|
|
33
|
-
U && /* @__PURE__ */
|
|
34
|
+
U && /* @__PURE__ */ I(f, {
|
|
34
35
|
tone: U.tone,
|
|
35
36
|
onClose: () => W(null),
|
|
36
37
|
children: U.text
|
|
37
38
|
}),
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ L("div", {
|
|
39
40
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-3",
|
|
40
41
|
children: [
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
label: "Invoices",
|
|
42
|
+
/* @__PURE__ */ I(_, {
|
|
43
|
+
label: n("psw.invoices.title", "Invoices"),
|
|
43
44
|
value: G?.totalCount ?? 0,
|
|
44
|
-
icon: /* @__PURE__ */
|
|
45
|
+
icon: /* @__PURE__ */ I(M, { className: "h-4 w-4" })
|
|
45
46
|
}),
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
label: "Outstanding",
|
|
48
|
-
value:
|
|
49
|
-
hint:
|
|
50
|
-
icon: /* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ I(_, {
|
|
48
|
+
label: n("psw.invoices.outstanding", "Outstanding"),
|
|
49
|
+
value: O(he),
|
|
50
|
+
hint: n("psw.invoices.outstandingHint", "{{count}} sent + overdue", { count: Q.length }),
|
|
51
|
+
icon: /* @__PURE__ */ I(ie, { className: "h-4 w-4" }),
|
|
51
52
|
tone: "warning"
|
|
52
53
|
}),
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
label: "Collected",
|
|
55
|
-
value:
|
|
56
|
-
hint:
|
|
57
|
-
icon: /* @__PURE__ */
|
|
54
|
+
/* @__PURE__ */ I(_, {
|
|
55
|
+
label: n("psw.invoices.collected", "Collected"),
|
|
56
|
+
value: O(ge),
|
|
57
|
+
hint: n("psw.invoices.paidHint", "{{count}} paid", { count: $.length }),
|
|
58
|
+
icon: /* @__PURE__ */ I(ce, { className: "h-4 w-4" }),
|
|
58
59
|
tone: "success"
|
|
59
60
|
})
|
|
60
61
|
]
|
|
61
62
|
}),
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ L("div", {
|
|
63
64
|
className: "flex flex-col gap-2 sm:flex-row sm:items-center",
|
|
64
|
-
children: [/* @__PURE__ */
|
|
65
|
+
children: [/* @__PURE__ */ L("div", {
|
|
65
66
|
className: "relative flex-1",
|
|
66
|
-
children: [/* @__PURE__ */
|
|
67
|
-
placeholder: "Search invoices…",
|
|
68
|
-
value:
|
|
69
|
-
onChange: (e) =>
|
|
67
|
+
children: [/* @__PURE__ */ I(N, { className: "pointer-events-none absolute start-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-tertiary" }), /* @__PURE__ */ I(T, {
|
|
68
|
+
placeholder: n("psw.invoices.searchPlaceholder", "Search invoices…"),
|
|
69
|
+
value: v,
|
|
70
|
+
onChange: (e) => w(e.target.value),
|
|
70
71
|
onKeyDown: (e) => {
|
|
71
|
-
e.key === "Enter" &&
|
|
72
|
+
e.key === "Enter" && v.trim() && me("psw.search.performed", {
|
|
72
73
|
entityType: "invoice",
|
|
73
|
-
queryLength:
|
|
74
|
+
queryLength: v.trim().length
|
|
74
75
|
});
|
|
75
76
|
},
|
|
76
|
-
className: "
|
|
77
|
+
className: "ps-9"
|
|
77
78
|
})]
|
|
78
|
-
}), /* @__PURE__ */
|
|
79
|
-
value:
|
|
80
|
-
onChange: (e) =>
|
|
79
|
+
}), /* @__PURE__ */ L(y, {
|
|
80
|
+
value: i,
|
|
81
|
+
onChange: (e) => h(e.target.value),
|
|
81
82
|
className: "sm:w-48",
|
|
82
|
-
children: [/* @__PURE__ */
|
|
83
|
+
children: [/* @__PURE__ */ I("option", {
|
|
83
84
|
value: "",
|
|
84
|
-
children: "All statuses"
|
|
85
|
-
}),
|
|
85
|
+
children: n("psw.common.allStatuses", "All statuses")
|
|
86
|
+
}), te(le, r)]
|
|
86
87
|
})]
|
|
87
88
|
}),
|
|
88
|
-
|
|
89
|
+
fe ? /* @__PURE__ */ I(g, {}) : K ? /* @__PURE__ */ I(m, {
|
|
89
90
|
error: K,
|
|
90
|
-
onRetry: () => void
|
|
91
|
-
}) : !G || G.items.length === 0 ? /* @__PURE__ */
|
|
92
|
-
title: "No invoices yet",
|
|
93
|
-
description: "Raise an invoice for a client to start tracking receivables.",
|
|
94
|
-
icon: /* @__PURE__ */
|
|
95
|
-
action: /* @__PURE__ */ R
|
|
96
|
-
onClick: () =>
|
|
97
|
-
children: [/* @__PURE__ */
|
|
91
|
+
onRetry: () => void pe()
|
|
92
|
+
}) : !G || G.items.length === 0 ? /* @__PURE__ */ I(p, {
|
|
93
|
+
title: n("psw.invoices.emptyTitle", "No invoices yet"),
|
|
94
|
+
description: n("psw.invoices.emptyDescription", "Raise an invoice for a client to start tracking receivables."),
|
|
95
|
+
icon: /* @__PURE__ */ I(M, { className: "h-8 w-8" }),
|
|
96
|
+
action: /* @__PURE__ */ L(R, {
|
|
97
|
+
onClick: () => B(!0),
|
|
98
|
+
children: [/* @__PURE__ */ I(j, { className: "me-1.5 h-4 w-4" }), n("psw.invoices.new", "New invoice")]
|
|
98
99
|
})
|
|
99
|
-
}) : /* @__PURE__ */
|
|
100
|
-
title: "
|
|
101
|
-
children: /* @__PURE__ */
|
|
102
|
-
/* @__PURE__ */
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
className: "text-
|
|
109
|
-
children: "Actions"
|
|
100
|
+
}) : /* @__PURE__ */ I(ee, {
|
|
101
|
+
title: l(n, "psw.invoices.count", G.totalCount, "{{count}} invoice", "{{count}} invoices"),
|
|
102
|
+
children: /* @__PURE__ */ L(S, { children: [/* @__PURE__ */ I("thead", { children: /* @__PURE__ */ L("tr", { children: [
|
|
103
|
+
/* @__PURE__ */ I(E, { children: n("psw.invoices.number", "Number") }),
|
|
104
|
+
/* @__PURE__ */ I(E, { children: n("psw.common.client", "Client") }),
|
|
105
|
+
/* @__PURE__ */ I(E, { children: n("psw.invoices.total", "Total") }),
|
|
106
|
+
/* @__PURE__ */ I(E, { children: n("psw.common.status", "Status") }),
|
|
107
|
+
/* @__PURE__ */ I(E, { children: n("psw.common.due", "Due") }),
|
|
108
|
+
/* @__PURE__ */ I(E, {
|
|
109
|
+
className: "text-end",
|
|
110
|
+
children: n("psw.common.actions", "Actions")
|
|
110
111
|
})
|
|
111
|
-
] }) }), /* @__PURE__ */
|
|
112
|
+
] }) }), /* @__PURE__ */ I("tbody", { children: G.items.map((e) => /* @__PURE__ */ L("tr", {
|
|
112
113
|
className: "transition-colors hover:bg-bg-sunken/60",
|
|
113
114
|
children: [
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ I(C, { children: /* @__PURE__ */ I("span", {
|
|
115
116
|
className: "font-medium text-text-primary",
|
|
116
117
|
children: e.number
|
|
117
118
|
}) }),
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ I(C, {
|
|
119
120
|
className: "text-text-primary",
|
|
120
121
|
children: Z.get(e.clientId) ?? "—"
|
|
121
122
|
}),
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ I(C, {
|
|
123
124
|
className: "whitespace-nowrap font-semibold text-text-primary",
|
|
124
|
-
children:
|
|
125
|
+
children: O(e.total, e.currency)
|
|
125
126
|
}),
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ I(C, { children: /* @__PURE__ */ I(x, { status: e.status }) }),
|
|
128
|
+
/* @__PURE__ */ I(C, {
|
|
128
129
|
className: c("whitespace-nowrap", e.status === "OVERDUE" && "font-medium text-status-error-text"),
|
|
129
|
-
children:
|
|
130
|
+
children: D(e.dueDate)
|
|
130
131
|
}),
|
|
131
|
-
/* @__PURE__ */
|
|
132
|
-
className: "text-
|
|
133
|
-
children: /* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ I(C, {
|
|
133
|
+
className: "text-end",
|
|
134
|
+
children: /* @__PURE__ */ L("div", {
|
|
134
135
|
className: "flex items-center justify-end gap-1",
|
|
135
136
|
children: [
|
|
136
|
-
/* @__PURE__ */ R
|
|
137
|
+
/* @__PURE__ */ L(R, {
|
|
137
138
|
variant: "ghost",
|
|
138
139
|
size: "sm",
|
|
139
140
|
onClick: () => H(e.id),
|
|
140
|
-
children: [/* @__PURE__ */
|
|
141
|
+
children: [/* @__PURE__ */ I(oe, { className: "me-1 h-4 w-4" }), n("psw.invoices.view", "View")]
|
|
141
142
|
}),
|
|
142
|
-
e.status === "DRAFT" && /* @__PURE__ */ R
|
|
143
|
+
e.status === "DRAFT" && /* @__PURE__ */ L(R, {
|
|
143
144
|
variant: "ghost",
|
|
144
145
|
size: "sm",
|
|
145
146
|
disabled: q.isPending,
|
|
146
147
|
onClick: () => q.mutate(e.id, {
|
|
147
148
|
onSuccess: () => W({
|
|
148
149
|
tone: "success",
|
|
149
|
-
text:
|
|
150
|
+
text: n("psw.invoices.sent", "{{number}} sent.", { number: e.number })
|
|
150
151
|
}),
|
|
151
152
|
onError: (e) => W({
|
|
152
153
|
tone: "danger",
|
|
153
|
-
text: e instanceof Error ? e.message : "Failed."
|
|
154
|
+
text: e instanceof Error ? e.message : n("psw.common.failed", "Failed.")
|
|
154
155
|
})
|
|
155
156
|
}),
|
|
156
|
-
children: [/* @__PURE__ */
|
|
157
|
+
children: [/* @__PURE__ */ I(se, { className: "me-1 h-4 w-4" }), n("psw.invoices.send", "Send")]
|
|
157
158
|
}),
|
|
158
|
-
(e.status === "SENT" || e.status === "OVERDUE") && /* @__PURE__ */ R
|
|
159
|
+
(e.status === "SENT" || e.status === "OVERDUE") && /* @__PURE__ */ L(R, {
|
|
159
160
|
variant: "ghost",
|
|
160
161
|
size: "sm",
|
|
161
162
|
disabled: J.isPending,
|
|
162
163
|
onClick: () => J.mutate(e.id, {
|
|
163
164
|
onSuccess: () => W({
|
|
164
165
|
tone: "success",
|
|
165
|
-
text:
|
|
166
|
+
text: n("psw.invoices.markedPaid", "{{number}} marked paid.", { number: e.number })
|
|
166
167
|
}),
|
|
167
168
|
onError: (e) => W({
|
|
168
169
|
tone: "danger",
|
|
169
|
-
text: e instanceof Error ? e.message : "Failed."
|
|
170
|
+
text: e instanceof Error ? e.message : n("psw.common.failed", "Failed.")
|
|
170
171
|
})
|
|
171
172
|
}),
|
|
172
|
-
children: [/* @__PURE__ */
|
|
173
|
+
children: [/* @__PURE__ */ I(ae, { className: "me-1 h-4 w-4" }), n("psw.invoices.markPaid", "Mark paid")]
|
|
173
174
|
}),
|
|
174
|
-
(e.status === "DRAFT" || e.status === "SENT") && /* @__PURE__ */ R
|
|
175
|
+
(e.status === "DRAFT" || e.status === "SENT") && /* @__PURE__ */ L(R, {
|
|
175
176
|
variant: "ghost",
|
|
176
177
|
size: "sm",
|
|
177
178
|
disabled: Y.isPending,
|
|
178
179
|
onClick: () => Y.mutate(e.id, {
|
|
179
180
|
onSuccess: () => W({
|
|
180
181
|
tone: "success",
|
|
181
|
-
text:
|
|
182
|
+
text: n("psw.invoices.cancelled", "{{number}} cancelled.", { number: e.number })
|
|
182
183
|
}),
|
|
183
184
|
onError: (e) => W({
|
|
184
185
|
tone: "danger",
|
|
185
|
-
text: e instanceof Error ? e.message : "Failed."
|
|
186
|
+
text: e instanceof Error ? e.message : n("psw.common.failed", "Failed.")
|
|
186
187
|
})
|
|
187
188
|
}),
|
|
188
|
-
children: [/* @__PURE__ */
|
|
189
|
+
children: [/* @__PURE__ */ I(P, { className: "me-1 h-4 w-4" }), n("psw.common.cancel", "Cancel")]
|
|
189
190
|
})
|
|
190
191
|
]
|
|
191
192
|
})
|
|
@@ -193,144 +194,144 @@ var B = [
|
|
|
193
194
|
]
|
|
194
195
|
}, e.id)) })] })
|
|
195
196
|
}),
|
|
196
|
-
|
|
197
|
-
onClose: () =>
|
|
197
|
+
z && /* @__PURE__ */ I(de, {
|
|
198
|
+
onClose: () => B(!1),
|
|
198
199
|
onSaved: (e) => W({
|
|
199
200
|
tone: "success",
|
|
200
|
-
text:
|
|
201
|
+
text: n("psw.invoices.created", "{{number}} created.", { number: e })
|
|
201
202
|
})
|
|
202
203
|
}),
|
|
203
|
-
V && /* @__PURE__ */
|
|
204
|
+
V && /* @__PURE__ */ I(ue, {
|
|
204
205
|
id: V,
|
|
205
206
|
clientName: Z,
|
|
206
207
|
onClose: () => H(null),
|
|
207
208
|
onCancelled: (e) => {
|
|
208
209
|
H(null), W({
|
|
209
210
|
tone: "success",
|
|
210
|
-
text:
|
|
211
|
+
text: n("psw.invoices.cancelled", "{{number}} cancelled.", { number: e })
|
|
211
212
|
});
|
|
212
213
|
}
|
|
213
214
|
})
|
|
214
215
|
]
|
|
215
216
|
});
|
|
216
|
-
},
|
|
217
|
-
let { data:
|
|
218
|
-
return /* @__PURE__ */
|
|
217
|
+
}, ue = ({ id: t, clientName: n, onClose: r, onCancelled: a }) => {
|
|
218
|
+
let o = d(), s = u(), { data: c, isLoading: l, error: h } = i(t), _ = e(), [y, b] = A(null);
|
|
219
|
+
return /* @__PURE__ */ I(v, {
|
|
219
220
|
open: !0,
|
|
220
221
|
onClose: r,
|
|
221
|
-
title:
|
|
222
|
-
footer: /* @__PURE__ */
|
|
222
|
+
title: c ? o("psw.invoices.detailTitle", "Invoice {{number}}", { number: c.number }) : o("psw.invoices.invoice", "Invoice"),
|
|
223
|
+
footer: /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(R, {
|
|
223
224
|
variant: "outline",
|
|
224
225
|
onClick: r,
|
|
225
|
-
children: "Close"
|
|
226
|
-
}),
|
|
226
|
+
children: o("psw.common.close", "Close")
|
|
227
|
+
}), c && (c.status === "DRAFT" || c.status === "SENT") && /* @__PURE__ */ L(R, {
|
|
227
228
|
variant: "destructive",
|
|
228
|
-
disabled:
|
|
229
|
+
disabled: _.isPending,
|
|
229
230
|
onClick: () => {
|
|
230
|
-
|
|
231
|
-
onSuccess: () => a(
|
|
232
|
-
onError: (e) =>
|
|
231
|
+
b(null), _.mutate(c.id, {
|
|
232
|
+
onSuccess: () => a(c.number),
|
|
233
|
+
onError: (e) => b(e instanceof Error ? e.message : o("psw.common.failed", "Failed."))
|
|
233
234
|
});
|
|
234
235
|
},
|
|
235
|
-
children: [/* @__PURE__ */
|
|
236
|
+
children: [/* @__PURE__ */ I(P, { className: "me-1.5 h-4 w-4" }), _.isPending ? o("psw.invoices.cancelling", "Cancelling…") : o("psw.invoices.cancelInvoice", "Cancel invoice")]
|
|
236
237
|
})] }),
|
|
237
|
-
children: /* @__PURE__ */
|
|
238
|
+
children: /* @__PURE__ */ L("div", {
|
|
238
239
|
className: "space-y-3",
|
|
239
|
-
children: [
|
|
240
|
+
children: [y && /* @__PURE__ */ I(f, {
|
|
240
241
|
tone: "danger",
|
|
241
|
-
children:
|
|
242
|
-
}),
|
|
243
|
-
/* @__PURE__ */
|
|
242
|
+
children: y
|
|
243
|
+
}), l ? /* @__PURE__ */ I(g, {}) : h ? /* @__PURE__ */ I(m, { error: h }) : c ? /* @__PURE__ */ L(F, { children: [
|
|
244
|
+
/* @__PURE__ */ L("div", {
|
|
244
245
|
className: "grid grid-cols-2 gap-3 text-sm",
|
|
245
246
|
children: [
|
|
246
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("div", {
|
|
247
248
|
className: "text-text-tertiary",
|
|
248
|
-
children: "Client"
|
|
249
|
-
}), /* @__PURE__ */
|
|
249
|
+
children: o("psw.common.client", "Client")
|
|
250
|
+
}), /* @__PURE__ */ I("div", {
|
|
250
251
|
className: "font-medium text-text-primary",
|
|
251
|
-
children: n.get(
|
|
252
|
+
children: n.get(c.clientId) ?? "—"
|
|
252
253
|
})] }),
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("div", {
|
|
254
255
|
className: "text-text-tertiary",
|
|
255
|
-
children: "Status"
|
|
256
|
-
}), /* @__PURE__ */
|
|
257
|
-
/* @__PURE__ */
|
|
256
|
+
children: o("psw.common.status", "Status")
|
|
257
|
+
}), /* @__PURE__ */ I(x, { status: c.status })] }),
|
|
258
|
+
/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("div", {
|
|
258
259
|
className: "text-text-tertiary",
|
|
259
|
-
children: "Issue date"
|
|
260
|
-
}), /* @__PURE__ */
|
|
260
|
+
children: o("psw.invoices.issueDate", "Issue date")
|
|
261
|
+
}), /* @__PURE__ */ I("div", {
|
|
261
262
|
className: "text-text-primary",
|
|
262
|
-
children:
|
|
263
|
+
children: D(c.issueDate)
|
|
263
264
|
})] }),
|
|
264
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("div", {
|
|
265
266
|
className: "text-text-tertiary",
|
|
266
|
-
children: "Due date"
|
|
267
|
-
}), /* @__PURE__ */
|
|
267
|
+
children: o("psw.common.dueDate", "Due date")
|
|
268
|
+
}), /* @__PURE__ */ I("div", {
|
|
268
269
|
className: "text-text-primary",
|
|
269
|
-
children:
|
|
270
|
+
children: D(c.dueDate)
|
|
270
271
|
})] }),
|
|
271
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("div", {
|
|
272
273
|
className: "text-text-tertiary",
|
|
273
|
-
children: "Sent"
|
|
274
|
-
}), /* @__PURE__ */
|
|
274
|
+
children: o("psw.invoices.sentAt", "Sent")
|
|
275
|
+
}), /* @__PURE__ */ I("div", {
|
|
275
276
|
className: "text-text-primary",
|
|
276
|
-
children:
|
|
277
|
+
children: D(c.sentAt)
|
|
277
278
|
})] }),
|
|
278
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("div", {
|
|
279
280
|
className: "text-text-tertiary",
|
|
280
|
-
children: "Paid"
|
|
281
|
-
}), /* @__PURE__ */
|
|
281
|
+
children: o("psw.invoices.paidAt", "Paid")
|
|
282
|
+
}), /* @__PURE__ */ I("div", {
|
|
282
283
|
className: "text-text-primary",
|
|
283
|
-
children:
|
|
284
|
+
children: D(c.paidAt)
|
|
284
285
|
})] })
|
|
285
286
|
]
|
|
286
287
|
}),
|
|
287
|
-
|
|
288
|
-
/* @__PURE__ */
|
|
289
|
-
/* @__PURE__ */
|
|
290
|
-
/* @__PURE__ */
|
|
291
|
-
className: "text-
|
|
292
|
-
children: "Amount"
|
|
288
|
+
c.lineItems && c.lineItems.length > 0 && /* @__PURE__ */ L(S, { children: [/* @__PURE__ */ I("thead", { children: /* @__PURE__ */ L("tr", { children: [
|
|
289
|
+
/* @__PURE__ */ I(E, { children: o("psw.invoices.source", "Source") }),
|
|
290
|
+
/* @__PURE__ */ I(E, { children: o("psw.common.description", "Description") }),
|
|
291
|
+
/* @__PURE__ */ I(E, {
|
|
292
|
+
className: "text-end",
|
|
293
|
+
children: o("psw.common.amount", "Amount")
|
|
293
294
|
})
|
|
294
|
-
] }) }), /* @__PURE__ */
|
|
295
|
-
/* @__PURE__ */
|
|
296
|
-
/* @__PURE__ */
|
|
297
|
-
/* @__PURE__ */
|
|
298
|
-
className: "text-
|
|
299
|
-
children:
|
|
295
|
+
] }) }), /* @__PURE__ */ I("tbody", { children: c.lineItems.map((e, t) => /* @__PURE__ */ L("tr", { children: [
|
|
296
|
+
/* @__PURE__ */ I(C, { children: s(e.sourceType) }),
|
|
297
|
+
/* @__PURE__ */ I(C, { children: e.description ?? e.sourceId }),
|
|
298
|
+
/* @__PURE__ */ I(C, {
|
|
299
|
+
className: "text-end",
|
|
300
|
+
children: O(e.amount, c.currency)
|
|
300
301
|
})
|
|
301
302
|
] }, `${e.sourceType}-${e.sourceId}-${t}`)) })] }),
|
|
302
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ L("div", {
|
|
303
304
|
className: "rounded-lg bg-bg-sunken px-3 py-2 text-sm text-text-secondary",
|
|
304
305
|
children: [
|
|
305
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ L("div", {
|
|
306
307
|
className: "flex justify-between",
|
|
307
|
-
children: [/* @__PURE__ */
|
|
308
|
+
children: [/* @__PURE__ */ I("span", { children: o("psw.invoices.subtotal", "Subtotal") }), /* @__PURE__ */ I("span", { children: O(c.subtotal, c.currency) })]
|
|
308
309
|
}),
|
|
309
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ L("div", {
|
|
310
311
|
className: "flex justify-between",
|
|
311
|
-
children: [/* @__PURE__ */
|
|
312
|
+
children: [/* @__PURE__ */ I("span", { children: o("psw.invoices.tax", "Tax") }), /* @__PURE__ */ I("span", { children: O(c.taxAmount, c.currency) })]
|
|
312
313
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ L("div", {
|
|
314
315
|
className: "flex justify-between font-semibold text-text-primary",
|
|
315
|
-
children: [/* @__PURE__ */
|
|
316
|
+
children: [/* @__PURE__ */ I("span", { children: o("psw.invoices.total", "Total") }), /* @__PURE__ */ I("span", { children: O(c.total, c.currency) })]
|
|
316
317
|
})
|
|
317
318
|
]
|
|
318
319
|
}),
|
|
319
|
-
|
|
320
|
+
c.notes && /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("div", {
|
|
320
321
|
className: "text-sm text-text-tertiary",
|
|
321
|
-
children: "Notes"
|
|
322
|
-
}), /* @__PURE__ */
|
|
322
|
+
children: o("psw.common.notes", "Notes")
|
|
323
|
+
}), /* @__PURE__ */ I("div", {
|
|
323
324
|
className: "text-sm text-text-primary",
|
|
324
|
-
children:
|
|
325
|
+
children: c.notes
|
|
325
326
|
})] })
|
|
326
|
-
] }) : /* @__PURE__ */
|
|
327
|
-
title: "Invoice not found",
|
|
328
|
-
icon: /* @__PURE__ */
|
|
327
|
+
] }) : /* @__PURE__ */ I(p, {
|
|
328
|
+
title: o("psw.invoices.notFound", "Invoice not found"),
|
|
329
|
+
icon: /* @__PURE__ */ I(M, { className: "h-8 w-8" })
|
|
329
330
|
})]
|
|
330
331
|
})
|
|
331
332
|
});
|
|
332
|
-
},
|
|
333
|
-
let a =
|
|
333
|
+
}, de = ({ onClose: e, onSaved: i }) => {
|
|
334
|
+
let a = d(), o = n(), s = t({ pagination: { limit: 100 } }), [c, l] = A({
|
|
334
335
|
clientId: "",
|
|
335
336
|
engagementId: "",
|
|
336
337
|
number: "",
|
|
@@ -340,160 +341,160 @@ var B = [
|
|
|
340
341
|
issueDate: (/* @__PURE__ */ new Date()).toISOString().slice(0, 10),
|
|
341
342
|
dueDate: "",
|
|
342
343
|
notes: ""
|
|
343
|
-
}), [u,
|
|
344
|
-
clientId:
|
|
344
|
+
}), [u, p] = A(null), m = r({
|
|
345
|
+
clientId: c.clientId || void 0,
|
|
345
346
|
pagination: { limit: 100 }
|
|
346
|
-
}),
|
|
347
|
+
}), g = (e) => (t) => l((n) => ({
|
|
347
348
|
...n,
|
|
348
349
|
[e]: t.target.value
|
|
349
|
-
})), _ = (Number(
|
|
350
|
-
return /* @__PURE__ */
|
|
350
|
+
})), _ = (Number(c.subtotal) || 0) + (Number(c.taxAmount) || 0);
|
|
351
|
+
return /* @__PURE__ */ I(v, {
|
|
351
352
|
open: !0,
|
|
352
353
|
onClose: e,
|
|
353
|
-
title: "New invoice",
|
|
354
|
-
footer: /* @__PURE__ */
|
|
354
|
+
title: a("psw.invoices.new", "New invoice"),
|
|
355
|
+
footer: /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(R, {
|
|
355
356
|
variant: "outline",
|
|
356
357
|
onClick: e,
|
|
357
|
-
disabled:
|
|
358
|
-
children: "Cancel"
|
|
359
|
-
}), /* @__PURE__ */
|
|
358
|
+
disabled: o.isPending,
|
|
359
|
+
children: a("psw.common.cancel", "Cancel")
|
|
360
|
+
}), /* @__PURE__ */ I(R, {
|
|
360
361
|
onClick: () => {
|
|
361
|
-
if (
|
|
362
|
-
if (!
|
|
363
|
-
|
|
364
|
-
clientId:
|
|
365
|
-
engagementId:
|
|
366
|
-
number:
|
|
367
|
-
currency:
|
|
368
|
-
subtotal: Number(
|
|
369
|
-
taxAmount: Number(
|
|
362
|
+
if (p(null), !c.clientId) return p(a("psw.invoices.selectClient", "Select a client."));
|
|
363
|
+
if (!c.number.trim()) return p(a("psw.invoices.numberRequired", "Invoice number is required."));
|
|
364
|
+
o.mutate({
|
|
365
|
+
clientId: c.clientId,
|
|
366
|
+
engagementId: c.engagementId || null,
|
|
367
|
+
number: c.number.trim(),
|
|
368
|
+
currency: c.currency || "USD",
|
|
369
|
+
subtotal: Number(c.subtotal) || 0,
|
|
370
|
+
taxAmount: Number(c.taxAmount) || 0,
|
|
370
371
|
total: _,
|
|
371
|
-
issueDate:
|
|
372
|
-
dueDate:
|
|
373
|
-
notes:
|
|
372
|
+
issueDate: c.issueDate ? new Date(c.issueDate).toISOString() : null,
|
|
373
|
+
dueDate: c.dueDate ? new Date(c.dueDate).toISOString() : null,
|
|
374
|
+
notes: c.notes.trim() || null
|
|
374
375
|
}, {
|
|
375
376
|
onSuccess: () => {
|
|
376
|
-
i(
|
|
377
|
+
i(c.number.trim()), e();
|
|
377
378
|
},
|
|
378
|
-
onError: (e) =>
|
|
379
|
+
onError: (e) => p(e instanceof Error ? e.message : a("psw.common.failed", "Failed."))
|
|
379
380
|
});
|
|
380
381
|
},
|
|
381
|
-
disabled:
|
|
382
|
-
children:
|
|
382
|
+
disabled: o.isPending,
|
|
383
|
+
children: o.isPending ? a("psw.common.creating", "Creating…") : a("psw.invoices.create", "Create invoice")
|
|
383
384
|
})] }),
|
|
384
|
-
children: /* @__PURE__ */
|
|
385
|
+
children: /* @__PURE__ */ L("div", {
|
|
385
386
|
className: "space-y-3",
|
|
386
387
|
children: [
|
|
387
|
-
u && /* @__PURE__ */
|
|
388
|
+
u && /* @__PURE__ */ I(f, {
|
|
388
389
|
tone: "danger",
|
|
389
390
|
children: u
|
|
390
391
|
}),
|
|
391
|
-
/* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ L("div", {
|
|
392
393
|
className: "grid grid-cols-2 gap-3",
|
|
393
|
-
children: [/* @__PURE__ */
|
|
394
|
-
label: "Client",
|
|
394
|
+
children: [/* @__PURE__ */ I(h, {
|
|
395
|
+
label: a("psw.common.client", "Client"),
|
|
395
396
|
required: !0,
|
|
396
|
-
children: /* @__PURE__ */
|
|
397
|
-
value:
|
|
398
|
-
onChange:
|
|
399
|
-
children: [/* @__PURE__ */
|
|
397
|
+
children: /* @__PURE__ */ L(y, {
|
|
398
|
+
value: c.clientId,
|
|
399
|
+
onChange: g("clientId"),
|
|
400
|
+
children: [/* @__PURE__ */ I("option", {
|
|
400
401
|
value: "",
|
|
401
|
-
children: "Select…"
|
|
402
|
-
}),
|
|
402
|
+
children: a("psw.common.select", "Select…")
|
|
403
|
+
}), s.data?.items.map((e) => /* @__PURE__ */ I("option", {
|
|
403
404
|
value: e.id,
|
|
404
405
|
children: e.name
|
|
405
406
|
}, e.id))]
|
|
406
407
|
})
|
|
407
|
-
}), /* @__PURE__ */
|
|
408
|
-
label: "Number",
|
|
408
|
+
}), /* @__PURE__ */ I(h, {
|
|
409
|
+
label: a("psw.invoices.number", "Number"),
|
|
409
410
|
required: !0,
|
|
410
|
-
children: /* @__PURE__ */
|
|
411
|
-
value:
|
|
412
|
-
onChange:
|
|
411
|
+
children: /* @__PURE__ */ I(T, {
|
|
412
|
+
value: c.number,
|
|
413
|
+
onChange: g("number"),
|
|
413
414
|
placeholder: "INV-2026-014"
|
|
414
415
|
})
|
|
415
416
|
})]
|
|
416
417
|
}),
|
|
417
|
-
/* @__PURE__ */
|
|
418
|
-
label: "Engagement (optional)",
|
|
419
|
-
children: /* @__PURE__ */
|
|
420
|
-
value:
|
|
421
|
-
onChange:
|
|
422
|
-
disabled: !
|
|
423
|
-
children: [/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ I(h, {
|
|
419
|
+
label: a("psw.invoices.engagementOptional", "Engagement (optional)"),
|
|
420
|
+
children: /* @__PURE__ */ L(y, {
|
|
421
|
+
value: c.engagementId,
|
|
422
|
+
onChange: g("engagementId"),
|
|
423
|
+
disabled: !c.clientId,
|
|
424
|
+
children: [/* @__PURE__ */ I("option", {
|
|
424
425
|
value: "",
|
|
425
|
-
children: "None"
|
|
426
|
-
}),
|
|
426
|
+
children: a("psw.common.none", "None")
|
|
427
|
+
}), m.data?.items.map((e) => /* @__PURE__ */ I("option", {
|
|
427
428
|
value: e.id,
|
|
428
429
|
children: e.name
|
|
429
430
|
}, e.id))]
|
|
430
431
|
})
|
|
431
432
|
}),
|
|
432
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ L("div", {
|
|
433
434
|
className: "grid grid-cols-3 gap-3",
|
|
434
435
|
children: [
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
-
label: "Subtotal",
|
|
437
|
-
children: /* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ I(h, {
|
|
437
|
+
label: a("psw.invoices.subtotal", "Subtotal"),
|
|
438
|
+
children: /* @__PURE__ */ I(T, {
|
|
438
439
|
type: "number",
|
|
439
440
|
min: "0",
|
|
440
|
-
value:
|
|
441
|
-
onChange:
|
|
441
|
+
value: c.subtotal,
|
|
442
|
+
onChange: g("subtotal")
|
|
442
443
|
})
|
|
443
444
|
}),
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
-
label: "Tax",
|
|
446
|
-
children: /* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ I(h, {
|
|
446
|
+
label: a("psw.invoices.tax", "Tax"),
|
|
447
|
+
children: /* @__PURE__ */ I(T, {
|
|
447
448
|
type: "number",
|
|
448
449
|
min: "0",
|
|
449
|
-
value:
|
|
450
|
-
onChange:
|
|
450
|
+
value: c.taxAmount,
|
|
451
|
+
onChange: g("taxAmount")
|
|
451
452
|
})
|
|
452
453
|
}),
|
|
453
|
-
/* @__PURE__ */
|
|
454
|
-
label: "Currency",
|
|
455
|
-
children: /* @__PURE__ */
|
|
456
|
-
value:
|
|
457
|
-
onChange:
|
|
454
|
+
/* @__PURE__ */ I(h, {
|
|
455
|
+
label: a("psw.invoices.currency", "Currency"),
|
|
456
|
+
children: /* @__PURE__ */ I(T, {
|
|
457
|
+
value: c.currency,
|
|
458
|
+
onChange: g("currency"),
|
|
458
459
|
maxLength: 3
|
|
459
460
|
})
|
|
460
461
|
})
|
|
461
462
|
]
|
|
462
463
|
}),
|
|
463
|
-
/* @__PURE__ */
|
|
464
|
+
/* @__PURE__ */ L("div", {
|
|
464
465
|
className: "rounded-lg bg-bg-sunken px-3 py-2 text-sm text-text-secondary",
|
|
465
466
|
children: [
|
|
466
|
-
"Total:",
|
|
467
|
+
a("psw.invoices.totalLabel", "Total:"),
|
|
467
468
|
" ",
|
|
468
|
-
/* @__PURE__ */
|
|
469
|
+
/* @__PURE__ */ I("span", {
|
|
469
470
|
className: "font-semibold text-text-primary",
|
|
470
|
-
children:
|
|
471
|
+
children: O(_, c.currency)
|
|
471
472
|
})
|
|
472
473
|
]
|
|
473
474
|
}),
|
|
474
|
-
/* @__PURE__ */
|
|
475
|
+
/* @__PURE__ */ L("div", {
|
|
475
476
|
className: "grid grid-cols-2 gap-3",
|
|
476
|
-
children: [/* @__PURE__ */
|
|
477
|
-
label: "Issue date",
|
|
478
|
-
children: /* @__PURE__ */
|
|
477
|
+
children: [/* @__PURE__ */ I(h, {
|
|
478
|
+
label: a("psw.invoices.issueDate", "Issue date"),
|
|
479
|
+
children: /* @__PURE__ */ I(T, {
|
|
479
480
|
type: "date",
|
|
480
|
-
value:
|
|
481
|
-
onChange:
|
|
481
|
+
value: c.issueDate,
|
|
482
|
+
onChange: g("issueDate")
|
|
482
483
|
})
|
|
483
|
-
}), /* @__PURE__ */
|
|
484
|
-
label: "Due date",
|
|
485
|
-
children: /* @__PURE__ */
|
|
484
|
+
}), /* @__PURE__ */ I(h, {
|
|
485
|
+
label: a("psw.common.dueDate", "Due date"),
|
|
486
|
+
children: /* @__PURE__ */ I(T, {
|
|
486
487
|
type: "date",
|
|
487
|
-
value:
|
|
488
|
-
onChange:
|
|
488
|
+
value: c.dueDate,
|
|
489
|
+
onChange: g("dueDate")
|
|
489
490
|
})
|
|
490
491
|
})]
|
|
491
492
|
}),
|
|
492
|
-
/* @__PURE__ */
|
|
493
|
-
label: "Notes",
|
|
494
|
-
children: /* @__PURE__ */
|
|
495
|
-
value:
|
|
496
|
-
onChange:
|
|
493
|
+
/* @__PURE__ */ I(h, {
|
|
494
|
+
label: a("psw.common.notes", "Notes"),
|
|
495
|
+
children: /* @__PURE__ */ I(w, {
|
|
496
|
+
value: c.notes,
|
|
497
|
+
onChange: g("notes")
|
|
497
498
|
})
|
|
498
499
|
})
|
|
499
500
|
]
|
|
@@ -501,6 +502,6 @@ var B = [
|
|
|
501
502
|
});
|
|
502
503
|
};
|
|
503
504
|
//#endregion
|
|
504
|
-
export {
|
|
505
|
+
export { z as InvoicesPage };
|
|
505
506
|
|
|
506
507
|
//# sourceMappingURL=InvoicesPage.js.map
|