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