@wisemen/wise-invoicing-web 0.2.0 → 0.3.1

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