@tesouro/embedded-components-react 0.4.15 → 0.4.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/bill-pay-widget/data-access/dist/index.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +47 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +20 -77
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +75 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +36 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +64 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +141 -118
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +93 -93
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +83 -67
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +235 -218
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +9 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +17 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +39 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +8 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +52 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +26 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +19 -306
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +154 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +2 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +60 -45
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +251 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +2 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +7 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +49 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +2 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +15 -337
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +50 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +2 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +21 -118
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +340 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +10 -97
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +99 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +1 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +11 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +58 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +1 -54
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +52 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +10 -179
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +181 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +2 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +41 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +5 -90
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +92 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +16 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +1 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +83 -291
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +292 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +13 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +6 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +39 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +2 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +36 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +10 -199
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +201 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +3 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +15 -345
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +345 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +6 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +6 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +93 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +2 -127
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +124 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +26 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +89 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +5 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +5 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +34 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +10 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +105 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +2 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +15 -123
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +125 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +2 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +14 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +7 -167
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +170 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +11 -105
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +108 -2
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index4.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +39 -33
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/subEntityForms.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useAddressForm.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +37 -37
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartSelector.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +0 -2
|
@@ -12,124 +12,135 @@ import { useWidgetConfig as re } from "../../../shared/feature/dist/lib/WidgetPr
|
|
|
12
12
|
import "../../../shared/feature/dist/index.js";
|
|
13
13
|
import { usePayableHistoryQuery as ie } from "../../data-access/dist/index9.js";
|
|
14
14
|
import { useAllPayableLineItemsQuery as ae } from "../../data-access/dist/index10.js";
|
|
15
|
-
import { usePayableQuery as oe } from "../../data-access/dist/
|
|
15
|
+
import { usePayableQuery as oe } from "../../data-access/dist/index16.js";
|
|
16
16
|
import "../../data-access/dist/index.js";
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
17
|
+
import { hasUnpaidBalance as se } from "./index6.js";
|
|
18
|
+
import { resolveVendor as ce } from "./index7.js";
|
|
19
|
+
import { BillCreateScreen as le } from "../../ui/dist/index49.js";
|
|
20
|
+
import { BillDecisionDialog as n } from "../../ui/dist/index55.js";
|
|
21
|
+
import { BillDuplicateNotice as ue } from "../../ui/dist/index65.js";
|
|
22
|
+
import { ExtractionNotice as de } from "../../ui/dist/index83.js";
|
|
23
|
+
import { MarkAsPaidDialog as fe } from "../../ui/dist/index92.js";
|
|
24
|
+
import { UnsavedBillDialog as pe } from "../../ui/dist/index102.js";
|
|
24
25
|
import "../../ui/dist/index.js";
|
|
25
|
-
import { usePayableDuplicateReview as
|
|
26
|
+
import { usePayableDuplicateReview as me } from "./index12.js";
|
|
26
27
|
import "./index13.js";
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
28
|
+
import { canReadCounterpartBankAccounts as he } from "./index18.js";
|
|
29
|
+
import { resolveAmountDueMinorUnits as ge } from "./index19.js";
|
|
30
|
+
import { usePayableAchInstructions as _e } from "../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
|
|
31
|
+
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
32
|
+
import { PayBillFlow as ve } from "./index25.js";
|
|
29
33
|
import "./index26.js";
|
|
30
|
-
import { useMarkAsPaidFlow as
|
|
34
|
+
import { useMarkAsPaidFlow as ye } from "./index16.js";
|
|
31
35
|
import "./index17.js";
|
|
32
|
-
import { BILL_CREATE_MESSAGE_LABELS_EN as
|
|
33
|
-
import { useBillCreateController as
|
|
34
|
-
import { useBillForm as
|
|
35
|
-
import { buildPaymentHistory as
|
|
36
|
-
import { useApprovalPolicyCardView as
|
|
37
|
-
import { useCurrentApprovalRequestId as
|
|
38
|
-
import { usePayableDetailActions as
|
|
39
|
-
import { useScheduledPayment as
|
|
40
|
-
import { isEditablePayableStatus as
|
|
41
|
-
import { useDraftDelete as
|
|
42
|
-
import { buildBillDetailView as
|
|
43
|
-
import { buildBillHistory as
|
|
44
|
-
import { SourceDocumentContainer as
|
|
45
|
-
import { useVendorSectionProps as
|
|
46
|
-
import { usePaymentInstructionsForm as
|
|
36
|
+
import { BILL_CREATE_MESSAGE_LABELS_EN as be, mergeBillCreateScreenCopy as xe } from "./index43.js";
|
|
37
|
+
import { useBillCreateController as Se } from "./index52.js";
|
|
38
|
+
import { useBillForm as Ce } from "./index54.js";
|
|
39
|
+
import { buildPaymentHistory as we } from "./index3.js";
|
|
40
|
+
import { useApprovalPolicyCardView as Te } from "./index32.js";
|
|
41
|
+
import { useCurrentApprovalRequestId as Ee } from "./index33.js";
|
|
42
|
+
import { usePayableDetailActions as De } from "./index34.js";
|
|
43
|
+
import { useScheduledPayment as Oe } from "./index35.js";
|
|
44
|
+
import { isEditablePayableStatus as ke } from "./index36.js";
|
|
45
|
+
import { useDraftDelete as Ae } from "./index37.js";
|
|
46
|
+
import { buildBillDetailView as je } from "./index39.js";
|
|
47
|
+
import { buildBillHistory as Me } from "./index40.js";
|
|
48
|
+
import { SourceDocumentContainer as Ne } from "./index44.js";
|
|
49
|
+
import { useVendorSectionProps as Pe } from "./index47.js";
|
|
50
|
+
import { usePaymentInstructionsForm as Fe } from "./index48.js";
|
|
47
51
|
import { billCreateTestIds as r } from "./index55.js";
|
|
48
|
-
import { useCallback as i, useEffect as
|
|
49
|
-
import { Fragment as
|
|
50
|
-
import { Trash2Icon as
|
|
52
|
+
import { useCallback as i, useEffect as Ie, useMemo as a, useRef as Le, useState as o } from "react";
|
|
53
|
+
import { Fragment as Re, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
54
|
+
import { Trash2Icon as ze } from "lucide-react";
|
|
51
55
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js
|
|
52
|
-
function
|
|
53
|
-
let p = a(() =>
|
|
54
|
-
payable:
|
|
55
|
-
lineItems:
|
|
56
|
-
}),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}, [
|
|
60
|
-
let
|
|
61
|
-
|
|
62
|
-
}, []),
|
|
63
|
-
payableId: d ? void 0 :
|
|
56
|
+
function l({ open: l, onOpenChange: u, payableId: Be, readOnly: d = !1, copy: f, onCollapse: Ve, poweredByBankName: He }) {
|
|
57
|
+
let p = a(() => xe(f), [f]), [m, Ue] = o(), [h, g] = o(!1), [We, Ge] = o(!1), [Ke, _] = o(!1), [qe, v] = o(), y = Be ?? qe, b = oe(y, { pollWhileOcrProcessing: !0 }), x = ae(y), { initResponse: S } = re(), Je = !!S, C = e(S?.scopes, [t.AccountingConfigReadOrg]), w = ee({ enabled: C }), T = b.data, E = !y || !!T, D = !d && E && !!y && T?.status !== "draft", Ye = !d && !!T && !ke(T?.status), O = d || Ye, k = Ce({
|
|
58
|
+
payable: T,
|
|
59
|
+
lineItems: x.lineItems
|
|
60
|
+
}), A = T?.counterpart_id;
|
|
61
|
+
Ie(() => {
|
|
62
|
+
h || A && (Ue(A), g(!0));
|
|
63
|
+
}, [h, A]);
|
|
64
|
+
let Xe = i((e) => {
|
|
65
|
+
g(!0), Ue(e);
|
|
66
|
+
}, []), j = Pe({
|
|
67
|
+
payableId: d ? void 0 : y,
|
|
64
68
|
counterpartId: d ? void 0 : m,
|
|
65
|
-
payableCounterpartId:
|
|
66
|
-
onCounterpartChange:
|
|
67
|
-
requiredError:
|
|
68
|
-
payableCounterpartBankAccountId:
|
|
69
|
-
extractedVendor:
|
|
70
|
-
}),
|
|
71
|
-
let { data: e } = await
|
|
69
|
+
payableCounterpartId: A,
|
|
70
|
+
onCounterpartChange: Xe,
|
|
71
|
+
requiredError: k.errors?.vendor,
|
|
72
|
+
payableCounterpartBankAccountId: T?.counterpart_bank_account_id ?? void 0,
|
|
73
|
+
extractedVendor: T?.counterpart_raw_data ?? void 0
|
|
74
|
+
}), Ze = !!(y && h) && !m, Qe = a(() => D ? { saveDraftButton: p.submittedSaveButton } : void 0, [p.submittedSaveButton, D]), $e = a(() => D ? { draftSaved: be.submittedSaved } : void 0, [D]), et = b.refetch, tt = i(async () => {
|
|
75
|
+
let { data: e } = await et();
|
|
72
76
|
return e?.status ?? void 0;
|
|
73
|
-
}, [
|
|
74
|
-
payableId:
|
|
75
|
-
form:
|
|
76
|
-
labels:
|
|
77
|
+
}, [et]), M = Se({
|
|
78
|
+
payableId: Be,
|
|
79
|
+
form: k,
|
|
80
|
+
labels: $e,
|
|
77
81
|
counterpartId: m,
|
|
78
|
-
clearCounterpart:
|
|
79
|
-
prepareVendorForSave:
|
|
80
|
-
onPayableCreated:
|
|
81
|
-
onSaved:
|
|
82
|
-
onDraftSaved: () =>
|
|
83
|
-
onFinalized: () =>
|
|
84
|
-
readSavedStatus:
|
|
85
|
-
}),
|
|
86
|
-
payableId:
|
|
87
|
-
status:
|
|
88
|
-
}),
|
|
89
|
-
payableId:
|
|
90
|
-
scheduledPaymentDate:
|
|
91
|
-
enabled: d ||
|
|
92
|
-
}),
|
|
93
|
-
|
|
94
|
-
|
|
82
|
+
clearCounterpart: Ze,
|
|
83
|
+
prepareVendorForSave: j.savePaymentInstructions,
|
|
84
|
+
onPayableCreated: v,
|
|
85
|
+
onSaved: v,
|
|
86
|
+
onDraftSaved: () => u(!1),
|
|
87
|
+
onFinalized: () => u(!1),
|
|
88
|
+
readSavedStatus: D ? tt : void 0
|
|
89
|
+
}), nt = !!(M.isSavingDraft || M.isFinalizing), N = d ? y : void 0, P = Ee({
|
|
90
|
+
payableId: N,
|
|
91
|
+
status: T?.status
|
|
92
|
+
}), F = Le(null), I = Oe({
|
|
93
|
+
payableId: y,
|
|
94
|
+
scheduledPaymentDate: T?.scheduled_payment_date,
|
|
95
|
+
enabled: d || D
|
|
96
|
+
}), rt = ce(T), L = he(S?.scopes), R = _e({
|
|
97
|
+
counterpartId: d ? A : void 0,
|
|
98
|
+
currency: T?.currency,
|
|
99
|
+
currentBankAccountId: d ? T?.counterpart_bank_account_id ?? void 0 : void 0,
|
|
100
|
+
enabled: L && d
|
|
101
|
+
}), z = Fe({
|
|
102
|
+
payableId: N,
|
|
103
|
+
counterpartId: d ? A : void 0,
|
|
104
|
+
currentBankAccountId: T?.counterpart_bank_account_id ?? void 0,
|
|
105
|
+
canReadCounterpartBankAccounts: L,
|
|
95
106
|
saveErrorMessage: p.detail.paymentInstructionsSaveError,
|
|
96
107
|
linkErrorMessage: p.detail.paymentInstructionsLinkError
|
|
97
|
-
}),
|
|
98
|
-
payableId:
|
|
99
|
-
amountDueMinorUnits:
|
|
100
|
-
amountToPayMinorUnits:
|
|
101
|
-
currencyCode:
|
|
102
|
-
dueDate:
|
|
103
|
-
hasScheduledPayment:
|
|
108
|
+
}), it = e(S?.scopes, [t.PayableWriteOrg]), at = e(S?.scopes, [t.CounterpartWriteOrg]) && it, ot = at && se(T?.status) && !I.hasScheduledPayment && !I.isResolving, B = ye({
|
|
109
|
+
payableId: N,
|
|
110
|
+
amountDueMinorUnits: ge(T) ?? 0,
|
|
111
|
+
amountToPayMinorUnits: T?.amount_to_pay ?? void 0,
|
|
112
|
+
currencyCode: T?.currency ?? void 0,
|
|
113
|
+
dueDate: T?.due_date,
|
|
114
|
+
hasScheduledPayment: I.hasScheduledPayment,
|
|
104
115
|
labels: p.markAsPaid
|
|
105
|
-
}), V =
|
|
106
|
-
payableId:
|
|
107
|
-
approvalPolicyId:
|
|
116
|
+
}), V = Te({
|
|
117
|
+
payableId: N,
|
|
118
|
+
approvalPolicyId: T?.approval_policy_id,
|
|
108
119
|
enabled: d,
|
|
109
120
|
copy: p.approvalPolicyCopy
|
|
110
|
-
}), { actions: H, decisionDialog:
|
|
111
|
-
payableId: d ||
|
|
112
|
-
status:
|
|
113
|
-
currentApprovalRequestId:
|
|
114
|
-
isPolicyApprover:
|
|
115
|
-
hasWaitingRequest:
|
|
121
|
+
}), { actions: H, decisionDialog: st, isActionPending: ct } = De({
|
|
122
|
+
payableId: d || D ? y : void 0,
|
|
123
|
+
status: T?.status,
|
|
124
|
+
currentApprovalRequestId: P.id,
|
|
125
|
+
isPolicyApprover: P.isPolicyApprover,
|
|
126
|
+
hasWaitingRequest: P.hasWaitingRequest,
|
|
116
127
|
arePendingApproversUnknown: V.isLoading,
|
|
117
|
-
hasScheduledPayment:
|
|
118
|
-
scheduledPaymentIntentId:
|
|
119
|
-
isScheduledPaymentUnknown:
|
|
128
|
+
hasScheduledPayment: I.hasScheduledPayment,
|
|
129
|
+
scheduledPaymentIntentId: I.scheduledPaymentIntentId,
|
|
130
|
+
isScheduledPaymentUnknown: I.isResolving,
|
|
120
131
|
pendingApprovers: V.pendingApprovers,
|
|
121
132
|
labels: p.actions,
|
|
122
133
|
isMarkAsPaidPending: B.isPending,
|
|
123
134
|
onMarkAsPaidSelect: B.open,
|
|
124
|
-
onPayBillSelect: () =>
|
|
125
|
-
onActionSucceeded:
|
|
126
|
-
}), U =
|
|
127
|
-
payableId:
|
|
128
|
-
status:
|
|
135
|
+
onPayBillSelect: () => F.current?.open(),
|
|
136
|
+
onActionSucceeded: D ? () => u(!1) : void 0
|
|
137
|
+
}), U = Ae({
|
|
138
|
+
payableId: y,
|
|
139
|
+
status: T?.status,
|
|
129
140
|
enabled: !d,
|
|
130
141
|
labels: p.deleteDraft,
|
|
131
|
-
onDeleted: () =>
|
|
132
|
-
}), W =
|
|
142
|
+
onDeleted: () => u(!1)
|
|
143
|
+
}), W = nt || ct, G = b.isLoading || x.isResolving || w.isResolving || R.isLoading, K = b.isError || x.isError || w.isError, lt = a(() => [...U.menuItems, ...D || d && !G && !K ? H.menu.map((e) => ({
|
|
133
144
|
id: e.id,
|
|
134
145
|
label: e.label,
|
|
135
146
|
onSelect: e.onSelect,
|
|
@@ -139,153 +150,159 @@ function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f,
|
|
|
139
150
|
})) : []], [
|
|
140
151
|
H.menu,
|
|
141
152
|
U.menuItems,
|
|
142
|
-
|
|
153
|
+
D,
|
|
143
154
|
d,
|
|
144
155
|
G,
|
|
145
156
|
K
|
|
146
|
-
]), q = a(() => (
|
|
157
|
+
]), q = a(() => (w.data?.data ?? []).map((e) => ({
|
|
147
158
|
value: e.id,
|
|
148
159
|
label: [e.nominal_code, e.name].filter(Boolean).join(" — ")
|
|
149
|
-
})), [
|
|
150
|
-
|
|
151
|
-
let
|
|
160
|
+
})), [w.data]), J;
|
|
161
|
+
Je && (C ? w.isError ? J = p.lineItemsGlCodeUnavailable.loadError : !w.isResolving && q.length === 0 && (J = p.lineItemsGlCodeUnavailable.empty) : J = p.lineItemsGlCodeUnavailable.noAccess);
|
|
162
|
+
let ut = !Je || !!J || w.isResolving, dt = C && !w.isResolving && !w.isError, Y = ie(N), ft = e(S?.scopes, [t.UserReadOrg]), pt = te({ enabled: d && ft }), mt = a(() => Me(Y.data?.data ?? [], pt.data?.data ?? [], p.history), [
|
|
152
163
|
Y.data,
|
|
153
|
-
|
|
164
|
+
pt.data,
|
|
154
165
|
p.history
|
|
155
|
-
]),
|
|
156
|
-
records:
|
|
166
|
+
]), ht = a(() => we({
|
|
167
|
+
records: I.paymentRecords,
|
|
157
168
|
events: Y.data?.data ?? [],
|
|
158
|
-
currencyCode:
|
|
169
|
+
currencyCode: T?.currency,
|
|
159
170
|
labels: p.detail
|
|
160
171
|
}), [
|
|
161
|
-
|
|
172
|
+
I.paymentRecords,
|
|
162
173
|
Y.data,
|
|
163
|
-
|
|
174
|
+
T?.currency,
|
|
164
175
|
p.detail
|
|
165
|
-
]),
|
|
166
|
-
payable:
|
|
167
|
-
lineItems:
|
|
176
|
+
]), gt = a(() => d && T ? je({
|
|
177
|
+
payable: T,
|
|
178
|
+
lineItems: x.lineItems,
|
|
168
179
|
glCodeOptions: q,
|
|
169
|
-
glCodeRosterAvailable:
|
|
170
|
-
history:
|
|
171
|
-
paymentHistory:
|
|
180
|
+
glCodeRosterAvailable: dt,
|
|
181
|
+
history: mt,
|
|
182
|
+
paymentHistory: ht,
|
|
172
183
|
approvalPolicy: V.view,
|
|
173
184
|
labels: p.detail,
|
|
174
|
-
hasScheduledPayment:
|
|
185
|
+
hasScheduledPayment: I.hasScheduledPayment,
|
|
186
|
+
payableAchInstructions: R.achInstructions,
|
|
187
|
+
payableAchInstructionsReadable: L && !R.isError
|
|
175
188
|
}) : void 0, [
|
|
176
|
-
|
|
189
|
+
I.hasScheduledPayment,
|
|
177
190
|
V.view,
|
|
191
|
+
L,
|
|
178
192
|
p.detail,
|
|
179
193
|
q,
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
194
|
+
dt,
|
|
195
|
+
mt,
|
|
196
|
+
x.lineItems,
|
|
197
|
+
T,
|
|
198
|
+
R.achInstructions,
|
|
199
|
+
R.isError,
|
|
200
|
+
ht,
|
|
185
201
|
d
|
|
186
|
-
]),
|
|
187
|
-
let e =
|
|
188
|
-
if (!
|
|
189
|
-
|
|
202
|
+
]), _t = T?.source_of_payable_data === "ocr", X = rt?.name, vt = d ? X ? p.viewTitle(X) : p.readOnlyTitle : X && (_t || D) ? p.extractedTitle(X) : p.newTitle, yt = d && T?.created_at ? p.addedOn(ne(T.created_at.slice(0, 10))) : void 0, Z = i(() => {
|
|
203
|
+
let e = k.isDirty || j.hasUnsavedVendorChanges || !!M.stagedFile || M.isFileDeletionPending;
|
|
204
|
+
if (!O && e) {
|
|
205
|
+
_(!0);
|
|
190
206
|
return;
|
|
191
207
|
}
|
|
192
|
-
|
|
208
|
+
u(!1);
|
|
193
209
|
}, [
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
]),
|
|
201
|
-
|
|
202
|
-
}, [
|
|
210
|
+
M.isFileDeletionPending,
|
|
211
|
+
M.stagedFile,
|
|
212
|
+
k.isDirty,
|
|
213
|
+
O,
|
|
214
|
+
u,
|
|
215
|
+
j.hasUnsavedVendorChanges
|
|
216
|
+
]), bt = i(() => {
|
|
217
|
+
_(!1), u(!1);
|
|
218
|
+
}, [u]), Q = x.isResolving || j.mode === "creating", xt = i(async () => {
|
|
203
219
|
if (Q) return;
|
|
204
|
-
let e = await
|
|
205
|
-
|
|
220
|
+
let e = await M.saveDraft();
|
|
221
|
+
_(!1), e && u(!1);
|
|
206
222
|
}, [
|
|
207
|
-
|
|
223
|
+
M,
|
|
208
224
|
Q,
|
|
209
|
-
|
|
210
|
-
]), $ =
|
|
211
|
-
payable:
|
|
212
|
-
onRemoved: () =>
|
|
213
|
-
canManage:
|
|
214
|
-
}),
|
|
215
|
-
if (!(W || $.isBusy)) return e ?
|
|
225
|
+
u
|
|
226
|
+
]), $ = me({
|
|
227
|
+
payable: T,
|
|
228
|
+
onRemoved: () => u(!1),
|
|
229
|
+
canManage: it
|
|
230
|
+
}), St = i((e) => {
|
|
231
|
+
if (!(W || $.isBusy)) return e ? u(!0) : Z();
|
|
216
232
|
}, [
|
|
217
233
|
$.isBusy,
|
|
218
234
|
W,
|
|
219
235
|
Z,
|
|
220
|
-
|
|
221
|
-
]),
|
|
236
|
+
u
|
|
237
|
+
]), Ct = $.isPossibleDuplicate, wt = !d && _t && !We, Tt = Ct || wt ? /* @__PURE__ */ c(Re, { children: [Ct ? /* @__PURE__ */ s(ue, {
|
|
222
238
|
onNotADuplicate: $.onNotADuplicate,
|
|
223
239
|
onRemoveBill: $.onRemoveBill,
|
|
224
240
|
isActionDisabled: $.isBusy,
|
|
225
241
|
labels: $.removeBillLabel ? { removeBillButton: $.removeBillLabel } : void 0,
|
|
226
242
|
testId: r.duplicateNotice
|
|
227
|
-
}) : null,
|
|
228
|
-
return /* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */ s(
|
|
230
|
-
open:
|
|
231
|
-
onOpenChange:
|
|
232
|
-
title:
|
|
233
|
-
subtitle:
|
|
234
|
-
notice:
|
|
243
|
+
}) : null, wt ? /* @__PURE__ */ s(de, { onDismiss: () => Ge(!0) }) : null] }) : void 0;
|
|
244
|
+
return /* @__PURE__ */ c(Re, { children: [
|
|
245
|
+
/* @__PURE__ */ s(le, {
|
|
246
|
+
open: l,
|
|
247
|
+
onOpenChange: St,
|
|
248
|
+
title: vt,
|
|
249
|
+
subtitle: yt,
|
|
250
|
+
notice: Tt,
|
|
235
251
|
vendor: {
|
|
236
|
-
...
|
|
252
|
+
...j,
|
|
237
253
|
testId: r.vendorSection
|
|
238
254
|
},
|
|
239
|
-
values:
|
|
240
|
-
errors:
|
|
241
|
-
onChange:
|
|
255
|
+
values: k.values,
|
|
256
|
+
errors: k.errors,
|
|
257
|
+
onChange: k.onChange,
|
|
242
258
|
lineItems: {
|
|
243
|
-
items:
|
|
259
|
+
items: k.lineItemRows,
|
|
244
260
|
glCodeOptions: q,
|
|
245
|
-
glCodeDisabled:
|
|
261
|
+
glCodeDisabled: ut,
|
|
246
262
|
glCodeUnavailableMessage: J,
|
|
247
|
-
discount:
|
|
248
|
-
onDiscountChange:
|
|
249
|
-
tax:
|
|
250
|
-
onTaxChange:
|
|
251
|
-
total:
|
|
252
|
-
onTotalChange:
|
|
253
|
-
onAddLineItem:
|
|
254
|
-
errors:
|
|
255
|
-
totalsErrors:
|
|
263
|
+
discount: k.discount,
|
|
264
|
+
onDiscountChange: k.onDiscountChange,
|
|
265
|
+
tax: k.tax,
|
|
266
|
+
onTaxChange: k.onTaxChange,
|
|
267
|
+
total: k.total,
|
|
268
|
+
onTotalChange: k.onTotalChange,
|
|
269
|
+
onAddLineItem: k.onAddLineItem,
|
|
270
|
+
errors: k.lineItemErrors,
|
|
271
|
+
totalsErrors: k.totalsErrors,
|
|
256
272
|
testId: r.lineItems
|
|
257
273
|
},
|
|
258
|
-
documentPanel: /* @__PURE__ */ s(
|
|
259
|
-
payableId:
|
|
260
|
-
readOnly:
|
|
261
|
-
isDocumentPending: !!
|
|
262
|
-
file:
|
|
263
|
-
id:
|
|
264
|
-
name:
|
|
265
|
-
url:
|
|
266
|
-
mimetype:
|
|
274
|
+
documentPanel: /* @__PURE__ */ s(Ne, {
|
|
275
|
+
payableId: y,
|
|
276
|
+
readOnly: O,
|
|
277
|
+
isDocumentPending: !!y && !T?.file && (b.isLoading || T?.ocr_status === "processing"),
|
|
278
|
+
file: T?.file ? {
|
|
279
|
+
id: T.file.id,
|
|
280
|
+
name: T.file.name,
|
|
281
|
+
url: T.file.url,
|
|
282
|
+
mimetype: T.file.mimetype
|
|
267
283
|
} : void 0,
|
|
268
284
|
staging: {
|
|
269
|
-
stagedFile:
|
|
270
|
-
onFileStaged:
|
|
271
|
-
onClearStagedFile:
|
|
272
|
-
isSaving:
|
|
285
|
+
stagedFile: M.stagedFile,
|
|
286
|
+
onFileStaged: M.stageFile,
|
|
287
|
+
onClearStagedFile: M.clearStagedFile,
|
|
288
|
+
isSaving: nt
|
|
273
289
|
},
|
|
274
290
|
deletion: {
|
|
275
|
-
isPending:
|
|
276
|
-
onRequest:
|
|
277
|
-
onDetachNow:
|
|
278
|
-
isDeleting:
|
|
279
|
-
hasFailed:
|
|
291
|
+
isPending: M.isFileDeletionPending,
|
|
292
|
+
onRequest: M.requestFileDeletion,
|
|
293
|
+
onDetachNow: M.detachFileNow,
|
|
294
|
+
isDeleting: M.isDeletingFile,
|
|
295
|
+
hasFailed: M.hasFileDeletionFailed
|
|
280
296
|
}
|
|
281
297
|
}),
|
|
282
|
-
menuItems:
|
|
283
|
-
readOnly:
|
|
298
|
+
menuItems: lt,
|
|
299
|
+
readOnly: O,
|
|
284
300
|
detail: d ? {
|
|
285
|
-
view:
|
|
301
|
+
view: gt,
|
|
286
302
|
actions: H,
|
|
287
|
-
scheduledSummary:
|
|
288
|
-
|
|
303
|
+
scheduledSummary: I.hasScheduledPayment && I.scheduledDateLabel ? p.scheduledSummary(I.scheduledDateLabel) : void 0,
|
|
304
|
+
onEditPaymentInstructions: A && ot ? z.open : void 0,
|
|
305
|
+
paymentInstructionsForm: A && ot ? {
|
|
289
306
|
isOpen: z.isOpen,
|
|
290
307
|
values: z.values,
|
|
291
308
|
errors: z.errors,
|
|
@@ -297,28 +314,28 @@ function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f,
|
|
|
297
314
|
} : void 0,
|
|
298
315
|
isLoading: G,
|
|
299
316
|
isError: K,
|
|
300
|
-
paymentHistoryError:
|
|
301
|
-
paymentHistoryLoading:
|
|
317
|
+
paymentHistoryError: I.isError || Y.isError,
|
|
318
|
+
paymentHistoryLoading: I.isResolving || Y.isLoading
|
|
302
319
|
} : void 0,
|
|
303
|
-
isLineItemsLoading:
|
|
320
|
+
isLineItemsLoading: x.isResolving,
|
|
304
321
|
isSaving: W,
|
|
305
|
-
isSavingDraft:
|
|
306
|
-
isFinalizing:
|
|
322
|
+
isSavingDraft: M.isSavingDraft,
|
|
323
|
+
isFinalizing: M.isFinalizing,
|
|
307
324
|
onCancel: Z,
|
|
308
|
-
onCollapse: d ?
|
|
309
|
-
onSaveDraft:
|
|
310
|
-
onFinalize:
|
|
311
|
-
scrollToErrorToken:
|
|
312
|
-
showFinalize: !
|
|
313
|
-
labels:
|
|
325
|
+
onCollapse: d ? Ve : void 0,
|
|
326
|
+
onSaveDraft: M.saveDraft,
|
|
327
|
+
onFinalize: M.finalize,
|
|
328
|
+
scrollToErrorToken: M.scrollToErrorToken,
|
|
329
|
+
showFinalize: !D && E,
|
|
330
|
+
labels: Qe,
|
|
314
331
|
testId: r.dialog
|
|
315
332
|
}),
|
|
316
|
-
/* @__PURE__ */ s(
|
|
317
|
-
open:
|
|
318
|
-
onSaveDraft:
|
|
319
|
-
onDiscard:
|
|
320
|
-
onCancel: () =>
|
|
321
|
-
isSaving:
|
|
333
|
+
/* @__PURE__ */ s(pe, {
|
|
334
|
+
open: Ke,
|
|
335
|
+
onSaveDraft: xt,
|
|
336
|
+
onDiscard: bt,
|
|
337
|
+
onCancel: () => _(!1),
|
|
338
|
+
isSaving: M.isSavingDraft,
|
|
322
339
|
isSaveDraftDisabled: Q,
|
|
323
340
|
labels: p.unsavedChanges,
|
|
324
341
|
testId: r.unsavedDialog,
|
|
@@ -327,7 +344,7 @@ function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f,
|
|
|
327
344
|
closeTestId: r.unsavedClose
|
|
328
345
|
}),
|
|
329
346
|
/* @__PURE__ */ s(n, {
|
|
330
|
-
...
|
|
347
|
+
...st,
|
|
331
348
|
labels: { cancelButton: p.actions.decisionDialog.cancelButton },
|
|
332
349
|
testId: r.decisionDialog,
|
|
333
350
|
confirmTestId: r.decisionConfirm,
|
|
@@ -345,20 +362,20 @@ function c({ open: c, onOpenChange: l, payableId: u, readOnly: d = !1, copy: f,
|
|
|
345
362
|
onConfirm: $.removeConfirmation.onConfirm,
|
|
346
363
|
onCancel: $.removeConfirmation.onCancel,
|
|
347
364
|
isPending: $.removeConfirmation.isPending,
|
|
348
|
-
confirmIcon: /* @__PURE__ */ s(
|
|
365
|
+
confirmIcon: /* @__PURE__ */ s(ze, {}),
|
|
349
366
|
labels: { cancelButton: $.removeConfirmation.cancelButtonLabel },
|
|
350
367
|
testId: r.duplicateRemoveDialog,
|
|
351
368
|
confirmTestId: r.duplicateRemoveConfirm
|
|
352
369
|
}),
|
|
353
|
-
/* @__PURE__ */ s(
|
|
354
|
-
d &&
|
|
355
|
-
ref:
|
|
356
|
-
payable:
|
|
357
|
-
onMissingAchInstructions:
|
|
358
|
-
poweredByBankName:
|
|
370
|
+
/* @__PURE__ */ s(fe, { ...B.dialogProps }),
|
|
371
|
+
d && T ? /* @__PURE__ */ s(ve, {
|
|
372
|
+
ref: F,
|
|
373
|
+
payable: T,
|
|
374
|
+
onMissingAchInstructions: at ? z.open : void 0,
|
|
375
|
+
poweredByBankName: He,
|
|
359
376
|
labels: p.payBill
|
|
360
377
|
}) : null
|
|
361
378
|
] });
|
|
362
379
|
}
|
|
363
380
|
//#endregion
|
|
364
|
-
export {
|
|
381
|
+
export { l as BillCreateDialog, l as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BILL_DETAILS_SHEET_LABELS_EN as e } from "../../ui/dist/
|
|
1
|
+
import { BILL_DETAILS_SHEET_LABELS_EN as e } from "../../ui/dist/index60.js";
|
|
2
2
|
import "../../ui/dist/index.js";
|
|
3
3
|
import { MARK_AS_PAID_FLOW_LABELS_EN as t } from "./index14.js";
|
|
4
4
|
import "./index17.js";
|
|
@@ -10,12 +10,12 @@ import { useWidgetConfig as ee } from "../../../shared/feature/dist/lib/WidgetPr
|
|
|
10
10
|
import "../../../shared/feature/dist/index.js";
|
|
11
11
|
import { usePayableHistoryQuery as r } from "../../data-access/dist/index9.js";
|
|
12
12
|
import { useAllPayableLineItemsQuery as i } from "../../data-access/dist/index10.js";
|
|
13
|
-
import { usePayableQuery as a } from "../../data-access/dist/
|
|
13
|
+
import { usePayableQuery as a } from "../../data-access/dist/index16.js";
|
|
14
14
|
import "../../data-access/dist/index.js";
|
|
15
|
-
import { BillDecisionDialog as o } from "../../ui/dist/
|
|
16
|
-
import { BillDetailsSheet as s } from "../../ui/dist/
|
|
17
|
-
import { BillDuplicateNotice as c } from "../../ui/dist/
|
|
18
|
-
import { MarkAsPaidDialog as l } from "../../ui/dist/
|
|
15
|
+
import { BillDecisionDialog as o } from "../../ui/dist/index55.js";
|
|
16
|
+
import { BillDetailsSheet as s } from "../../ui/dist/index61.js";
|
|
17
|
+
import { BillDuplicateNotice as c } from "../../ui/dist/index65.js";
|
|
18
|
+
import { MarkAsPaidDialog as l } from "../../ui/dist/index92.js";
|
|
19
19
|
import "../../ui/dist/index.js";
|
|
20
20
|
import { usePayableDuplicateReview as u } from "./index12.js";
|
|
21
21
|
import "./index13.js";
|
|
@@ -5,18 +5,21 @@ var e = /* @__PURE__ */ new Set([
|
|
|
5
5
|
"waiting_to_be_paid",
|
|
6
6
|
"partially_paid"
|
|
7
7
|
]);
|
|
8
|
-
function t(
|
|
8
|
+
function t(t) {
|
|
9
|
+
return !!(t && e.has(t));
|
|
10
|
+
}
|
|
11
|
+
function n(e, t) {
|
|
9
12
|
let n = /* @__PURE__ */ new Date(`${e.slice(0, 10)}T00:00:00Z`), r = Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate());
|
|
10
13
|
return n.getTime() < r;
|
|
11
14
|
}
|
|
12
|
-
function
|
|
13
|
-
if (e.has(
|
|
15
|
+
function r({ apiStatus: t, dueDate: r, scheduledPaymentDate: i, hasScheduledPayment: a = !!i, now: o = /* @__PURE__ */ new Date() }) {
|
|
16
|
+
if (e.has(t) && a) return {
|
|
14
17
|
status: "scheduled",
|
|
15
18
|
tone: "accent",
|
|
16
19
|
isOverdue: !1
|
|
17
20
|
};
|
|
18
|
-
let s = !!(e.has(
|
|
19
|
-
switch (
|
|
21
|
+
let s = !!(e.has(t) && r && n(r, o));
|
|
22
|
+
switch (t) {
|
|
20
23
|
case "draft":
|
|
21
24
|
case "new": return {
|
|
22
25
|
status: "draft",
|
|
@@ -56,4 +59,4 @@ function n({ apiStatus: n, dueDate: r, scheduledPaymentDate: i, hasScheduledPaym
|
|
|
56
59
|
}
|
|
57
60
|
}
|
|
58
61
|
//#endregion
|
|
59
|
-
export {
|
|
62
|
+
export { r as derivePayableStatus, t as hasUnpaidBalance };
|
|
@@ -6,7 +6,7 @@ import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.
|
|
|
6
6
|
import { useEmbedApi as t } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
7
7
|
import "../../../shared/ui/dist/index.js";
|
|
8
8
|
import { useUploadPayableFromFileMutation as n } from "../../data-access/dist/index13.js";
|
|
9
|
-
import { usePayableOcrQueries as r } from "../../data-access/dist/
|
|
9
|
+
import { usePayableOcrQueries as r } from "../../data-access/dist/index15.js";
|
|
10
10
|
import "../../data-access/dist/index.js";
|
|
11
11
|
import { billPayUploadQueueKey as i } from "./index64.js";
|
|
12
12
|
import { BILL_UPLOAD_QUEUE_LABELS_EN as a } from "./index65.js";
|