@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,31 +1,32 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { t } from "./documentTitle.composable-
|
|
2
|
+
import { t } from "./documentTitle.composable-CRJjS6p-.js";
|
|
3
3
|
import { r as n } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
4
|
-
import { n as r } from "./invoicingConfig.composable-
|
|
4
|
+
import { n as r } from "./invoicingConfig.composable-COn1rKRf.js";
|
|
5
5
|
import { t as i } from "./search.composable-CU9OpyUB.js";
|
|
6
|
-
import { n as a, r as o } from "./reminderConfig.query-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
6
|
+
import { n as a, r as o } from "./reminderConfig.query-DSO0ekC_.js";
|
|
7
|
+
import { B as s, P as c, T as l, c as u, dt as d, l as f, lt as p } from "./dist-BQbaoN5W.js";
|
|
8
|
+
import { a as m, n as h, r as g, s as _, t as v } from "./DunningCaseSendDialog-Co4oLFtZ.js";
|
|
9
|
+
import { n as ee } from "./customerUuid.model-ClN4Vi9n.js";
|
|
10
|
+
import { f as y, i as b, n as te, o as ne, r as x, s as re } from "./dist-CGZBUnWK.js";
|
|
11
|
+
import { z as ie } from "zod";
|
|
12
|
+
import { useI18n as S } from "vue-i18n";
|
|
13
|
+
import { Fragment as C, computed as w, createBlock as T, createCommentVNode as E, createElementBlock as D, createElementVNode as O, createVNode as k, defineComponent as A, nextTick as j, normalizeClass as M, normalizeStyle as ae, onMounted as N, openBlock as P, ref as F, renderList as I, toDisplayString as L, unref as R, watch as z, withCtx as B } from "vue";
|
|
14
|
+
import { useMutation as oe, useOffsetInfiniteQuery as V } from "@wisemen/vue-core-api-utils";
|
|
14
15
|
import { useRouter as H } from "vue-router";
|
|
15
16
|
import { Temporal as U } from "temporal-polyfill";
|
|
16
|
-
import { UIBadge as W, UIButton as G, UIDashboardPage as
|
|
17
|
-
import { createAction as
|
|
18
|
-
import { useForm as
|
|
17
|
+
import { UIBadge as W, UIButton as G, UIDashboardPage as se, UIDialogBody as K, UIDialogFooter as q, UIDialogFooterCancel as J, UIDialogFooterPrimary as Y, UIDialogHeader as X, UIFormDialog as ce, UITable as le, UITableCell as Z, UITableCellInteractiveElement as ue, UITabs as de, UITabsItem as fe, UITabsList as pe, createComponent as Q, defineTableColumns as me, useOverlay as he, useToast as ge } from "@wisemen/vue-core-design-system";
|
|
18
|
+
import { createAction as _e } from "@wisemen/vue-core-actions";
|
|
19
|
+
import { useForm as ve } from "formango";
|
|
19
20
|
//#region src/modules/dunning-case/api/queries/dunningCaseIndex.query.ts
|
|
20
21
|
function $(e) {
|
|
21
|
-
let t =
|
|
22
|
+
let t = w(() => ({
|
|
22
23
|
customerUuid: e.params.customerUuid?.value,
|
|
23
24
|
isOpen: e.params.isOpen?.value,
|
|
24
25
|
dunningCaseUuids: e.params.dunningCaseUuids?.value,
|
|
25
26
|
level: e.params.level?.value
|
|
26
27
|
}));
|
|
27
28
|
return V("dunningCaseIndex", {
|
|
28
|
-
isEnabled:
|
|
29
|
+
isEnabled: w(() => e.isEnabled?.value ?? !0),
|
|
29
30
|
params: { queryParams: t },
|
|
30
31
|
queryFn: (e) => o.getAll({
|
|
31
32
|
...t.value,
|
|
@@ -35,9 +36,9 @@ function $(e) {
|
|
|
35
36
|
}
|
|
36
37
|
//#endregion
|
|
37
38
|
//#region src/modules/dunning-case/actions/dunningCaseNavigateToCustomer.action.ts
|
|
38
|
-
function
|
|
39
|
-
let e =
|
|
40
|
-
return
|
|
39
|
+
function ye() {
|
|
40
|
+
let e = S(), t = H(), n = r();
|
|
41
|
+
return _e({
|
|
41
42
|
id: "dunning-case-navigate-to-customer",
|
|
42
43
|
isApplicable: (e) => {
|
|
43
44
|
let t = e.targetedModelOfType("DunningCase");
|
|
@@ -53,9 +54,9 @@ function _e() {
|
|
|
53
54
|
}
|
|
54
55
|
//#endregion
|
|
55
56
|
//#region src/modules/dunning-case/actions/dunningCaseNavigateToDetail.action.ts
|
|
56
|
-
function
|
|
57
|
-
let e =
|
|
58
|
-
return
|
|
57
|
+
function be() {
|
|
58
|
+
let e = S(), t = H();
|
|
59
|
+
return _e({
|
|
59
60
|
id: "dunning-case-navigate-to-detail",
|
|
60
61
|
isApplicable: (e) => e.hasTargetedModelsOfType("DunningCase"),
|
|
61
62
|
name: () => e.t("module.dunning_case.overview.menu.view_case"),
|
|
@@ -71,7 +72,7 @@ function ve() {
|
|
|
71
72
|
}
|
|
72
73
|
//#endregion
|
|
73
74
|
//#region src/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewMetrics.vue?vue&type=script&setup=true&lang.ts
|
|
74
|
-
var
|
|
75
|
+
var xe = ["aria-label"], Se = { class: "text-xs font-semibold text-secondary uppercase" }, Ce = { class: "mt-xl font-mono text-4xl font-semibold text-primary" }, we = { class: "mt-xs text-sm text-secondary" }, Te = { class: "lg:col-span-2" }, Ee = { class: "flex h-1.5 w-full overflow-hidden rounded-full bg-secondary" }, De = { class: "mt-xl grid grid-cols-1 gap-md sm:grid-cols-3" }, Oe = { class: "flex min-w-0 items-center gap-sm" }, ke = { class: "truncate text-sm text-secondary" }, Ae = { class: "shrink-0 font-mono text-sm font-semibold text-primary tabular-nums" }, je = /* @__PURE__ */ A({
|
|
75
76
|
__name: "DunningCaseOverviewMetrics",
|
|
76
77
|
props: {
|
|
77
78
|
hasLevelCountError: { type: Boolean },
|
|
@@ -79,140 +80,177 @@ var ye = ["aria-label"], be = { class: "text-xs font-semibold text-secondary upp
|
|
|
79
80
|
levelCountTotal: {}
|
|
80
81
|
},
|
|
81
82
|
setup(e) {
|
|
82
|
-
let t = e, n =
|
|
83
|
+
let t = e, n = S(), r = w(() => t.hasLevelCountError ? n.t("module.dunning_case.overview.metrics_unavailable") : t.levelCountTotal === null ? n.t("module.dunning_case.common.loading") : n.t("module.dunning_case.overview.case_count", { count: t.levelCountTotal }));
|
|
83
84
|
function i(e) {
|
|
84
85
|
return e === 0 ? n.t("module.dunning_case.level.none") : n.t("module.dunning_case.level.reminder", { level: e });
|
|
85
86
|
}
|
|
86
|
-
return (t, a) => (P(),
|
|
87
|
+
return (t, a) => (P(), D("section", {
|
|
87
88
|
"aria-label": R(n).t("module.dunning_case.overview.levels"),
|
|
88
89
|
class: "grid min-w-0 grid-cols-1 gap-2xl rounded-lg border border-secondary bg-primary p-2xl shadow-sm lg:grid-cols-3 lg:items-center"
|
|
89
|
-
}, [
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
]),
|
|
90
|
+
}, [O("div", null, [
|
|
91
|
+
O("p", Se, L(R(n).t("module.dunning_case.overview.levels")), 1),
|
|
92
|
+
O("p", Ce, L(e.levelCountTotal ?? "—"), 1),
|
|
93
|
+
O("p", we, L(r.value), 1)
|
|
94
|
+
]), O("div", Te, [O("div", Ee, [(P(!0), D(C, null, I(e.levelCounts, (e, t) => (P(), D("span", {
|
|
94
95
|
key: t,
|
|
95
|
-
class:
|
|
96
|
+
class: M({
|
|
96
97
|
"bg-brand-500": t === 0,
|
|
97
98
|
"bg-error-solid": t === 2,
|
|
98
99
|
"bg-warning-solid": t === 1
|
|
99
100
|
}),
|
|
100
|
-
style:
|
|
101
|
-
}, null, 6))), 128))]),
|
|
101
|
+
style: ae({ flexGrow: e ?? 0 })
|
|
102
|
+
}, null, 6))), 128))]), O("div", De, [(P(!0), D(C, null, I(e.levelCounts, (e, t) => (P(), D("div", {
|
|
102
103
|
key: t,
|
|
103
104
|
class: "flex items-center justify-between gap-xl"
|
|
104
|
-
}, [
|
|
105
|
+
}, [O("div", Oe, [O("span", { class: M([{
|
|
105
106
|
"bg-brand-500": t === 0,
|
|
106
107
|
"bg-error-solid": t === 2,
|
|
107
108
|
"bg-warning-solid": t === 1
|
|
108
|
-
}, "size-2 shrink-0 rounded-full"]) }, null, 2),
|
|
109
|
+
}, "size-2 shrink-0 rounded-full"]) }, null, 2), O("p", ke, L(i(t + 1)), 1)]), O("p", Ae, L(e ?? "—"), 1)]))), 128))])])], 8, xe));
|
|
109
110
|
}
|
|
110
|
-
})
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
}), Me = {
|
|
112
|
+
uuid: "00000000-0000-4000-8000-000000000000",
|
|
113
|
+
sentAt: null,
|
|
114
|
+
hasErrors: !1
|
|
115
|
+
};
|
|
116
|
+
function Ne(e, t) {
|
|
117
|
+
if (e === null || t === null) return e === t;
|
|
118
|
+
let n = e.sentAt === null || t.sentAt === null ? e.sentAt === t.sentAt : e.sentAt.equals(t.sentAt);
|
|
119
|
+
return e.uuid === t.uuid && n && e.hasErrors === t.hasErrors;
|
|
120
|
+
}
|
|
121
|
+
function Pe(e) {
|
|
122
|
+
let t = w(() => !0), { isFetchingNextPage: n, isLoading: r, fetchNextPage: i, refetch: a, result: o } = $({ params: {
|
|
115
123
|
customerUuid: e.customerUuid,
|
|
116
124
|
isOpen: t,
|
|
117
|
-
level:
|
|
118
|
-
} })
|
|
125
|
+
level: w(() => e.activeLevel.value ?? void 0)
|
|
126
|
+
} });
|
|
127
|
+
function s() {
|
|
128
|
+
return o.value.isOk() ? o.value.getValue().data : [];
|
|
129
|
+
}
|
|
130
|
+
let c = F(/* @__PURE__ */ new Map()), l = w(() => s().map((e) => {
|
|
131
|
+
let t = c.value.get(e.uuid);
|
|
132
|
+
return t !== void 0 && Ne(e.latestCreatedReminder, t) ? {
|
|
133
|
+
...e,
|
|
134
|
+
latestCreatedReminder: Me
|
|
135
|
+
} : e;
|
|
136
|
+
})), u = w(() => o.value.isErr() ? o.value.getError() : null);
|
|
137
|
+
ee({
|
|
138
|
+
refetch: a,
|
|
139
|
+
sendingUuids: () => l.value.filter((e) => m(e.latestCreatedReminder) === "sending").map((e) => e.uuid),
|
|
140
|
+
onLimitReached: () => {
|
|
141
|
+
c.value = /* @__PURE__ */ new Map();
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
let d = $({ params: {
|
|
119
145
|
customerUuid: e.customerUuid,
|
|
120
146
|
isOpen: t,
|
|
121
|
-
level:
|
|
122
|
-
} }),
|
|
147
|
+
level: w(() => 1)
|
|
148
|
+
} }), f = $({ params: {
|
|
123
149
|
customerUuid: e.customerUuid,
|
|
124
150
|
isOpen: t,
|
|
125
|
-
level:
|
|
126
|
-
} }),
|
|
151
|
+
level: w(() => 2)
|
|
152
|
+
} }), p = $({ params: {
|
|
127
153
|
customerUuid: e.customerUuid,
|
|
128
154
|
isOpen: t,
|
|
129
|
-
level:
|
|
130
|
-
} }),
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
].map((e) => e.result.value.isOk() ? e.result.value.getValue().meta.total : null))
|
|
155
|
+
level: w(() => 3)
|
|
156
|
+
} }), h = w(() => [
|
|
157
|
+
d,
|
|
158
|
+
f,
|
|
159
|
+
p
|
|
160
|
+
].map((e) => e.result.value.isOk() ? e.result.value.getValue().meta.total : null)), g = w(() => [
|
|
161
|
+
d,
|
|
162
|
+
f,
|
|
163
|
+
p
|
|
164
|
+
].some((e) => e.result.value.isErr())), _ = w(() => h.value.every((e) => e !== null) ? h.value.reduce((e, t) => e + t, 0) : null);
|
|
165
|
+
function v() {
|
|
166
|
+
let e = s();
|
|
167
|
+
return (t) => {
|
|
168
|
+
let n = new Map(c.value);
|
|
169
|
+
for (let r of e) t.includes(r.uuid) || n.set(r.uuid, r.latestCreatedReminder);
|
|
170
|
+
c.value = n;
|
|
171
|
+
};
|
|
172
|
+
}
|
|
135
173
|
return {
|
|
136
|
-
hasLevelCountError:
|
|
137
|
-
c,
|
|
138
|
-
l,
|
|
139
|
-
u
|
|
140
|
-
].some((e) => e.result.value.isErr())),
|
|
174
|
+
hasLevelCountError: g,
|
|
141
175
|
isFetchingNextPage: n,
|
|
142
176
|
isLoading: r,
|
|
143
|
-
data:
|
|
144
|
-
error:
|
|
177
|
+
data: l,
|
|
178
|
+
error: u,
|
|
145
179
|
fetchNextPage: i,
|
|
146
|
-
levelCounts:
|
|
147
|
-
levelCountTotal:
|
|
148
|
-
|
|
180
|
+
levelCounts: h,
|
|
181
|
+
levelCountTotal: _,
|
|
182
|
+
trackBulkSend: v
|
|
149
183
|
};
|
|
150
184
|
}
|
|
151
185
|
//#endregion
|
|
152
186
|
//#region src/modules/dunning-case/api/queries/dunningCaseCustomerIndex.query.ts
|
|
153
|
-
function
|
|
154
|
-
let t =
|
|
187
|
+
function Fe(e) {
|
|
188
|
+
let t = w(() => ({ search: e.params.search?.value }));
|
|
155
189
|
return V("dunningCaseCustomerIndex", {
|
|
156
190
|
params: { queryParams: t },
|
|
157
|
-
queryFn: (e) =>
|
|
191
|
+
queryFn: (e) => _.getAll(t.value.search, e)
|
|
158
192
|
});
|
|
159
193
|
}
|
|
160
194
|
//#endregion
|
|
161
195
|
//#region src/modules/dunning-case/use-cases/overview/composables/dunningCaseOverviewFilters.composable.ts
|
|
162
|
-
function
|
|
163
|
-
let e =
|
|
196
|
+
function Ie() {
|
|
197
|
+
let e = S(), t = i({ debounceMs: 250 }), n = Fe({ params: { search: t.debouncedSearch } }), r = w(() => n.result.value.isOk() ? n.result.value.getValue().data : []), a = b({
|
|
164
198
|
actionGroup: { name: "dunning-cases" },
|
|
165
|
-
filters: [
|
|
199
|
+
filters: [y({
|
|
166
200
|
defaultValue: {
|
|
167
|
-
operator:
|
|
201
|
+
operator: x.INCLUDES,
|
|
168
202
|
value: []
|
|
169
203
|
},
|
|
170
204
|
disableOperators: !0,
|
|
171
205
|
displayFn: (e) => r.value.find((t) => t.uuid === e)?.name ?? e,
|
|
172
206
|
key: "customerUuids",
|
|
173
207
|
label: e.t("module.dunning_case.overview.filter_customer"),
|
|
174
|
-
options: async (e) => a.values.value.customerUuids.value.length > 0 ? [] : (t.updateSearch(e), await
|
|
208
|
+
options: async (e) => a.values.value.customerUuids.value.length > 0 ? [] : (t.updateSearch(e), await j(), r.value.map((e) => e.uuid))
|
|
175
209
|
})]
|
|
176
210
|
});
|
|
177
|
-
return
|
|
178
|
-
(e.operator !==
|
|
179
|
-
operator:
|
|
211
|
+
return z(() => a.values.value.customerUuids, (e) => {
|
|
212
|
+
(e.operator !== x.INCLUDES || e.value.length > 1) && (a.values.value.customerUuids = {
|
|
213
|
+
operator: x.INCLUDES,
|
|
180
214
|
value: e.value.slice(-1)
|
|
181
215
|
});
|
|
182
216
|
}, {
|
|
183
217
|
deep: !0,
|
|
184
218
|
immediate: !0
|
|
185
219
|
}), {
|
|
186
|
-
customerUuid:
|
|
220
|
+
customerUuid: w(() => a.values.value.customerUuids.value[0]),
|
|
187
221
|
filters: a
|
|
188
222
|
};
|
|
189
223
|
}
|
|
190
224
|
//#endregion
|
|
191
225
|
//#region src/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewActionsCell.vue?vue&type=script&setup=true&lang.ts
|
|
192
|
-
var
|
|
226
|
+
var Le = { class: "flex w-full items-center justify-end gap-xs" }, Re = /* @__PURE__ */ A({
|
|
193
227
|
__name: "DunningCaseOverviewActionsCell",
|
|
194
228
|
props: { item: {} },
|
|
195
|
-
emits: [
|
|
229
|
+
emits: [
|
|
230
|
+
"retry",
|
|
231
|
+
"send",
|
|
232
|
+
"viewCustomer"
|
|
233
|
+
],
|
|
196
234
|
setup(e, { emit: t }) {
|
|
197
|
-
let n = e, i = t, a =
|
|
198
|
-
return (t, n) => (P(),
|
|
199
|
-
default:
|
|
200
|
-
default:
|
|
235
|
+
let n = e, i = t, a = S(), o = r(), s = w(() => o.getCustomerDetailRoute(n.item.customer.uuid)), c = w(() => n.item.blockedReason !== null), u = w(() => m(n.item.latestCreatedReminder)), f = w(() => n.item.canRetryReminder ? a.t("module.dunning_case.overview.retry") : c.value ? a.t("module.dunning_case.overview.blocked") : n.item.nextReminderOn === null ? a.t("module.dunning_case.overview.not_scheduled") : a.t("module.dunning_case.overview.send"));
|
|
236
|
+
return (t, n) => (P(), T(R(Z), null, {
|
|
237
|
+
default: B(() => [k(R(ue), { class: "w-full" }, {
|
|
238
|
+
default: B(() => [O("div", Le, [c.value && s.value !== null ? (P(), T(R(G), {
|
|
201
239
|
key: 0,
|
|
202
|
-
"icon-right": R(
|
|
240
|
+
"icon-right": R(l),
|
|
203
241
|
label: R(a).t("module.dunning_case.overview.fix"),
|
|
204
242
|
size: "sm",
|
|
205
243
|
variant: "secondary",
|
|
206
244
|
onClick: n[0] ||= (e) => i("viewCustomer")
|
|
207
|
-
}, null, 8, ["icon-right", "label"])) : (P(),
|
|
245
|
+
}, null, 8, ["icon-right", "label"])) : (P(), T(R(G), {
|
|
208
246
|
key: 1,
|
|
209
|
-
"icon-right": e.item.canSendReminder ? R(d) : void 0,
|
|
210
|
-
"is-disabled":
|
|
247
|
+
"icon-right": e.item.canSendReminder || e.item.canRetryReminder ? R(d) : void 0,
|
|
248
|
+
"is-disabled": c.value || !e.item.canSendReminder && !e.item.canRetryReminder,
|
|
211
249
|
"is-loading": u.value === "sending",
|
|
212
250
|
label: f.value,
|
|
213
251
|
size: "sm",
|
|
214
252
|
variant: "secondary",
|
|
215
|
-
onClick: n[1] ||= (
|
|
253
|
+
onClick: n[1] ||= (t) => e.item.canRetryReminder ? i("retry") : i("send")
|
|
216
254
|
}, null, 8, [
|
|
217
255
|
"icon-right",
|
|
218
256
|
"is-disabled",
|
|
@@ -224,35 +262,35 @@ var Ne = { class: "flex w-full items-center justify-end gap-xs" }, Pe = /* @__PU
|
|
|
224
262
|
_: 1
|
|
225
263
|
}));
|
|
226
264
|
}
|
|
227
|
-
}),
|
|
265
|
+
}), ze = { class: "truncate text-sm font-medium text-primary" }, Be = /* @__PURE__ */ A({
|
|
228
266
|
__name: "DunningCaseOverviewCustomerCell",
|
|
229
267
|
props: { item: {} },
|
|
230
268
|
setup(e) {
|
|
231
|
-
return (t, n) => (P(),
|
|
232
|
-
default:
|
|
269
|
+
return (t, n) => (P(), T(R(Z), null, {
|
|
270
|
+
default: B(() => [O("span", ze, L(e.item.customer.name), 1)]),
|
|
233
271
|
_: 1
|
|
234
272
|
}));
|
|
235
273
|
}
|
|
236
|
-
}),
|
|
274
|
+
}), Ve = /* @__PURE__ */ A({
|
|
237
275
|
__name: "DunningCaseOverviewDaysOverdueCell",
|
|
238
276
|
props: { item: {} },
|
|
239
277
|
setup(e) {
|
|
240
|
-
return (t, n) => (P(),
|
|
241
|
-
default:
|
|
278
|
+
return (t, n) => (P(), T(R(Z), null, {
|
|
279
|
+
default: B(() => [O("span", { class: M([{
|
|
242
280
|
"text-error-primary": e.item.level === 3,
|
|
243
281
|
"text-primary": e.item.level !== 3
|
|
244
282
|
}, "w-full text-right font-mono text-sm tabular-nums"]) }, L(e.item.daysOverdue), 3)]),
|
|
245
283
|
_: 1
|
|
246
284
|
}));
|
|
247
285
|
}
|
|
248
|
-
}),
|
|
286
|
+
}), He = {
|
|
249
287
|
key: 0,
|
|
250
288
|
class: "font-mono text-xs text-secondary tabular-nums"
|
|
251
|
-
},
|
|
289
|
+
}, Ue = /* @__PURE__ */ A({
|
|
252
290
|
__name: "DunningCaseOverviewLastReminderCell",
|
|
253
291
|
props: { item: {} },
|
|
254
292
|
setup(e) {
|
|
255
|
-
let t = e, n =
|
|
293
|
+
let t = e, n = S(), r = w(() => {
|
|
256
294
|
if (t.item.level === null) return null;
|
|
257
295
|
if (t.item.lastReminderSentAt === null) return n.t("module.dunning_case.overview.last_reminder_not_sent");
|
|
258
296
|
let e = U.Now.instant().epochMilliseconds - t.item.lastReminderSentAt.epochMilliseconds, r = Math.floor(e / 36e5);
|
|
@@ -264,45 +302,45 @@ var Ne = { class: "flex w-full items-center justify-end gap-xs" }, Pe = /* @__PU
|
|
|
264
302
|
level: t.item.level
|
|
265
303
|
});
|
|
266
304
|
});
|
|
267
|
-
return (e, t) => (P(),
|
|
268
|
-
default:
|
|
305
|
+
return (e, t) => (P(), T(R(Z), null, {
|
|
306
|
+
default: B(() => [r.value === null ? E("", !0) : (P(), D("span", He, L(r.value), 1))]),
|
|
269
307
|
_: 1
|
|
270
308
|
}));
|
|
271
309
|
}
|
|
272
|
-
}),
|
|
310
|
+
}), We = {
|
|
273
311
|
key: 0,
|
|
274
312
|
class: "flex min-w-0 items-center gap-sm"
|
|
275
|
-
},
|
|
313
|
+
}, Ge = { class: "truncate text-xs text-primary" }, Ke = /* @__PURE__ */ A({
|
|
276
314
|
__name: "DunningCaseOverviewLevelCell",
|
|
277
315
|
props: { item: {} },
|
|
278
316
|
setup(e) {
|
|
279
|
-
let t =
|
|
317
|
+
let t = S();
|
|
280
318
|
function n(e) {
|
|
281
319
|
return e === 0 ? t.t("module.dunning_case.level.none") : t.t("module.dunning_case.level.reminder", { level: e });
|
|
282
320
|
}
|
|
283
|
-
return (t, r) => (P(),
|
|
284
|
-
default:
|
|
321
|
+
return (t, r) => (P(), T(R(Z), null, {
|
|
322
|
+
default: B(() => [e.item.level === null ? E("", !0) : (P(), D("div", We, [k(a, {
|
|
285
323
|
level: e.item.level,
|
|
286
324
|
size: "sm"
|
|
287
|
-
}, null, 8, ["level"]),
|
|
325
|
+
}, null, 8, ["level"]), O("span", Ge, L(n(e.item.level)), 1)]))]),
|
|
288
326
|
_: 1
|
|
289
327
|
}));
|
|
290
328
|
}
|
|
291
|
-
}),
|
|
329
|
+
}), qe = { class: "w-full text-right font-mono text-sm font-medium text-primary tabular-nums" }, Je = /* @__PURE__ */ A({
|
|
292
330
|
__name: "DunningCaseOverviewOutstandingCell",
|
|
293
331
|
props: { item: {} },
|
|
294
332
|
setup(e) {
|
|
295
333
|
let t = n();
|
|
296
|
-
return (n, r) => (P(),
|
|
297
|
-
default:
|
|
334
|
+
return (n, r) => (P(), T(R(Z), null, {
|
|
335
|
+
default: B(() => [O("span", qe, L(R(t).formatMonetary(e.item.outstandingBalance)), 1)]),
|
|
298
336
|
_: 1
|
|
299
337
|
}));
|
|
300
338
|
}
|
|
301
|
-
}),
|
|
339
|
+
}), Ye = { class: "flex flex-col items-start gap-xxs" }, Xe = /* @__PURE__ */ A({
|
|
302
340
|
__name: "DunningCaseOverviewReminderCell",
|
|
303
341
|
props: { item: {} },
|
|
304
342
|
setup(e) {
|
|
305
|
-
let t = e, n =
|
|
343
|
+
let t = e, n = S(), r = w(() => m(t.item.latestCreatedReminder));
|
|
306
344
|
function i(e) {
|
|
307
345
|
let t = U.Now.plainDateISO().until(e, { largestUnit: "days" }).days;
|
|
308
346
|
return t <= 0 ? n.t("module.dunning_case.overview.due_today") : n.t("module.dunning_case.overview.due_in_days", { count: t });
|
|
@@ -310,14 +348,14 @@ var Ne = { class: "flex w-full items-center justify-end gap-xs" }, Pe = /* @__PU
|
|
|
310
348
|
function a(e) {
|
|
311
349
|
return U.PlainDate.compare(e, U.Now.plainDateISO()) <= 0;
|
|
312
350
|
}
|
|
313
|
-
return (t, n) => (P(),
|
|
314
|
-
default:
|
|
351
|
+
return (t, n) => (P(), T(R(Z), null, {
|
|
352
|
+
default: B(() => [O("div", Ye, [e.item.nextReminderOn === null ? E("", !0) : (P(), T(R(W), {
|
|
315
353
|
key: 0,
|
|
316
354
|
color: a(e.item.nextReminderOn) ? "success" : "warning",
|
|
317
355
|
label: i(e.item.nextReminderOn),
|
|
318
356
|
size: "sm",
|
|
319
357
|
variant: "translucent"
|
|
320
|
-
}, null, 8, ["color", "label"])),
|
|
358
|
+
}, null, 8, ["color", "label"])), k(h, {
|
|
321
359
|
"blocked-reason": e.item.blockedReason,
|
|
322
360
|
status: r.value
|
|
323
361
|
}, null, 8, ["blocked-reason", "status"])])]),
|
|
@@ -327,9 +365,9 @@ var Ne = { class: "flex w-full items-center justify-end gap-xs" }, Pe = /* @__PU
|
|
|
327
365
|
});
|
|
328
366
|
//#endregion
|
|
329
367
|
//#region src/modules/dunning-case/use-cases/overview/composables/dunningCaseOverviewTableColumns.composable.ts
|
|
330
|
-
function
|
|
331
|
-
let t =
|
|
332
|
-
return
|
|
368
|
+
function Ze(e) {
|
|
369
|
+
let t = S();
|
|
370
|
+
return w(() => me()([
|
|
333
371
|
{
|
|
334
372
|
headerLabel: t.t("module.dunning_case.overview.table.customer"),
|
|
335
373
|
key: "customer",
|
|
@@ -337,7 +375,7 @@ function qe(e) {
|
|
|
337
375
|
max: "1fr",
|
|
338
376
|
min: "12rem"
|
|
339
377
|
},
|
|
340
|
-
component: (e) => Q(
|
|
378
|
+
component: (e) => Q(Be, { item: e })
|
|
341
379
|
},
|
|
342
380
|
{
|
|
343
381
|
headerLabel: t.t("module.dunning_case.overview.table.level"),
|
|
@@ -346,7 +384,7 @@ function qe(e) {
|
|
|
346
384
|
max: "10rem",
|
|
347
385
|
min: "8rem"
|
|
348
386
|
},
|
|
349
|
-
component: (e) => Q(
|
|
387
|
+
component: (e) => Q(Ke, { item: e })
|
|
350
388
|
},
|
|
351
389
|
{
|
|
352
390
|
headerLabel: t.t("module.dunning_case.overview.table.days_overdue"),
|
|
@@ -355,7 +393,7 @@ function qe(e) {
|
|
|
355
393
|
max: "9rem",
|
|
356
394
|
min: "7rem"
|
|
357
395
|
},
|
|
358
|
-
component: (e) => Q(
|
|
396
|
+
component: (e) => Q(Ve, { item: e })
|
|
359
397
|
},
|
|
360
398
|
{
|
|
361
399
|
headerLabel: t.t("module.dunning_case.overview.table.next_reminder"),
|
|
@@ -364,7 +402,7 @@ function qe(e) {
|
|
|
364
402
|
max: "14rem",
|
|
365
403
|
min: "10rem"
|
|
366
404
|
},
|
|
367
|
-
component: (e) => Q(
|
|
405
|
+
component: (e) => Q(Xe, { item: e })
|
|
368
406
|
},
|
|
369
407
|
{
|
|
370
408
|
headerLabel: t.t("module.dunning_case.overview.table.last_reminder"),
|
|
@@ -373,7 +411,7 @@ function qe(e) {
|
|
|
373
411
|
max: "12rem",
|
|
374
412
|
min: "9rem"
|
|
375
413
|
},
|
|
376
|
-
component: (e) => Q(
|
|
414
|
+
component: (e) => Q(Ue, { item: e })
|
|
377
415
|
},
|
|
378
416
|
{
|
|
379
417
|
headerLabel: t.t("module.dunning_case.overview.table.outstanding"),
|
|
@@ -382,7 +420,7 @@ function qe(e) {
|
|
|
382
420
|
max: "10rem",
|
|
383
421
|
min: "8rem"
|
|
384
422
|
},
|
|
385
|
-
component: (e) => Q(
|
|
423
|
+
component: (e) => Q(Je, { item: e })
|
|
386
424
|
},
|
|
387
425
|
{
|
|
388
426
|
headerLabel: "",
|
|
@@ -391,8 +429,9 @@ function qe(e) {
|
|
|
391
429
|
max: "11rem",
|
|
392
430
|
min: "9rem"
|
|
393
431
|
},
|
|
394
|
-
component: (t) => Q(
|
|
432
|
+
component: (t) => Q(Re, {
|
|
395
433
|
item: t,
|
|
434
|
+
onRetry: () => e.onRetry(t),
|
|
396
435
|
onSend: () => e.onSend(t),
|
|
397
436
|
onViewCustomer: () => e.onViewCustomer(t)
|
|
398
437
|
})
|
|
@@ -401,8 +440,8 @@ function qe(e) {
|
|
|
401
440
|
}
|
|
402
441
|
//#endregion
|
|
403
442
|
//#region src/modules/dunning-case/api/mutations/dunningCaseBulkSend.mutation.ts
|
|
404
|
-
function
|
|
405
|
-
return
|
|
443
|
+
function Qe() {
|
|
444
|
+
return oe({
|
|
406
445
|
queryFn: (e) => o.sendBulk(e.params.queryParams),
|
|
407
446
|
queryKeysToInvalidate: {
|
|
408
447
|
dunningCaseDetail: {},
|
|
@@ -412,7 +451,7 @@ function Je() {
|
|
|
412
451
|
}
|
|
413
452
|
//#endregion
|
|
414
453
|
//#region src/modules/dunning-case/use-cases/send/components/DunningCaseBulkSendStat.vue
|
|
415
|
-
var
|
|
454
|
+
var $e = /* @__PURE__ */ A({
|
|
416
455
|
__name: "DunningCaseBulkSendStat",
|
|
417
456
|
props: {
|
|
418
457
|
hasSeparator: { type: Boolean },
|
|
@@ -422,20 +461,20 @@ var Ye = /* @__PURE__ */ k({
|
|
|
422
461
|
},
|
|
423
462
|
setup(e) {
|
|
424
463
|
let t = e;
|
|
425
|
-
return (e, n) => (P(),
|
|
464
|
+
return (e, n) => (P(), D("div", { class: M([{ "border-r border-secondary": t.hasSeparator }, "p-lg"]) }, [O("p", { class: M([{
|
|
426
465
|
"text-primary": t.tone === "default",
|
|
427
466
|
"text-success-primary": t.tone === "success",
|
|
428
467
|
"text-warning-primary": t.tone === "warning"
|
|
429
|
-
}, "font-mono text-2xl font-semibold tabular-nums"]) }, L(t.value), 3),
|
|
468
|
+
}, "font-mono text-2xl font-semibold tabular-nums"]) }, L(t.value), 3), O("p", { class: M([{
|
|
430
469
|
"text-secondary": t.tone === "default",
|
|
431
470
|
"text-success-primary": t.tone === "success",
|
|
432
471
|
"text-warning-primary": t.tone === "warning"
|
|
433
472
|
}, "mt-xs text-xs font-medium uppercase"]) }, L(t.label), 3)], 2));
|
|
434
473
|
}
|
|
435
|
-
}),
|
|
474
|
+
}), et = { class: "flex flex-col gap-md" }, tt = { class: "grid grid-cols-3 overflow-hidden rounded-md border border-secondary" }, nt = { class: "rounded-md bg-success-primary px-lg py-md text-sm font-medium text-success-primary" }, rt = {
|
|
436
475
|
key: 0,
|
|
437
476
|
class: "rounded-md border border-secondary px-lg py-md text-sm text-secondary"
|
|
438
|
-
},
|
|
477
|
+
}, it = /* @__PURE__ */ A({
|
|
439
478
|
__name: "DunningCaseBulkSendSummary",
|
|
440
479
|
props: {
|
|
441
480
|
processableCount: {},
|
|
@@ -443,7 +482,7 @@ var Ye = /* @__PURE__ */ k({
|
|
|
443
482
|
totalCount: {}
|
|
444
483
|
},
|
|
445
484
|
setup(e) {
|
|
446
|
-
let t = e, n =
|
|
485
|
+
let t = e, n = S(), r = w(() => [
|
|
447
486
|
{
|
|
448
487
|
label: n.t("module.dunning_case.bulk_send.total"),
|
|
449
488
|
tone: "default",
|
|
@@ -460,8 +499,8 @@ var Ye = /* @__PURE__ */ k({
|
|
|
460
499
|
value: t.skippedCount
|
|
461
500
|
}
|
|
462
501
|
]);
|
|
463
|
-
return (e, i) => (P(),
|
|
464
|
-
|
|
502
|
+
return (e, i) => (P(), D("div", et, [
|
|
503
|
+
O("div", tt, [(P(!0), D(C, null, I(r.value, (e, t) => (P(), T($e, {
|
|
465
504
|
key: e.label,
|
|
466
505
|
"has-separator": t < r.value.length - 1,
|
|
467
506
|
label: e.label,
|
|
@@ -473,14 +512,14 @@ var Ye = /* @__PURE__ */ k({
|
|
|
473
512
|
"tone",
|
|
474
513
|
"value"
|
|
475
514
|
]))), 128))]),
|
|
476
|
-
|
|
477
|
-
t.skippedCount > 0 ? (P(),
|
|
515
|
+
O("p", nt, L(R(n).t("module.dunning_case.bulk_send.processable", { count: t.processableCount })), 1),
|
|
516
|
+
t.skippedCount > 0 ? (P(), D("p", rt, L(R(n).t("module.dunning_case.bulk_send.skipped", { count: t.skippedCount })), 1)) : E("", !0)
|
|
478
517
|
]));
|
|
479
518
|
}
|
|
480
|
-
}),
|
|
519
|
+
}), at = {
|
|
481
520
|
key: 0,
|
|
482
521
|
class: "text-sm text-secondary"
|
|
483
|
-
},
|
|
522
|
+
}, ot = /* @__PURE__ */ A({
|
|
484
523
|
__name: "DunningCaseBulkSendDialog",
|
|
485
524
|
props: { onSent: { type: Function } },
|
|
486
525
|
emits: ["close"],
|
|
@@ -495,7 +534,7 @@ var Ye = /* @__PURE__ */ k({
|
|
|
495
534
|
function s(e) {
|
|
496
535
|
return Object.hasOwn(a, e);
|
|
497
536
|
}
|
|
498
|
-
let c =
|
|
537
|
+
let c = S(), l = ge(), u = Qe(), f = F(null), p = F(!0), m = w(() => f.value?.meta.processed ?? 0);
|
|
499
538
|
function h(e) {
|
|
500
539
|
let t = e.errors.at(0)?.errors.at(0)?.code;
|
|
501
540
|
return t !== void 0 && s(t) ? c.t(a[t]) : c.t("module.dunning_case.bulk_send.skip_reason.unknown");
|
|
@@ -511,8 +550,8 @@ var Ye = /* @__PURE__ */ k({
|
|
|
511
550
|
reason: e
|
|
512
551
|
})).join(", ");
|
|
513
552
|
}
|
|
514
|
-
let _ =
|
|
515
|
-
schema:
|
|
553
|
+
let _ = ve({
|
|
554
|
+
schema: ie.object({}),
|
|
516
555
|
onSubmit: async () => {
|
|
517
556
|
let e = await u.execute({ params: { queryParams: i } });
|
|
518
557
|
if (e.isErr()) {
|
|
@@ -532,7 +571,7 @@ var Ye = /* @__PURE__ */ k({
|
|
|
532
571
|
skipped: e.value.meta.skipped,
|
|
533
572
|
summary: t
|
|
534
573
|
})
|
|
535
|
-
}), n.onSent(), r("close");
|
|
574
|
+
}), n.onSent(e.value.skipped.map((e) => e.uuid)), r("close");
|
|
536
575
|
}
|
|
537
576
|
});
|
|
538
577
|
async function v() {
|
|
@@ -545,13 +584,13 @@ var Ye = /* @__PURE__ */ k({
|
|
|
545
584
|
}
|
|
546
585
|
return N(() => {
|
|
547
586
|
v();
|
|
548
|
-
}), (e, t) => (P(),
|
|
587
|
+
}), (e, t) => (P(), T(R(ce), {
|
|
549
588
|
form: R(_),
|
|
550
589
|
size: "md",
|
|
551
590
|
onClose: t[0] ||= (e) => r("close")
|
|
552
591
|
}, {
|
|
553
|
-
default:
|
|
554
|
-
|
|
592
|
+
default: B(() => [
|
|
593
|
+
k(R(X), {
|
|
555
594
|
title: p.value ? R(c).t("module.dunning_case.bulk_send.title") : R(c).t("module.dunning_case.bulk_send.confirm_question", { count: m.value }),
|
|
556
595
|
description: R(c).t("module.dunning_case.bulk_send.description"),
|
|
557
596
|
"has-separator": !1,
|
|
@@ -561,8 +600,8 @@ var Ye = /* @__PURE__ */ k({
|
|
|
561
600
|
"description",
|
|
562
601
|
"icon"
|
|
563
602
|
]),
|
|
564
|
-
|
|
565
|
-
default:
|
|
603
|
+
k(R(K), null, {
|
|
604
|
+
default: B(() => [f.value === null ? (P(), D("p", at, L(R(c).t("module.dunning_case.bulk_send.loading")), 1)) : (P(), T(it, {
|
|
566
605
|
key: 1,
|
|
567
606
|
"processable-count": f.value.meta.processed,
|
|
568
607
|
"skipped-count": f.value.meta.skipped,
|
|
@@ -574,8 +613,8 @@ var Ye = /* @__PURE__ */ k({
|
|
|
574
613
|
]))]),
|
|
575
614
|
_: 1
|
|
576
615
|
}),
|
|
577
|
-
|
|
578
|
-
right:
|
|
616
|
+
k(R(q), { "has-separator": !1 }, {
|
|
617
|
+
right: B(() => [k(R(J)), k(R(Y), {
|
|
579
618
|
"icon-right": R(d),
|
|
580
619
|
"is-disabled": p.value || m.value === 0,
|
|
581
620
|
"is-loading": R(_).isSubmitting.value,
|
|
@@ -594,18 +633,18 @@ var Ye = /* @__PURE__ */ k({
|
|
|
594
633
|
_: 1
|
|
595
634
|
}, 8, ["form"]));
|
|
596
635
|
}
|
|
597
|
-
}),
|
|
636
|
+
}), st = { class: "flex min-h-0 flex-1 flex-col gap-xl px-3xl py-xl" }, ct = { class: "flex shrink-0 flex-col gap-lg md:flex-row md:items-center md:justify-between" }, lt = { class: "text-lg font-semibold text-primary" }, ut = { class: "mt-xs text-sm text-secondary" }, dt = { class: "flex items-center gap-sm" }, ft = {
|
|
598
637
|
key: 0,
|
|
599
638
|
class: "shrink-0"
|
|
600
|
-
},
|
|
639
|
+
}, pt = { class: "flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-secondary bg-primary shadow-sm" }, mt = { class: "flex flex-col gap-md border-b border-secondary p-sm md:flex-row md:items-center md:justify-between" }, ht = { class: "flex items-center justify-between gap-md border-b border-secondary p-sm" }, gt = {
|
|
601
640
|
key: 0,
|
|
602
641
|
class: "px-sm text-xs text-secondary"
|
|
603
|
-
},
|
|
642
|
+
}, _t = { class: "relative flex min-h-0 flex-1 flex-col" }, vt = /*@__PURE__*/ A({
|
|
604
643
|
__name: "DunningCaseOverviewView",
|
|
605
644
|
setup(e) {
|
|
606
|
-
let n =
|
|
645
|
+
let n = S(), i = he(), a = ge(), o = H(), l = t(), f = r(), m = g(), h = F("all"), _ = w(() => [
|
|
607
646
|
{
|
|
608
|
-
icon:
|
|
647
|
+
icon: s,
|
|
609
648
|
key: "all",
|
|
610
649
|
label: n.t("module.dunning_case.overview.filter_all")
|
|
611
650
|
},
|
|
@@ -624,67 +663,80 @@ var Ye = /* @__PURE__ */ k({
|
|
|
624
663
|
key: "level-3",
|
|
625
664
|
label: n.t("module.dunning_case.level.reminder", { level: 3 })
|
|
626
665
|
}
|
|
627
|
-
]),
|
|
628
|
-
|
|
629
|
-
let { hasLevelCountError:
|
|
630
|
-
customerUuid:
|
|
631
|
-
activeLevel:
|
|
632
|
-
}),
|
|
633
|
-
function
|
|
634
|
-
i.create(
|
|
666
|
+
]), ee = w(() => h.value === "all" ? null : Number(h.value.replace("level-", ""))), y = F(!0), { customerUuid: b, filters: x } = Ie();
|
|
667
|
+
te(x), l.set(() => n.t("module.dunning_case.title"));
|
|
668
|
+
let { hasLevelCountError: ie, isFetchingNextPage: A, isLoading: j, data: M, error: ae, fetchNextPage: N, levelCounts: z, levelCountTotal: oe, trackBulkSend: V } = Pe({
|
|
669
|
+
customerUuid: b,
|
|
670
|
+
activeLevel: ee
|
|
671
|
+
}), U = w(() => x.activeFilters.value.length);
|
|
672
|
+
function W(e) {
|
|
673
|
+
i.create(v, { props: { dunningCaseUuid: e.uuid } }).open();
|
|
635
674
|
}
|
|
636
|
-
function
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
675
|
+
async function K(e) {
|
|
676
|
+
if (e.latestCreatedReminder === null) return;
|
|
677
|
+
let t = await m.execute({ params: { dunningCaseReminderUuid: e.latestCreatedReminder.uuid } });
|
|
678
|
+
if (t.isErr()) {
|
|
679
|
+
a.apiError(t.error);
|
|
680
|
+
return;
|
|
681
|
+
}
|
|
682
|
+
a.show({
|
|
683
|
+
duration: Infinity,
|
|
684
|
+
message: n.t("module.dunning_case.retry.success", { customer: e.customer.name })
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
function q() {
|
|
688
|
+
i.create(ot, { props: { onSent: V() } }).open();
|
|
640
689
|
}
|
|
641
|
-
function
|
|
642
|
-
let t =
|
|
643
|
-
t !== null &&
|
|
690
|
+
function J(e) {
|
|
691
|
+
let t = f.getCustomerDetailRoute(e.customer.uuid);
|
|
692
|
+
t !== null && o.push(t);
|
|
644
693
|
}
|
|
645
|
-
function
|
|
694
|
+
function Y(e) {
|
|
646
695
|
return {
|
|
647
696
|
name: "dunning-case-detail",
|
|
648
697
|
params: { dunningCaseUuid: e.uuid }
|
|
649
698
|
};
|
|
650
699
|
}
|
|
651
|
-
let
|
|
652
|
-
|
|
653
|
-
|
|
700
|
+
let X = be(), ce = ye(), Z = Ze({
|
|
701
|
+
onRetry: (e) => {
|
|
702
|
+
K(e);
|
|
703
|
+
},
|
|
704
|
+
onSend: W,
|
|
705
|
+
onViewCustomer: J
|
|
654
706
|
});
|
|
655
|
-
return (e, t) => (P(),
|
|
707
|
+
return (e, t) => (P(), T(R(se), {
|
|
656
708
|
title: R(n).t("module.dunning_case.title"),
|
|
657
709
|
"is-title-hidden": !0
|
|
658
710
|
}, {
|
|
659
|
-
default:
|
|
660
|
-
|
|
661
|
-
"icon-left":
|
|
662
|
-
label: R(n).t(
|
|
711
|
+
default: B(() => [O("div", st, [
|
|
712
|
+
O("div", ct, [O("div", null, [O("h2", lt, L(R(n).t("module.dunning_case.title")), 1), O("p", ut, L(R(n).t("module.dunning_case.overview.description")), 1)]), O("div", dt, [k(R(G), {
|
|
713
|
+
"icon-left": y.value ? R(p) : R(c),
|
|
714
|
+
label: R(n).t(y.value ? "module.dunning_case.overview.hide_metrics" : "module.dunning_case.overview.show_metrics"),
|
|
663
715
|
variant: "secondary",
|
|
664
|
-
onClick: t[0] ||= (e) =>
|
|
665
|
-
}, null, 8, ["icon-left", "label"]),
|
|
716
|
+
onClick: t[0] ||= (e) => y.value = !y.value
|
|
717
|
+
}, null, 8, ["icon-left", "label"]), k(R(G), {
|
|
666
718
|
"icon-right": R(d),
|
|
667
719
|
label: R(n).t("module.dunning_case.overview.send_all"),
|
|
668
|
-
onClick:
|
|
720
|
+
onClick: q
|
|
669
721
|
}, null, 8, ["icon-right", "label"])])]),
|
|
670
|
-
|
|
671
|
-
"has-level-count-error": R(
|
|
672
|
-
"level-counts": R(
|
|
673
|
-
"level-count-total": R(
|
|
722
|
+
y.value ? (P(), D("div", ft, [k(je, {
|
|
723
|
+
"has-level-count-error": R(ie),
|
|
724
|
+
"level-counts": R(z),
|
|
725
|
+
"level-count-total": R(oe)
|
|
674
726
|
}, null, 8, [
|
|
675
727
|
"has-level-count-error",
|
|
676
728
|
"level-counts",
|
|
677
729
|
"level-count-total"
|
|
678
|
-
])])) :
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
modelValue:
|
|
682
|
-
"onUpdate:modelValue": t[1] ||= (e) =>
|
|
730
|
+
])])) : E("", !0),
|
|
731
|
+
O("div", pt, [
|
|
732
|
+
O("div", mt, [k(R(de), {
|
|
733
|
+
modelValue: h.value,
|
|
734
|
+
"onUpdate:modelValue": t[1] ||= (e) => h.value = e,
|
|
683
735
|
"aria-label": R(n).t("module.dunning_case.overview.filter_label"),
|
|
684
736
|
variant: "button-border"
|
|
685
737
|
}, {
|
|
686
|
-
default:
|
|
687
|
-
default:
|
|
738
|
+
default: B(() => [k(R(pe), null, {
|
|
739
|
+
default: B(() => [(P(!0), D(C, null, I(_.value, (e) => (P(), T(R(fe), {
|
|
688
740
|
key: e.key,
|
|
689
741
|
config: { left: {
|
|
690
742
|
icon: e.icon,
|
|
@@ -700,31 +752,31 @@ var Ye = /* @__PURE__ */ k({
|
|
|
700
752
|
_: 1
|
|
701
753
|
})]),
|
|
702
754
|
_: 1
|
|
703
|
-
}, 8, ["modelValue", "aria-label"]),
|
|
755
|
+
}, 8, ["modelValue", "aria-label"]), k(R(G), {
|
|
704
756
|
"icon-right": R(d),
|
|
705
757
|
label: R(n).t("module.dunning_case.overview.send_all"),
|
|
706
758
|
size: "sm",
|
|
707
|
-
onClick:
|
|
759
|
+
onClick: q
|
|
708
760
|
}, null, 8, ["icon-right", "label"])]),
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
"active-filter-count":
|
|
712
|
-
columns: R(
|
|
713
|
-
data: R(
|
|
714
|
-
error: R(
|
|
761
|
+
O("div", ht, [U.value === 0 ? (P(), D("p", gt, L(R(n).t("module.dunning_case.overview.no_active_filters")), 1)) : (P(), T(R(ne), { key: 1 })), k(R(re))]),
|
|
762
|
+
O("div", _t, [k(R(le), {
|
|
763
|
+
"active-filter-count": U.value,
|
|
764
|
+
columns: R(Z),
|
|
765
|
+
data: R(M),
|
|
766
|
+
error: R(ae),
|
|
715
767
|
"get-key": (e) => e.uuid,
|
|
716
|
-
actions: [R(
|
|
768
|
+
actions: [R(X), R(ce)],
|
|
717
769
|
"get-action-model": (e) => ({
|
|
718
770
|
key: e.uuid,
|
|
719
771
|
modelName: "DunningCase",
|
|
720
772
|
...e
|
|
721
773
|
}),
|
|
722
|
-
"get-link":
|
|
723
|
-
"is-fetching-next-page": R(
|
|
724
|
-
"is-loading": R(
|
|
774
|
+
"get-link": Y,
|
|
775
|
+
"is-fetching-next-page": R(A),
|
|
776
|
+
"is-loading": R(j),
|
|
725
777
|
variant: "full-page",
|
|
726
|
-
onClearFilters: t[2] ||= (e) => R(
|
|
727
|
-
onNextPage: R(
|
|
778
|
+
onClearFilters: t[2] ||= (e) => R(x).clearAll(),
|
|
779
|
+
onNextPage: R(N)
|
|
728
780
|
}, null, 8, [
|
|
729
781
|
"active-filter-count",
|
|
730
782
|
"columns",
|
|
@@ -742,6 +794,6 @@ var Ye = /* @__PURE__ */ k({
|
|
|
742
794
|
_: 1
|
|
743
795
|
}, 8, ["title"]));
|
|
744
796
|
}
|
|
745
|
-
}),
|
|
797
|
+
}), yt = /* @__PURE__ */ e({ default: () => bt }), bt = vt;
|
|
746
798
|
//#endregion
|
|
747
|
-
export {
|
|
799
|
+
export { yt as n, $ as r, bt as t };
|