@wisemen/wise-invoicing-web 0.14.0 → 0.16.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 (72) hide show
  1. package/dist/{ApprovalReminderSettingsViewDataProvider-DlsyA-ZR.js → ApprovalReminderSettingsViewDataProvider-CpGYtZKw.js} +4 -4
  2. package/dist/{BillingDocumentDetailViewDataProvider-D3-X20WR.js → BillingDocumentDetailViewDataProvider-CA71dgRN.js} +1693 -1611
  3. package/dist/{BillingDocumentPdf-CcmP3N34.js → BillingDocumentPdf-CvUxfHDH.js} +10 -10
  4. package/dist/{CreditNoteDetailViewDataProvider-X-m10Sqr.js → CreditNoteDetailViewDataProvider-DK7hkA8d.js} +236 -224
  5. package/dist/{CreditNotePdfViewDataProvider-jWh6REbj.js → CreditNotePdfViewDataProvider-DcQxB1p4.js} +3 -3
  6. package/dist/{DunningCaseSendDialog-DUyOH14Q.js → DunningCaseSendDialog-BWbEi9Vr.js} +13 -13
  7. package/dist/{InvoiceApprovalOutOfSyncIndicator-DzY8gqnD.js → InvoiceApprovalOutOfSyncIndicator-CptL1bbz.js} +2 -2
  8. package/dist/{InvoiceApprovalOverviewView-CoIGxCMN.js → InvoiceApprovalOverviewView-dsTZWXyZ.js} +68 -68
  9. package/dist/{InvoiceApprovalStatusBadge-C9O_mb1l.js → InvoiceApprovalStatusBadge-6cSp2XOq.js} +5 -5
  10. package/dist/{InvoiceApproveDialogDataProvider-hVuyszuo.js → InvoiceApproveDialogDataProvider-DsxA74kh.js} +8 -8
  11. package/dist/InvoiceDeliverySendDialog-byobpQe1.js +445 -0
  12. package/dist/{InvoiceDetailViewDataProvider-DBlmJs3o.js → InvoiceDetailViewDataProvider-DgNkoQNH.js} +484 -471
  13. package/dist/{InvoicePdfView-DBVwRo3q.js → InvoicePdfView-CA-nt_Qs.js} +2 -2
  14. package/dist/{InvoicePdfViewDataProvider-CHLE3XdC.js → InvoicePdfViewDataProvider-CVgcgc9t.js} +3 -3
  15. package/dist/{InvoicePublicProFormaPdfViewDataProvider-DECBZhaP.js → InvoicePublicProFormaPdfViewDataProvider-BIhn-msJ.js} +3 -3
  16. package/dist/{InvoicingFileUploadProvider-BZRLmEsv.js → InvoicingFileUploadProvider-DFjM7Xcj.js} +2 -2
  17. package/dist/{IssuerSettingsViewDataProvider-DrXmGKtc.js → IssuerSettingsViewDataProvider-2Gk7FgL2.js} +60 -60
  18. package/dist/PeppolSettingsViewDataProvider-CLgFRfm_.js +196 -0
  19. package/dist/{api.util-BxDrxtn6.js → api.util-DMgdn9-w.js} +979 -951
  20. package/dist/{billingDocumentDetail.transformer-I1L4zrOM.js → billingDocumentDetail.transformer-DFlbGUZp.js} +3 -3
  21. package/dist/client/index.d.ts +2 -2
  22. package/dist/client/sdk.gen.d.ts +6 -4
  23. package/dist/client/types.gen.d.ts +274 -177
  24. package/dist/client/zod.gen.d.ts +3944 -4241
  25. package/dist/creditNoteDetail.query-D7J1umi4.js +127 -0
  26. package/dist/deliveryReason.util-iMVhwjiW.js +95 -0
  27. package/dist/{dist-BMzyJZTx.js → dist-B33lNwLw.js} +1 -1
  28. package/dist/{dist-Cdbpkd3Y.js → dist-ByzJNujV.js} +69 -50
  29. package/dist/{dist-BZgvL8_m.js → dist-Ck8ZEByl.js} +3 -3
  30. package/dist/{dist-BFx8U4Su.js → dist-CwkVU5yS.js} +1 -1
  31. package/dist/{documentTitle.composable-BqZWKGw1.js → documentTitle.composable-QdSLs6eT.js} +11 -7
  32. package/dist/{i18n.lib-7EI865En.js → i18n.lib-CEXUpXfo.js} +98 -2
  33. package/dist/index.d.ts +96 -0
  34. package/dist/index.js +1484 -1480
  35. package/dist/{invoice.service-DfMS-JGk.js → invoice.service-NBqJSMkg.js} +226 -236
  36. package/dist/{invoiceApproval.service-CvvAZxJH.js → invoiceApproval.service-Bk--tRnu.js} +5 -5
  37. package/dist/{invoiceApprovalStatus.util-QhwQpmWI.js → invoiceApprovalStatus.util-CYWPHuJD.js} +30 -30
  38. package/dist/{invoiceCustomer.service-DSAI1dGB.js → invoiceCustomer.service-D13Cwb13.js} +6 -6
  39. package/dist/{invoiceIndexCache.util-DduYusET.js → invoiceDeliveryStatus.util-BExQWz3m.js} +51 -124
  40. package/dist/{invoiceDetail.query-qPz6hTNU.js → invoiceDetail.query-CLvnFeZh.js} +1 -1
  41. package/dist/{invoicingConfig.composable-DT17tqnm.js → invoicingConfig.composable-BebjIIAC.js} +2 -2
  42. package/dist/{issuerSettings.query-DYmr_dfw.js → issuerSettings.query-P_gGS0ER.js} +17 -17
  43. package/dist/libs/i18n.lib.d.ts +96 -0
  44. package/dist/locales/en-US.json.d.ts +49 -1
  45. package/dist/locales/nl-BE.json.d.ts +49 -1
  46. package/dist/modules/credit-note/api/services/creditNote.service.d.ts +0 -1
  47. package/dist/modules/invoice/api/services/invoice.service.d.ts +1 -4
  48. package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewBulkSendEligibility.composable.d.ts +2 -12
  49. package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewSelection.composable.d.ts +0 -10
  50. package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendDialog.vue.d.ts +4 -2
  51. package/dist/modules/invoice-delivery/api/mutations/invoiceDeliverySend.mutation.d.ts +4 -0
  52. package/dist/modules/invoice-delivery/api/mutations/invoiceReminderSend.mutation.d.ts +3 -0
  53. package/dist/modules/invoice-delivery/api/queries/invoiceDeliveries.query.d.ts +2 -0
  54. package/dist/modules/invoice-delivery/api/query-keys/invoiceDelivery.queryKeys.d.ts +7 -0
  55. package/dist/modules/invoice-delivery/api/services/invoiceDelivery.service.d.ts +9 -0
  56. package/dist/modules/invoice-delivery/components/form/InvoiceDeliveryFormEmailField.vue.d.ts +7 -0
  57. package/dist/modules/invoice-delivery/components/form/InvoiceDeliveryFormPeppolField.vue.d.ts +9 -0
  58. package/dist/modules/invoice-delivery/models/deliveryInvoiceIndex.builder.d.ts +9 -0
  59. package/dist/modules/invoice-delivery/models/invoiceDelivery.model.d.ts +43 -0
  60. package/dist/modules/invoice-delivery/models/invoiceDelivery.transformer.d.ts +7 -0
  61. package/dist/modules/invoice-delivery/models/invoiceDeliverySendForm.model.d.ts +6 -0
  62. package/dist/modules/invoice-delivery/use-cases/send/dialogs/InvoiceDeliverySendDialog.vue.d.ts +16 -0
  63. package/dist/modules/invoice-delivery/use-cases/status/components/InvoiceDeliveryStatus.vue.d.ts +6 -0
  64. package/dist/{reminderConfig.query-BoNWAhZP.js → reminderConfig.query-s-gBYoPo.js} +12 -12
  65. package/dist/style.css +1 -1
  66. package/package.json +10 -10
  67. package/dist/CustomFieldValueText-C9yV_CrJ.js +0 -219
  68. package/dist/PeppolSettingsViewDataProvider-BesduXML.js +0 -262
  69. package/dist/creditNoteDetail.query-BurujY-Y.js +0 -131
  70. package/dist/modules/credit-note/api/mutations/creditNoteSend.mutation.d.ts +0 -4
  71. package/dist/modules/invoice/api/mutations/invoiceBulkSend.mutation.d.ts +0 -5
  72. package/dist/modules/invoice/api/mutations/invoiceSend.mutation.d.ts +0 -4
@@ -1,21 +1,21 @@
1
- import { t as e } from "./i18n.lib-7EI865En.js";
2
- import "./api.util-BxDrxtn6.js";
3
- import { b as t, r as n } from "./documentTitle.composable-BqZWKGw1.js";
4
- import { n as r } from "./address.transformer-jGddczLV.js";
5
- import { a as i, i as a, n as o, r as s, t as c } from "./CustomFieldValueText-C9yV_CrJ.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 ee, _ as te, b as h, dt as g, i as ne, it as _, nt as v, q as y, u as b } from "./dist-BMzyJZTx.js";
8
- import { n as x, t as re } from "./dist-Cdbpkd3Y.js";
1
+ import { t as e } from "./i18n.lib-CEXUpXfo.js";
2
+ import "./api.util-DMgdn9-w.js";
3
+ import { S as t, b as n, r, x as i } from "./documentTitle.composable-QdSLs6eT.js";
4
+ import { n as a } from "./address.transformer-jGddczLV.js";
5
+ import { a as o, i as s, o as c, r as l, s as u, t as d } from "./InvoiceDeliverySendDialog-byobpQe1.js";
6
+ import { n as f, t as p } from "./download.util-LyRpGWKA.js";
7
+ import { L as m, T as h, Tt as ee, U as te, V as ne, _ as re, b as g, dt as ie, i as ae, it as _, nt as v, q as y, u as oe } from "./dist-B33lNwLw.js";
8
+ import { n as b, r as x } from "./dist-ByzJNujV.js";
9
9
  import { t as S } from "./formango.util-D5c2ql--.js";
10
- import { n as C, r as w, t as T } from "./creditNoteDetail.query-BurujY-Y.js";
11
- import { C as E, S as ie, _ as D, a as ae, b as oe, c as se, d as ce, f as le, g as O, h as ue, i as de, m as fe, n as pe, o as me, p as he, r as ge, s as _e, t as ve, u as ye, v as be, w as k, x as xe, y as Se } from "./BillingDocumentDetailViewDataProvider-D3-X20WR.js";
12
- import { r as Ce } from "./InvoicingFileUploadProvider-BZRLmEsv.js";
13
- import we, { 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 Te, createVNode as L, defineComponent as R, mergeProps as Ee, normalizeClass as z, openBlock as B, ref as V, renderList as De, renderSlot as Oe, resolveDynamicComponent as ke, unref as H, withCtx as U } from "vue";
16
- import { useKeysetInfiniteQuery as Ae, useMutation as W } from "@wisemen/vue-core-api-utils";
17
- import { useRouter as je } from "vue-router";
18
- import { UIAnimateHeight as Me, UIBadge as Ne, UIClickableElement as Pe, UIColumnLayout as G, UIDateField as Fe, UIDialogFooter as Ie, UIDialogFooterCancel as Le, UIDialogFooterSubmit as Re, UIDialogHeader as ze, UIForm as K, UIFormDialog as Be, UIRowLayout as q, UISeparator as Ve, UIText as J, UITextField as He, useOverlay as Ue, useToast as Y } from "@wisemen/vue-core-design-system";
10
+ import { n as C, r as w, t as T } from "./creditNoteDetail.query-D7J1umi4.js";
11
+ import { C as se, E, S as ce, T as D, _ as O, a as k, b as le, c as ue, d as de, f as fe, g as A, h as pe, i as me, l as he, m as ge, n as _e, o as ve, p as ye, r as be, s as xe, t as Se, v as Ce, w as we, x as Te, y as Ee } from "./BillingDocumentDetailViewDataProvider-CA71dgRN.js";
12
+ import { r as De } from "./InvoicingFileUploadProvider-DFjM7Xcj.js";
13
+ import Oe, { z as j } from "zod";
14
+ import { useI18n as M } from "vue-i18n";
15
+ import { Fragment as N, computed as P, createBlock as F, createCommentVNode as I, createElementBlock as L, createElementVNode as ke, createVNode as R, defineComponent as z, mergeProps as Ae, normalizeClass as B, openBlock as V, ref as je, renderList as Me, renderSlot as Ne, resolveDynamicComponent as Pe, unref as H, withCtx as U } from "vue";
16
+ import { useKeysetInfiniteQuery as Fe, useMutation as W } from "@wisemen/vue-core-api-utils";
17
+ import { useRouter as Ie } from "vue-router";
18
+ import { UIAnimateHeight as Le, UIBadge as Re, UIClickableElement as ze, UIColumnLayout as G, UIDateField as Be, UIDialogFooter as Ve, UIDialogFooterCancel as He, UIDialogFooterSubmit as Ue, UIDialogHeader as We, UIForm as K, UIFormDialog as Ge, UIRowLayout as q, UISeparator as Ke, UIText as J, UITextField as qe, useOverlay as Je, 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() {
@@ -29,21 +29,21 @@ function Z() {
29
29
  }
30
30
  //#endregion
31
31
  //#region src/modules/credit-note/models/update/creditNoteUpdateForm.model.ts
32
- var We = A.object({
33
- issuedOn: re,
34
- externalRemarks: A.string().nullable(),
35
- poNumber: A.string().nullable(),
36
- subject: A.string().nullable()
32
+ var Ye = j.object({
33
+ issuedOn: b,
34
+ externalRemarks: j.string().nullable(),
35
+ poNumber: j.string().nullable(),
36
+ subject: j.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
- }), Ge = A.object({ subject: A.string().nullable() });
43
+ }), Xe = j.object({ subject: j.string().nullable() });
44
44
  //#endregion
45
45
  //#region src/modules/credit-note/api/mutations/creditNoteCopyToInvoice.mutation.ts
46
- function Ke() {
46
+ function Ze() {
47
47
  return W({
48
48
  queryFn: (e) => C.copyToInvoice(e.params.creditNoteUuid),
49
49
  queryKeysToInvalidate: {
@@ -54,7 +54,7 @@ function Ke() {
54
54
  }
55
55
  //#endregion
56
56
  //#region src/modules/credit-note/api/mutations/creditNoteFinalize.mutation.ts
57
- function qe() {
57
+ function Qe() {
58
58
  return W({
59
59
  queryFn: (e) => C.finalize(e.params.creditNoteUuid),
60
60
  queryKeysToInvalidate: {
@@ -66,7 +66,7 @@ function qe() {
66
66
  }
67
67
  //#endregion
68
68
  //#region src/modules/credit-note/api/mutations/creditNoteMarkAsDraft.mutation.ts
69
- function Je() {
69
+ function $e() {
70
70
  return W({
71
71
  queryFn: (e) => C.markAsDraft(e.params.creditNoteUuid),
72
72
  queryKeysToInvalidate: {
@@ -78,7 +78,7 @@ function Je() {
78
78
  }
79
79
  //#endregion
80
80
  //#region src/modules/credit-note/api/mutations/creditNoteMarkAsReady.mutation.ts
81
- function Ye() {
81
+ function et() {
82
82
  return W({
83
83
  queryFn: (e) => C.markAsReady(e.params.creditNoteUuid),
84
84
  queryKeysToInvalidate: {
@@ -89,16 +89,8 @@ function Ye() {
89
89
  });
90
90
  }
91
91
  //#endregion
92
- //#region src/modules/credit-note/api/mutations/creditNoteSend.mutation.ts
93
- function Xe() {
94
- return W({
95
- queryFn: (e) => C.send(e.params.creditNoteUuid),
96
- queryKeysToInvalidate: { creditNoteDetail: { creditNoteUuid: (e) => e.creditNoteUuid } }
97
- });
98
- }
99
- //#endregion
100
92
  //#region src/modules/credit-note/api/mutations/creditNoteDelete.mutation.ts
101
- function Ze() {
93
+ function tt() {
102
94
  return W({
103
95
  queryFn: (e) => C.delete(e.params.creditNoteUuid),
104
96
  queryKeysToInvalidate: { invoiceIndex: {} }
@@ -106,28 +98,28 @@ function Ze() {
106
98
  }
107
99
  //#endregion
108
100
  //#region src/modules/credit-note/use-cases/detail/dialogs/CreditNoteDeleteDialog.vue
109
- var Qe = /* @__PURE__ */ R({
101
+ var nt = /* @__PURE__ */ z({
110
102
  __name: "CreditNoteDeleteDialog",
111
103
  props: { creditNote: {} },
112
104
  emits: ["close", "deleted"],
113
105
  setup(e, { emit: t }) {
114
- let n = e, r = t, i = j(), a = je(), o = Y(), s = Ze(), c = N(() => n.creditNote.sequence ?? n.creditNote.subject ?? i.t("wise_invoicing.credit_note.detail.fallback_title")), l = X({
115
- schema: we.object({}),
106
+ let n = e, r = t, i = M(), a = Ie(), o = Y(), s = tt(), c = P(() => n.creditNote.sequence ?? n.creditNote.subject ?? i.t("wise_invoicing.credit_note.detail.fallback_title")), l = X({
107
+ schema: Oe.object({}),
116
108
  onSubmit: async () => {
117
109
  let e = await s.execute({ params: { creditNoteUuid: n.creditNote.uuid } });
118
110
  e.isErr() ? o.apiError(e.error) : (o.show({ message: c.value }), r("deleted"), r("close"), await a.push({ name: "invoicing-invoice-overview" }));
119
111
  }
120
112
  });
121
- return (e, t) => (B(), P(H(Be), {
113
+ return (e, t) => (V(), F(H(Ge), {
122
114
  form: H(l),
123
115
  size: "xs",
124
116
  onClose: t[0] ||= (e) => r("close")
125
117
  }, {
126
- default: U(() => [L(H(ze), {
118
+ default: U(() => [R(H(We), {
127
119
  title: H(i).t("wise_invoicing.credit_note.delete.title"),
128
120
  description: H(i).t("wise_invoicing.credit_note.delete.description", { creditNoteIdentifier: c.value })
129
- }, null, 8, ["title", "description"]), L(H(Ie), null, {
130
- right: U(() => [L(H(Le)), L(H(Re), {
121
+ }, null, 8, ["title", "description"]), R(H(Ve), null, {
122
+ right: U(() => [R(H(He)), R(H(Ue), {
131
123
  "is-destructive": !0,
132
124
  label: H(i).t("wise_invoicing.credit_note.delete.submit_button")
133
125
  }, null, 8, ["label"])]),
@@ -139,146 +131,163 @@ var Qe = /* @__PURE__ */ R({
139
131
  });
140
132
  //#endregion
141
133
  //#region src/modules/credit-note/use-cases/detail/composables/creditNoteDetailHeaderActions.composable.ts
142
- function $e(e) {
143
- let n = j(), r = Y(), i = je(), a = Ue(), s = a.create(Qe), c = a.create(oe), l = Ke(), h = qe(), g = Je(), _ = Ye(), v = Xe(), { shouldSkipConfirmation: y } = xe(), b = N(() => e.value.originalInvoice?.uuid ?? e.value.uuid), x = N(() => ie.getSummary(e.value)?.isExceeded ?? !1), re = N(() => e.value.status !== t.DRAFT && e.value.status !== t.READY);
144
- async function S() {
134
+ function rt(e) {
135
+ let r = M(), a = Y(), o = Ie(), c = Je(), l = c.create(nt), u = c.create(Te), f = Ze(), g = Qe(), ie = $e(), _ = et(), v = c.create(d), y = se(), { shouldSkipConfirmation: oe } = ce(), b = P(() => e.value.originalInvoice?.uuid ?? e.value.uuid), x = P(() => we.getSummary(e.value)?.isExceeded ?? !1), S = P(() => e.value.status !== t.DRAFT && e.value.status !== t.READY);
136
+ async function w() {
145
137
  let t = await _.execute({ params: {
146
138
  creditNoteUuid: e.value.uuid,
147
139
  invoiceUuid: b.value
148
140
  } });
149
- t.isErr() ? r.apiError(t.error) : r.show({ message: n.t("wise_invoicing.credit_note.mark_as_ready.success") });
141
+ t.isErr() ? a.apiError(t.error) : a.show({ message: r.t("wise_invoicing.credit_note.mark_as_ready.success") });
150
142
  }
151
- async function w() {
152
- let t = await h.execute({ params: {
143
+ async function T() {
144
+ let t = await g.execute({ params: {
153
145
  creditNoteUuid: e.value.uuid,
154
146
  invoiceUuid: b.value
155
147
  } });
156
- return t.isErr() ? (r.apiError(t.error), !1) : (r.show({ message: n.t("wise_invoicing.credit_note.finalize.success") }), !0);
148
+ return t.isErr() ? (a.apiError(t.error), !1) : (a.show({ message: r.t("wise_invoicing.credit_note.finalize.success") }), !0);
157
149
  }
158
- async function T() {
159
- y.value ? await w() : await c.open({
150
+ async function E() {
151
+ oe.value ? await T() : await u.open({
160
152
  billingDocumentType: "credit_note",
161
- onConfirm: w
153
+ onConfirm: T
162
154
  });
163
155
  }
164
- async function E() {
165
- let t = await g.execute({ params: {
156
+ async function D() {
157
+ let t = await ie.execute({ params: {
166
158
  creditNoteUuid: e.value.uuid,
167
159
  invoiceUuid: b.value
168
160
  } });
169
- t.isErr() ? r.apiError(t.error) : r.show({ message: n.t("wise_invoicing.credit_note.mark_as_draft.success") });
161
+ t.isErr() ? a.apiError(t.error) : a.show({ message: r.t("wise_invoicing.credit_note.mark_as_draft.success") });
170
162
  }
171
- async function D() {
172
- let t = await v.execute({ params: { creditNoteUuid: e.value.uuid } });
173
- t.isErr() ? r.apiError(t.error) : r.show({ message: n.t("wise_invoicing.credit_note.send.success") });
163
+ async function O() {
164
+ await v.open({
165
+ invoiceUuid: e.value.uuid,
166
+ documents: [{
167
+ uuid: e.value.uuid,
168
+ label: e.value.sequence ?? r.t("wise_invoicing.credit_note.detail.fallback_title")
169
+ }]
170
+ });
171
+ }
172
+ async function k() {
173
+ if (y.isLoading.value) return;
174
+ let t = await y.execute({ params: { invoiceUuid: e.value.uuid } });
175
+ t.isErr() ? a.apiError(t.error) : a.show({ message: r.t("wise_invoicing.delivery.reminder.sent") });
174
176
  }
175
- async function ae() {
176
- let t = await l.execute({ params: { creditNoteUuid: e.value.uuid } });
177
- t.isErr() ? r.apiError(t.error) : r.show({
177
+ async function le() {
178
+ let t = await f.execute({ params: { creditNoteUuid: e.value.uuid } });
179
+ t.isErr() ? a.apiError(t.error) : a.show({
178
180
  button: {
179
- label: n.t("wise_invoicing.credit_note.copy_to_invoice.view_action"),
181
+ label: r.t("wise_invoicing.credit_note.copy_to_invoice.view_action"),
180
182
  onClick: () => {
181
- i.push({
183
+ o.push({
182
184
  name: "invoicing-invoice-detail",
183
185
  params: { invoiceUuid: t.value }
184
186
  });
185
187
  }
186
188
  },
187
- message: n.t("wise_invoicing.credit_note.copy_to_invoice.success")
189
+ message: r.t("wise_invoicing.credit_note.copy_to_invoice.success")
188
190
  });
189
191
  }
190
- async function se() {
191
- await s.open({ creditNote: e.value });
192
+ async function ue() {
193
+ await l.open({ creditNote: e.value });
192
194
  }
193
- async function ce() {
195
+ async function de() {
194
196
  let t = await C.getByUuid(e.value.uuid);
195
197
  if (t.isErr()) {
196
- r.apiError(t.error);
198
+ a.apiError(t.error);
197
199
  return;
198
200
  }
199
- let i = t.value.file;
200
- if (i === null) {
201
- r.show({ message: n.t("wise_invoicing.invoice.download_pdf.generation_in_progress") });
201
+ let n = t.value.file;
202
+ if (n === null) {
203
+ a.show({ message: r.t("wise_invoicing.invoice.download_pdf.generation_in_progress") });
202
204
  return;
203
205
  }
204
- let a = await Ce.getDownloadUrl(i.uuid);
205
- a !== null && u.downloadUrl(a, i.name);
206
+ let i = await De.getDownloadUrl(n.uuid);
207
+ i !== null && p.downloadUrl(i, n.name);
206
208
  }
207
- let le = N(() => [
209
+ let fe = P(() => [
208
210
  {
209
- isLoading: v.isLoading.value,
210
- iconLeft: p,
211
+ isLoading: !1,
212
+ iconLeft: ee,
211
213
  key: "send",
212
- label: n.t("wise_invoicing.invoice.detail.actions.send"),
214
+ label: r.t("wise_invoicing.invoice.detail.actions.send"),
213
215
  variant: "primary",
214
- visible: e.value.status === t.FINALIZED,
215
- onClick: D
216
+ visible: e.value.lifecycleStatus === i.FINALIZED,
217
+ onClick: O
216
218
  },
217
219
  {
218
220
  isLoading: _.isLoading.value,
219
- iconRight: ne,
221
+ iconRight: ae,
220
222
  key: "markAsReady",
221
- label: n.t("wise_invoicing.invoice.detail.actions.mark_as_ready"),
223
+ label: r.t("wise_invoicing.invoice.detail.actions.mark_as_ready"),
222
224
  visible: e.value.status === t.DRAFT,
223
- onClick: S
225
+ onClick: w
224
226
  },
225
227
  {
226
228
  isDisabled: x.value,
227
- isLoading: h.isLoading.value,
228
- disabledReason: x.value ? n.t("wise_invoicing.credit_note.finalize.exceeds_creditable_amount") : null,
229
- iconRight: d,
229
+ isLoading: g.isLoading.value,
230
+ disabledReason: x.value ? r.t("wise_invoicing.credit_note.finalize.exceeds_creditable_amount") : null,
231
+ iconRight: m,
230
232
  key: "finalize",
231
- label: n.t("wise_invoicing.invoice.detail.actions.finalize"),
233
+ label: r.t("wise_invoicing.invoice.detail.actions.finalize"),
232
234
  visible: e.value.status === t.READY,
233
- onClick: T
235
+ onClick: E
234
236
  }
235
- ].filter((e) => e.visible)), O = N(() => {
236
- let r = [
237
+ ].filter((e) => e.visible)), A = P(() => {
238
+ let a = [
239
+ {
240
+ icon: ee,
241
+ key: "sendReminder",
242
+ label: r.t("wise_invoicing.delivery.reminder.action"),
243
+ visible: e.value.lifecycleStatus === i.FINALIZED && [n.SENT, n.VIEWED].includes(e.value.deliveryStatus),
244
+ onSelect: k
245
+ },
237
246
  {
238
- icon: f,
247
+ icon: h,
239
248
  key: "downloadPdf",
240
- label: n.t("wise_invoicing.common.download_pdf"),
241
- visible: re.value,
242
- onSelect: ce
249
+ label: r.t("wise_invoicing.common.download_pdf"),
250
+ visible: S.value,
251
+ onSelect: de
243
252
  },
244
253
  {
245
- icon: m,
254
+ icon: te,
246
255
  key: "backToDraft",
247
- label: n.t("wise_invoicing.invoice.detail.actions.mark_as_draft"),
256
+ label: r.t("wise_invoicing.invoice.detail.actions.mark_as_draft"),
248
257
  visible: e.value.status === t.READY,
249
- onSelect: E
258
+ onSelect: D
250
259
  },
251
260
  {
252
- icon: te,
261
+ icon: re,
253
262
  key: "copyToInvoice",
254
- label: n.t("wise_invoicing.credit_note.detail.actions.copy_to_invoice"),
263
+ label: r.t("wise_invoicing.credit_note.detail.actions.copy_to_invoice"),
255
264
  visible: !0,
256
- onSelect: ae
265
+ onSelect: le
257
266
  }
258
- ], i = [{
259
- icon: ee,
267
+ ], o = [{
268
+ icon: ne,
260
269
  key: "delete",
261
- label: n.t("wise_invoicing.credit_note.detail.actions.delete"),
262
- visible: o.isEditable(e.value.status),
263
- onSelect: se
270
+ label: r.t("wise_invoicing.credit_note.detail.actions.delete"),
271
+ visible: s.isEditable(e.value.status),
272
+ onSelect: ue
264
273
  }];
265
274
  return [{
266
- items: r.filter((e) => e.visible),
275
+ items: a.filter((e) => e.visible),
267
276
  key: "secondary"
268
277
  }, {
269
- items: i.filter((e) => e.visible),
278
+ items: o.filter((e) => e.visible),
270
279
  key: "destructive"
271
280
  }].filter((e) => e.items.length > 0);
272
281
  });
273
282
  return {
274
- isActionMenuVisible: N(() => O.value.length > 0),
275
- menuGroups: O,
276
- primaryButtons: le
283
+ isActionMenuVisible: P(() => A.value.length > 0),
284
+ menuGroups: A,
285
+ primaryButtons: fe
277
286
  };
278
287
  }
279
288
  //#endregion
280
289
  //#region src/modules/credit-note/use-cases/detail/components/CreditNoteDetailHeaderSection.vue
281
- var et = /* @__PURE__ */ R({
290
+ var it = /* @__PURE__ */ z({
282
291
  __name: "CreditNoteDetailHeaderSection",
283
292
  props: {
284
293
  isPdfViewActive: { type: Boolean },
@@ -286,9 +295,9 @@ var et = /* @__PURE__ */ R({
286
295
  },
287
296
  emits: ["togglePdfView"],
288
297
  setup(e, { emit: n }) {
289
- let r = e, i = n, a = j(), o = Y(), s = Z(), { menuGroups: c, primaryButtons: l } = $e(N(() => r.creditNote)), u = N(() => new E(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({
298
+ let r = e, i = n, a = M(), o = Y(), s = Z(), { menuGroups: c, primaryButtons: l } = rt(P(() => r.creditNote)), u = P(() => new D(r.creditNote.status)), d = P(() => u.value.color), f = P(() => a.t(u.value.translationKey)), p = P(() => r.creditNote.status !== t.DRAFT && r.creditNote.status !== t.READY), m = X({
290
299
  initialState: { subject: r.creditNote.subject },
291
- schema: Ge,
300
+ schema: Xe,
292
301
  onSubmit: async (e) => {
293
302
  let t = await s.execute({
294
303
  body: {
@@ -299,22 +308,22 @@ var et = /* @__PURE__ */ R({
299
308
  });
300
309
  t.isErr() && o.apiError(t.error);
301
310
  }
302
- }), ee = m.register("subject");
303
- return k({ form: m }), (e, t) => (B(), P(H(K), {
311
+ }), h = m.register("subject");
312
+ return E({ form: m }), (e, t) => (V(), F(H(K), {
304
313
  form: H(m),
305
314
  "prompt-on-unsaved-changes": !1
306
315
  }, {
307
- default: U(() => [L(be, {
316
+ default: U(() => [R(Ee, {
308
317
  "fallback-title": H(a).t("wise_invoicing.credit_note.detail.fallback_title"),
309
318
  "is-disabled": p.value,
310
319
  sequence: r.creditNote.sequence,
311
320
  "status-color": d.value,
312
321
  "status-label": f.value,
313
- icon: H(g),
314
- "subject-field": H(ee),
322
+ icon: H(ie),
323
+ "subject-field": H(h),
315
324
  "subject-placeholder": H(a).t("wise_invoicing.invoice.detail.header.subject_placeholder")
316
325
  }, {
317
- actions: U(() => [L(D, {
326
+ actions: U(() => [R(Ce, {
318
327
  "is-pdf-view-active": r.isPdfViewActive,
319
328
  "menu-groups": H(c),
320
329
  "primary-buttons": H(l),
@@ -324,11 +333,11 @@ var et = /* @__PURE__ */ R({
324
333
  "menu-groups",
325
334
  "primary-buttons"
326
335
  ])]),
327
- status: U(() => [L(H(q), {
336
+ status: U(() => [R(H(q), {
328
337
  gap: "xs",
329
338
  class: "flex-wrap items-start"
330
339
  }, {
331
- default: U(() => [r.creditNote.isOverdue ? (B(), P(Se, { key: 0 })) : F("", !0)]),
340
+ default: U(() => [r.creditNote.isOverdue ? (V(), F(le, { key: 0 })) : I("", !0)]),
332
341
  _: 1
333
342
  })]),
334
343
  _: 1
@@ -345,13 +354,13 @@ var et = /* @__PURE__ */ R({
345
354
  _: 1
346
355
  }, 8, ["form"]));
347
356
  }
348
- }), tt = /* @__PURE__ */ R({
357
+ }), at = /* @__PURE__ */ z({
349
358
  __name: "CreditNoteDetailRemarksSection",
350
359
  props: { creditNote: {} },
351
360
  setup(e) {
352
- let n = e, r = j(), i = Y(), a = Z(), o = X({
353
- initialState: N(() => w.toForm(n.creditNote)),
354
- schema: We,
361
+ let n = e, r = M(), i = Y(), a = Z(), o = X({
362
+ initialState: P(() => w.toForm(n.creditNote)),
363
+ schema: Ye,
355
364
  onSubmit: async (e) => {
356
365
  let t = await a.execute({
357
366
  body: e,
@@ -359,12 +368,12 @@ var et = /* @__PURE__ */ R({
359
368
  });
360
369
  t.isErr() && i.apiError(t.error);
361
370
  }
362
- }), s = o.register("externalRemarks"), c = N(() => n.creditNote.status !== t.DRAFT && n.creditNote.status !== t.READY);
363
- return k({ form: o }), (e, t) => (B(), P(H(K), {
371
+ }), s = o.register("externalRemarks"), c = P(() => n.creditNote.status !== t.DRAFT && n.creditNote.status !== t.READY);
372
+ return E({ form: o }), (e, t) => (V(), F(H(K), {
364
373
  form: H(o),
365
374
  "prompt-on-unsaved-changes": !1
366
375
  }, {
367
- default: U(() => [L(O, {
376
+ default: U(() => [R(O, {
368
377
  "is-disabled": c.value,
369
378
  placeholder: H(r).t("wise_invoicing.invoice.detail.remarks.placeholder"),
370
379
  "remarks-field": H(s),
@@ -381,28 +390,28 @@ var et = /* @__PURE__ */ R({
381
390
  });
382
391
  //#endregion
383
392
  //#region src/modules/credit-note/api/queries/creditNoteActivityLogIndex.query.ts
384
- function nt(e) {
385
- return Ae("creditNoteActivityLogIndex", {
393
+ function ot(e) {
394
+ return Fe("creditNoteActivityLogIndex", {
386
395
  params: { creditNoteUuid: e },
387
396
  queryFn: (t) => C.getActivityLogs(e.value, { pagination: t })
388
397
  });
389
398
  }
390
399
  //#endregion
391
400
  //#region src/modules/credit-note/use-cases/detail/components/sidebar/CreditNoteDetailSidebarActivityTab.vue
392
- var rt = /* @__PURE__ */ R({
401
+ var st = /* @__PURE__ */ z({
393
402
  __name: "CreditNoteDetailSidebarActivityTab",
394
403
  props: { creditNote: {} },
395
404
  setup(e) {
396
- let t = e, r = j(), { hasNextPage: i, isFetchingNextPage: a, isLoading: o, fetchNextPage: s, result: c } = nt(N(() => t.creditNote.uuid)), l = N(() => c.value.unwrapOr({
405
+ let t = e, n = M(), { hasNextPage: i, isFetchingNextPage: a, isLoading: o, fetchNextPage: s, result: c } = ot(P(() => t.creditNote.uuid)), l = P(() => c.value.unwrapOr({
397
406
  data: [],
398
407
  meta: { next: null }
399
408
  }).data);
400
- return (e, c) => (B(), P(ue, {
409
+ return (e, c) => (V(), F(A, {
401
410
  "current-billing-document": {
402
- role: H(n).CREDIT_NOTE,
411
+ role: H(r).CREDIT_NOTE,
403
412
  uuid: t.creditNote.uuid
404
413
  },
405
- "empty-message": H(r).t("wise_invoicing.credit_note.detail.sidebar.activity_empty"),
414
+ "empty-message": H(n).t("wise_invoicing.credit_note.detail.sidebar.activity_empty"),
406
415
  entries: l.value,
407
416
  "fetch-next-page": H(s),
408
417
  "has-next-page": H(i),
@@ -418,7 +427,7 @@ var rt = /* @__PURE__ */ R({
418
427
  "is-loading"
419
428
  ]));
420
429
  }
421
- }), Q = /* @__PURE__ */ R({
430
+ }), Q = /* @__PURE__ */ z({
422
431
  __name: "BillingDocumentDetailSidebarInfoItem",
423
432
  props: {
424
433
  hasError: {
@@ -430,25 +439,25 @@ var rt = /* @__PURE__ */ R({
430
439
  },
431
440
  setup(e) {
432
441
  let t = e;
433
- return (e, n) => (B(), P(H(q), null, {
442
+ return (e, n) => (V(), F(H(q), null, {
434
443
  default: U(() => [
435
- (B(), P(ke(t.icon), { class: z([{
444
+ (V(), F(Pe(t.icon), { class: B([{
436
445
  "text-error-primary": t.hasError,
437
446
  "text-tertiary": !t.hasError
438
447
  }, "size-3.5 shrink-0"]) }, null, 8, ["class"])),
439
- L(H(J), {
448
+ R(H(J), {
440
449
  text: t.label,
441
- class: z([{
450
+ class: B([{
442
451
  "text-error-primary": t.hasError,
443
452
  "text-tertiary": !t.hasError
444
453
  }, "w-24 shrink-0 text-xs"])
445
454
  }, null, 8, ["text", "class"]),
446
- Oe(e.$slots, "default")
455
+ Ne(e.$slots, "default")
447
456
  ]),
448
457
  _: 3
449
458
  }));
450
459
  }
451
- }), $ = /* @__PURE__ */ R({
460
+ }), $ = /* @__PURE__ */ z({
452
461
  __name: "BillingDocumentDetailSidebarPartySection",
453
462
  props: {
454
463
  title: {},
@@ -461,71 +470,71 @@ var rt = /* @__PURE__ */ R({
461
470
  email: { default: null }
462
471
  },
463
472
  setup(e) {
464
- let t = e, n = V(t.isDefaultOpen);
465
- function i() {
473
+ let t = e, n = je(t.isDefaultOpen);
474
+ function r() {
466
475
  n.value = !n.value;
467
476
  }
468
- return (e, a) => (B(), P(H(G), { class: "w-full" }, {
469
- default: U(() => [L(H(q), { justify: "between" }, {
470
- default: U(() => [L(H(Pe), { class: "rounded-sm" }, {
471
- default: U(() => [Te("button", {
477
+ return (e, i) => (V(), F(H(G), { class: "w-full" }, {
478
+ default: U(() => [R(H(q), { justify: "between" }, {
479
+ default: U(() => [R(H(ze), { class: "rounded-sm" }, {
480
+ default: U(() => [ke("button", {
472
481
  type: "button",
473
482
  class: "flex w-full items-center gap-sm",
474
- onClick: i
483
+ onClick: r
475
484
  }, [
476
- L(H(J), {
485
+ R(H(J), {
477
486
  text: t.title,
478
487
  class: "text-xs font-semibold text-primary"
479
488
  }, null, 8, ["text"]),
480
- L(H(Ne), {
489
+ R(H(Re), {
481
490
  label: t.name,
482
491
  color: "gray",
483
492
  variant: "outline"
484
493
  }, null, 8, ["label"]),
485
- L(H(_), { class: z([{ "rotate-180": n.value }, "size-4 text-tertiary transition-all duration-100"]) }, null, 8, ["class"])
494
+ R(H(_), { class: B([{ "rotate-180": n.value }, "size-4 text-tertiary transition-all duration-100"]) }, null, 8, ["class"])
486
495
  ])]),
487
496
  _: 1
488
497
  })]),
489
498
  _: 1
490
- }), L(H(Me), null, {
491
- default: U(() => [n.value ? (B(), P(H(G), {
499
+ }), R(H(Le), null, {
500
+ default: U(() => [n.value ? (V(), F(H(G), {
492
501
  key: 0,
493
502
  gap: "xs"
494
503
  }, {
495
504
  default: U(() => [
496
- L(H(J), {
505
+ R(H(J), {
497
506
  text: t.name,
498
507
  class: "text-xs font-medium text-primary"
499
508
  }, null, 8, ["text"]),
500
- t.address ? (B(), P(H(J), {
509
+ t.address ? (V(), F(H(J), {
501
510
  key: 0,
502
511
  truncate: !1,
503
- text: H(r).format(t.address),
512
+ text: H(a).format(t.address),
504
513
  class: "text-xs text-primary"
505
- }, null, 8, ["text"])) : F("", !0),
506
- t.email ? (B(), P(H(J), {
514
+ }, null, 8, ["text"])) : I("", !0),
515
+ t.email ? (V(), F(H(J), {
507
516
  key: 1,
508
517
  text: t.email,
509
518
  class: "text-xs text-primary"
510
- }, null, 8, ["text"])) : F("", !0)
519
+ }, null, 8, ["text"])) : I("", !0)
511
520
  ]),
512
521
  _: 1
513
- })) : F("", !0)]),
522
+ })) : I("", !0)]),
514
523
  _: 1
515
524
  })]),
516
525
  _: 1
517
526
  }));
518
527
  }
519
- }), it = /* @__PURE__ */ R({
528
+ }), ct = /* @__PURE__ */ z({
520
529
  __name: "CreditNoteDetailSidebarInfoTab",
521
530
  props: {
522
531
  creditNote: {},
523
532
  customFieldDefinitions: {}
524
533
  },
525
534
  setup(e) {
526
- let n = e, r = j(), i = Y(), a = Z(), o = X({
527
- initialState: N(() => w.toForm(n.creditNote)),
528
- schema: We,
535
+ let n = e, r = M(), i = Y(), a = Z(), s = X({
536
+ initialState: P(() => w.toForm(n.creditNote)),
537
+ schema: Ye,
529
538
  onSubmit: async (e) => {
530
539
  let t = await a.execute({
531
540
  body: e,
@@ -533,38 +542,38 @@ var rt = /* @__PURE__ */ R({
533
542
  });
534
543
  t.isErr() && i.apiError(t.error);
535
544
  }
536
- }), 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);
537
- return k({ form: o }), (e, t) => (B(), P(H(K), {
538
- form: H(o),
545
+ }), c = P(() => f.listByDefinitions(n.customFieldDefinitions, n.creditNote.customFields)), u = s.register("issuedOn"), d = s.register("poNumber"), p = P(() => n.creditNote.status !== t.DRAFT && n.creditNote.status !== t.READY);
546
+ return E({ form: s }), (e, t) => (V(), F(H(K), {
547
+ form: H(s),
539
548
  "prompt-on-unsaved-changes": !1
540
549
  }, {
541
- default: U(() => [L(H(G), {
550
+ default: U(() => [R(H(G), {
542
551
  gap: "lg",
543
552
  class: "px-2xl py-xl"
544
553
  }, {
545
554
  default: U(() => [
546
- L(H(G), null, {
547
- default: U(() => [L(H(J), {
555
+ R(H(G), null, {
556
+ default: U(() => [R(H(J), {
548
557
  text: H(r).t("wise_invoicing.invoice.detail.sidebar.general"),
549
558
  class: "text-xs font-semibold text-primary"
550
- }, null, 8, ["text"]), L(H(G), { gap: "lg" }, {
559
+ }, null, 8, ["text"]), R(H(G), { gap: "lg" }, {
551
560
  default: U(() => [
552
- L(Q, {
553
- icon: H(h),
561
+ R(Q, {
562
+ icon: H(g),
554
563
  label: H(r).t("wise_invoicing.invoice.detail.header.invoice_id")
555
564
  }, {
556
- default: U(() => [L(H(J), {
565
+ default: U(() => [R(H(J), {
557
566
  text: n.creditNote.sequence ?? "-",
558
567
  class: "text-xs text-primary"
559
568
  }, null, 8, ["text"])]),
560
569
  _: 1
561
570
  }, 8, ["icon", "label"]),
562
- L(Q, {
571
+ R(Q, {
563
572
  icon: H(y),
564
- "has-error": H(f).errors.value.length > 0,
573
+ "has-error": H(d).errors.value.length > 0,
565
574
  label: H(r).t("wise_invoicing.invoice.detail.header.po_number")
566
575
  }, {
567
- default: U(() => [L(H(He), Ee(H(S)(H(f)), {
576
+ default: U(() => [R(H(qe), Ae(H(S)(H(d)), {
568
577
  "is-disabled": p.value,
569
578
  label: null,
570
579
  class: "w-full"
@@ -575,34 +584,34 @@ var rt = /* @__PURE__ */ R({
575
584
  "has-error",
576
585
  "label"
577
586
  ]),
578
- L(Q, {
579
- icon: H(b),
587
+ R(Q, {
588
+ icon: H(oe),
580
589
  label: H(r).t("wise_invoicing.invoice.detail.header.issuer")
581
590
  }, {
582
- default: U(() => [L(H(J), {
591
+ default: U(() => [R(H(J), {
583
592
  text: n.creditNote.issuer.name ?? "-",
584
593
  class: "text-xs text-primary"
585
594
  }, null, 8, ["text"])]),
586
595
  _: 1
587
596
  }, 8, ["icon", "label"]),
588
- L(Q, {
597
+ R(Q, {
589
598
  icon: H(v),
590
- "has-error": H(d).errors.value.length > 0,
599
+ "has-error": H(u).errors.value.length > 0,
591
600
  label: H(r).t("wise_invoicing.invoice.detail.header.invoice_date")
592
601
  }, {
593
- default: U(() => [L(H(Fe), Ee({ "is-disabled": p.value }, H(S)(H(d))), null, 16, ["is-disabled"])]),
602
+ default: U(() => [R(H(Be), Ae({ "is-disabled": p.value }, H(S)(H(u))), null, 16, ["is-disabled"])]),
594
603
  _: 1
595
604
  }, 8, [
596
605
  "icon",
597
606
  "has-error",
598
607
  "label"
599
608
  ]),
600
- (B(!0), I(M, null, De(u.value, (e) => (B(), P(Q, {
609
+ (V(!0), L(N, null, Me(c.value, (e) => (V(), F(Q, {
601
610
  key: e.definition.uuid,
602
- icon: H(fe)[e.definition.type],
603
- label: H(s).getLabel(e.definition, H(r).locale.value)
611
+ icon: H(pe)[e.definition.type],
612
+ label: H(o).getLabel(e.definition, H(r).locale.value)
604
613
  }, {
605
- default: U(() => [L(c, {
614
+ default: U(() => [R(l, {
606
615
  definition: e.definition,
607
616
  value: e.value
608
617
  }, null, 8, ["definition", "value"])]),
@@ -613,9 +622,9 @@ var rt = /* @__PURE__ */ R({
613
622
  })]),
614
623
  _: 1
615
624
  }),
616
- L(H(Ve)),
617
- L(he, { "original-invoice": n.creditNote.originalInvoice }, null, 8, ["original-invoice"]),
618
- L($, {
625
+ R(H(Ke)),
626
+ R(ge, { "original-invoice": n.creditNote.originalInvoice }, null, 8, ["original-invoice"]),
627
+ R($, {
619
628
  "is-default-open": !0,
620
629
  name: n.creditNote.customer.name ?? "-",
621
630
  title: H(r).t("wise_invoicing.invoice.detail.header.bill_to"),
@@ -627,8 +636,8 @@ var rt = /* @__PURE__ */ R({
627
636
  "address",
628
637
  "email"
629
638
  ]),
630
- L(H(Ve)),
631
- L($, {
639
+ R(H(Ke)),
640
+ R($, {
632
641
  name: n.creditNote.issuer.email ?? "-",
633
642
  title: H(r).t("wise_invoicing.invoice.detail.header.bill_from"),
634
643
  address: n.creditNote.issuer.address
@@ -643,20 +652,20 @@ var rt = /* @__PURE__ */ R({
643
652
  _: 1
644
653
  }, 8, ["form"]));
645
654
  }
646
- }), at = /* @__PURE__ */ R({
655
+ }), lt = /* @__PURE__ */ z({
647
656
  __name: "CreditNoteDetailSidebar",
648
657
  props: {
649
658
  creditNote: {},
650
659
  customFieldDefinitions: {}
651
660
  },
652
661
  setup(e) {
653
- let t = e, n = j(), r = x(), i = N(() => n.t("wise_invoicing.invoice.detail.sidebar.updated_on", { date: r.toDateTime(t.creditNote.updatedAt) }));
654
- return (e, n) => (B(), P(le, {
662
+ let t = e, n = M(), r = x(), i = P(() => n.t("wise_invoicing.invoice.detail.sidebar.updated_on", { date: r.toDateTime(t.creditNote.updatedAt) }));
663
+ return (e, n) => (V(), F(ye, {
655
664
  "billing-document": t.creditNote,
656
665
  "updated-footer": i.value
657
666
  }, {
658
- activity: U(() => [L(rt, { "credit-note": t.creditNote }, null, 8, ["credit-note"])]),
659
- info: U(() => [L(it, {
667
+ activity: U(() => [R(st, { "credit-note": t.creditNote }, null, 8, ["credit-note"])]),
668
+ info: U(() => [R(ct, {
660
669
  "credit-note": t.creditNote,
661
670
  "custom-field-definitions": t.customFieldDefinitions
662
671
  }, null, 8, ["credit-note", "custom-field-definitions"])]),
@@ -666,7 +675,7 @@ var rt = /* @__PURE__ */ R({
666
675
  });
667
676
  //#endregion
668
677
  //#region src/modules/credit-note/api/mutations/creditNoteUpdateLines.mutation.ts
669
- function ot() {
678
+ function ut() {
670
679
  return W({
671
680
  queryFn: (e) => C.updateLines(e.params.creditNoteUuid, e.body),
672
681
  queryKeysToInvalidate: {
@@ -677,15 +686,15 @@ function ot() {
677
686
  }
678
687
  //#endregion
679
688
  //#region src/modules/credit-note/use-cases/detail/components/table/CreditNoteLineItemsTableSection.vue
680
- var st = /* @__PURE__ */ R({
689
+ var dt = /* @__PURE__ */ z({
681
690
  __name: "CreditNoteLineItemsTableSection",
682
691
  props: {
683
692
  creditNote: {},
684
693
  customFieldDefinitions: {}
685
694
  },
686
695
  setup(e) {
687
- let t = e, n = N(() => t.creditNote), r = ot(), i = de({
688
- isSaving: N(() => r.isLoading.value),
696
+ let t = e, n = P(() => t.creditNote), r = ut(), i = k({
697
+ isSaving: P(() => r.isLoading.value),
689
698
  billingDocument: () => n.value,
690
699
  customFieldDefinitions: () => t.customFieldDefinitions,
691
700
  updateLines: (e) => r.execute({
@@ -693,24 +702,24 @@ var st = /* @__PURE__ */ R({
693
702
  params: { creditNoteUuid: t.creditNote.uuid }
694
703
  })
695
704
  });
696
- return ce(i), (e, n) => (B(), P(me, null, {
705
+ return fe(i), (e, n) => (V(), F(xe, null, {
697
706
  default: U(() => [
698
- L(_e, { "show-apply-discount": !1 }),
699
- L(se),
700
- L(ae, { "billing-document": t.creditNote }, null, 8, ["billing-document"]),
701
- L(ye)
707
+ R(ue, { "show-apply-discount": !1 }),
708
+ R(he),
709
+ R(ve, { "billing-document": t.creditNote }, null, 8, ["billing-document"]),
710
+ R(de)
702
711
  ]),
703
712
  _: 1
704
713
  }));
705
714
  }
706
- }), ct = /* @__PURE__ */ R({
715
+ }), ft = /* @__PURE__ */ z({
707
716
  __name: "CreditNoteDetailView",
708
717
  props: {
709
718
  creditNote: {},
710
719
  customFieldDefinitions: {}
711
720
  },
712
721
  setup(e) {
713
- let t = e, n = j(), r = V(!1), a = N(() => s.filterByView(t.customFieldDefinitions, i.CREDIT_NOTE_DETAIL)), o = N(() => [
722
+ let t = e, n = M(), r = je(!1), a = P(() => o.filterByView(t.customFieldDefinitions, u.CREDIT_NOTE_DETAIL)), s = P(() => [
714
723
  {
715
724
  label: n.t("wise_invoicing.invoice.overview.title"),
716
725
  to: { name: "invoicing-invoice-overview" }
@@ -725,29 +734,32 @@ var st = /* @__PURE__ */ R({
725
734
  { label: n.t("wise_invoicing.invoice.detail.credit_notes.untitled") },
726
735
  { label: t.creditNote.sequence ?? n.t("wise_invoicing.credit_note.detail.fallback_title") }
727
736
  ]);
728
- return (e, i) => (B(), P(ge, {
737
+ return (e, o) => (V(), F(be, {
729
738
  "billing-document": t.creditNote,
730
- breadcrumbs: o.value,
739
+ breadcrumbs: s.value,
731
740
  title: H(n).t("wise_invoicing.credit_note.detail.fallback_title")
732
741
  }, {
733
- header: U(() => [L(et, {
742
+ header: U(() => [R(it, {
734
743
  "credit-note": t.creditNote,
735
744
  "is-pdf-view-active": r.value,
736
745
  class: "w-full",
737
- onTogglePdfView: i[0] ||= (e) => r.value = !r.value
746
+ onTogglePdfView: o[0] ||= (e) => r.value = !r.value
738
747
  }, null, 8, ["credit-note", "is-pdf-view-active"])]),
739
- default: U(() => [r.value ? (B(), P(pe, {
748
+ default: U(() => [t.creditNote.lifecycleStatus === H(i).FINALIZED ? (V(), F(me, {
740
749
  key: 0,
750
+ "invoice-uuid": t.creditNote.uuid
751
+ }, null, 8, ["invoice-uuid"])) : I("", !0), r.value ? (V(), F(_e, {
752
+ key: 1,
741
753
  "billing-document": t.creditNote,
742
754
  class: "w-full"
743
- }, null, 8, ["billing-document"])) : (B(), I(M, { key: 1 }, [L(st, {
755
+ }, null, 8, ["billing-document"])) : (V(), L(N, { key: 2 }, [R(dt, {
744
756
  "credit-note": t.creditNote,
745
757
  "custom-field-definitions": a.value
746
- }, null, 8, ["credit-note", "custom-field-definitions"]), L(tt, {
758
+ }, null, 8, ["credit-note", "custom-field-definitions"]), R(at, {
747
759
  "credit-note": t.creditNote,
748
760
  class: "w-full"
749
761
  }, null, 8, ["credit-note"])], 64))]),
750
- sidebar: U(() => [L(at, {
762
+ sidebar: U(() => [R(lt, {
751
763
  "credit-note": t.creditNote,
752
764
  "custom-field-definitions": a.value
753
765
  }, null, 8, ["credit-note", "custom-field-definitions"])]),
@@ -758,20 +770,20 @@ var st = /* @__PURE__ */ R({
758
770
  "title"
759
771
  ]));
760
772
  }
761
- }), lt = /* @__PURE__ */ R({
773
+ }), pt = /* @__PURE__ */ z({
762
774
  __name: "CreditNoteDetailViewDataProvider",
763
775
  props: { creditNoteUuid: {} },
764
776
  setup(e) {
765
- let t = e, n = j(), r = N(() => [{
777
+ let t = e, n = M(), r = P(() => [{
766
778
  label: n.t("wise_invoicing.invoice.overview.title"),
767
779
  to: { name: "invoicing-invoice-overview" }
768
- }]), i = T(N(() => t.creditNoteUuid)), o = a();
769
- return (e, t) => (B(), P(ve, {
770
- "custom-field-definitions-query": H(o),
780
+ }]), i = T(P(() => t.creditNoteUuid)), a = c();
781
+ return (e, t) => (V(), F(Se, {
782
+ "custom-field-definitions-query": H(a),
771
783
  query: H(i),
772
784
  "loading-breadcrumbs": r.value
773
785
  }, {
774
- default: U(({ billingDocument: e, customFieldDefinitions: t }) => [L(ct, {
786
+ default: U(({ billingDocument: e, customFieldDefinitions: t }) => [R(ft, {
775
787
  "credit-note": e,
776
788
  "custom-field-definitions": t
777
789
  }, null, 8, ["credit-note", "custom-field-definitions"])]),
@@ -784,4 +796,4 @@ var st = /* @__PURE__ */ R({
784
796
  }
785
797
  });
786
798
  //#endregion
787
- export { lt as default };
799
+ export { pt as default };