@wisemen/wise-invoicing-web 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/{ApprovalReminderSettingsViewDataProvider-BnHeEMZD.js → ApprovalReminderSettingsViewDataProvider-HANaeRzK.js} +3 -3
  2. package/dist/{BillingDocumentDetailViewDataProvider-Dm8C5WNN.js → BillingDocumentDetailViewDataProvider-BVrmLEP5.js} +9 -14
  3. package/dist/{BillingDocumentPdf-57ksqoPW.js → BillingDocumentPdf-BLlJw5Wp.js} +3 -3
  4. package/dist/{CreditNoteDetailViewDataProvider-CC4gnwSN.js → CreditNoteDetailViewDataProvider-CnmNQyXq.js} +6 -6
  5. package/dist/{CreditNotePdfViewDataProvider-C9vgN3kV.js → CreditNotePdfViewDataProvider-Bu8lNWSx.js} +3 -3
  6. package/dist/{CustomFieldValueText-CvWq0fl_.js → CustomFieldValueText-DX_7bMFM.js} +2 -2
  7. package/dist/{DunningCaseSendDialog-CfWSrquA.js → DunningCaseSendDialog-D5_uNt0g.js} +12 -12
  8. package/dist/{InvoiceApprovalOutOfSyncIndicator-CKLAraIU.js → InvoiceApprovalOutOfSyncIndicator-CX7hLBIC.js} +1 -1
  9. package/dist/{InvoiceApprovalOverviewView-DpL-vV8_.js → InvoiceApprovalOverviewView-1pLrgcIU.js} +6 -6
  10. package/dist/{InvoiceApprovalStatusBadge-oVWkCqZY.js → InvoiceApprovalStatusBadge-DqsSuo4M.js} +2 -2
  11. package/dist/{InvoiceApproveDialogDataProvider-serNDdl9.js → InvoiceApproveDialogDataProvider-D22o3mIC.js} +6 -6
  12. package/dist/{InvoiceDetailViewDataProvider-BaT7fgsi.js → InvoiceDetailViewDataProvider-DoqOGDZb.js} +14 -14
  13. package/dist/{InvoicePdfView-MaBnd78V.js → InvoicePdfView-Df9masUV.js} +1 -1
  14. package/dist/{InvoicePdfViewDataProvider-BIHBY608.js → InvoicePdfViewDataProvider-CKCp0TJ7.js} +3 -3
  15. package/dist/{InvoicePublicProFormaPdfViewDataProvider-KY8pN59k.js → InvoicePublicProFormaPdfViewDataProvider-CqAP9Ckj.js} +3 -3
  16. package/dist/{InvoicingFileUploadProvider-CxmF68sz.js → InvoicingFileUploadProvider-Da_JGESE.js} +9 -9
  17. package/dist/IssuerSettingsViewDataProvider-xXQEED2s.js +544 -0
  18. package/dist/{PeppolSettingsViewDataProvider-C7lwtu7n.js → PeppolSettingsViewDataProvider-B4Hu1RQk.js} +4 -4
  19. package/dist/{api.util-Ct8FnoLB.js → api.util-DpWaDY5y.js} +671 -587
  20. package/dist/{billingDocumentDetail.transformer-B3ypgtIv.js → billingDocumentDetail.transformer-BJQFbO87.js} +1 -1
  21. package/dist/client/index.d.ts +2 -2
  22. package/dist/client/sdk.gen.d.ts +3 -1
  23. package/dist/client/types.gen.d.ts +84 -0
  24. package/dist/client/zod.gen.d.ts +2236 -886
  25. package/dist/{creditNoteDetail.query-C2BYvPKC.js → creditNoteDetail.query-BVXYLSMf.js} +18 -18
  26. package/dist/{i18n.lib-8sQYo5_y.js → i18n.lib-Be2_Gg1d.js} +24 -0
  27. package/dist/index.d.ts +24 -0
  28. package/dist/index.js +905 -790
  29. package/dist/{invoice.service-CtePUw1R.js → invoice.service-Dugf3vP3.js} +110 -104
  30. package/dist/{invoiceApproval.service-CQzG8_wX.js → invoiceApproval.service-TTtH_nbV.js} +2 -2
  31. package/dist/{invoiceApprovalStatus.util-C4su45dU.js → invoiceApprovalStatus.util-BebJpPKg.js} +1 -1
  32. package/dist/{invoiceCustomer.service-CzbM3ey1.js → invoiceCustomer.service-BgaMvr34.js} +6 -6
  33. package/dist/{invoiceDetail.query-NNAoIuWN.js → invoiceDetail.query-DaY-Dwp4.js} +1 -1
  34. package/dist/{invoiceIndexCache.util-DI0WM-eW.js → invoiceIndexCache.util-8JQCyWbl.js} +2 -2
  35. package/dist/{invoicingConfig.composable-DXJ71Uq_.js → invoicingConfig.composable-DQTYsGa7.js} +2 -2
  36. package/dist/{issuerSettings.query-ggEHdk0S.js → issuerSettings.query-mMH2f5g6.js} +1 -1
  37. package/dist/libs/i18n.lib.d.ts +24 -0
  38. package/dist/locales/en-US.json.d.ts +12 -0
  39. package/dist/locales/nl-BE.json.d.ts +12 -0
  40. package/dist/modules/invoice/api/mutations/invoiceBulkDelete.mutation.d.ts +5 -0
  41. package/dist/modules/invoice/api/services/invoice.service.d.ts +3 -1
  42. package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewBulkActionBar.vue.d.ts +3 -0
  43. package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkActionDialog.vue.d.ts +1 -0
  44. package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkDeleteDialog.vue.d.ts +14 -0
  45. package/dist/{reminderConfig.query-C2xT3DJH.js → reminderConfig.query-Dn0_h7xY.js} +14 -14
  46. package/package.json +1 -1
  47. package/dist/IssuerSettingsViewDataProvider-DJzVZS8Q.js +0 -543
package/dist/index.js CHANGED
@@ -1,53 +1,53 @@
1
- import { n as e, r as t, t as n } from "./i18n.lib-8sQYo5_y.js";
2
- import { lt as r, t as i } from "./api.util-Ct8FnoLB.js";
1
+ import { n as e, r as t, t as n } from "./i18n.lib-Be2_Gg1d.js";
2
+ import { dt as r, t as i } from "./api.util-DpWaDY5y.js";
3
3
  import { A as a, N as o, T as s, _ as c, a as l, b as u, c as d, d as f, k as p, l as m, m as h, o as g, t as _, u as v, v as y, x as b, y as x } from "./documentTitle.composable-BqZWKGw1.js";
4
4
  import { n as S, r as C, t as w } from "./useCurrencyFormat.composable-MtZaqKnO.js";
5
- import { n as ee, t as te } from "./invoicingConfig.composable-DXJ71Uq_.js";
5
+ import { n as ee, t as te } from "./invoicingConfig.composable-DQTYsGa7.js";
6
6
  import { t as ne } from "./search.composable-CU9OpyUB.js";
7
7
  import { n as re, t as ie } from "./src-Vz2dm4sM.js";
8
- import { t as T } from "./invoice.service-CtePUw1R.js";
8
+ import { t as T } from "./invoice.service-Dugf3vP3.js";
9
9
  import { n as ae, t as oe } from "./address.transformer-jGddczLV.js";
10
10
  import { t as se } from "./addressForm.model-C853zEtX.js";
11
- import { a as ce, i as le, n as ue, r as de, t as fe } from "./CustomFieldValueText-CvWq0fl_.js";
11
+ import { a as ce, i as le, n as ue, r as de, t as fe } from "./CustomFieldValueText-DX_7bMFM.js";
12
12
  import { n as pe, t as me } from "./download.util-LyRpGWKA.js";
13
- import { i as he, n as ge, r as E, t as _e } from "./reminderConfig.query-C2xT3DJH.js";
14
- import { n as ve, r as ye, t as be } from "./plainDate.transformer-Bhiz9jW7.js";
13
+ import { i as he, n as ge, r as _e, t as ve } from "./reminderConfig.query-Dn0_h7xY.js";
14
+ import { n as E, r as ye, t as be } from "./plainDate.transformer-Bhiz9jW7.js";
15
15
  import { n as xe, t as Se } from "./percentage.util-Bl78kSSk.js";
16
- import { Ct as Ce, F as we, L as Te, N as Ee, P as De, Q as Oe, Tt as D, W as ke, ct as Ae, d as je, dt as Me, i as Ne, it as Pe, l as Fe, lt as Ie, mt as Le, nt as Re, rt as ze, u as Be, xt as Ve } from "./dist-BMzyJZTx.js";
17
- import { a as He, i as Ue, n as We, o as Ge, r as Ke, s as qe, t as Je } from "./DunningCaseSendDialog-CfWSrquA.js";
18
- import { n as Ye, t as Xe } from "./customerUuid.model-ClN4Vi9n.js";
19
- import { n as Ze, r as Qe } from "./dist-Cdbpkd3Y.js";
20
- import { t as $e } from "./DataProvider-BtnD-BzI.js";
21
- import { a as et, c as tt, d as nt, f as rt, i as it, l as at, n as ot, o as st, r as ct, s as lt, t as ut, u as dt } from "./dist-BZgvL8_m.js";
22
- import { t as ft } from "./formango.util-D5c2ql--.js";
23
- import { t as pt } from "./invoiceApprovalStatus.util-C4su45dU.js";
24
- import { n as mt, t as ht } from "./InvoiceApprovalOutOfSyncIndicator-CKLAraIU.js";
25
- import { a as gt, i as _t, n as vt, o as yt, r as bt, t as xt } from "./invoiceIndexCache.util-DI0WM-eW.js";
26
- import { t as St } from "./InvoiceApprovalStatusBadge-oVWkCqZY.js";
27
- import { t as Ct } from "./issuerSettings.query-ggEHdk0S.js";
28
- import { t as wt } from "./dashboard-BaWGNEek.js";
29
- import { t as Tt } from "./InvoicePdfView-MaBnd78V.js";
16
+ import { Ct as Ce, F as we, L as Te, M as Ee, N as De, P as Oe, Q as ke, Tt as D, W as Ae, ct as je, d as Me, dt as Ne, i as Pe, it as Fe, l as Ie, lt as Le, mt as Re, nt as ze, rt as Be, u as Ve, xt as He } from "./dist-BMzyJZTx.js";
17
+ import { a as Ue, i as We, n as Ge, o as Ke, r as qe, s as Je, t as Ye } from "./DunningCaseSendDialog-D5_uNt0g.js";
18
+ import { n as Xe, t as Ze } from "./customerUuid.model-ClN4Vi9n.js";
19
+ import { n as Qe, r as $e } from "./dist-Cdbpkd3Y.js";
20
+ import { t as et } from "./DataProvider-BtnD-BzI.js";
21
+ import { a as tt, c as nt, d as rt, f as it, i as at, l as ot, n as st, o as ct, r as lt, s as ut, t as dt, u as ft } from "./dist-BZgvL8_m.js";
22
+ import { t as pt } from "./formango.util-D5c2ql--.js";
23
+ import { t as mt } from "./invoiceApprovalStatus.util-BebJpPKg.js";
24
+ import { n as ht, t as gt } from "./InvoiceApprovalOutOfSyncIndicator-CX7hLBIC.js";
25
+ import { a as _t, i as vt, n as yt, o as bt, r as xt, t as St } from "./invoiceIndexCache.util-8JQCyWbl.js";
26
+ import { t as Ct } from "./InvoiceApprovalStatusBadge-DqsSuo4M.js";
27
+ import { t as wt } from "./issuerSettings.query-mMH2f5g6.js";
28
+ import { t as Tt } from "./dashboard-BaWGNEek.js";
29
+ import { t as Et } from "./InvoicePdfView-Df9masUV.js";
30
30
  import { z as O } from "zod";
31
31
  import { useI18n as k } from "vue-i18n";
32
- import { Fragment as A, computed as j, createBlock as M, createCommentVNode as N, createElementBlock as P, createElementVNode as F, createTextVNode as I, createVNode as L, defineComponent as R, isRef as Et, mergeModels as Dt, mergeProps as Ot, nextTick as kt, normalizeClass as z, normalizeStyle as At, onMounted as jt, onUnmounted as Mt, openBlock as B, ref as V, renderList as H, renderSlot as Nt, resolveDynamicComponent as Pt, shallowRef as Ft, toDisplayString as U, toValue as It, unref as W, useModel as Lt, watch as Rt, withCtx as G, withKeys as zt, withModifiers as Bt } from "vue";
33
- import { useQueryClient as Vt } from "@tanstack/vue-query";
34
- import { QueryClient as Ht, SortUtil as Ut, useMutation as Wt, useOffsetInfiniteQuery as Gt, useQuery as Kt } from "@wisemen/vue-core-api-utils";
35
- import { useLocalStorage as qt, watchDebounced as Jt } from "@vueuse/core";
36
- import { RouterLink as Yt, useRouter as Xt } from "vue-router";
32
+ import { Fragment as A, computed as j, createBlock as M, createCommentVNode as N, createElementBlock as P, createElementVNode as F, createTextVNode as I, createVNode as L, defineComponent as R, isRef as Dt, mergeModels as Ot, mergeProps as kt, nextTick as At, normalizeClass as z, normalizeStyle as jt, onMounted as Mt, onUnmounted as Nt, openBlock as B, ref as V, renderList as H, renderSlot as Pt, resolveDynamicComponent as Ft, shallowRef as It, toDisplayString as U, toValue as Lt, unref as W, useModel as Rt, watch as zt, withCtx as G, withKeys as Bt, withModifiers as Vt } from "vue";
33
+ import { useQueryClient as Ht } from "@tanstack/vue-query";
34
+ import { QueryClient as Ut, SortUtil as Wt, useMutation as Gt, useOffsetInfiniteQuery as Kt, useQuery as qt } from "@wisemen/vue-core-api-utils";
35
+ import { useLocalStorage as Jt, watchDebounced as Yt } from "@vueuse/core";
36
+ import { RouterLink as Xt, useRouter as Zt } from "vue-router";
37
37
  import { Temporal as K } from "temporal-polyfill";
38
- import { UIAutocomplete as Zt, UIBadge as Qt, UIButton as q, UIColumnLayout as J, UIDashboardPage as $t, UIDashboardPageActions as en, UIDashboardPageContent as tn, UIDashboardPageLoadingState as nn, UIDateRangePicker as rn, UIDetailListGroup as an, UIDetailListGroupSeparator as on, UIDialog as sn, UIDialogBody as cn, UIDialogFooter as ln, UIDialogFooterCancel as un, UIDialogFooterPrimary as dn, UIDialogFooterSubmit as fn, UIDialogHeader as pn, UIEmptyState as mn, UIFeaturedIcon as hn, UIForm as gn, UIFormDialog as _n, UILoader as vn, UINumberField as yn, UIPopover as bn, UIRowLayout as Y, UISelect as xn, UITable as Sn, UITableCell as X, UITableCellInteractiveElement as Cn, UITableCellText as wn, UITabs as Tn, UITabsItem as En, UITabsList as Dn, UIText as Z, UITextField as On, UITextareaField as kn, UIThemeProvider as An, UITooltip as jn, UITooltipContent as Mn, createAutocompleteOptions as Nn, createComponent as Q, createSelectOptions as Pn, defineTableColumns as Fn, useOverlay as In, useSort as Ln, useTableCustomizeColumns as Rn, useToast as zn } from "@wisemen/vue-core-design-system";
39
- import { createAction as Bn, useViewModels as Vn } from "@wisemen/vue-core-actions";
40
- import { useForm as Hn } from "formango";
41
- import { useRouteQuery as Un } from "@vueuse/router";
38
+ import { UIAutocomplete as Qt, UIBadge as $t, UIButton as q, UIColumnLayout as J, UIDashboardPage as en, UIDashboardPageActions as tn, UIDashboardPageContent as nn, UIDashboardPageLoadingState as rn, UIDateRangePicker as an, UIDetailListGroup as on, UIDetailListGroupSeparator as sn, UIDialog as cn, UIDialogBody as ln, UIDialogFooter as un, UIDialogFooterCancel as dn, UIDialogFooterPrimary as fn, UIDialogFooterSubmit as pn, UIDialogHeader as mn, UIEmptyState as hn, UIFeaturedIcon as gn, UIForm as _n, UIFormDialog as vn, UILoader as yn, UINumberField as bn, UIPopover as xn, UIRowLayout as Y, UISelect as Sn, UITable as Cn, UITableCell as X, UITableCellInteractiveElement as wn, UITableCellText as Tn, UITabs as En, UITabsItem as Dn, UITabsList as On, UIText as Z, UITextField as kn, UITextareaField as An, UIThemeProvider as jn, UITooltip as Mn, UITooltipContent as Nn, createAutocompleteOptions as Pn, createComponent as Q, createSelectOptions as Fn, defineTableColumns as In, useOverlay as Ln, useSort as Rn, useTableCustomizeColumns as zn, useToast as Bn } from "@wisemen/vue-core-design-system";
39
+ import { createAction as Vn, useViewModels as Hn } from "@wisemen/vue-core-actions";
40
+ import { useForm as Un } from "formango";
41
+ import { useRouteQuery as Wn } from "@vueuse/router";
42
42
  //#region \0rolldown/runtime.js
43
- var Wn = Object.defineProperty, Gn = (e, t) => {
43
+ var Gn = Object.defineProperty, Kn = (e, t) => {
44
44
  let n = {};
45
- for (var r in e) Wn(n, r, {
45
+ for (var r in e) Gn(n, r, {
46
46
  get: e[r],
47
47
  enumerable: !0
48
48
  });
49
- return t || Wn(n, Symbol.toStringTag, { value: "Module" }), n;
50
- }, Kn = {
49
+ return t || Gn(n, Symbol.toStringTag, { value: "Module" }), n;
50
+ }, qn = {
51
51
  "component.api_error.default_message": "An unexpected error occurred.",
52
52
  "component.api_error.default_title": "Error",
53
53
  "component.autocomplete.more_results_available": "More results may be available. Narrow your search criteria.",
@@ -109,7 +109,7 @@ var Wn = Object.defineProperty, Gn = (e, t) => {
109
109
  "shared.clear": "Clear",
110
110
  "shared.close": "Close",
111
111
  "shared.options": "Options"
112
- }, qn = {
112
+ }, Jn = {
113
113
  "component.api_error.default_message": "Er is een onverwachte fout opgetreden.",
114
114
  "component.api_error.default_title": "Fout",
115
115
  "component.autocomplete.more_results_available": "Er zijn mogelijk meer resultaten beschikbaar. Verfijn uw zoekcriteria.",
@@ -174,13 +174,13 @@ var Wn = Object.defineProperty, Gn = (e, t) => {
174
174
  };
175
175
  //#endregion
176
176
  //#region src/composables/created.composable.ts
177
- function Jn(e) {
177
+ function Yn(e) {
178
178
  e();
179
179
  }
180
180
  //#endregion
181
181
  //#region src/composables/invoicingQueryInvalidation.composable.ts
182
- function Yn() {
183
- let e = new Ht(Vt());
182
+ function Xn() {
183
+ let e = new Ut(Ht());
184
184
  async function t() {
185
185
  await e.invalidate("invoiceIndex");
186
186
  }
@@ -188,20 +188,20 @@ function Yn() {
188
188
  }
189
189
  //#endregion
190
190
  //#region src/modules/credit-note/models/creditNoteUuid.model.ts
191
- var Xn = O.uuid().brand("CreditNoteUuid");
191
+ var Zn = O.uuid().brand("CreditNoteUuid");
192
192
  //#endregion
193
193
  //#region src/modules/dunning-case/api/queries/dunningCaseIndex.query.ts
194
- function Zn(e) {
194
+ function Qn(e) {
195
195
  let t = j(() => ({
196
196
  customerUuid: e.params.customerUuid?.value,
197
197
  isOpen: e.params.isOpen?.value,
198
198
  dunningCaseUuids: e.params.dunningCaseUuids?.value,
199
199
  level: e.params.level?.value
200
200
  }));
201
- return Gt("dunningCaseIndex", {
201
+ return Kt("dunningCaseIndex", {
202
202
  isEnabled: j(() => e.isEnabled?.value ?? !0),
203
203
  params: { queryParams: t },
204
- queryFn: (e) => E.getAll({
204
+ queryFn: (e) => _e.getAll({
205
205
  ...t.value,
206
206
  pagination: e
207
207
  })
@@ -209,26 +209,26 @@ function Zn(e) {
209
209
  }
210
210
  //#endregion
211
211
  //#region src/modules/dunning-case/api/queries/dunningCaseCustomerByExternalId.query.ts
212
- function Qn(e) {
213
- return Kt("dunningCaseCustomerByExternalId", {
212
+ function $n(e) {
213
+ return qt("dunningCaseCustomerByExternalId", {
214
214
  isEnabled: j(() => e.value !== null),
215
215
  params: { externalId: e },
216
- queryFn: () => qe.getUuidByExternalId(e.value ?? "")
216
+ queryFn: () => Je.getUuidByExternalId(e.value ?? "")
217
217
  });
218
218
  }
219
219
  //#endregion
220
220
  //#region src/modules/dunning-case/use-cases/customer/components/CustomerDunningCasesSection.vue?vue&type=script&setup=true&lang.ts
221
- var $n = { class: "min-w-0 flex-1" }, er = { class: "flex min-w-0 flex-wrap items-center gap-sm" }, tr = { class: "truncate text-xs font-semibold text-primary" }, nr = {
221
+ var er = { class: "min-w-0 flex-1" }, tr = { class: "flex min-w-0 flex-wrap items-center gap-sm" }, nr = { class: "truncate text-xs font-semibold text-primary" }, rr = {
222
222
  key: 0,
223
223
  class: "inline-flex shrink-0 items-center gap-xs rounded-sm border border-secondary px-sm py-px text-xs text-primary"
224
- }, rr = { class: "mt-xxs block truncate text-xs text-secondary tabular-nums" }, ir = /* @__PURE__ */ R({
224
+ }, ir = { class: "mt-xxs block truncate text-xs text-secondary tabular-nums" }, ar = /* @__PURE__ */ R({
225
225
  __name: "CustomerDunningCasesSection",
226
226
  props: {
227
227
  customerUuid: {},
228
228
  externalId: {}
229
229
  },
230
230
  setup(e) {
231
- let t = e, n = k(), r = C(), i = Qn(j(() => t.customerUuid === void 0 ? t.externalId ?? null : null)), a = j(() => t.customerUuid === void 0 ? i.result.value.isOk() ? i.result.value.getValue() ?? void 0 : void 0 : t.customerUuid), o = Zn({
231
+ let t = e, n = k(), r = C(), i = $n(j(() => t.customerUuid === void 0 ? t.externalId ?? null : null)), a = j(() => t.customerUuid === void 0 ? i.result.value.isOk() ? i.result.value.getValue() ?? void 0 : void 0 : t.customerUuid), o = Qn({
232
232
  isEnabled: j(() => a.value !== void 0),
233
233
  params: {
234
234
  customerUuid: a,
@@ -238,7 +238,7 @@ var $n = { class: "min-w-0 flex-1" }, er = { class: "flex min-w-0 flex-wrap item
238
238
  function c(e) {
239
239
  return e === 0 ? n.t("module.dunning_case.level.none") : n.t("module.dunning_case.level.reminder", { level: e });
240
240
  }
241
- return (e, t) => s.value === null ? N("", !0) : (B(), P(A, { key: 0 }, [L(W(on)), L(W(an), {
241
+ return (e, t) => s.value === null ? N("", !0) : (B(), P(A, { key: 0 }, [L(W(sn)), L(W(on), {
242
242
  "collapse-options": {
243
243
  isCollapsible: !0,
244
244
  isOpenByDefault: !0,
@@ -246,80 +246,80 @@ var $n = { class: "min-w-0 flex-1" }, er = { class: "flex min-w-0 flex-wrap item
246
246
  },
247
247
  label: W(n).t("module.dunning_case.customer.title")
248
248
  }, {
249
- default: G(() => [L(W(Yt), {
249
+ default: G(() => [L(W(Xt), {
250
250
  to: {
251
251
  name: "dunning-case-detail",
252
252
  params: { dunningCaseUuid: s.value.uuid }
253
253
  },
254
254
  class: "flex w-full items-center gap-md rounded-lg border border-secondary bg-primary p-lg transition-colors hover:bg-secondary"
255
255
  }, {
256
- default: G(() => [L(W(hn), {
256
+ default: G(() => [L(W(gn), {
257
257
  icon: W(we),
258
258
  color: "brand",
259
259
  size: "md",
260
260
  variant: "translucent"
261
- }, null, 8, ["icon"]), F("span", $n, [F("span", er, [F("span", tr, U(W(n).t("module.dunning_case.customer.open_case")), 1), s.value.level === null ? N("", !0) : (B(), P("span", nr, [L(ge, {
261
+ }, null, 8, ["icon"]), F("span", er, [F("span", tr, [F("span", nr, U(W(n).t("module.dunning_case.customer.open_case")), 1), s.value.level === null ? N("", !0) : (B(), P("span", rr, [L(ge, {
262
262
  level: s.value.level,
263
263
  size: "sm"
264
- }, null, 8, ["level"]), I(" " + U(c(s.value.level)), 1)]))]), F("span", rr, U(W(n).t("module.dunning_case.customer.outstanding", { amount: W(r).formatMonetary(s.value.outstandingBalance) })), 1)])]),
264
+ }, null, 8, ["level"]), I(" " + U(c(s.value.level)), 1)]))]), F("span", ir, U(W(n).t("module.dunning_case.customer.outstanding", { amount: W(r).formatMonetary(s.value.outstandingBalance) })), 1)])]),
265
265
  _: 1
266
266
  }, 8, ["to"])]),
267
267
  _: 1
268
268
  }, 8, ["collapse-options", "label"])], 64));
269
269
  }
270
- }), ar = { class: "flex flex-col gap-4xl" }, or = { class: "flex flex-col gap-lg lg:flex-row lg:items-start lg:justify-between" }, sr = { class: "flex flex-wrap items-center gap-sm" }, cr = { class: "text-lg font-semibold text-primary" }, lr = { key: 1 }, ur = { class: "inline-flex items-center gap-xs rounded-sm border border-secondary px-sm py-px text-xs text-primary" }, dr = {
270
+ }), or = { class: "flex flex-col gap-4xl" }, sr = { class: "flex flex-col gap-lg lg:flex-row lg:items-start lg:justify-between" }, cr = { class: "flex flex-wrap items-center gap-sm" }, lr = { class: "text-lg font-semibold text-primary" }, ur = { key: 1 }, dr = { class: "inline-flex items-center gap-xs rounded-sm border border-secondary px-sm py-px text-xs text-primary" }, fr = {
271
271
  key: 0,
272
272
  class: "mt-xs text-xs text-secondary"
273
- }, fr = { class: "mt-xxs text-xs text-secondary" }, pr = { class: "grid grid-cols-1 gap-3xl md:grid-cols-2 xl:grid-cols-[minmax(20rem,1.45fr)_minmax(10rem,0.7fr)_repeat(2,minmax(8rem,0.8fr))]" }, mr = { class: "min-w-0 xl:col-start-1 xl:row-start-1 2xl:col-start-1 2xl:row-start-1" }, hr = { class: "text-xs font-medium text-secondary" }, gr = { class: "mt-xs font-mono text-4xl font-semibold text-primary tabular-nums xl:text-5xl" }, _r = { class: "mt-xs text-xs text-secondary" }, vr = {
273
+ }, pr = { class: "mt-xxs text-xs text-secondary" }, mr = { class: "grid grid-cols-1 gap-3xl md:grid-cols-2 xl:grid-cols-[minmax(20rem,1.45fr)_minmax(10rem,0.7fr)_repeat(2,minmax(8rem,0.8fr))]" }, hr = { class: "min-w-0 xl:col-start-1 xl:row-start-1 2xl:col-start-1 2xl:row-start-1" }, gr = { class: "text-xs font-medium text-secondary" }, _r = { class: "mt-xs font-mono text-4xl font-semibold text-primary tabular-nums xl:text-5xl" }, vr = { class: "mt-xs text-xs text-secondary" }, yr = {
274
274
  key: 0,
275
275
  class: "mt-xxs text-xs text-secondary"
276
- }, yr = { class: "mt-xl flex h-(--spacing-md) overflow-hidden rounded-full bg-tertiary" }, br = { class: "flex flex-col justify-end gap-md xl:col-start-2 xl:row-start-1 xl:pb-xs" }, xr = ["aria-label"], Sr = { class: "flex min-w-0 items-center gap-sm" }, Cr = { class: "truncate text-xs text-secondary" }, wr = { class: "shrink-0 font-mono text-xs font-medium text-primary" }, Tr = { class: "flex min-w-0 items-center gap-md xl:col-start-3 xl:row-start-1" }, Er = { class: "flex size-(--spacing-5xl) shrink-0 items-center justify-center rounded-full bg-brand-100" }, Dr = { class: "min-w-0" }, Or = { class: "text-xs text-secondary" }, kr = { class: "mt-xs font-mono text-xl font-semibold whitespace-nowrap text-primary xl:text-2xl" }, Ar = { class: "flex min-w-0 items-center gap-md xl:col-start-4 xl:row-start-1" }, jr = { class: "flex size-(--spacing-5xl) shrink-0 items-center justify-center rounded-full bg-brand-100" }, Mr = { class: "text-xs text-secondary" }, Nr = { class: "mt-xs font-mono text-2xl font-semibold text-primary" }, Pr = {
276
+ }, br = { class: "mt-xl flex h-(--spacing-md) overflow-hidden rounded-full bg-tertiary" }, xr = { class: "flex flex-col justify-end gap-md xl:col-start-2 xl:row-start-1 xl:pb-xs" }, Sr = ["aria-label"], Cr = { class: "flex min-w-0 items-center gap-sm" }, wr = { class: "truncate text-xs text-secondary" }, Tr = { class: "shrink-0 font-mono text-xs font-medium text-primary" }, Er = { class: "flex min-w-0 items-center gap-md xl:col-start-3 xl:row-start-1" }, Dr = { class: "flex size-(--spacing-5xl) shrink-0 items-center justify-center rounded-full bg-brand-100" }, Or = { class: "min-w-0" }, kr = { class: "text-xs text-secondary" }, Ar = { class: "mt-xs font-mono text-xl font-semibold whitespace-nowrap text-primary xl:text-2xl" }, jr = { class: "flex min-w-0 items-center gap-md xl:col-start-4 xl:row-start-1" }, Mr = { class: "flex size-(--spacing-5xl) shrink-0 items-center justify-center rounded-full bg-brand-100" }, Nr = { class: "text-xs text-secondary" }, Pr = { class: "mt-xs font-mono text-2xl font-semibold text-primary" }, Fr = {
277
277
  key: 0,
278
278
  class: "mt-xs text-xs text-secondary"
279
- }, Fr = { class: "grid gap-3xl xl:grid-cols-[minmax(0,2fr)_25.5rem]" }, Ir = { class: "min-w-0" }, Lr = { class: "overflow-hidden rounded-md border border-secondary bg-primary shadow-sm" }, Rr = { class: "border-b border-secondary px-xl pt-lg" }, zr = { class: "overflow-x-auto" }, Br = {
279
+ }, Ir = { class: "grid gap-3xl xl:grid-cols-[minmax(0,2fr)_25.5rem]" }, Lr = { class: "min-w-0" }, Rr = { class: "overflow-hidden rounded-md border border-secondary bg-primary shadow-sm" }, zr = { class: "border-b border-secondary px-xl pt-lg" }, Br = { class: "overflow-x-auto" }, Vr = {
280
280
  key: 0,
281
281
  class: "w-full min-w-200 table-fixed border-collapse text-left"
282
- }, Vr = { class: "border-b border-secondary bg-secondary" }, Hr = { class: "w-[20%] px-xl py-md text-xs font-medium text-secondary" }, Ur = { class: "w-[26%] px-xl py-md text-xs font-medium text-secondary" }, Wr = { class: "w-[14%] px-xl py-md text-xs font-medium text-secondary" }, Gr = { class: "w-[20%] px-xl py-md text-xs font-medium text-secondary" }, Kr = { class: "w-[20%] px-xl py-md text-right text-xs font-medium text-secondary" }, qr = { class: "flex items-start gap-md" }, Jr = [
282
+ }, Hr = { class: "border-b border-secondary bg-secondary" }, Ur = { class: "w-[20%] px-xl py-md text-xs font-medium text-secondary" }, Wr = { class: "w-[26%] px-xl py-md text-xs font-medium text-secondary" }, Gr = { class: "w-[14%] px-xl py-md text-xs font-medium text-secondary" }, Kr = { class: "w-[20%] px-xl py-md text-xs font-medium text-secondary" }, qr = { class: "w-[20%] px-xl py-md text-right text-xs font-medium text-secondary" }, Jr = { class: "flex items-start gap-md" }, Yr = [
283
283
  "aria-expanded",
284
284
  "aria-label",
285
285
  "onClick"
286
- ], Yr = {
286
+ ], Xr = {
287
287
  key: 1,
288
288
  class: "size-(--spacing-xl) shrink-0"
289
- }, Xr = { class: "min-w-0" }, Zr = {
289
+ }, Zr = { class: "min-w-0" }, Qr = {
290
290
  key: 0,
291
291
  class: "mt-xxs truncate text-xs text-secondary"
292
- }, Qr = { class: "px-xl py-md font-mono text-xs" }, $r = { class: "px-xl py-md" }, ei = {
292
+ }, $r = { class: "px-xl py-md font-mono text-xs" }, ei = { class: "px-xl py-md" }, ti = {
293
293
  key: 1,
294
294
  class: "flex items-center gap-xs text-xs text-primary"
295
- }, ti = { class: "px-xl py-md" }, ni = { class: "flex flex-col items-start gap-xs" }, ri = {
295
+ }, ni = { class: "px-xl py-md" }, ri = { class: "flex flex-col items-start gap-xs" }, ii = {
296
296
  key: 0,
297
297
  class: "text-xs text-secondary"
298
- }, ii = { class: "px-xl py-md text-right font-mono text-xs text-secondary tabular-nums" }, ai = { class: "font-medium" }, oi = {
298
+ }, ai = { class: "px-xl py-md text-right font-mono text-xs text-secondary tabular-nums" }, oi = { class: "font-medium" }, si = {
299
299
  key: 0,
300
300
  class: "mt-xxs text-tertiary"
301
- }, si = ["aria-hidden"], ci = {
301
+ }, ci = ["aria-hidden"], li = {
302
302
  class: "p-none",
303
303
  colspan: "5"
304
- }, li = { class: "overflow-hidden" }, ui = { class: "relative flex flex-col items-start gap-xs px-5xl py-md text-xs before:absolute before:inset-y-0 before:left-0 before:w-(--spacing-xxs) before:bg-brand-500" }, di = {
304
+ }, ui = { class: "overflow-hidden" }, di = { class: "relative flex flex-col items-start gap-xs px-5xl py-md text-xs before:absolute before:inset-y-0 before:left-0 before:w-(--spacing-xxs) before:bg-brand-500" }, fi = {
305
305
  key: 1,
306
306
  class: "flex flex-col items-center justify-center gap-md px-xl py-2xl"
307
- }, fi = { class: "flex size-(--spacing-3xl) items-center justify-center rounded-md border border-secondary" }, pi = { class: "text-sm font-semibold text-secondary" }, mi = {
307
+ }, pi = { class: "flex size-(--spacing-3xl) items-center justify-center rounded-md border border-secondary" }, mi = { class: "text-sm font-semibold text-secondary" }, hi = {
308
308
  key: 0,
309
309
  class: "ml-auto flex w-full max-w-140 flex-col px-xl"
310
- }, hi = { class: "flex items-center justify-between gap-3xl border-b border-secondary py-lg text-sm text-primary" }, gi = { class: "shrink-0 font-mono text-2xl font-semibold tabular-nums" }, _i = { class: "flex items-center justify-between gap-3xl py-lg text-sm text-primary" }, vi = { class: "shrink-0 font-mono text-sm font-medium tabular-nums" }, yi = { class: "h-full rounded-md border border-secondary bg-primary p-xl shadow-sm" }, bi = { class: "text-xl font-semibold text-primary" }, xi = { class: "mt-2xl flex flex-col" }, Si = { class: "flex w-(--spacing-3xl) shrink-0 flex-col items-center" }, Ci = {
310
+ }, gi = { class: "flex items-center justify-between gap-3xl border-b border-secondary py-lg text-sm text-primary" }, _i = { class: "shrink-0 font-mono text-2xl font-semibold tabular-nums" }, vi = { class: "flex items-center justify-between gap-3xl py-lg text-sm text-primary" }, yi = { class: "shrink-0 font-mono text-sm font-medium tabular-nums" }, bi = { class: "h-full rounded-md border border-secondary bg-primary p-xl shadow-sm" }, xi = { class: "text-xl font-semibold text-primary" }, Si = { class: "mt-2xl flex flex-col" }, Ci = { class: "flex w-(--spacing-3xl) shrink-0 flex-col items-center" }, wi = {
311
311
  key: 0,
312
312
  class: "min-h-(--spacing-xl) w-px flex-1 bg-tertiary"
313
- }, wi = { class: "text-sm font-semibold text-primary" }, Ti = { class: "mt-xxs text-sm text-secondary" }, Ei = /* @__PURE__ */ R({
313
+ }, Ti = { class: "text-sm font-semibold text-primary" }, Ei = { class: "mt-xxs text-sm text-secondary" }, Di = /* @__PURE__ */ R({
314
314
  __name: "DunningCaseDetailView",
315
315
  props: { dunningCase: {} },
316
316
  setup(e) {
317
- let t = e, n = k(), r = In(), i = zn(), a = C(), o = Ze(), s = _(), c = ee(), l = Xt(), u = Ke(), d = V("overdue");
317
+ let t = e, n = k(), r = Ln(), i = Bn(), a = C(), o = Qe(), s = _(), c = ee(), l = Zt(), u = qe(), d = V("overdue");
318
318
  function f(e) {
319
319
  return e.payments.length > 0 || e.creditNotes.length > 0;
320
320
  }
321
321
  let m = V(t.dunningCase.invoices.find(f)?.uuid ?? null);
322
- s.set(() => t.dunningCase.customer.name), Vn(j(() => [{
322
+ s.set(() => t.dunningCase.customer.name), Hn(j(() => [{
323
323
  key: t.dunningCase.uuid,
324
324
  modelName: "DunningCase",
325
325
  ...t.dunningCase
@@ -357,13 +357,13 @@ var $n = { class: "min-w-0 flex-1" }, er = { class: "flex min-w-0 flex-wrap item
357
357
  key: `closed-${t.dunningCase.closedAt.toString()}`,
358
358
  type: "case-closed"
359
359
  }), e.toSorted((e, t) => t.sortDate.localeCompare(e.sortDate));
360
- }), g = j(() => t.dunningCase.invoices.filter((e) => K.PlainDate.compare(e.dueOn, K.Now.plainDateISO()) < 0).toSorted((e, t) => K.PlainDate.compare(e.dueOn, t.dueOn))), v = j(() => t.dunningCase.invoices.filter((e) => K.PlainDate.compare(e.dueOn, K.Now.plainDateISO()) >= 0).toSorted((e, t) => K.PlainDate.compare(e.dueOn, t.dueOn))), y = j(() => d.value === "overdue" ? g.value : v.value), b = j(() => t.dunningCase.invoices.filter((e) => e.isDisputed).length), x = j(() => He(t.dunningCase.latestCreatedReminder)), S = j(() => g.value.filter((e) => !e.isDisputed)), w = j(() => S.value.reduce((e, t) => ({
360
+ }), g = j(() => t.dunningCase.invoices.filter((e) => K.PlainDate.compare(e.dueOn, K.Now.plainDateISO()) < 0).toSorted((e, t) => K.PlainDate.compare(e.dueOn, t.dueOn))), v = j(() => t.dunningCase.invoices.filter((e) => K.PlainDate.compare(e.dueOn, K.Now.plainDateISO()) >= 0).toSorted((e, t) => K.PlainDate.compare(e.dueOn, t.dueOn))), y = j(() => d.value === "overdue" ? g.value : v.value), b = j(() => t.dunningCase.invoices.filter((e) => e.isDisputed).length), x = j(() => Ue(t.dunningCase.latestCreatedReminder)), S = j(() => g.value.filter((e) => !e.isDisputed)), w = j(() => S.value.reduce((e, t) => ({
361
361
  ...e,
362
362
  amount: e.amount + t.balanceDueAmount.amount
363
363
  }), {
364
364
  ...t.dunningCase.outstandingBalance,
365
365
  amount: 0
366
- })), te = j(() => Ue(S.value, t.dunningCase.outstandingBalance)), ne = j(() => te.value.map((e, t) => ({
366
+ })), te = j(() => We(S.value, t.dunningCase.outstandingBalance)), ne = j(() => te.value.map((e, t) => ({
367
367
  amount: e,
368
368
  level: t
369
369
  })));
@@ -430,9 +430,9 @@ var $n = { class: "min-w-0 flex-1" }, er = { class: "flex min-w-0 flex-wrap item
430
430
  }
431
431
  }
432
432
  function he() {
433
- r.create(Je, { props: { dunningCaseUuid: t.dunningCase.uuid } }).open();
433
+ r.create(Ye, { props: { dunningCaseUuid: t.dunningCase.uuid } }).open();
434
434
  }
435
- async function E() {
435
+ async function _e() {
436
436
  if (t.dunningCase.latestCreatedReminder === null) return;
437
437
  let e = await u.execute({ params: { dunningCaseReminderUuid: t.dunningCase.latestCreatedReminder.uuid } });
438
438
  e.isErr() ? i.apiError(e.error) : i.show({
@@ -440,31 +440,31 @@ var $n = { class: "min-w-0 flex-1" }, er = { class: "flex min-w-0 flex-wrap item
440
440
  message: n.t("module.dunning_case.retry.success", { customer: t.dunningCase.customer.name })
441
441
  });
442
442
  }
443
- function _e(e) {
443
+ function ve(e) {
444
444
  m.value = m.value === e ? null : e;
445
445
  }
446
- return (e, r) => (B(), M(W($t), {
446
+ return (e, r) => (B(), M(W(en), {
447
447
  breadcrumbs: T.value,
448
448
  title: t.dunningCase.customer.name
449
449
  }, {
450
- default: G(() => [L(W(tn), null, {
451
- default: G(() => [F("div", ar, [
452
- F("div", or, [F("div", null, [
453
- F("div", sr, [
454
- F("h2", cr, [ie.value === null ? (B(), P("span", lr, U(t.dunningCase.customer.name), 1)) : (B(), P("button", {
450
+ default: G(() => [L(W(nn), null, {
451
+ default: G(() => [F("div", or, [
452
+ F("div", sr, [F("div", null, [
453
+ F("div", cr, [
454
+ F("h2", lr, [ie.value === null ? (B(), P("span", ur, U(t.dunningCase.customer.name), 1)) : (B(), P("button", {
455
455
  key: 0,
456
456
  class: "hover:underline",
457
457
  type: "button",
458
458
  onClick: ae
459
459
  }, U(t.dunningCase.customer.name), 1))]),
460
- F("span", ur, [L(ge, { level: t.dunningCase.level }, null, 8, ["level"]), I(" " + U(pe(t.dunningCase.level)), 1)]),
461
- L(We, {
460
+ F("span", dr, [L(ge, { level: t.dunningCase.level }, null, 8, ["level"]), I(" " + U(pe(t.dunningCase.level)), 1)]),
461
+ L(Ge, {
462
462
  "blocked-reason": null,
463
463
  status: x.value
464
464
  }, null, 8, ["status"])
465
465
  ]),
466
- t.dunningCase.customer.vatNumber || t.dunningCase.customer.email ? (B(), P("p", dr, U([t.dunningCase.customer.vatNumber, t.dunningCase.customer.email].filter(Boolean).join(" · ")), 1)) : N("", !0),
467
- F("p", fr, U(W(n).t("module.dunning_case.detail.last_synced", { date: W(o).toDateTime(t.dunningCase.updatedAt) })), 1)
466
+ t.dunningCase.customer.vatNumber || t.dunningCase.customer.email ? (B(), P("p", fr, U([t.dunningCase.customer.vatNumber, t.dunningCase.customer.email].filter(Boolean).join(" · ")), 1)) : N("", !0),
467
+ F("p", pr, U(W(n).t("module.dunning_case.detail.last_synced", { date: W(o).toDateTime(t.dunningCase.updatedAt) })), 1)
468
468
  ]), t.dunningCase.canSendReminder || x.value === "sending" ? (B(), M(W(q), {
469
469
  key: 0,
470
470
  "icon-right": W(D),
@@ -484,22 +484,22 @@ var $n = { class: "min-w-0 flex-1" }, er = { class: "flex min-w-0 flex-wrap item
484
484
  label: W(n).t("module.dunning_case.detail.retry"),
485
485
  class: "w-fit self-start lg:ml-auto",
486
486
  size: "sm",
487
- onClick: E
487
+ onClick: _e
488
488
  }, null, 8, [
489
489
  "icon-right",
490
490
  "is-loading",
491
491
  "label"
492
492
  ])) : N("", !0)]),
493
- F("div", pr, [
494
- F("div", mr, [
495
- F("p", hr, U(W(n).t("module.dunning_case.detail.outstanding")), 1),
496
- F("p", gr, U(W(a).formatMonetary(t.dunningCase.outstandingBalance)), 1),
497
- F("p", _r, U(W(n).t("module.dunning_case.detail.collected_summary", {
493
+ F("div", mr, [
494
+ F("div", hr, [
495
+ F("p", gr, U(W(n).t("module.dunning_case.detail.outstanding")), 1),
496
+ F("p", _r, U(W(a).formatMonetary(t.dunningCase.outstandingBalance)), 1),
497
+ F("p", vr, U(W(n).t("module.dunning_case.detail.collected_summary", {
498
498
  billed: W(a).formatMonetary(t.dunningCase.totalInvoiced),
499
499
  collected: W(a).formatMonetary(t.dunningCase.totalPaid)
500
500
  })), 1),
501
- t.dunningCase.totalCredited.amount > 0 ? (B(), P("p", vr, U(W(n).t("module.dunning_case.detail.credited_summary", { credited: W(a).formatMonetary(t.dunningCase.totalCredited) })), 1)) : N("", !0),
502
- F("div", yr, [(B(!0), P(A, null, H(te.value, (e, t) => (B(), P("span", {
501
+ t.dunningCase.totalCredited.amount > 0 ? (B(), P("p", yr, U(W(n).t("module.dunning_case.detail.credited_summary", { credited: W(a).formatMonetary(t.dunningCase.totalCredited) })), 1)) : N("", !0),
502
+ F("div", br, [(B(!0), P(A, null, H(te.value, (e, t) => (B(), P("span", {
503
503
  key: t,
504
504
  class: z([{
505
505
  "bg-quaternary": t === 0,
@@ -507,10 +507,10 @@ var $n = { class: "min-w-0 flex-1" }, er = { class: "flex min-w-0 flex-wrap item
507
507
  "bg-error-solid": t === 3,
508
508
  "bg-warning-solid": t === 2
509
509
  }, "h-full"]),
510
- style: At({ width: `${re(e.amount)}%` })
510
+ style: jt({ width: `${re(e.amount)}%` })
511
511
  }, null, 6))), 128))])
512
512
  ]),
513
- F("div", br, [(B(!0), P(A, null, H(ne.value, (e) => (B(), M(W(jn), {
513
+ F("div", xr, [(B(!0), P(A, null, H(ne.value, (e) => (B(), M(W(Mn), {
514
514
  key: e.level,
515
515
  "popover-side-offset": 8,
516
516
  "popover-align": "start",
@@ -520,37 +520,37 @@ var $n = { class: "min-w-0 flex-1" }, er = { class: "flex min-w-0 flex-wrap item
520
520
  "aria-label": se(e.level, e.amount),
521
521
  class: "flex min-w-0 items-center justify-between gap-lg rounded-sm border-none bg-transparent p-none text-left hover:bg-secondary focus-visible:outline-2 focus-visible:outline-brand-500 xl:flex-row xl:items-center xl:gap-lg",
522
522
  type: "button"
523
- }, [F("span", Sr, [F("span", { class: z([{
523
+ }, [F("span", Cr, [F("span", { class: z([{
524
524
  "bg-quaternary": e.level === 0,
525
525
  "bg-brand-500": e.level === 1,
526
526
  "bg-error-solid": e.level === 3,
527
527
  "bg-warning-solid": e.level === 2
528
- }, "size-(--spacing-sm) shrink-0 rounded-full"]) }, null, 2), F("span", Cr, U(oe(e.level)), 1)]), F("span", wr, U(W(a).formatMonetary(e.amount)), 1)], 8, xr)]),
529
- content: G(() => [L(W(Mn), { class: "max-w-80! text-sm!" }, {
528
+ }, "size-(--spacing-sm) shrink-0 rounded-full"]) }, null, 2), F("span", wr, U(oe(e.level)), 1)]), F("span", Tr, U(W(a).formatMonetary(e.amount)), 1)], 8, Sr)]),
529
+ content: G(() => [L(W(Nn), { class: "max-w-80! text-sm!" }, {
530
530
  default: G(() => [I(U(se(e.level, e.amount)), 1)]),
531
531
  _: 2
532
532
  }, 1024)]),
533
533
  _: 2
534
534
  }, 1024))), 128))]),
535
- F("div", Tr, [F("span", Er, [L(W(Ee), { class: "size-(--spacing-xl) text-brand-700" })]), F("div", Dr, [F("p", Or, U(W(n).t("module.dunning_case.detail.next_reminder")), 1), F("p", kr, U(t.dunningCase.nextReminderOn === null ? W(n).t("module.dunning_case.overview.not_scheduled") : W(o).formatPlainDate(t.dunningCase.nextReminderOn)), 1)])]),
536
- F("div", Ar, [F("span", jr, [L(W(Ie), { class: "size-(--spacing-xl) text-brand-700" })]), F("div", null, [
537
- F("p", Mr, U(W(n).t("module.dunning_case.detail.invoices")), 1),
538
- F("p", Nr, U(t.dunningCase.invoices.length), 1),
539
- b.value > 0 ? (B(), P("p", Pr, U(W(n).t("module.dunning_case.detail.protested_count", { count: b.value })), 1)) : N("", !0)
535
+ F("div", Er, [F("span", Dr, [L(W(De), { class: "size-(--spacing-xl) text-brand-700" })]), F("div", Or, [F("p", kr, U(W(n).t("module.dunning_case.detail.next_reminder")), 1), F("p", Ar, U(t.dunningCase.nextReminderOn === null ? W(n).t("module.dunning_case.overview.not_scheduled") : W(o).formatPlainDate(t.dunningCase.nextReminderOn)), 1)])]),
536
+ F("div", jr, [F("span", Mr, [L(W(Le), { class: "size-(--spacing-xl) text-brand-700" })]), F("div", null, [
537
+ F("p", Nr, U(W(n).t("module.dunning_case.detail.invoices")), 1),
538
+ F("p", Pr, U(t.dunningCase.invoices.length), 1),
539
+ b.value > 0 ? (B(), P("p", Fr, U(W(n).t("module.dunning_case.detail.protested_count", { count: b.value })), 1)) : N("", !0)
540
540
  ])])
541
541
  ]),
542
- F("div", Fr, [F("main", Ir, [F("div", Lr, [
543
- F("div", Rr, [L(W(Tn), {
542
+ F("div", Ir, [F("main", Lr, [F("div", Rr, [
543
+ F("div", zr, [L(W(En), {
544
544
  modelValue: d.value,
545
545
  "onUpdate:modelValue": r[0] ||= (e) => d.value = e,
546
546
  "aria-label": W(n).t("module.dunning_case.detail.invoice_tabs"),
547
547
  variant: "underline"
548
548
  }, {
549
- default: G(() => [L(W(Dn), null, {
550
- default: G(() => [L(W(En), {
549
+ default: G(() => [L(W(On), null, {
550
+ default: G(() => [L(W(Dn), {
551
551
  label: W(n).t("module.dunning_case.detail.overdue_invoices"),
552
552
  value: "overdue"
553
- }, null, 8, ["label"]), L(W(En), {
553
+ }, null, 8, ["label"]), L(W(Dn), {
554
554
  label: W(n).t("module.dunning_case.detail.outstanding_invoices"),
555
555
  value: "outstanding"
556
556
  }, null, 8, ["label"])]),
@@ -558,24 +558,24 @@ var $n = { class: "min-w-0 flex-1" }, er = { class: "flex min-w-0 flex-wrap item
558
558
  })]),
559
559
  _: 1
560
560
  }, 8, ["modelValue", "aria-label"])]),
561
- F("div", zr, [y.value.length > 0 ? (B(), P("table", Br, [F("thead", null, [F("tr", Vr, [
562
- F("th", Hr, U(W(n).t("module.dunning_case.detail.table.invoice")), 1),
563
- F("th", Ur, U(W(n).t("module.dunning_case.detail.table.due_date")), 1),
564
- F("th", Wr, U(W(n).t("module.dunning_case.detail.table.level")), 1),
565
- F("th", Gr, U(W(n).t("module.dunning_case.detail.table.status")), 1),
566
- F("th", Kr, U(W(n).t("module.dunning_case.detail.table.remaining")), 1)
561
+ F("div", Br, [y.value.length > 0 ? (B(), P("table", Vr, [F("thead", null, [F("tr", Hr, [
562
+ F("th", Ur, U(W(n).t("module.dunning_case.detail.table.invoice")), 1),
563
+ F("th", Wr, U(W(n).t("module.dunning_case.detail.table.due_date")), 1),
564
+ F("th", Gr, U(W(n).t("module.dunning_case.detail.table.level")), 1),
565
+ F("th", Kr, U(W(n).t("module.dunning_case.detail.table.status")), 1),
566
+ F("th", qr, U(W(n).t("module.dunning_case.detail.table.remaining")), 1)
567
567
  ])]), F("tbody", null, [(B(!0), P(A, null, H(y.value, (e) => (B(), P(A, { key: e.uuid }, [F("tr", { class: z([{ "opacity-60": e.isDisputed }, "border-b border-secondary"]) }, [
568
568
  F("td", { class: z([{
569
569
  "before:opacity-0": m.value !== e.uuid,
570
570
  "before:opacity-100": m.value === e.uuid
571
- }, "relative px-xl py-md before:absolute before:inset-y-0 before:left-0 before:w-(--spacing-xxs) before:bg-brand-500"]) }, [F("div", qr, [f(e) ? (B(), P("button", {
571
+ }, "relative px-xl py-md before:absolute before:inset-y-0 before:left-0 before:w-(--spacing-xxs) before:bg-brand-500"]) }, [F("div", Jr, [f(e) ? (B(), P("button", {
572
572
  key: 0,
573
573
  "aria-expanded": m.value === e.uuid,
574
574
  "aria-label": W(n).t(m.value === e.uuid ? "module.dunning_case.detail.collapse_updates" : "module.dunning_case.detail.expand_updates", { invoice: e.sequence }),
575
575
  class: "mt-xxs flex size-(--spacing-xl) shrink-0 items-center justify-center text-secondary hover:text-primary",
576
576
  type: "button",
577
- onClick: (t) => _e(e.uuid)
578
- }, [L(W(Pe), { class: z([{ "rotate-180": m.value === e.uuid }, "size-(--spacing-xl) transition-transform duration-200 ease-out motion-reduce:transition-none"]) }, null, 8, ["class"])], 8, Jr)) : (B(), P("span", Yr)), F("div", Xr, [L(W(Yt), {
577
+ onClick: (t) => ve(e.uuid)
578
+ }, [L(W(Fe), { class: z([{ "rotate-180": m.value === e.uuid }, "size-(--spacing-xl) transition-transform duration-200 ease-out motion-reduce:transition-none"]) }, null, 8, ["class"])], 8, Yr)) : (B(), P("span", Xr)), F("div", Zr, [L(W(Xt), {
579
579
  to: {
580
580
  name: "invoicing-invoice-detail",
581
581
  params: { invoiceUuid: e.uuid }
@@ -584,37 +584,37 @@ var $n = { class: "min-w-0 flex-1" }, er = { class: "flex min-w-0 flex-wrap item
584
584
  }, {
585
585
  default: G(() => [I(U(e.sequence), 1)]),
586
586
  _: 2
587
- }, 1032, ["to"]), e.subject === null ? N("", !0) : (B(), P("p", Zr, U(e.subject), 1))])])], 2),
588
- F("td", Qr, [F("span", { class: z([e.isDisputed ? "text-secondary" : de(e) > 0 ? "text-error-primary" : "text-primary", "inline-flex items-center gap-xs whitespace-nowrap"]) }, [I(U(W(o).formatPlainDate(e.dueOn)) + " ", 1), F("span", { class: z([!e.isDisputed && de(e) > 0 ? "\n border-error bg-error-primary\n text-error-primary\n " : "border-secondary bg-secondary text-secondary", "rounded-sm border px-sm py-px font-sans text-xs"]) }, U(fe(e)), 3)], 2)]),
589
- F("td", $r, [e.isDisputed ? (B(), M(W(Qt), {
587
+ }, 1032, ["to"]), e.subject === null ? N("", !0) : (B(), P("p", Qr, U(e.subject), 1))])])], 2),
588
+ F("td", $r, [F("span", { class: z([e.isDisputed ? "text-secondary" : de(e) > 0 ? "text-error-primary" : "text-primary", "inline-flex items-center gap-xs whitespace-nowrap"]) }, [I(U(W(o).formatPlainDate(e.dueOn)) + " ", 1), F("span", { class: z([!e.isDisputed && de(e) > 0 ? "\n border-error bg-error-primary\n text-error-primary\n " : "border-secondary bg-secondary text-secondary", "rounded-sm border px-sm py-px font-sans text-xs"]) }, U(fe(e)), 3)], 2)]),
589
+ F("td", ei, [e.isDisputed ? (B(), M(W($t), {
590
590
  key: 0,
591
591
  label: W(n).t("module.dunning_case.detail.protested"),
592
592
  color: "error",
593
593
  size: "sm",
594
594
  variant: "translucent"
595
- }, null, 8, ["label"])) : d.value === "overdue" ? (B(), P("span", ei, [L(ge, {
595
+ }, null, 8, ["label"])) : d.value === "overdue" ? (B(), P("span", ti, [L(ge, {
596
596
  level: e.level,
597
597
  size: "sm"
598
598
  }, null, 8, ["level"]), I(" " + U(e.level === 0 ? "–" : e.level), 1)])) : N("", !0)]),
599
- F("td", ti, [F("div", ni, [e.isDisputed ? (B(), P("p", ri, U(W(n).t("module.dunning_case.detail.excluded")), 1)) : d.value === "outstanding" ? (B(), M(W(Qt), {
599
+ F("td", ni, [F("div", ri, [e.isDisputed ? (B(), P("p", ii, U(W(n).t("module.dunning_case.detail.excluded")), 1)) : d.value === "outstanding" ? (B(), M(W($t), {
600
600
  key: 1,
601
601
  label: W(n).t("module.dunning_case.detail.not_yet_due"),
602
602
  color: "gray",
603
603
  size: "sm",
604
604
  variant: "translucent"
605
- }, null, 8, ["label"])) : (B(), M(W(Qt), {
605
+ }, null, 8, ["label"])) : (B(), M(W($t), {
606
606
  key: 2,
607
607
  label: W(n).t(`module.dunning_case.settlement_status.${e.settlementStatus}`),
608
608
  color: me(e.settlementStatus),
609
609
  size: "sm",
610
610
  variant: "translucent"
611
611
  }, null, 8, ["label", "color"]))])]),
612
- F("td", ii, [F("p", ai, U(W(a).formatMonetary(e.balanceDueAmount)), 1), e.balanceDueAmount.amount === e.grossAmount.amount ? N("", !0) : (B(), P("p", oi, " /" + U(W(a).formatMonetary(e.grossAmount)), 1))])
612
+ F("td", ai, [F("p", oi, U(W(a).formatMonetary(e.balanceDueAmount)), 1), e.balanceDueAmount.amount === e.grossAmount.amount ? N("", !0) : (B(), P("p", si, " /" + U(W(a).formatMonetary(e.grossAmount)), 1))])
613
613
  ], 2), f(e) ? (B(), P("tr", {
614
614
  key: `${e.uuid}-updates`,
615
615
  class: z({ "border-b border-secondary": m.value === e.uuid }),
616
616
  "aria-hidden": m.value !== e.uuid
617
- }, [F("td", ci, [F("div", { class: z([m.value === e.uuid ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0", "grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none"]) }, [F("div", li, [F("div", ui, [(B(!0), P(A, null, H(e.payments, (e) => (B(), P("span", {
617
+ }, [F("td", li, [F("div", { class: z([m.value === e.uuid ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0", "grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none"]) }, [F("div", ui, [F("div", di, [(B(!0), P(A, null, H(e.payments, (e) => (B(), P("span", {
618
618
  key: e.uuid,
619
619
  class: "inline-flex items-center gap-sm rounded-sm bg-success-primary px-md py-sm text-success-primary"
620
620
  }, [r[1] ||= F("span", { class: "size-(--spacing-sm) shrink-0 rounded-full bg-success-solid" }, null, -1), I(" " + U(W(n).t("module.dunning_case.detail.payment_line", {
@@ -627,46 +627,46 @@ var $n = { class: "min-w-0 flex-1" }, er = { class: "flex min-w-0 flex-wrap item
627
627
  amount: W(a).formatMonetary(e.grossAmount),
628
628
  date: W(o).formatPlainDate(e.finalizedOn),
629
629
  sequence: e.sequence
630
- })), 1)]))), 128))])])], 2)])], 10, si)) : N("", !0)], 64))), 128))])])) : (B(), P("div", di, [F("span", fi, [L(W(Ve), { class: "size-(--spacing-xl) text-primary" })]), F("p", pi, U(W(n).t(d.value === "overdue" ? "module.dunning_case.detail.empty_overdue" : "module.dunning_case.detail.empty_outstanding")), 1)]))]),
631
- d.value === "overdue" ? (B(), P("div", mi, [F("div", hi, [F("span", null, U(W(n).t("module.dunning_case.detail.total_outstanding")), 1), F("span", gi, U(W(a).formatMonetary(w.value)), 1)]), F("div", _i, [F("span", null, U(t.dunningCase.level === 0 ? W(n).t("module.dunning_case.detail.reminder_fee") : W(n).t("module.dunning_case.detail.fee", { level: t.dunningCase.level })), 1), F("span", vi, U(W(a).formatMonetary(t.dunningCase.totalFee)), 1)])])) : N("", !0)
632
- ])]), F("aside", yi, [F("h2", bi, U(W(n).t("module.dunning_case.detail.activity")), 1), F("ol", xi, [(B(!0), P(A, null, H(h.value, (e, t) => (B(), P("li", {
630
+ })), 1)]))), 128))])])], 2)])], 10, ci)) : N("", !0)], 64))), 128))])])) : (B(), P("div", fi, [F("span", pi, [L(W(He), { class: "size-(--spacing-xl) text-primary" })]), F("p", mi, U(W(n).t(d.value === "overdue" ? "module.dunning_case.detail.empty_overdue" : "module.dunning_case.detail.empty_outstanding")), 1)]))]),
631
+ d.value === "overdue" ? (B(), P("div", hi, [F("div", gi, [F("span", null, U(W(n).t("module.dunning_case.detail.total_outstanding")), 1), F("span", _i, U(W(a).formatMonetary(w.value)), 1)]), F("div", vi, [F("span", null, U(t.dunningCase.level === 0 ? W(n).t("module.dunning_case.detail.reminder_fee") : W(n).t("module.dunning_case.detail.fee", { level: t.dunningCase.level })), 1), F("span", yi, U(W(a).formatMonetary(t.dunningCase.totalFee)), 1)])])) : N("", !0)
632
+ ])]), F("aside", bi, [F("h2", xi, U(W(n).t("module.dunning_case.detail.activity")), 1), F("ol", Si, [(B(!0), P(A, null, H(h.value, (e, t) => (B(), P("li", {
633
633
  key: e.key,
634
634
  class: "flex gap-md"
635
- }, [F("div", Si, [F("span", { class: z([{
635
+ }, [F("div", Ci, [F("span", { class: z([{
636
636
  "bg-brand-100": e.type === "reminder-sent",
637
637
  "bg-error-secondary": e.type === "reminder-due",
638
638
  "bg-success-secondary": e.type === "payment" || e.type === "case-closed",
639
639
  "bg-tertiary": e.type === "credit-note"
640
- }, "flex size-(--spacing-3xl) shrink-0 items-center justify-center rounded-full"]) }, [e.type === "reminder-due" ? (B(), M(W(Ee), {
640
+ }, "flex size-(--spacing-3xl) shrink-0 items-center justify-center rounded-full"]) }, [e.type === "reminder-due" ? (B(), M(W(De), {
641
641
  key: 0,
642
642
  class: "size-(--spacing-lg) text-error-primary"
643
- })) : e.type === "payment" ? (B(), M(W(Le), {
643
+ })) : e.type === "payment" ? (B(), M(W(Re), {
644
644
  key: 1,
645
645
  class: "size-(--spacing-lg) text-success-primary"
646
- })) : e.type === "credit-note" ? (B(), M(W(Ie), {
646
+ })) : e.type === "credit-note" ? (B(), M(W(Le), {
647
647
  key: 2,
648
648
  class: "size-(--spacing-lg) text-secondary"
649
649
  })) : e.type === "reminder-sent" ? (B(), M(W(D), {
650
650
  key: 3,
651
651
  class: "size-(--spacing-lg) text-brand-tertiary"
652
- })) : e.type === "case-closed" ? (B(), M(W(Ve), {
652
+ })) : e.type === "case-closed" ? (B(), M(W(He), {
653
653
  key: 4,
654
654
  class: "size-(--spacing-lg) text-success-primary"
655
- })) : N("", !0)], 2), t < h.value.length - 1 ? (B(), P("span", Ci)) : N("", !0)]), F("div", { class: z([{ "pb-xl": t < h.value.length - 1 }, "pt-xs"]) }, [F("p", wi, U(le(e)), 1), F("p", Ti, U(ue(e)), 1)], 2)]))), 128))])])])
655
+ })) : N("", !0)], 2), t < h.value.length - 1 ? (B(), P("span", wi)) : N("", !0)]), F("div", { class: z([{ "pb-xl": t < h.value.length - 1 }, "pt-xs"]) }, [F("p", Ti, U(le(e)), 1), F("p", Ei, U(ue(e)), 1)], 2)]))), 128))])])])
656
656
  ])]),
657
657
  _: 1
658
658
  })]),
659
659
  _: 1
660
660
  }, 8, ["breadcrumbs", "title"]));
661
661
  }
662
- }), Di = /*@__PURE__*/ R({
662
+ }), Oi = /*@__PURE__*/ R({
663
663
  __name: "DunningCaseDetailViewDataProvider",
664
664
  props: { dunningCaseUuid: {} },
665
665
  setup(e) {
666
- let t = e, n = k(), r = Ge(j(() => t.dunningCaseUuid));
667
- Ye({
666
+ let t = e, n = k(), r = Ke(j(() => t.dunningCaseUuid));
667
+ Xe({
668
668
  refetch: r.refetch,
669
- sendingUuids: () => r.result.value.isOk() && He(r.result.value.getValue().latestCreatedReminder) === "sending" ? [t.dunningCaseUuid] : []
669
+ sendingUuids: () => r.result.value.isOk() && Ue(r.result.value.getValue().latestCreatedReminder) === "sending" ? [t.dunningCaseUuid] : []
670
670
  });
671
671
  let i = j(() => [{
672
672
  label: n.t("module.dunning_case.title"),
@@ -675,18 +675,18 @@ var $n = { class: "min-w-0 flex-1" }, er = { class: "flex min-w-0 flex-wrap item
675
675
  isLoading: !0,
676
676
  label: ""
677
677
  }]);
678
- return (e, t) => (B(), M($e, { queries: { dunningCase: W(r) } }, {
679
- default: G(({ data: e }) => [L(Ei, { "dunning-case": e.dunningCase }, null, 8, ["dunning-case"])]),
680
- loading: G(() => [L(W(nn), { breadcrumbs: i.value }, null, 8, ["breadcrumbs"])]),
678
+ return (e, t) => (B(), M(et, { queries: { dunningCase: W(r) } }, {
679
+ default: G(({ data: e }) => [L(Di, { "dunning-case": e.dunningCase }, null, 8, ["dunning-case"])]),
680
+ loading: G(() => [L(W(rn), { breadcrumbs: i.value }, null, 8, ["breadcrumbs"])]),
681
681
  _: 1
682
682
  }, 8, ["queries"]));
683
683
  }
684
- }), Oi = /* @__PURE__ */ Gn({ default: () => ki }), ki = Di;
684
+ }), ki = /* @__PURE__ */ Kn({ default: () => Ai }), Ai = Oi;
685
685
  //#endregion
686
686
  //#region src/modules/dunning-case/actions/dunningCaseNavigateToCustomer.action.ts
687
- function Ai() {
688
- let e = k(), t = Xt(), n = ee();
689
- return Bn({
687
+ function ji() {
688
+ let e = k(), t = Zt(), n = ee();
689
+ return Vn({
690
690
  id: "dunning-case-navigate-to-customer",
691
691
  isApplicable: (e) => {
692
692
  let t = e.targetedModelOfType("DunningCase");
@@ -697,14 +697,14 @@ function Ai() {
697
697
  let r = e.targetedModelOfTypeOrThrow("DunningCase"), i = n.getCustomerDetailRoute(r.customer.uuid);
698
698
  i !== null && t.push(i);
699
699
  },
700
- icon: () => Be
700
+ icon: () => Ve
701
701
  });
702
702
  }
703
703
  //#endregion
704
704
  //#region src/modules/dunning-case/actions/dunningCaseNavigateToDetail.action.ts
705
- function ji() {
706
- let e = k(), t = Xt();
707
- return Bn({
705
+ function Mi() {
706
+ let e = k(), t = Zt();
707
+ return Vn({
708
708
  id: "dunning-case-navigate-to-detail",
709
709
  isApplicable: (e) => e.hasTargetedModelsOfType("DunningCase"),
710
710
  name: () => e.t("module.dunning_case.overview.menu.view_case"),
@@ -715,12 +715,12 @@ function ji() {
715
715
  params: { dunningCaseUuid: n.uuid }
716
716
  });
717
717
  },
718
- icon: () => ke
718
+ icon: () => Ae
719
719
  });
720
720
  }
721
721
  //#endregion
722
722
  //#region src/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewMetrics.vue?vue&type=script&setup=true&lang.ts
723
- var Mi = ["aria-label"], Ni = { class: "text-xs font-semibold text-secondary uppercase" }, Pi = { class: "mt-xl font-mono text-4xl font-semibold text-primary" }, Fi = { class: "mt-xs text-sm text-secondary" }, Ii = { class: "lg:col-span-2" }, Li = { class: "flex h-1.5 w-full overflow-hidden rounded-full bg-secondary" }, Ri = { class: "mt-xl grid grid-cols-1 gap-md sm:grid-cols-3" }, zi = { class: "flex min-w-0 items-center gap-sm" }, Bi = { class: "truncate text-sm text-secondary" }, Vi = { class: "shrink-0 font-mono text-sm font-semibold text-primary tabular-nums" }, Hi = /* @__PURE__ */ R({
723
+ var Ni = ["aria-label"], Pi = { class: "text-xs font-semibold text-secondary uppercase" }, Fi = { class: "mt-xl font-mono text-4xl font-semibold text-primary" }, Ii = { class: "mt-xs text-sm text-secondary" }, Li = { class: "lg:col-span-2" }, Ri = { class: "flex h-1.5 w-full overflow-hidden rounded-full bg-secondary" }, zi = { class: "mt-xl grid grid-cols-1 gap-md sm:grid-cols-3" }, Bi = { class: "flex min-w-0 items-center gap-sm" }, Vi = { class: "truncate text-sm text-secondary" }, Hi = { class: "shrink-0 font-mono text-sm font-semibold text-primary tabular-nums" }, Ui = /* @__PURE__ */ R({
724
724
  __name: "DunningCaseOverviewMetrics",
725
725
  props: {
726
726
  hasLevelCountError: { type: Boolean },
@@ -736,38 +736,38 @@ var Mi = ["aria-label"], Ni = { class: "text-xs font-semibold text-secondary upp
736
736
  "aria-label": W(n).t("module.dunning_case.overview.levels"),
737
737
  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"
738
738
  }, [F("div", null, [
739
- F("p", Ni, U(W(n).t("module.dunning_case.overview.levels")), 1),
740
- F("p", Pi, U(e.levelCountTotal ?? "—"), 1),
741
- F("p", Fi, U(r.value), 1)
742
- ]), F("div", Ii, [F("div", Li, [(B(!0), P(A, null, H(e.levelCounts, (e, t) => (B(), P("span", {
739
+ F("p", Pi, U(W(n).t("module.dunning_case.overview.levels")), 1),
740
+ F("p", Fi, U(e.levelCountTotal ?? "—"), 1),
741
+ F("p", Ii, U(r.value), 1)
742
+ ]), F("div", Li, [F("div", Ri, [(B(!0), P(A, null, H(e.levelCounts, (e, t) => (B(), P("span", {
743
743
  key: t,
744
744
  class: z({
745
745
  "bg-brand-500": t === 0,
746
746
  "bg-error-solid": t === 2,
747
747
  "bg-warning-solid": t === 1
748
748
  }),
749
- style: At({ flexGrow: e ?? 0 })
750
- }, null, 6))), 128))]), F("div", Ri, [(B(!0), P(A, null, H(e.levelCounts, (e, t) => (B(), P("div", {
749
+ style: jt({ flexGrow: e ?? 0 })
750
+ }, null, 6))), 128))]), F("div", zi, [(B(!0), P(A, null, H(e.levelCounts, (e, t) => (B(), P("div", {
751
751
  key: t,
752
752
  class: "flex items-center justify-between gap-xl"
753
- }, [F("div", zi, [F("span", { class: z([{
753
+ }, [F("div", Bi, [F("span", { class: z([{
754
754
  "bg-brand-500": t === 0,
755
755
  "bg-error-solid": t === 2,
756
756
  "bg-warning-solid": t === 1
757
- }, "size-2 shrink-0 rounded-full"]) }, null, 2), F("p", Bi, U(i(t + 1)), 1)]), F("p", Vi, U(e ?? "—"), 1)]))), 128))])])], 8, Mi));
757
+ }, "size-2 shrink-0 rounded-full"]) }, null, 2), F("p", Vi, U(i(t + 1)), 1)]), F("p", Hi, U(e ?? "—"), 1)]))), 128))])])], 8, Ni));
758
758
  }
759
- }), Ui = {
759
+ }), Wi = {
760
760
  uuid: "00000000-0000-4000-8000-000000000000",
761
761
  sentAt: null,
762
762
  hasErrors: !1
763
763
  };
764
- function Wi(e, t) {
764
+ function Gi(e, t) {
765
765
  if (e === null || t === null) return e === t;
766
766
  let n = e.sentAt === null || t.sentAt === null ? e.sentAt === t.sentAt : e.sentAt.equals(t.sentAt);
767
767
  return e.uuid === t.uuid && n && e.hasErrors === t.hasErrors;
768
768
  }
769
- function Gi(e) {
770
- let t = j(() => !0), { isFetchingNextPage: n, isLoading: r, fetchNextPage: i, refetch: a, result: o } = Zn({ params: {
769
+ function Ki(e) {
770
+ let t = j(() => !0), { isFetchingNextPage: n, isLoading: r, fetchNextPage: i, refetch: a, result: o } = Qn({ params: {
771
771
  customerUuid: e.customerUuid,
772
772
  isOpen: t,
773
773
  level: j(() => e.activeLevel.value ?? void 0)
@@ -777,27 +777,27 @@ function Gi(e) {
777
777
  }
778
778
  let c = V(/* @__PURE__ */ new Map()), l = j(() => s().map((e) => {
779
779
  let t = c.value.get(e.uuid);
780
- return t !== void 0 && Wi(e.latestCreatedReminder, t) ? {
780
+ return t !== void 0 && Gi(e.latestCreatedReminder, t) ? {
781
781
  ...e,
782
- latestCreatedReminder: Ui
782
+ latestCreatedReminder: Wi
783
783
  } : e;
784
784
  })), u = j(() => o.value.isErr() ? o.value.getError() : null);
785
- Ye({
785
+ Xe({
786
786
  refetch: a,
787
- sendingUuids: () => l.value.filter((e) => He(e.latestCreatedReminder) === "sending").map((e) => e.uuid),
787
+ sendingUuids: () => l.value.filter((e) => Ue(e.latestCreatedReminder) === "sending").map((e) => e.uuid),
788
788
  onLimitReached: () => {
789
789
  c.value = /* @__PURE__ */ new Map();
790
790
  }
791
791
  });
792
- let d = Zn({ params: {
792
+ let d = Qn({ params: {
793
793
  customerUuid: e.customerUuid,
794
794
  isOpen: t,
795
795
  level: j(() => 1)
796
- } }), f = Zn({ params: {
796
+ } }), f = Qn({ params: {
797
797
  customerUuid: e.customerUuid,
798
798
  isOpen: t,
799
799
  level: j(() => 2)
800
- } }), p = Zn({ params: {
800
+ } }), p = Qn({ params: {
801
801
  customerUuid: e.customerUuid,
802
802
  isOpen: t,
803
803
  level: j(() => 3)
@@ -832,33 +832,33 @@ function Gi(e) {
832
832
  }
833
833
  //#endregion
834
834
  //#region src/modules/dunning-case/api/queries/dunningCaseCustomerIndex.query.ts
835
- function Ki(e) {
835
+ function qi(e) {
836
836
  let t = j(() => ({ search: e.params.search?.value }));
837
- return Gt("dunningCaseCustomerIndex", {
837
+ return Kt("dunningCaseCustomerIndex", {
838
838
  params: { queryParams: t },
839
- queryFn: (e) => qe.getAll(t.value.search, e)
839
+ queryFn: (e) => Je.getAll(t.value.search, e)
840
840
  });
841
841
  }
842
842
  //#endregion
843
843
  //#region src/modules/dunning-case/use-cases/overview/composables/dunningCaseOverviewFilters.composable.ts
844
- function qi() {
845
- let e = k(), t = ne({ debounceMs: 250 }), n = Ki({ params: { search: t.debouncedSearch } }), r = j(() => n.result.value.isOk() ? n.result.value.getValue().data : []), i = it({
844
+ function Ji() {
845
+ let e = k(), t = ne({ debounceMs: 250 }), n = qi({ params: { search: t.debouncedSearch } }), r = j(() => n.result.value.isOk() ? n.result.value.getValue().data : []), i = at({
846
846
  actionGroup: { name: "dunning-cases" },
847
- filters: [rt({
847
+ filters: [it({
848
848
  defaultValue: {
849
- operator: ct.INCLUDES,
849
+ operator: lt.INCLUDES,
850
850
  value: []
851
851
  },
852
852
  disableOperators: !0,
853
853
  displayFn: (e) => r.value.find((t) => t.uuid === e)?.name ?? e,
854
854
  key: "customerUuids",
855
855
  label: e.t("module.dunning_case.overview.filter_customer"),
856
- options: async (e) => i.values.value.customerUuids.value.length > 0 ? [] : (t.updateSearch(e), await kt(), r.value.map((e) => e.uuid))
856
+ options: async (e) => i.values.value.customerUuids.value.length > 0 ? [] : (t.updateSearch(e), await At(), r.value.map((e) => e.uuid))
857
857
  })]
858
858
  });
859
- return Rt(() => i.values.value.customerUuids, (e) => {
860
- (e.operator !== ct.INCLUDES || e.value.length > 1) && (i.values.value.customerUuids = {
861
- operator: ct.INCLUDES,
859
+ return zt(() => i.values.value.customerUuids, (e) => {
860
+ (e.operator !== lt.INCLUDES || e.value.length > 1) && (i.values.value.customerUuids = {
861
+ operator: lt.INCLUDES,
862
862
  value: e.value.slice(-1)
863
863
  });
864
864
  }, {
@@ -871,7 +871,7 @@ function qi() {
871
871
  }
872
872
  //#endregion
873
873
  //#region src/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewActionsCell.vue?vue&type=script&setup=true&lang.ts
874
- var Ji = { class: "flex w-full items-center justify-end gap-xs" }, Yi = /* @__PURE__ */ R({
874
+ var Yi = { class: "flex w-full items-center justify-end gap-xs" }, Xi = /* @__PURE__ */ R({
875
875
  __name: "DunningCaseOverviewActionsCell",
876
876
  props: { item: {} },
877
877
  emits: [
@@ -880,12 +880,12 @@ var Ji = { class: "flex w-full items-center justify-end gap-xs" }, Yi = /* @__PU
880
880
  "viewCustomer"
881
881
  ],
882
882
  setup(e, { emit: t }) {
883
- let n = e, r = t, i = k(), a = ee(), o = j(() => a.getCustomerDetailRoute(n.item.customer.uuid)), s = j(() => n.item.blockedReason !== null), c = j(() => He(n.item.latestCreatedReminder)), l = j(() => n.item.canRetryReminder ? i.t("module.dunning_case.overview.retry") : s.value ? i.t("module.dunning_case.overview.blocked") : n.item.nextReminderOn === null ? i.t("module.dunning_case.overview.not_scheduled") : i.t("module.dunning_case.overview.send"));
883
+ let n = e, r = t, i = k(), a = ee(), o = j(() => a.getCustomerDetailRoute(n.item.customer.uuid)), s = j(() => n.item.blockedReason !== null), c = j(() => Ue(n.item.latestCreatedReminder)), l = j(() => n.item.canRetryReminder ? i.t("module.dunning_case.overview.retry") : s.value ? i.t("module.dunning_case.overview.blocked") : n.item.nextReminderOn === null ? i.t("module.dunning_case.overview.not_scheduled") : i.t("module.dunning_case.overview.send"));
884
884
  return (t, n) => (B(), M(W(X), null, {
885
- default: G(() => [L(W(Cn), { class: "w-full" }, {
886
- default: G(() => [F("div", Ji, [s.value && o.value !== null ? (B(), M(W(q), {
885
+ default: G(() => [L(W(wn), { class: "w-full" }, {
886
+ default: G(() => [F("div", Yi, [s.value && o.value !== null ? (B(), M(W(q), {
887
887
  key: 0,
888
- "icon-right": W(De),
888
+ "icon-right": W(Oe),
889
889
  label: W(i).t("module.dunning_case.overview.fix"),
890
890
  size: "sm",
891
891
  variant: "secondary",
@@ -910,16 +910,16 @@ var Ji = { class: "flex w-full items-center justify-end gap-xs" }, Yi = /* @__PU
910
910
  _: 1
911
911
  }));
912
912
  }
913
- }), Xi = { class: "truncate text-sm font-medium text-primary" }, Zi = /* @__PURE__ */ R({
913
+ }), Zi = { class: "truncate text-sm font-medium text-primary" }, Qi = /* @__PURE__ */ R({
914
914
  __name: "DunningCaseOverviewCustomerCell",
915
915
  props: { item: {} },
916
916
  setup(e) {
917
917
  return (t, n) => (B(), M(W(X), null, {
918
- default: G(() => [F("span", Xi, U(e.item.customer.name), 1)]),
918
+ default: G(() => [F("span", Zi, U(e.item.customer.name), 1)]),
919
919
  _: 1
920
920
  }));
921
921
  }
922
- }), Qi = /* @__PURE__ */ R({
922
+ }), $i = /* @__PURE__ */ R({
923
923
  __name: "DunningCaseOverviewDaysOverdueCell",
924
924
  props: { item: {} },
925
925
  setup(e) {
@@ -931,10 +931,10 @@ var Ji = { class: "flex w-full items-center justify-end gap-xs" }, Yi = /* @__PU
931
931
  _: 1
932
932
  }));
933
933
  }
934
- }), $i = {
934
+ }), ea = {
935
935
  key: 0,
936
936
  class: "font-mono text-xs text-secondary tabular-nums"
937
- }, ea = /* @__PURE__ */ R({
937
+ }, ta = /* @__PURE__ */ R({
938
938
  __name: "DunningCaseOverviewLastReminderCell",
939
939
  props: { item: {} },
940
940
  setup(e) {
@@ -951,14 +951,14 @@ var Ji = { class: "flex w-full items-center justify-end gap-xs" }, Yi = /* @__PU
951
951
  });
952
952
  });
953
953
  return (e, t) => (B(), M(W(X), null, {
954
- default: G(() => [r.value === null ? N("", !0) : (B(), P("span", $i, U(r.value), 1))]),
954
+ default: G(() => [r.value === null ? N("", !0) : (B(), P("span", ea, U(r.value), 1))]),
955
955
  _: 1
956
956
  }));
957
957
  }
958
- }), ta = {
958
+ }), na = {
959
959
  key: 0,
960
960
  class: "flex min-w-0 items-center gap-sm"
961
- }, na = { class: "truncate text-xs text-primary" }, ra = /* @__PURE__ */ R({
961
+ }, ra = { class: "truncate text-xs text-primary" }, ia = /* @__PURE__ */ R({
962
962
  __name: "DunningCaseOverviewLevelCell",
963
963
  props: { item: {} },
964
964
  setup(e) {
@@ -967,28 +967,28 @@ var Ji = { class: "flex w-full items-center justify-end gap-xs" }, Yi = /* @__PU
967
967
  return e === 0 ? t.t("module.dunning_case.level.none") : t.t("module.dunning_case.level.reminder", { level: e });
968
968
  }
969
969
  return (t, r) => (B(), M(W(X), null, {
970
- default: G(() => [e.item.level === null ? N("", !0) : (B(), P("div", ta, [L(ge, {
970
+ default: G(() => [e.item.level === null ? N("", !0) : (B(), P("div", na, [L(ge, {
971
971
  level: e.item.level,
972
972
  size: "sm"
973
- }, null, 8, ["level"]), F("span", na, U(n(e.item.level)), 1)]))]),
973
+ }, null, 8, ["level"]), F("span", ra, U(n(e.item.level)), 1)]))]),
974
974
  _: 1
975
975
  }));
976
976
  }
977
- }), ia = { class: "w-full text-right font-mono text-sm font-medium text-primary tabular-nums" }, aa = /* @__PURE__ */ R({
977
+ }), aa = { class: "w-full text-right font-mono text-sm font-medium text-primary tabular-nums" }, oa = /* @__PURE__ */ R({
978
978
  __name: "DunningCaseOverviewOutstandingCell",
979
979
  props: { item: {} },
980
980
  setup(e) {
981
981
  let t = C();
982
982
  return (n, r) => (B(), M(W(X), null, {
983
- default: G(() => [F("span", ia, U(W(t).formatMonetary(e.item.outstandingBalance)), 1)]),
983
+ default: G(() => [F("span", aa, U(W(t).formatMonetary(e.item.outstandingBalance)), 1)]),
984
984
  _: 1
985
985
  }));
986
986
  }
987
- }), oa = { class: "flex flex-col items-start gap-xxs" }, sa = /* @__PURE__ */ R({
987
+ }), sa = { class: "flex flex-col items-start gap-xxs" }, ca = /* @__PURE__ */ R({
988
988
  __name: "DunningCaseOverviewReminderCell",
989
989
  props: { item: {} },
990
990
  setup(e) {
991
- let t = e, n = k(), r = j(() => He(t.item.latestCreatedReminder));
991
+ let t = e, n = k(), r = j(() => Ue(t.item.latestCreatedReminder));
992
992
  function i(e) {
993
993
  let t = K.Now.plainDateISO().until(e, { largestUnit: "days" }).days;
994
994
  return t <= 0 ? n.t("module.dunning_case.overview.due_today") : n.t("module.dunning_case.overview.due_in_days", { count: t });
@@ -997,13 +997,13 @@ var Ji = { class: "flex w-full items-center justify-end gap-xs" }, Yi = /* @__PU
997
997
  return K.PlainDate.compare(e, K.Now.plainDateISO()) <= 0;
998
998
  }
999
999
  return (t, n) => (B(), M(W(X), null, {
1000
- default: G(() => [F("div", oa, [e.item.nextReminderOn === null ? N("", !0) : (B(), M(W(Qt), {
1000
+ default: G(() => [F("div", sa, [e.item.nextReminderOn === null ? N("", !0) : (B(), M(W($t), {
1001
1001
  key: 0,
1002
1002
  color: a(e.item.nextReminderOn) ? "success" : "warning",
1003
1003
  label: i(e.item.nextReminderOn),
1004
1004
  size: "sm",
1005
1005
  variant: "translucent"
1006
- }, null, 8, ["color", "label"])), L(We, {
1006
+ }, null, 8, ["color", "label"])), L(Ge, {
1007
1007
  "blocked-reason": e.item.blockedReason,
1008
1008
  status: r.value
1009
1009
  }, null, 8, ["blocked-reason", "status"])])]),
@@ -1013,9 +1013,9 @@ var Ji = { class: "flex w-full items-center justify-end gap-xs" }, Yi = /* @__PU
1013
1013
  });
1014
1014
  //#endregion
1015
1015
  //#region src/modules/dunning-case/use-cases/overview/composables/dunningCaseOverviewTableColumns.composable.ts
1016
- function ca(e) {
1016
+ function la(e) {
1017
1017
  let t = k();
1018
- return j(() => Fn()([
1018
+ return j(() => In()([
1019
1019
  {
1020
1020
  headerLabel: t.t("module.dunning_case.overview.table.customer"),
1021
1021
  key: "customer",
@@ -1023,7 +1023,7 @@ function ca(e) {
1023
1023
  max: "1fr",
1024
1024
  min: "12rem"
1025
1025
  },
1026
- component: (e) => Q(Zi, { item: e })
1026
+ component: (e) => Q(Qi, { item: e })
1027
1027
  },
1028
1028
  {
1029
1029
  headerLabel: t.t("module.dunning_case.overview.table.level"),
@@ -1032,7 +1032,7 @@ function ca(e) {
1032
1032
  max: "10rem",
1033
1033
  min: "8rem"
1034
1034
  },
1035
- component: (e) => Q(ra, { item: e })
1035
+ component: (e) => Q(ia, { item: e })
1036
1036
  },
1037
1037
  {
1038
1038
  headerLabel: t.t("module.dunning_case.overview.table.days_overdue"),
@@ -1041,7 +1041,7 @@ function ca(e) {
1041
1041
  max: "9rem",
1042
1042
  min: "7rem"
1043
1043
  },
1044
- component: (e) => Q(Qi, { item: e })
1044
+ component: (e) => Q($i, { item: e })
1045
1045
  },
1046
1046
  {
1047
1047
  headerLabel: t.t("module.dunning_case.overview.table.next_reminder"),
@@ -1050,7 +1050,7 @@ function ca(e) {
1050
1050
  max: "14rem",
1051
1051
  min: "10rem"
1052
1052
  },
1053
- component: (e) => Q(sa, { item: e })
1053
+ component: (e) => Q(ca, { item: e })
1054
1054
  },
1055
1055
  {
1056
1056
  headerLabel: t.t("module.dunning_case.overview.table.last_reminder"),
@@ -1059,7 +1059,7 @@ function ca(e) {
1059
1059
  max: "12rem",
1060
1060
  min: "9rem"
1061
1061
  },
1062
- component: (e) => Q(ea, { item: e })
1062
+ component: (e) => Q(ta, { item: e })
1063
1063
  },
1064
1064
  {
1065
1065
  headerLabel: t.t("module.dunning_case.overview.table.outstanding"),
@@ -1068,7 +1068,7 @@ function ca(e) {
1068
1068
  max: "10rem",
1069
1069
  min: "8rem"
1070
1070
  },
1071
- component: (e) => Q(aa, { item: e })
1071
+ component: (e) => Q(oa, { item: e })
1072
1072
  },
1073
1073
  {
1074
1074
  headerLabel: "",
@@ -1077,7 +1077,7 @@ function ca(e) {
1077
1077
  max: "11rem",
1078
1078
  min: "9rem"
1079
1079
  },
1080
- component: (t) => Q(Yi, {
1080
+ component: (t) => Q(Xi, {
1081
1081
  item: t,
1082
1082
  onRetry: () => e.onRetry(t),
1083
1083
  onSend: () => e.onSend(t),
@@ -1088,9 +1088,9 @@ function ca(e) {
1088
1088
  }
1089
1089
  //#endregion
1090
1090
  //#region src/modules/dunning-case/api/mutations/dunningCaseBulkSend.mutation.ts
1091
- function la() {
1092
- return Wt({
1093
- queryFn: (e) => E.sendBulk(e.params.queryParams),
1091
+ function ua() {
1092
+ return Gt({
1093
+ queryFn: (e) => _e.sendBulk(e.params.queryParams),
1094
1094
  queryKeysToInvalidate: {
1095
1095
  dunningCaseDetail: {},
1096
1096
  dunningCaseIndex: {}
@@ -1099,7 +1099,7 @@ function la() {
1099
1099
  }
1100
1100
  //#endregion
1101
1101
  //#region src/modules/dunning-case/use-cases/send/components/DunningCaseBulkSendStat.vue
1102
- var ua = /* @__PURE__ */ R({
1102
+ var da = /* @__PURE__ */ R({
1103
1103
  __name: "DunningCaseBulkSendStat",
1104
1104
  props: {
1105
1105
  hasSeparator: { type: Boolean },
@@ -1119,10 +1119,10 @@ var ua = /* @__PURE__ */ R({
1119
1119
  "text-warning-primary": t.tone === "warning"
1120
1120
  }, "mt-xs text-xs font-medium uppercase"]) }, U(t.label), 3)], 2));
1121
1121
  }
1122
- }), da = { class: "flex flex-col gap-md" }, fa = { class: "grid grid-cols-3 overflow-hidden rounded-md border border-secondary" }, pa = { class: "rounded-md bg-success-primary px-lg py-md text-sm font-medium text-success-primary" }, ma = {
1122
+ }), fa = { class: "flex flex-col gap-md" }, pa = { class: "grid grid-cols-3 overflow-hidden rounded-md border border-secondary" }, ma = { class: "rounded-md bg-success-primary px-lg py-md text-sm font-medium text-success-primary" }, ha = {
1123
1123
  key: 0,
1124
1124
  class: "rounded-md border border-secondary px-lg py-md text-sm text-secondary"
1125
- }, ha = /* @__PURE__ */ R({
1125
+ }, ga = /* @__PURE__ */ R({
1126
1126
  __name: "DunningCaseBulkSendSummary",
1127
1127
  props: {
1128
1128
  processableCount: {},
@@ -1147,8 +1147,8 @@ var ua = /* @__PURE__ */ R({
1147
1147
  value: t.skippedCount
1148
1148
  }
1149
1149
  ]);
1150
- return (e, i) => (B(), P("div", da, [
1151
- F("div", fa, [(B(!0), P(A, null, H(r.value, (e, t) => (B(), M(ua, {
1150
+ return (e, i) => (B(), P("div", fa, [
1151
+ F("div", pa, [(B(!0), P(A, null, H(r.value, (e, t) => (B(), M(da, {
1152
1152
  key: e.label,
1153
1153
  "has-separator": t < r.value.length - 1,
1154
1154
  label: e.label,
@@ -1160,14 +1160,14 @@ var ua = /* @__PURE__ */ R({
1160
1160
  "tone",
1161
1161
  "value"
1162
1162
  ]))), 128))]),
1163
- F("p", pa, U(W(n).t("module.dunning_case.bulk_send.processable", { count: t.processableCount })), 1),
1164
- t.skippedCount > 0 ? (B(), P("p", ma, U(W(n).t("module.dunning_case.bulk_send.skipped", { count: t.skippedCount })), 1)) : N("", !0)
1163
+ F("p", ma, U(W(n).t("module.dunning_case.bulk_send.processable", { count: t.processableCount })), 1),
1164
+ t.skippedCount > 0 ? (B(), P("p", ha, U(W(n).t("module.dunning_case.bulk_send.skipped", { count: t.skippedCount })), 1)) : N("", !0)
1165
1165
  ]));
1166
1166
  }
1167
- }), ga = {
1167
+ }), _a = {
1168
1168
  key: 0,
1169
1169
  class: "text-sm text-secondary"
1170
- }, _a = /* @__PURE__ */ R({
1170
+ }, va = /* @__PURE__ */ R({
1171
1171
  __name: "DunningCaseBulkSendDialog",
1172
1172
  props: { onSent: { type: Function } },
1173
1173
  emits: ["close"],
@@ -1182,7 +1182,7 @@ var ua = /* @__PURE__ */ R({
1182
1182
  function o(e) {
1183
1183
  return Object.hasOwn(a, e);
1184
1184
  }
1185
- let s = k(), c = zn(), l = la(), u = V(null), d = V(!0), f = j(() => u.value?.meta.processed ?? 0);
1185
+ let s = k(), c = Bn(), l = ua(), u = V(null), d = V(!0), f = j(() => u.value?.meta.processed ?? 0);
1186
1186
  function p(e) {
1187
1187
  let t = e.errors.at(0)?.errors.at(0)?.code;
1188
1188
  return t !== void 0 && o(t) ? s.t(a[t]) : s.t("module.dunning_case.bulk_send.skip_reason.unknown");
@@ -1198,7 +1198,7 @@ var ua = /* @__PURE__ */ R({
1198
1198
  reason: e
1199
1199
  })).join(", ");
1200
1200
  }
1201
- let h = Hn({
1201
+ let h = Un({
1202
1202
  schema: O.object({}),
1203
1203
  onSubmit: async () => {
1204
1204
  let e = await l.execute({ params: { queryParams: i } });
@@ -1223,18 +1223,18 @@ var ua = /* @__PURE__ */ R({
1223
1223
  }
1224
1224
  });
1225
1225
  async function g() {
1226
- let e = await E.previewBulk(i);
1226
+ let e = await _e.previewBulk(i);
1227
1227
  e.isErr() ? (c.apiError(e.error), r("close")) : (u.value = e.value, d.value = !1);
1228
1228
  }
1229
- return jt(() => {
1229
+ return Mt(() => {
1230
1230
  g();
1231
- }), (e, t) => (B(), M(W(_n), {
1231
+ }), (e, t) => (B(), M(W(vn), {
1232
1232
  form: W(h),
1233
1233
  size: "md",
1234
1234
  onClose: t[0] ||= (e) => r("close")
1235
1235
  }, {
1236
1236
  default: G(() => [
1237
- L(W(pn), {
1237
+ L(W(mn), {
1238
1238
  title: d.value ? W(s).t("module.dunning_case.bulk_send.title") : W(s).t("module.dunning_case.bulk_send.confirm_question", { count: f.value }),
1239
1239
  description: W(s).t("module.dunning_case.bulk_send.description"),
1240
1240
  "has-separator": !1,
@@ -1244,8 +1244,8 @@ var ua = /* @__PURE__ */ R({
1244
1244
  "description",
1245
1245
  "icon"
1246
1246
  ]),
1247
- L(W(cn), null, {
1248
- default: G(() => [u.value === null ? (B(), P("p", ga, U(W(s).t("module.dunning_case.bulk_send.loading")), 1)) : (B(), M(ha, {
1247
+ L(W(ln), null, {
1248
+ default: G(() => [u.value === null ? (B(), P("p", _a, U(W(s).t("module.dunning_case.bulk_send.loading")), 1)) : (B(), M(ga, {
1249
1249
  key: 1,
1250
1250
  "processable-count": u.value.meta.processed,
1251
1251
  "skipped-count": u.value.meta.skipped,
@@ -1257,8 +1257,8 @@ var ua = /* @__PURE__ */ R({
1257
1257
  ]))]),
1258
1258
  _: 1
1259
1259
  }),
1260
- L(W(ln), { "has-separator": !1 }, {
1261
- right: G(() => [L(W(un)), L(W(dn), {
1260
+ L(W(un), { "has-separator": !1 }, {
1261
+ right: G(() => [L(W(dn)), L(W(fn), {
1262
1262
  "icon-right": W(D),
1263
1263
  "is-disabled": d.value || f.value === 0,
1264
1264
  "is-loading": W(h).isSubmitting.value,
@@ -1277,44 +1277,44 @@ var ua = /* @__PURE__ */ R({
1277
1277
  _: 1
1278
1278
  }, 8, ["form"]));
1279
1279
  }
1280
- }), va = { class: "flex min-h-0 flex-1 flex-col gap-xl px-3xl py-xl" }, ya = { class: "flex shrink-0 flex-col gap-lg md:flex-row md:items-center md:justify-between" }, ba = { class: "text-lg font-semibold text-primary" }, xa = { class: "mt-xs text-sm text-secondary" }, Sa = { class: "flex items-center gap-sm" }, Ca = {
1280
+ }), ya = { class: "flex min-h-0 flex-1 flex-col gap-xl px-3xl py-xl" }, ba = { class: "flex shrink-0 flex-col gap-lg md:flex-row md:items-center md:justify-between" }, xa = { class: "text-lg font-semibold text-primary" }, Sa = { class: "mt-xs text-sm text-secondary" }, Ca = { class: "flex items-center gap-sm" }, wa = {
1281
1281
  key: 0,
1282
1282
  class: "shrink-0"
1283
- }, wa = { class: "flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-secondary bg-primary shadow-sm" }, Ta = { class: "flex flex-col gap-md border-b border-secondary p-sm md:flex-row md:items-center md:justify-between" }, Ea = { class: "flex items-center justify-between gap-md border-b border-secondary p-sm" }, Da = {
1283
+ }, Ta = { class: "flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-secondary bg-primary shadow-sm" }, Ea = { class: "flex flex-col gap-md border-b border-secondary p-sm md:flex-row md:items-center md:justify-between" }, Da = { class: "flex items-center justify-between gap-md border-b border-secondary p-sm" }, Oa = {
1284
1284
  key: 0,
1285
1285
  class: "px-sm text-xs text-secondary"
1286
- }, Oa = { class: "relative flex min-h-0 flex-1 flex-col" }, ka = /*@__PURE__*/ R({
1286
+ }, ka = { class: "relative flex min-h-0 flex-1 flex-col" }, Aa = /*@__PURE__*/ R({
1287
1287
  __name: "DunningCaseOverviewView",
1288
1288
  setup(e) {
1289
- let t = k(), n = In(), r = zn(), i = Xt(), a = _(), o = ee(), s = Ke(), c = V("all"), l = j(() => [
1289
+ let t = k(), n = Ln(), r = Bn(), i = Zt(), a = _(), o = ee(), s = qe(), c = V("all"), l = j(() => [
1290
1290
  {
1291
- icon: Oe,
1291
+ icon: ke,
1292
1292
  key: "all",
1293
1293
  label: t.t("module.dunning_case.overview.filter_all")
1294
1294
  },
1295
1295
  {
1296
- icon: Fe,
1296
+ icon: Ie,
1297
1297
  key: "level-1",
1298
1298
  label: t.t("module.dunning_case.level.reminder", { level: 1 })
1299
1299
  },
1300
1300
  {
1301
- icon: Fe,
1301
+ icon: Ie,
1302
1302
  key: "level-2",
1303
1303
  label: t.t("module.dunning_case.level.reminder", { level: 2 })
1304
1304
  },
1305
1305
  {
1306
- icon: Fe,
1306
+ icon: Ie,
1307
1307
  key: "level-3",
1308
1308
  label: t.t("module.dunning_case.level.reminder", { level: 3 })
1309
1309
  }
1310
- ]), u = j(() => c.value === "all" ? null : Number(c.value.replace("level-", ""))), d = V(!0), { customerUuid: f, filters: p } = qi();
1311
- ot(p), a.set(() => t.t("module.dunning_case.title"));
1312
- let { hasLevelCountError: m, isFetchingNextPage: h, isLoading: g, data: v, error: y, fetchNextPage: b, levelCounts: x, levelCountTotal: S, trackBulkSend: C } = Gi({
1310
+ ]), u = j(() => c.value === "all" ? null : Number(c.value.replace("level-", ""))), d = V(!0), { customerUuid: f, filters: p } = Ji();
1311
+ st(p), a.set(() => t.t("module.dunning_case.title"));
1312
+ let { hasLevelCountError: m, isFetchingNextPage: h, isLoading: g, data: v, error: y, fetchNextPage: b, levelCounts: x, levelCountTotal: S, trackBulkSend: C } = Ki({
1313
1313
  customerUuid: f,
1314
1314
  activeLevel: u
1315
1315
  }), w = j(() => p.activeFilters.value.length);
1316
1316
  function te(e) {
1317
- n.create(Je, { props: { dunningCaseUuid: e.uuid } }).open();
1317
+ n.create(Ye, { props: { dunningCaseUuid: e.uuid } }).open();
1318
1318
  }
1319
1319
  async function ne(e) {
1320
1320
  if (e.latestCreatedReminder === null) return;
@@ -1325,7 +1325,7 @@ var ua = /* @__PURE__ */ R({
1325
1325
  });
1326
1326
  }
1327
1327
  function re() {
1328
- n.create(_a, { props: { onSent: C() } }).open();
1328
+ n.create(va, { props: { onSent: C() } }).open();
1329
1329
  }
1330
1330
  function ie(e) {
1331
1331
  let t = o.getCustomerDetailRoute(e.customer.uuid);
@@ -1337,20 +1337,20 @@ var ua = /* @__PURE__ */ R({
1337
1337
  params: { dunningCaseUuid: e.uuid }
1338
1338
  };
1339
1339
  }
1340
- let ae = ji(), oe = Ai(), se = ca({
1340
+ let ae = Mi(), oe = ji(), se = la({
1341
1341
  onRetry: (e) => {
1342
1342
  ne(e);
1343
1343
  },
1344
1344
  onSend: te,
1345
1345
  onViewCustomer: ie
1346
1346
  });
1347
- return (e, n) => (B(), M(W($t), {
1347
+ return (e, n) => (B(), M(W(en), {
1348
1348
  title: W(t).t("module.dunning_case.title"),
1349
1349
  "is-title-hidden": !0
1350
1350
  }, {
1351
- default: G(() => [F("div", va, [
1352
- F("div", ya, [F("div", null, [F("h2", ba, U(W(t).t("module.dunning_case.title")), 1), F("p", xa, U(W(t).t("module.dunning_case.overview.description")), 1)]), F("div", Sa, [L(W(q), {
1353
- "icon-left": d.value ? W(Ce) : W(ke),
1351
+ default: G(() => [F("div", ya, [
1352
+ F("div", ba, [F("div", null, [F("h2", xa, U(W(t).t("module.dunning_case.title")), 1), F("p", Sa, U(W(t).t("module.dunning_case.overview.description")), 1)]), F("div", Ca, [L(W(q), {
1353
+ "icon-left": d.value ? W(Ce) : W(Ae),
1354
1354
  label: W(t).t(d.value ? "module.dunning_case.overview.hide_metrics" : "module.dunning_case.overview.show_metrics"),
1355
1355
  variant: "secondary",
1356
1356
  onClick: n[0] ||= (e) => d.value = !d.value
@@ -1359,7 +1359,7 @@ var ua = /* @__PURE__ */ R({
1359
1359
  label: W(t).t("module.dunning_case.overview.send_all"),
1360
1360
  onClick: re
1361
1361
  }, null, 8, ["icon-right", "label"])])]),
1362
- d.value ? (B(), P("div", Ca, [L(Hi, {
1362
+ d.value ? (B(), P("div", wa, [L(Ui, {
1363
1363
  "has-level-count-error": W(m),
1364
1364
  "level-counts": W(x),
1365
1365
  "level-count-total": W(S)
@@ -1368,15 +1368,15 @@ var ua = /* @__PURE__ */ R({
1368
1368
  "level-counts",
1369
1369
  "level-count-total"
1370
1370
  ])])) : N("", !0),
1371
- F("div", wa, [
1372
- F("div", Ta, [L(W(Tn), {
1371
+ F("div", Ta, [
1372
+ F("div", Ea, [L(W(En), {
1373
1373
  modelValue: c.value,
1374
1374
  "onUpdate:modelValue": n[1] ||= (e) => c.value = e,
1375
1375
  "aria-label": W(t).t("module.dunning_case.overview.filter_label"),
1376
1376
  variant: "button-border"
1377
1377
  }, {
1378
- default: G(() => [L(W(Dn), null, {
1379
- default: G(() => [(B(!0), P(A, null, H(l.value, (e) => (B(), M(W(En), {
1378
+ default: G(() => [L(W(On), null, {
1379
+ default: G(() => [(B(!0), P(A, null, H(l.value, (e) => (B(), M(W(Dn), {
1380
1380
  key: e.key,
1381
1381
  config: { left: {
1382
1382
  icon: e.icon,
@@ -1398,8 +1398,8 @@ var ua = /* @__PURE__ */ R({
1398
1398
  size: "sm",
1399
1399
  onClick: re
1400
1400
  }, null, 8, ["icon-right", "label"])]),
1401
- F("div", Ea, [w.value === 0 ? (B(), P("p", Da, U(W(t).t("module.dunning_case.overview.no_active_filters")), 1)) : (B(), M(W(st), { key: 1 })), L(W(lt))]),
1402
- F("div", Oa, [L(W(Sn), {
1401
+ F("div", Da, [w.value === 0 ? (B(), P("p", Oa, U(W(t).t("module.dunning_case.overview.no_active_filters")), 1)) : (B(), M(W(ct), { key: 1 })), L(W(ut))]),
1402
+ F("div", ka, [L(W(Cn), {
1403
1403
  "active-filter-count": w.value,
1404
1404
  columns: W(se),
1405
1405
  data: W(v),
@@ -1434,16 +1434,16 @@ var ua = /* @__PURE__ */ R({
1434
1434
  _: 1
1435
1435
  }, 8, ["title"]));
1436
1436
  }
1437
- }), Aa = /* @__PURE__ */ Gn({ default: () => ja }), ja = ka, Ma = class e {
1437
+ }), ja = /* @__PURE__ */ Kn({ default: () => Ma }), Ma = Aa, Na = class e {
1438
1438
  static fromInvoiceDto(e) {
1439
1439
  return {
1440
1440
  dueOn: be.fromDto(e.dueOn),
1441
1441
  issuedOn: be.fromDto(e.issuedOn),
1442
1442
  isNew: e.isNew,
1443
1443
  daysOverdue: e.daysOverdue,
1444
- fee: ve.fromDto(e.fee),
1444
+ fee: E.fromDto(e.fee),
1445
1445
  level: e.level,
1446
- outstandingBalance: ve.fromDto(e.outstandingBalance),
1446
+ outstandingBalance: E.fromDto(e.outstandingBalance),
1447
1447
  sequence: e.sequence
1448
1448
  };
1449
1449
  }
@@ -1455,7 +1455,7 @@ var ua = /* @__PURE__ */ R({
1455
1455
  daysOverdue: e.daysOverdue,
1456
1456
  fee: null,
1457
1457
  level: null,
1458
- outstandingBalance: ve.fromDto(e.outstandingBalance),
1458
+ outstandingBalance: E.fromDto(e.outstandingBalance),
1459
1459
  sequence: e.sequence
1460
1460
  };
1461
1461
  }
@@ -1486,32 +1486,32 @@ var ua = /* @__PURE__ */ R({
1486
1486
  name: t.recipient.name,
1487
1487
  email: t.recipient.email
1488
1488
  },
1489
- totalFee: ve.fromDto(t.totalFee)
1489
+ totalFee: E.fromDto(t.totalFee)
1490
1490
  };
1491
1491
  }
1492
- }, Na = class {
1492
+ }, Pa = class {
1493
1493
  static async get(e) {
1494
1494
  return (await i.fromPromise(r({
1495
1495
  query: { token: e },
1496
1496
  responseValidator: void 0
1497
- }))).map((e) => Ma.fromPublicDto(e.data));
1497
+ }))).map((e) => Na.fromPublicDto(e.data));
1498
1498
  }
1499
1499
  };
1500
1500
  //#endregion
1501
1501
  //#region src/modules/dunning-case/use-cases/pdf/api/dunningCaseReminderPdf.query.ts
1502
- function Pa(e) {
1503
- return Kt("dunningCaseReminderPdf", {
1502
+ function Fa(e) {
1503
+ return qt("dunningCaseReminderPdf", {
1504
1504
  isEnabled: j(() => e.value !== null),
1505
1505
  params: { token: e },
1506
1506
  queryFn: () => {
1507
1507
  if (e.value === null) throw Error("Token is required to fetch a dunning reminder PDF");
1508
- return Na.get(e.value);
1508
+ return Pa.get(e.value);
1509
1509
  }
1510
1510
  });
1511
1511
  }
1512
1512
  //#endregion
1513
1513
  //#region src/modules/dunning-case/use-cases/pdf/components/DunningCaseReminderPdfFooter.vue
1514
- var Fa = /* @__PURE__ */ R({
1514
+ var Ia = /* @__PURE__ */ R({
1515
1515
  __name: "DunningCaseReminderPdfFooter",
1516
1516
  props: { issuer: {} },
1517
1517
  setup(e) {
@@ -1553,11 +1553,11 @@ var Fa = /* @__PURE__ */ R({
1553
1553
  _: 1
1554
1554
  }));
1555
1555
  }
1556
- }), Ia = {
1556
+ }), La = {
1557
1557
  introKey: "module.dunning_case.pdf.body.intro_repeat",
1558
1558
  paymentKey: "module.dunning_case.pdf.body.payment.level_3",
1559
1559
  subtitleKey: "module.dunning_case.pdf.subtitle.level_3"
1560
- }, La = {
1560
+ }, Ra = {
1561
1561
  1: {
1562
1562
  introKey: "module.dunning_case.pdf.body.intro_first",
1563
1563
  paymentKey: "module.dunning_case.pdf.body.payment.level_1",
@@ -1568,8 +1568,8 @@ var Fa = /* @__PURE__ */ R({
1568
1568
  paymentKey: "module.dunning_case.pdf.body.payment.level_2",
1569
1569
  subtitleKey: "module.dunning_case.pdf.subtitle.level_2"
1570
1570
  },
1571
- 3: Ia
1572
- }, Ra = class {
1571
+ 3: La
1572
+ }, za = class {
1573
1573
  static add(e, t) {
1574
1574
  return {
1575
1575
  amount: e.amount + t.amount,
@@ -1578,7 +1578,7 @@ var Fa = /* @__PURE__ */ R({
1578
1578
  };
1579
1579
  }
1580
1580
  static getLetterCopy(e) {
1581
- return La[e] ?? Ia;
1581
+ return Ra[e] ?? La;
1582
1582
  }
1583
1583
  static getTotal(e) {
1584
1584
  let [t] = e;
@@ -1588,11 +1588,11 @@ var Fa = /* @__PURE__ */ R({
1588
1588
  precision: t.outstandingBalance.precision
1589
1589
  };
1590
1590
  }
1591
- }, za = { class: "font-medium whitespace-nowrap" }, Ba = /* @__PURE__ */ R({
1591
+ }, Ba = { class: "font-medium whitespace-nowrap" }, Va = /* @__PURE__ */ R({
1592
1592
  __name: "DunningCaseReminderPdfHeader",
1593
1593
  props: { reminder: {} },
1594
1594
  setup(e) {
1595
- let t = e, n = k(), r = Ze(), i = j(() => t.reminder.issuer.name ?? n.t("module.dunning_case.pdf.not_available")), a = j(() => ae.formatLines(t.reminder.customer.address)), o = j(() => n.t(Ra.getLetterCopy(t.reminder.level).subtitleKey)), s = j(() => t.reminder.sentAt === null ? n.t("module.dunning_case.pdf.created_date") : n.t("module.dunning_case.pdf.reminder_date")), c = j(() => r.toDate(t.reminder.sentAt ?? t.reminder.createdAt));
1595
+ let t = e, n = k(), r = Qe(), i = j(() => t.reminder.issuer.name ?? n.t("module.dunning_case.pdf.not_available")), a = j(() => ae.formatLines(t.reminder.customer.address)), o = j(() => n.t(za.getLetterCopy(t.reminder.level).subtitleKey)), s = j(() => t.reminder.sentAt === null ? n.t("module.dunning_case.pdf.created_date") : n.t("module.dunning_case.pdf.reminder_date")), c = j(() => r.toDate(t.reminder.sentAt ?? t.reminder.createdAt));
1596
1596
  return (e, r) => (B(), M(W(J), {
1597
1597
  as: "header",
1598
1598
  align: "center",
@@ -1650,7 +1650,7 @@ var Fa = /* @__PURE__ */ R({
1650
1650
  justify: "between",
1651
1651
  class: "w-36.25 leading-4.5"
1652
1652
  }, {
1653
- default: G(() => [F("dt", za, U(s.value), 1), F("dd", null, U(c.value), 1)]),
1653
+ default: G(() => [F("dt", Ba, U(s.value), 1), F("dd", null, U(c.value), 1)]),
1654
1654
  _: 1
1655
1655
  })]),
1656
1656
  _: 1
@@ -1658,16 +1658,16 @@ var Fa = /* @__PURE__ */ R({
1658
1658
  _: 1
1659
1659
  }));
1660
1660
  }
1661
- }), Va = { class: "overflow-hidden rounded-xs border border-secondary print:overflow-visible" }, Ha = { class: "w-full table-fixed border-collapse text-left text-[9px] text-primary" }, Ua = { class: "bg-secondary-subtle" }, Wa = { class: "truncate px-lg" }, Ga = { class: "font-medium" }, Ka = { class: "block text-[7px] text-secondary" }, qa = { class: "truncate px-sm font-medium" }, Ja = {
1661
+ }), Ha = { class: "overflow-hidden rounded-xs border border-secondary print:overflow-visible" }, Ua = { class: "w-full table-fixed border-collapse text-left text-[9px] text-primary" }, Wa = { class: "bg-secondary-subtle" }, Ga = { class: "truncate px-lg" }, Ka = { class: "font-medium" }, qa = { class: "block text-[7px] text-secondary" }, Ja = { class: "truncate px-sm font-medium" }, Ya = {
1662
1662
  key: 0,
1663
1663
  class: "px-sm"
1664
- }, Ya = { class: "px-sm" }, Xa = { class: "truncate px-lg text-right font-semibold" }, Za = {
1664
+ }, Xa = { class: "px-sm" }, Za = { class: "truncate px-lg text-right font-semibold" }, Qa = {
1665
1665
  key: 1,
1666
1666
  class: "truncate px-sm text-right font-semibold"
1667
- }, Qa = {
1667
+ }, $a = {
1668
1668
  key: 2,
1669
1669
  class: "px-sm text-center"
1670
- }, $a = /* @__PURE__ */ R({
1670
+ }, eo = /* @__PURE__ */ R({
1671
1671
  __name: "DunningCaseReminderPdfTable",
1672
1672
  props: {
1673
1673
  isOverdue: {
@@ -1677,7 +1677,7 @@ var Fa = /* @__PURE__ */ R({
1677
1677
  rows: {}
1678
1678
  },
1679
1679
  setup(e) {
1680
- let t = e, n = k(), r = C(), i = Ze(), a = j(() => t.isOverdue ? [
1680
+ let t = e, n = k(), r = C(), i = Qe(), a = j(() => t.isOverdue ? [
1681
1681
  {
1682
1682
  class: "w-21.5 px-lg",
1683
1683
  label: n.t("module.dunning_case.pdf.table.invoice")
@@ -1724,27 +1724,27 @@ var Fa = /* @__PURE__ */ R({
1724
1724
  label: n.t("module.dunning_case.pdf.table.remaining_balance")
1725
1725
  }
1726
1726
  ]);
1727
- return (e, n) => (B(), P("div", Va, [F("table", Ha, [F("thead", Ua, [F("tr", null, [(B(!0), P(A, null, H(a.value, (e) => (B(), P("th", {
1727
+ return (e, n) => (B(), P("div", Ha, [F("table", Ua, [F("thead", Wa, [F("tr", null, [(B(!0), P(A, null, H(a.value, (e) => (B(), P("th", {
1728
1728
  key: e.label,
1729
1729
  class: z([e.class, "h-(--spacing-3xl) py-md font-semibold"])
1730
1730
  }, U(e.label), 3))), 128))])]), F("tbody", null, [(B(!0), P(A, null, H(t.rows, (e, n) => (B(), P("tr", {
1731
1731
  key: `${e.sequence}-${n}`,
1732
1732
  class: "h-(--spacing-3xl) break-inside-avoid border-t border-secondary even:bg-secondary-subtle"
1733
1733
  }, [
1734
- F("td", Wa, [F("span", Ga, U(e.sequence), 1), F("span", Ka, U(W(i).formatPlainDate(e.issuedOn)), 1)]),
1735
- F("td", qa, U(W(i).formatPlainDate(e.dueOn)), 1),
1736
- t.isOverdue ? (B(), P("td", Ja, U(e.level), 1)) : N("", !0),
1737
- F("td", Ya, U(t.isOverdue ? e.daysOverdue : -e.daysOverdue), 1),
1738
- F("td", Xa, U(W(r).formatMonetary(e.outstandingBalance)), 1),
1739
- t.isOverdue ? (B(), P("td", Za, U(e.fee === null ? "-" : W(r).formatMonetary(e.fee)), 1)) : N("", !0),
1740
- t.isOverdue ? (B(), P("td", Qa, U(e.isNew ? "✓" : ""), 1)) : N("", !0)
1734
+ F("td", Ga, [F("span", Ka, U(e.sequence), 1), F("span", qa, U(W(i).formatPlainDate(e.issuedOn)), 1)]),
1735
+ F("td", Ja, U(W(i).formatPlainDate(e.dueOn)), 1),
1736
+ t.isOverdue ? (B(), P("td", Ya, U(e.level), 1)) : N("", !0),
1737
+ F("td", Xa, U(t.isOverdue ? e.daysOverdue : -e.daysOverdue), 1),
1738
+ F("td", Za, U(W(r).formatMonetary(e.outstandingBalance)), 1),
1739
+ t.isOverdue ? (B(), P("td", Qa, U(e.fee === null ? "-" : W(r).formatMonetary(e.fee)), 1)) : N("", !0),
1740
+ t.isOverdue ? (B(), P("td", $a, U(e.isNew ? "✓" : ""), 1)) : N("", !0)
1741
1741
  ]))), 128))])])]));
1742
1742
  }
1743
- }), eo = /* @__PURE__ */ R({
1743
+ }), to = /* @__PURE__ */ R({
1744
1744
  __name: "DunningCaseReminderPdfTotals",
1745
1745
  props: { reminder: {} },
1746
1746
  setup(e) {
1747
- let t = e, n = k(), r = C(), i = j(() => Ra.getTotal(t.reminder.invoices)), a = j(() => i.value === null ? null : Ra.add(i.value, t.reminder.totalFee));
1747
+ let t = e, n = k(), r = C(), i = j(() => za.getTotal(t.reminder.invoices)), a = j(() => i.value === null ? null : za.add(i.value, t.reminder.totalFee));
1748
1748
  function o(e) {
1749
1749
  return e === null ? n.t("module.dunning_case.pdf.not_available") : r.formatMonetary(e);
1750
1750
  }
@@ -1782,28 +1782,28 @@ var Fa = /* @__PURE__ */ R({
1782
1782
  _: 1
1783
1783
  }));
1784
1784
  }
1785
- }), to = { class: "min-h-screen bg-secondary py-4xl print:bg-primary print:p-none" }, no = /* @__PURE__ */ R({
1785
+ }), no = { class: "min-h-screen bg-secondary py-4xl print:bg-primary print:p-none" }, ro = /* @__PURE__ */ R({
1786
1786
  __name: "DunningCaseReminderPdfView",
1787
1787
  props: { reminder: {} },
1788
1788
  setup(e) {
1789
- let t = e, n = k(), r = Qe(), i = re(), a = n.locale.value, o = {
1789
+ let t = e, n = k(), r = $e(), i = re(), a = n.locale.value, o = {
1790
1790
  dateFormat: r.dateFormat.value,
1791
1791
  locale: r.locale.value
1792
1792
  };
1793
1793
  n.locale.value = t.reminder.customer.locale, r.update({
1794
1794
  dateFormat: "locale-default",
1795
1795
  locale: t.reminder.customer.locale
1796
- }), Mt(() => {
1796
+ }), Nt(() => {
1797
1797
  n.locale.value = a, r.update(o);
1798
1798
  }), i.set(() => n.t("module.dunning_case.pdf.document_title", { customer: t.reminder.customer.name }));
1799
- let s = j(() => Ra.getLetterCopy(t.reminder.level)), c = j(() => t.reminder.issuer.name ?? n.t("module.dunning_case.pdf.not_available")), l = j(() => t.reminder.issuer.bankAccountNumber ?? t.reminder.issuer.alternativeBankAccountNumber ?? n.t("module.dunning_case.pdf.not_available"));
1800
- return (e, r) => (B(), P("main", to, [L(W(J), {
1799
+ let s = j(() => za.getLetterCopy(t.reminder.level)), c = j(() => t.reminder.issuer.name ?? n.t("module.dunning_case.pdf.not_available")), l = j(() => t.reminder.issuer.bankAccountNumber ?? t.reminder.issuer.alternativeBankAccountNumber ?? n.t("module.dunning_case.pdf.not_available"));
1800
+ return (e, r) => (B(), P("main", no, [L(W(J), {
1801
1801
  as: "article",
1802
1802
  align: "stretch",
1803
1803
  class: "mx-auto min-h-210.5 w-148.75 bg-primary px-5xl text-[10px] text-primary shadow-card [-webkit-print-color-adjust:exact] [print-color-adjust:exact] print:min-h-[297mm] print:w-[210mm] print:shadow-none"
1804
1804
  }, {
1805
1805
  default: G(() => [
1806
- L(Ba, { reminder: t.reminder }, null, 8, ["reminder"]),
1806
+ L(Va, { reminder: t.reminder }, null, 8, ["reminder"]),
1807
1807
  L(W(J), {
1808
1808
  as: "section",
1809
1809
  align: "stretch"
@@ -1819,7 +1819,7 @@ var Fa = /* @__PURE__ */ R({
1819
1819
  }, null, 8, ["text"])]),
1820
1820
  _: 1
1821
1821
  }),
1822
- F("section", null, [L($a, {
1822
+ F("section", null, [L(eo, {
1823
1823
  rows: t.reminder.invoices,
1824
1824
  "is-overdue": ""
1825
1825
  }, null, 8, ["rows"])]),
@@ -1827,7 +1827,7 @@ var Fa = /* @__PURE__ */ R({
1827
1827
  as: "section",
1828
1828
  justify: "end"
1829
1829
  }, {
1830
- default: G(() => [L(eo, { reminder: t.reminder }, null, 8, ["reminder"])]),
1830
+ default: G(() => [L(to, { reminder: t.reminder }, null, 8, ["reminder"])]),
1831
1831
  _: 1
1832
1832
  }),
1833
1833
  L(W(J), {
@@ -1874,58 +1874,58 @@ var Fa = /* @__PURE__ */ R({
1874
1874
  truncate: !1,
1875
1875
  as: "p",
1876
1876
  class: "break-after-avoid font-medium"
1877
- }, null, 8, ["text"]), L($a, { rows: t.reminder.outstandingInvoices }, null, 8, ["rows"])]),
1877
+ }, null, 8, ["text"]), L(eo, { rows: t.reminder.outstandingInvoices }, null, 8, ["rows"])]),
1878
1878
  _: 1
1879
1879
  })) : N("", !0),
1880
- L(Fa, { issuer: t.reminder.issuer }, null, 8, ["issuer"])
1880
+ L(Ia, { issuer: t.reminder.issuer }, null, 8, ["issuer"])
1881
1881
  ]),
1882
1882
  _: 1
1883
1883
  })]));
1884
1884
  }
1885
- }), ro = ["data-pdf-error"], io = { key: 1 }, ao = /*@__PURE__*/ R({
1885
+ }), io = ["data-pdf-error"], ao = { key: 1 }, oo = /*@__PURE__*/ R({
1886
1886
  __name: "DunningCaseReminderPdfViewDataProvider",
1887
1887
  setup(e) {
1888
- let t = k(), n = Un("token", null), r = Pa(j(() => n.value)), i = j(() => r.result.value?.isOk() ? r.result.value.getValue() : null), a = j(() => n.value === null ? {
1888
+ let t = k(), n = Wn("token", null), r = Fa(j(() => n.value)), i = j(() => r.result.value?.isOk() ? r.result.value.getValue() : null), a = j(() => n.value === null ? {
1889
1889
  title: t.t("module.dunning_case.pdf.missing_token_title"),
1890
1890
  description: t.t("module.dunning_case.pdf.missing_token_description")
1891
1891
  } : r.result.value?.isErr() === !0 ? {
1892
1892
  title: t.t("module.dunning_case.pdf.load_error_title"),
1893
1893
  description: t.t("module.dunning_case.pdf.load_error_description")
1894
1894
  } : null);
1895
- return (e, n) => (B(), M(W(An), { appearance: "light" }, {
1895
+ return (e, n) => (B(), M(W(jn), { appearance: "light" }, {
1896
1896
  default: G(() => [i.value === null ? (B(), P("main", {
1897
1897
  key: 1,
1898
1898
  "data-pdf-error": a.value !== null || void 0,
1899
1899
  class: "flex min-h-screen items-center justify-center bg-secondary p-xl text-primary"
1900
- }, [a.value === null ? (B(), P("p", io, U(W(t).t("module.dunning_case.common.loading")), 1)) : (B(), M(W(mn), {
1900
+ }, [a.value === null ? (B(), P("p", ao, U(W(t).t("module.dunning_case.common.loading")), 1)) : (B(), M(W(hn), {
1901
1901
  key: 0,
1902
1902
  description: a.value.description,
1903
1903
  title: a.value.title
1904
- }, null, 8, ["description", "title"]))], 8, ro)) : (B(), M(no, {
1904
+ }, null, 8, ["description", "title"]))], 8, io)) : (B(), M(ro, {
1905
1905
  key: 0,
1906
1906
  reminder: i.value
1907
1907
  }, null, 8, ["reminder"]))]),
1908
1908
  _: 1
1909
1909
  }));
1910
1910
  }
1911
- }), oo = /* @__PURE__ */ Gn({ default: () => so }), so = ao;
1911
+ }), so = /* @__PURE__ */ Kn({ default: () => co }), co = oo;
1912
1912
  //#endregion
1913
1913
  //#region src/modules/dunning-case/api/mutations/reminderConfigUpdate.mutation.ts
1914
- function co() {
1915
- return Wt({
1916
- queryFn: (e) => E.updateReminderConfigs(e.body),
1914
+ function lo() {
1915
+ return Gt({
1916
+ queryFn: (e) => _e.updateReminderConfigs(e.body),
1917
1917
  queryKeysToInvalidate: { reminderConfig: {} }
1918
1918
  });
1919
1919
  }
1920
1920
  //#endregion
1921
1921
  //#region src/modules/dunning-case/models/reminderConfigForm.model.ts
1922
- function lo(e) {
1922
+ function uo(e) {
1923
1923
  return e.trim().length > 0;
1924
1924
  }
1925
- var uo = O.object({
1926
- body: O.string().refine(lo, n.global.t("module.dunning_case.settings.validation.required")),
1927
- subject: O.string().refine(lo, n.global.t("module.dunning_case.settings.validation.required"))
1928
- }), fo = O.object({
1925
+ var fo = O.object({
1926
+ body: O.string().refine(uo, n.global.t("module.dunning_case.settings.validation.required")),
1927
+ subject: O.string().refine(uo, n.global.t("module.dunning_case.settings.validation.required"))
1928
+ }), po = O.object({
1929
1929
  feeAmount: O.number().min(0),
1930
1930
  feeCurrency: O.enum(d),
1931
1931
  feePercentage: O.number().min(0).max(100),
@@ -1935,11 +1935,11 @@ var uo = O.object({
1935
1935
  schedule: O.enum(s),
1936
1936
  sequence: O.number().int().min(1).max(3),
1937
1937
  template: O.object({
1938
- "en-US": uo,
1939
- "fr-BE": uo,
1940
- "nl-BE": uo
1938
+ "en-US": fo,
1939
+ "fr-BE": fo,
1940
+ "nl-BE": fo
1941
1941
  })
1942
- }), po = O.object({ reminders: O.array(fo).length(3) }).superRefine((e, t) => {
1942
+ }), mo = O.object({ reminders: O.array(po).length(3) }).superRefine((e, t) => {
1943
1943
  e.reminders[0]?.schedule !== s.AFTER_DUE_DATE && t.addIssue({
1944
1944
  code: "custom",
1945
1945
  message: n.global.t("module.dunning_case.settings.validation.level_one_due_date"),
@@ -1963,22 +1963,22 @@ var uo = O.object({
1963
1963
  }), r = e;
1964
1964
  }
1965
1965
  });
1966
- function mo(e) {
1967
- return !lo(e.subject ?? "") || !lo(e.body ?? "");
1966
+ function ho(e) {
1967
+ return !uo(e.subject ?? "") || !uo(e.body ?? "");
1968
1968
  }
1969
1969
  //#endregion
1970
1970
  //#region src/modules/dunning-case/use-cases/settings/components/ReminderLadderFeeNotice.vue?vue&type=script&setup=true&lang.ts
1971
- var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "rounded-md border border-secondary bg-primary px-lg py-md" }, _o = { class: "cursor-pointer text-sm font-medium text-primary" }, vo = { class: "mt-md text-sm text-secondary" }, yo = { class: "font-semibold text-primary" }, bo = { class: "mt-md text-sm text-secondary" }, xo = /* @__PURE__ */ R({
1971
+ var go = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, _o = { class: "rounded-md border border-secondary bg-primary px-lg py-md" }, vo = { class: "cursor-pointer text-sm font-medium text-primary" }, yo = { class: "mt-md text-sm text-secondary" }, bo = { class: "font-semibold text-primary" }, xo = { class: "mt-md text-sm text-secondary" }, So = /* @__PURE__ */ R({
1972
1972
  __name: "ReminderLadderFeeNotice",
1973
1973
  setup(e) {
1974
1974
  let t = k();
1975
- return (e, n) => (B(), P("div", ho, [F("details", go, [
1976
- F("summary", _o, U(W(t).t("module.dunning_case.settings.ladder.fee_law_title")), 1),
1977
- F("p", vo, [F("strong", yo, U(W(t).t("module.dunning_case.settings.ladder.fee_notice_title")), 1), I(" " + U(W(t).t("module.dunning_case.settings.ladder.fee_notice")), 1)]),
1978
- F("p", bo, U(W(t).t("module.dunning_case.settings.ladder.fee_law_description")), 1)
1975
+ return (e, n) => (B(), P("div", go, [F("details", _o, [
1976
+ F("summary", vo, U(W(t).t("module.dunning_case.settings.ladder.fee_law_title")), 1),
1977
+ F("p", yo, [F("strong", bo, U(W(t).t("module.dunning_case.settings.ladder.fee_notice_title")), 1), I(" " + U(W(t).t("module.dunning_case.settings.ladder.fee_notice")), 1)]),
1978
+ F("p", xo, U(W(t).t("module.dunning_case.settings.ladder.fee_law_description")), 1)
1979
1979
  ])]));
1980
1980
  }
1981
- }), So = { class: "grid grid-cols-[7.5rem_minmax(0,1fr)] items-start gap-x-lg gap-y-xl border-b border-secondary py-2xl last:border-b-0 sm:grid-cols-[7.5rem_13.5rem_11.25rem_minmax(0,1fr)] sm:gap-3xl sm:py-3xl" }, Co = { class: "flex flex-col items-start gap-xs" }, wo = { class: "text-xs text-primary" }, To = { class: "col-start-2 flex flex-col gap-xs sm:col-auto" }, Eo = { class: "text-xs font-medium text-secondary sm:hidden" }, Do = { class: "col-start-2 flex flex-col items-start gap-xs sm:col-auto" }, Oo = { class: "text-xs font-medium text-secondary sm:hidden" }, ko = { class: "text-xs whitespace-nowrap text-secondary" }, Ao = { class: "col-start-2 flex flex-col gap-xs sm:col-auto" }, jo = { class: "text-xs font-medium text-secondary sm:hidden" }, Mo = { class: "flex items-start gap-sm sm:max-w-80" }, No = { class: "min-w-0 flex-1" }, Po = { class: "w-28 shrink-0 [&_input]:min-w-0!" }, Fo = { class: "pr-md text-xs text-secondary" }, Io = /* @__PURE__ */ R({
1981
+ }), Co = { class: "grid grid-cols-[7.5rem_minmax(0,1fr)] items-start gap-x-lg gap-y-xl border-b border-secondary py-2xl last:border-b-0 sm:grid-cols-[7.5rem_13.5rem_11.25rem_minmax(0,1fr)] sm:gap-3xl sm:py-3xl" }, wo = { class: "flex flex-col items-start gap-xs" }, To = { class: "text-xs text-primary" }, Eo = { class: "col-start-2 flex flex-col gap-xs sm:col-auto" }, Do = { class: "text-xs font-medium text-secondary sm:hidden" }, Oo = { class: "col-start-2 flex flex-col items-start gap-xs sm:col-auto" }, ko = { class: "text-xs font-medium text-secondary sm:hidden" }, Ao = { class: "text-xs whitespace-nowrap text-secondary" }, jo = { class: "col-start-2 flex flex-col gap-xs sm:col-auto" }, Mo = { class: "text-xs font-medium text-secondary sm:hidden" }, No = { class: "flex items-start gap-sm sm:max-w-80" }, Po = { class: "min-w-0 flex-1" }, Fo = { class: "w-28 shrink-0 [&_input]:min-w-0!" }, Io = { class: "pr-md text-xs text-secondary" }, Lo = /* @__PURE__ */ R({
1982
1982
  __name: "ReminderLadderRow",
1983
1983
  props: {
1984
1984
  absoluteDay: {},
@@ -1999,7 +1999,7 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
1999
1999
  "updateSchedule"
2000
2000
  ],
2001
2001
  setup(e, { emit: t }) {
2002
- let n = e, r = t, i = k(), a = j(() => !n.canUpdate || n.level === 1), o = j(() => n.feeTypeField.modelValue.value ?? h.AMOUNT), c = j(() => Pn([h.AMOUNT, h.PERCENTAGE])), l = {
2002
+ let n = e, r = t, i = k(), a = j(() => !n.canUpdate || n.level === 1), o = j(() => n.feeTypeField.modelValue.value ?? h.AMOUNT), c = j(() => Fn([h.AMOUNT, h.PERCENTAGE])), l = {
2003
2003
  maximumFractionDigits: 2,
2004
2004
  minimumFractionDigits: 0
2005
2005
  }, u = { maximumFractionDigits: 2 }, d = j(() => n.feeCurrency === void 0 ? "" : new Intl.NumberFormat(i.locale.value, {
@@ -2012,12 +2012,12 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2012
2012
  function p(e) {
2013
2013
  return i.t(e === h.PERCENTAGE ? "module.dunning_case.settings.ladder.fee_type_percentage" : "module.dunning_case.settings.ladder.fee_type_amount");
2014
2014
  }
2015
- return (e, t) => (B(), P("div", So, [
2016
- F("div", Co, [F("span", wo, U(W(i).t("module.dunning_case.level.reminder", { level: n.level })), 1), L(ge, {
2015
+ return (e, t) => (B(), P("div", Co, [
2016
+ F("div", wo, [F("span", To, U(W(i).t("module.dunning_case.level.reminder", { level: n.level })), 1), L(ge, {
2017
2017
  level: n.level,
2018
2018
  size: "md"
2019
2019
  }, null, 8, ["level"])]),
2020
- F("div", To, [F("span", Eo, U(W(i).t("module.dunning_case.settings.ladder.trigger")), 1), L(W(xn), Ot(W(ft)(n.scheduleField), {
2020
+ F("div", Eo, [F("span", Do, U(W(i).t("module.dunning_case.settings.ladder.trigger")), 1), L(W(Sn), kt(W(pt)(n.scheduleField), {
2021
2021
  "aria-label": W(i).t("module.dunning_case.settings.ladder.trigger"),
2022
2022
  "display-fn": f,
2023
2023
  "is-disabled": a.value,
@@ -2029,12 +2029,12 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2029
2029
  "is-disabled",
2030
2030
  "items"
2031
2031
  ])]),
2032
- F("div", Do, [F("span", Oo, U(W(i).t("module.dunning_case.settings.ladder.offset")), 1), F("div", {
2032
+ F("div", Oo, [F("span", ko, U(W(i).t("module.dunning_case.settings.ladder.offset")), 1), F("div", {
2033
2033
  class: "flex flex-col items-start gap-xs sm:flex-row sm:items-center",
2034
2034
  onFocusoutCapture: t[2] ||= (e) => r("commitOffset"),
2035
2035
  onInputCapture: t[3] ||= (e) => r("typeOffset", !0),
2036
2036
  onInput: t[4] ||= (e) => r("typeOffset", !1)
2037
- }, [L(W(yn), Ot(W(ft)(n.offsetField), {
2037
+ }, [L(W(bn), kt(W(pt)(n.offsetField), {
2038
2038
  "aria-label": W(i).t("module.dunning_case.settings.ladder.offset"),
2039
2039
  "is-disabled": !n.canUpdate,
2040
2040
  label: null,
@@ -2044,8 +2044,8 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2044
2044
  class: "w-30",
2045
2045
  size: "sm",
2046
2046
  "onUpdate:modelValue": t[1] ||= (e) => r("updateOffset", e)
2047
- }), null, 16, ["aria-label", "is-disabled"]), F("span", ko, U(W(i).t("module.dunning_case.settings.ladder.day_hint", { day: n.absoluteDay })), 1)], 32)]),
2048
- F("div", Ao, [F("span", jo, U(W(i).t("module.dunning_case.settings.ladder.fee")), 1), F("div", Mo, [F("div", No, [L(W(xn), Ot(W(ft)(n.feeTypeField), {
2047
+ }), null, 16, ["aria-label", "is-disabled"]), F("span", Ao, U(W(i).t("module.dunning_case.settings.ladder.day_hint", { day: n.absoluteDay })), 1)], 32)]),
2048
+ F("div", jo, [F("span", Mo, U(W(i).t("module.dunning_case.settings.ladder.fee")), 1), F("div", No, [F("div", Po, [L(W(Sn), kt(W(pt)(n.feeTypeField), {
2049
2049
  "aria-label": W(i).t("module.dunning_case.settings.ladder.fee_type"),
2050
2050
  "display-fn": p,
2051
2051
  "is-disabled": !n.canUpdate,
@@ -2055,7 +2055,7 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2055
2055
  "aria-label",
2056
2056
  "is-disabled",
2057
2057
  "items"
2058
- ])]), F("div", Po, [o.value === W(h).PERCENTAGE ? (B(), M(W(yn), Ot({ key: 0 }, W(ft)(n.feePercentageField), {
2058
+ ])]), F("div", Fo, [o.value === W(h).PERCENTAGE ? (B(), M(W(bn), kt({ key: 0 }, W(pt)(n.feePercentageField), {
2059
2059
  "aria-label": W(i).t("module.dunning_case.settings.ladder.fee"),
2060
2060
  "format-options": u,
2061
2061
  "is-disabled": !n.canUpdate,
@@ -2067,7 +2067,7 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2067
2067
  }), {
2068
2068
  right: G(() => [...t[5] ||= [F("span", { class: "pr-md text-xs text-secondary" }, " % ", -1)]]),
2069
2069
  _: 1
2070
- }, 16, ["aria-label", "is-disabled"])) : (B(), M(W(yn), Ot({ key: 1 }, W(ft)(n.feeField), {
2070
+ }, 16, ["aria-label", "is-disabled"])) : (B(), M(W(bn), kt({ key: 1 }, W(pt)(n.feeField), {
2071
2071
  "aria-label": W(i).t("module.dunning_case.settings.ladder.fee"),
2072
2072
  "format-options": l,
2073
2073
  "is-disabled": !n.canUpdate,
@@ -2076,12 +2076,12 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2076
2076
  step: .01,
2077
2077
  size: "sm"
2078
2078
  }), {
2079
- right: G(() => [F("span", Fo, U(d.value), 1)]),
2079
+ right: G(() => [F("span", Io, U(d.value), 1)]),
2080
2080
  _: 1
2081
2081
  }, 16, ["aria-label", "is-disabled"]))])])])
2082
2082
  ]));
2083
2083
  }
2084
- }), Lo = { class: "relative mt-2xl pb-lg" }, Ro = { class: "w-full" }, zo = { class: "flex justify-between text-xs font-medium text-secondary" }, Bo = { class: "mt-md block font-mono text-xs text-secondary tabular-nums" }, Vo = [
2084
+ }), Ro = { class: "relative mt-2xl pb-lg" }, zo = { class: "w-full" }, Bo = { class: "flex justify-between text-xs font-medium text-secondary" }, Vo = { class: "mt-md block font-mono text-xs text-secondary tabular-nums" }, Ho = [
2085
2085
  "aria-label",
2086
2086
  "aria-valuemax",
2087
2087
  "aria-valuemin",
@@ -2093,7 +2093,7 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2093
2093
  "onPointerenter",
2094
2094
  "onPointermove",
2095
2095
  "onPointerup"
2096
- ], Ho = 4, Uo = /* @__PURE__ */ R({
2096
+ ], Uo = 4, Wo = /* @__PURE__ */ R({
2097
2097
  __name: "ReminderLadderTimeline",
2098
2098
  props: {
2099
2099
  canUpdate: { type: Boolean },
@@ -2106,7 +2106,7 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2106
2106
  "bg-brand-500",
2107
2107
  "bg-warning-solid",
2108
2108
  "bg-error-solid"
2109
- ], a = k(), o = V(null), s = V(null), c = V(null), l = j(() => Array.from({ length: 5 }, (e, t) => Math.round(t * (n.timelineDays / Ho))));
2109
+ ], a = k(), o = V(null), s = V(null), c = V(null), l = j(() => Array.from({ length: 5 }, (e, t) => Math.round(t * (n.timelineDays / Uo))));
2110
2110
  function u(e) {
2111
2111
  return Math.min(100, e / n.timelineDays * 100);
2112
2112
  }
@@ -2130,14 +2130,14 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2130
2130
  function g(e, t) {
2131
2131
  s.value === e && (s.value = null, t.currentTarget.releasePointerCapture(t.pointerId));
2132
2132
  }
2133
- return (e, t) => (B(), P("div", Lo, [F("div", Ro, [F("div", zo, [F("span", null, U(W(a).t("module.dunning_case.settings.ladder.due_date")), 1), F("span", null, U(W(a).t("module.dunning_case.settings.ladder.timeline_end", { days: n.timelineDays })), 1)]), F("div", {
2133
+ return (e, t) => (B(), P("div", Ro, [F("div", zo, [F("div", Bo, [F("span", null, U(W(a).t("module.dunning_case.settings.ladder.due_date")), 1), F("span", null, U(W(a).t("module.dunning_case.settings.ladder.timeline_end", { days: n.timelineDays })), 1)]), F("div", {
2134
2134
  ref_key: "timelineTrack",
2135
2135
  ref: o,
2136
2136
  class: "relative mt-lg h-(--spacing-8xl)"
2137
2137
  }, [
2138
2138
  t[2] ||= F("div", { class: "absolute inset-x-0 top-(--spacing-lg) h-(--spacing-md) rounded-full bg-tertiary" }, null, -1),
2139
2139
  F("div", {
2140
- style: At({ width: `${u(n.markers[n.markers.length - 1]?.absoluteDay ?? 0)}%` }),
2140
+ style: jt({ width: `${u(n.markers[n.markers.length - 1]?.absoluteDay ?? 0)}%` }),
2141
2141
  class: "absolute top-(--spacing-lg) left-0 h-(--spacing-md) rounded-full bg-brand-100"
2142
2142
  }, null, 4),
2143
2143
  (B(!0), P(A, null, H(l.value, (e) => (B(), P("div", {
@@ -2146,13 +2146,13 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2146
2146
  "-translate-x-1/2": e > 0 && e < n.timelineDays,
2147
2147
  "-translate-x-full": e === n.timelineDays
2148
2148
  }, "absolute top-0"]),
2149
- style: At({ left: `${e / n.timelineDays * 100}%` })
2150
- }, [t[1] ||= F("span", { class: "block h-(--spacing-4xl) w-px bg-secondary" }, null, -1), F("span", Bo, U(W(a).t("module.dunning_case.settings.ladder.day_short", { day: e })), 1)], 6))), 128)),
2149
+ style: jt({ left: `${e / n.timelineDays * 100}%` })
2150
+ }, [t[1] ||= F("span", { class: "block h-(--spacing-4xl) w-px bg-secondary" }, null, -1), F("span", Vo, U(W(a).t("module.dunning_case.settings.ladder.day_short", { day: e })), 1)], 6))), 128)),
2151
2151
  (B(!0), P(A, null, H(n.markers, (e, r) => (B(), P("div", {
2152
2152
  key: e.sequence,
2153
- style: At({ left: `${u(e.absoluteDay)}%` }),
2153
+ style: jt({ left: `${u(e.absoluteDay)}%` }),
2154
2154
  class: "absolute top-0 z-10 -translate-x-1/2"
2155
- }, [L(W(jn), {
2155
+ }, [L(W(Mn), {
2156
2156
  "is-open": c.value === r || s.value === r,
2157
2157
  "popover-side-offset": 8,
2158
2158
  "popover-align": "center",
@@ -2172,15 +2172,15 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2172
2172
  disabled: !n.canUpdate,
2173
2173
  role: "slider",
2174
2174
  type: "button",
2175
- onKeydown: [zt(Bt((e) => f(r, -1), ["prevent"]), ["left"]), zt(Bt((e) => f(r, 1), ["prevent"]), ["right"])],
2175
+ onKeydown: [Bt(Vt((e) => f(r, -1), ["prevent"]), ["left"]), Bt(Vt((e) => f(r, 1), ["prevent"]), ["right"])],
2176
2176
  onPointercancel: (e) => g(r, e),
2177
2177
  onPointerdown: (e) => m(r, e),
2178
2178
  onPointerenter: (e) => c.value = r,
2179
2179
  onPointerleave: t[0] ||= (e) => c.value = null,
2180
2180
  onPointermove: (e) => h(r, e),
2181
2181
  onPointerup: (e) => g(r, e)
2182
- }, U(e.sequence), 43, Vo)]),
2183
- content: G(() => [L(W(Mn), { class: "rounded-md! bg-primary-solid! px-lg! py-md! text-sm font-semibold! whitespace-nowrap! text-white!" }, {
2182
+ }, U(e.sequence), 43, Ho)]),
2183
+ content: G(() => [L(W(Nn), { class: "rounded-md! bg-primary-solid! px-lg! py-md! text-sm font-semibold! whitespace-nowrap! text-white!" }, {
2184
2184
  default: G(() => [I(U(W(a).t("module.dunning_case.settings.ladder.day", { day: e.absoluteDay })), 1)]),
2185
2185
  _: 2
2186
2186
  }, 1024)]),
@@ -2188,7 +2188,7 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2188
2188
  }, 1032, ["is-open"])], 4))), 128))
2189
2189
  ], 512)])]));
2190
2190
  }
2191
- }), Wo = { class: "mt-3xl" }, Go = { class: "text-sm text-secondary" }, Ko = { class: "mt-3xl max-w-260" }, qo = { class: "grid grid-cols-[7.5rem_minmax(0,1fr)] gap-lg text-xs font-medium text-secondary sm:grid-cols-[7.5rem_13.5rem_11.25rem_7.5rem] sm:gap-3xl" }, Jo = { class: "hidden sm:inline" }, Yo = { class: "hidden sm:inline" }, Xo = { class: "hidden sm:inline" }, Zo = /* @__PURE__ */ R({
2191
+ }), Go = { class: "mt-3xl" }, Ko = { class: "text-sm text-secondary" }, qo = { class: "mt-3xl max-w-260" }, Jo = { class: "grid grid-cols-[7.5rem_minmax(0,1fr)] gap-lg text-xs font-medium text-secondary sm:grid-cols-[7.5rem_13.5rem_11.25rem_7.5rem] sm:gap-3xl" }, Yo = { class: "hidden sm:inline" }, Xo = { class: "hidden sm:inline" }, Zo = { class: "hidden sm:inline" }, Qo = /* @__PURE__ */ R({
2192
2192
  __name: "ReminderLadderPanel",
2193
2193
  props: {
2194
2194
  canUpdate: { type: Boolean },
@@ -2198,9 +2198,9 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2198
2198
  },
2199
2199
  setup(e) {
2200
2200
  let t = e, n = k();
2201
- return (e, r) => (B(), P("div", Wo, [
2202
- F("p", Go, U(W(n).t("module.dunning_case.settings.ladder.description")), 1),
2203
- L(Uo, {
2201
+ return (e, r) => (B(), P("div", Go, [
2202
+ F("p", Ko, U(W(n).t("module.dunning_case.settings.ladder.description")), 1),
2203
+ L(Wo, {
2204
2204
  "can-update": t.canUpdate,
2205
2205
  markers: t.ladder.markers.value,
2206
2206
  "timeline-days": t.ladder.timelineDays.value,
@@ -2211,12 +2211,12 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2211
2211
  "timeline-days",
2212
2212
  "onMoveTo"
2213
2213
  ]),
2214
- F("div", Ko, [F("div", qo, [
2214
+ F("div", qo, [F("div", Jo, [
2215
2215
  F("span", null, U(W(n).t("module.dunning_case.settings.ladder.level")), 1),
2216
- F("span", Jo, U(W(n).t("module.dunning_case.settings.ladder.trigger")), 1),
2217
- F("span", Yo, U(W(n).t("module.dunning_case.settings.ladder.offset")), 1),
2218
- F("span", Xo, U(W(n).t("module.dunning_case.settings.ladder.fee")), 1)
2219
- ]), (B(!0), P(A, null, H(t.fields, (e, n) => (B(), M(Io, {
2216
+ F("span", Yo, U(W(n).t("module.dunning_case.settings.ladder.trigger")), 1),
2217
+ F("span", Xo, U(W(n).t("module.dunning_case.settings.ladder.offset")), 1),
2218
+ F("span", Zo, U(W(n).t("module.dunning_case.settings.ladder.fee")), 1)
2219
+ ]), (B(!0), P(A, null, H(t.fields, (e, n) => (B(), M(Lo, {
2220
2220
  key: n,
2221
2221
  "absolute-day": t.ladder.getAbsoluteDay(n),
2222
2222
  "can-update": t.canUpdate,
@@ -2248,12 +2248,12 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2248
2248
  "onUpdateOffset",
2249
2249
  "onUpdateSchedule"
2250
2250
  ]))), 128))]),
2251
- L(xo)
2251
+ L(So)
2252
2252
  ]));
2253
2253
  }
2254
- }), Qo = { class: "flex flex-wrap items-center gap-xl" }, $o = { class: "text-xs text-secondary" }, es = /* @__PURE__ */ R({
2254
+ }), $o = { class: "flex flex-wrap items-center gap-xl" }, es = { class: "text-xs text-secondary" }, ts = /* @__PURE__ */ R({
2255
2255
  __name: "ReminderTemplateTabs",
2256
- props: /*@__PURE__*/ Dt({
2256
+ props: /*@__PURE__*/ Ot({
2257
2257
  caption: {},
2258
2258
  items: {}
2259
2259
  }, {
@@ -2262,18 +2262,18 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2262
2262
  }),
2263
2263
  emits: ["update:modelValue"],
2264
2264
  setup(e) {
2265
- let t = e, n = Lt(e, "modelValue"), r = k();
2265
+ let t = e, n = Rt(e, "modelValue"), r = k();
2266
2266
  function i(e) {
2267
2267
  return e.hasMissingContent ? `${e.label}, ${r.t("module.dunning_case.settings.templates.missing")}` : e.label;
2268
2268
  }
2269
- return (e, r) => (B(), P("div", Qo, [F("p", $o, U(t.caption), 1), L(W(Tn), {
2269
+ return (e, r) => (B(), P("div", $o, [F("p", es, U(t.caption), 1), L(W(En), {
2270
2270
  modelValue: n.value,
2271
2271
  "onUpdate:modelValue": r[0] ||= (e) => n.value = e,
2272
2272
  "aria-label": t.caption,
2273
2273
  variant: "button-brand"
2274
2274
  }, {
2275
- default: G(() => [L(W(Dn), null, {
2276
- default: G(() => [(B(!0), P(A, null, H(t.items, (e) => (B(), M(W(En), {
2275
+ default: G(() => [L(W(On), null, {
2276
+ default: G(() => [(B(!0), P(A, null, H(t.items, (e) => (B(), M(W(Dn), {
2277
2277
  key: e.value,
2278
2278
  "aria-label": i(e),
2279
2279
  config: e.hasMissingContent ? { indicator: {
@@ -2293,12 +2293,12 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2293
2293
  _: 1
2294
2294
  }, 8, ["modelValue", "aria-label"])]));
2295
2295
  }
2296
- }), ts = { class: "mt-5xl" }, ns = { class: "flex flex-col gap-xl sm:flex-row sm:items-center sm:justify-between" }, rs = { class: "mt-xl overflow-hidden rounded-md border border-secondary bg-primary" }, is = { class: "border-b border-secondary px-3xl py-lg" }, as = { class: "text-sm font-medium text-primary" }, os = {
2296
+ }), ns = { class: "mt-5xl" }, rs = { class: "flex flex-col gap-xl sm:flex-row sm:items-center sm:justify-between" }, is = { class: "mt-xl overflow-hidden rounded-md border border-secondary bg-primary" }, as = { class: "border-b border-secondary px-3xl py-lg" }, os = { class: "text-sm font-medium text-primary" }, ss = {
2297
2297
  key: 0,
2298
2298
  class: "flex flex-col gap-md p-3xl"
2299
- }, ss = /* @__PURE__ */ R({
2299
+ }, cs = /* @__PURE__ */ R({
2300
2300
  __name: "ReminderTemplatesPanel",
2301
- props: /*@__PURE__*/ Dt({
2301
+ props: /*@__PURE__*/ Ot({
2302
2302
  bodyField: {},
2303
2303
  canUpdate: { type: Boolean },
2304
2304
  cardTitle: {},
@@ -2313,8 +2313,8 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2313
2313
  }),
2314
2314
  emits: ["update:activeLevel", "update:activeLocale"],
2315
2315
  setup(e) {
2316
- let t = e, n = Lt(e, "activeLevel"), r = Lt(e, "activeLocale"), i = k();
2317
- return (e, a) => (B(), P("div", ts, [F("div", ns, [L(es, {
2316
+ let t = e, n = Rt(e, "activeLevel"), r = Rt(e, "activeLocale"), i = k();
2317
+ return (e, a) => (B(), P("div", ns, [F("div", rs, [L(ts, {
2318
2318
  modelValue: n.value,
2319
2319
  "onUpdate:modelValue": a[0] ||= (e) => n.value = e,
2320
2320
  caption: W(i).t("module.dunning_case.settings.templates.selector"),
@@ -2323,7 +2323,7 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2323
2323
  "modelValue",
2324
2324
  "caption",
2325
2325
  "items"
2326
- ]), L(es, {
2326
+ ]), L(ts, {
2327
2327
  modelValue: r.value,
2328
2328
  "onUpdate:modelValue": a[1] ||= (e) => r.value = e,
2329
2329
  caption: W(i).t("module.dunning_case.settings.templates.language"),
@@ -2332,12 +2332,12 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2332
2332
  "modelValue",
2333
2333
  "caption",
2334
2334
  "items"
2335
- ])]), F("div", rs, [F("div", is, [F("h2", as, U(t.cardTitle), 1)]), t.subjectField !== void 0 && t.bodyField !== void 0 ? (B(), P("div", os, [L(W(On), Ot(W(ft)(t.subjectField), {
2335
+ ])]), F("div", is, [F("div", as, [F("h2", os, U(t.cardTitle), 1)]), t.subjectField !== void 0 && t.bodyField !== void 0 ? (B(), P("div", ss, [L(W(kn), kt(W(pt)(t.subjectField), {
2336
2336
  "is-disabled": !t.canUpdate,
2337
2337
  "is-required": !0,
2338
2338
  label: W(i).t("module.dunning_case.settings.templates.subject"),
2339
2339
  size: "sm"
2340
- }), null, 16, ["is-disabled", "label"]), L(W(kn), Ot(W(ft)(t.bodyField), {
2340
+ }), null, 16, ["is-disabled", "label"]), L(W(An), kt(W(pt)(t.bodyField), {
2341
2341
  "is-disabled": !t.canUpdate,
2342
2342
  "is-required": !0,
2343
2343
  label: W(i).t("module.dunning_case.settings.templates.content"),
@@ -2346,7 +2346,7 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2346
2346
  size: "sm"
2347
2347
  }), null, 16, ["is-disabled", "label"])])) : N("", !0)])]));
2348
2348
  }
2349
- }), cs = class {
2349
+ }), ls = class {
2350
2350
  static commitReminder(e, t, n) {
2351
2351
  if (t === void 0) return e.slice();
2352
2352
  let r = e.slice();
@@ -2357,18 +2357,18 @@ var ho = { class: "mt-3xl flex max-w-260 flex-col gap-md" }, go = { class: "roun
2357
2357
  for (let r of t.slice(0, e + 1)) r.schedule === s.AFTER_DUE_DATE ? n = r.offsetDays : n += r.offsetDays;
2358
2358
  return n;
2359
2359
  }
2360
- }, ls = 60, us = 1, ds = 15;
2361
- function fs(e) {
2362
- return e != null && Number.isInteger(e) && e >= us;
2363
- }
2360
+ }, us = 60, ds = 1, fs = 15;
2364
2361
  function ps(e) {
2362
+ return e != null && Number.isInteger(e) && e >= ds;
2363
+ }
2364
+ function ms(e) {
2365
2365
  let t = V([]), n = !1;
2366
2366
  function r(e) {
2367
- return cs.getAbsoluteDay(e, t.value);
2367
+ return ls.getAbsoluteDay(e, t.value);
2368
2368
  }
2369
2369
  let i = j(() => {
2370
- let t = e.items.value.length - 1, n = t < 0 ? 0 : r(t), i = Math.ceil(n / ds) * ds;
2371
- return Math.max(ls, i);
2370
+ let t = e.items.value.length - 1, n = t < 0 ? 0 : r(t), i = Math.ceil(n / fs) * fs;
2371
+ return Math.max(us, i);
2372
2372
  }), a = j(() => e.items.value.map((e, t) => ({
2373
2373
  absoluteDay: r(t),
2374
2374
  minimumDay: t === 0 ? 1 : r(t - 1) + 1,
@@ -2384,13 +2384,13 @@ function ps(e) {
2384
2384
  let i = e.items.value[n];
2385
2385
  if (i === void 0) return;
2386
2386
  let a = r ?? i.offsetDays;
2387
- fs(a) && (t.value = cs.commitReminder(t.value, {
2387
+ ps(a) && (t.value = ls.commitReminder(t.value, {
2388
2388
  offsetDays: a,
2389
2389
  schedule: i.schedule
2390
2390
  }, n));
2391
2391
  }
2392
2392
  function l(t) {
2393
- e.fields[t]?.offsetDays.onBlur(), kt(() => c(t));
2393
+ e.fields[t]?.offsetDays.onBlur(), At(() => c(t));
2394
2394
  }
2395
2395
  function u(e) {
2396
2396
  n = e;
@@ -2422,7 +2422,7 @@ function ps(e) {
2422
2422
  }
2423
2423
  //#endregion
2424
2424
  //#region src/modules/dunning-case/use-cases/settings/views/ReminderSettingsView.vue?vue&type=script&setup=true&lang.ts
2425
- var ms = { class: "mx-auto w-full max-w-340" }, hs = { class: "flex flex-col gap-lg sm:flex-row sm:items-start sm:justify-between" }, gs = { class: "text-md font-semibold text-primary" }, _s = { class: "mt-xs text-sm text-secondary" }, vs = /* @__PURE__ */ R({
2425
+ var hs = { class: "mx-auto w-full max-w-340" }, gs = { class: "flex flex-col gap-lg sm:flex-row sm:items-start sm:justify-between" }, _s = { class: "text-md font-semibold text-primary" }, vs = { class: "mt-xs text-sm text-secondary" }, ys = /* @__PURE__ */ R({
2426
2426
  __name: "ReminderSettingsView",
2427
2427
  props: { reminderConfigs: {} },
2428
2428
  setup(e) {
@@ -2434,11 +2434,11 @@ var ms = { class: "mx-auto w-full max-w-340" }, hs = { class: "flex flex-col gap
2434
2434
  "en-US",
2435
2435
  "nl-BE",
2436
2436
  "fr-BE"
2437
- ], i = [s.AFTER_DUE_DATE, s.AFTER_LAST_REMINDER], a = k(), o = zn(), c = _(), l = co(), u = V("ladder"), d = V(0), f = V("en-US");
2437
+ ], i = [s.AFTER_DUE_DATE, s.AFTER_LAST_REMINDER], a = k(), o = Bn(), c = _(), l = lo(), u = V("ladder"), d = V(0), f = V("en-US");
2438
2438
  c.set(() => a.t("module.dunning_case.settings.title"));
2439
- let p = Hn({
2439
+ let p = Un({
2440
2440
  initialState: j(() => he.reminderConfigsToForm(t.reminderConfigs)),
2441
- schema: po,
2441
+ schema: mo,
2442
2442
  onSubmit: async (e) => {
2443
2443
  let t = await l.execute({ body: e });
2444
2444
  t.isErr() ? o.apiError(t.error) : o.show({ message: a.t("module.dunning_case.settings.saved") });
@@ -2469,7 +2469,7 @@ var ms = { class: "mx-auto w-full max-w-340" }, hs = { class: "flex flex-col gap
2469
2469
  offsetDays: t.register("offsetDays"),
2470
2470
  schedule: t.register("schedule")
2471
2471
  };
2472
- }), g = V(!0), v = j(() => Pn(i)), y = ps({
2472
+ }), g = V(!0), v = j(() => Fn(i)), y = ms({
2473
2473
  canUpdate: g,
2474
2474
  fields: h,
2475
2475
  items: j(() => (p.state.value.reminders ?? []).map((e, t) => ({
@@ -2493,7 +2493,7 @@ var ms = { class: "mx-auto w-full max-w-340" }, hs = { class: "flex flex-col gap
2493
2493
  });
2494
2494
  function S(e, t) {
2495
2495
  let n = p.state.value.reminders?.[e]?.template?.[t];
2496
- return n === void 0 || mo(n);
2496
+ return n === void 0 || ho(n);
2497
2497
  }
2498
2498
  let C = j(() => h[d.value]?.locales[f.value]), w = j(() => h.map((e, t) => ({
2499
2499
  hasMissingContent: S(t, f.value),
@@ -2507,17 +2507,17 @@ var ms = { class: "mx-auto w-full max-w-340" }, hs = { class: "flex flex-col gap
2507
2507
  language: a.t(`module.dunning_case.settings.locale_name.${f.value}`),
2508
2508
  level: d.value + 1
2509
2509
  }));
2510
- return Rt(() => t.reminderConfigs, y.reset, { immediate: !0 }), (e, t) => (B(), M(W($t), {
2510
+ return zt(() => t.reminderConfigs, y.reset, { immediate: !0 }), (e, t) => (B(), M(W(en), {
2511
2511
  title: W(a).t("module.dunning_case.settings.title"),
2512
2512
  subtitle: W(a).t("module.dunning_case.settings.subtitle")
2513
2513
  }, {
2514
- default: G(() => [L(W(tn), null, {
2515
- default: G(() => [L(W(gn), {
2514
+ default: G(() => [L(W(nn), null, {
2515
+ default: G(() => [L(W(_n), {
2516
2516
  form: W(p),
2517
2517
  "prompt-on-unsaved-changes": !0
2518
2518
  }, {
2519
- default: G(() => [F("div", ms, [
2520
- F("div", hs, [F("div", null, [F("h2", gs, U(W(a).t("module.dunning_case.settings.title")), 1), F("p", _s, U(W(a).t("module.dunning_case.settings.subtitle")), 1)]), g.value ? (B(), M(W(q), {
2519
+ default: G(() => [F("div", hs, [
2520
+ F("div", gs, [F("div", null, [F("h2", _s, U(W(a).t("module.dunning_case.settings.title")), 1), F("p", vs, U(W(a).t("module.dunning_case.settings.subtitle")), 1)]), g.value ? (B(), M(W(q), {
2521
2521
  key: 0,
2522
2522
  "is-disabled": !W(p).isDirty.value || !W(p).isValid.value,
2523
2523
  "is-loading": W(p).isSubmitting.value,
@@ -2529,18 +2529,18 @@ var ms = { class: "mx-auto w-full max-w-340" }, hs = { class: "flex flex-col gap
2529
2529
  "label",
2530
2530
  "onClick"
2531
2531
  ])) : N("", !0)]),
2532
- L(W(Tn), {
2532
+ L(W(En), {
2533
2533
  modelValue: u.value,
2534
2534
  "onUpdate:modelValue": t[0] ||= (e) => u.value = e,
2535
2535
  "aria-label": W(a).t("module.dunning_case.settings.navigation"),
2536
2536
  class: "mt-xl",
2537
2537
  variant: "button-border"
2538
2538
  }, {
2539
- default: G(() => [L(W(Dn), null, {
2540
- default: G(() => [L(W(En), {
2539
+ default: G(() => [L(W(On), null, {
2540
+ default: G(() => [L(W(Dn), {
2541
2541
  label: W(a).t("module.dunning_case.settings.ladder.tab"),
2542
2542
  value: "ladder"
2543
- }, null, 8, ["label"]), L(W(En), {
2543
+ }, null, 8, ["label"]), L(W(Dn), {
2544
2544
  label: W(a).t("module.dunning_case.settings.templates.tab"),
2545
2545
  value: "templates"
2546
2546
  }, null, 8, ["label"])]),
@@ -2548,7 +2548,7 @@ var ms = { class: "mx-auto w-full max-w-340" }, hs = { class: "flex flex-col gap
2548
2548
  })]),
2549
2549
  _: 1
2550
2550
  }, 8, ["modelValue", "aria-label"]),
2551
- u.value === "ladder" ? (B(), M(Zo, {
2551
+ u.value === "ladder" ? (B(), M(Qo, {
2552
2552
  key: 0,
2553
2553
  "can-update": g.value,
2554
2554
  fields: W(h),
@@ -2559,7 +2559,7 @@ var ms = { class: "mx-auto w-full max-w-340" }, hs = { class: "flex flex-col gap
2559
2559
  "fields",
2560
2560
  "ladder",
2561
2561
  "schedule-items"
2562
- ])) : (B(), M(ss, {
2562
+ ])) : (B(), M(cs, {
2563
2563
  key: 1,
2564
2564
  "active-level": b.value,
2565
2565
  "onUpdate:activeLevel": t[1] ||= (e) => b.value = e,
@@ -2589,22 +2589,22 @@ var ms = { class: "mx-auto w-full max-w-340" }, hs = { class: "flex flex-col gap
2589
2589
  _: 1
2590
2590
  }, 8, ["title", "subtitle"]));
2591
2591
  }
2592
- }), ys = /*@__PURE__*/ R({
2592
+ }), bs = /*@__PURE__*/ R({
2593
2593
  __name: "ReminderSettingsViewDataProvider",
2594
2594
  setup(e) {
2595
- let t = _e();
2596
- return (e, n) => (B(), M($e, { queries: { reminderConfigs: W(t) } }, {
2597
- default: G(({ data: e }) => [L(vs, { "reminder-configs": e.reminderConfigs }, null, 8, ["reminder-configs"])]),
2598
- loading: G(() => [L(W(nn), { breadcrumbs: [] })]),
2595
+ let t = ve();
2596
+ return (e, n) => (B(), M(et, { queries: { reminderConfigs: W(t) } }, {
2597
+ default: G(({ data: e }) => [L(ys, { "reminder-configs": e.reminderConfigs }, null, 8, ["reminder-configs"])]),
2598
+ loading: G(() => [L(W(rn), { breadcrumbs: [] })]),
2599
2599
  _: 1
2600
2600
  }, 8, ["queries"]));
2601
2601
  }
2602
- }), bs = /* @__PURE__ */ Gn({ default: () => xs }), xs = ys;
2602
+ }), xs = /* @__PURE__ */ Kn({ default: () => Ss }), Ss = bs;
2603
2603
  //#endregion
2604
2604
  //#region src/modules/invoice/actions/invoiceNavigateToDetail.action.ts
2605
- function Ss() {
2606
- let e = Xt();
2607
- return Bn({
2605
+ function Cs() {
2606
+ let e = Zt();
2607
+ return Vn({
2608
2608
  id: "invoice-navigate-to-detail",
2609
2609
  isApplicable: (e) => e.hasTargetedModelsOfType("Invoice"),
2610
2610
  name: (e) => {
@@ -2625,8 +2625,8 @@ function Ss() {
2625
2625
  }
2626
2626
  //#endregion
2627
2627
  //#region src/modules/invoice/api/queries/invoicePublicDetail.query.ts
2628
- function Cs(e) {
2629
- return Kt("invoicePublicDetail", {
2628
+ function ws(e) {
2629
+ return qt("invoicePublicDetail", {
2630
2630
  isEnabled: j(() => e.value !== null),
2631
2631
  params: { token: e },
2632
2632
  queryFn: () => {
@@ -2637,16 +2637,16 @@ function Cs(e) {
2637
2637
  }
2638
2638
  //#endregion
2639
2639
  //#region src/modules/invoice/models/invoiceUuid.model.ts
2640
- var ws = O.uuid().brand("InvoiceUuid");
2640
+ var Ts = O.uuid().brand("InvoiceUuid");
2641
2641
  //#endregion
2642
2642
  //#region src/modules/invoice/api/queries/invoiceIndex.query.ts
2643
- function Ts(e) {
2643
+ function Es(e) {
2644
2644
  let t = j(() => ({
2645
2645
  filters: e?.params?.filters?.value,
2646
2646
  search: e?.params?.search?.value,
2647
2647
  sort: e?.params?.sort?.value ?? []
2648
2648
  }));
2649
- return Gt("invoiceIndex", {
2649
+ return Kt("invoiceIndex", {
2650
2650
  params: { queryParams: t },
2651
2651
  queryFn: (t) => T.getAll({
2652
2652
  filters: e?.params?.filters?.value,
@@ -2658,15 +2658,15 @@ function Ts(e) {
2658
2658
  }
2659
2659
  //#endregion
2660
2660
  //#region src/modules/invoice/api/mutations/invoiceCreate.mutation.ts
2661
- function Es() {
2662
- return Wt({
2661
+ function Ds() {
2662
+ return Gt({
2663
2663
  queryFn: (e) => T.create(e.body),
2664
2664
  queryKeysToInvalidate: { invoiceIndex: {} }
2665
2665
  });
2666
2666
  }
2667
2667
  //#endregion
2668
2668
  //#region src/modules/invoice/components/form/InvoiceFormCustomerField.vue
2669
- var Ds = /* @__PURE__ */ R({
2669
+ var Os = /* @__PURE__ */ R({
2670
2670
  __name: "InvoiceFormCustomerField",
2671
2671
  props: {
2672
2672
  isLoading: { type: Boolean },
@@ -2675,7 +2675,7 @@ var Ds = /* @__PURE__ */ R({
2675
2675
  },
2676
2676
  emits: ["nextPage", "updateSearch"],
2677
2677
  setup(e, { emit: t }) {
2678
- let n = e, r = t, i = k(), a = j(() => Nn(n.customers));
2678
+ let n = e, r = t, i = k(), a = j(() => Pn(n.customers));
2679
2679
  function o(e) {
2680
2680
  return e.name;
2681
2681
  }
@@ -2698,7 +2698,7 @@ var Ds = /* @__PURE__ */ R({
2698
2698
  function u(e) {
2699
2699
  n.field.setValue(e), e !== null && r("updateSearch", "");
2700
2700
  }
2701
- return (e, t) => (B(), M(W(Zt), Ot(W(ft)(n.field), {
2701
+ return (e, t) => (B(), M(W(Qt), kt(W(pt)(n.field), {
2702
2702
  "display-fn": o,
2703
2703
  "get-item-config": c,
2704
2704
  "is-loading": n.isLoading,
@@ -2717,21 +2717,21 @@ var Ds = /* @__PURE__ */ R({
2717
2717
  "placeholder"
2718
2718
  ]));
2719
2719
  }
2720
- }), Os = O.enum(f), ks = O.object({
2721
- uuid: Xe,
2720
+ }), ks = O.enum(f), As = O.object({
2721
+ uuid: Ze,
2722
2722
  name: O.string().min(1),
2723
- type: Os
2724
- }), As = O.object({ customer: ks }), js = /* @__PURE__ */ R({
2723
+ type: ks
2724
+ }), js = O.object({ customer: As }), Ms = /* @__PURE__ */ R({
2725
2725
  __name: "InvoiceCreateDialog",
2726
2726
  emits: ["close"],
2727
2727
  setup(e, { emit: t }) {
2728
- let n = t, r = k(), i = zn(), a = Xt(), o = Es(), s = ne({ debounceMs: 250 }), c = mt({ params: { search: s.debouncedSearch } }), l = j(() => c.result.value.match({
2728
+ let n = t, r = k(), i = Bn(), a = Zt(), o = Ds(), s = ne({ debounceMs: 250 }), c = ht({ params: { search: s.debouncedSearch } }), l = j(() => c.result.value.match({
2729
2729
  err: () => [],
2730
2730
  loading: () => [],
2731
2731
  ok: (e) => e.data
2732
- })), u = Hn({
2732
+ })), u = Un({
2733
2733
  initialState: { customer: null },
2734
- schema: As,
2734
+ schema: js,
2735
2735
  onSubmit: async (e) => {
2736
2736
  let t = await o.execute({ body: e });
2737
2737
  t.isErr() ? i.apiError(t.error) : (n("close"), await a.push({
@@ -2743,23 +2743,23 @@ var Ds = /* @__PURE__ */ R({
2743
2743
  function f(e) {
2744
2744
  s.updateSearch(e);
2745
2745
  }
2746
- return (e, t) => (B(), M(W(_n), {
2746
+ return (e, t) => (B(), M(W(vn), {
2747
2747
  form: W(u),
2748
2748
  size: "xs",
2749
2749
  onClose: t[0] ||= (e) => n("close")
2750
2750
  }, {
2751
2751
  default: G(() => [
2752
- L(W(pn), {
2752
+ L(W(mn), {
2753
2753
  title: W(r).t("wise_invoicing.invoice.create.modal_title"),
2754
2754
  description: W(r).t("wise_invoicing.invoice.create.modal_description"),
2755
- icon: W(Re)
2755
+ icon: W(ze)
2756
2756
  }, null, 8, [
2757
2757
  "title",
2758
2758
  "description",
2759
2759
  "icon"
2760
2760
  ]),
2761
- L(W(cn), null, {
2762
- default: G(() => [L(Ds, {
2761
+ L(W(ln), null, {
2762
+ default: G(() => [L(Os, {
2763
2763
  customers: l.value,
2764
2764
  field: W(d),
2765
2765
  "is-loading": W(c).isLoading.value,
@@ -2773,20 +2773,21 @@ var Ds = /* @__PURE__ */ R({
2773
2773
  ])]),
2774
2774
  _: 1
2775
2775
  }),
2776
- L(W(ln), null, {
2777
- right: G(() => [L(W(un), { label: "cancel" }), L(W(fn), { label: W(r).t("wise_invoicing.invoice.create.confirm") }, null, 8, ["label"])]),
2776
+ L(W(un), null, {
2777
+ right: G(() => [L(W(dn), { label: "cancel" }), L(W(pn), { label: W(r).t("wise_invoicing.invoice.create.confirm") }, null, 8, ["label"])]),
2778
2778
  _: 1
2779
2779
  })
2780
2780
  ]),
2781
2781
  _: 1
2782
2782
  }, 8, ["form"]));
2783
2783
  }
2784
- }), Ms = {
2784
+ }), Ns = {
2785
2785
  key: 0,
2786
2786
  class: "pointer-events-none fixed inset-x-0 bottom-4 z-20 flex justify-center px-lg"
2787
- }, Ns = /* @__PURE__ */ R({
2787
+ }, Ps = /* @__PURE__ */ R({
2788
2788
  __name: "InvoiceOverviewBulkActionBar",
2789
2789
  props: {
2790
+ canDelete: { type: Boolean },
2790
2791
  canFinalize: { type: Boolean },
2791
2792
  canMarkAsReady: { type: Boolean },
2792
2793
  canSend: { type: Boolean },
@@ -2795,6 +2796,7 @@ var Ds = /* @__PURE__ */ R({
2795
2796
  },
2796
2797
  emits: [
2797
2798
  "cancel",
2799
+ "delete",
2798
2800
  "finalize",
2799
2801
  "markAsReady",
2800
2802
  "send",
@@ -2802,7 +2804,7 @@ var Ds = /* @__PURE__ */ R({
2802
2804
  ],
2803
2805
  setup(e, { emit: t }) {
2804
2806
  let n = e, r = t, i = k();
2805
- return (e, t) => n.selectedCount > 0 ? (B(), P("div", Ms, [L(W(Y), { class: "pointer-events-auto rounded-xl border border-secondary bg-primary px-lg py-sm shadow-lg" }, {
2807
+ return (e, t) => n.selectedCount > 0 ? (B(), P("div", Ns, [L(W(Y), { class: "pointer-events-auto rounded-xl border border-secondary bg-primary px-lg py-sm shadow-lg" }, {
2806
2808
  default: G(() => [
2807
2809
  L(W(Z), {
2808
2810
  text: W(i).t("wise_invoicing.invoice.overview.bulk.selected_documents", { count: n.selectedCount }),
@@ -2828,10 +2830,16 @@ var Ds = /* @__PURE__ */ R({
2828
2830
  label: W(i).t("wise_invoicing.invoice.overview.bulk.send_approval.action"),
2829
2831
  onClick: t[3] ||= (e) => r("sendApproval")
2830
2832
  }, null, 8, ["label"])) : N("", !0),
2833
+ n.canDelete ? (B(), M(W(q), {
2834
+ key: 4,
2835
+ label: W(i).t("wise_invoicing.invoice.overview.bulk.delete.action"),
2836
+ variant: "destructive-secondary",
2837
+ onClick: t[4] ||= (e) => r("delete")
2838
+ }, null, 8, ["label"])) : N("", !0),
2831
2839
  L(W(q), {
2832
2840
  label: W(i).t("wise_invoicing.invoice.overview.bulk.cancel"),
2833
2841
  variant: "tertiary",
2834
- onClick: t[4] ||= (e) => r("cancel")
2842
+ onClick: t[5] ||= (e) => r("cancel")
2835
2843
  }, null, 8, ["label"])
2836
2844
  ]),
2837
2845
  _: 1
@@ -2840,7 +2848,7 @@ var Ds = /* @__PURE__ */ R({
2840
2848
  });
2841
2849
  //#endregion
2842
2850
  //#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewBulkSendEligibility.composable.ts
2843
- function Ps(e) {
2851
+ function Fs(e) {
2844
2852
  let t = V(null), n = j(() => e.selectedInvoices().filter((e) => e.status === u.FINALIZED).map((e) => e.uuid)), r = j(() => {
2845
2853
  let t = e.matching?.() ?? null;
2846
2854
  return t === null ? n.value.length === 0 ? null : {
@@ -2851,7 +2859,7 @@ function Ps(e) {
2851
2859
  let e = r.value;
2852
2860
  return e === null ? "" : e.type === "invoices" ? e.invoiceUuids.toSorted().join(",") : JSON.stringify(e);
2853
2861
  });
2854
- return Jt(i, async (e) => {
2862
+ return Yt(i, async (e) => {
2855
2863
  let a = r.value;
2856
2864
  if (a === null) {
2857
2865
  t.value = null;
@@ -2863,10 +2871,10 @@ function Ps(e) {
2863
2871
  }
2864
2872
  //#endregion
2865
2873
  //#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewCustomFieldFilter.util.ts
2866
- function Fs(e) {
2874
+ function Is(e) {
2867
2875
  return Array.isArray(e) && e.every((e) => typeof e == "string");
2868
2876
  }
2869
- function Is(e, t) {
2877
+ function Ls(e, t) {
2870
2878
  try {
2871
2879
  switch (e) {
2872
2880
  case v.DATE: return be.toDto(be.fromDto(t));
@@ -2877,11 +2885,11 @@ function Is(e, t) {
2877
2885
  return null;
2878
2886
  }
2879
2887
  }
2880
- var Ls = class {
2888
+ var Rs = class {
2881
2889
  static getFreeformOptions(e, t) {
2882
2890
  let n = t.trim();
2883
2891
  if (n.length === 0) return [];
2884
- let r = Is(e.type, n);
2892
+ let r = Ls(e.type, n);
2885
2893
  return r === null ? [] : [r];
2886
2894
  }
2887
2895
  static getKey(e) {
@@ -2925,32 +2933,32 @@ var Ls = class {
2925
2933
  type: v.NUMBER,
2926
2934
  value: t
2927
2935
  }] : [];
2928
- case v.MULTI_SELECT: return Fs(t) && t.length > 0 ? [{
2936
+ case v.MULTI_SELECT: return Is(t) && t.length > 0 ? [{
2929
2937
  definitionUuid: e.uuid,
2930
2938
  type: v.MULTI_SELECT,
2931
2939
  value: t
2932
2940
  }] : [];
2933
- case v.TEXT_ARRAY: return Fs(t) && t.length > 0 ? [{
2941
+ case v.TEXT_ARRAY: return Is(t) && t.length > 0 ? [{
2934
2942
  definitionUuid: e.uuid,
2935
2943
  type: v.TEXT_ARRAY,
2936
2944
  value: t
2937
2945
  }] : [];
2938
- case v.DATE: return Fs(t) ? t.map((t) => ({
2946
+ case v.DATE: return Is(t) ? t.map((t) => ({
2939
2947
  definitionUuid: e.uuid,
2940
2948
  type: v.DATE,
2941
2949
  value: t
2942
2950
  })) : [];
2943
- case v.SINGLE_SELECT: return Fs(t) ? t.map((t) => ({
2951
+ case v.SINGLE_SELECT: return Is(t) ? t.map((t) => ({
2944
2952
  definitionUuid: e.uuid,
2945
2953
  type: v.SINGLE_SELECT,
2946
2954
  value: t
2947
2955
  })) : [];
2948
- case v.TEXT: return Fs(t) ? t.map((t) => ({
2956
+ case v.TEXT: return Is(t) ? t.map((t) => ({
2949
2957
  definitionUuid: e.uuid,
2950
2958
  type: v.TEXT,
2951
2959
  value: t
2952
2960
  })) : [];
2953
- case v.TIMESTAMP: return Fs(t) ? t.map((t) => ({
2961
+ case v.TIMESTAMP: return Is(t) ? t.map((t) => ({
2954
2962
  definitionUuid: e.uuid,
2955
2963
  type: v.TIMESTAMP,
2956
2964
  value: t
@@ -2961,50 +2969,50 @@ var Ls = class {
2961
2969
  };
2962
2970
  //#endregion
2963
2971
  //#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewDataTableFilters.composable.ts
2964
- function Rs(e) {
2965
- let t = k(), n = ne({ debounceMs: 250 }), r = mt({ params: { search: n.debouncedSearch } }), i = j(() => r.result.value.match({
2972
+ function zs(e) {
2973
+ let t = k(), n = ne({ debounceMs: 250 }), r = ht({ params: { search: n.debouncedSearch } }), i = j(() => r.result.value.match({
2966
2974
  err: () => [],
2967
2975
  loading: () => [],
2968
2976
  ok: (e) => e.data
2969
2977
  })), a = e.customFieldDefinitions.filter((e) => e.type !== v.REFERENCE), o = a.map((n) => {
2970
- let r = Ls.getKey(n), i = de.getLabel(n, t.locale.value);
2978
+ let r = Rs.getKey(n), i = de.getLabel(n, t.locale.value);
2971
2979
  switch (n.type) {
2972
- case v.BOOLEAN: return tt({
2980
+ case v.BOOLEAN: return nt({
2973
2981
  entityLabel: i,
2974
2982
  key: r,
2975
2983
  label: i
2976
2984
  });
2977
2985
  case v.MONETARY: {
2978
- let t = Ls.getRuleNumber(n, "precision"), a = Ls.getMonetaryCurrency(n, e.currency);
2979
- return nt({
2986
+ let t = Rs.getRuleNumber(n, "precision"), a = Rs.getMonetaryCurrency(n, e.currency);
2987
+ return rt({
2980
2988
  customUnit: a,
2981
2989
  defaultValue: {
2982
- operator: dt.EQUALS,
2990
+ operator: ft.EQUALS,
2983
2991
  value: null
2984
2992
  },
2985
2993
  disableOperators: !0,
2986
2994
  key: r,
2987
2995
  label: i,
2988
- max: Ls.getMajorUnitRule(n, "max", t),
2989
- min: Ls.getMajorUnitRule(n, "min", t),
2996
+ max: Rs.getMajorUnitRule(n, "max", t),
2997
+ min: Rs.getMajorUnitRule(n, "min", t),
2990
2998
  step: t === void 0 ? void 0 : 1 / 10 ** t
2991
2999
  });
2992
3000
  }
2993
- case v.NUMBER: return nt({
3001
+ case v.NUMBER: return rt({
2994
3002
  defaultValue: {
2995
- operator: dt.EQUALS,
3003
+ operator: ft.EQUALS,
2996
3004
  value: null
2997
3005
  },
2998
3006
  disableOperators: !0,
2999
3007
  key: r,
3000
3008
  label: i,
3001
- max: Ls.getRuleNumber(n, "max"),
3002
- min: Ls.getRuleNumber(n, "min")
3009
+ max: Rs.getRuleNumber(n, "max"),
3010
+ min: Rs.getRuleNumber(n, "min")
3003
3011
  });
3004
3012
  case v.MULTI_SELECT:
3005
- case v.SINGLE_SELECT: return et({
3013
+ case v.SINGLE_SELECT: return tt({
3006
3014
  defaultValue: {
3007
- operator: ct.INCLUDES,
3015
+ operator: lt.INCLUDES,
3008
3016
  value: []
3009
3017
  },
3010
3018
  disableOperators: !0,
@@ -3016,25 +3024,25 @@ function Rs(e) {
3016
3024
  case v.DATE:
3017
3025
  case v.TEXT:
3018
3026
  case v.TEXT_ARRAY:
3019
- case v.TIMESTAMP: return rt({
3027
+ case v.TIMESTAMP: return it({
3020
3028
  defaultValue: {
3021
- operator: ct.INCLUDES,
3029
+ operator: lt.INCLUDES,
3022
3030
  value: []
3023
3031
  },
3024
3032
  disableOperators: !0,
3025
3033
  displayFn: (e) => e,
3026
3034
  key: r,
3027
3035
  label: i,
3028
- options: (e) => Promise.resolve(Ls.getFreeformOptions(n, e))
3036
+ options: (e) => Promise.resolve(Rs.getFreeformOptions(n, e))
3029
3037
  });
3030
3038
  default: throw TypeError("Unsupported custom field definition type");
3031
3039
  }
3032
- }), s = it({
3040
+ }), s = at({
3033
3041
  actionGroup: { name: "invoices" },
3034
3042
  filters: [
3035
- rt({
3043
+ it({
3036
3044
  defaultValue: {
3037
- operator: ct.INCLUDES,
3045
+ operator: lt.INCLUDES,
3038
3046
  value: []
3039
3047
  },
3040
3048
  disableOperators: !0,
@@ -3043,9 +3051,9 @@ function Rs(e) {
3043
3051
  label: t.t("wise_invoicing.invoice.overview.filters.customer"),
3044
3052
  options: async (e) => (n.updateSearch(e), await new Promise((e) => setTimeout(e, 0)), i.value.map((e) => e.uuid))
3045
3053
  }),
3046
- at({
3054
+ ot({
3047
3055
  defaultValue: {
3048
- operator: ut.IS_BETWEEN,
3056
+ operator: dt.IS_BETWEEN,
3049
3057
  value: {
3050
3058
  from: null,
3051
3059
  until: null
@@ -3055,9 +3063,9 @@ function Rs(e) {
3055
3063
  key: "dueOnRange",
3056
3064
  label: t.t("wise_invoicing.invoice.overview.filters.due_on")
3057
3065
  }),
3058
- et({
3066
+ tt({
3059
3067
  defaultValue: {
3060
- operator: ct.INCLUDES,
3068
+ operator: lt.INCLUDES,
3061
3069
  value: []
3062
3070
  },
3063
3071
  disableOperators: !0,
@@ -3066,18 +3074,18 @@ function Rs(e) {
3066
3074
  label: t.t("wise_invoicing.invoice.overview.filters.lifecycle"),
3067
3075
  options: () => Object.values(x)
3068
3076
  }),
3069
- et({
3077
+ tt({
3070
3078
  defaultValue: {
3071
- operator: ct.INCLUDES,
3079
+ operator: lt.INCLUDES,
3072
3080
  value: []
3073
3081
  },
3074
3082
  disableOperators: !0,
3075
- displayFn: (e) => t.t(pt.getFilterTranslationKey(e)),
3083
+ displayFn: (e) => t.t(mt.getFilterTranslationKey(e)),
3076
3084
  key: "approvalStatuses",
3077
3085
  label: t.t("wise_invoicing.invoice.overview.filters.approval"),
3078
3086
  options: () => Object.values(l)
3079
3087
  }),
3080
- tt({
3088
+ nt({
3081
3089
  defaultValue: null,
3082
3090
  entityLabel: t.t("wise_invoicing.invoice.overview.filters.out_of_sync"),
3083
3091
  key: "hasChangesSinceApprovalSent",
@@ -3094,8 +3102,8 @@ function Rs(e) {
3094
3102
  }), d = j(() => {
3095
3103
  let t = s.values.value;
3096
3104
  return a.flatMap((n) => {
3097
- let r = t[Ls.getKey(n)], i = typeof r == "object" && r && "value" in r ? r.value : r;
3098
- return Ls.toFilters(n, i, e.currency);
3105
+ let r = t[Rs.getKey(n)], i = typeof r == "object" && r && "value" in r ? r.value : r;
3106
+ return Rs.toFilters(n, i, e.currency);
3099
3107
  });
3100
3108
  }), f = j(() => {
3101
3109
  let e = s.values.value.lifecycleStatuses.value;
@@ -3119,7 +3127,7 @@ function Rs(e) {
3119
3127
  }
3120
3128
  //#endregion
3121
3129
  //#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewFilters.composable.ts
3122
- var zs = {
3130
+ var Bs = {
3123
3131
  approvals: { approvalStatuses: [
3124
3132
  l.AWAITING_APPROVAL,
3125
3133
  l.REMINDER_1,
@@ -3136,7 +3144,7 @@ var zs = {
3136
3144
  overdue: { isOverdue: !0 },
3137
3145
  paid: { settlementStatuses: [p.PAID, p.OVERPAID] }
3138
3146
  };
3139
- function Bs() {
3147
+ function Vs() {
3140
3148
  let e = k(), t = ee(), n = j(() => [
3141
3149
  {
3142
3150
  key: "all",
@@ -3168,24 +3176,24 @@ function Bs() {
3168
3176
  }
3169
3177
  ]);
3170
3178
  return {
3171
- getFilters: (e) => e === "all" ? {} : zs[e],
3179
+ getFilters: (e) => e === "all" ? {} : Bs[e],
3172
3180
  tabs: j(() => {
3173
3181
  let e = t.invoiceOverviewTabs.value;
3174
3182
  return n.value.filter((t) => e[t.key]?.isHidden !== !0).map((t) => ({
3175
3183
  key: t.key,
3176
- label: It(e[t.key]?.label) ?? t.label
3184
+ label: Lt(e[t.key]?.label) ?? t.label
3177
3185
  }));
3178
3186
  })
3179
3187
  };
3180
3188
  }
3181
3189
  //#endregion
3182
3190
  //#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewSelection.composable.ts
3183
- var Vs = {
3191
+ var Hs = {
3184
3192
  items: [],
3185
3193
  type: "includes"
3186
3194
  };
3187
- function Hs(e) {
3188
- let t = Ft(Vs), n = V(0), r = j(() => t.value.type === "excludes"), i = j(() => new Set(t.value.items.map((e) => e.uuid))), a = j(() => e.rows().filter((e) => {
3195
+ function Us(e) {
3196
+ let t = It(Hs), n = V(0), r = j(() => t.value.type === "excludes"), i = j(() => new Set(t.value.items.map((e) => e.uuid))), a = j(() => e.rows().filter((e) => {
3189
3197
  let t = i.value.has(e.uuid);
3190
3198
  return r.value ? !t : t;
3191
3199
  })), o = j(() => {
@@ -3204,9 +3212,9 @@ function Hs(e) {
3204
3212
  t.value = e;
3205
3213
  }
3206
3214
  function l() {
3207
- (r.value || t.value.items.length !== 0) && (t.value = Vs, n.value += 1);
3215
+ (r.value || t.value.items.length !== 0) && (t.value = Hs, n.value += 1);
3208
3216
  }
3209
- return Rt(e.queryParams, l, { deep: !0 }), {
3217
+ return zt(e.queryParams, l, { deep: !0 }), {
3210
3218
  clearSelection: l,
3211
3219
  matching: o,
3212
3220
  selectedCount: s,
@@ -3217,12 +3225,12 @@ function Hs(e) {
3217
3225
  }
3218
3226
  //#endregion
3219
3227
  //#region src/modules/invoice/use-cases/overview/components/InvoiceOverviewTableAmountCell.vue?vue&type=script&setup=true&lang.ts
3220
- var Us = { class: "font-medium text-secondary" }, Ws = ["title"], Gs = /* @__PURE__ */ R({
3228
+ var Ws = { class: "font-medium text-secondary" }, Gs = ["title"], Ks = /* @__PURE__ */ R({
3221
3229
  __name: "InvoiceOverviewTableAmountCell",
3222
3230
  props: { value: {} },
3223
3231
  setup(e) {
3224
3232
  let t = e, n = k(), r = C(), i = j(() => r.formatMonetary(t.value.total)), a = j(() => {
3225
- let e = yt.getSubtextParts({
3233
+ let e = bt.getSubtextParts({
3226
3234
  balanceDueAmount: t.value.balanceDueAmount,
3227
3235
  grossAmount: t.value.grossAmount,
3228
3236
  paidAmount: t.value.paidAmount,
@@ -3242,17 +3250,17 @@ var Us = { class: "font-medium text-secondary" }, Ws = ["title"], Gs = /* @__PUR
3242
3250
  gap: "xxs",
3243
3251
  class: "text-sm/tight"
3244
3252
  }, {
3245
- default: G(() => [F("span", Us, U(i.value), 1), a.value === null ? N("", !0) : (B(), P("span", {
3253
+ default: G(() => [F("span", Ws, U(i.value), 1), a.value === null ? N("", !0) : (B(), P("span", {
3246
3254
  key: 0,
3247
3255
  title: a.value,
3248
3256
  class: "truncate text-xs text-secondary"
3249
- }, U(a.value), 9, Ws))]),
3257
+ }, U(a.value), 9, Gs))]),
3250
3258
  _: 1
3251
3259
  })]),
3252
3260
  _: 1
3253
3261
  }));
3254
3262
  }
3255
- }), Ks = /* @__PURE__ */ R({
3263
+ }), qs = /* @__PURE__ */ R({
3256
3264
  __name: "InvoiceOverviewTableApprovalCell",
3257
3265
  props: {
3258
3266
  hasChangesSinceApprovalSent: { type: Boolean },
@@ -3266,16 +3274,16 @@ var Us = { class: "font-medium text-secondary" }, Ws = ["title"], Gs = /* @__PUR
3266
3274
  align: "center",
3267
3275
  gap: "xs"
3268
3276
  }, {
3269
- default: G(() => [L(St, {
3277
+ default: G(() => [L(Ct, {
3270
3278
  approval: t.approval,
3271
3279
  "requires-prior-approval": t.requiresPriorApproval
3272
- }, null, 8, ["approval", "requires-prior-approval"]), t.hasChangesSinceApprovalSent ? (B(), M(ht, { key: 0 })) : N("", !0)]),
3280
+ }, null, 8, ["approval", "requires-prior-approval"]), t.hasChangesSinceApprovalSent ? (B(), M(gt, { key: 0 })) : N("", !0)]),
3273
3281
  _: 1
3274
3282
  })]),
3275
3283
  _: 1
3276
3284
  }));
3277
3285
  }
3278
- }), qs = /* @__PURE__ */ R({
3286
+ }), Js = /* @__PURE__ */ R({
3279
3287
  __name: "InvoiceOverviewTableCustomFieldCell",
3280
3288
  props: {
3281
3289
  definition: {},
@@ -3296,14 +3304,14 @@ var Us = { class: "font-medium text-secondary" }, Ws = ["title"], Gs = /* @__PUR
3296
3304
  _: 1
3297
3305
  }));
3298
3306
  }
3299
- }), Js = /* @__PURE__ */ R({
3307
+ }), Ys = /* @__PURE__ */ R({
3300
3308
  __name: "InvoiceOverviewTableDueDateCell",
3301
3309
  props: {
3302
3310
  isOverdue: { type: Boolean },
3303
3311
  value: {}
3304
3312
  },
3305
3313
  setup(e) {
3306
- let t = e, n = Ze(), r = j(() => t.value === null ? "-" : n.formatPlainDate(t.value)), i = j(() => {
3314
+ let t = e, n = Qe(), r = j(() => t.value === null ? "-" : n.formatPlainDate(t.value)), i = j(() => {
3307
3315
  if (!t.isOverdue || t.value === null) return null;
3308
3316
  let e = t.value.toZonedDateTime(K.Now.timeZoneId()).toInstant();
3309
3317
  return n.toRelativeTime(e);
@@ -3316,7 +3324,7 @@ var Us = { class: "font-medium text-secondary" }, Ws = ["title"], Gs = /* @__PUR
3316
3324
  "text-primary": !t.isOverdue
3317
3325
  }, "text-sm"]),
3318
3326
  text: r.value
3319
- }, null, 8, ["class", "text"]), i.value === null ? N("", !0) : (B(), M(W(Qt), {
3327
+ }, null, 8, ["class", "text"]), i.value === null ? N("", !0) : (B(), M(W($t), {
3320
3328
  key: 0,
3321
3329
  label: i.value,
3322
3330
  color: "error",
@@ -3328,11 +3336,11 @@ var Us = { class: "font-medium text-secondary" }, Ws = ["title"], Gs = /* @__PUR
3328
3336
  _: 1
3329
3337
  }));
3330
3338
  }
3331
- }), Ys = /* @__PURE__ */ R({
3339
+ }), Xs = /* @__PURE__ */ R({
3332
3340
  __name: "InvoiceOverviewTableIssuedDateCell",
3333
3341
  props: { value: {} },
3334
3342
  setup(e) {
3335
- let t = e, n = Ze(), r = j(() => t.value === null ? "-" : n.formatPlainDate(t.value));
3343
+ let t = e, n = Qe(), r = j(() => t.value === null ? "-" : n.formatPlainDate(t.value));
3336
3344
  return (e, t) => (B(), M(W(X), null, {
3337
3345
  default: G(() => [L(W(Z), {
3338
3346
  text: r.value,
@@ -3341,7 +3349,7 @@ var Us = { class: "font-medium text-secondary" }, Ws = ["title"], Gs = /* @__PUR
3341
3349
  _: 1
3342
3350
  }));
3343
3351
  }
3344
- }), Xs = /* @__PURE__ */ R({
3352
+ }), Zs = /* @__PURE__ */ R({
3345
3353
  __name: "InvoiceOverviewTableLifecycleCell",
3346
3354
  props: {
3347
3355
  isDisputed: { type: Boolean },
@@ -3351,13 +3359,13 @@ var Us = { class: "font-medium text-secondary" }, Ws = ["title"], Gs = /* @__PUR
3351
3359
  let t = e;
3352
3360
  return (e, n) => (B(), M(W(X), null, {
3353
3361
  default: G(() => [L(W(Y), { gap: "xs" }, {
3354
- default: G(() => [L(_t, { "lifecycle-status": t.lifecycleStatus }, null, 8, ["lifecycle-status"]), t.isDisputed ? (B(), M(gt, { key: 0 })) : N("", !0)]),
3362
+ default: G(() => [L(vt, { "lifecycle-status": t.lifecycleStatus }, null, 8, ["lifecycle-status"]), t.isDisputed ? (B(), M(_t, { key: 0 })) : N("", !0)]),
3355
3363
  _: 1
3356
3364
  })]),
3357
3365
  _: 1
3358
3366
  }));
3359
3367
  }
3360
- }), Zs = { class: "flex flex-col leading-tight" }, Qs = ["title"], $s = ["title"], ec = /* @__PURE__ */ R({
3368
+ }), Qs = { class: "flex flex-col leading-tight" }, $s = ["title"], ec = ["title"], tc = /* @__PURE__ */ R({
3361
3369
  __name: "InvoiceOverviewTableNameCell",
3362
3370
  props: {
3363
3371
  customerName: {},
@@ -3367,11 +3375,11 @@ var Us = { class: "font-medium text-secondary" }, Ws = ["title"], Gs = /* @__PUR
3367
3375
  setup(e) {
3368
3376
  let t = e, n = k();
3369
3377
  return (e, r) => (B(), M(W(X), null, {
3370
- default: G(() => [F("div", Zs, [L(W(Y), null, {
3378
+ default: G(() => [F("div", Qs, [L(W(Y), null, {
3371
3379
  default: G(() => [F("span", {
3372
3380
  title: t.customerName,
3373
3381
  class: "truncate text-sm/4 font-medium text-primary"
3374
- }, U(t.customerName), 9, Qs), t.type === W(b).CREDIT_NOTE ? (B(), M(W(Me), {
3382
+ }, U(t.customerName), 9, $s), t.type === W(b).CREDIT_NOTE ? (B(), M(W(Ne), {
3375
3383
  key: 0,
3376
3384
  "aria-label": W(n).t("wise_invoicing.invoice.type.credit_note"),
3377
3385
  class: "size-3 shrink-0 text-warning-primary",
@@ -3381,39 +3389,39 @@ var Us = { class: "font-medium text-secondary" }, Ws = ["title"], Gs = /* @__PUR
3381
3389
  }), F("span", {
3382
3390
  title: t.subject ?? void 0,
3383
3391
  class: "truncate text-xs/4 text-secondary"
3384
- }, U(t.subject ?? "-"), 9, $s)])]),
3392
+ }, U(t.subject ?? "-"), 9, ec)])]),
3385
3393
  _: 1
3386
3394
  }));
3387
3395
  }
3388
- }), tc = /* @__PURE__ */ R({
3396
+ }), nc = /* @__PURE__ */ R({
3389
3397
  __name: "InvoiceOverviewTableSentCell",
3390
3398
  props: { deliveryStatus: {} },
3391
3399
  setup(e) {
3392
3400
  let t = e, n = k(), r = j(() => [y.SENT, y.VIEWED].includes(t.deliveryStatus));
3393
3401
  return (e, i) => (B(), M(W(X), null, {
3394
- default: G(() => [r.value ? (B(), M(W(Ne), {
3402
+ default: G(() => [r.value ? (B(), M(W(Pe), {
3395
3403
  key: 0,
3396
3404
  class: "size-4 text-brand-600"
3397
- })) : t.deliveryStatus === W(y).PROCESSING ? (B(), M(W(vn), {
3405
+ })) : t.deliveryStatus === W(y).PROCESSING ? (B(), M(W(yn), {
3398
3406
  key: 1,
3399
3407
  "aria-label": W(n).t("wise_invoicing.invoice.delivery_status.processing"),
3400
3408
  "aria-hidden": "false",
3401
3409
  role: "img",
3402
3410
  class: "size-4 text-tertiary"
3403
- }, null, 8, ["aria-label"])) : t.deliveryStatus === W(y).FAILED ? (B(), M(W(jn), {
3411
+ }, null, 8, ["aria-label"])) : t.deliveryStatus === W(y).FAILED ? (B(), M(W(Mn), {
3404
3412
  key: 2,
3405
3413
  "popover-side-offset": 8,
3406
3414
  "popover-align": "center",
3407
3415
  "popover-side": "bottom"
3408
3416
  }, {
3409
- trigger: G(() => [L(W(Cn), null, {
3410
- default: G(() => [L(W(je), {
3417
+ trigger: G(() => [L(W(wn), null, {
3418
+ default: G(() => [L(W(Me), {
3411
3419
  "aria-label": W(n).t("wise_invoicing.invoice.overview.send_failed"),
3412
3420
  class: "size-4 text-error-primary"
3413
3421
  }, null, 8, ["aria-label"])]),
3414
3422
  _: 1
3415
3423
  })]),
3416
- content: G(() => [L(W(Mn), null, {
3424
+ content: G(() => [L(W(Nn), null, {
3417
3425
  default: G(() => [L(W(Z), {
3418
3426
  text: W(n).t("wise_invoicing.invoice.overview.send_failed"),
3419
3427
  class: "text-sm text-primary"
@@ -3425,22 +3433,22 @@ var Us = { class: "font-medium text-secondary" }, Ws = ["title"], Gs = /* @__PUR
3425
3433
  _: 1
3426
3434
  }));
3427
3435
  }
3428
- }), nc = /* @__PURE__ */ R({
3436
+ }), rc = /* @__PURE__ */ R({
3429
3437
  __name: "InvoiceOverviewTableSequenceCell",
3430
3438
  props: { sequence: {} },
3431
3439
  setup(e) {
3432
3440
  return (t, n) => (B(), M(W(X), null, {
3433
- default: G(() => [L(W(wn), { text: e.sequence ?? "-" }, null, 8, ["text"])]),
3441
+ default: G(() => [L(W(Tn), { text: e.sequence ?? "-" }, null, 8, ["text"])]),
3434
3442
  _: 1
3435
3443
  }));
3436
3444
  }
3437
- }), rc = /* @__PURE__ */ R({
3445
+ }), ic = /* @__PURE__ */ R({
3438
3446
  __name: "InvoiceOverviewTableStatusCell",
3439
3447
  props: { value: {} },
3440
3448
  setup(e) {
3441
- let t = e, n = j(() => t.value.type === b.CREDIT_NOTE), r = j(() => vt.isSent(t.value.deliveryStatus));
3449
+ let t = e, n = j(() => t.value.type === b.CREDIT_NOTE), r = j(() => yt.isSent(t.value.deliveryStatus));
3442
3450
  return (e, i) => (B(), M(W(X), null, {
3443
- default: G(() => [n.value ? N("", !0) : (B(), M(bt, {
3451
+ default: G(() => [n.value ? N("", !0) : (B(), M(xt, {
3444
3452
  key: 0,
3445
3453
  "is-sent": r.value,
3446
3454
  "balance-due-amount": t.value.balanceDueAmount,
@@ -3463,22 +3471,22 @@ var Us = { class: "font-medium text-secondary" }, Ws = ["title"], Gs = /* @__PUR
3463
3471
  });
3464
3472
  //#endregion
3465
3473
  //#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewTableColumns.composable.ts
3466
- function ic(e) {
3474
+ function ac(e) {
3467
3475
  let t = k();
3468
3476
  return j(() => {
3469
3477
  let n = e?.customFieldDefinitions?.().map((e) => ({
3470
3478
  headerLabel: de.getLabel(e, t.locale.value),
3471
- key: Ls.getKey(e),
3479
+ key: Rs.getKey(e),
3472
3480
  size: {
3473
3481
  max: "1fr",
3474
3482
  min: "10rem"
3475
3483
  },
3476
- component: (t) => Q(qs, {
3484
+ component: (t) => Q(Js, {
3477
3485
  definition: e,
3478
3486
  value: t.customFields.find((t) => t.definitionUuid === e.uuid)
3479
3487
  })
3480
3488
  })) ?? [];
3481
- return Fn()([
3489
+ return In()([
3482
3490
  {
3483
3491
  headerLabel: t.t("wise_invoicing.invoice.overview.columns.recipient"),
3484
3492
  key: o.CUSTOMER,
@@ -3486,7 +3494,7 @@ function ic(e) {
3486
3494
  max: "16rem",
3487
3495
  min: "16rem"
3488
3496
  },
3489
- component: (e) => Q(ec, {
3497
+ component: (e) => Q(tc, {
3490
3498
  customerName: e.customerName,
3491
3499
  subject: e.subject,
3492
3500
  type: e.type
@@ -3499,7 +3507,7 @@ function ic(e) {
3499
3507
  max: "9rem",
3500
3508
  min: "9rem"
3501
3509
  },
3502
- component: (e) => Q(nc, { sequence: e.sequence })
3510
+ component: (e) => Q(rc, { sequence: e.sequence })
3503
3511
  },
3504
3512
  {
3505
3513
  headerLabel: t.t("wise_invoicing.invoice.overview.columns.lifecycle"),
@@ -3508,7 +3516,7 @@ function ic(e) {
3508
3516
  max: "12rem",
3509
3517
  min: "8rem"
3510
3518
  },
3511
- component: (e) => Q(Xs, {
3519
+ component: (e) => Q(Zs, {
3512
3520
  isDisputed: e.isDisputed,
3513
3521
  lifecycleStatus: e.lifecycleStatus
3514
3522
  })
@@ -3520,7 +3528,7 @@ function ic(e) {
3520
3528
  max: "8rem",
3521
3529
  min: "8rem"
3522
3530
  },
3523
- component: (e) => Q(Ys, { value: e.issuedOn })
3531
+ component: (e) => Q(Xs, { value: e.issuedOn })
3524
3532
  },
3525
3533
  {
3526
3534
  headerLabel: t.t("wise_invoicing.invoice.overview.columns.sent"),
@@ -3529,7 +3537,7 @@ function ic(e) {
3529
3537
  max: "8rem",
3530
3538
  min: "8rem"
3531
3539
  },
3532
- component: (e) => Q(tc, { deliveryStatus: e.deliveryStatus })
3540
+ component: (e) => Q(nc, { deliveryStatus: e.deliveryStatus })
3533
3541
  },
3534
3542
  {
3535
3543
  headerLabel: t.t("wise_invoicing.invoice.overview.columns.settlement"),
@@ -3538,7 +3546,7 @@ function ic(e) {
3538
3546
  max: "10rem",
3539
3547
  min: "10rem"
3540
3548
  },
3541
- component: (e) => Q(rc, { value: e })
3549
+ component: (e) => Q(ic, { value: e })
3542
3550
  },
3543
3551
  {
3544
3552
  headerLabel: t.t("wise_invoicing.invoice.overview.columns.approval"),
@@ -3547,7 +3555,7 @@ function ic(e) {
3547
3555
  max: "12rem",
3548
3556
  min: "10rem"
3549
3557
  },
3550
- component: (e) => Q(Ks, {
3558
+ component: (e) => Q(qs, {
3551
3559
  hasChangesSinceApprovalSent: e.hasChangesSinceApprovalSent && e.lifecycleStatus !== x.FINALIZED,
3552
3560
  approval: e.approval,
3553
3561
  requiresPriorApproval: e.requiresPriorApproval
@@ -3560,7 +3568,7 @@ function ic(e) {
3560
3568
  max: "16rem",
3561
3569
  min: "16rem"
3562
3570
  },
3563
- component: (e) => Q(Js, {
3571
+ component: (e) => Q(Ys, {
3564
3572
  isOverdue: e.isOverdue,
3565
3573
  value: e.dueOn
3566
3574
  })
@@ -3572,38 +3580,43 @@ function ic(e) {
3572
3580
  max: "1fr",
3573
3581
  min: "10rem"
3574
3582
  },
3575
- component: (e) => Q(Gs, { value: e })
3583
+ component: (e) => Q(Ks, { value: e })
3576
3584
  },
3577
3585
  ...n
3578
3586
  ]);
3579
3587
  });
3580
3588
  }
3581
3589
  //#endregion
3582
- //#region src/modules/invoice/api/mutations/invoiceBulkFinalize.mutation.ts
3583
- function ac() {
3584
- return Wt({
3585
- queryFn: (e) => T.bulkFinalize(e.params.target),
3586
- queryKeysToInvalidate: { invoiceDetail: {} }
3590
+ //#region src/modules/invoice/api/mutations/invoiceBulkDelete.mutation.ts
3591
+ function oc() {
3592
+ return Gt({
3593
+ queryFn: (e) => T.bulkDelete(e.params.target),
3594
+ queryKeysToInvalidate: {
3595
+ invoiceDetail: {},
3596
+ invoiceIndex: {}
3597
+ }
3587
3598
  });
3588
3599
  }
3589
3600
  //#endregion
3590
3601
  //#region src/modules/invoice/use-cases/overview/utils/invoiceOverviewBulkActionFeedback.util.ts
3591
- var oc = {
3602
+ var sc = {
3592
3603
  approval_already_sent_error: "wise_invoicing.invoice.overview.bulk.skip_reason.approval_already_sent",
3593
3604
  approval_requires_customer_prior_approval: "wise_invoicing.invoice.overview.bulk.skip_reason.approval_not_required",
3594
3605
  approval_requires_editable_invoice: "wise_invoicing.invoice.overview.bulk.skip_reason.not_editable",
3595
3606
  approval_requires_standard_invoice: "wise_invoicing.invoice.overview.bulk.skip_reason.not_standard",
3596
3607
  customer_has_no_approval_email: "wise_invoicing.invoice.overview.bulk.skip_reason.no_approval_email",
3597
3608
  customer_has_no_default_recipient: "wise_invoicing.invoice.overview.bulk.skip_reason.no_recipient",
3609
+ delete_invoice_with_approval: "wise_invoicing.invoice.overview.bulk.skip_reason.has_approval",
3598
3610
  invoice_finalization_requires_approval: "wise_invoicing.invoice.finalize.blocked_by_approval",
3599
3611
  invoice_issued_on_before_last_issued: "wise_invoicing.invoice.overview.bulk.skip_reason.issued_on_before_last_issued",
3600
3612
  invoice_issued_on_in_closed_period: "wise_invoicing.invoice.overview.bulk.skip_reason.issued_on_in_closed_period",
3601
3613
  invoice_issued_on_in_future: "wise_invoicing.invoice.overview.bulk.skip_reason.issued_on_in_future",
3614
+ invoice_not_editable: "wise_invoicing.invoice.overview.bulk.skip_reason.not_editable",
3602
3615
  invoice_not_found: "wise_invoicing.invoice.overview.bulk.skip_reason.not_found"
3603
- }, sc = O.object({
3616
+ }, cc = O.object({
3604
3617
  approvalStatus: O.enum(c).nullable(),
3605
3618
  level: O.enum(g).nullable()
3606
- }), cc = "wise_invoicing.invoice.overview.bulk.skip_reason.unknown", $ = class {
3619
+ }), lc = "wise_invoicing.invoice.overview.bulk.skip_reason.unknown", $ = class {
3607
3620
  static createEmptyPreview() {
3608
3621
  return {
3609
3622
  skipped: [],
@@ -3635,9 +3648,9 @@ var oc = {
3635
3648
  static getBlockingApprovalStatusKeys(e) {
3636
3649
  let t = {};
3637
3650
  for (let n of e) {
3638
- let e = sc.safeParse(n.errors[0]?.errors[0]?.meta);
3651
+ let e = cc.safeParse(n.errors[0]?.errors[0]?.meta);
3639
3652
  if (!e.success) continue;
3640
- let r = pt.getDisplayStatus({
3653
+ let r = mt.getDisplayStatus({
3641
3654
  approval: e.data.approvalStatus === null ? null : {
3642
3655
  reminderSentAt: null,
3643
3656
  sentAt: null,
@@ -3646,7 +3659,7 @@ var oc = {
3646
3659
  },
3647
3660
  requiresPriorApproval: !0
3648
3661
  });
3649
- r !== null && (t[n.uuid] = pt.getMetadata(r).translationKey);
3662
+ r !== null && (t[n.uuid] = mt.getMetadata(r).translationKey);
3650
3663
  }
3651
3664
  return t;
3652
3665
  }
@@ -3666,7 +3679,7 @@ var oc = {
3666
3679
  let t = {};
3667
3680
  for (let n of e) {
3668
3681
  let e = n.errors[0]?.errors[0]?.code;
3669
- t[n.uuid] = e === void 0 ? cc : oc[e] ?? cc;
3682
+ t[n.uuid] = e === void 0 ? lc : sc[e] ?? lc;
3670
3683
  }
3671
3684
  return t;
3672
3685
  }
@@ -3677,7 +3690,7 @@ var oc = {
3677
3690
  };
3678
3691
  //#endregion
3679
3692
  //#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewBulkActionPlan.composable.ts
3680
- function lc(e) {
3693
+ function uc(e) {
3681
3694
  let t = j(() => e.preview()?.meta.processed ?? 0), n = j(() => $.getUnskippedInvoiceUuids(e.eligibleInvoices(), e.preview()?.skipped ?? [])), r = j(() => {
3682
3695
  let t = e.matching();
3683
3696
  if (t !== null) return t.target;
@@ -3716,25 +3729,26 @@ function lc(e) {
3716
3729
  }
3717
3730
  //#endregion
3718
3731
  //#region src/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkActionDialog.vue?vue&type=script&setup=true&lang.ts
3719
- var uc = {
3732
+ var dc = {
3720
3733
  key: 0,
3721
3734
  class: "text-sm text-error-primary"
3722
- }, dc = {
3735
+ }, fc = {
3723
3736
  key: 1,
3724
3737
  class: "text-sm text-secondary"
3725
- }, fc = {
3738
+ }, pc = {
3726
3739
  key: 0,
3727
3740
  class: "text-sm text-primary"
3728
- }, pc = {
3741
+ }, mc = {
3729
3742
  key: 1,
3730
3743
  class: "text-sm text-secondary"
3731
- }, mc = { class: "text-sm text-secondary" }, hc = {
3744
+ }, hc = { class: "text-sm text-secondary" }, gc = {
3732
3745
  key: 0,
3733
3746
  class: "text-xs text-tertiary"
3734
- }, gc = /* @__PURE__ */ R({
3747
+ }, _c = /* @__PURE__ */ R({
3735
3748
  __name: "InvoiceOverviewBulkActionDialog",
3736
3749
  props: {
3737
3750
  title: {},
3751
+ isDestructive: { type: Boolean },
3738
3752
  isPreviewLoading: { type: Boolean },
3739
3753
  isSubmitting: { type: Boolean },
3740
3754
  confirmLabel: {},
@@ -3752,12 +3766,12 @@ var uc = {
3752
3766
  emits: ["close", "confirm"],
3753
3767
  setup(e, { emit: t }) {
3754
3768
  let n = e, r = t;
3755
- return (e, t) => (B(), M(W(sn), {
3769
+ return (e, t) => (B(), M(W(cn), {
3756
3770
  size: "sm",
3757
3771
  onClose: t[1] ||= (e) => r("close")
3758
3772
  }, {
3759
3773
  default: G(() => [
3760
- L(W(pn), {
3774
+ L(W(mn), {
3761
3775
  title: n.title,
3762
3776
  description: n.description,
3763
3777
  icon: n.icon
@@ -3766,42 +3780,44 @@ var uc = {
3766
3780
  "description",
3767
3781
  "icon"
3768
3782
  ]),
3769
- L(W(cn), null, {
3783
+ L(W(ln), null, {
3770
3784
  default: G(() => [L(W(J), null, {
3771
- default: G(() => [n.previewErrorLabel === null ? n.isPreviewLoading ? (B(), P("p", dc, U(n.loadingLabel), 1)) : (B(), P(A, { key: 2 }, [n.processableCount > 0 ? (B(), P("p", fc, U(n.processableLabel), 1)) : (B(), P("p", pc, U(n.noneProcessableLabel), 1)), n.skippedInvoices.length > 0 ? (B(), M(W(J), {
3785
+ default: G(() => [n.previewErrorLabel === null ? n.isPreviewLoading ? (B(), P("p", fc, U(n.loadingLabel), 1)) : (B(), P(A, { key: 2 }, [n.processableCount > 0 ? (B(), P("p", pc, U(n.processableLabel), 1)) : (B(), P("p", mc, U(n.noneProcessableLabel), 1)), n.skippedInvoices.length > 0 ? (B(), M(W(J), {
3772
3786
  key: 2,
3773
3787
  gap: "sm",
3774
3788
  class: "rounded-lg border border-secondary bg-secondary p-md"
3775
3789
  }, {
3776
- default: G(() => [F("p", mc, U(n.skippedPreviewLabel), 1), L(W(J), { gap: "xs" }, {
3790
+ default: G(() => [F("p", hc, U(n.skippedPreviewLabel), 1), L(W(J), { gap: "xs" }, {
3777
3791
  default: G(() => [(B(!0), P(A, null, H(n.skippedInvoices, (e) => (B(), M(W(J), {
3778
3792
  key: e.uuid,
3779
3793
  gap: "none"
3780
3794
  }, {
3781
- default: G(() => [L(W(Yt), {
3795
+ default: G(() => [L(W(Xt), {
3782
3796
  to: W($).getInvoiceDetailLink(e),
3783
3797
  class: "text-sm text-brand-primary hover:underline"
3784
3798
  }, {
3785
3799
  default: G(() => [I(U(W($).getInvoiceLabel(e)), 1)]),
3786
3800
  _: 2
3787
- }, 1032, ["to"]), n.skipReasons?.[e.uuid] === void 0 ? N("", !0) : (B(), P("p", hc, U(n.skipReasons[e.uuid]), 1))]),
3801
+ }, 1032, ["to"]), n.skipReasons?.[e.uuid] === void 0 ? N("", !0) : (B(), P("p", gc, U(n.skipReasons[e.uuid]), 1))]),
3788
3802
  _: 2
3789
3803
  }, 1024))), 128))]),
3790
3804
  _: 1
3791
3805
  })]),
3792
3806
  _: 1
3793
- })) : N("", !0)], 64)) : (B(), P("p", uc, U(n.previewErrorLabel), 1))]),
3807
+ })) : N("", !0)], 64)) : (B(), P("p", dc, U(n.previewErrorLabel), 1))]),
3794
3808
  _: 1
3795
3809
  })]),
3796
3810
  _: 1
3797
3811
  }),
3798
- L(W(ln), null, {
3799
- right: G(() => [L(W(un)), L(W(dn), {
3812
+ L(W(un), null, {
3813
+ right: G(() => [L(W(dn)), L(W(fn), {
3814
+ "is-destructive": n.isDestructive ?? !1,
3800
3815
  "is-disabled": n.isPreviewLoading || n.processableCount === 0,
3801
3816
  "is-loading": n.isSubmitting,
3802
3817
  label: n.confirmLabel,
3803
3818
  onClick: t[0] ||= (e) => r("confirm")
3804
3819
  }, null, 8, [
3820
+ "is-destructive",
3805
3821
  "is-disabled",
3806
3822
  "is-loading",
3807
3823
  "label"
@@ -3812,7 +3828,94 @@ var uc = {
3812
3828
  _: 1
3813
3829
  }));
3814
3830
  }
3815
- }), _c = /* @__PURE__ */ R({
3831
+ }), vc = /* @__PURE__ */ R({
3832
+ __name: "InvoiceOverviewBulkDeleteDialog",
3833
+ props: {
3834
+ invoices: {},
3835
+ matching: {},
3836
+ onDeleted: { type: Function }
3837
+ },
3838
+ emits: ["close"],
3839
+ setup(e, { emit: t }) {
3840
+ let n = e, r = t, i = k(), a = Bn(), o = oc(), s = V(!0), c = V(!1), l = V(null), u = V(null), { previewTarget: d, processableCount: f, skippedCount: p, skippedInvoices: m, submitTarget: h, titleCount: g } = uc({
3841
+ eligibleInvoices: () => n.invoices.filter((e) => ue.isEditable(e.status)),
3842
+ invoices: () => n.invoices,
3843
+ matching: () => n.matching,
3844
+ preview: () => l.value
3845
+ }), _ = j(() => {
3846
+ let e = l.value?.skipped ?? [], t = $.getSkipReasonKeys(e);
3847
+ return Object.fromEntries(Object.entries(t).map(([e, t]) => [e, i.t(t)]));
3848
+ });
3849
+ async function v() {
3850
+ let e = h.value;
3851
+ if (e === null || c.value) return;
3852
+ c.value = !0;
3853
+ let t = await o.execute({ params: { target: e } });
3854
+ c.value = !1, t.isErr() ? a.apiError(t.error) : (l.value = t.value, t.value.meta.processed > 0 && a.show({ message: i.t("wise_invoicing.invoice.overview.bulk.delete.success", { count: t.value.meta.processed }) }), p.value > 0 && a.show($.createSkippedToast({
3855
+ id: "invoice-overview-bulk-delete-skipped",
3856
+ invoices: m.value,
3857
+ message: i.t("wise_invoicing.invoice.overview.bulk.delete.skipped", { count: p.value })
3858
+ })), t.value.meta.processed !== 0 && (n.onDeleted(), r("close")));
3859
+ }
3860
+ async function y() {
3861
+ s.value = !0;
3862
+ let e = d.value;
3863
+ if (e === null) {
3864
+ l.value = $.createEmptyPreview(), s.value = !1;
3865
+ return;
3866
+ }
3867
+ let t = await T.previewBulkDelete(e);
3868
+ t.isErr() ? (u.value = i.t("wise_invoicing.invoice.overview.bulk.preview_error"), s.value = !1) : (l.value = t.value, s.value = !1);
3869
+ }
3870
+ return Mt(() => {
3871
+ y();
3872
+ }), (e, t) => (B(), M(_c, {
3873
+ "confirm-label": W(i).t("wise_invoicing.invoice.overview.bulk.delete.confirm"),
3874
+ description: W(i).t("wise_invoicing.invoice.overview.bulk.delete.description"),
3875
+ icon: W(Ee),
3876
+ "is-destructive": !0,
3877
+ "is-preview-loading": s.value,
3878
+ "is-submitting": c.value,
3879
+ "loading-label": W(i).t("wise_invoicing.invoice.overview.bulk.delete.loading"),
3880
+ "none-processable-label": W(i).t("wise_invoicing.invoice.overview.bulk.delete.none_processable"),
3881
+ "preview-error-label": u.value,
3882
+ "processable-count": W(f),
3883
+ "processable-label": W(i).t("wise_invoicing.invoice.overview.bulk.delete.processable", { count: W(f) }),
3884
+ "skip-reasons": _.value,
3885
+ "skipped-invoices": W(m),
3886
+ "skipped-preview-label": W(i).t("wise_invoicing.invoice.overview.bulk.delete.skipped_preview", { count: W(p) }),
3887
+ title: W(i).t("wise_invoicing.invoice.overview.bulk.delete.title", { count: W(g) }),
3888
+ onClose: t[0] ||= (e) => r("close"),
3889
+ onConfirm: v
3890
+ }, null, 8, [
3891
+ "confirm-label",
3892
+ "description",
3893
+ "icon",
3894
+ "is-preview-loading",
3895
+ "is-submitting",
3896
+ "loading-label",
3897
+ "none-processable-label",
3898
+ "preview-error-label",
3899
+ "processable-count",
3900
+ "processable-label",
3901
+ "skip-reasons",
3902
+ "skipped-invoices",
3903
+ "skipped-preview-label",
3904
+ "title"
3905
+ ]));
3906
+ }
3907
+ });
3908
+ //#endregion
3909
+ //#region src/modules/invoice/api/mutations/invoiceBulkFinalize.mutation.ts
3910
+ function yc() {
3911
+ return Gt({
3912
+ queryFn: (e) => T.bulkFinalize(e.params.target),
3913
+ queryKeysToInvalidate: { invoiceDetail: {} }
3914
+ });
3915
+ }
3916
+ //#endregion
3917
+ //#region src/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkFinalizeDialog.vue
3918
+ var bc = /* @__PURE__ */ R({
3816
3919
  __name: "InvoiceOverviewBulkFinalizeDialog",
3817
3920
  props: {
3818
3921
  invoices: {},
@@ -3821,7 +3924,7 @@ var uc = {
3821
3924
  },
3822
3925
  emits: ["close"],
3823
3926
  setup(e, { emit: t }) {
3824
- let n = e, r = t, i = k(), a = zn(), o = ac(), s = V(!0), c = V(!1), l = V(null), d = V(null), { getProcessedInvoiceUuids: f, previewTarget: p, processableCount: m, skippedCount: h, skippedInvoices: g, submitTarget: _, titleCount: v } = lc({
3927
+ let n = e, r = t, i = k(), a = Bn(), o = yc(), s = V(!0), c = V(!1), l = V(null), d = V(null), { getProcessedInvoiceUuids: f, previewTarget: p, processableCount: m, skippedCount: h, skippedInvoices: g, submitTarget: _, titleCount: v } = uc({
3825
3928
  eligibleInvoices: () => n.invoices.filter((e) => e.status === u.READY),
3826
3929
  invoices: () => n.invoices,
3827
3930
  matching: () => n.matching,
@@ -3843,7 +3946,7 @@ var uc = {
3843
3946
  return;
3844
3947
  }
3845
3948
  let s = f(e, t.value.skipped);
3846
- l.value = t.value, s.length > 0 && xt.reflectBulkAction(s, {
3949
+ l.value = t.value, s.length > 0 && St.reflectBulkAction(s, {
3847
3950
  lifecycleStatus: x.FINALIZED,
3848
3951
  status: u.FINALIZED
3849
3952
  }), t.value.meta.processed > 0 && a.show({ message: i.t("wise_invoicing.invoice.overview.bulk.finalize.success", { count: t.value.meta.processed }) }), h.value > 0 && a.show($.createSkippedToast({
@@ -3862,9 +3965,9 @@ var uc = {
3862
3965
  let t = await T.previewBulkFinalize(e);
3863
3966
  t.isErr() ? (d.value = i.t("wise_invoicing.invoice.overview.bulk.preview_error"), s.value = !1) : (l.value = t.value, s.value = !1);
3864
3967
  }
3865
- return jt(() => {
3968
+ return Mt(() => {
3866
3969
  S();
3867
- }), (e, t) => (B(), M(gc, {
3970
+ }), (e, t) => (B(), M(_c, {
3868
3971
  "confirm-label": W(i).t("wise_invoicing.invoice.overview.bulk.finalize.confirm"),
3869
3972
  description: W(i).t("wise_invoicing.invoice.overview.bulk.finalize.description"),
3870
3973
  icon: W(Te),
@@ -3901,15 +4004,15 @@ var uc = {
3901
4004
  });
3902
4005
  //#endregion
3903
4006
  //#region src/modules/invoice/api/mutations/invoiceBulkMarkAsReady.mutation.ts
3904
- function vc() {
3905
- return Wt({
4007
+ function xc() {
4008
+ return Gt({
3906
4009
  queryFn: (e) => T.bulkMarkAsReady(e.params.target),
3907
4010
  queryKeysToInvalidate: { invoiceDetail: {} }
3908
4011
  });
3909
4012
  }
3910
4013
  //#endregion
3911
4014
  //#region src/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkMarkAsReadyDialog.vue
3912
- var yc = /* @__PURE__ */ R({
4015
+ var Sc = /* @__PURE__ */ R({
3913
4016
  __name: "InvoiceOverviewBulkMarkAsReadyDialog",
3914
4017
  props: {
3915
4018
  invoices: {},
@@ -3918,7 +4021,7 @@ var yc = /* @__PURE__ */ R({
3918
4021
  },
3919
4022
  emits: ["close"],
3920
4023
  setup(e, { emit: t }) {
3921
- let n = e, r = t, i = k(), a = zn(), o = vc(), s = V(!0), c = V(!1), l = V(null), d = V(null), { getProcessedInvoiceUuids: f, previewTarget: p, processableCount: m, skippedCount: h, skippedInvoices: g, submitTarget: _, titleCount: v } = lc({
4024
+ let n = e, r = t, i = k(), a = Bn(), o = xc(), s = V(!0), c = V(!1), l = V(null), d = V(null), { getProcessedInvoiceUuids: f, previewTarget: p, processableCount: m, skippedCount: h, skippedInvoices: g, submitTarget: _, titleCount: v } = uc({
3922
4025
  eligibleInvoices: () => n.invoices.filter((e) => e.status === u.DRAFT),
3923
4026
  invoices: () => n.invoices,
3924
4027
  matching: () => n.matching,
@@ -3934,7 +4037,7 @@ var yc = /* @__PURE__ */ R({
3934
4037
  return;
3935
4038
  }
3936
4039
  let s = f(e, t.value.skipped);
3937
- l.value = t.value, s.length > 0 && xt.reflectBulkAction(s, {
4040
+ l.value = t.value, s.length > 0 && St.reflectBulkAction(s, {
3938
4041
  lifecycleStatus: x.READY,
3939
4042
  status: u.READY
3940
4043
  }), t.value.meta.processed > 0 && a.show({ message: i.t("wise_invoicing.invoice.overview.bulk.mark_as_ready.success", { count: t.value.meta.processed }) }), h.value > 0 && a.show($.createSkippedToast({
@@ -3953,12 +4056,12 @@ var yc = /* @__PURE__ */ R({
3953
4056
  let t = await T.previewBulkMarkAsReady(e);
3954
4057
  t.isErr() ? (d.value = i.t("wise_invoicing.invoice.overview.bulk.preview_error"), s.value = !1) : (l.value = t.value, s.value = !1);
3955
4058
  }
3956
- return jt(() => {
4059
+ return Mt(() => {
3957
4060
  b();
3958
- }), (e, t) => (B(), M(gc, {
4061
+ }), (e, t) => (B(), M(_c, {
3959
4062
  "confirm-label": W(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.confirm"),
3960
4063
  description: W(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.description"),
3961
- icon: W(Re),
4064
+ icon: W(ze),
3962
4065
  "is-preview-loading": s.value,
3963
4066
  "is-submitting": c.value,
3964
4067
  "loading-label": W(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.loading"),
@@ -3990,8 +4093,8 @@ var yc = /* @__PURE__ */ R({
3990
4093
  });
3991
4094
  //#endregion
3992
4095
  //#region src/modules/invoice/api/mutations/invoiceBulkSendApproval.mutation.ts
3993
- function bc() {
3994
- return Wt({
4096
+ function Cc() {
4097
+ return Gt({
3995
4098
  queryFn: (e) => T.bulkSendApproval(e.params.target),
3996
4099
  queryKeysToInvalidate: {
3997
4100
  invoiceApprovalIndex: {},
@@ -4001,7 +4104,7 @@ function bc() {
4001
4104
  }
4002
4105
  //#endregion
4003
4106
  //#region src/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendApprovalDialog.vue
4004
- var xc = /* @__PURE__ */ R({
4107
+ var wc = /* @__PURE__ */ R({
4005
4108
  __name: "InvoiceOverviewBulkSendApprovalDialog",
4006
4109
  props: {
4007
4110
  invoices: {},
@@ -4010,9 +4113,9 @@ var xc = /* @__PURE__ */ R({
4010
4113
  },
4011
4114
  emits: ["close"],
4012
4115
  setup(e, { emit: t }) {
4013
- let n = e, r = t, i = k(), a = zn(), o = bc(), s = V(!0), u = V(!1), d = V(null), f = V(null), { getProcessedInvoiceUuids: p, previewTarget: m, processableCount: h, skippedCount: g, skippedInvoices: _, submitTarget: v, titleCount: y } = lc({
4116
+ let n = e, r = t, i = k(), a = Bn(), o = Cc(), s = V(!0), u = V(!1), d = V(null), f = V(null), { getProcessedInvoiceUuids: p, previewTarget: m, processableCount: h, skippedCount: g, skippedInvoices: _, submitTarget: v, titleCount: y } = uc({
4014
4117
  eligibleInvoices: () => n.invoices.filter((e) => {
4015
- let t = pt.getDisplayStatus({
4118
+ let t = mt.getDisplayStatus({
4016
4119
  approval: e.approval,
4017
4120
  requiresPriorApproval: e.requiresPriorApproval
4018
4121
  });
@@ -4029,7 +4132,7 @@ var xc = /* @__PURE__ */ R({
4029
4132
  t[n.uuid] = i.t(r);
4030
4133
  continue;
4031
4134
  }
4032
- let a = pt.getDisplayStatus({
4135
+ let a = mt.getDisplayStatus({
4033
4136
  approval: n.approval,
4034
4137
  requiresPriorApproval: n.requiresPriorApproval
4035
4138
  });
@@ -4048,7 +4151,7 @@ var xc = /* @__PURE__ */ R({
4048
4151
  return;
4049
4152
  }
4050
4153
  let d = new Set(l.value.skipped.map((e) => e.uuid)), f = n.invoices.filter((e) => d.has(e.uuid)), m = n.matching === null ? [...t, ...f] : f, h = n.matching === null ? m.length : l.value.meta.skipped, g = p(e, l.value.skipped);
4051
- if (g.length > 0 && xt.reflectBulkAction(g, {
4154
+ if (g.length > 0 && St.reflectBulkAction(g, {
4052
4155
  hasChangesSinceApprovalSent: !1,
4053
4156
  approval: {
4054
4157
  reminderSentAt: null,
@@ -4078,9 +4181,9 @@ var xc = /* @__PURE__ */ R({
4078
4181
  let t = await T.previewBulkSendApproval(e);
4079
4182
  t.isErr() ? (f.value = i.t("wise_invoicing.invoice.overview.bulk.preview_error"), s.value = !1) : (d.value = t.value, s.value = !1);
4080
4183
  }
4081
- return jt(() => {
4184
+ return Mt(() => {
4082
4185
  S();
4083
- }), (e, t) => (B(), M(gc, {
4186
+ }), (e, t) => (B(), M(_c, {
4084
4187
  "confirm-label": W(i).t("wise_invoicing.invoice.overview.bulk.send_approval.confirm"),
4085
4188
  description: W(i).t("wise_invoicing.invoice.overview.bulk.send_approval.description"),
4086
4189
  icon: W(D),
@@ -4117,15 +4220,15 @@ var xc = /* @__PURE__ */ R({
4117
4220
  });
4118
4221
  //#endregion
4119
4222
  //#region src/modules/invoice/api/mutations/invoiceBulkSend.mutation.ts
4120
- function Sc() {
4121
- return Wt({
4223
+ function Tc() {
4224
+ return Gt({
4122
4225
  queryFn: (e) => T.bulkSend(e.params.target),
4123
4226
  queryKeysToInvalidate: { invoiceDetail: {} }
4124
4227
  });
4125
4228
  }
4126
4229
  //#endregion
4127
4230
  //#region src/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendDialog.vue
4128
- var Cc = /* @__PURE__ */ R({
4231
+ var Ec = /* @__PURE__ */ R({
4129
4232
  __name: "InvoiceOverviewBulkSendDialog",
4130
4233
  props: {
4131
4234
  invoices: {},
@@ -4134,7 +4237,7 @@ var Cc = /* @__PURE__ */ R({
4134
4237
  },
4135
4238
  emits: ["close"],
4136
4239
  setup(e, { emit: t }) {
4137
- let n = e, r = t, i = k(), a = zn(), o = Sc(), s = V(!0), c = V(!1), l = V(null), d = V(null), { getProcessedInvoiceUuids: f, previewTarget: p, processableCount: m, skippedCount: h, skippedInvoices: g, submitTarget: _, titleCount: v } = lc({
4240
+ let n = e, r = t, i = k(), a = Bn(), o = Tc(), s = V(!0), c = V(!1), l = V(null), d = V(null), { getProcessedInvoiceUuids: f, previewTarget: p, processableCount: m, skippedCount: h, skippedInvoices: g, submitTarget: _, titleCount: v } = uc({
4138
4241
  eligibleInvoices: () => n.invoices.filter((e) => e.status === u.FINALIZED),
4139
4242
  invoices: () => n.invoices,
4140
4243
  matching: () => n.matching,
@@ -4150,7 +4253,7 @@ var Cc = /* @__PURE__ */ R({
4150
4253
  return;
4151
4254
  }
4152
4255
  let s = f(e, t.value.skipped);
4153
- l.value = t.value, s.length > 0 && xt.reflectBulkAction(s, { deliveryStatus: y.PROCESSING }), t.value.meta.processed > 0 && a.show({ message: i.t("wise_invoicing.invoice.overview.bulk.send.success", { count: t.value.meta.processed }) }), h.value > 0 && a.show($.createSkippedToast({
4256
+ l.value = t.value, s.length > 0 && St.reflectBulkAction(s, { deliveryStatus: y.PROCESSING }), t.value.meta.processed > 0 && a.show({ message: i.t("wise_invoicing.invoice.overview.bulk.send.success", { count: t.value.meta.processed }) }), h.value > 0 && a.show($.createSkippedToast({
4154
4257
  id: "invoice-overview-bulk-send-skipped",
4155
4258
  invoices: g.value,
4156
4259
  message: i.t("wise_invoicing.invoice.overview.bulk.send.skipped", { count: h.value })
@@ -4166,9 +4269,9 @@ var Cc = /* @__PURE__ */ R({
4166
4269
  let t = await T.previewBulkSend(e);
4167
4270
  t.isErr() ? (d.value = i.t("wise_invoicing.invoice.overview.bulk.preview_error"), s.value = !1) : (l.value = t.value, s.value = !1);
4168
4271
  }
4169
- return jt(() => {
4272
+ return Mt(() => {
4170
4273
  x();
4171
- }), (e, t) => (B(), M(gc, {
4274
+ }), (e, t) => (B(), M(_c, {
4172
4275
  "confirm-label": W(i).t("wise_invoicing.invoice.overview.bulk.send.confirm"),
4173
4276
  description: W(i).t("wise_invoicing.invoice.overview.bulk.send.description"),
4174
4277
  icon: W(D),
@@ -4200,25 +4303,25 @@ var Cc = /* @__PURE__ */ R({
4200
4303
  "title"
4201
4304
  ]));
4202
4305
  }
4203
- }), wc = /* @__PURE__ */ R({
4306
+ }), Dc = /* @__PURE__ */ R({
4204
4307
  __name: "DateRangeFilterButton",
4205
- props: /*@__PURE__*/ Dt({ ariaLabel: {} }, {
4308
+ props: /*@__PURE__*/ Ot({ ariaLabel: {} }, {
4206
4309
  modelValue: { default: null },
4207
4310
  modelModifiers: {}
4208
4311
  }),
4209
4312
  emits: ["update:modelValue"],
4210
4313
  setup(e) {
4211
- let t = e, n = Lt(e, "modelValue"), r = k(), i = V(!1), a = V({
4314
+ let t = e, n = Rt(e, "modelValue"), r = k(), i = V(!1), a = V({
4212
4315
  from: null,
4213
4316
  until: null
4214
4317
  });
4215
- Rt(i, (e) => {
4318
+ zt(i, (e) => {
4216
4319
  e && (a.value = {
4217
4320
  from: n.value?.from ?? null,
4218
4321
  until: n.value?.until ?? null
4219
4322
  });
4220
4323
  });
4221
- let o = Ze(), s = j(() => n.value === null ? r.t("component.date_range_filter_button.select_dates") : n.value.from !== null && n.value.until !== null && n.value.from.equals(n.value.until) ? o.formatPlainDate(n.value.from) : `${n.value.from === null ? "-" : o.formatPlainDate(n.value.from)} - ${n.value.until === null ? "-" : o.formatPlainDate(n.value.until)}`);
4324
+ let o = Qe(), s = j(() => n.value === null ? r.t("component.date_range_filter_button.select_dates") : n.value.from !== null && n.value.until !== null && n.value.from.equals(n.value.until) ? o.formatPlainDate(n.value.from) : `${n.value.from === null ? "-" : o.formatPlainDate(n.value.from)} - ${n.value.until === null ? "-" : o.formatPlainDate(n.value.until)}`);
4222
4325
  function c() {
4223
4326
  n.value = a.value.from !== null || a.value.until !== null ? { ...a.value } : null, i.value = !1;
4224
4327
  }
@@ -4228,7 +4331,7 @@ var Cc = /* @__PURE__ */ R({
4228
4331
  function u() {
4229
4332
  n.value = null, i.value = !1;
4230
4333
  }
4231
- return (e, n) => (B(), M(W(bn), {
4334
+ return (e, n) => (B(), M(W(xn), {
4232
4335
  "is-open": i.value,
4233
4336
  "onUpdate:isOpen": n[1] ||= (e) => i.value = e,
4234
4337
  "popover-side": "bottom",
@@ -4237,14 +4340,14 @@ var Cc = /* @__PURE__ */ R({
4237
4340
  trigger: G(() => [L(W(q), {
4238
4341
  "aria-label": t.ariaLabel,
4239
4342
  label: s.value,
4240
- "icon-right": W(Ae),
4343
+ "icon-right": W(je),
4241
4344
  variant: "secondary"
4242
4345
  }, null, 8, [
4243
4346
  "aria-label",
4244
4347
  "label",
4245
4348
  "icon-right"
4246
4349
  ])]),
4247
- content: G(() => [L(W(rn), {
4350
+ content: G(() => [L(W(an), {
4248
4351
  modelValue: a.value,
4249
4352
  "onUpdate:modelValue": n[0] ||= (e) => a.value = e,
4250
4353
  class: "p-lg"
@@ -4275,7 +4378,7 @@ var Cc = /* @__PURE__ */ R({
4275
4378
  _: 1
4276
4379
  }, 8, ["is-open"]));
4277
4380
  }
4278
- }), Tc = { class: "relative flex min-h-0 flex-1 flex-col" }, Ec = /* @__PURE__ */ R({
4381
+ }), Oc = { class: "relative flex min-h-0 flex-1 flex-col" }, kc = /* @__PURE__ */ R({
4279
4382
  __name: "InvoiceOverviewView",
4280
4383
  props: {
4281
4384
  currency: {},
@@ -4283,7 +4386,7 @@ var Cc = /* @__PURE__ */ R({
4283
4386
  onCreateInvoice: { type: Function }
4284
4387
  },
4285
4388
  setup(e) {
4286
- let t = e, n = k(), r = _(), i = In(), a = i.create(js), s = i.create(_c), c = i.create(yc), d = i.create(Cc), f = i.create(xc), p = ne({ debounceMs: 300 }), m = Bs(), h = Un("tab", m.tabs.value[0]?.key ?? "all"), g = ie({
4389
+ let t = e, n = k(), r = _(), i = Ln(), a = i.create(Ms), s = i.create(vc), c = i.create(bc), d = i.create(Sc), f = i.create(Ec), p = i.create(wc), m = ne({ debounceMs: 300 }), h = Vs(), g = Wn("tab", h.tabs.value[0]?.key ?? "all"), v = ie({
4287
4390
  initialValues: [{
4288
4391
  direction: "desc",
4289
4392
  key: o.ISSUED_ON
@@ -4294,57 +4397,57 @@ var Cc = /* @__PURE__ */ R({
4294
4397
  o.ISSUED_ON,
4295
4398
  o.NET_AMOUNT
4296
4399
  ]
4297
- }), v = j(() => de.filterByView(t.customFieldDefinitions, ce.INVOICE_OVERVIEW)), { hasChangesSinceApprovalSent: x, approvalStatuses: S, customerUuids: C, customFields: w, dueOnRange: ee, filters: te, lifecycleStatuses: re } = Rs({
4400
+ }), x = j(() => de.filterByView(t.customFieldDefinitions, ce.INVOICE_OVERVIEW)), { hasChangesSinceApprovalSent: S, approvalStatuses: C, customerUuids: w, customFields: ee, dueOnRange: te, filters: re, lifecycleStatuses: T } = zs({
4298
4401
  currency: t.currency,
4299
- customFieldDefinitions: v.value
4402
+ customFieldDefinitions: x.value
4300
4403
  });
4301
- ot(te);
4302
- let T = V(null), ae = j(() => m.getFilters(h.value)), oe = j(() => ({
4303
- hasChangesSinceApprovalSent: x.value,
4304
- issuedOnRange: T.value,
4305
- approvalStatuses: S.value,
4306
- customerUuids: C.value,
4307
- customFields: w.value,
4308
- dueOnRange: ee.value,
4309
- lifecycleStatuses: re.value,
4310
- ...ae.value
4311
- })), { isFetchingNextPage: se, isLoading: le, fetchNextPage: ue, refetch: fe, result: pe } = Ts({ params: {
4312
- filters: oe,
4313
- search: p.debouncedSearch,
4314
- sort: g.values
4404
+ st(re);
4405
+ let ae = V(null), oe = j(() => h.getFilters(g.value)), se = j(() => ({
4406
+ hasChangesSinceApprovalSent: S.value,
4407
+ issuedOnRange: ae.value,
4408
+ approvalStatuses: C.value,
4409
+ customerUuids: w.value,
4410
+ customFields: ee.value,
4411
+ dueOnRange: te.value,
4412
+ lifecycleStatuses: T.value,
4413
+ ...oe.value
4414
+ })), { isFetchingNextPage: le, isLoading: fe, fetchNextPage: pe, refetch: me, result: he } = Es({ params: {
4415
+ filters: se,
4416
+ search: m.debouncedSearch,
4417
+ sort: v.values
4315
4418
  } });
4316
4419
  r.set(() => n.t("wise_invoicing.invoice.overview.title"));
4317
- let me = { name: () => n.t("wise_invoicing.invoice.overview.title") }, he = j(() => pe.value.isOk() ? pe.value.getValue().data : []), ge = j(() => pe.value.isOk() ? pe.value.getValue().meta.total : 0), E = Hs({
4420
+ let ge = { name: () => n.t("wise_invoicing.invoice.overview.title") }, _e = j(() => he.value.isOk() ? he.value.getValue().data : []), ve = j(() => he.value.isOk() ? he.value.getValue().meta.total : 0), E = Us({
4318
4421
  queryParams: () => ({
4319
- filters: oe.value,
4320
- search: p.debouncedSearch.value
4422
+ filters: se.value,
4423
+ search: m.debouncedSearch.value
4321
4424
  }),
4322
- rows: () => he.value,
4323
- totalCount: () => ge.value
4425
+ rows: () => _e.value,
4426
+ totalCount: () => ve.value
4324
4427
  });
4325
- Ye({
4326
- refetch: fe,
4327
- sendingUuids: () => he.value.filter((e) => e.deliveryStatus === y.PROCESSING).map((e) => e.uuid)
4428
+ Xe({
4429
+ refetch: me,
4430
+ sendingUuids: () => _e.value.filter((e) => e.deliveryStatus === y.PROCESSING).map((e) => e.uuid)
4328
4431
  });
4329
- let _e = ic({ customFieldDefinitions: () => v.value }), { customizedColumns: ve, customizeTableAction: ye } = Rn({
4330
- actionGroup: me,
4331
- availableColumns: _e,
4332
- initialState: qt("invoice-overview-columns", []).value
4333
- }), be = j(() => pe.value.isErr() ? pe.value.getError() : null), xe = j(() => te.activeFilters.value.length), Se = j(() => (p.debouncedSearch.value?.trim().length ?? 0) > 0), Ce = j(() => E.matching.value !== null), we = j(() => Ce.value || E.selectedInvoices.value.some((e) => e.status === u.READY)), Te = j(() => Ce.value || E.selectedInvoices.value.some((e) => e.status === u.DRAFT)), { canSend: Ee } = Ps({
4432
+ let ye = ac({ customFieldDefinitions: () => x.value }), { customizedColumns: be, customizeTableAction: xe } = zn({
4433
+ actionGroup: ge,
4434
+ availableColumns: ye,
4435
+ initialState: Jt("invoice-overview-columns", []).value
4436
+ }), Se = j(() => he.value.isErr() ? he.value.getError() : null), Ce = j(() => re.activeFilters.value.length), we = j(() => (m.debouncedSearch.value?.trim().length ?? 0) > 0), Te = j(() => E.matching.value !== null), Ee = j(() => Te.value || E.selectedInvoices.value.some((e) => ue.isEditable(e.status))), De = j(() => Te.value || E.selectedInvoices.value.some((e) => e.status === u.READY)), Oe = j(() => Te.value || E.selectedInvoices.value.some((e) => e.status === u.DRAFT)), { canSend: ke } = Fs({
4334
4437
  matching: () => E.matching.value,
4335
4438
  selectedInvoices: () => E.selectedInvoices.value
4336
- }), De = j(() => Ce.value || E.selectedInvoices.value.some((e) => {
4337
- let t = pt.getDisplayStatus({
4439
+ }), D = j(() => Te.value || E.selectedInvoices.value.some((e) => {
4440
+ let t = mt.getDisplayStatus({
4338
4441
  approval: e.approval,
4339
4442
  requiresPriorApproval: e.requiresPriorApproval
4340
4443
  });
4341
4444
  return t !== null && t !== l.APPROVED;
4342
4445
  }));
4343
- function Oe() {
4446
+ function Ae() {
4344
4447
  t.onCreateInvoice === void 0 ? a.open() : t.onCreateInvoice();
4345
4448
  }
4346
- async function D() {
4347
- await c.open({
4449
+ async function je() {
4450
+ await d.open({
4348
4451
  invoices: E.selectedInvoices.value,
4349
4452
  matching: E.matching.value,
4350
4453
  onMarkedAsReady: () => {
@@ -4352,8 +4455,17 @@ var Cc = /* @__PURE__ */ R({
4352
4455
  }
4353
4456
  });
4354
4457
  }
4355
- async function ke() {
4458
+ async function Me() {
4356
4459
  await s.open({
4460
+ invoices: E.selectedInvoices.value,
4461
+ matching: E.matching.value,
4462
+ onDeleted: () => {
4463
+ E.clearSelection();
4464
+ }
4465
+ });
4466
+ }
4467
+ async function Ne() {
4468
+ await c.open({
4357
4469
  invoices: E.selectedInvoices.value,
4358
4470
  matching: E.matching.value,
4359
4471
  onFinalized: () => {
@@ -4361,8 +4473,8 @@ var Cc = /* @__PURE__ */ R({
4361
4473
  }
4362
4474
  });
4363
4475
  }
4364
- async function Ae() {
4365
- await d.open({
4476
+ async function Pe() {
4477
+ await f.open({
4366
4478
  invoices: E.selectedInvoices.value,
4367
4479
  matching: E.matching.value,
4368
4480
  onSent: () => {
@@ -4370,8 +4482,8 @@ var Cc = /* @__PURE__ */ R({
4370
4482
  }
4371
4483
  });
4372
4484
  }
4373
- async function je() {
4374
- await f.open({
4485
+ async function Fe() {
4486
+ await p.open({
4375
4487
  invoices: E.selectedInvoices.value,
4376
4488
  matching: E.matching.value,
4377
4489
  onSent: () => {
@@ -4379,7 +4491,7 @@ var Cc = /* @__PURE__ */ R({
4379
4491
  }
4380
4492
  });
4381
4493
  }
4382
- function Me(e) {
4494
+ function Ie(e) {
4383
4495
  return e.type === b.CREDIT_NOTE ? {
4384
4496
  name: "invoicing-credit-note-detail",
4385
4497
  params: { creditNoteUuid: e.uuid }
@@ -4388,14 +4500,14 @@ var Cc = /* @__PURE__ */ R({
4388
4500
  params: { invoiceUuid: e.uuid }
4389
4501
  };
4390
4502
  }
4391
- return (e, t) => (B(), M(W($t), { title: W(n).t("wise_invoicing.invoice.overview.title") }, {
4392
- "page-actions-left": G(() => [L(W(Tn), {
4393
- modelValue: W(h),
4394
- "onUpdate:modelValue": t[0] ||= (e) => Et(h) ? h.value = e : null,
4503
+ return (e, t) => (B(), M(W(en), { title: W(n).t("wise_invoicing.invoice.overview.title") }, {
4504
+ "page-actions-left": G(() => [L(W(En), {
4505
+ modelValue: W(g),
4506
+ "onUpdate:modelValue": t[0] ||= (e) => Dt(g) ? g.value = e : null,
4395
4507
  variant: "button-border"
4396
4508
  }, {
4397
- default: G(() => [L(W(Dn), null, {
4398
- default: G(() => [(B(!0), P(A, null, H(W(m).tabs.value, (e) => (B(), M(W(En), {
4509
+ default: G(() => [L(W(On), null, {
4510
+ default: G(() => [(B(!0), P(A, null, H(W(h).tabs.value, (e) => (B(), M(W(Dn), {
4399
4511
  key: e.key,
4400
4512
  value: e.key,
4401
4513
  label: e.label
@@ -4405,17 +4517,17 @@ var Cc = /* @__PURE__ */ R({
4405
4517
  _: 1
4406
4518
  }, 8, ["modelValue"])]),
4407
4519
  default: G(() => [
4408
- L(W(en), null, {
4520
+ L(W(tn), null, {
4409
4521
  left: G(() => [L(W(Y), { class: "items-stretch" }, {
4410
- default: G(() => [L(wc, {
4411
- modelValue: T.value,
4412
- "onUpdate:modelValue": t[1] ||= (e) => T.value = e,
4522
+ default: G(() => [L(Dc, {
4523
+ modelValue: ae.value,
4524
+ "onUpdate:modelValue": t[1] ||= (e) => ae.value = e,
4413
4525
  "aria-label": W(n).t("wise_invoicing.invoice.overview.filters.issued_on")
4414
- }, null, 8, ["modelValue", "aria-label"]), L(W(On), {
4415
- modelValue: W(p).search.value,
4416
- "onUpdate:modelValue": t[2] ||= (e) => W(p).search.value = e,
4526
+ }, null, 8, ["modelValue", "aria-label"]), L(W(kn), {
4527
+ modelValue: W(m).search.value,
4528
+ "onUpdate:modelValue": t[2] ||= (e) => W(m).search.value = e,
4417
4529
  label: null,
4418
- "icon-left": W(ze),
4530
+ "icon-left": W(Be),
4419
4531
  placeholder: W(n).t("wise_invoicing.common.search"),
4420
4532
  size: "sm",
4421
4533
  type: "search"
@@ -4427,42 +4539,42 @@ var Cc = /* @__PURE__ */ R({
4427
4539
  _: 1
4428
4540
  })]),
4429
4541
  right: G(() => [L(W(Y), { justify: "end" }, {
4430
- default: G(() => [Nt(e.$slots, "actions"), L(W(q), {
4542
+ default: G(() => [Pt(e.$slots, "actions"), L(W(q), {
4431
4543
  label: W(n).t("wise_invoicing.invoice.create.title"),
4432
- onClick: Oe
4544
+ onClick: Ae
4433
4545
  }, null, 8, ["label"])]),
4434
4546
  _: 3
4435
4547
  })]),
4436
4548
  _: 3
4437
4549
  }),
4438
- L(W(en), null, {
4550
+ L(W(tn), null, {
4439
4551
  default: G(() => [L(W(Y), { justify: "between" }, {
4440
- default: G(() => [L(W(st)), L(W(lt))]),
4552
+ default: G(() => [L(W(ct)), L(W(ut))]),
4441
4553
  _: 1
4442
4554
  })]),
4443
4555
  _: 1
4444
4556
  }),
4445
- F("div", Tc, [(B(), M(W(Sn), {
4557
+ F("div", Oc, [(B(), M(W(Cn), {
4446
4558
  key: W(E).tableKey.value,
4447
- columns: W(ve),
4448
- data: he.value,
4449
- "is-loading": W(le),
4450
- "is-fetching-next-page": W(se),
4451
- error: be.value,
4559
+ columns: W(be),
4560
+ data: _e.value,
4561
+ "is-loading": W(fe),
4562
+ "is-fetching-next-page": W(le),
4563
+ error: Se.value,
4452
4564
  "is-selectable": !0,
4453
- "has-active-search": Se.value,
4454
- "active-filter-count": xe.value,
4565
+ "has-active-search": we.value,
4566
+ "active-filter-count": Ce.value,
4455
4567
  "get-key": (e) => e.uuid,
4456
- "header-actions": [W(ye)],
4457
- "get-link": Me,
4568
+ "header-actions": [W(xe)],
4569
+ "get-link": Ie,
4458
4570
  "get-action-model": (e) => ({
4459
4571
  modelName: "Invoice",
4460
4572
  key: e.uuid,
4461
4573
  ...e
4462
4574
  }),
4463
- onNextPage: W(ue),
4464
- onClearSearch: t[3] ||= (e) => W(p).clear(),
4465
- onClearFilters: t[4] ||= (e) => W(te).clearAll(),
4575
+ onNextPage: W(pe),
4576
+ onClearSearch: t[3] ||= (e) => W(m).clear(),
4577
+ onClearFilters: t[4] ||= (e) => W(re).clearAll(),
4466
4578
  onSelect: W(E).onSelect
4467
4579
  }, null, 8, [
4468
4580
  "columns",
@@ -4477,18 +4589,21 @@ var Cc = /* @__PURE__ */ R({
4477
4589
  "get-action-model",
4478
4590
  "onNextPage",
4479
4591
  "onSelect"
4480
- ])), L(Ns, {
4481
- "can-finalize": we.value,
4482
- "can-mark-as-ready": Te.value,
4483
- "can-send": W(Ee),
4484
- "can-send-approval": De.value,
4592
+ ])), L(Ps, {
4593
+ "can-delete": Ee.value,
4594
+ "can-finalize": De.value,
4595
+ "can-mark-as-ready": Oe.value,
4596
+ "can-send": W(ke),
4597
+ "can-send-approval": D.value,
4485
4598
  "selected-count": W(E).selectedCount.value,
4486
4599
  onCancel: t[5] ||= (e) => W(E).clearSelection(),
4487
- onFinalize: t[6] ||= (e) => ke(),
4488
- onMarkAsReady: t[7] ||= (e) => D(),
4489
- onSend: t[8] ||= (e) => Ae(),
4490
- onSendApproval: t[9] ||= (e) => je()
4600
+ onDelete: t[6] ||= (e) => Me(),
4601
+ onFinalize: t[7] ||= (e) => Ne(),
4602
+ onMarkAsReady: t[8] ||= (e) => je(),
4603
+ onSend: t[9] ||= (e) => Pe(),
4604
+ onSendApproval: t[10] ||= (e) => Fe()
4491
4605
  }, null, 8, [
4606
+ "can-delete",
4492
4607
  "can-finalize",
4493
4608
  "can-mark-as-ready",
4494
4609
  "can-send",
@@ -4499,98 +4614,98 @@ var Cc = /* @__PURE__ */ R({
4499
4614
  _: 3
4500
4615
  }, 8, ["title"]));
4501
4616
  }
4502
- }), Dc = /*@__PURE__*/ R({
4617
+ }), Ac = /*@__PURE__*/ R({
4503
4618
  __name: "InvoiceOverviewViewDataProvider",
4504
4619
  props: { onCreateInvoice: { type: Function } },
4505
4620
  setup(e) {
4506
- let t = le(j(() => ({ entityTypes: [m.INVOICE] }))), n = Ct();
4507
- return (r, i) => (B(), M($e, { queries: {
4621
+ let t = le(j(() => ({ entityTypes: [m.INVOICE] }))), n = wt();
4622
+ return (r, i) => (B(), M(et, { queries: {
4508
4623
  customFieldDefinitions: W(t),
4509
4624
  issuerSettings: W(n)
4510
4625
  } }, {
4511
- default: G(({ data: t }) => [L(Ec, {
4626
+ default: G(({ data: t }) => [L(kc, {
4512
4627
  currency: t.issuerSettings.currency,
4513
4628
  "custom-field-definitions": t.customFieldDefinitions,
4514
4629
  "on-create-invoice": e.onCreateInvoice
4515
4630
  }, {
4516
- actions: G(() => [Nt(r.$slots, "actions")]),
4631
+ actions: G(() => [Pt(r.$slots, "actions")]),
4517
4632
  _: 3
4518
4633
  }, 8, [
4519
4634
  "currency",
4520
4635
  "custom-field-definitions",
4521
4636
  "on-create-invoice"
4522
4637
  ])]),
4523
- loading: G(() => [L(W(wt).PageLoadingState, { breadcrumbs: [] })]),
4638
+ loading: G(() => [L(W(Tt).PageLoadingState, { breadcrumbs: [] })]),
4524
4639
  _: 3
4525
4640
  }, 8, ["queries"]));
4526
4641
  }
4527
- }), Oc = /* @__PURE__ */ Gn({ default: () => kc }), kc = Dc, Ac = { class: "flex min-h-screen items-center justify-center bg-secondary" }, jc = {
4642
+ }), jc = /* @__PURE__ */ Kn({ default: () => Mc }), Mc = Ac, Nc = { class: "flex min-h-screen items-center justify-center bg-secondary" }, Pc = {
4528
4643
  key: 1,
4529
4644
  class: "flex min-h-screen items-center justify-center bg-secondary"
4530
- }, Mc = /*@__PURE__*/ R({
4645
+ }, Fc = /*@__PURE__*/ R({
4531
4646
  __name: "InvoicePublicPdfViewDataProvider",
4532
4647
  setup(e) {
4533
- let t = k(), n = ee(), r = j(() => n.invoicePdfComponent.value ?? Tt), i = Xt(), a = Un("token", null), o = Cs(j(() => a.value));
4534
- return Rt(j(() => a.value === null || o.result.value?.isErr() === !0), async (e) => {
4648
+ let t = k(), n = ee(), r = j(() => n.invoicePdfComponent.value ?? Et), i = Zt(), a = Wn("token", null), o = ws(j(() => a.value));
4649
+ return zt(j(() => a.value === null || o.result.value?.isErr() === !0), async (e) => {
4535
4650
  e && await i.replace({ name: "index" });
4536
- }, { immediate: !0 }), (e, n) => W(a) === null ? (B(), P("div", jc, [L(W(Z), { text: W(t).t("wise_invoicing.common.loading") }, null, 8, ["text"])])) : (B(), M($e, {
4651
+ }, { immediate: !0 }), (e, n) => W(a) === null ? (B(), P("div", Pc, [L(W(Z), { text: W(t).t("wise_invoicing.common.loading") }, null, 8, ["text"])])) : (B(), M(et, {
4537
4652
  key: 0,
4538
4653
  queries: { invoice: W(o) }
4539
4654
  }, {
4540
- default: G(({ data: e }) => [(B(), M(Pt(r.value), { invoice: e.invoice }, null, 8, ["invoice"]))]),
4541
- loading: G(() => [F("div", Ac, [L(W(Z), { text: W(t).t("wise_invoicing.common.loading") }, null, 8, ["text"])])]),
4655
+ default: G(({ data: e }) => [(B(), M(Ft(r.value), { invoice: e.invoice }, null, 8, ["invoice"]))]),
4656
+ loading: G(() => [F("div", Nc, [L(W(Z), { text: W(t).t("wise_invoicing.common.loading") }, null, 8, ["text"])])]),
4542
4657
  _: 1
4543
4658
  }, 8, ["queries"]));
4544
4659
  }
4545
- }), Nc = /* @__PURE__ */ Gn({ default: () => Pc }), Pc = Mc;
4660
+ }), Ic = /* @__PURE__ */ Kn({ default: () => Lc }), Lc = Fc;
4546
4661
  //#endregion
4547
4662
  //#region ../router/src/createRoutes.ts
4548
- function Fc(e) {
4663
+ function Rc(e) {
4549
4664
  return e;
4550
4665
  }
4551
4666
  //#endregion
4552
4667
  //#region src/modules/dunning-case/routes/dunningCase.routes.ts
4553
- var Ic = Fc([{
4668
+ var zc = Rc([{
4554
4669
  name: "dunning-case-module",
4555
4670
  path: "/dunning-cases",
4556
4671
  redirect: { name: "dunning-case-overview" },
4557
4672
  children: [{
4558
4673
  name: "dunning-case-overview",
4559
4674
  path: "",
4560
- component: () => Promise.resolve().then(() => Aa),
4675
+ component: () => Promise.resolve().then(() => ja),
4561
4676
  meta: { permission: "dunning-case.read" }
4562
4677
  }, {
4563
4678
  name: "dunning-case-detail",
4564
4679
  props: !0,
4565
4680
  path: ":dunningCaseUuid",
4566
- component: () => Promise.resolve().then(() => Oi),
4681
+ component: () => Promise.resolve().then(() => ki),
4567
4682
  meta: { permission: "dunning-case.read" }
4568
4683
  }]
4569
- }]), Lc = Fc([{
4684
+ }]), Bc = Rc([{
4570
4685
  name: "dunning-case-settings-module",
4571
4686
  path: "payment-reminders",
4572
- component: () => Promise.resolve().then(() => bs),
4687
+ component: () => Promise.resolve().then(() => xs),
4573
4688
  meta: { permission: "reminder-config.read" }
4574
- }]), Rc = Fc([{
4689
+ }]), Vc = Rc([{
4575
4690
  name: "dunning-case-reminder-pdf",
4576
4691
  path: "/dunning-case-reminder-pdf",
4577
- component: () => Promise.resolve().then(() => oo)
4578
- }]), zc = Fc([{
4692
+ component: () => Promise.resolve().then(() => so)
4693
+ }]), Hc = Rc([{
4579
4694
  name: "invoice-approval-module",
4580
4695
  path: "/invoicing/approvals",
4581
4696
  redirect: { name: "invoice-approval-overview" },
4582
4697
  children: [{
4583
4698
  name: "invoice-approval-overview",
4584
4699
  path: "",
4585
- component: () => import("./InvoiceApprovalOverviewView-DpL-vV8_.js"),
4700
+ component: () => import("./InvoiceApprovalOverviewView-1pLrgcIU.js"),
4586
4701
  meta: { permission: "invoice-approval.read" }
4587
4702
  }]
4588
- }]), Bc = Fc([{
4703
+ }]), Uc = Rc([{
4589
4704
  name: "invoice-approval-settings-module",
4590
4705
  path: "approval-reminders",
4591
- component: () => import("./ApprovalReminderSettingsViewDataProvider-BnHeEMZD.js"),
4706
+ component: () => import("./ApprovalReminderSettingsViewDataProvider-HANaeRzK.js"),
4592
4707
  meta: { permission: "reminder-config.read" }
4593
- }]), Vc = [
4708
+ }]), Wc = [
4594
4709
  {
4595
4710
  name: "invoicing-settings-module",
4596
4711
  path: "invoicing",
@@ -4598,62 +4713,62 @@ var Ic = Fc([{
4598
4713
  children: [{
4599
4714
  name: "invoicing-peppol-settings",
4600
4715
  path: "peppol",
4601
- component: () => import("./PeppolSettingsViewDataProvider-C7lwtu7n.js"),
4716
+ component: () => import("./PeppolSettingsViewDataProvider-B4Hu1RQk.js"),
4602
4717
  meta: { permission: "peppol-connection.update" }
4603
4718
  }, {
4604
4719
  name: "invoicing-settings-overview",
4605
4720
  path: "",
4606
- component: () => import("./IssuerSettingsViewDataProvider-DJzVZS8Q.js"),
4721
+ component: () => import("./IssuerSettingsViewDataProvider-xXQEED2s.js"),
4607
4722
  meta: { permission: "issuer.read" }
4608
4723
  }]
4609
4724
  },
4610
- ...Lc,
4611
- ...Bc
4725
+ ...Bc,
4726
+ ...Uc
4612
4727
  ];
4613
4728
  //#endregion
4614
4729
  //#region src/modules/invoice/routes/invoice.routes.ts
4615
- function Hc(e) {
4616
- return Fc([{
4730
+ function Gc(e) {
4731
+ return Rc([{
4617
4732
  name: "invoicing-module",
4618
4733
  path: "/invoicing/invoices",
4619
4734
  redirect: { name: "invoicing-invoice-overview" },
4620
4735
  children: [{
4621
4736
  name: "invoicing-invoice-overview",
4622
4737
  path: "",
4623
- component: e ?? (() => Promise.resolve().then(() => Oc)),
4738
+ component: e ?? (() => Promise.resolve().then(() => jc)),
4624
4739
  meta: { permission: "invoice.read" }
4625
4740
  }, {
4626
4741
  name: "invoicing-invoice-detail",
4627
4742
  props: !0,
4628
4743
  path: ":invoiceUuid",
4629
- component: () => import("./InvoiceDetailViewDataProvider-BaT7fgsi.js"),
4744
+ component: () => import("./InvoiceDetailViewDataProvider-DoqOGDZb.js"),
4630
4745
  meta: { permission: "invoice.read" }
4631
4746
  }]
4632
4747
  }]);
4633
4748
  }
4634
- var Uc = Fc([{
4749
+ var Kc = Rc([{
4635
4750
  name: "invoicing-invoice-pdf-preview",
4636
4751
  props: !0,
4637
4752
  path: "/invoicing/invoices/:invoiceUuid/pdf",
4638
- component: () => import("./InvoicePdfViewDataProvider-BIHBY608.js"),
4753
+ component: () => import("./InvoicePdfViewDataProvider-CKCp0TJ7.js"),
4639
4754
  meta: { permission: "invoice.read" }
4640
- }]), Wc = Fc([{
4755
+ }]), qc = Rc([{
4641
4756
  name: "invoicing-invoice-public-pdf-preview",
4642
4757
  path: "/pdf",
4643
- component: () => Promise.resolve().then(() => Nc)
4758
+ component: () => Promise.resolve().then(() => Ic)
4644
4759
  }, {
4645
4760
  name: "invoicing-invoice-public-pro-forma-pdf-preview",
4646
4761
  path: "/pro-forma-pdf",
4647
- component: () => import("./InvoicePublicProFormaPdfViewDataProvider-KY8pN59k.js")
4762
+ component: () => import("./InvoicePublicProFormaPdfViewDataProvider-CqAP9Ckj.js")
4648
4763
  }]);
4649
4764
  //#endregion
4650
4765
  //#region src/routes/invoicingPublicRoutes.composable.ts
4651
- function Gc() {
4652
- return [...Wc, ...Rc];
4766
+ function Jc() {
4767
+ return [...qc, ...Vc];
4653
4768
  }
4654
4769
  //#endregion
4655
4770
  //#region src/modules/credit-note/routes/creditNote.routes.ts
4656
- var Kc = [{
4771
+ var Yc = [{
4657
4772
  name: "invoicing-credit-note-module",
4658
4773
  path: "/invoicing/credit-notes",
4659
4774
  redirect: { name: "invoicing-invoice-overview" },
@@ -4661,37 +4776,37 @@ var Kc = [{
4661
4776
  name: "invoicing-credit-note-detail",
4662
4777
  props: !0,
4663
4778
  path: ":creditNoteUuid",
4664
- component: () => import("./CreditNoteDetailViewDataProvider-CC4gnwSN.js"),
4779
+ component: () => import("./CreditNoteDetailViewDataProvider-CnmNQyXq.js"),
4665
4780
  meta: { permission: "invoice.read" }
4666
4781
  }]
4667
- }], qc = [{
4782
+ }], Xc = [{
4668
4783
  name: "invoicing-credit-note-pdf-preview",
4669
4784
  props: !0,
4670
4785
  path: "/invoicing/credit-notes/:creditNoteUuid/pdf",
4671
- component: () => import("./CreditNotePdfViewDataProvider-C9vgN3kV.js"),
4786
+ component: () => import("./CreditNotePdfViewDataProvider-Bu8lNWSx.js"),
4672
4787
  meta: { permission: "invoice.read" }
4673
4788
  }];
4674
4789
  //#endregion
4675
4790
  //#region src/routes/invoicingRoutes.composable.ts
4676
- function Jc(e) {
4677
- return Fc([{
4791
+ function Zc(e) {
4792
+ return Rc([{
4678
4793
  path: "",
4679
4794
  children: [
4680
- ...Hc(e?.invoiceOverviewComponent),
4681
- ...Kc,
4682
- ...Ic,
4683
- ...zc
4795
+ ...Gc(e?.invoiceOverviewComponent),
4796
+ ...Yc,
4797
+ ...zc,
4798
+ ...Hc
4684
4799
  ]
4685
4800
  }]);
4686
4801
  }
4687
4802
  //#endregion
4688
4803
  //#region src/routes/invoicingStandaloneRoutes.composable.ts
4689
- function Yc() {
4690
- return [...qc, ...Uc];
4804
+ function Qc() {
4805
+ return [...Xc, ...Kc];
4691
4806
  }
4692
4807
  //#endregion
4693
4808
  //#region src/types/apiError.type.ts
4694
- var Xc = {
4809
+ var $c = {
4695
4810
  externally_created_invoice_not_editable: "wise_invoicing.api_error.externally_created_invoice_not_editable",
4696
4811
  invoice_has_no_lines: "wise_invoicing.api_error.invoice_has_no_lines",
4697
4812
  invoice_issued_on_before_last_issued: "wise_invoicing.api_error.invoice_issued_on_before_last_issued",
@@ -4702,13 +4817,13 @@ var Xc = {
4702
4817
  sequence_date_format_incompatible_with_reset: "wise_invoicing.api_error.sequence_date_format_incompatible_with_reset",
4703
4818
  sequence_sharing_would_reuse_numbers: "wise_invoicing.api_error.sequence_sharing_would_reuse_numbers"
4704
4819
  };
4705
- function Zc() {
4820
+ function el() {
4706
4821
  let e = k();
4707
- return { messages: j(() => Object.fromEntries(Object.entries(Xc).map(([t, n]) => [t, e.t(n)]))) };
4822
+ return { messages: j(() => Object.fromEntries(Object.entries($c).map(([t, n]) => [t, e.t(n)]))) };
4708
4823
  }
4709
4824
  //#endregion
4710
4825
  //#region src/ui/customer-invoice-list/components/CustomerInvoiceTableBadgeCell.vue
4711
- var Qc = /* @__PURE__ */ R({
4826
+ var tl = /* @__PURE__ */ R({
4712
4827
  __name: "CustomerInvoiceTableBadgeCell",
4713
4828
  props: {
4714
4829
  color: {},
@@ -4717,7 +4832,7 @@ var Qc = /* @__PURE__ */ R({
4717
4832
  setup(e) {
4718
4833
  let t = e;
4719
4834
  return (e, n) => (B(), M(W(X), null, {
4720
- default: G(() => [L(W(Qt), {
4835
+ default: G(() => [L(W($t), {
4721
4836
  label: t.label,
4722
4837
  color: t.color,
4723
4838
  size: "sm"
@@ -4725,7 +4840,7 @@ var Qc = /* @__PURE__ */ R({
4725
4840
  _: 1
4726
4841
  }));
4727
4842
  }
4728
- }), $c = /* @__PURE__ */ R({
4843
+ }), nl = /* @__PURE__ */ R({
4729
4844
  __name: "CustomerInvoiceTableInvoiceNumberCell",
4730
4845
  props: { sequence: {} },
4731
4846
  setup(e) {
@@ -4738,17 +4853,17 @@ var Qc = /* @__PURE__ */ R({
4738
4853
  _: 1
4739
4854
  }));
4740
4855
  }
4741
- }), el = /* @__PURE__ */ R({
4856
+ }), rl = /* @__PURE__ */ R({
4742
4857
  __name: "CustomerInvoiceTableTextCell",
4743
4858
  props: { text: {} },
4744
4859
  setup(e) {
4745
4860
  let t = e;
4746
4861
  return (e, n) => (B(), M(W(X), null, {
4747
- default: G(() => [L(W(wn), { text: t.text ?? "-" }, null, 8, ["text"])]),
4862
+ default: G(() => [L(W(Tn), { text: t.text ?? "-" }, null, 8, ["text"])]),
4748
4863
  _: 1
4749
4864
  }));
4750
4865
  }
4751
- }), tl = class {
4866
+ }), il = class {
4752
4867
  static getStatusBadgeColor(e) {
4753
4868
  return e === u.OVERDUE || e === u.PROTESTED ? "error" : "gray";
4754
4869
  }
@@ -4761,12 +4876,12 @@ var Qc = /* @__PURE__ */ R({
4761
4876
  };
4762
4877
  //#endregion
4763
4878
  //#region src/ui/customer-invoice-list/composables/customerInvoiceTableColumns.composable.ts
4764
- function nl(e) {
4765
- let t = k(), n = Ze(), r = C();
4879
+ function al(e) {
4880
+ let t = k(), n = Qe(), r = C();
4766
4881
  function i(e) {
4767
4882
  return e === null ? null : n.formatPlainDate(e);
4768
4883
  }
4769
- return j(() => Fn()([
4884
+ return j(() => In()([
4770
4885
  {
4771
4886
  headerLabel: t.t("wise_invoicing.customer_invoice_list.columns.invoice_number"),
4772
4887
  key: o.SEQUENCE,
@@ -4774,7 +4889,7 @@ function nl(e) {
4774
4889
  max: "9.625rem",
4775
4890
  min: "9.625rem"
4776
4891
  },
4777
- component: (e) => Q($c, { sequence: e.sequence })
4892
+ component: (e) => Q(nl, { sequence: e.sequence })
4778
4893
  },
4779
4894
  {
4780
4895
  headerLabel: t.t("wise_invoicing.customer_invoice_list.columns.status"),
@@ -4783,8 +4898,8 @@ function nl(e) {
4783
4898
  max: "6.4375rem",
4784
4899
  min: "6.4375rem"
4785
4900
  },
4786
- component: (e) => Q(Qc, {
4787
- color: tl.getStatusBadgeColor(e.status),
4901
+ component: (e) => Q(tl, {
4902
+ color: il.getStatusBadgeColor(e.status),
4788
4903
  label: t.t(ue.getMetadata(e.status).translationKey)
4789
4904
  })
4790
4905
  },
@@ -4795,7 +4910,7 @@ function nl(e) {
4795
4910
  max: "12rem",
4796
4911
  min: "10rem"
4797
4912
  },
4798
- component: (e) => Q(Ks, {
4913
+ component: (e) => Q(qs, {
4799
4914
  hasChangesSinceApprovalSent: e.hasChangesSinceApprovalSent && e.lifecycleStatus !== x.FINALIZED,
4800
4915
  approval: e.approval,
4801
4916
  requiresPriorApproval: e.requiresPriorApproval
@@ -4808,7 +4923,7 @@ function nl(e) {
4808
4923
  max: "8.125rem",
4809
4924
  min: "8.125rem"
4810
4925
  },
4811
- component: (e) => Q(el, { text: i(e.issuedOn) })
4926
+ component: (e) => Q(rl, { text: i(e.issuedOn) })
4812
4927
  },
4813
4928
  {
4814
4929
  headerLabel: t.t("wise_invoicing.customer_invoice_list.columns.due_date"),
@@ -4817,7 +4932,7 @@ function nl(e) {
4817
4932
  max: "7.125rem",
4818
4933
  min: "7.125rem"
4819
4934
  },
4820
- component: (e) => Q(el, { text: i(e.dueOn) })
4935
+ component: (e) => Q(rl, { text: i(e.dueOn) })
4821
4936
  },
4822
4937
  {
4823
4938
  headerLabel: t.t("wise_invoicing.customer_invoice_list.columns.type"),
@@ -4826,7 +4941,7 @@ function nl(e) {
4826
4941
  max: "7.875rem",
4827
4942
  min: "7.875rem"
4828
4943
  },
4829
- component: (e) => Q(Qc, {
4944
+ component: (e) => Q(tl, {
4830
4945
  color: "gray",
4831
4946
  label: t.t(e.type === b.CREDIT_NOTE ? "wise_invoicing.invoice.type.credit_note" : "wise_invoicing.invoice.type.standard")
4832
4947
  })
@@ -4838,7 +4953,7 @@ function nl(e) {
4838
4953
  max: "8.25rem",
4839
4954
  min: "8.25rem"
4840
4955
  },
4841
- component: (e) => Q(el, { text: r.formatMonetary(e.total) })
4956
+ component: (e) => Q(rl, { text: r.formatMonetary(e.total) })
4842
4957
  },
4843
4958
  {
4844
4959
  headerLabel: t.t("wise_invoicing.customer_invoice_list.columns.vat"),
@@ -4847,7 +4962,7 @@ function nl(e) {
4847
4962
  max: "8.25rem",
4848
4963
  min: "8.25rem"
4849
4964
  },
4850
- component: (e) => Q(el, { text: r.formatMonetary(tl.getVatAmount(e)) })
4965
+ component: (e) => Q(rl, { text: r.formatMonetary(il.getVatAmount(e)) })
4851
4966
  },
4852
4967
  {
4853
4968
  headerLabel: t.t("wise_invoicing.customer_invoice_list.columns.amount_incl_vat"),
@@ -4856,7 +4971,7 @@ function nl(e) {
4856
4971
  max: "8.25rem",
4857
4972
  min: "8.25rem"
4858
4973
  },
4859
- component: (e) => Q(el, { text: r.formatMonetary(e.grossAmount) })
4974
+ component: (e) => Q(rl, { text: r.formatMonetary(e.grossAmount) })
4860
4975
  },
4861
4976
  {
4862
4977
  headerLabel: t.t("wise_invoicing.customer_invoice_list.columns.amount_due"),
@@ -4865,7 +4980,7 @@ function nl(e) {
4865
4980
  max: "1fr",
4866
4981
  min: "8.3125rem"
4867
4982
  },
4868
- component: (e) => Q(el, { text: e.balanceDueAmount === null ? null : r.formatMonetary(e.balanceDueAmount) })
4983
+ component: (e) => Q(rl, { text: e.balanceDueAmount === null ? null : r.formatMonetary(e.balanceDueAmount) })
4869
4984
  },
4870
4985
  ...e.customFieldDefinitions().map((e) => ({
4871
4986
  headerLabel: de.getLabel(e, t.locale.value),
@@ -4874,7 +4989,7 @@ function nl(e) {
4874
4989
  max: "1fr",
4875
4990
  min: "10rem"
4876
4991
  },
4877
- component: (t) => Q(qs, {
4992
+ component: (t) => Q(Js, {
4878
4993
  definition: e,
4879
4994
  value: t.customFields.find((t) => t.definitionUuid === e.uuid)
4880
4995
  })
@@ -4883,13 +4998,13 @@ function nl(e) {
4883
4998
  }
4884
4999
  //#endregion
4885
5000
  //#region src/ui/customer-invoice-list/composables/customerInvoiceTableFilters.composable.ts
4886
- function rl() {
4887
- let e = k(), t = it({
5001
+ function ol() {
5002
+ let e = k(), t = at({
4888
5003
  actionGroup: { name: "customer-invoices" },
4889
5004
  filters: [
4890
- et({
5005
+ tt({
4891
5006
  defaultValue: {
4892
- operator: ct.INCLUDES,
5007
+ operator: lt.INCLUDES,
4893
5008
  value: []
4894
5009
  },
4895
5010
  disableOperators: !0,
@@ -4898,9 +5013,9 @@ function rl() {
4898
5013
  label: e.t("wise_invoicing.customer_invoice_list.filters.status"),
4899
5014
  options: () => Object.values(u)
4900
5015
  }),
4901
- at({
5016
+ ot({
4902
5017
  defaultValue: {
4903
- operator: ut.IS_BETWEEN,
5018
+ operator: dt.IS_BETWEEN,
4904
5019
  value: {
4905
5020
  from: null,
4906
5021
  until: null
@@ -4910,9 +5025,9 @@ function rl() {
4910
5025
  key: "issuedOnRange",
4911
5026
  label: e.t("wise_invoicing.invoice.overview.filters.issued_on")
4912
5027
  }),
4913
- at({
5028
+ ot({
4914
5029
  defaultValue: {
4915
- operator: ut.IS_BETWEEN,
5030
+ operator: dt.IS_BETWEEN,
4916
5031
  value: {
4917
5032
  from: null,
4918
5033
  until: null
@@ -4942,19 +5057,19 @@ function rl() {
4942
5057
  }
4943
5058
  //#endregion
4944
5059
  //#region src/ui/customer-invoice-list/CustomerInvoiceTable.vue?vue&type=script&setup=true&lang.ts
4945
- var il = { class: "flex min-h-0 flex-1 flex-col" }, al = {
5060
+ var sl = { class: "flex min-h-0 flex-1 flex-col" }, cl = {
4946
5061
  key: 1,
4947
5062
  class: "flex min-h-0 flex-1 flex-col"
4948
- }, ol = /* @__PURE__ */ R({
5063
+ }, ll = /* @__PURE__ */ R({
4949
5064
  __name: "CustomerInvoiceTable",
4950
5065
  props: { externalId: {} },
4951
5066
  setup(e) {
4952
5067
  let t = e, n = k(), r = le(j(() => ({ entityTypes: [m.INVOICE] }))), i = j(() => {
4953
5068
  let e = r.result.value;
4954
5069
  return e.isOk() ? de.filterByView(e.getValue(), ce.INVOICE_OVERVIEW) : [];
4955
- }), a = nl({ customFieldDefinitions: () => i.value }), s = ne({ debounceMs: 300 }), { issuedOnRange: c, dueOnRange: l, filters: u, statuses: d } = rl();
4956
- ot(u);
4957
- let f = Ln({
5070
+ }), a = al({ customFieldDefinitions: () => i.value }), s = ne({ debounceMs: 300 }), { issuedOnRange: c, dueOnRange: l, filters: u, statuses: d } = ol();
5071
+ st(u);
5072
+ let f = Rn({
4958
5073
  initialValues: [{
4959
5074
  direction: "desc",
4960
5075
  key: o.ISSUED_ON
@@ -4964,7 +5079,7 @@ var il = { class: "flex min-h-0 flex-1 flex-col" }, al = {
4964
5079
  o.ISSUED_ON,
4965
5080
  o.NET_AMOUNT
4966
5081
  ]
4967
- }), { isFetching: p, isFetchingNextPage: h, isLoading: g, fetchNextPage: _, result: v } = Ts({ params: {
5082
+ }), { isFetching: p, isFetchingNextPage: h, isLoading: g, fetchNextPage: _, result: v } = Es({ params: {
4968
5083
  filters: j(() => ({
4969
5084
  issuedOnRange: c.value,
4970
5085
  customerExternalIds: [t.externalId],
@@ -4983,7 +5098,7 @@ var il = { class: "flex min-h-0 flex-1 flex-col" }, al = {
4983
5098
  params: { invoiceUuid: e.uuid }
4984
5099
  };
4985
5100
  }
4986
- return (e, t) => (B(), P("div", il, [L(W(Y), {
5101
+ return (e, t) => (B(), P("div", sl, [L(W(Y), {
4987
5102
  align: "center",
4988
5103
  justify: "between",
4989
5104
  class: "border-b border-secondary bg-secondary px-lg py-md"
@@ -4996,17 +5111,17 @@ var il = { class: "flex min-h-0 flex-1 flex-col" }, al = {
4996
5111
  default: G(() => [L(W(Z), {
4997
5112
  text: W(n).t("wise_invoicing.customer_invoice_list.title"),
4998
5113
  class: "shrink-0 text-sm font-semibold text-primary"
4999
- }, null, 8, ["text"]), L(W(st))]),
5114
+ }, null, 8, ["text"]), L(W(ct))]),
5000
5115
  _: 1
5001
5116
  }), w.value ? N("", !0) : (B(), M(W(Y), {
5002
5117
  key: 0,
5003
5118
  justify: "end"
5004
5119
  }, {
5005
- default: G(() => [L(W(On), {
5120
+ default: G(() => [L(W(kn), {
5006
5121
  modelValue: W(s).search.value,
5007
5122
  "onUpdate:modelValue": t[0] ||= (e) => W(s).search.value = e,
5008
5123
  label: null,
5009
- "icon-left": W(ze),
5124
+ "icon-left": W(Be),
5010
5125
  placeholder: W(n).t("wise_invoicing.common.search"),
5011
5126
  size: "sm",
5012
5127
  type: "search"
@@ -5014,13 +5129,13 @@ var il = { class: "flex min-h-0 flex-1 flex-col" }, al = {
5014
5129
  "modelValue",
5015
5130
  "icon-left",
5016
5131
  "placeholder"
5017
- ]), L(W(lt))]),
5132
+ ]), L(W(ut))]),
5018
5133
  _: 1
5019
5134
  }))]),
5020
5135
  _: 1
5021
- }), w.value ? (B(), M(W(mn), {
5136
+ }), w.value ? (B(), M(W(hn), {
5022
5137
  key: 0,
5023
- icon: W(Ie),
5138
+ icon: W(Le),
5024
5139
  title: W(n).t("wise_invoicing.customer_invoice_list.empty_state.title"),
5025
5140
  description: W(n).t("wise_invoicing.customer_invoice_list.empty_state.description"),
5026
5141
  class: "py-7xl"
@@ -5028,7 +5143,7 @@ var il = { class: "flex min-h-0 flex-1 flex-col" }, al = {
5028
5143
  "icon",
5029
5144
  "title",
5030
5145
  "description"
5031
- ])) : (B(), P("div", al, [L(W(Sn), {
5146
+ ])) : (B(), P("div", cl, [L(W(Cn), {
5032
5147
  columns: W(a),
5033
5148
  data: y.value,
5034
5149
  sort: W(f),
@@ -5055,32 +5170,32 @@ var il = { class: "flex min-h-0 flex-1 flex-col" }, al = {
5055
5170
  "onNextPage"
5056
5171
  ])]))]));
5057
5172
  }
5058
- }), sl = /* @__PURE__ */ R({
5173
+ }), ul = /* @__PURE__ */ R({
5059
5174
  __name: "CustomerInvoiceList",
5060
5175
  props: { externalId: {} },
5061
5176
  setup(e) {
5062
5177
  let t = e, n = j(() => typeof t.externalId == "string" && t.externalId !== "" ? t.externalId : null);
5063
- return (e, t) => n.value === null ? N("", !0) : (B(), M(ol, {
5178
+ return (e, t) => n.value === null ? N("", !0) : (B(), M(ll, {
5064
5179
  key: n.value,
5065
5180
  "external-id": n.value
5066
5181
  }, null, 8, ["external-id"]));
5067
5182
  }
5068
- }), cl = class {
5183
+ }), dl = class {
5069
5184
  static format(e, t = 0) {
5070
5185
  return new Intl.NumberFormat(void 0, { maximumFractionDigits: t }).format(e);
5071
5186
  }
5072
5187
  static randomBetween(e, t) {
5073
5188
  return Math.floor(Math.random() * (t - e + 1)) + e;
5074
5189
  }
5075
- }, ll = {
5190
+ }, fl = {
5076
5191
  "en-US": {
5077
5192
  ...t,
5078
- ...Kn
5193
+ ...qn
5079
5194
  },
5080
5195
  "nl-BE": {
5081
5196
  ...e,
5082
- ...qn
5197
+ ...Jn
5083
5198
  }
5084
5199
  };
5085
5200
  //#endregion
5086
- export { ae as AddressUtil, me as DownloadUtil, ve as MonetaryTransformer, cl as NumberUtil, Se as Percentage, xe as PercentageTransformer, a as SortDirection, Ut as SortUtil, m as WiseInvoicingCustomFieldEntityType, v as WiseInvoicingCustomFieldType, pe as WiseInvoicingCustomFieldValueUtil, ce as WiseInvoicingCustomFieldViewKey, ir as WiseInvoicingCustomerDunningCasesSection, sl as WiseInvoicingCustomerInvoiceList, ki as WiseInvoicingDunningCaseDetailView, ja as WiseInvoicingDunningCaseOverviewView, so as WiseInvoicingDunningCaseReminderPdfView, kc as WiseInvoicingInvoiceOverviewView, Pc as WiseInvoicingInvoicePublicPdfViewDataProvider, xs as WiseInvoicingReminderSettingsView, se as addressFormSchema, Xn as creditNoteUuidSchema, te as initWiseInvoicingConfig, ws as invoiceUuidSchema, Jn as onCreated, w as toMajorUnits, S as toMinorUnits, C as useCurrencyFormat, _ as useDocumentTitle, Ss as useInvoiceNavigateToDetailAction, ne as useSearch, ie as useSort, Zc as useWiseInvoicingApiError, ee as useWiseInvoicingConfig, Zn as useWiseInvoicingDunningCaseIndexQuery, Cs as useWiseInvoicingInvoicePublicDetailQuery, Gc as useWiseInvoicingPublicRoutes, Yn as useWiseInvoicingQueryInvalidation, Jc as useWiseInvoicingRoutes, Yc as useWiseInvoicingStandaloneRoutes, Xc as wiseInvoicingApiErrorI18nKeys, ll as wiseInvoicingLocales, Vc as wiseInvoicingSettingsRoutes };
5201
+ export { ae as AddressUtil, me as DownloadUtil, E as MonetaryTransformer, dl as NumberUtil, Se as Percentage, xe as PercentageTransformer, a as SortDirection, Wt as SortUtil, m as WiseInvoicingCustomFieldEntityType, v as WiseInvoicingCustomFieldType, pe as WiseInvoicingCustomFieldValueUtil, ce as WiseInvoicingCustomFieldViewKey, ar as WiseInvoicingCustomerDunningCasesSection, ul as WiseInvoicingCustomerInvoiceList, Ai as WiseInvoicingDunningCaseDetailView, Ma as WiseInvoicingDunningCaseOverviewView, co as WiseInvoicingDunningCaseReminderPdfView, Mc as WiseInvoicingInvoiceOverviewView, Lc as WiseInvoicingInvoicePublicPdfViewDataProvider, Ss as WiseInvoicingReminderSettingsView, se as addressFormSchema, Zn as creditNoteUuidSchema, te as initWiseInvoicingConfig, Ts as invoiceUuidSchema, Yn as onCreated, w as toMajorUnits, S as toMinorUnits, C as useCurrencyFormat, _ as useDocumentTitle, Cs as useInvoiceNavigateToDetailAction, ne as useSearch, ie as useSort, el as useWiseInvoicingApiError, ee as useWiseInvoicingConfig, Qn as useWiseInvoicingDunningCaseIndexQuery, ws as useWiseInvoicingInvoicePublicDetailQuery, Jc as useWiseInvoicingPublicRoutes, Xn as useWiseInvoicingQueryInvalidation, Zc as useWiseInvoicingRoutes, Qc as useWiseInvoicingStandaloneRoutes, $c as wiseInvoicingApiErrorI18nKeys, fl as wiseInvoicingLocales, Wc as wiseInvoicingSettingsRoutes };