@tesouro/embedded-components-react 0.3.14 → 0.3.16
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/libs/tesouro-embedded-components-react/monite-sdk/dist/index247.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index392.js +124 -124
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index418.js +116 -116
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index443.js +94 -94
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +1206 -1201
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +2625 -2626
- package/package.json +1 -1
|
@@ -12,170 +12,170 @@ import { CenteredContentBox as ee } from "./index231.js";
|
|
|
12
12
|
import "./index232.js";
|
|
13
13
|
import { MoniteScopedProviders as l } from "./index237.js";
|
|
14
14
|
import { classNames as u } from "./index344.js";
|
|
15
|
-
import { useGetPayableCounterpart as
|
|
16
|
-
import { usePayableDetailsThemeProps as
|
|
17
|
-
import { useLedgerAccounts as
|
|
15
|
+
import { useGetPayableCounterpart as d } from "./index359.js";
|
|
16
|
+
import { usePayableDetailsThemeProps as te } from "./index360.js";
|
|
17
|
+
import { useLedgerAccounts as ne } from "./index363.js";
|
|
18
18
|
import "./index378.js";
|
|
19
|
-
import { isFieldRequired as
|
|
20
|
-
import { isPayableInOCRProcessing as
|
|
21
|
-
import { usePayableDetailsInfo as
|
|
19
|
+
import { isFieldRequired as f } from "./index380.js";
|
|
20
|
+
import { isPayableInOCRProcessing as re } from "./index398.js";
|
|
21
|
+
import { usePayableDetailsInfo as p } from "./index410.js";
|
|
22
22
|
import { UserDisplayCell as ie } from "./index411.js";
|
|
23
23
|
import { PayableApprovalFlowSection as ae } from "./index414.js";
|
|
24
24
|
import { StyledLabelTableCell as m } from "./index415.js";
|
|
25
25
|
import { TagsModal as h } from "./index416.js";
|
|
26
26
|
import "./index417.js";
|
|
27
|
-
import { useMemo as g, useState as
|
|
28
|
-
import { Sparkles as
|
|
29
|
-
import { Fragment as
|
|
30
|
-
import { Box as
|
|
27
|
+
import { useMemo as g, useState as oe } from "react";
|
|
28
|
+
import { Sparkles as _ } from "lucide-react";
|
|
29
|
+
import { Fragment as v, jsx as y, jsxs as b } from "@emotion/react/jsx-runtime";
|
|
30
|
+
import { Box as x, Chip as S, CircularProgress as C, Grid as w, IconButton as se, Paper as T, Stack as E, Table as D, TableBody as O, TableCell as k, TableHead as A, TableRow as j, Tooltip as M, Typography as N } from "@mui/material";
|
|
31
31
|
import { useLingui as P } from "@lingui/react";
|
|
32
32
|
import { styled as F } from "@mui/material/styles";
|
|
33
33
|
import ce from "@mui/icons-material/CachedOutlined";
|
|
34
34
|
import le from "@mui/icons-material/Edit";
|
|
35
35
|
import I from "@mui/icons-material/WarningAmberRounded";
|
|
36
36
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index418.js
|
|
37
|
-
var L = F(
|
|
37
|
+
var L = F(x)(() => ({
|
|
38
38
|
pb: 6,
|
|
39
39
|
display: "flex",
|
|
40
40
|
flex: "1 1 auto",
|
|
41
41
|
overflow: "auto",
|
|
42
42
|
width: "100%",
|
|
43
43
|
height: 0
|
|
44
|
-
})), R = (e) => /* @__PURE__ */
|
|
45
|
-
let { i18n: M } = P(), { locale: F } = n(), { formatCurrencyToDisplay: I } = i(), { ocrRequiredFields: R, optionalFields: z } =
|
|
44
|
+
})), R = (e) => /* @__PURE__ */ y(l, { children: /* @__PURE__ */ y(z, { ...e }) }), z = ({ payable: r, enableGLCodes: l, updateTags: _, ...C }) => {
|
|
45
|
+
let { i18n: M } = P(), { locale: F } = n(), { formatCurrencyToDisplay: I } = i(), { ocrRequiredFields: R, optionalFields: z } = te(C), { showInvoiceDate: V, showTags: H } = c(z, {
|
|
46
46
|
showInvoiceDate: !0,
|
|
47
47
|
showTags: !0
|
|
48
|
-
}), { counterpart: U, counterpartRawName: ue, isCounterpartLoading: de, isCounterpartAIMatched: fe, isCounterpartMatchingToOCRFound: pe } =
|
|
48
|
+
}), { counterpart: U, counterpartRawName: ue, isCounterpartLoading: de, isCounterpartAIMatched: fe, isCounterpartMatchingToOCRFound: pe } = d({ payable: r }), { counterpartBankAccountQuery: W, lineItemsQuery: me } = p({
|
|
49
49
|
currentCounterpartId: U?.id,
|
|
50
50
|
payableId: r.id
|
|
51
|
-
}), { data: G } =
|
|
51
|
+
}), { data: G } = ne(l), he = (e) => {
|
|
52
52
|
if (!e || !G?.data) return;
|
|
53
53
|
let t = G.data.find((t) => t.id === e);
|
|
54
54
|
if (!t) return;
|
|
55
55
|
let n = t.nominal_code && t.type ? `${t.nominal_code} — ${t.type}` : t.nominal_code ?? t.type ?? "";
|
|
56
56
|
return n ? `${M._("GL code")}: ${n}` : void 0;
|
|
57
|
-
}, { data: ge } = me, _e = ge?.data, { data: K } = a(U?.id), { data: q } = o(r.was_created_by_user_id), { data: J, isLoading: Y } = s(r.approval_policy_id), ve = !!J?.id, X = g(() => K?.find((e) => e.is_default), [K]), Z = g(() => W.data?.data.find((e) => e.id === r.counterpart_bank_account_id), [W, r]), Q = "Monite-PayableDetailsInfo", [ye, $] =
|
|
58
|
-
return
|
|
59
|
-
className: u(t, Q, "
|
|
60
|
-
children: /* @__PURE__ */
|
|
57
|
+
}, { data: ge } = me, _e = ge?.data, { data: K } = a(U?.id), { data: q } = o(r.was_created_by_user_id), { data: J, isLoading: Y } = s(r.approval_policy_id), ve = !!J?.id, X = g(() => K?.find((e) => e.is_default), [K]), Z = g(() => W.data?.data.find((e) => e.id === r.counterpart_bank_account_id), [W, r]), Q = "Monite-PayableDetailsInfo", [ye, $] = oe(!1);
|
|
58
|
+
return re(r) ? /* @__PURE__ */ y(L, {
|
|
59
|
+
className: u(t, Q, Q + "--ocr-processing"),
|
|
60
|
+
children: /* @__PURE__ */ y(ee, { children: /* @__PURE__ */ b(x, {
|
|
61
61
|
textAlign: "center",
|
|
62
62
|
children: [
|
|
63
|
-
/* @__PURE__ */
|
|
63
|
+
/* @__PURE__ */ y(ce, {
|
|
64
64
|
color: "primary",
|
|
65
65
|
fontSize: "large"
|
|
66
66
|
}),
|
|
67
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ y(N, {
|
|
68
68
|
variant: "h3",
|
|
69
69
|
mb: 2,
|
|
70
70
|
children: M._("File is being processed...")
|
|
71
71
|
}),
|
|
72
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ y(N, {
|
|
73
73
|
variant: "body1",
|
|
74
74
|
children: M._("Hold on, we’re processing the file you’ve uploaded.")
|
|
75
75
|
}),
|
|
76
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ y(N, {
|
|
77
77
|
variant: "body1",
|
|
78
78
|
children: M._("Usually it takes no more than 1–2 minutes.")
|
|
79
79
|
})
|
|
80
80
|
]
|
|
81
81
|
}) })
|
|
82
|
-
}) : /* @__PURE__ */
|
|
82
|
+
}) : /* @__PURE__ */ b(L, {
|
|
83
83
|
className: u(t, Q),
|
|
84
|
-
children: [/* @__PURE__ */
|
|
84
|
+
children: [/* @__PURE__ */ b(w, {
|
|
85
85
|
container: !0,
|
|
86
86
|
spacing: 3,
|
|
87
87
|
children: [
|
|
88
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ b(w, {
|
|
89
89
|
item: !0,
|
|
90
90
|
xs: 12,
|
|
91
|
-
className: "
|
|
92
|
-
children: [/* @__PURE__ */
|
|
91
|
+
className: Q + "-Details",
|
|
92
|
+
children: [/* @__PURE__ */ y(N, {
|
|
93
93
|
variant: "subtitle2",
|
|
94
94
|
mb: 2,
|
|
95
95
|
children: M._("Details")
|
|
96
|
-
}), /* @__PURE__ */
|
|
96
|
+
}), /* @__PURE__ */ y(T, {
|
|
97
97
|
variant: "outlined",
|
|
98
|
-
children: /* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
isRequired:
|
|
98
|
+
children: /* @__PURE__ */ y(D, { children: /* @__PURE__ */ b(O, { children: [
|
|
99
|
+
/* @__PURE__ */ b(j, { children: [/* @__PURE__ */ y(m, {
|
|
100
|
+
isRequired: f("invoiceNumber", R, r?.document_id) && r?.ocr_status === null,
|
|
101
101
|
children: M._("Number")
|
|
102
|
-
}), /* @__PURE__ */
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
isRequired:
|
|
102
|
+
}), /* @__PURE__ */ y(k, { children: r.document_id ?? "—" })] }),
|
|
103
|
+
/* @__PURE__ */ b(j, { children: [/* @__PURE__ */ y(m, {
|
|
104
|
+
isRequired: f("counterpartName", R) && r?.ocr_status === null,
|
|
105
105
|
children: M._("Vendor")
|
|
106
|
-
}), /* @__PURE__ */
|
|
106
|
+
}), /* @__PURE__ */ y(k, { children: /* @__PURE__ */ y(B, {
|
|
107
107
|
counterpart: U,
|
|
108
108
|
counterpartRawName: ue,
|
|
109
109
|
isCounterpartAIMatched: fe,
|
|
110
110
|
isCounterpartMatchingToOCRFound: pe,
|
|
111
111
|
isCounterpartLoading: de
|
|
112
112
|
}) })] }),
|
|
113
|
-
X && /* @__PURE__ */
|
|
114
|
-
isRequired:
|
|
113
|
+
X && /* @__PURE__ */ b(j, { children: [/* @__PURE__ */ y(m, {
|
|
114
|
+
isRequired: f("contactPerson", R) && r?.ocr_status === null,
|
|
115
115
|
children: M._("Contact person")
|
|
116
|
-
}), /* @__PURE__ */
|
|
117
|
-
Z && /* @__PURE__ */
|
|
118
|
-
isRequired:
|
|
116
|
+
}), /* @__PURE__ */ y(k, { children: `${X.first_name} ${X.last_name}` })] }),
|
|
117
|
+
Z && /* @__PURE__ */ b(j, { children: [/* @__PURE__ */ y(m, {
|
|
118
|
+
isRequired: f("counterpartBankAccount", R, Z?.name) && r?.ocr_status === null,
|
|
119
119
|
children: M._("Bank account")
|
|
120
|
-
}), /* @__PURE__ */
|
|
121
|
-
V && /* @__PURE__ */
|
|
122
|
-
isRequired:
|
|
120
|
+
}), /* @__PURE__ */ y(k, { children: Z.name })] }),
|
|
121
|
+
V && /* @__PURE__ */ b(j, { children: [/* @__PURE__ */ y(m, {
|
|
122
|
+
isRequired: f("issueDate", R) && r?.ocr_status === null,
|
|
123
123
|
children: M._("Issue date")
|
|
124
|
-
}), /* @__PURE__ */
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
isRequired:
|
|
124
|
+
}), /* @__PURE__ */ y(k, { children: r.issued_at ? M.date(e(r.issued_at), F.dateFormat) : "—" })] }),
|
|
125
|
+
/* @__PURE__ */ b(j, { children: [/* @__PURE__ */ y(m, {
|
|
126
|
+
isRequired: f("dueDate", R, r.due_date) && r?.ocr_status === null,
|
|
127
127
|
children: M._("Due date")
|
|
128
|
-
}), /* @__PURE__ */
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
isRequired:
|
|
128
|
+
}), /* @__PURE__ */ y(k, { children: r.due_date ? M.date(e(r.due_date), F.dateFormat) : "—" })] }),
|
|
129
|
+
/* @__PURE__ */ b(j, { children: [/* @__PURE__ */ y(m, {
|
|
130
|
+
isRequired: f("amount", R) && r?.ocr_status === null,
|
|
131
131
|
children: M._("Total")
|
|
132
|
-
}), /* @__PURE__ */
|
|
132
|
+
}), /* @__PURE__ */ y(k, { children: /* @__PURE__ */ y(x, {
|
|
133
133
|
sx: {
|
|
134
134
|
display: "flex",
|
|
135
135
|
justifyContent: "space-between"
|
|
136
136
|
},
|
|
137
|
-
children: /* @__PURE__ */
|
|
137
|
+
children: /* @__PURE__ */ y(x, { children: r.total_amount && r.currency ? I(r.total_amount, r.currency) : r.currency ? I(0, r.currency) : "—" })
|
|
138
138
|
}) })] }),
|
|
139
|
-
H && /* @__PURE__ */
|
|
140
|
-
isRequired:
|
|
139
|
+
H && /* @__PURE__ */ b(j, { children: [/* @__PURE__ */ y(m, {
|
|
140
|
+
isRequired: f("tags", R, r.tags?.[0]?.id) && r?.ocr_status === null,
|
|
141
141
|
children: M._("Tags")
|
|
142
|
-
}), /* @__PURE__ */
|
|
142
|
+
}), /* @__PURE__ */ y(k, { children: /* @__PURE__ */ b(E, {
|
|
143
143
|
direction: "row",
|
|
144
144
|
gap: 1,
|
|
145
|
-
children: [/* @__PURE__ */
|
|
145
|
+
children: [/* @__PURE__ */ y(x, {
|
|
146
146
|
sx: { width: "100%" },
|
|
147
|
-
children: r.tags?.length ? /* @__PURE__ */
|
|
147
|
+
children: r.tags?.length ? /* @__PURE__ */ y(E, {
|
|
148
148
|
spacing: 1,
|
|
149
149
|
direction: "row",
|
|
150
150
|
useFlexGap: !0,
|
|
151
151
|
flexWrap: "wrap",
|
|
152
|
-
children: r.tags.map((e) => /* @__PURE__ */
|
|
152
|
+
children: r.tags.map((e) => /* @__PURE__ */ y(S, {
|
|
153
153
|
label: e.name,
|
|
154
154
|
color: "primary",
|
|
155
155
|
sx: { maxWidth: 200 }
|
|
156
156
|
}, e.id))
|
|
157
|
-
}) : /* @__PURE__ */
|
|
157
|
+
}) : /* @__PURE__ */ y(N, {
|
|
158
158
|
variant: "body2",
|
|
159
159
|
sx: { marginTop: 1 },
|
|
160
160
|
children: M._("Not set")
|
|
161
161
|
})
|
|
162
|
-
}), /* @__PURE__ */
|
|
162
|
+
}), /* @__PURE__ */ y(x, { children: /* @__PURE__ */ y(se, {
|
|
163
163
|
"aria-label": M._("Edit tags"),
|
|
164
164
|
size: "small",
|
|
165
165
|
onClick: () => $(!0),
|
|
166
|
-
children: /* @__PURE__ */
|
|
166
|
+
children: /* @__PURE__ */ y(le, { fontSize: "small" })
|
|
167
167
|
}) })]
|
|
168
168
|
}) })] }),
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
isRequired:
|
|
169
|
+
/* @__PURE__ */ b(j, { children: [/* @__PURE__ */ y(m, {
|
|
170
|
+
isRequired: f("appliedPolicy", R) && r?.ocr_status === null,
|
|
171
171
|
children: M._("Applied policy")
|
|
172
|
-
}), /* @__PURE__ */
|
|
172
|
+
}), /* @__PURE__ */ y(k, { children: !Y && J?.name ? /* @__PURE__ */ b(x, {
|
|
173
173
|
sx: {
|
|
174
174
|
display: "flex",
|
|
175
175
|
alignItems: "center",
|
|
176
176
|
gap: 1
|
|
177
177
|
},
|
|
178
|
-
children: [/* @__PURE__ */
|
|
178
|
+
children: [/* @__PURE__ */ y("span", { children: J.name }), (r.status === "waiting_to_be_paid" || r.status === "paid" || r.status === "partially_paid") && /* @__PURE__ */ y(S, {
|
|
179
179
|
label: M._("Approved"),
|
|
180
180
|
color: "success",
|
|
181
181
|
size: "small"
|
|
@@ -184,44 +184,44 @@ var L = F(S)(() => ({
|
|
|
184
184
|
] }) })
|
|
185
185
|
})]
|
|
186
186
|
}),
|
|
187
|
-
ve && J && /* @__PURE__ */
|
|
187
|
+
ve && J && /* @__PURE__ */ y(w, {
|
|
188
188
|
item: !0,
|
|
189
189
|
xs: 12,
|
|
190
|
-
children: /* @__PURE__ */
|
|
190
|
+
children: /* @__PURE__ */ y(ae, {
|
|
191
191
|
approvalPolicy: J,
|
|
192
192
|
payableId: r.id,
|
|
193
193
|
currentStatus: r.status
|
|
194
194
|
})
|
|
195
195
|
}),
|
|
196
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ b(w, {
|
|
197
197
|
item: !0,
|
|
198
198
|
xs: 12,
|
|
199
|
-
className: "
|
|
200
|
-
children: [/* @__PURE__ */
|
|
199
|
+
className: Q + "-Items",
|
|
200
|
+
children: [/* @__PURE__ */ y(N, {
|
|
201
201
|
variant: "subtitle2",
|
|
202
202
|
mb: 2,
|
|
203
203
|
children: M._("Items")
|
|
204
|
-
}), /* @__PURE__ */
|
|
204
|
+
}), /* @__PURE__ */ y(T, {
|
|
205
205
|
variant: "outlined",
|
|
206
|
-
children: /* @__PURE__ */
|
|
207
|
-
/* @__PURE__ */
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
/* @__PURE__ */
|
|
210
|
-
/* @__PURE__ */
|
|
206
|
+
children: /* @__PURE__ */ b(D, { children: [/* @__PURE__ */ y(A, { children: /* @__PURE__ */ b(j, { children: [
|
|
207
|
+
/* @__PURE__ */ y(k, { children: M._("Name") }),
|
|
208
|
+
/* @__PURE__ */ y(k, { children: M._("Quantity") }),
|
|
209
|
+
/* @__PURE__ */ y(k, { children: M._("Price") }),
|
|
210
|
+
/* @__PURE__ */ y(k, {
|
|
211
211
|
align: "right",
|
|
212
212
|
children: M._("Total, tax")
|
|
213
213
|
})
|
|
214
|
-
] }) }), /* @__PURE__ */
|
|
215
|
-
/* @__PURE__ */
|
|
214
|
+
] }) }), /* @__PURE__ */ y(O, { children: _e?.map((e) => /* @__PURE__ */ b(j, { children: [
|
|
215
|
+
/* @__PURE__ */ y(k, { children: /* @__PURE__ */ b(E, { children: [/* @__PURE__ */ y(x, { children: e.name }), l && e.ledger_account_id && /* @__PURE__ */ y(N, {
|
|
216
216
|
variant: "body2",
|
|
217
217
|
color: "secondary.main",
|
|
218
218
|
children: he(e.ledger_account_id)
|
|
219
219
|
})] }) }),
|
|
220
|
-
/* @__PURE__ */
|
|
221
|
-
/* @__PURE__ */
|
|
222
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ y(k, { children: e.quantity }),
|
|
221
|
+
/* @__PURE__ */ y(k, { children: e.unit_price ? I(e.unit_price, r.currency ?? "USD") : "—" }),
|
|
222
|
+
/* @__PURE__ */ y(k, {
|
|
223
223
|
align: "right",
|
|
224
|
-
children: e.subtotal && r.currency ? /* @__PURE__ */
|
|
224
|
+
children: e.subtotal && r.currency ? /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(x, { children: I(e.subtotal ?? 0, r.currency) }), /* @__PURE__ */ b(x, {
|
|
225
225
|
sx: { color: "secondary.main" },
|
|
226
226
|
children: [
|
|
227
227
|
M._("excl. Tax"),
|
|
@@ -233,31 +233,31 @@ var L = F(S)(() => ({
|
|
|
233
233
|
] }, e.id)) })] })
|
|
234
234
|
})]
|
|
235
235
|
}),
|
|
236
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ y(w, {
|
|
237
237
|
item: !0,
|
|
238
238
|
xs: 12,
|
|
239
|
-
className: "
|
|
240
|
-
children: /* @__PURE__ */
|
|
239
|
+
className: Q + "-Totals",
|
|
240
|
+
children: /* @__PURE__ */ y(T, {
|
|
241
241
|
variant: "outlined",
|
|
242
|
-
children: /* @__PURE__ */
|
|
243
|
-
/* @__PURE__ */
|
|
242
|
+
children: /* @__PURE__ */ y(D, { children: /* @__PURE__ */ b(O, { children: [
|
|
243
|
+
/* @__PURE__ */ b(j, { children: [/* @__PURE__ */ y(k, { children: M._("Subtotal") }), /* @__PURE__ */ y(k, {
|
|
244
244
|
align: "right",
|
|
245
245
|
children: r.subtotal && r.currency ? I(r.subtotal, r.currency) : r.currency ? I(0, r.currency) : "—"
|
|
246
246
|
})] }),
|
|
247
|
-
!!r.discount && r.currency && /* @__PURE__ */
|
|
247
|
+
!!r.discount && r.currency && /* @__PURE__ */ b(j, { children: [/* @__PURE__ */ y(k, { children: M._("Discount") }), /* @__PURE__ */ y(k, {
|
|
248
248
|
align: "right",
|
|
249
249
|
children: I(r.discount ?? 0, r.currency)
|
|
250
250
|
})] }),
|
|
251
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ b(j, { children: [/* @__PURE__ */ y(k, { children: M._("Tax Total") }), /* @__PURE__ */ y(k, {
|
|
252
252
|
align: "right",
|
|
253
253
|
children: r.tax_amount && r.currency ? I(r.tax_amount, r.currency) : r.currency ? I(0, r.currency) : "—"
|
|
254
254
|
})] }),
|
|
255
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ b(j, { children: [/* @__PURE__ */ y(k, { children: /* @__PURE__ */ y(N, {
|
|
256
256
|
variant: "subtitle1",
|
|
257
257
|
children: M._("Total")
|
|
258
|
-
}) }), /* @__PURE__ */
|
|
258
|
+
}) }), /* @__PURE__ */ y(k, {
|
|
259
259
|
align: "right",
|
|
260
|
-
children: /* @__PURE__ */
|
|
260
|
+
children: /* @__PURE__ */ y(N, {
|
|
261
261
|
variant: "subtitle1",
|
|
262
262
|
children: r.total_amount && r.currency ? I(r.total_amount, r.currency) : r.currency ? I(0, r.currency) : "—"
|
|
263
263
|
})
|
|
@@ -265,21 +265,21 @@ var L = F(S)(() => ({
|
|
|
265
265
|
] }) })
|
|
266
266
|
})
|
|
267
267
|
}),
|
|
268
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ b(w, {
|
|
269
269
|
item: !0,
|
|
270
270
|
xs: 12,
|
|
271
|
-
className: "
|
|
272
|
-
children: [/* @__PURE__ */
|
|
271
|
+
className: Q + "-History",
|
|
272
|
+
children: [/* @__PURE__ */ y(N, {
|
|
273
273
|
variant: "subtitle2",
|
|
274
274
|
mb: 2,
|
|
275
275
|
children: M._("History")
|
|
276
|
-
}), /* @__PURE__ */
|
|
276
|
+
}), /* @__PURE__ */ y(T, {
|
|
277
277
|
variant: "outlined",
|
|
278
|
-
children: /* @__PURE__ */
|
|
279
|
-
q && /* @__PURE__ */
|
|
280
|
-
isRequired:
|
|
278
|
+
children: /* @__PURE__ */ y(D, { children: /* @__PURE__ */ b(O, { children: [
|
|
279
|
+
q && /* @__PURE__ */ b(j, { children: [/* @__PURE__ */ y(m, {
|
|
280
|
+
isRequired: f("addedByUser", R) && r?.ocr_status === null,
|
|
281
281
|
children: M._("Added by")
|
|
282
|
-
}), /* @__PURE__ */
|
|
282
|
+
}), /* @__PURE__ */ y(k, { children: /* @__PURE__ */ y(ie, {
|
|
283
283
|
user: {
|
|
284
284
|
id: q.id,
|
|
285
285
|
first_name: q.first_name,
|
|
@@ -290,17 +290,17 @@ var L = F(S)(() => ({
|
|
|
290
290
|
avatarSize: 24,
|
|
291
291
|
typographyVariant: "body2"
|
|
292
292
|
}) })] }),
|
|
293
|
-
/* @__PURE__ */
|
|
294
|
-
isRequired:
|
|
293
|
+
/* @__PURE__ */ b(j, { children: [/* @__PURE__ */ y(m, {
|
|
294
|
+
isRequired: f("addedOn", R) && r?.ocr_status === null,
|
|
295
295
|
children: M._("Added on")
|
|
296
|
-
}), /* @__PURE__ */
|
|
296
|
+
}), /* @__PURE__ */ y(k, { children: r.created_at ? M.date(r.created_at, {
|
|
297
297
|
dateStyle: "short",
|
|
298
298
|
timeStyle: "short"
|
|
299
299
|
}) : "—" })] }),
|
|
300
|
-
/* @__PURE__ */
|
|
301
|
-
isRequired:
|
|
300
|
+
/* @__PURE__ */ b(j, { children: [/* @__PURE__ */ y(m, {
|
|
301
|
+
isRequired: f("updatedOn", R) && r?.ocr_status === null,
|
|
302
302
|
children: M._("Last updated on")
|
|
303
|
-
}), /* @__PURE__ */
|
|
303
|
+
}), /* @__PURE__ */ y(k, { children: r.updated_at ? M.date(r.updated_at, {
|
|
304
304
|
dateStyle: "short",
|
|
305
305
|
timeStyle: "short"
|
|
306
306
|
}) : "—" })] })
|
|
@@ -308,41 +308,41 @@ var L = F(S)(() => ({
|
|
|
308
308
|
})]
|
|
309
309
|
})
|
|
310
310
|
]
|
|
311
|
-
}), /* @__PURE__ */
|
|
311
|
+
}), /* @__PURE__ */ y(h, {
|
|
312
312
|
opened: ye,
|
|
313
313
|
value: r.tags || [],
|
|
314
|
-
updateTags:
|
|
314
|
+
updateTags: _,
|
|
315
315
|
onClose: () => $(!1)
|
|
316
316
|
})]
|
|
317
317
|
});
|
|
318
318
|
}, B = ({ counterpart: e, counterpartRawName: t, isCounterpartAIMatched: n, isCounterpartMatchingToOCRFound: i, isCounterpartLoading: a }) => {
|
|
319
319
|
let { i18n: o } = P();
|
|
320
|
-
if (a) return /* @__PURE__ */
|
|
320
|
+
if (a) return /* @__PURE__ */ y(C, {
|
|
321
321
|
size: 14,
|
|
322
322
|
color: "secondary"
|
|
323
323
|
});
|
|
324
324
|
let s = r(e);
|
|
325
|
-
return s && !i ? /* @__PURE__ */
|
|
325
|
+
return s && !i ? /* @__PURE__ */ b(E, {
|
|
326
326
|
component: "span",
|
|
327
327
|
gap: 1,
|
|
328
328
|
direction: "row",
|
|
329
|
-
children: [s, n && /* @__PURE__ */
|
|
329
|
+
children: [s, n && /* @__PURE__ */ y(M, {
|
|
330
330
|
title: o._("Vendor auto-matched by AI. The vendor name on the bill doesn’t exactly match the saved vendor, so AI selected the closest option."),
|
|
331
|
-
children: /* @__PURE__ */
|
|
331
|
+
children: /* @__PURE__ */ y(_, { className: "ttw:text-blue-600" })
|
|
332
332
|
})]
|
|
333
|
-
}) : t ? /* @__PURE__ */
|
|
333
|
+
}) : t ? /* @__PURE__ */ b(E, {
|
|
334
334
|
component: "span",
|
|
335
335
|
gap: 1,
|
|
336
336
|
direction: "row",
|
|
337
|
-
children: [t, /* @__PURE__ */
|
|
337
|
+
children: [t, /* @__PURE__ */ y(M, {
|
|
338
338
|
title: i ? o._("The vendor details in the bill don’t fully match the saved vendor.") : o._("The specified vendor has not been saved yet."),
|
|
339
|
-
children: /* @__PURE__ */
|
|
339
|
+
children: /* @__PURE__ */ y(I, {
|
|
340
340
|
color: "warning",
|
|
341
341
|
fontSize: "small",
|
|
342
342
|
sx: { alignSelf: "center" }
|
|
343
343
|
})
|
|
344
344
|
})]
|
|
345
|
-
}) : /* @__PURE__ */
|
|
345
|
+
}) : /* @__PURE__ */ y(v, { children: "—" });
|
|
346
346
|
};
|
|
347
347
|
//#endregion
|
|
348
348
|
export { R as PayableDetailsInfo };
|