@wisemen/wise-invoicing-web 0.1.0 → 0.2.0
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/ApprovalReminderSettingsViewDataProvider-D-qXZrPT.js +151 -0
- package/dist/{BillingDocumentDetailViewDataProvider-BemnzVNY.js → BillingDocumentDetailViewDataProvider-DDdtlW-2.js} +1417 -1459
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-5vi2pgRM.js → BillingDocumentPdf-ehdFB6mr.js} +4 -4
- package/dist/{CreditNoteDetailViewDataProvider-BuY9ELoK.js → CreditNoteDetailViewDataProvider-11a-JO3H.js} +201 -201
- package/dist/{CreditNotePdfViewDataProvider-DI4eQkpM.js → CreditNotePdfViewDataProvider-bfeaya3P.js} +3 -3
- package/dist/{CustomFieldValueText-BGbQwhON.js → CustomFieldValueText-CZQXGE5F.js} +81 -81
- package/dist/DataProvider-C3uEds9v.js +75 -0
- package/dist/{DunningCaseDetailViewDataProvider-DKuuysqS.js → DunningCaseDetailViewDataProvider-DC-ziMoO.js} +35 -35
- package/dist/{DunningCaseOverviewView-aWttPLrC.js → DunningCaseOverviewView-y_bCmi5j.js} +180 -180
- package/dist/{DunningCaseReminderPdfViewDataProvider-I0I_WQQB.js → DunningCaseReminderPdfViewDataProvider-DNODfED_.js} +22 -23
- package/dist/{DunningCaseSendDialog-DyvA5R1p.js → DunningCaseSendDialog-BPXcqit5.js} +82 -82
- package/dist/InvoiceApprovalOverviewView-DZ14mi4L.js +870 -0
- package/dist/InvoiceApprovalStatusBadge-U-dW2hR4.js +161 -0
- package/dist/InvoiceApproveDialog-2LXneG2r.js +308 -0
- package/dist/InvoiceDetailViewDataProvider-BYeaaQzL.js +2156 -0
- package/dist/InvoiceOverviewBulkSendApprovalDialog-99dfuN4i.js +318 -0
- package/dist/InvoiceOverviewViewDataProvider-CZIQeftL.js +1620 -0
- package/dist/{InvoicePdfView-C-7m2g3b.js → InvoicePdfView-BJRTg_TH.js} +2 -2
- package/dist/{InvoicePdfViewDataProvider-BPiK110e.js → InvoicePdfViewDataProvider-CwI_uGm3.js} +4 -4
- package/dist/InvoicePublicPdfViewDataProvider-uZUfsr5K.js +45 -0
- package/dist/InvoicingFileUploadProvider-D9Xk4rQM.js +94 -0
- package/dist/{IssuerSettingsViewDataProvider-COqHGUE6.js → IssuerSettingsViewDataProvider-CGRa8F-2.js} +4 -4
- package/dist/{ReminderSettingsViewDataProvider-Dys4bUU7.js → ReminderSettingsViewDataProvider-1ucp3z2T.js} +58 -58
- package/dist/{api.util-BCSgCfpS.js → api.util-C_kMGlJN.js} +1456 -846
- package/dist/{billingDocumentDetail.transformer-BBn9R_cx.js → billingDocumentDetail.transformer-Da6_-Hv9.js} +58 -59
- package/dist/client/index.d.ts +2 -2
- package/dist/client/sdk.gen.d.ts +18 -1
- package/dist/client/types.gen.d.ts +1059 -106
- package/dist/client/zod.gen.d.ts +32759 -16136
- package/dist/{creditNoteDetail.query-BcPsB96h.js → creditNoteDetail.query-DLR7L0Ep.js} +30 -30
- package/dist/{dist-BBjpqvUl.js → dist-CoztMdYH.js} +614 -614
- package/dist/{dist-D9lp7NDv.js → dist-Cxdm09Lp.js} +210 -98
- package/dist/{documentTitle.composable-4ApFl9TZ.js → documentTitle.composable-DsBbzhXN.js} +23 -15
- package/dist/{customFieldValue.util-BwsX8exl.js → download.util-B5Q7KUC9.js} +6 -6
- package/dist/{i18n.lib-C6eb-F-e.js → i18n.lib-Cvr8pcDw.js} +272 -8
- package/dist/index.d.ts +297 -31
- package/dist/index.js +344 -324
- package/dist/invoice.service-DEEA9mal.js +745 -0
- package/dist/invoiceApproval.service-DvL3LliM.js +72 -0
- package/dist/invoiceApprovalStatus.util-3Zh10Pj8.js +79 -0
- package/dist/invoiceDeliveryStatus.util-nCsqDypY.js +211 -0
- package/dist/{invoiceDetail.query-Cek8nyaw.js → invoiceDetail.query-CRoH_SgM.js} +1 -1
- package/dist/{invoicingConfig.composable-DTmad1fe.js → invoicingConfig.composable-rxjGK882.js} +2 -2
- package/dist/{issuerSettings.query-Bvz-Oj5D.js → issuerSettings.query-Dc5gsaEm.js} +5 -5
- package/dist/libs/i18n.lib.d.ts +270 -6
- package/dist/locales/en-US.json.d.ts +136 -4
- package/dist/locales/nl-BE.json.d.ts +136 -4
- package/dist/modules/dunning-case/models/dunningCase.transformer.d.ts +0 -1
- package/dist/modules/invoice/api/mutations/invoiceApproveApproval.mutation.d.ts +16 -0
- package/dist/modules/invoice/api/mutations/invoiceArchiveApproval.mutation.d.ts +6 -0
- package/dist/modules/invoice/api/mutations/invoiceBulkSendApproval.mutation.d.ts +5 -0
- package/dist/modules/invoice/api/mutations/invoiceMarkAsPriorApprovalRequired.mutation.d.ts +4 -0
- package/dist/modules/invoice/api/mutations/invoiceRejectApproval.mutation.d.ts +9 -0
- package/dist/modules/invoice/api/mutations/invoiceRestoreFromProForma.mutation.d.ts +4 -0
- package/dist/modules/invoice/api/mutations/invoiceSendApproval.mutation.d.ts +5 -0
- package/dist/modules/invoice/api/mutations/invoiceUnmarkAsPriorApprovalRequired.mutation.d.ts +4 -0
- package/dist/modules/invoice/api/services/invoice.service.d.ts +14 -1
- package/dist/modules/invoice/components/InvoiceApprovalOutOfSyncIndicator.vue.d.ts +3 -0
- package/dist/{ui/DisplayState.vue.d.ts → modules/invoice/components/InvoiceApprovalStatusBadge.vue.d.ts} +7 -10
- package/dist/modules/invoice/components/InvoiceApprovalStatusChip.vue.d.ts +16 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApprovalTransformers.spec.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApprovalUuid.model.d.ts +3 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApprove.transformer.d.ts +5 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApproveForm.model.d.ts +13 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceReject.transformer.d.ts +5 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceRejectForm.model.d.ts +7 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceRejectForm.model.spec.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/detail/invoiceDetail.model.d.ts +13 -1
- package/dist/modules/invoice/models/invoice/detail/invoiceDetail.transformer.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/index/invoiceIndex.model.d.ts +4 -0
- package/dist/modules/invoice/models/invoice/index/invoiceIndexQueryParams.model.d.ts +3 -0
- package/dist/modules/invoice/models/invoice/invoiceApproval.transformer.d.ts +7 -0
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.model.d.ts +34 -0
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.util.d.ts +10 -0
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.util.spec.d.ts +1 -0
- package/dist/modules/invoice/use-cases/detail/components/InvoiceApprovalBanner.vue.d.ts +19 -0
- package/dist/modules/invoice/use-cases/detail/components/InvoiceDetailHeaderSection.vue.d.ts +4 -0
- package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailHeaderActions.composable.d.ts +5 -0
- package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailPaymentsTableColumns.composable.d.ts +1 -1
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApprovalArchiveDialog.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApprovalRevertDialog.vue.d.ts +15 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApproveDialog.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceFinalizeOutOfSyncDialog.vue.d.ts +21 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceRejectDialog.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewBulkActionBar.vue.d.ts +3 -0
- package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewTableApprovalCell.vue.d.ts +9 -0
- package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewDataTableFilters.composable.d.ts +3 -0
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkActionDialog.vue.d.ts +1 -0
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendApprovalDialog.vue.d.ts +12 -0
- package/dist/modules/invoice/use-cases/overview/utils/invoiceOverviewBulkActionFeedback.util.d.ts +2 -0
- package/dist/modules/invoice/use-cases/overview/views/InvoiceOverviewView.vue.d.ts +0 -5
- package/dist/modules/invoice-approval/actions/invoiceApproval.actions.d.ts +5 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalArchive.action.d.ts +1 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalMarkAsApproved.action.d.ts +1 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalReject.action.d.ts +1 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.action.d.ts +1 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalUnmarkAsNeedsApproval.action.d.ts +1 -0
- package/dist/modules/invoice-approval/api/mutations/approvalReminderConfigUpdate.mutation.d.ts +8 -0
- package/dist/modules/invoice-approval/api/queries/approvalReminderConfig.query.d.ts +1 -0
- package/dist/modules/invoice-approval/api/queries/invoiceApprovalIndex.query.d.ts +3 -0
- package/dist/modules/invoice-approval/api/query-keys/invoiceApproval.queryKeys.d.ts +15 -0
- package/dist/modules/invoice-approval/api/services/invoiceApproval.service.d.ts +10 -0
- package/dist/modules/invoice-approval/components/InvoiceApprovalReminderLevelIndicator.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/models/approvalReminderConfig.transformer.d.ts +6 -0
- package/dist/modules/invoice-approval/models/approvalReminderConfigForm.model.d.ts +11 -0
- package/dist/modules/invoice-approval/models/approvalReminderConfigForm.spec.d.ts +1 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndex.model.d.ts +21 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndex.transformer.d.ts +5 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndexQueryParams.model.d.ts +9 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndexQueryParams.transformer.d.ts +6 -0
- package/dist/modules/invoice-approval/routes/invoiceApproval.routes.d.ts +24 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewActionsCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewAmountCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewInvoiceCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewMetrics.vue.d.ts +18 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewNextReminderCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewStatusCell.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverview.composable.d.ts +42 -0
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewFilters.composable.d.ts +10 -0
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewTableColumns.composable.d.ts +3 -0
- package/dist/modules/invoice-approval/use-cases/overview/views/InvoiceApprovalOverviewView.vue.d.ts +3 -0
- package/dist/modules/invoice-approval/use-cases/settings/views/ApprovalReminderSettingsView.vue.d.ts +7 -0
- package/dist/modules/invoice-approval/use-cases/settings/views/ApprovalReminderSettingsViewDataProvider.vue.d.ts +3 -0
- package/dist/modules/settings/routes/settings.routes.d.ts +7 -0
- package/dist/{plainDate.transformer-BxvJpJOv.js → plainDate.transformer-Bhiz9jW7.js} +17 -4
- package/dist/reminderConfig.query-snaHQmrY.js +309 -0
- package/dist/routes/invoicingRoutes.composable.d.ts +14 -6
- package/dist/search.composable-CU9OpyUB.js +52 -0
- package/dist/{src-BFgnUugN.js → src-DUSgQTKr.js} +45 -45
- package/dist/style.css +1 -1
- package/dist/types/queryKey.type.d.ts +3 -2
- package/dist/ui/billing-document/table/utils/billingDocumentLineItemsEditor.util.d.ts +15 -0
- package/dist/utils/html.util.d.ts +4 -0
- package/package.json +2 -1
- package/dist/AddOpenBoundaryIcon-9SqBHfoz.js +0 -25
- package/dist/AirlineIcon-Z6sH_StM.js +0 -26
- package/dist/AirplaneIcon-C-nSkD1w.js +0 -19
- package/dist/AirportIcon-m4itDKCV.js +0 -16
- package/dist/AlertTriangleIcon-DtYLCC-Y.js +0 -23
- package/dist/AllocationsIcon-hcg93Sll.js +0 -16
- package/dist/ArrowNarrowRightIcon-2-Sml68f.js +0 -23
- package/dist/AssetIcon-qOYs6Wna.js +0 -16
- package/dist/BarChartIcon-DDyzpV_3.js +0 -22
- package/dist/BellIcon-DF1OBFta.js +0 -21
- package/dist/BuildingIcon-CC5PMNeP.js +0 -22
- package/dist/ChargerIcon-aM_endLr.js +0 -16
- package/dist/ChevronDownIcon-4QiK-Z6-.js +0 -23
- package/dist/ChevronUpIcon-qBsjZ5Dz.js +0 -23
- package/dist/ClockIcon-BNiPCaiB.js +0 -23
- package/dist/ClockSnoozeIcon-BxGfwJB6.js +0 -23
- package/dist/CopyIcon-DH5ly0dZ.js +0 -19
- package/dist/DataProvider-Dj34ljUX.js +0 -75
- package/dist/DownloadCloudIcon-Cf8ftklG.js +0 -22
- package/dist/EditIcon-Dr7OHBBR.js +0 -21
- package/dist/EraserIcon-B1VJSvdI.js +0 -23
- package/dist/FileIcon-ssmQI5Yl.js +0 -23
- package/dist/FilterLinesIcon-C7YdyPBk.js +0 -23
- package/dist/GlobeIcon-BfRM6Ike.js +0 -22
- package/dist/HelpIcon-BrJ49P5y.js +0 -22
- package/dist/HourGlassIcon-D9rfU1Is.js +0 -22
- package/dist/InfoCircleIcon-Ee0SyiMc.js +0 -23
- package/dist/InvoiceDetailViewDataProvider-D6E7YVV1.js +0 -1670
- package/dist/InvoiceOverviewViewDataProvider-i8tXATJE.js +0 -1677
- package/dist/InvoicePublicPdfViewDataProvider-BJe-8hC5.js +0 -45
- package/dist/KeyboardIcon-T3o_g-1c.js +0 -22
- package/dist/LinkExternalIcon-BkHS4fCx.js +0 -22
- package/dist/LinkIcon-DuPwae98.js +0 -22
- package/dist/MarkerIcon-B1Jqenjb.js +0 -28
- package/dist/MobileBatteryIcon-GZ1SMRDV.js +0 -16
- package/dist/MonitorIcon-pbK22reU.js +0 -22
- package/dist/NotificationIcon-Ctv8vyWt.js +0 -19
- package/dist/ParkingIcon-DnUPW3pB.js +0 -24
- package/dist/PlanningIcon-CXvrskgj.js +0 -16
- package/dist/PreferenceIcon-BHS8uDyi.js +0 -22
- package/dist/ReceiptCheckIcon-QTestqCJ.js +0 -23
- package/dist/RefreshIcon-DShY-aoS.js +0 -22
- package/dist/RemoveOpenBoundaryIcon-CN8YWs6o.js +0 -28
- package/dist/RewindIcon-GWg2AQax.js +0 -22
- package/dist/SettingsIcon-CBLJ6B5u.js +0 -25
- package/dist/ShieldIcon-CVnrOcxl.js +0 -19
- package/dist/ShieldOffIcon-B9l0dDVb.js +0 -23
- package/dist/SignOutIcon-CmDkjJ5F.js +0 -21
- package/dist/SlashCircleIcon-jY5FBko5.js +0 -22
- package/dist/StandIcon-CoYnBLMn.js +0 -23
- package/dist/StarsIcon-D7ZlqOW7.js +0 -22
- package/dist/StopwatchIcon-BK0vh1lg.js +0 -22
- package/dist/TargetIcon-HMWj77-Q.js +0 -22
- package/dist/ThreeDotsIcon-BtFruOKz.js +0 -32
- package/dist/ToolIcon-DRfDb7fE.js +0 -22
- package/dist/TrashIcon-BwxBjHv5.js +0 -19
- package/dist/TurnaroundIcon-b1X61TwZ.js +0 -27
- package/dist/UploadCloudIcon-BF0equKg.js +0 -22
- package/dist/UserIcon-B0rCC6KE.js +0 -22
- package/dist/UsersIcon-cK5l_zKG.js +0 -22
- package/dist/VerifiedIcon-CELYlqcv.js +0 -22
- package/dist/WifiIcon--JPvMNEF.js +0 -23
- package/dist/WifiOffIcon-BS2KftcP.js +0 -23
- package/dist/ZapIcon-BHwcIQc0.js +0 -23
- package/dist/ZoomInIcon-Cu6r915V.js +0 -23
- package/dist/ZoomOutIcon-DwB4FRj-.js +0 -23
- package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
- package/dist/instant.transformer-KmBsH3E9.js +0 -18
- package/dist/invoice.service-Bb8VqQvc.js +0 -635
- package/dist/invoiceDeliveryStatus.util-BPkGCQM6.js +0 -331
- package/dist/reminderConfig.query-DsJNqqi7.js +0 -331
- package/dist/search.composable-BCtYqudV.js +0 -52
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
import "./api.util-C_kMGlJN.js";
|
|
2
|
+
import { b as e } from "./documentTitle.composable-DsBbzhXN.js";
|
|
3
|
+
import { t } from "./invoice.service-DEEA9mal.js";
|
|
4
|
+
import { Q as n, ct as r } from "./dist-Cxdm09Lp.js";
|
|
5
|
+
import { n as i, t as a } from "./invoiceApprovalStatus.util-3Zh10Pj8.js";
|
|
6
|
+
import { r as o } from "./InvoiceApprovalStatusBadge-U-dW2hR4.js";
|
|
7
|
+
import { useI18n as s } from "vue-i18n";
|
|
8
|
+
import { Fragment as c, computed as l, createBlock as u, createCommentVNode as d, createElementBlock as f, createElementVNode as p, createTextVNode as m, createVNode as h, defineComponent as g, onMounted as _, openBlock as v, ref as y, renderList as b, toDisplayString as x, unref as S, withCtx as C } from "vue";
|
|
9
|
+
import { useMutation as w, useOffsetInfiniteQuery as T } from "@wisemen/vue-core-api-utils";
|
|
10
|
+
import { RouterLink as E } from "vue-router";
|
|
11
|
+
import { UIColumnLayout as D, UIDialog as O, UIDialogBody as k, UIDialogFooter as A, UIDialogFooterCancel as j, UIDialogFooterPrimary as M, UIDialogHeader as N, UIText as P, UITooltip as F, UITooltipContent as I, useToast as L } from "@wisemen/vue-core-design-system";
|
|
12
|
+
//#region src/modules/invoice/api/queries/invoiceCustomerSearch.query.ts
|
|
13
|
+
function R(e) {
|
|
14
|
+
let t = l(() => ({ search: e.params.search?.value }));
|
|
15
|
+
return T("invoiceCustomerSearch", {
|
|
16
|
+
params: { queryParams: t },
|
|
17
|
+
queryFn: (t) => o.getAll({
|
|
18
|
+
pagination: t,
|
|
19
|
+
search: e.params.search?.value ?? ""
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/modules/invoice/components/InvoiceApprovalOutOfSyncIndicator.vue
|
|
25
|
+
var z = /* @__PURE__ */ g({
|
|
26
|
+
__name: "InvoiceApprovalOutOfSyncIndicator",
|
|
27
|
+
setup(e) {
|
|
28
|
+
let t = s();
|
|
29
|
+
return (e, r) => (v(), u(S(F), {
|
|
30
|
+
"popover-side-offset": 8,
|
|
31
|
+
"popover-align": "center",
|
|
32
|
+
"popover-side": "bottom"
|
|
33
|
+
}, {
|
|
34
|
+
trigger: C(() => [h(S(n), {
|
|
35
|
+
"aria-label": S(t).t("wise_invoicing.invoice.approval_status.out_of_sync"),
|
|
36
|
+
class: "size-4 shrink-0 text-warning-primary"
|
|
37
|
+
}, null, 8, ["aria-label"])]),
|
|
38
|
+
content: C(() => [h(S(I), null, {
|
|
39
|
+
default: C(() => [h(S(P), {
|
|
40
|
+
text: S(t).t("wise_invoicing.invoice.approval_status.out_of_sync"),
|
|
41
|
+
class: "text-sm text-primary"
|
|
42
|
+
}, null, 8, ["text"])]),
|
|
43
|
+
_: 1
|
|
44
|
+
})]),
|
|
45
|
+
_: 1
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
}), B = {
|
|
49
|
+
approval_already_sent_error: "wise_invoicing.invoice.overview.bulk.skip_reason.approval_already_sent",
|
|
50
|
+
approval_requires_customer_prior_approval: "wise_invoicing.invoice.overview.bulk.skip_reason.approval_not_required",
|
|
51
|
+
approval_requires_editable_invoice: "wise_invoicing.invoice.overview.bulk.skip_reason.not_editable",
|
|
52
|
+
approval_requires_standard_invoice: "wise_invoicing.invoice.overview.bulk.skip_reason.not_standard",
|
|
53
|
+
customer_has_no_default_recipient: "wise_invoicing.invoice.overview.bulk.skip_reason.no_recipient",
|
|
54
|
+
invoice_not_found: "wise_invoicing.invoice.overview.bulk.skip_reason.not_found"
|
|
55
|
+
}, V = "wise_invoicing.invoice.overview.bulk.skip_reason.unknown", H = class {
|
|
56
|
+
static createEmptyPreview() {
|
|
57
|
+
return {
|
|
58
|
+
skipped: [],
|
|
59
|
+
meta: {
|
|
60
|
+
processed: 0,
|
|
61
|
+
skipped: 0,
|
|
62
|
+
total: 0
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
static createSkippedToast(e) {
|
|
67
|
+
let t = [], n = {};
|
|
68
|
+
for (let [r, i] of e.invoices.entries()) {
|
|
69
|
+
let e = `invoice${r}`;
|
|
70
|
+
t.push(`{${e}}`), n[e] = {
|
|
71
|
+
label: this.getInvoiceLabel(i),
|
|
72
|
+
to: this.getInvoiceDetailLink(i)
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
let r = t.join(", ");
|
|
76
|
+
return {
|
|
77
|
+
id: e.id,
|
|
78
|
+
duration: Infinity,
|
|
79
|
+
interactableModels: n,
|
|
80
|
+
message: r === "" ? e.message : `${e.message} ${r}`,
|
|
81
|
+
variant: "error"
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
static getInvoiceDetailLink(t) {
|
|
85
|
+
return t.type === e.CREDIT_NOTE ? {
|
|
86
|
+
name: "invoicing-credit-note-detail",
|
|
87
|
+
params: { creditNoteUuid: t.uuid }
|
|
88
|
+
} : {
|
|
89
|
+
name: "invoicing-invoice-detail",
|
|
90
|
+
params: { invoiceUuid: t.uuid }
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
static getInvoiceLabel(e) {
|
|
94
|
+
return e.sequence ?? e.subject ?? e.customerName;
|
|
95
|
+
}
|
|
96
|
+
static getSkipReasonKeys(e) {
|
|
97
|
+
let t = {};
|
|
98
|
+
for (let n of e) {
|
|
99
|
+
let e = n.errors[0]?.errors[0]?.code;
|
|
100
|
+
t[n.uuid] = e === void 0 ? V : B[e] ?? V;
|
|
101
|
+
}
|
|
102
|
+
return t;
|
|
103
|
+
}
|
|
104
|
+
static getUnskippedInvoiceUuids(e, t) {
|
|
105
|
+
let n = new Set(t.map((e) => e.uuid));
|
|
106
|
+
return e.filter((e) => !n.has(e.uuid)).map((e) => e.uuid);
|
|
107
|
+
}
|
|
108
|
+
}, U = {
|
|
109
|
+
key: 0,
|
|
110
|
+
class: "text-sm text-error-primary"
|
|
111
|
+
}, W = {
|
|
112
|
+
key: 1,
|
|
113
|
+
class: "text-sm text-secondary"
|
|
114
|
+
}, G = {
|
|
115
|
+
key: 0,
|
|
116
|
+
class: "text-sm text-primary"
|
|
117
|
+
}, K = {
|
|
118
|
+
key: 1,
|
|
119
|
+
class: "text-sm text-secondary"
|
|
120
|
+
}, q = { class: "text-sm text-secondary" }, J = {
|
|
121
|
+
key: 0,
|
|
122
|
+
class: "text-xs text-tertiary"
|
|
123
|
+
}, Y = /* @__PURE__ */ g({
|
|
124
|
+
__name: "InvoiceOverviewBulkActionDialog",
|
|
125
|
+
props: {
|
|
126
|
+
title: {},
|
|
127
|
+
isPreviewLoading: { type: Boolean },
|
|
128
|
+
isSubmitting: { type: Boolean },
|
|
129
|
+
confirmLabel: {},
|
|
130
|
+
description: {},
|
|
131
|
+
icon: {},
|
|
132
|
+
loadingLabel: {},
|
|
133
|
+
noneProcessableLabel: {},
|
|
134
|
+
previewErrorLabel: {},
|
|
135
|
+
processableCount: {},
|
|
136
|
+
processableLabel: {},
|
|
137
|
+
skippedInvoices: {},
|
|
138
|
+
skippedPreviewLabel: {},
|
|
139
|
+
skipReasons: {}
|
|
140
|
+
},
|
|
141
|
+
emits: ["close", "confirm"],
|
|
142
|
+
setup(e, { emit: t }) {
|
|
143
|
+
let n = e, r = t;
|
|
144
|
+
return (e, t) => (v(), u(S(O), {
|
|
145
|
+
size: "sm",
|
|
146
|
+
onClose: t[1] ||= (e) => r("close")
|
|
147
|
+
}, {
|
|
148
|
+
default: C(() => [
|
|
149
|
+
h(S(N), {
|
|
150
|
+
title: n.title,
|
|
151
|
+
description: n.description,
|
|
152
|
+
icon: n.icon
|
|
153
|
+
}, null, 8, [
|
|
154
|
+
"title",
|
|
155
|
+
"description",
|
|
156
|
+
"icon"
|
|
157
|
+
]),
|
|
158
|
+
h(S(k), null, {
|
|
159
|
+
default: C(() => [h(S(D), null, {
|
|
160
|
+
default: C(() => [n.previewErrorLabel === null ? n.isPreviewLoading ? (v(), f("p", W, x(n.loadingLabel), 1)) : (v(), f(c, { key: 2 }, [n.processableCount > 0 ? (v(), f("p", G, x(n.processableLabel), 1)) : (v(), f("p", K, x(n.noneProcessableLabel), 1)), n.skippedInvoices.length > 0 ? (v(), u(S(D), {
|
|
161
|
+
key: 2,
|
|
162
|
+
gap: "sm",
|
|
163
|
+
class: "rounded-lg border border-secondary bg-secondary p-md"
|
|
164
|
+
}, {
|
|
165
|
+
default: C(() => [p("p", q, x(n.skippedPreviewLabel), 1), h(S(D), { gap: "xs" }, {
|
|
166
|
+
default: C(() => [(v(!0), f(c, null, b(n.skippedInvoices, (e) => (v(), u(S(D), {
|
|
167
|
+
key: e.uuid,
|
|
168
|
+
gap: "none"
|
|
169
|
+
}, {
|
|
170
|
+
default: C(() => [h(S(E), {
|
|
171
|
+
to: S(H).getInvoiceDetailLink(e),
|
|
172
|
+
class: "text-sm text-brand-primary hover:underline"
|
|
173
|
+
}, {
|
|
174
|
+
default: C(() => [m(x(S(H).getInvoiceLabel(e)), 1)]),
|
|
175
|
+
_: 2
|
|
176
|
+
}, 1032, ["to"]), n.skipReasons?.[e.uuid] === void 0 ? d("", !0) : (v(), f("p", J, x(n.skipReasons[e.uuid]), 1))]),
|
|
177
|
+
_: 2
|
|
178
|
+
}, 1024))), 128))]),
|
|
179
|
+
_: 1
|
|
180
|
+
})]),
|
|
181
|
+
_: 1
|
|
182
|
+
})) : d("", !0)], 64)) : (v(), f("p", U, x(n.previewErrorLabel), 1))]),
|
|
183
|
+
_: 1
|
|
184
|
+
})]),
|
|
185
|
+
_: 1
|
|
186
|
+
}),
|
|
187
|
+
h(S(A), null, {
|
|
188
|
+
right: C(() => [h(S(j)), h(S(M), {
|
|
189
|
+
"is-disabled": n.isPreviewLoading || n.processableCount === 0,
|
|
190
|
+
"is-loading": n.isSubmitting,
|
|
191
|
+
label: n.confirmLabel,
|
|
192
|
+
onClick: t[0] ||= (e) => r("confirm")
|
|
193
|
+
}, null, 8, [
|
|
194
|
+
"is-disabled",
|
|
195
|
+
"is-loading",
|
|
196
|
+
"label"
|
|
197
|
+
])]),
|
|
198
|
+
_: 1
|
|
199
|
+
})
|
|
200
|
+
]),
|
|
201
|
+
_: 1
|
|
202
|
+
}));
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
//#endregion
|
|
206
|
+
//#region src/modules/invoice/api/mutations/invoiceBulkSendApproval.mutation.ts
|
|
207
|
+
function X() {
|
|
208
|
+
return w({
|
|
209
|
+
queryFn: (e) => t.bulkSendApproval(e.params.invoiceUuids),
|
|
210
|
+
queryKeysToInvalidate: {
|
|
211
|
+
invoiceApprovalIndex: {},
|
|
212
|
+
invoiceDetail: {}
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
//#endregion
|
|
217
|
+
//#region src/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendApprovalDialog.vue
|
|
218
|
+
var Z = /* @__PURE__ */ g({
|
|
219
|
+
__name: "InvoiceOverviewBulkSendApprovalDialog",
|
|
220
|
+
props: {
|
|
221
|
+
invoices: {},
|
|
222
|
+
onSent: { type: Function }
|
|
223
|
+
},
|
|
224
|
+
emits: ["close"],
|
|
225
|
+
setup(e, { emit: n }) {
|
|
226
|
+
let o = e, c = n, d = s(), f = L(), p = X(), m = y(!0), h = y(!1), g = y(null), b = y(null), x = l(() => o.invoices.filter((e) => {
|
|
227
|
+
let t = a.getDisplayStatus({
|
|
228
|
+
approval: e.approval,
|
|
229
|
+
requiresPriorApproval: e.requiresPriorApproval
|
|
230
|
+
});
|
|
231
|
+
return t !== null && t !== i.APPROVED;
|
|
232
|
+
})), C = l(() => x.value.map((e) => e.uuid)), w = l(() => g.value?.meta.processed ?? 0), T = l(() => H.getUnskippedInvoiceUuids(x.value, g.value?.skipped ?? [])), E = l(() => {
|
|
233
|
+
let e = new Set(T.value);
|
|
234
|
+
return o.invoices.filter((t) => !e.has(t.uuid));
|
|
235
|
+
}), D = l(() => E.value.length), O = l(() => {
|
|
236
|
+
let e = H.getSkipReasonKeys(g.value?.skipped ?? []), t = {};
|
|
237
|
+
for (let n of E.value) {
|
|
238
|
+
let r = e[n.uuid];
|
|
239
|
+
if (r !== void 0) {
|
|
240
|
+
t[n.uuid] = d.t(r);
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
let o = a.getDisplayStatus({
|
|
244
|
+
approval: n.approval,
|
|
245
|
+
requiresPriorApproval: n.requiresPriorApproval
|
|
246
|
+
});
|
|
247
|
+
t[n.uuid] = o === i.APPROVED ? d.t("wise_invoicing.invoice.overview.bulk.skip_reason.already_approved") : d.t("wise_invoicing.invoice.overview.bulk.skip_reason.approval_not_required");
|
|
248
|
+
}
|
|
249
|
+
return t;
|
|
250
|
+
}), k = l(() => g.value === null ? o.invoices.length : w.value);
|
|
251
|
+
async function A() {
|
|
252
|
+
let e = T.value;
|
|
253
|
+
if (e.length === 0 || h.value) return;
|
|
254
|
+
let t = E.value;
|
|
255
|
+
h.value = !0;
|
|
256
|
+
let n = await p.execute({ params: { invoiceUuids: e } });
|
|
257
|
+
if (h.value = !1, n.isErr()) {
|
|
258
|
+
f.apiError(n.error);
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
let r = new Set(n.value.skipped.map((e) => e.uuid)), i = [...t, ...o.invoices.filter((e) => r.has(e.uuid))];
|
|
262
|
+
n.value.meta.processed > 0 && f.show({ message: d.t("wise_invoicing.invoice.overview.bulk.send_approval.success", { count: n.value.meta.processed }) }), i.length > 0 && f.show(H.createSkippedToast({
|
|
263
|
+
id: "invoice-overview-bulk-send-approval-skipped",
|
|
264
|
+
invoices: i,
|
|
265
|
+
message: d.t("wise_invoicing.invoice.overview.bulk.send_approval.skipped", { count: i.length })
|
|
266
|
+
})), n.value.meta.processed !== 0 && (o.onSent(), c("close"));
|
|
267
|
+
}
|
|
268
|
+
async function j() {
|
|
269
|
+
if (m.value = !0, C.value.length === 0) {
|
|
270
|
+
g.value = H.createEmptyPreview(), m.value = !1;
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
let e = await t.previewBulkSendApproval(C.value);
|
|
274
|
+
if (e.isErr()) {
|
|
275
|
+
b.value = d.t("wise_invoicing.invoice.overview.bulk.preview_error"), m.value = !1;
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
g.value = e.value, m.value = !1;
|
|
279
|
+
}
|
|
280
|
+
return _(() => {
|
|
281
|
+
j();
|
|
282
|
+
}), (e, t) => (v(), u(Y, {
|
|
283
|
+
"confirm-label": S(d).t("wise_invoicing.invoice.overview.bulk.send_approval.confirm"),
|
|
284
|
+
description: S(d).t("wise_invoicing.invoice.overview.bulk.send_approval.description"),
|
|
285
|
+
icon: S(r),
|
|
286
|
+
"is-preview-loading": m.value,
|
|
287
|
+
"is-submitting": h.value,
|
|
288
|
+
"loading-label": S(d).t("wise_invoicing.invoice.overview.bulk.send_approval.loading"),
|
|
289
|
+
"none-processable-label": S(d).t("wise_invoicing.invoice.overview.bulk.send_approval.none_processable"),
|
|
290
|
+
"preview-error-label": b.value,
|
|
291
|
+
"processable-count": w.value,
|
|
292
|
+
"processable-label": S(d).t("wise_invoicing.invoice.overview.bulk.send_approval.processable", { count: w.value }),
|
|
293
|
+
"skip-reasons": O.value,
|
|
294
|
+
"skipped-invoices": E.value,
|
|
295
|
+
"skipped-preview-label": S(d).t("wise_invoicing.invoice.overview.bulk.send_approval.skipped_preview", { count: D.value }),
|
|
296
|
+
title: S(d).t("wise_invoicing.invoice.overview.bulk.send_approval.title", { count: k.value }),
|
|
297
|
+
onClose: t[0] ||= (e) => c("close"),
|
|
298
|
+
onConfirm: A
|
|
299
|
+
}, null, 8, [
|
|
300
|
+
"confirm-label",
|
|
301
|
+
"description",
|
|
302
|
+
"icon",
|
|
303
|
+
"is-preview-loading",
|
|
304
|
+
"is-submitting",
|
|
305
|
+
"loading-label",
|
|
306
|
+
"none-processable-label",
|
|
307
|
+
"preview-error-label",
|
|
308
|
+
"processable-count",
|
|
309
|
+
"processable-label",
|
|
310
|
+
"skip-reasons",
|
|
311
|
+
"skipped-invoices",
|
|
312
|
+
"skipped-preview-label",
|
|
313
|
+
"title"
|
|
314
|
+
]));
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
//#endregion
|
|
318
|
+
export { R as a, z as i, Y as n, H as r, Z as t };
|