@wisemen/wise-invoicing-web 0.2.0 → 0.3.1
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-Dub07ybW.js} +1373 -1217
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-ehdFB6mr.js → BillingDocumentPdf-DgtUB45R.js} +20 -13
- package/dist/{CreditNoteDetailViewDataProvider-11a-JO3H.js → CreditNoteDetailViewDataProvider-BxNfC6yO.js} +90 -90
- package/dist/{CreditNotePdfViewDataProvider-bfeaya3P.js → CreditNotePdfViewDataProvider-D0j8qqK-.js} +2 -2
- package/dist/{CustomFieldValueText-CZQXGE5F.js → CustomFieldValueText-Cuhs9sRn.js} +26 -26
- package/dist/DunningCaseDetailViewDataProvider-ou1FfNWQ.js +439 -0
- package/dist/{DunningCaseOverviewView-y_bCmi5j.js → DunningCaseOverviewView--zaPD0-c.js} +255 -203
- package/dist/{DunningCaseReminderPdfViewDataProvider-DNODfED_.js → DunningCaseReminderPdfViewDataProvider-BpUDbbSH.js} +5 -4
- package/dist/{DunningCaseSendDialog-BPXcqit5.js → DunningCaseSendDialog-Co4oLFtZ.js} +83 -72
- package/dist/InvoiceApprovalOutOfSyncIndicator-H6H7kjAE.js +45 -0
- package/dist/InvoiceApprovalOverviewView-Bw-6rkon.js +814 -0
- package/dist/InvoiceApprovalStatusBadge-IyzJ--TJ.js +127 -0
- package/dist/InvoiceApproveDialogDataProvider-8G-11W1e.js +377 -0
- package/dist/{InvoiceDetailViewDataProvider-BYeaaQzL.js → InvoiceDetailViewDataProvider-B9gul2ei.js} +750 -692
- package/dist/InvoiceOverviewViewDataProvider-5KgIdhfL.js +1892 -0
- package/dist/{InvoicePdfView-BJRTg_TH.js → InvoicePdfView-5sJ-u_gT.js} +10 -4
- package/dist/{InvoicePdfViewDataProvider-CwI_uGm3.js → InvoicePdfViewDataProvider-BLVXDPv6.js} +3 -3
- package/dist/{InvoicePublicPdfViewDataProvider-uZUfsr5K.js → InvoicePublicPdfViewDataProvider-CnhYazmB.js} +3 -3
- package/dist/InvoicePublicProFormaPdfViewDataProvider-CcvGISK6.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-BQbaoN5W.js} +144 -96
- package/dist/{dist-CoztMdYH.js → dist-CGZBUnWK.js} +62 -62
- package/dist/{dist-boJIIxnT.js → dist-Cdbpkd3Y.js} +1 -1
- 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-BDLs7W9m.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 +3 -3
- 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,42 +1,42 @@
|
|
|
1
|
-
import { $ as e,
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
4
|
-
import { n as
|
|
5
|
-
import { n as
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import { useQuery as
|
|
1
|
+
import { $ as e, F as t, K as n, O as r, P as i, et as a, lt as o, o as s, t as c } from "./api.util-CkIRZS3h.js";
|
|
2
|
+
import { c as l, h as u, m as d, w as f } from "./documentTitle.composable-CRJjS6p-.js";
|
|
3
|
+
import { n as p, t as m } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
4
|
+
import { n as h, r as g, t as _ } from "./plainDate.transformer-Bhiz9jW7.js";
|
|
5
|
+
import { n as v, t as y } from "./percentage.util-Bl78kSSk.js";
|
|
6
|
+
import { Fragment as b, computed as x, createElementBlock as S, createElementVNode as C, defineComponent as w, normalizeClass as T, openBlock as E, renderList as D } from "vue";
|
|
7
|
+
import { useQuery as O } from "@wisemen/vue-core-api-utils";
|
|
8
8
|
//#region src/utils/html.util.ts
|
|
9
|
-
var
|
|
10
|
-
function
|
|
9
|
+
var k = /* @__PURE__ */ new Set(/* @__PURE__ */ "address.article.aside.blockquote.div.dl.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hr.li.main.nav.ol.p.pre.section.table.tbody.td.tfoot.th.thead.tr.ul".split("."));
|
|
10
|
+
function A(e) {
|
|
11
11
|
return e.nodeType === 3;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function j(e) {
|
|
14
14
|
return e.nodeType === 1;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function M(e) {
|
|
17
17
|
let t = e;
|
|
18
18
|
for (; t.startsWith("\n\n");) t = t.slice(2);
|
|
19
19
|
for (; t.endsWith("\n\n");) t = t.slice(0, -2);
|
|
20
20
|
return t;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function N(e) {
|
|
23
23
|
let t = "";
|
|
24
24
|
function n(e) {
|
|
25
25
|
t += e.replaceAll("\xA0", " ");
|
|
26
26
|
}
|
|
27
27
|
function r(e) {
|
|
28
|
-
if (
|
|
28
|
+
if (A(e)) {
|
|
29
29
|
n(e.data);
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
|
-
if (!
|
|
32
|
+
if (!j(e)) return;
|
|
33
33
|
let i = e.tagName.toLowerCase();
|
|
34
34
|
if (i === "script" || i === "style") return;
|
|
35
35
|
if (i === "br") {
|
|
36
36
|
n("\n");
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
|
-
let a =
|
|
39
|
+
let a = k.has(i);
|
|
40
40
|
a && t.length > 0 && !t.endsWith("\n") && n("\n\n");
|
|
41
41
|
for (let t of e.childNodes) r(t);
|
|
42
42
|
a && t.length > 0 && !t.endsWith("\n") && n("\n\n");
|
|
@@ -44,38 +44,38 @@ function M(e) {
|
|
|
44
44
|
for (let t of e) r(t);
|
|
45
45
|
return t;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function P(e) {
|
|
48
48
|
return e.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'");
|
|
49
49
|
}
|
|
50
|
-
var
|
|
50
|
+
var F = class {
|
|
51
51
|
static fromPlainText(e) {
|
|
52
|
-
return `<p>${e.split("\n").map((e) =>
|
|
52
|
+
return `<p>${e.split("\n").map((e) => P(e)).join("<br>")}</p>`;
|
|
53
53
|
}
|
|
54
54
|
static toPlainText(e) {
|
|
55
|
-
return
|
|
55
|
+
return M(N(new DOMParser().parseFromString(e, "text/html").body.childNodes));
|
|
56
56
|
}
|
|
57
|
-
},
|
|
57
|
+
}, I = [
|
|
58
58
|
"en-US",
|
|
59
59
|
"nl-BE",
|
|
60
60
|
"fr-BE"
|
|
61
|
-
],
|
|
61
|
+
], L = [
|
|
62
62
|
1,
|
|
63
63
|
2,
|
|
64
64
|
3
|
|
65
65
|
];
|
|
66
|
-
function L(e) {
|
|
67
|
-
return e === null || e === "infinity" || e === "-infinity";
|
|
68
|
-
}
|
|
69
66
|
function R(e) {
|
|
70
|
-
return
|
|
67
|
+
return e === null || e === "infinity" || e === "-infinity";
|
|
71
68
|
}
|
|
72
69
|
function z(e) {
|
|
73
|
-
return
|
|
70
|
+
return R(e) ? null : g.fromDto(e);
|
|
71
|
+
}
|
|
72
|
+
function B(e) {
|
|
73
|
+
return R(e) ? null : _.fromDto(e);
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function V(e, t) {
|
|
76
76
|
return e.items.find((e) => e.locale === t)?.value ?? "";
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function H() {
|
|
79
79
|
return {
|
|
80
80
|
"en-US": {
|
|
81
81
|
body: "",
|
|
@@ -91,219 +91,226 @@ function V() {
|
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function U(e, t, n) {
|
|
95
95
|
let r = t?.fee.amount ?? null;
|
|
96
96
|
return {
|
|
97
|
-
feeAmount: r === null ? 0 :
|
|
97
|
+
feeAmount: r === null ? 0 : m(r.amount, r.precision),
|
|
98
98
|
feeCurrency: r?.currency ?? n.currency,
|
|
99
99
|
feePercentage: t?.fee.percentage?.value ?? 0,
|
|
100
100
|
feePrecision: r?.precision ?? n.precision,
|
|
101
|
-
feeType: t?.fee.type ??
|
|
101
|
+
feeType: t?.fee.type ?? d.AMOUNT,
|
|
102
102
|
offsetDays: t?.offsetDays ?? e,
|
|
103
|
-
schedule: t?.schedule ??
|
|
103
|
+
schedule: t?.schedule ?? f.AFTER_DUE_DATE,
|
|
104
104
|
sequence: e,
|
|
105
|
-
template: t?.template ??
|
|
105
|
+
template: t?.template ?? H()
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function W(e, t) {
|
|
109
109
|
return {
|
|
110
|
-
body:
|
|
111
|
-
subject:
|
|
110
|
+
body: F.toPlainText(V(e.body, t)),
|
|
111
|
+
subject: V(e.subject, t)
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
return { items:
|
|
114
|
+
function G(e, t) {
|
|
115
|
+
return { items: I.map((n) => ({
|
|
116
116
|
locale: n,
|
|
117
|
-
value: t === "body" ?
|
|
117
|
+
value: t === "body" ? F.fromPlainText(e[n][t]) : e[n][t]
|
|
118
118
|
})) };
|
|
119
119
|
}
|
|
120
|
-
var
|
|
120
|
+
var K = class e {
|
|
121
121
|
static fromDetailDto(t) {
|
|
122
122
|
return {
|
|
123
123
|
uuid: t.uuid,
|
|
124
|
-
closedAt:
|
|
125
|
-
createdAt:
|
|
126
|
-
lastReminderSentAt:
|
|
127
|
-
nextReminderOn:
|
|
128
|
-
updatedAt:
|
|
124
|
+
closedAt: g.fromNullableDto(t.closedAt),
|
|
125
|
+
createdAt: g.fromDto(t.createdAt),
|
|
126
|
+
lastReminderSentAt: z(t.lastReminderSentAt),
|
|
127
|
+
nextReminderOn: _.fromNullableDto(t.nextReminderOn),
|
|
128
|
+
updatedAt: g.fromDto(t.updatedAt),
|
|
129
129
|
blockedReason: t.blockedReason,
|
|
130
|
+
canRetryReminder: t.canRetryReminder,
|
|
130
131
|
canSendReminder: t.canSendReminder,
|
|
131
132
|
customer: t.customer,
|
|
132
133
|
invoices: t.invoices.map(e.fromInvoiceDto),
|
|
133
134
|
latestCreatedReminder: e.fromReminderDto(t.latestCreatedReminder),
|
|
134
135
|
level: t.level ?? 0,
|
|
135
|
-
outstandingBalance:
|
|
136
|
-
totalCredited:
|
|
137
|
-
totalFee:
|
|
138
|
-
totalInvoiced:
|
|
139
|
-
totalPaid:
|
|
136
|
+
outstandingBalance: h.fromDto(t.outstandingBalance),
|
|
137
|
+
totalCredited: h.fromDto(t.totalCredited),
|
|
138
|
+
totalFee: h.fromDto(t.totalFee),
|
|
139
|
+
totalInvoiced: h.fromDto(t.totalInvoiced),
|
|
140
|
+
totalPaid: h.fromDto(t.totalPaid)
|
|
140
141
|
};
|
|
141
142
|
}
|
|
142
143
|
static fromIndexDto(t) {
|
|
143
144
|
return {
|
|
144
145
|
uuid: t.uuid,
|
|
145
|
-
lastReminderSentAt:
|
|
146
|
-
nextReminderOn:
|
|
146
|
+
lastReminderSentAt: z(t.lastReminderSentAt),
|
|
147
|
+
nextReminderOn: B(t.nextReminderOn),
|
|
147
148
|
blockedReason: t.blockedReason,
|
|
149
|
+
canRetryReminder: t.canRetryReminder,
|
|
148
150
|
canSendReminder: t.canSendReminder,
|
|
149
151
|
customer: t.customer,
|
|
150
152
|
daysOverdue: t.daysOverdue,
|
|
151
153
|
latestCreatedReminder: e.fromReminderDto(t.latestCreatedReminder),
|
|
152
154
|
level: t.level,
|
|
153
|
-
outstandingBalance:
|
|
155
|
+
outstandingBalance: h.fromDto(t.outstandingBalance)
|
|
154
156
|
};
|
|
155
157
|
}
|
|
156
158
|
static fromInvoiceDto(e) {
|
|
157
159
|
return {
|
|
158
160
|
uuid: e.uuid,
|
|
159
|
-
dueOn:
|
|
161
|
+
dueOn: _.fromDto(e.dueOn),
|
|
160
162
|
isDisputed: e.isDisputed,
|
|
161
|
-
balanceDueAmount:
|
|
163
|
+
balanceDueAmount: h.fromDto(e.balanceDueAmount),
|
|
162
164
|
creditNotes: e.creditNotes.map((e) => ({
|
|
163
165
|
uuid: e.uuid,
|
|
164
|
-
finalizedOn:
|
|
165
|
-
grossAmount:
|
|
166
|
+
finalizedOn: _.fromDto(e.finalizedOn),
|
|
167
|
+
grossAmount: h.fromDto(e.grossAmount),
|
|
166
168
|
sequence: e.sequence
|
|
167
169
|
})),
|
|
168
|
-
grossAmount:
|
|
170
|
+
grossAmount: h.fromDto(e.grossAmount),
|
|
169
171
|
level: e.level ?? 0,
|
|
170
|
-
paidAmount:
|
|
172
|
+
paidAmount: h.fromDto(e.paidAmount),
|
|
171
173
|
payments: e.payments.map((e) => ({
|
|
172
174
|
uuid: e.uuid,
|
|
173
|
-
amount:
|
|
174
|
-
date:
|
|
175
|
+
amount: h.fromDto(e.amount),
|
|
176
|
+
date: _.fromDto(e.date)
|
|
175
177
|
})),
|
|
176
178
|
sequence: e.sequence,
|
|
177
179
|
settlementStatus: e.settlementStatus,
|
|
178
180
|
subject: e.subject,
|
|
179
|
-
totalCreditedAmount:
|
|
181
|
+
totalCreditedAmount: h.fromDto(e.totalCreditedAmount)
|
|
180
182
|
};
|
|
181
183
|
}
|
|
182
184
|
static fromReminderConfigDto(e) {
|
|
183
185
|
return {
|
|
184
186
|
uuid: e.uuid,
|
|
185
187
|
fee: {
|
|
186
|
-
amount: e.fee.amount === null ? null :
|
|
187
|
-
percentage:
|
|
188
|
+
amount: e.fee.amount === null ? null : h.fromDto(e.fee.amount),
|
|
189
|
+
percentage: v.fromNullableDto(e.fee.percentage),
|
|
188
190
|
type: e.fee.type
|
|
189
191
|
},
|
|
190
192
|
offsetDays: e.offsetDays,
|
|
191
193
|
schedule: e.schedule,
|
|
192
194
|
sequence: e.sequence,
|
|
193
195
|
template: {
|
|
194
|
-
"en-US":
|
|
195
|
-
"fr-BE":
|
|
196
|
-
"nl-BE":
|
|
196
|
+
"en-US": W(e.template, "en-US"),
|
|
197
|
+
"fr-BE": W(e.template, "fr-BE"),
|
|
198
|
+
"nl-BE": W(e.template, "nl-BE")
|
|
197
199
|
}
|
|
198
200
|
};
|
|
199
201
|
}
|
|
200
202
|
static fromReminderDto(e) {
|
|
201
203
|
return e === null ? null : {
|
|
202
|
-
|
|
204
|
+
uuid: e.uuid,
|
|
205
|
+
sentAt: z(e.sentAt),
|
|
203
206
|
hasErrors: e.hasErrors
|
|
204
207
|
};
|
|
205
208
|
}
|
|
206
209
|
static reminderConfigsToDto(e) {
|
|
207
210
|
return e.reminders.map((e) => ({
|
|
208
|
-
fee: e.feeType ===
|
|
211
|
+
fee: e.feeType === d.PERCENTAGE ? {
|
|
209
212
|
amount: null,
|
|
210
|
-
percentage:
|
|
211
|
-
type:
|
|
213
|
+
percentage: v.toDto(new y(e.feePercentage)),
|
|
214
|
+
type: d.PERCENTAGE
|
|
212
215
|
} : {
|
|
213
216
|
amount: {
|
|
214
|
-
amount:
|
|
217
|
+
amount: p(e.feeAmount, e.feePrecision),
|
|
215
218
|
currency: e.feeCurrency,
|
|
216
219
|
precision: e.feePrecision
|
|
217
220
|
},
|
|
218
221
|
percentage: null,
|
|
219
|
-
type:
|
|
222
|
+
type: d.AMOUNT
|
|
220
223
|
},
|
|
221
224
|
offsetDays: e.offsetDays,
|
|
222
225
|
schedule: e.schedule,
|
|
223
226
|
sequence: e.sequence,
|
|
224
227
|
template: {
|
|
225
|
-
body:
|
|
226
|
-
subject:
|
|
228
|
+
body: G(e.template, "body"),
|
|
229
|
+
subject: G(e.template, "subject")
|
|
227
230
|
}
|
|
228
231
|
}));
|
|
229
232
|
}
|
|
230
233
|
static reminderConfigsToForm(e) {
|
|
231
234
|
let t = e.find((e) => e.fee.amount !== null)?.fee.amount ?? null, n = {
|
|
232
|
-
currency: t?.currency ??
|
|
235
|
+
currency: t?.currency ?? l.EUR,
|
|
233
236
|
precision: t?.precision ?? 2
|
|
234
237
|
};
|
|
235
|
-
return { reminders:
|
|
238
|
+
return { reminders: L.map((t) => U(t, e.find((e) => e.sequence === t), n)) };
|
|
236
239
|
}
|
|
237
240
|
};
|
|
238
241
|
//#endregion
|
|
239
242
|
//#region src/modules/dunning-case/api/services/dunningCase.service.ts
|
|
240
|
-
function
|
|
243
|
+
function q(e) {
|
|
241
244
|
return {
|
|
242
245
|
customerUuid: e.customerUuid,
|
|
243
246
|
isOpen: e.isOpen,
|
|
244
247
|
dunningCaseUuids: e.dunningCaseUuids === void 0 ? void 0 : {
|
|
245
|
-
scope:
|
|
248
|
+
scope: u.INCLUDE,
|
|
246
249
|
values: e.dunningCaseUuids
|
|
247
250
|
},
|
|
248
251
|
level: e.level
|
|
249
252
|
};
|
|
250
253
|
}
|
|
251
|
-
var
|
|
252
|
-
static async getAll(
|
|
253
|
-
return (await
|
|
254
|
-
filter:
|
|
255
|
-
pagination:
|
|
254
|
+
var J = class {
|
|
255
|
+
static async getAll(e) {
|
|
256
|
+
return (await c.fromPromise(a({ query: {
|
|
257
|
+
filter: q(e),
|
|
258
|
+
pagination: e.pagination
|
|
256
259
|
} }))).map((e) => ({
|
|
257
|
-
data: e.data.items.map(
|
|
260
|
+
data: e.data.items.map(K.fromIndexDto),
|
|
258
261
|
meta: e.data.meta
|
|
259
262
|
}));
|
|
260
263
|
}
|
|
261
|
-
static async getByUuid(
|
|
262
|
-
return (await
|
|
264
|
+
static async getByUuid(t) {
|
|
265
|
+
return (await c.fromPromise(e({ path: { uuid: t } }))).map((e) => K.fromDetailDto(e.data));
|
|
263
266
|
}
|
|
264
267
|
static async getReminderConfigs() {
|
|
265
|
-
return (await
|
|
268
|
+
return (await c.fromPromise(o())).map((e) => e.data.items.map(K.fromReminderConfigDto));
|
|
266
269
|
}
|
|
267
270
|
static async previewBulk(e) {
|
|
268
|
-
return (await
|
|
271
|
+
return (await c.fromPromise(r({ query: { filter: q(e) } }))).map((e) => e.data);
|
|
272
|
+
}
|
|
273
|
+
static async retry(e) {
|
|
274
|
+
let t = await c.fromPromise(i({ path: { uuid: e } }));
|
|
275
|
+
return c.void(t);
|
|
269
276
|
}
|
|
270
277
|
static async send(e) {
|
|
271
|
-
let
|
|
272
|
-
return
|
|
278
|
+
let n = await c.fromPromise(t({ path: { uuid: e } }));
|
|
279
|
+
return c.void(n);
|
|
273
280
|
}
|
|
274
281
|
static async sendBulk(e) {
|
|
275
|
-
return (await
|
|
282
|
+
return (await c.fromPromise(s({ query: { filter: q(e) } }))).map((e) => e.data);
|
|
276
283
|
}
|
|
277
284
|
static async updateReminderConfigs(e) {
|
|
278
|
-
let
|
|
279
|
-
return
|
|
285
|
+
let t = await c.fromPromise(n({ body: { reminders: K.reminderConfigsToDto(e) } }));
|
|
286
|
+
return c.void(t);
|
|
280
287
|
}
|
|
281
|
-
},
|
|
288
|
+
}, Y = {
|
|
282
289
|
class: "flex shrink-0 gap-xxs",
|
|
283
290
|
"aria-hidden": "true"
|
|
284
|
-
},
|
|
291
|
+
}, X = /* @__PURE__ */ w({
|
|
285
292
|
__name: "DunningCaseReminderLevelIndicator",
|
|
286
293
|
props: {
|
|
287
294
|
level: {},
|
|
288
295
|
size: { default: "md" }
|
|
289
296
|
},
|
|
290
297
|
setup(e) {
|
|
291
|
-
let t = e, n =
|
|
292
|
-
return (e, t) => (
|
|
298
|
+
let t = e, n = x(() => Math.min(3, Math.max(0, t.level ?? 0))), r = x(() => t.level === 3 ? "error" : t.level === 2 ? "warning" : "brand"), i = x(() => t.size === "sm" ? "h-(--spacing-sm) w-(--spacing-md)" : "h-(--spacing-sm) w-(--spacing-lg)");
|
|
299
|
+
return (e, t) => (E(), S("span", Y, [(E(), S(b, null, D(3, (e) => C("span", {
|
|
293
300
|
key: e,
|
|
294
|
-
class:
|
|
301
|
+
class: T([[i.value, e <= n.value ? {
|
|
295
302
|
"border-brand-500 bg-brand-500": r.value === "brand",
|
|
296
303
|
"border-warning-500 bg-warning-solid": r.value === "warning",
|
|
297
304
|
"border-error bg-error-solid": r.value === "error"
|
|
298
305
|
} : "border-secondary bg-primary"], "rounded-full border"])
|
|
299
306
|
}, null, 2)), 64))]));
|
|
300
307
|
}
|
|
301
|
-
}),
|
|
302
|
-
function
|
|
303
|
-
return
|
|
304
|
-
staleTime:
|
|
305
|
-
queryFn: () =>
|
|
308
|
+
}), Z = 3e5;
|
|
309
|
+
function Q() {
|
|
310
|
+
return O("reminderConfig", {
|
|
311
|
+
staleTime: Z,
|
|
312
|
+
queryFn: () => J.getReminderConfigs()
|
|
306
313
|
});
|
|
307
314
|
}
|
|
308
315
|
//#endregion
|
|
309
|
-
export {
|
|
316
|
+
export { K as i, X as n, J as r, Q as t };
|
|
@@ -2,6 +2,10 @@ export declare function useInvoicingPublicRoutes(): [{
|
|
|
2
2
|
readonly name: "invoicing-invoice-public-pdf-preview";
|
|
3
3
|
readonly path: "/pdf";
|
|
4
4
|
readonly component: () => import('vue').Component;
|
|
5
|
+
}, {
|
|
6
|
+
readonly name: "invoicing-invoice-public-pro-forma-pdf-preview";
|
|
7
|
+
readonly path: "/pro-forma-pdf";
|
|
8
|
+
readonly component: () => import('vue').Component;
|
|
5
9
|
}, {
|
|
6
10
|
readonly name: "dunning-case-reminder-pdf";
|
|
7
11
|
readonly path: "/dunning-case-reminder-pdf";
|