@wisemen/wise-invoicing-web 0.0.4 → 0.0.6
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/{BillingDocumentDetailViewDataProvider-pePmiXWb.js → BillingDocumentDetailViewDataProvider-BGE-p_FL.js} +953 -863
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-Dg5JlQE1.js → BillingDocumentPdf-Ca81NkZq.js} +4 -4
- package/dist/{CreditNoteDetailViewDataProvider-C-A0jyVr.js → CreditNoteDetailViewDataProvider-b5dY_4mH.js} +181 -181
- package/dist/{CreditNotePdfViewDataProvider-DNUvFVDj.js → CreditNotePdfViewDataProvider-C2QqCdQ7.js} +3 -3
- package/dist/{CustomFieldValueText-DDQq-975.js → CustomFieldValueText-ne5yy02J.js} +2 -2
- package/dist/DataProvider-Dj34ljUX.js +75 -0
- package/dist/{DunningCaseDetailViewDataProvider-0WV-7-vg.js → DunningCaseDetailViewDataProvider-jsh-LlGx.js} +68 -59
- package/dist/DunningCaseOverviewView-WbXalMt6.js +747 -0
- package/dist/{DunningCaseReminderPdfViewDataProvider-DcM-7ECg.js → DunningCaseReminderPdfViewDataProvider-B3Y2aYFf.js} +1 -1
- package/dist/DunningCaseSendDialog-D7jAZ8yT.js +349 -0
- package/dist/{InvoiceDetailViewDataProvider-BDL9lAWe.js → InvoiceDetailViewDataProvider-BAVdcJay.js} +589 -498
- package/dist/{InvoiceOverviewViewDataProvider-B_jrcC_8.js → InvoiceOverviewViewDataProvider-BT9cuQXw.js} +546 -482
- package/dist/{InvoicePdfView-Bygb-9z6.js → InvoicePdfView-BpIaYdZX.js} +2 -2
- package/dist/{InvoicePdfViewDataProvider-nBk3XNrE.js → InvoicePdfViewDataProvider-DGCnmNE-.js} +3 -3
- package/dist/{InvoicePublicPdfViewDataProvider-DHJP_-7-.js → InvoicePublicPdfViewDataProvider-KV0_hKUI.js} +3 -3
- package/dist/{IssuerSettingsViewDataProvider-Dk_Q6w6f.js → IssuerSettingsViewDataProvider-Bs4rEES2.js} +4 -4
- package/dist/ReminderSettingsViewDataProvider-D4bRLLXx.js +711 -0
- package/dist/{api.util-Dm_TQedZ.js → api.util-BCSgCfpS.js} +528 -509
- package/dist/{billingDocumentDetail.transformer-zMTbka5p.js → billingDocumentDetail.transformer-DIKAl4_L.js} +58 -89
- package/dist/client/index.d.ts +1 -1
- package/dist/client/types.gen.d.ts +28 -5
- package/dist/client/zod.gen.d.ts +869 -623
- package/dist/{creditNoteDetail.query-BZqgZRSu.js → creditNoteDetail.query-DHP69UiB.js} +13 -13
- package/dist/{dist-DP8KNFVD.js → dist-D9lp7NDv.js} +20 -36
- package/dist/{dist-DJ8yJcb9.js → dist-PErDVE6-.js} +621 -671
- package/dist/{documentTitle.composable-CeaFddr1.js → documentTitle.composable-4ApFl9TZ.js} +10 -8
- package/dist/{i18n.lib-DUbAMBRb.js → i18n.lib-BGcQ_OBF.js} +50 -2
- package/dist/index.d.ts +51 -2
- package/dist/index.js +78 -78
- package/dist/{invoice.service-ChHEtXBA.js → invoice.service-DG5eacZC.js} +46 -46
- package/dist/{invoiceDeliveryStatus.util-BsA-MlA3.js → invoiceDeliveryStatus.util-CX-IdqAu.js} +28 -28
- package/dist/{invoiceDetail.query-O_CGvdwg.js → invoiceDetail.query-C_IMGjOX.js} +1 -1
- package/dist/{invoicingConfig.composable-c6w_aMm1.js → invoicingConfig.composable-Kad_HHx_.js} +2 -2
- package/dist/{issuerSettings.query-RqtrZFaB.js → issuerSettings.query-6wnSPphB.js} +2 -2
- package/dist/libs/i18n.lib.d.ts +50 -2
- package/dist/locales/en-US.json.d.ts +25 -1
- package/dist/locales/nl-BE.json.d.ts +25 -1
- package/dist/models/billing-document/billingDocumentLineItemGroupUpdateForm.model.d.ts +9 -3
- package/dist/modules/dunning-case/actions/dunningCase.actions.d.ts +12 -0
- package/dist/modules/dunning-case/actions/dunningCaseNavigateToCustomer.action.d.ts +1 -0
- package/dist/modules/dunning-case/actions/dunningCaseNavigateToDetail.action.d.ts +1 -0
- package/dist/modules/dunning-case/api/mutations/reminderConfigUpdate.mutation.d.ts +2 -0
- package/dist/modules/dunning-case/models/dunningCase.model.d.ts +12 -3
- package/dist/modules/dunning-case/models/reminderConfigForm.model.d.ts +3 -1
- package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewActionsCell.vue.d.ts +13 -0
- package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewCustomerCell.vue.d.ts +7 -0
- package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewDaysOverdueCell.vue.d.ts +7 -0
- package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewLastReminderCell.vue.d.ts +7 -0
- package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewLevelCell.vue.d.ts +7 -0
- package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewMetrics.vue.d.ts +8 -0
- package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewOutstandingCell.vue.d.ts +7 -0
- package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewReminderCell.vue.d.ts +7 -0
- package/dist/modules/dunning-case/use-cases/overview/components/dunningCaseOverviewActionsCell.spec.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/overview/components/dunningCaseOverviewLastReminderCell.spec.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/overview/components/dunningCaseOverviewReminderCell.spec.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverview.composable.d.ts +24 -0
- package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverviewTableColumns.composable.d.ts +8 -0
- package/dist/modules/dunning-case/use-cases/send/dialogs/dunningCaseBulkSendDialog.spec.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/settings/components/ReminderLadderRow.vue.d.ts +3 -1
- package/dist/modules/dunning-case/use-cases/settings/components/reminderLadderFeeNotice.spec.d.ts +1 -0
- package/dist/modules/dunning-case/use-cases/settings/composables/reminderLadder.composable.d.ts +3 -1
- package/dist/modules/invoice/api/invoiceIndexCache.util.d.ts +4 -4
- package/dist/modules/invoice/api/queries/invoiceUserSearch.query.d.ts +3 -0
- package/dist/modules/invoice/api/query-keys/invoice.queryKeys.d.ts +8 -0
- package/dist/modules/invoice/api/services/invoiceUser.service.d.ts +6 -0
- package/dist/modules/invoice/components/form/InvoiceFormPreparedByField.vue.d.ts +16 -0
- package/dist/modules/invoice/models/invoice/update/invoicePreparer.model.d.ts +4 -0
- package/dist/modules/invoice/models/invoice/update/invoicePreparer.transformer.d.ts +5 -0
- package/dist/modules/invoice/models/invoice/update/invoiceUserSearchQueryParams.model.d.ts +3 -0
- package/dist/modules/invoice/models/invoice/update/invoiceUserSearchQueryParams.transformer.d.ts +6 -0
- package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkActionDialog.vue.d.ts +1 -0
- package/dist/{plainDate.transformer-BxvJpJOv.js → plainDate.transformer-Dfe5r84P.js} +32 -1
- package/dist/{reminderConfig.query-DzTN2AvU.js → reminderConfig.query-hmDNKreg.js} +105 -91
- package/dist/search.composable-BCtYqudV.js +52 -0
- package/dist/style.css +1 -1
- package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +6 -6
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +1 -1
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsRowMutations.composable.d.ts +2 -2
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsRowMutations.composable.spec.d.ts +1 -0
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsTableDrag.composable.d.ts +3 -1
- package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableField.vue.d.ts +2 -0
- package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableTextField.vue.d.ts +1 -0
- package/dist/ui/billing-document/table/utils/billingDocumentLineItemsEditor.util.d.ts +19 -0
- package/dist/ui/data-provider/DataProviderErrorState.vue.d.ts +7 -0
- package/dist/ui/data-provider/dataProviderErrorState.spec.d.ts +1 -0
- package/package.json +6 -1
- package/dist/DataProvider-CfHLB3rH.js +0 -48
- package/dist/DunningCaseOverviewView-CHdzfbhb.js +0 -553
- package/dist/DunningCaseSendDialog-DBtwr2ue.js +0 -350
- package/dist/ReminderSettingsViewDataProvider-CDBjfU7R.js +0 -668
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { B as e, E as t, J as n, P as r, V as i, a, t as o, w as s } from "./api.util-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { Fragment as
|
|
5
|
-
import { useQuery as
|
|
6
|
-
import { Temporal as
|
|
1
|
+
import { B as e, E as t, J as n, P as r, V as i, a, t as o, w as s } from "./api.util-BCSgCfpS.js";
|
|
2
|
+
import { a as c, d as l, f as u } from "./documentTitle.composable-4ApFl9TZ.js";
|
|
3
|
+
import { i as d, r as f, t as p } from "./plainDate.transformer-Dfe5r84P.js";
|
|
4
|
+
import { Fragment as m, computed as h, createElementBlock as g, createElementVNode as _, defineComponent as v, normalizeClass as y, openBlock as b, renderList as x } from "vue";
|
|
5
|
+
import { useQuery as S } from "@wisemen/vue-core-api-utils";
|
|
6
|
+
import { Temporal as C } from "temporal-polyfill";
|
|
7
7
|
//#region src/modules/dunning-case/models/dunningCase.transformer.ts
|
|
8
|
-
var
|
|
8
|
+
var w = [
|
|
9
9
|
"en-US",
|
|
10
10
|
"nl-BE",
|
|
11
11
|
"fr-BE"
|
|
12
|
-
],
|
|
13
|
-
function
|
|
12
|
+
], T = /* @__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(".")), E = /^\/?([a-z][a-z0-9-]*)/i, D = /&(#(?:x[\da-f]+|\d+)|[a-z][\da-z]+);/gi;
|
|
13
|
+
function O(e) {
|
|
14
14
|
return e.nodeType === 3;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function k(e) {
|
|
17
17
|
return e.nodeType === 1;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function A(e) {
|
|
20
20
|
let t = e;
|
|
21
21
|
for (; t.startsWith("\n\n");) t = t.slice(2);
|
|
22
22
|
for (; t.endsWith("\n\n");) t = t.slice(0, -2);
|
|
23
23
|
return t;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function j(e) {
|
|
26
26
|
let t = globalThis.DOMParser;
|
|
27
|
-
return
|
|
27
|
+
return A(t === void 0 ? F(e) : M(new t().parseFromString(e, "text/html").body.childNodes));
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function M(e) {
|
|
30
30
|
let t = "";
|
|
31
31
|
function n(e) {
|
|
32
32
|
t += e.replaceAll("\xA0", " ");
|
|
33
33
|
}
|
|
34
34
|
function r(e) {
|
|
35
|
-
if (
|
|
35
|
+
if (O(e)) {
|
|
36
36
|
n(e.data);
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
|
-
if (!
|
|
39
|
+
if (!k(e)) return;
|
|
40
40
|
let i = e.tagName.toLowerCase();
|
|
41
41
|
if (i === "script" || i === "style") return;
|
|
42
42
|
if (i === "br") {
|
|
43
43
|
n("\n");
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
let a =
|
|
46
|
+
let a = T.has(i);
|
|
47
47
|
a && t.length > 0 && !t.endsWith("\n") && n("\n\n");
|
|
48
48
|
for (let t of e.childNodes) r(t);
|
|
49
49
|
a && t.length > 0 && !t.endsWith("\n") && n("\n\n");
|
|
@@ -51,16 +51,16 @@ function k(e) {
|
|
|
51
51
|
for (let t of e) r(t);
|
|
52
52
|
return t;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
return `<p>${e.split("\n").map((e) =>
|
|
54
|
+
function N(e) {
|
|
55
|
+
return `<p>${e.split("\n").map((e) => P(e)).join("<br>")}</p>`;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function P(e) {
|
|
58
58
|
return e.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """).replaceAll("'", "'");
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function F(e) {
|
|
61
61
|
let t = "", n = 0, r = null;
|
|
62
62
|
function i(e) {
|
|
63
|
-
t +=
|
|
63
|
+
t += I(e.replaceAll("\xA0", " "));
|
|
64
64
|
}
|
|
65
65
|
function a() {
|
|
66
66
|
t.length > 0 && !t.endsWith("\n") && (t += "\n\n");
|
|
@@ -82,7 +82,7 @@ function M(e) {
|
|
|
82
82
|
r === null && i(e.slice(o));
|
|
83
83
|
break;
|
|
84
84
|
}
|
|
85
|
-
let l = e.slice(o + 1, c).trim(), u = l.startsWith("/"), d =
|
|
85
|
+
let l = e.slice(o + 1, c).trim(), u = l.startsWith("/"), d = E.exec(l)?.[1]?.toLowerCase();
|
|
86
86
|
if (d === void 0) {
|
|
87
87
|
n = c + 1;
|
|
88
88
|
continue;
|
|
@@ -95,11 +95,11 @@ function M(e) {
|
|
|
95
95
|
r = u ? null : d, n = c + 1;
|
|
96
96
|
continue;
|
|
97
97
|
}
|
|
98
|
-
d === "br" ? t += "\n" :
|
|
98
|
+
d === "br" ? t += "\n" : T.has(d) && (a(), (u || l.endsWith("/")) && a()), n = c + 1;
|
|
99
99
|
}
|
|
100
100
|
return t;
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function I(e) {
|
|
103
103
|
let t = {
|
|
104
104
|
amp: "&",
|
|
105
105
|
apos: "'",
|
|
@@ -108,102 +108,105 @@ function N(e) {
|
|
|
108
108
|
nbsp: " ",
|
|
109
109
|
quot: "\""
|
|
110
110
|
};
|
|
111
|
-
return e.replace(
|
|
111
|
+
return e.replace(D, (e, n) => n.startsWith("#x") || n.startsWith("#X") ? String.fromCodePoint(Number.parseInt(n.slice(2), 16)) : n.startsWith("#") ? String.fromCodePoint(Number.parseInt(n.slice(1), 10)) : t[n.toLowerCase()] ?? e);
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function L(e, t) {
|
|
114
114
|
return e.items.find((e) => e.locale === t)?.value ?? "";
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
return { items:
|
|
116
|
+
function R(e, t) {
|
|
117
|
+
return { items: w.map((n) => ({
|
|
118
118
|
locale: n,
|
|
119
|
-
value: t === "body" ?
|
|
119
|
+
value: t === "body" ? N(e[n][t]) : e[n][t]
|
|
120
120
|
})) };
|
|
121
121
|
}
|
|
122
|
-
var
|
|
122
|
+
var z = class e {
|
|
123
123
|
static fromDetailDto(t) {
|
|
124
124
|
return {
|
|
125
125
|
uuid: t.uuid,
|
|
126
|
-
closedAt: t.closedAt === null ? null :
|
|
127
|
-
createdAt:
|
|
126
|
+
closedAt: t.closedAt === null ? null : C.Instant.from(t.closedAt),
|
|
127
|
+
createdAt: C.Instant.from(t.createdAt),
|
|
128
128
|
lastReminderSentAt: e.fromNullableInstant(t.lastReminderSentAt),
|
|
129
|
-
nextReminderOn:
|
|
130
|
-
updatedAt:
|
|
131
|
-
isClosed: t.isClosed,
|
|
129
|
+
nextReminderOn: p.fromNullableDto(t.nextReminderOn),
|
|
130
|
+
updatedAt: C.Instant.from(t.updatedAt),
|
|
132
131
|
blockedReason: t.blockedReason,
|
|
133
132
|
canSendReminder: t.canSendReminder,
|
|
134
133
|
customer: t.customer,
|
|
135
134
|
invoices: t.invoices.map(e.fromInvoiceDto),
|
|
136
135
|
latestCreatedReminder: e.fromReminderDto(t.latestCreatedReminder),
|
|
137
136
|
level: t.level ?? 0,
|
|
138
|
-
outstandingBalance:
|
|
139
|
-
totalCredited:
|
|
140
|
-
totalFee:
|
|
141
|
-
totalInvoiced:
|
|
142
|
-
totalPaid:
|
|
137
|
+
outstandingBalance: d.fromDto(t.outstandingBalance),
|
|
138
|
+
totalCredited: d.fromDto(t.totalCredited),
|
|
139
|
+
totalFee: d.fromDto(t.totalFee),
|
|
140
|
+
totalInvoiced: d.fromDto(t.totalInvoiced),
|
|
141
|
+
totalPaid: d.fromDto(t.totalPaid)
|
|
143
142
|
};
|
|
144
143
|
}
|
|
145
144
|
static fromIndexDto(t) {
|
|
146
145
|
return {
|
|
147
146
|
uuid: t.uuid,
|
|
148
147
|
lastReminderSentAt: e.fromNullableInstant(t.lastReminderSentAt),
|
|
149
|
-
nextReminderOn: t.nextReminderOn === null || t.nextReminderOn === "infinity" || t.nextReminderOn === "-infinity" ? null :
|
|
148
|
+
nextReminderOn: t.nextReminderOn === null || t.nextReminderOn === "infinity" || t.nextReminderOn === "-infinity" ? null : p.fromDto(t.nextReminderOn),
|
|
150
149
|
blockedReason: t.blockedReason,
|
|
151
150
|
canSendReminder: t.canSendReminder,
|
|
152
151
|
customer: t.customer,
|
|
153
152
|
daysOverdue: t.daysOverdue,
|
|
154
153
|
latestCreatedReminder: e.fromReminderDto(t.latestCreatedReminder),
|
|
155
154
|
level: t.level,
|
|
156
|
-
outstandingBalance:
|
|
155
|
+
outstandingBalance: d.fromDto(t.outstandingBalance)
|
|
157
156
|
};
|
|
158
157
|
}
|
|
159
158
|
static fromInvoiceDto(e) {
|
|
160
159
|
return {
|
|
161
160
|
uuid: e.uuid,
|
|
162
|
-
dueOn:
|
|
161
|
+
dueOn: p.fromDto(e.dueOn),
|
|
163
162
|
isDisputed: e.isDisputed,
|
|
164
|
-
balanceDueAmount:
|
|
163
|
+
balanceDueAmount: d.fromDto(e.balanceDueAmount),
|
|
165
164
|
creditNotes: e.creditNotes.map((e) => ({
|
|
166
165
|
uuid: e.uuid,
|
|
167
|
-
finalizedOn:
|
|
168
|
-
grossAmount:
|
|
166
|
+
finalizedOn: p.fromDto(e.finalizedOn),
|
|
167
|
+
grossAmount: d.fromDto(e.grossAmount),
|
|
169
168
|
sequence: e.sequence
|
|
170
169
|
})),
|
|
171
|
-
grossAmount:
|
|
172
|
-
level: e.level,
|
|
173
|
-
paidAmount:
|
|
170
|
+
grossAmount: d.fromDto(e.grossAmount),
|
|
171
|
+
level: e.level ?? 0,
|
|
172
|
+
paidAmount: d.fromDto(e.paidAmount),
|
|
174
173
|
payments: e.payments.map((e) => ({
|
|
175
174
|
uuid: e.uuid,
|
|
176
|
-
amount:
|
|
177
|
-
date:
|
|
175
|
+
amount: d.fromDto(e.amount),
|
|
176
|
+
date: p.fromDto(e.date)
|
|
178
177
|
})),
|
|
179
178
|
sequence: e.sequence,
|
|
180
179
|
settlementStatus: e.settlementStatus,
|
|
181
180
|
subject: e.subject,
|
|
182
|
-
totalCreditedAmount:
|
|
181
|
+
totalCreditedAmount: d.fromDto(e.totalCreditedAmount)
|
|
183
182
|
};
|
|
184
183
|
}
|
|
185
184
|
static fromNullableInstant(e) {
|
|
186
|
-
return e === null || e === "infinity" || e === "-infinity" ? null :
|
|
185
|
+
return e === null || e === "infinity" || e === "-infinity" ? null : C.Instant.from(e);
|
|
187
186
|
}
|
|
188
187
|
static fromReminderConfigDto(e) {
|
|
189
188
|
return {
|
|
190
189
|
uuid: e.uuid,
|
|
191
|
-
fee:
|
|
190
|
+
fee: {
|
|
191
|
+
amount: e.fee.amount === null ? null : d.fromDto(e.fee.amount),
|
|
192
|
+
percentage: f.fromNullableDto(e.fee.percentage),
|
|
193
|
+
type: e.fee.type
|
|
194
|
+
},
|
|
192
195
|
offsetDays: e.offsetDays,
|
|
193
196
|
schedule: e.schedule,
|
|
194
197
|
sequence: e.sequence,
|
|
195
198
|
template: {
|
|
196
199
|
"en-US": {
|
|
197
|
-
body:
|
|
198
|
-
subject:
|
|
200
|
+
body: j(L(e.template.body, "en-US")),
|
|
201
|
+
subject: L(e.template.subject, "en-US")
|
|
199
202
|
},
|
|
200
203
|
"fr-BE": {
|
|
201
|
-
body:
|
|
202
|
-
subject:
|
|
204
|
+
body: j(L(e.template.body, "fr-BE")),
|
|
205
|
+
subject: L(e.template.subject, "fr-BE")
|
|
203
206
|
},
|
|
204
207
|
"nl-BE": {
|
|
205
|
-
body:
|
|
206
|
-
subject:
|
|
208
|
+
body: j(L(e.template.body, "nl-BE")),
|
|
209
|
+
subject: L(e.template.subject, "nl-BE")
|
|
207
210
|
}
|
|
208
211
|
}
|
|
209
212
|
};
|
|
@@ -216,25 +219,36 @@ var I = class e {
|
|
|
216
219
|
}
|
|
217
220
|
static reminderConfigsToDto(e) {
|
|
218
221
|
return e.reminders.map((e) => ({
|
|
219
|
-
fee: {
|
|
220
|
-
amount:
|
|
221
|
-
|
|
222
|
-
|
|
222
|
+
fee: e.feeType === l.PERCENTAGE ? {
|
|
223
|
+
amount: null,
|
|
224
|
+
percentage: e.feePercentage / 100,
|
|
225
|
+
type: l.PERCENTAGE
|
|
226
|
+
} : {
|
|
227
|
+
amount: {
|
|
228
|
+
amount: Math.round(e.feeAmount * 10 ** e.feePrecision),
|
|
229
|
+
currency: e.feeCurrency,
|
|
230
|
+
precision: e.feePrecision
|
|
231
|
+
},
|
|
232
|
+
percentage: null,
|
|
233
|
+
type: l.AMOUNT
|
|
223
234
|
},
|
|
224
235
|
offsetDays: e.offsetDays,
|
|
225
236
|
schedule: e.schedule,
|
|
226
237
|
sequence: e.sequence,
|
|
227
238
|
template: {
|
|
228
|
-
body:
|
|
229
|
-
subject:
|
|
239
|
+
body: R(e.template, "body"),
|
|
240
|
+
subject: R(e.template, "subject")
|
|
230
241
|
}
|
|
231
242
|
}));
|
|
232
243
|
}
|
|
233
244
|
static reminderConfigsToForm(e) {
|
|
245
|
+
let t = e.find((e) => e.fee.amount !== null)?.fee.amount ?? null, n = t?.currency ?? c.EUR, r = t?.precision ?? 2;
|
|
234
246
|
return { reminders: e.toSorted((e, t) => e.sequence - t.sequence).map((e) => ({
|
|
235
|
-
feeAmount: e.fee.amount / 10 ** e.fee.precision,
|
|
236
|
-
feeCurrency: e.fee.currency,
|
|
237
|
-
|
|
247
|
+
feeAmount: e.fee.amount === null ? 0 : e.fee.amount.amount / 10 ** e.fee.amount.precision,
|
|
248
|
+
feeCurrency: e.fee.amount?.currency ?? n,
|
|
249
|
+
feePercentage: e.fee.percentage?.value ?? 0,
|
|
250
|
+
feePrecision: e.fee.amount?.precision ?? r,
|
|
251
|
+
feeType: e.fee.type,
|
|
238
252
|
offsetDays: e.offsetDays,
|
|
239
253
|
schedule: e.schedule,
|
|
240
254
|
sequence: e.sequence,
|
|
@@ -244,73 +258,73 @@ var I = class e {
|
|
|
244
258
|
};
|
|
245
259
|
//#endregion
|
|
246
260
|
//#region src/modules/dunning-case/api/services/dunningCase.service.ts
|
|
247
|
-
function
|
|
261
|
+
function B(e) {
|
|
248
262
|
return {
|
|
249
263
|
customerUuid: e.customerUuid,
|
|
250
264
|
isOpen: e.isOpen,
|
|
251
265
|
dunningCaseUuids: e.dunningCaseUuids === void 0 ? void 0 : {
|
|
252
|
-
scope:
|
|
266
|
+
scope: u.INCLUDE,
|
|
253
267
|
values: e.dunningCaseUuids
|
|
254
268
|
},
|
|
255
269
|
level: e.level
|
|
256
270
|
};
|
|
257
271
|
}
|
|
258
|
-
var
|
|
272
|
+
var V = class {
|
|
259
273
|
static async getAll(e) {
|
|
260
274
|
return (await o.fromPromise(i({ query: {
|
|
261
|
-
filter:
|
|
275
|
+
filter: B(e),
|
|
262
276
|
pagination: e.pagination
|
|
263
277
|
} }))).map((e) => ({
|
|
264
|
-
data: e.data.items.map(
|
|
278
|
+
data: e.data.items.map(z.fromIndexDto),
|
|
265
279
|
meta: e.data.meta
|
|
266
280
|
}));
|
|
267
281
|
}
|
|
268
282
|
static async getByUuid(t) {
|
|
269
|
-
return (await o.fromPromise(e({ path: { uuid: t } }))).map((e) =>
|
|
283
|
+
return (await o.fromPromise(e({ path: { uuid: t } }))).map((e) => z.fromDetailDto(e.data));
|
|
270
284
|
}
|
|
271
285
|
static async getReminderConfigs() {
|
|
272
|
-
return (await o.fromPromise(n())).map((e) => e.data.items.map(
|
|
286
|
+
return (await o.fromPromise(n())).map((e) => e.data.items.map(z.fromReminderConfigDto));
|
|
273
287
|
}
|
|
274
288
|
static async previewBulk(e) {
|
|
275
|
-
return (await o.fromPromise(s({ query: { filter:
|
|
289
|
+
return (await o.fromPromise(s({ query: { filter: B(e) } }))).map((e) => e.data);
|
|
276
290
|
}
|
|
277
291
|
static async send(e) {
|
|
278
292
|
let n = await o.fromPromise(t({ path: { uuid: e } }));
|
|
279
293
|
return o.void(n);
|
|
280
294
|
}
|
|
281
295
|
static async sendBulk(e) {
|
|
282
|
-
return (await o.fromPromise(a({ query: { filter:
|
|
296
|
+
return (await o.fromPromise(a({ query: { filter: B(e) } }))).map((e) => e.data);
|
|
283
297
|
}
|
|
284
298
|
static async updateReminderConfigs(e) {
|
|
285
|
-
let t = await o.fromPromise(r({ body: { reminders:
|
|
299
|
+
let t = await o.fromPromise(r({ body: { reminders: z.reminderConfigsToDto(e) } }));
|
|
286
300
|
return o.void(t);
|
|
287
301
|
}
|
|
288
|
-
},
|
|
302
|
+
}, H = {
|
|
289
303
|
class: "flex shrink-0 gap-xxs",
|
|
290
304
|
"aria-hidden": "true"
|
|
291
|
-
},
|
|
305
|
+
}, U = /* @__PURE__ */ v({
|
|
292
306
|
__name: "DunningCaseReminderLevelIndicator",
|
|
293
307
|
props: {
|
|
294
308
|
level: {},
|
|
295
309
|
size: { default: "md" }
|
|
296
310
|
},
|
|
297
311
|
setup(e) {
|
|
298
|
-
let t = e, n =
|
|
299
|
-
return (e, t) => (
|
|
312
|
+
let t = e, n = h(() => Math.min(3, Math.max(0, t.level ?? 0))), r = h(() => t.level === 3 ? "error" : t.level === 2 ? "warning" : "brand"), i = h(() => t.size === "sm" ? "h-(--spacing-sm) w-(--spacing-md)" : "h-(--spacing-sm) w-(--spacing-lg)");
|
|
313
|
+
return (e, t) => (b(), g("span", H, [(b(), g(m, null, x(3, (e) => _("span", {
|
|
300
314
|
key: e,
|
|
301
|
-
class:
|
|
315
|
+
class: y([[i.value, e <= n.value ? {
|
|
302
316
|
"border-brand-500 bg-brand-500": r.value === "brand",
|
|
303
317
|
"border-warning-500 bg-warning-solid": r.value === "warning",
|
|
304
318
|
"border-error bg-error-solid": r.value === "error"
|
|
305
319
|
} : "border-secondary bg-primary"], "rounded-full border"])
|
|
306
320
|
}, null, 2)), 64))]));
|
|
307
321
|
}
|
|
308
|
-
}),
|
|
309
|
-
function
|
|
310
|
-
return
|
|
311
|
-
staleTime:
|
|
312
|
-
queryFn: () =>
|
|
322
|
+
}), W = 3e5;
|
|
323
|
+
function G() {
|
|
324
|
+
return S("reminderConfig", {
|
|
325
|
+
staleTime: W,
|
|
326
|
+
queryFn: () => V.getReminderConfigs()
|
|
313
327
|
});
|
|
314
328
|
}
|
|
315
329
|
//#endregion
|
|
316
|
-
export {
|
|
330
|
+
export { z as i, U as n, V as r, G as t };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { useRoute as e, useRouter as t } from "vue-router";
|
|
2
|
+
import { computed as n, ref as r, watch as i } from "vue";
|
|
3
|
+
import { refDebounced as a } from "@vueuse/core";
|
|
4
|
+
//#region src/composables/routeQueryState.composable.ts
|
|
5
|
+
function o(n) {
|
|
6
|
+
let a = e(), o = t();
|
|
7
|
+
function s(e) {
|
|
8
|
+
if (e === null) return n.initialState;
|
|
9
|
+
try {
|
|
10
|
+
return n.serializer.parse(e);
|
|
11
|
+
} catch {
|
|
12
|
+
return n.initialState;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
let c = r(s(a.query[n.key] ?? null));
|
|
16
|
+
return i(() => a.query[n.key], (e) => {
|
|
17
|
+
c.value = s(e ?? null);
|
|
18
|
+
}, { immediate: !0 }), i(c, (e) => {
|
|
19
|
+
o.replace({ query: {
|
|
20
|
+
...a.query,
|
|
21
|
+
[n.key]: n.serializer.serialize(e) || void 0
|
|
22
|
+
} });
|
|
23
|
+
}, { deep: !0 }), c;
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/composables/search/search.composable.ts
|
|
27
|
+
var s = 50, c = "search";
|
|
28
|
+
function l(e) {
|
|
29
|
+
let t = e?.debounceMs ?? s, i = e?.persistInUrl ?? !1, l = i === !0 || typeof i == "string" ? o({
|
|
30
|
+
initialState: "",
|
|
31
|
+
key: typeof i == "string" ? i : c,
|
|
32
|
+
serializer: {
|
|
33
|
+
parse: (e) => e,
|
|
34
|
+
serialize: (e) => e
|
|
35
|
+
}
|
|
36
|
+
}) : r(""), u = a(l, t), d = n(() => l.value !== u.value);
|
|
37
|
+
function f() {
|
|
38
|
+
l.value = "";
|
|
39
|
+
}
|
|
40
|
+
function p(e) {
|
|
41
|
+
l.value = e;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
isDebouncing: d,
|
|
45
|
+
clear: f,
|
|
46
|
+
debouncedSearch: n(() => u.value),
|
|
47
|
+
search: l,
|
|
48
|
+
updateSearch: p
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
export { l as t };
|