@wisemen/wise-invoicing-web 0.5.0 → 0.7.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 (93) hide show
  1. package/dist/{ApprovalReminderSettingsViewDataProvider-CD0Seawd.js → ApprovalReminderSettingsViewDataProvider-Dsp3ee3c.js} +4 -4
  2. package/dist/{BillingDocumentDetailViewDataProvider-BgVYrLu8.js → BillingDocumentDetailViewDataProvider-TX-tovKU.js} +1708 -1576
  3. package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
  4. package/dist/{BillingDocumentPdf-LYvPMzYT.js → BillingDocumentPdf-c-7N80u4.js} +266 -205
  5. package/dist/{CreditNoteDetailViewDataProvider-CpSIbMM2.js → CreditNoteDetailViewDataProvider-BNT0h67Q.js} +196 -189
  6. package/dist/{CreditNotePdfViewDataProvider-Dtnu9gS3.js → CreditNotePdfViewDataProvider-qgOuhUf_.js} +2 -2
  7. package/dist/{CustomFieldValueText-DA0aPKwC.js → CustomFieldValueText-BP4bKQh7.js} +68 -38
  8. package/dist/{DunningCaseDetailViewDataProvider-DutSCkco.js → DunningCaseDetailViewDataProvider-BNByfQTc.js} +13 -13
  9. package/dist/{DunningCaseOverviewView-D8o4VMQD.js → DunningCaseOverviewView-Dvwaw597.js} +23 -23
  10. package/dist/{DunningCaseReminderPdfViewDataProvider-I_ZQiAuK.js → DunningCaseReminderPdfViewDataProvider-D1avIVyK.js} +1 -1
  11. package/dist/{DunningCaseSendDialog-DGg7bXeZ.js → DunningCaseSendDialog-DwB_jFum.js} +17 -17
  12. package/dist/{InvoiceApprovalOutOfSyncIndicator-AJOQe8j8.js → InvoiceApprovalOutOfSyncIndicator-B_9HLzpt.js} +2 -2
  13. package/dist/{InvoiceApprovalOverviewView-C4MI4IqD.js → InvoiceApprovalOverviewView-jawT-M1t.js} +213 -213
  14. package/dist/{InvoiceApprovalStatusBadge-BJ3Q18bf.js → InvoiceApprovalStatusBadge-D6Sr6JmN.js} +4 -4
  15. package/dist/{InvoiceApproveDialogDataProvider-CMZ0zDZo.js → InvoiceApproveDialogDataProvider-Bwb8bP1e.js} +16 -16
  16. package/dist/{InvoiceDetailViewDataProvider-k1yIeHYP.js → InvoiceDetailViewDataProvider-B8mMYTQf.js} +648 -642
  17. package/dist/{InvoiceOverviewViewDataProvider-BrgmweRE.js → InvoiceOverviewViewDataProvider-CLgV-Jcv.js} +501 -501
  18. package/dist/{InvoicePdfView-CB8gx8TE.js → InvoicePdfView-C518PlHp.js} +2 -2
  19. package/dist/{InvoicePdfViewDataProvider-Cs4Gqa0h.js → InvoicePdfViewDataProvider-ClfBkHUZ.js} +3 -3
  20. package/dist/{InvoicePublicPdfViewDataProvider-BaSvVJ8W.js → InvoicePublicPdfViewDataProvider-CoXBj3Je.js} +3 -3
  21. package/dist/{InvoicePublicProFormaPdfViewDataProvider-S3N9E91M.js → InvoicePublicProFormaPdfViewDataProvider-WlVD7sw1.js} +3 -3
  22. package/dist/{InvoicingFileUploadProvider-BLBjPKqx.js → InvoicingFileUploadProvider-Dl1LvCPm.js} +2 -2
  23. package/dist/{IssuerSettingsViewDataProvider-BStn0jFI.js → IssuerSettingsViewDataProvider-CXyyCvoZ.js} +51 -46
  24. package/dist/PeppolSettingsViewDataProvider-Cptga29B.js +276 -0
  25. package/dist/{ReminderSettingsViewDataProvider-BotrOSmS.js → ReminderSettingsViewDataProvider-BZgzQIxM.js} +63 -63
  26. package/dist/{api.util-D6m6OY3_.js → api.util-CR2xLnNj.js} +785 -670
  27. package/dist/{billingDocumentDetail.transformer-Da-Nt4bI.js → billingDocumentDetail.transformer-D1f6Nv-U.js} +9 -2
  28. package/dist/client/index.d.ts +2 -2
  29. package/dist/client/sdk.gen.d.ts +4 -1
  30. package/dist/client/types.gen.d.ts +240 -56
  31. package/dist/client/zod.gen.d.ts +4206 -1343
  32. package/dist/composables/invoicingConfig.composable.d.ts +12 -0
  33. package/dist/{creditNoteDetail.query-Yb8TdZNm.js → creditNoteDetail.query-DGeG9_sO.js} +15 -15
  34. package/dist/{dist-DCbLgB6Y.js → dist-BMzyJZTx.js} +258 -114
  35. package/dist/{dist-BpDuRYDT.js → dist-DALBiuub.js} +134 -134
  36. package/dist/{documentTitle.composable-CRJjS6p-.js → documentTitle.composable-RvqrZTBa.js} +28 -26
  37. package/dist/{download.util-B5Q7KUC9.js → download.util-LyRpGWKA.js} +9 -0
  38. package/dist/{i18n.lib-DBxdqkbJ.js → i18n.lib-MOiHLIGc.js} +58 -2
  39. package/dist/index.d.ts +59 -2
  40. package/dist/index.js +232 -212
  41. package/dist/{invoice.service-DWDl9XRh.js → invoice.service-Fv4F4aZq.js} +39 -38
  42. package/dist/{invoiceApproval.service-Fwlxgd9o.js → invoiceApproval.service-DJvXagC7.js} +7 -7
  43. package/dist/{invoiceApprovalStatus.util-q-zHLdFV.js → invoiceApprovalStatus.util-B98WeAf0.js} +2 -2
  44. package/dist/{invoiceCustomer.service-DOexR54S.js → invoiceCustomer.service-CDyrtcwH.js} +6 -6
  45. package/dist/{invoiceDetail.query-B5w0Vlsy.js → invoiceDetail.query-UHE0NCLh.js} +1 -1
  46. package/dist/{invoiceIndexCache.util-CUlp4R7R.js → invoiceIndexCache.util-CLM7FO6z.js} +3 -3
  47. package/dist/{invoicingConfig.composable-CaWQMTP1.js → invoicingConfig.composable-UC7tGtBj.js} +14 -10
  48. package/dist/{issuerSettings.query-BHuLjV9P.js → issuerSettings.query-CoiXblSm.js} +2 -2
  49. package/dist/libs/i18n.lib.d.ts +56 -0
  50. package/dist/locales/en-US.json.d.ts +29 -1
  51. package/dist/locales/nl-BE.json.d.ts +29 -1
  52. package/dist/models/billing-document/billingDocumentAdvancePayment.util.d.ts +9 -0
  53. package/dist/models/billing-document/billingDocumentAdvancePayment.util.spec.d.ts +1 -0
  54. package/dist/models/billing-document/billingDocumentDetail.model.d.ts +1 -0
  55. package/dist/modules/custom-field/components/CustomFieldList.vue.d.ts +0 -1
  56. package/dist/modules/custom-field/components/customFieldList.spec.d.ts +1 -0
  57. package/dist/modules/custom-field/components/customFieldTypeIcon.d.ts +16 -0
  58. package/dist/modules/custom-field/components/customFieldValueText.spec.d.ts +1 -0
  59. package/dist/modules/custom-field/composables/customFieldReferenceLinks.composable.d.ts +16 -0
  60. package/dist/modules/custom-field/composables/customFieldReferenceLinks.composable.spec.d.ts +1 -0
  61. package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.model.d.ts +6 -0
  62. package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.transformer.spec.d.ts +1 -0
  63. package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.util.d.ts +6 -0
  64. package/dist/modules/custom-field/models/custom-field-definition/customFieldViewKey.model.d.ts +9 -0
  65. package/dist/modules/custom-field/models/custom-field-value/customFieldValue.model.d.ts +1 -1
  66. package/dist/modules/custom-field/models/custom-field-value/customFieldValue.util.d.ts +10 -0
  67. package/dist/modules/custom-field/test/builders/customFieldDefinition.builder.d.ts +3 -1
  68. package/dist/modules/invoice/models/invoice/pdf/invoicePdfDetail.model.d.ts +1 -0
  69. package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailPaymentsTableColumns.composable.d.ts +1 -1
  70. package/dist/modules/invoice-delivery/api/mutations/peppolConnectionUpdate.mutation.d.ts +6 -0
  71. package/dist/modules/invoice-delivery/api/queries/peppolConnection.query.d.ts +1 -0
  72. package/dist/modules/invoice-delivery/api/query-keys/invoiceDelivery.queryKeys.d.ts +6 -0
  73. package/dist/modules/invoice-delivery/api/services/peppolConnection.service.d.ts +8 -0
  74. package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormApiKeyField.vue.d.ts +8 -0
  75. package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormCompanyField.vue.d.ts +11 -0
  76. package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormEnabledField.vue.d.ts +7 -0
  77. package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormProviderField.vue.d.ts +9 -0
  78. package/dist/modules/invoice-delivery/index.d.ts +1 -0
  79. package/dist/modules/invoice-delivery/models/deliveryReason.util.d.ts +6 -0
  80. package/dist/modules/invoice-delivery/models/peppolConnection.model.d.ts +18 -0
  81. package/dist/modules/invoice-delivery/models/peppolConnection.transformer.d.ts +9 -0
  82. package/dist/modules/invoice-delivery/models/peppolConnectionForm.model.d.ts +9 -0
  83. package/dist/modules/invoice-delivery/use-cases/settings/views/PeppolSettingsView.vue.d.ts +7 -0
  84. package/dist/modules/invoice-delivery/use-cases/settings/views/PeppolSettingsViewDataProvider.vue.d.ts +3 -0
  85. package/dist/modules/settings/routes/settings.routes.d.ts +7 -0
  86. package/dist/{reminderConfig.query-C4J6m4ER.js → reminderConfig.query-aRFzY6uZ.js} +22 -22
  87. package/dist/style.css +1 -1
  88. package/dist/types/queryKey.type.d.ts +2 -1
  89. package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +114 -0
  90. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +57 -36
  91. package/dist/ui/customer-invoice-list/composables/customerInvoiceTableColumns.composable.d.ts +6 -1
  92. package/dist/ui/customer-invoice-list/composables/customerInvoiceTableColumns.composable.spec.d.ts +1 -0
  93. package/package.json +1 -1
@@ -1,26 +1,26 @@
1
- import { t as e } from "./i18n.lib-DBxdqkbJ.js";
2
- import "./api.util-D6m6OY3_.js";
3
- import { b as t, r as n } from "./documentTitle.composable-CRJjS6p-.js";
1
+ import { t as e } from "./i18n.lib-MOiHLIGc.js";
2
+ import "./api.util-CR2xLnNj.js";
3
+ import { b as t, r as n } from "./documentTitle.composable-RvqrZTBa.js";
4
4
  import { n as r } from "./address.transformer-jGddczLV.js";
5
- import { t as i } from "./download.util-B5Q7KUC9.js";
6
- import { B as a, I as o, P as s, Y as c, _ as l, gt as u, i as d, j as f, l as p, nt as m, q as h, x as g } from "./dist-DCbLgB6Y.js";
7
- import { n as _, t as v } from "./dist-Cdbpkd3Y.js";
8
- import { t as y } from "./formango.util-D5c2ql--.js";
9
- import { i as b, n as ee } from "./CustomFieldValueText-DA0aPKwC.js";
10
- import { n as x, r as S, t as C } from "./creditNoteDetail.query-Yb8TdZNm.js";
11
- import { C as w, S as T, _ as E, a as D, b as te, c as O, d as k, f as A, g as ne, h as re, i as ie, m as ae, n as oe, o as se, p as ce, r as le, s as ue, t as de, u as fe, v as pe, x as me, y as he } from "./BillingDocumentDetailViewDataProvider-BgVYrLu8.js";
12
- import { r as ge } from "./InvoicingFileUploadProvider-BLBjPKqx.js";
13
- import _e, { z as j } from "zod";
14
- import { useI18n as M } from "vue-i18n";
15
- import { Fragment as ve, computed as N, createBlock as P, createCommentVNode as F, createElementBlock as ye, createElementVNode as be, createVNode as I, defineComponent as L, mergeProps as R, normalizeClass as z, openBlock as B, ref as V, renderSlot as xe, resolveDynamicComponent as Se, unref as H, withCtx as U } from "vue";
16
- import { useKeysetInfiniteQuery as Ce, useMutation as W } from "@wisemen/vue-core-api-utils";
17
- import { useRouter as we } from "vue-router";
18
- import { UIAnimateHeight as Te, UIBadge as Ee, UIClickableElement as De, UIColumnLayout as G, UIDateField as Oe, UIDialogFooter as ke, UIDialogFooterCancel as Ae, UIDialogFooterSubmit as je, UIDialogHeader as Me, UIForm as K, UIFormDialog as Ne, UIRowLayout as q, UISeparator as Pe, UIText as J, UITextField as Fe, useOverlay as Ie, useToast as Y } from "@wisemen/vue-core-design-system";
5
+ import { a as i, i as a, n as o, r as s, t as c } from "./CustomFieldValueText-BP4bKQh7.js";
6
+ import { n as l, t as u } from "./download.util-LyRpGWKA.js";
7
+ import { L as d, T as f, Tt as p, U as m, V as h, b as g, dt as _, i as ee, it as v, nt as y, q as b, u as x } from "./dist-BMzyJZTx.js";
8
+ import { n as S, t as C } from "./dist-Cdbpkd3Y.js";
9
+ import { t as w } from "./formango.util-D5c2ql--.js";
10
+ import { n as T, r as E, t as D } from "./creditNoteDetail.query-DGeG9_sO.js";
11
+ import { C as O, S as te, _ as k, a as ne, b as re, c as ie, d as ae, f as oe, g as se, h as ce, i as le, m as ue, n as de, o as fe, p as pe, r as me, s as he, t as ge, u as _e, v as ve, x as ye, y as be } from "./BillingDocumentDetailViewDataProvider-TX-tovKU.js";
12
+ import { r as xe } from "./InvoicingFileUploadProvider-Dl1LvCPm.js";
13
+ import Se, { z as A } from "zod";
14
+ import { useI18n as j } from "vue-i18n";
15
+ import { Fragment as M, computed as N, createBlock as P, createCommentVNode as F, createElementBlock as I, createElementVNode as Ce, createVNode as L, defineComponent as R, mergeProps as z, normalizeClass as B, openBlock as V, ref as we, renderList as Te, renderSlot as Ee, resolveDynamicComponent as De, unref as H, withCtx as U } from "vue";
16
+ import { useKeysetInfiniteQuery as Oe, useMutation as W } from "@wisemen/vue-core-api-utils";
17
+ import { useRouter as ke } from "vue-router";
18
+ import { UIAnimateHeight as Ae, UIBadge as je, UIClickableElement as Me, UIColumnLayout as G, UIDateField as Ne, UIDialogFooter as Pe, UIDialogFooterCancel as Fe, UIDialogFooterSubmit as Ie, UIDialogHeader as Le, UIForm as K, UIFormDialog as Re, UIRowLayout as q, UISeparator as ze, UIText as J, UITextField as Be, useOverlay as Ve, useToast as Y } from "@wisemen/vue-core-design-system";
19
19
  import { useForm as X } from "formango";
20
20
  //#region src/modules/credit-note/api/mutations/creditNoteUpdate.mutation.ts
21
21
  function Z() {
22
22
  return W({
23
- queryFn: (e) => x.update(e.params.creditNoteUuid, e.body),
23
+ queryFn: (e) => T.update(e.params.creditNoteUuid, e.body),
24
24
  queryKeysToInvalidate: {
25
25
  creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid },
26
26
  invoiceIndex: {}
@@ -29,23 +29,23 @@ function Z() {
29
29
  }
30
30
  //#endregion
31
31
  //#region src/modules/credit-note/models/update/creditNoteUpdateForm.model.ts
32
- var Le = j.object({
33
- issuedOn: v,
34
- externalRemarks: j.string().nullable(),
35
- poNumber: j.string().nullable(),
36
- subject: j.string().nullable()
32
+ var He = A.object({
33
+ issuedOn: C,
34
+ externalRemarks: A.string().nullable(),
35
+ poNumber: A.string().nullable(),
36
+ subject: A.string().nullable()
37
37
  }).superRefine((t, n) => {
38
38
  t.externalRemarks?.trim() === "" && n.addIssue({
39
39
  code: "custom",
40
40
  message: e.global.t("wise_invoicing.credit_note.finalize.validation.external_remarks_required"),
41
41
  path: ["externalRemarks"]
42
42
  });
43
- }), Re = j.object({ subject: j.string().nullable() });
43
+ }), Ue = A.object({ subject: A.string().nullable() });
44
44
  //#endregion
45
45
  //#region src/modules/credit-note/api/mutations/creditNoteFinalize.mutation.ts
46
- function ze() {
46
+ function We() {
47
47
  return W({
48
- queryFn: (e) => x.finalize(e.params.creditNoteUuid),
48
+ queryFn: (e) => T.finalize(e.params.creditNoteUuid),
49
49
  queryKeysToInvalidate: {
50
50
  creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid },
51
51
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
@@ -55,9 +55,9 @@ function ze() {
55
55
  }
56
56
  //#endregion
57
57
  //#region src/modules/credit-note/api/mutations/creditNoteMarkAsDraft.mutation.ts
58
- function Be() {
58
+ function Ge() {
59
59
  return W({
60
- queryFn: (e) => x.markAsDraft(e.params.creditNoteUuid),
60
+ queryFn: (e) => T.markAsDraft(e.params.creditNoteUuid),
61
61
  queryKeysToInvalidate: {
62
62
  creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid },
63
63
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
@@ -67,9 +67,9 @@ function Be() {
67
67
  }
68
68
  //#endregion
69
69
  //#region src/modules/credit-note/api/mutations/creditNoteMarkAsReady.mutation.ts
70
- function Ve() {
70
+ function Ke() {
71
71
  return W({
72
- queryFn: (e) => x.markAsReady(e.params.creditNoteUuid),
72
+ queryFn: (e) => T.markAsReady(e.params.creditNoteUuid),
73
73
  queryKeysToInvalidate: {
74
74
  creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid },
75
75
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
@@ -79,29 +79,29 @@ function Ve() {
79
79
  }
80
80
  //#endregion
81
81
  //#region src/modules/credit-note/api/mutations/creditNoteSend.mutation.ts
82
- function He() {
82
+ function qe() {
83
83
  return W({
84
- queryFn: (e) => x.send(e.params.creditNoteUuid),
84
+ queryFn: (e) => T.send(e.params.creditNoteUuid),
85
85
  queryKeysToInvalidate: { creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid } }
86
86
  });
87
87
  }
88
88
  //#endregion
89
89
  //#region src/modules/credit-note/api/mutations/creditNoteDelete.mutation.ts
90
- function Ue() {
90
+ function Je() {
91
91
  return W({
92
- queryFn: (e) => x.delete(e.params.creditNoteUuid),
92
+ queryFn: (e) => T.delete(e.params.creditNoteUuid),
93
93
  queryKeysToInvalidate: { invoiceIndex: {} }
94
94
  });
95
95
  }
96
96
  //#endregion
97
97
  //#region src/modules/credit-note/use-cases/detail/dialogs/CreditNoteDeleteDialog.vue
98
- var We = /* @__PURE__ */ L({
98
+ var Ye = /* @__PURE__ */ R({
99
99
  __name: "CreditNoteDeleteDialog",
100
100
  props: { creditNote: {} },
101
101
  emits: ["close", "deleted"],
102
102
  setup(e, { emit: t }) {
103
- let n = e, r = t, i = M(), a = we(), o = Y(), s = Ue(), c = N(() => n.creditNote.sequence ?? n.creditNote.subject ?? i.t("wise_invoicing.credit_note.detail.fallback_title")), l = X({
104
- schema: _e.object({}),
103
+ let n = e, r = t, i = j(), a = ke(), o = Y(), s = Je(), c = N(() => n.creditNote.sequence ?? n.creditNote.subject ?? i.t("wise_invoicing.credit_note.detail.fallback_title")), l = X({
104
+ schema: Se.object({}),
105
105
  onSubmit: async () => {
106
106
  let e = await s.execute({ params: { creditNoteUuid: n.creditNote.uuid } });
107
107
  if (e.isErr()) {
@@ -111,16 +111,16 @@ var We = /* @__PURE__ */ L({
111
111
  o.show({ message: c.value }), r("deleted"), r("close"), await a.push({ name: "invoicing-invoice-overview" });
112
112
  }
113
113
  });
114
- return (e, t) => (B(), P(H(Ne), {
114
+ return (e, t) => (V(), P(H(Re), {
115
115
  form: H(l),
116
116
  size: "xs",
117
117
  onClose: t[0] ||= (e) => r("close")
118
118
  }, {
119
- default: U(() => [I(H(Me), {
119
+ default: U(() => [L(H(Le), {
120
120
  title: H(i).t("wise_invoicing.credit_note.delete.title"),
121
121
  description: H(i).t("wise_invoicing.credit_note.delete.description", { creditNoteIdentifier: c.value })
122
- }, null, 8, ["title", "description"]), I(H(ke), null, {
123
- right: U(() => [I(H(Ae)), I(H(je), {
122
+ }, null, 8, ["title", "description"]), L(H(Pe), null, {
123
+ right: U(() => [L(H(Fe)), L(H(Ie), {
124
124
  "is-destructive": !0,
125
125
  label: H(i).t("wise_invoicing.credit_note.delete.submit_button")
126
126
  }, null, 8, ["label"])]),
@@ -132,10 +132,10 @@ var We = /* @__PURE__ */ L({
132
132
  });
133
133
  //#endregion
134
134
  //#region src/modules/credit-note/use-cases/detail/composables/creditNoteDetailHeaderActions.composable.ts
135
- function Ge(e) {
136
- let n = M(), r = Y(), a = Ie(), c = a.create(We), l = a.create(te), p = ze(), m = Be(), h = Ve(), _ = He(), { shouldSkipConfirmation: v } = me(), y = N(() => e.value.originalInvoice?.uuid ?? e.value.uuid), b = N(() => e.value.status !== t.DRAFT && e.value.status !== t.READY);
137
- async function S() {
138
- let t = await h.execute({ params: {
135
+ function Xe(e) {
136
+ let n = j(), r = Y(), i = Ve(), a = i.create(Ye), s = i.create(re), c = We(), l = Ge(), g = Ke(), _ = qe(), { shouldSkipConfirmation: v } = ye(), y = N(() => e.value.originalInvoice?.uuid ?? e.value.uuid), b = N(() => e.value.status !== t.DRAFT && e.value.status !== t.READY);
137
+ async function x() {
138
+ let t = await g.execute({ params: {
139
139
  creditNoteUuid: e.value.uuid,
140
140
  invoiceUuid: y.value
141
141
  } });
@@ -145,25 +145,25 @@ function Ge(e) {
145
145
  }
146
146
  r.show({ message: n.t("wise_invoicing.credit_note.mark_as_ready.success") });
147
147
  }
148
- async function C() {
149
- let t = await p.execute({ params: {
148
+ async function S() {
149
+ let t = await c.execute({ params: {
150
150
  creditNoteUuid: e.value.uuid,
151
151
  invoiceUuid: y.value
152
152
  } });
153
153
  return t.isErr() ? (r.apiError(t.error), !1) : (r.show({ message: n.t("wise_invoicing.credit_note.finalize.success") }), !0);
154
154
  }
155
- async function w() {
155
+ async function C() {
156
156
  if (v.value) {
157
- await C();
157
+ await S();
158
158
  return;
159
159
  }
160
- await l.open({
160
+ await s.open({
161
161
  billingDocumentType: "credit_note",
162
- onConfirm: C
162
+ onConfirm: S
163
163
  });
164
164
  }
165
- async function T() {
166
- let t = await m.execute({ params: {
165
+ async function w() {
166
+ let t = await l.execute({ params: {
167
167
  creditNoteUuid: e.value.uuid,
168
168
  invoiceUuid: y.value
169
169
  } });
@@ -182,26 +182,26 @@ function Ge(e) {
182
182
  r.show({ message: n.t("wise_invoicing.credit_note.send.success") });
183
183
  }
184
184
  async function D() {
185
- await c.open({ creditNote: e.value });
185
+ await a.open({ creditNote: e.value });
186
186
  }
187
187
  async function O() {
188
- let t = await x.getByUuid(e.value.uuid);
188
+ let t = await T.getByUuid(e.value.uuid);
189
189
  if (t.isErr()) {
190
190
  r.apiError(t.error);
191
191
  return;
192
192
  }
193
- let a = t.value.file;
194
- if (a === null) {
193
+ let i = t.value.file;
194
+ if (i === null) {
195
195
  r.show({ message: n.t("wise_invoicing.invoice.download_pdf.generation_in_progress") });
196
196
  return;
197
197
  }
198
- let o = await ge.getDownloadUrl(a.uuid);
199
- o !== null && i.downloadUrl(o, a.name);
198
+ let a = await xe.getDownloadUrl(i.uuid);
199
+ a !== null && u.downloadUrl(a, i.name);
200
200
  }
201
- let k = N(() => [
201
+ let te = N(() => [
202
202
  {
203
203
  isLoading: _.isLoading.value,
204
- iconLeft: u,
204
+ iconLeft: p,
205
205
  key: "send",
206
206
  label: n.t("wise_invoicing.invoice.detail.actions.send"),
207
207
  variant: "primary",
@@ -209,39 +209,39 @@ function Ge(e) {
209
209
  onClick: E
210
210
  },
211
211
  {
212
- isLoading: h.isLoading.value,
213
- iconRight: d,
212
+ isLoading: g.isLoading.value,
213
+ iconRight: ee,
214
214
  key: "markAsReady",
215
215
  label: n.t("wise_invoicing.invoice.detail.actions.mark_as_ready"),
216
216
  visible: e.value.status === t.DRAFT,
217
- onClick: S
217
+ onClick: x
218
218
  },
219
219
  {
220
- isLoading: p.isLoading.value,
221
- iconRight: f,
220
+ isLoading: c.isLoading.value,
221
+ iconRight: d,
222
222
  key: "finalize",
223
223
  label: n.t("wise_invoicing.invoice.detail.actions.finalize"),
224
224
  visible: e.value.status === t.READY,
225
- onClick: w
225
+ onClick: C
226
226
  }
227
- ].filter((e) => e.visible)), A = N(() => {
227
+ ].filter((e) => e.visible)), k = N(() => {
228
228
  let r = [{
229
- icon: g,
229
+ icon: f,
230
230
  key: "downloadPdf",
231
231
  label: n.t("wise_invoicing.common.download_pdf"),
232
232
  visible: b.value,
233
233
  onSelect: O
234
234
  }, {
235
- icon: o,
235
+ icon: m,
236
236
  key: "backToDraft",
237
237
  label: n.t("wise_invoicing.invoice.detail.actions.mark_as_draft"),
238
238
  visible: e.value.status === t.READY,
239
- onSelect: T
239
+ onSelect: w
240
240
  }], i = [{
241
- icon: s,
241
+ icon: h,
242
242
  key: "delete",
243
243
  label: n.t("wise_invoicing.credit_note.detail.actions.delete"),
244
- visible: ee.isEditable(e.value.status),
244
+ visible: o.isEditable(e.value.status),
245
245
  onSelect: D
246
246
  }];
247
247
  return [{
@@ -253,14 +253,14 @@ function Ge(e) {
253
253
  }].filter((e) => e.items.length > 0);
254
254
  });
255
255
  return {
256
- isActionMenuVisible: N(() => A.value.length > 0),
257
- menuGroups: A,
258
- primaryButtons: k
256
+ isActionMenuVisible: N(() => k.value.length > 0),
257
+ menuGroups: k,
258
+ primaryButtons: te
259
259
  };
260
260
  }
261
261
  //#endregion
262
262
  //#region src/modules/credit-note/use-cases/detail/components/CreditNoteDetailHeaderSection.vue
263
- var Ke = /* @__PURE__ */ L({
263
+ var Ze = /* @__PURE__ */ R({
264
264
  __name: "CreditNoteDetailHeaderSection",
265
265
  props: {
266
266
  isPdfViewActive: { type: Boolean },
@@ -268,35 +268,35 @@ var Ke = /* @__PURE__ */ L({
268
268
  },
269
269
  emits: ["togglePdfView"],
270
270
  setup(e, { emit: n }) {
271
- let r = e, i = n, a = M(), o = Y(), s = Z(), { menuGroups: c, primaryButtons: l } = Ge(N(() => r.creditNote)), u = N(() => new T(r.creditNote.status)), d = N(() => u.value.color), f = N(() => a.t(u.value.translationKey)), p = N(() => r.creditNote.status !== t.DRAFT && r.creditNote.status !== t.READY), h = X({
271
+ let r = e, i = n, a = j(), o = Y(), s = Z(), { menuGroups: c, primaryButtons: l } = Xe(N(() => r.creditNote)), u = N(() => new te(r.creditNote.status)), d = N(() => u.value.color), f = N(() => a.t(u.value.translationKey)), p = N(() => r.creditNote.status !== t.DRAFT && r.creditNote.status !== t.READY), m = X({
272
272
  initialState: { subject: r.creditNote.subject },
273
- schema: Re,
273
+ schema: Ue,
274
274
  onSubmit: async (e) => {
275
275
  let t = await s.execute({
276
276
  body: {
277
- ...S.toForm(r.creditNote),
277
+ ...E.toForm(r.creditNote),
278
278
  subject: e.subject
279
279
  },
280
280
  params: { creditNoteUuid: r.creditNote.uuid }
281
281
  });
282
282
  t.isErr() && o.apiError(t.error);
283
283
  }
284
- }), g = h.register("subject");
285
- return w({ form: h }), (e, t) => (B(), P(H(K), {
286
- form: H(h),
284
+ }), h = m.register("subject");
285
+ return O({ form: m }), (e, t) => (V(), P(H(K), {
286
+ form: H(m),
287
287
  "prompt-on-unsaved-changes": !1
288
288
  }, {
289
- default: U(() => [I(pe, {
289
+ default: U(() => [L(ve, {
290
290
  "fallback-title": H(a).t("wise_invoicing.credit_note.detail.fallback_title"),
291
291
  "is-disabled": p.value,
292
292
  sequence: r.creditNote.sequence,
293
293
  "status-color": d.value,
294
294
  "status-label": f.value,
295
- icon: H(m),
296
- "subject-field": H(g),
295
+ icon: H(_),
296
+ "subject-field": H(h),
297
297
  "subject-placeholder": H(a).t("wise_invoicing.invoice.detail.header.subject_placeholder")
298
298
  }, {
299
- actions: U(() => [I(E, {
299
+ actions: U(() => [L(k, {
300
300
  "is-pdf-view-active": r.isPdfViewActive,
301
301
  "menu-groups": H(c),
302
302
  "primary-buttons": H(l),
@@ -306,11 +306,11 @@ var Ke = /* @__PURE__ */ L({
306
306
  "menu-groups",
307
307
  "primary-buttons"
308
308
  ])]),
309
- status: U(() => [I(H(q), {
309
+ status: U(() => [L(H(q), {
310
310
  gap: "xs",
311
311
  class: "flex-wrap items-start"
312
312
  }, {
313
- default: U(() => [r.creditNote.isOverdue ? (B(), P(he, { key: 0 })) : F("", !0)]),
313
+ default: U(() => [r.creditNote.isOverdue ? (V(), P(be, { key: 0 })) : F("", !0)]),
314
314
  _: 1
315
315
  })]),
316
316
  _: 1
@@ -327,13 +327,13 @@ var Ke = /* @__PURE__ */ L({
327
327
  _: 1
328
328
  }, 8, ["form"]));
329
329
  }
330
- }), qe = /* @__PURE__ */ L({
330
+ }), Qe = /* @__PURE__ */ R({
331
331
  __name: "CreditNoteDetailRemarksSection",
332
332
  props: { creditNote: {} },
333
333
  setup(e) {
334
- let n = e, r = M(), i = Y(), a = Z(), o = X({
335
- initialState: N(() => S.toForm(n.creditNote)),
336
- schema: Le,
334
+ let n = e, r = j(), i = Y(), a = Z(), o = X({
335
+ initialState: N(() => E.toForm(n.creditNote)),
336
+ schema: He,
337
337
  onSubmit: async (e) => {
338
338
  let t = await a.execute({
339
339
  body: e,
@@ -342,11 +342,11 @@ var Ke = /* @__PURE__ */ L({
342
342
  t.isErr() && i.apiError(t.error);
343
343
  }
344
344
  }), s = o.register("externalRemarks"), c = N(() => n.creditNote.status !== t.DRAFT && n.creditNote.status !== t.READY);
345
- return w({ form: o }), (e, t) => (B(), P(H(K), {
345
+ return O({ form: o }), (e, t) => (V(), P(H(K), {
346
346
  form: H(o),
347
347
  "prompt-on-unsaved-changes": !1
348
348
  }, {
349
- default: U(() => [I(ne, {
349
+ default: U(() => [L(se, {
350
350
  "is-disabled": c.value,
351
351
  placeholder: H(r).t("wise_invoicing.invoice.detail.remarks.placeholder"),
352
352
  "remarks-field": H(s),
@@ -363,23 +363,23 @@ var Ke = /* @__PURE__ */ L({
363
363
  });
364
364
  //#endregion
365
365
  //#region src/modules/credit-note/api/queries/creditNoteActivityLogIndex.query.ts
366
- function Je(e) {
367
- return Ce("creditNoteActivityLogIndex", {
366
+ function $e(e) {
367
+ return Oe("creditNoteActivityLogIndex", {
368
368
  params: { creditNoteUuid: e },
369
- queryFn: (t) => x.getActivityLogs(e.value, { pagination: t })
369
+ queryFn: (t) => T.getActivityLogs(e.value, { pagination: t })
370
370
  });
371
371
  }
372
372
  //#endregion
373
373
  //#region src/modules/credit-note/use-cases/detail/components/sidebar/CreditNoteDetailSidebarActivityTab.vue
374
- var Ye = /* @__PURE__ */ L({
374
+ var et = /* @__PURE__ */ R({
375
375
  __name: "CreditNoteDetailSidebarActivityTab",
376
376
  props: { creditNote: {} },
377
377
  setup(e) {
378
- let t = e, r = M(), { hasNextPage: i, isFetchingNextPage: a, isLoading: o, fetchNextPage: s, result: c } = Je(N(() => t.creditNote.uuid)), l = N(() => c.value.unwrapOr({
378
+ let t = e, r = j(), { hasNextPage: i, isFetchingNextPage: a, isLoading: o, fetchNextPage: s, result: c } = $e(N(() => t.creditNote.uuid)), l = N(() => c.value.unwrapOr({
379
379
  data: [],
380
380
  meta: { next: null }
381
381
  }).data);
382
- return (e, c) => (B(), P(re, {
382
+ return (e, c) => (V(), P(ce, {
383
383
  "current-billing-document": {
384
384
  role: H(n).CREDIT_NOTE,
385
385
  uuid: t.creditNote.uuid
@@ -400,7 +400,7 @@ var Ye = /* @__PURE__ */ L({
400
400
  "is-loading"
401
401
  ]));
402
402
  }
403
- }), Q = /* @__PURE__ */ L({
403
+ }), Q = /* @__PURE__ */ R({
404
404
  __name: "BillingDocumentDetailSidebarInfoItem",
405
405
  props: {
406
406
  hasError: {
@@ -412,25 +412,25 @@ var Ye = /* @__PURE__ */ L({
412
412
  },
413
413
  setup(e) {
414
414
  let t = e;
415
- return (e, n) => (B(), P(H(q), null, {
415
+ return (e, n) => (V(), P(H(q), null, {
416
416
  default: U(() => [
417
- (B(), P(Se(t.icon), { class: z([{
417
+ (V(), P(De(t.icon), { class: B([{
418
418
  "text-error-primary": t.hasError,
419
419
  "text-tertiary": !t.hasError
420
420
  }, "size-3.5 shrink-0"]) }, null, 8, ["class"])),
421
- I(H(J), {
421
+ L(H(J), {
422
422
  text: t.label,
423
- class: z([{
423
+ class: B([{
424
424
  "text-error-primary": t.hasError,
425
425
  "text-tertiary": !t.hasError
426
426
  }, "w-24 shrink-0 text-xs"])
427
427
  }, null, 8, ["text", "class"]),
428
- xe(e.$slots, "default")
428
+ Ee(e.$slots, "default")
429
429
  ]),
430
430
  _: 3
431
431
  }));
432
432
  }
433
- }), $ = /* @__PURE__ */ L({
433
+ }), $ = /* @__PURE__ */ R({
434
434
  __name: "BillingDocumentDetailSidebarPartySection",
435
435
  props: {
436
436
  title: {},
@@ -442,41 +442,41 @@ var Ye = /* @__PURE__ */ L({
442
442
  address: {}
443
443
  },
444
444
  setup(e) {
445
- let t = e, n = V(t.isDefaultOpen);
445
+ let t = e, n = we(t.isDefaultOpen);
446
446
  function i() {
447
447
  n.value = !n.value;
448
448
  }
449
- return (e, a) => (B(), P(H(G), { class: "w-full" }, {
450
- default: U(() => [I(H(q), { justify: "between" }, {
451
- default: U(() => [I(H(De), { class: "rounded-sm" }, {
452
- default: U(() => [be("button", {
449
+ return (e, a) => (V(), P(H(G), { class: "w-full" }, {
450
+ default: U(() => [L(H(q), { justify: "between" }, {
451
+ default: U(() => [L(H(Me), { class: "rounded-sm" }, {
452
+ default: U(() => [Ce("button", {
453
453
  type: "button",
454
454
  class: "flex w-full items-center gap-sm",
455
455
  onClick: i
456
456
  }, [
457
- I(H(J), {
457
+ L(H(J), {
458
458
  text: t.title,
459
459
  class: "text-xs font-semibold text-primary"
460
460
  }, null, 8, ["text"]),
461
- I(H(Ee), {
461
+ L(H(je), {
462
462
  label: t.name,
463
463
  color: "gray",
464
464
  variant: "outline"
465
465
  }, null, 8, ["label"]),
466
- I(H(c), { class: z([{ "rotate-180": n.value }, "size-4 text-tertiary transition-all duration-100"]) }, null, 8, ["class"])
466
+ L(H(v), { class: B([{ "rotate-180": n.value }, "size-4 text-tertiary transition-all duration-100"]) }, null, 8, ["class"])
467
467
  ])]),
468
468
  _: 1
469
469
  })]),
470
470
  _: 1
471
- }), I(H(Te), null, {
472
- default: U(() => [n.value ? (B(), P(H(G), {
471
+ }), L(H(Ae), null, {
472
+ default: U(() => [n.value ? (V(), P(H(G), {
473
473
  key: 0,
474
474
  gap: "xs"
475
475
  }, {
476
- default: U(() => [I(H(J), {
476
+ default: U(() => [L(H(J), {
477
477
  text: t.name,
478
478
  class: "text-xs font-medium text-primary"
479
- }, null, 8, ["text"]), t.address ? (B(), P(H(J), {
479
+ }, null, 8, ["text"]), t.address ? (V(), P(H(J), {
480
480
  key: 0,
481
481
  truncate: !1,
482
482
  text: H(r).format(t.address),
@@ -489,56 +489,56 @@ var Ye = /* @__PURE__ */ L({
489
489
  _: 1
490
490
  }));
491
491
  }
492
- }), Xe = /* @__PURE__ */ L({
492
+ }), tt = /* @__PURE__ */ R({
493
493
  __name: "CreditNoteDetailSidebarInfoTab",
494
494
  props: {
495
495
  creditNote: {},
496
496
  customFieldDefinitions: {}
497
497
  },
498
498
  setup(e) {
499
- let n = e, r = M(), i = Y(), o = Z(), s = X({
500
- initialState: N(() => S.toForm(n.creditNote)),
501
- schema: Le,
499
+ let n = e, r = j(), i = Y(), a = Z(), o = X({
500
+ initialState: N(() => E.toForm(n.creditNote)),
501
+ schema: He,
502
502
  onSubmit: async (e) => {
503
- let t = await o.execute({
503
+ let t = await a.execute({
504
504
  body: e,
505
505
  params: { creditNoteUuid: n.creditNote.uuid }
506
506
  });
507
507
  t.isErr() && i.apiError(t.error);
508
508
  }
509
- }), c = s.register("issuedOn"), u = s.register("poNumber"), d = N(() => n.creditNote.status !== t.DRAFT && n.creditNote.status !== t.READY);
510
- return w({ form: s }), (e, t) => (B(), P(H(K), {
511
- form: H(s),
509
+ }), u = N(() => l.listByDefinitions(n.customFieldDefinitions, n.creditNote.customFields)), d = o.register("issuedOn"), f = o.register("poNumber"), p = N(() => n.creditNote.status !== t.DRAFT && n.creditNote.status !== t.READY);
510
+ return O({ form: o }), (e, t) => (V(), P(H(K), {
511
+ form: H(o),
512
512
  "prompt-on-unsaved-changes": !1
513
513
  }, {
514
- default: U(() => [I(H(G), {
514
+ default: U(() => [L(H(G), {
515
515
  gap: "lg",
516
516
  class: "px-2xl py-xl"
517
517
  }, {
518
518
  default: U(() => [
519
- I(H(G), null, {
520
- default: U(() => [I(H(J), {
519
+ L(H(G), null, {
520
+ default: U(() => [L(H(J), {
521
521
  text: H(r).t("wise_invoicing.invoice.detail.sidebar.general"),
522
522
  class: "text-xs font-semibold text-primary"
523
- }, null, 8, ["text"]), I(H(G), { gap: "lg" }, {
523
+ }, null, 8, ["text"]), L(H(G), { gap: "lg" }, {
524
524
  default: U(() => [
525
- I(Q, {
526
- icon: H(l),
525
+ L(Q, {
526
+ icon: H(g),
527
527
  label: H(r).t("wise_invoicing.invoice.detail.header.invoice_id")
528
528
  }, {
529
- default: U(() => [I(H(J), {
529
+ default: U(() => [L(H(J), {
530
530
  text: n.creditNote.sequence ?? "-",
531
531
  class: "text-xs text-primary"
532
532
  }, null, 8, ["text"])]),
533
533
  _: 1
534
534
  }, 8, ["icon", "label"]),
535
- I(Q, {
536
- icon: H(a),
537
- "has-error": H(u).errors.value.length > 0,
535
+ L(Q, {
536
+ icon: H(b),
537
+ "has-error": H(f).errors.value.length > 0,
538
538
  label: H(r).t("wise_invoicing.invoice.detail.header.po_number")
539
539
  }, {
540
- default: U(() => [I(H(Fe), R(H(y)(H(u)), {
541
- "is-disabled": d.value,
540
+ default: U(() => [L(H(Be), z(H(w)(H(f)), {
541
+ "is-disabled": p.value,
542
542
  label: null,
543
543
  class: "w-full"
544
544
  }), null, 16, ["is-disabled"])]),
@@ -548,40 +548,47 @@ var Ye = /* @__PURE__ */ L({
548
548
  "has-error",
549
549
  "label"
550
550
  ]),
551
- I(Q, {
552
- icon: H(p),
551
+ L(Q, {
552
+ icon: H(x),
553
553
  label: H(r).t("wise_invoicing.invoice.detail.header.issuer")
554
554
  }, {
555
- default: U(() => [I(H(J), {
555
+ default: U(() => [L(H(J), {
556
556
  text: n.creditNote.issuer.name ?? "-",
557
557
  class: "text-xs text-primary"
558
558
  }, null, 8, ["text"])]),
559
559
  _: 1
560
560
  }, 8, ["icon", "label"]),
561
- I(Q, {
562
- icon: H(h),
563
- "has-error": H(c).errors.value.length > 0,
561
+ L(Q, {
562
+ icon: H(y),
563
+ "has-error": H(d).errors.value.length > 0,
564
564
  label: H(r).t("wise_invoicing.invoice.detail.header.invoice_date")
565
565
  }, {
566
- default: U(() => [I(H(Oe), R({ "is-disabled": d.value }, H(y)(H(c))), null, 16, ["is-disabled"])]),
566
+ default: U(() => [L(H(Ne), z({ "is-disabled": p.value }, H(w)(H(d))), null, 16, ["is-disabled"])]),
567
567
  _: 1
568
568
  }, 8, [
569
569
  "icon",
570
570
  "has-error",
571
571
  "label"
572
572
  ]),
573
- I(ae, {
574
- definitions: n.customFieldDefinitions,
575
- values: n.creditNote.customFields
576
- }, null, 8, ["definitions", "values"])
573
+ (V(!0), I(M, null, Te(u.value, (e) => (V(), P(Q, {
574
+ key: e.definition.uuid,
575
+ icon: H(ue)[e.definition.type],
576
+ label: H(s).getLabel(e.definition, H(r).locale.value)
577
+ }, {
578
+ default: U(() => [L(c, {
579
+ definition: e.definition,
580
+ value: e.value
581
+ }, null, 8, ["definition", "value"])]),
582
+ _: 2
583
+ }, 1032, ["icon", "label"]))), 128))
577
584
  ]),
578
585
  _: 1
579
586
  })]),
580
587
  _: 1
581
588
  }),
582
- I(H(Pe)),
583
- I(ce, { "original-invoice": n.creditNote.originalInvoice }, null, 8, ["original-invoice"]),
584
- I($, {
589
+ L(H(ze)),
590
+ L(pe, { "original-invoice": n.creditNote.originalInvoice }, null, 8, ["original-invoice"]),
591
+ L($, {
585
592
  "is-default-open": !0,
586
593
  name: n.creditNote.customer.name ?? "-",
587
594
  title: H(r).t("wise_invoicing.invoice.detail.header.bill_to"),
@@ -591,8 +598,8 @@ var Ye = /* @__PURE__ */ L({
591
598
  "title",
592
599
  "address"
593
600
  ]),
594
- I(H(Pe)),
595
- I($, {
601
+ L(H(ze)),
602
+ L($, {
596
603
  name: n.creditNote.issuer.email ?? "-",
597
604
  title: H(r).t("wise_invoicing.invoice.detail.header.bill_from"),
598
605
  address: n.creditNote.issuer.address
@@ -607,20 +614,20 @@ var Ye = /* @__PURE__ */ L({
607
614
  _: 1
608
615
  }, 8, ["form"]));
609
616
  }
610
- }), Ze = /* @__PURE__ */ L({
617
+ }), nt = /* @__PURE__ */ R({
611
618
  __name: "CreditNoteDetailSidebar",
612
619
  props: {
613
620
  creditNote: {},
614
621
  customFieldDefinitions: {}
615
622
  },
616
623
  setup(e) {
617
- let t = e, n = M(), r = _(), i = N(() => n.t("wise_invoicing.invoice.detail.sidebar.updated_on", { date: r.toDateTime(t.creditNote.updatedAt) }));
618
- return (e, n) => (B(), P(A, {
624
+ let t = e, n = j(), r = S(), i = N(() => n.t("wise_invoicing.invoice.detail.sidebar.updated_on", { date: r.toDateTime(t.creditNote.updatedAt) }));
625
+ return (e, n) => (V(), P(oe, {
619
626
  "billing-document": t.creditNote,
620
627
  "updated-footer": i.value
621
628
  }, {
622
- activity: U(() => [I(Ye, { "credit-note": t.creditNote }, null, 8, ["credit-note"])]),
623
- info: U(() => [I(Xe, {
629
+ activity: U(() => [L(et, { "credit-note": t.creditNote }, null, 8, ["credit-note"])]),
630
+ info: U(() => [L(tt, {
624
631
  "credit-note": t.creditNote,
625
632
  "custom-field-definitions": t.customFieldDefinitions
626
633
  }, null, 8, ["credit-note", "custom-field-definitions"])]),
@@ -630,9 +637,9 @@ var Ye = /* @__PURE__ */ L({
630
637
  });
631
638
  //#endregion
632
639
  //#region src/modules/credit-note/api/mutations/creditNoteUpdateLines.mutation.ts
633
- function Qe() {
640
+ function rt() {
634
641
  return W({
635
- queryFn: (e) => x.updateLines(e.params.creditNoteUuid, e.body),
642
+ queryFn: (e) => T.updateLines(e.params.creditNoteUuid, e.body),
636
643
  queryKeysToInvalidate: {
637
644
  creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid },
638
645
  invoiceIndex: {}
@@ -641,14 +648,14 @@ function Qe() {
641
648
  }
642
649
  //#endregion
643
650
  //#region src/modules/credit-note/use-cases/detail/components/table/CreditNoteLineItemsTableSection.vue
644
- var $e = /* @__PURE__ */ L({
651
+ var it = /* @__PURE__ */ R({
645
652
  __name: "CreditNoteLineItemsTableSection",
646
653
  props: {
647
654
  creditNote: {},
648
655
  customFieldDefinitions: {}
649
656
  },
650
657
  setup(e) {
651
- let t = e, n = N(() => t.creditNote), r = Qe(), i = ie({
658
+ let t = e, n = N(() => t.creditNote), r = rt(), i = le({
652
659
  isSaving: N(() => r.isLoading.value),
653
660
  billingDocument: () => n.value,
654
661
  customFieldDefinitions: () => t.customFieldDefinitions,
@@ -657,24 +664,24 @@ var $e = /* @__PURE__ */ L({
657
664
  params: { creditNoteUuid: t.creditNote.uuid }
658
665
  })
659
666
  });
660
- return k(i), (e, n) => (B(), P(se, null, {
667
+ return ae(i), (e, n) => (V(), P(fe, null, {
661
668
  default: U(() => [
662
- I(ue, { "show-apply-discount": !1 }),
663
- I(O),
664
- I(D, { "billing-document": t.creditNote }, null, 8, ["billing-document"]),
665
- I(fe)
669
+ L(he, { "show-apply-discount": !1 }),
670
+ L(ie),
671
+ L(ne, { "billing-document": t.creditNote }, null, 8, ["billing-document"]),
672
+ L(_e)
666
673
  ]),
667
674
  _: 1
668
675
  }));
669
676
  }
670
- }), et = /* @__PURE__ */ L({
677
+ }), at = /* @__PURE__ */ R({
671
678
  __name: "CreditNoteDetailView",
672
679
  props: {
673
680
  creditNote: {},
674
681
  customFieldDefinitions: {}
675
682
  },
676
683
  setup(e) {
677
- let t = e, n = M(), r = V(!1), i = N(() => [
684
+ let t = e, n = j(), r = we(!1), a = N(() => s.filterByView(t.customFieldDefinitions, i.CREDIT_NOTE_DETAIL)), o = N(() => [
678
685
  {
679
686
  label: n.t("wise_invoicing.invoice.overview.title"),
680
687
  to: { name: "invoicing-invoice-overview" }
@@ -689,31 +696,31 @@ var $e = /* @__PURE__ */ L({
689
696
  { label: n.t("wise_invoicing.invoice.detail.credit_notes.untitled") },
690
697
  { label: t.creditNote.sequence ?? n.t("wise_invoicing.credit_note.detail.fallback_title") }
691
698
  ]);
692
- return (e, a) => (B(), P(le, {
699
+ return (e, i) => (V(), P(me, {
693
700
  "billing-document": t.creditNote,
694
- breadcrumbs: i.value,
701
+ breadcrumbs: o.value,
695
702
  title: H(n).t("wise_invoicing.credit_note.detail.fallback_title")
696
703
  }, {
697
- header: U(() => [I(Ke, {
704
+ header: U(() => [L(Ze, {
698
705
  "credit-note": t.creditNote,
699
706
  "is-pdf-view-active": r.value,
700
707
  class: "w-full",
701
- onTogglePdfView: a[0] ||= (e) => r.value = !r.value
708
+ onTogglePdfView: i[0] ||= (e) => r.value = !r.value
702
709
  }, null, 8, ["credit-note", "is-pdf-view-active"])]),
703
- default: U(() => [r.value ? (B(), P(oe, {
710
+ default: U(() => [r.value ? (V(), P(de, {
704
711
  key: 0,
705
712
  "billing-document": t.creditNote,
706
713
  class: "w-full"
707
- }, null, 8, ["billing-document"])) : (B(), ye(ve, { key: 1 }, [I($e, {
714
+ }, null, 8, ["billing-document"])) : (V(), I(M, { key: 1 }, [L(it, {
708
715
  "credit-note": t.creditNote,
709
- "custom-field-definitions": t.customFieldDefinitions
710
- }, null, 8, ["credit-note", "custom-field-definitions"]), I(qe, {
716
+ "custom-field-definitions": a.value
717
+ }, null, 8, ["credit-note", "custom-field-definitions"]), L(Qe, {
711
718
  "credit-note": t.creditNote,
712
719
  class: "w-full"
713
720
  }, null, 8, ["credit-note"])], 64))]),
714
- sidebar: U(() => [I(Ze, {
721
+ sidebar: U(() => [L(nt, {
715
722
  "credit-note": t.creditNote,
716
- "custom-field-definitions": t.customFieldDefinitions
723
+ "custom-field-definitions": a.value
717
724
  }, null, 8, ["credit-note", "custom-field-definitions"])]),
718
725
  _: 1
719
726
  }, 8, [
@@ -722,20 +729,20 @@ var $e = /* @__PURE__ */ L({
722
729
  "title"
723
730
  ]));
724
731
  }
725
- }), tt = /* @__PURE__ */ L({
732
+ }), ot = /* @__PURE__ */ R({
726
733
  __name: "CreditNoteDetailViewDataProvider",
727
734
  props: { creditNoteUuid: {} },
728
735
  setup(e) {
729
- let t = e, n = M(), r = N(() => [{
736
+ let t = e, n = j(), r = N(() => [{
730
737
  label: n.t("wise_invoicing.invoice.overview.title"),
731
738
  to: { name: "invoicing-invoice-overview" }
732
- }]), i = C(N(() => t.creditNoteUuid)), a = b();
733
- return (e, t) => (B(), P(de, {
734
- "custom-field-definitions-query": H(a),
739
+ }]), i = D(N(() => t.creditNoteUuid)), o = a();
740
+ return (e, t) => (V(), P(ge, {
741
+ "custom-field-definitions-query": H(o),
735
742
  query: H(i),
736
743
  "loading-breadcrumbs": r.value
737
744
  }, {
738
- default: U(({ billingDocument: e, customFieldDefinitions: t }) => [I(et, {
745
+ default: U(({ billingDocument: e, customFieldDefinitions: t }) => [L(at, {
739
746
  "credit-note": e,
740
747
  "custom-field-definitions": t
741
748
  }, null, 8, ["credit-note", "custom-field-definitions"])]),
@@ -748,4 +755,4 @@ var $e = /* @__PURE__ */ L({
748
755
  }
749
756
  });
750
757
  //#endregion
751
- export { tt as default };
758
+ export { ot as default };