@wisemen/wise-invoicing-web 0.2.0 → 0.3.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 → ApprovalReminderSettingsViewDataProvider-DwtfyQpx.js} +4 -4
- package/dist/{BillingDocumentDetailViewDataProvider-DDdtlW-2.js → BillingDocumentDetailViewDataProvider-TJUwMhtn.js} +1373 -1217
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-ehdFB6mr.js → BillingDocumentPdf-PU9Ldfhs.js} +20 -13
- package/dist/{CreditNoteDetailViewDataProvider-11a-JO3H.js → CreditNoteDetailViewDataProvider-DOPmal5D.js} +89 -89
- package/dist/{CreditNotePdfViewDataProvider-bfeaya3P.js → CreditNotePdfViewDataProvider-BH7MaReQ.js} +2 -2
- package/dist/{CustomFieldValueText-CZQXGE5F.js → CustomFieldValueText-BjRVovZL.js} +25 -25
- package/dist/DunningCaseDetailViewDataProvider-CW8ijY3H.js +439 -0
- package/dist/{DunningCaseOverviewView-y_bCmi5j.js → DunningCaseOverviewView-Cfo-4VIw.js} +255 -203
- package/dist/{DunningCaseReminderPdfViewDataProvider-DNODfED_.js → DunningCaseReminderPdfViewDataProvider-Dr-CS_VQ.js} +4 -3
- package/dist/{DunningCaseSendDialog-BPXcqit5.js → DunningCaseSendDialog-BYFXJYMM.js} +83 -72
- package/dist/InvoiceApprovalOutOfSyncIndicator-CP2GLaeh.js +45 -0
- package/dist/InvoiceApprovalOverviewView-Cjdu9iZC.js +814 -0
- package/dist/InvoiceApprovalStatusBadge-CcX8agTF.js +127 -0
- package/dist/InvoiceApproveDialogDataProvider-4wNAetBn.js +377 -0
- package/dist/{InvoiceDetailViewDataProvider-BYeaaQzL.js → InvoiceDetailViewDataProvider-C9O3hXGo.js} +750 -692
- package/dist/InvoiceOverviewViewDataProvider-DBdw7FvZ.js +1892 -0
- package/dist/{InvoicePdfView-BJRTg_TH.js → InvoicePdfView-CvU9bRVd.js} +10 -4
- package/dist/{InvoicePdfViewDataProvider-CwI_uGm3.js → InvoicePdfViewDataProvider-CFjHQ58K.js} +3 -3
- package/dist/{InvoicePublicPdfViewDataProvider-uZUfsr5K.js → InvoicePublicPdfViewDataProvider-DDv-LdBU.js} +3 -3
- package/dist/InvoicePublicProFormaPdfViewDataProvider-BTjJnELb.js +47 -0
- package/dist/{InvoicingFileUploadProvider-D9Xk4rQM.js → InvoicingFileUploadProvider-Kcq7kSSt.js} +2 -2
- package/dist/{IssuerSettingsViewDataProvider-CGRa8F-2.js → IssuerSettingsViewDataProvider-BuSIVnIl.js} +3 -3
- package/dist/{ReminderSettingsViewDataProvider-1ucp3z2T.js → ReminderSettingsViewDataProvider-CH7gSXnj.js} +100 -102
- package/dist/{api.util-C_kMGlJN.js → api.util-CkIRZS3h.js} +985 -930
- package/dist/{billingDocumentDetail.transformer-Da6_-Hv9.js → billingDocumentDetail.transformer-Bfd8geNo.js} +5 -7
- package/dist/client/index.d.ts +2 -2
- package/dist/client/sdk.gen.d.ts +2 -1
- package/dist/client/types.gen.d.ts +114 -31
- package/dist/client/zod.gen.d.ts +343 -78
- package/dist/composables/sending-refetch/sendingRefetch.composable.d.ts +7 -0
- package/dist/composables/sending-refetch/sendingRefetch.composable.spec.d.ts +1 -0
- package/dist/{creditNoteDetail.query-DLR7L0Ep.js → creditNoteDetail.query-tLnfqsEB.js} +27 -27
- package/dist/customerUuid.model-ClN4Vi9n.js +18 -0
- package/dist/{dist-Cxdm09Lp.js → dist-BD7Allff.js} +143 -95
- package/dist/{dist-CoztMdYH.js → dist-D5agTXFI.js} +61 -61
- package/dist/{documentTitle.composable-DsBbzhXN.js → documentTitle.composable-CRJjS6p-.js} +19 -17
- package/dist/{i18n.lib-Cvr8pcDw.js → i18n.lib--mzprLMR.js} +88 -54
- package/dist/index.d.ts +56 -22
- package/dist/index.js +193 -201
- package/dist/{invoice.service-DEEA9mal.js → invoice.service-B1w16_Md.js} +184 -172
- package/dist/{invoiceApproval.service-DvL3LliM.js → invoiceApproval.service-BHAJmFkU.js} +8 -8
- package/dist/{invoiceApprovalStatus.util-3Zh10Pj8.js → invoiceApprovalStatus.util-DohOKR4q.js} +42 -38
- package/dist/invoiceCustomer.service-DpVfpQUD.js +39 -0
- package/dist/{invoiceDetail.query-CRoH_SgM.js → invoiceDetail.query-CfyNSXLS.js} +1 -1
- package/dist/{invoiceDeliveryStatus.util-nCsqDypY.js → invoiceIndexCache.util-jHsrFwcA.js} +128 -51
- package/dist/{invoicingConfig.composable-rxjGK882.js → invoicingConfig.composable-COn1rKRf.js} +2 -2
- package/dist/{issuerSettings.query-Dc5gsaEm.js → issuerSettings.query-CDFk2GiP.js} +3 -2
- package/dist/libs/i18n.lib.d.ts +56 -22
- package/dist/locales/en-US.json.d.ts +44 -27
- package/dist/locales/nl-BE.json.d.ts +44 -27
- package/dist/models/billing-document/activity-log/billingDocumentActivityLog.model.d.ts +8 -1
- package/dist/models/billing-document/activity-log/billingDocumentActivityLog.util.d.ts +12 -0
- package/dist/models/billing-document/activity-log/billingDocumentActivityLog.util.spec.d.ts +1 -0
- package/dist/models/billing-document/billingDocumentDetail.model.d.ts +2 -6
- package/dist/modules/dunning-case/api/mutations/dunningCaseReminderRetry.mutation.d.ts +4 -0
- package/dist/modules/dunning-case/api/services/dunningCase.service.d.ts +2 -1
- package/dist/modules/dunning-case/models/dunningCase.model.d.ts +5 -0
- package/dist/modules/dunning-case/models/dunningCaseReminderPdf.model.d.ts +0 -4
- package/dist/modules/dunning-case/models/dunningCaseReminderPdf.transformer.d.ts +0 -1
- package/dist/modules/dunning-case/test/builders/dunningCaseReminderPdfDto.builder.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewActionsCell.vue.d.ts +2 -0
- package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverview.composable.d.ts +2 -2
- package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverview.composable.spec.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverviewTableColumns.composable.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/pdf/components/DunningCaseReminderPdfTable.vue.d.ts +0 -4
- package/dist/modules/dunning-case/use-cases/send/dialogs/DunningCaseBulkSendDialog.vue.d.ts +2 -1
- package/dist/modules/dunning-case/use-cases/settings/components/ReminderLadderRow.vue.d.ts +4 -4
- package/dist/modules/dunning-case/use-cases/settings/composables/reminderLadder.composable.d.ts +2 -2
- package/dist/modules/dunning-case/use-cases/settings/composables/reminderLadder.composable.spec.d.ts +1 -0
- package/dist/modules/invoice/api/mutations/invoiceRejectApproval.mutation.d.ts +8 -0
- package/dist/modules/invoice/api/queries/invoicePublicProFormaDetail.query.d.ts +2 -0
- package/dist/modules/invoice/api/query-keys/invoice.queryKeys.d.ts +6 -0
- package/dist/modules/invoice/api/services/invoice.service.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceApproveForm.model.d.ts +4 -2
- package/dist/modules/invoice/models/invoice/approval/invoiceApproveForm.model.spec.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/approval/invoiceRejectForm.model.d.ts +8 -0
- package/dist/modules/invoice/models/invoice/detail/invoiceDetail.model.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/index/invoiceIndexQueryParams.model.d.ts +2 -3
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.model.d.ts +2 -9
- package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.util.d.ts +4 -2
- package/dist/modules/invoice/models/invoice/payment/invoicePaymentCreate.transformer.spec.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/pdf/invoicePdfDetail.transformer.d.ts +2 -1
- package/dist/modules/invoice/routes/invoice.routes.d.ts +4 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApproveDialog.vue.d.ts +1 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApproveDialogDataProvider.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/detail/dialogs/InvoicePaymentDeleteDialog.vue.d.ts +13 -0
- package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewDataTableFilters.composable.d.ts +2 -3
- package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewSelection.composable.d.ts +11 -9
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkActionDialog.vue.d.ts +2 -2
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendApprovalDialog.vue.d.ts +3 -1
- package/dist/modules/invoice/use-cases/overview/utils/invoiceOverviewBulkActionFeedback.util.d.ts +7 -4
- package/dist/modules/invoice/use-cases/overview/utils/invoiceOverviewBulkActionFeedback.util.spec.d.ts +1 -0
- package/dist/modules/invoice/use-cases/pdf/components/BillingDocumentPdf.vue.d.ts +1 -0
- package/dist/modules/invoice/use-cases/pdf/components/InvoicePdfWatermark.vue.d.ts +4 -1
- package/dist/modules/invoice/use-cases/pdf/views/InvoicePdfView.vue.d.ts +1 -0
- package/dist/modules/invoice/use-cases/pdf/views/InvoicePublicProFormaPdfViewDataProvider.vue.d.ts +3 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.action.d.ts +2 -0
- package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.spec.d.ts +1 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndex.transformer.spec.d.ts +1 -0
- package/dist/modules/invoice-approval/models/invoiceApprovalIndexQueryParams.transformer.spec.d.ts +1 -0
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverview.composable.d.ts +5 -6
- package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewFilters.composable.d.ts +0 -5
- package/dist/modules/settings/models/issuer-settings/issuerSettings.model.d.ts +1 -0
- package/dist/{reminderConfig.query-snaHQmrY.js → reminderConfig.query-DSO0ekC_.js} +112 -105
- package/dist/routes/invoicingPublicRoutes.composable.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/ui/billing-document/sidebar/BillingDocumentDetailSidebarActivityApprovalDetails.vue.d.ts +7 -0
- package/package.json +2 -2
- package/dist/DunningCaseDetailViewDataProvider-DC-ziMoO.js +0 -409
- package/dist/InvoiceApprovalOverviewView-DZ14mi4L.js +0 -870
- package/dist/InvoiceApprovalStatusBadge-U-dW2hR4.js +0 -161
- package/dist/InvoiceApproveDialog-2LXneG2r.js +0 -308
- package/dist/InvoiceOverviewBulkSendApprovalDialog-99dfuN4i.js +0 -318
- package/dist/InvoiceOverviewViewDataProvider-CZIQeftL.js +0 -1620
- package/dist/customerUuid.model-GUFYq3O2.js +0 -5
- package/dist/modules/invoice-approval/actions/invoiceApprovalUnmarkAsNeedsApproval.action.d.ts +0 -1
|
@@ -1,318 +0,0 @@
|
|
|
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 };
|