@tesouro/embedded-components-react 0.11.192 → 0.11.193
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/bill-pay-widget/bills-list/feature/dist/index15.js +179 -171
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +124 -123
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index18.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index5.js +55 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index7.js +6 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index9.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index13.js +94 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index21.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index23.js +172 -167
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/mocks/labels.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@ import "../../../util/dist/index.js";
|
|
|
23
23
|
import { derivePayableStatus as te } from "../../../../shared/document-status/util/dist/lib/derivePayableStatus.js";
|
|
24
24
|
import { BillColumn as g } from "../../ui/dist/index22.js";
|
|
25
25
|
import "../../ui/dist/index.js";
|
|
26
|
-
import { BillQueue as _, DEFAULT_BILL_QUEUE as
|
|
26
|
+
import { BillQueue as _, DEFAULT_BILL_QUEUE as v, billQueueColumns as ne, billQueueFilters as re, billQueueStatusFilters as ie, billSortColumnId as ae, billSortField as oe } from "./index5.js";
|
|
27
27
|
import { BillSummaryCard as se, isBillSummaryCard as ce } from "./index10.js";
|
|
28
28
|
import { duplicateRemovalPrompt as le } from "./index12.js";
|
|
29
29
|
import { useBillsFilters as ue } from "./index15.js";
|
|
@@ -98,65 +98,69 @@ function we(e, t) {
|
|
|
98
98
|
return f;
|
|
99
99
|
}
|
|
100
100
|
function Te({ enabled: c = !0, canPay: d, canReadVendors: h = !0, isVendorFilterPaused: de = !1, filterLabels: Te, onOpenBill: ke, duplicateRowNote: Ae, attachmentLabel: je, duplicateGroupLabels: T, canManageDuplicates: Me = !1, duplicateView: E = w.AllBills, scheduledRelativeDayLabels: Ne, dueDateLabels: Pe, selectedSummaryCard: D, onSummaryCardChange: Fe }) {
|
|
101
|
-
let O = i(), [k, Ie] = S(D ? _.All :
|
|
101
|
+
let O = i(), [k, Ie] = S(D ? _.All : v), [Le, Re] = S(Ce), [ze, Be] = S(xe), [Ve, A] = S(), [He, Ue] = S(d);
|
|
102
102
|
d !== void 0 && He !== d && (Ue(d), A(void 0));
|
|
103
|
-
let
|
|
104
|
-
A(void 0),
|
|
103
|
+
let j = d ?? He, [We, Ge] = S(0), [M, Ke] = S(""), [N, qe] = S(""), [P, Je] = S(), [F, Ye] = S(), I = y(() => {
|
|
104
|
+
A(void 0), Ge(0);
|
|
105
105
|
}, []);
|
|
106
106
|
b(() => {
|
|
107
|
-
if (
|
|
107
|
+
if (M === N) return;
|
|
108
108
|
let e = setTimeout(() => {
|
|
109
|
-
|
|
109
|
+
qe(M), I();
|
|
110
110
|
}, 300);
|
|
111
111
|
return () => clearTimeout(e);
|
|
112
112
|
}, [
|
|
113
|
-
j,
|
|
114
113
|
M,
|
|
115
|
-
|
|
114
|
+
N,
|
|
115
|
+
I
|
|
116
116
|
]), b(() => {
|
|
117
|
-
|
|
118
|
-
}, [E,
|
|
119
|
-
let
|
|
120
|
-
|
|
117
|
+
I();
|
|
118
|
+
}, [E, I]);
|
|
119
|
+
let L = E === w.PossibleDuplicates, Xe = x(() => L ? [] : ie(k, j ?? !1), [
|
|
120
|
+
L,
|
|
121
|
+
k,
|
|
122
|
+
j
|
|
123
|
+
]), R = ue({
|
|
124
|
+
statusOptions: Xe,
|
|
121
125
|
offersVendorFilter: h,
|
|
122
126
|
isVendorFilterPaused: de,
|
|
123
127
|
labels: Te,
|
|
124
|
-
onFiltersChange:
|
|
128
|
+
onFiltersChange: I,
|
|
125
129
|
initialSummaryCard: D,
|
|
126
130
|
onSummaryCardChange: Fe,
|
|
127
131
|
today: O
|
|
128
|
-
}), { clearAll: Ze, filterByVendor: Qe, summaryCard:
|
|
129
|
-
let e = re(
|
|
132
|
+
}), { clearAll: Ze, filterByVendor: Qe, summaryCard: z, selectSummaryCard: B, applySummaryCard: $e } = R, et = z === se.Overdue && !O, tt = Le[0], nt = oe(tt?.id), rt = nt ? tt?.desc ? "desc" : "asc" : void 0, it = L ? _.All : k, at = x(() => {
|
|
133
|
+
let e = re(it, j ?? !1);
|
|
130
134
|
return {
|
|
131
|
-
...
|
|
135
|
+
...R.query,
|
|
132
136
|
...e,
|
|
133
|
-
limit:
|
|
134
|
-
pagination_token:
|
|
135
|
-
status__in:
|
|
136
|
-
duplicate_match_status:
|
|
137
|
-
counterpart_name__icontains:
|
|
137
|
+
limit: L ? C : ze,
|
|
138
|
+
pagination_token: L ? void 0 : Ve,
|
|
139
|
+
status__in: L ? void 0 : R.query.status__in ?? e.status__in,
|
|
140
|
+
duplicate_match_status: L ? "suspected" : void 0,
|
|
141
|
+
counterpart_name__icontains: N || void 0,
|
|
138
142
|
sort: nt,
|
|
139
143
|
order: rt
|
|
140
144
|
};
|
|
141
145
|
}, [
|
|
142
|
-
|
|
146
|
+
R.query,
|
|
143
147
|
ze,
|
|
144
148
|
Ve,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
+
L,
|
|
150
|
+
it,
|
|
151
|
+
j,
|
|
152
|
+
N,
|
|
149
153
|
nt,
|
|
150
154
|
rt
|
|
151
|
-
]), { organizationId:
|
|
152
|
-
...
|
|
153
|
-
enabled: c && d !== void 0 && !
|
|
155
|
+
]), { organizationId: ot } = r(), V = JSON.stringify([ot, at]), H = he({
|
|
156
|
+
...at,
|
|
157
|
+
enabled: c && d !== void 0 && !L && !et,
|
|
154
158
|
pollWhileOcrProcessing: !0
|
|
155
159
|
}), U = pe({
|
|
156
|
-
...
|
|
157
|
-
enabled: c &&
|
|
160
|
+
...at,
|
|
161
|
+
enabled: c && L,
|
|
158
162
|
maxPages: Se
|
|
159
|
-
}), W =
|
|
163
|
+
}), W = L ? {
|
|
160
164
|
...U,
|
|
161
165
|
data: { data: U.payables },
|
|
162
166
|
isLoading: U.isResolving,
|
|
@@ -201,27 +205,27 @@ function Te({ enabled: c = !0, canPay: d, canReadVendors: h = !0, isVendorFilter
|
|
|
201
205
|
backButton: T.cancelConfirmBackButton,
|
|
202
206
|
toast: T.confirmedToast
|
|
203
207
|
}
|
|
204
|
-
}), [T]),
|
|
205
|
-
|
|
208
|
+
}), [T]), st = P?.removeBy ?? "cancel", ct = y(async () => {
|
|
209
|
+
P && (await q(P.payable, a.Remove, J[P.removeBy].toast), Je(void 0));
|
|
206
210
|
}, [
|
|
207
211
|
q,
|
|
208
|
-
|
|
212
|
+
P,
|
|
209
213
|
J
|
|
210
|
-
]),
|
|
211
|
-
|
|
214
|
+
]), lt = y(async () => {
|
|
215
|
+
F && (await q(F.payable, a.Keep, T.dismissedToast, F.originalPayableId), Ye(void 0));
|
|
212
216
|
}, [
|
|
213
217
|
q,
|
|
214
218
|
T.dismissedToast,
|
|
215
|
-
|
|
216
|
-
]), [
|
|
219
|
+
F
|
|
220
|
+
]), [ut, dt] = S(V);
|
|
217
221
|
b(() => {
|
|
218
|
-
W.isFetching ||
|
|
222
|
+
W.isFetching || dt(V);
|
|
219
223
|
}, [W.isFetching, V]);
|
|
220
|
-
let
|
|
224
|
+
let ft = W.data?.data.length, pt = ft === 0, mt = ge({ enabled: c && pt }), ht = !pt || (mt.data?.count ?? 1) > 0, Y = x(() => E === w.PossibleDuplicates ? we(G, T) : /* @__PURE__ */ new Map(), [
|
|
221
225
|
E,
|
|
222
226
|
G,
|
|
223
227
|
T
|
|
224
|
-
]),
|
|
228
|
+
]), gt = x(() => {
|
|
225
229
|
if (Y.size === 0) return G;
|
|
226
230
|
let e = /* @__PURE__ */ new Map();
|
|
227
231
|
return G.forEach((t, n) => {
|
|
@@ -232,12 +236,12 @@ function Te({ enabled: c = !0, canPay: d, canReadVendors: h = !0, isVendorFilter
|
|
|
232
236
|
index: n,
|
|
233
237
|
order: e.get(Y.get(t.id)?.key ?? "") ?? n
|
|
234
238
|
})).sort((e, t) => e.order - t.order || l(e.payable, t.payable) || e.index - t.index).map(({ payable: e }) => e);
|
|
235
|
-
}, [G, Y]), { vendorNames: X, lookup:
|
|
239
|
+
}, [G, Y]), { vendorNames: X, lookup: _t } = fe({
|
|
236
240
|
payables: W.data?.data,
|
|
237
241
|
enabled: c,
|
|
238
242
|
canReadVendors: h,
|
|
239
243
|
isPaused: de
|
|
240
|
-
}),
|
|
244
|
+
}), vt = y((e) => {
|
|
241
245
|
let t = e.title || (e.vendorCounterpartId ? X.get(e.vendorCounterpartId) ?? "" : "");
|
|
242
246
|
return {
|
|
243
247
|
key: e.key,
|
|
@@ -248,7 +252,7 @@ function Te({ enabled: c = !0, canPay: d, canReadVendors: h = !0, isVendorFilter
|
|
|
248
252
|
title: t,
|
|
249
253
|
meta: e.meta
|
|
250
254
|
};
|
|
251
|
-
}, [X, T]), Z = x(() => Ee(
|
|
255
|
+
}, [X, T]), Z = x(() => Ee(gt.map((e) => {
|
|
252
256
|
let r = te({
|
|
253
257
|
apiStatus: e.status,
|
|
254
258
|
dueDate: e.due_date,
|
|
@@ -259,26 +263,26 @@ function Te({ enabled: c = !0, canPay: d, canReadVendors: h = !0, isVendorFilter
|
|
|
259
263
|
today: O,
|
|
260
264
|
isScheduled: r.status === "scheduled",
|
|
261
265
|
labels: Pe
|
|
262
|
-
}), d = Y.get(e.id), h = s(e), g = ee(e) || (e.counterpart_id ? X.get(e.counterpart_id) ?? "" : ""),
|
|
266
|
+
}), d = Y.get(e.id), h = s(e), g = ee(e) || (e.counterpart_id ? X.get(e.counterpart_id) ?? "" : ""), _ = e.document_id ?? "", v = p(e.status), ne = d?.originalPayableId !== void 0 && d.originalPayableId === e.id, re = L && h && Me && d ? {
|
|
263
267
|
triggerLabel: T.menuTrigger({
|
|
264
268
|
vendorLabel: g,
|
|
265
|
-
invoiceNumberLabel:
|
|
269
|
+
invoiceNumberLabel: _
|
|
266
270
|
}),
|
|
267
271
|
items: [{
|
|
268
272
|
id: "not-duplicate",
|
|
269
273
|
label: T.notDuplicateAction,
|
|
270
274
|
icon: ye,
|
|
271
275
|
disabled: K.isPending,
|
|
272
|
-
onSelect: () =>
|
|
276
|
+
onSelect: () => Ye({
|
|
273
277
|
payable: e,
|
|
274
|
-
originalPayableId:
|
|
278
|
+
originalPayableId: ne ? void 0 : d.originalPayableId
|
|
275
279
|
})
|
|
276
280
|
}, ...v ? [{
|
|
277
281
|
id: "cancel-duplicate",
|
|
278
282
|
label: J[v].action,
|
|
279
283
|
icon: v === "delete" ? be : ve,
|
|
280
284
|
disabled: K.isPending,
|
|
281
|
-
onSelect: () =>
|
|
285
|
+
onSelect: () => Je({
|
|
282
286
|
payable: e,
|
|
283
287
|
removeBy: v
|
|
284
288
|
})
|
|
@@ -287,145 +291,142 @@ function Te({ enabled: c = !0, canPay: d, canReadVendors: h = !0, isVendorFilter
|
|
|
287
291
|
return {
|
|
288
292
|
rowKey: e.id,
|
|
289
293
|
vendorLabel: g,
|
|
290
|
-
vendorLookup: g || !e.counterpart_id ? void 0 : Oe(
|
|
291
|
-
invoiceNumberLabel:
|
|
294
|
+
vendorLookup: g || !e.counterpart_id ? void 0 : Oe(_t),
|
|
295
|
+
invoiceNumberLabel: _,
|
|
292
296
|
issueDateLabel: t(e.issued_at),
|
|
293
297
|
dueDateLabel: u.label,
|
|
294
298
|
dueDateOverdueLabel: u.overdueLabel,
|
|
295
299
|
dueDateAccessibleLabel: u.accessibleLabel,
|
|
296
300
|
scheduledDateLabel: l.label,
|
|
297
301
|
scheduledDateExact: l.absoluteLabel,
|
|
298
|
-
scheduledDateIsGap: B === _.Scheduled,
|
|
299
302
|
paidDateLabel: t(e.paid_at?.slice(0, 10)),
|
|
300
303
|
amountDueLabel: c(i),
|
|
301
304
|
amountPaidLabel: a ? c(e.amount_paid) : "",
|
|
302
|
-
amountPaidIsGap: B === _.Paid,
|
|
303
305
|
amountScheduledLabel: c(e.amount_to_pay ?? i),
|
|
304
306
|
totalAmountLabel: c(e.total_amount),
|
|
305
307
|
attachment: e.file_id ? { label: je } : void 0,
|
|
306
308
|
status: r.status,
|
|
307
309
|
statusTone: r.tone,
|
|
308
310
|
addedOnLabel: t(e.created_at?.slice(0, 10)),
|
|
309
|
-
...d ? { group:
|
|
310
|
-
...
|
|
311
|
-
...!
|
|
311
|
+
...d ? { group: vt(d) } : {},
|
|
312
|
+
...re ? { menu: re } : {},
|
|
313
|
+
...!L && !d && h ? {
|
|
312
314
|
marker: "duplicate",
|
|
313
315
|
rowNote: Ae
|
|
314
316
|
} : {},
|
|
315
317
|
onOpen: () => ke(e.id, f(e.status))
|
|
316
318
|
};
|
|
317
319
|
}), T), [
|
|
318
|
-
|
|
320
|
+
gt,
|
|
319
321
|
Y,
|
|
320
322
|
T,
|
|
321
323
|
J,
|
|
322
324
|
K.isPending,
|
|
323
325
|
Me,
|
|
324
|
-
|
|
326
|
+
L,
|
|
325
327
|
Ae,
|
|
326
328
|
je,
|
|
327
329
|
Ne,
|
|
328
330
|
Pe,
|
|
329
331
|
O,
|
|
330
332
|
ke,
|
|
331
|
-
B,
|
|
332
333
|
X,
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
]),
|
|
334
|
+
_t,
|
|
335
|
+
vt
|
|
336
|
+
]), yt = x(() => L ? De(Z, C) : [], [Z, L]), Q = Math.min(We, Math.max(0, yt.length - 1)), bt = L ? yt[Q] ?? [] : Z, $ = y((e) => {
|
|
336
337
|
let t = e;
|
|
337
|
-
Ie(t), t !== _.All &&
|
|
338
|
+
Ie(t), t !== _.All && B(null), Re((e) => {
|
|
338
339
|
let n = e[0]?.id;
|
|
339
|
-
return n ?
|
|
340
|
-
}),
|
|
341
|
-
}, [
|
|
340
|
+
return n ? ne(t).some((e) => ae(e) === n) ? e : Ce : e;
|
|
341
|
+
}), I();
|
|
342
|
+
}, [I, B]), xt = y((e) => {
|
|
342
343
|
if (!ce(e)) return;
|
|
343
|
-
let t = e ===
|
|
344
|
-
t && $(_.All),
|
|
344
|
+
let t = e === z ? null : e;
|
|
345
|
+
t && $(_.All), B(t);
|
|
345
346
|
}, [
|
|
346
347
|
$,
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
]),
|
|
348
|
+
B,
|
|
349
|
+
z
|
|
350
|
+
]), St = _e(D);
|
|
350
351
|
b(() => {
|
|
351
|
-
D !== void 0 && D !==
|
|
352
|
+
D !== void 0 && D !== St.current && (St.current = D, D !== z && (D && $(_.All), $e(D)));
|
|
352
353
|
}, [
|
|
353
354
|
$e,
|
|
354
355
|
$,
|
|
355
356
|
D,
|
|
356
|
-
|
|
357
|
+
z
|
|
357
358
|
]);
|
|
358
|
-
let
|
|
359
|
-
$(_.All),
|
|
360
|
-
}, [Qe, $]),
|
|
361
|
-
|
|
362
|
-
}, [Ze,
|
|
363
|
-
Re((t) => typeof e == "function" ? e(t) : e),
|
|
364
|
-
}, [
|
|
365
|
-
Be(e),
|
|
366
|
-
}, [
|
|
367
|
-
|
|
359
|
+
let Ct = y((e) => {
|
|
360
|
+
$(_.All), Ke(""), Qe(e);
|
|
361
|
+
}, [Qe, $]), wt = y(() => {
|
|
362
|
+
Ke(""), qe(""), Ze(), I();
|
|
363
|
+
}, [Ze, I]), Tt = y((e) => {
|
|
364
|
+
Re((t) => typeof e == "function" ? e(t) : e), I();
|
|
365
|
+
}, [I]), Et = y((e) => {
|
|
366
|
+
Be(e), I();
|
|
367
|
+
}, [I]), Dt = y(() => {
|
|
368
|
+
L ? Ge(Q + 1) : A(H.data?.next_pagination_token ?? void 0);
|
|
368
369
|
}, [
|
|
369
370
|
Q,
|
|
370
|
-
|
|
371
|
+
L,
|
|
371
372
|
H.data?.next_pagination_token
|
|
372
|
-
]),
|
|
373
|
-
|
|
373
|
+
]), Ot = y(() => {
|
|
374
|
+
L ? Ge(Math.max(0, Q - 1)) : A(H.data?.prev_pagination_token ?? void 0);
|
|
374
375
|
}, [
|
|
375
376
|
Q,
|
|
376
|
-
|
|
377
|
+
L,
|
|
377
378
|
H.data?.prev_pagination_token
|
|
378
|
-
]),
|
|
379
|
+
]), kt = y(() => {
|
|
379
380
|
W.refetch();
|
|
380
381
|
}, [W.refetch]);
|
|
381
382
|
return {
|
|
382
|
-
rows:
|
|
383
|
-
isLoading: W.isLoading || !
|
|
383
|
+
rows: bt,
|
|
384
|
+
isLoading: W.isLoading || !L && j === void 0 || et || V !== ut || pt && mt.isLoading || (ft ?? 0) > 0 && bt.length === 0,
|
|
384
385
|
isError: W.isError,
|
|
385
|
-
onRetry:
|
|
386
|
+
onRetry: kt,
|
|
386
387
|
selectedFilterTabId: k,
|
|
387
388
|
onFilterTabChange: $,
|
|
388
|
-
showVendorBills:
|
|
389
|
-
clearQueryConstraints:
|
|
390
|
-
summaryCard:
|
|
391
|
-
onSummaryCardSelect:
|
|
392
|
-
searchValue:
|
|
393
|
-
onSearchChange:
|
|
394
|
-
hasAnyBills:
|
|
395
|
-
isSearchActive:
|
|
396
|
-
filterBarProps:
|
|
397
|
-
visibleColumns:
|
|
389
|
+
showVendorBills: Ct,
|
|
390
|
+
clearQueryConstraints: wt,
|
|
391
|
+
summaryCard: z,
|
|
392
|
+
onSummaryCardSelect: xt,
|
|
393
|
+
searchValue: M,
|
|
394
|
+
onSearchChange: Ke,
|
|
395
|
+
hasAnyBills: ht,
|
|
396
|
+
isSearchActive: N.length > 0 || R.isFilterActive,
|
|
397
|
+
filterBarProps: R.filterBarProps,
|
|
398
|
+
visibleColumns: L ? [
|
|
398
399
|
g.AddedOn,
|
|
399
400
|
g.DueDate,
|
|
400
401
|
g.AmountDue,
|
|
401
402
|
g.Status
|
|
402
|
-
] :
|
|
403
|
-
keepsColumnOrder:
|
|
404
|
-
isSortable: !
|
|
405
|
-
pageInfo:
|
|
403
|
+
] : ne(k),
|
|
404
|
+
keepsColumnOrder: L,
|
|
405
|
+
isSortable: !L,
|
|
406
|
+
pageInfo: L ? T.pageInfo({
|
|
406
407
|
billCount: Z.length,
|
|
407
408
|
invoiceCount: new Set(Z.map((e) => e.group?.key ?? e.rowKey)).size
|
|
408
409
|
}) : void 0,
|
|
409
|
-
showAddPanelWhenEmpty: !
|
|
410
|
+
showAddPanelWhenEmpty: !L,
|
|
410
411
|
sorting: Le,
|
|
411
|
-
onSortingChange:
|
|
412
|
-
pageSize:
|
|
413
|
-
pageSizeOptions:
|
|
414
|
-
onPageSizeChange:
|
|
415
|
-
hasNextPage:
|
|
416
|
-
hasPrevPage:
|
|
417
|
-
onNextPage:
|
|
418
|
-
onPrevPage:
|
|
412
|
+
onSortingChange: Tt,
|
|
413
|
+
pageSize: L ? C : ze,
|
|
414
|
+
pageSizeOptions: L ? [C] : void 0,
|
|
415
|
+
onPageSizeChange: Et,
|
|
416
|
+
hasNextPage: L ? Q < yt.length - 1 : !!H.data?.next_pagination_token,
|
|
417
|
+
hasPrevPage: L ? Q > 0 : !!H.data?.prev_pagination_token,
|
|
418
|
+
onNextPage: Dt,
|
|
419
|
+
onPrevPage: Ot,
|
|
419
420
|
cancelConfirmation: {
|
|
420
|
-
open: !!
|
|
421
|
-
copy: le(J[
|
|
422
|
-
onConfirm: () => void
|
|
423
|
-
onCancel: () =>
|
|
421
|
+
open: !!P,
|
|
422
|
+
copy: le(J[st], st),
|
|
423
|
+
onConfirm: () => void ct(),
|
|
424
|
+
onCancel: () => Je(void 0),
|
|
424
425
|
isPending: K.isPending,
|
|
425
|
-
cancelButtonLabel: J[
|
|
426
|
+
cancelButtonLabel: J[st].backButton
|
|
426
427
|
},
|
|
427
428
|
keepConfirmation: {
|
|
428
|
-
open: !!
|
|
429
|
+
open: !!F,
|
|
429
430
|
copy: {
|
|
430
431
|
title: T.notDuplicateConfirmTitle,
|
|
431
432
|
description: T.notDuplicateConfirmDescription,
|
|
@@ -436,8 +437,8 @@ function Te({ enabled: c = !0, canPay: d, canReadVendors: h = !0, isVendorFilter
|
|
|
436
437
|
actionWidth: "equal"
|
|
437
438
|
}
|
|
438
439
|
},
|
|
439
|
-
onConfirm: () => void
|
|
440
|
-
onCancel: () =>
|
|
440
|
+
onConfirm: () => void lt(),
|
|
441
|
+
onCancel: () => Ye(void 0),
|
|
441
442
|
isPending: K.isPending,
|
|
442
443
|
cancelButtonLabel: T.notDuplicateConfirmBackButton
|
|
443
444
|
}
|
|
@@ -25,7 +25,7 @@ import { useDuplicateBillsCount as ae } from "./index2.js";
|
|
|
25
25
|
import { formatBillQueueBadge as oe } from "./index3.js";
|
|
26
26
|
import { copyTextToClipboard as d } from "./index6.js";
|
|
27
27
|
import { billsTableCellTestIds as f } from "./index8.js";
|
|
28
|
-
import {
|
|
28
|
+
import { useAssignedToMeCount as p } from "./index9.js";
|
|
29
29
|
import { useBillSummaryCards as m } from "./index11.js";
|
|
30
30
|
import { useCallback as h, useImperativeHandle as g, useMemo as _, useState as v } from "react";
|
|
31
31
|
import { Fragment as se, jsx as y, jsxs as ce } from "react/jsx-runtime";
|
|
@@ -186,7 +186,7 @@ function b({ labels: b, onOpenBill: ue, onEnterManually: de, onFilesSelected: fe
|
|
|
186
186
|
}), ye = _(() => s.map((e) => ({
|
|
187
187
|
id: e,
|
|
188
188
|
label: S.queues[e],
|
|
189
|
-
badge: oe(H
|
|
189
|
+
badge: e === c.AssignedToMe ? oe(H) : void 0
|
|
190
190
|
})), [S.queues, H]), { clearQueryConstraints: W, onFilterTabChange: G } = z, be = h(() => {
|
|
191
191
|
W(), T(u.PossibleDuplicates);
|
|
192
192
|
}, [W]), K = h(() => {
|
|
@@ -1,133 +1,75 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BillColumn as
|
|
1
|
+
import { BILL_STATUS_FILTER_ORDER as e, BillStatusFilter as t, billStatusFilterApiValues as n } from "./index4.js";
|
|
2
|
+
import { BillColumn as r } from "../../ui/dist/index22.js";
|
|
3
3
|
import "../../ui/dist/index.js";
|
|
4
4
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index5.js
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
var i = {
|
|
6
|
+
All: "all",
|
|
7
|
+
AssignedToMe: "assigned_to_me"
|
|
8
|
+
}, a = /* @__PURE__ */ new Set([
|
|
9
|
+
t.Draft,
|
|
10
|
+
t.ReadyToSubmit,
|
|
11
|
+
t.PendingApproval,
|
|
12
|
+
t.Rejected
|
|
13
|
+
]);
|
|
14
|
+
function o(n, r) {
|
|
15
|
+
return n === i.All ? e : e.filter((e) => a.has(e) || r && e === t.ReadyToPay);
|
|
16
|
+
}
|
|
17
|
+
function s(e, t) {
|
|
13
18
|
switch (e) {
|
|
14
|
-
case
|
|
15
|
-
status__in:
|
|
16
|
-
"draft",
|
|
17
|
-
"new",
|
|
18
|
-
"approve_in_progress",
|
|
19
|
-
...t ? i : []
|
|
20
|
-
],
|
|
19
|
+
case i.AssignedToMe: return {
|
|
20
|
+
status__in: n(o(e, t)),
|
|
21
21
|
has_scheduled_payment: !1,
|
|
22
22
|
approval_queue: "mine"
|
|
23
23
|
};
|
|
24
|
-
case
|
|
25
|
-
status__in: ["approve_in_progress", ...t ? [] : i],
|
|
26
|
-
has_scheduled_payment: !1,
|
|
27
|
-
approval_queue: "others"
|
|
28
|
-
};
|
|
29
|
-
case r.Scheduled: return {
|
|
30
|
-
status__in: [
|
|
31
|
-
"new",
|
|
32
|
-
"approve_in_progress",
|
|
33
|
-
...i
|
|
34
|
-
],
|
|
35
|
-
has_scheduled_payment: !0
|
|
36
|
-
};
|
|
37
|
-
case r.Paid: return { status__in: ["paid"] };
|
|
38
|
-
case r.All: return {};
|
|
24
|
+
case i.All: return {};
|
|
39
25
|
}
|
|
40
26
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
n.Attachment,
|
|
55
|
-
n.IssueDate,
|
|
56
|
-
n.DueDate,
|
|
57
|
-
n.Status,
|
|
58
|
-
n.AmountDue,
|
|
59
|
-
n.TotalAmount,
|
|
60
|
-
n.AddedOn
|
|
27
|
+
var c = i.All, l = [i.All, i.AssignedToMe], u = {
|
|
28
|
+
[i.All]: [
|
|
29
|
+
r.Vendor,
|
|
30
|
+
r.InvoiceNumber,
|
|
31
|
+
r.Attachment,
|
|
32
|
+
r.IssueDate,
|
|
33
|
+
r.DueDate,
|
|
34
|
+
r.ScheduledDate,
|
|
35
|
+
r.Status,
|
|
36
|
+
r.AmountDue,
|
|
37
|
+
r.AmountPaid,
|
|
38
|
+
r.TotalAmount,
|
|
39
|
+
r.AddedOn
|
|
61
40
|
],
|
|
62
|
-
[
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
],
|
|
73
|
-
[r.Scheduled]: [
|
|
74
|
-
n.Vendor,
|
|
75
|
-
n.InvoiceNumber,
|
|
76
|
-
n.Attachment,
|
|
77
|
-
n.IssueDate,
|
|
78
|
-
n.DueDate,
|
|
79
|
-
n.ScheduledDate,
|
|
80
|
-
n.Status,
|
|
81
|
-
n.AmountScheduled,
|
|
82
|
-
n.TotalAmount,
|
|
83
|
-
n.AddedOn
|
|
84
|
-
],
|
|
85
|
-
[r.Paid]: [
|
|
86
|
-
n.Vendor,
|
|
87
|
-
n.InvoiceNumber,
|
|
88
|
-
n.Attachment,
|
|
89
|
-
n.IssueDate,
|
|
90
|
-
n.DueDate,
|
|
91
|
-
n.PaidDate,
|
|
92
|
-
n.Status,
|
|
93
|
-
n.AmountPaid,
|
|
94
|
-
n.TotalAmount,
|
|
95
|
-
n.AddedOn
|
|
96
|
-
],
|
|
97
|
-
[r.All]: [
|
|
98
|
-
n.Vendor,
|
|
99
|
-
n.InvoiceNumber,
|
|
100
|
-
n.Attachment,
|
|
101
|
-
n.IssueDate,
|
|
102
|
-
n.DueDate,
|
|
103
|
-
n.ScheduledDate,
|
|
104
|
-
n.Status,
|
|
105
|
-
n.AmountDue,
|
|
106
|
-
n.AmountPaid,
|
|
107
|
-
n.TotalAmount,
|
|
108
|
-
n.AddedOn
|
|
41
|
+
[i.AssignedToMe]: [
|
|
42
|
+
r.Vendor,
|
|
43
|
+
r.InvoiceNumber,
|
|
44
|
+
r.Attachment,
|
|
45
|
+
r.IssueDate,
|
|
46
|
+
r.DueDate,
|
|
47
|
+
r.Status,
|
|
48
|
+
r.AmountDue,
|
|
49
|
+
r.TotalAmount,
|
|
50
|
+
r.AddedOn
|
|
109
51
|
]
|
|
110
52
|
};
|
|
111
|
-
function
|
|
112
|
-
return
|
|
53
|
+
function d(e) {
|
|
54
|
+
return u[e];
|
|
113
55
|
}
|
|
114
|
-
var
|
|
56
|
+
var f = {
|
|
115
57
|
vendorLabel: "counterpart_name",
|
|
116
58
|
issueDateLabel: "issued_at",
|
|
117
59
|
dueDateLabel: "due_date",
|
|
118
60
|
scheduledDateLabel: "scheduled_payment_date",
|
|
119
61
|
addedOnLabel: "created_at"
|
|
120
|
-
},
|
|
121
|
-
[
|
|
122
|
-
[
|
|
123
|
-
[
|
|
124
|
-
[
|
|
125
|
-
[
|
|
62
|
+
}, p = {
|
|
63
|
+
[r.Vendor]: "vendorLabel",
|
|
64
|
+
[r.IssueDate]: "issueDateLabel",
|
|
65
|
+
[r.DueDate]: "dueDateLabel",
|
|
66
|
+
[r.ScheduledDate]: "scheduledDateLabel",
|
|
67
|
+
[r.AddedOn]: "addedOnLabel"
|
|
126
68
|
};
|
|
127
|
-
function p(e) {
|
|
128
|
-
return f[e];
|
|
129
|
-
}
|
|
130
69
|
function m(e) {
|
|
131
|
-
|
|
70
|
+
return p[e];
|
|
71
|
+
}
|
|
72
|
+
function h(e) {
|
|
73
|
+
if (e) return f[e];
|
|
132
74
|
}
|
|
133
|
-
export {
|
|
75
|
+
export { u as BILL_QUEUE_COLUMNS, l as BILL_QUEUE_ORDER, f as BILL_SORT_FIELDS, i as BillQueue, c as DEFAULT_BILL_QUEUE, d as billQueueColumns, s as billQueueFilters, o as billQueueStatusFilters, m as billSortColumnId, h as billSortField };
|
|
@@ -3,31 +3,16 @@ import "../../../util/dist/index.js";
|
|
|
3
3
|
import { BillQueue as t } from "./index5.js";
|
|
4
4
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index7.js
|
|
5
5
|
var n = {
|
|
6
|
-
[t.
|
|
7
|
-
[t.
|
|
8
|
-
[t.Scheduled]: "Scheduled",
|
|
9
|
-
[t.Paid]: "Paid",
|
|
10
|
-
[t.All]: "All bills"
|
|
6
|
+
[t.All]: "All bills",
|
|
7
|
+
[t.AssignedToMe]: "Assigned to me"
|
|
11
8
|
}, r = {
|
|
12
|
-
[t.AssignedToMe]: {
|
|
13
|
-
title: "Nothing needs you",
|
|
14
|
-
description: "Bills you need to submit, approve, or pay appear here."
|
|
15
|
-
},
|
|
16
|
-
[t.Pending]: {
|
|
17
|
-
title: "Nothing waiting on others",
|
|
18
|
-
description: "Bills appear here while they wait on someone else to approve or pay them."
|
|
19
|
-
},
|
|
20
|
-
[t.Scheduled]: {
|
|
21
|
-
title: "No scheduled bills",
|
|
22
|
-
description: "Bills appear here once a payment date is set for them."
|
|
23
|
-
},
|
|
24
|
-
[t.Paid]: {
|
|
25
|
-
title: "No paid bills",
|
|
26
|
-
description: "Bills appear here once their payment has gone out."
|
|
27
|
-
},
|
|
28
9
|
[t.All]: {
|
|
29
10
|
title: "No bills",
|
|
30
11
|
description: "Bills appear here as soon as they are added."
|
|
12
|
+
},
|
|
13
|
+
[t.AssignedToMe]: {
|
|
14
|
+
title: "Nothing needs you",
|
|
15
|
+
description: "Bills you need to submit, approve, or pay appear here."
|
|
31
16
|
}
|
|
32
17
|
}, i = (e, t, n) => `${e} ${e === 1 ? t : n}`, a = (e) => e.length > 2 ? `${e.slice(0, -1).join(", ")}, and ${e[e.length - 1]}` : e.join(" and "), o = {
|
|
33
18
|
group: "Bill totals",
|