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