@wisemen/wise-invoicing-web 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/dist/{ApprovalReminderSettingsViewDataProvider-D-qXZrPT.js → ApprovalReminderSettingsViewDataProvider-DwtfyQpx.js} +4 -4
  2. package/dist/{BillingDocumentDetailViewDataProvider-DDdtlW-2.js → BillingDocumentDetailViewDataProvider-Dub07ybW.js} +1373 -1217
  3. package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
  4. package/dist/{BillingDocumentPdf-ehdFB6mr.js → BillingDocumentPdf-DgtUB45R.js} +20 -13
  5. package/dist/{CreditNoteDetailViewDataProvider-11a-JO3H.js → CreditNoteDetailViewDataProvider-BxNfC6yO.js} +90 -90
  6. package/dist/{CreditNotePdfViewDataProvider-bfeaya3P.js → CreditNotePdfViewDataProvider-D0j8qqK-.js} +2 -2
  7. package/dist/{CustomFieldValueText-CZQXGE5F.js → CustomFieldValueText-Cuhs9sRn.js} +26 -26
  8. package/dist/DunningCaseDetailViewDataProvider-ou1FfNWQ.js +439 -0
  9. package/dist/{DunningCaseOverviewView-y_bCmi5j.js → DunningCaseOverviewView--zaPD0-c.js} +255 -203
  10. package/dist/{DunningCaseReminderPdfViewDataProvider-DNODfED_.js → DunningCaseReminderPdfViewDataProvider-BpUDbbSH.js} +5 -4
  11. package/dist/{DunningCaseSendDialog-BPXcqit5.js → DunningCaseSendDialog-Co4oLFtZ.js} +83 -72
  12. package/dist/InvoiceApprovalOutOfSyncIndicator-H6H7kjAE.js +45 -0
  13. package/dist/InvoiceApprovalOverviewView-Bw-6rkon.js +814 -0
  14. package/dist/InvoiceApprovalStatusBadge-IyzJ--TJ.js +127 -0
  15. package/dist/InvoiceApproveDialogDataProvider-8G-11W1e.js +377 -0
  16. package/dist/{InvoiceDetailViewDataProvider-BYeaaQzL.js → InvoiceDetailViewDataProvider-B9gul2ei.js} +750 -692
  17. package/dist/InvoiceOverviewViewDataProvider-5KgIdhfL.js +1892 -0
  18. package/dist/{InvoicePdfView-BJRTg_TH.js → InvoicePdfView-5sJ-u_gT.js} +10 -4
  19. package/dist/{InvoicePdfViewDataProvider-CwI_uGm3.js → InvoicePdfViewDataProvider-BLVXDPv6.js} +3 -3
  20. package/dist/{InvoicePublicPdfViewDataProvider-uZUfsr5K.js → InvoicePublicPdfViewDataProvider-CnhYazmB.js} +3 -3
  21. package/dist/InvoicePublicProFormaPdfViewDataProvider-CcvGISK6.js +47 -0
  22. package/dist/{InvoicingFileUploadProvider-D9Xk4rQM.js → InvoicingFileUploadProvider-Kcq7kSSt.js} +2 -2
  23. package/dist/{IssuerSettingsViewDataProvider-CGRa8F-2.js → IssuerSettingsViewDataProvider-BuSIVnIl.js} +3 -3
  24. package/dist/{ReminderSettingsViewDataProvider-1ucp3z2T.js → ReminderSettingsViewDataProvider-CH7gSXnj.js} +100 -102
  25. package/dist/{api.util-C_kMGlJN.js → api.util-CkIRZS3h.js} +985 -930
  26. package/dist/{billingDocumentDetail.transformer-Da6_-Hv9.js → billingDocumentDetail.transformer-Bfd8geNo.js} +5 -7
  27. package/dist/client/index.d.ts +2 -2
  28. package/dist/client/sdk.gen.d.ts +2 -1
  29. package/dist/client/types.gen.d.ts +114 -31
  30. package/dist/client/zod.gen.d.ts +343 -78
  31. package/dist/composables/sending-refetch/sendingRefetch.composable.d.ts +7 -0
  32. package/dist/composables/sending-refetch/sendingRefetch.composable.spec.d.ts +1 -0
  33. package/dist/{creditNoteDetail.query-DLR7L0Ep.js → creditNoteDetail.query-tLnfqsEB.js} +27 -27
  34. package/dist/customerUuid.model-ClN4Vi9n.js +18 -0
  35. package/dist/{dist-Cxdm09Lp.js → dist-BQbaoN5W.js} +144 -96
  36. package/dist/{dist-CoztMdYH.js → dist-CGZBUnWK.js} +62 -62
  37. package/dist/{dist-boJIIxnT.js → dist-Cdbpkd3Y.js} +1 -1
  38. package/dist/{documentTitle.composable-DsBbzhXN.js → documentTitle.composable-CRJjS6p-.js} +19 -17
  39. package/dist/{i18n.lib-Cvr8pcDw.js → i18n.lib--mzprLMR.js} +88 -54
  40. package/dist/index.d.ts +56 -22
  41. package/dist/index.js +193 -201
  42. package/dist/{invoice.service-DEEA9mal.js → invoice.service-B1w16_Md.js} +184 -172
  43. package/dist/{invoiceApproval.service-DvL3LliM.js → invoiceApproval.service-BHAJmFkU.js} +8 -8
  44. package/dist/{invoiceApprovalStatus.util-3Zh10Pj8.js → invoiceApprovalStatus.util-DohOKR4q.js} +42 -38
  45. package/dist/invoiceCustomer.service-DpVfpQUD.js +39 -0
  46. package/dist/{invoiceDetail.query-CRoH_SgM.js → invoiceDetail.query-CfyNSXLS.js} +1 -1
  47. package/dist/{invoiceDeliveryStatus.util-nCsqDypY.js → invoiceIndexCache.util-BDLs7W9m.js} +128 -51
  48. package/dist/{invoicingConfig.composable-rxjGK882.js → invoicingConfig.composable-COn1rKRf.js} +2 -2
  49. package/dist/{issuerSettings.query-Dc5gsaEm.js → issuerSettings.query-CDFk2GiP.js} +3 -2
  50. package/dist/libs/i18n.lib.d.ts +56 -22
  51. package/dist/locales/en-US.json.d.ts +44 -27
  52. package/dist/locales/nl-BE.json.d.ts +44 -27
  53. package/dist/models/billing-document/activity-log/billingDocumentActivityLog.model.d.ts +8 -1
  54. package/dist/models/billing-document/activity-log/billingDocumentActivityLog.util.d.ts +12 -0
  55. package/dist/models/billing-document/activity-log/billingDocumentActivityLog.util.spec.d.ts +1 -0
  56. package/dist/models/billing-document/billingDocumentDetail.model.d.ts +2 -6
  57. package/dist/modules/dunning-case/api/mutations/dunningCaseReminderRetry.mutation.d.ts +4 -0
  58. package/dist/modules/dunning-case/api/services/dunningCase.service.d.ts +2 -1
  59. package/dist/modules/dunning-case/models/dunningCase.model.d.ts +5 -0
  60. package/dist/modules/dunning-case/models/dunningCaseReminderPdf.model.d.ts +0 -4
  61. package/dist/modules/dunning-case/models/dunningCaseReminderPdf.transformer.d.ts +0 -1
  62. package/dist/modules/dunning-case/test/builders/dunningCaseReminderPdfDto.builder.d.ts +1 -0
  63. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewActionsCell.vue.d.ts +2 -0
  64. package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverview.composable.d.ts +2 -2
  65. package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverview.composable.spec.d.ts +1 -0
  66. package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverviewTableColumns.composable.d.ts +1 -0
  67. package/dist/modules/dunning-case/use-cases/pdf/components/DunningCaseReminderPdfTable.vue.d.ts +0 -4
  68. package/dist/modules/dunning-case/use-cases/send/dialogs/DunningCaseBulkSendDialog.vue.d.ts +2 -1
  69. package/dist/modules/dunning-case/use-cases/settings/components/ReminderLadderRow.vue.d.ts +4 -4
  70. package/dist/modules/dunning-case/use-cases/settings/composables/reminderLadder.composable.d.ts +2 -2
  71. package/dist/modules/dunning-case/use-cases/settings/composables/reminderLadder.composable.spec.d.ts +1 -0
  72. package/dist/modules/invoice/api/mutations/invoiceRejectApproval.mutation.d.ts +8 -0
  73. package/dist/modules/invoice/api/queries/invoicePublicProFormaDetail.query.d.ts +2 -0
  74. package/dist/modules/invoice/api/query-keys/invoice.queryKeys.d.ts +6 -0
  75. package/dist/modules/invoice/api/services/invoice.service.d.ts +1 -0
  76. package/dist/modules/invoice/models/invoice/approval/invoiceApproveForm.model.d.ts +4 -2
  77. package/dist/modules/invoice/models/invoice/approval/invoiceApproveForm.model.spec.d.ts +1 -0
  78. package/dist/modules/invoice/models/invoice/approval/invoiceRejectForm.model.d.ts +8 -0
  79. package/dist/modules/invoice/models/invoice/detail/invoiceDetail.model.d.ts +1 -0
  80. package/dist/modules/invoice/models/invoice/index/invoiceIndexQueryParams.model.d.ts +2 -3
  81. package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.model.d.ts +2 -9
  82. package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.util.d.ts +4 -2
  83. package/dist/modules/invoice/models/invoice/payment/invoicePaymentCreate.transformer.spec.d.ts +1 -0
  84. package/dist/modules/invoice/models/invoice/pdf/invoicePdfDetail.transformer.d.ts +2 -1
  85. package/dist/modules/invoice/routes/invoice.routes.d.ts +4 -0
  86. package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApproveDialog.vue.d.ts +1 -0
  87. package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApproveDialogDataProvider.vue.d.ts +13 -0
  88. package/dist/modules/invoice/use-cases/detail/dialogs/InvoicePaymentDeleteDialog.vue.d.ts +13 -0
  89. package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewDataTableFilters.composable.d.ts +2 -3
  90. package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewSelection.composable.d.ts +11 -9
  91. package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkActionDialog.vue.d.ts +2 -2
  92. package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendApprovalDialog.vue.d.ts +3 -1
  93. package/dist/modules/invoice/use-cases/overview/utils/invoiceOverviewBulkActionFeedback.util.d.ts +7 -4
  94. package/dist/modules/invoice/use-cases/overview/utils/invoiceOverviewBulkActionFeedback.util.spec.d.ts +1 -0
  95. package/dist/modules/invoice/use-cases/pdf/components/BillingDocumentPdf.vue.d.ts +1 -0
  96. package/dist/modules/invoice/use-cases/pdf/components/InvoicePdfWatermark.vue.d.ts +4 -1
  97. package/dist/modules/invoice/use-cases/pdf/views/InvoicePdfView.vue.d.ts +1 -0
  98. package/dist/modules/invoice/use-cases/pdf/views/InvoicePublicProFormaPdfViewDataProvider.vue.d.ts +3 -0
  99. package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.action.d.ts +2 -0
  100. package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.spec.d.ts +1 -0
  101. package/dist/modules/invoice-approval/models/invoiceApprovalIndex.transformer.spec.d.ts +1 -0
  102. package/dist/modules/invoice-approval/models/invoiceApprovalIndexQueryParams.transformer.spec.d.ts +1 -0
  103. package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverview.composable.d.ts +5 -6
  104. package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewFilters.composable.d.ts +0 -5
  105. package/dist/modules/settings/models/issuer-settings/issuerSettings.model.d.ts +1 -0
  106. package/dist/{reminderConfig.query-snaHQmrY.js → reminderConfig.query-DSO0ekC_.js} +112 -105
  107. package/dist/routes/invoicingPublicRoutes.composable.d.ts +4 -0
  108. package/dist/style.css +1 -1
  109. package/dist/ui/billing-document/sidebar/BillingDocumentDetailSidebarActivityApprovalDetails.vue.d.ts +7 -0
  110. package/package.json +3 -3
  111. package/dist/DunningCaseDetailViewDataProvider-DC-ziMoO.js +0 -409
  112. package/dist/InvoiceApprovalOverviewView-DZ14mi4L.js +0 -870
  113. package/dist/InvoiceApprovalStatusBadge-U-dW2hR4.js +0 -161
  114. package/dist/InvoiceApproveDialog-2LXneG2r.js +0 -308
  115. package/dist/InvoiceOverviewBulkSendApprovalDialog-99dfuN4i.js +0 -318
  116. package/dist/InvoiceOverviewViewDataProvider-CZIQeftL.js +0 -1620
  117. package/dist/customerUuid.model-GUFYq3O2.js +0 -5
  118. package/dist/modules/invoice-approval/actions/invoiceApprovalUnmarkAsNeedsApproval.action.d.ts +0 -1
@@ -0,0 +1,814 @@
1
+ import "./api.util-CkIRZS3h.js";
2
+ import { _ as e, a as t, o as n, t as r } from "./documentTitle.composable-CRJjS6p-.js";
3
+ import { r as i } from "./useCurrencyFormat.composable-MtZaqKnO.js";
4
+ import { t as a } from "./search.composable-CU9OpyUB.js";
5
+ import { B as o, F as s, H as c, M as l, P as u, R as d, c as f, dt as p, et as m, i as ee, k as h, lt as te, v as ne } from "./dist-BQbaoN5W.js";
6
+ import { n as g } from "./dist-Cdbpkd3Y.js";
7
+ import { f as _, i as v, n as re, o as ie, r as y, s as ae } from "./dist-CGZBUnWK.js";
8
+ import { t as b } from "./invoiceApprovalStatus.util-DohOKR4q.js";
9
+ import { n as x, t as S } from "./InvoiceApprovalOutOfSyncIndicator-H6H7kjAE.js";
10
+ import { t as C } from "./InvoiceApprovalStatusBadge-IyzJ--TJ.js";
11
+ import { i as w, n as T, r as E, t as D } from "./InvoiceApproveDialogDataProvider-8G-11W1e.js";
12
+ import { t as O } from "./invoiceApproval.service-BHAJmFkU.js";
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";
18
+ import { createAction as Q } from "@wisemen/vue-core-actions";
19
+ import { useRouteQuery as we } from "@vueuse/router";
20
+ //#region src/modules/invoice-approval/actions/invoiceApprovalArchive.action.ts
21
+ function Te() {
22
+ let t = k(), n = Z().create(w);
23
+ return Q({
24
+ id: "invoice-approval-archive",
25
+ isApplicable: (t) => {
26
+ if (!t.hasTargetedModelsOfType("InvoiceApproval")) return !1;
27
+ let n = t.targetedModelOfTypeOrThrow("InvoiceApproval");
28
+ return n.approval.status === e.REQUESTED || n.approval.status === e.EXPIRED;
29
+ },
30
+ name: () => t.t("wise_invoicing.invoice.detail.actions.archive_approval"),
31
+ execute: async (e) => {
32
+ let t = e.targetedModelOfTypeOrThrow("InvoiceApproval");
33
+ await n.open({
34
+ approvalUuid: t.uuid,
35
+ invoiceUuid: t.invoiceUuid
36
+ });
37
+ },
38
+ icon: () => s
39
+ });
40
+ }
41
+ //#endregion
42
+ //#region src/modules/invoice-approval/actions/invoiceApprovalReject.action.ts
43
+ function Ee() {
44
+ let t = k(), n = Z().create(E);
45
+ return Q({
46
+ id: "invoice-approval-reject",
47
+ isApplicable: (t) => t.hasTargetedModelsOfType("InvoiceApproval") ? t.targetedModelOfTypeOrThrow("InvoiceApproval").approval.status === e.REQUESTED : !1,
48
+ name: () => t.t("wise_invoicing.invoice.detail.actions.reject_approval"),
49
+ execute: async (e) => {
50
+ let t = e.targetedModelOfTypeOrThrow("InvoiceApproval");
51
+ await n.open({
52
+ approvalUuid: t.uuid,
53
+ invoiceUuid: t.invoiceUuid
54
+ });
55
+ },
56
+ icon: () => d
57
+ });
58
+ }
59
+ //#endregion
60
+ //#region src/modules/invoice-approval/actions/invoiceApprovalSendRequest.action.ts
61
+ function De(t) {
62
+ return t.approval.status === e.REJECTED || t.approval.status === e.EXPIRED || t.hasChangesSinceApprovalSent;
63
+ }
64
+ function Oe() {
65
+ let e = k(), t = Ce(), n = T();
66
+ return Q({
67
+ id: "invoice-approval-send-request",
68
+ isApplicable: (e) => e.hasTargetedModelsOfType("InvoiceApproval") ? De(e.targetedModelOfTypeOrThrow("InvoiceApproval")) : !1,
69
+ name: () => e.t("wise_invoicing.invoice.detail.actions.send_approval_request"),
70
+ execute: async (r) => {
71
+ let i = r.targetedModelOfTypeOrThrow("InvoiceApproval"), a = await n.execute({ params: {
72
+ invoiceUuid: i.invoiceUuid,
73
+ hasActiveApproval: !0
74
+ } });
75
+ if (a.isErr()) {
76
+ t.apiError(a.error);
77
+ return;
78
+ }
79
+ t.show({ message: e.t("wise_invoicing.invoice_approval.overview.send_request_success", { reference: i.invoiceSubject ?? e.t("wise_invoicing.invoice.detail.fallback_title") }) });
80
+ },
81
+ icon: () => p
82
+ });
83
+ }
84
+ //#endregion
85
+ //#region src/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewMetrics.vue?vue&type=script&setup=true&lang.ts
86
+ 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({
87
+ __name: "InvoiceApprovalOverviewMetrics",
88
+ props: {
89
+ hasCountError: { type: Boolean },
90
+ needsAttentionTotal: {},
91
+ outOfSyncCount: {},
92
+ rejectedCount: {},
93
+ reminderCountTotal: {},
94
+ reminderOneCount: {},
95
+ reminderTwoCount: {}
96
+ },
97
+ emits: ["showOutOfSync", "showRejected"],
98
+ setup(e, { emit: t }) {
99
+ let n = e, r = t, i = k(), a = j(() => n.hasCountError ? i.t("wise_invoicing.invoice_approval.overview.metrics.unavailable") : i.t("wise_invoicing.invoice_approval.overview.metrics.active_reminders")), o = j(() => [{
100
+ count: n.reminderOneCount,
101
+ key: "reminder-1",
102
+ label: i.t("wise_invoicing.invoice.approval_status.r1")
103
+ }, {
104
+ count: n.reminderTwoCount,
105
+ key: "reminder-2",
106
+ label: i.t("wise_invoicing.invoice.approval_status.r2")
107
+ }]), s = j(() => [{
108
+ count: n.rejectedCount,
109
+ countClass: "text-error-primary",
110
+ description: i.t("wise_invoicing.invoice_approval.overview.metrics.rejected_description"),
111
+ icon: c,
112
+ iconClass: "bg-error-secondary text-error-primary",
113
+ key: "rejected",
114
+ label: i.t("wise_invoicing.invoice.approval_status.rejected")
115
+ }, {
116
+ count: n.outOfSyncCount,
117
+ countClass: "text-warning-primary",
118
+ description: i.t("wise_invoicing.invoice_approval.overview.metrics.out_of_sync_description"),
119
+ icon: m,
120
+ iconClass: "bg-brand-secondary text-brand-secondary",
121
+ key: "out-of-sync",
122
+ label: i.t("wise_invoicing.invoice_approval.overview.tabs.out_of_sync")
123
+ }]);
124
+ function l(e) {
125
+ if (e === "rejected") {
126
+ r("showRejected");
127
+ return;
128
+ }
129
+ r("showOutOfSync");
130
+ }
131
+ return (e, t) => (B(), P("div", ke, [I(H(K), {
132
+ "aria-label": H(i).t("wise_invoicing.invoice_approval.overview.metrics.reminders"),
133
+ as: "section",
134
+ gap: "none",
135
+ class: "min-w-0 rounded-lg border border-secondary bg-primary p-2xl shadow-sm"
136
+ }, {
137
+ default: U(() => [
138
+ I(H(q), {
139
+ align: "start",
140
+ justify: "between",
141
+ gap: "md"
142
+ }, {
143
+ default: U(() => [I(H(Y), {
144
+ text: H(i).t("wise_invoicing.invoice_approval.overview.metrics.reminders"),
145
+ class: "text-xs font-semibold text-secondary uppercase"
146
+ }, null, 8, ["text"]), I(H(ge), {
147
+ label: H(i).t("wise_invoicing.invoice_approval.overview.metrics.approval_ladder"),
148
+ to: { name: "invoice-approval-settings-module" },
149
+ size: "sm",
150
+ variant: "tertiary"
151
+ }, null, 8, ["label"])]),
152
+ _: 1
153
+ }),
154
+ I(H(Y), {
155
+ text: String(n.reminderCountTotal ?? "—"),
156
+ class: "mt-xl font-mono text-4xl font-semibold text-primary"
157
+ }, null, 8, ["text"]),
158
+ I(H(Y), {
159
+ text: a.value,
160
+ class: "mt-xs text-sm text-secondary"
161
+ }, null, 8, ["text"]),
162
+ F("div", Ae, [(B(!0), P(A, null, V(o.value, (e) => (B(), P("span", {
163
+ key: e.key,
164
+ class: z(e.key === "reminder-1" ? "bg-warning-solid" : "\n bg-error-solid\n "),
165
+ style: se({ flexGrow: e.count ?? 0 })
166
+ }, null, 6))), 128))]),
167
+ F("div", je, [(B(!0), P(A, null, V(o.value, (e) => (B(), M(H(q), {
168
+ key: e.key,
169
+ align: "center",
170
+ justify: "between",
171
+ gap: "xl"
172
+ }, {
173
+ default: U(() => [I(H(q), {
174
+ align: "center",
175
+ gap: "sm",
176
+ class: "min-w-0"
177
+ }, {
178
+ default: U(() => [F("span", { class: z([e.key === "reminder-1" ? "bg-warning-solid" : "\n bg-error-solid\n ", "size-2 shrink-0 rounded-full"]) }, null, 2), I(H(Y), {
179
+ text: e.label,
180
+ class: "text-sm text-secondary"
181
+ }, null, 8, ["text"])]),
182
+ _: 2
183
+ }, 1024), I(H(Y), {
184
+ text: e.count === null ? "—" : H(i).t("wise_invoicing.invoice_approval.overview.metrics.invoice_count", { count: e.count }),
185
+ class: "shrink-0 font-mono text-sm font-semibold text-primary tabular-nums"
186
+ }, null, 8, ["text"])]),
187
+ _: 2
188
+ }, 1024))), 128))])
189
+ ]),
190
+ _: 1
191
+ }, 8, ["aria-label"]), I(H(K), {
192
+ "aria-label": H(i).t("wise_invoicing.invoice_approval.overview.metrics.needs_attention"),
193
+ as: "section",
194
+ gap: "none",
195
+ class: "min-w-0 rounded-lg border border-secondary bg-primary p-2xl shadow-sm"
196
+ }, {
197
+ default: U(() => [I(H(q), {
198
+ align: "start",
199
+ justify: "between",
200
+ gap: "md"
201
+ }, {
202
+ default: U(() => [I(H(Y), {
203
+ text: H(i).t("wise_invoicing.invoice_approval.overview.metrics.needs_attention"),
204
+ class: "text-xs font-semibold text-secondary uppercase"
205
+ }, null, 8, ["text"]), n.needsAttentionTotal === null ? N("", !0) : (B(), M(H(W), {
206
+ key: 0,
207
+ label: H(i).t("wise_invoicing.invoice_approval.overview.metrics.invoice_count", { count: n.needsAttentionTotal }),
208
+ color: "warning",
209
+ size: "sm",
210
+ variant: "translucent"
211
+ }, null, 8, ["label"]))]),
212
+ _: 1
213
+ }), I(H(K), {
214
+ gap: "md",
215
+ class: "mt-xl"
216
+ }, {
217
+ default: U(() => [(B(!0), P(A, null, V(s.value, (e) => (B(), M(H(pe), { key: e.key }, {
218
+ default: U(() => [F("button", {
219
+ class: "flex w-full items-center gap-lg rounded-lg border border-secondary p-lg text-left hover:bg-secondary",
220
+ type: "button",
221
+ onClick: (t) => l(e.key)
222
+ }, [
223
+ 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),
224
+ I(H(K), {
225
+ gap: "none",
226
+ class: "min-w-0 flex-1"
227
+ }, {
228
+ default: U(() => [I(H(Y), {
229
+ text: e.label,
230
+ class: "text-sm font-medium text-primary"
231
+ }, null, 8, ["text"]), I(H(Y), {
232
+ text: e.description,
233
+ class: "text-xs text-secondary"
234
+ }, null, 8, ["text"])]),
235
+ _: 2
236
+ }, 1024),
237
+ I(H(Y), {
238
+ text: String(e.count ?? "—"),
239
+ class: z([e.countClass, "shrink-0 font-mono text-xl font-semibold tabular-nums"])
240
+ }, null, 8, ["text", "class"]),
241
+ I(H(h), { class: "size-(--spacing-xl) shrink-0 text-tertiary" })
242
+ ], 8, Me)]),
243
+ _: 2
244
+ }, 1024))), 128))]),
245
+ _: 1
246
+ })]),
247
+ _: 1
248
+ }, 8, ["aria-label"])]));
249
+ }
250
+ });
251
+ //#endregion
252
+ //#region src/modules/invoice-approval/api/queries/invoiceApprovalIndex.query.ts
253
+ function Pe(e) {
254
+ let t = j(() => ({ filters: e.params.filters?.value }));
255
+ return ue("invoiceApprovalIndex", {
256
+ params: { queryParams: t },
257
+ queryFn: (e) => O.getAll({
258
+ ...t.value,
259
+ pagination: e
260
+ })
261
+ });
262
+ }
263
+ //#endregion
264
+ //#region src/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverview.composable.ts
265
+ var $ = {
266
+ all: {},
267
+ awaiting: { approvalStatus: t.AWAITING_APPROVAL },
268
+ "out-of-sync": { hasChangesSinceApprovalSent: !0 },
269
+ rejected: { approvalStatus: t.REJECTED },
270
+ "reminder-1": { approvalStatus: t.REMINDER_1 },
271
+ "reminder-2": { approvalStatus: t.REMINDER_2 }
272
+ };
273
+ function Fe(e) {
274
+ function t(t) {
275
+ return {
276
+ ...t,
277
+ customerUuid: e.customerUuid.value ?? null
278
+ };
279
+ }
280
+ 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);
281
+ function c(e) {
282
+ return Pe({ params: { filters: j(() => t(e)) } });
283
+ }
284
+ let l = {
285
+ all: c($.all),
286
+ awaiting: c($.awaiting),
287
+ outOfSync: c($["out-of-sync"]),
288
+ rejected: c($.rejected),
289
+ reminderOne: c($["reminder-1"]),
290
+ reminderTwo: c($["reminder-2"])
291
+ };
292
+ function u(e) {
293
+ return e.result.value.isOk() ? e.result.value.getValue().meta.total : null;
294
+ }
295
+ let d = j(() => ({
296
+ all: u(l.all),
297
+ awaiting: u(l.awaiting),
298
+ outOfSync: u(l.outOfSync),
299
+ rejected: u(l.rejected),
300
+ reminderOne: u(l.reminderOne),
301
+ reminderTwo: u(l.reminderTwo)
302
+ })), f = j(() => Object.values(l).some((e) => e.result.value.isErr())), p = j(() => {
303
+ let { reminderOne: e, reminderTwo: t } = d.value;
304
+ return e === null || t === null ? null : e + t;
305
+ });
306
+ return {
307
+ hasCountError: f,
308
+ isFetchingNextPage: n,
309
+ isLoading: r,
310
+ counts: d,
311
+ data: o,
312
+ error: s,
313
+ fetchNextPage: i,
314
+ needsAttentionTotal: j(() => {
315
+ let { outOfSync: e, rejected: t } = d.value;
316
+ return e === null || t === null ? null : e + t;
317
+ }),
318
+ reminderCountTotal: p,
319
+ tabCounts: j(() => ({
320
+ all: d.value.all,
321
+ awaiting: d.value.awaiting,
322
+ "out-of-sync": d.value.outOfSync,
323
+ rejected: d.value.rejected,
324
+ "reminder-1": d.value.reminderOne,
325
+ "reminder-2": d.value.reminderTwo
326
+ }))
327
+ };
328
+ }
329
+ //#endregion
330
+ //#region src/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewFilters.composable.ts
331
+ function Ie() {
332
+ let e = k(), t = a({ debounceMs: 250 }), n = x({ params: { search: t.debouncedSearch } }), r = j(() => n.result.value.isOk() ? n.result.value.getValue().data : []), i = v({
333
+ actionGroup: { name: "invoice-approvals" },
334
+ filters: [_({
335
+ defaultValue: {
336
+ operator: y.INCLUDES,
337
+ value: []
338
+ },
339
+ disableOperators: !0,
340
+ displayFn: (e) => r.value.find((t) => t.uuid === e)?.name ?? e,
341
+ key: "customerUuids",
342
+ label: e.t("wise_invoicing.invoice_approval.overview.filters.customer"),
343
+ options: async (e) => i.values.value.customerUuids.value.length > 0 ? [] : (t.updateSearch(e), await R(), r.value.map((e) => e.uuid))
344
+ })]
345
+ });
346
+ return {
347
+ customerUuid: j(() => i.values.value.customerUuids.value.at(-1)),
348
+ filters: i
349
+ };
350
+ }
351
+ //#endregion
352
+ //#region src/modules/invoice-approval/actions/invoiceApprovalMarkAsApproved.action.ts
353
+ function Le() {
354
+ let e = k(), t = Z().create(D);
355
+ return Q({
356
+ id: "invoice-approval-mark-as-approved",
357
+ isApplicable: (e) => {
358
+ if (!e.hasTargetedModelsOfType("InvoiceApproval")) return !1;
359
+ let t = e.targetedModelOfTypeOrThrow("InvoiceApproval");
360
+ return b.canMarkAsApproved(t.approval.status);
361
+ },
362
+ name: () => e.t("wise_invoicing.invoice.detail.actions.mark_as_approved"),
363
+ execute: async (e) => {
364
+ let n = e.targetedModelOfTypeOrThrow("InvoiceApproval");
365
+ await t.open({
366
+ approvalUuid: n.uuid,
367
+ invoiceUuid: n.invoiceUuid
368
+ });
369
+ },
370
+ icon: () => ee
371
+ });
372
+ }
373
+ //#endregion
374
+ //#region src/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewActionsCell.vue
375
+ var Re = /* @__PURE__ */ L({
376
+ __name: "InvoiceApprovalOverviewActionsCell",
377
+ props: { item: {} },
378
+ setup(e) {
379
+ let t = e, n = Le(), r = j(() => [{
380
+ ...t.item,
381
+ key: t.item.uuid,
382
+ modelName: "InvoiceApproval"
383
+ }]);
384
+ return (e, t) => (B(), M(H(J), null, {
385
+ default: U(() => [I(H(ve), { class: "w-full" }, {
386
+ default: U(() => [I(H(q), {
387
+ align: "center",
388
+ justify: "end",
389
+ gap: "xs",
390
+ class: "w-full"
391
+ }, {
392
+ default: U(() => [I(H(fe), {
393
+ action: H(n),
394
+ models: r.value,
395
+ "is-current-context-only": !0
396
+ }, {
397
+ default: U(({ canExecute: e, icon: t, label: n }) => [e ? (B(), M(H(G), {
398
+ key: 0,
399
+ "icon-right": t,
400
+ label: n,
401
+ size: "sm",
402
+ variant: "secondary"
403
+ }, null, 8, ["icon-right", "label"])) : N("", !0)]),
404
+ _: 1
405
+ }, 8, ["action", "models"])]),
406
+ _: 1
407
+ })]),
408
+ _: 1
409
+ })]),
410
+ _: 1
411
+ }));
412
+ }
413
+ }), ze = /* @__PURE__ */ L({
414
+ __name: "InvoiceApprovalOverviewAmountCell",
415
+ props: { item: {} },
416
+ setup(e) {
417
+ 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) }));
418
+ return (e, t) => (B(), M(H(J), null, {
419
+ default: U(() => [I(H(K), {
420
+ gap: "none",
421
+ class: "w-full"
422
+ }, {
423
+ default: U(() => [I(H(Y), {
424
+ text: a.value,
425
+ class: "w-full text-right text-sm font-medium text-secondary tabular-nums"
426
+ }, null, 8, ["text"]), I(H(Y), {
427
+ text: o.value,
428
+ class: "w-full text-right text-xs text-tertiary tabular-nums"
429
+ }, null, 8, ["text"])]),
430
+ _: 1
431
+ })]),
432
+ _: 1
433
+ }));
434
+ }
435
+ }), Be = /* @__PURE__ */ L({
436
+ __name: "InvoiceApprovalOverviewInvoiceCell",
437
+ props: { item: {} },
438
+ setup(e) {
439
+ let t = e, n = k();
440
+ return (e, r) => (B(), M(H(J), null, {
441
+ default: U(() => [I(H(K), {
442
+ gap: "none",
443
+ class: "min-w-0"
444
+ }, {
445
+ default: U(() => [I(H(Y), {
446
+ text: t.item.invoiceSubject ?? H(n).t("wise_invoicing.invoice.detail.fallback_title"),
447
+ class: "text-sm font-medium text-primary"
448
+ }, null, 8, ["text"]), I(H(Y), {
449
+ text: t.item.customerName ?? "-",
450
+ class: "text-xs text-secondary"
451
+ }, null, 8, ["text"])]),
452
+ _: 1
453
+ })]),
454
+ _: 1
455
+ }));
456
+ }
457
+ }), Ve = { class: "flex min-w-0 flex-col items-start gap-xxs" }, He = /* @__PURE__ */ L({
458
+ __name: "InvoiceApprovalOverviewNextReminderCell",
459
+ props: { item: {} },
460
+ setup(e) {
461
+ let t = e, n = k(), r = g(), i = j(() => t.item.hasChangesSinceApprovalSent), a = j(() => {
462
+ let e = t.item.nextReminderOn;
463
+ return e === null ? null : de.Now.plainDateISO().until(e, { largestUnit: "days" }).days;
464
+ }), o = j(() => {
465
+ let e = a.value;
466
+ 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 });
467
+ }), s = j(() => {
468
+ let e = t.item.approval, i = e.reminderSentAt;
469
+ return i !== null && e.level !== null ? n.t("wise_invoicing.invoice_approval.overview.last_reminder", {
470
+ level: n.t(b.getReminderLevelTranslationKey(e.level)),
471
+ time: r.toRelativeTime(i)
472
+ }) : 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) });
473
+ }), l = {
474
+ icon: c,
475
+ type: "icon"
476
+ };
477
+ return (e, t) => (B(), M(H(J), null, {
478
+ default: U(() => [F("div", Ve, [i.value ? (B(), M(H(W), {
479
+ key: 0,
480
+ label: H(n).t("wise_invoicing.invoice_approval.overview.reminder_blocked"),
481
+ left: l,
482
+ color: "error",
483
+ size: "sm",
484
+ variant: "translucent"
485
+ }, null, 8, ["label"])) : o.value === null ? N("", !0) : (B(), M(H(W), {
486
+ key: 1,
487
+ color: (a.value ?? 0) <= 0 ? "warning" : "success",
488
+ label: o.value,
489
+ size: "sm",
490
+ variant: "translucent"
491
+ }, null, 8, ["color", "label"])), I(H(Y), {
492
+ text: s.value,
493
+ class: "text-xs text-secondary"
494
+ }, null, 8, ["text"])])]),
495
+ _: 1
496
+ }));
497
+ }
498
+ }), Ue = {
499
+ class: "flex shrink-0 gap-xxs",
500
+ "aria-hidden": "true"
501
+ }, We = 2, Ge = /* @__PURE__ */ L({
502
+ __name: "InvoiceApprovalReminderLevelIndicator",
503
+ props: { level: {} },
504
+ setup(e) {
505
+ let t = e, r = j(() => Math.min(We, t.level)), i = j(() => t.level === n._2);
506
+ return (e, t) => (B(), P("span", Ue, [(B(), P(A, null, V(We, (e) => F("span", {
507
+ key: e,
508
+ 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"])
509
+ }, null, 2)), 64))]));
510
+ }
511
+ }), Ke = /* @__PURE__ */ L({
512
+ __name: "InvoiceApprovalOverviewStatusCell",
513
+ props: { item: {} },
514
+ setup(t) {
515
+ let n = t, r = k(), i = j(() => n.item.approval.status === e.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"));
516
+ return (e, t) => (B(), M(H(J), null, {
517
+ default: U(() => [I(H(q), {
518
+ align: "center",
519
+ gap: "xs"
520
+ }, {
521
+ default: U(() => [i.value === null ? (B(), M(C, {
522
+ key: 1,
523
+ approval: n.item.approval,
524
+ rejection: n.item.rejectionReason === null ? null : {
525
+ reason: n.item.rejectionReason,
526
+ remark: null
527
+ },
528
+ "requires-prior-approval": !0
529
+ }, null, 8, ["approval", "rejection"])) : (B(), M(H(q), {
530
+ key: 0,
531
+ align: "center",
532
+ gap: "sm",
533
+ class: "min-w-0 rounded-md border border-secondary py-xxs pr-sm pl-xs"
534
+ }, {
535
+ default: U(() => [I(Ge, { level: i.value }, null, 8, ["level"]), I(H(Y), {
536
+ text: a.value,
537
+ class: "text-xs text-primary"
538
+ }, null, 8, ["text"])]),
539
+ _: 1
540
+ })), n.item.hasChangesSinceApprovalSent ? (B(), M(S, { key: 2 })) : N("", !0)]),
541
+ _: 1
542
+ })]),
543
+ _: 1
544
+ }));
545
+ }
546
+ });
547
+ //#endregion
548
+ //#region src/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewTableColumns.composable.ts
549
+ function qe() {
550
+ let e = k();
551
+ return j(() => Se()([
552
+ {
553
+ headerLabel: e.t("wise_invoicing.invoice_approval.overview.columns.invoice"),
554
+ key: "invoice",
555
+ size: {
556
+ max: "24rem",
557
+ min: "14rem"
558
+ },
559
+ component: (e) => X(Be, { item: e })
560
+ },
561
+ {
562
+ headerLabel: e.t("wise_invoicing.invoice_approval.overview.columns.status"),
563
+ key: "status",
564
+ size: {
565
+ max: "14rem",
566
+ min: "10rem"
567
+ },
568
+ component: (e) => X(Ke, { item: e })
569
+ },
570
+ {
571
+ headerLabel: e.t("wise_invoicing.invoice_approval.overview.columns.next_reminder"),
572
+ key: "nextReminder",
573
+ size: {
574
+ max: "14rem",
575
+ min: "10rem"
576
+ },
577
+ component: (e) => X(He, { item: e })
578
+ },
579
+ {
580
+ headerLabel: e.t("wise_invoicing.invoice_approval.overview.columns.amount"),
581
+ key: "amount",
582
+ size: {
583
+ max: "12rem",
584
+ min: "9rem"
585
+ },
586
+ component: (e) => X(ze, { item: e })
587
+ },
588
+ {
589
+ headerLabel: e.t("wise_invoicing.invoice_approval.overview.columns.actions"),
590
+ key: "actions",
591
+ size: {
592
+ max: "16rem",
593
+ min: "14rem"
594
+ },
595
+ component: (e) => X(Re, { item: e })
596
+ }
597
+ ]));
598
+ }
599
+ //#endregion
600
+ //#region src/modules/invoice-approval/use-cases/overview/views/InvoiceApprovalOverviewView.vue
601
+ var Je = /* @__PURE__ */ L({
602
+ __name: "InvoiceApprovalOverviewView",
603
+ setup(e) {
604
+ let t = k(), n = r(), i = we("tab", "awaiting"), a = ce(!0), { customerUuid: s, filters: c } = Ie();
605
+ re(c);
606
+ let { hasCountError: p, isFetchingNextPage: ee, isLoading: h, counts: g, data: _, error: v, fetchNextPage: y, needsAttentionTotal: b, reminderCountTotal: x, tabCounts: S } = Fe({
607
+ customerUuid: s,
608
+ activeTab: j(() => i.value)
609
+ }), C = j(() => c.activeFilters.value.length), w = j(() => [
610
+ {
611
+ icon: o,
612
+ key: "all",
613
+ label: t.t("wise_invoicing.invoice_approval.overview.tabs.all")
614
+ },
615
+ {
616
+ icon: ne,
617
+ key: "awaiting",
618
+ label: t.t("wise_invoicing.invoice.approval_status.awaiting_approval")
619
+ },
620
+ {
621
+ icon: f,
622
+ key: "reminder-1",
623
+ label: t.t("wise_invoicing.invoice.approval_status.r1")
624
+ },
625
+ {
626
+ icon: l,
627
+ key: "reminder-2",
628
+ label: t.t("wise_invoicing.invoice.approval_status.r2")
629
+ },
630
+ {
631
+ icon: d,
632
+ key: "rejected",
633
+ label: t.t("wise_invoicing.invoice.approval_status.rejected")
634
+ },
635
+ {
636
+ icon: m,
637
+ key: "out-of-sync",
638
+ label: t.t("wise_invoicing.invoice_approval.overview.tabs.out_of_sync")
639
+ }
640
+ ]);
641
+ n.set(() => t.t("wise_invoicing.invoice_approval.title"));
642
+ let T = Oe(), E = Ee(), D = Te(), O = j(() => [
643
+ T,
644
+ E,
645
+ D
646
+ ]), F = j(() => !h.value && v.value === null && _.value.length === 0 && C.value === 0), L = qe();
647
+ function R(e) {
648
+ let t = S.value[e];
649
+ return t === null ? null : {
650
+ type: "count",
651
+ value: t
652
+ };
653
+ }
654
+ function z(e) {
655
+ return {
656
+ name: "invoicing-invoice-detail",
657
+ params: { invoiceUuid: e.invoiceUuid }
658
+ };
659
+ }
660
+ return (e, n) => (B(), M(H(me), {
661
+ title: H(t).t("wise_invoicing.invoice_approval.title"),
662
+ "is-title-hidden": !0
663
+ }, {
664
+ default: U(() => [I(H(K), {
665
+ align: "stretch",
666
+ gap: "xl",
667
+ class: "min-h-0 flex-1 px-3xl py-xl"
668
+ }, {
669
+ default: U(() => [
670
+ I(H(q), {
671
+ align: "center",
672
+ justify: "between",
673
+ gap: "lg",
674
+ class: "shrink-0"
675
+ }, {
676
+ default: U(() => [I(H(K), { gap: "none" }, {
677
+ default: U(() => [I(H(Y), {
678
+ text: H(t).t("wise_invoicing.invoice_approval.title"),
679
+ as: "h2",
680
+ class: "text-lg font-semibold text-primary"
681
+ }, null, 8, ["text"]), I(H(Y), {
682
+ text: H(t).t("wise_invoicing.invoice_approval.overview.description"),
683
+ class: "mt-xs text-sm text-secondary"
684
+ }, null, 8, ["text"])]),
685
+ _: 1
686
+ }), I(H(G), {
687
+ "icon-left": a.value ? H(te) : H(u),
688
+ label: H(t).t(a.value ? "wise_invoicing.invoice_approval.overview.hide_metrics" : "wise_invoicing.invoice_approval.overview.show_metrics"),
689
+ variant: "secondary",
690
+ onClick: n[0] ||= (e) => a.value = !a.value
691
+ }, null, 8, ["icon-left", "label"])]),
692
+ _: 1
693
+ }),
694
+ a.value ? (B(), M(Ne, {
695
+ key: 0,
696
+ "has-count-error": H(p),
697
+ "needs-attention-total": H(b),
698
+ "out-of-sync-count": H(g).outOfSync,
699
+ "rejected-count": H(g).rejected,
700
+ "reminder-count-total": H(x),
701
+ "reminder-one-count": H(g).reminderOne,
702
+ "reminder-two-count": H(g).reminderTwo,
703
+ onShowOutOfSync: n[1] ||= (e) => i.value = "out-of-sync",
704
+ onShowRejected: n[2] ||= (e) => i.value = "rejected"
705
+ }, null, 8, [
706
+ "has-count-error",
707
+ "needs-attention-total",
708
+ "out-of-sync-count",
709
+ "rejected-count",
710
+ "reminder-count-total",
711
+ "reminder-one-count",
712
+ "reminder-two-count"
713
+ ])) : N("", !0),
714
+ I(H(K), {
715
+ align: "stretch",
716
+ gap: "none",
717
+ class: "min-h-0 flex-1 overflow-hidden rounded-lg border border-secondary bg-primary shadow-sm"
718
+ }, {
719
+ default: U(() => [
720
+ I(H(q), {
721
+ align: "center",
722
+ justify: "between",
723
+ gap: "md",
724
+ class: "border-b border-secondary p-sm"
725
+ }, {
726
+ default: U(() => [I(H(ye), {
727
+ modelValue: H(i),
728
+ "onUpdate:modelValue": n[3] ||= (e) => oe(i) ? i.value = e : null,
729
+ variant: "button-border"
730
+ }, {
731
+ default: U(() => [I(H(xe), null, {
732
+ default: U(() => [(B(!0), P(A, null, V(w.value, (e) => (B(), M(H(be), {
733
+ key: e.key,
734
+ config: {
735
+ indicator: R(e.key),
736
+ left: {
737
+ icon: e.icon,
738
+ type: "icon"
739
+ }
740
+ },
741
+ label: e.label,
742
+ value: e.key
743
+ }, null, 8, [
744
+ "config",
745
+ "label",
746
+ "value"
747
+ ]))), 128))]),
748
+ _: 1
749
+ })]),
750
+ _: 1
751
+ }, 8, ["modelValue"])]),
752
+ _: 1
753
+ }),
754
+ I(H(q), {
755
+ align: "center",
756
+ justify: "between",
757
+ gap: "md",
758
+ class: "border-b border-secondary p-sm"
759
+ }, {
760
+ default: U(() => [C.value === 0 ? (B(), M(H(Y), {
761
+ key: 0,
762
+ text: H(t).t("wise_invoicing.common.no_active_filters"),
763
+ class: "px-sm text-xs text-secondary"
764
+ }, null, 8, ["text"])) : (B(), M(H(ie), { key: 1 })), I(H(ae))]),
765
+ _: 1
766
+ }),
767
+ F.value ? (B(), M(H(he), {
768
+ key: 0,
769
+ title: H(t).t("wise_invoicing.invoice_approval.overview.empty_state.title"),
770
+ description: H(t).t("wise_invoicing.invoice_approval.overview.empty_state.description"),
771
+ illustration: "documents",
772
+ class: "py-7xl"
773
+ }, null, 8, ["title", "description"])) : (B(), M(H(_e), {
774
+ key: 1,
775
+ "active-filter-count": C.value,
776
+ actions: O.value,
777
+ columns: H(L),
778
+ data: H(_),
779
+ error: H(v),
780
+ "get-action-model": (e) => ({
781
+ ...e,
782
+ key: e.uuid,
783
+ modelName: "InvoiceApproval"
784
+ }),
785
+ "get-key": (e) => e.uuid,
786
+ "get-link": z,
787
+ "is-fetching-next-page": H(ee),
788
+ "is-loading": H(h),
789
+ onClearFilters: n[4] ||= (e) => H(c).clearAll(),
790
+ onNextPage: H(y)
791
+ }, null, 8, [
792
+ "active-filter-count",
793
+ "actions",
794
+ "columns",
795
+ "data",
796
+ "error",
797
+ "get-action-model",
798
+ "get-key",
799
+ "is-fetching-next-page",
800
+ "is-loading",
801
+ "onNextPage"
802
+ ]))
803
+ ]),
804
+ _: 1
805
+ })
806
+ ]),
807
+ _: 1
808
+ })]),
809
+ _: 1
810
+ }, 8, ["title"]));
811
+ }
812
+ });
813
+ //#endregion
814
+ export { Je as default };