@wisemen/wise-invoicing-web 0.0.4 → 0.0.5

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 (91) hide show
  1. package/dist/{BillingDocumentDetailViewDataProvider-pePmiXWb.js → BillingDocumentDetailViewDataProvider-DdaNbuI2.js} +953 -863
  2. package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
  3. package/dist/{BillingDocumentPdf-Dg5JlQE1.js → BillingDocumentPdf-D_NOfBhQ.js} +4 -4
  4. package/dist/{CreditNoteDetailViewDataProvider-C-A0jyVr.js → CreditNoteDetailViewDataProvider-5ljhBOoN.js} +181 -181
  5. package/dist/{CreditNotePdfViewDataProvider-DNUvFVDj.js → CreditNotePdfViewDataProvider-CiWZN7Zy.js} +3 -3
  6. package/dist/{CustomFieldValueText-DDQq-975.js → CustomFieldValueText-ne5yy02J.js} +2 -2
  7. package/dist/DataProvider-Dj34ljUX.js +75 -0
  8. package/dist/{DunningCaseDetailViewDataProvider-0WV-7-vg.js → DunningCaseDetailViewDataProvider-CetbSmjq.js} +65 -56
  9. package/dist/DunningCaseOverviewView-Bq0BKVXG.js +747 -0
  10. package/dist/{DunningCaseReminderPdfViewDataProvider-DcM-7ECg.js → DunningCaseReminderPdfViewDataProvider-B3Y2aYFf.js} +1 -1
  11. package/dist/DunningCaseSendDialog-C47X_JjC.js +349 -0
  12. package/dist/{InvoiceDetailViewDataProvider-BDL9lAWe.js → InvoiceDetailViewDataProvider-DYH2ODDi.js} +589 -498
  13. package/dist/{InvoiceOverviewViewDataProvider-B_jrcC_8.js → InvoiceOverviewViewDataProvider-BT9cuQXw.js} +546 -482
  14. package/dist/{InvoicePdfView-Bygb-9z6.js → InvoicePdfView-ug0BiMqe.js} +2 -2
  15. package/dist/{InvoicePdfViewDataProvider-nBk3XNrE.js → InvoicePdfViewDataProvider-WvjMiEZG.js} +3 -3
  16. package/dist/{InvoicePublicPdfViewDataProvider-DHJP_-7-.js → InvoicePublicPdfViewDataProvider-BI9RQqYp.js} +3 -3
  17. package/dist/{IssuerSettingsViewDataProvider-Dk_Q6w6f.js → IssuerSettingsViewDataProvider-Bs4rEES2.js} +4 -4
  18. package/dist/ReminderSettingsViewDataProvider-5n2EfxPG.js +711 -0
  19. package/dist/{api.util-Dm_TQedZ.js → api.util-BCSgCfpS.js} +528 -509
  20. package/dist/{billingDocumentDetail.transformer-zMTbka5p.js → billingDocumentDetail.transformer-DIKAl4_L.js} +58 -89
  21. package/dist/client/index.d.ts +1 -1
  22. package/dist/client/types.gen.d.ts +28 -5
  23. package/dist/client/zod.gen.d.ts +869 -623
  24. package/dist/{creditNoteDetail.query-BZqgZRSu.js → creditNoteDetail.query-DHP69UiB.js} +13 -13
  25. package/dist/{dist-DP8KNFVD.js → dist-D9lp7NDv.js} +20 -36
  26. package/dist/{dist-DJ8yJcb9.js → dist-PErDVE6-.js} +621 -671
  27. package/dist/{documentTitle.composable-CeaFddr1.js → documentTitle.composable-4ApFl9TZ.js} +10 -8
  28. package/dist/{i18n.lib-DUbAMBRb.js → i18n.lib-B74GKndD.js} +50 -0
  29. package/dist/index.d.ts +51 -0
  30. package/dist/index.js +78 -78
  31. package/dist/{invoice.service-ChHEtXBA.js → invoice.service-DG5eacZC.js} +46 -46
  32. package/dist/{invoiceDeliveryStatus.util-BsA-MlA3.js → invoiceDeliveryStatus.util-CX-IdqAu.js} +28 -28
  33. package/dist/{invoiceDetail.query-O_CGvdwg.js → invoiceDetail.query-C_IMGjOX.js} +1 -1
  34. package/dist/{invoicingConfig.composable-c6w_aMm1.js → invoicingConfig.composable-BYqn1I9n.js} +2 -2
  35. package/dist/{issuerSettings.query-RqtrZFaB.js → issuerSettings.query-6wnSPphB.js} +2 -2
  36. package/dist/libs/i18n.lib.d.ts +50 -0
  37. package/dist/locales/en-US.json.d.ts +25 -0
  38. package/dist/locales/nl-BE.json.d.ts +25 -0
  39. package/dist/models/billing-document/billingDocumentLineItemGroupUpdateForm.model.d.ts +9 -3
  40. package/dist/modules/dunning-case/actions/dunningCase.actions.d.ts +12 -0
  41. package/dist/modules/dunning-case/actions/dunningCaseNavigateToCustomer.action.d.ts +1 -0
  42. package/dist/modules/dunning-case/actions/dunningCaseNavigateToDetail.action.d.ts +1 -0
  43. package/dist/modules/dunning-case/api/mutations/reminderConfigUpdate.mutation.d.ts +2 -0
  44. package/dist/modules/dunning-case/models/dunningCase.model.d.ts +12 -2
  45. package/dist/modules/dunning-case/models/reminderConfigForm.model.d.ts +3 -1
  46. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewActionsCell.vue.d.ts +13 -0
  47. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewCustomerCell.vue.d.ts +7 -0
  48. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewDaysOverdueCell.vue.d.ts +7 -0
  49. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewLastReminderCell.vue.d.ts +7 -0
  50. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewLevelCell.vue.d.ts +7 -0
  51. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewMetrics.vue.d.ts +8 -0
  52. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewOutstandingCell.vue.d.ts +7 -0
  53. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewReminderCell.vue.d.ts +7 -0
  54. package/dist/modules/dunning-case/use-cases/overview/components/dunningCaseOverviewActionsCell.spec.d.ts +1 -0
  55. package/dist/modules/dunning-case/use-cases/overview/components/dunningCaseOverviewLastReminderCell.spec.d.ts +1 -0
  56. package/dist/modules/dunning-case/use-cases/overview/components/dunningCaseOverviewReminderCell.spec.d.ts +1 -0
  57. package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverview.composable.d.ts +24 -0
  58. package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverviewTableColumns.composable.d.ts +8 -0
  59. package/dist/modules/dunning-case/use-cases/send/dialogs/dunningCaseBulkSendDialog.spec.d.ts +1 -0
  60. package/dist/modules/dunning-case/use-cases/settings/components/ReminderLadderRow.vue.d.ts +3 -1
  61. package/dist/modules/dunning-case/use-cases/settings/components/reminderLadderFeeNotice.spec.d.ts +1 -0
  62. package/dist/modules/dunning-case/use-cases/settings/composables/reminderLadder.composable.d.ts +3 -1
  63. package/dist/modules/invoice/api/invoiceIndexCache.util.d.ts +4 -4
  64. package/dist/modules/invoice/api/queries/invoiceUserSearch.query.d.ts +3 -0
  65. package/dist/modules/invoice/api/query-keys/invoice.queryKeys.d.ts +8 -0
  66. package/dist/modules/invoice/api/services/invoiceUser.service.d.ts +6 -0
  67. package/dist/modules/invoice/components/form/InvoiceFormPreparedByField.vue.d.ts +16 -0
  68. package/dist/modules/invoice/models/invoice/update/invoicePreparer.model.d.ts +4 -0
  69. package/dist/modules/invoice/models/invoice/update/invoicePreparer.transformer.d.ts +5 -0
  70. package/dist/modules/invoice/models/invoice/update/invoiceUserSearchQueryParams.model.d.ts +3 -0
  71. package/dist/modules/invoice/models/invoice/update/invoiceUserSearchQueryParams.transformer.d.ts +6 -0
  72. package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkActionDialog.vue.d.ts +1 -0
  73. package/dist/{plainDate.transformer-BxvJpJOv.js → plainDate.transformer-Dfe5r84P.js} +32 -1
  74. package/dist/{reminderConfig.query-DzTN2AvU.js → reminderConfig.query-B9OQY7IT.js} +105 -90
  75. package/dist/search.composable-BCtYqudV.js +52 -0
  76. package/dist/style.css +1 -1
  77. package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +6 -6
  78. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +1 -1
  79. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsRowMutations.composable.d.ts +2 -2
  80. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsRowMutations.composable.spec.d.ts +1 -0
  81. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsTableDrag.composable.d.ts +3 -1
  82. package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableField.vue.d.ts +2 -0
  83. package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableTextField.vue.d.ts +1 -0
  84. package/dist/ui/billing-document/table/utils/billingDocumentLineItemsEditor.util.d.ts +19 -0
  85. package/dist/ui/data-provider/DataProviderErrorState.vue.d.ts +7 -0
  86. package/dist/ui/data-provider/dataProviderErrorState.spec.d.ts +1 -0
  87. package/package.json +6 -1
  88. package/dist/DataProvider-CfHLB3rH.js +0 -48
  89. package/dist/DunningCaseOverviewView-CHdzfbhb.js +0 -553
  90. package/dist/DunningCaseSendDialog-DBtwr2ue.js +0 -350
  91. package/dist/ReminderSettingsViewDataProvider-CDBjfU7R.js +0 -668
@@ -1,41 +1,42 @@
1
1
  import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import "./api.util-Dm_TQedZ.js";
3
- import { C as t, a as n, c as r, f as i, h as a, m as o, o as s, p as c, s as l, t as u, y as d } from "./documentTitle.composable-CeaFddr1.js";
2
+ import "./api.util-BCSgCfpS.js";
3
+ import { a as t, b as n, c as r, g as i, h as a, m as o, o as s, p as c, s as l, t as u, w as d } from "./documentTitle.composable-4ApFl9TZ.js";
4
4
  import { n as f, r as p, t as m } from "./useCurrencyFormat.composable-MtZaqKnO.js";
5
- import { a as h, c as g, d as _, f as v, i as y, l as b, n as ee, o as te, p as ne, r as x, s as re, t as S, u as ie } from "./dist-DJ8yJcb9.js";
6
- import { t as ae } from "./src-BFgnUugN.js";
7
- import { t as C } from "./invoice.service-ChHEtXBA.js";
8
- import { t as oe } from "./plainDate.transformer-BxvJpJOv.js";
9
- import { a as se } from "./billingDocumentDetail.transformer-zMTbka5p.js";
10
- import { K as w, L as ce, R as le, U as T, nt as E, w as ue } from "./dist-DP8KNFVD.js";
11
- import { n as D } from "./dist-YTXTCfo1.js";
12
- import { i as de, n as O, r as fe, t as pe } from "./CustomFieldValueText-DDQq-975.js";
5
+ import { t as h } from "./search.composable-BCtYqudV.js";
6
+ import { t as g } from "./src-BFgnUugN.js";
7
+ import { t as _ } from "./invoice.service-DG5eacZC.js";
8
+ import { t as v } from "./plainDate.transformer-Dfe5r84P.js";
9
+ import { G as y, H as b, I as x, L as S, tt as C, w as ee } from "./dist-D9lp7NDv.js";
10
+ import { n as w } from "./dist-YTXTCfo1.js";
11
+ import { a as te, c as ne, d as re, f as ie, i as T, l as ae, n as oe, o as se, r as E, s as ce, t as D, u as le } from "./dist-PErDVE6-.js";
12
+ import { a as ue } from "./billingDocumentDetail.transformer-DIKAl4_L.js";
13
+ import { i as de, n as O, r as fe, t as pe } from "./CustomFieldValueText-ne5yy02J.js";
13
14
  import { t as me } from "./customerUuid.model-GUFYq3O2.js";
14
- import { t as he } from "./DataProvider-CfHLB3rH.js";
15
+ import { t as he } from "./DataProvider-Dj34ljUX.js";
15
16
  import { t as ge } from "./formango.util-D5c2ql--.js";
16
- import { c as _e, l as ve, n as ye, o as be, s as xe, t as Se, u as Ce } from "./invoiceDeliveryStatus.util-BsA-MlA3.js";
17
- import { t as we } from "./issuerSettings.query-RqtrZFaB.js";
17
+ import { c as _e, l as ve, n as ye, o as be, s as xe, t as Se, u as Ce } from "./invoiceDeliveryStatus.util-CX-IdqAu.js";
18
+ import { t as we } from "./issuerSettings.query-6wnSPphB.js";
18
19
  import { t as Te } from "./dashboard-BaWGNEek.js";
19
20
  import { RouterLink as Ee, useRouter as De } from "vue-router";
20
21
  import { z as k } from "zod";
21
22
  import { useI18n as A } from "vue-i18n";
22
- import { Fragment as j, computed as M, createBlock as N, createCommentVNode as P, createElementBlock as F, createElementVNode as I, createTextVNode as Oe, createVNode as L, defineComponent as R, isRef as ke, mergeModels as Ae, mergeProps as je, normalizeClass as Me, onMounted as Ne, openBlock as z, ref as B, renderList as Pe, renderSlot as Fe, toDisplayString as V, unref as H, useModel as Ie, watch as Le, withCtx as U } from "vue";
23
- import { QueryClient as Re, getTanstackQueryClient as ze, useMutation as W, useOffsetInfiniteQuery as Be } from "@wisemen/vue-core-api-utils";
24
- import { useLocalStorage as Ve, watchDebounced as He } from "@vueuse/core";
25
- import { Temporal as Ue } from "temporal-polyfill";
26
- import { UIAutocomplete as We, UIBadge as Ge, UIButton as G, UICheckbox as Ke, UIColumnLayout as K, UIDashboardPage as qe, UIDashboardPageActions as Je, UIDateRangePicker as Ye, UIDialog as Xe, UIDialogBody as Ze, UIDialogFooter as Qe, UIDialogFooterCancel as $e, UIDialogFooterPrimary as et, UIDialogFooterSubmit as tt, UIDialogHeader as nt, UIFormDialog as rt, UIPopover as it, UIRowLayout as q, UITable as at, UITableCell as J, UITableCellInteractiveElement as ot, UITableCellText as st, UITabs as ct, UITabsItem as lt, UITabsList as ut, UIText as dt, UITextField as ft, createAutocompleteOptions as pt, createComponent as Y, defineTableColumns as mt, useOverlay as ht, useTableCustomizeColumns as gt, useToast as X } from "@wisemen/vue-core-design-system";
27
- import { useForm as _t } from "formango";
28
- import { useRouteQuery as vt } from "@vueuse/router";
23
+ import { Fragment as Oe, computed as j, createBlock as M, createCommentVNode as N, createElementBlock as P, createElementVNode as F, createTextVNode as ke, createVNode as I, defineComponent as L, isRef as Ae, mergeModels as je, mergeProps as Me, normalizeClass as Ne, onMounted as Pe, openBlock as R, ref as z, renderList as Fe, renderSlot as Ie, toDisplayString as B, unref as V, useModel as Le, watch as Re, withCtx as H } from "vue";
24
+ import { QueryClient as ze, getTanstackQueryClient as Be, useMutation as U, useOffsetInfiniteQuery as Ve } from "@wisemen/vue-core-api-utils";
25
+ import { useLocalStorage as He, watchDebounced as Ue } from "@vueuse/core";
26
+ import { Temporal as We } from "temporal-polyfill";
27
+ import { UIAutocomplete as Ge, UIBadge as Ke, UIButton as W, UICheckbox as qe, UIColumnLayout as G, UIDashboardPage as Je, UIDashboardPageActions as Ye, UIDateRangePicker as Xe, UIDialog as Ze, UIDialogBody as Qe, UIDialogFooter as $e, UIDialogFooterCancel as et, UIDialogFooterPrimary as tt, UIDialogFooterSubmit as nt, UIDialogHeader as rt, UIFormDialog as it, UIPopover as at, UIRowLayout as K, UITable as ot, UITableCell as q, UITableCellInteractiveElement as st, UITableCellText as ct, UITabs as lt, UITabsItem as ut, UITabsList as dt, UIText as ft, UITextField as pt, createAutocompleteOptions as mt, createComponent as J, defineTableColumns as ht, useOverlay as gt, useTableCustomizeColumns as _t, useToast as Y } from "@wisemen/vue-core-design-system";
28
+ import { useForm as vt } from "formango";
29
+ import { useRouteQuery as yt } from "@vueuse/router";
29
30
  //#region src/modules/invoice/api/queries/invoiceIndex.query.ts
30
- function yt(e) {
31
- let t = M(() => ({
31
+ function bt(e) {
32
+ let t = j(() => ({
32
33
  filters: e?.params?.filters?.value,
33
34
  search: e?.params?.search?.value,
34
35
  sort: e?.params?.sort?.value ?? []
35
36
  }));
36
- return Be("invoiceIndex", {
37
+ return Ve("invoiceIndex", {
37
38
  params: { queryParams: t },
38
- queryFn: (t) => C.getAll({
39
+ queryFn: (t) => _.getAll({
39
40
  filters: e?.params?.filters?.value,
40
41
  pagination: t,
41
42
  search: e?.params?.search?.value,
@@ -45,17 +46,17 @@ function yt(e) {
45
46
  }
46
47
  //#endregion
47
48
  //#region src/modules/invoice/api/mutations/invoiceCreate.mutation.ts
48
- function bt() {
49
- return W({
50
- queryFn: (e) => C.create(e.body),
49
+ function xt() {
50
+ return U({
51
+ queryFn: (e) => _.create(e.body),
51
52
  queryKeysToInvalidate: { invoiceIndex: {} }
52
53
  });
53
54
  }
54
55
  //#endregion
55
56
  //#region src/modules/invoice/api/queries/invoiceCustomerSearch.query.ts
56
- function xt(e) {
57
- let t = M(() => ({ search: e.params.search?.value }));
58
- return Be("invoiceCustomerSearch", {
57
+ function St(e) {
58
+ let t = j(() => ({ search: e.params.search?.value }));
59
+ return Ve("invoiceCustomerSearch", {
59
60
  params: { queryParams: t },
60
61
  queryFn: (t) => Ce.getAll({
61
62
  pagination: t,
@@ -65,7 +66,7 @@ function xt(e) {
65
66
  }
66
67
  //#endregion
67
68
  //#region src/modules/invoice/components/form/InvoiceFormCustomerField.vue
68
- var St = /* @__PURE__ */ R({
69
+ var Ct = /* @__PURE__ */ L({
69
70
  __name: "InvoiceFormCustomerField",
70
71
  props: {
71
72
  isLoading: { type: Boolean },
@@ -74,7 +75,7 @@ var St = /* @__PURE__ */ R({
74
75
  },
75
76
  emits: ["nextPage", "updateSearch"],
76
77
  setup(e, { emit: t }) {
77
- let n = e, i = t, a = A(), o = M(() => pt(n.customers));
78
+ let n = e, i = t, a = A(), o = j(() => mt(n.customers));
78
79
  function s(e) {
79
80
  return e.name;
80
81
  }
@@ -97,14 +98,14 @@ var St = /* @__PURE__ */ R({
97
98
  function d(e) {
98
99
  n.field.setValue(e), e !== null && i("updateSearch", "");
99
100
  }
100
- return (e, t) => (z(), N(H(We), je(H(ge)(n.field), {
101
+ return (e, t) => (R(), M(V(Ge), Me(V(ge)(n.field), {
101
102
  "display-fn": s,
102
103
  "get-item-config": l,
103
104
  "is-loading": n.isLoading,
104
105
  "is-required": !0,
105
106
  items: o.value,
106
- label: H(a).t("wise_invoicing.invoice.create.fields.customer"),
107
- placeholder: H(a).t("component.autocomplete.search_placeholder"),
107
+ label: V(a).t("wise_invoicing.invoice.create.fields.customer"),
108
+ placeholder: V(a).t("component.autocomplete.search_placeholder"),
108
109
  "search-mode": "remote",
109
110
  onNextPage: t[0] ||= (e) => i("nextPage"),
110
111
  "onUpdate:modelValue": d,
@@ -116,21 +117,21 @@ var St = /* @__PURE__ */ R({
116
117
  "placeholder"
117
118
  ]));
118
119
  }
119
- }), Ct = k.enum(r), wt = k.object({
120
+ }), wt = k.enum(r), Tt = k.object({
120
121
  uuid: me,
121
122
  name: k.string().min(1),
122
- type: Ct
123
- }), Tt = k.object({ customer: wt }), Et = /* @__PURE__ */ R({
123
+ type: wt
124
+ }), Et = k.object({ customer: Tt }), Dt = /* @__PURE__ */ L({
124
125
  __name: "InvoiceCreateDialog",
125
126
  emits: ["close"],
126
127
  setup(e, { emit: t }) {
127
- let n = t, r = A(), i = X(), a = De(), o = bt(), s = ne({ debounceMs: 250 }), c = xt({ params: { search: s.debouncedSearch } }), l = M(() => c.result.value.match({
128
+ let n = t, r = A(), i = Y(), a = De(), o = xt(), s = h({ debounceMs: 250 }), c = St({ params: { search: s.debouncedSearch } }), l = j(() => c.result.value.match({
128
129
  err: () => [],
129
130
  loading: () => [],
130
131
  ok: (e) => e.data
131
- })), u = _t({
132
+ })), u = vt({
132
133
  initialState: { customer: null },
133
- schema: Tt,
134
+ schema: Et,
134
135
  onSubmit: async (e) => {
135
136
  let t = await o.execute({ body: e });
136
137
  if (t.isErr()) {
@@ -146,28 +147,28 @@ var St = /* @__PURE__ */ R({
146
147
  function f(e) {
147
148
  s.updateSearch(e);
148
149
  }
149
- return (e, t) => (z(), N(H(rt), {
150
- form: H(u),
150
+ return (e, t) => (R(), M(V(it), {
151
+ form: V(u),
151
152
  size: "xs",
152
153
  onClose: t[0] ||= (e) => n("close")
153
154
  }, {
154
- default: U(() => [
155
- L(H(nt), {
156
- title: H(r).t("wise_invoicing.invoice.create.modal_title"),
157
- description: H(r).t("wise_invoicing.invoice.create.modal_description"),
158
- icon: H(ce),
155
+ default: H(() => [
156
+ I(V(rt), {
157
+ title: V(r).t("wise_invoicing.invoice.create.modal_title"),
158
+ description: V(r).t("wise_invoicing.invoice.create.modal_description"),
159
+ icon: V(x),
159
160
  "is-description-visible": !0
160
161
  }, null, 8, [
161
162
  "title",
162
163
  "description",
163
164
  "icon"
164
165
  ]),
165
- L(H(Ze), null, {
166
- default: U(() => [L(St, {
166
+ I(V(Qe), null, {
167
+ default: H(() => [I(Ct, {
167
168
  customers: l.value,
168
- field: H(d),
169
- "is-loading": H(c).isLoading.value,
170
- onNextPage: H(c).fetchNextPage,
169
+ field: V(d),
170
+ "is-loading": V(c).isLoading.value,
171
+ onNextPage: V(c).fetchNextPage,
171
172
  onUpdateSearch: f
172
173
  }, null, 8, [
173
174
  "customers",
@@ -177,18 +178,18 @@ var St = /* @__PURE__ */ R({
177
178
  ])]),
178
179
  _: 1
179
180
  }),
180
- L(H(Qe), null, {
181
- right: U(() => [L(H($e), { label: "cancel" }), L(H(tt), { label: H(r).t("wise_invoicing.invoice.create.confirm") }, null, 8, ["label"])]),
181
+ I(V($e), null, {
182
+ right: H(() => [I(V(et), { label: "cancel" }), I(V(nt), { label: V(r).t("wise_invoicing.invoice.create.confirm") }, null, 8, ["label"])]),
182
183
  _: 1
183
184
  })
184
185
  ]),
185
186
  _: 1
186
187
  }, 8, ["form"]));
187
188
  }
188
- }), Dt = {
189
+ }), Ot = {
189
190
  key: 0,
190
191
  class: "pointer-events-none fixed inset-x-0 bottom-4 z-20 flex justify-center px-lg"
191
- }, Ot = { class: "text-sm text-secondary" }, kt = /* @__PURE__ */ R({
192
+ }, kt = { class: "text-sm text-secondary" }, At = /* @__PURE__ */ L({
192
193
  __name: "InvoiceOverviewBulkActionBar",
193
194
  props: {
194
195
  canFinalize: { type: Boolean },
@@ -206,75 +207,75 @@ var St = /* @__PURE__ */ R({
206
207
  ],
207
208
  setup(e, { emit: t }) {
208
209
  let n = e, r = t, i = A();
209
- return (e, t) => n.selectedCount > 0 ? (z(), F("div", Dt, [L(H(q), { class: "pointer-events-auto rounded-xl border border-secondary bg-primary px-lg py-sm shadow-lg" }, {
210
- default: U(() => [
211
- I("span", Ot, V(H(i).t("wise_invoicing.invoice.overview.bulk.selected_documents", { count: n.selectedCount })), 1),
212
- n.canMarkAsReady ? (z(), N(H(G), {
210
+ return (e, t) => n.selectedCount > 0 ? (R(), P("div", Ot, [I(V(K), { class: "pointer-events-auto rounded-xl border border-secondary bg-primary px-lg py-sm shadow-lg" }, {
211
+ default: H(() => [
212
+ F("span", kt, B(V(i).t("wise_invoicing.invoice.overview.bulk.selected_documents", { count: n.selectedCount })), 1),
213
+ n.canMarkAsReady ? (R(), M(V(W), {
213
214
  key: 0,
214
- label: H(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.action"),
215
+ label: V(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.action"),
215
216
  onClick: t[0] ||= (e) => r("markAsReady")
216
- }, null, 8, ["label"])) : P("", !0),
217
- n.canFinalize ? (z(), N(H(G), {
217
+ }, null, 8, ["label"])) : N("", !0),
218
+ n.canFinalize ? (R(), M(V(W), {
218
219
  key: 1,
219
- label: H(i).t("wise_invoicing.invoice.overview.bulk.finalize.action"),
220
+ label: V(i).t("wise_invoicing.invoice.overview.bulk.finalize.action"),
220
221
  onClick: t[1] ||= (e) => r("finalize")
221
- }, null, 8, ["label"])) : P("", !0),
222
- n.canSend ? (z(), N(H(G), {
222
+ }, null, 8, ["label"])) : N("", !0),
223
+ n.canSend ? (R(), M(V(W), {
223
224
  key: 2,
224
- label: H(i).t("wise_invoicing.invoice.overview.bulk.send.action"),
225
+ label: V(i).t("wise_invoicing.invoice.overview.bulk.send.action"),
225
226
  onClick: t[2] ||= (e) => r("send")
226
- }, null, 8, ["label"])) : P("", !0),
227
- n.canSelectAll ? (z(), N(H(G), {
227
+ }, null, 8, ["label"])) : N("", !0),
228
+ n.canSelectAll ? (R(), M(V(W), {
228
229
  key: 3,
229
- label: H(i).t("wise_invoicing.invoice.overview.bulk.select_all"),
230
+ label: V(i).t("wise_invoicing.invoice.overview.bulk.select_all"),
230
231
  variant: "secondary",
231
232
  onClick: t[3] ||= (e) => r("selectAll")
232
- }, null, 8, ["label"])) : P("", !0),
233
- L(H(G), {
234
- label: H(i).t("wise_invoicing.invoice.overview.bulk.cancel"),
233
+ }, null, 8, ["label"])) : N("", !0),
234
+ I(V(W), {
235
+ label: V(i).t("wise_invoicing.invoice.overview.bulk.cancel"),
235
236
  variant: "tertiary",
236
237
  onClick: t[4] ||= (e) => r("cancel")
237
238
  }, null, 8, ["label"])
238
239
  ]),
239
240
  _: 1
240
- })])) : P("", !0);
241
+ })])) : N("", !0);
241
242
  }
242
243
  });
243
244
  //#endregion
244
245
  //#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewBulkSendEligibility.composable.ts
245
- function At(e) {
246
- let t = B(null), n = M(() => e.selectedInvoices().filter((e) => e.status === o.FINALIZED).map((e) => e.uuid)), r = M(() => n.value.toSorted().join(","));
247
- return He(r, async (e) => {
246
+ function jt(e) {
247
+ let t = z(null), n = j(() => e.selectedInvoices().filter((e) => e.status === a.FINALIZED).map((e) => e.uuid)), r = j(() => n.value.toSorted().join(","));
248
+ return Ue(r, async (e) => {
248
249
  let i = n.value;
249
250
  if (i.length === 0) {
250
251
  t.value = null;
251
252
  return;
252
253
  }
253
- let a = await C.previewBulkSend(i);
254
+ let a = await _.previewBulkSend(i);
254
255
  r.value === e && (t.value = a.isErr() ? i.length : a.value.meta.processed);
255
- }, { debounce: 300 }), { canSend: M(() => n.value.length > 0 && (t.value ?? 0) > 0) };
256
+ }, { debounce: 300 }), { canSend: j(() => n.value.length > 0 && (t.value ?? 0) > 0) };
256
257
  }
257
258
  //#endregion
258
259
  //#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewCustomFieldFilter.util.ts
259
- function Z(e) {
260
+ function X(e) {
260
261
  return Array.isArray(e) && e.every((e) => typeof e == "string");
261
262
  }
262
- function jt(e, t) {
263
+ function Mt(e, t) {
263
264
  try {
264
265
  switch (e) {
265
- case l.DATE: return oe.toDto(oe.fromDto(t));
266
- case l.TIMESTAMP: return se.toDto(se.fromDto(t));
266
+ case l.DATE: return v.toDto(v.fromDto(t));
267
+ case l.TIMESTAMP: return ue.toDto(ue.fromDto(t));
267
268
  default: return t;
268
269
  }
269
270
  } catch {
270
271
  return null;
271
272
  }
272
273
  }
273
- var Q = class {
274
+ var Z = class {
274
275
  static getFreeformOptions(e, t) {
275
276
  let n = t.trim();
276
277
  if (n.length === 0) return [];
277
- let r = jt(e.type, n);
278
+ let r = Mt(e.type, n);
278
279
  return r === null ? [] : [r];
279
280
  }
280
281
  static getKey(e) {
@@ -284,11 +285,11 @@ var Q = class {
284
285
  let r = this.getRuleNumber(e, t);
285
286
  return r === void 0 || n === void 0 ? void 0 : m(r, n);
286
287
  }
287
- static getMonetaryCurrency(e, t) {
288
+ static getMonetaryCurrency(e, n) {
288
289
  let r = e.rules?.currencies;
289
- if (!Array.isArray(r)) return t;
290
- let i = new Set(Object.values(n)), a = r.filter((e) => typeof e == "string" && i.has(e));
291
- return a.includes(t) ? t : a[0] ?? t;
290
+ if (!Array.isArray(r)) return n;
291
+ let i = new Set(Object.values(t)), a = r.filter((e) => typeof e == "string" && i.has(e));
292
+ return a.includes(n) ? n : a[0] ?? n;
292
293
  }
293
294
  static getRuleNumber(e, t) {
294
295
  let n = e.rules?.[t];
@@ -318,32 +319,32 @@ var Q = class {
318
319
  type: l.NUMBER,
319
320
  value: t
320
321
  }] : [];
321
- case l.MULTI_SELECT: return Z(t) && t.length > 0 ? [{
322
+ case l.MULTI_SELECT: return X(t) && t.length > 0 ? [{
322
323
  definitionUuid: e.uuid,
323
324
  type: l.MULTI_SELECT,
324
325
  value: t
325
326
  }] : [];
326
- case l.TEXT_ARRAY: return Z(t) && t.length > 0 ? [{
327
+ case l.TEXT_ARRAY: return X(t) && t.length > 0 ? [{
327
328
  definitionUuid: e.uuid,
328
329
  type: l.TEXT_ARRAY,
329
330
  value: t
330
331
  }] : [];
331
- case l.DATE: return Z(t) ? t.map((t) => ({
332
+ case l.DATE: return X(t) ? t.map((t) => ({
332
333
  definitionUuid: e.uuid,
333
334
  type: l.DATE,
334
335
  value: t
335
336
  })) : [];
336
- case l.SINGLE_SELECT: return Z(t) ? t.map((t) => ({
337
+ case l.SINGLE_SELECT: return X(t) ? t.map((t) => ({
337
338
  definitionUuid: e.uuid,
338
339
  type: l.SINGLE_SELECT,
339
340
  value: t
340
341
  })) : [];
341
- case l.TEXT: return Z(t) ? t.map((t) => ({
342
+ case l.TEXT: return X(t) ? t.map((t) => ({
342
343
  definitionUuid: e.uuid,
343
344
  type: l.TEXT,
344
345
  value: t
345
346
  })) : [];
346
- case l.TIMESTAMP: return Z(t) ? t.map((t) => ({
347
+ case l.TIMESTAMP: return X(t) ? t.map((t) => ({
347
348
  definitionUuid: e.uuid,
348
349
  type: l.TIMESTAMP,
349
350
  value: t
@@ -354,50 +355,50 @@ var Q = class {
354
355
  };
355
356
  //#endregion
356
357
  //#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewDataTableFilters.composable.ts
357
- function Mt(e) {
358
- let t = A(), n = ne({ debounceMs: 250 }), r = xt({ params: { search: n.debouncedSearch } }), i = M(() => r.result.value.match({
358
+ function Nt(e) {
359
+ let t = A(), n = h({ debounceMs: 250 }), r = St({ params: { search: n.debouncedSearch } }), i = j(() => r.result.value.match({
359
360
  err: () => [],
360
361
  loading: () => [],
361
362
  ok: (e) => e.data
362
363
  })), a = e.customFieldDefinitions.map((n) => {
363
- let r = Q.getKey(n), i = O.getLabel(n, t.locale.value);
364
+ let r = Z.getKey(n), i = O.getLabel(n, t.locale.value);
364
365
  switch (n.type) {
365
- case l.BOOLEAN: return g({
366
+ case l.BOOLEAN: return ne({
366
367
  entityLabel: i,
367
368
  key: r,
368
369
  label: i
369
370
  });
370
371
  case l.MONETARY: {
371
- let t = Q.getRuleNumber(n, "precision"), a = Q.getMonetaryCurrency(n, e.currency);
372
- return _({
372
+ let t = Z.getRuleNumber(n, "precision"), a = Z.getMonetaryCurrency(n, e.currency);
373
+ return re({
373
374
  customUnit: a,
374
375
  defaultValue: {
375
- operator: ie.EQUALS,
376
+ operator: le.EQUALS,
376
377
  value: null
377
378
  },
378
379
  disableOperators: !0,
379
380
  key: r,
380
381
  label: i,
381
- max: Q.getMajorUnitRule(n, "max", t),
382
- min: Q.getMajorUnitRule(n, "min", t),
382
+ max: Z.getMajorUnitRule(n, "max", t),
383
+ min: Z.getMajorUnitRule(n, "min", t),
383
384
  step: t === void 0 ? void 0 : 1 / 10 ** t
384
385
  });
385
386
  }
386
- case l.NUMBER: return _({
387
+ case l.NUMBER: return re({
387
388
  defaultValue: {
388
- operator: ie.EQUALS,
389
+ operator: le.EQUALS,
389
390
  value: null
390
391
  },
391
392
  disableOperators: !0,
392
393
  key: r,
393
394
  label: i,
394
- max: Q.getRuleNumber(n, "max"),
395
- min: Q.getRuleNumber(n, "min")
395
+ max: Z.getRuleNumber(n, "max"),
396
+ min: Z.getRuleNumber(n, "min")
396
397
  });
397
398
  case l.MULTI_SELECT:
398
- case l.SINGLE_SELECT: return h({
399
+ case l.SINGLE_SELECT: return te({
399
400
  defaultValue: {
400
- operator: x.INCLUDES,
401
+ operator: E.INCLUDES,
401
402
  value: []
402
403
  },
403
404
  disableOperators: !0,
@@ -409,25 +410,25 @@ function Mt(e) {
409
410
  case l.DATE:
410
411
  case l.TEXT:
411
412
  case l.TEXT_ARRAY:
412
- case l.TIMESTAMP: return v({
413
+ case l.TIMESTAMP: return ie({
413
414
  defaultValue: {
414
- operator: x.INCLUDES,
415
+ operator: E.INCLUDES,
415
416
  value: []
416
417
  },
417
418
  disableOperators: !0,
418
419
  displayFn: (e) => e,
419
420
  key: r,
420
421
  label: i,
421
- options: (e) => Promise.resolve(Q.getFreeformOptions(n, e))
422
+ options: (e) => Promise.resolve(Z.getFreeformOptions(n, e))
422
423
  });
423
424
  default: throw TypeError("Unsupported custom field definition type");
424
425
  }
425
- }), o = y({
426
+ }), s = T({
426
427
  actionGroup: { name: "invoices" },
427
428
  filters: [
428
- v({
429
+ ie({
429
430
  defaultValue: {
430
- operator: x.INCLUDES,
431
+ operator: E.INCLUDES,
431
432
  value: []
432
433
  },
433
434
  disableOperators: !0,
@@ -436,9 +437,9 @@ function Mt(e) {
436
437
  label: t.t("wise_invoicing.invoice.overview.filters.customer"),
437
438
  options: async (e) => (n.updateSearch(e), await new Promise((e) => setTimeout(e, 0)), i.value.map((e) => e.uuid))
438
439
  }),
439
- b({
440
+ ae({
440
441
  defaultValue: {
441
- operator: S.IS_BETWEEN,
442
+ operator: D.IS_BETWEEN,
442
443
  value: {
443
444
  from: null,
444
445
  until: null
@@ -448,60 +449,60 @@ function Mt(e) {
448
449
  key: "dueOnRange",
449
450
  label: t.t("wise_invoicing.invoice.overview.filters.due_on")
450
451
  }),
451
- h({
452
+ te({
452
453
  defaultValue: {
453
- operator: x.INCLUDES,
454
+ operator: E.INCLUDES,
454
455
  value: []
455
456
  },
456
457
  disableOperators: !0,
457
458
  displayFn: (e) => t.t(de.getLifecycleMetadata(e).translationKey),
458
459
  key: "lifecycleStatuses",
459
460
  label: t.t("wise_invoicing.invoice.overview.filters.lifecycle"),
460
- options: () => Object.values(c)
461
+ options: () => Object.values(o)
461
462
  }),
462
463
  ...a
463
464
  ]
464
- }), s = M(() => {
465
- let e = o.values.value.customerUuids.value;
465
+ }), c = j(() => {
466
+ let e = s.values.value.customerUuids.value;
466
467
  return e?.length ? e : null;
467
- }), u = M(() => {
468
- let e = o.values.value.dueOnRange.value;
468
+ }), u = j(() => {
469
+ let e = s.values.value.dueOnRange.value;
469
470
  return e.from === null || e.until === null ? null : e;
470
471
  });
471
472
  return {
472
- customerUuids: s,
473
- customFields: M(() => {
474
- let t = o.values.value;
473
+ customerUuids: c,
474
+ customFields: j(() => {
475
+ let t = s.values.value;
475
476
  return e.customFieldDefinitions.flatMap((n) => {
476
- let r = t[Q.getKey(n)], i = typeof r == "object" && r && "value" in r ? r.value : r;
477
- return Q.toFilters(n, i, e.currency);
477
+ let r = t[Z.getKey(n)], i = typeof r == "object" && r && "value" in r ? r.value : r;
478
+ return Z.toFilters(n, i, e.currency);
478
479
  });
479
480
  }),
480
481
  dueOnRange: u,
481
- filters: o,
482
- lifecycleStatuses: M(() => {
483
- let e = o.values.value.lifecycleStatuses.value;
482
+ filters: s,
483
+ lifecycleStatuses: j(() => {
484
+ let e = s.values.value.lifecycleStatuses.value;
484
485
  return e?.length ? e : null;
485
486
  })
486
487
  };
487
488
  }
488
489
  //#endregion
489
490
  //#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewFilters.composable.ts
490
- var Nt = {
491
+ var Pt = {
491
492
  awaiting_payment: {
492
- settlementStatuses: [d.UNPAID, d.PARTIALLY_PAID],
493
- statuses: [o.SENT]
493
+ settlementStatuses: [n.UNPAID, n.PARTIALLY_PAID],
494
+ statuses: [a.SENT]
494
495
  },
495
- credited: { settlementStatuses: [d.CREDITED] },
496
+ credited: { settlementStatuses: [n.CREDITED] },
496
497
  overdue: { isOverdue: !0 },
497
- paid: { settlementStatuses: [d.PAID, d.OVERPAID] },
498
- settled: { settlementStatuses: [d.SETTLED] }
498
+ paid: { settlementStatuses: [n.PAID, n.OVERPAID] },
499
+ settled: { settlementStatuses: [n.SETTLED] }
499
500
  };
500
- function Pt() {
501
+ function Ft() {
501
502
  let e = A();
502
503
  return {
503
- getFilters: (e) => e === "all" ? {} : Nt[e],
504
- tabs: M(() => [
504
+ getFilters: (e) => e === "all" ? {} : Pt[e],
505
+ tabs: j(() => [
505
506
  {
506
507
  key: "all",
507
508
  label: e.t("wise_invoicing.invoice.overview.tabs.all")
@@ -531,14 +532,14 @@ function Pt() {
531
532
  }
532
533
  //#endregion
533
534
  //#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewSelection.composable.ts
534
- function Ft(e) {
535
- let t = B([]), n = M(() => {
535
+ function It(e) {
536
+ let t = z([]), n = j(() => {
536
537
  let n = new Set(t.value);
537
538
  return e.rows().filter((e) => n.has(e.uuid));
538
- }), r = M(() => {
539
+ }), r = j(() => {
539
540
  let t = e.rows();
540
541
  return t.length > 0 && n.value.length === t.length;
541
- }), i = M(() => e.rows().length > 0 && !r.value), a = M(() => n.value.length);
542
+ }), i = j(() => e.rows().length > 0 && !r.value), a = j(() => n.value.length);
542
543
  function o(e) {
543
544
  return t.value.includes(e);
544
545
  }
@@ -574,11 +575,11 @@ function Ft(e) {
574
575
  }
575
576
  //#endregion
576
577
  //#region src/modules/invoice/use-cases/overview/components/InvoiceOverviewTableAmountCell.vue?vue&type=script&setup=true&lang.ts
577
- var It = { class: "font-medium text-secondary" }, Lt = ["title"], Rt = /* @__PURE__ */ R({
578
+ var Lt = { class: "font-medium text-secondary" }, Rt = ["title"], zt = /* @__PURE__ */ L({
578
579
  __name: "InvoiceOverviewTableAmountCell",
579
580
  props: { value: {} },
580
581
  setup(e) {
581
- let t = e, n = A(), r = p(), i = M(() => r.formatMonetary(t.value.total)), a = M(() => {
582
+ let t = e, n = A(), r = p(), i = j(() => r.formatMonetary(t.value.total)), a = j(() => {
582
583
  let e = ve.getSubtextParts({
583
584
  balanceDueAmount: t.value.balanceDueAmount,
584
585
  grossAmount: t.value.grossAmount,
@@ -594,34 +595,34 @@ var It = { class: "font-medium text-secondary" }, Lt = ["title"], Rt = /* @__PUR
594
595
  paidAmount: r.formatMonetary(e.paidAmount)
595
596
  }) : e.paidAmount === null ? e.creditedAmount === null ? null : n.t("wise_invoicing.invoice.status_subtext.credited", { creditedAmount: r.formatMonetary(e.creditedAmount) }) : n.t("wise_invoicing.invoice.status_subtext.paid", { paidAmount: r.formatMonetary(e.paidAmount) });
596
597
  });
597
- return (e, t) => (z(), N(H(J), null, {
598
- default: U(() => [L(H(K), {
598
+ return (e, t) => (R(), M(V(q), null, {
599
+ default: H(() => [I(V(G), {
599
600
  gap: "xxs",
600
601
  class: "text-sm/tight"
601
602
  }, {
602
- default: U(() => [I("span", It, V(i.value), 1), a.value === null ? P("", !0) : (z(), F("span", {
603
+ default: H(() => [F("span", Lt, B(i.value), 1), a.value === null ? N("", !0) : (R(), P("span", {
603
604
  key: 0,
604
605
  title: a.value,
605
606
  class: "truncate text-xs text-secondary"
606
- }, V(a.value), 9, Lt))]),
607
+ }, B(a.value), 9, Rt))]),
607
608
  _: 1
608
609
  })]),
609
610
  _: 1
610
611
  }));
611
612
  }
612
- }), zt = /* @__PURE__ */ R({
613
+ }), Bt = /* @__PURE__ */ L({
613
614
  __name: "InvoiceOverviewTableCustomFieldCell",
614
615
  props: {
615
616
  definition: {},
616
617
  value: {}
617
618
  },
618
619
  setup(e) {
619
- return (t, n) => (z(), N(H(J), null, {
620
- default: U(() => [e.value === void 0 ? (z(), N(H(dt), {
620
+ return (t, n) => (R(), M(V(q), null, {
621
+ default: H(() => [e.value === void 0 ? (R(), M(V(ft), {
621
622
  key: 1,
622
623
  text: "-",
623
624
  class: "text-sm/5 text-primary"
624
- })) : (z(), N(pe, {
625
+ })) : (R(), M(pe, {
625
626
  key: 0,
626
627
  definition: e.definition,
627
628
  value: e.value,
@@ -630,27 +631,27 @@ var It = { class: "font-medium text-secondary" }, Lt = ["title"], Rt = /* @__PUR
630
631
  _: 1
631
632
  }));
632
633
  }
633
- }), Bt = /* @__PURE__ */ R({
634
+ }), Vt = /* @__PURE__ */ L({
634
635
  __name: "InvoiceOverviewTableDueDateCell",
635
636
  props: {
636
637
  isOverdue: { type: Boolean },
637
638
  value: {}
638
639
  },
639
640
  setup(e) {
640
- let t = e, n = D(), r = M(() => t.value === null ? "-" : n.formatPlainDate(t.value)), i = M(() => {
641
+ let t = e, n = w(), r = j(() => t.value === null ? "-" : n.formatPlainDate(t.value)), i = j(() => {
641
642
  if (!t.isOverdue || t.value === null) return null;
642
- let e = t.value.toZonedDateTime(Ue.Now.timeZoneId()).toInstant();
643
+ let e = t.value.toZonedDateTime(We.Now.timeZoneId()).toInstant();
643
644
  return n.toRelativeTime(e);
644
645
  });
645
- return (e, n) => (z(), N(H(J), null, {
646
- default: U(() => [L(H(q), { gap: "sm" }, {
647
- default: U(() => [L(H(dt), {
648
- class: Me([{
646
+ return (e, n) => (R(), M(V(q), null, {
647
+ default: H(() => [I(V(K), { gap: "sm" }, {
648
+ default: H(() => [I(V(ft), {
649
+ class: Ne([{
649
650
  "text-error-primary": t.isOverdue,
650
651
  "text-primary": !t.isOverdue
651
652
  }, "text-sm"]),
652
653
  text: r.value
653
- }, null, 8, ["class", "text"]), i.value === null ? P("", !0) : (z(), N(H(Ge), {
654
+ }, null, 8, ["class", "text"]), i.value === null ? N("", !0) : (R(), M(V(Ke), {
654
655
  key: 0,
655
656
  label: i.value,
656
657
  color: "error",
@@ -662,20 +663,20 @@ var It = { class: "font-medium text-secondary" }, Lt = ["title"], Rt = /* @__PUR
662
663
  _: 1
663
664
  }));
664
665
  }
665
- }), Vt = /* @__PURE__ */ R({
666
+ }), Ht = /* @__PURE__ */ L({
666
667
  __name: "InvoiceOverviewTableIssuedDateCell",
667
668
  props: { value: {} },
668
669
  setup(e) {
669
- let t = e, n = D(), r = M(() => t.value === null ? "-" : n.formatPlainDate(t.value));
670
- return (e, t) => (z(), N(H(J), null, {
671
- default: U(() => [L(H(dt), {
670
+ let t = e, n = w(), r = j(() => t.value === null ? "-" : n.formatPlainDate(t.value));
671
+ return (e, t) => (R(), M(V(q), null, {
672
+ default: H(() => [I(V(ft), {
672
673
  text: r.value,
673
674
  class: "text-sm/5 text-primary"
674
675
  }, null, 8, ["text"])]),
675
676
  _: 1
676
677
  }));
677
678
  }
678
- }), Ht = /* @__PURE__ */ R({
679
+ }), Ut = /* @__PURE__ */ L({
679
680
  __name: "InvoiceOverviewTableLifecycleCell",
680
681
  props: {
681
682
  isDisputed: { type: Boolean },
@@ -683,15 +684,15 @@ var It = { class: "font-medium text-secondary" }, Lt = ["title"], Rt = /* @__PUR
683
684
  },
684
685
  setup(e) {
685
686
  let t = e;
686
- return (e, n) => (z(), N(H(J), null, {
687
- default: U(() => [L(H(q), { gap: "xs" }, {
688
- default: U(() => [L(xe, { "lifecycle-status": t.lifecycleStatus }, null, 8, ["lifecycle-status"]), t.isDisputed ? (z(), N(_e, { key: 0 })) : P("", !0)]),
687
+ return (e, n) => (R(), M(V(q), null, {
688
+ default: H(() => [I(V(K), { gap: "xs" }, {
689
+ default: H(() => [I(xe, { "lifecycle-status": t.lifecycleStatus }, null, 8, ["lifecycle-status"]), t.isDisputed ? (R(), M(_e, { key: 0 })) : N("", !0)]),
689
690
  _: 1
690
691
  })]),
691
692
  _: 1
692
693
  }));
693
694
  }
694
- }), Ut = { class: "flex flex-col leading-tight" }, Wt = ["title"], Gt = ["title"], Kt = /* @__PURE__ */ R({
695
+ }), Wt = { class: "flex flex-col leading-tight" }, Gt = ["title"], Kt = ["title"], qt = /* @__PURE__ */ L({
695
696
  __name: "InvoiceOverviewTableNameCell",
696
697
  props: {
697
698
  customerName: {},
@@ -700,35 +701,35 @@ var It = { class: "font-medium text-secondary" }, Lt = ["title"], Rt = /* @__PUR
700
701
  },
701
702
  setup(e) {
702
703
  let t = e, n = A();
703
- return (e, r) => (z(), N(H(J), null, {
704
- default: U(() => [I("div", Ut, [L(H(q), null, {
705
- default: U(() => [I("span", {
704
+ return (e, r) => (R(), M(V(q), null, {
705
+ default: H(() => [F("div", Wt, [I(V(K), null, {
706
+ default: H(() => [F("span", {
706
707
  title: t.customerName,
707
708
  class: "truncate text-sm/4 font-medium text-primary"
708
- }, V(t.customerName), 9, Wt), t.type === H(a).CREDIT_NOTE ? (z(), N(H(w), {
709
+ }, B(t.customerName), 9, Gt), t.type === V(i).CREDIT_NOTE ? (R(), M(V(y), {
709
710
  key: 0,
710
- "aria-label": H(n).t("wise_invoicing.invoice.type.credit_note"),
711
+ "aria-label": V(n).t("wise_invoicing.invoice.type.credit_note"),
711
712
  class: "size-3 shrink-0 text-warning-primary",
712
713
  role: "img"
713
- }, null, 8, ["aria-label"])) : P("", !0)]),
714
+ }, null, 8, ["aria-label"])) : N("", !0)]),
714
715
  _: 1
715
- }), I("span", {
716
+ }), F("span", {
716
717
  title: t.subject ?? void 0,
717
718
  class: "truncate text-xs/4 text-secondary"
718
- }, V(t.subject ?? "-"), 9, Gt)])]),
719
+ }, B(t.subject ?? "-"), 9, Kt)])]),
719
720
  _: 1
720
721
  }));
721
722
  }
722
- }), qt = /* @__PURE__ */ R({
723
+ }), Jt = /* @__PURE__ */ L({
723
724
  __name: "InvoiceOverviewTableSelectionCell",
724
725
  props: { isSelected: { type: Boolean } },
725
726
  emits: ["toggle"],
726
727
  setup(e, { emit: t }) {
727
728
  let n = e, r = t, i = A();
728
- return (e, t) => (z(), N(H(J), null, {
729
- default: U(() => [L(H(ot), null, {
730
- default: U(() => [L(H(Ke), {
731
- label: H(i).t("wise_invoicing.invoice.overview.bulk.select_document"),
729
+ return (e, t) => (R(), M(V(q), null, {
730
+ default: H(() => [I(V(st), null, {
731
+ default: H(() => [I(V(qe), {
732
+ label: V(i).t("wise_invoicing.invoice.overview.bulk.select_document"),
732
733
  "model-value": n.isSelected,
733
734
  "is-label-hidden": !0,
734
735
  class: "mx-auto",
@@ -739,35 +740,35 @@ var It = { class: "font-medium text-secondary" }, Lt = ["title"], Rt = /* @__PUR
739
740
  _: 1
740
741
  }));
741
742
  }
742
- }), Jt = /* @__PURE__ */ R({
743
+ }), Yt = /* @__PURE__ */ L({
743
744
  __name: "InvoiceOverviewTableSentCell",
744
745
  props: { deliveryStatus: {} },
745
746
  setup(e) {
746
- let t = e, n = M(() => [i.SENT, i.VIEWED].includes(t.deliveryStatus));
747
- return (e, t) => (z(), N(H(J), null, {
748
- default: U(() => [n.value ? (z(), N(H(be), {
747
+ let t = e, n = j(() => [c.SENT, c.VIEWED].includes(t.deliveryStatus));
748
+ return (e, t) => (R(), M(V(q), null, {
749
+ default: H(() => [n.value ? (R(), M(V(be), {
749
750
  key: 0,
750
751
  class: "size-4 text-brand-600"
751
- })) : P("", !0)]),
752
+ })) : N("", !0)]),
752
753
  _: 1
753
754
  }));
754
755
  }
755
- }), Yt = /* @__PURE__ */ R({
756
+ }), Xt = /* @__PURE__ */ L({
756
757
  __name: "InvoiceOverviewTableSequenceCell",
757
758
  props: { sequence: {} },
758
759
  setup(e) {
759
- return (t, n) => (z(), N(H(J), null, {
760
- default: U(() => [L(H(st), { text: e.sequence ?? "-" }, null, 8, ["text"])]),
760
+ return (t, n) => (R(), M(V(q), null, {
761
+ default: H(() => [I(V(ct), { text: e.sequence ?? "-" }, null, 8, ["text"])]),
761
762
  _: 1
762
763
  }));
763
764
  }
764
- }), Xt = /* @__PURE__ */ R({
765
+ }), Zt = /* @__PURE__ */ L({
765
766
  __name: "InvoiceOverviewTableStatusCell",
766
767
  props: { value: {} },
767
768
  setup(e) {
768
- let t = e, n = M(() => t.value.type === a.CREDIT_NOTE), r = M(() => Se.isSent(t.value.deliveryStatus));
769
- return (e, i) => (z(), N(H(J), null, {
770
- default: U(() => [n.value ? P("", !0) : (z(), N(ye, {
769
+ let t = e, n = j(() => t.value.type === i.CREDIT_NOTE), r = j(() => Se.isSent(t.value.deliveryStatus));
770
+ return (e, i) => (R(), M(V(q), null, {
771
+ default: H(() => [n.value ? N("", !0) : (R(), M(ye, {
771
772
  key: 0,
772
773
  "is-sent": r.value,
773
774
  "balance-due-amount": t.value.balanceDueAmount,
@@ -790,149 +791,202 @@ var It = { class: "font-medium text-secondary" }, Lt = ["title"], Rt = /* @__PUR
790
791
  });
791
792
  //#endregion
792
793
  //#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewTableColumns.composable.ts
793
- function Zt(e) {
794
- let n = A();
795
- return M(() => {
796
- let r = e?.selection, i = e?.customFieldDefinitions?.().map((e) => ({
797
- headerLabel: O.getLabel(e, n.locale.value),
798
- key: Q.getKey(e),
794
+ function Qt(e) {
795
+ let t = A();
796
+ return j(() => {
797
+ let n = e?.selection, r = e?.customFieldDefinitions?.().map((e) => ({
798
+ headerLabel: O.getLabel(e, t.locale.value),
799
+ key: Z.getKey(e),
799
800
  size: {
800
801
  max: "1fr",
801
802
  min: "10rem"
802
803
  },
803
- component: (t) => Y(zt, {
804
+ component: (t) => J(Bt, {
804
805
  definition: e,
805
806
  value: t.customFields.find((t) => t.definitionUuid === e.uuid)
806
807
  })
807
- })) ?? [], a = r === void 0 ? [] : [{
808
+ })) ?? [], i = n === void 0 ? [] : [{
808
809
  headerLabel: "",
809
810
  key: "selection",
810
811
  size: {
811
812
  max: "2.5rem",
812
813
  min: "2.5rem"
813
814
  },
814
- component: (e) => Y(qt, {
815
- isSelected: r.isSelected(e.uuid),
816
- onToggle: () => r.toggleRow(e.uuid)
815
+ component: (e) => J(Jt, {
816
+ isSelected: n.isSelected(e.uuid),
817
+ onToggle: () => n.toggleRow(e.uuid)
817
818
  })
818
819
  }];
819
- return mt()([
820
- ...a,
820
+ return ht()([
821
+ ...i,
821
822
  {
822
- headerLabel: n.t("wise_invoicing.invoice.overview.columns.recipient"),
823
- key: t.CUSTOMER,
823
+ headerLabel: t.t("wise_invoicing.invoice.overview.columns.recipient"),
824
+ key: d.CUSTOMER,
824
825
  size: {
825
826
  max: "16rem",
826
827
  min: "16rem"
827
828
  },
828
- component: (e) => Y(Kt, {
829
+ component: (e) => J(qt, {
829
830
  customerName: e.customerName,
830
831
  subject: e.subject,
831
832
  type: e.type
832
833
  })
833
834
  },
834
835
  {
835
- headerLabel: n.t("wise_invoicing.invoice.overview.columns.id"),
836
- key: t.SEQUENCE,
836
+ headerLabel: t.t("wise_invoicing.invoice.overview.columns.id"),
837
+ key: d.SEQUENCE,
837
838
  size: {
838
839
  max: "9rem",
839
840
  min: "9rem"
840
841
  },
841
- component: (e) => Y(Yt, { sequence: e.sequence })
842
+ component: (e) => J(Xt, { sequence: e.sequence })
842
843
  },
843
844
  {
844
- headerLabel: n.t("wise_invoicing.invoice.overview.columns.lifecycle"),
845
+ headerLabel: t.t("wise_invoicing.invoice.overview.columns.lifecycle"),
845
846
  key: "lifecycleStatus",
846
847
  size: {
847
848
  max: "12rem",
848
849
  min: "8rem"
849
850
  },
850
- component: (e) => Y(Ht, {
851
+ component: (e) => J(Ut, {
851
852
  isDisputed: e.isDisputed,
852
853
  lifecycleStatus: e.lifecycleStatus
853
854
  })
854
855
  },
855
856
  {
856
- headerLabel: n.t("wise_invoicing.invoice.overview.columns.invoice_date"),
857
- key: t.ISSUED_ON,
857
+ headerLabel: t.t("wise_invoicing.invoice.overview.columns.invoice_date"),
858
+ key: d.ISSUED_ON,
858
859
  size: {
859
860
  max: "8rem",
860
861
  min: "8rem"
861
862
  },
862
- component: (e) => Y(Vt, { value: e.issuedOn })
863
+ component: (e) => J(Ht, { value: e.issuedOn })
863
864
  },
864
865
  {
865
- headerLabel: n.t("wise_invoicing.invoice.overview.columns.sent"),
866
+ headerLabel: t.t("wise_invoicing.invoice.overview.columns.sent"),
866
867
  key: "deliveryStatus",
867
868
  size: {
868
869
  max: "8rem",
869
870
  min: "8rem"
870
871
  },
871
- component: (e) => Y(Jt, { deliveryStatus: e.deliveryStatus })
872
+ component: (e) => J(Yt, { deliveryStatus: e.deliveryStatus })
872
873
  },
873
874
  {
874
- headerLabel: n.t("wise_invoicing.invoice.overview.columns.settlement"),
875
+ headerLabel: t.t("wise_invoicing.invoice.overview.columns.settlement"),
875
876
  key: "status",
876
877
  size: {
877
878
  max: "10rem",
878
879
  min: "10rem"
879
880
  },
880
- component: (e) => Y(Xt, { value: e })
881
+ component: (e) => J(Zt, { value: e })
881
882
  },
882
883
  {
883
- headerLabel: n.t("wise_invoicing.invoice.overview.columns.due_date"),
884
+ headerLabel: t.t("wise_invoicing.invoice.overview.columns.due_date"),
884
885
  key: "dueOn",
885
886
  size: {
886
887
  max: "14rem",
887
888
  min: "12rem"
888
889
  },
889
- component: (e) => Y(Bt, {
890
+ component: (e) => J(Vt, {
890
891
  isOverdue: e.isOverdue,
891
892
  value: e.dueOn
892
893
  })
893
894
  },
894
895
  {
895
- headerLabel: n.t("wise_invoicing.invoice.overview.columns.amount_excl_vat"),
896
- key: t.NET_AMOUNT,
896
+ headerLabel: t.t("wise_invoicing.invoice.overview.columns.amount_excl_vat"),
897
+ key: d.NET_AMOUNT,
897
898
  size: {
898
899
  max: "1fr",
899
900
  min: "10rem"
900
901
  },
901
- component: (e) => Y(Rt, { value: e })
902
+ component: (e) => J(zt, { value: e })
902
903
  },
903
- ...i
904
+ ...r
904
905
  ]);
905
906
  });
906
907
  }
907
908
  //#endregion
908
909
  //#region src/modules/invoice/api/invoiceIndexCache.util.ts
909
- var Qt = [
910
- 250,
911
- 750,
912
- 1500,
913
- 2500
914
- ], $t = class {
910
+ var $t = 3e5, Q = /* @__PURE__ */ new Map(), en = null, tn = null;
911
+ function nn(e) {
912
+ return typeof e == "object" && !!e && "pages" in e && Array.isArray(e.pages);
913
+ }
914
+ function rn(e) {
915
+ return nn(e) ? e.pages.flatMap((e) => e.isOk() ? e.getValue().data : []) : [];
916
+ }
917
+ function an(e) {
918
+ return Object.keys(e);
919
+ }
920
+ function on(e, t) {
921
+ let n = an(t.patch);
922
+ return n.every((n) => e[n] === t.patch[n]) ? !0 : n.some((n) => n in t.serverValues && e[n] !== t.serverValues[n]);
923
+ }
924
+ function sn() {
925
+ return Be().getQueryCache().findAll({ predicate: (e) => e.queryKey[0] === "invoiceIndex" }).flatMap((e) => rn(e.state.data));
926
+ }
927
+ function cn(e, t) {
928
+ return e === void 0 ? {} : Object.fromEntries(an(t).map((t) => [t, e[t]]));
929
+ }
930
+ function ln() {
931
+ new ze(Be()).update("invoiceIndex", {
932
+ by: (e) => Q.has(e.uuid),
933
+ value: (e) => ({
934
+ ...e,
935
+ ...Q.get(e.uuid)?.patch
936
+ })
937
+ });
938
+ }
939
+ function un(e) {
940
+ let t = Date.now() - $t;
941
+ for (let [e, n] of Q) n.patchedAt <= t && Q.delete(e);
942
+ for (let t of e) {
943
+ let e = Q.get(t.uuid);
944
+ e !== void 0 && on(t, e) && Q.delete(t.uuid);
945
+ }
946
+ }
947
+ function dn() {
948
+ tn?.(), tn = null, en = null;
949
+ }
950
+ function fn(e) {
951
+ if (e.type !== "updated" || e.action.type !== "success" || e.action.manual === !0 || e.query.queryKey[0] !== "invoiceIndex") return;
952
+ let t = e.query.state.data;
953
+ if (un(rn(t)), Q.size === 0) {
954
+ dn();
955
+ return;
956
+ }
957
+ ln();
958
+ }
959
+ function pn() {
960
+ let e = Be().getQueryCache();
961
+ en !== e && (dn(), en = e, tn = e.subscribe(fn));
962
+ }
963
+ var mn = class {
915
964
  static reflectBulkAction(e, t) {
916
- let n = new Re(ze()), r = new Set(e);
917
- function i() {
918
- n.update("invoiceIndex", {
919
- by: (e) => r.has(e.uuid),
920
- value: (e) => ({
921
- ...e,
965
+ if (e.length === 0) return;
966
+ let n = Date.now(), r = new Map(sn().map((e) => [e.uuid, e]));
967
+ for (let i of e) {
968
+ let e = Q.get(i);
969
+ Q.set(i, {
970
+ patchedAt: n,
971
+ patch: {
972
+ ...e?.patch,
922
973
  ...t
923
- })
974
+ },
975
+ serverValues: {
976
+ ...cn(r.get(i), t),
977
+ ...e?.serverValues
978
+ }
924
979
  });
925
980
  }
926
- i();
927
- for (let e of Qt) setTimeout(i, e);
981
+ ln(), pn();
928
982
  }
929
983
  };
930
984
  //#endregion
931
985
  //#region src/modules/invoice/api/mutations/invoiceBulkFinalize.mutation.ts
932
- function en() {
933
- return W({
934
- queryFn: (e) => C.bulkFinalize(e.params.invoiceUuids),
935
- queryKeysToInvalidate: { invoiceIndex: {} }
986
+ function hn() {
987
+ return U({
988
+ queryFn: (e) => _.bulkFinalize(e.params.invoiceUuids),
989
+ queryKeysToInvalidate: { invoiceDetail: {} }
936
990
  });
937
991
  }
938
992
  //#endregion
@@ -967,7 +1021,7 @@ var $ = class {
967
1021
  };
968
1022
  }
969
1023
  static getInvoiceDetailLink(e) {
970
- return e.type === a.CREDIT_NOTE ? {
1024
+ return e.type === i.CREDIT_NOTE ? {
971
1025
  name: "invoicing-credit-note-detail",
972
1026
  params: { creditNoteUuid: e.uuid }
973
1027
  } : {
@@ -982,16 +1036,19 @@ var $ = class {
982
1036
  let n = new Set(t.map((e) => e.uuid));
983
1037
  return e.filter((e) => !n.has(e.uuid)).map((e) => e.uuid);
984
1038
  }
985
- }, tn = {
1039
+ }, gn = {
986
1040
  key: 0,
1041
+ class: "text-sm text-error-primary"
1042
+ }, _n = {
1043
+ key: 1,
987
1044
  class: "text-sm text-secondary"
988
- }, nn = {
1045
+ }, vn = {
989
1046
  key: 0,
990
1047
  class: "text-sm text-primary"
991
- }, rn = {
1048
+ }, yn = {
992
1049
  key: 1,
993
1050
  class: "text-sm text-secondary"
994
- }, an = { class: "text-sm text-secondary" }, on = /* @__PURE__ */ R({
1051
+ }, bn = { class: "text-sm text-secondary" }, xn = /* @__PURE__ */ L({
995
1052
  __name: "InvoiceOverviewBulkActionDialog",
996
1053
  props: {
997
1054
  title: {},
@@ -1002,6 +1059,7 @@ var $ = class {
1002
1059
  icon: {},
1003
1060
  loadingLabel: {},
1004
1061
  noneProcessableLabel: {},
1062
+ previewErrorLabel: {},
1005
1063
  processableCount: {},
1006
1064
  processableLabel: {},
1007
1065
  skippedInvoices: {},
@@ -1010,12 +1068,12 @@ var $ = class {
1010
1068
  emits: ["close", "confirm"],
1011
1069
  setup(e, { emit: t }) {
1012
1070
  let n = e, r = t;
1013
- return (e, t) => (z(), N(H(Xe), {
1071
+ return (e, t) => (R(), M(V(Ze), {
1014
1072
  size: "sm",
1015
1073
  onClose: t[1] ||= (e) => r("close")
1016
1074
  }, {
1017
- default: U(() => [
1018
- L(H(nt), {
1075
+ default: H(() => [
1076
+ I(V(rt), {
1019
1077
  title: n.title,
1020
1078
  description: n.description,
1021
1079
  icon: n.icon,
@@ -1025,32 +1083,32 @@ var $ = class {
1025
1083
  "description",
1026
1084
  "icon"
1027
1085
  ]),
1028
- L(H(Ze), null, {
1029
- default: U(() => [L(H(K), null, {
1030
- default: U(() => [n.isPreviewLoading ? (z(), F("p", tn, V(n.loadingLabel), 1)) : (z(), F(j, { key: 1 }, [n.processableCount > 0 ? (z(), F("p", nn, V(n.processableLabel), 1)) : (z(), F("p", rn, V(n.noneProcessableLabel), 1)), n.skippedInvoices.length > 0 ? (z(), N(H(K), {
1086
+ I(V(Qe), null, {
1087
+ default: H(() => [I(V(G), null, {
1088
+ default: H(() => [n.previewErrorLabel === null ? n.isPreviewLoading ? (R(), P("p", _n, B(n.loadingLabel), 1)) : (R(), P(Oe, { key: 2 }, [n.processableCount > 0 ? (R(), P("p", vn, B(n.processableLabel), 1)) : (R(), P("p", yn, B(n.noneProcessableLabel), 1)), n.skippedInvoices.length > 0 ? (R(), M(V(G), {
1031
1089
  key: 2,
1032
1090
  gap: "sm",
1033
1091
  class: "rounded-lg border border-secondary bg-secondary p-md"
1034
1092
  }, {
1035
- default: U(() => [I("p", an, V(n.skippedPreviewLabel), 1), L(H(K), { gap: "xs" }, {
1036
- default: U(() => [(z(!0), F(j, null, Pe(n.skippedInvoices, (e) => (z(), N(H(Ee), {
1093
+ default: H(() => [F("p", bn, B(n.skippedPreviewLabel), 1), I(V(G), { gap: "xs" }, {
1094
+ default: H(() => [(R(!0), P(Oe, null, Fe(n.skippedInvoices, (e) => (R(), M(V(Ee), {
1037
1095
  key: e.uuid,
1038
- to: H($).getInvoiceDetailLink(e),
1096
+ to: V($).getInvoiceDetailLink(e),
1039
1097
  class: "text-sm text-brand-primary hover:underline"
1040
1098
  }, {
1041
- default: U(() => [Oe(V(H($).getInvoiceLabel(e)), 1)]),
1099
+ default: H(() => [ke(B(V($).getInvoiceLabel(e)), 1)]),
1042
1100
  _: 2
1043
1101
  }, 1032, ["to"]))), 128))]),
1044
1102
  _: 1
1045
1103
  })]),
1046
1104
  _: 1
1047
- })) : P("", !0)], 64))]),
1105
+ })) : N("", !0)], 64)) : (R(), P("p", gn, B(n.previewErrorLabel), 1))]),
1048
1106
  _: 1
1049
1107
  })]),
1050
1108
  _: 1
1051
1109
  }),
1052
- L(H(Qe), null, {
1053
- right: U(() => [L(H($e)), L(H(et), {
1110
+ I(V($e), null, {
1111
+ right: H(() => [I(V(et)), I(V(tt), {
1054
1112
  "is-disabled": n.isPreviewLoading || n.processableCount === 0,
1055
1113
  "is-loading": n.isSubmitting,
1056
1114
  label: n.confirmLabel,
@@ -1066,7 +1124,7 @@ var $ = class {
1066
1124
  _: 1
1067
1125
  }));
1068
1126
  }
1069
- }), sn = /* @__PURE__ */ R({
1127
+ }), Sn = /* @__PURE__ */ L({
1070
1128
  __name: "InvoiceOverviewBulkFinalizeDialog",
1071
1129
  props: {
1072
1130
  invoices: {},
@@ -1074,58 +1132,59 @@ var $ = class {
1074
1132
  },
1075
1133
  emits: ["close"],
1076
1134
  setup(e, { emit: t }) {
1077
- let n = e, r = t, i = A(), a = X(), s = en(), l = B(!0), u = B(!1), d = B(null), f = M(() => n.invoices.filter((e) => e.status === o.READY)), p = M(() => f.value.map((e) => e.uuid)), m = M(() => d.value?.meta.processed ?? 0), h = M(() => $.getUnskippedInvoiceUuids(f.value, d.value?.skipped ?? [])), g = M(() => {
1078
- let e = new Set(h.value);
1135
+ let n = e, r = t, i = A(), s = Y(), c = hn(), l = z(!0), u = z(!1), d = z(null), f = z(null), p = j(() => n.invoices.filter((e) => e.status === a.READY)), m = j(() => p.value.map((e) => e.uuid)), h = j(() => d.value?.meta.processed ?? 0), g = j(() => $.getUnskippedInvoiceUuids(p.value, d.value?.skipped ?? [])), v = j(() => {
1136
+ let e = new Set(g.value);
1079
1137
  return n.invoices.filter((t) => !e.has(t.uuid));
1080
- }), _ = M(() => g.value.length);
1081
- async function v() {
1082
- let e = h.value;
1138
+ }), y = j(() => v.value.length), b = j(() => d.value === null ? n.invoices.length : h.value);
1139
+ async function x() {
1140
+ let e = g.value;
1083
1141
  if (e.length === 0 || u.value) return;
1084
1142
  u.value = !0;
1085
- let t = await s.execute({ params: { invoiceUuids: e } });
1143
+ let t = await c.execute({ params: { invoiceUuids: e } });
1086
1144
  if (u.value = !1, t.isErr()) {
1087
- a.apiError(t.error);
1145
+ s.apiError(t.error);
1088
1146
  return;
1089
1147
  }
1090
1148
  let l = new Set(t.value.skipped.map((e) => e.uuid)), f = e.filter((e) => !l.has(e));
1091
- d.value = t.value, f.length > 0 && $t.reflectBulkAction(f, {
1092
- lifecycleStatus: c.FINALIZED,
1093
- status: o.FINALIZED
1094
- }), t.value.meta.processed > 0 && a.show({ message: i.t("wise_invoicing.invoice.overview.bulk.finalize.success", { count: t.value.meta.processed }) }), _.value > 0 && a.show($.createSkippedToast({
1149
+ d.value = t.value, f.length > 0 && mn.reflectBulkAction(f, {
1150
+ lifecycleStatus: o.FINALIZED,
1151
+ status: a.FINALIZED
1152
+ }), t.value.meta.processed > 0 && s.show({ message: i.t("wise_invoicing.invoice.overview.bulk.finalize.success", { count: t.value.meta.processed }) }), y.value > 0 && s.show($.createSkippedToast({
1095
1153
  id: "invoice-overview-bulk-finalize-skipped",
1096
- invoices: g.value,
1097
- message: i.t("wise_invoicing.invoice.overview.bulk.finalize.skipped", { count: _.value })
1154
+ invoices: v.value,
1155
+ message: i.t("wise_invoicing.invoice.overview.bulk.finalize.skipped", { count: y.value })
1098
1156
  })), t.value.meta.processed !== 0 && (n.onFinalized(), r("close"));
1099
1157
  }
1100
- async function y() {
1101
- if (l.value = !0, p.value.length === 0) {
1158
+ async function S() {
1159
+ if (l.value = !0, m.value.length === 0) {
1102
1160
  d.value = $.createEmptyPreview(), l.value = !1;
1103
1161
  return;
1104
1162
  }
1105
- let e = await C.previewBulkFinalize(p.value);
1163
+ let e = await _.previewBulkFinalize(m.value);
1106
1164
  if (e.isErr()) {
1107
- a.apiError(e.error), r("close");
1165
+ f.value = i.t("wise_invoicing.invoice.overview.bulk.preview_error"), l.value = !1;
1108
1166
  return;
1109
1167
  }
1110
1168
  d.value = e.value, l.value = !1;
1111
1169
  }
1112
- return Ne(() => {
1113
- y();
1114
- }), (e, t) => (z(), N(on, {
1115
- "confirm-label": H(i).t("wise_invoicing.invoice.overview.bulk.finalize.confirm"),
1116
- description: H(i).t("wise_invoicing.invoice.overview.bulk.finalize.description"),
1117
- icon: H(ue),
1170
+ return Pe(() => {
1171
+ S();
1172
+ }), (e, t) => (R(), M(xn, {
1173
+ "confirm-label": V(i).t("wise_invoicing.invoice.overview.bulk.finalize.confirm"),
1174
+ description: V(i).t("wise_invoicing.invoice.overview.bulk.finalize.description"),
1175
+ icon: V(ee),
1118
1176
  "is-preview-loading": l.value,
1119
1177
  "is-submitting": u.value,
1120
- "loading-label": H(i).t("wise_invoicing.invoice.overview.bulk.finalize.loading"),
1121
- "none-processable-label": H(i).t("wise_invoicing.invoice.overview.bulk.finalize.none_processable"),
1122
- "processable-count": m.value,
1123
- "processable-label": H(i).t("wise_invoicing.invoice.overview.bulk.finalize.processable", { count: m.value }),
1124
- "skipped-invoices": g.value,
1125
- "skipped-preview-label": H(i).t("wise_invoicing.invoice.overview.bulk.finalize.skipped_preview", { count: _.value }),
1126
- title: H(i).t("wise_invoicing.invoice.overview.bulk.finalize.title", { count: n.invoices.length }),
1178
+ "loading-label": V(i).t("wise_invoicing.invoice.overview.bulk.finalize.loading"),
1179
+ "none-processable-label": V(i).t("wise_invoicing.invoice.overview.bulk.finalize.none_processable"),
1180
+ "preview-error-label": f.value,
1181
+ "processable-count": h.value,
1182
+ "processable-label": V(i).t("wise_invoicing.invoice.overview.bulk.finalize.processable", { count: h.value }),
1183
+ "skipped-invoices": v.value,
1184
+ "skipped-preview-label": V(i).t("wise_invoicing.invoice.overview.bulk.finalize.skipped_preview", { count: y.value }),
1185
+ title: V(i).t("wise_invoicing.invoice.overview.bulk.finalize.title", { count: b.value }),
1127
1186
  onClose: t[0] ||= (e) => r("close"),
1128
- onConfirm: v
1187
+ onConfirm: x
1129
1188
  }, null, 8, [
1130
1189
  "confirm-label",
1131
1190
  "description",
@@ -1134,6 +1193,7 @@ var $ = class {
1134
1193
  "is-submitting",
1135
1194
  "loading-label",
1136
1195
  "none-processable-label",
1196
+ "preview-error-label",
1137
1197
  "processable-count",
1138
1198
  "processable-label",
1139
1199
  "skipped-invoices",
@@ -1144,15 +1204,15 @@ var $ = class {
1144
1204
  });
1145
1205
  //#endregion
1146
1206
  //#region src/modules/invoice/api/mutations/invoiceBulkMarkAsReady.mutation.ts
1147
- function cn() {
1148
- return W({
1149
- queryFn: (e) => C.bulkMarkAsReady(e.params.invoiceUuids),
1150
- queryKeysToInvalidate: { invoiceIndex: {} }
1207
+ function Cn() {
1208
+ return U({
1209
+ queryFn: (e) => _.bulkMarkAsReady(e.params.invoiceUuids),
1210
+ queryKeysToInvalidate: { invoiceDetail: {} }
1151
1211
  });
1152
1212
  }
1153
1213
  //#endregion
1154
1214
  //#region src/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkMarkAsReadyDialog.vue
1155
- var ln = /* @__PURE__ */ R({
1215
+ var wn = /* @__PURE__ */ L({
1156
1216
  __name: "InvoiceOverviewBulkMarkAsReadyDialog",
1157
1217
  props: {
1158
1218
  invoices: {},
@@ -1160,58 +1220,59 @@ var ln = /* @__PURE__ */ R({
1160
1220
  },
1161
1221
  emits: ["close"],
1162
1222
  setup(e, { emit: t }) {
1163
- let n = e, r = t, i = A(), a = X(), s = cn(), l = B(!0), u = B(!1), d = B(null), f = M(() => n.invoices.filter((e) => e.status === o.DRAFT)), p = M(() => f.value.map((e) => e.uuid)), m = M(() => d.value?.meta.processed ?? 0), h = M(() => $.getUnskippedInvoiceUuids(f.value, d.value?.skipped ?? [])), g = M(() => {
1164
- let e = new Set(h.value);
1223
+ let n = e, r = t, i = A(), s = Y(), c = Cn(), l = z(!0), u = z(!1), d = z(null), f = z(null), p = j(() => n.invoices.filter((e) => e.status === a.DRAFT)), m = j(() => p.value.map((e) => e.uuid)), h = j(() => d.value?.meta.processed ?? 0), g = j(() => $.getUnskippedInvoiceUuids(p.value, d.value?.skipped ?? [])), v = j(() => {
1224
+ let e = new Set(g.value);
1165
1225
  return n.invoices.filter((t) => !e.has(t.uuid));
1166
- }), _ = M(() => g.value.length);
1167
- async function v() {
1168
- let e = h.value;
1226
+ }), y = j(() => v.value.length), b = j(() => d.value === null ? n.invoices.length : h.value);
1227
+ async function S() {
1228
+ let e = g.value;
1169
1229
  if (e.length === 0 || u.value) return;
1170
1230
  u.value = !0;
1171
- let t = await s.execute({ params: { invoiceUuids: e } });
1231
+ let t = await c.execute({ params: { invoiceUuids: e } });
1172
1232
  if (u.value = !1, t.isErr()) {
1173
- a.apiError(t.error);
1233
+ s.apiError(t.error);
1174
1234
  return;
1175
1235
  }
1176
1236
  let l = new Set(t.value.skipped.map((e) => e.uuid)), f = e.filter((e) => !l.has(e));
1177
- d.value = t.value, f.length > 0 && $t.reflectBulkAction(f, {
1178
- lifecycleStatus: c.READY,
1179
- status: o.READY
1180
- }), t.value.meta.processed > 0 && a.show({ message: i.t("wise_invoicing.invoice.overview.bulk.mark_as_ready.success", { count: t.value.meta.processed }) }), _.value > 0 && a.show($.createSkippedToast({
1237
+ d.value = t.value, f.length > 0 && mn.reflectBulkAction(f, {
1238
+ lifecycleStatus: o.READY,
1239
+ status: a.READY
1240
+ }), t.value.meta.processed > 0 && s.show({ message: i.t("wise_invoicing.invoice.overview.bulk.mark_as_ready.success", { count: t.value.meta.processed }) }), y.value > 0 && s.show($.createSkippedToast({
1181
1241
  id: "invoice-overview-bulk-mark-as-ready-skipped",
1182
- invoices: g.value,
1183
- message: i.t("wise_invoicing.invoice.overview.bulk.mark_as_ready.skipped", { count: _.value })
1242
+ invoices: v.value,
1243
+ message: i.t("wise_invoicing.invoice.overview.bulk.mark_as_ready.skipped", { count: y.value })
1184
1244
  })), t.value.meta.processed !== 0 && (n.onMarkedAsReady(), r("close"));
1185
1245
  }
1186
- async function y() {
1187
- if (l.value = !0, p.value.length === 0) {
1246
+ async function C() {
1247
+ if (l.value = !0, m.value.length === 0) {
1188
1248
  d.value = $.createEmptyPreview(), l.value = !1;
1189
1249
  return;
1190
1250
  }
1191
- let e = await C.previewBulkMarkAsReady(p.value);
1251
+ let e = await _.previewBulkMarkAsReady(m.value);
1192
1252
  if (e.isErr()) {
1193
- a.apiError(e.error), r("close");
1253
+ f.value = i.t("wise_invoicing.invoice.overview.bulk.preview_error"), l.value = !1;
1194
1254
  return;
1195
1255
  }
1196
1256
  d.value = e.value, l.value = !1;
1197
1257
  }
1198
- return Ne(() => {
1199
- y();
1200
- }), (e, t) => (z(), N(on, {
1201
- "confirm-label": H(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.confirm"),
1202
- description: H(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.description"),
1203
- icon: H(ce),
1258
+ return Pe(() => {
1259
+ C();
1260
+ }), (e, t) => (R(), M(xn, {
1261
+ "confirm-label": V(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.confirm"),
1262
+ description: V(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.description"),
1263
+ icon: V(x),
1204
1264
  "is-preview-loading": l.value,
1205
1265
  "is-submitting": u.value,
1206
- "loading-label": H(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.loading"),
1207
- "none-processable-label": H(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.none_processable"),
1208
- "processable-count": m.value,
1209
- "processable-label": H(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.processable", { count: m.value }),
1210
- "skipped-invoices": g.value,
1211
- "skipped-preview-label": H(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.skipped_preview", { count: _.value }),
1212
- title: H(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.title", { count: n.invoices.length }),
1266
+ "loading-label": V(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.loading"),
1267
+ "none-processable-label": V(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.none_processable"),
1268
+ "preview-error-label": f.value,
1269
+ "processable-count": h.value,
1270
+ "processable-label": V(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.processable", { count: h.value }),
1271
+ "skipped-invoices": v.value,
1272
+ "skipped-preview-label": V(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.skipped_preview", { count: y.value }),
1273
+ title: V(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.title", { count: b.value }),
1213
1274
  onClose: t[0] ||= (e) => r("close"),
1214
- onConfirm: v
1275
+ onConfirm: S
1215
1276
  }, null, 8, [
1216
1277
  "confirm-label",
1217
1278
  "description",
@@ -1220,6 +1281,7 @@ var ln = /* @__PURE__ */ R({
1220
1281
  "is-submitting",
1221
1282
  "loading-label",
1222
1283
  "none-processable-label",
1284
+ "preview-error-label",
1223
1285
  "processable-count",
1224
1286
  "processable-label",
1225
1287
  "skipped-invoices",
@@ -1230,15 +1292,15 @@ var ln = /* @__PURE__ */ R({
1230
1292
  });
1231
1293
  //#endregion
1232
1294
  //#region src/modules/invoice/api/mutations/invoiceBulkSend.mutation.ts
1233
- function un() {
1234
- return W({
1235
- queryFn: (e) => C.bulkSend(e.params.invoiceUuids),
1236
- queryKeysToInvalidate: { invoiceIndex: {} }
1295
+ function Tn() {
1296
+ return U({
1297
+ queryFn: (e) => _.bulkSend(e.params.invoiceUuids),
1298
+ queryKeysToInvalidate: { invoiceDetail: {} }
1237
1299
  });
1238
1300
  }
1239
1301
  //#endregion
1240
1302
  //#region src/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendDialog.vue
1241
- var dn = /* @__PURE__ */ R({
1303
+ var En = /* @__PURE__ */ L({
1242
1304
  __name: "InvoiceOverviewBulkSendDialog",
1243
1305
  props: {
1244
1306
  invoices: {},
@@ -1246,55 +1308,56 @@ var dn = /* @__PURE__ */ R({
1246
1308
  },
1247
1309
  emits: ["close"],
1248
1310
  setup(e, { emit: t }) {
1249
- let n = e, r = t, a = A(), s = X(), c = un(), l = B(!0), u = B(!1), d = B(null), f = M(() => n.invoices.filter((e) => e.status === o.FINALIZED)), p = M(() => f.value.map((e) => e.uuid)), m = M(() => d.value?.meta.processed ?? 0), h = M(() => $.getUnskippedInvoiceUuids(f.value, d.value?.skipped ?? [])), g = M(() => {
1250
- let e = new Set(h.value);
1311
+ let n = e, r = t, i = A(), o = Y(), s = Tn(), l = z(!0), u = z(!1), d = z(null), f = z(null), p = j(() => n.invoices.filter((e) => e.status === a.FINALIZED)), m = j(() => p.value.map((e) => e.uuid)), h = j(() => d.value?.meta.processed ?? 0), g = j(() => $.getUnskippedInvoiceUuids(p.value, d.value?.skipped ?? [])), v = j(() => {
1312
+ let e = new Set(g.value);
1251
1313
  return n.invoices.filter((t) => !e.has(t.uuid));
1252
- }), _ = M(() => g.value.length);
1253
- async function v() {
1254
- let e = h.value;
1314
+ }), y = j(() => v.value.length), b = j(() => d.value === null ? n.invoices.length : h.value);
1315
+ async function x() {
1316
+ let e = g.value;
1255
1317
  if (e.length === 0 || u.value) return;
1256
1318
  u.value = !0;
1257
- let t = await c.execute({ params: { invoiceUuids: e } });
1319
+ let t = await s.execute({ params: { invoiceUuids: e } });
1258
1320
  if (u.value = !1, t.isErr()) {
1259
- s.apiError(t.error);
1321
+ o.apiError(t.error);
1260
1322
  return;
1261
1323
  }
1262
- let o = new Set(t.value.skipped.map((e) => e.uuid)), l = e.filter((e) => !o.has(e));
1263
- d.value = t.value, l.length > 0 && $t.reflectBulkAction(l, { deliveryStatus: i.PROCESSING }), t.value.meta.processed > 0 && s.show({ message: a.t("wise_invoicing.invoice.overview.bulk.send.success", { count: t.value.meta.processed }) }), _.value > 0 && s.show($.createSkippedToast({
1324
+ let a = new Set(t.value.skipped.map((e) => e.uuid)), l = e.filter((e) => !a.has(e));
1325
+ d.value = t.value, l.length > 0 && mn.reflectBulkAction(l, { deliveryStatus: c.PROCESSING }), t.value.meta.processed > 0 && o.show({ message: i.t("wise_invoicing.invoice.overview.bulk.send.success", { count: t.value.meta.processed }) }), y.value > 0 && o.show($.createSkippedToast({
1264
1326
  id: "invoice-overview-bulk-send-skipped",
1265
- invoices: g.value,
1266
- message: a.t("wise_invoicing.invoice.overview.bulk.send.skipped", { count: _.value })
1327
+ invoices: v.value,
1328
+ message: i.t("wise_invoicing.invoice.overview.bulk.send.skipped", { count: y.value })
1267
1329
  })), t.value.meta.processed !== 0 && (n.onSent(), r("close"));
1268
1330
  }
1269
- async function y() {
1270
- if (l.value = !0, p.value.length === 0) {
1331
+ async function S() {
1332
+ if (l.value = !0, m.value.length === 0) {
1271
1333
  d.value = $.createEmptyPreview(), l.value = !1;
1272
1334
  return;
1273
1335
  }
1274
- let e = await C.previewBulkSend(p.value);
1336
+ let e = await _.previewBulkSend(m.value);
1275
1337
  if (e.isErr()) {
1276
- s.apiError(e.error), r("close");
1338
+ f.value = i.t("wise_invoicing.invoice.overview.bulk.preview_error"), l.value = !1;
1277
1339
  return;
1278
1340
  }
1279
1341
  d.value = e.value, l.value = !1;
1280
1342
  }
1281
- return Ne(() => {
1282
- y();
1283
- }), (e, t) => (z(), N(on, {
1284
- "confirm-label": H(a).t("wise_invoicing.invoice.overview.bulk.send.confirm"),
1285
- description: H(a).t("wise_invoicing.invoice.overview.bulk.send.description"),
1286
- icon: H(E),
1343
+ return Pe(() => {
1344
+ S();
1345
+ }), (e, t) => (R(), M(xn, {
1346
+ "confirm-label": V(i).t("wise_invoicing.invoice.overview.bulk.send.confirm"),
1347
+ description: V(i).t("wise_invoicing.invoice.overview.bulk.send.description"),
1348
+ icon: V(C),
1287
1349
  "is-preview-loading": l.value,
1288
1350
  "is-submitting": u.value,
1289
- "loading-label": H(a).t("wise_invoicing.invoice.overview.bulk.send.loading"),
1290
- "none-processable-label": H(a).t("wise_invoicing.invoice.overview.bulk.send.none_processable"),
1291
- "processable-count": m.value,
1292
- "processable-label": H(a).t("wise_invoicing.invoice.overview.bulk.send.processable", { count: m.value }),
1293
- "skipped-invoices": g.value,
1294
- "skipped-preview-label": H(a).t("wise_invoicing.invoice.overview.bulk.send.skipped_preview", { count: _.value }),
1295
- title: H(a).t("wise_invoicing.invoice.overview.bulk.send.title", { count: n.invoices.length }),
1351
+ "loading-label": V(i).t("wise_invoicing.invoice.overview.bulk.send.loading"),
1352
+ "none-processable-label": V(i).t("wise_invoicing.invoice.overview.bulk.send.none_processable"),
1353
+ "preview-error-label": f.value,
1354
+ "processable-count": h.value,
1355
+ "processable-label": V(i).t("wise_invoicing.invoice.overview.bulk.send.processable", { count: h.value }),
1356
+ "skipped-invoices": v.value,
1357
+ "skipped-preview-label": V(i).t("wise_invoicing.invoice.overview.bulk.send.skipped_preview", { count: y.value }),
1358
+ title: V(i).t("wise_invoicing.invoice.overview.bulk.send.title", { count: b.value }),
1296
1359
  onClose: t[0] ||= (e) => r("close"),
1297
- onConfirm: v
1360
+ onConfirm: x
1298
1361
  }, null, 8, [
1299
1362
  "confirm-label",
1300
1363
  "description",
@@ -1303,6 +1366,7 @@ var dn = /* @__PURE__ */ R({
1303
1366
  "is-submitting",
1304
1367
  "loading-label",
1305
1368
  "none-processable-label",
1369
+ "preview-error-label",
1306
1370
  "processable-count",
1307
1371
  "processable-label",
1308
1372
  "skipped-invoices",
@@ -1310,25 +1374,25 @@ var dn = /* @__PURE__ */ R({
1310
1374
  "title"
1311
1375
  ]));
1312
1376
  }
1313
- }), fn = /* @__PURE__ */ R({
1377
+ }), Dn = /* @__PURE__ */ L({
1314
1378
  __name: "DateRangeFilterButton",
1315
- props: /*@__PURE__*/ Ae({ ariaLabel: {} }, {
1379
+ props: /*@__PURE__*/ je({ ariaLabel: {} }, {
1316
1380
  modelValue: { default: null },
1317
1381
  modelModifiers: {}
1318
1382
  }),
1319
1383
  emits: ["update:modelValue"],
1320
1384
  setup(e) {
1321
- let t = e, n = Ie(e, "modelValue"), r = A(), i = B(!1), a = B({
1385
+ let t = e, n = Le(e, "modelValue"), r = A(), i = z(!1), a = z({
1322
1386
  from: null,
1323
1387
  until: null
1324
1388
  });
1325
- Le(i, (e) => {
1389
+ Re(i, (e) => {
1326
1390
  e && (a.value = {
1327
1391
  from: n.value?.from ?? null,
1328
1392
  until: n.value?.until ?? null
1329
1393
  });
1330
1394
  });
1331
- let o = D(), s = M(() => 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)}`);
1395
+ let o = w(), 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)}`);
1332
1396
  function c() {
1333
1397
  n.value = a.value.from !== null || a.value.until !== null ? { ...a.value } : null, i.value = !1;
1334
1398
  }
@@ -1338,44 +1402,44 @@ var dn = /* @__PURE__ */ R({
1338
1402
  function u() {
1339
1403
  n.value = null, i.value = !1;
1340
1404
  }
1341
- return (e, n) => (z(), N(H(it), {
1405
+ return (e, n) => (R(), M(V(at), {
1342
1406
  "is-open": i.value,
1343
1407
  "onUpdate:isOpen": n[1] ||= (e) => i.value = e,
1344
1408
  "popover-side": "bottom",
1345
1409
  "popover-align": "end"
1346
1410
  }, {
1347
- trigger: U(() => [L(H(G), {
1411
+ trigger: H(() => [I(V(W), {
1348
1412
  "aria-label": t.ariaLabel,
1349
1413
  label: s.value,
1350
- "icon-right": H(T),
1414
+ "icon-right": V(b),
1351
1415
  variant: "secondary"
1352
1416
  }, null, 8, [
1353
1417
  "aria-label",
1354
1418
  "label",
1355
1419
  "icon-right"
1356
1420
  ])]),
1357
- content: U(() => [L(H(Ye), {
1421
+ content: H(() => [I(V(Xe), {
1358
1422
  modelValue: a.value,
1359
1423
  "onUpdate:modelValue": n[0] ||= (e) => a.value = e,
1360
1424
  class: "p-lg"
1361
- }, null, 8, ["modelValue"]), L(H(q), {
1425
+ }, null, 8, ["modelValue"]), I(V(K), {
1362
1426
  justify: "end",
1363
1427
  gap: "sm",
1364
1428
  class: "border-t border-secondary p-md"
1365
1429
  }, {
1366
- default: U(() => [
1367
- L(H(G), {
1368
- label: H(r).t("shared.cancel"),
1430
+ default: H(() => [
1431
+ I(V(W), {
1432
+ label: V(r).t("shared.cancel"),
1369
1433
  variant: "tertiary",
1370
1434
  onClick: l
1371
1435
  }, null, 8, ["label"]),
1372
- L(H(G), {
1373
- label: H(r).t("shared.clear"),
1436
+ I(V(W), {
1437
+ label: V(r).t("shared.clear"),
1374
1438
  variant: "tertiary",
1375
1439
  onClick: u
1376
1440
  }, null, 8, ["label"]),
1377
- L(H(G), {
1378
- label: H(r).t("component.filters_date_range_dialog.apply"),
1441
+ I(V(W), {
1442
+ label: V(r).t("component.filters_date_range_dialog.apply"),
1379
1443
  variant: "primary",
1380
1444
  onClick: c
1381
1445
  }, null, 8, ["label"])
@@ -1385,7 +1449,7 @@ var dn = /* @__PURE__ */ R({
1385
1449
  _: 1
1386
1450
  }, 8, ["is-open"]));
1387
1451
  }
1388
- }), pn = { class: "relative flex min-h-0 flex-1 flex-col" }, mn = /* @__PURE__ */ R({
1452
+ }), On = { class: "relative flex min-h-0 flex-1 flex-col" }, kn = /* @__PURE__ */ L({
1389
1453
  __name: "InvoiceOverviewView",
1390
1454
  props: {
1391
1455
  currency: {},
@@ -1393,82 +1457,82 @@ var dn = /* @__PURE__ */ R({
1393
1457
  onCreateInvoice: { type: Function }
1394
1458
  },
1395
1459
  setup(e) {
1396
- let n = e, r = A(), i = u(), s = ht(), c = s.create(Et), l = s.create(sn), d = s.create(ln), f = s.create(dn), p = ne({ debounceMs: 300 }), m = vt("tab", "all"), h = ae({
1460
+ let t = e, n = A(), r = u(), o = gt(), s = o.create(Dt), c = o.create(Sn), l = o.create(wn), f = o.create(En), p = h({ debounceMs: 300 }), m = yt("tab", "all"), _ = g({
1397
1461
  initialValues: [{
1398
1462
  direction: "desc",
1399
- key: t.ISSUED_ON
1463
+ key: d.ISSUED_ON
1400
1464
  }],
1401
1465
  keys: [
1402
- t.CUSTOMER,
1403
- t.SEQUENCE,
1404
- t.ISSUED_ON,
1405
- t.NET_AMOUNT
1466
+ d.CUSTOMER,
1467
+ d.SEQUENCE,
1468
+ d.ISSUED_ON,
1469
+ d.NET_AMOUNT
1406
1470
  ]
1407
- }), g = Pt(), { customerUuids: _, customFields: v, dueOnRange: y, filters: b, lifecycleStatuses: x } = Mt({
1408
- currency: n.currency,
1409
- customFieldDefinitions: n.customFieldDefinitions
1471
+ }), v = Ft(), { customerUuids: y, customFields: b, dueOnRange: x, filters: C, lifecycleStatuses: ee } = Nt({
1472
+ currency: t.currency,
1473
+ customFieldDefinitions: t.customFieldDefinitions
1410
1474
  });
1411
- ee(b);
1412
- let S = B(null), ie = M(() => g.getFilters(m.value)), { isFetchingNextPage: C, isLoading: oe, fetchNextPage: se, result: w } = yt({ params: {
1413
- filters: M(() => ({
1414
- issuedOnRange: S.value,
1415
- customerUuids: _.value,
1416
- customFields: v.value,
1417
- dueOnRange: y.value,
1418
- lifecycleStatuses: x.value,
1419
- ...ie.value
1475
+ oe(C);
1476
+ let w = z(null), te = j(() => v.getFilters(m.value)), { isFetchingNextPage: ne, isLoading: re, fetchNextPage: ie, result: T } = bt({ params: {
1477
+ filters: j(() => ({
1478
+ issuedOnRange: w.value,
1479
+ customerUuids: y.value,
1480
+ customFields: b.value,
1481
+ dueOnRange: x.value,
1482
+ lifecycleStatuses: ee.value,
1483
+ ...te.value
1420
1484
  })),
1421
1485
  search: p.debouncedSearch,
1422
- sort: h.values
1486
+ sort: _.values
1423
1487
  } });
1424
- i.set(() => r.t("wise_invoicing.invoice.overview.title"));
1425
- let ce = { name: () => r.t("wise_invoicing.invoice.overview.title") }, T = M(() => w.value.isOk() ? w.value.getValue().data : []), E = Ft({ rows: () => T.value }), ue = Zt({
1426
- customFieldDefinitions: () => n.customFieldDefinitions,
1488
+ r.set(() => n.t("wise_invoicing.invoice.overview.title"));
1489
+ let ae = { name: () => n.t("wise_invoicing.invoice.overview.title") }, E = j(() => T.value.isOk() ? T.value.getValue().data : []), D = It({ rows: () => E.value }), le = Qt({
1490
+ customFieldDefinitions: () => t.customFieldDefinitions,
1427
1491
  selection: {
1428
- isSelected: E.isSelected,
1429
- toggleRow: E.toggleRow
1492
+ isSelected: D.isSelected,
1493
+ toggleRow: D.toggleRow
1430
1494
  }
1431
- }), { customizedColumns: D, customizeTableAction: de } = gt({
1432
- actionGroup: ce,
1433
- availableColumns: ue,
1434
- initialState: Ve("invoice-overview-columns", []).value
1435
- }), O = M(() => w.value.isErr() ? w.value.getError() : null), fe = M(() => b.activeFilters.value.length), pe = M(() => (p.debouncedSearch.value?.trim().length ?? 0) > 0), me = M(() => E.selectedInvoices.value.some((e) => e.status === o.READY)), he = M(() => E.selectedInvoices.value.some((e) => e.status === o.DRAFT)), { canSend: ge } = At({ selectedInvoices: () => E.selectedInvoices.value });
1436
- Le(T, () => {
1437
- E.syncSelection();
1495
+ }), { customizedColumns: ue, customizeTableAction: de } = _t({
1496
+ actionGroup: ae,
1497
+ availableColumns: le,
1498
+ initialState: He("invoice-overview-columns", []).value
1499
+ }), O = j(() => T.value.isErr() ? T.value.getError() : null), fe = j(() => C.activeFilters.value.length), pe = j(() => (p.debouncedSearch.value?.trim().length ?? 0) > 0), me = j(() => D.selectedInvoices.value.some((e) => e.status === a.READY)), he = j(() => D.selectedInvoices.value.some((e) => e.status === a.DRAFT)), { canSend: ge } = jt({ selectedInvoices: () => D.selectedInvoices.value });
1500
+ Re(E, () => {
1501
+ D.syncSelection();
1438
1502
  });
1439
1503
  function _e() {
1440
- if (n.onCreateInvoice !== void 0) {
1441
- n.onCreateInvoice();
1504
+ if (t.onCreateInvoice !== void 0) {
1505
+ t.onCreateInvoice();
1442
1506
  return;
1443
1507
  }
1444
- c.open();
1508
+ s.open();
1445
1509
  }
1446
1510
  async function ve() {
1447
- await d.open({
1448
- invoices: E.selectedInvoices.value,
1511
+ await l.open({
1512
+ invoices: D.selectedInvoices.value,
1449
1513
  onMarkedAsReady: () => {
1450
- E.clearSelection();
1514
+ D.clearSelection();
1451
1515
  }
1452
1516
  });
1453
1517
  }
1454
1518
  async function ye() {
1455
- await l.open({
1456
- invoices: E.selectedInvoices.value,
1519
+ await c.open({
1520
+ invoices: D.selectedInvoices.value,
1457
1521
  onFinalized: () => {
1458
- E.clearSelection();
1522
+ D.clearSelection();
1459
1523
  }
1460
1524
  });
1461
1525
  }
1462
1526
  async function be() {
1463
1527
  await f.open({
1464
- invoices: E.selectedInvoices.value,
1528
+ invoices: D.selectedInvoices.value,
1465
1529
  onSent: () => {
1466
- E.clearSelection();
1530
+ D.clearSelection();
1467
1531
  }
1468
1532
  });
1469
1533
  }
1470
1534
  function xe(e) {
1471
- return e.type === a.CREDIT_NOTE ? {
1535
+ return e.type === i.CREDIT_NOTE ? {
1472
1536
  name: "invoicing-credit-note-detail",
1473
1537
  params: { creditNoteUuid: e.uuid }
1474
1538
  } : {
@@ -1476,14 +1540,14 @@ var dn = /* @__PURE__ */ R({
1476
1540
  params: { invoiceUuid: e.uuid }
1477
1541
  };
1478
1542
  }
1479
- return (e, t) => (z(), N(H(qe), { title: H(r).t("wise_invoicing.invoice.overview.title") }, {
1480
- "page-actions-left": U(() => [L(H(ct), {
1481
- modelValue: H(m),
1482
- "onUpdate:modelValue": t[0] ||= (e) => ke(m) ? m.value = e : null,
1543
+ return (e, t) => (R(), M(V(Je), { title: V(n).t("wise_invoicing.invoice.overview.title") }, {
1544
+ "page-actions-left": H(() => [I(V(lt), {
1545
+ modelValue: V(m),
1546
+ "onUpdate:modelValue": t[0] ||= (e) => Ae(m) ? m.value = e : null,
1483
1547
  variant: "button-border"
1484
1548
  }, {
1485
- default: U(() => [L(H(ut), null, {
1486
- default: U(() => [(z(!0), F(j, null, Pe(H(g).tabs.value, (e) => (z(), N(H(lt), {
1549
+ default: H(() => [I(V(dt), null, {
1550
+ default: H(() => [(R(!0), P(Oe, null, Fe(V(v).tabs.value, (e) => (R(), M(V(ut), {
1487
1551
  key: e.key,
1488
1552
  value: e.key,
1489
1553
  label: e.label
@@ -1492,22 +1556,22 @@ var dn = /* @__PURE__ */ R({
1492
1556
  })]),
1493
1557
  _: 1
1494
1558
  }, 8, ["modelValue"])]),
1495
- "page-actions-right": U(() => [L(H(q), {
1559
+ "page-actions-right": H(() => [I(V(K), {
1496
1560
  justify: "between",
1497
1561
  class: "items-stretch"
1498
1562
  }, {
1499
- default: U(() => [L(fn, {
1500
- modelValue: S.value,
1501
- "onUpdate:modelValue": t[1] ||= (e) => S.value = e,
1502
- "aria-label": H(r).t("wise_invoicing.invoice.overview.filters.issued_on")
1503
- }, null, 8, ["modelValue", "aria-label"]), L(H(q), { justify: "end" }, {
1504
- default: U(() => [
1505
- L(H(ft), {
1506
- modelValue: H(p).search.value,
1507
- "onUpdate:modelValue": t[2] ||= (e) => H(p).search.value = e,
1563
+ default: H(() => [I(Dn, {
1564
+ modelValue: w.value,
1565
+ "onUpdate:modelValue": t[1] ||= (e) => w.value = e,
1566
+ "aria-label": V(n).t("wise_invoicing.invoice.overview.filters.issued_on")
1567
+ }, null, 8, ["modelValue", "aria-label"]), I(V(K), { justify: "end" }, {
1568
+ default: H(() => [
1569
+ I(V(pt), {
1570
+ modelValue: V(p).search.value,
1571
+ "onUpdate:modelValue": t[2] ||= (e) => V(p).search.value = e,
1508
1572
  label: null,
1509
- "icon-left": H(le),
1510
- placeholder: H(r).t("wise_invoicing.common.search"),
1573
+ "icon-left": V(S),
1574
+ placeholder: V(n).t("wise_invoicing.common.search"),
1511
1575
  size: "sm",
1512
1576
  type: "search"
1513
1577
  }, null, 8, [
@@ -1515,9 +1579,9 @@ var dn = /* @__PURE__ */ R({
1515
1579
  "icon-left",
1516
1580
  "placeholder"
1517
1581
  ]),
1518
- Fe(e.$slots, "actions"),
1519
- L(H(G), {
1520
- label: H(r).t("wise_invoicing.invoice.create.title"),
1582
+ Ie(e.$slots, "actions"),
1583
+ I(V(W), {
1584
+ label: V(n).t("wise_invoicing.invoice.create.title"),
1521
1585
  onClick: _e
1522
1586
  }, null, 8, ["label"])
1523
1587
  ]),
@@ -1525,31 +1589,31 @@ var dn = /* @__PURE__ */ R({
1525
1589
  })]),
1526
1590
  _: 3
1527
1591
  })]),
1528
- default: U(() => [L(H(Je), null, {
1529
- default: U(() => [L(H(q), { justify: "between" }, {
1530
- default: U(() => [L(H(te)), L(H(re))]),
1592
+ default: H(() => [I(V(Ye), null, {
1593
+ default: H(() => [I(V(K), { justify: "between" }, {
1594
+ default: H(() => [I(V(se)), I(V(ce))]),
1531
1595
  _: 1
1532
1596
  })]),
1533
1597
  _: 1
1534
- }), I("div", pn, [L(H(at), {
1535
- columns: H(D),
1536
- data: T.value,
1537
- "is-loading": H(oe),
1538
- "is-fetching-next-page": H(C),
1598
+ }), F("div", On, [I(V(ot), {
1599
+ columns: V(ue),
1600
+ data: E.value,
1601
+ "is-loading": V(re),
1602
+ "is-fetching-next-page": V(ne),
1539
1603
  error: O.value,
1540
1604
  "has-active-search": pe.value,
1541
1605
  "active-filter-count": fe.value,
1542
1606
  "get-key": (e) => e.uuid,
1543
- "header-actions": [H(de)],
1607
+ "header-actions": [V(de)],
1544
1608
  "get-link": xe,
1545
1609
  "get-action-model": (e) => ({
1546
1610
  modelName: "Invoice",
1547
1611
  key: e.uuid,
1548
1612
  ...e
1549
1613
  }),
1550
- onNextPage: H(se),
1551
- onClearSearch: t[3] ||= (e) => H(p).clear(),
1552
- onClearFilters: t[4] ||= (e) => H(b).clearAll()
1614
+ onNextPage: V(ie),
1615
+ onClearSearch: t[3] ||= (e) => V(p).clear(),
1616
+ onClearFilters: t[4] ||= (e) => V(C).clearAll()
1553
1617
  }, null, 8, [
1554
1618
  "columns",
1555
1619
  "data",
@@ -1562,16 +1626,16 @@ var dn = /* @__PURE__ */ R({
1562
1626
  "header-actions",
1563
1627
  "get-action-model",
1564
1628
  "onNextPage"
1565
- ]), L(kt, {
1629
+ ]), I(At, {
1566
1630
  "can-finalize": me.value,
1567
- "can-select-all": H(E).canSelectAll.value,
1631
+ "can-select-all": V(D).canSelectAll.value,
1568
1632
  "can-mark-as-ready": he.value,
1569
- "can-send": H(ge),
1570
- "selected-count": H(E).selectedCount.value,
1571
- onCancel: t[5] ||= (e) => H(E).clearSelection(),
1633
+ "can-send": V(ge),
1634
+ "selected-count": V(D).selectedCount.value,
1635
+ onCancel: t[5] ||= (e) => V(D).clearSelection(),
1572
1636
  onFinalize: t[6] ||= (e) => ye(),
1573
1637
  onMarkAsReady: t[7] ||= (e) => ve(),
1574
- onSelectAll: t[8] ||= (e) => H(E).selectAll(),
1638
+ onSelectAll: t[8] ||= (e) => V(D).selectAll(),
1575
1639
  onSend: t[9] ||= (e) => be()
1576
1640
  }, null, 8, [
1577
1641
  "can-finalize",
@@ -1583,31 +1647,31 @@ var dn = /* @__PURE__ */ R({
1583
1647
  _: 3
1584
1648
  }, 8, ["title"]));
1585
1649
  }
1586
- }), hn = /*@__PURE__*/ R({
1650
+ }), An = /*@__PURE__*/ L({
1587
1651
  __name: "InvoiceOverviewViewDataProvider",
1588
1652
  props: { onCreateInvoice: { type: Function } },
1589
1653
  setup(e) {
1590
- let t = fe(M(() => ({ entityTypes: [s.INVOICE] }))), n = we();
1591
- return (r, i) => (z(), N(he, { queries: {
1592
- customFieldDefinitions: H(t),
1593
- issuerSettings: H(n)
1654
+ let t = fe(j(() => ({ entityTypes: [s.INVOICE] }))), n = we();
1655
+ return (r, i) => (R(), M(he, { queries: {
1656
+ customFieldDefinitions: V(t),
1657
+ issuerSettings: V(n)
1594
1658
  } }, {
1595
- default: U(({ data: t }) => [L(mn, {
1659
+ default: H(({ data: t }) => [I(kn, {
1596
1660
  currency: t.issuerSettings.currency,
1597
1661
  "custom-field-definitions": t.customFieldDefinitions,
1598
1662
  "on-create-invoice": e.onCreateInvoice
1599
1663
  }, {
1600
- actions: U(() => [Fe(r.$slots, "actions")]),
1664
+ actions: H(() => [Ie(r.$slots, "actions")]),
1601
1665
  _: 3
1602
1666
  }, 8, [
1603
1667
  "currency",
1604
1668
  "custom-field-definitions",
1605
1669
  "on-create-invoice"
1606
1670
  ])]),
1607
- loading: U(() => [L(H(Te).PageLoadingState, { breadcrumbs: [] })]),
1671
+ loading: H(() => [I(V(Te).PageLoadingState, { breadcrumbs: [] })]),
1608
1672
  _: 3
1609
1673
  }, 8, ["queries"]));
1610
1674
  }
1611
- }), gn = /* @__PURE__ */ e({ default: () => _n }), _n = hn;
1675
+ }), jn = /* @__PURE__ */ e({ default: () => Mn }), Mn = An;
1612
1676
  //#endregion
1613
- export { gn as n, yt as r, _n as t };
1677
+ export { jn as n, bt as r, Mn as t };