@wisemen/wise-invoicing-web 0.18.0 → 0.20.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 (55) hide show
  1. package/dist/{ApprovalReminderSettingsViewDataProvider-BZBuz6EF.js → ApprovalReminderSettingsViewDataProvider-DMWLX53_.js} +11 -11
  2. package/dist/{BillingDocumentDetailViewDataProvider-BCADHPFR.js → BillingDocumentDetailViewDataProvider-jpp-QwPi.js} +1474 -1454
  3. package/dist/{BillingDocumentPdf-ddBlGdIN.js → BillingDocumentPdf-Zw3GXZVE.js} +82 -82
  4. package/dist/{DunningCaseSendDialog-fgL9OsV8.js → DunningCaseSendDialog-CA-nzjzV.js} +23 -23
  5. package/dist/{InvoiceApprovalOutOfSyncIndicator-BoPBNXx1.js → InvoiceApprovalOutOfSyncIndicator-Dnw03isr.js} +1 -1
  6. package/dist/{InvoiceApprovalOverviewView-BIiJ6gen.js → InvoiceApprovalOverviewView-CoJXggOy.js} +140 -140
  7. package/dist/{InvoiceApprovalStatusBadge-CaVSCtI0.js → InvoiceApprovalStatusBadge-BWx3Fhuy.js} +3 -3
  8. package/dist/{InvoicePdfView-BRJaAErd.js → InvoicePdfView-Bv5aMLh6.js} +2 -2
  9. package/dist/{InvoicePublicProFormaPdfViewDataProvider-mZaggXYf.js → InvoicePublicProFormaPdfViewDataProvider-Ca7-AmAH.js} +3 -3
  10. package/dist/{InvoiceApproveDialogDataProvider-C9NhZX-D.js → InvoiceRejectDialog-Ca-4nz4U.js} +178 -178
  11. package/dist/{invoiceDeliveryStatus.util-Dp9hD1Tj.js → InvoiceStatusBadge-uXAh9ypU.js} +83 -83
  12. package/dist/{InvoicingFileUploadProvider-rU9APFrt.js → InvoicingFileUploadProvider-C3cyIUhL.js} +2 -2
  13. package/dist/IssuerSettingsViewDataProvider-C-CRF9sK.js +544 -0
  14. package/dist/{PeppolSettingsViewDataProvider-DymLdaRM.js → PeppolSettingsViewDataProvider-COQEInsh.js} +32 -32
  15. package/dist/{api.util-sW4gNny-.js → api.util-DSerLsgA.js} +666 -648
  16. package/dist/billingDocumentDetail.transformer-ClWwi8h4.js +310 -0
  17. package/dist/client/index.d.ts +2 -2
  18. package/dist/client/sdk.gen.d.ts +5 -5
  19. package/dist/client/types.gen.d.ts +81 -46
  20. package/dist/client/zod.gen.d.ts +1304 -96
  21. package/dist/{creditNoteDetail.query-DiS_-xFz.js → creditNoteDetail.query-q1b6nzu0.js} +5 -5
  22. package/dist/{InvoiceDeliverySendDialog-BICcd6Cf.js → customFieldDefinitionIndex.query-DQxer9Je.js} +236 -239
  23. package/dist/{deliveryReason.util-KBh3q_-P.js → deliveryReason.util-BlxvUaz0.js} +2 -2
  24. package/dist/{dist-C99_-gWv.js → dist-47-1LAzT.js} +6 -6
  25. package/dist/{documentTitle.composable-Dl8Cm3v3.js → documentTitle.composable-D5uPh3uG.js} +37 -35
  26. package/dist/{i18n.lib-DckceEsg.js → i18n.lib-DB15VQsH.js} +2 -0
  27. package/dist/index.d.ts +6 -0
  28. package/dist/index.js +6021 -3054
  29. package/dist/{invoice.service-2QiktTs9.js → invoice.service-BKgP2p8z.js} +199 -198
  30. package/dist/{invoiceApproval.service-DXIKgCI_.js → invoiceApproval.service-oT1fvhsW.js} +5 -4
  31. package/dist/{invoiceApprovalStatus.util-CB5pi_hm.js → invoiceApprovalStatus.util-D17DWEh1.js} +29 -29
  32. package/dist/{invoiceCustomer.service-BNQJt1KV.js → invoiceCustomer.service-CLYUR6vc.js} +2 -2
  33. package/dist/{invoiceDetail.query-MIrBYgNS.js → invoiceDetail.query-CzyZqT82.js} +1 -1
  34. package/dist/{invoicingConfig.composable-D-hxnEnh.js → invoicingConfig.composable-CzgTMtog.js} +2 -2
  35. package/dist/{issuerSettings.query-CR7EtvNm.js → issuerSettings.query-D8T34N7f.js} +27 -27
  36. package/dist/libs/i18n.lib.d.ts +2 -0
  37. package/dist/locales/en-US.json.d.ts +1 -0
  38. package/dist/locales/nl-BE.json.d.ts +1 -0
  39. package/dist/modules/invoice/api/mutations/invoiceBulkSendApproval.mutation.d.ts +2 -2
  40. package/dist/modules/invoice/api/services/invoice.service.d.ts +3 -3
  41. package/dist/modules/invoice/models/invoice/detail/invoiceDetail.model.d.ts +2 -1
  42. package/dist/modules/invoice/models/invoice/index/invoiceIndexQueryParams.model.d.ts +1 -0
  43. package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewBulkActionBar.vue.d.ts +2 -2
  44. package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.action.d.ts +1 -1
  45. package/dist/modules/invoice-approval/models/invoiceApprovalIndex.model.d.ts +2 -1
  46. package/dist/{reminderConfig.query-DJmhJp6W.js → reminderConfig.query-CFmCWWlO.js} +7 -7
  47. package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableField.vue.d.ts +1 -1
  48. package/package.json +1 -1
  49. package/dist/CreditNoteDetailViewDataProvider-Donn5pVv.js +0 -816
  50. package/dist/CreditNotePdfViewDataProvider-c-apCeCW.js +0 -22
  51. package/dist/InvoiceDetailViewDataProvider-BppXFT6D.js +0 -2176
  52. package/dist/InvoicePdfViewDataProvider-J7NP1Dhh.js +0 -22
  53. package/dist/IssuerSettingsViewDataProvider-D13f6rvi.js +0 -544
  54. package/dist/billingDocumentDetail.transformer-DcNMzl46.js +0 -310
  55. package/dist/download.util-LyRpGWKA.js +0 -25
@@ -1,56 +1,56 @@
1
- import "./api.util-sW4gNny-.js";
2
- import { a as e, o as t, t as n, y as r } from "./documentTitle.composable-Dl8Cm3v3.js";
3
- import { r as i } from "./useCurrencyFormat.composable-MtZaqKnO.js";
4
- import { t as a } from "./search.composable-CU9OpyUB.js";
5
- import { Ct as o, G as s, H as c, Q as l, R as u, S as d, Tt as f, W as p, Y as m, et as h, ft as ee, i as g, l as te } from "./dist-B33lNwLw.js";
6
- import { r as _ } from "./dist-CyUNvdkD.js";
7
- import { f as v, i as y, n as ne, o as re, r as b, s as ie } from "./dist-C99_-gWv.js";
8
- import { t as x } from "./invoiceApprovalStatus.util-CB5pi_hm.js";
9
- import { n as ae, t as S } from "./InvoiceApprovalOutOfSyncIndicator-BoPBNXx1.js";
10
- import { t as C } from "./InvoiceApprovalStatusBadge-CaVSCtI0.js";
11
- import { i as w, n as T, r as E, t as D } from "./InvoiceApproveDialogDataProvider-C9NhZX-D.js";
12
- import { t as O } from "./invoiceApproval.service-DXIKgCI_.js";
1
+ import "./api.util-DSerLsgA.js";
2
+ import { a as e, b as t, o as n, s as r, t as i } from "./documentTitle.composable-D5uPh3uG.js";
3
+ import { r as a } from "./useCurrencyFormat.composable-MtZaqKnO.js";
4
+ import { t as o } from "./search.composable-CU9OpyUB.js";
5
+ import { Ct as s, G as c, H as l, Q as u, R as d, S as f, Tt as p, W as ee, Y as m, et as h, ft as g, i as _, l as te } from "./dist-B33lNwLw.js";
6
+ import { r as v } from "./dist-CyUNvdkD.js";
7
+ import { t as y } from "./invoiceApprovalStatus.util-D17DWEh1.js";
8
+ import { t as b } from "./InvoiceApprovalStatusBadge-BWx3Fhuy.js";
9
+ import { f as x, i as S, n as ne, o as re, r as C, s as ie } from "./dist-47-1LAzT.js";
10
+ import { i as w, n as ae, r as oe, t as T } from "./InvoiceRejectDialog-Ca-4nz4U.js";
11
+ import { n as E, t as D } from "./InvoiceApprovalOutOfSyncIndicator-Dnw03isr.js";
12
+ import { t as O } from "./invoiceApproval.service-oT1fvhsW.js";
13
13
  import { useI18n as k } from "vue-i18n";
14
- import { Fragment as A, computed as j, createBlock as M, createCommentVNode as N, createElementBlock as P, createElementVNode as F, createVNode as I, defineComponent as L, isRef as oe, nextTick as R, normalizeClass as z, normalizeStyle as se, openBlock as B, ref as ce, renderList as V, resolveDynamicComponent as le, unref as H, withCtx as U } from "vue";
15
- import { useOffsetInfiniteQuery as ue } from "@wisemen/vue-core-api-utils";
16
- import { Temporal as de } from "temporal-polyfill";
17
- import { UIActionTrigger as fe, UIBadge as W, UIButton as G, UIClickableElement as pe, UIColumnLayout as K, UIDashboardPage as me, UIEmptyState as he, UILink as ge, UIRowLayout as q, UITable as _e, UITableCell as J, UITableCellInteractiveElement as ve, UITabs as ye, UITabsItem as be, UITabsList as xe, UIText as Y, createComponent as X, defineTableColumns as Se, useOverlay as Z, useToast as Ce } from "@wisemen/vue-core-design-system";
14
+ import { Fragment as A, computed as j, createBlock as M, createCommentVNode as N, createElementBlock as P, createElementVNode as F, createVNode as I, defineComponent as L, isRef as se, nextTick as R, normalizeClass as z, normalizeStyle as ce, openBlock as B, ref as le, renderList as V, resolveDynamicComponent as ue, unref as H, withCtx as U } from "vue";
15
+ import { useOffsetInfiniteQuery as de } from "@wisemen/vue-core-api-utils";
16
+ import { Temporal as fe } from "temporal-polyfill";
17
+ import { UIActionTrigger as pe, UIBadge as W, UIButton as G, UIClickableElement as me, UIColumnLayout as K, UIDashboardPage as he, UIEmptyState as ge, UILink as _e, UIRowLayout as q, UITable as ve, UITableCell as J, UITableCellInteractiveElement as ye, UITabs as be, UITabsItem as xe, UITabsList as Se, UIText as Y, createComponent as X, defineTableColumns as Ce, useOverlay as Z, useToast as we } from "@wisemen/vue-core-design-system";
18
18
  import { createAction as Q } from "@wisemen/vue-core-actions";
19
- import { useRouteQuery as we } from "@vueuse/router";
19
+ import { useRouteQuery as Te } from "@vueuse/router";
20
20
  //#region src/modules/invoice-approval/actions/invoiceApprovalArchive.action.ts
21
- function Te() {
22
- let e = k(), t = Z().create(w);
21
+ function Ee() {
22
+ let e = k(), n = Z().create(oe);
23
23
  return Q({
24
24
  id: "invoice-approval-archive",
25
25
  isApplicable: (e) => {
26
26
  if (!e.hasTargetedModelsOfType("InvoiceApproval")) return !1;
27
- let t = e.targetedModelOfTypeOrThrow("InvoiceApproval");
28
- return t.approval.status === r.REQUESTED || t.approval.status === r.EXPIRED;
27
+ let n = e.targetedModelOfTypeOrThrow("InvoiceApproval");
28
+ return n.approval.status === t.REQUESTED || n.approval.status === t.EXPIRED;
29
29
  },
30
30
  name: () => e.t("wise_invoicing.invoice.detail.actions.archive_approval"),
31
31
  execute: async (e) => {
32
- let n = e.targetedModelOfTypeOrThrow("InvoiceApproval");
33
- await t.open({
34
- approvalUuid: n.uuid,
35
- invoiceUuid: n.invoiceUuid
32
+ let t = e.targetedModelOfTypeOrThrow("InvoiceApproval");
33
+ await n.open({
34
+ approvalUuid: t.uuid,
35
+ invoiceUuid: t.invoiceUuid
36
36
  });
37
37
  },
38
- icon: () => s
38
+ icon: () => c
39
39
  });
40
40
  }
41
41
  //#endregion
42
42
  //#region src/modules/invoice-approval/actions/invoiceApprovalReject.action.ts
43
- function Ee() {
44
- let e = k(), t = Z().create(E);
43
+ function De() {
44
+ let e = k(), n = Z().create(T);
45
45
  return Q({
46
46
  id: "invoice-approval-reject",
47
- isApplicable: (e) => e.hasTargetedModelsOfType("InvoiceApproval") ? e.targetedModelOfTypeOrThrow("InvoiceApproval").approval.status === r.REQUESTED : !1,
47
+ isApplicable: (e) => e.hasTargetedModelsOfType("InvoiceApproval") ? e.targetedModelOfTypeOrThrow("InvoiceApproval").approval.status === t.REQUESTED : !1,
48
48
  name: () => e.t("wise_invoicing.invoice.detail.actions.reject_approval"),
49
49
  execute: async (e) => {
50
- let n = e.targetedModelOfTypeOrThrow("InvoiceApproval");
51
- await t.open({
52
- approvalUuid: n.uuid,
53
- invoiceUuid: n.invoiceUuid
50
+ let t = e.targetedModelOfTypeOrThrow("InvoiceApproval");
51
+ await n.open({
52
+ approvalUuid: t.uuid,
53
+ invoiceUuid: t.invoiceUuid
54
54
  });
55
55
  },
56
56
  icon: () => m
@@ -58,14 +58,14 @@ function Ee() {
58
58
  }
59
59
  //#endregion
60
60
  //#region src/modules/invoice-approval/actions/invoiceApprovalSendRequest.action.ts
61
- function De(e) {
62
- return e.approval.status === r.REJECTED || e.approval.status === r.EXPIRED || e.hasChangesSinceApprovalSent;
61
+ function Oe(e) {
62
+ return e.mode === n.PRO_FORMA ? e.approval.status === t.REJECTED || e.approval.status === t.EXPIRED || e.hasChangesSinceApprovalSent : !1;
63
63
  }
64
- function Oe() {
65
- let e = k(), t = Ce(), n = T();
64
+ function ke() {
65
+ let e = k(), t = we(), n = w();
66
66
  return Q({
67
67
  id: "invoice-approval-send-request",
68
- isApplicable: (e) => e.hasTargetedModelsOfType("InvoiceApproval") ? De(e.targetedModelOfTypeOrThrow("InvoiceApproval")) : !1,
68
+ isApplicable: (e) => e.hasTargetedModelsOfType("InvoiceApproval") ? Oe(e.targetedModelOfTypeOrThrow("InvoiceApproval")) : !1,
69
69
  name: () => e.t("wise_invoicing.invoice.detail.actions.send_approval_request"),
70
70
  execute: async (r) => {
71
71
  let i = r.targetedModelOfTypeOrThrow("InvoiceApproval"), a = await n.execute({ params: {
@@ -74,12 +74,12 @@ function Oe() {
74
74
  } });
75
75
  a.isErr() ? t.apiError(a.error) : t.show({ message: e.t("wise_invoicing.invoice_approval.overview.send_request_success", { reference: i.invoiceSubject ?? e.t("wise_invoicing.invoice.detail.fallback_title") }) });
76
76
  },
77
- icon: () => f
77
+ icon: () => p
78
78
  });
79
79
  }
80
80
  //#endregion
81
81
  //#region src/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewMetrics.vue?vue&type=script&setup=true&lang.ts
82
- var ke = { class: "grid min-w-0 grid-cols-1 gap-xl lg:grid-cols-2" }, Ae = { class: "mt-xl flex h-1.5 w-full overflow-hidden rounded-full bg-secondary" }, je = { class: "mt-xl grid grid-cols-1 gap-md sm:grid-cols-2" }, Me = ["onClick"], Ne = /* @__PURE__ */ L({
82
+ var Ae = { class: "grid min-w-0 grid-cols-1 gap-xl lg:grid-cols-2" }, je = { class: "mt-xl flex h-1.5 w-full overflow-hidden rounded-full bg-secondary" }, Me = { class: "mt-xl grid grid-cols-1 gap-md sm:grid-cols-2" }, Ne = ["onClick"], Pe = /* @__PURE__ */ L({
83
83
  __name: "InvoiceApprovalOverviewMetrics",
84
84
  props: {
85
85
  hasCountError: { type: Boolean },
@@ -112,7 +112,7 @@ var ke = { class: "grid min-w-0 grid-cols-1 gap-xl lg:grid-cols-2" }, Ae = { cla
112
112
  count: n.outOfSyncCount,
113
113
  countClass: "text-warning-primary",
114
114
  description: i.t("wise_invoicing.invoice_approval.overview.metrics.out_of_sync_description"),
115
- icon: ee,
115
+ icon: g,
116
116
  iconClass: "bg-brand-secondary text-brand-secondary",
117
117
  key: "out-of-sync",
118
118
  label: i.t("wise_invoicing.invoice_approval.overview.tabs.out_of_sync")
@@ -120,7 +120,7 @@ var ke = { class: "grid min-w-0 grid-cols-1 gap-xl lg:grid-cols-2" }, Ae = { cla
120
120
  function c(e) {
121
121
  r(e === "rejected" ? "showRejected" : "showOutOfSync");
122
122
  }
123
- return (e, t) => (B(), P("div", ke, [I(H(K), {
123
+ return (e, t) => (B(), P("div", Ae, [I(H(K), {
124
124
  "aria-label": H(i).t("wise_invoicing.invoice_approval.overview.metrics.reminders"),
125
125
  as: "section",
126
126
  gap: "none",
@@ -135,7 +135,7 @@ var ke = { class: "grid min-w-0 grid-cols-1 gap-xl lg:grid-cols-2" }, Ae = { cla
135
135
  default: U(() => [I(H(Y), {
136
136
  text: H(i).t("wise_invoicing.invoice_approval.overview.metrics.reminders"),
137
137
  class: "text-xs font-semibold text-secondary uppercase"
138
- }, null, 8, ["text"]), I(H(ge), {
138
+ }, null, 8, ["text"]), I(H(_e), {
139
139
  label: H(i).t("wise_invoicing.invoice_approval.overview.metrics.approval_ladder"),
140
140
  to: { name: "invoice-approval-settings-module" },
141
141
  size: "sm",
@@ -151,12 +151,12 @@ var ke = { class: "grid min-w-0 grid-cols-1 gap-xl lg:grid-cols-2" }, Ae = { cla
151
151
  text: a.value,
152
152
  class: "mt-xs text-sm text-secondary"
153
153
  }, null, 8, ["text"]),
154
- F("div", Ae, [(B(!0), P(A, null, V(o.value, (e) => (B(), P("span", {
154
+ F("div", je, [(B(!0), P(A, null, V(o.value, (e) => (B(), P("span", {
155
155
  key: e.key,
156
156
  class: z(e.key === "reminder-1" ? "bg-warning-solid" : "\n bg-error-solid\n "),
157
- style: se({ flexGrow: e.count ?? 0 })
157
+ style: ce({ flexGrow: e.count ?? 0 })
158
158
  }, null, 6))), 128))]),
159
- F("div", je, [(B(!0), P(A, null, V(o.value, (e) => (B(), M(H(q), {
159
+ F("div", Me, [(B(!0), P(A, null, V(o.value, (e) => (B(), M(H(q), {
160
160
  key: e.key,
161
161
  align: "center",
162
162
  justify: "between",
@@ -206,13 +206,13 @@ var ke = { class: "grid min-w-0 grid-cols-1 gap-xl lg:grid-cols-2" }, Ae = { cla
206
206
  gap: "md",
207
207
  class: "mt-xl"
208
208
  }, {
209
- default: U(() => [(B(!0), P(A, null, V(s.value, (e) => (B(), M(H(pe), { key: e.key }, {
209
+ default: U(() => [(B(!0), P(A, null, V(s.value, (e) => (B(), M(H(me), { key: e.key }, {
210
210
  default: U(() => [F("button", {
211
211
  class: "flex w-full items-center gap-lg rounded-lg border border-secondary p-lg text-left hover:bg-secondary",
212
212
  type: "button",
213
213
  onClick: (t) => c(e.key)
214
214
  }, [
215
- F("span", { class: z([e.iconClass, "flex size-8 shrink-0 items-center justify-center rounded-full"]) }, [(B(), M(le(e.icon), { class: "size-(--spacing-xl)" }))], 2),
215
+ F("span", { class: z([e.iconClass, "flex size-8 shrink-0 items-center justify-center rounded-full"]) }, [(B(), M(ue(e.icon), { class: "size-(--spacing-xl)" }))], 2),
216
216
  I(H(K), {
217
217
  gap: "none",
218
218
  class: "min-w-0 flex-1"
@@ -230,8 +230,8 @@ var ke = { class: "grid min-w-0 grid-cols-1 gap-xl lg:grid-cols-2" }, Ae = { cla
230
230
  text: String(e.count ?? "—"),
231
231
  class: z([e.countClass, "shrink-0 font-mono text-xl font-semibold tabular-nums"])
232
232
  }, null, 8, ["text", "class"]),
233
- I(H(u), { class: "size-(--spacing-xl) shrink-0 text-tertiary" })
234
- ], 8, Me)]),
233
+ I(H(d), { class: "size-(--spacing-xl) shrink-0 text-tertiary" })
234
+ ], 8, Ne)]),
235
235
  _: 2
236
236
  }, 1024))), 128))]),
237
237
  _: 1
@@ -242,9 +242,9 @@ var ke = { class: "grid min-w-0 grid-cols-1 gap-xl lg:grid-cols-2" }, Ae = { cla
242
242
  });
243
243
  //#endregion
244
244
  //#region src/modules/invoice-approval/api/queries/invoiceApprovalIndex.query.ts
245
- function Pe(e) {
245
+ function Fe(e) {
246
246
  let t = j(() => ({ filters: e.params.filters?.value }));
247
- return ue("invoiceApprovalIndex", {
247
+ return de("invoiceApprovalIndex", {
248
248
  params: { queryParams: t },
249
249
  queryFn: (e) => O.getAll({
250
250
  ...t.value,
@@ -262,16 +262,16 @@ var $ = {
262
262
  "reminder-1": { approvalStatus: e.REMINDER_1 },
263
263
  "reminder-2": { approvalStatus: e.REMINDER_2 }
264
264
  };
265
- function Fe(e) {
265
+ function Ie(e) {
266
266
  function t(t) {
267
267
  return {
268
268
  ...t,
269
269
  customerUuid: e.customerUuid.value ?? null
270
270
  };
271
271
  }
272
- let { isFetchingNextPage: n, isLoading: r, fetchNextPage: i, result: a } = Pe({ params: { filters: j(() => t($[e.activeTab.value])) } }), o = j(() => a.value.isOk() ? a.value.getValue().data : []), s = j(() => a.value.isErr() ? a.value.getError() : null);
272
+ let { isFetchingNextPage: n, isLoading: r, fetchNextPage: i, result: a } = Fe({ params: { filters: j(() => t($[e.activeTab.value])) } }), o = j(() => a.value.isOk() ? a.value.getValue().data : []), s = j(() => a.value.isErr() ? a.value.getError() : null);
273
273
  function c(e) {
274
- return Pe({ params: { filters: j(() => t(e)) } });
274
+ return Fe({ params: { filters: j(() => t(e)) } });
275
275
  }
276
276
  let l = {
277
277
  all: c($.all),
@@ -320,12 +320,12 @@ function Fe(e) {
320
320
  }
321
321
  //#endregion
322
322
  //#region src/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewFilters.composable.ts
323
- function Ie() {
324
- let e = k(), t = a({ debounceMs: 250 }), n = ae({ params: { search: t.debouncedSearch } }), r = j(() => n.result.value.isOk() ? n.result.value.getValue().data : []), i = y({
323
+ function Le() {
324
+ let e = k(), t = o({ debounceMs: 250 }), n = E({ params: { search: t.debouncedSearch } }), r = j(() => n.result.value.isOk() ? n.result.value.getValue().data : []), i = S({
325
325
  actionGroup: { name: "invoice-approvals" },
326
- filters: [v({
326
+ filters: [x({
327
327
  defaultValue: {
328
- operator: b.INCLUDES,
328
+ operator: C.INCLUDES,
329
329
  value: []
330
330
  },
331
331
  disableOperators: !0,
@@ -342,14 +342,14 @@ function Ie() {
342
342
  }
343
343
  //#endregion
344
344
  //#region src/modules/invoice-approval/actions/invoiceApprovalMarkAsApproved.action.ts
345
- function Le() {
346
- let e = k(), t = Z().create(D);
345
+ function Re() {
346
+ let e = k(), t = Z().create(ae);
347
347
  return Q({
348
348
  id: "invoice-approval-mark-as-approved",
349
349
  isApplicable: (e) => {
350
350
  if (!e.hasTargetedModelsOfType("InvoiceApproval")) return !1;
351
351
  let t = e.targetedModelOfTypeOrThrow("InvoiceApproval");
352
- return x.canMarkAsApproved(t.approval.status);
352
+ return y.canMarkAsApproved(t.approval.status);
353
353
  },
354
354
  name: () => e.t("wise_invoicing.invoice.detail.actions.mark_as_approved"),
355
355
  execute: async (e) => {
@@ -359,29 +359,29 @@ function Le() {
359
359
  invoiceUuid: n.invoiceUuid
360
360
  });
361
361
  },
362
- icon: () => g
362
+ icon: () => _
363
363
  });
364
364
  }
365
365
  //#endregion
366
366
  //#region src/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewActionsCell.vue
367
- var Re = /* @__PURE__ */ L({
367
+ var ze = /* @__PURE__ */ L({
368
368
  __name: "InvoiceApprovalOverviewActionsCell",
369
369
  props: { item: {} },
370
370
  setup(e) {
371
- let t = e, n = Le(), r = j(() => [{
371
+ let t = e, n = Re(), r = j(() => [{
372
372
  ...t.item,
373
373
  key: t.item.uuid,
374
374
  modelName: "InvoiceApproval"
375
375
  }]);
376
376
  return (e, t) => (B(), M(H(J), null, {
377
- default: U(() => [I(H(ve), { class: "w-full" }, {
377
+ default: U(() => [I(H(ye), { class: "w-full" }, {
378
378
  default: U(() => [I(H(q), {
379
379
  align: "center",
380
380
  justify: "end",
381
381
  gap: "xs",
382
382
  class: "w-full"
383
383
  }, {
384
- default: U(() => [I(H(fe), {
384
+ default: U(() => [I(H(pe), {
385
385
  action: H(n),
386
386
  models: r.value,
387
387
  "is-current-context-only": !0
@@ -402,18 +402,18 @@ var Re = /* @__PURE__ */ L({
402
402
  _: 1
403
403
  }));
404
404
  }
405
- }), ze = /* @__PURE__ */ L({
405
+ }), Be = /* @__PURE__ */ L({
406
406
  __name: "InvoiceApprovalOverviewAmountCell",
407
407
  props: { item: {} },
408
408
  setup(e) {
409
- let t = e, n = i(), r = k(), a = j(() => n.formatMonetary(t.item.netAmount)), o = j(() => r.t("wise_invoicing.invoice_approval.overview.gross_total", { amount: n.formatMonetary(t.item.grossAmount) }));
409
+ let t = e, n = a(), r = k(), i = j(() => n.formatMonetary(t.item.netAmount)), o = j(() => r.t("wise_invoicing.invoice_approval.overview.gross_total", { amount: n.formatMonetary(t.item.grossAmount) }));
410
410
  return (e, t) => (B(), M(H(J), null, {
411
411
  default: U(() => [I(H(K), {
412
412
  gap: "none",
413
413
  class: "w-full"
414
414
  }, {
415
415
  default: U(() => [I(H(Y), {
416
- text: a.value,
416
+ text: i.value,
417
417
  class: "w-full text-right text-sm font-medium text-secondary tabular-nums"
418
418
  }, null, 8, ["text"]), I(H(Y), {
419
419
  text: o.value,
@@ -424,7 +424,7 @@ var Re = /* @__PURE__ */ L({
424
424
  _: 1
425
425
  }));
426
426
  }
427
- }), Be = /* @__PURE__ */ L({
427
+ }), Ve = /* @__PURE__ */ L({
428
428
  __name: "InvoiceApprovalOverviewInvoiceCell",
429
429
  props: { item: {} },
430
430
  setup(e) {
@@ -446,20 +446,20 @@ var Re = /* @__PURE__ */ L({
446
446
  _: 1
447
447
  }));
448
448
  }
449
- }), Ve = { class: "flex min-w-0 flex-col items-start gap-xxs" }, He = /* @__PURE__ */ L({
449
+ }), He = { class: "flex min-w-0 flex-col items-start gap-xxs" }, Ue = /* @__PURE__ */ L({
450
450
  __name: "InvoiceApprovalOverviewNextReminderCell",
451
451
  props: { item: {} },
452
452
  setup(e) {
453
- let t = e, n = k(), r = _(), i = j(() => t.item.hasChangesSinceApprovalSent), a = j(() => {
453
+ let t = e, n = k(), r = v(), i = j(() => t.item.hasChangesSinceApprovalSent), a = j(() => {
454
454
  let e = t.item.nextReminderOn;
455
- return e === null ? null : de.Now.plainDateISO().until(e, { largestUnit: "days" }).days;
455
+ return e === null ? null : fe.Now.plainDateISO().until(e, { largestUnit: "days" }).days;
456
456
  }), o = j(() => {
457
457
  let e = a.value;
458
458
  return e === null ? null : e <= 0 ? n.t("wise_invoicing.invoice_approval.overview.due_today") : n.t("wise_invoicing.invoice_approval.overview.due_in_days", { count: e });
459
459
  }), s = j(() => {
460
460
  let e = t.item.approval, i = e.reminderSentAt;
461
461
  return i !== null && e.level !== null ? n.t("wise_invoicing.invoice_approval.overview.last_reminder", {
462
- level: n.t(x.getReminderLevelTranslationKey(e.level)),
462
+ level: n.t(y.getReminderLevelTranslationKey(e.level)),
463
463
  time: r.toRelativeTime(i)
464
464
  }) : e.sentAt === null ? n.t("wise_invoicing.invoice_approval.overview.not_sent_yet") : n.t("wise_invoicing.invoice_approval.overview.request_sent", { time: r.toRelativeTime(e.sentAt) });
465
465
  }), c = {
@@ -467,7 +467,7 @@ var Re = /* @__PURE__ */ L({
467
467
  type: "icon"
468
468
  };
469
469
  return (e, t) => (B(), M(H(J), null, {
470
- default: U(() => [F("div", Ve, [i.value ? (B(), M(H(W), {
470
+ default: U(() => [F("div", He, [i.value ? (B(), M(H(W), {
471
471
  key: 0,
472
472
  label: H(n).t("wise_invoicing.invoice_approval.overview.reminder_blocked"),
473
473
  left: c,
@@ -487,34 +487,34 @@ var Re = /* @__PURE__ */ L({
487
487
  _: 1
488
488
  }));
489
489
  }
490
- }), Ue = {
490
+ }), We = {
491
491
  class: "flex shrink-0 gap-xxs",
492
492
  "aria-hidden": "true"
493
- }, We = 2, Ge = /* @__PURE__ */ L({
493
+ }, Ge = 2, Ke = /* @__PURE__ */ L({
494
494
  __name: "InvoiceApprovalReminderLevelIndicator",
495
495
  props: { level: {} },
496
496
  setup(e) {
497
- let n = e, r = j(() => Math.min(We, n.level)), i = j(() => n.level === t._2);
498
- return (e, t) => (B(), P("span", Ue, [(B(), P(A, null, V(We, (e) => F("span", {
497
+ let t = e, n = j(() => Math.min(Ge, t.level)), i = j(() => t.level === r._2);
498
+ return (e, t) => (B(), P("span", We, [(B(), P(A, null, V(Ge, (e) => F("span", {
499
499
  key: e,
500
- class: z([e <= r.value ? i.value ? "border-error bg-error-solid" : "\n border-warning-500 bg-warning-solid\n " : "border-secondary bg-primary", "h-(--spacing-sm) w-(--spacing-md) rounded-full border"])
500
+ class: z([e <= n.value ? i.value ? "border-error bg-error-solid" : "\n border-warning-500 bg-warning-solid\n " : "border-secondary bg-primary", "h-(--spacing-sm) w-(--spacing-md) rounded-full border"])
501
501
  }, null, 2)), 64))]));
502
502
  }
503
- }), Ke = /* @__PURE__ */ L({
503
+ }), qe = /* @__PURE__ */ L({
504
504
  __name: "InvoiceApprovalOverviewStatusCell",
505
505
  props: { item: {} },
506
506
  setup(e) {
507
- let t = e, n = k(), i = j(() => t.item.approval.status === r.REQUESTED ? t.item.approval.level : null), a = j(() => i.value === 2 ? n.t("wise_invoicing.invoice.approval_status.r2") : n.t("wise_invoicing.invoice.approval_status.r1"));
508
- return (e, n) => (B(), M(H(J), null, {
507
+ let n = e, r = k(), i = j(() => n.item.approval.status === t.REQUESTED ? n.item.approval.level : null), a = j(() => i.value === 2 ? r.t("wise_invoicing.invoice.approval_status.r2") : r.t("wise_invoicing.invoice.approval_status.r1"));
508
+ return (e, t) => (B(), M(H(J), null, {
509
509
  default: U(() => [I(H(q), {
510
510
  align: "center",
511
511
  gap: "xs"
512
512
  }, {
513
- default: U(() => [i.value === null ? (B(), M(C, {
513
+ default: U(() => [i.value === null ? (B(), M(b, {
514
514
  key: 1,
515
- approval: t.item.approval,
516
- rejection: t.item.rejectionReason === null ? null : {
517
- reason: t.item.rejectionReason,
515
+ approval: n.item.approval,
516
+ rejection: n.item.rejectionReason === null ? null : {
517
+ reason: n.item.rejectionReason,
518
518
  remark: null
519
519
  },
520
520
  "requires-prior-approval": !0
@@ -524,12 +524,12 @@ var Re = /* @__PURE__ */ L({
524
524
  gap: "sm",
525
525
  class: "min-w-0 rounded-md border border-secondary py-xxs pr-sm pl-xs"
526
526
  }, {
527
- default: U(() => [I(Ge, { level: i.value }, null, 8, ["level"]), I(H(Y), {
527
+ default: U(() => [I(Ke, { level: i.value }, null, 8, ["level"]), I(H(Y), {
528
528
  text: a.value,
529
529
  class: "text-xs text-primary"
530
530
  }, null, 8, ["text"])]),
531
531
  _: 1
532
- })), t.item.hasChangesSinceApprovalSent ? (B(), M(S, { key: 2 })) : N("", !0)]),
532
+ })), n.item.hasChangesSinceApprovalSent ? (B(), M(D, { key: 2 })) : N("", !0)]),
533
533
  _: 1
534
534
  })]),
535
535
  _: 1
@@ -538,9 +538,9 @@ var Re = /* @__PURE__ */ L({
538
538
  });
539
539
  //#endregion
540
540
  //#region src/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewTableColumns.composable.ts
541
- function qe() {
541
+ function Je() {
542
542
  let e = k();
543
- return j(() => Se()([
543
+ return j(() => Ce()([
544
544
  {
545
545
  headerLabel: e.t("wise_invoicing.invoice_approval.overview.columns.invoice"),
546
546
  key: "invoice",
@@ -548,7 +548,7 @@ function qe() {
548
548
  max: "24rem",
549
549
  min: "14rem"
550
550
  },
551
- component: (e) => X(Be, { item: e })
551
+ component: (e) => X(Ve, { item: e })
552
552
  },
553
553
  {
554
554
  headerLabel: e.t("wise_invoicing.invoice_approval.overview.columns.status"),
@@ -557,7 +557,7 @@ function qe() {
557
557
  max: "14rem",
558
558
  min: "10rem"
559
559
  },
560
- component: (e) => X(Ke, { item: e })
560
+ component: (e) => X(qe, { item: e })
561
561
  },
562
562
  {
563
563
  headerLabel: e.t("wise_invoicing.invoice_approval.overview.columns.next_reminder"),
@@ -566,7 +566,7 @@ function qe() {
566
566
  max: "14rem",
567
567
  min: "10rem"
568
568
  },
569
- component: (e) => X(He, { item: e })
569
+ component: (e) => X(Ue, { item: e })
570
570
  },
571
571
  {
572
572
  headerLabel: e.t("wise_invoicing.invoice_approval.overview.columns.amount"),
@@ -575,7 +575,7 @@ function qe() {
575
575
  max: "12rem",
576
576
  min: "9rem"
577
577
  },
578
- component: (e) => X(ze, { item: e })
578
+ component: (e) => X(Be, { item: e })
579
579
  },
580
580
  {
581
581
  headerLabel: e.t("wise_invoicing.invoice_approval.overview.columns.actions"),
@@ -584,28 +584,28 @@ function qe() {
584
584
  max: "16rem",
585
585
  min: "14rem"
586
586
  },
587
- component: (e) => X(Re, { item: e })
587
+ component: (e) => X(ze, { item: e })
588
588
  }
589
589
  ]));
590
590
  }
591
591
  //#endregion
592
592
  //#region src/modules/invoice-approval/use-cases/overview/views/InvoiceApprovalOverviewView.vue
593
- var Je = /* @__PURE__ */ L({
593
+ var Ye = /* @__PURE__ */ L({
594
594
  __name: "InvoiceApprovalOverviewView",
595
595
  setup(e) {
596
- let t = k(), r = n(), i = we("tab", "awaiting"), a = ce(!0), { customerUuid: s, filters: u } = Ie();
597
- ne(u);
598
- let { hasCountError: f, isFetchingNextPage: h, isLoading: g, counts: _, data: v, error: y, fetchNextPage: b, needsAttentionTotal: x, reminderCountTotal: ae, tabCounts: S } = Fe({
599
- customerUuid: s,
600
- activeTab: j(() => i.value)
601
- }), C = j(() => u.activeFilters.value.length), w = j(() => [
596
+ let t = k(), n = i(), r = Te("tab", "awaiting"), a = le(!0), { customerUuid: o, filters: c } = Le();
597
+ ne(c);
598
+ let { hasCountError: d, isFetchingNextPage: p, isLoading: h, counts: _, data: v, error: y, fetchNextPage: b, needsAttentionTotal: x, reminderCountTotal: S, tabCounts: C } = Ie({
599
+ customerUuid: o,
600
+ activeTab: j(() => r.value)
601
+ }), w = j(() => c.activeFilters.value.length), ae = j(() => [
602
602
  {
603
- icon: l,
603
+ icon: u,
604
604
  key: "all",
605
605
  label: t.t("wise_invoicing.invoice_approval.overview.tabs.all")
606
606
  },
607
607
  {
608
- icon: d,
608
+ icon: f,
609
609
  key: "awaiting",
610
610
  label: t.t("wise_invoicing.invoice.approval_status.awaiting_approval")
611
611
  },
@@ -615,7 +615,7 @@ var Je = /* @__PURE__ */ L({
615
615
  label: t.t("wise_invoicing.invoice.approval_status.r1")
616
616
  },
617
617
  {
618
- icon: c,
618
+ icon: l,
619
619
  key: "reminder-2",
620
620
  label: t.t("wise_invoicing.invoice.approval_status.r2")
621
621
  },
@@ -625,31 +625,31 @@ var Je = /* @__PURE__ */ L({
625
625
  label: t.t("wise_invoicing.invoice.approval_status.rejected")
626
626
  },
627
627
  {
628
- icon: ee,
628
+ icon: g,
629
629
  key: "out-of-sync",
630
630
  label: t.t("wise_invoicing.invoice_approval.overview.tabs.out_of_sync")
631
631
  }
632
632
  ]);
633
- r.set(() => t.t("wise_invoicing.invoice_approval.title"));
634
- let T = Oe(), E = Ee(), D = Te(), O = j(() => [
633
+ n.set(() => t.t("wise_invoicing.invoice_approval.title"));
634
+ let oe = ke(), T = De(), E = Ee(), D = j(() => [
635
+ oe,
635
636
  T,
636
- E,
637
- D
638
- ]), F = j(() => !g.value && y.value === null && v.value.length === 0 && C.value === 0), L = qe();
639
- function R(e) {
640
- let t = S.value[e];
637
+ E
638
+ ]), O = j(() => !h.value && y.value === null && v.value.length === 0 && w.value === 0), F = Je();
639
+ function L(e) {
640
+ let t = C.value[e];
641
641
  return t === null ? null : {
642
642
  type: "count",
643
643
  value: t
644
644
  };
645
645
  }
646
- function z(e) {
646
+ function R(e) {
647
647
  return {
648
648
  name: "invoicing-invoice-detail",
649
649
  params: { invoiceUuid: e.invoiceUuid }
650
650
  };
651
651
  }
652
- return (e, n) => (B(), M(H(me), {
652
+ return (e, n) => (B(), M(H(he), {
653
653
  title: H(t).t("wise_invoicing.invoice_approval.title"),
654
654
  "is-title-hidden": !0
655
655
  }, {
@@ -676,24 +676,24 @@ var Je = /* @__PURE__ */ L({
676
676
  }, null, 8, ["text"])]),
677
677
  _: 1
678
678
  }), I(H(G), {
679
- "icon-left": a.value ? H(o) : H(p),
679
+ "icon-left": a.value ? H(s) : H(ee),
680
680
  label: H(t).t(a.value ? "wise_invoicing.invoice_approval.overview.hide_metrics" : "wise_invoicing.invoice_approval.overview.show_metrics"),
681
681
  variant: "secondary",
682
682
  onClick: n[0] ||= (e) => a.value = !a.value
683
683
  }, null, 8, ["icon-left", "label"])]),
684
684
  _: 1
685
685
  }),
686
- a.value ? (B(), M(Ne, {
686
+ a.value ? (B(), M(Pe, {
687
687
  key: 0,
688
- "has-count-error": H(f),
688
+ "has-count-error": H(d),
689
689
  "needs-attention-total": H(x),
690
690
  "out-of-sync-count": H(_).outOfSync,
691
691
  "rejected-count": H(_).rejected,
692
- "reminder-count-total": H(ae),
692
+ "reminder-count-total": H(S),
693
693
  "reminder-one-count": H(_).reminderOne,
694
694
  "reminder-two-count": H(_).reminderTwo,
695
- onShowOutOfSync: n[1] ||= (e) => i.value = "out-of-sync",
696
- onShowRejected: n[2] ||= (e) => i.value = "rejected"
695
+ onShowOutOfSync: n[1] ||= (e) => r.value = "out-of-sync",
696
+ onShowRejected: n[2] ||= (e) => r.value = "rejected"
697
697
  }, null, 8, [
698
698
  "has-count-error",
699
699
  "needs-attention-total",
@@ -715,16 +715,16 @@ var Je = /* @__PURE__ */ L({
715
715
  gap: "md",
716
716
  class: "border-b border-secondary p-sm"
717
717
  }, {
718
- default: U(() => [I(H(ye), {
719
- modelValue: H(i),
720
- "onUpdate:modelValue": n[3] ||= (e) => oe(i) ? i.value = e : null,
718
+ default: U(() => [I(H(be), {
719
+ modelValue: H(r),
720
+ "onUpdate:modelValue": n[3] ||= (e) => se(r) ? r.value = e : null,
721
721
  variant: "button-border"
722
722
  }, {
723
- default: U(() => [I(H(xe), null, {
724
- default: U(() => [(B(!0), P(A, null, V(w.value, (e) => (B(), M(H(be), {
723
+ default: U(() => [I(H(Se), null, {
724
+ default: U(() => [(B(!0), P(A, null, V(ae.value, (e) => (B(), M(H(xe), {
725
725
  key: e.key,
726
726
  config: {
727
- indicator: R(e.key),
727
+ indicator: L(e.key),
728
728
  left: {
729
729
  icon: e.icon,
730
730
  type: "icon"
@@ -749,24 +749,24 @@ var Je = /* @__PURE__ */ L({
749
749
  gap: "md",
750
750
  class: "border-b border-secondary p-sm"
751
751
  }, {
752
- default: U(() => [C.value === 0 ? (B(), M(H(Y), {
752
+ default: U(() => [w.value === 0 ? (B(), M(H(Y), {
753
753
  key: 0,
754
754
  text: H(t).t("wise_invoicing.common.no_active_filters"),
755
755
  class: "px-sm text-xs text-secondary"
756
756
  }, null, 8, ["text"])) : (B(), M(H(re), { key: 1 })), I(H(ie))]),
757
757
  _: 1
758
758
  }),
759
- F.value ? (B(), M(H(he), {
759
+ O.value ? (B(), M(H(ge), {
760
760
  key: 0,
761
761
  title: H(t).t("wise_invoicing.invoice_approval.overview.empty_state.title"),
762
762
  description: H(t).t("wise_invoicing.invoice_approval.overview.empty_state.description"),
763
763
  illustration: "documents",
764
764
  class: "py-7xl"
765
- }, null, 8, ["title", "description"])) : (B(), M(H(_e), {
765
+ }, null, 8, ["title", "description"])) : (B(), M(H(ve), {
766
766
  key: 1,
767
- "active-filter-count": C.value,
768
- actions: O.value,
769
- columns: H(L),
767
+ "active-filter-count": w.value,
768
+ actions: D.value,
769
+ columns: H(F),
770
770
  data: H(v),
771
771
  error: H(y),
772
772
  "get-action-model": (e) => ({
@@ -775,10 +775,10 @@ var Je = /* @__PURE__ */ L({
775
775
  modelName: "InvoiceApproval"
776
776
  }),
777
777
  "get-key": (e) => e.uuid,
778
- "get-link": z,
779
- "is-fetching-next-page": H(h),
780
- "is-loading": H(g),
781
- onClearFilters: n[4] ||= (e) => H(u).clearAll(),
778
+ "get-link": R,
779
+ "is-fetching-next-page": H(p),
780
+ "is-loading": H(h),
781
+ onClearFilters: n[4] ||= (e) => H(c).clearAll(),
782
782
  onNextPage: H(b)
783
783
  }, null, 8, [
784
784
  "active-filter-count",
@@ -803,4 +803,4 @@ var Je = /* @__PURE__ */ L({
803
803
  }
804
804
  });
805
805
  //#endregion
806
- export { Je as default };
806
+ export { Ye as default };