@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,10 +1,10 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ot as t, t as n } from "./api.util-CkIRZS3h.js";
|
|
3
3
|
import { r } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
4
4
|
import { n as i } from "./src-DUSgQTKr.js";
|
|
5
5
|
import { n as a, t as o } from "./address.transformer-jGddczLV.js";
|
|
6
6
|
import { n as s, r as c, t as l } from "./plainDate.transformer-Bhiz9jW7.js";
|
|
7
|
-
import { n as u, r as ee } from "./dist-
|
|
7
|
+
import { n as u, r as ee } from "./dist-Cdbpkd3Y.js";
|
|
8
8
|
import { useI18n as d } from "vue-i18n";
|
|
9
9
|
import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as te, createVNode as v, defineComponent as y, normalizeClass as b, onUnmounted as x, openBlock as S, renderList as C, toDisplayString as w, unref as T, withCtx as E } from "vue";
|
|
10
10
|
import { useQuery as D } from "@wisemen/vue-core-api-utils";
|
|
@@ -37,6 +37,7 @@ var N = class e {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
static fromPublicDto(t) {
|
|
40
|
+
let n = new Set(t.invoices.map((e) => e.sequence)), r = t.outstandingInvoices.filter((e) => e.daysOverdue > 0 && !n.has(e.sequence));
|
|
40
41
|
return {
|
|
41
42
|
createdAt: c.fromDto(t.createdAt),
|
|
42
43
|
sentAt: c.fromNullableDto(t.sentAt),
|
|
@@ -55,9 +56,9 @@ var N = class e {
|
|
|
55
56
|
address: o.fromNullableDto(t.customer.address),
|
|
56
57
|
locale: t.customer.locale
|
|
57
58
|
},
|
|
58
|
-
invoices: t.invoices.map(e.fromInvoiceDto).toSorted((e, t) => (t.level ?? 0) - (e.level ?? 0) || t.outstandingBalance.amount - e.outstandingBalance.amount),
|
|
59
|
+
invoices: [...t.invoices.map(e.fromInvoiceDto), ...r.map(e.fromOutstandingInvoiceDto)].toSorted((e, t) => (t.level ?? 0) - (e.level ?? 0) || t.outstandingBalance.amount - e.outstandingBalance.amount),
|
|
59
60
|
level: t.level,
|
|
60
|
-
outstandingInvoices: t.outstandingInvoices.map(e.fromOutstandingInvoiceDto),
|
|
61
|
+
outstandingInvoices: t.outstandingInvoices.filter((e) => e.daysOverdue <= 0).map(e.fromOutstandingInvoiceDto),
|
|
61
62
|
recipient: {
|
|
62
63
|
name: t.recipient.name,
|
|
63
64
|
email: t.recipient.email
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Q as e, Z as t, t as n } from "./api.util-CkIRZS3h.js";
|
|
2
2
|
import { r } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
3
|
-
import { n as i } from "./invoicingConfig.composable-
|
|
4
|
-
import { n as a, r as o, t as s } from "./reminderConfig.query-
|
|
5
|
-
import {
|
|
6
|
-
import { t as d } from "./customerUuid.model-
|
|
3
|
+
import { n as i } from "./invoicingConfig.composable-COn1rKRf.js";
|
|
4
|
+
import { n as a, r as o, t as s } from "./reminderConfig.query-DSO0ekC_.js";
|
|
5
|
+
import { dt as c, et as l, f as u } from "./dist-BQbaoN5W.js";
|
|
6
|
+
import { t as d } from "./customerUuid.model-ClN4Vi9n.js";
|
|
7
7
|
import { z as f } from "zod";
|
|
8
8
|
import { useI18n as p } from "vue-i18n";
|
|
9
9
|
import { Fragment as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createTextVNode as b, createVNode as x, defineComponent as S, normalizeClass as C, openBlock as w, ref as T, renderList as E, toDisplayString as D, unref as O, watch as k, withCtx as A } from "vue";
|
|
@@ -15,10 +15,10 @@ import { UIBadge as P, UIColumnLayout as F, UIDialogBody as I, UIDialogFooter as
|
|
|
15
15
|
import { useForm as U } from "formango";
|
|
16
16
|
//#region src/modules/dunning-case/api/services/dunningCaseCustomer.service.ts
|
|
17
17
|
var W = class {
|
|
18
|
-
static async getAll(
|
|
19
|
-
return (await n.fromPromise(
|
|
18
|
+
static async getAll(e, r) {
|
|
19
|
+
return (await n.fromPromise(t({ query: {
|
|
20
20
|
pagination: r,
|
|
21
|
-
search:
|
|
21
|
+
search: e
|
|
22
22
|
} }))).map((e) => ({
|
|
23
23
|
data: e.data.items.map((e) => ({
|
|
24
24
|
uuid: e.uuid,
|
|
@@ -27,15 +27,15 @@ var W = class {
|
|
|
27
27
|
meta: e.data.meta
|
|
28
28
|
}));
|
|
29
29
|
}
|
|
30
|
-
static async getRecipients(
|
|
30
|
+
static async getRecipients(t) {
|
|
31
31
|
let r = [], i = 0, a = 0;
|
|
32
32
|
do {
|
|
33
|
-
let o = await n.fromPromise(
|
|
33
|
+
let o = await n.fromPromise(e({
|
|
34
34
|
query: { pagination: {
|
|
35
35
|
limit: 100,
|
|
36
36
|
offset: i
|
|
37
37
|
} },
|
|
38
|
-
path: { uuid:
|
|
38
|
+
path: { uuid: t }
|
|
39
39
|
}));
|
|
40
40
|
if (o.isErr()) return te(o.error);
|
|
41
41
|
if (r.push(...o.value.data.items.map((e) => ({
|
|
@@ -45,9 +45,9 @@ var W = class {
|
|
|
45
45
|
} while (i < a);
|
|
46
46
|
return ne(r);
|
|
47
47
|
}
|
|
48
|
-
static async getUuidByExternalId(
|
|
49
|
-
return (await n.fromPromise(
|
|
50
|
-
filter: { externalId:
|
|
48
|
+
static async getUuidByExternalId(e) {
|
|
49
|
+
return (await n.fromPromise(t({ query: {
|
|
50
|
+
filter: { externalId: e },
|
|
51
51
|
pagination: {
|
|
52
52
|
limit: 1,
|
|
53
53
|
offset: 0
|
|
@@ -62,9 +62,38 @@ function K(e) {
|
|
|
62
62
|
queryFn: () => o.getByUuid(e.value)
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
+
f.uuid().brand("DunningCaseUuid"), f.uuid().brand("DunningCaseReminderUuid");
|
|
66
|
+
function q(e) {
|
|
67
|
+
return e === null ? "none" : e.hasErrors ? "failed" : e.sentAt === null ? "sending" : "sent";
|
|
68
|
+
}
|
|
69
|
+
function J(e, t) {
|
|
70
|
+
return [
|
|
71
|
+
0,
|
|
72
|
+
1,
|
|
73
|
+
2,
|
|
74
|
+
3
|
|
75
|
+
].map((n) => e.filter((e) => !e.isDisputed && e.level === n).reduce((e, t) => ({
|
|
76
|
+
...e,
|
|
77
|
+
amount: e.amount + t.balanceDueAmount.amount
|
|
78
|
+
}), {
|
|
79
|
+
...t,
|
|
80
|
+
amount: 0
|
|
81
|
+
}));
|
|
82
|
+
}
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region src/modules/dunning-case/api/mutations/dunningCaseReminderRetry.mutation.ts
|
|
85
|
+
function Y() {
|
|
86
|
+
return j({
|
|
87
|
+
queryFn: (e) => o.retry(e.params.dunningCaseReminderUuid),
|
|
88
|
+
queryKeysToInvalidate: {
|
|
89
|
+
dunningCaseDetail: {},
|
|
90
|
+
dunningCaseIndex: {}
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
65
94
|
//#endregion
|
|
66
95
|
//#region src/modules/dunning-case/components/DunningCaseReminderStatusIndicator.vue
|
|
67
|
-
var
|
|
96
|
+
var X = /* @__PURE__ */ S({
|
|
68
97
|
__name: "DunningCaseReminderStatusIndicator",
|
|
69
98
|
props: {
|
|
70
99
|
blockedReason: {},
|
|
@@ -72,7 +101,7 @@ var q = /* @__PURE__ */ S({
|
|
|
72
101
|
},
|
|
73
102
|
setup(e) {
|
|
74
103
|
let t = e, n = p(), r = {
|
|
75
|
-
icon:
|
|
104
|
+
icon: l,
|
|
76
105
|
type: "icon"
|
|
77
106
|
};
|
|
78
107
|
return (e, i) => t.blockedReason === null ? t.status === "failed" ? (w(), g(O(P), {
|
|
@@ -92,27 +121,9 @@ var q = /* @__PURE__ */ S({
|
|
|
92
121
|
}, null, 8, ["label"]));
|
|
93
122
|
}
|
|
94
123
|
});
|
|
95
|
-
f.uuid().brand("DunningCaseUuid");
|
|
96
|
-
function J(e) {
|
|
97
|
-
return e === null ? "none" : e.hasErrors ? "failed" : e.sentAt === null ? "sending" : "sent";
|
|
98
|
-
}
|
|
99
|
-
function Y(e, t) {
|
|
100
|
-
return [
|
|
101
|
-
0,
|
|
102
|
-
1,
|
|
103
|
-
2,
|
|
104
|
-
3
|
|
105
|
-
].map((n) => e.filter((e) => !e.isDisputed && e.level === n).reduce((e, t) => ({
|
|
106
|
-
...e,
|
|
107
|
-
amount: e.amount + t.balanceDueAmount.amount
|
|
108
|
-
}), {
|
|
109
|
-
...t,
|
|
110
|
-
amount: 0
|
|
111
|
-
}));
|
|
112
|
-
}
|
|
113
124
|
//#endregion
|
|
114
125
|
//#region src/modules/dunning-case/api/mutations/dunningCaseSend.mutation.ts
|
|
115
|
-
function
|
|
126
|
+
function Z() {
|
|
116
127
|
return j({
|
|
117
128
|
queryFn: (e) => o.send(e.params.dunningCaseUuid),
|
|
118
129
|
queryKeysToInvalidate: {
|
|
@@ -123,7 +134,7 @@ function X() {
|
|
|
123
134
|
}
|
|
124
135
|
//#endregion
|
|
125
136
|
//#region src/modules/dunning-case/use-cases/send/components/DunningCaseSendFeeRow.vue?vue&type=script&setup=true&lang.ts
|
|
126
|
-
var
|
|
137
|
+
var re = { class: "flex items-center justify-between gap-lg px-lg py-xs" }, ie = { class: "text-xs text-secondary" }, ae = { class: "font-mono text-xs font-medium text-primary tabular-nums" }, oe = /* @__PURE__ */ S({
|
|
127
138
|
__name: "DunningCaseSendFeeRow",
|
|
128
139
|
props: {
|
|
129
140
|
fee: {},
|
|
@@ -131,7 +142,7 @@ var Z = { class: "flex items-center justify-between gap-lg px-lg py-xs" }, re =
|
|
|
131
142
|
},
|
|
132
143
|
setup(e) {
|
|
133
144
|
let t = e, n = p(), i = r();
|
|
134
|
-
return (e, r) => (w(), v("dl",
|
|
145
|
+
return (e, r) => (w(), v("dl", re, [y("dt", ie, D(O(n).t("module.dunning_case.detail.reminder_fee")) + " · " + D(O(n).t("module.dunning_case.level.reminder", { level: t.level })), 1), y("dd", ae, D(O(i).formatMonetary(t.fee)), 1)]));
|
|
135
146
|
}
|
|
136
147
|
});
|
|
137
148
|
//#endregion
|
|
@@ -139,13 +150,13 @@ var Z = { class: "flex items-center justify-between gap-lg px-lg py-xs" }, re =
|
|
|
139
150
|
function Q(e) {
|
|
140
151
|
return N.PlainDate.compare(e.dueOn, N.Now.plainDateISO()) >= 0;
|
|
141
152
|
}
|
|
142
|
-
function
|
|
153
|
+
function se(e) {
|
|
143
154
|
return !e.isDisputed && !Q(e);
|
|
144
155
|
}
|
|
145
|
-
function
|
|
146
|
-
return e.filter(
|
|
156
|
+
function ce(e) {
|
|
157
|
+
return e.filter(se);
|
|
147
158
|
}
|
|
148
|
-
function
|
|
159
|
+
function le(e, t) {
|
|
149
160
|
let n = e.map((e) => ({
|
|
150
161
|
invoice: e,
|
|
151
162
|
type: "invoice"
|
|
@@ -156,16 +167,16 @@ function ce(e, t) {
|
|
|
156
167
|
}
|
|
157
168
|
//#endregion
|
|
158
169
|
//#region src/modules/dunning-case/use-cases/send/components/DunningCaseSendInvoiceRow.vue?vue&type=script&setup=true&lang.ts
|
|
159
|
-
var
|
|
170
|
+
var ue = { class: "min-w-0" }, de = { class: "flex min-w-0 items-center gap-sm" }, fe = { class: "font-mono text-sm font-medium text-primary" }, pe = {
|
|
160
171
|
key: 0,
|
|
161
172
|
class: "truncate text-xs text-error-primary"
|
|
162
|
-
},
|
|
173
|
+
}, me = {
|
|
163
174
|
key: 1,
|
|
164
175
|
class: "truncate text-xs text-secondary"
|
|
165
|
-
},
|
|
176
|
+
}, he = {
|
|
166
177
|
key: 2,
|
|
167
178
|
class: "flex shrink-0 gap-xxs"
|
|
168
|
-
},
|
|
179
|
+
}, ge = { class: "font-mono text-xs font-medium text-primary tabular-nums" }, _e = /* @__PURE__ */ S({
|
|
169
180
|
__name: "DunningCaseSendInvoiceRow",
|
|
170
181
|
props: {
|
|
171
182
|
hasSeparator: { type: Boolean },
|
|
@@ -173,39 +184,39 @@ var le = { class: "min-w-0" }, ue = { class: "flex min-w-0 items-center gap-sm"
|
|
|
173
184
|
},
|
|
174
185
|
setup(e) {
|
|
175
186
|
let t = e, n = p(), i = r();
|
|
176
|
-
return (e, r) => (w(), v("div", { class: C([{ "border-t border-secondary": t.hasSeparator }, "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-lg px-lg py-xs"]) }, [y("div",
|
|
187
|
+
return (e, r) => (w(), v("div", { class: C([{ "border-t border-secondary": t.hasSeparator }, "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-lg px-lg py-xs"]) }, [y("div", ue, [y("div", de, [y("p", fe, D(t.invoice.sequence), 1), t.invoice.isDisputed ? (w(), v("span", pe, " · " + D(O(n).t("module.dunning_case.detail.protested")), 1)) : O(Q)(t.invoice) ? (w(), v("span", me, " (" + D(O(n).t("module.dunning_case.send.not_yet_due")) + ") ", 1)) : (w(), v("span", he, [x(a, {
|
|
177
188
|
level: t.invoice.level,
|
|
178
189
|
size: "sm"
|
|
179
|
-
}, null, 8, ["level"])]))])]), y("p",
|
|
190
|
+
}, null, 8, ["level"])]))])]), y("p", ge, D(t.invoice.isDisputed ? "—" : O(i).formatMonetary(t.invoice.balanceDueAmount)), 1)], 2));
|
|
180
191
|
}
|
|
181
|
-
}),
|
|
192
|
+
}), ve = { class: "w-full overflow-hidden rounded-md border border-secondary bg-primary shadow-xs" }, ye = { class: "flex items-start justify-between gap-lg border-b border-secondary px-lg py-md" }, be = { class: "min-w-0" }, xe = { class: "text-sm font-semibold text-primary" }, Se = { class: "shrink-0" }, Ce = { class: "max-h-72 overflow-y-auto border-b border-secondary" }, we = { class: "flex items-center justify-between gap-xl bg-secondary px-lg py-md" }, Te = { class: "text-sm font-medium text-primary" }, Ee = { class: "font-mono text-xl font-semibold text-primary tabular-nums" }, De = /* @__PURE__ */ S({
|
|
182
193
|
__name: "DunningCaseSendInvoiceSummary",
|
|
183
194
|
props: {
|
|
184
195
|
dunningCase: {},
|
|
185
196
|
subject: {}
|
|
186
197
|
},
|
|
187
198
|
setup(e) {
|
|
188
|
-
let t = e, n = p(), i = r(), a = h(() =>
|
|
189
|
-
return (e, r) => (w(), v("section",
|
|
190
|
-
y("div",
|
|
199
|
+
let t = e, n = p(), i = r(), a = h(() => le(t.dunningCase.invoices, t.dunningCase.totalFee.amount > 0)), o = h(() => t.dunningCase.level === 0 ? n.t("module.dunning_case.level.none") : n.t("module.dunning_case.level.reminder", { level: t.dunningCase.level }));
|
|
200
|
+
return (e, r) => (w(), v("section", ve, [
|
|
201
|
+
y("div", ye, [y("div", be, [y("p", xe, D(t.subject ?? O(n).t("module.dunning_case.detail.invoices")), 1)]), y("span", Se, [x(O(P), {
|
|
191
202
|
label: o.value,
|
|
192
203
|
color: "gray",
|
|
193
204
|
size: "sm",
|
|
194
205
|
variant: "translucent"
|
|
195
206
|
}, null, 8, ["label"])])]),
|
|
196
|
-
y("div",
|
|
207
|
+
y("div", Ce, [(w(!0), v(m, null, E(a.value, (e, n) => (w(), v(m, { key: e.type === "fee" ? "fee" : e.invoice.uuid }, [e.type === "fee" ? (w(), g(oe, {
|
|
197
208
|
key: 0,
|
|
198
209
|
fee: t.dunningCase.totalFee,
|
|
199
210
|
level: t.dunningCase.level
|
|
200
|
-
}, null, 8, ["fee", "level"])) : (w(), g(
|
|
211
|
+
}, null, 8, ["fee", "level"])) : (w(), g(_e, {
|
|
201
212
|
key: 1,
|
|
202
213
|
"has-separator": a.value[n - 1]?.type === "fee",
|
|
203
214
|
invoice: e.invoice
|
|
204
215
|
}, null, 8, ["has-separator", "invoice"]))], 64))), 128))]),
|
|
205
|
-
y("dl",
|
|
216
|
+
y("dl", we, [y("dt", Te, D(O(n).t("module.dunning_case.send.outstanding_balance")), 1), y("dd", Ee, D(O(i).formatMonetary(t.dunningCase.outstandingBalance)), 1)])
|
|
206
217
|
]));
|
|
207
218
|
}
|
|
208
|
-
}),
|
|
219
|
+
}), $ = { class: "rounded-md border border-secondary bg-secondary p-md" }, Oe = { class: "text-sm text-error-primary" }, ke = /* @__PURE__ */ S({
|
|
209
220
|
__name: "DunningCaseSendRecipientAlert",
|
|
210
221
|
props: { customerDetailRoute: {} },
|
|
211
222
|
setup(e) {
|
|
@@ -213,7 +224,7 @@ var le = { class: "min-w-0" }, ue = { class: "flex min-w-0 items-center gap-sm"
|
|
|
213
224
|
function i() {
|
|
214
225
|
t.customerDetailRoute !== null && r.push(t.customerDetailRoute);
|
|
215
226
|
}
|
|
216
|
-
return (e, r) => (w(), v("div",
|
|
227
|
+
return (e, r) => (w(), v("div", $, [y("p", Oe, [b(D(O(n).t("module.dunning_case.send.no_default_recipient_description")) + " ", 1), t.customerDetailRoute === null ? _("", !0) : (w(), v("button", {
|
|
217
228
|
key: 0,
|
|
218
229
|
class: "font-medium underline hover:no-underline",
|
|
219
230
|
type: "button",
|
|
@@ -223,19 +234,19 @@ var le = { class: "min-w-0" }, ue = { class: "flex min-w-0 items-center gap-sm"
|
|
|
223
234
|
});
|
|
224
235
|
//#endregion
|
|
225
236
|
//#region src/modules/dunning-case/use-cases/send/composables/dunningCaseReminderSubject.composable.ts
|
|
226
|
-
function
|
|
237
|
+
function Ae(e) {
|
|
227
238
|
return e === "fr-BE" || e === "nl-BE" ? e : "en-US";
|
|
228
239
|
}
|
|
229
|
-
function
|
|
240
|
+
function je(e) {
|
|
230
241
|
let t = p(), n = s();
|
|
231
242
|
return h(() => {
|
|
232
243
|
let r = e.value;
|
|
233
|
-
return r === null || !n.result.value.isOk() ? null : n.result.value.getValue().find((e) => e.sequence === r)?.template[
|
|
244
|
+
return r === null || !n.result.value.isOk() ? null : n.result.value.getValue().find((e) => e.sequence === r)?.template[Ae(t.locale.value)].subject || null;
|
|
234
245
|
});
|
|
235
246
|
}
|
|
236
247
|
//#endregion
|
|
237
248
|
//#region src/modules/dunning-case/use-cases/send/composables/dunningCaseSendRecipient.composable.ts
|
|
238
|
-
function
|
|
249
|
+
function Me(e) {
|
|
239
250
|
let t = T(void 0), n = T(!0);
|
|
240
251
|
return k(e, async (e) => {
|
|
241
252
|
if (t.value = void 0, n.value = !0, e === null) return;
|
|
@@ -253,10 +264,10 @@ function je(e) {
|
|
|
253
264
|
}
|
|
254
265
|
//#endregion
|
|
255
266
|
//#region src/modules/dunning-case/use-cases/send/dialogs/DunningCaseSendDialog.vue?vue&type=script&setup=true&lang.ts
|
|
256
|
-
var
|
|
267
|
+
var Ne = {
|
|
257
268
|
key: 0,
|
|
258
269
|
class: "text-sm text-secondary"
|
|
259
|
-
},
|
|
270
|
+
}, Pe = { class: "flex w-full items-start gap-md rounded-md bg-secondary px-lg py-md text-secondary" }, Fe = { class: "text-xs/relaxed" }, Ie = /* @__PURE__ */ S({
|
|
260
271
|
__name: "DunningCaseSendDialog",
|
|
261
272
|
props: {
|
|
262
273
|
dunningCaseUuid: {},
|
|
@@ -264,17 +275,17 @@ var Me = {
|
|
|
264
275
|
},
|
|
265
276
|
emits: ["close"],
|
|
266
277
|
setup(e, { emit: t }) {
|
|
267
|
-
let n = e, r = t, a = p(), o = H(), s = i(),
|
|
278
|
+
let n = e, r = t, a = p(), o = H(), s = i(), l = Z(), d = K(h(() => n.dunningCaseUuid)), b = h(() => d.result.value.isOk() ? d.result.value.getValue() : null), S = Me(h(() => b.value?.customer.uuid ?? null)), C = je(h(() => b.value?.level ?? null)), T = h(() => {
|
|
268
279
|
let e = b.value?.customer.uuid;
|
|
269
280
|
return e === void 0 ? null : s.getCustomerDetailRoute(e);
|
|
270
|
-
}), E = h(() => b.value === null ? 0 :
|
|
281
|
+
}), E = h(() => b.value === null ? 0 : ce(b.value.invoices).length), k = h(() => typeof S.defaultEmail.value == "string" ? a.t("module.dunning_case.send.grouped_to", { email: S.defaultEmail.value }) : S.isMissing.value ? a.t("module.dunning_case.send.no_default_recipient") : a.t("module.dunning_case.send.description")), j = U({
|
|
271
282
|
schema: f.object({}),
|
|
272
283
|
onSubmit: async () => {
|
|
273
284
|
if (S.isMissing.value) {
|
|
274
285
|
o.show({ message: a.t("module.dunning_case.send.no_default_recipient_blocked") });
|
|
275
286
|
return;
|
|
276
287
|
}
|
|
277
|
-
let e = await
|
|
288
|
+
let e = await l.execute({ params: { dunningCaseUuid: n.dunningCaseUuid } });
|
|
278
289
|
if (e.isErr()) {
|
|
279
290
|
o.apiError(e.error);
|
|
280
291
|
return;
|
|
@@ -298,7 +309,7 @@ var Me = {
|
|
|
298
309
|
}),
|
|
299
310
|
description: k.value,
|
|
300
311
|
"has-separator": !1,
|
|
301
|
-
icon: O(
|
|
312
|
+
icon: O(c)
|
|
302
313
|
}, null, 8, [
|
|
303
314
|
"title",
|
|
304
315
|
"description",
|
|
@@ -306,16 +317,16 @@ var Me = {
|
|
|
306
317
|
]),
|
|
307
318
|
x(O(I), null, {
|
|
308
319
|
default: A(() => [x(O(F), { gap: "lg" }, {
|
|
309
|
-
default: A(() => [O(d).isLoading.value ? (w(), v("p",
|
|
310
|
-
O(S).isMissing.value ? (w(), g(
|
|
320
|
+
default: A(() => [O(d).isLoading.value ? (w(), v("p", Ne, D(O(a).t("module.dunning_case.common.loading")), 1)) : b.value === null ? _("", !0) : (w(), v(m, { key: 1 }, [
|
|
321
|
+
O(S).isMissing.value ? (w(), g(ke, {
|
|
311
322
|
key: 0,
|
|
312
323
|
"customer-detail-route": T.value
|
|
313
324
|
}, null, 8, ["customer-detail-route"])) : _("", !0),
|
|
314
|
-
x(
|
|
325
|
+
x(De, {
|
|
315
326
|
"dunning-case": b.value,
|
|
316
327
|
subject: O(C)
|
|
317
328
|
}, null, 8, ["dunning-case", "subject"]),
|
|
318
|
-
y("div",
|
|
329
|
+
y("div", Pe, [x(O(u), { class: "mt-xxs size-(--spacing-xl) shrink-0" }), y("p", Fe, D(O(a).t("module.dunning_case.send.impact", {
|
|
319
330
|
count: E.value,
|
|
320
331
|
level: b.value.level
|
|
321
332
|
})), 1)])
|
|
@@ -326,7 +337,7 @@ var Me = {
|
|
|
326
337
|
}),
|
|
327
338
|
x(O(L), { "has-separator": !1 }, {
|
|
328
339
|
right: A(() => [x(O(R)), x(O(z), {
|
|
329
|
-
"icon-right": O(
|
|
340
|
+
"icon-right": O(c),
|
|
330
341
|
"is-disabled": b.value === null || O(S).isPending.value || O(S).isMissing.value,
|
|
331
342
|
"is-loading": O(j).isSubmitting.value,
|
|
332
343
|
label: O(a).t("module.dunning_case.send.send_now"),
|
|
@@ -346,4 +357,4 @@ var Me = {
|
|
|
346
357
|
}
|
|
347
358
|
});
|
|
348
359
|
//#endregion
|
|
349
|
-
export {
|
|
360
|
+
export { q as a, J as i, X as n, K as o, Y as r, W as s, Ie as t };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { et as e } from "./dist-BQbaoN5W.js";
|
|
2
|
+
import { t } from "./invoiceCustomer.service-DpVfpQUD.js";
|
|
3
|
+
import { useI18n as n } from "vue-i18n";
|
|
4
|
+
import { computed as r, createBlock as i, createVNode as a, defineComponent as o, openBlock as s, unref as c, withCtx as l } from "vue";
|
|
5
|
+
import { useOffsetInfiniteQuery as u } from "@wisemen/vue-core-api-utils";
|
|
6
|
+
import { UIText as d, UITooltip as f, UITooltipContent as p } from "@wisemen/vue-core-design-system";
|
|
7
|
+
//#region src/modules/invoice/api/queries/invoiceCustomerSearch.query.ts
|
|
8
|
+
function m(e) {
|
|
9
|
+
let n = r(() => ({ search: e.params.search?.value }));
|
|
10
|
+
return u("invoiceCustomerSearch", {
|
|
11
|
+
params: { queryParams: n },
|
|
12
|
+
queryFn: (n) => t.getAll({
|
|
13
|
+
pagination: n,
|
|
14
|
+
search: e.params.search?.value ?? ""
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/modules/invoice/components/InvoiceApprovalOutOfSyncIndicator.vue
|
|
20
|
+
var h = /* @__PURE__ */ o({
|
|
21
|
+
__name: "InvoiceApprovalOutOfSyncIndicator",
|
|
22
|
+
setup(t) {
|
|
23
|
+
let r = n();
|
|
24
|
+
return (t, n) => (s(), i(c(f), {
|
|
25
|
+
"popover-side-offset": 8,
|
|
26
|
+
"popover-align": "center",
|
|
27
|
+
"popover-side": "bottom"
|
|
28
|
+
}, {
|
|
29
|
+
trigger: l(() => [a(c(e), {
|
|
30
|
+
"aria-label": c(r).t("wise_invoicing.invoice.approval_status.out_of_sync"),
|
|
31
|
+
class: "size-(--spacing-xl) shrink-0 text-warning-primary"
|
|
32
|
+
}, null, 8, ["aria-label"])]),
|
|
33
|
+
content: l(() => [a(c(p), null, {
|
|
34
|
+
default: l(() => [a(c(d), {
|
|
35
|
+
text: c(r).t("wise_invoicing.invoice.approval_status.out_of_sync"),
|
|
36
|
+
class: "text-sm text-primary"
|
|
37
|
+
}, null, 8, ["text"])]),
|
|
38
|
+
_: 1
|
|
39
|
+
})]),
|
|
40
|
+
_: 1
|
|
41
|
+
}));
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
//#endregion
|
|
45
|
+
export { m as n, h as t };
|