@wisemen/wise-invoicing-web 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/{ApprovalReminderSettingsViewDataProvider-IuReavOR.js → ApprovalReminderSettingsViewDataProvider-r9DcFi76.js} +4 -4
  2. package/dist/{BillingDocumentDetailViewDataProvider-B3I6UIKY.js → BillingDocumentDetailViewDataProvider-CsqBeAiA.js} +1496 -1418
  3. package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
  4. package/dist/{BillingDocumentPdf-rFqmLUPy.js → BillingDocumentPdf-thrvzGfh.js} +266 -205
  5. package/dist/{CreditNoteDetailViewDataProvider-CQRnG2Fz.js → CreditNoteDetailViewDataProvider-D6IMBwLn.js} +242 -242
  6. package/dist/{CreditNotePdfViewDataProvider-RytwPWH5.js → CreditNotePdfViewDataProvider-C4z1NE3Q.js} +2 -2
  7. package/dist/{CustomFieldValueText-DA0aPKwC.js → CustomFieldValueText-BRpCwCqJ.js} +37 -22
  8. package/dist/{DunningCaseDetailViewDataProvider-BRYbYgTw.js → DunningCaseDetailViewDataProvider-DTotyRX8.js} +5 -5
  9. package/dist/{DunningCaseOverviewView-D0vScVF1.js → DunningCaseOverviewView-kDq7UY5e.js} +5 -5
  10. package/dist/{DunningCaseReminderPdfViewDataProvider-I_ZQiAuK.js → DunningCaseReminderPdfViewDataProvider-DgKA-7lX.js} +1 -1
  11. package/dist/{DunningCaseSendDialog-CV66_tMv.js → DunningCaseSendDialog-DVfBVtgr.js} +12 -12
  12. package/dist/{InvoiceApprovalOutOfSyncIndicator-AJOQe8j8.js → InvoiceApprovalOutOfSyncIndicator-DPlrqqOs.js} +1 -1
  13. package/dist/{InvoiceApprovalOverviewView-CcMqr2jH.js → InvoiceApprovalOverviewView-B6naRElx.js} +8 -8
  14. package/dist/{InvoiceApprovalStatusBadge-BJ3Q18bf.js → InvoiceApprovalStatusBadge-CDc_Pwsm.js} +3 -3
  15. package/dist/{InvoiceApproveDialogDataProvider-DaCEHgs0.js → InvoiceApproveDialogDataProvider-CK6ij8X1.js} +7 -7
  16. package/dist/{InvoiceDetailViewDataProvider-B5uZY8Qy.js → InvoiceDetailViewDataProvider-BKurQPAV.js} +369 -369
  17. package/dist/{InvoiceOverviewViewDataProvider-BrgmweRE.js → InvoiceOverviewViewDataProvider-ChoyCi5L.js} +368 -368
  18. package/dist/{InvoicePdfView-CPEX7E9W.js → InvoicePdfView-DLEKQ29O.js} +2 -2
  19. package/dist/{InvoicePdfViewDataProvider-T4-8A2OD.js → InvoicePdfViewDataProvider-C-b7iXiH.js} +3 -3
  20. package/dist/{InvoicePublicPdfViewDataProvider-BkHZoPSZ.js → InvoicePublicPdfViewDataProvider-DZ4WQsvi.js} +3 -3
  21. package/dist/{InvoicePublicProFormaPdfViewDataProvider-CfkArXbC.js → InvoicePublicProFormaPdfViewDataProvider-CsF8fPlp.js} +3 -3
  22. package/dist/{InvoicingFileUploadProvider-BLBjPKqx.js → InvoicingFileUploadProvider-t64Qiyn6.js} +2 -2
  23. package/dist/{IssuerSettingsViewDataProvider-BStn0jFI.js → IssuerSettingsViewDataProvider-Cc8R6ekd.js} +51 -46
  24. package/dist/PeppolSettingsViewDataProvider-DpVIfFVG.js +276 -0
  25. package/dist/{ReminderSettingsViewDataProvider-CjX7afDs.js → ReminderSettingsViewDataProvider-QOh3LpMX.js} +63 -63
  26. package/dist/{api.util-D6m6OY3_.js → api.util-Do9BEwG4.js} +735 -641
  27. package/dist/{billingDocumentDetail.transformer-Da-Nt4bI.js → billingDocumentDetail.transformer-BAOQ3Zrg.js} +3 -2
  28. package/dist/client/index.d.ts +2 -2
  29. package/dist/client/sdk.gen.d.ts +4 -1
  30. package/dist/client/types.gen.d.ts +218 -40
  31. package/dist/client/zod.gen.d.ts +2575 -72
  32. package/dist/{creditNoteDetail.query-Yb8TdZNm.js → creditNoteDetail.query-C1rr54m1.js} +15 -15
  33. package/dist/{dist-BpDuRYDT.js → dist-CZAOPudv.js} +1 -1
  34. package/dist/{documentTitle.composable-CRJjS6p-.js → documentTitle.composable-C3k1m0Nz.js} +28 -26
  35. package/dist/{i18n.lib-CKs3ExEl.js → i18n.lib-Bkz_R954.js} +56 -2
  36. package/dist/index.d.ts +55 -0
  37. package/dist/index.js +161 -156
  38. package/dist/{invoice.service-DWDl9XRh.js → invoice.service-DrI2ULIR.js} +39 -38
  39. package/dist/{invoiceApproval.service-Fwlxgd9o.js → invoiceApproval.service-Dpxiru7l.js} +7 -7
  40. package/dist/{invoiceApprovalStatus.util-q-zHLdFV.js → invoiceApprovalStatus.util-CdOAcPzv.js} +2 -2
  41. package/dist/{invoiceCustomer.service-DOexR54S.js → invoiceCustomer.service-RRFosiYR.js} +6 -6
  42. package/dist/{invoiceDetail.query-B5w0Vlsy.js → invoiceDetail.query-BmtHdfj0.js} +1 -1
  43. package/dist/{invoiceIndexCache.util-CUlp4R7R.js → invoiceIndexCache.util-DKtJorc_.js} +3 -3
  44. package/dist/{invoicingConfig.composable-DjFexycc.js → invoicingConfig.composable-CMTYHHS9.js} +2 -2
  45. package/dist/{issuerSettings.query-BHuLjV9P.js → issuerSettings.query-CKDhoStt.js} +2 -2
  46. package/dist/libs/i18n.lib.d.ts +54 -0
  47. package/dist/locales/en-US.json.d.ts +28 -1
  48. package/dist/locales/nl-BE.json.d.ts +28 -1
  49. package/dist/models/billing-document/billingDocumentAdvancePayment.util.d.ts +9 -0
  50. package/dist/models/billing-document/billingDocumentAdvancePayment.util.spec.d.ts +1 -0
  51. package/dist/models/billing-document/billingDocumentDetail.model.d.ts +1 -0
  52. package/dist/modules/custom-field/components/customFieldList.spec.d.ts +1 -0
  53. package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.model.d.ts +6 -0
  54. package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.transformer.spec.d.ts +1 -0
  55. package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.util.d.ts +6 -0
  56. package/dist/modules/custom-field/models/custom-field-definition/customFieldViewKey.model.d.ts +9 -0
  57. package/dist/modules/custom-field/test/builders/customFieldDefinition.builder.d.ts +2 -1
  58. package/dist/modules/invoice/models/invoice/pdf/invoicePdfDetail.model.d.ts +1 -0
  59. package/dist/modules/invoice-delivery/api/mutations/peppolConnectionUpdate.mutation.d.ts +6 -0
  60. package/dist/modules/invoice-delivery/api/queries/peppolConnection.query.d.ts +1 -0
  61. package/dist/modules/invoice-delivery/api/query-keys/invoiceDelivery.queryKeys.d.ts +6 -0
  62. package/dist/modules/invoice-delivery/api/services/peppolConnection.service.d.ts +8 -0
  63. package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormApiKeyField.vue.d.ts +8 -0
  64. package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormCompanyField.vue.d.ts +11 -0
  65. package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormEnabledField.vue.d.ts +7 -0
  66. package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormProviderField.vue.d.ts +9 -0
  67. package/dist/modules/invoice-delivery/index.d.ts +1 -0
  68. package/dist/modules/invoice-delivery/models/deliveryReason.util.d.ts +6 -0
  69. package/dist/modules/invoice-delivery/models/peppolConnection.model.d.ts +18 -0
  70. package/dist/modules/invoice-delivery/models/peppolConnection.transformer.d.ts +9 -0
  71. package/dist/modules/invoice-delivery/models/peppolConnectionForm.model.d.ts +9 -0
  72. package/dist/modules/invoice-delivery/use-cases/settings/views/PeppolSettingsView.vue.d.ts +7 -0
  73. package/dist/modules/invoice-delivery/use-cases/settings/views/PeppolSettingsViewDataProvider.vue.d.ts +3 -0
  74. package/dist/modules/settings/routes/settings.routes.d.ts +7 -0
  75. package/dist/{reminderConfig.query-C4J6m4ER.js → reminderConfig.query-yImUS5qt.js} +22 -22
  76. package/dist/style.css +1 -1
  77. package/dist/types/queryKey.type.d.ts +2 -1
  78. package/dist/ui/billing-document/table/BillingDocumentLineItemsTableGroupRow.vue.d.ts +4 -0
  79. package/dist/ui/billing-document/table/BillingDocumentLineItemsTreeIndent.vue.d.ts +4 -2
  80. package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +0 -18
  81. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +0 -3
  82. package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableField.vue.d.ts +3 -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 +6 -0
  85. package/package.json +1 -1
@@ -1,42 +1,42 @@
1
1
  import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import "./api.util-D6m6OY3_.js";
3
- import { T as t, _ as n, a as r, b as i, c as a, d as o, k as s, l as c, o as l, t as u, u as d, v as f, x as p, y as m } from "./documentTitle.composable-CRJjS6p-.js";
2
+ import "./api.util-Do9BEwG4.js";
3
+ import { A as t, E as n, _ as r, a as i, b as a, c as o, d as s, l as c, o as l, t as u, u as d, v as f, x as p, y as m } from "./documentTitle.composable-C3k1m0Nz.js";
4
4
  import { n as h, r as g, t as _ } from "./useCurrencyFormat.composable-MtZaqKnO.js";
5
5
  import { t as v } from "./search.composable-CU9OpyUB.js";
6
6
  import { t as y } from "./src-DUSgQTKr.js";
7
- import { t as b } from "./invoice.service-DWDl9XRh.js";
8
- import { r as x, t as S } from "./plainDate.transformer-Bhiz9jW7.js";
9
- import { $ as ee, J as te, gt as ne, i as re, j as ie, nt as ae, q as oe, u as se } from "./dist-DCbLgB6Y.js";
10
- import { n as ce, t as le } from "./customerUuid.model-ClN4Vi9n.js";
11
- import { n as ue } from "./dist-Cdbpkd3Y.js";
12
- import { t as de } from "./DataProvider-C3uEds9v.js";
13
- import { a as fe, c as pe, d as C, f as me, i as w, l as T, n as he, o as ge, r as E, s as _e, t as ve, u as ye } from "./dist-BpDuRYDT.js";
14
- import { t as be } from "./formango.util-D5c2ql--.js";
15
- import { i as xe, n as Se, r as Ce, t as we } from "./CustomFieldValueText-DA0aPKwC.js";
16
- import { t as D } from "./invoiceApprovalStatus.util-q-zHLdFV.js";
17
- import { n as Te, t as Ee } from "./InvoiceApprovalOutOfSyncIndicator-AJOQe8j8.js";
18
- import { a as De, i as Oe, n as ke, o as Ae, r as je, t as O } from "./invoiceIndexCache.util-CUlp4R7R.js";
19
- import { t as Me } from "./InvoiceApprovalStatusBadge-BJ3Q18bf.js";
20
- import { t as Ne } from "./issuerSettings.query-BHuLjV9P.js";
21
- import { t as Pe } from "./dashboard-BaWGNEek.js";
7
+ import { t as b } from "./invoice.service-DrI2ULIR.js";
8
+ import { a as ee, i as x, n as S, r as te, t as ne } from "./CustomFieldValueText-BRpCwCqJ.js";
9
+ import { r as re, t as ie } from "./plainDate.transformer-Bhiz9jW7.js";
10
+ import { $ as ae, J as oe, gt as se, i as ce, j as le, nt as ue, q as de, u as fe } from "./dist-DCbLgB6Y.js";
11
+ import { n as pe, t as me } from "./customerUuid.model-ClN4Vi9n.js";
12
+ import { n as he } from "./dist-Cdbpkd3Y.js";
13
+ import { t as ge } from "./DataProvider-C3uEds9v.js";
14
+ import { a as C, c as _e, d as w, f as T, i as ve, l as ye, n as be, o as xe, r as E, s as Se, t as Ce, u as we } from "./dist-CZAOPudv.js";
15
+ import { t as Te } from "./formango.util-D5c2ql--.js";
16
+ import { t as D } from "./invoiceApprovalStatus.util-CdOAcPzv.js";
17
+ import { n as Ee, t as De } from "./InvoiceApprovalOutOfSyncIndicator-DPlrqqOs.js";
18
+ import { a as Oe, i as ke, n as Ae, o as je, r as Me, t as O } from "./invoiceIndexCache.util-DKtJorc_.js";
19
+ import { t as Ne } from "./InvoiceApprovalStatusBadge-CDc_Pwsm.js";
20
+ import { t as Pe } from "./issuerSettings.query-CKDhoStt.js";
21
+ import { t as Fe } from "./dashboard-BaWGNEek.js";
22
22
  import { z as k } from "zod";
23
23
  import { useI18n as A } from "vue-i18n";
24
- import { Fragment as Fe, computed as j, createBlock as M, createCommentVNode as N, createElementBlock as P, createElementVNode as F, createTextVNode as Ie, createVNode as I, defineComponent as L, isRef as Le, mergeModels as Re, mergeProps as ze, normalizeClass as Be, onMounted as Ve, openBlock as R, ref as z, renderList as He, renderSlot as Ue, shallowRef as We, toDisplayString as B, unref as V, useModel as Ge, watch as Ke, withCtx as H } from "vue";
25
- import { useMutation as U, useOffsetInfiniteQuery as qe } from "@wisemen/vue-core-api-utils";
26
- import { useLocalStorage as Je, watchDebounced as Ye } from "@vueuse/core";
27
- import { RouterLink as Xe, useRouter as Ze } from "vue-router";
28
- import { Temporal as Qe } from "temporal-polyfill";
29
- import { UIAutocomplete as $e, UIBadge as et, UIButton as W, UICheckbox as tt, UIColumnLayout as G, UIDashboardPage as nt, UIDashboardPageActions as rt, UIDateRangePicker as it, UIDialog as at, UIDialogBody as ot, UIDialogFooter as st, UIDialogFooterCancel as ct, UIDialogFooterPrimary as lt, UIDialogFooterSubmit as ut, UIDialogHeader as dt, UIFormDialog as ft, UILoader as pt, UIPopover as mt, UIRowLayout as K, UITable as ht, UITableCell as q, UITableCellInteractiveElement as gt, UITableCellText as _t, UITabs as vt, UITabsItem as yt, UITabsList as bt, UIText as J, UITextField as xt, UITooltip as St, UITooltipContent as Ct, createAutocompleteOptions as wt, createComponent as Y, defineTableColumns as Tt, useOverlay as Et, useTableCustomizeColumns as Dt, useToast as X } from "@wisemen/vue-core-design-system";
30
- import { useForm as Ot } from "formango";
31
- import { useRouteQuery as kt } from "@vueuse/router";
24
+ import { Fragment as Ie, computed as j, createBlock as M, createCommentVNode as N, createElementBlock as P, createElementVNode as F, createTextVNode as Le, createVNode as I, defineComponent as L, isRef as Re, mergeModels as ze, mergeProps as Be, normalizeClass as Ve, onMounted as He, openBlock as R, ref as z, renderList as Ue, renderSlot as We, shallowRef as Ge, toDisplayString as B, unref as V, useModel as Ke, watch as qe, withCtx as H } from "vue";
25
+ import { useMutation as U, useOffsetInfiniteQuery as Je } from "@wisemen/vue-core-api-utils";
26
+ import { useLocalStorage as Ye, watchDebounced as Xe } from "@vueuse/core";
27
+ import { RouterLink as Ze, useRouter as Qe } from "vue-router";
28
+ import { Temporal as $e } from "temporal-polyfill";
29
+ import { UIAutocomplete as et, UIBadge as tt, UIButton as W, UICheckbox as nt, UIColumnLayout as G, UIDashboardPage as rt, UIDashboardPageActions as it, UIDateRangePicker as at, UIDialog as ot, UIDialogBody as st, UIDialogFooter as ct, UIDialogFooterCancel as lt, UIDialogFooterPrimary as ut, UIDialogFooterSubmit as dt, UIDialogHeader as ft, UIFormDialog as pt, UILoader as mt, UIPopover as ht, UIRowLayout as K, UITable as gt, UITableCell as q, UITableCellInteractiveElement as _t, UITableCellText as vt, UITabs as yt, UITabsItem as bt, UITabsList as xt, UIText as J, UITextField as St, UITooltip as Ct, UITooltipContent as wt, createAutocompleteOptions as Tt, createComponent as Y, defineTableColumns as Et, useOverlay as Dt, useTableCustomizeColumns as Ot, useToast as X } from "@wisemen/vue-core-design-system";
30
+ import { useForm as kt } from "formango";
31
+ import { useRouteQuery as At } from "@vueuse/router";
32
32
  //#region src/modules/invoice/api/queries/invoiceIndex.query.ts
33
- function At(e) {
33
+ function jt(e) {
34
34
  let t = j(() => ({
35
35
  filters: e?.params?.filters?.value,
36
36
  search: e?.params?.search?.value,
37
37
  sort: e?.params?.sort?.value ?? []
38
38
  }));
39
- return qe("invoiceIndex", {
39
+ return Je("invoiceIndex", {
40
40
  params: { queryParams: t },
41
41
  queryFn: (t) => b.getAll({
42
42
  filters: e?.params?.filters?.value,
@@ -48,7 +48,7 @@ function At(e) {
48
48
  }
49
49
  //#endregion
50
50
  //#region src/modules/invoice/api/mutations/invoiceCreate.mutation.ts
51
- function jt() {
51
+ function Mt() {
52
52
  return U({
53
53
  queryFn: (e) => b.create(e.body),
54
54
  queryKeysToInvalidate: { invoiceIndex: {} }
@@ -56,7 +56,7 @@ function jt() {
56
56
  }
57
57
  //#endregion
58
58
  //#region src/modules/invoice/components/form/InvoiceFormCustomerField.vue
59
- var Mt = /* @__PURE__ */ L({
59
+ var Nt = /* @__PURE__ */ L({
60
60
  __name: "InvoiceFormCustomerField",
61
61
  props: {
62
62
  isLoading: { type: Boolean },
@@ -65,14 +65,14 @@ var Mt = /* @__PURE__ */ L({
65
65
  },
66
66
  emits: ["nextPage", "updateSearch"],
67
67
  setup(e, { emit: t }) {
68
- let n = e, r = t, i = A(), a = j(() => wt(n.customers));
69
- function s(e) {
68
+ let n = e, r = t, i = A(), a = j(() => Tt(n.customers));
69
+ function o(e) {
70
70
  return e.name;
71
71
  }
72
72
  function c(e) {
73
73
  switch (e) {
74
- case o.BUSINESS: return i.t("wise_invoicing.customer.type.business");
75
- case o.INDIVIDUAL: return i.t("wise_invoicing.customer.type.individual");
74
+ case s.BUSINESS: return i.t("wise_invoicing.customer.type.business");
75
+ case s.INDIVIDUAL: return i.t("wise_invoicing.customer.type.individual");
76
76
  }
77
77
  return "-";
78
78
  }
@@ -88,8 +88,8 @@ var Mt = /* @__PURE__ */ L({
88
88
  function d(e) {
89
89
  n.field.setValue(e), e !== null && r("updateSearch", "");
90
90
  }
91
- return (e, t) => (R(), M(V($e), ze(V(be)(n.field), {
92
- "display-fn": s,
91
+ return (e, t) => (R(), M(V(et), Be(V(Te)(n.field), {
92
+ "display-fn": o,
93
93
  "get-item-config": l,
94
94
  "is-loading": n.isLoading,
95
95
  "is-required": !0,
@@ -107,21 +107,21 @@ var Mt = /* @__PURE__ */ L({
107
107
  "placeholder"
108
108
  ]));
109
109
  }
110
- }), Nt = k.enum(o), Pt = k.object({
111
- uuid: le,
110
+ }), Pt = k.enum(s), Ft = k.object({
111
+ uuid: me,
112
112
  name: k.string().min(1),
113
- type: Nt
114
- }), Ft = k.object({ customer: Pt }), It = /* @__PURE__ */ L({
113
+ type: Pt
114
+ }), It = k.object({ customer: Ft }), Lt = /* @__PURE__ */ L({
115
115
  __name: "InvoiceCreateDialog",
116
116
  emits: ["close"],
117
117
  setup(e, { emit: t }) {
118
- let n = t, r = A(), i = X(), a = Ze(), o = jt(), s = v({ debounceMs: 250 }), c = Te({ params: { search: s.debouncedSearch } }), l = j(() => c.result.value.match({
118
+ let n = t, r = A(), i = X(), a = Qe(), o = Mt(), s = v({ debounceMs: 250 }), c = Ee({ params: { search: s.debouncedSearch } }), l = j(() => c.result.value.match({
119
119
  err: () => [],
120
120
  loading: () => [],
121
121
  ok: (e) => e.data
122
- })), u = Ot({
122
+ })), u = kt({
123
123
  initialState: { customer: null },
124
- schema: Ft,
124
+ schema: It,
125
125
  onSubmit: async (e) => {
126
126
  let t = await o.execute({ body: e });
127
127
  if (t.isErr()) {
@@ -137,23 +137,23 @@ var Mt = /* @__PURE__ */ L({
137
137
  function f(e) {
138
138
  s.updateSearch(e);
139
139
  }
140
- return (e, t) => (R(), M(V(ft), {
140
+ return (e, t) => (R(), M(V(pt), {
141
141
  form: V(u),
142
142
  size: "xs",
143
143
  onClose: t[0] ||= (e) => n("close")
144
144
  }, {
145
145
  default: H(() => [
146
- I(V(dt), {
146
+ I(V(ft), {
147
147
  title: V(r).t("wise_invoicing.invoice.create.modal_title"),
148
148
  description: V(r).t("wise_invoicing.invoice.create.modal_description"),
149
- icon: V(oe)
149
+ icon: V(de)
150
150
  }, null, 8, [
151
151
  "title",
152
152
  "description",
153
153
  "icon"
154
154
  ]),
155
- I(V(ot), null, {
156
- default: H(() => [I(Mt, {
155
+ I(V(st), null, {
156
+ default: H(() => [I(Nt, {
157
157
  customers: l.value,
158
158
  field: V(d),
159
159
  "is-loading": V(c).isLoading.value,
@@ -167,18 +167,18 @@ var Mt = /* @__PURE__ */ L({
167
167
  ])]),
168
168
  _: 1
169
169
  }),
170
- I(V(st), null, {
171
- right: H(() => [I(V(ct), { label: "cancel" }), I(V(ut), { label: V(r).t("wise_invoicing.invoice.create.confirm") }, null, 8, ["label"])]),
170
+ I(V(ct), null, {
171
+ right: H(() => [I(V(lt), { label: "cancel" }), I(V(dt), { label: V(r).t("wise_invoicing.invoice.create.confirm") }, null, 8, ["label"])]),
172
172
  _: 1
173
173
  })
174
174
  ]),
175
175
  _: 1
176
176
  }, 8, ["form"]));
177
177
  }
178
- }), Lt = {
178
+ }), Rt = {
179
179
  key: 0,
180
180
  class: "pointer-events-none fixed inset-x-0 bottom-4 z-20 flex justify-center px-lg"
181
- }, Rt = /* @__PURE__ */ L({
181
+ }, zt = /* @__PURE__ */ L({
182
182
  __name: "InvoiceOverviewBulkActionBar",
183
183
  props: {
184
184
  canFinalize: { type: Boolean },
@@ -198,7 +198,7 @@ var Mt = /* @__PURE__ */ L({
198
198
  ],
199
199
  setup(e, { emit: t }) {
200
200
  let n = e, r = t, i = A();
201
- return (e, t) => n.selectedCount > 0 ? (R(), P("div", Lt, [I(V(K), { class: "pointer-events-auto rounded-xl border border-secondary bg-primary px-lg py-sm shadow-lg" }, {
201
+ return (e, t) => n.selectedCount > 0 ? (R(), P("div", Rt, [I(V(K), { class: "pointer-events-auto rounded-xl border border-secondary bg-primary px-lg py-sm shadow-lg" }, {
202
202
  default: H(() => [
203
203
  I(V(J), {
204
204
  text: V(i).t("wise_invoicing.invoice.overview.bulk.selected_documents", { count: n.selectedCount }),
@@ -242,9 +242,9 @@ var Mt = /* @__PURE__ */ L({
242
242
  });
243
243
  //#endregion
244
244
  //#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewBulkSendEligibility.composable.ts
245
- function zt(e) {
246
- let t = z(null), n = j(() => e.selectedInvoices().filter((e) => e.status === i.FINALIZED).map((e) => e.uuid)), r = j(() => n.value.toSorted().join(","));
247
- return Ye(r, async (e) => {
245
+ function Bt(e) {
246
+ let t = z(null), n = j(() => e.selectedInvoices().filter((e) => e.status === a.FINALIZED).map((e) => e.uuid)), r = j(() => n.value.toSorted().join(","));
247
+ return Xe(r, async (e) => {
248
248
  let i = n.value;
249
249
  if (i.length === 0) {
250
250
  t.value = null;
@@ -259,11 +259,11 @@ function zt(e) {
259
259
  function Z(e) {
260
260
  return Array.isArray(e) && e.every((e) => typeof e == "string");
261
261
  }
262
- function Bt(e, t) {
262
+ function Vt(e, t) {
263
263
  try {
264
264
  switch (e) {
265
- case d.DATE: return S.toDto(S.fromDto(t));
266
- case d.TIMESTAMP: return x.toDto(x.fromDto(t));
265
+ case d.DATE: return ie.toDto(ie.fromDto(t));
266
+ case d.TIMESTAMP: return re.toDto(re.fromDto(t));
267
267
  default: return t;
268
268
  }
269
269
  } catch {
@@ -274,7 +274,7 @@ var Q = class {
274
274
  static getFreeformOptions(e, t) {
275
275
  let n = t.trim();
276
276
  if (n.length === 0) return [];
277
- let r = Bt(e.type, n);
277
+ let r = Vt(e.type, n);
278
278
  return r === null ? [] : [r];
279
279
  }
280
280
  static getKey(e) {
@@ -287,7 +287,7 @@ var Q = class {
287
287
  static getMonetaryCurrency(e, t) {
288
288
  let n = e.rules?.currencies;
289
289
  if (!Array.isArray(n)) return t;
290
- let r = new Set(Object.values(a)), i = n.filter((e) => typeof e == "string" && r.has(e));
290
+ let r = new Set(Object.values(o)), i = n.filter((e) => typeof e == "string" && r.has(e));
291
291
  return i.includes(t) ? t : i[0] ?? t;
292
292
  }
293
293
  static getRuleNumber(e, t) {
@@ -354,25 +354,25 @@ var Q = class {
354
354
  };
355
355
  //#endregion
356
356
  //#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewDataTableFilters.composable.ts
357
- function Vt(e) {
358
- let t = A(), n = v({ debounceMs: 250 }), i = Te({ params: { search: n.debouncedSearch } }), a = j(() => i.result.value.match({
357
+ function Ht(e) {
358
+ let t = A(), n = v({ debounceMs: 250 }), r = Ee({ params: { search: n.debouncedSearch } }), a = j(() => r.result.value.match({
359
359
  err: () => [],
360
360
  loading: () => [],
361
361
  ok: (e) => e.data
362
362
  })), o = e.customFieldDefinitions.map((n) => {
363
- let r = Q.getKey(n), i = Ce.getLabel(n, t.locale.value);
363
+ let r = Q.getKey(n), i = te.getLabel(n, t.locale.value);
364
364
  switch (n.type) {
365
- case d.BOOLEAN: return pe({
365
+ case d.BOOLEAN: return _e({
366
366
  entityLabel: i,
367
367
  key: r,
368
368
  label: i
369
369
  });
370
370
  case d.MONETARY: {
371
371
  let t = Q.getRuleNumber(n, "precision"), a = Q.getMonetaryCurrency(n, e.currency);
372
- return C({
372
+ return w({
373
373
  customUnit: a,
374
374
  defaultValue: {
375
- operator: ye.EQUALS,
375
+ operator: we.EQUALS,
376
376
  value: null
377
377
  },
378
378
  disableOperators: !0,
@@ -383,9 +383,9 @@ function Vt(e) {
383
383
  step: t === void 0 ? void 0 : 1 / 10 ** t
384
384
  });
385
385
  }
386
- case d.NUMBER: return C({
386
+ case d.NUMBER: return w({
387
387
  defaultValue: {
388
- operator: ye.EQUALS,
388
+ operator: we.EQUALS,
389
389
  value: null
390
390
  },
391
391
  disableOperators: !0,
@@ -395,13 +395,13 @@ function Vt(e) {
395
395
  min: Q.getRuleNumber(n, "min")
396
396
  });
397
397
  case d.MULTI_SELECT:
398
- case d.SINGLE_SELECT: return fe({
398
+ case d.SINGLE_SELECT: return C({
399
399
  defaultValue: {
400
400
  operator: E.INCLUDES,
401
401
  value: []
402
402
  },
403
403
  disableOperators: !0,
404
- displayFn: (e) => Ce.getChoiceLabel(n, e, t.locale.value),
404
+ displayFn: (e) => te.getChoiceLabel(n, e, t.locale.value),
405
405
  key: r,
406
406
  label: i,
407
407
  options: () => n.choices.map((e) => e.value)
@@ -409,7 +409,7 @@ function Vt(e) {
409
409
  case d.DATE:
410
410
  case d.TEXT:
411
411
  case d.TEXT_ARRAY:
412
- case d.TIMESTAMP: return me({
412
+ case d.TIMESTAMP: return T({
413
413
  defaultValue: {
414
414
  operator: E.INCLUDES,
415
415
  value: []
@@ -422,10 +422,10 @@ function Vt(e) {
422
422
  });
423
423
  default: throw TypeError("Unsupported custom field definition type");
424
424
  }
425
- }), s = w({
425
+ }), s = ve({
426
426
  actionGroup: { name: "invoices" },
427
427
  filters: [
428
- me({
428
+ T({
429
429
  defaultValue: {
430
430
  operator: E.INCLUDES,
431
431
  value: []
@@ -436,9 +436,9 @@ function Vt(e) {
436
436
  label: t.t("wise_invoicing.invoice.overview.filters.customer"),
437
437
  options: async (e) => (n.updateSearch(e), await new Promise((e) => setTimeout(e, 0)), a.value.map((e) => e.uuid))
438
438
  }),
439
- T({
439
+ ye({
440
440
  defaultValue: {
441
- operator: ve.IS_BETWEEN,
441
+ operator: Ce.IS_BETWEEN,
442
442
  value: {
443
443
  from: null,
444
444
  until: null
@@ -448,18 +448,18 @@ function Vt(e) {
448
448
  key: "dueOnRange",
449
449
  label: t.t("wise_invoicing.invoice.overview.filters.due_on")
450
450
  }),
451
- fe({
451
+ C({
452
452
  defaultValue: {
453
453
  operator: E.INCLUDES,
454
454
  value: []
455
455
  },
456
456
  disableOperators: !0,
457
- displayFn: (e) => t.t(Se.getLifecycleMetadata(e).translationKey),
457
+ displayFn: (e) => t.t(S.getLifecycleMetadata(e).translationKey),
458
458
  key: "lifecycleStatuses",
459
459
  label: t.t("wise_invoicing.invoice.overview.filters.lifecycle"),
460
460
  options: () => Object.values(m)
461
461
  }),
462
- fe({
462
+ C({
463
463
  defaultValue: {
464
464
  operator: E.INCLUDES,
465
465
  value: []
@@ -468,9 +468,9 @@ function Vt(e) {
468
468
  displayFn: (e) => t.t(D.getFilterTranslationKey(e)),
469
469
  key: "approvalStatuses",
470
470
  label: t.t("wise_invoicing.invoice.overview.filters.approval"),
471
- options: () => Object.values(r)
471
+ options: () => Object.values(i)
472
472
  }),
473
- pe({
473
+ _e({
474
474
  defaultValue: null,
475
475
  entityLabel: t.t("wise_invoicing.invoice.overview.filters.out_of_sync"),
476
476
  key: "hasChangesSinceApprovalSent",
@@ -512,20 +512,20 @@ function Vt(e) {
512
512
  }
513
513
  //#endregion
514
514
  //#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewFilters.composable.ts
515
- var Ht = {
515
+ var Ut = {
516
516
  awaiting_payment: {
517
- settlementStatuses: [t.UNPAID, t.PARTIALLY_PAID],
518
- statuses: [i.SENT]
517
+ settlementStatuses: [n.UNPAID, n.PARTIALLY_PAID],
518
+ statuses: [a.SENT]
519
519
  },
520
- credited: { settlementStatuses: [t.CREDITED] },
520
+ credited: { settlementStatuses: [n.CREDITED] },
521
521
  overdue: { isOverdue: !0 },
522
- paid: { settlementStatuses: [t.PAID, t.OVERPAID] },
523
- settled: { settlementStatuses: [t.SETTLED] }
522
+ paid: { settlementStatuses: [n.PAID, n.OVERPAID] },
523
+ settled: { settlementStatuses: [n.SETTLED] }
524
524
  };
525
- function Ut() {
525
+ function Wt() {
526
526
  let e = A();
527
527
  return {
528
- getFilters: (e) => e === "all" ? {} : Ht[e],
528
+ getFilters: (e) => e === "all" ? {} : Ut[e],
529
529
  tabs: j(() => [
530
530
  {
531
531
  key: "all",
@@ -556,8 +556,8 @@ function Ut() {
556
556
  }
557
557
  //#endregion
558
558
  //#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewSelection.composable.ts
559
- function Wt(e) {
560
- let t = We([]), n = j(() => {
559
+ function Gt(e) {
560
+ let t = Ge([]), n = j(() => {
561
561
  let n = new Set(t.value);
562
562
  return e.rows().filter((e) => n.has(e.uuid));
563
563
  }), r = j(() => {
@@ -599,12 +599,12 @@ function Wt(e) {
599
599
  }
600
600
  //#endregion
601
601
  //#region src/modules/invoice/use-cases/overview/components/InvoiceOverviewTableAmountCell.vue?vue&type=script&setup=true&lang.ts
602
- var Gt = { class: "font-medium text-secondary" }, Kt = ["title"], qt = /* @__PURE__ */ L({
602
+ var Kt = { class: "font-medium text-secondary" }, qt = ["title"], Jt = /* @__PURE__ */ L({
603
603
  __name: "InvoiceOverviewTableAmountCell",
604
604
  props: { value: {} },
605
605
  setup(e) {
606
606
  let t = e, n = A(), r = g(), i = j(() => r.formatMonetary(t.value.total)), a = j(() => {
607
- let e = Ae.getSubtextParts({
607
+ let e = je.getSubtextParts({
608
608
  balanceDueAmount: t.value.balanceDueAmount,
609
609
  grossAmount: t.value.grossAmount,
610
610
  paidAmount: t.value.paidAmount,
@@ -624,17 +624,17 @@ var Gt = { class: "font-medium text-secondary" }, Kt = ["title"], qt = /* @__PUR
624
624
  gap: "xxs",
625
625
  class: "text-sm/tight"
626
626
  }, {
627
- default: H(() => [F("span", Gt, B(i.value), 1), a.value === null ? N("", !0) : (R(), P("span", {
627
+ default: H(() => [F("span", Kt, B(i.value), 1), a.value === null ? N("", !0) : (R(), P("span", {
628
628
  key: 0,
629
629
  title: a.value,
630
630
  class: "truncate text-xs text-secondary"
631
- }, B(a.value), 9, Kt))]),
631
+ }, B(a.value), 9, qt))]),
632
632
  _: 1
633
633
  })]),
634
634
  _: 1
635
635
  }));
636
636
  }
637
- }), Jt = /* @__PURE__ */ L({
637
+ }), Yt = /* @__PURE__ */ L({
638
638
  __name: "InvoiceOverviewTableApprovalCell",
639
639
  props: {
640
640
  hasChangesSinceApprovalSent: { type: Boolean },
@@ -648,16 +648,16 @@ var Gt = { class: "font-medium text-secondary" }, Kt = ["title"], qt = /* @__PUR
648
648
  align: "center",
649
649
  gap: "xs"
650
650
  }, {
651
- default: H(() => [I(Me, {
651
+ default: H(() => [I(Ne, {
652
652
  approval: t.approval,
653
653
  "requires-prior-approval": t.requiresPriorApproval
654
- }, null, 8, ["approval", "requires-prior-approval"]), t.hasChangesSinceApprovalSent ? (R(), M(Ee, { key: 0 })) : N("", !0)]),
654
+ }, null, 8, ["approval", "requires-prior-approval"]), t.hasChangesSinceApprovalSent ? (R(), M(De, { key: 0 })) : N("", !0)]),
655
655
  _: 1
656
656
  })]),
657
657
  _: 1
658
658
  }));
659
659
  }
660
- }), Yt = /* @__PURE__ */ L({
660
+ }), Xt = /* @__PURE__ */ L({
661
661
  __name: "InvoiceOverviewTableCustomFieldCell",
662
662
  props: {
663
663
  definition: {},
@@ -669,7 +669,7 @@ var Gt = { class: "font-medium text-secondary" }, Kt = ["title"], qt = /* @__PUR
669
669
  key: 1,
670
670
  text: "-",
671
671
  class: "text-sm/5 text-primary"
672
- })) : (R(), M(we, {
672
+ })) : (R(), M(ne, {
673
673
  key: 0,
674
674
  definition: e.definition,
675
675
  value: e.value,
@@ -678,27 +678,27 @@ var Gt = { class: "font-medium text-secondary" }, Kt = ["title"], qt = /* @__PUR
678
678
  _: 1
679
679
  }));
680
680
  }
681
- }), Xt = /* @__PURE__ */ L({
681
+ }), Zt = /* @__PURE__ */ L({
682
682
  __name: "InvoiceOverviewTableDueDateCell",
683
683
  props: {
684
684
  isOverdue: { type: Boolean },
685
685
  value: {}
686
686
  },
687
687
  setup(e) {
688
- let t = e, n = ue(), r = j(() => t.value === null ? "-" : n.formatPlainDate(t.value)), i = j(() => {
688
+ let t = e, n = he(), r = j(() => t.value === null ? "-" : n.formatPlainDate(t.value)), i = j(() => {
689
689
  if (!t.isOverdue || t.value === null) return null;
690
- let e = t.value.toZonedDateTime(Qe.Now.timeZoneId()).toInstant();
690
+ let e = t.value.toZonedDateTime($e.Now.timeZoneId()).toInstant();
691
691
  return n.toRelativeTime(e);
692
692
  });
693
693
  return (e, n) => (R(), M(V(q), null, {
694
694
  default: H(() => [I(V(K), { gap: "sm" }, {
695
695
  default: H(() => [I(V(J), {
696
- class: Be([{
696
+ class: Ve([{
697
697
  "text-error-primary": t.isOverdue,
698
698
  "text-primary": !t.isOverdue
699
699
  }, "text-sm"]),
700
700
  text: r.value
701
- }, null, 8, ["class", "text"]), i.value === null ? N("", !0) : (R(), M(V(et), {
701
+ }, null, 8, ["class", "text"]), i.value === null ? N("", !0) : (R(), M(V(tt), {
702
702
  key: 0,
703
703
  label: i.value,
704
704
  color: "error",
@@ -710,11 +710,11 @@ var Gt = { class: "font-medium text-secondary" }, Kt = ["title"], qt = /* @__PUR
710
710
  _: 1
711
711
  }));
712
712
  }
713
- }), Zt = /* @__PURE__ */ L({
713
+ }), Qt = /* @__PURE__ */ L({
714
714
  __name: "InvoiceOverviewTableIssuedDateCell",
715
715
  props: { value: {} },
716
716
  setup(e) {
717
- let t = e, n = ue(), r = j(() => t.value === null ? "-" : n.formatPlainDate(t.value));
717
+ let t = e, n = he(), r = j(() => t.value === null ? "-" : n.formatPlainDate(t.value));
718
718
  return (e, t) => (R(), M(V(q), null, {
719
719
  default: H(() => [I(V(J), {
720
720
  text: r.value,
@@ -723,7 +723,7 @@ var Gt = { class: "font-medium text-secondary" }, Kt = ["title"], qt = /* @__PUR
723
723
  _: 1
724
724
  }));
725
725
  }
726
- }), Qt = /* @__PURE__ */ L({
726
+ }), $t = /* @__PURE__ */ L({
727
727
  __name: "InvoiceOverviewTableLifecycleCell",
728
728
  props: {
729
729
  isDisputed: { type: Boolean },
@@ -733,13 +733,13 @@ var Gt = { class: "font-medium text-secondary" }, Kt = ["title"], qt = /* @__PUR
733
733
  let t = e;
734
734
  return (e, n) => (R(), M(V(q), null, {
735
735
  default: H(() => [I(V(K), { gap: "xs" }, {
736
- default: H(() => [I(Oe, { "lifecycle-status": t.lifecycleStatus }, null, 8, ["lifecycle-status"]), t.isDisputed ? (R(), M(De, { key: 0 })) : N("", !0)]),
736
+ default: H(() => [I(ke, { "lifecycle-status": t.lifecycleStatus }, null, 8, ["lifecycle-status"]), t.isDisputed ? (R(), M(Oe, { key: 0 })) : N("", !0)]),
737
737
  _: 1
738
738
  })]),
739
739
  _: 1
740
740
  }));
741
741
  }
742
- }), $t = { class: "flex flex-col leading-tight" }, en = ["title"], tn = ["title"], nn = /* @__PURE__ */ L({
742
+ }), en = { class: "flex flex-col leading-tight" }, tn = ["title"], nn = ["title"], rn = /* @__PURE__ */ L({
743
743
  __name: "InvoiceOverviewTableNameCell",
744
744
  props: {
745
745
  customerName: {},
@@ -749,11 +749,11 @@ var Gt = { class: "font-medium text-secondary" }, Kt = ["title"], qt = /* @__PUR
749
749
  setup(e) {
750
750
  let t = e, n = A();
751
751
  return (e, r) => (R(), M(V(q), null, {
752
- default: H(() => [F("div", $t, [I(V(K), null, {
752
+ default: H(() => [F("div", en, [I(V(K), null, {
753
753
  default: H(() => [F("span", {
754
754
  title: t.customerName,
755
755
  class: "truncate text-sm/4 font-medium text-primary"
756
- }, B(t.customerName), 9, en), t.type === V(p).CREDIT_NOTE ? (R(), M(V(ae), {
756
+ }, B(t.customerName), 9, tn), t.type === V(p).CREDIT_NOTE ? (R(), M(V(ue), {
757
757
  key: 0,
758
758
  "aria-label": V(n).t("wise_invoicing.invoice.type.credit_note"),
759
759
  class: "size-3 shrink-0 text-warning-primary",
@@ -763,19 +763,19 @@ var Gt = { class: "font-medium text-secondary" }, Kt = ["title"], qt = /* @__PUR
763
763
  }), F("span", {
764
764
  title: t.subject ?? void 0,
765
765
  class: "truncate text-xs/4 text-secondary"
766
- }, B(t.subject ?? "-"), 9, tn)])]),
766
+ }, B(t.subject ?? "-"), 9, nn)])]),
767
767
  _: 1
768
768
  }));
769
769
  }
770
- }), rn = /* @__PURE__ */ L({
770
+ }), an = /* @__PURE__ */ L({
771
771
  __name: "InvoiceOverviewTableSelectionCell",
772
772
  props: { isSelected: { type: Boolean } },
773
773
  emits: ["toggle"],
774
774
  setup(e, { emit: t }) {
775
775
  let n = e, r = t, i = A();
776
776
  return (e, t) => (R(), M(V(q), null, {
777
- default: H(() => [I(V(gt), null, {
778
- default: H(() => [I(V(tt), {
777
+ default: H(() => [I(V(_t), null, {
778
+ default: H(() => [I(V(nt), {
779
779
  label: V(i).t("wise_invoicing.invoice.overview.bulk.select_document"),
780
780
  "model-value": n.isSelected,
781
781
  "is-label-hidden": !0,
@@ -787,35 +787,35 @@ var Gt = { class: "font-medium text-secondary" }, Kt = ["title"], qt = /* @__PUR
787
787
  _: 1
788
788
  }));
789
789
  }
790
- }), an = /* @__PURE__ */ L({
790
+ }), on = /* @__PURE__ */ L({
791
791
  __name: "InvoiceOverviewTableSentCell",
792
792
  props: { deliveryStatus: {} },
793
793
  setup(e) {
794
794
  let t = e, n = A(), r = j(() => [f.SENT, f.VIEWED].includes(t.deliveryStatus));
795
795
  return (e, i) => (R(), M(V(q), null, {
796
- default: H(() => [r.value ? (R(), M(V(re), {
796
+ default: H(() => [r.value ? (R(), M(V(ce), {
797
797
  key: 0,
798
798
  class: "size-4 text-brand-600"
799
- })) : t.deliveryStatus === V(f).PROCESSING ? (R(), M(V(pt), {
799
+ })) : t.deliveryStatus === V(f).PROCESSING ? (R(), M(V(mt), {
800
800
  key: 1,
801
801
  "aria-label": V(n).t("wise_invoicing.invoice.delivery_status.processing"),
802
802
  "aria-hidden": "false",
803
803
  role: "img",
804
804
  class: "size-4 text-tertiary"
805
- }, null, 8, ["aria-label"])) : t.deliveryStatus === V(f).FAILED ? (R(), M(V(St), {
805
+ }, null, 8, ["aria-label"])) : t.deliveryStatus === V(f).FAILED ? (R(), M(V(Ct), {
806
806
  key: 2,
807
807
  "popover-side-offset": 8,
808
808
  "popover-align": "center",
809
809
  "popover-side": "bottom"
810
810
  }, {
811
- trigger: H(() => [I(V(gt), null, {
812
- default: H(() => [I(V(se), {
811
+ trigger: H(() => [I(V(_t), null, {
812
+ default: H(() => [I(V(fe), {
813
813
  "aria-label": V(n).t("wise_invoicing.invoice.overview.send_failed"),
814
814
  class: "size-4 text-error-primary"
815
815
  }, null, 8, ["aria-label"])]),
816
816
  _: 1
817
817
  })]),
818
- content: H(() => [I(V(Ct), null, {
818
+ content: H(() => [I(V(wt), null, {
819
819
  default: H(() => [I(V(J), {
820
820
  text: V(n).t("wise_invoicing.invoice.overview.send_failed"),
821
821
  class: "text-sm text-primary"
@@ -827,22 +827,22 @@ var Gt = { class: "font-medium text-secondary" }, Kt = ["title"], qt = /* @__PUR
827
827
  _: 1
828
828
  }));
829
829
  }
830
- }), on = /* @__PURE__ */ L({
830
+ }), sn = /* @__PURE__ */ L({
831
831
  __name: "InvoiceOverviewTableSequenceCell",
832
832
  props: { sequence: {} },
833
833
  setup(e) {
834
834
  return (t, n) => (R(), M(V(q), null, {
835
- default: H(() => [I(V(_t), { text: e.sequence ?? "-" }, null, 8, ["text"])]),
835
+ default: H(() => [I(V(vt), { text: e.sequence ?? "-" }, null, 8, ["text"])]),
836
836
  _: 1
837
837
  }));
838
838
  }
839
- }), sn = /* @__PURE__ */ L({
839
+ }), cn = /* @__PURE__ */ L({
840
840
  __name: "InvoiceOverviewTableStatusCell",
841
841
  props: { value: {} },
842
842
  setup(e) {
843
- let t = e, n = j(() => t.value.type === p.CREDIT_NOTE), r = j(() => ke.isSent(t.value.deliveryStatus));
843
+ let t = e, n = j(() => t.value.type === p.CREDIT_NOTE), r = j(() => Ae.isSent(t.value.deliveryStatus));
844
844
  return (e, i) => (R(), M(V(q), null, {
845
- default: H(() => [n.value ? N("", !0) : (R(), M(je, {
845
+ default: H(() => [n.value ? N("", !0) : (R(), M(Me, {
846
846
  key: 0,
847
847
  "is-sent": r.value,
848
848
  "balance-due-amount": t.value.balanceDueAmount,
@@ -865,136 +865,136 @@ var Gt = { class: "font-medium text-secondary" }, Kt = ["title"], qt = /* @__PUR
865
865
  });
866
866
  //#endregion
867
867
  //#region src/modules/invoice/use-cases/overview/composables/invoiceOverviewTableColumns.composable.ts
868
- function cn(e) {
869
- let t = A();
868
+ function ln(e) {
869
+ let n = A();
870
870
  return j(() => {
871
- let n = e?.selection, r = e?.customFieldDefinitions?.().map((e) => ({
872
- headerLabel: Ce.getLabel(e, t.locale.value),
871
+ let r = e?.selection, i = e?.customFieldDefinitions?.().map((e) => ({
872
+ headerLabel: te.getLabel(e, n.locale.value),
873
873
  key: Q.getKey(e),
874
874
  size: {
875
875
  max: "1fr",
876
876
  min: "10rem"
877
877
  },
878
- component: (t) => Y(Yt, {
878
+ component: (t) => Y(Xt, {
879
879
  definition: e,
880
880
  value: t.customFields.find((t) => t.definitionUuid === e.uuid)
881
881
  })
882
- })) ?? [], i = n === void 0 ? [] : [{
882
+ })) ?? [], a = r === void 0 ? [] : [{
883
883
  headerLabel: "",
884
884
  key: "selection",
885
885
  size: {
886
886
  max: "2.5rem",
887
887
  min: "2.5rem"
888
888
  },
889
- component: (e) => Y(rn, {
890
- isSelected: n.isSelected(e.uuid),
891
- onToggle: () => n.toggleRow(e.uuid)
889
+ component: (e) => Y(an, {
890
+ isSelected: r.isSelected(e.uuid),
891
+ onToggle: () => r.toggleRow(e.uuid)
892
892
  })
893
893
  }];
894
- return Tt()([
895
- ...i,
894
+ return Et()([
895
+ ...a,
896
896
  {
897
- headerLabel: t.t("wise_invoicing.invoice.overview.columns.recipient"),
898
- key: s.CUSTOMER,
897
+ headerLabel: n.t("wise_invoicing.invoice.overview.columns.recipient"),
898
+ key: t.CUSTOMER,
899
899
  size: {
900
900
  max: "16rem",
901
901
  min: "16rem"
902
902
  },
903
- component: (e) => Y(nn, {
903
+ component: (e) => Y(rn, {
904
904
  customerName: e.customerName,
905
905
  subject: e.subject,
906
906
  type: e.type
907
907
  })
908
908
  },
909
909
  {
910
- headerLabel: t.t("wise_invoicing.invoice.overview.columns.invoice_number"),
911
- key: s.SEQUENCE,
910
+ headerLabel: n.t("wise_invoicing.invoice.overview.columns.invoice_number"),
911
+ key: t.SEQUENCE,
912
912
  size: {
913
913
  max: "9rem",
914
914
  min: "9rem"
915
915
  },
916
- component: (e) => Y(on, { sequence: e.sequence })
916
+ component: (e) => Y(sn, { sequence: e.sequence })
917
917
  },
918
918
  {
919
- headerLabel: t.t("wise_invoicing.invoice.overview.columns.lifecycle"),
919
+ headerLabel: n.t("wise_invoicing.invoice.overview.columns.lifecycle"),
920
920
  key: "lifecycleStatus",
921
921
  size: {
922
922
  max: "12rem",
923
923
  min: "8rem"
924
924
  },
925
- component: (e) => Y(Qt, {
925
+ component: (e) => Y($t, {
926
926
  isDisputed: e.isDisputed,
927
927
  lifecycleStatus: e.lifecycleStatus
928
928
  })
929
929
  },
930
930
  {
931
- headerLabel: t.t("wise_invoicing.invoice.overview.columns.invoice_date"),
932
- key: s.ISSUED_ON,
931
+ headerLabel: n.t("wise_invoicing.invoice.overview.columns.invoice_date"),
932
+ key: t.ISSUED_ON,
933
933
  size: {
934
934
  max: "8rem",
935
935
  min: "8rem"
936
936
  },
937
- component: (e) => Y(Zt, { value: e.issuedOn })
937
+ component: (e) => Y(Qt, { value: e.issuedOn })
938
938
  },
939
939
  {
940
- headerLabel: t.t("wise_invoicing.invoice.overview.columns.sent"),
940
+ headerLabel: n.t("wise_invoicing.invoice.overview.columns.sent"),
941
941
  key: "deliveryStatus",
942
942
  size: {
943
943
  max: "8rem",
944
944
  min: "8rem"
945
945
  },
946
- component: (e) => Y(an, { deliveryStatus: e.deliveryStatus })
946
+ component: (e) => Y(on, { deliveryStatus: e.deliveryStatus })
947
947
  },
948
948
  {
949
- headerLabel: t.t("wise_invoicing.invoice.overview.columns.settlement"),
949
+ headerLabel: n.t("wise_invoicing.invoice.overview.columns.settlement"),
950
950
  key: "status",
951
951
  size: {
952
952
  max: "10rem",
953
953
  min: "10rem"
954
954
  },
955
- component: (e) => Y(sn, { value: e })
955
+ component: (e) => Y(cn, { value: e })
956
956
  },
957
957
  {
958
- headerLabel: t.t("wise_invoicing.invoice.overview.columns.approval"),
958
+ headerLabel: n.t("wise_invoicing.invoice.overview.columns.approval"),
959
959
  key: "approval",
960
960
  size: {
961
961
  max: "12rem",
962
962
  min: "10rem"
963
963
  },
964
- component: (e) => Y(Jt, {
964
+ component: (e) => Y(Yt, {
965
965
  hasChangesSinceApprovalSent: e.hasChangesSinceApprovalSent && e.lifecycleStatus !== m.FINALIZED,
966
966
  approval: e.approval,
967
967
  requiresPriorApproval: e.requiresPriorApproval
968
968
  })
969
969
  },
970
970
  {
971
- headerLabel: t.t("wise_invoicing.invoice.overview.columns.due_date"),
971
+ headerLabel: n.t("wise_invoicing.invoice.overview.columns.due_date"),
972
972
  key: "dueOn",
973
973
  size: {
974
974
  max: "16rem",
975
975
  min: "16rem"
976
976
  },
977
- component: (e) => Y(Xt, {
977
+ component: (e) => Y(Zt, {
978
978
  isOverdue: e.isOverdue,
979
979
  value: e.dueOn
980
980
  })
981
981
  },
982
982
  {
983
- headerLabel: t.t("wise_invoicing.invoice.overview.columns.amount_excl_vat"),
984
- key: s.NET_AMOUNT,
983
+ headerLabel: n.t("wise_invoicing.invoice.overview.columns.amount_excl_vat"),
984
+ key: t.NET_AMOUNT,
985
985
  size: {
986
986
  max: "1fr",
987
987
  min: "10rem"
988
988
  },
989
- component: (e) => Y(qt, { value: e })
989
+ component: (e) => Y(Jt, { value: e })
990
990
  },
991
- ...r
991
+ ...i
992
992
  ]);
993
993
  });
994
994
  }
995
995
  //#endregion
996
996
  //#region src/modules/invoice/api/mutations/invoiceBulkFinalize.mutation.ts
997
- function ln() {
997
+ function un() {
998
998
  return U({
999
999
  queryFn: (e) => b.bulkFinalize(e.params.invoiceUuids),
1000
1000
  queryKeysToInvalidate: { invoiceDetail: {} }
@@ -1002,7 +1002,7 @@ function ln() {
1002
1002
  }
1003
1003
  //#endregion
1004
1004
  //#region src/modules/invoice/use-cases/overview/utils/invoiceOverviewBulkActionFeedback.util.ts
1005
- var un = {
1005
+ var dn = {
1006
1006
  approval_already_sent_error: "wise_invoicing.invoice.overview.bulk.skip_reason.approval_already_sent",
1007
1007
  approval_requires_customer_prior_approval: "wise_invoicing.invoice.overview.bulk.skip_reason.approval_not_required",
1008
1008
  approval_requires_editable_invoice: "wise_invoicing.invoice.overview.bulk.skip_reason.not_editable",
@@ -1011,10 +1011,10 @@ var un = {
1011
1011
  customer_has_no_default_recipient: "wise_invoicing.invoice.overview.bulk.skip_reason.no_recipient",
1012
1012
  invoice_finalization_requires_approval: "wise_invoicing.invoice.finalize.blocked_by_approval",
1013
1013
  invoice_not_found: "wise_invoicing.invoice.overview.bulk.skip_reason.not_found"
1014
- }, dn = k.object({
1015
- approvalStatus: k.enum(n).nullable(),
1014
+ }, fn = k.object({
1015
+ approvalStatus: k.enum(r).nullable(),
1016
1016
  level: k.enum(l).nullable()
1017
- }), fn = "wise_invoicing.invoice.overview.bulk.skip_reason.unknown", $ = class {
1017
+ }), pn = "wise_invoicing.invoice.overview.bulk.skip_reason.unknown", $ = class {
1018
1018
  static createEmptyPreview() {
1019
1019
  return {
1020
1020
  skipped: [],
@@ -1046,7 +1046,7 @@ var un = {
1046
1046
  static getBlockingApprovalStatusKeys(e) {
1047
1047
  let t = {};
1048
1048
  for (let n of e) {
1049
- let e = dn.safeParse(n.errors[0]?.errors[0]?.meta);
1049
+ let e = fn.safeParse(n.errors[0]?.errors[0]?.meta);
1050
1050
  if (!e.success) continue;
1051
1051
  let r = D.getDisplayStatus({
1052
1052
  approval: e.data.approvalStatus === null ? null : {
@@ -1077,7 +1077,7 @@ var un = {
1077
1077
  let t = {};
1078
1078
  for (let n of e) {
1079
1079
  let e = n.errors[0]?.errors[0]?.code;
1080
- t[n.uuid] = e === void 0 ? fn : un[e] ?? fn;
1080
+ t[n.uuid] = e === void 0 ? pn : dn[e] ?? pn;
1081
1081
  }
1082
1082
  return t;
1083
1083
  }
@@ -1085,22 +1085,22 @@ var un = {
1085
1085
  let n = new Set(t.map((e) => e.uuid));
1086
1086
  return e.filter((e) => !n.has(e.uuid)).map((e) => e.uuid);
1087
1087
  }
1088
- }, pn = {
1088
+ }, mn = {
1089
1089
  key: 0,
1090
1090
  class: "text-sm text-error-primary"
1091
- }, mn = {
1091
+ }, hn = {
1092
1092
  key: 1,
1093
1093
  class: "text-sm text-secondary"
1094
- }, hn = {
1094
+ }, gn = {
1095
1095
  key: 0,
1096
1096
  class: "text-sm text-primary"
1097
- }, gn = {
1097
+ }, _n = {
1098
1098
  key: 1,
1099
1099
  class: "text-sm text-secondary"
1100
- }, _n = { class: "text-sm text-secondary" }, vn = {
1100
+ }, vn = { class: "text-sm text-secondary" }, yn = {
1101
1101
  key: 0,
1102
1102
  class: "text-xs text-tertiary"
1103
- }, yn = /* @__PURE__ */ L({
1103
+ }, bn = /* @__PURE__ */ L({
1104
1104
  __name: "InvoiceOverviewBulkActionDialog",
1105
1105
  props: {
1106
1106
  title: {},
@@ -1121,12 +1121,12 @@ var un = {
1121
1121
  emits: ["close", "confirm"],
1122
1122
  setup(e, { emit: t }) {
1123
1123
  let n = e, r = t;
1124
- return (e, t) => (R(), M(V(at), {
1124
+ return (e, t) => (R(), M(V(ot), {
1125
1125
  size: "sm",
1126
1126
  onClose: t[1] ||= (e) => r("close")
1127
1127
  }, {
1128
1128
  default: H(() => [
1129
- I(V(dt), {
1129
+ I(V(ft), {
1130
1130
  title: n.title,
1131
1131
  description: n.description,
1132
1132
  icon: n.icon
@@ -1135,37 +1135,37 @@ var un = {
1135
1135
  "description",
1136
1136
  "icon"
1137
1137
  ]),
1138
- I(V(ot), null, {
1138
+ I(V(st), null, {
1139
1139
  default: H(() => [I(V(G), null, {
1140
- default: H(() => [n.previewErrorLabel === null ? n.isPreviewLoading ? (R(), P("p", mn, B(n.loadingLabel), 1)) : (R(), P(Fe, { key: 2 }, [n.processableCount > 0 ? (R(), P("p", hn, B(n.processableLabel), 1)) : (R(), P("p", gn, B(n.noneProcessableLabel), 1)), n.skippedInvoices.length > 0 ? (R(), M(V(G), {
1140
+ default: H(() => [n.previewErrorLabel === null ? n.isPreviewLoading ? (R(), P("p", hn, B(n.loadingLabel), 1)) : (R(), P(Ie, { key: 2 }, [n.processableCount > 0 ? (R(), P("p", gn, B(n.processableLabel), 1)) : (R(), P("p", _n, B(n.noneProcessableLabel), 1)), n.skippedInvoices.length > 0 ? (R(), M(V(G), {
1141
1141
  key: 2,
1142
1142
  gap: "sm",
1143
1143
  class: "rounded-lg border border-secondary bg-secondary p-md"
1144
1144
  }, {
1145
- default: H(() => [F("p", _n, B(n.skippedPreviewLabel), 1), I(V(G), { gap: "xs" }, {
1146
- default: H(() => [(R(!0), P(Fe, null, He(n.skippedInvoices, (e) => (R(), M(V(G), {
1145
+ default: H(() => [F("p", vn, B(n.skippedPreviewLabel), 1), I(V(G), { gap: "xs" }, {
1146
+ default: H(() => [(R(!0), P(Ie, null, Ue(n.skippedInvoices, (e) => (R(), M(V(G), {
1147
1147
  key: e.uuid,
1148
1148
  gap: "none"
1149
1149
  }, {
1150
- default: H(() => [I(V(Xe), {
1150
+ default: H(() => [I(V(Ze), {
1151
1151
  to: V($).getInvoiceDetailLink(e),
1152
1152
  class: "text-sm text-brand-primary hover:underline"
1153
1153
  }, {
1154
- default: H(() => [Ie(B(V($).getInvoiceLabel(e)), 1)]),
1154
+ default: H(() => [Le(B(V($).getInvoiceLabel(e)), 1)]),
1155
1155
  _: 2
1156
- }, 1032, ["to"]), n.skipReasons?.[e.uuid] === void 0 ? N("", !0) : (R(), P("p", vn, B(n.skipReasons[e.uuid]), 1))]),
1156
+ }, 1032, ["to"]), n.skipReasons?.[e.uuid] === void 0 ? N("", !0) : (R(), P("p", yn, B(n.skipReasons[e.uuid]), 1))]),
1157
1157
  _: 2
1158
1158
  }, 1024))), 128))]),
1159
1159
  _: 1
1160
1160
  })]),
1161
1161
  _: 1
1162
- })) : N("", !0)], 64)) : (R(), P("p", pn, B(n.previewErrorLabel), 1))]),
1162
+ })) : N("", !0)], 64)) : (R(), P("p", mn, B(n.previewErrorLabel), 1))]),
1163
1163
  _: 1
1164
1164
  })]),
1165
1165
  _: 1
1166
1166
  }),
1167
- I(V(st), null, {
1168
- right: H(() => [I(V(ct)), I(V(lt), {
1167
+ I(V(ct), null, {
1168
+ right: H(() => [I(V(lt)), I(V(ut), {
1169
1169
  "is-disabled": n.isPreviewLoading || n.processableCount === 0,
1170
1170
  "is-loading": n.isSubmitting,
1171
1171
  label: n.confirmLabel,
@@ -1181,7 +1181,7 @@ var un = {
1181
1181
  _: 1
1182
1182
  }));
1183
1183
  }
1184
- }), bn = /* @__PURE__ */ L({
1184
+ }), xn = /* @__PURE__ */ L({
1185
1185
  __name: "InvoiceOverviewBulkFinalizeDialog",
1186
1186
  props: {
1187
1187
  invoices: {},
@@ -1189,17 +1189,17 @@ var un = {
1189
1189
  },
1190
1190
  emits: ["close"],
1191
1191
  setup(e, { emit: t }) {
1192
- let n = e, r = t, a = A(), o = X(), s = ln(), c = z(!0), l = z(!1), u = z(null), d = z(null), f = j(() => n.invoices.filter((e) => e.status === i.READY)), p = j(() => f.value.map((e) => e.uuid)), h = j(() => u.value?.meta.processed ?? 0), g = j(() => $.getUnskippedInvoiceUuids(f.value, u.value?.skipped ?? [])), _ = j(() => {
1192
+ let n = e, r = t, i = A(), o = X(), s = un(), c = z(!0), l = z(!1), u = z(null), d = z(null), f = j(() => n.invoices.filter((e) => e.status === a.READY)), p = j(() => f.value.map((e) => e.uuid)), h = j(() => u.value?.meta.processed ?? 0), g = j(() => $.getUnskippedInvoiceUuids(f.value, u.value?.skipped ?? [])), _ = j(() => {
1193
1193
  let e = new Set(g.value);
1194
1194
  return n.invoices.filter((t) => !e.has(t.uuid));
1195
1195
  }), v = j(() => _.value.length), y = j(() => {
1196
1196
  let e = u.value?.skipped ?? [], t = $.getSkipReasonKeys(e), n = $.getBlockingApprovalStatusKeys(e);
1197
1197
  return Object.fromEntries(Object.entries(t).map(([e, t]) => {
1198
1198
  let r = n[e];
1199
- return [e, a.t(t, { status: r === void 0 ? "" : a.t(r) })];
1199
+ return [e, i.t(t, { status: r === void 0 ? "" : i.t(r) })];
1200
1200
  }));
1201
- }), x = j(() => u.value === null ? n.invoices.length : h.value);
1202
- async function S() {
1201
+ }), ee = j(() => u.value === null ? n.invoices.length : h.value);
1202
+ async function x() {
1203
1203
  let e = g.value;
1204
1204
  if (e.length === 0 || l.value) return;
1205
1205
  l.value = !0;
@@ -1211,44 +1211,44 @@ var un = {
1211
1211
  let c = new Set(t.value.skipped.map((e) => e.uuid)), d = e.filter((e) => !c.has(e));
1212
1212
  u.value = t.value, d.length > 0 && O.reflectBulkAction(d, {
1213
1213
  lifecycleStatus: m.FINALIZED,
1214
- status: i.FINALIZED
1215
- }), t.value.meta.processed > 0 && o.show({ message: a.t("wise_invoicing.invoice.overview.bulk.finalize.success", { count: t.value.meta.processed }) }), v.value > 0 && o.show($.createSkippedToast({
1214
+ status: a.FINALIZED
1215
+ }), t.value.meta.processed > 0 && o.show({ message: i.t("wise_invoicing.invoice.overview.bulk.finalize.success", { count: t.value.meta.processed }) }), v.value > 0 && o.show($.createSkippedToast({
1216
1216
  id: "invoice-overview-bulk-finalize-skipped",
1217
1217
  invoices: _.value,
1218
- message: a.t("wise_invoicing.invoice.overview.bulk.finalize.skipped", { count: v.value })
1218
+ message: i.t("wise_invoicing.invoice.overview.bulk.finalize.skipped", { count: v.value })
1219
1219
  })), t.value.meta.processed !== 0 && (n.onFinalized(), r("close"));
1220
1220
  }
1221
- async function ee() {
1221
+ async function S() {
1222
1222
  if (c.value = !0, p.value.length === 0) {
1223
1223
  u.value = $.createEmptyPreview(), c.value = !1;
1224
1224
  return;
1225
1225
  }
1226
1226
  let e = await b.previewBulkFinalize(p.value);
1227
1227
  if (e.isErr()) {
1228
- d.value = a.t("wise_invoicing.invoice.overview.bulk.preview_error"), c.value = !1;
1228
+ d.value = i.t("wise_invoicing.invoice.overview.bulk.preview_error"), c.value = !1;
1229
1229
  return;
1230
1230
  }
1231
1231
  u.value = e.value, c.value = !1;
1232
1232
  }
1233
- return Ve(() => {
1234
- ee();
1235
- }), (e, t) => (R(), M(yn, {
1236
- "confirm-label": V(a).t("wise_invoicing.invoice.overview.bulk.finalize.confirm"),
1237
- description: V(a).t("wise_invoicing.invoice.overview.bulk.finalize.description"),
1238
- icon: V(ie),
1233
+ return He(() => {
1234
+ S();
1235
+ }), (e, t) => (R(), M(bn, {
1236
+ "confirm-label": V(i).t("wise_invoicing.invoice.overview.bulk.finalize.confirm"),
1237
+ description: V(i).t("wise_invoicing.invoice.overview.bulk.finalize.description"),
1238
+ icon: V(le),
1239
1239
  "is-preview-loading": c.value,
1240
1240
  "is-submitting": l.value,
1241
- "loading-label": V(a).t("wise_invoicing.invoice.overview.bulk.finalize.loading"),
1242
- "none-processable-label": V(a).t("wise_invoicing.invoice.overview.bulk.finalize.none_processable"),
1241
+ "loading-label": V(i).t("wise_invoicing.invoice.overview.bulk.finalize.loading"),
1242
+ "none-processable-label": V(i).t("wise_invoicing.invoice.overview.bulk.finalize.none_processable"),
1243
1243
  "preview-error-label": d.value,
1244
1244
  "processable-count": h.value,
1245
- "processable-label": V(a).t("wise_invoicing.invoice.overview.bulk.finalize.processable", { count: h.value }),
1245
+ "processable-label": V(i).t("wise_invoicing.invoice.overview.bulk.finalize.processable", { count: h.value }),
1246
1246
  "skip-reasons": y.value,
1247
1247
  "skipped-invoices": _.value,
1248
- "skipped-preview-label": V(a).t("wise_invoicing.invoice.overview.bulk.finalize.skipped_preview", { count: v.value }),
1249
- title: V(a).t("wise_invoicing.invoice.overview.bulk.finalize.title", { count: x.value }),
1248
+ "skipped-preview-label": V(i).t("wise_invoicing.invoice.overview.bulk.finalize.skipped_preview", { count: v.value }),
1249
+ title: V(i).t("wise_invoicing.invoice.overview.bulk.finalize.title", { count: ee.value }),
1250
1250
  onClose: t[0] ||= (e) => r("close"),
1251
- onConfirm: S
1251
+ onConfirm: x
1252
1252
  }, null, 8, [
1253
1253
  "confirm-label",
1254
1254
  "description",
@@ -1269,7 +1269,7 @@ var un = {
1269
1269
  });
1270
1270
  //#endregion
1271
1271
  //#region src/modules/invoice/api/mutations/invoiceBulkMarkAsReady.mutation.ts
1272
- function xn() {
1272
+ function Sn() {
1273
1273
  return U({
1274
1274
  queryFn: (e) => b.bulkMarkAsReady(e.params.invoiceUuids),
1275
1275
  queryKeysToInvalidate: { invoiceDetail: {} }
@@ -1277,7 +1277,7 @@ function xn() {
1277
1277
  }
1278
1278
  //#endregion
1279
1279
  //#region src/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkMarkAsReadyDialog.vue
1280
- var Sn = /* @__PURE__ */ L({
1280
+ var Cn = /* @__PURE__ */ L({
1281
1281
  __name: "InvoiceOverviewBulkMarkAsReadyDialog",
1282
1282
  props: {
1283
1283
  invoices: {},
@@ -1285,11 +1285,11 @@ var Sn = /* @__PURE__ */ L({
1285
1285
  },
1286
1286
  emits: ["close"],
1287
1287
  setup(e, { emit: t }) {
1288
- let n = e, r = t, a = A(), o = X(), s = xn(), c = z(!0), l = z(!1), u = z(null), d = z(null), f = j(() => n.invoices.filter((e) => e.status === i.DRAFT)), p = j(() => f.value.map((e) => e.uuid)), h = j(() => u.value?.meta.processed ?? 0), g = j(() => $.getUnskippedInvoiceUuids(f.value, u.value?.skipped ?? [])), _ = j(() => {
1288
+ let n = e, r = t, i = A(), o = X(), s = Sn(), c = z(!0), l = z(!1), u = z(null), d = z(null), f = j(() => n.invoices.filter((e) => e.status === a.DRAFT)), p = j(() => f.value.map((e) => e.uuid)), h = j(() => u.value?.meta.processed ?? 0), g = j(() => $.getUnskippedInvoiceUuids(f.value, u.value?.skipped ?? [])), _ = j(() => {
1289
1289
  let e = new Set(g.value);
1290
1290
  return n.invoices.filter((t) => !e.has(t.uuid));
1291
1291
  }), v = j(() => _.value.length), y = j(() => u.value === null ? n.invoices.length : h.value);
1292
- async function x() {
1292
+ async function ee() {
1293
1293
  let e = g.value;
1294
1294
  if (e.length === 0 || l.value) return;
1295
1295
  l.value = !0;
@@ -1301,43 +1301,43 @@ var Sn = /* @__PURE__ */ L({
1301
1301
  let c = new Set(t.value.skipped.map((e) => e.uuid)), d = e.filter((e) => !c.has(e));
1302
1302
  u.value = t.value, d.length > 0 && O.reflectBulkAction(d, {
1303
1303
  lifecycleStatus: m.READY,
1304
- status: i.READY
1305
- }), t.value.meta.processed > 0 && o.show({ message: a.t("wise_invoicing.invoice.overview.bulk.mark_as_ready.success", { count: t.value.meta.processed }) }), v.value > 0 && o.show($.createSkippedToast({
1304
+ status: a.READY
1305
+ }), t.value.meta.processed > 0 && o.show({ message: i.t("wise_invoicing.invoice.overview.bulk.mark_as_ready.success", { count: t.value.meta.processed }) }), v.value > 0 && o.show($.createSkippedToast({
1306
1306
  id: "invoice-overview-bulk-mark-as-ready-skipped",
1307
1307
  invoices: _.value,
1308
- message: a.t("wise_invoicing.invoice.overview.bulk.mark_as_ready.skipped", { count: v.value })
1308
+ message: i.t("wise_invoicing.invoice.overview.bulk.mark_as_ready.skipped", { count: v.value })
1309
1309
  })), t.value.meta.processed !== 0 && (n.onMarkedAsReady(), r("close"));
1310
1310
  }
1311
- async function S() {
1311
+ async function x() {
1312
1312
  if (c.value = !0, p.value.length === 0) {
1313
1313
  u.value = $.createEmptyPreview(), c.value = !1;
1314
1314
  return;
1315
1315
  }
1316
1316
  let e = await b.previewBulkMarkAsReady(p.value);
1317
1317
  if (e.isErr()) {
1318
- d.value = a.t("wise_invoicing.invoice.overview.bulk.preview_error"), c.value = !1;
1318
+ d.value = i.t("wise_invoicing.invoice.overview.bulk.preview_error"), c.value = !1;
1319
1319
  return;
1320
1320
  }
1321
1321
  u.value = e.value, c.value = !1;
1322
1322
  }
1323
- return Ve(() => {
1324
- S();
1325
- }), (e, t) => (R(), M(yn, {
1326
- "confirm-label": V(a).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.confirm"),
1327
- description: V(a).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.description"),
1328
- icon: V(oe),
1323
+ return He(() => {
1324
+ x();
1325
+ }), (e, t) => (R(), M(bn, {
1326
+ "confirm-label": V(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.confirm"),
1327
+ description: V(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.description"),
1328
+ icon: V(de),
1329
1329
  "is-preview-loading": c.value,
1330
1330
  "is-submitting": l.value,
1331
- "loading-label": V(a).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.loading"),
1332
- "none-processable-label": V(a).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.none_processable"),
1331
+ "loading-label": V(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.loading"),
1332
+ "none-processable-label": V(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.none_processable"),
1333
1333
  "preview-error-label": d.value,
1334
1334
  "processable-count": h.value,
1335
- "processable-label": V(a).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.processable", { count: h.value }),
1335
+ "processable-label": V(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.processable", { count: h.value }),
1336
1336
  "skipped-invoices": _.value,
1337
- "skipped-preview-label": V(a).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.skipped_preview", { count: v.value }),
1338
- title: V(a).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.title", { count: y.value }),
1337
+ "skipped-preview-label": V(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.skipped_preview", { count: v.value }),
1338
+ title: V(i).t("wise_invoicing.invoice.overview.bulk.mark_as_ready.title", { count: y.value }),
1339
1339
  onClose: t[0] ||= (e) => r("close"),
1340
- onConfirm: x
1340
+ onConfirm: ee
1341
1341
  }, null, 8, [
1342
1342
  "confirm-label",
1343
1343
  "description",
@@ -1357,7 +1357,7 @@ var Sn = /* @__PURE__ */ L({
1357
1357
  });
1358
1358
  //#endregion
1359
1359
  //#region src/modules/invoice/api/mutations/invoiceBulkSendApproval.mutation.ts
1360
- function Cn() {
1360
+ function wn() {
1361
1361
  return U({
1362
1362
  queryFn: (e) => b.bulkSendApproval(e.params.invoiceUuids),
1363
1363
  queryKeysToInvalidate: {
@@ -1368,7 +1368,7 @@ function Cn() {
1368
1368
  }
1369
1369
  //#endregion
1370
1370
  //#region src/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendApprovalDialog.vue
1371
- var wn = /* @__PURE__ */ L({
1371
+ var Tn = /* @__PURE__ */ L({
1372
1372
  __name: "InvoiceOverviewBulkSendApprovalDialog",
1373
1373
  props: {
1374
1374
  invoices: {},
@@ -1376,52 +1376,52 @@ var wn = /* @__PURE__ */ L({
1376
1376
  },
1377
1377
  emits: ["close"],
1378
1378
  setup(e, { emit: t }) {
1379
- let i = e, a = t, o = A(), s = X(), c = Cn(), l = z(!0), u = z(!1), d = z(null), f = z(null), p = j(() => i.invoices.filter((e) => {
1379
+ let n = e, a = t, o = A(), s = X(), c = wn(), l = z(!0), u = z(!1), d = z(null), f = z(null), p = j(() => n.invoices.filter((e) => {
1380
1380
  let t = D.getDisplayStatus({
1381
1381
  approval: e.approval,
1382
1382
  requiresPriorApproval: e.requiresPriorApproval
1383
1383
  });
1384
- return t !== null && t !== r.APPROVED;
1384
+ return t !== null && t !== i.APPROVED;
1385
1385
  })), m = j(() => p.value.map((e) => e.uuid)), h = j(() => d.value?.meta.processed ?? 0), g = j(() => $.getUnskippedInvoiceUuids(p.value, d.value?.skipped ?? [])), _ = j(() => {
1386
1386
  let e = new Set(g.value);
1387
- return i.invoices.filter((t) => !e.has(t.uuid));
1387
+ return n.invoices.filter((t) => !e.has(t.uuid));
1388
1388
  }), v = j(() => _.value.length), y = j(() => {
1389
1389
  let e = $.getSkipReasonKeys(d.value?.skipped ?? []), t = {};
1390
1390
  for (let n of _.value) {
1391
- let i = e[n.uuid];
1392
- if (i !== void 0) {
1393
- t[n.uuid] = o.t(i);
1391
+ let r = e[n.uuid];
1392
+ if (r !== void 0) {
1393
+ t[n.uuid] = o.t(r);
1394
1394
  continue;
1395
1395
  }
1396
1396
  let a = D.getDisplayStatus({
1397
1397
  approval: n.approval,
1398
1398
  requiresPriorApproval: n.requiresPriorApproval
1399
1399
  });
1400
- t[n.uuid] = a === r.APPROVED ? o.t("wise_invoicing.invoice.overview.bulk.skip_reason.already_approved") : o.t("wise_invoicing.invoice.overview.bulk.skip_reason.approval_not_required");
1400
+ t[n.uuid] = a === i.APPROVED ? o.t("wise_invoicing.invoice.overview.bulk.skip_reason.already_approved") : o.t("wise_invoicing.invoice.overview.bulk.skip_reason.approval_not_required");
1401
1401
  }
1402
1402
  return t;
1403
- }), x = j(() => d.value === null ? i.invoices.length : h.value);
1404
- async function S() {
1403
+ }), ee = j(() => d.value === null ? n.invoices.length : h.value);
1404
+ async function x() {
1405
1405
  let e = g.value;
1406
1406
  if (e.length === 0 || u.value) return;
1407
- let t = _.value, r = y.value;
1407
+ let t = _.value, i = y.value;
1408
1408
  u.value = !0;
1409
1409
  let l = await c.execute({ params: { invoiceUuids: e } });
1410
1410
  if (u.value = !1, l.isErr()) {
1411
1411
  s.apiError(l.error);
1412
1412
  return;
1413
1413
  }
1414
- let d = new Set(l.value.skipped.map((e) => e.uuid)), f = [...t, ...i.invoices.filter((e) => d.has(e.uuid))], p = e.filter((e) => !d.has(e));
1414
+ let d = new Set(l.value.skipped.map((e) => e.uuid)), f = [...t, ...n.invoices.filter((e) => d.has(e.uuid))], p = e.filter((e) => !d.has(e));
1415
1415
  if (p.length > 0 && O.reflectBulkAction(p, {
1416
1416
  hasChangesSinceApprovalSent: !1,
1417
1417
  approval: {
1418
1418
  reminderSentAt: null,
1419
- sentAt: Qe.Now.instant(),
1419
+ sentAt: $e.Now.instant(),
1420
1420
  level: null,
1421
- status: n.REQUESTED
1421
+ status: r.REQUESTED
1422
1422
  }
1423
1423
  }), l.value.meta.processed > 0 && s.show({ message: o.t("wise_invoicing.invoice.overview.bulk.send_approval.success", { count: l.value.meta.processed }) }), f.length > 0) {
1424
- let e = { ...r }, t = $.getSkipReasonKeys(l.value.skipped);
1424
+ let e = { ...i }, t = $.getSkipReasonKeys(l.value.skipped);
1425
1425
  for (let [n, r] of Object.entries(t)) e[n] = o.t(r);
1426
1426
  s.show($.createSkippedToast({
1427
1427
  id: "invoice-overview-bulk-send-approval-skipped",
@@ -1430,9 +1430,9 @@ var wn = /* @__PURE__ */ L({
1430
1430
  reasons: e
1431
1431
  }));
1432
1432
  }
1433
- l.value.meta.processed !== 0 && (i.onSent(), a("close"));
1433
+ l.value.meta.processed !== 0 && (n.onSent(), a("close"));
1434
1434
  }
1435
- async function ee() {
1435
+ async function S() {
1436
1436
  if (l.value = !0, m.value.length === 0) {
1437
1437
  d.value = $.createEmptyPreview(), l.value = !1;
1438
1438
  return;
@@ -1444,12 +1444,12 @@ var wn = /* @__PURE__ */ L({
1444
1444
  }
1445
1445
  d.value = e.value, l.value = !1;
1446
1446
  }
1447
- return Ve(() => {
1448
- ee();
1449
- }), (e, t) => (R(), M(yn, {
1447
+ return He(() => {
1448
+ S();
1449
+ }), (e, t) => (R(), M(bn, {
1450
1450
  "confirm-label": V(o).t("wise_invoicing.invoice.overview.bulk.send_approval.confirm"),
1451
1451
  description: V(o).t("wise_invoicing.invoice.overview.bulk.send_approval.description"),
1452
- icon: V(ne),
1452
+ icon: V(se),
1453
1453
  "is-preview-loading": l.value,
1454
1454
  "is-submitting": u.value,
1455
1455
  "loading-label": V(o).t("wise_invoicing.invoice.overview.bulk.send_approval.loading"),
@@ -1460,9 +1460,9 @@ var wn = /* @__PURE__ */ L({
1460
1460
  "skip-reasons": y.value,
1461
1461
  "skipped-invoices": _.value,
1462
1462
  "skipped-preview-label": V(o).t("wise_invoicing.invoice.overview.bulk.send_approval.skipped_preview", { count: v.value }),
1463
- title: V(o).t("wise_invoicing.invoice.overview.bulk.send_approval.title", { count: x.value }),
1463
+ title: V(o).t("wise_invoicing.invoice.overview.bulk.send_approval.title", { count: ee.value }),
1464
1464
  onClose: t[0] ||= (e) => a("close"),
1465
- onConfirm: S
1465
+ onConfirm: x
1466
1466
  }, null, 8, [
1467
1467
  "confirm-label",
1468
1468
  "description",
@@ -1483,7 +1483,7 @@ var wn = /* @__PURE__ */ L({
1483
1483
  });
1484
1484
  //#endregion
1485
1485
  //#region src/modules/invoice/api/mutations/invoiceBulkSend.mutation.ts
1486
- function Tn() {
1486
+ function En() {
1487
1487
  return U({
1488
1488
  queryFn: (e) => b.bulkSend(e.params.invoiceUuids),
1489
1489
  queryKeysToInvalidate: { invoiceDetail: {} }
@@ -1491,7 +1491,7 @@ function Tn() {
1491
1491
  }
1492
1492
  //#endregion
1493
1493
  //#region src/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendDialog.vue
1494
- var En = /* @__PURE__ */ L({
1494
+ var Dn = /* @__PURE__ */ L({
1495
1495
  __name: "InvoiceOverviewBulkSendDialog",
1496
1496
  props: {
1497
1497
  invoices: {},
@@ -1499,11 +1499,11 @@ var En = /* @__PURE__ */ L({
1499
1499
  },
1500
1500
  emits: ["close"],
1501
1501
  setup(e, { emit: t }) {
1502
- let n = e, r = t, a = A(), o = X(), s = Tn(), c = z(!0), l = z(!1), u = z(null), d = z(null), p = j(() => n.invoices.filter((e) => e.status === i.FINALIZED)), m = j(() => p.value.map((e) => e.uuid)), h = j(() => u.value?.meta.processed ?? 0), g = j(() => $.getUnskippedInvoiceUuids(p.value, u.value?.skipped ?? [])), _ = j(() => {
1502
+ let n = e, r = t, i = A(), o = X(), s = En(), c = z(!0), l = z(!1), u = z(null), d = z(null), p = j(() => n.invoices.filter((e) => e.status === a.FINALIZED)), m = j(() => p.value.map((e) => e.uuid)), h = j(() => u.value?.meta.processed ?? 0), g = j(() => $.getUnskippedInvoiceUuids(p.value, u.value?.skipped ?? [])), _ = j(() => {
1503
1503
  let e = new Set(g.value);
1504
1504
  return n.invoices.filter((t) => !e.has(t.uuid));
1505
1505
  }), v = j(() => _.value.length), y = j(() => u.value === null ? n.invoices.length : h.value);
1506
- async function x() {
1506
+ async function ee() {
1507
1507
  let e = g.value;
1508
1508
  if (e.length === 0 || l.value) return;
1509
1509
  l.value = !0;
@@ -1512,43 +1512,43 @@ var En = /* @__PURE__ */ L({
1512
1512
  o.apiError(t.error);
1513
1513
  return;
1514
1514
  }
1515
- let i = new Set(t.value.skipped.map((e) => e.uuid)), c = e.filter((e) => !i.has(e));
1516
- u.value = t.value, c.length > 0 && O.reflectBulkAction(c, { deliveryStatus: f.PROCESSING }), t.value.meta.processed > 0 && o.show({ message: a.t("wise_invoicing.invoice.overview.bulk.send.success", { count: t.value.meta.processed }) }), v.value > 0 && o.show($.createSkippedToast({
1515
+ let a = new Set(t.value.skipped.map((e) => e.uuid)), c = e.filter((e) => !a.has(e));
1516
+ u.value = t.value, c.length > 0 && O.reflectBulkAction(c, { deliveryStatus: f.PROCESSING }), t.value.meta.processed > 0 && o.show({ message: i.t("wise_invoicing.invoice.overview.bulk.send.success", { count: t.value.meta.processed }) }), v.value > 0 && o.show($.createSkippedToast({
1517
1517
  id: "invoice-overview-bulk-send-skipped",
1518
1518
  invoices: _.value,
1519
- message: a.t("wise_invoicing.invoice.overview.bulk.send.skipped", { count: v.value })
1519
+ message: i.t("wise_invoicing.invoice.overview.bulk.send.skipped", { count: v.value })
1520
1520
  })), t.value.meta.processed !== 0 && (n.onSent(), r("close"));
1521
1521
  }
1522
- async function S() {
1522
+ async function x() {
1523
1523
  if (c.value = !0, m.value.length === 0) {
1524
1524
  u.value = $.createEmptyPreview(), c.value = !1;
1525
1525
  return;
1526
1526
  }
1527
1527
  let e = await b.previewBulkSend(m.value);
1528
1528
  if (e.isErr()) {
1529
- d.value = a.t("wise_invoicing.invoice.overview.bulk.preview_error"), c.value = !1;
1529
+ d.value = i.t("wise_invoicing.invoice.overview.bulk.preview_error"), c.value = !1;
1530
1530
  return;
1531
1531
  }
1532
1532
  u.value = e.value, c.value = !1;
1533
1533
  }
1534
- return Ve(() => {
1535
- S();
1536
- }), (e, t) => (R(), M(yn, {
1537
- "confirm-label": V(a).t("wise_invoicing.invoice.overview.bulk.send.confirm"),
1538
- description: V(a).t("wise_invoicing.invoice.overview.bulk.send.description"),
1539
- icon: V(ne),
1534
+ return He(() => {
1535
+ x();
1536
+ }), (e, t) => (R(), M(bn, {
1537
+ "confirm-label": V(i).t("wise_invoicing.invoice.overview.bulk.send.confirm"),
1538
+ description: V(i).t("wise_invoicing.invoice.overview.bulk.send.description"),
1539
+ icon: V(se),
1540
1540
  "is-preview-loading": c.value,
1541
1541
  "is-submitting": l.value,
1542
- "loading-label": V(a).t("wise_invoicing.invoice.overview.bulk.send.loading"),
1543
- "none-processable-label": V(a).t("wise_invoicing.invoice.overview.bulk.send.none_processable"),
1542
+ "loading-label": V(i).t("wise_invoicing.invoice.overview.bulk.send.loading"),
1543
+ "none-processable-label": V(i).t("wise_invoicing.invoice.overview.bulk.send.none_processable"),
1544
1544
  "preview-error-label": d.value,
1545
1545
  "processable-count": h.value,
1546
- "processable-label": V(a).t("wise_invoicing.invoice.overview.bulk.send.processable", { count: h.value }),
1546
+ "processable-label": V(i).t("wise_invoicing.invoice.overview.bulk.send.processable", { count: h.value }),
1547
1547
  "skipped-invoices": _.value,
1548
- "skipped-preview-label": V(a).t("wise_invoicing.invoice.overview.bulk.send.skipped_preview", { count: v.value }),
1549
- title: V(a).t("wise_invoicing.invoice.overview.bulk.send.title", { count: y.value }),
1548
+ "skipped-preview-label": V(i).t("wise_invoicing.invoice.overview.bulk.send.skipped_preview", { count: v.value }),
1549
+ title: V(i).t("wise_invoicing.invoice.overview.bulk.send.title", { count: y.value }),
1550
1550
  onClose: t[0] ||= (e) => r("close"),
1551
- onConfirm: x
1551
+ onConfirm: ee
1552
1552
  }, null, 8, [
1553
1553
  "confirm-label",
1554
1554
  "description",
@@ -1565,25 +1565,25 @@ var En = /* @__PURE__ */ L({
1565
1565
  "title"
1566
1566
  ]));
1567
1567
  }
1568
- }), Dn = /* @__PURE__ */ L({
1568
+ }), On = /* @__PURE__ */ L({
1569
1569
  __name: "DateRangeFilterButton",
1570
- props: /*@__PURE__*/ Re({ ariaLabel: {} }, {
1570
+ props: /*@__PURE__*/ ze({ ariaLabel: {} }, {
1571
1571
  modelValue: { default: null },
1572
1572
  modelModifiers: {}
1573
1573
  }),
1574
1574
  emits: ["update:modelValue"],
1575
1575
  setup(e) {
1576
- let t = e, n = Ge(e, "modelValue"), r = A(), i = z(!1), a = z({
1576
+ let t = e, n = Ke(e, "modelValue"), r = A(), i = z(!1), a = z({
1577
1577
  from: null,
1578
1578
  until: null
1579
1579
  });
1580
- Ke(i, (e) => {
1580
+ qe(i, (e) => {
1581
1581
  e && (a.value = {
1582
1582
  from: n.value?.from ?? null,
1583
1583
  until: n.value?.until ?? null
1584
1584
  });
1585
1585
  });
1586
- let o = ue(), 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)}`);
1586
+ let o = he(), 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)}`);
1587
1587
  function c() {
1588
1588
  n.value = a.value.from !== null || a.value.until !== null ? { ...a.value } : null, i.value = !1;
1589
1589
  }
@@ -1593,7 +1593,7 @@ var En = /* @__PURE__ */ L({
1593
1593
  function u() {
1594
1594
  n.value = null, i.value = !1;
1595
1595
  }
1596
- return (e, n) => (R(), M(V(mt), {
1596
+ return (e, n) => (R(), M(V(ht), {
1597
1597
  "is-open": i.value,
1598
1598
  "onUpdate:isOpen": n[1] ||= (e) => i.value = e,
1599
1599
  "popover-side": "bottom",
@@ -1602,14 +1602,14 @@ var En = /* @__PURE__ */ L({
1602
1602
  trigger: H(() => [I(V(W), {
1603
1603
  "aria-label": t.ariaLabel,
1604
1604
  label: s.value,
1605
- "icon-right": V(ee),
1605
+ "icon-right": V(ae),
1606
1606
  variant: "secondary"
1607
1607
  }, null, 8, [
1608
1608
  "aria-label",
1609
1609
  "label",
1610
1610
  "icon-right"
1611
1611
  ])]),
1612
- content: H(() => [I(V(it), {
1612
+ content: H(() => [I(V(at), {
1613
1613
  modelValue: a.value,
1614
1614
  "onUpdate:modelValue": n[0] ||= (e) => a.value = e,
1615
1615
  class: "p-lg"
@@ -1640,7 +1640,7 @@ var En = /* @__PURE__ */ L({
1640
1640
  _: 1
1641
1641
  }, 8, ["is-open"]));
1642
1642
  }
1643
- }), On = { class: "relative flex min-h-0 flex-1 flex-col" }, kn = /* @__PURE__ */ L({
1643
+ }), kn = { class: "relative flex min-h-0 flex-1 flex-col" }, An = /* @__PURE__ */ L({
1644
1644
  __name: "InvoiceOverviewView",
1645
1645
  props: {
1646
1646
  currency: {},
@@ -1648,70 +1648,70 @@ var En = /* @__PURE__ */ L({
1648
1648
  onCreateInvoice: { type: Function }
1649
1649
  },
1650
1650
  setup(e) {
1651
- let t = e, n = A(), a = u(), o = Et(), c = o.create(It), l = o.create(bn), d = o.create(Sn), m = o.create(En), h = o.create(wn), g = v({ debounceMs: 300 }), _ = kt("tab", "all"), b = y({
1651
+ let n = e, r = A(), o = u(), s = Dt(), c = s.create(Lt), l = s.create(xn), d = s.create(Cn), m = s.create(Dn), h = s.create(Tn), g = v({ debounceMs: 300 }), _ = At("tab", "all"), b = y({
1652
1652
  initialValues: [{
1653
1653
  direction: "desc",
1654
- key: s.ISSUED_ON
1654
+ key: t.ISSUED_ON
1655
1655
  }],
1656
1656
  keys: [
1657
- s.CUSTOMER,
1658
- s.SEQUENCE,
1659
- s.ISSUED_ON,
1660
- s.NET_AMOUNT
1657
+ t.CUSTOMER,
1658
+ t.SEQUENCE,
1659
+ t.ISSUED_ON,
1660
+ t.NET_AMOUNT
1661
1661
  ]
1662
- }), x = Ut(), { hasChangesSinceApprovalSent: S, approvalStatuses: ee, customerUuids: ne, customFields: re, dueOnRange: ie, filters: ae, lifecycleStatuses: oe } = Vt({
1663
- currency: t.currency,
1664
- customFieldDefinitions: t.customFieldDefinitions
1662
+ }), x = Wt(), S = j(() => te.filterByView(n.customFieldDefinitions, ee.INVOICE_OVERVIEW)), { hasChangesSinceApprovalSent: ne, approvalStatuses: re, customerUuids: ie, customFields: ae, dueOnRange: se, filters: ce, lifecycleStatuses: le } = Ht({
1663
+ currency: n.currency,
1664
+ customFieldDefinitions: S.value
1665
1665
  });
1666
- he(ae);
1667
- let se = z(null), le = j(() => x.getFilters(_.value)), { isFetchingNextPage: ue, isLoading: de, fetchNextPage: fe, refetch: pe, result: C } = At({ params: {
1666
+ be(ce);
1667
+ let ue = z(null), de = j(() => x.getFilters(_.value)), { isFetchingNextPage: fe, isLoading: me, fetchNextPage: he, refetch: ge, result: C } = jt({ params: {
1668
1668
  filters: j(() => ({
1669
- hasChangesSinceApprovalSent: S.value,
1670
- issuedOnRange: se.value,
1671
- approvalStatuses: ee.value,
1672
- customerUuids: ne.value,
1673
- customFields: re.value,
1674
- dueOnRange: ie.value,
1675
- lifecycleStatuses: oe.value,
1676
- ...le.value
1669
+ hasChangesSinceApprovalSent: ne.value,
1670
+ issuedOnRange: ue.value,
1671
+ approvalStatuses: re.value,
1672
+ customerUuids: ie.value,
1673
+ customFields: ae.value,
1674
+ dueOnRange: se.value,
1675
+ lifecycleStatuses: le.value,
1676
+ ...de.value
1677
1677
  })),
1678
1678
  search: g.debouncedSearch,
1679
1679
  sort: b.values
1680
1680
  } });
1681
- a.set(() => n.t("wise_invoicing.invoice.overview.title"));
1682
- let me = { name: () => n.t("wise_invoicing.invoice.overview.title") }, w = j(() => C.value.isOk() ? C.value.getValue().data : []), T = Wt({ rows: () => w.value });
1683
- ce({
1684
- refetch: pe,
1681
+ o.set(() => r.t("wise_invoicing.invoice.overview.title"));
1682
+ let _e = { name: () => r.t("wise_invoicing.invoice.overview.title") }, w = j(() => C.value.isOk() ? C.value.getValue().data : []), T = Gt({ rows: () => w.value });
1683
+ pe({
1684
+ refetch: ge,
1685
1685
  sendingUuids: () => w.value.filter((e) => e.deliveryStatus === f.PROCESSING).map((e) => e.uuid)
1686
1686
  });
1687
- let E = cn({
1688
- customFieldDefinitions: () => t.customFieldDefinitions,
1687
+ let ve = ln({
1688
+ customFieldDefinitions: () => S.value,
1689
1689
  selection: {
1690
1690
  isSelected: T.isSelected,
1691
1691
  toggleRow: T.toggleRow
1692
1692
  }
1693
- }), { customizedColumns: ve, customizeTableAction: ye } = Dt({
1694
- actionGroup: me,
1695
- availableColumns: E,
1696
- initialState: Je("invoice-overview-columns", []).value
1697
- }), be = j(() => C.value.isErr() ? C.value.getError() : null), xe = j(() => ae.activeFilters.value.length), Se = j(() => (g.debouncedSearch.value?.trim().length ?? 0) > 0), Ce = j(() => T.selectedInvoices.value.some((e) => e.status === i.READY)), we = j(() => T.selectedInvoices.value.some((e) => e.status === i.DRAFT)), { canSend: Te } = zt({ selectedInvoices: () => T.selectedInvoices.value }), Ee = j(() => T.selectedInvoices.value.some((e) => {
1693
+ }), { customizedColumns: ye, customizeTableAction: E } = Ot({
1694
+ actionGroup: _e,
1695
+ availableColumns: ve,
1696
+ initialState: Ye("invoice-overview-columns", []).value
1697
+ }), Ce = j(() => C.value.isErr() ? C.value.getError() : null), we = j(() => ce.activeFilters.value.length), Te = j(() => (g.debouncedSearch.value?.trim().length ?? 0) > 0), Ee = j(() => T.selectedInvoices.value.some((e) => e.status === a.READY)), De = j(() => T.selectedInvoices.value.some((e) => e.status === a.DRAFT)), { canSend: Oe } = Bt({ selectedInvoices: () => T.selectedInvoices.value }), ke = j(() => T.selectedInvoices.value.some((e) => {
1698
1698
  let t = D.getDisplayStatus({
1699
1699
  approval: e.approval,
1700
1700
  requiresPriorApproval: e.requiresPriorApproval
1701
1701
  });
1702
- return t !== null && t !== r.APPROVED;
1702
+ return t !== null && t !== i.APPROVED;
1703
1703
  }));
1704
- Ke(w, () => {
1704
+ qe(w, () => {
1705
1705
  T.syncSelection();
1706
1706
  });
1707
- function De() {
1708
- if (t.onCreateInvoice !== void 0) {
1709
- t.onCreateInvoice();
1707
+ function Ae() {
1708
+ if (n.onCreateInvoice !== void 0) {
1709
+ n.onCreateInvoice();
1710
1710
  return;
1711
1711
  }
1712
1712
  c.open();
1713
1713
  }
1714
- async function Oe() {
1714
+ async function je() {
1715
1715
  await d.open({
1716
1716
  invoices: T.selectedInvoices.value,
1717
1717
  onMarkedAsReady: () => {
@@ -1719,7 +1719,7 @@ var En = /* @__PURE__ */ L({
1719
1719
  }
1720
1720
  });
1721
1721
  }
1722
- async function ke() {
1722
+ async function Me() {
1723
1723
  await l.open({
1724
1724
  invoices: T.selectedInvoices.value,
1725
1725
  onFinalized: () => {
@@ -1727,7 +1727,7 @@ var En = /* @__PURE__ */ L({
1727
1727
  }
1728
1728
  });
1729
1729
  }
1730
- async function Ae() {
1730
+ async function O() {
1731
1731
  await m.open({
1732
1732
  invoices: T.selectedInvoices.value,
1733
1733
  onSent: () => {
@@ -1735,7 +1735,7 @@ var En = /* @__PURE__ */ L({
1735
1735
  }
1736
1736
  });
1737
1737
  }
1738
- async function je() {
1738
+ async function Ne() {
1739
1739
  await h.open({
1740
1740
  invoices: T.selectedInvoices.value,
1741
1741
  onSent: () => {
@@ -1743,7 +1743,7 @@ var En = /* @__PURE__ */ L({
1743
1743
  }
1744
1744
  });
1745
1745
  }
1746
- function O(e) {
1746
+ function Pe(e) {
1747
1747
  return e.type === p.CREDIT_NOTE ? {
1748
1748
  name: "invoicing-credit-note-detail",
1749
1749
  params: { creditNoteUuid: e.uuid }
@@ -1752,14 +1752,14 @@ var En = /* @__PURE__ */ L({
1752
1752
  params: { invoiceUuid: e.uuid }
1753
1753
  };
1754
1754
  }
1755
- return (e, t) => (R(), M(V(nt), { title: V(n).t("wise_invoicing.invoice.overview.title") }, {
1756
- "page-actions-left": H(() => [I(V(vt), {
1755
+ return (e, t) => (R(), M(V(rt), { title: V(r).t("wise_invoicing.invoice.overview.title") }, {
1756
+ "page-actions-left": H(() => [I(V(yt), {
1757
1757
  modelValue: V(_),
1758
- "onUpdate:modelValue": t[0] ||= (e) => Le(_) ? _.value = e : null,
1758
+ "onUpdate:modelValue": t[0] ||= (e) => Re(_) ? _.value = e : null,
1759
1759
  variant: "button-border"
1760
1760
  }, {
1761
- default: H(() => [I(V(bt), null, {
1762
- default: H(() => [(R(!0), P(Fe, null, He(V(x).tabs.value, (e) => (R(), M(V(yt), {
1761
+ default: H(() => [I(V(xt), null, {
1762
+ default: H(() => [(R(!0), P(Ie, null, Ue(V(x).tabs.value, (e) => (R(), M(V(bt), {
1763
1763
  key: e.key,
1764
1764
  value: e.key,
1765
1765
  label: e.label
@@ -1772,18 +1772,18 @@ var En = /* @__PURE__ */ L({
1772
1772
  justify: "between",
1773
1773
  class: "items-stretch"
1774
1774
  }, {
1775
- default: H(() => [I(Dn, {
1776
- modelValue: se.value,
1777
- "onUpdate:modelValue": t[1] ||= (e) => se.value = e,
1778
- "aria-label": V(n).t("wise_invoicing.invoice.overview.filters.issued_on")
1775
+ default: H(() => [I(On, {
1776
+ modelValue: ue.value,
1777
+ "onUpdate:modelValue": t[1] ||= (e) => ue.value = e,
1778
+ "aria-label": V(r).t("wise_invoicing.invoice.overview.filters.issued_on")
1779
1779
  }, null, 8, ["modelValue", "aria-label"]), I(V(K), { justify: "end" }, {
1780
1780
  default: H(() => [
1781
- I(V(xt), {
1781
+ I(V(St), {
1782
1782
  modelValue: V(g).search.value,
1783
1783
  "onUpdate:modelValue": t[2] ||= (e) => V(g).search.value = e,
1784
1784
  label: null,
1785
- "icon-left": V(te),
1786
- placeholder: V(n).t("wise_invoicing.common.search"),
1785
+ "icon-left": V(oe),
1786
+ placeholder: V(r).t("wise_invoicing.common.search"),
1787
1787
  size: "sm",
1788
1788
  type: "search"
1789
1789
  }, null, 8, [
@@ -1791,41 +1791,41 @@ var En = /* @__PURE__ */ L({
1791
1791
  "icon-left",
1792
1792
  "placeholder"
1793
1793
  ]),
1794
- Ue(e.$slots, "actions"),
1794
+ We(e.$slots, "actions"),
1795
1795
  I(V(W), {
1796
- label: V(n).t("wise_invoicing.invoice.create.title"),
1797
- onClick: De
1796
+ label: V(r).t("wise_invoicing.invoice.create.title"),
1797
+ onClick: Ae
1798
1798
  }, null, 8, ["label"])
1799
1799
  ]),
1800
1800
  _: 3
1801
1801
  })]),
1802
1802
  _: 3
1803
1803
  })]),
1804
- default: H(() => [I(V(rt), null, {
1804
+ default: H(() => [I(V(it), null, {
1805
1805
  default: H(() => [I(V(K), { justify: "between" }, {
1806
- default: H(() => [I(V(ge)), I(V(_e))]),
1806
+ default: H(() => [I(V(xe)), I(V(Se))]),
1807
1807
  _: 1
1808
1808
  })]),
1809
1809
  _: 1
1810
- }), F("div", On, [I(V(ht), {
1811
- columns: V(ve),
1810
+ }), F("div", kn, [I(V(gt), {
1811
+ columns: V(ye),
1812
1812
  data: w.value,
1813
- "is-loading": V(de),
1814
- "is-fetching-next-page": V(ue),
1815
- error: be.value,
1816
- "has-active-search": Se.value,
1817
- "active-filter-count": xe.value,
1813
+ "is-loading": V(me),
1814
+ "is-fetching-next-page": V(fe),
1815
+ error: Ce.value,
1816
+ "has-active-search": Te.value,
1817
+ "active-filter-count": we.value,
1818
1818
  "get-key": (e) => e.uuid,
1819
- "header-actions": [V(ye)],
1820
- "get-link": O,
1819
+ "header-actions": [V(E)],
1820
+ "get-link": Pe,
1821
1821
  "get-action-model": (e) => ({
1822
1822
  modelName: "Invoice",
1823
1823
  key: e.uuid,
1824
1824
  ...e
1825
1825
  }),
1826
- onNextPage: V(fe),
1826
+ onNextPage: V(he),
1827
1827
  onClearSearch: t[3] ||= (e) => V(g).clear(),
1828
- onClearFilters: t[4] ||= (e) => V(ae).clearAll()
1828
+ onClearFilters: t[4] ||= (e) => V(ce).clearAll()
1829
1829
  }, null, 8, [
1830
1830
  "columns",
1831
1831
  "data",
@@ -1838,19 +1838,19 @@ var En = /* @__PURE__ */ L({
1838
1838
  "header-actions",
1839
1839
  "get-action-model",
1840
1840
  "onNextPage"
1841
- ]), I(Rt, {
1842
- "can-finalize": Ce.value,
1841
+ ]), I(zt, {
1842
+ "can-finalize": Ee.value,
1843
1843
  "can-select-all": V(T).canSelectAll.value,
1844
- "can-mark-as-ready": we.value,
1845
- "can-send": V(Te),
1846
- "can-send-approval": Ee.value,
1844
+ "can-mark-as-ready": De.value,
1845
+ "can-send": V(Oe),
1846
+ "can-send-approval": ke.value,
1847
1847
  "selected-count": V(T).selectedCount.value,
1848
1848
  onCancel: t[5] ||= (e) => V(T).clearSelection(),
1849
- onFinalize: t[6] ||= (e) => ke(),
1850
- onMarkAsReady: t[7] ||= (e) => Oe(),
1849
+ onFinalize: t[6] ||= (e) => Me(),
1850
+ onMarkAsReady: t[7] ||= (e) => je(),
1851
1851
  onSelectAll: t[8] ||= (e) => V(T).selectAll(),
1852
- onSend: t[9] ||= (e) => Ae(),
1853
- onSendApproval: t[10] ||= (e) => je()
1852
+ onSend: t[9] ||= (e) => O(),
1853
+ onSendApproval: t[10] ||= (e) => Ne()
1854
1854
  }, null, 8, [
1855
1855
  "can-finalize",
1856
1856
  "can-select-all",
@@ -1862,31 +1862,31 @@ var En = /* @__PURE__ */ L({
1862
1862
  _: 3
1863
1863
  }, 8, ["title"]));
1864
1864
  }
1865
- }), An = /*@__PURE__*/ L({
1865
+ }), jn = /*@__PURE__*/ L({
1866
1866
  __name: "InvoiceOverviewViewDataProvider",
1867
1867
  props: { onCreateInvoice: { type: Function } },
1868
1868
  setup(e) {
1869
- let t = xe(j(() => ({ entityTypes: [c.INVOICE] }))), n = Ne();
1870
- return (r, i) => (R(), M(de, { queries: {
1869
+ let t = x(j(() => ({ entityTypes: [c.INVOICE] }))), n = Pe();
1870
+ return (r, i) => (R(), M(ge, { queries: {
1871
1871
  customFieldDefinitions: V(t),
1872
1872
  issuerSettings: V(n)
1873
1873
  } }, {
1874
- default: H(({ data: t }) => [I(kn, {
1874
+ default: H(({ data: t }) => [I(An, {
1875
1875
  currency: t.issuerSettings.currency,
1876
1876
  "custom-field-definitions": t.customFieldDefinitions,
1877
1877
  "on-create-invoice": e.onCreateInvoice
1878
1878
  }, {
1879
- actions: H(() => [Ue(r.$slots, "actions")]),
1879
+ actions: H(() => [We(r.$slots, "actions")]),
1880
1880
  _: 3
1881
1881
  }, 8, [
1882
1882
  "currency",
1883
1883
  "custom-field-definitions",
1884
1884
  "on-create-invoice"
1885
1885
  ])]),
1886
- loading: H(() => [I(V(Pe).PageLoadingState, { breadcrumbs: [] })]),
1886
+ loading: H(() => [I(V(Fe).PageLoadingState, { breadcrumbs: [] })]),
1887
1887
  _: 3
1888
1888
  }, 8, ["queries"]));
1889
1889
  }
1890
- }), jn = /* @__PURE__ */ e({ default: () => Mn }), Mn = An;
1890
+ }), Mn = /* @__PURE__ */ e({ default: () => Nn }), Nn = jn;
1891
1891
  //#endregion
1892
- export { jn as n, At as r, Mn as t };
1892
+ export { Mn as n, jt as r, Nn as t };