@wisemen/wise-invoicing-web 0.6.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 (65) hide show
  1. package/dist/{ApprovalReminderSettingsViewDataProvider-r9DcFi76.js → ApprovalReminderSettingsViewDataProvider-Dsp3ee3c.js} +4 -4
  2. package/dist/{BillingDocumentDetailViewDataProvider-CsqBeAiA.js → BillingDocumentDetailViewDataProvider-TX-tovKU.js} +1506 -1427
  3. package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
  4. package/dist/{BillingDocumentPdf-thrvzGfh.js → BillingDocumentPdf-c-7N80u4.js} +5 -5
  5. package/dist/{CreditNoteDetailViewDataProvider-D6IMBwLn.js → CreditNoteDetailViewDataProvider-BNT0h67Q.js} +230 -223
  6. package/dist/{CreditNotePdfViewDataProvider-C4z1NE3Q.js → CreditNotePdfViewDataProvider-qgOuhUf_.js} +2 -2
  7. package/dist/{CustomFieldValueText-BRpCwCqJ.js → CustomFieldValueText-BP4bKQh7.js} +53 -38
  8. package/dist/{DunningCaseDetailViewDataProvider-DTotyRX8.js → DunningCaseDetailViewDataProvider-BNByfQTc.js} +13 -13
  9. package/dist/{DunningCaseOverviewView-kDq7UY5e.js → DunningCaseOverviewView-Dvwaw597.js} +23 -23
  10. package/dist/{DunningCaseReminderPdfViewDataProvider-DgKA-7lX.js → DunningCaseReminderPdfViewDataProvider-D1avIVyK.js} +1 -1
  11. package/dist/{DunningCaseSendDialog-DVfBVtgr.js → DunningCaseSendDialog-DwB_jFum.js} +8 -8
  12. package/dist/{InvoiceApprovalOutOfSyncIndicator-DPlrqqOs.js → InvoiceApprovalOutOfSyncIndicator-B_9HLzpt.js} +2 -2
  13. package/dist/{InvoiceApprovalOverviewView-B6naRElx.js → InvoiceApprovalOverviewView-jawT-M1t.js} +213 -213
  14. package/dist/{InvoiceApprovalStatusBadge-CDc_Pwsm.js → InvoiceApprovalStatusBadge-D6Sr6JmN.js} +4 -4
  15. package/dist/{InvoiceApproveDialogDataProvider-CK6ij8X1.js → InvoiceApproveDialogDataProvider-Bwb8bP1e.js} +16 -16
  16. package/dist/{InvoiceDetailViewDataProvider-BKurQPAV.js → InvoiceDetailViewDataProvider-B8mMYTQf.js} +592 -586
  17. package/dist/{InvoiceOverviewViewDataProvider-ChoyCi5L.js → InvoiceOverviewViewDataProvider-CLgV-Jcv.js} +440 -440
  18. package/dist/{InvoicePdfView-DLEKQ29O.js → InvoicePdfView-C518PlHp.js} +2 -2
  19. package/dist/{InvoicePdfViewDataProvider-C-b7iXiH.js → InvoicePdfViewDataProvider-ClfBkHUZ.js} +3 -3
  20. package/dist/{InvoicePublicPdfViewDataProvider-DZ4WQsvi.js → InvoicePublicPdfViewDataProvider-CoXBj3Je.js} +3 -3
  21. package/dist/{InvoicePublicProFormaPdfViewDataProvider-CsF8fPlp.js → InvoicePublicProFormaPdfViewDataProvider-WlVD7sw1.js} +3 -3
  22. package/dist/{InvoicingFileUploadProvider-t64Qiyn6.js → InvoicingFileUploadProvider-Dl1LvCPm.js} +2 -2
  23. package/dist/{IssuerSettingsViewDataProvider-Cc8R6ekd.js → IssuerSettingsViewDataProvider-CXyyCvoZ.js} +3 -3
  24. package/dist/{PeppolSettingsViewDataProvider-DpVIfFVG.js → PeppolSettingsViewDataProvider-Cptga29B.js} +2 -2
  25. package/dist/{ReminderSettingsViewDataProvider-QOh3LpMX.js → ReminderSettingsViewDataProvider-BZgzQIxM.js} +4 -4
  26. package/dist/{api.util-Do9BEwG4.js → api.util-CR2xLnNj.js} +536 -515
  27. package/dist/{billingDocumentDetail.transformer-BAOQ3Zrg.js → billingDocumentDetail.transformer-D1f6Nv-U.js} +8 -2
  28. package/dist/client/index.d.ts +1 -1
  29. package/dist/client/types.gen.d.ts +23 -17
  30. package/dist/client/zod.gen.d.ts +360 -0
  31. package/dist/composables/invoicingConfig.composable.d.ts +12 -0
  32. package/dist/{creditNoteDetail.query-C1rr54m1.js → creditNoteDetail.query-DGeG9_sO.js} +3 -3
  33. package/dist/{dist-DCbLgB6Y.js → dist-BMzyJZTx.js} +258 -114
  34. package/dist/{dist-CZAOPudv.js → dist-DALBiuub.js} +133 -133
  35. package/dist/{documentTitle.composable-C3k1m0Nz.js → documentTitle.composable-RvqrZTBa.js} +1 -1
  36. package/dist/{download.util-B5Q7KUC9.js → download.util-LyRpGWKA.js} +9 -0
  37. package/dist/{i18n.lib-Bkz_R954.js → i18n.lib-MOiHLIGc.js} +4 -0
  38. package/dist/index.d.ts +6 -2
  39. package/dist/index.js +219 -204
  40. package/dist/{invoice.service-DrI2ULIR.js → invoice.service-Fv4F4aZq.js} +3 -3
  41. package/dist/{invoiceApproval.service-Dpxiru7l.js → invoiceApproval.service-DJvXagC7.js} +2 -2
  42. package/dist/{invoiceApprovalStatus.util-CdOAcPzv.js → invoiceApprovalStatus.util-B98WeAf0.js} +2 -2
  43. package/dist/{invoiceCustomer.service-RRFosiYR.js → invoiceCustomer.service-CDyrtcwH.js} +2 -2
  44. package/dist/{invoiceDetail.query-BmtHdfj0.js → invoiceDetail.query-UHE0NCLh.js} +1 -1
  45. package/dist/{invoiceIndexCache.util-DKtJorc_.js → invoiceIndexCache.util-CLM7FO6z.js} +3 -3
  46. package/dist/{invoicingConfig.composable-CMTYHHS9.js → invoicingConfig.composable-UC7tGtBj.js} +14 -10
  47. package/dist/{issuerSettings.query-CKDhoStt.js → issuerSettings.query-CoiXblSm.js} +2 -2
  48. package/dist/libs/i18n.lib.d.ts +4 -0
  49. package/dist/locales/en-US.json.d.ts +2 -0
  50. package/dist/locales/nl-BE.json.d.ts +2 -0
  51. package/dist/modules/custom-field/components/CustomFieldList.vue.d.ts +0 -1
  52. package/dist/modules/custom-field/components/customFieldTypeIcon.d.ts +16 -0
  53. package/dist/modules/custom-field/components/customFieldValueText.spec.d.ts +1 -0
  54. package/dist/modules/custom-field/composables/customFieldReferenceLinks.composable.d.ts +16 -0
  55. package/dist/modules/custom-field/composables/customFieldReferenceLinks.composable.spec.d.ts +1 -0
  56. package/dist/modules/custom-field/models/custom-field-value/customFieldValue.model.d.ts +1 -1
  57. package/dist/modules/custom-field/models/custom-field-value/customFieldValue.util.d.ts +10 -0
  58. package/dist/modules/custom-field/test/builders/customFieldDefinition.builder.d.ts +1 -0
  59. package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailPaymentsTableColumns.composable.d.ts +1 -1
  60. package/dist/{reminderConfig.query-yImUS5qt.js → reminderConfig.query-aRFzY6uZ.js} +2 -2
  61. package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +114 -0
  62. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +57 -36
  63. package/dist/ui/customer-invoice-list/composables/customerInvoiceTableColumns.composable.d.ts +6 -1
  64. package/dist/ui/customer-invoice-list/composables/customerInvoiceTableColumns.composable.spec.d.ts +1 -0
  65. package/package.json +1 -1
@@ -1,44 +1,44 @@
1
- import { t as e } from "./i18n.lib-Bkz_R954.js";
2
- import { pt as t, t as n } from "./api.util-Do9BEwG4.js";
3
- import { C as r, _ as i, a, b as o, c as s, f as c, l, r as u, v as d, y as f } from "./documentTitle.composable-C3k1m0Nz.js";
1
+ import { t as e } from "./i18n.lib-MOiHLIGc.js";
2
+ import { pt as t, t as n } from "./api.util-CR2xLnNj.js";
3
+ import { C as r, _ as i, a, b as o, c as s, f as c, l, r as u, v as d, y as f } from "./documentTitle.composable-RvqrZTBa.js";
4
4
  import { r as p, t as m } from "./useCurrencyFormat.composable-MtZaqKnO.js";
5
- import { n as h } from "./invoicingConfig.composable-CMTYHHS9.js";
5
+ import { n as h } from "./invoicingConfig.composable-UC7tGtBj.js";
6
6
  import { t as g } from "./search.composable-CU9OpyUB.js";
7
- import { a as _, i as ee, n as v, o as te, t as y } from "./invoice.service-DrI2ULIR.js";
7
+ import { a as _, i as ee, n as v, o as te, t as y } from "./invoice.service-Fv4F4aZq.js";
8
8
  import { n as ne } from "./address.transformer-jGddczLV.js";
9
- import { a as re, i as ie, n as b, r as ae } from "./CustomFieldValueText-BRpCwCqJ.js";
10
- import { n as oe, t as se } from "./download.util-B5Q7KUC9.js";
11
- import { A as ce, B as le, H as ue, I as de, P as fe, R as pe, V as me, W as he, Z as ge, _ as _e, ft as ve, gt as x, i as ye, it as be, j as xe, l as S, m as Se, q as C, t as Ce, tt as we, ut as Te, w as Ee, x as De, y as Oe } from "./dist-DCbLgB6Y.js";
12
- import { n as w, t as T } from "./dist-Cdbpkd3Y.js";
13
- import { t as E } from "./formango.util-D5c2ql--.js";
14
- import { t as ke } from "./invoiceApprovalStatus.util-CdOAcPzv.js";
15
- import { t as Ae } from "./invoiceCustomer.service-RRFosiYR.js";
16
- import { a as je, i as Me, n as Ne, r as Pe, t as Fe } from "./invoiceIndexCache.util-DKtJorc_.js";
17
- import { n as Ie, t as Le } from "./InvoiceApprovalStatusBadge-CDc_Pwsm.js";
18
- import { t as Re } from "./issuerSettings.query-CKDhoStt.js";
19
- import { C as ze, S as Be, _ as Ve, a as He, b as Ue, c as We, d as Ge, f as Ke, g as qe, h as Je, i as Ye, l as Xe, m as Ze, n as Qe, o as $e, p as et, r as tt, s as nt, t as rt, u as it, v as at, x as ot, y as st } from "./BillingDocumentDetailViewDataProvider-CsqBeAiA.js";
20
- import { r as ct } from "./InvoicingFileUploadProvider-t64Qiyn6.js";
21
- import { i as lt, n as ut, r as dt, t as ft } from "./InvoiceApproveDialogDataProvider-CK6ij8X1.js";
22
- import { t as pt } from "./invoiceDetail.query-BmtHdfj0.js";
23
- import mt, { z as D } from "zod";
24
- import { useI18n as O } from "vue-i18n";
25
- import { Fragment as k, computed as A, createBlock as j, createCommentVNode as M, createElementBlock as N, createElementVNode as P, createSlots as ht, createTextVNode as gt, createVNode as F, defineComponent as I, mergeModels as _t, mergeProps as L, normalizeClass as vt, openBlock as R, ref as yt, renderList as bt, resolveDynamicComponent as xt, toDisplayString as z, unref as B, useModel as St, watch as Ct, withCtx as V } from "vue";
26
- import { ApiErrorUtil as wt, useKeysetInfiniteQuery as Tt, useMutation as H, useOffsetInfiniteQuery as Et, useQuery as Dt } from "@wisemen/vue-core-api-utils";
9
+ import { a as re, i as ie, n as b, r as ae, t as oe } from "./CustomFieldValueText-BP4bKQh7.js";
10
+ import { n as se, t as ce } from "./download.util-LyRpGWKA.js";
11
+ import { $ as le, A as ue, G as de, I as fe, L as pe, S as me, T as he, Tt as x, U as ge, V as _e, X as ve, Y as ye, _ as be, b as xe, i as Se, nt as Ce, ot as S, pt as C, q as we, t as Te, u as Ee, ut as De, xt as Oe, yt as w } from "./dist-BMzyJZTx.js";
12
+ import { n as T, t as E } from "./dist-Cdbpkd3Y.js";
13
+ import { t as D } from "./formango.util-D5c2ql--.js";
14
+ import { t as ke } from "./invoiceApprovalStatus.util-B98WeAf0.js";
15
+ import { t as Ae } from "./invoiceCustomer.service-CDyrtcwH.js";
16
+ import { a as je, i as Me, n as Ne, r as Pe, t as Fe } from "./invoiceIndexCache.util-CLM7FO6z.js";
17
+ import { n as Ie, t as Le } from "./InvoiceApprovalStatusBadge-D6Sr6JmN.js";
18
+ import { t as Re } from "./issuerSettings.query-CoiXblSm.js";
19
+ import { C as ze, S as Be, _ as Ve, a as He, b as Ue, c as We, d as Ge, f as Ke, g as qe, h as Je, i as Ye, l as Xe, m as Ze, n as Qe, o as $e, p as et, r as tt, s as nt, t as rt, u as it, v as at, x as ot, y as st } from "./BillingDocumentDetailViewDataProvider-TX-tovKU.js";
20
+ import { r as ct } from "./InvoicingFileUploadProvider-Dl1LvCPm.js";
21
+ import { i as lt, n as ut, r as dt, t as ft } from "./InvoiceApproveDialogDataProvider-Bwb8bP1e.js";
22
+ import { t as pt } from "./invoiceDetail.query-UHE0NCLh.js";
23
+ import mt, { z as O } from "zod";
24
+ import { useI18n as k } from "vue-i18n";
25
+ import { Fragment as A, computed as j, createBlock as M, createCommentVNode as N, createElementBlock as P, createElementVNode as F, createSlots as ht, createTextVNode as gt, createVNode as I, defineComponent as L, mergeModels as _t, mergeProps as R, normalizeClass as vt, openBlock as z, ref as yt, renderList as bt, resolveDynamicComponent as xt, toDisplayString as B, unref as V, useModel as St, watch as Ct, withCtx as H } from "vue";
26
+ import { ApiErrorUtil as wt, useKeysetInfiniteQuery as Tt, useMutation as U, useOffsetInfiniteQuery as Et, useQuery as Dt } from "@wisemen/vue-core-api-utils";
27
27
  import { RouterLink as Ot, useRouter as kt } from "vue-router";
28
28
  import { Temporal as At } from "temporal-polyfill";
29
- import { UIAutocomplete as jt, UIBadge as Mt, UIBadgeLabel as Nt, UIBadgeSeparator as Pt, UIButton as Ft, UICheckbox as It, UIClickableElement as Lt, UIColumnLayout as Rt, UIDateField as zt, UIDetailList as Bt, UIDetailListGroup as Vt, UIDetailListGroupItem as U, UIDetailListGroupItemLabel as W, UIDetailListGroupItemValueText as G, UIDetailListGroupSeparator as Ht, UIDialog as Ut, UIDialogBody as Wt, UIDialogFooter as K, UIDialogFooterCancel as q, UIDialogFooterSubmit as Gt, UIDialogHeader as J, UIForm as Kt, UIFormDialog as Y, UIFormFieldGrid as qt, UIFormFieldGroup as Jt, UIFormSubmitButton as Yt, UIIconButton as Xt, UINumberField as Zt, UIRowLayout as Qt, UISelect as $t, UITable as en, UITableCell as tn, UITableCellInteractiveElement as nn, UIText as X, UITextField as rn, UITooltip as an, UITooltipContent as on, createAutocompleteOptions as sn, createComponent as Z, createSelectOptions as cn, defineTableColumns as ln, useOverlay as un, useToast as Q } from "@wisemen/vue-core-design-system";
29
+ import { UIAutocomplete as jt, UIBadge as Mt, UIBadgeLabel as Nt, UIBadgeSeparator as Pt, UIButton as Ft, UICheckbox as It, UIClickableElement as Lt, UIColumnLayout as Rt, UIDateField as zt, UIDetailList as Bt, UIDetailListGroup as Vt, UIDetailListGroupItem as W, UIDetailListGroupItemLabel as G, UIDetailListGroupItemValueText as K, UIDetailListGroupSeparator as Ht, UIDialog as Ut, UIDialogBody as Wt, UIDialogFooter as q, UIDialogFooterCancel as J, UIDialogFooterSubmit as Gt, UIDialogHeader as Y, UIForm as Kt, UIFormDialog as X, UIFormFieldGrid as qt, UIFormFieldGroup as Jt, UIFormSubmitButton as Yt, UIIconButton as Xt, UINumberField as Zt, UIRowLayout as Qt, UISelect as $t, UITable as en, UITableCell as tn, UITableCellInteractiveElement as nn, UIText as Z, UITextField as rn, UITooltip as an, UITooltipContent as on, createAutocompleteOptions as sn, createComponent as cn, createSelectOptions as ln, defineTableColumns as un, useOverlay as dn, useToast as Q } from "@wisemen/vue-core-design-system";
30
30
  import { useForm as $ } from "formango";
31
31
  //#region src/modules/invoice/use-cases/detail/components/InvoiceApprovalBanner.vue?vue&type=script&setup=true&lang.ts
32
- var dn = { class: "flex min-w-0 flex-1 flex-col gap-lg" }, fn = { class: "flex flex-col gap-xs pr-4xl" }, pn = {
32
+ var fn = { class: "flex min-w-0 flex-1 flex-col gap-lg" }, pn = { class: "flex flex-col gap-xs pr-4xl" }, mn = {
33
33
  key: 0,
34
34
  class: "text-xs text-tertiary"
35
- }, mn = {
35
+ }, hn = {
36
36
  key: 0,
37
37
  class: "flex flex-wrap items-center gap-lg"
38
- }, hn = {
38
+ }, gn = {
39
39
  key: 0,
40
40
  class: "absolute top-(--spacing-sm) right-(--spacing-sm) flex items-center gap-xxs rounded-full bg-error-solid px-sm py-xxs"
41
- }, gn = /* @__PURE__ */ I({
41
+ }, _n = /* @__PURE__ */ L({
42
42
  __name: "InvoiceApprovalBanner",
43
43
  props: {
44
44
  isOutOfSync: { type: Boolean },
@@ -52,97 +52,97 @@ var dn = { class: "flex min-w-0 flex-1 flex-col gap-lg" }, fn = { class: "flex f
52
52
  "viewProForma"
53
53
  ],
54
54
  setup(e, { emit: t }) {
55
- let n = e, r = t, a = O(), o = w(), s = A(() => n.approval?.sentAt ?? null), c = A(() => s.value !== null), l = A(() => n.approval?.status === i.REJECTED), u = A(() => s.value === null ? "" : o.toDate(s.value)), d = A(() => l.value ? "error" : n.isOutOfSync ? "warning" : "info"), f = A(() => n.isOutOfSync ? a.t("wise_invoicing.invoice.approval_banner.out_of_sync", { date: u.value }) : a.t("wise_invoicing.invoice.approval_banner.sent", { date: u.value })), p = A(() => {
55
+ let n = e, r = t, a = k(), o = T(), s = j(() => n.approval?.sentAt ?? null), c = j(() => s.value !== null), l = j(() => n.approval?.status === i.REJECTED), u = j(() => s.value === null ? "" : o.toDate(s.value)), d = j(() => l.value ? "error" : n.isOutOfSync ? "warning" : "info"), f = j(() => n.isOutOfSync ? a.t("wise_invoicing.invoice.approval_banner.out_of_sync", { date: u.value }) : a.t("wise_invoicing.invoice.approval_banner.sent", { date: u.value })), p = j(() => {
56
56
  if (n.isOutOfSync) return a.t("wise_invoicing.invoice.approval_banner.out_of_sync_supporting");
57
57
  if (n.rejection === null || n.approval?.status === i.APPROVED) return null;
58
58
  let e = a.t(ke.getRejectionReasonTranslationKey(n.rejection.reason));
59
59
  return a.t(l.value ? "wise_invoicing.invoice.approval_banner.rejected_reason" : "wise_invoicing.invoice.approval_banner.previously_rejected_reason", { reason: n.rejection.remark === null ? e : `${e} — ${n.rejection.remark}` });
60
- }), m = A(() => l.value || n.approval?.status !== i.REQUESTED ? null : n.approval.level), h = A(() => {
60
+ }), m = j(() => l.value || n.approval?.status !== i.REQUESTED ? null : n.approval.level), h = j(() => {
61
61
  let e = m.value;
62
62
  return e === null ? "" : a.t(ke.getReminderLevelTranslationKey(e));
63
- }), g = A(() => {
63
+ }), g = j(() => {
64
64
  let e = n.approval?.reminderSentAt ?? null;
65
65
  return m.value === null || e === null ? null : a.t("wise_invoicing.invoice.approval_banner.last_reminder_sent", { time: o.toRelativeTime(e) });
66
- }), _ = A(() => ({
66
+ }), _ = j(() => ({
67
67
  error: "border-error-subtle bg-error-primary",
68
68
  info: "border-primary bg-primary-alt",
69
69
  warning: "border-warning-300 bg-warning-primary"
70
- })[d.value]), ee = A(() => ({
70
+ })[d.value]), ee = j(() => ({
71
71
  error: "rounded-full bg-error-secondary",
72
72
  info: "rounded-lg border border-primary bg-primary shadow-xs",
73
73
  warning: "rounded-full bg-warning-secondary"
74
- })[d.value]), v = A(() => ({
74
+ })[d.value]), v = j(() => ({
75
75
  error: "text-error-primary",
76
76
  info: "text-tertiary",
77
77
  warning: "text-warning-primary"
78
- })[d.value]), te = A(() => d.value === "info" ? x : C), y = A(() => ({
78
+ })[d.value]), te = j(() => d.value === "info" ? x : Ce), y = j(() => ({
79
79
  error: "text-error-primary",
80
80
  info: "text-brand-secondary",
81
81
  warning: "text-tertiary"
82
82
  })[d.value]);
83
- return (e, t) => c.value ? (R(), N("div", {
83
+ return (e, t) => c.value ? (z(), P("div", {
84
84
  key: 0,
85
85
  class: vt([_.value, "relative flex items-start gap-xl rounded-xl border p-xl shadow-xs"])
86
86
  }, [
87
- P("span", { class: vt([ee.value, "flex size-(--spacing-4xl) shrink-0 items-center justify-center"]) }, [(R(), j(xt(te.value), { class: vt([v.value, "size-(--spacing-xl)"]) }, null, 8, ["class"]))], 2),
88
- P("div", dn, [P("div", fn, [F(B(X), {
87
+ F("span", { class: vt([ee.value, "flex size-(--spacing-4xl) shrink-0 items-center justify-center"]) }, [(z(), M(xt(te.value), { class: vt([v.value, "size-(--spacing-xl)"]) }, null, 8, ["class"]))], 2),
88
+ F("div", fn, [F("div", pn, [I(V(Z), {
89
89
  text: f.value,
90
90
  class: "text-xs font-semibold text-secondary"
91
- }, null, 8, ["text"]), p.value === null ? M("", !0) : (R(), N("p", pn, [gt(z(p.value) + " ", 1), n.proFormaFile !== null && n.isOutOfSync ? (R(), j(B(Lt), { key: 0 }, {
92
- default: V(() => [P("button", {
91
+ }, null, 8, ["text"]), p.value === null ? N("", !0) : (z(), P("p", mn, [gt(B(p.value) + " ", 1), n.proFormaFile !== null && n.isOutOfSync ? (z(), M(V(Lt), { key: 0 }, {
92
+ default: H(() => [F("button", {
93
93
  class: vt([y.value, "underline-offset-2 hover:underline"]),
94
94
  type: "button",
95
95
  onClick: t[0] ||= (e) => r("viewProForma")
96
- }, z(B(a).t("wise_invoicing.invoice.approval_banner.view_pro_forma")), 3)]),
96
+ }, B(V(a).t("wise_invoicing.invoice.approval_banner.view_pro_forma")), 3)]),
97
97
  _: 1
98
- })) : M("", !0)]))]), n.isOutOfSync || n.proFormaFile !== null ? (R(), N("div", mn, [n.isOutOfSync ? (R(), N(k, { key: 0 }, [F(B(Lt), null, {
99
- default: V(() => [P("button", {
98
+ })) : N("", !0)]))]), n.isOutOfSync || n.proFormaFile !== null ? (z(), P("div", hn, [n.isOutOfSync ? (z(), P(A, { key: 0 }, [I(V(Lt), null, {
99
+ default: H(() => [F("button", {
100
100
  class: "text-xs font-semibold text-tertiary underline-offset-2 hover:underline",
101
101
  type: "button",
102
102
  onClick: t[1] ||= (e) => r("revertChanges")
103
- }, z(B(a).t("wise_invoicing.invoice.approval_banner.revert_changes")), 1)]),
103
+ }, B(V(a).t("wise_invoicing.invoice.approval_banner.revert_changes")), 1)]),
104
104
  _: 1
105
- }), F(B(Lt), null, {
106
- default: V(() => [P("button", {
105
+ }), I(V(Lt), null, {
106
+ default: H(() => [F("button", {
107
107
  class: "text-xs font-semibold text-warning-primary underline-offset-2 hover:underline",
108
108
  type: "button",
109
109
  onClick: t[2] ||= (e) => r("sendNewRequest")
110
- }, z(B(a).t("wise_invoicing.invoice.approval_banner.send_new_request")), 1)]),
110
+ }, B(V(a).t("wise_invoicing.invoice.approval_banner.send_new_request")), 1)]),
111
111
  _: 1
112
- })], 64)) : (R(), N(k, { key: 1 }, [n.proFormaFile === null ? M("", !0) : (R(), j(B(Lt), { key: 0 }, {
113
- default: V(() => [P("button", {
112
+ })], 64)) : (z(), P(A, { key: 1 }, [n.proFormaFile === null ? N("", !0) : (z(), M(V(Lt), { key: 0 }, {
113
+ default: H(() => [F("button", {
114
114
  class: vt([y.value, "text-xs font-semibold underline-offset-2 hover:underline"]),
115
115
  type: "button",
116
116
  onClick: t[3] ||= (e) => r("viewProForma")
117
- }, z(B(a).t("wise_invoicing.invoice.approval_banner.view_pro_forma")), 3)]),
117
+ }, B(V(a).t("wise_invoicing.invoice.approval_banner.view_pro_forma")), 3)]),
118
118
  _: 1
119
- }))], 64))])) : M("", !0)]),
120
- l.value ? (R(), N("span", hn, [F(B(he), { class: "size-(--spacing-lg) shrink-0 text-white" }), F(B(X), {
121
- text: B(a).t("wise_invoicing.invoice.approval_status.rejected"),
119
+ }))], 64))])) : N("", !0)]),
120
+ l.value ? (z(), P("span", gn, [I(V(le), { class: "size-(--spacing-lg) shrink-0 text-white" }), I(V(Z), {
121
+ text: V(a).t("wise_invoicing.invoice.approval_status.rejected"),
122
122
  class: "text-xs text-white"
123
- }, null, 8, ["text"])])) : m.value !== null && g.value !== null ? (R(), j(B(an), {
123
+ }, null, 8, ["text"])])) : m.value !== null && g.value !== null ? (z(), M(V(an), {
124
124
  key: 1,
125
125
  "popover-side-offset": 8,
126
126
  class: "absolute top-(--spacing-sm) right-(--spacing-sm)",
127
127
  "popover-align": "center",
128
128
  "popover-side": "bottom"
129
129
  }, {
130
- trigger: V(() => [F(Ie, {
130
+ trigger: H(() => [I(Ie, {
131
131
  icon: void 0,
132
132
  label: h.value,
133
133
  level: m.value,
134
134
  size: "sm",
135
135
  tone: "warning"
136
136
  }, null, 8, ["label", "level"])]),
137
- content: V(() => [F(B(on), null, {
138
- default: V(() => [F(B(X), {
137
+ content: H(() => [I(V(on), null, {
138
+ default: H(() => [I(V(Z), {
139
139
  text: g.value,
140
140
  class: "text-sm text-primary"
141
141
  }, null, 8, ["text"])]),
142
142
  _: 1
143
143
  })]),
144
144
  _: 1
145
- })) : m.value === null ? M("", !0) : (R(), j(Ie, {
145
+ })) : m.value === null ? N("", !0) : (z(), M(Ie, {
146
146
  key: 2,
147
147
  icon: void 0,
148
148
  label: h.value,
@@ -151,13 +151,13 @@ var dn = { class: "flex min-w-0 flex-1 flex-col gap-lg" }, fn = { class: "flex f
151
151
  size: "sm",
152
152
  tone: "warning"
153
153
  }, null, 8, ["label", "level"]))
154
- ], 2)) : M("", !0);
154
+ ], 2)) : N("", !0);
155
155
  }
156
156
  });
157
157
  //#endregion
158
158
  //#region src/modules/invoice/api/mutations/invoiceUpdate.mutation.ts
159
- function _n() {
160
- return H({
159
+ function vn() {
160
+ return U({
161
161
  queryFn: (e) => y.update(e.params.invoiceUuid, e.body),
162
162
  queryKeysToInvalidate: {
163
163
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
@@ -167,15 +167,15 @@ function _n() {
167
167
  }
168
168
  //#endregion
169
169
  //#region src/modules/invoice/components/InvoiceDeliveryStatusBadge.vue
170
- var vn = /* @__PURE__ */ I({
170
+ var yn = /* @__PURE__ */ L({
171
171
  __name: "InvoiceDeliveryStatusBadge",
172
172
  props: {
173
173
  deliveryStatus: {},
174
174
  size: { default: "sm" }
175
175
  },
176
176
  setup(e) {
177
- let t = e, n = O(), r = A(() => Ne.getMetadata(t.deliveryStatus)), i = A(() => n.t(r.value.translationKey));
178
- return (e, n) => (R(), j(B(Mt), {
177
+ let t = e, n = k(), r = j(() => Ne.getMetadata(t.deliveryStatus)), i = j(() => n.t(r.value.translationKey));
178
+ return (e, n) => (z(), M(V(Mt), {
179
179
  label: i.value,
180
180
  color: r.value.tone,
181
181
  size: t.size,
@@ -186,7 +186,7 @@ var vn = /* @__PURE__ */ I({
186
186
  "size"
187
187
  ]));
188
188
  }
189
- }), yn = D.string().nullable(), bn = D.object({ subject: yn }), xn = /* @__PURE__ */ I({
189
+ }), bn = O.string().nullable(), xn = O.object({ subject: bn }), Sn = /* @__PURE__ */ L({
190
190
  __name: "InvoiceDetailHeaderSection",
191
191
  props: {
192
192
  isDisputed: { type: Boolean },
@@ -197,9 +197,9 @@ var vn = /* @__PURE__ */ I({
197
197
  },
198
198
  emits: ["togglePdfView"],
199
199
  setup(e, { emit: t }) {
200
- let n = e, r = t, i = O(), a = Q(), o = _n(), s = A(() => new Be(n.invoice.status)), c = A(() => s.value.color), l = A(() => i.t(s.value.translationKey)), u = A(() => n.invoice.deliveryStatus !== d.UNSENT), f = A(() => Ne.isSent(n.invoice.deliveryStatus)), p = A(() => !b.isEditable(n.invoice.status)), m = $({
200
+ let n = e, r = t, i = k(), a = Q(), o = vn(), s = j(() => new Be(n.invoice.status)), c = j(() => s.value.color), l = j(() => i.t(s.value.translationKey)), u = j(() => n.invoice.deliveryStatus !== d.UNSENT), f = j(() => Ne.isSent(n.invoice.deliveryStatus)), p = j(() => !b.isEditable(n.invoice.status)), m = $({
201
201
  initialState: { subject: n.invoice.subject },
202
- schema: bn,
202
+ schema: xn,
203
203
  onSubmit: async (e) => {
204
204
  let t = await o.execute({
205
205
  body: {
@@ -211,21 +211,21 @@ var vn = /* @__PURE__ */ I({
211
211
  t.isErr() && a.apiError(t.error);
212
212
  }
213
213
  }), h = m.register("subject");
214
- return ze({ form: m }), (e, t) => (R(), j(B(Kt), {
215
- form: B(m),
214
+ return ze({ form: m }), (e, t) => (z(), M(V(Kt), {
215
+ form: V(m),
216
216
  "prompt-on-unsaved-changes": !1
217
217
  }, {
218
- default: V(() => [F(at, {
219
- "fallback-title": B(i).t("wise_invoicing.invoice.detail.fallback_title"),
218
+ default: H(() => [I(at, {
219
+ "fallback-title": V(i).t("wise_invoicing.invoice.detail.fallback_title"),
220
220
  "is-disabled": p.value,
221
221
  sequence: n.invoice.sequence,
222
222
  "status-color": c.value,
223
223
  "status-label": l.value,
224
- icon: B(C),
225
- "subject-field": B(h),
226
- "subject-placeholder": B(i).t("wise_invoicing.invoice.detail.header.subject_placeholder")
224
+ icon: V(Ce),
225
+ "subject-field": V(h),
226
+ "subject-placeholder": V(i).t("wise_invoicing.invoice.detail.header.subject_placeholder")
227
227
  }, {
228
- actions: V(() => [F(Ve, {
228
+ actions: H(() => [I(Ve, {
229
229
  "is-pdf-view-active": n.isPdfViewActive,
230
230
  "menu-groups": n.menuGroups,
231
231
  "primary-buttons": n.primaryButtons,
@@ -235,13 +235,13 @@ var vn = /* @__PURE__ */ I({
235
235
  "menu-groups",
236
236
  "primary-buttons"
237
237
  ])]),
238
- status: V(() => [F(B(Qt), {
238
+ status: H(() => [I(V(Qt), {
239
239
  gap: "xs",
240
240
  class: "flex-wrap items-start"
241
241
  }, {
242
- default: V(() => [
243
- F(Me, { "lifecycle-status": n.invoice.lifecycleStatus }, null, 8, ["lifecycle-status"]),
244
- F(Pe, {
242
+ default: H(() => [
243
+ I(Me, { "lifecycle-status": n.invoice.lifecycleStatus }, null, 8, ["lifecycle-status"]),
244
+ I(Pe, {
245
245
  "is-sent": f.value,
246
246
  "balance-due-amount": n.invoice.balanceDueAmount,
247
247
  "gross-amount": n.invoice.grossAmount,
@@ -256,13 +256,13 @@ var vn = /* @__PURE__ */ I({
256
256
  "settlement-status",
257
257
  "total-credited-amount"
258
258
  ]),
259
- n.invoice.isOverdue ? (R(), j(st, { key: 0 })) : M("", !0),
260
- n.isDisputed ? (R(), j(je, { key: 1 })) : M("", !0),
261
- u.value ? (R(), j(vn, {
259
+ n.invoice.isOverdue ? (z(), M(st, { key: 0 })) : N("", !0),
260
+ n.isDisputed ? (z(), M(je, { key: 1 })) : N("", !0),
261
+ u.value ? (z(), M(yn, {
262
262
  key: 2,
263
263
  "delivery-status": n.invoice.deliveryStatus
264
- }, null, 8, ["delivery-status"])) : M("", !0),
265
- F(Le, {
264
+ }, null, 8, ["delivery-status"])) : N("", !0),
265
+ I(Le, {
266
266
  approval: n.invoice.approval,
267
267
  rejection: n.invoice.rejection,
268
268
  "requires-prior-approval": n.invoice.requiresPriorApproval
@@ -288,11 +288,11 @@ var vn = /* @__PURE__ */ I({
288
288
  _: 1
289
289
  }, 8, ["form"]));
290
290
  }
291
- }), Sn = { class: "grid w-full grid-cols-1 gap-md lg:grid-cols-3" }, Cn = /* @__PURE__ */ I({
291
+ }), Cn = { class: "grid w-full grid-cols-1 gap-md lg:grid-cols-3" }, wn = /* @__PURE__ */ L({
292
292
  __name: "InvoiceDetailLinkedCreditNotesSection",
293
293
  props: { invoice: {} },
294
294
  setup(e) {
295
- let t = e, n = O(), r = p(), i = A(() => t.invoice.creditNotes.map((e) => {
295
+ let t = e, n = k(), r = p(), i = j(() => t.invoice.creditNotes.map((e) => {
296
296
  let t = new Be(e.status);
297
297
  return {
298
298
  uuid: e.uuid,
@@ -308,17 +308,17 @@ var vn = /* @__PURE__ */ I({
308
308
  amount: e.grossAmount.amount > 0 ? -e.grossAmount.amount : e.grossAmount.amount
309
309
  };
310
310
  }
311
- return (e, t) => i.value.length > 0 ? (R(), j(B(Rt), {
311
+ return (e, t) => i.value.length > 0 ? (z(), M(V(Rt), {
312
312
  key: 0,
313
313
  as: "section",
314
314
  gap: "md",
315
315
  class: "w-full"
316
316
  }, {
317
- default: V(() => [F(B(X), {
318
- text: B(n).t("wise_invoicing.invoice.detail.credit_notes.title"),
317
+ default: H(() => [I(V(Z), {
318
+ text: V(n).t("wise_invoicing.invoice.detail.credit_notes.title"),
319
319
  as: "h2",
320
320
  class: "text-sm font-semibold text-primary"
321
- }, null, 8, ["text"]), P("div", Sn, [(R(!0), N(k, null, bt(i.value, (e) => (R(), j(B(Ot), {
321
+ }, null, 8, ["text"]), F("div", Cn, [(z(!0), P(A, null, bt(i.value, (e) => (z(), M(V(Ot), {
322
322
  key: e.uuid,
323
323
  to: {
324
324
  name: "invoicing-credit-note-detail",
@@ -326,23 +326,23 @@ var vn = /* @__PURE__ */ I({
326
326
  },
327
327
  class: "min-w-0 rounded-lg border border-secondary bg-primary p-lg transition-colors hover:bg-secondary"
328
328
  }, {
329
- default: V(() => [F(B(Qt), {
329
+ default: H(() => [I(V(Qt), {
330
330
  align: "center",
331
331
  gap: "md",
332
332
  class: "min-w-0"
333
333
  }, {
334
- default: V(() => [
335
- F(B(X), {
334
+ default: H(() => [
335
+ I(V(Z), {
336
336
  text: e.title,
337
337
  class: "min-w-0 flex-1 truncate text-xs font-semibold text-primary"
338
338
  }, null, 8, ["text"]),
339
- F(B(Mt), {
339
+ I(V(Mt), {
340
340
  label: e.statusLabel,
341
341
  color: e.statusColor,
342
342
  size: "sm",
343
343
  variant: "translucent"
344
344
  }, null, 8, ["label", "color"]),
345
- F(B(Mt), {
345
+ I(V(Mt), {
346
346
  label: e.amountLabel,
347
347
  variant: "translucent",
348
348
  size: "sm"
@@ -353,33 +353,33 @@ var vn = /* @__PURE__ */ I({
353
353
  _: 2
354
354
  }, 1032, ["to"]))), 128))])]),
355
355
  _: 1
356
- })) : M("", !0);
356
+ })) : N("", !0);
357
357
  }
358
- }), wn = D.object({
359
- deliveredOn: T.nullable(),
360
- dueOn: T,
361
- issuedOn: T,
362
- customFields: D.array(D.custom()),
363
- externalRemarks: D.string().nullable(),
364
- poNumber: D.string().nullable(),
365
- preparedBy: D.object({
366
- uuid: D.uuid(),
367
- name: D.string()
358
+ }), Tn = O.object({
359
+ deliveredOn: E.nullable(),
360
+ dueOn: E,
361
+ issuedOn: E,
362
+ customFields: O.array(O.custom()),
363
+ externalRemarks: O.string().nullable(),
364
+ poNumber: O.string().nullable(),
365
+ preparedBy: O.object({
366
+ uuid: O.uuid(),
367
+ name: O.string()
368
368
  }),
369
- subject: D.string().nullable()
369
+ subject: O.string().nullable()
370
370
  }).superRefine((t, n) => {
371
371
  Temporal.PlainDate.compare(t.dueOn, t.issuedOn) < 0 && n.addIssue({
372
372
  code: "custom",
373
373
  message: e.global.t("invoicing.invoice.validation.due_date_after_issue_date"),
374
374
  path: ["dueOn"]
375
375
  });
376
- }), Tn = /* @__PURE__ */ I({
376
+ }), En = /* @__PURE__ */ L({
377
377
  __name: "InvoiceDetailRemarksSection",
378
378
  props: { invoice: {} },
379
379
  setup(e) {
380
- let t = e, n = O(), r = Q(), i = _n(), a = $({
381
- initialState: A(() => v.toForm(t.invoice)),
382
- schema: wn,
380
+ let t = e, n = k(), r = Q(), i = vn(), a = $({
381
+ initialState: j(() => v.toForm(t.invoice)),
382
+ schema: Tn,
383
383
  onSubmit: async (e) => {
384
384
  let n = await i.execute({
385
385
  body: e,
@@ -387,16 +387,16 @@ var vn = /* @__PURE__ */ I({
387
387
  });
388
388
  n.isErr() && r.apiError(n.error);
389
389
  }
390
- }), o = a.register("externalRemarks"), s = A(() => !b.isEditable(t.invoice.status));
391
- return ze({ form: a }), (e, t) => (R(), j(B(Kt), {
392
- form: B(a),
390
+ }), o = a.register("externalRemarks"), s = j(() => !b.isEditable(t.invoice.status));
391
+ return ze({ form: a }), (e, t) => (z(), M(V(Kt), {
392
+ form: V(a),
393
393
  "prompt-on-unsaved-changes": !1
394
394
  }, {
395
- default: V(() => [F(qe, {
395
+ default: H(() => [I(qe, {
396
396
  "is-disabled": s.value,
397
- placeholder: B(n).t("wise_invoicing.invoice.detail.remarks.placeholder"),
398
- "remarks-field": B(o),
399
- title: B(n).t("wise_invoicing.invoice.detail.remarks.title")
397
+ placeholder: V(n).t("wise_invoicing.invoice.detail.remarks.placeholder"),
398
+ "remarks-field": V(o),
399
+ title: V(n).t("wise_invoicing.invoice.detail.remarks.title")
400
400
  }, null, 8, [
401
401
  "is-disabled",
402
402
  "placeholder",
@@ -409,7 +409,7 @@ var vn = /* @__PURE__ */ I({
409
409
  });
410
410
  //#endregion
411
411
  //#region src/modules/invoice/api/queries/invoiceActivityLogIndex.query.ts
412
- function En(e) {
412
+ function Dn(e) {
413
413
  return Tt("invoiceActivityLogIndex", {
414
414
  params: { invoiceUuid: e },
415
415
  queryFn: (t) => y.getActivityLogs(e.value, { pagination: t })
@@ -417,25 +417,25 @@ function En(e) {
417
417
  }
418
418
  //#endregion
419
419
  //#region src/modules/invoice/use-cases/detail/components/sidebar/InvoiceDetailSidebarActivityTab.vue
420
- var Dn = /* @__PURE__ */ I({
420
+ var On = /* @__PURE__ */ L({
421
421
  __name: "InvoiceDetailSidebarActivityTab",
422
422
  props: { invoice: {} },
423
423
  setup(e) {
424
- let t = e, n = O(), { hasNextPage: r, isFetchingNextPage: i, isLoading: a, fetchNextPage: o, result: s } = En(A(() => t.invoice.uuid)), c = A(() => s.value.unwrapOr({
424
+ let t = e, n = k(), { hasNextPage: r, isFetchingNextPage: i, isLoading: a, fetchNextPage: o, result: s } = Dn(j(() => t.invoice.uuid)), c = j(() => s.value.unwrapOr({
425
425
  data: [],
426
426
  meta: { next: null }
427
427
  }).data);
428
- return (e, s) => (R(), j(Je, {
428
+ return (e, s) => (z(), M(Je, {
429
429
  "current-billing-document": {
430
- role: B(u).INVOICE,
430
+ role: V(u).INVOICE,
431
431
  uuid: t.invoice.uuid
432
432
  },
433
- "empty-message": B(n).t("wise_invoicing.invoice.detail.sidebar.activity_empty"),
433
+ "empty-message": V(n).t("wise_invoicing.invoice.detail.sidebar.activity_empty"),
434
434
  entries: c.value,
435
- "fetch-next-page": B(o),
436
- "has-next-page": B(r),
437
- "is-fetching-next-page": B(i),
438
- "is-loading": B(a)
435
+ "fetch-next-page": V(o),
436
+ "has-next-page": V(r),
437
+ "is-fetching-next-page": V(i),
438
+ "is-loading": V(a)
439
439
  }, null, 8, [
440
440
  "current-billing-document",
441
441
  "empty-message",
@@ -446,7 +446,7 @@ var Dn = /* @__PURE__ */ I({
446
446
  "is-loading"
447
447
  ]));
448
448
  }
449
- }), On = /* @__PURE__ */ I({
449
+ }), kn = /* @__PURE__ */ L({
450
450
  __name: "CustomFieldFieldset",
451
451
  props: /*@__PURE__*/ _t({
452
452
  isDisabled: { type: Boolean },
@@ -462,17 +462,17 @@ var Dn = /* @__PURE__ */ I({
462
462
  setup(e) {
463
463
  let t = e, n = St(e, "modelValue");
464
464
  function r(e) {
465
- return oe.findByDefinition(n.value, e);
465
+ return se.findByDefinition(n.value, e);
466
466
  }
467
467
  function i(e, t) {
468
- n.value = oe.upsert(n.value, e, t);
468
+ n.value = se.upsert(n.value, e, t);
469
469
  }
470
- return (e, n) => t.definitions.length > 0 ? (R(), j(B(Rt), {
470
+ return (e, n) => t.definitions.length > 0 ? (z(), M(V(Rt), {
471
471
  key: 0,
472
472
  gap: t.size === "sm" ? "xs" : "md",
473
473
  align: "stretch"
474
474
  }, {
475
- default: V(() => [(R(!0), N(k, null, bt(t.definitions, (e) => (R(), j(Xe, {
475
+ default: H(() => [(z(!0), P(A, null, bt(t.definitions, (e) => (z(), M(Xe, {
476
476
  key: e.uuid,
477
477
  currency: t.currency,
478
478
  definition: e,
@@ -491,12 +491,12 @@ var Dn = /* @__PURE__ */ I({
491
491
  "onUpdate:modelValue"
492
492
  ]))), 128))]),
493
493
  _: 1
494
- }, 8, ["gap"])) : M("", !0);
494
+ }, 8, ["gap"])) : N("", !0);
495
495
  }
496
496
  });
497
497
  //#endregion
498
498
  //#region src/modules/invoice/api/queries/invoiceCustomerDetail.query.ts
499
- function kn(e) {
499
+ function An(e) {
500
500
  return Dt("invoiceCustomerDetail", {
501
501
  params: { customerUuid: e },
502
502
  queryFn: () => Ae.getByUuid(e.value)
@@ -504,7 +504,7 @@ function kn(e) {
504
504
  }
505
505
  //#endregion
506
506
  //#region src/modules/invoice/models/invoice/update/invoicePreparer.transformer.ts
507
- var An = class {
507
+ var jn = class {
508
508
  static fromDto(e) {
509
509
  let t = `${e.firstName ?? ""} ${e.lastName ?? ""}`.trim();
510
510
  return {
@@ -512,28 +512,28 @@ var An = class {
512
512
  name: t === "" ? e.email ?? e.uuid : t
513
513
  };
514
514
  }
515
- }, jn = class {
515
+ }, Mn = class {
516
516
  static toDto(e) {
517
517
  return {
518
518
  pagination: e.pagination,
519
519
  search: te.toDto(e.search)
520
520
  };
521
521
  }
522
- }, Mn = class {
522
+ }, Nn = class {
523
523
  static async getAll(e) {
524
- return (await n.fromPromise(t({ query: jn.toDto(e) }))).map((e) => ({
525
- data: e.data.items.map(An.fromDto),
524
+ return (await n.fromPromise(t({ query: Mn.toDto(e) }))).map((e) => ({
525
+ data: e.data.items.map(jn.fromDto),
526
526
  meta: e.data.meta
527
527
  }));
528
528
  }
529
529
  };
530
530
  //#endregion
531
531
  //#region src/modules/invoice/api/queries/invoiceUserSearch.query.ts
532
- function Nn(e) {
533
- let t = A(() => ({ search: e.params.search?.value }));
532
+ function Pn(e) {
533
+ let t = j(() => ({ search: e.params.search?.value }));
534
534
  return Et("invoiceUserSearch", {
535
535
  params: { queryParams: t },
536
- queryFn: (t) => Mn.getAll({
536
+ queryFn: (t) => Nn.getAll({
537
537
  pagination: t,
538
538
  search: e.params.search?.value ?? ""
539
539
  })
@@ -541,7 +541,7 @@ function Nn(e) {
541
541
  }
542
542
  //#endregion
543
543
  //#region src/modules/invoice/components/form/InvoiceFormPreparedByField.vue
544
- var Pn = /* @__PURE__ */ I({
544
+ var Fn = /* @__PURE__ */ L({
545
545
  __name: "InvoiceFormPreparedByField",
546
546
  props: {
547
547
  isLoading: { type: Boolean },
@@ -550,20 +550,20 @@ var Pn = /* @__PURE__ */ I({
550
550
  },
551
551
  emits: ["nextPage", "updateSearch"],
552
552
  setup(e, { emit: t }) {
553
- let n = e, r = t, i = O(), a = A(() => sn(n.users));
553
+ let n = e, r = t, i = k(), a = j(() => sn(n.users));
554
554
  function o(e) {
555
555
  return e.name;
556
556
  }
557
557
  function s(e) {
558
558
  e !== null && (n.field.setValue(e), r("updateSearch", ""));
559
559
  }
560
- return (e, t) => (R(), j(B(jt), L(B(E)(n.field), {
560
+ return (e, t) => (z(), M(V(jt), R(V(D)(n.field), {
561
561
  "display-fn": o,
562
562
  "is-loading": n.isLoading,
563
563
  "is-required": !0,
564
564
  items: a.value,
565
- label: B(i).t("wise_invoicing.invoice.detail.header.created_by"),
566
- placeholder: B(i).t("component.autocomplete.search_placeholder"),
565
+ label: V(i).t("wise_invoicing.invoice.detail.header.created_by"),
566
+ placeholder: V(i).t("component.autocomplete.search_placeholder"),
567
567
  "search-mode": "remote",
568
568
  onNextPage: t[0] ||= (e) => r("nextPage"),
569
569
  "onUpdate:modelValue": s,
@@ -575,7 +575,7 @@ var Pn = /* @__PURE__ */ I({
575
575
  "placeholder"
576
576
  ]));
577
577
  }
578
- }), Fn = /* @__PURE__ */ I({
578
+ }), In = /* @__PURE__ */ L({
579
579
  __name: "InvoiceUpdateDialog",
580
580
  props: {
581
581
  customFieldDefinitions: {},
@@ -583,18 +583,18 @@ var Pn = /* @__PURE__ */ I({
583
583
  },
584
584
  emits: ["close"],
585
585
  setup(e, { emit: t }) {
586
- let n = e, r = t, i = O(), a = Q(), o = _n(), s = Re(), c = h(), l = g({ debounceMs: 250 }), u = Nn({ params: { search: l.debouncedSearch } }), d = A(() => u.result.value.match({
586
+ let n = e, r = t, i = k(), a = Q(), o = vn(), s = Re(), c = h(), l = g({ debounceMs: 250 }), u = Pn({ params: { search: l.debouncedSearch } }), d = j(() => u.result.value.match({
587
587
  err: () => [],
588
588
  loading: () => [],
589
589
  ok: (e) => e.data
590
- })), f = kn(A(() => n.invoice.customer.uuid)), p = A(() => {
590
+ })), f = An(j(() => n.invoice.customer.uuid)), p = j(() => {
591
591
  let e = f.result.value;
592
592
  if (e.isOk()) return e.getValue().defaultPaymentTermDays;
593
593
  let t = s.result.value;
594
594
  return t.isOk() ? t.getValue().defaultPaymentTermDays ?? 0 : 0;
595
595
  }), m = $({
596
- initialState: A(() => v.toForm(n.invoice)),
597
- schema: wn,
596
+ initialState: j(() => v.toForm(n.invoice)),
597
+ schema: Tn,
598
598
  onSubmit: async (e) => {
599
599
  let t = await o.execute({
600
600
  body: e,
@@ -609,7 +609,7 @@ var Pn = /* @__PURE__ */ I({
609
609
  onSubmitError: () => {
610
610
  a.unableToSave();
611
611
  }
612
- }), _ = m.register("issuedOn"), ee = m.register("dueOn"), te = m.register("deliveredOn"), y = m.register("poNumber"), ne = m.register("preparedBy"), re = m.register("subject"), ie = m.register("customFields"), b = A({
612
+ }), _ = m.register("issuedOn"), ee = m.register("dueOn"), te = m.register("deliveredOn"), y = m.register("poNumber"), ne = m.register("preparedBy"), re = m.register("subject"), ie = m.register("customFields"), b = j({
613
613
  get: () => ie.modelValue.value ?? [],
614
614
  set: (e) => {
615
615
  ie.setValue(e);
@@ -621,41 +621,41 @@ var Pn = /* @__PURE__ */ I({
621
621
  function oe(e) {
622
622
  l.updateSearch(e);
623
623
  }
624
- return (e, t) => (R(), j(B(Y), {
625
- form: B(m),
624
+ return (e, t) => (z(), M(V(X), {
625
+ form: V(m),
626
626
  size: "sm",
627
627
  onClose: t[1] ||= (e) => r("close")
628
628
  }, {
629
- default: V(() => [
630
- F(B(J), {
631
- icon: B(Te),
629
+ default: H(() => [
630
+ I(V(Y), {
631
+ icon: V(w),
632
632
  "is-description-hidden": !0,
633
- title: B(i).t("wise_invoicing.invoice.detail.header.edit_info"),
633
+ title: V(i).t("wise_invoicing.invoice.detail.header.edit_info"),
634
634
  description: ""
635
635
  }, null, 8, ["icon", "title"]),
636
- F(B(Wt), null, {
637
- default: V(() => [F(B(Jt), null, {
638
- default: V(() => [F(B(qt), {
636
+ I(V(Wt), null, {
637
+ default: H(() => [I(V(Jt), null, {
638
+ default: H(() => [I(V(qt), {
639
639
  lg: 2,
640
640
  sm: 1
641
641
  }, {
642
- default: V(() => [
643
- F(B(zt), L(B(E)(B(_)), {
644
- label: B(i).t("wise_invoicing.invoice.detail.header.invoice_date"),
642
+ default: H(() => [
643
+ I(V(zt), R(V(D)(V(_)), {
644
+ label: V(i).t("wise_invoicing.invoice.detail.header.invoice_date"),
645
645
  "is-required": !0,
646
646
  "onUpdate:modelValue": ae
647
647
  }), null, 16, ["label"]),
648
- F(B(zt), L(B(E)(B(ee)), {
649
- label: B(i).t("wise_invoicing.invoice.detail.header.due_date"),
648
+ I(V(zt), R(V(D)(V(ee)), {
649
+ label: V(i).t("wise_invoicing.invoice.detail.header.due_date"),
650
650
  "is-required": !0,
651
- "min-date": B(_).modelValue.value
651
+ "min-date": V(_).modelValue.value
652
652
  }), null, 16, ["label", "min-date"]),
653
- B(c).isDeliveryDateVisible.value ? (R(), j(B(zt), L({ key: 0 }, B(E)(B(te)), { label: B(i).t("wise_invoicing.invoice.detail.header.delivery_date") }), null, 16, ["label"])) : M("", !0),
654
- F(Pn, {
655
- field: B(ne),
656
- "is-loading": B(u).isLoading.value,
653
+ V(c).isDeliveryDateVisible.value ? (z(), M(V(zt), R({ key: 0 }, V(D)(V(te)), { label: V(i).t("wise_invoicing.invoice.detail.header.delivery_date") }), null, 16, ["label"])) : N("", !0),
654
+ I(Fn, {
655
+ field: V(ne),
656
+ "is-loading": V(u).isLoading.value,
657
657
  users: d.value,
658
- onNextPage: B(u).fetchNextPage,
658
+ onNextPage: V(u).fetchNextPage,
659
659
  onUpdateSearch: oe
660
660
  }, null, 8, [
661
661
  "field",
@@ -663,14 +663,14 @@ var Pn = /* @__PURE__ */ I({
663
663
  "users",
664
664
  "onNextPage"
665
665
  ]),
666
- F(B(rn), L(B(E)(B(y)), { label: B(i).t("wise_invoicing.invoice.detail.header.po_number") }), null, 16, ["label"]),
667
- F(B(rn), L(B(E)(B(re)), {
668
- label: B(i).t("wise_invoicing.invoice.detail.header.subject"),
669
- placeholder: B(i).t("wise_invoicing.invoice.detail.header.subject_placeholder")
666
+ I(V(rn), R(V(D)(V(y)), { label: V(i).t("wise_invoicing.invoice.detail.header.po_number") }), null, 16, ["label"]),
667
+ I(V(rn), R(V(D)(V(re)), {
668
+ label: V(i).t("wise_invoicing.invoice.detail.header.subject"),
669
+ placeholder: V(i).t("wise_invoicing.invoice.detail.header.subject_placeholder")
670
670
  }), null, 16, ["label", "placeholder"])
671
671
  ]),
672
672
  _: 1
673
- }), F(On, {
673
+ }), I(kn, {
674
674
  modelValue: b.value,
675
675
  "onUpdate:modelValue": t[0] ||= (e) => b.value = e,
676
676
  currency: n.invoice.currency,
@@ -688,83 +688,83 @@ var Pn = /* @__PURE__ */ I({
688
688
  })]),
689
689
  _: 1
690
690
  }),
691
- F(B(K), null, {
692
- right: V(() => [F(B(q), { label: "cancel" }), F(B(Gt), { label: B(i).t("wise_invoicing.invoice.detail.header.edit_info") }, null, 8, ["label"])]),
691
+ I(V(q), null, {
692
+ right: H(() => [I(V(J), { label: "cancel" }), I(V(Gt), { label: V(i).t("wise_invoicing.invoice.detail.header.edit_info") }, null, 8, ["label"])]),
693
693
  _: 1
694
694
  })
695
695
  ]),
696
696
  _: 1
697
697
  }, 8, ["form"]));
698
698
  }
699
- }), In = /* @__PURE__ */ I({
699
+ }), Ln = /* @__PURE__ */ L({
700
700
  __name: "InvoiceDetailSidebarInfoTab",
701
701
  props: {
702
702
  customFieldDefinitions: {},
703
703
  invoice: {}
704
704
  },
705
705
  setup(e) {
706
- let t = e, n = O(), r = w(), i = h(), a = un().create(Fn), o = A(() => b.isEditable(t.invoice.status)), s = A(() => ae.filterByEntityType(t.customFieldDefinitions, l.INVOICE)), c = A(() => {
706
+ let t = e, n = k(), r = T(), i = h(), a = dn().create(In), o = j(() => b.isEditable(t.invoice.status)), s = j(() => ae.filterByEntityType(t.customFieldDefinitions, l.INVOICE)), c = j(() => se.listByDefinitions(t.customFieldDefinitions, t.invoice.customFields)), u = j(() => {
707
707
  if (!t.invoice.isOverdue) return null;
708
708
  let e = t.invoice.dueOn.toZonedDateTime(At.Now.timeZoneId()).toInstant();
709
709
  return r.toRelativeTime(e);
710
710
  });
711
- async function u() {
711
+ async function d() {
712
712
  await a.open({
713
713
  customFieldDefinitions: s.value,
714
714
  invoice: t.invoice
715
715
  });
716
716
  }
717
- function d(e) {
717
+ function f(e) {
718
718
  return e === null ? "-" : r.formatPlainDate(e);
719
719
  }
720
- return (e, r) => (R(), j(B(Bt), { class: "px-2xl py-xl" }, {
721
- default: V(() => [
722
- F(B(Vt), { label: B(n).t("wise_invoicing.invoice.detail.sidebar.general") }, ht({
723
- default: V(() => [
724
- F(B(U), null, {
725
- default: V(() => [F(B(W), {
726
- icon: B(_e),
727
- label: B(n).t("wise_invoicing.invoice.detail.header.invoice_id")
728
- }, null, 8, ["icon", "label"]), F(B(G), { text: t.invoice.sequence ?? "-" }, null, 8, ["text"])]),
720
+ return (e, r) => (z(), M(V(Bt), { class: "px-2xl py-xl" }, {
721
+ default: H(() => [
722
+ I(V(Vt), { label: V(n).t("wise_invoicing.invoice.detail.sidebar.general") }, ht({
723
+ default: H(() => [
724
+ I(V(W), null, {
725
+ default: H(() => [I(V(G), {
726
+ icon: V(xe),
727
+ label: V(n).t("wise_invoicing.invoice.detail.header.invoice_id")
728
+ }, null, 8, ["icon", "label"]), I(V(K), { text: t.invoice.sequence ?? "-" }, null, 8, ["text"])]),
729
729
  _: 1
730
730
  }),
731
- F(B(U), null, {
732
- default: V(() => [F(B(W), {
733
- icon: B(le),
734
- label: B(n).t("wise_invoicing.invoice.detail.header.po_number")
735
- }, null, 8, ["icon", "label"]), F(B(G), { text: t.invoice.poNumber ?? "-" }, null, 8, ["text"])]),
731
+ I(V(W), null, {
732
+ default: H(() => [I(V(G), {
733
+ icon: V(we),
734
+ label: V(n).t("wise_invoicing.invoice.detail.header.po_number")
735
+ }, null, 8, ["icon", "label"]), I(V(K), { text: t.invoice.poNumber ?? "-" }, null, 8, ["text"])]),
736
736
  _: 1
737
737
  }),
738
- F(B(U), null, {
739
- default: V(() => [F(B(W), {
740
- icon: B(S),
741
- label: B(n).t("wise_invoicing.invoice.detail.header.issuer")
742
- }, null, 8, ["icon", "label"]), F(B(G), { text: t.invoice.issuer.name ?? "-" }, null, 8, ["text"])]),
738
+ I(V(W), null, {
739
+ default: H(() => [I(V(G), {
740
+ icon: V(Ee),
741
+ label: V(n).t("wise_invoicing.invoice.detail.header.issuer")
742
+ }, null, 8, ["icon", "label"]), I(V(K), { text: t.invoice.issuer.name ?? "-" }, null, 8, ["text"])]),
743
743
  _: 1
744
744
  }),
745
- F(B(U), null, {
746
- default: V(() => [F(B(W), {
747
- icon: B(C),
748
- label: B(n).t("wise_invoicing.invoice.detail.header.invoice_date")
749
- }, null, 8, ["icon", "label"]), F(B(G), { text: d(t.invoice.issueOn) }, null, 8, ["text"])]),
745
+ I(V(W), null, {
746
+ default: H(() => [I(V(G), {
747
+ icon: V(Ce),
748
+ label: V(n).t("wise_invoicing.invoice.detail.header.invoice_date")
749
+ }, null, 8, ["icon", "label"]), I(V(K), { text: f(t.invoice.issueOn) }, null, 8, ["text"])]),
750
750
  _: 1
751
751
  }),
752
- F(B(U), null, {
753
- default: V(() => [F(B(W), {
754
- icon: B(we),
755
- label: B(n).t("wise_invoicing.invoice.detail.header.due_date"),
752
+ I(V(W), null, {
753
+ default: H(() => [I(V(G), {
754
+ icon: V(De),
755
+ label: V(n).t("wise_invoicing.invoice.detail.header.due_date"),
756
756
  variant: t.invoice.isOverdue ? "error" : "default"
757
757
  }, null, 8, [
758
758
  "icon",
759
759
  "label",
760
760
  "variant"
761
- ]), F(B(Qt), { gap: "xs" }, {
762
- default: V(() => [F(B(G), {
763
- text: d(t.invoice.dueOn),
761
+ ]), I(V(Qt), { gap: "xs" }, {
762
+ default: H(() => [I(V(K), {
763
+ text: f(t.invoice.dueOn),
764
764
  variant: t.invoice.isOverdue ? "error" : "default"
765
- }, null, 8, ["text", "variant"]), c.value === null ? M("", !0) : (R(), j(B(Mt), {
765
+ }, null, 8, ["text", "variant"]), u.value === null ? N("", !0) : (z(), M(V(Mt), {
766
766
  key: 0,
767
- label: c.value,
767
+ label: u.value,
768
768
  color: "error",
769
769
  size: "sm",
770
770
  variant: "translucent"
@@ -773,69 +773,75 @@ var Pn = /* @__PURE__ */ I({
773
773
  })]),
774
774
  _: 1
775
775
  }),
776
- B(i).isDeliveryDateVisible.value ? (R(), j(B(U), { key: 0 }, {
777
- default: V(() => [F(B(W), {
778
- icon: B(x),
779
- label: B(n).t("wise_invoicing.invoice.detail.header.delivery_date")
780
- }, null, 8, ["icon", "label"]), F(B(G), { text: d(t.invoice.deliveredOn) }, null, 8, ["text"])]),
776
+ V(i).isDeliveryDateVisible.value ? (z(), M(V(W), { key: 0 }, {
777
+ default: H(() => [I(V(G), {
778
+ icon: V(x),
779
+ label: V(n).t("wise_invoicing.invoice.detail.header.delivery_date")
780
+ }, null, 8, ["icon", "label"]), I(V(K), { text: f(t.invoice.deliveredOn) }, null, 8, ["text"])]),
781
781
  _: 1
782
- })) : M("", !0),
783
- F(Ze, {
784
- definitions: t.customFieldDefinitions,
785
- values: t.invoice.customFields
786
- }, null, 8, ["definitions", "values"])
782
+ })) : N("", !0),
783
+ (z(!0), P(A, null, bt(c.value, (e) => (z(), M(V(W), { key: e.definition.uuid }, {
784
+ default: H(() => [I(V(G), {
785
+ icon: V(Ze)[e.definition.type],
786
+ label: V(ae).getLabel(e.definition, V(n).locale.value)
787
+ }, null, 8, ["icon", "label"]), I(oe, {
788
+ definition: e.definition,
789
+ value: e.value
790
+ }, null, 8, ["definition", "value"])]),
791
+ _: 2
792
+ }, 1024))), 128))
787
793
  ]),
788
794
  _: 2
789
795
  }, [o.value ? {
790
796
  name: "actions",
791
- fn: V(() => [F(B(Xt), {
792
- icon: B(Ee),
793
- label: B(n).t("wise_invoicing.invoice.detail.header.edit_info"),
797
+ fn: H(() => [I(V(Xt), {
798
+ icon: V(ue),
799
+ label: V(n).t("wise_invoicing.invoice.detail.header.edit_info"),
794
800
  variant: "tertiary",
795
- onClick: u
801
+ onClick: d
796
802
  }, null, 8, ["icon", "label"])]),
797
803
  key: "0"
798
804
  } : void 0]), 1032, ["label"]),
799
- F(et, { "original-invoice": t.invoice.originalInvoice }, null, 8, ["original-invoice"]),
800
- F(B(Ht)),
801
- F(B(Vt), {
802
- label: B(n).t("wise_invoicing.invoice.detail.header.bill_to"),
805
+ I(et, { "original-invoice": t.invoice.originalInvoice }, null, 8, ["original-invoice"]),
806
+ I(V(Ht)),
807
+ I(V(Vt), {
808
+ label: V(n).t("wise_invoicing.invoice.detail.header.bill_to"),
803
809
  "collapse-options": {
804
810
  isCollapsible: !0,
805
811
  isOpenByDefault: !0,
806
812
  badge: { label: t.invoice.customer.name ?? "-" }
807
813
  }
808
814
  }, {
809
- default: V(() => [F(B(U), { orientation: "vertical" }, {
810
- default: V(() => [F(B(X), {
815
+ default: H(() => [I(V(W), { orientation: "vertical" }, {
816
+ default: H(() => [I(V(Z), {
811
817
  text: t.invoice.customer.name ?? "-",
812
818
  class: "text-xs font-medium text-primary"
813
- }, null, 8, ["text"]), t.invoice.customer.address ? (R(), N(k, { key: 0 }, [F(B(X), {
814
- text: B(ne).formatLines(t.invoice.customer.address)[0] ?? "",
819
+ }, null, 8, ["text"]), t.invoice.customer.address ? (z(), P(A, { key: 0 }, [I(V(Z), {
820
+ text: V(ne).formatLines(t.invoice.customer.address)[0] ?? "",
815
821
  class: "text-xs text-primary"
816
- }, null, 8, ["text"]), t.invoice.customer.address ? (R(), j(B(X), {
822
+ }, null, 8, ["text"]), t.invoice.customer.address ? (z(), M(V(Z), {
817
823
  key: 0,
818
- text: B(ne).formatLines(t.invoice.customer.address)[1] ?? "",
824
+ text: V(ne).formatLines(t.invoice.customer.address)[1] ?? "",
819
825
  class: "text-xs text-primary"
820
- }, null, 8, ["text"])) : M("", !0)], 64)) : M("", !0)]),
826
+ }, null, 8, ["text"])) : N("", !0)], 64)) : N("", !0)]),
821
827
  _: 1
822
828
  })]),
823
829
  _: 1
824
830
  }, 8, ["label", "collapse-options"]),
825
- F(B(Ht)),
826
- F(B(Vt), {
827
- label: B(n).t("wise_invoicing.invoice.detail.header.bill_from"),
831
+ I(V(Ht)),
832
+ I(V(Vt), {
833
+ label: V(n).t("wise_invoicing.invoice.detail.header.bill_from"),
828
834
  "collapse-options": {
829
835
  isCollapsible: !0,
830
836
  isOpenByDefault: !1,
831
837
  badge: { label: t.invoice.issuer.email ?? "-" }
832
838
  }
833
839
  }, {
834
- default: V(() => [F(B(U), { orientation: "vertical" }, {
835
- default: V(() => [F(B(W), { label: t.invoice.issuer.email ?? "-" }, null, 8, ["label"]), t.invoice.issuer.address ? (R(), j(B(G), {
840
+ default: H(() => [I(V(W), { orientation: "vertical" }, {
841
+ default: H(() => [I(V(G), { label: t.invoice.issuer.email ?? "-" }, null, 8, ["label"]), t.invoice.issuer.address ? (z(), M(V(K), {
836
842
  key: 0,
837
- text: B(ne).format(t.invoice.issuer.address)
838
- }, null, 8, ["text"])) : M("", !0)]),
843
+ text: V(ne).format(t.invoice.issuer.address)
844
+ }, null, 8, ["text"])) : N("", !0)]),
839
845
  _: 1
840
846
  })]),
841
847
  _: 1
@@ -844,20 +850,20 @@ var Pn = /* @__PURE__ */ I({
844
850
  _: 1
845
851
  }));
846
852
  }
847
- }), Ln = /* @__PURE__ */ I({
853
+ }), Rn = /* @__PURE__ */ L({
848
854
  __name: "InvoiceDetailSidebar",
849
855
  props: {
850
856
  customFieldDefinitions: {},
851
857
  invoice: {}
852
858
  },
853
859
  setup(e) {
854
- let t = e, n = O(), r = w(), i = A(() => n.t("wise_invoicing.invoice.detail.sidebar.updated_on", { date: r.toDateTime(t.invoice.updatedAt) }));
855
- return (e, n) => (R(), j(Ke, {
860
+ let t = e, n = k(), r = T(), i = j(() => n.t("wise_invoicing.invoice.detail.sidebar.updated_on", { date: r.toDateTime(t.invoice.updatedAt) }));
861
+ return (e, n) => (z(), M(Ke, {
856
862
  "billing-document": t.invoice,
857
863
  "updated-footer": i.value
858
864
  }, {
859
- activity: V(() => [F(Dn, { invoice: t.invoice }, null, 8, ["invoice"])]),
860
- info: V(() => [F(In, {
865
+ activity: H(() => [I(On, { invoice: t.invoice }, null, 8, ["invoice"])]),
866
+ info: H(() => [I(Ln, {
861
867
  "custom-field-definitions": t.customFieldDefinitions,
862
868
  invoice: t.invoice
863
869
  }, null, 8, ["custom-field-definitions", "invoice"])]),
@@ -867,7 +873,7 @@ var Pn = /* @__PURE__ */ I({
867
873
  });
868
874
  //#endregion
869
875
  //#region src/modules/invoice/api/queries/invoicePaymentIndex.query.ts
870
- function Rn(e) {
876
+ function zn(e) {
871
877
  return Dt("invoicePaymentIndex", {
872
878
  params: { invoiceUuid: e },
873
879
  queryFn: () => y.getPayments(e.value)
@@ -875,49 +881,49 @@ function Rn(e) {
875
881
  }
876
882
  //#endregion
877
883
  //#region src/modules/invoice/use-cases/detail/components/table/InvoiceDetailPaymentActionsCell.vue
878
- var zn = /* @__PURE__ */ I({
884
+ var Bn = /* @__PURE__ */ L({
879
885
  __name: "InvoiceDetailPaymentActionsCell",
880
886
  props: {
881
887
  payment: {},
882
888
  onDelete: { type: Function }
883
889
  },
884
890
  setup(e) {
885
- let t = e, n = O();
886
- return (e, i) => (R(), j(B(tn), null, {
887
- default: V(() => [F(B(nn), null, {
888
- default: V(() => [t.payment.source === B(r).MANUAL ? (R(), j(B(Xt), {
891
+ let t = e, n = k();
892
+ return (e, i) => (z(), M(V(tn), null, {
893
+ default: H(() => [I(V(nn), null, {
894
+ default: H(() => [t.payment.source === V(r).MANUAL ? (z(), M(V(Xt), {
889
895
  key: 0,
890
- label: B(n).t("wise_invoicing.invoice.detail.payments.delete.title"),
891
- icon: B(fe),
896
+ label: V(n).t("wise_invoicing.invoice.detail.payments.delete.title"),
897
+ icon: V(_e),
892
898
  size: "sm",
893
899
  variant: "tertiary",
894
900
  onClick: i[0] ||= (e) => t.onDelete(t.payment)
895
- }, null, 8, ["label", "icon"])) : M("", !0)]),
901
+ }, null, 8, ["label", "icon"])) : N("", !0)]),
896
902
  _: 1
897
903
  })]),
898
904
  _: 1
899
905
  }));
900
906
  }
901
- }), Bn = /* @__PURE__ */ I({
907
+ }), Vn = /* @__PURE__ */ L({
902
908
  __name: "InvoiceDetailPaymentManualCell",
903
909
  props: { payment: {} },
904
910
  setup(e) {
905
911
  let t = e;
906
- return (e, n) => (R(), j(B(tn), null, {
907
- default: V(() => [t.payment.source === B(r).MANUAL ? (R(), j(B(ye), {
912
+ return (e, n) => (z(), M(V(tn), null, {
913
+ default: H(() => [t.payment.source === V(r).MANUAL ? (z(), M(V(Se), {
908
914
  key: 0,
909
915
  class: "size-4 text-brand-600"
910
- })) : M("", !0)]),
916
+ })) : N("", !0)]),
911
917
  _: 1
912
918
  }));
913
919
  }
914
- }), Vn = /* @__PURE__ */ I({
920
+ }), Hn = /* @__PURE__ */ L({
915
921
  __name: "InvoiceDetailPaymentsTableTextCell",
916
922
  props: { text: {} },
917
923
  setup(e) {
918
924
  let t = e;
919
- return (e, n) => (R(), j(B(tn), null, {
920
- default: V(() => [F(B(X), {
925
+ return (e, n) => (z(), M(V(tn), null, {
926
+ default: H(() => [I(V(Z), {
921
927
  text: t.text ?? "-",
922
928
  class: "text-sm/5 text-primary"
923
929
  }, null, 8, ["text"])]),
@@ -927,9 +933,9 @@ var zn = /* @__PURE__ */ I({
927
933
  });
928
934
  //#endregion
929
935
  //#region src/modules/invoice/use-cases/detail/composables/invoiceDetailPaymentsTableColumns.composable.ts
930
- function Hn(e) {
931
- let t = O(), n = w(), r = p();
932
- return A(() => ln()([
936
+ function Un(e) {
937
+ let t = k(), n = T(), r = p();
938
+ return j(() => un()([
933
939
  {
934
940
  headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.date"),
935
941
  key: "date",
@@ -937,7 +943,7 @@ function Hn(e) {
937
943
  max: "12rem",
938
944
  min: "12rem"
939
945
  },
940
- component: (e) => Z(Vn, { text: n.formatPlainDate(e.date) })
946
+ component: (e) => cn(Hn, { text: n.formatPlainDate(e.date) })
941
947
  },
942
948
  {
943
949
  headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.reference"),
@@ -946,7 +952,7 @@ function Hn(e) {
946
952
  max: "14rem",
947
953
  min: "12rem"
948
954
  },
949
- component: (e) => Z(Vn, { text: e.paymentReference ?? "—" })
955
+ component: (e) => cn(Hn, { text: e.paymentReference ?? "—" })
950
956
  },
951
957
  {
952
958
  headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.remark"),
@@ -955,7 +961,7 @@ function Hn(e) {
955
961
  max: "1fr",
956
962
  min: "12rem"
957
963
  },
958
- component: (e) => Z(Vn, { text: e.remarks ?? "—" })
964
+ component: (e) => cn(Hn, { text: e.remarks ?? "—" })
959
965
  },
960
966
  {
961
967
  headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.manual"),
@@ -964,7 +970,7 @@ function Hn(e) {
964
970
  max: "6rem",
965
971
  min: "6rem"
966
972
  },
967
- component: (e) => Z(Bn, { payment: e })
973
+ component: (e) => cn(Vn, { payment: e })
968
974
  },
969
975
  {
970
976
  headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.amount"),
@@ -973,7 +979,7 @@ function Hn(e) {
973
979
  max: "10rem",
974
980
  min: "10rem"
975
981
  },
976
- component: (e) => Z(Vn, { text: r.formatMonetary(e.amount) })
982
+ component: (e) => cn(Hn, { text: r.formatMonetary(e.amount) })
977
983
  },
978
984
  {
979
985
  headerLabel: "",
@@ -982,7 +988,7 @@ function Hn(e) {
982
988
  max: "5rem",
983
989
  min: "5rem"
984
990
  },
985
- component: (t) => Z(zn, {
991
+ component: (t) => cn(Bn, {
986
992
  payment: t,
987
993
  onDelete: e.onDelete
988
994
  })
@@ -991,8 +997,8 @@ function Hn(e) {
991
997
  }
992
998
  //#endregion
993
999
  //#region src/modules/invoice/api/mutations/invoicePaymentCreate.mutation.ts
994
- function Un() {
995
- return H({
1000
+ function Wn() {
1001
+ return U({
996
1002
  queryFn: (e) => y.createPayment(e.params.invoiceUuid, e.body),
997
1003
  queryKeysToInvalidate: {
998
1004
  invoiceActivityLogIndex: { invoiceUuid: (e) => e.invoiceUuid },
@@ -1004,19 +1010,19 @@ function Un() {
1004
1010
  }
1005
1011
  //#endregion
1006
1012
  //#region src/modules/invoice/models/invoice/payment/invoicePaymentCreateForm.model.ts
1007
- var Wn = D.object({
1008
- amount: D.number().positive(),
1009
- currency: D.enum(s),
1013
+ var Gn = O.object({
1014
+ amount: O.number().positive(),
1015
+ currency: O.enum(s),
1010
1016
  date: ee,
1011
- paymentReference: D.string().nullable(),
1012
- precision: D.number().int().nonnegative(),
1013
- remarks: D.string().nullable()
1014
- }), Gn = { class: "pr-md text-xs text-secondary" }, Kn = /* @__PURE__ */ I({
1017
+ paymentReference: O.string().nullable(),
1018
+ precision: O.number().int().nonnegative(),
1019
+ remarks: O.string().nullable()
1020
+ }), Kn = { class: "pr-md text-xs text-secondary" }, qn = /* @__PURE__ */ L({
1015
1021
  __name: "InvoicePaymentCreateDialog",
1016
1022
  props: { invoice: {} },
1017
1023
  emits: ["close"],
1018
1024
  setup(e, { emit: t }) {
1019
- let n = e, r = t, i = O(), a = Q(), o = p(), s = Un(), c = A(() => o.getSymbol(n.invoice.grossAmount.currency)), l = A(() => m(1, n.invoice.grossAmount.precision)), u = $({
1025
+ let n = e, r = t, i = k(), a = Q(), o = p(), s = Wn(), c = j(() => o.getSymbol(n.invoice.grossAmount.currency)), l = j(() => m(1, n.invoice.grossAmount.precision)), u = $({
1020
1026
  initialState: {
1021
1027
  amount: null,
1022
1028
  currency: n.invoice.grossAmount.currency,
@@ -1025,7 +1031,7 @@ var Wn = D.object({
1025
1031
  precision: n.invoice.grossAmount.precision,
1026
1032
  remarks: null
1027
1033
  },
1028
- schema: Wn,
1034
+ schema: Gn,
1029
1035
  onSubmit: async (e) => {
1030
1036
  let t = await s.execute({
1031
1037
  body: e,
@@ -1041,47 +1047,47 @@ var Wn = D.object({
1041
1047
  a.unableToSave();
1042
1048
  }
1043
1049
  }), d = u.register("amount"), f = u.register("date"), h = u.register("paymentReference"), g = u.register("remarks");
1044
- return (e, t) => (R(), j(B(Y), {
1045
- form: B(u),
1050
+ return (e, t) => (z(), M(V(X), {
1051
+ form: V(u),
1046
1052
  size: "sm",
1047
1053
  onClose: t[0] ||= (e) => r("close")
1048
1054
  }, {
1049
- default: V(() => [
1050
- F(B(J), {
1051
- title: B(i).t("wise_invoicing.invoice.detail.payments.create.title"),
1052
- description: B(i).t("wise_invoicing.invoice.detail.payments.create.description"),
1053
- icon: B(ce)
1055
+ default: H(() => [
1056
+ I(V(Y), {
1057
+ title: V(i).t("wise_invoicing.invoice.detail.payments.create.title"),
1058
+ description: V(i).t("wise_invoicing.invoice.detail.payments.create.description"),
1059
+ icon: V(fe)
1054
1060
  }, null, 8, [
1055
1061
  "title",
1056
1062
  "description",
1057
1063
  "icon"
1058
1064
  ]),
1059
- F(B(Wt), null, {
1060
- default: V(() => [F(B(Jt), null, {
1061
- default: V(() => [F(B(qt), {
1065
+ I(V(Wt), null, {
1066
+ default: H(() => [I(V(Jt), null, {
1067
+ default: H(() => [I(V(qt), {
1062
1068
  lg: 2,
1063
1069
  sm: 1
1064
1070
  }, {
1065
- default: V(() => [
1066
- F(B(Zt), L(B(E)(B(d)), {
1071
+ default: H(() => [
1072
+ I(V(Zt), R(V(D)(V(d)), {
1067
1073
  "is-required": !0,
1068
- label: B(i).t("wise_invoicing.invoice.detail.payments.create.fields.amount"),
1074
+ label: V(i).t("wise_invoicing.invoice.detail.payments.create.fields.amount"),
1069
1075
  min: l.value,
1070
1076
  step: l.value
1071
1077
  }), {
1072
- right: V(() => [P("span", Gn, z(c.value.symbol), 1)]),
1078
+ right: H(() => [F("span", Kn, B(c.value.symbol), 1)]),
1073
1079
  _: 1
1074
1080
  }, 16, [
1075
1081
  "label",
1076
1082
  "min",
1077
1083
  "step"
1078
1084
  ]),
1079
- F(B(zt), L(B(E)(B(f)), {
1085
+ I(V(zt), R(V(D)(V(f)), {
1080
1086
  "is-required": !0,
1081
- label: B(i).t("wise_invoicing.invoice.detail.payments.create.fields.date")
1087
+ label: V(i).t("wise_invoicing.invoice.detail.payments.create.fields.date")
1082
1088
  }), null, 16, ["label"]),
1083
- F(B(rn), L(B(E)(B(h)), { label: B(i).t("wise_invoicing.invoice.detail.payments.create.fields.reference") }), null, 16, ["label"]),
1084
- F(B(rn), L(B(E)(B(g)), { label: B(i).t("wise_invoicing.invoice.detail.payments.create.fields.remarks") }), null, 16, ["label"])
1089
+ I(V(rn), R(V(D)(V(h)), { label: V(i).t("wise_invoicing.invoice.detail.payments.create.fields.reference") }), null, 16, ["label"]),
1090
+ I(V(rn), R(V(D)(V(g)), { label: V(i).t("wise_invoicing.invoice.detail.payments.create.fields.remarks") }), null, 16, ["label"])
1085
1091
  ]),
1086
1092
  _: 1
1087
1093
  })]),
@@ -1089,8 +1095,8 @@ var Wn = D.object({
1089
1095
  })]),
1090
1096
  _: 1
1091
1097
  }),
1092
- F(B(K), null, {
1093
- right: V(() => [F(B(q)), F(B(Yt), { label: B(i).t("wise_invoicing.invoice.detail.payments.create.submit") }, null, 8, ["label"])]),
1098
+ I(V(q), null, {
1099
+ right: H(() => [I(V(J)), I(V(Yt), { label: V(i).t("wise_invoicing.invoice.detail.payments.create.submit") }, null, 8, ["label"])]),
1094
1100
  _: 1
1095
1101
  })
1096
1102
  ]),
@@ -1100,8 +1106,8 @@ var Wn = D.object({
1100
1106
  });
1101
1107
  //#endregion
1102
1108
  //#region src/modules/invoice/api/mutations/invoicePaymentDelete.mutation.ts
1103
- function qn() {
1104
- return H({
1109
+ function Jn() {
1110
+ return U({
1105
1111
  queryFn: (e) => y.deletePayment(e.params.invoiceUuid, e.params.paymentUuid),
1106
1112
  queryKeysToInvalidate: {
1107
1113
  invoiceActivityLogIndex: { invoiceUuid: (e) => e.invoiceUuid },
@@ -1113,7 +1119,7 @@ function qn() {
1113
1119
  }
1114
1120
  //#endregion
1115
1121
  //#region src/modules/invoice/use-cases/detail/dialogs/InvoicePaymentDeleteDialog.vue
1116
- var Jn = /* @__PURE__ */ I({
1122
+ var Yn = /* @__PURE__ */ L({
1117
1123
  __name: "InvoicePaymentDeleteDialog",
1118
1124
  props: {
1119
1125
  invoiceUuid: {},
@@ -1121,7 +1127,7 @@ var Jn = /* @__PURE__ */ I({
1121
1127
  },
1122
1128
  emits: ["close"],
1123
1129
  setup(e, { emit: t }) {
1124
- let n = e, r = t, i = O(), a = Q(), o = p(), s = qn(), c = A(() => o.formatMonetary(n.payment.amount)), l = $({
1130
+ let n = e, r = t, i = k(), a = Q(), o = p(), s = Jn(), c = j(() => o.formatMonetary(n.payment.amount)), l = $({
1125
1131
  schema: mt.object({}),
1126
1132
  onSubmit: async () => {
1127
1133
  let e = await s.execute({ params: {
@@ -1135,37 +1141,37 @@ var Jn = /* @__PURE__ */ I({
1135
1141
  a.show({ message: i.t("wise_invoicing.invoice.detail.payments.delete.success", { amount: c.value }) }), r("close");
1136
1142
  }
1137
1143
  });
1138
- return (e, t) => (R(), j(B(Y), {
1139
- form: B(l),
1144
+ return (e, t) => (z(), M(V(X), {
1145
+ form: V(l),
1140
1146
  size: "xs",
1141
1147
  onClose: t[0] ||= (e) => r("close")
1142
1148
  }, {
1143
- default: V(() => [F(B(J), {
1144
- title: B(i).t("wise_invoicing.invoice.detail.payments.delete.title"),
1145
- description: B(i).t("wise_invoicing.invoice.detail.payments.delete.description", { amount: c.value })
1146
- }, null, 8, ["title", "description"]), F(B(K), null, {
1147
- right: V(() => [F(B(q)), F(B(Gt), {
1149
+ default: H(() => [I(V(Y), {
1150
+ title: V(i).t("wise_invoicing.invoice.detail.payments.delete.title"),
1151
+ description: V(i).t("wise_invoicing.invoice.detail.payments.delete.description", { amount: c.value })
1152
+ }, null, 8, ["title", "description"]), I(V(q), null, {
1153
+ right: H(() => [I(V(J)), I(V(Gt), {
1148
1154
  "is-destructive": !0,
1149
- label: B(i).t("wise_invoicing.invoice.detail.payments.delete.submit")
1155
+ label: V(i).t("wise_invoicing.invoice.detail.payments.delete.submit")
1150
1156
  }, null, 8, ["label"])]),
1151
1157
  _: 1
1152
1158
  })]),
1153
1159
  _: 1
1154
1160
  }, 8, ["form"]));
1155
1161
  }
1156
- }), Yn = /* @__PURE__ */ I({
1162
+ }), Xn = /* @__PURE__ */ L({
1157
1163
  __name: "InvoiceDetailPaymentsSection",
1158
1164
  props: { invoice: {} },
1159
1165
  setup(e) {
1160
- let t = e, n = O(), r = p(), i = A(() => t.invoice.uuid), a = A(() => t.invoice.balanceDueAmount === null ? null : r.formatMonetary(t.invoice.balanceDueAmount)), { isLoading: o, result: s } = Rn(i), c = un(), l = c.create(Kn), u = c.create(Jn), d = A(() => s.value.match({
1166
+ let t = e, n = k(), r = p(), i = j(() => t.invoice.uuid), a = j(() => t.invoice.balanceDueAmount === null ? null : r.formatMonetary(t.invoice.balanceDueAmount)), { isLoading: o, result: s } = zn(i), c = dn(), l = c.create(qn), u = c.create(Yn), d = j(() => s.value.match({
1161
1167
  err: () => [],
1162
1168
  loading: () => [],
1163
1169
  ok: (e) => e
1164
- })), f = A(() => s.value.match({
1170
+ })), f = j(() => s.value.match({
1165
1171
  err: (e) => e,
1166
1172
  loading: () => null,
1167
1173
  ok: () => null
1168
- })), m = A(() => !b.getMetadata(t.invoice.status).isTerminal);
1174
+ })), m = j(() => !b.getMetadata(t.invoice.status).isTerminal);
1169
1175
  function h() {
1170
1176
  l.open({ invoice: t.invoice });
1171
1177
  }
@@ -1175,49 +1181,49 @@ var Jn = /* @__PURE__ */ I({
1175
1181
  payment: e
1176
1182
  });
1177
1183
  }
1178
- let _ = Hn({ onDelete: g });
1179
- return (e, t) => (R(), j($e, null, {
1180
- default: V(() => [F(B(Qt), {
1184
+ let _ = Un({ onDelete: g });
1185
+ return (e, t) => (z(), M($e, null, {
1186
+ default: H(() => [I(V(Qt), {
1181
1187
  justify: "between",
1182
1188
  class: "w-full gap-lg border-b border-secondary px-lg py-md"
1183
1189
  }, {
1184
- default: V(() => [F(B(Qt), { gap: "sm" }, {
1185
- default: V(() => [F(B(X), {
1186
- text: B(n).t("wise_invoicing.invoice.detail.payments.title"),
1190
+ default: H(() => [I(V(Qt), { gap: "sm" }, {
1191
+ default: H(() => [I(V(Z), {
1192
+ text: V(n).t("wise_invoicing.invoice.detail.payments.title"),
1187
1193
  as: "h2",
1188
1194
  class: "text-sm font-semibold text-primary"
1189
- }, null, 8, ["text"]), a.value === null ? M("", !0) : (R(), j(B(Mt), {
1195
+ }, null, 8, ["text"]), a.value === null ? N("", !0) : (z(), M(V(Mt), {
1190
1196
  key: 0,
1191
1197
  color: "gray",
1192
1198
  size: "sm",
1193
1199
  variant: "outline"
1194
1200
  }, {
1195
- default: V(() => [
1196
- F(B(Nt), { label: B(n).t("wise_invoicing.invoice.detail.payments.balance_due") }, null, 8, ["label"]),
1197
- F(B(Pt)),
1198
- F(B(Nt), { label: a.value }, null, 8, ["label"])
1201
+ default: H(() => [
1202
+ I(V(Nt), { label: V(n).t("wise_invoicing.invoice.detail.payments.balance_due") }, null, 8, ["label"]),
1203
+ I(V(Pt)),
1204
+ I(V(Nt), { label: a.value }, null, 8, ["label"])
1199
1205
  ]),
1200
1206
  _: 1
1201
1207
  }))]),
1202
1208
  _: 1
1203
- }), m.value ? (R(), j(B(Ft), {
1209
+ }), m.value ? (z(), M(V(Ft), {
1204
1210
  key: 0,
1205
- label: B(n).t("wise_invoicing.invoice.detail.payments.add"),
1206
- "icon-left": B(ge),
1211
+ label: V(n).t("wise_invoicing.invoice.detail.payments.add"),
1212
+ "icon-left": V(S),
1207
1213
  size: "sm",
1208
1214
  onClick: h
1209
- }, null, 8, ["label", "icon-left"])) : M("", !0)]),
1215
+ }, null, 8, ["label", "icon-left"])) : N("", !0)]),
1210
1216
  _: 1
1211
- }), F(B(en), {
1217
+ }), I(V(en), {
1212
1218
  "active-filter-count": 0,
1213
- columns: B(_),
1219
+ columns: V(_),
1214
1220
  data: d.value,
1215
1221
  error: f.value,
1216
1222
  "get-key": (e) => e.uuid,
1217
1223
  "has-active-search": !1,
1218
1224
  "header-actions": [],
1219
1225
  "is-fetching-next-page": !1,
1220
- "is-loading": B(o)
1226
+ "is-loading": V(o)
1221
1227
  }, null, 8, [
1222
1228
  "columns",
1223
1229
  "data",
@@ -1231,40 +1237,40 @@ var Jn = /* @__PURE__ */ I({
1231
1237
  });
1232
1238
  //#endregion
1233
1239
  //#region src/modules/invoice/api/mutations/invoiceUpdateLines.mutation.ts
1234
- function Xn() {
1235
- return H({
1240
+ function Zn() {
1241
+ return U({
1236
1242
  queryFn: (e) => y.updateLines(e.params.invoiceUuid, e.body),
1237
1243
  queryKeysToInvalidate: { invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid } }
1238
1244
  });
1239
1245
  }
1240
1246
  //#endregion
1241
1247
  //#region src/modules/invoice/api/mutations/invoiceApplyDiscount.mutation.ts
1242
- function Zn() {
1243
- return H({
1248
+ function Qn() {
1249
+ return U({
1244
1250
  queryFn: (e) => y.applyDiscount(e.params.invoiceUuid, e.body),
1245
1251
  queryKeysToInvalidate: { invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid } }
1246
1252
  });
1247
1253
  }
1248
1254
  //#endregion
1249
1255
  //#region src/modules/invoice/models/invoice/update/invoiceApplyDiscountForm.model.ts
1250
- var Qn = D.object({
1251
- currency: D.enum(s),
1252
- precision: D.number().int().nonnegative(),
1253
- type: D.enum(c),
1254
- value: D.number()
1255
- }).refine((e) => e.type !== c.PERCENTAGE || e.value <= 100, { path: ["value"] }), $n = { class: "pr-md text-xs text-secondary" }, er = /* @__PURE__ */ I({
1256
+ var $n = O.object({
1257
+ currency: O.enum(s),
1258
+ precision: O.number().int().nonnegative(),
1259
+ type: O.enum(c),
1260
+ value: O.number()
1261
+ }).refine((e) => e.type !== c.PERCENTAGE || e.value <= 100, { path: ["value"] }), er = { class: "pr-md text-xs text-secondary" }, tr = /* @__PURE__ */ L({
1256
1262
  __name: "InvoiceApplyDiscountDialog",
1257
1263
  props: { invoice: {} },
1258
1264
  emits: ["close"],
1259
1265
  setup(e, { emit: t }) {
1260
- let n = e, r = t, i = O(), a = Q(), o = p(), s = Zn(), l = A(() => cn([c.PERCENTAGE, c.AMOUNT])), u = $({
1266
+ let n = e, r = t, i = k(), a = Q(), o = p(), s = Qn(), l = j(() => ln([c.PERCENTAGE, c.AMOUNT])), u = $({
1261
1267
  initialState: {
1262
1268
  currency: n.invoice.grossAmount.currency,
1263
1269
  precision: n.invoice.grossAmount.precision,
1264
1270
  type: c.PERCENTAGE,
1265
1271
  value: null
1266
1272
  },
1267
- schema: Qn,
1273
+ schema: $n,
1268
1274
  onSubmit: async (e) => {
1269
1275
  let t = await s.execute({
1270
1276
  body: e,
@@ -1279,58 +1285,58 @@ var Qn = D.object({
1279
1285
  onSubmitError: () => {
1280
1286
  a.unableToSave();
1281
1287
  }
1282
- }), d = u.register("value"), f = u.register("type"), m = A(() => f.modelValue.value === c.PERCENTAGE), h = A(() => f.modelValue.value === c.AMOUNT), g = A(() => o.getSymbol(n.invoice.grossAmount.currency));
1288
+ }), d = u.register("value"), f = u.register("type"), m = j(() => f.modelValue.value === c.PERCENTAGE), h = j(() => f.modelValue.value === c.AMOUNT), g = j(() => o.getSymbol(n.invoice.grossAmount.currency));
1283
1289
  function _(e) {
1284
1290
  return i.t(`wise_invoicing.invoice.detail.global_discount.type.${e}`);
1285
1291
  }
1286
- return (e, t) => (R(), j(B(Y), {
1287
- form: B(u),
1292
+ return (e, t) => (z(), M(V(X), {
1293
+ form: V(u),
1288
1294
  size: "sm",
1289
1295
  onClose: t[0] ||= (e) => r("close")
1290
1296
  }, {
1291
- default: V(() => [
1292
- F(B(J), {
1293
- title: B(i).t("wise_invoicing.invoice.detail.line_items.global_discount"),
1294
- description: B(i).t("wise_invoicing.invoice.detail.global_discount.description"),
1295
- icon: B(Ce)
1297
+ default: H(() => [
1298
+ I(V(Y), {
1299
+ title: V(i).t("wise_invoicing.invoice.detail.line_items.global_discount"),
1300
+ description: V(i).t("wise_invoicing.invoice.detail.global_discount.description"),
1301
+ icon: V(Te)
1296
1302
  }, null, 8, [
1297
1303
  "title",
1298
1304
  "description",
1299
1305
  "icon"
1300
1306
  ]),
1301
- F(B(Wt), null, {
1302
- default: V(() => [F(B(Jt), null, {
1303
- default: V(() => [F(B(qt), {
1307
+ I(V(Wt), null, {
1308
+ default: H(() => [I(V(Jt), null, {
1309
+ default: H(() => [I(V(qt), {
1304
1310
  lg: 2,
1305
1311
  sm: 1
1306
1312
  }, {
1307
- default: V(() => [
1308
- F(B($t), L(B(E)(B(f)), {
1313
+ default: H(() => [
1314
+ I(V($t), R(V(D)(V(f)), {
1309
1315
  "display-fn": _,
1310
1316
  "is-required": !0,
1311
1317
  items: l.value,
1312
- label: B(i).t("wise_invoicing.invoice.detail.global_discount.type.label")
1318
+ label: V(i).t("wise_invoicing.invoice.detail.global_discount.type.label")
1313
1319
  }), null, 16, ["items", "label"]),
1314
- m.value ? (R(), j(B(Zt), L({ key: 0 }, B(E)(B(d)), {
1315
- hint: B(i).t("wise_invoicing.invoice.detail.global_discount.amount.hint"),
1320
+ m.value ? (z(), M(V(Zt), R({ key: 0 }, V(D)(V(d)), {
1321
+ hint: V(i).t("wise_invoicing.invoice.detail.global_discount.amount.hint"),
1316
1322
  "is-required": !0,
1317
- label: B(i).t("wise_invoicing.invoice.detail.global_discount.amount.label"),
1323
+ label: V(i).t("wise_invoicing.invoice.detail.global_discount.amount.label"),
1318
1324
  max: 100,
1319
1325
  min: 0,
1320
1326
  step: .01
1321
1327
  }), {
1322
- right: V(() => [...t[1] ||= [P("span", { class: "pr-md text-xs text-secondary" }, " % ", -1)]]),
1328
+ right: H(() => [...t[1] ||= [F("span", { class: "pr-md text-xs text-secondary" }, " % ", -1)]]),
1323
1329
  _: 1
1324
- }, 16, ["hint", "label"])) : M("", !0),
1325
- h.value ? (R(), j(B(Zt), L({ key: 1 }, B(E)(B(d)), {
1330
+ }, 16, ["hint", "label"])) : N("", !0),
1331
+ h.value ? (z(), M(V(Zt), R({ key: 1 }, V(D)(V(d)), {
1326
1332
  "is-required": !0,
1327
- label: B(i).t("wise_invoicing.invoice.detail.global_discount.amount.label"),
1333
+ label: V(i).t("wise_invoicing.invoice.detail.global_discount.amount.label"),
1328
1334
  min: .01,
1329
1335
  step: .01
1330
1336
  }), {
1331
- right: V(() => [P("span", $n, z(g.value.symbol), 1)]),
1337
+ right: H(() => [F("span", er, B(g.value.symbol), 1)]),
1332
1338
  _: 1
1333
- }, 16, ["label"])) : M("", !0)
1339
+ }, 16, ["label"])) : N("", !0)
1334
1340
  ]),
1335
1341
  _: 1
1336
1342
  })]),
@@ -1338,23 +1344,23 @@ var Qn = D.object({
1338
1344
  })]),
1339
1345
  _: 1
1340
1346
  }),
1341
- F(B(K), null, {
1342
- right: V(() => [F(B(q)), F(B(Gt), { label: B(i).t("wise_invoicing.invoice.detail.global_discount.confirm") }, null, 8, ["label"])]),
1347
+ I(V(q), null, {
1348
+ right: H(() => [I(V(J)), I(V(Gt), { label: V(i).t("wise_invoicing.invoice.detail.global_discount.confirm") }, null, 8, ["label"])]),
1343
1349
  _: 1
1344
1350
  })
1345
1351
  ]),
1346
1352
  _: 1
1347
1353
  }, 8, ["form"]));
1348
1354
  }
1349
- }), tr = /* @__PURE__ */ I({
1355
+ }), nr = /* @__PURE__ */ L({
1350
1356
  __name: "InvoiceLineItemsTableSection",
1351
1357
  props: {
1352
1358
  customFieldDefinitions: {},
1353
1359
  invoice: {}
1354
1360
  },
1355
1361
  setup(e) {
1356
- let t = e, n = A(() => t.invoice), r = h(), i = Xn(), a = A(() => b.isEditable(t.invoice.status)), o = Ye({
1357
- isSaving: A(() => i.isLoading.value),
1362
+ let t = e, n = j(() => t.invoice), r = h(), i = Zn(), a = j(() => b.isEditable(t.invoice.status)), o = Ye({
1363
+ isSaving: j(() => i.isLoading.value),
1358
1364
  billingDocument: () => n.value,
1359
1365
  canEdit: a,
1360
1366
  customFieldDefinitions: () => t.customFieldDefinitions,
@@ -1362,19 +1368,19 @@ var Qn = D.object({
1362
1368
  body: e,
1363
1369
  params: { invoiceUuid: t.invoice.uuid }
1364
1370
  })
1365
- }), s = un().create(er);
1371
+ }), s = dn().create(tr);
1366
1372
  function c() {
1367
1373
  s.open({ invoice: t.invoice });
1368
1374
  }
1369
- return Ge(o), (e, n) => (R(), j($e, null, {
1370
- default: V(() => [
1371
- F(nt, {
1372
- "show-apply-discount": B(r).isGlobalDiscountEnabled.value,
1375
+ return Ge(o), (e, n) => (z(), M($e, null, {
1376
+ default: H(() => [
1377
+ I(nt, {
1378
+ "show-apply-discount": V(r).isGlobalDiscountEnabled.value,
1373
1379
  onApplyDiscount: c
1374
1380
  }, null, 8, ["show-apply-discount"]),
1375
- F(We),
1376
- F(He, { "billing-document": t.invoice }, null, 8, ["billing-document"]),
1377
- F(it)
1381
+ I(We),
1382
+ I(He, { "billing-document": t.invoice }, null, 8, ["billing-document"]),
1383
+ I(it)
1378
1384
  ]),
1379
1385
  _: 1
1380
1386
  }));
@@ -1382,8 +1388,8 @@ var Qn = D.object({
1382
1388
  });
1383
1389
  //#endregion
1384
1390
  //#region src/modules/invoice/api/mutations/invoiceCreateCreditNote.mutation.ts
1385
- function nr() {
1386
- return H({
1391
+ function rr() {
1392
+ return U({
1387
1393
  queryFn: (e) => y.createCreditNote(e.params.invoiceUuid),
1388
1394
  queryKeysToInvalidate: {
1389
1395
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
@@ -1393,16 +1399,16 @@ function nr() {
1393
1399
  }
1394
1400
  //#endregion
1395
1401
  //#region src/modules/invoice/api/mutations/invoiceDuplicate.mutation.ts
1396
- function rr() {
1397
- return H({
1402
+ function ir() {
1403
+ return U({
1398
1404
  queryFn: (e) => y.duplicate(e.params.invoiceUuid),
1399
1405
  queryKeysToInvalidate: { invoiceIndex: {} }
1400
1406
  });
1401
1407
  }
1402
1408
  //#endregion
1403
1409
  //#region src/modules/invoice/api/mutations/invoiceFinalize.mutation.ts
1404
- function ir() {
1405
- return H({
1410
+ function ar() {
1411
+ return U({
1406
1412
  queryFn: (e) => y.finalize(e.params.invoiceUuid),
1407
1413
  queryKeysToInvalidate: {
1408
1414
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
@@ -1412,8 +1418,8 @@ function ir() {
1412
1418
  }
1413
1419
  //#endregion
1414
1420
  //#region src/modules/invoice/api/mutations/invoiceMarkAsDraft.mutation.ts
1415
- function ar() {
1416
- return H({
1421
+ function or() {
1422
+ return U({
1417
1423
  queryFn: (e) => y.markAsDraft(e.params.invoiceUuid),
1418
1424
  queryKeysToInvalidate: {
1419
1425
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
@@ -1423,8 +1429,8 @@ function ar() {
1423
1429
  }
1424
1430
  //#endregion
1425
1431
  //#region src/modules/invoice/api/mutations/invoiceMarkAsPaid.mutation.ts
1426
- function or() {
1427
- return H({
1432
+ function sr() {
1433
+ return U({
1428
1434
  queryFn: (e) => y.markAsPaid(e.params.invoiceUuid),
1429
1435
  queryKeysToInvalidate: {
1430
1436
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
@@ -1434,8 +1440,8 @@ function or() {
1434
1440
  }
1435
1441
  //#endregion
1436
1442
  //#region src/modules/invoice/api/mutations/invoiceMarkAsPriorApprovalRequired.mutation.ts
1437
- function sr() {
1438
- return H({
1443
+ function cr() {
1444
+ return U({
1439
1445
  queryFn: (e) => y.markAsPriorApprovalRequired(e.params.invoiceUuid),
1440
1446
  queryKeysToInvalidate: {
1441
1447
  invoiceActivityLogIndex: { invoiceUuid: (e) => e.invoiceUuid },
@@ -1447,8 +1453,8 @@ function sr() {
1447
1453
  }
1448
1454
  //#endregion
1449
1455
  //#region src/modules/invoice/api/mutations/invoiceMarkAsProtested.mutation.ts
1450
- function cr() {
1451
- return H({
1456
+ function lr() {
1457
+ return U({
1452
1458
  queryFn: (e) => y.markAsProtested(e.params.invoiceUuid),
1453
1459
  queryKeysToInvalidate: {
1454
1460
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
@@ -1458,8 +1464,8 @@ function cr() {
1458
1464
  }
1459
1465
  //#endregion
1460
1466
  //#region src/modules/invoice/api/mutations/invoiceMarkAsReady.mutation.ts
1461
- function lr() {
1462
- return H({
1467
+ function ur() {
1468
+ return U({
1463
1469
  queryFn: (e) => y.markAsReady(e.params.invoiceUuid),
1464
1470
  queryKeysToInvalidate: {
1465
1471
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
@@ -1469,8 +1475,8 @@ function lr() {
1469
1475
  }
1470
1476
  //#endregion
1471
1477
  //#region src/modules/invoice/api/mutations/invoiceSend.mutation.ts
1472
- function ur() {
1473
- return H({
1478
+ function dr() {
1479
+ return U({
1474
1480
  queryFn: (e) => y.send(e.params.invoiceUuid),
1475
1481
  queryKeysToInvalidate: {
1476
1482
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
@@ -1480,8 +1486,8 @@ function ur() {
1480
1486
  }
1481
1487
  //#endregion
1482
1488
  //#region src/modules/invoice/api/mutations/invoiceUnmarkAsPriorApprovalRequired.mutation.ts
1483
- function dr() {
1484
- return H({
1489
+ function fr() {
1490
+ return U({
1485
1491
  queryFn: (e) => y.unmarkAsPriorApprovalRequired(e.params.invoiceUuid),
1486
1492
  queryKeysToInvalidate: {
1487
1493
  invoiceActivityLogIndex: { invoiceUuid: (e) => e.invoiceUuid },
@@ -1493,8 +1499,8 @@ function dr() {
1493
1499
  }
1494
1500
  //#endregion
1495
1501
  //#region src/modules/invoice/api/mutations/invoiceWithdrawProtest.mutation.ts
1496
- function fr() {
1497
- return H({
1502
+ function pr() {
1503
+ return U({
1498
1504
  queryFn: (e) => y.withdrawProtest(e.params.invoiceUuid),
1499
1505
  queryKeysToInvalidate: {
1500
1506
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
@@ -1504,8 +1510,8 @@ function fr() {
1504
1510
  }
1505
1511
  //#endregion
1506
1512
  //#region src/modules/invoice/api/mutations/invoiceRestoreFromProForma.mutation.ts
1507
- function pr() {
1508
- return H({
1513
+ function mr() {
1514
+ return U({
1509
1515
  queryFn: (e) => y.restoreFromProForma(e.params.invoiceUuid),
1510
1516
  queryKeysToInvalidate: {
1511
1517
  invoiceActivityLogIndex: { invoiceUuid: (e) => e.invoiceUuid },
@@ -1517,7 +1523,7 @@ function pr() {
1517
1523
  }
1518
1524
  //#endregion
1519
1525
  //#region src/modules/invoice/use-cases/detail/dialogs/InvoiceApprovalRevertDialog.vue
1520
- var mr = /* @__PURE__ */ I({
1526
+ var hr = /* @__PURE__ */ L({
1521
1527
  __name: "InvoiceApprovalRevertDialog",
1522
1528
  props: {
1523
1529
  invoiceUuid: {},
@@ -1525,9 +1531,9 @@ var mr = /* @__PURE__ */ I({
1525
1531
  },
1526
1532
  emits: ["close", "reverted"],
1527
1533
  setup(e, { emit: t }) {
1528
- let n = e, r = t, i = O(), a = Q(), o = w(), s = pr(), c = A(() => n.sentAt === null ? "" : o.toDate(n.sentAt)), l = $({
1534
+ let n = e, r = t, i = k(), a = Q(), o = T(), s = mr(), c = j(() => n.sentAt === null ? "" : o.toDate(n.sentAt)), l = $({
1529
1535
  initialState: {},
1530
- schema: D.object({}),
1536
+ schema: O.object({}),
1531
1537
  onSubmit: async () => {
1532
1538
  let e = await s.execute({ params: { invoiceUuid: n.invoiceUuid } });
1533
1539
  if (e.isErr()) {
@@ -1540,22 +1546,22 @@ var mr = /* @__PURE__ */ I({
1540
1546
  a.unableToSave();
1541
1547
  }
1542
1548
  });
1543
- return (e, t) => (R(), j(B(Y), {
1544
- form: B(l),
1549
+ return (e, t) => (z(), M(V(X), {
1550
+ form: V(l),
1545
1551
  size: "sm",
1546
1552
  onClose: t[0] ||= (e) => r("close")
1547
1553
  }, {
1548
- default: V(() => [F(B(J), {
1549
- title: B(i).t("wise_invoicing.invoice.approval_revert.title"),
1550
- description: B(i).t("wise_invoicing.invoice.approval_revert.description", { date: c.value }),
1551
- icon: B(de),
1554
+ default: H(() => [I(V(Y), {
1555
+ title: V(i).t("wise_invoicing.invoice.approval_revert.title"),
1556
+ description: V(i).t("wise_invoicing.invoice.approval_revert.description", { date: c.value }),
1557
+ icon: V(ge),
1552
1558
  "icon-variant": "warning"
1553
1559
  }, null, 8, [
1554
1560
  "title",
1555
1561
  "description",
1556
1562
  "icon"
1557
- ]), F(B(K), null, {
1558
- default: V(() => [F(B(q)), F(B(Gt), { label: B(i).t("wise_invoicing.invoice.approval_revert.submit") }, null, 8, ["label"])]),
1563
+ ]), I(V(q), null, {
1564
+ default: H(() => [I(V(J)), I(V(Gt), { label: V(i).t("wise_invoicing.invoice.approval_revert.submit") }, null, 8, ["label"])]),
1559
1565
  _: 1
1560
1566
  })]),
1561
1567
  _: 1
@@ -1564,20 +1570,20 @@ var mr = /* @__PURE__ */ I({
1564
1570
  });
1565
1571
  //#endregion
1566
1572
  //#region src/modules/invoice/api/mutations/invoiceDelete.mutation.ts
1567
- function hr() {
1568
- return H({
1573
+ function gr() {
1574
+ return U({
1569
1575
  queryFn: (e) => y.delete(e.params.invoiceUuid),
1570
1576
  queryKeysToInvalidate: { invoiceIndex: {} }
1571
1577
  });
1572
1578
  }
1573
1579
  //#endregion
1574
1580
  //#region src/modules/invoice/use-cases/detail/dialogs/InvoiceDeleteDialog.vue
1575
- var gr = /* @__PURE__ */ I({
1581
+ var _r = /* @__PURE__ */ L({
1576
1582
  __name: "InvoiceDeleteDialog",
1577
1583
  props: { invoice: {} },
1578
1584
  emits: ["close", "deleted"],
1579
1585
  setup(e, { emit: t }) {
1580
- let n = e, r = t, i = O(), a = kt(), o = Q(), s = hr(), c = $({
1586
+ let n = e, r = t, i = k(), a = kt(), o = Q(), s = gr(), c = $({
1581
1587
  schema: mt.object({}),
1582
1588
  onSubmit: async () => {
1583
1589
  let e = await s.execute({ params: { invoiceUuid: n.invoice.uuid } });
@@ -1588,25 +1594,25 @@ var gr = /* @__PURE__ */ I({
1588
1594
  o.show({ message: i.t("wise_invoicing.invoice.delete.success_toast") }), r("deleted"), r("close"), await a.push({ name: "invoicing-invoice-overview" });
1589
1595
  }
1590
1596
  });
1591
- return (e, t) => (R(), j(B(Y), {
1592
- form: B(c),
1597
+ return (e, t) => (z(), M(V(X), {
1598
+ form: V(c),
1593
1599
  size: "xs",
1594
1600
  onClose: t[0] ||= (e) => r("close")
1595
1601
  }, {
1596
- default: V(() => [F(B(J), {
1597
- title: B(i).t("wise_invoicing.invoice.delete.title"),
1598
- description: B(i).t("wise_invoicing.invoice.delete.description")
1599
- }, null, 8, ["title", "description"]), F(B(K), null, {
1600
- right: V(() => [F(B(q), { label: "cancel" }), F(B(Gt), {
1602
+ default: H(() => [I(V(Y), {
1603
+ title: V(i).t("wise_invoicing.invoice.delete.title"),
1604
+ description: V(i).t("wise_invoicing.invoice.delete.description")
1605
+ }, null, 8, ["title", "description"]), I(V(q), null, {
1606
+ right: H(() => [I(V(J), { label: "cancel" }), I(V(Gt), {
1601
1607
  "is-destructive": !0,
1602
- label: B(i).t("wise_invoicing.invoice.delete.submit_button")
1608
+ label: V(i).t("wise_invoicing.invoice.delete.submit_button")
1603
1609
  }, null, 8, ["label"])]),
1604
1610
  _: 1
1605
1611
  })]),
1606
1612
  _: 1
1607
1613
  }, 8, ["form"]));
1608
1614
  }
1609
- }), _r = { class: "flex flex-col gap-lg px-2xl" }, vr = /* @__PURE__ */ I({
1615
+ }), vr = { class: "flex flex-col gap-lg px-2xl" }, yr = /* @__PURE__ */ L({
1610
1616
  __name: "InvoiceFinalizeOutOfSyncDialog",
1611
1617
  props: {
1612
1618
  sentAt: {},
@@ -1620,7 +1626,7 @@ var gr = /* @__PURE__ */ I({
1620
1626
  "viewProForma"
1621
1627
  ],
1622
1628
  setup(e, { emit: t }) {
1623
- let n = e, r = t, i = O(), a = w(), o = yt(!1), s = A(() => n.sentAt === null ? "" : a.toDate(n.sentAt));
1629
+ let n = e, r = t, i = k(), a = T(), o = yt(!1), s = j(() => n.sentAt === null ? "" : a.toDate(n.sentAt));
1624
1630
  function c() {
1625
1631
  r("finalizeAnyway"), r("close");
1626
1632
  }
@@ -1630,52 +1636,52 @@ var gr = /* @__PURE__ */ I({
1630
1636
  function u() {
1631
1637
  r("sendNewRequest"), r("close");
1632
1638
  }
1633
- return (e, t) => (R(), j(B(Ut), {
1639
+ return (e, t) => (z(), M(V(Ut), {
1634
1640
  size: "sm",
1635
1641
  onClose: t[2] ||= (e) => r("close")
1636
1642
  }, {
1637
- default: V(() => [
1638
- F(B(J), {
1639
- title: B(i).t("wise_invoicing.invoice.finalize_out_of_sync.title"),
1640
- description: B(i).t("wise_invoicing.invoice.finalize_out_of_sync.description", { date: s.value }),
1641
- icon: B(be),
1643
+ default: H(() => [
1644
+ I(V(Y), {
1645
+ title: V(i).t("wise_invoicing.invoice.finalize_out_of_sync.title"),
1646
+ description: V(i).t("wise_invoicing.invoice.finalize_out_of_sync.description", { date: s.value }),
1647
+ icon: V(C),
1642
1648
  "icon-variant": "warning"
1643
1649
  }, null, 8, [
1644
1650
  "title",
1645
1651
  "description",
1646
1652
  "icon"
1647
1653
  ]),
1648
- P("div", _r, [n.proFormaFile === null ? M("", !0) : (R(), j(B(Lt), {
1654
+ F("div", vr, [n.proFormaFile === null ? N("", !0) : (z(), M(V(Lt), {
1649
1655
  key: 0,
1650
1656
  class: "self-start"
1651
1657
  }, {
1652
- default: V(() => [P("button", {
1658
+ default: H(() => [F("button", {
1653
1659
  class: "text-sm font-semibold text-brand-secondary underline-offset-2 hover:underline",
1654
1660
  type: "button",
1655
1661
  onClick: t[0] ||= (e) => r("viewProForma")
1656
- }, z(B(i).t("wise_invoicing.invoice.approval_banner.view_pro_forma")), 1)]),
1662
+ }, B(V(i).t("wise_invoicing.invoice.approval_banner.view_pro_forma")), 1)]),
1657
1663
  _: 1
1658
- })), F(B(It), {
1664
+ })), I(V(It), {
1659
1665
  modelValue: o.value,
1660
1666
  "onUpdate:modelValue": t[1] ||= (e) => o.value = e,
1661
- label: B(i).t("wise_invoicing.invoice.finalize_out_of_sync.acknowledge")
1667
+ label: V(i).t("wise_invoicing.invoice.finalize_out_of_sync.acknowledge")
1662
1668
  }, null, 8, ["modelValue", "label"])]),
1663
- F(B(K), null, {
1664
- left: V(() => [F(B(Ft), {
1665
- "icon-right": B(x),
1666
- label: B(i).t("wise_invoicing.invoice.finalize_out_of_sync.send_new_request"),
1669
+ I(V(q), null, {
1670
+ left: H(() => [I(V(Ft), {
1671
+ "icon-right": V(x),
1672
+ label: V(i).t("wise_invoicing.invoice.finalize_out_of_sync.send_new_request"),
1667
1673
  variant: "tertiary",
1668
1674
  onClick: u
1669
1675
  }, null, 8, ["icon-right", "label"])]),
1670
- right: V(() => [F(B(Ft), {
1671
- label: B(i).t("wise_invoicing.invoice.finalize_out_of_sync.revert_changes"),
1676
+ right: H(() => [I(V(Ft), {
1677
+ label: V(i).t("wise_invoicing.invoice.finalize_out_of_sync.revert_changes"),
1672
1678
  variant: "secondary",
1673
1679
  onClick: l
1674
- }, null, 8, ["label"]), F(B(Ft), {
1675
- "disabled-reason": o.value ? null : B(i).t("wise_invoicing.invoice.finalize_out_of_sync.acknowledge_required"),
1680
+ }, null, 8, ["label"]), I(V(Ft), {
1681
+ "disabled-reason": o.value ? null : V(i).t("wise_invoicing.invoice.finalize_out_of_sync.acknowledge_required"),
1676
1682
  "is-destructive": !0,
1677
1683
  "is-disabled": !o.value,
1678
- label: B(i).t("wise_invoicing.invoice.finalize_out_of_sync.finalize_anyway"),
1684
+ label: V(i).t("wise_invoicing.invoice.finalize_out_of_sync.finalize_anyway"),
1679
1685
  variant: "primary",
1680
1686
  onClick: c
1681
1687
  }, null, 8, [
@@ -1689,36 +1695,36 @@ var gr = /* @__PURE__ */ I({
1689
1695
  _: 1
1690
1696
  }));
1691
1697
  }
1692
- }), yr = "customer_has_no_approval_email", br = /* @__PURE__ */ new Set([
1698
+ }), br = "customer_has_no_approval_email", xr = /* @__PURE__ */ new Set([
1693
1699
  a.AWAITING_APPROVAL,
1694
1700
  a.EXPIRED,
1695
1701
  a.REMINDER_1,
1696
1702
  a.REMINDER_2
1697
1703
  ]);
1698
- async function xr(e) {
1704
+ async function Sr(e) {
1699
1705
  if (e === null) return;
1700
1706
  let t = await ct.getDownloadUrl(e.uuid);
1701
1707
  t !== null && window.open(t, "_blank", "noopener");
1702
1708
  }
1703
- function Sr(e) {
1704
- let t = O(), n = Q(), r = kt(), s = h(), c = un(), l = c.create(gr), u = c.create(ft), p = c.create(dt), m = c.create(mr), g = c.create(lt), _ = c.create(vr), ee = c.create(Ue), v = ur(), te = nr(), ne = rr(), re = ir(), ie = ar(), ae = or(), oe = sr(), ce = cr(), le = lr(), he = ut(), ge = dr(), _e = fr(), { shouldSkipConfirmation: be } = ot(), S = yt(null), C = A(() => b.getMetadata(e.value.status)), Ce = A(() => S.value ?? e.value.isDisputed), Te = A(() => e.value.status !== o.DRAFT && e.value.status !== o.READY), Ee = A(() => e.value.lifecycleStatus === f.FINALIZED);
1709
+ function Cr(e) {
1710
+ let t = k(), n = Q(), r = kt(), s = h(), c = dn(), l = c.create(_r), u = c.create(ft), p = c.create(dt), m = c.create(hr), g = c.create(lt), _ = c.create(yr), ee = c.create(Ue), v = dr(), te = rr(), ne = ir(), re = ar(), ie = or(), ae = sr(), oe = cr(), se = lr(), le = ur(), ue = ut(), fe = fr(), xe = pr(), { shouldSkipConfirmation: Ce } = ot(), S = yt(null), C = j(() => b.getMetadata(e.value.status)), we = j(() => S.value ?? e.value.isDisputed), Te = j(() => e.value.status !== o.DRAFT && e.value.status !== o.READY), Ee = j(() => e.value.lifecycleStatus === f.FINALIZED);
1705
1711
  function w(e) {
1706
1712
  return C.value.actions.includes(e);
1707
1713
  }
1708
- let T = A(() => ke.getDisplayStatus({
1714
+ let T = j(() => ke.getDisplayStatus({
1709
1715
  approval: e.value.approval,
1710
1716
  requiresPriorApproval: e.value.requiresPriorApproval
1711
- })), E = A(() => {
1717
+ })), E = j(() => {
1712
1718
  let e = T.value;
1713
1719
  return e === null || e === a.APPROVED ? null : e;
1714
- }), Ae = A(() => E.value === null ? null : t.t("wise_invoicing.invoice.finalize.blocked_by_approval", { status: t.t(ke.getMetadata(E.value).translationKey) })), je = A(() => C.value.isEditable && !e.value.requiresPriorApproval), Me = A(() => C.value.isEditable && e.value.requiresPriorApproval && !e.value.hasApprovalHistory), Ne = A(() => C.value.isEditable && e.value.requiresPriorApproval && (T.value !== a.APPROVED || e.value.hasChangesSinceApprovalSent)), Pe = A(() => Ne.value && w("finalize") && !e.value.hasApprovalHistory), Ie = A(() => C.value.isEditable && e.value.approval !== null && ke.canMarkAsApproved(e.value.approval.status)), Le = A(() => C.value.isEditable && e.value.approvalUuid !== null && br.has(T.value)), Re = A(() => T.value === a.APPROVED && e.value.hasChangesSinceApprovalSent), ze = A(() => C.value.isEditable && e.value.approval?.status === i.REQUESTED);
1715
- async function Be() {
1720
+ }), D = j(() => E.value === null ? null : t.t("wise_invoicing.invoice.finalize.blocked_by_approval", { status: t.t(ke.getMetadata(E.value).translationKey) })), Ae = j(() => C.value.isEditable && !e.value.requiresPriorApproval), je = j(() => C.value.isEditable && e.value.requiresPriorApproval && !e.value.hasApprovalHistory), Me = j(() => C.value.isEditable && e.value.requiresPriorApproval && (T.value !== a.APPROVED || e.value.hasChangesSinceApprovalSent)), Ne = j(() => Me.value && w("finalize") && !e.value.hasApprovalHistory), Pe = j(() => C.value.isEditable && e.value.approval !== null && ke.canMarkAsApproved(e.value.approval.status)), Ie = j(() => C.value.isEditable && e.value.approvalUuid !== null && xr.has(T.value)), Le = j(() => T.value === a.APPROVED && e.value.hasChangesSinceApprovalSent), Re = j(() => C.value.isEditable && e.value.approval?.status === i.REQUESTED);
1721
+ async function ze() {
1716
1722
  e.value.approvalUuid !== null && await g.open({
1717
1723
  approvalUuid: e.value.approvalUuid,
1718
1724
  invoiceUuid: e.value.uuid
1719
1725
  });
1720
1726
  }
1721
- async function Ve(t) {
1727
+ async function Be(t) {
1722
1728
  await m.open({
1723
1729
  invoiceUuid: e.value.uuid,
1724
1730
  sentAt: e.value.approval?.sentAt ?? null,
@@ -1727,29 +1733,29 @@ function Sr(e) {
1727
1733
  }
1728
1734
  });
1729
1735
  }
1730
- async function He() {
1731
- await xr(e.value.approvalProFormaFile);
1736
+ async function Ve() {
1737
+ await Sr(e.value.approvalProFormaFile);
1732
1738
  }
1733
- async function We() {
1739
+ async function He() {
1734
1740
  e.value.approvalUuid !== null && await u.open({
1735
1741
  approvalUuid: e.value.approvalUuid,
1736
1742
  invoiceUuid: e.value.uuid
1737
1743
  });
1738
1744
  }
1739
- async function Ge() {
1745
+ async function We() {
1740
1746
  e.value.approvalUuid !== null && await p.open({
1741
1747
  approvalUuid: e.value.approvalUuid,
1742
1748
  invoiceUuid: e.value.uuid
1743
1749
  });
1744
1750
  }
1745
- async function Ke() {
1746
- let r = await he.execute({ params: {
1751
+ async function Ge() {
1752
+ let r = await ue.execute({ params: {
1747
1753
  invoiceUuid: e.value.uuid,
1748
1754
  hasActiveApproval: e.value.approval !== null
1749
1755
  } });
1750
1756
  if (r.isErr()) {
1751
1757
  let i = s.getCustomerDetailRoute(e.value.customer.uuid);
1752
- if (wt.isExpectedApiError(r.error) && wt.getApiErrorCode(r.error) === yr) {
1758
+ if (wt.isExpectedApiError(r.error) && wt.getApiErrorCode(r.error) === br) {
1753
1759
  n.show({
1754
1760
  link: i === null ? void 0 : {
1755
1761
  label: t.t("wise_invoicing.invoice.send_approval.view_customer_action"),
@@ -1768,7 +1774,7 @@ function Sr(e) {
1768
1774
  reference: e.value.sequence ?? e.value.subject ?? t.t("wise_invoicing.invoice.detail.fallback_title")
1769
1775
  }) });
1770
1776
  }
1771
- async function qe() {
1777
+ async function Ke() {
1772
1778
  let r = await oe.execute({ params: { invoiceUuid: e.value.uuid } });
1773
1779
  if (r.isErr()) {
1774
1780
  n.apiError(r.error);
@@ -1776,8 +1782,8 @@ function Sr(e) {
1776
1782
  }
1777
1783
  n.show({ message: t.t("wise_invoicing.invoice.mark_as_needs_approval.success") });
1778
1784
  }
1779
- async function Je() {
1780
- let r = await ge.execute({ params: { invoiceUuid: e.value.uuid } });
1785
+ async function qe() {
1786
+ let r = await fe.execute({ params: { invoiceUuid: e.value.uuid } });
1781
1787
  if (r.isErr()) {
1782
1788
  n.apiError(r.error);
1783
1789
  return;
@@ -1787,42 +1793,42 @@ function Sr(e) {
1787
1793
  Ct(() => e.value.isDisputed, (e) => {
1788
1794
  S.value === e && (S.value = null);
1789
1795
  });
1790
- async function Ye() {
1796
+ async function Je() {
1791
1797
  let r = await re.execute({ params: { invoiceUuid: e.value.uuid } });
1792
1798
  return r.isErr() ? (n.apiError(r.error), !1) : (n.show({ message: t.t("wise_invoicing.invoice.finalize.success") }), !0);
1793
1799
  }
1794
- async function Xe() {
1795
- if (Re.value) {
1800
+ async function Ye() {
1801
+ if (Le.value) {
1796
1802
  await _.open({
1797
1803
  sentAt: e.value.approval?.sentAt ?? null,
1798
1804
  proFormaFile: e.value.approvalProFormaFile,
1799
1805
  onFinalizeAnyway: () => {
1800
- Ye();
1806
+ Je();
1801
1807
  },
1802
1808
  onRevertChanges: () => {
1803
- Ve({ onReverted: () => {
1804
- Ye();
1809
+ Be({ onReverted: () => {
1810
+ Je();
1805
1811
  } });
1806
1812
  },
1807
1813
  onSendNewRequest: () => {
1808
- Ke();
1814
+ Ge();
1809
1815
  },
1810
1816
  onViewProForma: () => {
1811
- He();
1817
+ Ve();
1812
1818
  }
1813
1819
  });
1814
1820
  return;
1815
1821
  }
1816
- if (be.value) {
1817
- await Ye();
1822
+ if (Ce.value) {
1823
+ await Je();
1818
1824
  return;
1819
1825
  }
1820
1826
  await ee.open({
1821
1827
  billingDocumentType: "invoice",
1822
- onConfirm: Ye
1828
+ onConfirm: Je
1823
1829
  });
1824
1830
  }
1825
- async function Ze() {
1831
+ async function Xe() {
1826
1832
  let r = await le.execute({ params: { invoiceUuid: e.value.uuid } });
1827
1833
  if (r.isErr()) {
1828
1834
  n.apiError(r.error);
@@ -1830,7 +1836,7 @@ function Sr(e) {
1830
1836
  }
1831
1837
  n.show({ message: t.t("wise_invoicing.invoice.mark_as_ready.success") });
1832
1838
  }
1833
- async function Qe() {
1839
+ async function Ze() {
1834
1840
  let r = await ie.execute({ params: { invoiceUuid: e.value.uuid } });
1835
1841
  if (r.isErr()) {
1836
1842
  n.apiError(r.error);
@@ -1838,7 +1844,7 @@ function Sr(e) {
1838
1844
  }
1839
1845
  n.show({ message: t.t("wise_invoicing.invoice.mark_as_draft.success") });
1840
1846
  }
1841
- async function $e() {
1847
+ async function Qe() {
1842
1848
  let r = await ae.execute({ params: { invoiceUuid: e.value.uuid } });
1843
1849
  if (r.isErr()) {
1844
1850
  n.apiError(r.error);
@@ -1846,25 +1852,25 @@ function Sr(e) {
1846
1852
  }
1847
1853
  n.show({ message: t.t("wise_invoicing.invoice.mark_as_paid.success") });
1848
1854
  }
1849
- async function et() {
1855
+ async function $e() {
1850
1856
  S.value = !0;
1851
- let r = await ce.execute({ params: { invoiceUuid: e.value.uuid } });
1857
+ let r = await se.execute({ params: { invoiceUuid: e.value.uuid } });
1852
1858
  if (r.isErr()) {
1853
1859
  S.value = null, n.apiError(r.error);
1854
1860
  return;
1855
1861
  }
1856
1862
  n.show({ message: t.t("wise_invoicing.invoice.mark_as_disputed.success") });
1857
1863
  }
1858
- async function tt() {
1864
+ async function et() {
1859
1865
  S.value = !1;
1860
- let r = await _e.execute({ params: { invoiceUuid: e.value.uuid } });
1866
+ let r = await xe.execute({ params: { invoiceUuid: e.value.uuid } });
1861
1867
  if (r.isErr()) {
1862
1868
  S.value = null, n.apiError(r.error);
1863
1869
  return;
1864
1870
  }
1865
1871
  n.show({ message: t.t("wise_invoicing.invoice.withdraw_dispute.success") });
1866
1872
  }
1867
- async function nt() {
1873
+ async function tt() {
1868
1874
  let r = await v.execute({ params: { invoiceUuid: e.value.uuid } });
1869
1875
  if (r.isErr()) {
1870
1876
  n.apiError(r.error);
@@ -1872,10 +1878,10 @@ function Sr(e) {
1872
1878
  }
1873
1879
  Fe.reflectBulkAction([e.value.uuid], { deliveryStatus: d.SENT }), n.show({ message: t.t("wise_invoicing.invoice.send.success") });
1874
1880
  }
1875
- async function rt() {
1881
+ async function nt() {
1876
1882
  await l.open({ invoice: e.value });
1877
1883
  }
1878
- async function it() {
1884
+ async function rt() {
1879
1885
  let r = await y.getByUuid(e.value.uuid);
1880
1886
  if (r.isErr()) {
1881
1887
  n.apiError(r.error);
@@ -1887,9 +1893,9 @@ function Sr(e) {
1887
1893
  return;
1888
1894
  }
1889
1895
  let a = await ct.getDownloadUrl(i.uuid);
1890
- a !== null && se.downloadUrl(a, i.name);
1896
+ a !== null && ce.downloadUrl(a, i.name);
1891
1897
  }
1892
- async function at() {
1898
+ async function it() {
1893
1899
  let i = await ne.execute({ params: { invoiceUuid: e.value.uuid } });
1894
1900
  if (i.isErr()) {
1895
1901
  n.apiError(i.error);
@@ -1908,7 +1914,7 @@ function Sr(e) {
1908
1914
  message: t.t("wise_invoicing.invoice.duplicate.success")
1909
1915
  });
1910
1916
  }
1911
- async function st() {
1917
+ async function at() {
1912
1918
  let i = await te.execute({ params: { invoiceUuid: e.value.uuid } });
1913
1919
  if (i.isErr()) {
1914
1920
  n.apiError(i.error);
@@ -1927,7 +1933,7 @@ function Sr(e) {
1927
1933
  message: t.t("wise_invoicing.credit_note.create.success")
1928
1934
  });
1929
1935
  }
1930
- let pt = A(() => [
1936
+ let st = j(() => [
1931
1937
  {
1932
1938
  isLoading: v.isLoading.value,
1933
1939
  iconLeft: x,
@@ -1935,66 +1941,66 @@ function Sr(e) {
1935
1941
  label: t.t("wise_invoicing.invoice.detail.actions.send"),
1936
1942
  variant: "primary",
1937
1943
  visible: e.value.status === o.FINALIZED,
1938
- onClick: nt
1944
+ onClick: tt
1939
1945
  },
1940
1946
  {
1941
1947
  isLoading: le.isLoading.value,
1942
- iconRight: ye,
1948
+ iconRight: Se,
1943
1949
  key: "markAsReady",
1944
1950
  label: t.t("wise_invoicing.invoice.detail.actions.mark_as_ready"),
1945
1951
  visible: w("markAsReady"),
1946
- onClick: Ze
1952
+ onClick: Xe
1947
1953
  },
1948
1954
  {
1949
1955
  isLoading: !1,
1950
- iconLeft: ve,
1956
+ iconLeft: Oe,
1951
1957
  key: "markAsApproved",
1952
1958
  label: t.t("wise_invoicing.invoice.detail.actions.mark_as_approved"),
1953
- visible: Ie.value,
1954
- onClick: We
1959
+ visible: Pe.value,
1960
+ onClick: He
1955
1961
  },
1956
1962
  {
1957
- isLoading: he.isLoading.value,
1963
+ isLoading: ue.isLoading.value,
1958
1964
  iconLeft: x,
1959
1965
  key: "sendApprovalRequest",
1960
1966
  label: t.t("wise_invoicing.invoice.detail.actions.send_approval_request"),
1961
1967
  variant: "primary",
1962
- visible: Pe.value,
1963
- onClick: Ke
1968
+ visible: Ne.value,
1969
+ onClick: Ge
1964
1970
  },
1965
1971
  {
1966
1972
  isDisabled: E.value !== null,
1967
1973
  isLoading: re.isLoading.value,
1968
- disabledReason: Ae.value,
1969
- iconLeft: xe,
1974
+ disabledReason: D.value,
1975
+ iconLeft: pe,
1970
1976
  key: "finalize",
1971
1977
  label: t.t("wise_invoicing.invoice.detail.actions.finalize"),
1972
1978
  variant: E.value === null ? "primary" : "secondary",
1973
- visible: w("finalize") && !Pe.value,
1974
- onClick: Xe
1979
+ visible: w("finalize") && !Ne.value,
1980
+ onClick: Ye
1975
1981
  }
1976
- ].filter((e) => e.visible)), mt = A(() => {
1982
+ ].filter((e) => e.visible)), pt = j(() => {
1977
1983
  let n = [
1978
1984
  {
1979
- icon: we,
1985
+ icon: De,
1980
1986
  key: "markAsProtested",
1981
1987
  label: t.t("wise_invoicing.invoice.detail.actions.mark_as_disputed"),
1982
- visible: Ee.value && !Ce.value,
1983
- onSelect: et
1988
+ visible: Ee.value && !we.value,
1989
+ onSelect: $e
1984
1990
  },
1985
1991
  {
1986
- icon: ve,
1992
+ icon: Oe,
1987
1993
  key: "markAsPaid",
1988
1994
  label: t.t("wise_invoicing.invoice.detail.actions.mark_as_paid"),
1989
1995
  visible: w("markAsPaid"),
1990
- onSelect: $e
1996
+ onSelect: Qe
1991
1997
  },
1992
1998
  {
1993
- icon: ye,
1999
+ icon: Se,
1994
2000
  key: "withdrawProtest",
1995
2001
  label: t.t("wise_invoicing.invoice.detail.actions.withdraw_dispute"),
1996
- visible: Ee.value && Ce.value,
1997
- onSelect: tt
2002
+ visible: Ee.value && we.value,
2003
+ onSelect: et
1998
2004
  }
1999
2005
  ], r = [
2000
2006
  o.FINALIZED,
@@ -2004,75 +2010,75 @@ function Sr(e) {
2004
2010
  o.PROTESTED
2005
2011
  ].includes(e.value.status), i = [
2006
2012
  {
2007
- icon: De,
2013
+ icon: he,
2008
2014
  key: "downloadPdf",
2009
2015
  label: t.t("wise_invoicing.common.download_pdf"),
2010
2016
  visible: Te.value,
2011
- onSelect: it
2017
+ onSelect: rt
2012
2018
  },
2013
2019
  {
2014
- icon: de,
2020
+ icon: ge,
2015
2021
  key: "backToDraft",
2016
2022
  label: t.t("wise_invoicing.invoice.detail.actions.mark_as_draft"),
2017
2023
  visible: w("markAsDraft"),
2018
- onSelect: Qe
2024
+ onSelect: Ze
2019
2025
  },
2020
2026
  {
2021
- icon: Se,
2027
+ icon: be,
2022
2028
  key: "duplicate",
2023
2029
  label: t.t("wise_invoicing.invoice.detail.actions.duplicate"),
2024
2030
  visible: !0,
2025
- onSelect: at
2031
+ onSelect: it
2026
2032
  },
2027
2033
  {
2028
- icon: me,
2034
+ icon: ye,
2029
2035
  key: "rejectApproval",
2030
2036
  label: t.t("wise_invoicing.invoice.detail.actions.reject_approval"),
2031
- visible: ze.value,
2032
- onSelect: Ge
2037
+ visible: Re.value,
2038
+ onSelect: We
2033
2039
  },
2034
2040
  {
2035
2041
  icon: x,
2036
2042
  key: "sendApprovalRequest",
2037
2043
  label: t.t("wise_invoicing.invoice.detail.actions.send_approval_request"),
2038
- visible: Ne.value && !Pe.value,
2039
- onSelect: Ke
2044
+ visible: Me.value && !Ne.value,
2045
+ onSelect: Ge
2040
2046
  },
2041
2047
  {
2042
- icon: Oe,
2048
+ icon: me,
2043
2049
  key: "markAsNeedsApproval",
2044
2050
  label: t.t("wise_invoicing.invoice.detail.actions.mark_as_needs_approval"),
2045
- visible: je.value,
2046
- onSelect: qe
2051
+ visible: Ae.value,
2052
+ onSelect: Ke
2047
2053
  },
2048
2054
  {
2049
- icon: de,
2055
+ icon: ge,
2050
2056
  key: "unmarkAsNeedsApproval",
2051
2057
  label: t.t("wise_invoicing.invoice.detail.actions.unmark_as_needs_approval"),
2052
- visible: Me.value,
2053
- onSelect: Je
2058
+ visible: je.value,
2059
+ onSelect: qe
2054
2060
  }
2055
2061
  ], a = [
2056
2062
  {
2057
- icon: pe,
2063
+ icon: de,
2058
2064
  key: "archiveApproval",
2059
2065
  label: t.t("wise_invoicing.invoice.detail.actions.archive_approval"),
2060
- visible: Le.value,
2061
- onSelect: Be
2066
+ visible: Ie.value,
2067
+ onSelect: ze
2062
2068
  },
2063
2069
  {
2064
- icon: ue,
2070
+ icon: ve,
2065
2071
  key: "createCreditNote",
2066
2072
  label: t.t("wise_invoicing.invoice.detail.header.cancel_with_credit_note"),
2067
2073
  visible: r,
2068
- onSelect: st
2074
+ onSelect: at
2069
2075
  },
2070
2076
  {
2071
- icon: fe,
2077
+ icon: _e,
2072
2078
  key: "delete",
2073
2079
  label: t.t("wise_invoicing.invoice.detail.actions.delete"),
2074
2080
  visible: C.value.isEditable,
2075
- onSelect: rt
2081
+ onSelect: nt
2076
2082
  }
2077
2083
  ];
2078
2084
  return [
@@ -2091,38 +2097,38 @@ function Sr(e) {
2091
2097
  ].filter((e) => e.items.length > 0);
2092
2098
  });
2093
2099
  return {
2094
- isActionMenuVisible: A(() => mt.value.length > 0),
2095
- isDisputed: Ce,
2096
- menuGroups: mt,
2097
- primaryButtons: pt,
2098
- onRevertApprovalChanges: Ve,
2099
- onSendApprovalRequest: Ke,
2100
- onViewProForma: He
2100
+ isActionMenuVisible: j(() => pt.value.length > 0),
2101
+ isDisputed: we,
2102
+ menuGroups: pt,
2103
+ primaryButtons: st,
2104
+ onRevertApprovalChanges: Be,
2105
+ onSendApprovalRequest: Ge,
2106
+ onViewProForma: Ve
2101
2107
  };
2102
2108
  }
2103
2109
  //#endregion
2104
2110
  //#region src/modules/invoice/use-cases/detail/views/InvoiceDetailView.vue
2105
- var Cr = /* @__PURE__ */ I({
2111
+ var wr = /* @__PURE__ */ L({
2106
2112
  __name: "InvoiceDetailView",
2107
2113
  props: {
2108
2114
  customFieldDefinitions: {},
2109
2115
  invoice: {}
2110
2116
  },
2111
2117
  setup(e) {
2112
- let t = e, n = O(), r = yt(!1), i = A(() => ae.filterByView(t.customFieldDefinitions, re.INVOICE_DETAIL)), { isDisputed: a, menuGroups: o, primaryButtons: s, onRevertApprovalChanges: c, onSendApprovalRequest: l, onViewProForma: u } = Sr(A(() => t.invoice)), d = A(() => [{
2118
+ let t = e, n = k(), r = yt(!1), i = j(() => ae.filterByView(t.customFieldDefinitions, re.INVOICE_DETAIL)), { isDisputed: a, menuGroups: o, primaryButtons: s, onRevertApprovalChanges: c, onSendApprovalRequest: l, onViewProForma: u } = Cr(j(() => t.invoice)), d = j(() => [{
2113
2119
  label: n.t("wise_invoicing.invoice.overview.title"),
2114
2120
  to: { name: "invoicing-invoice-overview" }
2115
2121
  }, { label: t.invoice.sequence ?? t.invoice.subject ?? n.t("wise_invoicing.invoice.detail.fallback_title") }]);
2116
- return (e, f) => (R(), j(tt, {
2122
+ return (e, f) => (z(), M(tt, {
2117
2123
  "billing-document": t.invoice,
2118
2124
  breadcrumbs: d.value,
2119
- title: B(n).t("wise_invoicing.invoice.detail.fallback_title")
2125
+ title: V(n).t("wise_invoicing.invoice.detail.fallback_title")
2120
2126
  }, {
2121
- header: V(() => [F(xn, {
2127
+ header: H(() => [I(Sn, {
2122
2128
  invoice: t.invoice,
2123
- "is-disputed": B(a),
2124
- "menu-groups": B(o),
2125
- "primary-buttons": B(s),
2129
+ "is-disputed": V(a),
2130
+ "menu-groups": V(o),
2131
+ "primary-buttons": V(s),
2126
2132
  "is-pdf-view-active": r.value,
2127
2133
  class: "w-full",
2128
2134
  onTogglePdfView: f[0] ||= (e) => r.value = !r.value
@@ -2133,16 +2139,16 @@ var Cr = /* @__PURE__ */ I({
2133
2139
  "primary-buttons",
2134
2140
  "is-pdf-view-active"
2135
2141
  ])]),
2136
- default: V(() => [B(b).isEditable(t.invoice.status) ? (R(), j(gn, {
2142
+ default: H(() => [V(b).isEditable(t.invoice.status) ? (z(), M(_n, {
2137
2143
  key: 0,
2138
2144
  approval: t.invoice.approval,
2139
2145
  "is-out-of-sync": t.invoice.hasChangesSinceApprovalSent,
2140
2146
  "pro-forma-file": t.invoice.approvalProFormaFile,
2141
2147
  rejection: t.invoice.rejection,
2142
2148
  class: "w-full",
2143
- onRevertChanges: B(c),
2144
- onSendNewRequest: B(l),
2145
- onViewProForma: B(u)
2149
+ onRevertChanges: V(c),
2150
+ onSendNewRequest: V(l),
2151
+ onViewProForma: V(u)
2146
2152
  }, null, 8, [
2147
2153
  "approval",
2148
2154
  "is-out-of-sync",
@@ -2151,30 +2157,30 @@ var Cr = /* @__PURE__ */ I({
2151
2157
  "onRevertChanges",
2152
2158
  "onSendNewRequest",
2153
2159
  "onViewProForma"
2154
- ])) : M("", !0), r.value ? (R(), j(Qe, {
2160
+ ])) : N("", !0), r.value ? (z(), M(Qe, {
2155
2161
  key: 1,
2156
2162
  "billing-document": t.invoice,
2157
2163
  class: "w-full"
2158
- }, null, 8, ["billing-document"])) : (R(), N(k, { key: 2 }, [
2159
- F(tr, {
2164
+ }, null, 8, ["billing-document"])) : (z(), P(A, { key: 2 }, [
2165
+ I(nr, {
2160
2166
  "custom-field-definitions": i.value,
2161
2167
  invoice: t.invoice
2162
2168
  }, null, 8, ["custom-field-definitions", "invoice"]),
2163
- B(b).isEditable(t.invoice.status) ? M("", !0) : (R(), j(Yn, {
2169
+ V(b).isEditable(t.invoice.status) ? N("", !0) : (z(), M(Xn, {
2164
2170
  key: 0,
2165
2171
  invoice: t.invoice,
2166
2172
  class: "w-full"
2167
2173
  }, null, 8, ["invoice"])),
2168
- F(Cn, {
2174
+ I(wn, {
2169
2175
  invoice: t.invoice,
2170
2176
  class: "w-full"
2171
2177
  }, null, 8, ["invoice"]),
2172
- F(Tn, {
2178
+ I(En, {
2173
2179
  invoice: t.invoice,
2174
2180
  class: "w-full"
2175
2181
  }, null, 8, ["invoice"])
2176
2182
  ], 64))]),
2177
- sidebar: V(() => [F(Ln, {
2183
+ sidebar: H(() => [I(Rn, {
2178
2184
  "custom-field-definitions": i.value,
2179
2185
  invoice: t.invoice
2180
2186
  }, null, 8, ["custom-field-definitions", "invoice"])]),
@@ -2185,20 +2191,20 @@ var Cr = /* @__PURE__ */ I({
2185
2191
  "title"
2186
2192
  ]));
2187
2193
  }
2188
- }), wr = /* @__PURE__ */ I({
2194
+ }), Tr = /* @__PURE__ */ L({
2189
2195
  __name: "InvoiceDetailViewDataProvider",
2190
2196
  props: { invoiceUuid: {} },
2191
2197
  setup(e) {
2192
- let t = e, n = O(), r = A(() => [{
2198
+ let t = e, n = k(), r = j(() => [{
2193
2199
  label: n.t("wise_invoicing.invoice.overview.title"),
2194
2200
  to: { name: "invoicing-invoice-overview" }
2195
- }]), i = pt(A(() => t.invoiceUuid)), a = ie();
2196
- return (e, t) => (R(), j(rt, {
2197
- "custom-field-definitions-query": B(a),
2198
- query: B(i),
2201
+ }]), i = pt(j(() => t.invoiceUuid)), a = ie();
2202
+ return (e, t) => (z(), M(rt, {
2203
+ "custom-field-definitions-query": V(a),
2204
+ query: V(i),
2199
2205
  "loading-breadcrumbs": r.value
2200
2206
  }, {
2201
- default: V(({ billingDocument: e, customFieldDefinitions: t }) => [F(Cr, {
2207
+ default: H(({ billingDocument: e, customFieldDefinitions: t }) => [I(wr, {
2202
2208
  "custom-field-definitions": t,
2203
2209
  invoice: e
2204
2210
  }, null, 8, ["custom-field-definitions", "invoice"])]),
@@ -2211,4 +2217,4 @@ var Cr = /* @__PURE__ */ I({
2211
2217
  }
2212
2218
  });
2213
2219
  //#endregion
2214
- export { wr as default };
2220
+ export { Tr as default };