@tesouro/embedded-components-react 0.5.139 → 0.5.142
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/index.js +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +1 -1
- 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/index27.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +9 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +21 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +21 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +41 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +16 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +8 -98
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +4 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +98 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +78 -135
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +4 -45
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +139 -109
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +44 -186
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +108 -72
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +188 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +71 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +27 -406
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +88 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +403 -77
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +13 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +77 -221
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +78 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +212 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +44 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +234 -557
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +23 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +581 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +4 -251
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +45 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +261 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +3 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +44 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +1 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +6 -127
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +13 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +126 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +3 -127
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +3 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +124 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +8 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +8 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +51 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +20 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +19 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +28 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +76 -252
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +48 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +249 -142
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +27 -206
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +160 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +217 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +3 -112
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index89.js +7 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index90.js +104 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index91.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index92.js +27 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +48 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +12 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +102 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +2 -128
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +31 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index104.js +125 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index105.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index106.js +29 -177
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index107.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index108.js +178 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index109.js +2 -108
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index110.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index111.js +106 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index112.js +2 -52
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index113.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index114.js +52 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index115.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +26 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +14 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +16 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +19 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +16 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +2 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +26 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +28 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +1 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +27 -117
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +19 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +123 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +2 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +2 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +20 -99
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +2 -79
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +97 -273
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +79 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +273 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +2 -56
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +21 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +52 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +2 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +47 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +2 -374
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +35 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +369 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +2 -96
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +23 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +93 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +1 -51
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +31 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +49 -53
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +2 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +53 -194
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +13 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +195 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +2 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +37 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +2 -88
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +19 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +78 -308
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +2 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +311 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +9 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +33 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +2 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +1 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +8 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +37 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +2 -36
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +34 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +37 -199
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +12 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +199 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +2 -402
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +13 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +413 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +8 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +93 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +2 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +118 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +28 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +92 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +2 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +7 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +28 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +2 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +7 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +32 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +1 -105
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +855 -831
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/relativeCalendarDay.js +12 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +0 -125
|
@@ -1,4 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js
|
|
2
|
+
var e = {
|
|
3
|
+
dialog: "bill-pay-bill-create-dialog",
|
|
4
|
+
vendorSection: "bill-pay-bill-create-vendor",
|
|
5
|
+
lineItems: "bill-pay-bill-create-line-items",
|
|
6
|
+
documentPanel: "bill-pay-bill-create-document",
|
|
7
|
+
duplicateNotice: "bill-pay-bill-create-duplicate-notice",
|
|
8
|
+
duplicateRemoveDialog: "bill-pay-bill-create-duplicate-remove-dialog",
|
|
9
|
+
duplicateRemoveConfirm: "bill-pay-bill-create-duplicate-remove-confirm",
|
|
10
|
+
decisionDialog: "bill-pay-bill-decision-dialog",
|
|
11
|
+
decisionConfirm: "bill-pay-bill-decision-confirm",
|
|
12
|
+
decisionReason: "bill-pay-bill-decision-reason",
|
|
13
|
+
deleteDraftDialog: "bill-pay-bill-delete-draft-dialog",
|
|
14
|
+
deleteDraftConfirm: "bill-pay-bill-delete-draft-confirm",
|
|
15
|
+
unsavedDialog: "bill-pay-bill-unsaved-dialog",
|
|
16
|
+
unsavedSaveDraft: "bill-pay-bill-unsaved-save-draft",
|
|
17
|
+
unsavedDiscard: "bill-pay-bill-unsaved-discard",
|
|
18
|
+
unsavedClose: "bill-pay-bill-unsaved-close",
|
|
19
|
+
discardDialog: "bill-pay-bill-discard-dialog",
|
|
20
|
+
discardConfirm: "bill-pay-bill-discard-confirm"
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
export { e as billCreateTestIds };
|
|
@@ -1,44 +1,585 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { hasAnyScope as t } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
7
|
+
import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
8
|
+
import { useAllLedgerAccountsQuery as r } from "../../../shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js";
|
|
9
|
+
import "../../../shared/data-access/dist/index.js";
|
|
10
|
+
import "../../../shared/ui/dist/index.js";
|
|
11
|
+
import { formatCalendarDate as ee } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
12
|
+
import { buildPayableAuditHistory as te, hasUnattributedAuditRows as ne } from "../../../shared/util/dist/lib/auditHistory/buildPayableAuditHistory.js";
|
|
13
|
+
import { useWidgetConfig as re } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
14
|
+
import { useOrganizationUserNames as ie } from "../../../shared/feature/dist/lib/user/useOrganizationUserNames.js";
|
|
15
|
+
import "../../../shared/feature/dist/index.js";
|
|
16
|
+
import { usePayableApprovalRequestsQuery as ae } from "../../data-access/dist/index8.js";
|
|
17
|
+
import { usePayableHistoryQuery as oe } from "../../data-access/dist/index9.js";
|
|
18
|
+
import { useAllPayableLineItemsQuery as se } from "../../data-access/dist/index10.js";
|
|
19
|
+
import { useUpdatePayableMutation as ce } from "../../data-access/dist/index13.js";
|
|
20
|
+
import { usePayableQuery as le } from "../../data-access/dist/index17.js";
|
|
21
|
+
import "../../data-access/dist/index.js";
|
|
22
|
+
import { hasUnpaidBalance as ue } from "./index7.js";
|
|
23
|
+
import { resolveVendor as de } from "./index8.js";
|
|
24
|
+
import { BillCreateScreen as fe } from "../../ui/dist/index59.js";
|
|
25
|
+
import { BillDecisionDialog as pe } from "../../ui/dist/index65.js";
|
|
26
|
+
import { DiscardChangesDialog as me } from "../../ui/dist/index69.js";
|
|
27
|
+
import { BillDuplicateNotice as he } from "../../ui/dist/index74.js";
|
|
28
|
+
import { BillRejectedBanner as ge } from "../../ui/dist/index77.js";
|
|
29
|
+
import { ExtractionNotice as _e } from "../../ui/dist/index95.js";
|
|
30
|
+
import { MarkAsPaidDialog as ve } from "../../ui/dist/index104.js";
|
|
31
|
+
import { UnsavedBillDialog as ye } from "../../ui/dist/index114.js";
|
|
2
32
|
import "../../ui/dist/index.js";
|
|
3
|
-
import {
|
|
33
|
+
import { usePayableDuplicateReview as be } from "./index13.js";
|
|
34
|
+
import "./index14.js";
|
|
35
|
+
import { isEditablePayableStatus as xe } from "./index19.js";
|
|
36
|
+
import { canOverrideApprovalPolicy as Se, canReadCounterpartBankAccounts as Ce } from "./index20.js";
|
|
37
|
+
import { resolveAmountDueMinorUnits as we } from "./index21.js";
|
|
38
|
+
import { usePayableAchInstructions as Te } from "../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
|
|
39
|
+
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
40
|
+
import { PayBillFlow as Ee } from "./index27.js";
|
|
41
|
+
import "./index28.js";
|
|
42
|
+
import { useMarkAsPaidFlow as De } from "./index17.js";
|
|
4
43
|
import "./index18.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
44
|
+
import { BILL_CREATE_MESSAGE_LABELS_EN as Oe, mergeBillCreateScreenCopy as ke } from "./index50.js";
|
|
45
|
+
import { useBillCreateController as Ae } from "./index58.js";
|
|
46
|
+
import { useBillForm as je } from "./index60.js";
|
|
47
|
+
import { buildPaymentHistory as Me } from "./index3.js";
|
|
48
|
+
import { currentApprovalRound as Ne } from "./index4.js";
|
|
49
|
+
import { usePayableApprovalRoundStart as Pe } from "./index32.js";
|
|
50
|
+
import { useApprovalPolicyCardView as Fe } from "./index33.js";
|
|
51
|
+
import { resolveBillRejectionNotice as Ie } from "./index34.js";
|
|
52
|
+
import { useCurrentApprovalRequestId as Le } from "./index35.js";
|
|
53
|
+
import { usePayableDetailActions as Re } from "./index36.js";
|
|
54
|
+
import { formatScheduledDateLabel as ze } from "./index37.js";
|
|
55
|
+
import { useLocalCalendarDay as Be } from "./index38.js";
|
|
56
|
+
import { useScheduledPayment as Ve } from "./index39.js";
|
|
57
|
+
import { useDraftDelete as He } from "./index40.js";
|
|
58
|
+
import { buildBillDetailView as Ue } from "./index45.js";
|
|
59
|
+
import { resolveEditorDismissal as We } from "./index46.js";
|
|
60
|
+
import { SourceDocumentContainer as Ge } from "./index51.js";
|
|
61
|
+
import { useVendorSectionProps as Ke } from "./index54.js";
|
|
62
|
+
import { billCreateTestIds as i } from "./index61.js";
|
|
63
|
+
import { cloneElement as qe, isValidElement as Je, useCallback as a, useEffect as Ye, useMemo as o, useRef as Xe, useState as s } from "react";
|
|
64
|
+
import { Fragment as Ze, jsx as c, jsxs as Qe } from "react/jsx-runtime";
|
|
65
|
+
import { Trash2Icon as $e } from "lucide-react";
|
|
8
66
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
67
|
+
function et(e) {
|
|
68
|
+
let t = [...new Set(e)];
|
|
69
|
+
return t.length > 0 ? t : void 0;
|
|
70
|
+
}
|
|
71
|
+
function l({ open: l, onOpenChange: u, payableId: tt, initialCounterpartId: nt, readOnly: d = !1, copy: rt, onCollapse: it, onEdit: at, poweredByBankName: ot }) {
|
|
72
|
+
let f = o(() => ke(rt), [rt]), st = tt ? void 0 : nt, [ct, lt] = s(st), [ut, dt] = s(!!st), [ft, pt] = s(!1), [mt, p] = s(!1), [ht, gt] = s(), m = a((e) => {
|
|
73
|
+
gt(() => e);
|
|
74
|
+
}, []), [_t, vt] = s(), h = tt ?? _t, g = le(h, { pollWhileOcrProcessing: !0 }), _ = se(h), { initResponse: v } = re(), yt = !!v, y = t(v?.scopes, [n.AccountingConfigReadOrg]), b = r({ enabled: y }), x = g.data, S = !h || !!x, C = !d && S && !!h && x?.status !== "draft", bt = !d && !!x && !xe(x?.status), w = d || bt, T = je({
|
|
75
|
+
payable: x,
|
|
76
|
+
lineItems: _.lineItems
|
|
77
|
+
}), E = x?.counterpart_id;
|
|
78
|
+
Ye(() => {
|
|
79
|
+
ut || E && (lt(E), dt(!0));
|
|
80
|
+
}, [ut, E]);
|
|
81
|
+
let xt = a((e) => {
|
|
82
|
+
dt(!0), lt(e);
|
|
83
|
+
}, []), D = Ve({
|
|
84
|
+
payableId: h,
|
|
85
|
+
scheduledPaymentDate: x?.scheduled_payment_date,
|
|
86
|
+
enabled: d || C
|
|
87
|
+
}), St = Be(), O = o(() => D.hasScheduledPayment && D.scheduledDate ? ze(D.scheduledDate, f.scheduledRelativeDay, St) : void 0, [
|
|
88
|
+
D.hasScheduledPayment,
|
|
89
|
+
D.scheduledDate,
|
|
90
|
+
f.scheduledRelativeDay,
|
|
91
|
+
St
|
|
92
|
+
]), k = Ce(v?.scopes), Ct = t(v?.scopes, [n.PayableWriteOrg]), wt = t(v?.scopes, [n.CounterpartWriteOrg]) && Ct, A = wt && ue(x?.status) && !D.hasScheduledPayment && !D.isResolving, Tt = A && k, Et = A || wt && x?.status === "rejected", Dt = !d && S && (!h || x?.status === "draft") && !D.hasScheduledPayment && !D.isResolving, j = Ke({
|
|
93
|
+
payableId: h,
|
|
94
|
+
counterpartId: d ? E : ct,
|
|
95
|
+
payableCounterpartId: E,
|
|
96
|
+
isVendorKnown: d ? !!x : S,
|
|
97
|
+
onCounterpartChange: xt,
|
|
98
|
+
requiredError: T.errors?.vendor,
|
|
99
|
+
payableCounterpartBankAccountId: x?.counterpart_bank_account_id ?? void 0,
|
|
100
|
+
extractedVendor: x?.counterpart_raw_data ?? void 0,
|
|
101
|
+
readOnly: d,
|
|
102
|
+
canEditVendor: !d || Tt,
|
|
103
|
+
canEditPaymentInstructions: !d || A,
|
|
104
|
+
canAddPaymentInstructions: !d || Et,
|
|
105
|
+
confirmDiscard: m
|
|
106
|
+
}), M = j.activePayToOperation === "missingInstructions" ? Dt || Et : j.activePayToOperation === "existingInstructions" ? Dt || A : j.activePayToOperation === "vendor" && d ? Tt : !1, Ot = !!(h && ut) && !ct, N = g.refetch, kt = a(async () => {
|
|
107
|
+
let { data: e } = await N();
|
|
108
|
+
return e?.status ?? void 0;
|
|
109
|
+
}, [N]), P = ce(), [F, At] = s(!1), I = Xe(void 0), L = a(async () => {
|
|
110
|
+
if (I.current) return I.current;
|
|
111
|
+
let t = (async () => {
|
|
112
|
+
if (M) {
|
|
113
|
+
At(!0);
|
|
114
|
+
try {
|
|
115
|
+
let t;
|
|
116
|
+
try {
|
|
117
|
+
t = await j.prepareVendorForSave({ closeOnSuccess: !1 });
|
|
118
|
+
} catch {
|
|
119
|
+
e.error(f.detail.paymentInstructionsSaveError);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
if (!t.ok) return;
|
|
123
|
+
if (!h) {
|
|
124
|
+
j.finalizePayToSave();
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
let n = t.counterpartId && t.counterpartId !== x?.counterpart_id ? t.counterpartId : void 0, r = t.counterpartBankAccountId && t.counterpartBankAccountId !== x?.counterpart_bank_account_id ? t.counterpartBankAccountId : void 0;
|
|
128
|
+
if (n || r) {
|
|
129
|
+
let t = {
|
|
130
|
+
path: { payable_id: h },
|
|
131
|
+
body: {
|
|
132
|
+
...n ? { counterpart_id: n } : {},
|
|
133
|
+
...r ? { counterpart_bank_account_id: r } : {}
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
try {
|
|
137
|
+
await P.mutateAsync(t);
|
|
138
|
+
} catch {
|
|
139
|
+
try {
|
|
140
|
+
await P.mutateAsync(t);
|
|
141
|
+
} catch {
|
|
142
|
+
e.error(f.detail.paymentInstructionsLinkError);
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
j.finalizePayToSave();
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
j.finalizePayToSave(), await N();
|
|
150
|
+
} finally {
|
|
151
|
+
At(!1);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
})();
|
|
155
|
+
I.current = t;
|
|
156
|
+
try {
|
|
157
|
+
await t;
|
|
158
|
+
} finally {
|
|
159
|
+
I.current = void 0;
|
|
160
|
+
}
|
|
161
|
+
}, [
|
|
162
|
+
M,
|
|
163
|
+
f.detail.paymentInstructionsLinkError,
|
|
164
|
+
f.detail.paymentInstructionsSaveError,
|
|
165
|
+
P,
|
|
166
|
+
x?.counterpart_bank_account_id,
|
|
167
|
+
x?.counterpart_id,
|
|
168
|
+
h,
|
|
169
|
+
N,
|
|
170
|
+
j
|
|
171
|
+
]), R = o(() => M ? j.mode === "creating" && Je(j.newVendorForm) ? {
|
|
172
|
+
...j,
|
|
173
|
+
newVendorForm: qe(j.newVendorForm, {
|
|
174
|
+
onSave: L,
|
|
175
|
+
isSaving: F
|
|
176
|
+
})
|
|
177
|
+
} : j.mode === "resolved" && j.paymentInstructions ? {
|
|
178
|
+
...j,
|
|
179
|
+
paymentInstructions: {
|
|
180
|
+
...j.paymentInstructions,
|
|
181
|
+
onSave: L,
|
|
182
|
+
isSaving: F
|
|
183
|
+
}
|
|
184
|
+
} : j : j, [
|
|
185
|
+
M,
|
|
186
|
+
F,
|
|
187
|
+
L,
|
|
188
|
+
j
|
|
189
|
+
]);
|
|
190
|
+
Ye(() => {
|
|
191
|
+
d && j.isEditingPayTo && !M && j.discardPayToEdits();
|
|
192
|
+
}, [
|
|
193
|
+
M,
|
|
194
|
+
d,
|
|
195
|
+
j.discardPayToEdits,
|
|
196
|
+
j.isEditingPayTo
|
|
197
|
+
]);
|
|
198
|
+
let jt = o(() => C ? { draftSaved: Oe.submittedSaved } : void 0, [C]), z = Ae({
|
|
199
|
+
payableId: tt,
|
|
200
|
+
form: T,
|
|
201
|
+
labels: jt,
|
|
202
|
+
counterpartId: ct,
|
|
203
|
+
isVendorPending: j.mode === "creating" || j.isPendingVendor,
|
|
204
|
+
clearCounterpart: Ot,
|
|
205
|
+
prepareVendorForSave: j.prepareVendorForSave,
|
|
206
|
+
onPayableCreated: vt,
|
|
207
|
+
onSaved: vt,
|
|
208
|
+
onDraftSaved: () => u(!1),
|
|
209
|
+
onFinalized: () => u(!1),
|
|
210
|
+
readSavedStatus: C ? kt : void 0
|
|
211
|
+
}), Mt = !!(z.isSavingDraft || z.isFinalizing || j.isVendorSavePending), B = d ? h : void 0, V = Le({
|
|
212
|
+
payableId: B,
|
|
213
|
+
status: x?.status
|
|
214
|
+
}), Nt = Xe(null), Pt = de(x), H = Te({
|
|
215
|
+
counterpartId: d ? E : void 0,
|
|
216
|
+
currency: x?.currency,
|
|
217
|
+
currentBankAccountId: d ? x?.counterpart_bank_account_id ?? void 0 : void 0,
|
|
218
|
+
enabled: k && d
|
|
219
|
+
}), U = De({
|
|
220
|
+
payableId: B,
|
|
221
|
+
amountDueMinorUnits: we(x) ?? 0,
|
|
222
|
+
amountToPayMinorUnits: x?.amount_to_pay ?? void 0,
|
|
223
|
+
currencyCode: x?.currency ?? void 0,
|
|
224
|
+
dueDate: x?.due_date,
|
|
225
|
+
hasScheduledPayment: D.hasScheduledPayment,
|
|
226
|
+
labels: f.markAsPaid
|
|
227
|
+
}), W = Fe({
|
|
228
|
+
payableId: B,
|
|
229
|
+
approvalPolicyId: x?.approval_policy_id,
|
|
230
|
+
enabled: d,
|
|
231
|
+
copy: f.approvalPolicyCopy
|
|
232
|
+
}), Ft = Se({
|
|
233
|
+
status: x?.status,
|
|
234
|
+
scopes: v?.scopes,
|
|
235
|
+
arePendingApproversUnknown: W.isLoading,
|
|
236
|
+
hasApprovalPolicy: !!x?.approval_policy_id,
|
|
237
|
+
hasWaitingRequest: V.hasWaitingRequest
|
|
238
|
+
}), It = !!V.id, Lt = V.isLoading || W.isLoading, Rt = o(() => et(W.pendingApprovers.flatMap((e) => e.names)), [W.pendingApprovers]), zt = d || C ? h : void 0, Bt = d ? at : void 0, G = a((e) => {
|
|
239
|
+
let t = () => {
|
|
240
|
+
j.discardPayToEdits(), e?.();
|
|
241
|
+
};
|
|
242
|
+
j.hasUnsavedVendorChanges ? m(t) : t();
|
|
243
|
+
}, [m, j]), { actions: K, decisionDialog: Vt, isActionPending: Ht } = Re({
|
|
244
|
+
payableId: zt,
|
|
245
|
+
status: x?.status,
|
|
246
|
+
currentApprovalRequestId: V.id,
|
|
247
|
+
arePendingApproversUnknown: W.isLoading,
|
|
248
|
+
hasScheduledPayment: D.hasScheduledPayment,
|
|
249
|
+
scheduledPaymentIntentId: D.scheduledPaymentIntentId,
|
|
250
|
+
isScheduledPaymentUnknown: D.isResolving,
|
|
251
|
+
isPayabilityUnknown: H.isLoading,
|
|
252
|
+
hasApprovalPolicy: !!x?.approval_policy_id,
|
|
253
|
+
hasWaitingRequest: V.hasWaitingRequest,
|
|
254
|
+
pendingApprovers: W.pendingApprovers,
|
|
255
|
+
labels: f.actions,
|
|
256
|
+
isMarkAsPaidPending: U.isPending,
|
|
257
|
+
onMarkAsPaidSelect: U.open,
|
|
258
|
+
onPayBillSelect: () => G(() => Nt.current?.open()),
|
|
259
|
+
onEditSelect: Bt,
|
|
260
|
+
onActionSucceeded: (e) => {
|
|
261
|
+
if (e === "reopen") {
|
|
262
|
+
Bt?.();
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
C && u(!1);
|
|
266
|
+
}
|
|
267
|
+
}), Ut = He({
|
|
268
|
+
payableId: h,
|
|
269
|
+
status: x?.status,
|
|
270
|
+
enabled: !d,
|
|
271
|
+
labels: f.deleteDraft,
|
|
272
|
+
onDeleted: () => u(!1)
|
|
273
|
+
}), Wt = Mt || Ht, Gt = x?.ocr_status === "processing", Kt = g.isLoading || _.isResolving || Gt, qt = g.isLoading || _.isResolving || b.isResolving || H.isLoading, Jt = g.isError || _.isError || b.isError, Yt = o(() => [...Ut.menuItems, ...C || d && !qt && !Jt ? K.menu.map((e) => ({
|
|
274
|
+
id: e.id,
|
|
275
|
+
label: e.label,
|
|
276
|
+
onSelect: e.onSelect,
|
|
277
|
+
disabled: e.disabled,
|
|
278
|
+
icon: e.icon,
|
|
279
|
+
sectionHeading: e.sectionHeading
|
|
280
|
+
})) : []], [
|
|
281
|
+
K.menu,
|
|
282
|
+
Ut.menuItems,
|
|
283
|
+
C,
|
|
284
|
+
d,
|
|
285
|
+
qt,
|
|
286
|
+
Jt
|
|
287
|
+
]), q = o(() => (b.data?.data ?? []).map((e) => ({
|
|
288
|
+
value: e.id,
|
|
289
|
+
label: [e.nominal_code, e.name].filter(Boolean).join(" — ")
|
|
290
|
+
})), [b.data]), J;
|
|
291
|
+
yt && (y ? b.isError ? J = f.lineItemsGlCodeUnavailable.loadError : !b.isResolving && q.length === 0 && (J = f.lineItemsGlCodeUnavailable.empty) : J = f.lineItemsGlCodeUnavailable.noAccess);
|
|
292
|
+
let Xt = !yt || !!J || b.isResolving, Zt = y && !b.isResolving && !b.isError, Y = oe(B), Qt = x?.status === "rejected" || !d && C, $t = t(v?.scopes, [n.ApprovalRequestReadOrg]), en = Qt && $t, tn = t(v?.scopes, [n.UserReadOrg]), { userNames: X, isError: nn, isResolving: rn } = ie({ enabled: (d || Qt) && tn }), an = o(() => te(Y.data?.data ?? [], X, f.history), [
|
|
293
|
+
Y.data,
|
|
294
|
+
X,
|
|
295
|
+
f.history
|
|
296
|
+
]), on = tn && nn && ne(Y.data?.data ?? [], an, X), sn = Pe({
|
|
297
|
+
payableId: h,
|
|
298
|
+
enabled: en
|
|
299
|
+
}), cn = ae(h, { enabled: en }), ln = o(() => Ne(cn.data?.data, sn.roundStartedAt), [cn.data, sn.roundStartedAt]), Z = o(() => Ie({
|
|
300
|
+
payableStatus: x?.status,
|
|
301
|
+
approvalRequests: ln,
|
|
302
|
+
userNames: X,
|
|
303
|
+
payableUpdatedAt: x?.updated_at,
|
|
304
|
+
labels: f.detail
|
|
305
|
+
}), [
|
|
306
|
+
x?.status,
|
|
307
|
+
x?.updated_at,
|
|
308
|
+
ln,
|
|
309
|
+
X,
|
|
310
|
+
f.detail
|
|
311
|
+
]), un = o(() => Me({
|
|
312
|
+
records: D.paymentRecords,
|
|
313
|
+
events: Y.data?.data ?? [],
|
|
314
|
+
currencyCode: x?.currency,
|
|
315
|
+
labels: f.detail
|
|
316
|
+
}), [
|
|
317
|
+
D.paymentRecords,
|
|
318
|
+
Y.data,
|
|
319
|
+
x?.currency,
|
|
320
|
+
f.detail
|
|
321
|
+
]), dn = o(() => {
|
|
322
|
+
if (!d || !x) return;
|
|
323
|
+
let e = Ue({
|
|
324
|
+
payable: x,
|
|
325
|
+
lineItems: _.lineItems,
|
|
326
|
+
glCodeOptions: q,
|
|
327
|
+
glCodeRosterAvailable: Zt,
|
|
328
|
+
history: an,
|
|
329
|
+
paymentHistory: un,
|
|
330
|
+
approvalPolicy: W.view,
|
|
331
|
+
labels: f.detail,
|
|
332
|
+
hasScheduledPayment: D.hasScheduledPayment,
|
|
333
|
+
rejection: Z,
|
|
334
|
+
payableAchInstructions: H.achInstructions,
|
|
335
|
+
payableAchInstructionsReadable: k && !H.isError
|
|
336
|
+
});
|
|
337
|
+
return j.mode === "resolved" && j.summary ? {
|
|
338
|
+
...e,
|
|
339
|
+
payTo: j.summary
|
|
340
|
+
} : e;
|
|
341
|
+
}, [
|
|
342
|
+
D.hasScheduledPayment,
|
|
343
|
+
W.view,
|
|
344
|
+
k,
|
|
345
|
+
f.detail,
|
|
346
|
+
q,
|
|
347
|
+
Zt,
|
|
348
|
+
an,
|
|
349
|
+
_.lineItems,
|
|
350
|
+
x,
|
|
351
|
+
H.achInstructions,
|
|
352
|
+
H.isError,
|
|
353
|
+
un,
|
|
354
|
+
d,
|
|
355
|
+
Z,
|
|
356
|
+
j.mode,
|
|
357
|
+
j.summary
|
|
358
|
+
]), fn = x?.source_of_payable_data === "ocr", Q = Pt?.name, pn = d ? Q ? f.viewTitle(Q) : f.readOnlyTitle : Q && (fn || C) ? f.extractedTitle(Q) : f.newTitle, mn = d && x?.created_at ? f.addedOn(ee(x.created_at.slice(0, 10))) : void 0, hn = a(() => {
|
|
359
|
+
if (d && j.isEditingPayTo) {
|
|
360
|
+
G(() => u(!1));
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
let e = T.isDirty || j.hasUnsavedVendorChanges || !!z.stagedFile || z.isFileDeletionPending;
|
|
364
|
+
switch (We({
|
|
365
|
+
isUnsavedPromptOpen: mt,
|
|
366
|
+
isLocked: w,
|
|
367
|
+
isDirty: e
|
|
368
|
+
})) {
|
|
369
|
+
case "dismiss-prompt":
|
|
370
|
+
p(!1);
|
|
371
|
+
return;
|
|
372
|
+
case "prompt":
|
|
373
|
+
p(!0);
|
|
374
|
+
return;
|
|
375
|
+
default: u(!1);
|
|
376
|
+
}
|
|
377
|
+
}, [
|
|
378
|
+
z.isFileDeletionPending,
|
|
379
|
+
z.stagedFile,
|
|
380
|
+
T.isDirty,
|
|
381
|
+
w,
|
|
382
|
+
mt,
|
|
383
|
+
G,
|
|
384
|
+
u,
|
|
385
|
+
d,
|
|
386
|
+
j.hasUnsavedVendorChanges,
|
|
387
|
+
j.isEditingPayTo
|
|
388
|
+
]), gn = a(() => {
|
|
389
|
+
if (j.isEditingPayTo) {
|
|
390
|
+
G(it);
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
it?.();
|
|
394
|
+
}, [
|
|
395
|
+
G,
|
|
396
|
+
it,
|
|
397
|
+
j.isEditingPayTo
|
|
398
|
+
]), _n = a(() => {
|
|
399
|
+
p(!1), u(!1);
|
|
400
|
+
}, [u]), vn = Kt || j.mode === "creating", yn = a(async () => {
|
|
401
|
+
if (vn) return;
|
|
402
|
+
let e = await z.saveDraft();
|
|
403
|
+
p(!1), e && u(!1);
|
|
404
|
+
}, [
|
|
405
|
+
z,
|
|
406
|
+
vn,
|
|
407
|
+
u
|
|
408
|
+
]), $ = be({
|
|
409
|
+
payable: x,
|
|
410
|
+
onRemoved: () => u(!1),
|
|
411
|
+
canManage: Ct
|
|
412
|
+
}), bn = a((e) => {
|
|
413
|
+
if (!(Wt || $.isBusy)) return e ? u(!0) : hn();
|
|
414
|
+
}, [
|
|
415
|
+
$.isBusy,
|
|
416
|
+
Wt,
|
|
417
|
+
hn,
|
|
418
|
+
u
|
|
419
|
+
]), xn = $.isPossibleDuplicate, Sn = !d && fn && !ft, Cn = !d && !!Z, wn = Cn || xn || Sn ? /* @__PURE__ */ Qe(Ze, { children: [
|
|
420
|
+
Cn && Z ? /* @__PURE__ */ c(ge, {
|
|
421
|
+
...Z,
|
|
422
|
+
labels: f.rejectedBanner
|
|
423
|
+
}) : null,
|
|
424
|
+
xn ? /* @__PURE__ */ c(he, {
|
|
425
|
+
onNotADuplicate: $.onNotADuplicate,
|
|
426
|
+
onRemoveBill: $.onRemoveBill,
|
|
427
|
+
isActionDisabled: $.isBusy,
|
|
428
|
+
labels: $.removeBillLabel ? { removeBillButton: $.removeBillLabel } : void 0,
|
|
429
|
+
testId: i.duplicateNotice
|
|
430
|
+
}) : null,
|
|
431
|
+
Sn ? /* @__PURE__ */ c(_e, { onDismiss: () => pt(!0) }) : null
|
|
432
|
+
] }) : void 0;
|
|
433
|
+
return /* @__PURE__ */ Qe(Ze, { children: [
|
|
434
|
+
/* @__PURE__ */ c(fe, {
|
|
435
|
+
open: l,
|
|
436
|
+
onOpenChange: bn,
|
|
437
|
+
title: pn,
|
|
438
|
+
subtitle: mn,
|
|
439
|
+
notice: wn,
|
|
440
|
+
vendor: {
|
|
441
|
+
...R,
|
|
442
|
+
testId: i.vendorSection
|
|
443
|
+
},
|
|
444
|
+
values: T.values,
|
|
445
|
+
errors: T.errors,
|
|
446
|
+
onChange: T.onChange,
|
|
447
|
+
lineItems: {
|
|
448
|
+
items: T.lineItemRows,
|
|
449
|
+
glCodeOptions: q,
|
|
450
|
+
glCodeDisabled: Xt,
|
|
451
|
+
glCodeUnavailableMessage: J,
|
|
452
|
+
discount: T.discount,
|
|
453
|
+
onDiscountChange: T.onDiscountChange,
|
|
454
|
+
onDiscountBlur: T.onDiscountBlur,
|
|
455
|
+
tax: T.tax,
|
|
456
|
+
onTaxChange: T.onTaxChange,
|
|
457
|
+
onTaxBlur: T.onTaxBlur,
|
|
458
|
+
total: T.total,
|
|
459
|
+
onTotalChange: T.onTotalChange,
|
|
460
|
+
onTotalBlur: T.onTotalBlur,
|
|
461
|
+
onAddLineItem: T.onAddLineItem,
|
|
462
|
+
errors: T.lineItemErrors,
|
|
463
|
+
totalsErrors: T.totalsErrors,
|
|
464
|
+
testId: i.lineItems
|
|
465
|
+
},
|
|
466
|
+
documentPanel: /* @__PURE__ */ c(Ge, {
|
|
467
|
+
payableId: h,
|
|
468
|
+
readOnly: w,
|
|
469
|
+
isDocumentPending: !!h && !x?.file && (g.isLoading || x?.ocr_status === "processing"),
|
|
470
|
+
file: x?.file ? {
|
|
471
|
+
id: x.file.id,
|
|
472
|
+
name: x.file.name,
|
|
473
|
+
url: x.file.url,
|
|
474
|
+
mimetype: x.file.mimetype
|
|
475
|
+
} : void 0,
|
|
476
|
+
staging: {
|
|
477
|
+
stagedFile: z.stagedFile,
|
|
478
|
+
onFileStaged: z.stageFile,
|
|
479
|
+
onClearStagedFile: z.clearStagedFile,
|
|
480
|
+
isSaving: Mt
|
|
481
|
+
},
|
|
482
|
+
deletion: {
|
|
483
|
+
isPending: z.isFileDeletionPending,
|
|
484
|
+
onRequest: z.requestFileDeletion,
|
|
485
|
+
onDetachNow: z.detachFileNow,
|
|
486
|
+
isDeleting: z.isDeletingFile,
|
|
487
|
+
hasFailed: z.hasFileDeletionFailed
|
|
488
|
+
}
|
|
489
|
+
}),
|
|
490
|
+
menuItems: Yt,
|
|
491
|
+
readOnly: w,
|
|
492
|
+
detail: d ? {
|
|
493
|
+
view: dn,
|
|
494
|
+
actions: K,
|
|
495
|
+
scheduledSummary: O ? f.scheduledSummary(O.label) : void 0,
|
|
496
|
+
scheduledSummaryDate: O?.absoluteLabel,
|
|
497
|
+
scheduledStatusLabel: O ? f.scheduledStatusBadge(O.label) : void 0,
|
|
498
|
+
showApprovalOverrideNotice: !Lt && Ft,
|
|
499
|
+
awaitingApprovalNotice: !Lt && !It && !Ft && x?.status === "approve_in_progress" && x?.approval_policy_id ? Rt ? f.awaitingApprovalNotice(Rt) : f.awaitingApprovalUnknownNotice : void 0,
|
|
500
|
+
payTo: {
|
|
501
|
+
onEdit: R.mode === "resolved" ? R.onEdit : void 0,
|
|
502
|
+
paymentInstructions: R.paymentInstructions,
|
|
503
|
+
editForm: R.mode === "creating" ? R.newVendorForm : void 0
|
|
504
|
+
},
|
|
505
|
+
hideMissingPaymentInstructions: x?.status === "paid" || x?.status === "canceled",
|
|
506
|
+
isLoading: qt,
|
|
507
|
+
isError: Jt,
|
|
508
|
+
paymentHistoryError: D.isError || Y.isError,
|
|
509
|
+
paymentHistoryLoading: D.isResolving || Y.isLoading,
|
|
510
|
+
historyError: Y.isError,
|
|
511
|
+
historyLoading: Y.isLoading || rn,
|
|
512
|
+
historyNamesError: on
|
|
513
|
+
} : void 0,
|
|
514
|
+
isLineItemsLoading: Kt,
|
|
515
|
+
isSaving: Wt || F,
|
|
516
|
+
isSavingDraft: z.isSavingDraft,
|
|
517
|
+
isSubmitting: z.isFinalizing,
|
|
518
|
+
onCancel: hn,
|
|
519
|
+
onCollapse: d ? gn : void 0,
|
|
520
|
+
onSaveDraft: z.saveDraft,
|
|
521
|
+
onFinalize: z.finalize,
|
|
522
|
+
scrollToErrorToken: z.scrollToErrorToken,
|
|
523
|
+
showSubmit: !w && S,
|
|
524
|
+
testId: i.dialog
|
|
525
|
+
}),
|
|
526
|
+
/* @__PURE__ */ c(ye, {
|
|
527
|
+
open: mt,
|
|
528
|
+
onSaveDraft: yn,
|
|
529
|
+
onDiscard: _n,
|
|
530
|
+
onCancel: () => p(!1),
|
|
531
|
+
isSaving: z.isSavingDraft,
|
|
532
|
+
isSaveDraftDisabled: vn,
|
|
533
|
+
labels: f.unsavedChanges,
|
|
534
|
+
testId: i.unsavedDialog,
|
|
535
|
+
saveDraftTestId: i.unsavedSaveDraft,
|
|
536
|
+
discardTestId: i.unsavedDiscard,
|
|
537
|
+
closeTestId: i.unsavedClose
|
|
538
|
+
}),
|
|
539
|
+
/* @__PURE__ */ c(me, {
|
|
540
|
+
open: !!ht,
|
|
541
|
+
onDiscard: () => {
|
|
542
|
+
let e = ht;
|
|
543
|
+
gt(void 0), e?.();
|
|
544
|
+
},
|
|
545
|
+
onKeepEditing: () => gt(void 0),
|
|
546
|
+
labels: f.discardChanges,
|
|
547
|
+
testId: i.discardDialog,
|
|
548
|
+
discardTestId: i.discardConfirm
|
|
549
|
+
}),
|
|
550
|
+
/* @__PURE__ */ c(pe, {
|
|
551
|
+
...Vt,
|
|
552
|
+
labels: { cancelButton: f.actions.decisionDialog.cancelButton },
|
|
553
|
+
testId: i.decisionDialog,
|
|
554
|
+
confirmTestId: i.decisionConfirm,
|
|
555
|
+
reasonTestId: i.decisionReason
|
|
556
|
+
}),
|
|
557
|
+
/* @__PURE__ */ c(pe, {
|
|
558
|
+
...Ut.dialog,
|
|
559
|
+
labels: { cancelButton: f.actions.decisionDialog.cancelButton },
|
|
560
|
+
testId: i.deleteDraftDialog,
|
|
561
|
+
confirmTestId: i.deleteDraftConfirm
|
|
562
|
+
}),
|
|
563
|
+
/* @__PURE__ */ c(pe, {
|
|
564
|
+
open: $.removeConfirmation.open,
|
|
565
|
+
copy: $.removeConfirmation.copy,
|
|
566
|
+
onConfirm: $.removeConfirmation.onConfirm,
|
|
567
|
+
onCancel: $.removeConfirmation.onCancel,
|
|
568
|
+
isPending: $.removeConfirmation.isPending,
|
|
569
|
+
confirmIcon: /* @__PURE__ */ c($e, {}),
|
|
570
|
+
labels: { cancelButton: $.removeConfirmation.cancelButtonLabel },
|
|
571
|
+
testId: i.duplicateRemoveDialog,
|
|
572
|
+
confirmTestId: i.duplicateRemoveConfirm
|
|
573
|
+
}),
|
|
574
|
+
/* @__PURE__ */ c(ve, { ...U.dialogProps }),
|
|
575
|
+
d && x ? /* @__PURE__ */ c(Ee, {
|
|
576
|
+
ref: Nt,
|
|
577
|
+
payable: x,
|
|
578
|
+
onMissingAchInstructions: wt ? j.openPaymentInstructions : void 0,
|
|
579
|
+
poweredByBankName: ot,
|
|
580
|
+
labels: f.payBill
|
|
581
|
+
}) : null
|
|
582
|
+
] });
|
|
583
|
+
}
|
|
43
584
|
//#endregion
|
|
44
|
-
export {
|
|
585
|
+
export { l as BillCreateDialog, l as default };
|