@wisemen/wise-invoicing-web 0.0.4 → 0.0.5

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 (91) hide show
  1. package/dist/{BillingDocumentDetailViewDataProvider-pePmiXWb.js → BillingDocumentDetailViewDataProvider-DdaNbuI2.js} +953 -863
  2. package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
  3. package/dist/{BillingDocumentPdf-Dg5JlQE1.js → BillingDocumentPdf-D_NOfBhQ.js} +4 -4
  4. package/dist/{CreditNoteDetailViewDataProvider-C-A0jyVr.js → CreditNoteDetailViewDataProvider-5ljhBOoN.js} +181 -181
  5. package/dist/{CreditNotePdfViewDataProvider-DNUvFVDj.js → CreditNotePdfViewDataProvider-CiWZN7Zy.js} +3 -3
  6. package/dist/{CustomFieldValueText-DDQq-975.js → CustomFieldValueText-ne5yy02J.js} +2 -2
  7. package/dist/DataProvider-Dj34ljUX.js +75 -0
  8. package/dist/{DunningCaseDetailViewDataProvider-0WV-7-vg.js → DunningCaseDetailViewDataProvider-CetbSmjq.js} +65 -56
  9. package/dist/DunningCaseOverviewView-Bq0BKVXG.js +747 -0
  10. package/dist/{DunningCaseReminderPdfViewDataProvider-DcM-7ECg.js → DunningCaseReminderPdfViewDataProvider-B3Y2aYFf.js} +1 -1
  11. package/dist/DunningCaseSendDialog-C47X_JjC.js +349 -0
  12. package/dist/{InvoiceDetailViewDataProvider-BDL9lAWe.js → InvoiceDetailViewDataProvider-DYH2ODDi.js} +589 -498
  13. package/dist/{InvoiceOverviewViewDataProvider-B_jrcC_8.js → InvoiceOverviewViewDataProvider-BT9cuQXw.js} +546 -482
  14. package/dist/{InvoicePdfView-Bygb-9z6.js → InvoicePdfView-ug0BiMqe.js} +2 -2
  15. package/dist/{InvoicePdfViewDataProvider-nBk3XNrE.js → InvoicePdfViewDataProvider-WvjMiEZG.js} +3 -3
  16. package/dist/{InvoicePublicPdfViewDataProvider-DHJP_-7-.js → InvoicePublicPdfViewDataProvider-BI9RQqYp.js} +3 -3
  17. package/dist/{IssuerSettingsViewDataProvider-Dk_Q6w6f.js → IssuerSettingsViewDataProvider-Bs4rEES2.js} +4 -4
  18. package/dist/ReminderSettingsViewDataProvider-5n2EfxPG.js +711 -0
  19. package/dist/{api.util-Dm_TQedZ.js → api.util-BCSgCfpS.js} +528 -509
  20. package/dist/{billingDocumentDetail.transformer-zMTbka5p.js → billingDocumentDetail.transformer-DIKAl4_L.js} +58 -89
  21. package/dist/client/index.d.ts +1 -1
  22. package/dist/client/types.gen.d.ts +28 -5
  23. package/dist/client/zod.gen.d.ts +869 -623
  24. package/dist/{creditNoteDetail.query-BZqgZRSu.js → creditNoteDetail.query-DHP69UiB.js} +13 -13
  25. package/dist/{dist-DP8KNFVD.js → dist-D9lp7NDv.js} +20 -36
  26. package/dist/{dist-DJ8yJcb9.js → dist-PErDVE6-.js} +621 -671
  27. package/dist/{documentTitle.composable-CeaFddr1.js → documentTitle.composable-4ApFl9TZ.js} +10 -8
  28. package/dist/{i18n.lib-DUbAMBRb.js → i18n.lib-B74GKndD.js} +50 -0
  29. package/dist/index.d.ts +51 -0
  30. package/dist/index.js +78 -78
  31. package/dist/{invoice.service-ChHEtXBA.js → invoice.service-DG5eacZC.js} +46 -46
  32. package/dist/{invoiceDeliveryStatus.util-BsA-MlA3.js → invoiceDeliveryStatus.util-CX-IdqAu.js} +28 -28
  33. package/dist/{invoiceDetail.query-O_CGvdwg.js → invoiceDetail.query-C_IMGjOX.js} +1 -1
  34. package/dist/{invoicingConfig.composable-c6w_aMm1.js → invoicingConfig.composable-BYqn1I9n.js} +2 -2
  35. package/dist/{issuerSettings.query-RqtrZFaB.js → issuerSettings.query-6wnSPphB.js} +2 -2
  36. package/dist/libs/i18n.lib.d.ts +50 -0
  37. package/dist/locales/en-US.json.d.ts +25 -0
  38. package/dist/locales/nl-BE.json.d.ts +25 -0
  39. package/dist/models/billing-document/billingDocumentLineItemGroupUpdateForm.model.d.ts +9 -3
  40. package/dist/modules/dunning-case/actions/dunningCase.actions.d.ts +12 -0
  41. package/dist/modules/dunning-case/actions/dunningCaseNavigateToCustomer.action.d.ts +1 -0
  42. package/dist/modules/dunning-case/actions/dunningCaseNavigateToDetail.action.d.ts +1 -0
  43. package/dist/modules/dunning-case/api/mutations/reminderConfigUpdate.mutation.d.ts +2 -0
  44. package/dist/modules/dunning-case/models/dunningCase.model.d.ts +12 -2
  45. package/dist/modules/dunning-case/models/reminderConfigForm.model.d.ts +3 -1
  46. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewActionsCell.vue.d.ts +13 -0
  47. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewCustomerCell.vue.d.ts +7 -0
  48. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewDaysOverdueCell.vue.d.ts +7 -0
  49. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewLastReminderCell.vue.d.ts +7 -0
  50. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewLevelCell.vue.d.ts +7 -0
  51. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewMetrics.vue.d.ts +8 -0
  52. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewOutstandingCell.vue.d.ts +7 -0
  53. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewReminderCell.vue.d.ts +7 -0
  54. package/dist/modules/dunning-case/use-cases/overview/components/dunningCaseOverviewActionsCell.spec.d.ts +1 -0
  55. package/dist/modules/dunning-case/use-cases/overview/components/dunningCaseOverviewLastReminderCell.spec.d.ts +1 -0
  56. package/dist/modules/dunning-case/use-cases/overview/components/dunningCaseOverviewReminderCell.spec.d.ts +1 -0
  57. package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverview.composable.d.ts +24 -0
  58. package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverviewTableColumns.composable.d.ts +8 -0
  59. package/dist/modules/dunning-case/use-cases/send/dialogs/dunningCaseBulkSendDialog.spec.d.ts +1 -0
  60. package/dist/modules/dunning-case/use-cases/settings/components/ReminderLadderRow.vue.d.ts +3 -1
  61. package/dist/modules/dunning-case/use-cases/settings/components/reminderLadderFeeNotice.spec.d.ts +1 -0
  62. package/dist/modules/dunning-case/use-cases/settings/composables/reminderLadder.composable.d.ts +3 -1
  63. package/dist/modules/invoice/api/invoiceIndexCache.util.d.ts +4 -4
  64. package/dist/modules/invoice/api/queries/invoiceUserSearch.query.d.ts +3 -0
  65. package/dist/modules/invoice/api/query-keys/invoice.queryKeys.d.ts +8 -0
  66. package/dist/modules/invoice/api/services/invoiceUser.service.d.ts +6 -0
  67. package/dist/modules/invoice/components/form/InvoiceFormPreparedByField.vue.d.ts +16 -0
  68. package/dist/modules/invoice/models/invoice/update/invoicePreparer.model.d.ts +4 -0
  69. package/dist/modules/invoice/models/invoice/update/invoicePreparer.transformer.d.ts +5 -0
  70. package/dist/modules/invoice/models/invoice/update/invoiceUserSearchQueryParams.model.d.ts +3 -0
  71. package/dist/modules/invoice/models/invoice/update/invoiceUserSearchQueryParams.transformer.d.ts +6 -0
  72. package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkActionDialog.vue.d.ts +1 -0
  73. package/dist/{plainDate.transformer-BxvJpJOv.js → plainDate.transformer-Dfe5r84P.js} +32 -1
  74. package/dist/{reminderConfig.query-DzTN2AvU.js → reminderConfig.query-B9OQY7IT.js} +105 -90
  75. package/dist/search.composable-BCtYqudV.js +52 -0
  76. package/dist/style.css +1 -1
  77. package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +6 -6
  78. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +1 -1
  79. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsRowMutations.composable.d.ts +2 -2
  80. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsRowMutations.composable.spec.d.ts +1 -0
  81. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsTableDrag.composable.d.ts +3 -1
  82. package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableField.vue.d.ts +2 -0
  83. package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableTextField.vue.d.ts +1 -0
  84. package/dist/ui/billing-document/table/utils/billingDocumentLineItemsEditor.util.d.ts +19 -0
  85. package/dist/ui/data-provider/DataProviderErrorState.vue.d.ts +7 -0
  86. package/dist/ui/data-provider/dataProviderErrorState.spec.d.ts +1 -0
  87. package/package.json +6 -1
  88. package/dist/DataProvider-CfHLB3rH.js +0 -48
  89. package/dist/DunningCaseOverviewView-CHdzfbhb.js +0 -553
  90. package/dist/DunningCaseSendDialog-DBtwr2ue.js +0 -350
  91. package/dist/ReminderSettingsViewDataProvider-CDBjfU7R.js +0 -668
@@ -1,31 +1,32 @@
1
- import { t as e } from "./i18n.lib-DUbAMBRb.js";
2
- import "./api.util-Dm_TQedZ.js";
3
- import { _ as t, a as n, f as r, l as i, m as a, o, p as s, r as c } from "./documentTitle.composable-CeaFddr1.js";
4
- import { r as l } from "./useCurrencyFormat.composable-MtZaqKnO.js";
5
- import { a as u, i as d, n as f, t as p } from "./invoice.service-ChHEtXBA.js";
6
- import { t as m } from "./download.util-PjaUQR6r.js";
7
- import { n as h } from "./invoicingConfig.composable-c6w_aMm1.js";
8
- import { r as g } from "./address.transformer-B8C0pwT1.js";
9
- import { $ as _, D as v, G as y, L as b, M as ee, N as te, O as ne, Z as re, f as ie, g as ae, h as oe, i as se, l as x, nt as ce, t as le, v as S, w as ue } from "./dist-DP8KNFVD.js";
10
- import { n as C, t as w } from "./dist-YTXTCfo1.js";
11
- import { i as T, n as E, r as de } from "./CustomFieldValueText-DDQq-975.js";
12
- import { t as D } from "./formango.util-D5c2ql--.js";
13
- import { a as fe, c as pe, i as me, n as he, o as ge, r as _e, s as ve, t as ye, u as be } from "./invoiceDeliveryStatus.util-BsA-MlA3.js";
14
- import { t as xe } from "./issuerSettings.query-RqtrZFaB.js";
15
- import { C as Se, S as Ce, T as we, _ as Te, a as Ee, b as De, c as Oe, d as ke, f as Ae, g as je, h as Me, i as Ne, l as Pe, m as Fe, n as Ie, o as Le, p as Re, r as ze, s as Be, t as Ve, u as He, v as Ue, w as We, x as Ge, y as Ke } from "./BillingDocumentDetailViewDataProvider-pePmiXWb.js";
16
- import { t as qe } from "./invoiceDetail.query-O_CGvdwg.js";
17
- import { RouterLink as Je, useRouter as Ye } from "vue-router";
18
- import Xe, { z as O } from "zod";
19
- import { useI18n as k } from "vue-i18n";
20
- import { Fragment as A, computed as j, createBlock as M, createCommentVNode as N, createElementBlock as P, createElementVNode as F, createSlots as Ze, createVNode as I, defineComponent as L, mergeModels as Qe, mergeProps as R, openBlock as z, ref as $e, renderList as et, toDisplayString as tt, unref as B, useModel as nt, watch as rt, withCtx as V } from "vue";
21
- import { useKeysetInfiniteQuery as it, useMutation as H, useQuery as at } from "@wisemen/vue-core-api-utils";
22
- import { Temporal as ot } from "temporal-polyfill";
23
- import { UIBadge as U, UIBadgeLabel as st, UIBadgeSeparator as ct, UIButton as lt, UIColumnLayout as ut, UIConfirmDialog as dt, UIDateField as ft, UIDetailList as pt, UIDetailListGroup as mt, UIDetailListGroupItem as W, UIDetailListGroupItemLabel as G, UIDetailListGroupItemValueText as K, UIDetailListGroupSeparator as ht, UIDialogBody as gt, UIDialogFooter as _t, UIDialogFooterCancel as vt, UIDialogFooterSubmit as yt, UIDialogHeader as bt, UIForm as xt, UIFormDialog as q, UIFormFieldGrid as St, UIFormFieldGroup as Ct, UIFormSubmitButton as wt, UIIconButton as Tt, UINumberField as Et, UIRowLayout as J, UISelect as Dt, UITable as Ot, UITableCell as kt, UITableCellInteractiveElement as At, UIText as Y, UITextField as jt, createComponent as X, createSelectOptions as Mt, defineTableColumns as Nt, useOverlay as Pt, useToast as Z } from "@wisemen/vue-core-design-system";
24
- import { useForm as Q } from "formango";
1
+ import { t as e } from "./i18n.lib-B74GKndD.js";
2
+ import { Y as t, t as n } from "./api.util-BCSgCfpS.js";
3
+ import { a as r, h as i, l as a, m as o, o as s, p as c, r as l, v as u } from "./documentTitle.composable-4ApFl9TZ.js";
4
+ import { r as d } from "./useCurrencyFormat.composable-MtZaqKnO.js";
5
+ import { t as f } from "./search.composable-BCtYqudV.js";
6
+ import { a as p, i as m, n as h, o as g, t as _ } from "./invoice.service-DG5eacZC.js";
7
+ import { t as v } from "./download.util-PjaUQR6r.js";
8
+ import { n as y } from "./invoicingConfig.composable-BYqn1I9n.js";
9
+ import { r as b } from "./address.transformer-B8C0pwT1.js";
10
+ import { D as ee, I as x, M as te, O as ne, Q as re, W as ie, X as ae, f as oe, g as se, h as S, i as ce, j as le, l as ue, t as C, tt as de, v as fe, w as pe } from "./dist-D9lp7NDv.js";
11
+ import { n as me, t as he } from "./dist-YTXTCfo1.js";
12
+ import { i as w, n as ge, r as _e } from "./CustomFieldValueText-ne5yy02J.js";
13
+ import { t as T } from "./formango.util-D5c2ql--.js";
14
+ import { a as ve, c as ye, i as be, n as xe, o as Se, r as Ce, s as we, t as E, u as Te } from "./invoiceDeliveryStatus.util-CX-IdqAu.js";
15
+ import { t as Ee } from "./issuerSettings.query-6wnSPphB.js";
16
+ import { C as De, S as Oe, T as ke, _ as Ae, a as je, b as Me, c as Ne, d as Pe, f as Fe, g as Ie, h as Le, i as Re, l as ze, m as Be, n as Ve, o as He, p as Ue, r as We, s as Ge, t as Ke, u as qe, v as Je, w as Ye, x as Xe, y as Ze } from "./BillingDocumentDetailViewDataProvider-DdaNbuI2.js";
17
+ import { t as Qe } from "./invoiceDetail.query-C_IMGjOX.js";
18
+ import { RouterLink as $e, useRouter as et } from "vue-router";
19
+ import tt, { z as D } from "zod";
20
+ import { useI18n as O } from "vue-i18n";
21
+ import { Fragment as nt, computed as k, createBlock as A, createCommentVNode as j, createElementBlock as M, createElementVNode as N, createSlots as rt, createVNode as P, defineComponent as F, mergeModels as it, mergeProps as I, openBlock as L, ref as at, renderList as ot, toDisplayString as st, unref as R, useModel as ct, watch as lt, withCtx as z } from "vue";
22
+ import { useKeysetInfiniteQuery as ut, useMutation as B, useOffsetInfiniteQuery as dt, useQuery as ft } from "@wisemen/vue-core-api-utils";
23
+ import { Temporal as pt } from "temporal-polyfill";
24
+ import { UIAutocomplete as mt, UIBadge as V, UIBadgeLabel as ht, UIBadgeSeparator as gt, UIButton as _t, UIColumnLayout as vt, UIConfirmDialog as yt, UIDateField as H, UIDetailList as bt, UIDetailListGroup as xt, UIDetailListGroupItem as U, UIDetailListGroupItemLabel as W, UIDetailListGroupItemValueText as G, UIDetailListGroupSeparator as St, UIDialogBody as Ct, UIDialogFooter as K, UIDialogFooterCancel as q, UIDialogFooterSubmit as wt, UIDialogHeader as J, UIForm as Tt, UIFormDialog as Et, UIFormFieldGrid as Dt, UIFormFieldGroup as Ot, UIFormSubmitButton as kt, UIIconButton as At, UINumberField as jt, UIRowLayout as Y, UISelect as Mt, UITable as Nt, UITableCell as Pt, UITableCellInteractiveElement as Ft, UIText as X, UITextField as It, createAutocompleteOptions as Lt, createComponent as Z, createSelectOptions as Rt, defineTableColumns as zt, useOverlay as Bt, useToast as Q } from "@wisemen/vue-core-design-system";
25
+ import { useForm as $ } from "formango";
25
26
  //#region src/modules/invoice/api/mutations/invoiceUpdate.mutation.ts
26
- function Ft() {
27
- return H({
28
- queryFn: (e) => p.update(e.params.invoiceUuid, e.body),
27
+ function Vt() {
28
+ return B({
29
+ queryFn: (e) => _.update(e.params.invoiceUuid, e.body),
29
30
  queryKeysToInvalidate: {
30
31
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
31
32
  invoiceIndex: {}
@@ -34,15 +35,15 @@ function Ft() {
34
35
  }
35
36
  //#endregion
36
37
  //#region src/modules/invoice/components/InvoiceDeliveryStatusBadge.vue
37
- var It = /* @__PURE__ */ L({
38
+ var Ht = /* @__PURE__ */ F({
38
39
  __name: "InvoiceDeliveryStatusBadge",
39
40
  props: {
40
41
  deliveryStatus: {},
41
42
  size: { default: "sm" }
42
43
  },
43
44
  setup(e) {
44
- let t = e, n = k(), r = j(() => ye.getMetadata(t.deliveryStatus)), i = j(() => n.t(r.value.translationKey));
45
- return (e, n) => (z(), M(B(U), {
45
+ let t = e, n = O(), r = k(() => E.getMetadata(t.deliveryStatus)), i = k(() => n.t(r.value.translationKey));
46
+ return (e, n) => (L(), A(R(V), {
46
47
  label: i.value,
47
48
  color: r.value.tone,
48
49
  size: t.size,
@@ -53,12 +54,12 @@ var It = /* @__PURE__ */ L({
53
54
  "size"
54
55
  ]));
55
56
  }
56
- }), Lt = O.string().nullable(), Rt = O.object({ subject: Lt });
57
+ }), Ut = D.string().nullable(), Wt = D.object({ subject: Ut });
57
58
  //#endregion
58
59
  //#region src/modules/invoice/api/mutations/invoiceCreateCreditNote.mutation.ts
59
- function zt() {
60
- return H({
61
- queryFn: (e) => p.createCreditNote(e.params.invoiceUuid),
60
+ function Gt() {
61
+ return B({
62
+ queryFn: (e) => _.createCreditNote(e.params.invoiceUuid),
62
63
  queryKeysToInvalidate: {
63
64
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
64
65
  invoiceIndex: {}
@@ -67,17 +68,17 @@ function zt() {
67
68
  }
68
69
  //#endregion
69
70
  //#region src/modules/invoice/api/mutations/invoiceDuplicate.mutation.ts
70
- function Bt() {
71
- return H({
72
- queryFn: (e) => p.duplicate(e.params.invoiceUuid),
71
+ function Kt() {
72
+ return B({
73
+ queryFn: (e) => _.duplicate(e.params.invoiceUuid),
73
74
  queryKeysToInvalidate: { invoiceIndex: {} }
74
75
  });
75
76
  }
76
77
  //#endregion
77
78
  //#region src/modules/invoice/api/mutations/invoiceFinalize.mutation.ts
78
- function Vt() {
79
- return H({
80
- queryFn: (e) => p.finalize(e.params.invoiceUuid),
79
+ function qt() {
80
+ return B({
81
+ queryFn: (e) => _.finalize(e.params.invoiceUuid),
81
82
  queryKeysToInvalidate: {
82
83
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
83
84
  invoiceIndex: {}
@@ -86,9 +87,9 @@ function Vt() {
86
87
  }
87
88
  //#endregion
88
89
  //#region src/modules/invoice/api/mutations/invoiceMarkAsDraft.mutation.ts
89
- function Ht() {
90
- return H({
91
- queryFn: (e) => p.markAsDraft(e.params.invoiceUuid),
90
+ function Jt() {
91
+ return B({
92
+ queryFn: (e) => _.markAsDraft(e.params.invoiceUuid),
92
93
  queryKeysToInvalidate: {
93
94
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
94
95
  invoiceIndex: {}
@@ -97,9 +98,9 @@ function Ht() {
97
98
  }
98
99
  //#endregion
99
100
  //#region src/modules/invoice/api/mutations/invoiceMarkAsPaid.mutation.ts
100
- function Ut() {
101
- return H({
102
- queryFn: (e) => p.markAsPaid(e.params.invoiceUuid),
101
+ function Yt() {
102
+ return B({
103
+ queryFn: (e) => _.markAsPaid(e.params.invoiceUuid),
103
104
  queryKeysToInvalidate: {
104
105
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
105
106
  invoiceIndex: {}
@@ -108,9 +109,9 @@ function Ut() {
108
109
  }
109
110
  //#endregion
110
111
  //#region src/modules/invoice/api/mutations/invoiceMarkAsProtested.mutation.ts
111
- function Wt() {
112
- return H({
113
- queryFn: (e) => p.markAsProtested(e.params.invoiceUuid),
112
+ function Xt() {
113
+ return B({
114
+ queryFn: (e) => _.markAsProtested(e.params.invoiceUuid),
114
115
  queryKeysToInvalidate: {
115
116
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
116
117
  invoiceIndex: {}
@@ -119,9 +120,9 @@ function Wt() {
119
120
  }
120
121
  //#endregion
121
122
  //#region src/modules/invoice/api/mutations/invoiceMarkAsReady.mutation.ts
122
- function Gt() {
123
- return H({
124
- queryFn: (e) => p.markAsReady(e.params.invoiceUuid),
123
+ function Zt() {
124
+ return B({
125
+ queryFn: (e) => _.markAsReady(e.params.invoiceUuid),
125
126
  queryKeysToInvalidate: {
126
127
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
127
128
  invoiceIndex: {}
@@ -130,9 +131,9 @@ function Gt() {
130
131
  }
131
132
  //#endregion
132
133
  //#region src/modules/invoice/api/mutations/invoiceSend.mutation.ts
133
- function Kt() {
134
- return H({
135
- queryFn: (e) => p.send(e.params.invoiceUuid),
134
+ function Qt() {
135
+ return B({
136
+ queryFn: (e) => _.send(e.params.invoiceUuid),
136
137
  queryKeysToInvalidate: {
137
138
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
138
139
  invoiceIndex: {}
@@ -141,9 +142,9 @@ function Kt() {
141
142
  }
142
143
  //#endregion
143
144
  //#region src/modules/invoice/api/mutations/invoiceWithdrawProtest.mutation.ts
144
- function qt() {
145
- return H({
146
- queryFn: (e) => p.withdrawProtest(e.params.invoiceUuid),
145
+ function $t() {
146
+ return B({
147
+ queryFn: (e) => _.withdrawProtest(e.params.invoiceUuid),
147
148
  queryKeysToInvalidate: {
148
149
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
149
150
  invoiceIndex: {}
@@ -152,21 +153,21 @@ function qt() {
152
153
  }
153
154
  //#endregion
154
155
  //#region src/modules/invoice/api/mutations/invoiceDelete.mutation.ts
155
- function Jt() {
156
- return H({
157
- queryFn: (e) => p.delete(e.params.invoiceUuid),
156
+ function en() {
157
+ return B({
158
+ queryFn: (e) => _.delete(e.params.invoiceUuid),
158
159
  queryKeysToInvalidate: { invoiceIndex: {} }
159
160
  });
160
161
  }
161
162
  //#endregion
162
163
  //#region src/modules/invoice/use-cases/detail/dialogs/InvoiceDeleteDialog.vue
163
- var Yt = /* @__PURE__ */ L({
164
+ var tn = /* @__PURE__ */ F({
164
165
  __name: "InvoiceDeleteDialog",
165
166
  props: { invoice: {} },
166
167
  emits: ["close", "deleted"],
167
168
  setup(e, { emit: t }) {
168
- let n = e, r = t, i = k(), a = Ye(), o = Z(), s = Jt(), c = Q({
169
- schema: Xe.object({}),
169
+ let n = e, r = t, i = O(), a = et(), o = Q(), s = en(), c = $({
170
+ schema: tt.object({}),
170
171
  onSubmit: async () => {
171
172
  let e = await s.execute({ params: { invoiceUuid: n.invoice.uuid } });
172
173
  if (e.isErr()) {
@@ -176,19 +177,19 @@ var Yt = /* @__PURE__ */ L({
176
177
  o.show({ message: i.t("wise_invoicing.invoice.delete.success_toast") }), r("deleted"), r("close"), await a.push({ name: "invoicing-invoice-overview" });
177
178
  }
178
179
  });
179
- return (e, t) => (z(), M(B(q), {
180
- form: B(c),
180
+ return (e, t) => (L(), A(R(Et), {
181
+ form: R(c),
181
182
  size: "xs",
182
183
  onClose: t[0] ||= (e) => r("close")
183
184
  }, {
184
- default: V(() => [I(B(bt), {
185
- title: B(i).t("wise_invoicing.invoice.delete.title"),
186
- description: B(i).t("wise_invoicing.invoice.delete.description"),
185
+ default: z(() => [P(R(J), {
186
+ title: R(i).t("wise_invoicing.invoice.delete.title"),
187
+ description: R(i).t("wise_invoicing.invoice.delete.description"),
187
188
  "is-description-visible": !0
188
- }, null, 8, ["title", "description"]), I(B(_t), null, {
189
- right: V(() => [I(B(vt), { label: "cancel" }), I(B(yt), {
189
+ }, null, 8, ["title", "description"]), P(R(K), null, {
190
+ right: z(() => [P(R(q), { label: "cancel" }), P(R(wt), {
190
191
  "is-destructive": !0,
191
- label: B(i).t("wise_invoicing.invoice.delete.submit_button")
192
+ label: R(i).t("wise_invoicing.invoice.delete.submit_button")
192
193
  }, null, 8, ["label"])]),
193
194
  _: 1
194
195
  })]),
@@ -198,71 +199,71 @@ var Yt = /* @__PURE__ */ L({
198
199
  });
199
200
  //#endregion
200
201
  //#region src/modules/invoice/use-cases/detail/composables/invoiceDetailHeaderActions.composable.ts
201
- function Xt(e) {
202
- let t = k(), n = Z(), r = Ye(), i = Pt(), o = i.create(Yt), c = i.create(Ge), l = Kt(), u = zt(), d = Bt(), f = Vt(), h = Ht(), g = Ut(), b = Wt(), ee = Gt(), re = qt(), { shouldSkipConfirmation: oe } = Ce(), x = $e(null), le = j(() => T.getMetadata(e.value.status)), S = j(() => x.value ?? e.value.isDisputed), C = j(() => e.value.status !== a.DRAFT && e.value.status !== a.READY), w = j(() => e.value.lifecycleStatus === s.FINALIZED);
203
- function E(e) {
204
- return le.value.actions.includes(e);
202
+ function nn(e) {
203
+ let t = O(), n = Q(), r = et(), a = Bt(), s = a.create(tn), c = a.create(Xe), l = Qt(), u = Gt(), d = Kt(), f = qt(), p = Jt(), m = Yt(), h = Xt(), g = Zt(), y = $t(), { shouldSkipConfirmation: b } = Oe(), x = at(null), ae = k(() => w.getMetadata(e.value.status)), S = k(() => x.value ?? e.value.isDisputed), le = k(() => e.value.status !== i.DRAFT && e.value.status !== i.READY), ue = k(() => e.value.lifecycleStatus === o.FINALIZED);
204
+ function C(e) {
205
+ return ae.value.actions.includes(e);
205
206
  }
206
- rt(() => e.value.isDisputed, (e) => {
207
+ lt(() => e.value.isDisputed, (e) => {
207
208
  x.value === e && (x.value = null);
208
209
  });
209
- async function de() {
210
+ async function fe() {
210
211
  let r = await f.execute({ params: { invoiceUuid: e.value.uuid } });
211
212
  return r.isErr() ? (n.apiError(r.error), !1) : (n.show({ message: t.t("wise_invoicing.invoice.finalize.success") }), !0);
212
213
  }
213
- async function D() {
214
- if (oe.value) {
215
- await de();
214
+ async function me() {
215
+ if (b.value) {
216
+ await fe();
216
217
  return;
217
218
  }
218
219
  await c.open({
219
220
  billingDocumentType: "invoice",
220
- onConfirm: de
221
+ onConfirm: fe
221
222
  });
222
223
  }
223
- async function fe() {
224
- let r = await ee.execute({ params: { invoiceUuid: e.value.uuid } });
224
+ async function he() {
225
+ let r = await g.execute({ params: { invoiceUuid: e.value.uuid } });
225
226
  if (r.isErr()) {
226
227
  n.apiError(r.error);
227
228
  return;
228
229
  }
229
230
  n.show({ message: t.t("wise_invoicing.invoice.mark_as_ready.success") });
230
231
  }
231
- async function pe() {
232
- let r = await h.execute({ params: { invoiceUuid: e.value.uuid } });
232
+ async function ge() {
233
+ let r = await p.execute({ params: { invoiceUuid: e.value.uuid } });
233
234
  if (r.isErr()) {
234
235
  n.apiError(r.error);
235
236
  return;
236
237
  }
237
238
  n.show({ message: t.t("wise_invoicing.invoice.mark_as_draft.success") });
238
239
  }
239
- async function me() {
240
- let r = await g.execute({ params: { invoiceUuid: e.value.uuid } });
240
+ async function _e() {
241
+ let r = await m.execute({ params: { invoiceUuid: e.value.uuid } });
241
242
  if (r.isErr()) {
242
243
  n.apiError(r.error);
243
244
  return;
244
245
  }
245
246
  n.show({ message: t.t("wise_invoicing.invoice.mark_as_paid.success") });
246
247
  }
247
- async function he() {
248
+ async function T() {
248
249
  x.value = !0;
249
- let r = await b.execute({ params: { invoiceUuid: e.value.uuid } });
250
+ let r = await h.execute({ params: { invoiceUuid: e.value.uuid } });
250
251
  if (r.isErr()) {
251
252
  x.value = null, n.apiError(r.error);
252
253
  return;
253
254
  }
254
255
  n.show({ message: t.t("wise_invoicing.invoice.mark_as_disputed.success") });
255
256
  }
256
- async function ge() {
257
+ async function ve() {
257
258
  x.value = !1;
258
- let r = await re.execute({ params: { invoiceUuid: e.value.uuid } });
259
+ let r = await y.execute({ params: { invoiceUuid: e.value.uuid } });
259
260
  if (r.isErr()) {
260
261
  x.value = null, n.apiError(r.error);
261
262
  return;
262
263
  }
263
264
  n.show({ message: t.t("wise_invoicing.invoice.withdraw_dispute.success") });
264
265
  }
265
- async function _e() {
266
+ async function ye() {
266
267
  let r = await l.execute({ params: { invoiceUuid: e.value.uuid } });
267
268
  if (r.isErr()) {
268
269
  n.apiError(r.error);
@@ -270,11 +271,11 @@ function Xt(e) {
270
271
  }
271
272
  n.show({ message: t.t("wise_invoicing.invoice.send.success") });
272
273
  }
273
- async function ve() {
274
- await o.open({ invoice: e.value });
274
+ async function be() {
275
+ await s.open({ invoice: e.value });
275
276
  }
276
- async function ye() {
277
- let r = await p.getByUuid(e.value.uuid);
277
+ async function xe() {
278
+ let r = await _.getByUuid(e.value.uuid);
278
279
  if (r.isErr()) {
279
280
  n.apiError(r.error);
280
281
  return;
@@ -284,10 +285,10 @@ function Xt(e) {
284
285
  n.show({ message: t.t("wise_invoicing.invoice.download_pdf.generation_in_progress") });
285
286
  return;
286
287
  }
287
- let a = await Se.getDownloadUrl(i.uuid);
288
- a !== null && m.downloadUrl(a, i.name);
288
+ let a = await De.getDownloadUrl(i.uuid);
289
+ a !== null && v.downloadUrl(a, i.name);
289
290
  }
290
- async function be() {
291
+ async function Se() {
291
292
  let i = await d.execute({ params: { invoiceUuid: e.value.uuid } });
292
293
  if (i.isErr()) {
293
294
  n.apiError(i.error);
@@ -306,7 +307,7 @@ function Xt(e) {
306
307
  message: t.t("wise_invoicing.invoice.duplicate.success")
307
308
  });
308
309
  }
309
- async function xe() {
310
+ async function Ce() {
310
311
  let i = await u.execute({ params: { invoiceUuid: e.value.uuid } });
311
312
  if (i.isErr()) {
312
313
  n.apiError(i.error);
@@ -325,95 +326,95 @@ function Xt(e) {
325
326
  message: t.t("wise_invoicing.credit_note.create.success")
326
327
  });
327
328
  }
328
- let we = j(() => [
329
+ let we = k(() => [
329
330
  {
330
331
  isLoading: l.isLoading.value,
331
- iconLeft: ce,
332
+ iconLeft: de,
332
333
  key: "send",
333
334
  label: t.t("wise_invoicing.invoice.detail.actions.send"),
334
335
  variant: "primary",
335
- visible: e.value.status === a.FINALIZED,
336
- onClick: _e
336
+ visible: e.value.status === i.FINALIZED,
337
+ onClick: ye
337
338
  },
338
339
  {
339
- isLoading: ee.isLoading.value,
340
- iconRight: se,
340
+ isLoading: g.isLoading.value,
341
+ iconRight: ce,
341
342
  key: "markAsReady",
342
343
  label: t.t("wise_invoicing.invoice.detail.actions.mark_as_ready"),
343
- visible: E("markAsReady"),
344
- onClick: fe
344
+ visible: C("markAsReady"),
345
+ onClick: he
345
346
  },
346
347
  {
347
348
  isLoading: f.isLoading.value,
348
- iconLeft: ue,
349
+ iconLeft: pe,
349
350
  key: "finalize",
350
351
  label: t.t("wise_invoicing.invoice.detail.actions.finalize"),
351
- visible: E("finalize"),
352
- onClick: D
352
+ visible: C("finalize"),
353
+ onClick: me
353
354
  }
354
- ].filter((e) => e.visible)), Te = j(() => {
355
+ ].filter((e) => e.visible)), E = k(() => {
355
356
  let n = [
356
357
  {
357
- icon: y,
358
+ icon: ie,
358
359
  key: "markAsProtested",
359
360
  label: t.t("wise_invoicing.invoice.detail.actions.mark_as_disputed"),
360
- visible: w.value && !S.value,
361
- onSelect: he
361
+ visible: ue.value && !S.value,
362
+ onSelect: T
362
363
  },
363
364
  {
364
- icon: _,
365
+ icon: re,
365
366
  key: "markAsPaid",
366
367
  label: t.t("wise_invoicing.invoice.detail.actions.mark_as_paid"),
367
- visible: E("markAsPaid"),
368
- onSelect: me
368
+ visible: C("markAsPaid"),
369
+ onSelect: _e
369
370
  },
370
371
  {
371
- icon: se,
372
+ icon: ce,
372
373
  key: "withdrawProtest",
373
374
  label: t.t("wise_invoicing.invoice.detail.actions.withdraw_dispute"),
374
- visible: w.value && S.value,
375
- onSelect: ge
375
+ visible: ue.value && S.value,
376
+ onSelect: ve
376
377
  }
377
378
  ], r = [
378
- a.FINALIZED,
379
- a.PAID,
380
- a.SENT,
381
- a.OVERDUE,
382
- a.PROTESTED
383
- ].includes(e.value.status), i = [
379
+ i.FINALIZED,
380
+ i.PAID,
381
+ i.SENT,
382
+ i.OVERDUE,
383
+ i.PROTESTED
384
+ ].includes(e.value.status), a = [
384
385
  {
385
- icon: ae,
386
+ icon: se,
386
387
  key: "downloadPdf",
387
388
  label: t.t("wise_invoicing.common.download_pdf"),
388
- visible: C.value,
389
- onSelect: ye
389
+ visible: le.value,
390
+ onSelect: xe
390
391
  },
391
392
  {
392
393
  icon: ne,
393
394
  key: "backToDraft",
394
395
  label: t.t("wise_invoicing.invoice.detail.actions.mark_as_draft"),
395
- visible: E("markAsDraft"),
396
- onSelect: pe
396
+ visible: C("markAsDraft"),
397
+ onSelect: ge
397
398
  },
398
399
  {
399
- icon: ie,
400
+ icon: oe,
400
401
  key: "duplicate",
401
402
  label: t.t("wise_invoicing.invoice.detail.actions.duplicate"),
402
403
  visible: !0,
403
- onSelect: be
404
+ onSelect: Se
404
405
  }
405
406
  ], o = [{
406
407
  icon: te,
407
408
  key: "createCreditNote",
408
409
  label: t.t("wise_invoicing.invoice.detail.header.cancel_with_credit_note"),
409
410
  visible: r,
410
- onSelect: xe
411
+ onSelect: Ce
411
412
  }, {
412
- icon: v,
413
+ icon: ee,
413
414
  key: "delete",
414
415
  label: t.t("wise_invoicing.invoice.detail.actions.delete"),
415
- visible: le.value.isEditable,
416
- onSelect: ve
416
+ visible: ae.value.isEditable,
417
+ onSelect: be
417
418
  }];
418
419
  return [
419
420
  {
@@ -421,7 +422,7 @@ function Xt(e) {
421
422
  key: "lifecycle"
422
423
  },
423
424
  {
424
- items: i.filter((e) => e.visible),
425
+ items: a.filter((e) => e.visible),
425
426
  key: "secondary"
426
427
  },
427
428
  {
@@ -431,15 +432,15 @@ function Xt(e) {
431
432
  ].filter((e) => e.items.length > 0);
432
433
  });
433
434
  return {
434
- isActionMenuVisible: j(() => Te.value.length > 0),
435
+ isActionMenuVisible: k(() => E.value.length > 0),
435
436
  isDisputed: S,
436
- menuGroups: Te,
437
+ menuGroups: E,
437
438
  primaryButtons: we
438
439
  };
439
440
  }
440
441
  //#endregion
441
442
  //#region src/modules/invoice/use-cases/detail/components/InvoiceDetailHeaderSection.vue
442
- var Zt = /* @__PURE__ */ L({
443
+ var rn = /* @__PURE__ */ F({
443
444
  __name: "InvoiceDetailHeaderSection",
444
445
  props: {
445
446
  isPdfViewActive: { type: Boolean },
@@ -447,51 +448,51 @@ var Zt = /* @__PURE__ */ L({
447
448
  },
448
449
  emits: ["togglePdfView"],
449
450
  setup(e, { emit: t }) {
450
- let n = e, i = t, a = k(), o = Z(), { isDisputed: s, menuGroups: c, primaryButtons: l } = Xt(j(() => n.invoice)), u = Ft(), d = j(() => new We(n.invoice.status)), p = j(() => d.value.color), m = j(() => a.t(d.value.translationKey)), h = j(() => n.invoice.deliveryStatus !== r.UNSENT), g = j(() => ye.isSent(n.invoice.deliveryStatus)), _ = j(() => !T.isEditable(n.invoice.status)), v = Q({
451
+ let n = e, r = t, i = O(), a = Q(), { isDisputed: o, menuGroups: s, primaryButtons: l } = nn(k(() => n.invoice)), u = Vt(), d = k(() => new Ye(n.invoice.status)), f = k(() => d.value.color), p = k(() => i.t(d.value.translationKey)), m = k(() => n.invoice.deliveryStatus !== c.UNSENT), g = k(() => E.isSent(n.invoice.deliveryStatus)), _ = k(() => !w.isEditable(n.invoice.status)), v = $({
451
452
  initialState: { subject: n.invoice.subject },
452
- schema: Rt,
453
+ schema: Wt,
453
454
  onSubmit: async (e) => {
454
455
  let t = await u.execute({
455
456
  body: {
456
- ...f.toForm(n.invoice),
457
+ ...h.toForm(n.invoice),
457
458
  subject: e.subject
458
459
  },
459
460
  params: { invoiceUuid: n.invoice.uuid }
460
461
  });
461
- t.isErr() && o.apiError(t.error);
462
+ t.isErr() && a.apiError(t.error);
462
463
  }
463
464
  }), y = v.register("subject");
464
- return we({ form: v }), (e, t) => (z(), M(B(xt), {
465
- form: B(v),
465
+ return ke({ form: v }), (e, t) => (L(), A(R(Tt), {
466
+ form: R(v),
466
467
  "prompt-on-unsaved-changes": !1
467
468
  }, {
468
- default: V(() => [I(Ke, {
469
- "fallback-title": B(a).t("wise_invoicing.invoice.detail.fallback_title"),
469
+ default: z(() => [P(Ze, {
470
+ "fallback-title": R(i).t("wise_invoicing.invoice.detail.fallback_title"),
470
471
  "is-disabled": _.value,
471
472
  sequence: n.invoice.sequence,
472
- "status-color": p.value,
473
- "status-label": m.value,
474
- icon: B(b),
475
- "subject-field": B(y),
476
- "subject-placeholder": B(a).t("wise_invoicing.invoice.detail.header.subject_placeholder")
473
+ "status-color": f.value,
474
+ "status-label": p.value,
475
+ icon: R(x),
476
+ "subject-field": R(y),
477
+ "subject-placeholder": R(i).t("wise_invoicing.invoice.detail.header.subject_placeholder")
477
478
  }, {
478
- actions: V(() => [I(Ue, {
479
+ actions: z(() => [P(Je, {
479
480
  "is-pdf-view-active": n.isPdfViewActive,
480
- "menu-groups": B(c),
481
- "primary-buttons": B(l),
482
- onTogglePdfView: t[0] ||= (e) => i("togglePdfView")
481
+ "menu-groups": R(s),
482
+ "primary-buttons": R(l),
483
+ onTogglePdfView: t[0] ||= (e) => r("togglePdfView")
483
484
  }, null, 8, [
484
485
  "is-pdf-view-active",
485
486
  "menu-groups",
486
487
  "primary-buttons"
487
488
  ])]),
488
- status: V(() => [I(B(J), {
489
+ status: z(() => [P(R(Y), {
489
490
  gap: "xs",
490
491
  class: "flex-wrap items-start"
491
492
  }, {
492
- default: V(() => [
493
- I(ve, { "lifecycle-status": n.invoice.lifecycleStatus }, null, 8, ["lifecycle-status"]),
494
- I(he, {
493
+ default: z(() => [
494
+ P(we, { "lifecycle-status": n.invoice.lifecycleStatus }, null, 8, ["lifecycle-status"]),
495
+ P(xe, {
495
496
  "is-sent": g.value,
496
497
  "balance-due-amount": n.invoice.balanceDueAmount,
497
498
  "gross-amount": n.invoice.grossAmount,
@@ -506,12 +507,12 @@ var Zt = /* @__PURE__ */ L({
506
507
  "settlement-status",
507
508
  "total-credited-amount"
508
509
  ]),
509
- n.invoice.isOverdue ? (z(), M(De, { key: 0 })) : N("", !0),
510
- B(s) ? (z(), M(pe, { key: 1 })) : N("", !0),
511
- h.value ? (z(), M(It, {
510
+ n.invoice.isOverdue ? (L(), A(Me, { key: 0 })) : j("", !0),
511
+ R(o) ? (L(), A(ye, { key: 1 })) : j("", !0),
512
+ m.value ? (L(), A(Ht, {
512
513
  key: 2,
513
514
  "delivery-status": n.invoice.deliveryStatus
514
- }, null, 8, ["delivery-status"])) : N("", !0)
515
+ }, null, 8, ["delivery-status"])) : j("", !0)
515
516
  ]),
516
517
  _: 1
517
518
  })]),
@@ -529,12 +530,12 @@ var Zt = /* @__PURE__ */ L({
529
530
  _: 1
530
531
  }, 8, ["form"]));
531
532
  }
532
- }), Qt = { class: "grid w-full grid-cols-1 gap-md lg:grid-cols-3" }, $t = /* @__PURE__ */ L({
533
+ }), an = { class: "grid w-full grid-cols-1 gap-md lg:grid-cols-3" }, on = /* @__PURE__ */ F({
533
534
  __name: "InvoiceDetailLinkedCreditNotesSection",
534
535
  props: { invoice: {} },
535
536
  setup(e) {
536
- let t = e, n = k(), r = l(), i = j(() => t.invoice.creditNotes.map((e) => {
537
- let t = new We(e.status);
537
+ let t = e, n = O(), r = d(), i = k(() => t.invoice.creditNotes.map((e) => {
538
+ let t = new Ye(e.status);
538
539
  return {
539
540
  uuid: e.uuid,
540
541
  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 }),
@@ -549,17 +550,17 @@ var Zt = /* @__PURE__ */ L({
549
550
  amount: e.grossAmount.amount > 0 ? -e.grossAmount.amount : e.grossAmount.amount
550
551
  };
551
552
  }
552
- return (e, t) => i.value.length > 0 ? (z(), M(B(ut), {
553
+ return (e, t) => i.value.length > 0 ? (L(), A(R(vt), {
553
554
  key: 0,
554
555
  as: "section",
555
556
  gap: "md",
556
557
  class: "w-full"
557
558
  }, {
558
- default: V(() => [I(B(Y), {
559
- text: B(n).t("wise_invoicing.invoice.detail.credit_notes.title"),
559
+ default: z(() => [P(R(X), {
560
+ text: R(n).t("wise_invoicing.invoice.detail.credit_notes.title"),
560
561
  as: "h2",
561
562
  class: "text-sm font-semibold text-primary"
562
- }, null, 8, ["text"]), F("div", Qt, [(z(!0), P(A, null, et(i.value, (e) => (z(), M(B(Je), {
563
+ }, null, 8, ["text"]), N("div", an, [(L(!0), M(nt, null, ot(i.value, (e) => (L(), A(R($e), {
563
564
  key: e.uuid,
564
565
  to: {
565
566
  name: "invoicing-credit-note-detail",
@@ -567,23 +568,23 @@ var Zt = /* @__PURE__ */ L({
567
568
  },
568
569
  class: "min-w-0 rounded-lg border border-secondary bg-primary p-lg transition-colors hover:bg-secondary"
569
570
  }, {
570
- default: V(() => [I(B(J), {
571
+ default: z(() => [P(R(Y), {
571
572
  align: "center",
572
573
  gap: "md",
573
574
  class: "min-w-0"
574
575
  }, {
575
- default: V(() => [
576
- I(B(Y), {
576
+ default: z(() => [
577
+ P(R(X), {
577
578
  text: e.title,
578
579
  class: "min-w-0 flex-1 truncate text-xs font-semibold text-primary"
579
580
  }, null, 8, ["text"]),
580
- I(B(U), {
581
+ P(R(V), {
581
582
  label: e.statusLabel,
582
583
  color: e.statusColor,
583
584
  size: "sm",
584
585
  variant: "translucent"
585
586
  }, null, 8, ["label", "color"]),
586
- I(B(U), {
587
+ P(R(V), {
587
588
  label: e.amountLabel,
588
589
  variant: "translucent",
589
590
  size: "sm"
@@ -594,33 +595,33 @@ var Zt = /* @__PURE__ */ L({
594
595
  _: 2
595
596
  }, 1032, ["to"]))), 128))])]),
596
597
  _: 1
597
- })) : N("", !0);
598
+ })) : j("", !0);
598
599
  }
599
- }), en = O.object({
600
- deliveredOn: w.nullable(),
601
- dueOn: w,
602
- issuedOn: w,
603
- customFields: O.array(O.custom()),
604
- externalRemarks: O.string().nullable(),
605
- poNumber: O.string().nullable(),
606
- preparedBy: O.object({
607
- uuid: O.uuid(),
608
- name: O.string()
600
+ }), sn = D.object({
601
+ deliveredOn: he.nullable(),
602
+ dueOn: he,
603
+ issuedOn: he,
604
+ customFields: D.array(D.custom()),
605
+ externalRemarks: D.string().nullable(),
606
+ poNumber: D.string().nullable(),
607
+ preparedBy: D.object({
608
+ uuid: D.uuid(),
609
+ name: D.string()
609
610
  }),
610
- subject: O.string().nullable()
611
+ subject: D.string().nullable()
611
612
  }).superRefine((t, n) => {
612
613
  Temporal.PlainDate.compare(t.dueOn, t.issuedOn) < 0 && n.addIssue({
613
614
  code: "custom",
614
615
  message: e.global.t("invoicing.invoice.validation.due_date_after_issue_date"),
615
616
  path: ["dueOn"]
616
617
  });
617
- }), tn = /* @__PURE__ */ L({
618
+ }), cn = /* @__PURE__ */ F({
618
619
  __name: "InvoiceDetailRemarksSection",
619
620
  props: { invoice: {} },
620
621
  setup(e) {
621
- let t = e, n = k(), r = Z(), i = Ft(), a = Q({
622
- initialState: j(() => f.toForm(t.invoice)),
623
- schema: en,
622
+ let t = e, n = O(), r = Q(), i = Vt(), a = $({
623
+ initialState: k(() => h.toForm(t.invoice)),
624
+ schema: sn,
624
625
  onSubmit: async (e) => {
625
626
  let n = await i.execute({
626
627
  body: e,
@@ -628,16 +629,16 @@ var Zt = /* @__PURE__ */ L({
628
629
  });
629
630
  n.isErr() && r.apiError(n.error);
630
631
  }
631
- }), o = a.register("externalRemarks"), s = j(() => !T.isEditable(t.invoice.status));
632
- return we({ form: a }), (e, t) => (z(), M(B(xt), {
633
- form: B(a),
632
+ }), o = a.register("externalRemarks"), s = k(() => !w.isEditable(t.invoice.status));
633
+ return ke({ form: a }), (e, t) => (L(), A(R(Tt), {
634
+ form: R(a),
634
635
  "prompt-on-unsaved-changes": !1
635
636
  }, {
636
- default: V(() => [I(Te, {
637
+ default: z(() => [P(Ae, {
637
638
  "is-disabled": s.value,
638
- placeholder: B(n).t("wise_invoicing.invoice.detail.remarks.placeholder"),
639
- "remarks-field": B(o),
640
- title: B(n).t("wise_invoicing.invoice.detail.remarks.title")
639
+ placeholder: R(n).t("wise_invoicing.invoice.detail.remarks.placeholder"),
640
+ "remarks-field": R(o),
641
+ title: R(n).t("wise_invoicing.invoice.detail.remarks.title")
641
642
  }, null, 8, [
642
643
  "is-disabled",
643
644
  "placeholder",
@@ -650,33 +651,33 @@ var Zt = /* @__PURE__ */ L({
650
651
  });
651
652
  //#endregion
652
653
  //#region src/modules/invoice/api/queries/invoiceActivityLogIndex.query.ts
653
- function nn(e) {
654
- return it("invoiceActivityLogIndex", {
654
+ function ln(e) {
655
+ return ut("invoiceActivityLogIndex", {
655
656
  params: { invoiceUuid: e },
656
- queryFn: (t) => p.getActivityLogs(e.value, { pagination: t })
657
+ queryFn: (t) => _.getActivityLogs(e.value, { pagination: t })
657
658
  });
658
659
  }
659
660
  //#endregion
660
661
  //#region src/modules/invoice/use-cases/detail/components/sidebar/InvoiceDetailSidebarActivityTab.vue
661
- var rn = /* @__PURE__ */ L({
662
+ var un = /* @__PURE__ */ F({
662
663
  __name: "InvoiceDetailSidebarActivityTab",
663
664
  props: { invoice: {} },
664
665
  setup(e) {
665
- let t = e, n = k(), { hasNextPage: r, isFetchingNextPage: i, isLoading: a, fetchNextPage: o, result: s } = nn(j(() => t.invoice.uuid)), l = j(() => s.value.unwrapOr({
666
+ let t = e, n = O(), { hasNextPage: r, isFetchingNextPage: i, isLoading: a, fetchNextPage: o, result: s } = ln(k(() => t.invoice.uuid)), c = k(() => s.value.unwrapOr({
666
667
  data: [],
667
668
  meta: { next: null }
668
669
  }).data);
669
- return (e, s) => (z(), M(je, {
670
+ return (e, s) => (L(), A(Ie, {
670
671
  "current-billing-document": {
671
- role: B(c).INVOICE,
672
+ role: R(l).INVOICE,
672
673
  uuid: t.invoice.uuid
673
674
  },
674
- "empty-message": B(n).t("wise_invoicing.invoice.detail.sidebar.activity_empty"),
675
- entries: l.value,
676
- "fetch-next-page": B(o),
677
- "has-next-page": B(r),
678
- "is-fetching-next-page": B(i),
679
- "is-loading": B(a)
675
+ "empty-message": R(n).t("wise_invoicing.invoice.detail.sidebar.activity_empty"),
676
+ entries: c.value,
677
+ "fetch-next-page": R(o),
678
+ "has-next-page": R(r),
679
+ "is-fetching-next-page": R(i),
680
+ "is-loading": R(a)
680
681
  }, null, 8, [
681
682
  "current-billing-document",
682
683
  "empty-message",
@@ -687,9 +688,9 @@ var rn = /* @__PURE__ */ L({
687
688
  "is-loading"
688
689
  ]));
689
690
  }
690
- }), an = /* @__PURE__ */ L({
691
+ }), dn = /* @__PURE__ */ F({
691
692
  __name: "CustomFieldFieldset",
692
- props: /*@__PURE__*/ Qe({
693
+ props: /*@__PURE__*/ it({
693
694
  isDisabled: { type: Boolean },
694
695
  currency: {},
695
696
  definitions: {},
@@ -701,19 +702,19 @@ var rn = /* @__PURE__ */ L({
701
702
  }),
702
703
  emits: ["update:modelValue"],
703
704
  setup(e) {
704
- let t = e, n = nt(e, "modelValue");
705
+ let t = e, n = ct(e, "modelValue");
705
706
  function r(e) {
706
- return He.findByDefinition(n.value, e);
707
+ return qe.findByDefinition(n.value, e);
707
708
  }
708
709
  function i(e, t) {
709
- n.value = He.upsert(n.value, e, t);
710
+ n.value = qe.upsert(n.value, e, t);
710
711
  }
711
- return (e, n) => t.definitions.length > 0 ? (z(), M(B(ut), {
712
+ return (e, n) => t.definitions.length > 0 ? (L(), A(R(vt), {
712
713
  key: 0,
713
714
  gap: t.size === "sm" ? "xs" : "md",
714
715
  align: "stretch"
715
716
  }, {
716
- default: V(() => [(z(!0), P(A, null, et(t.definitions, (e) => (z(), M(Pe, {
717
+ default: z(() => [(L(!0), M(nt, null, ot(t.definitions, (e) => (L(), A(ze, {
717
718
  key: e.uuid,
718
719
  currency: t.currency,
719
720
  definition: e,
@@ -732,20 +733,91 @@ var rn = /* @__PURE__ */ L({
732
733
  "onUpdate:modelValue"
733
734
  ]))), 128))]),
734
735
  _: 1
735
- }, 8, ["gap"])) : N("", !0);
736
+ }, 8, ["gap"])) : j("", !0);
736
737
  }
737
738
  });
738
739
  //#endregion
739
740
  //#region src/modules/invoice/api/queries/invoiceCustomerDetail.query.ts
740
- function on(e) {
741
- return at("invoiceCustomerDetail", {
741
+ function fn(e) {
742
+ return ft("invoiceCustomerDetail", {
742
743
  params: { customerUuid: e },
743
- queryFn: () => be.getByUuid(e.value)
744
+ queryFn: () => Te.getByUuid(e.value)
744
745
  });
745
746
  }
746
747
  //#endregion
747
- //#region src/modules/invoice/use-cases/detail/dialogs/InvoiceUpdateDialog.vue
748
- var sn = /* @__PURE__ */ L({
748
+ //#region src/modules/invoice/models/invoice/update/invoicePreparer.transformer.ts
749
+ var pn = class {
750
+ static fromDto(e) {
751
+ let t = `${e.firstName ?? ""} ${e.lastName ?? ""}`.trim();
752
+ return {
753
+ uuid: e.uuid,
754
+ name: t === "" ? e.email ?? e.uuid : t
755
+ };
756
+ }
757
+ }, mn = class {
758
+ static toDto(e) {
759
+ return {
760
+ pagination: e.pagination,
761
+ search: g.toDto(e.search)
762
+ };
763
+ }
764
+ }, hn = class {
765
+ static async getAll(e) {
766
+ return (await n.fromPromise(t({ query: mn.toDto(e) }))).map((e) => ({
767
+ data: e.data.items.map(pn.fromDto),
768
+ meta: e.data.meta
769
+ }));
770
+ }
771
+ };
772
+ //#endregion
773
+ //#region src/modules/invoice/api/queries/invoiceUserSearch.query.ts
774
+ function gn(e) {
775
+ let t = k(() => ({ search: e.params.search?.value }));
776
+ return dt("invoiceUserSearch", {
777
+ params: { queryParams: t },
778
+ queryFn: (t) => hn.getAll({
779
+ pagination: t,
780
+ search: e.params.search?.value ?? ""
781
+ })
782
+ });
783
+ }
784
+ //#endregion
785
+ //#region src/modules/invoice/components/form/InvoiceFormPreparedByField.vue
786
+ var _n = /* @__PURE__ */ F({
787
+ __name: "InvoiceFormPreparedByField",
788
+ props: {
789
+ isLoading: { type: Boolean },
790
+ field: {},
791
+ users: {}
792
+ },
793
+ emits: ["nextPage", "updateSearch"],
794
+ setup(e, { emit: t }) {
795
+ let n = e, r = t, i = O(), a = k(() => Lt(n.users));
796
+ function o(e) {
797
+ return e.name;
798
+ }
799
+ function s(e) {
800
+ e !== null && (n.field.setValue(e), r("updateSearch", ""));
801
+ }
802
+ return (e, t) => (L(), A(R(mt), I(R(T)(n.field), {
803
+ "display-fn": o,
804
+ "is-loading": n.isLoading,
805
+ "is-required": !0,
806
+ items: a.value,
807
+ label: R(i).t("wise_invoicing.invoice.detail.header.created_by"),
808
+ placeholder: R(i).t("component.autocomplete.search_placeholder"),
809
+ "search-mode": "remote",
810
+ onNextPage: t[0] ||= (e) => r("nextPage"),
811
+ "onUpdate:modelValue": s,
812
+ "onUpdate:search": t[1] ||= (e) => r("updateSearch", e)
813
+ }), null, 16, [
814
+ "is-loading",
815
+ "items",
816
+ "label",
817
+ "placeholder"
818
+ ]));
819
+ }
820
+ }), vn = /* @__PURE__ */ F({
749
821
  __name: "InvoiceUpdateDialog",
750
822
  props: {
751
823
  customFieldDefinitions: {},
@@ -753,14 +825,18 @@ var sn = /* @__PURE__ */ L({
753
825
  },
754
826
  emits: ["close"],
755
827
  setup(e, { emit: t }) {
756
- let n = e, r = t, i = k(), a = Z(), o = Ft(), s = xe(), c = h(), l = on(j(() => n.invoice.customer.uuid)), u = j(() => {
757
- let e = l.result.value;
828
+ let n = e, r = t, i = O(), a = Q(), o = Vt(), s = Ee(), c = y(), l = f({ debounceMs: 250 }), u = gn({ params: { search: l.debouncedSearch } }), d = k(() => u.result.value.match({
829
+ err: () => [],
830
+ loading: () => [],
831
+ ok: (e) => e.data
832
+ })), p = fn(k(() => n.invoice.customer.uuid)), m = k(() => {
833
+ let e = p.result.value;
758
834
  if (e.isOk()) return e.getValue().defaultPaymentTermDays;
759
835
  let t = s.result.value;
760
836
  return t.isOk() ? t.getValue().defaultPaymentTermDays ?? 0 : 0;
761
- }), d = Q({
762
- initialState: j(() => f.toForm(n.invoice)),
763
- schema: en,
837
+ }), g = $({
838
+ initialState: k(() => h.toForm(n.invoice)),
839
+ schema: sn,
764
840
  onSubmit: async (e) => {
765
841
  let t = await o.execute({
766
842
  body: e,
@@ -775,55 +851,70 @@ var sn = /* @__PURE__ */ L({
775
851
  onSubmitError: () => {
776
852
  a.unableToSave();
777
853
  }
778
- }), p = d.register("issuedOn"), m = d.register("dueOn"), g = d.register("deliveredOn"), _ = d.register("poNumber"), v = d.register("subject"), y = d.register("customFields"), b = j({
779
- get: () => y.modelValue.value ?? [],
854
+ }), _ = g.register("issuedOn"), v = g.register("dueOn"), b = g.register("deliveredOn"), ee = g.register("poNumber"), x = g.register("preparedBy"), te = g.register("subject"), ne = g.register("customFields"), re = k({
855
+ get: () => ne.modelValue.value ?? [],
780
856
  set: (e) => {
781
- y.setValue(e);
857
+ ne.setValue(e);
782
858
  }
783
859
  });
784
- function ee(e) {
785
- e !== null && m.setValue(e.add({ days: u.value }));
860
+ function ie(e) {
861
+ e !== null && v.setValue(e.add({ days: m.value }));
862
+ }
863
+ function oe(e) {
864
+ l.updateSearch(e);
786
865
  }
787
- return (e, t) => (z(), M(B(q), {
788
- form: B(d),
866
+ return (e, t) => (L(), A(R(Et), {
867
+ form: R(g),
789
868
  size: "sm",
790
869
  onClose: t[1] ||= (e) => r("close")
791
870
  }, {
792
- default: V(() => [
793
- I(B(bt), {
794
- icon: B(re),
871
+ default: z(() => [
872
+ P(R(J), {
873
+ icon: R(ae),
795
874
  "is-description-visible": !1,
796
- title: B(i).t("wise_invoicing.invoice.detail.header.edit_info"),
875
+ title: R(i).t("wise_invoicing.invoice.detail.header.edit_info"),
797
876
  description: ""
798
877
  }, null, 8, ["icon", "title"]),
799
- I(B(gt), null, {
800
- default: V(() => [I(B(Ct), null, {
801
- default: V(() => [I(B(St), {
878
+ P(R(Ct), null, {
879
+ default: z(() => [P(R(Ot), null, {
880
+ default: z(() => [P(R(Dt), {
802
881
  lg: 2,
803
882
  sm: 1
804
883
  }, {
805
- default: V(() => [
806
- I(B(ft), R(B(D)(B(p)), {
807
- label: B(i).t("wise_invoicing.invoice.detail.header.invoice_date"),
884
+ default: z(() => [
885
+ P(R(H), I(R(T)(R(_)), {
886
+ label: R(i).t("wise_invoicing.invoice.detail.header.invoice_date"),
808
887
  "is-required": !0,
809
- "onUpdate:modelValue": ee
888
+ "onUpdate:modelValue": ie
810
889
  }), null, 16, ["label"]),
811
- I(B(ft), R(B(D)(B(m)), {
812
- label: B(i).t("wise_invoicing.invoice.detail.header.due_date"),
890
+ P(R(H), I(R(T)(R(v)), {
891
+ label: R(i).t("wise_invoicing.invoice.detail.header.due_date"),
813
892
  "is-required": !0,
814
- "min-date": B(p).modelValue.value
893
+ "min-date": R(_).modelValue.value
815
894
  }), null, 16, ["label", "min-date"]),
816
- B(c).isDeliveryDateVisible.value ? (z(), M(B(ft), R({ key: 0 }, B(D)(B(g)), { label: B(i).t("wise_invoicing.invoice.detail.header.delivery_date") }), null, 16, ["label"])) : N("", !0),
817
- I(B(jt), R(B(D)(B(_)), { label: B(i).t("wise_invoicing.invoice.detail.header.po_number") }), null, 16, ["label"]),
818
- I(B(jt), R(B(D)(B(v)), {
819
- label: B(i).t("wise_invoicing.invoice.detail.header.subject"),
820
- placeholder: B(i).t("wise_invoicing.invoice.detail.header.subject_placeholder")
895
+ R(c).isDeliveryDateVisible.value ? (L(), A(R(H), I({ key: 0 }, R(T)(R(b)), { label: R(i).t("wise_invoicing.invoice.detail.header.delivery_date") }), null, 16, ["label"])) : j("", !0),
896
+ P(_n, {
897
+ field: R(x),
898
+ "is-loading": R(u).isLoading.value,
899
+ users: d.value,
900
+ onNextPage: R(u).fetchNextPage,
901
+ onUpdateSearch: oe
902
+ }, null, 8, [
903
+ "field",
904
+ "is-loading",
905
+ "users",
906
+ "onNextPage"
907
+ ]),
908
+ P(R(It), I(R(T)(R(ee)), { label: R(i).t("wise_invoicing.invoice.detail.header.po_number") }), null, 16, ["label"]),
909
+ P(R(It), I(R(T)(R(te)), {
910
+ label: R(i).t("wise_invoicing.invoice.detail.header.subject"),
911
+ placeholder: R(i).t("wise_invoicing.invoice.detail.header.subject_placeholder")
821
912
  }), null, 16, ["label", "placeholder"])
822
913
  ]),
823
914
  _: 1
824
- }), I(an, {
825
- modelValue: b.value,
826
- "onUpdate:modelValue": t[0] ||= (e) => b.value = e,
915
+ }), P(dn, {
916
+ modelValue: re.value,
917
+ "onUpdate:modelValue": t[0] ||= (e) => re.value = e,
827
918
  currency: n.invoice.currency,
828
919
  definitions: n.customFieldDefinitions,
829
920
  "is-disabled": !0,
@@ -839,24 +930,24 @@ var sn = /* @__PURE__ */ L({
839
930
  })]),
840
931
  _: 1
841
932
  }),
842
- I(B(_t), null, {
843
- right: V(() => [I(B(vt), { label: "cancel" }), I(B(yt), { label: B(i).t("wise_invoicing.invoice.detail.header.edit_info") }, null, 8, ["label"])]),
933
+ P(R(K), null, {
934
+ right: z(() => [P(R(q), { label: "cancel" }), P(R(wt), { label: R(i).t("wise_invoicing.invoice.detail.header.edit_info") }, null, 8, ["label"])]),
844
935
  _: 1
845
936
  })
846
937
  ]),
847
938
  _: 1
848
939
  }, 8, ["form"]));
849
940
  }
850
- }), cn = /* @__PURE__ */ L({
941
+ }), yn = /* @__PURE__ */ F({
851
942
  __name: "InvoiceDetailSidebarInfoTab",
852
943
  props: {
853
944
  customFieldDefinitions: {},
854
945
  invoice: {}
855
946
  },
856
947
  setup(e) {
857
- let t = e, n = k(), r = C(), i = h(), a = Pt().create(sn), s = j(() => T.isEditable(t.invoice.status)), c = j(() => E.filterByEntityType(t.customFieldDefinitions, o.INVOICE)), l = j(() => {
948
+ let t = e, n = O(), r = me(), i = y(), a = Bt().create(vn), o = k(() => w.isEditable(t.invoice.status)), c = k(() => ge.filterByEntityType(t.customFieldDefinitions, s.INVOICE)), l = k(() => {
858
949
  if (!t.invoice.isOverdue) return null;
859
- let e = t.invoice.dueOn.toZonedDateTime(ot.Now.timeZoneId()).toInstant();
950
+ let e = t.invoice.dueOn.toZonedDateTime(pt.Now.timeZoneId()).toInstant();
860
951
  return r.toRelativeTime(e);
861
952
  });
862
953
  async function u() {
@@ -868,52 +959,52 @@ var sn = /* @__PURE__ */ L({
868
959
  function d(e) {
869
960
  return e === null ? "-" : r.formatPlainDate(e);
870
961
  }
871
- return (e, r) => (z(), M(B(pt), { class: "px-2xl py-xl" }, {
872
- default: V(() => [
873
- I(B(mt), { label: B(n).t("wise_invoicing.invoice.detail.sidebar.general") }, Ze({
874
- default: V(() => [
875
- I(B(W), null, {
876
- default: V(() => [I(B(G), {
877
- icon: B(oe),
878
- label: B(n).t("wise_invoicing.invoice.detail.header.invoice_id")
879
- }, null, 8, ["icon", "label"]), I(B(K), { text: t.invoice.sequence ?? "-" }, null, 8, ["text"])]),
962
+ return (e, r) => (L(), A(R(bt), { class: "px-2xl py-xl" }, {
963
+ default: z(() => [
964
+ P(R(xt), { label: R(n).t("wise_invoicing.invoice.detail.sidebar.general") }, rt({
965
+ default: z(() => [
966
+ P(R(U), null, {
967
+ default: z(() => [P(R(W), {
968
+ icon: R(S),
969
+ label: R(n).t("wise_invoicing.invoice.detail.header.invoice_id")
970
+ }, null, 8, ["icon", "label"]), P(R(G), { text: t.invoice.sequence ?? "-" }, null, 8, ["text"])]),
880
971
  _: 1
881
972
  }),
882
- I(B(W), null, {
883
- default: V(() => [I(B(G), {
884
- icon: B(ee),
885
- label: B(n).t("wise_invoicing.invoice.detail.header.po_number")
886
- }, null, 8, ["icon", "label"]), I(B(K), { text: t.invoice.poNumber ?? "-" }, null, 8, ["text"])]),
973
+ P(R(U), null, {
974
+ default: z(() => [P(R(W), {
975
+ icon: R(le),
976
+ label: R(n).t("wise_invoicing.invoice.detail.header.po_number")
977
+ }, null, 8, ["icon", "label"]), P(R(G), { text: t.invoice.poNumber ?? "-" }, null, 8, ["text"])]),
887
978
  _: 1
888
979
  }),
889
- I(B(W), null, {
890
- default: V(() => [I(B(G), {
891
- icon: B(x),
892
- label: B(n).t("wise_invoicing.invoice.detail.header.issuer")
893
- }, null, 8, ["icon", "label"]), I(B(K), { text: t.invoice.issuer.name ?? "-" }, null, 8, ["text"])]),
980
+ P(R(U), null, {
981
+ default: z(() => [P(R(W), {
982
+ icon: R(ue),
983
+ label: R(n).t("wise_invoicing.invoice.detail.header.issuer")
984
+ }, null, 8, ["icon", "label"]), P(R(G), { text: t.invoice.issuer.name ?? "-" }, null, 8, ["text"])]),
894
985
  _: 1
895
986
  }),
896
- I(B(W), null, {
897
- default: V(() => [I(B(G), {
898
- icon: B(b),
899
- label: B(n).t("wise_invoicing.invoice.detail.header.invoice_date")
900
- }, null, 8, ["icon", "label"]), I(B(K), { text: d(t.invoice.issueOn) }, null, 8, ["text"])]),
987
+ P(R(U), null, {
988
+ default: z(() => [P(R(W), {
989
+ icon: R(x),
990
+ label: R(n).t("wise_invoicing.invoice.detail.header.invoice_date")
991
+ }, null, 8, ["icon", "label"]), P(R(G), { text: d(t.invoice.issueOn) }, null, 8, ["text"])]),
901
992
  _: 1
902
993
  }),
903
- I(B(W), null, {
904
- default: V(() => [I(B(G), {
905
- icon: B(y),
906
- label: B(n).t("wise_invoicing.invoice.detail.header.due_date"),
994
+ P(R(U), null, {
995
+ default: z(() => [P(R(W), {
996
+ icon: R(ie),
997
+ label: R(n).t("wise_invoicing.invoice.detail.header.due_date"),
907
998
  variant: t.invoice.isOverdue ? "error" : "default"
908
999
  }, null, 8, [
909
1000
  "icon",
910
1001
  "label",
911
1002
  "variant"
912
- ]), I(B(J), { gap: "xs" }, {
913
- default: V(() => [I(B(K), {
1003
+ ]), P(R(Y), { gap: "xs" }, {
1004
+ default: z(() => [P(R(G), {
914
1005
  text: d(t.invoice.dueOn),
915
1006
  variant: t.invoice.isOverdue ? "error" : "default"
916
- }, null, 8, ["text", "variant"]), l.value === null ? N("", !0) : (z(), M(B(U), {
1007
+ }, null, 8, ["text", "variant"]), l.value === null ? j("", !0) : (L(), A(R(V), {
917
1008
  key: 0,
918
1009
  label: l.value,
919
1010
  color: "error",
@@ -924,69 +1015,69 @@ var sn = /* @__PURE__ */ L({
924
1015
  })]),
925
1016
  _: 1
926
1017
  }),
927
- B(i).isDeliveryDateVisible.value ? (z(), M(B(W), { key: 0 }, {
928
- default: V(() => [I(B(G), {
929
- icon: B(ce),
930
- label: B(n).t("wise_invoicing.invoice.detail.header.delivery_date")
931
- }, null, 8, ["icon", "label"]), I(B(K), { text: d(t.invoice.deliveredOn) }, null, 8, ["text"])]),
1018
+ R(i).isDeliveryDateVisible.value ? (L(), A(R(U), { key: 0 }, {
1019
+ default: z(() => [P(R(W), {
1020
+ icon: R(de),
1021
+ label: R(n).t("wise_invoicing.invoice.detail.header.delivery_date")
1022
+ }, null, 8, ["icon", "label"]), P(R(G), { text: d(t.invoice.deliveredOn) }, null, 8, ["text"])]),
932
1023
  _: 1
933
- })) : N("", !0),
934
- I(Me, {
1024
+ })) : j("", !0),
1025
+ P(Le, {
935
1026
  definitions: t.customFieldDefinitions,
936
1027
  values: t.invoice.customFields
937
1028
  }, null, 8, ["definitions", "values"])
938
1029
  ]),
939
1030
  _: 2
940
- }, [s.value ? {
1031
+ }, [o.value ? {
941
1032
  name: "actions",
942
- fn: V(() => [I(B(Tt), {
943
- icon: B(S),
944
- label: B(n).t("wise_invoicing.invoice.detail.header.edit_info"),
1033
+ fn: z(() => [P(R(At), {
1034
+ icon: R(fe),
1035
+ label: R(n).t("wise_invoicing.invoice.detail.header.edit_info"),
945
1036
  variant: "tertiary",
946
1037
  onClick: u
947
1038
  }, null, 8, ["icon", "label"])]),
948
1039
  key: "0"
949
1040
  } : void 0]), 1032, ["label"]),
950
- I(Fe, { "original-invoice": t.invoice.originalInvoice }, null, 8, ["original-invoice"]),
951
- I(B(ht)),
952
- I(B(mt), {
953
- label: B(n).t("wise_invoicing.invoice.detail.header.bill_to"),
1041
+ P(Be, { "original-invoice": t.invoice.originalInvoice }, null, 8, ["original-invoice"]),
1042
+ P(R(St)),
1043
+ P(R(xt), {
1044
+ label: R(n).t("wise_invoicing.invoice.detail.header.bill_to"),
954
1045
  "collapse-options": {
955
1046
  isCollapsible: !0,
956
1047
  isOpenByDefault: !0,
957
1048
  badge: { label: t.invoice.customer.name ?? "-" }
958
1049
  }
959
1050
  }, {
960
- default: V(() => [I(B(W), { orientation: "vertical" }, {
961
- default: V(() => [I(B(Y), {
1051
+ default: z(() => [P(R(U), { orientation: "vertical" }, {
1052
+ default: z(() => [P(R(X), {
962
1053
  text: t.invoice.customer.name ?? "-",
963
1054
  class: "text-xs font-medium"
964
- }, null, 8, ["text"]), t.invoice.customer.address ? (z(), P(A, { key: 0 }, [I(B(Y), {
965
- text: B(g).formatLines(t.invoice.customer.address)[0] ?? "",
1055
+ }, null, 8, ["text"]), t.invoice.customer.address ? (L(), M(nt, { key: 0 }, [P(R(X), {
1056
+ text: R(b).formatLines(t.invoice.customer.address)[0] ?? "",
966
1057
  class: "text-xs"
967
- }, null, 8, ["text"]), t.invoice.customer.address ? (z(), M(B(Y), {
1058
+ }, null, 8, ["text"]), t.invoice.customer.address ? (L(), A(R(X), {
968
1059
  key: 0,
969
- text: B(g).formatLines(t.invoice.customer.address)[1] ?? "",
1060
+ text: R(b).formatLines(t.invoice.customer.address)[1] ?? "",
970
1061
  class: "text-xs"
971
- }, null, 8, ["text"])) : N("", !0)], 64)) : N("", !0)]),
1062
+ }, null, 8, ["text"])) : j("", !0)], 64)) : j("", !0)]),
972
1063
  _: 1
973
1064
  })]),
974
1065
  _: 1
975
1066
  }, 8, ["label", "collapse-options"]),
976
- I(B(ht)),
977
- I(B(mt), {
978
- label: B(n).t("wise_invoicing.invoice.detail.header.bill_from"),
1067
+ P(R(St)),
1068
+ P(R(xt), {
1069
+ label: R(n).t("wise_invoicing.invoice.detail.header.bill_from"),
979
1070
  "collapse-options": {
980
1071
  isCollapsible: !0,
981
1072
  isOpenByDefault: !1,
982
1073
  badge: { label: t.invoice.issuer.email ?? "-" }
983
1074
  }
984
1075
  }, {
985
- default: V(() => [I(B(W), { orientation: "vertical" }, {
986
- default: V(() => [I(B(G), { label: t.invoice.issuer.email ?? "-" }, null, 8, ["label"]), t.invoice.issuer.address ? (z(), M(B(K), {
1076
+ default: z(() => [P(R(U), { orientation: "vertical" }, {
1077
+ default: z(() => [P(R(W), { label: t.invoice.issuer.email ?? "-" }, null, 8, ["label"]), t.invoice.issuer.address ? (L(), A(R(G), {
987
1078
  key: 0,
988
- text: B(g).format(t.invoice.issuer.address)
989
- }, null, 8, ["text"])) : N("", !0)]),
1079
+ text: R(b).format(t.invoice.issuer.address)
1080
+ }, null, 8, ["text"])) : j("", !0)]),
990
1081
  _: 1
991
1082
  })]),
992
1083
  _: 1
@@ -995,20 +1086,20 @@ var sn = /* @__PURE__ */ L({
995
1086
  _: 1
996
1087
  }));
997
1088
  }
998
- }), ln = /* @__PURE__ */ L({
1089
+ }), bn = /* @__PURE__ */ F({
999
1090
  __name: "InvoiceDetailSidebar",
1000
1091
  props: {
1001
1092
  customFieldDefinitions: {},
1002
1093
  invoice: {}
1003
1094
  },
1004
1095
  setup(e) {
1005
- let t = e, n = k(), r = C(), i = j(() => n.t("wise_invoicing.invoice.detail.sidebar.updated_on", { date: r.toDateTime(t.invoice.updatedAt) }));
1006
- return (e, n) => (z(), M(Re, {
1096
+ let t = e, n = O(), r = me(), i = k(() => n.t("wise_invoicing.invoice.detail.sidebar.updated_on", { date: r.toDateTime(t.invoice.updatedAt) }));
1097
+ return (e, n) => (L(), A(Ue, {
1007
1098
  "billing-document": t.invoice,
1008
1099
  "updated-footer": i.value
1009
1100
  }, {
1010
- activity: V(() => [I(rn, { invoice: t.invoice }, null, 8, ["invoice"])]),
1011
- info: V(() => [I(cn, {
1101
+ activity: z(() => [P(un, { invoice: t.invoice }, null, 8, ["invoice"])]),
1102
+ info: z(() => [P(yn, {
1012
1103
  "custom-field-definitions": t.customFieldDefinitions,
1013
1104
  invoice: t.invoice
1014
1105
  }, null, 8, ["custom-field-definitions", "invoice"])]),
@@ -1018,9 +1109,9 @@ var sn = /* @__PURE__ */ L({
1018
1109
  });
1019
1110
  //#endregion
1020
1111
  //#region src/modules/invoice/api/mutations/invoicePaymentDelete.mutation.ts
1021
- function un() {
1022
- return H({
1023
- queryFn: (e) => p.deletePayment(e.params.invoiceUuid, e.params.paymentUuid),
1112
+ function xn() {
1113
+ return B({
1114
+ queryFn: (e) => _.deletePayment(e.params.invoiceUuid, e.params.paymentUuid),
1024
1115
  queryKeysToInvalidate: {
1025
1116
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
1026
1117
  invoicePaymentIndex: { invoiceUuid: (e) => e.invoiceUuid }
@@ -1029,57 +1120,57 @@ function un() {
1029
1120
  }
1030
1121
  //#endregion
1031
1122
  //#region src/modules/invoice/api/queries/invoicePaymentIndex.query.ts
1032
- function dn(e) {
1033
- return at("invoicePaymentIndex", {
1123
+ function Sn(e) {
1124
+ return ft("invoicePaymentIndex", {
1034
1125
  params: { invoiceUuid: e },
1035
- queryFn: () => p.getPayments(e.value)
1126
+ queryFn: () => _.getPayments(e.value)
1036
1127
  });
1037
1128
  }
1038
1129
  //#endregion
1039
1130
  //#region src/modules/invoice/use-cases/detail/components/table/InvoiceDetailPaymentActionsCell.vue
1040
- var fn = /* @__PURE__ */ L({
1131
+ var Cn = /* @__PURE__ */ F({
1041
1132
  __name: "InvoiceDetailPaymentActionsCell",
1042
1133
  props: {
1043
1134
  payment: {},
1044
1135
  onDelete: { type: Function }
1045
1136
  },
1046
1137
  setup(e) {
1047
- let n = e, r = k();
1048
- return (e, i) => (z(), M(B(kt), null, {
1049
- default: V(() => [I(B(At), null, {
1050
- default: V(() => [n.payment.source === B(t).MANUAL ? (z(), M(B(Tt), {
1138
+ let t = e, n = O();
1139
+ return (e, r) => (L(), A(R(Pt), null, {
1140
+ default: z(() => [P(R(Ft), null, {
1141
+ default: z(() => [t.payment.source === R(u).MANUAL ? (L(), A(R(At), {
1051
1142
  key: 0,
1052
- label: B(r).t("wise_invoicing.invoice.detail.payments.delete.title"),
1053
- icon: B(_e),
1143
+ label: R(n).t("wise_invoicing.invoice.detail.payments.delete.title"),
1144
+ icon: R(Ce),
1054
1145
  size: "sm",
1055
1146
  variant: "tertiary",
1056
- onClick: i[0] ||= (e) => n.onDelete(n.payment)
1057
- }, null, 8, ["label", "icon"])) : N("", !0)]),
1147
+ onClick: r[0] ||= (e) => t.onDelete(t.payment)
1148
+ }, null, 8, ["label", "icon"])) : j("", !0)]),
1058
1149
  _: 1
1059
1150
  })]),
1060
1151
  _: 1
1061
1152
  }));
1062
1153
  }
1063
- }), pn = /* @__PURE__ */ L({
1154
+ }), wn = /* @__PURE__ */ F({
1064
1155
  __name: "InvoiceDetailPaymentManualCell",
1065
1156
  props: { payment: {} },
1066
1157
  setup(e) {
1067
- let n = e;
1068
- return (e, r) => (z(), M(B(kt), null, {
1069
- default: V(() => [n.payment.source === B(t).MANUAL ? (z(), M(B(ge), {
1158
+ let t = e;
1159
+ return (e, n) => (L(), A(R(Pt), null, {
1160
+ default: z(() => [t.payment.source === R(u).MANUAL ? (L(), A(R(Se), {
1070
1161
  key: 0,
1071
1162
  class: "size-4 text-brand-600"
1072
- })) : N("", !0)]),
1163
+ })) : j("", !0)]),
1073
1164
  _: 1
1074
1165
  }));
1075
1166
  }
1076
- }), $ = /* @__PURE__ */ L({
1167
+ }), Tn = /* @__PURE__ */ F({
1077
1168
  __name: "InvoiceDetailPaymentsTableTextCell",
1078
1169
  props: { text: {} },
1079
1170
  setup(e) {
1080
1171
  let t = e;
1081
- return (e, n) => (z(), M(B(kt), null, {
1082
- default: V(() => [I(B(Y), {
1172
+ return (e, n) => (L(), A(R(Pt), null, {
1173
+ default: z(() => [P(R(X), {
1083
1174
  text: t.text ?? "-",
1084
1175
  class: "text-sm/5 text-primary"
1085
1176
  }, null, 8, ["text"])]),
@@ -1089,9 +1180,9 @@ var fn = /* @__PURE__ */ L({
1089
1180
  });
1090
1181
  //#endregion
1091
1182
  //#region src/modules/invoice/use-cases/detail/composables/invoiceDetailPaymentsTableColumns.composable.ts
1092
- function mn(e) {
1093
- let t = k(), n = C(), r = l();
1094
- return j(() => Nt()([
1183
+ function En(e) {
1184
+ let t = O(), n = me(), r = d();
1185
+ return k(() => zt()([
1095
1186
  {
1096
1187
  headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.date"),
1097
1188
  key: "date",
@@ -1099,7 +1190,7 @@ function mn(e) {
1099
1190
  max: "12rem",
1100
1191
  min: "12rem"
1101
1192
  },
1102
- component: (e) => X($, { text: n.formatPlainDate(e.date) })
1193
+ component: (e) => Z(Tn, { text: n.formatPlainDate(e.date) })
1103
1194
  },
1104
1195
  {
1105
1196
  headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.reference"),
@@ -1108,7 +1199,7 @@ function mn(e) {
1108
1199
  max: "14rem",
1109
1200
  min: "12rem"
1110
1201
  },
1111
- component: (e) => X($, { text: e.paymentReference ?? "—" })
1202
+ component: (e) => Z(Tn, { text: e.paymentReference ?? "—" })
1112
1203
  },
1113
1204
  {
1114
1205
  headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.remark"),
@@ -1117,7 +1208,7 @@ function mn(e) {
1117
1208
  max: "1fr",
1118
1209
  min: "12rem"
1119
1210
  },
1120
- component: (e) => X($, { text: e.remarks ?? "—" })
1211
+ component: (e) => Z(Tn, { text: e.remarks ?? "—" })
1121
1212
  },
1122
1213
  {
1123
1214
  headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.manual"),
@@ -1126,7 +1217,7 @@ function mn(e) {
1126
1217
  max: "6rem",
1127
1218
  min: "6rem"
1128
1219
  },
1129
- component: (e) => X(pn, { payment: e })
1220
+ component: (e) => Z(wn, { payment: e })
1130
1221
  },
1131
1222
  {
1132
1223
  headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.amount"),
@@ -1135,7 +1226,7 @@ function mn(e) {
1135
1226
  max: "10rem",
1136
1227
  min: "10rem"
1137
1228
  },
1138
- component: (e) => X($, { text: r.formatMonetary(e.amount) })
1229
+ component: (e) => Z(Tn, { text: r.formatMonetary(e.amount) })
1139
1230
  },
1140
1231
  {
1141
1232
  headerLabel: "",
@@ -1144,7 +1235,7 @@ function mn(e) {
1144
1235
  max: "5rem",
1145
1236
  min: "5rem"
1146
1237
  },
1147
- component: (t) => X(fn, {
1238
+ component: (t) => Z(Cn, {
1148
1239
  payment: t,
1149
1240
  onDelete: e.onDelete
1150
1241
  })
@@ -1153,9 +1244,9 @@ function mn(e) {
1153
1244
  }
1154
1245
  //#endregion
1155
1246
  //#region src/modules/invoice/api/mutations/invoicePaymentCreate.mutation.ts
1156
- function hn() {
1157
- return H({
1158
- queryFn: (e) => p.createPayment(e.params.invoiceUuid, e.body),
1247
+ function Dn() {
1248
+ return B({
1249
+ queryFn: (e) => _.createPayment(e.params.invoiceUuid, e.body),
1159
1250
  queryKeysToInvalidate: {
1160
1251
  invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
1161
1252
  invoicePaymentIndex: { invoiceUuid: (e) => e.invoiceUuid }
@@ -1164,28 +1255,28 @@ function hn() {
1164
1255
  }
1165
1256
  //#endregion
1166
1257
  //#region src/modules/invoice/models/invoice/payment/invoicePaymentCreateForm.model.ts
1167
- var gn = O.object({
1168
- amount: O.number().positive(),
1169
- currency: O.enum(n),
1170
- date: d,
1171
- paymentReference: O.string().nullable(),
1172
- precision: O.number().int().nonnegative(),
1173
- remarks: O.string().nullable()
1174
- }), _n = { class: "pr-md text-xs text-secondary" }, vn = /* @__PURE__ */ L({
1258
+ var On = D.object({
1259
+ amount: D.number().positive(),
1260
+ currency: D.enum(r),
1261
+ date: m,
1262
+ paymentReference: D.string().nullable(),
1263
+ precision: D.number().int().nonnegative(),
1264
+ remarks: D.string().nullable()
1265
+ }), kn = { class: "pr-md text-xs text-secondary" }, An = /* @__PURE__ */ F({
1175
1266
  __name: "InvoicePaymentCreateDialog",
1176
1267
  props: { invoice: {} },
1177
1268
  emits: ["close"],
1178
1269
  setup(e, { emit: t }) {
1179
- let n = e, r = t, i = k(), a = Z(), o = l(), s = hn(), c = j(() => o.getSymbol(n.invoice.grossAmount.currency)), d = Q({
1270
+ let n = e, r = t, i = O(), a = Q(), o = d(), s = Dn(), c = k(() => o.getSymbol(n.invoice.grossAmount.currency)), l = $({
1180
1271
  initialState: {
1181
1272
  amount: null,
1182
1273
  currency: n.invoice.grossAmount.currency,
1183
- date: u.getToday(),
1274
+ date: p.getToday(),
1184
1275
  paymentReference: null,
1185
1276
  precision: n.invoice.grossAmount.precision,
1186
1277
  remarks: null
1187
1278
  },
1188
- schema: gn,
1279
+ schema: On,
1189
1280
  onSubmit: async (e) => {
1190
1281
  let t = await s.execute({
1191
1282
  body: e,
@@ -1200,45 +1291,45 @@ var gn = O.object({
1200
1291
  onSubmitError: () => {
1201
1292
  a.unableToSave();
1202
1293
  }
1203
- }), f = d.register("amount"), p = d.register("date"), m = d.register("paymentReference"), h = d.register("remarks");
1204
- return (e, t) => (z(), M(B(q), {
1205
- form: B(d),
1294
+ }), u = l.register("amount"), f = l.register("date"), m = l.register("paymentReference"), h = l.register("remarks");
1295
+ return (e, t) => (L(), A(R(Et), {
1296
+ form: R(l),
1206
1297
  size: "sm",
1207
1298
  onClose: t[0] ||= (e) => r("close")
1208
1299
  }, {
1209
- default: V(() => [
1210
- I(B(bt), {
1211
- title: B(i).t("wise_invoicing.invoice.detail.payments.create.title"),
1212
- description: B(i).t("wise_invoicing.invoice.detail.payments.create.description"),
1213
- icon: B(fe),
1300
+ default: z(() => [
1301
+ P(R(J), {
1302
+ title: R(i).t("wise_invoicing.invoice.detail.payments.create.title"),
1303
+ description: R(i).t("wise_invoicing.invoice.detail.payments.create.description"),
1304
+ icon: R(ve),
1214
1305
  "is-description-visible": !0
1215
1306
  }, null, 8, [
1216
1307
  "title",
1217
1308
  "description",
1218
1309
  "icon"
1219
1310
  ]),
1220
- I(B(gt), null, {
1221
- default: V(() => [I(B(Ct), null, {
1222
- default: V(() => [I(B(St), {
1311
+ P(R(Ct), null, {
1312
+ default: z(() => [P(R(Ot), null, {
1313
+ default: z(() => [P(R(Dt), {
1223
1314
  lg: 2,
1224
1315
  sm: 1
1225
1316
  }, {
1226
- default: V(() => [
1227
- I(B(Et), R(B(D)(B(f)), {
1317
+ default: z(() => [
1318
+ P(R(jt), I(R(T)(R(u)), {
1228
1319
  "is-required": !0,
1229
- label: B(i).t("wise_invoicing.invoice.detail.payments.create.fields.amount"),
1320
+ label: R(i).t("wise_invoicing.invoice.detail.payments.create.fields.amount"),
1230
1321
  min: .01,
1231
1322
  step: .01
1232
1323
  }), {
1233
- right: V(() => [F("span", _n, tt(c.value.symbol), 1)]),
1324
+ right: z(() => [N("span", kn, st(c.value.symbol), 1)]),
1234
1325
  _: 1
1235
1326
  }, 16, ["label"]),
1236
- I(B(ft), R(B(D)(B(p)), {
1327
+ P(R(H), I(R(T)(R(f)), {
1237
1328
  "is-required": !0,
1238
- label: B(i).t("wise_invoicing.invoice.detail.payments.create.fields.date")
1329
+ label: R(i).t("wise_invoicing.invoice.detail.payments.create.fields.date")
1239
1330
  }), null, 16, ["label"]),
1240
- I(B(jt), R(B(D)(B(m)), { label: B(i).t("wise_invoicing.invoice.detail.payments.create.fields.reference") }), null, 16, ["label"]),
1241
- I(B(jt), R(B(D)(B(h)), { label: B(i).t("wise_invoicing.invoice.detail.payments.create.fields.remarks") }), null, 16, ["label"])
1331
+ P(R(It), I(R(T)(R(m)), { label: R(i).t("wise_invoicing.invoice.detail.payments.create.fields.reference") }), null, 16, ["label"]),
1332
+ P(R(It), I(R(T)(R(h)), { label: R(i).t("wise_invoicing.invoice.detail.payments.create.fields.remarks") }), null, 16, ["label"])
1242
1333
  ]),
1243
1334
  _: 1
1244
1335
  })]),
@@ -1246,29 +1337,29 @@ var gn = O.object({
1246
1337
  })]),
1247
1338
  _: 1
1248
1339
  }),
1249
- I(B(_t), null, {
1250
- right: V(() => [I(B(vt), { label: "cancel" }), I(B(wt), { label: B(i).t("wise_invoicing.invoice.detail.payments.create.submit") }, null, 8, ["label"])]),
1340
+ P(R(K), null, {
1341
+ right: z(() => [P(R(q), { label: "cancel" }), P(R(kt), { label: R(i).t("wise_invoicing.invoice.detail.payments.create.submit") }, null, 8, ["label"])]),
1251
1342
  _: 1
1252
1343
  })
1253
1344
  ]),
1254
1345
  _: 1
1255
1346
  }, 8, ["form"]));
1256
1347
  }
1257
- }), yn = /* @__PURE__ */ L({
1348
+ }), jn = /* @__PURE__ */ F({
1258
1349
  __name: "InvoiceDetailPaymentsSection",
1259
1350
  props: { invoice: {} },
1260
1351
  setup(e) {
1261
- let t = e, n = k(), r = l(), i = j(() => t.invoice.uuid), a = j(() => t.invoice.balanceDueAmount === null ? null : r.formatMonetary(t.invoice.balanceDueAmount)), { isLoading: o, result: s } = dn(i), c = Pt(), u = Z(), d = c.create(vn), f = c.create(dt), p = un(), m = j(() => s.value.match({
1352
+ let t = e, n = O(), r = d(), i = k(() => t.invoice.uuid), a = k(() => t.invoice.balanceDueAmount === null ? null : r.formatMonetary(t.invoice.balanceDueAmount)), { isLoading: o, result: s } = Sn(i), c = Bt(), l = Q(), u = c.create(An), f = c.create(yt), p = xn(), m = k(() => s.value.match({
1262
1353
  err: () => [],
1263
1354
  loading: () => [],
1264
1355
  ok: (e) => e
1265
- })), h = j(() => s.value.match({
1356
+ })), h = k(() => s.value.match({
1266
1357
  err: (e) => e,
1267
1358
  loading: () => null,
1268
1359
  ok: () => null
1269
- })), g = j(() => !T.getMetadata(t.invoice.status).isTerminal);
1360
+ })), g = k(() => !w.getMetadata(t.invoice.status).isTerminal);
1270
1361
  function _() {
1271
- d.open({ invoice: t.invoice });
1362
+ u.open({ invoice: t.invoice });
1272
1363
  }
1273
1364
  function v(e) {
1274
1365
  f.open({
@@ -1282,56 +1373,56 @@ var gn = O.object({
1282
1373
  paymentUuid: e.uuid
1283
1374
  } });
1284
1375
  if (r.isErr()) {
1285
- u.apiError(r.error);
1376
+ l.apiError(r.error);
1286
1377
  return;
1287
1378
  }
1288
- u.show({ message: n.t("wise_invoicing.invoice.detail.payments.delete.success") }), f.close();
1379
+ l.show({ message: n.t("wise_invoicing.invoice.detail.payments.delete.success") }), f.close();
1289
1380
  }
1290
1381
  });
1291
1382
  }
1292
- let y = mn({ onDelete: v });
1293
- return (e, t) => (z(), M(Le, null, {
1294
- default: V(() => [I(B(J), {
1383
+ let y = En({ onDelete: v });
1384
+ return (e, t) => (L(), A(He, null, {
1385
+ default: z(() => [P(R(Y), {
1295
1386
  justify: "between",
1296
1387
  class: "w-full gap-lg border-b border-secondary px-lg py-md"
1297
1388
  }, {
1298
- default: V(() => [I(B(J), { gap: "sm" }, {
1299
- default: V(() => [I(B(Y), {
1300
- text: B(n).t("wise_invoicing.invoice.detail.payments.title"),
1389
+ default: z(() => [P(R(Y), { gap: "sm" }, {
1390
+ default: z(() => [P(R(X), {
1391
+ text: R(n).t("wise_invoicing.invoice.detail.payments.title"),
1301
1392
  as: "h2",
1302
1393
  class: "text-sm font-semibold text-primary"
1303
- }, null, 8, ["text"]), a.value === null ? N("", !0) : (z(), M(B(U), {
1394
+ }, null, 8, ["text"]), a.value === null ? j("", !0) : (L(), A(R(V), {
1304
1395
  key: 0,
1305
1396
  color: "gray",
1306
1397
  size: "sm",
1307
1398
  variant: "outline"
1308
1399
  }, {
1309
- default: V(() => [
1310
- I(B(st), { label: B(n).t("wise_invoicing.invoice.detail.payments.balance_due") }, null, 8, ["label"]),
1311
- I(B(ct)),
1312
- I(B(st), { label: a.value }, null, 8, ["label"])
1400
+ default: z(() => [
1401
+ P(R(ht), { label: R(n).t("wise_invoicing.invoice.detail.payments.balance_due") }, null, 8, ["label"]),
1402
+ P(R(gt)),
1403
+ P(R(ht), { label: a.value }, null, 8, ["label"])
1313
1404
  ]),
1314
1405
  _: 1
1315
1406
  }))]),
1316
1407
  _: 1
1317
- }), g.value ? (z(), M(B(lt), {
1408
+ }), g.value ? (L(), A(R(_t), {
1318
1409
  key: 0,
1319
- label: B(n).t("wise_invoicing.invoice.detail.payments.add"),
1320
- "icon-left": B(me),
1410
+ label: R(n).t("wise_invoicing.invoice.detail.payments.add"),
1411
+ "icon-left": R(be),
1321
1412
  size: "sm",
1322
1413
  onClick: _
1323
- }, null, 8, ["label", "icon-left"])) : N("", !0)]),
1414
+ }, null, 8, ["label", "icon-left"])) : j("", !0)]),
1324
1415
  _: 1
1325
- }), I(B(Ot), {
1416
+ }), P(R(Nt), {
1326
1417
  "active-filter-count": 0,
1327
- columns: B(y),
1418
+ columns: R(y),
1328
1419
  data: m.value,
1329
1420
  error: h.value,
1330
1421
  "get-key": (e) => e.uuid,
1331
1422
  "has-active-search": !1,
1332
1423
  "header-actions": [],
1333
1424
  "is-fetching-next-page": !1,
1334
- "is-loading": B(o)
1425
+ "is-loading": R(o)
1335
1426
  }, null, 8, [
1336
1427
  "columns",
1337
1428
  "data",
@@ -1345,40 +1436,40 @@ var gn = O.object({
1345
1436
  });
1346
1437
  //#endregion
1347
1438
  //#region src/modules/invoice/api/mutations/invoiceUpdateLines.mutation.ts
1348
- function bn() {
1349
- return H({
1350
- queryFn: (e) => p.updateLines(e.params.invoiceUuid, e.body),
1439
+ function Mn() {
1440
+ return B({
1441
+ queryFn: (e) => _.updateLines(e.params.invoiceUuid, e.body),
1351
1442
  queryKeysToInvalidate: { invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid } }
1352
1443
  });
1353
1444
  }
1354
1445
  //#endregion
1355
1446
  //#region src/modules/invoice/api/mutations/invoiceApplyDiscount.mutation.ts
1356
- function xn() {
1357
- return H({
1358
- queryFn: (e) => p.applyDiscount(e.params.invoiceUuid, e.body),
1447
+ function Nn() {
1448
+ return B({
1449
+ queryFn: (e) => _.applyDiscount(e.params.invoiceUuid, e.body),
1359
1450
  queryKeysToInvalidate: { invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid } }
1360
1451
  });
1361
1452
  }
1362
1453
  //#endregion
1363
1454
  //#region src/modules/invoice/models/invoice/update/invoiceApplyDiscountForm.model.ts
1364
- var Sn = O.object({
1365
- currency: O.enum(n),
1366
- precision: O.number().int().nonnegative(),
1367
- type: O.enum(i),
1368
- value: O.number()
1369
- }).refine((e) => e.type !== i.PERCENTAGE || e.value <= 100, { path: ["value"] }), Cn = { class: "pr-md text-xs text-secondary" }, wn = /* @__PURE__ */ L({
1455
+ var Pn = D.object({
1456
+ currency: D.enum(r),
1457
+ precision: D.number().int().nonnegative(),
1458
+ type: D.enum(a),
1459
+ value: D.number()
1460
+ }).refine((e) => e.type !== a.PERCENTAGE || e.value <= 100, { path: ["value"] }), Fn = { class: "pr-md text-xs text-secondary" }, In = /* @__PURE__ */ F({
1370
1461
  __name: "InvoiceApplyDiscountDialog",
1371
1462
  props: { invoice: {} },
1372
1463
  emits: ["close"],
1373
1464
  setup(e, { emit: t }) {
1374
- let n = e, r = t, a = k(), o = Z(), s = l(), c = xn(), u = j(() => Mt([i.PERCENTAGE, i.AMOUNT])), d = Q({
1465
+ let n = e, r = t, i = O(), o = Q(), s = d(), c = Nn(), l = k(() => Rt([a.PERCENTAGE, a.AMOUNT])), u = $({
1375
1466
  initialState: {
1376
1467
  currency: n.invoice.grossAmount.currency,
1377
1468
  precision: n.invoice.grossAmount.precision,
1378
- type: i.PERCENTAGE,
1469
+ type: a.PERCENTAGE,
1379
1470
  value: null
1380
1471
  },
1381
- schema: Sn,
1472
+ schema: Pn,
1382
1473
  onSubmit: async (e) => {
1383
1474
  let t = await c.execute({
1384
1475
  body: e,
@@ -1393,59 +1484,59 @@ var Sn = O.object({
1393
1484
  onSubmitError: () => {
1394
1485
  o.unableToSave();
1395
1486
  }
1396
- }), f = d.register("value"), p = d.register("type"), m = j(() => p.modelValue.value === i.PERCENTAGE), h = j(() => p.modelValue.value === i.AMOUNT), g = j(() => s.getSymbol(n.invoice.grossAmount.currency));
1487
+ }), f = u.register("value"), p = u.register("type"), m = k(() => p.modelValue.value === a.PERCENTAGE), h = k(() => p.modelValue.value === a.AMOUNT), g = k(() => s.getSymbol(n.invoice.grossAmount.currency));
1397
1488
  function _(e) {
1398
- return a.t(`wise_invoicing.invoice.detail.global_discount.type.${e}`);
1489
+ return i.t(`wise_invoicing.invoice.detail.global_discount.type.${e}`);
1399
1490
  }
1400
- return (e, t) => (z(), M(B(q), {
1401
- form: B(d),
1491
+ return (e, t) => (L(), A(R(Et), {
1492
+ form: R(u),
1402
1493
  size: "sm",
1403
1494
  onClose: t[0] ||= (e) => r("close")
1404
1495
  }, {
1405
- default: V(() => [
1406
- I(B(bt), {
1407
- title: B(a).t("wise_invoicing.invoice.detail.line_items.global_discount"),
1408
- description: B(a).t("wise_invoicing.invoice.detail.global_discount.description"),
1409
- icon: B(le),
1496
+ default: z(() => [
1497
+ P(R(J), {
1498
+ title: R(i).t("wise_invoicing.invoice.detail.line_items.global_discount"),
1499
+ description: R(i).t("wise_invoicing.invoice.detail.global_discount.description"),
1500
+ icon: R(C),
1410
1501
  "is-description-visible": !0
1411
1502
  }, null, 8, [
1412
1503
  "title",
1413
1504
  "description",
1414
1505
  "icon"
1415
1506
  ]),
1416
- I(B(gt), null, {
1417
- default: V(() => [I(B(Ct), null, {
1418
- default: V(() => [I(B(St), {
1507
+ P(R(Ct), null, {
1508
+ default: z(() => [P(R(Ot), null, {
1509
+ default: z(() => [P(R(Dt), {
1419
1510
  lg: 2,
1420
1511
  sm: 1
1421
1512
  }, {
1422
- default: V(() => [
1423
- I(B(Dt), R(B(D)(B(p)), {
1513
+ default: z(() => [
1514
+ P(R(Mt), I(R(T)(R(p)), {
1424
1515
  "display-fn": _,
1425
1516
  "is-required": !0,
1426
- items: u.value,
1427
- label: B(a).t("wise_invoicing.invoice.detail.global_discount.type.label")
1517
+ items: l.value,
1518
+ label: R(i).t("wise_invoicing.invoice.detail.global_discount.type.label")
1428
1519
  }), null, 16, ["items", "label"]),
1429
- m.value ? (z(), M(B(Et), R({ key: 0 }, B(D)(B(f)), {
1430
- hint: B(a).t("wise_invoicing.invoice.detail.global_discount.amount.hint"),
1520
+ m.value ? (L(), A(R(jt), I({ key: 0 }, R(T)(R(f)), {
1521
+ hint: R(i).t("wise_invoicing.invoice.detail.global_discount.amount.hint"),
1431
1522
  "is-required": !0,
1432
- label: B(a).t("wise_invoicing.invoice.detail.global_discount.amount.label"),
1523
+ label: R(i).t("wise_invoicing.invoice.detail.global_discount.amount.label"),
1433
1524
  max: 100,
1434
1525
  min: 0,
1435
1526
  step: .01
1436
1527
  }), {
1437
- right: V(() => [...t[1] ||= [F("span", { class: "pr-md text-xs text-secondary" }, " % ", -1)]]),
1528
+ right: z(() => [...t[1] ||= [N("span", { class: "pr-md text-xs text-secondary" }, " % ", -1)]]),
1438
1529
  _: 1
1439
- }, 16, ["hint", "label"])) : N("", !0),
1440
- h.value ? (z(), M(B(Et), R({ key: 1 }, B(D)(B(f)), {
1530
+ }, 16, ["hint", "label"])) : j("", !0),
1531
+ h.value ? (L(), A(R(jt), I({ key: 1 }, R(T)(R(f)), {
1441
1532
  "is-required": !0,
1442
- label: B(a).t("wise_invoicing.invoice.detail.global_discount.amount.label"),
1533
+ label: R(i).t("wise_invoicing.invoice.detail.global_discount.amount.label"),
1443
1534
  min: .01,
1444
1535
  step: .01
1445
1536
  }), {
1446
- right: V(() => [F("span", Cn, tt(g.value.symbol), 1)]),
1537
+ right: z(() => [N("span", Fn, st(g.value.symbol), 1)]),
1447
1538
  _: 1
1448
- }, 16, ["label"])) : N("", !0)
1539
+ }, 16, ["label"])) : j("", !0)
1449
1540
  ]),
1450
1541
  _: 1
1451
1542
  })]),
@@ -1453,23 +1544,23 @@ var Sn = O.object({
1453
1544
  })]),
1454
1545
  _: 1
1455
1546
  }),
1456
- I(B(_t), null, {
1457
- right: V(() => [I(B(vt), { label: "cancel" }), I(B(yt), { label: B(a).t("wise_invoicing.invoice.detail.global_discount.confirm") }, null, 8, ["label"])]),
1547
+ P(R(K), null, {
1548
+ right: z(() => [P(R(q), { label: "cancel" }), P(R(wt), { label: R(i).t("wise_invoicing.invoice.detail.global_discount.confirm") }, null, 8, ["label"])]),
1458
1549
  _: 1
1459
1550
  })
1460
1551
  ]),
1461
1552
  _: 1
1462
1553
  }, 8, ["form"]));
1463
1554
  }
1464
- }), Tn = /* @__PURE__ */ L({
1555
+ }), Ln = /* @__PURE__ */ F({
1465
1556
  __name: "InvoiceLineItemsTableSection",
1466
1557
  props: {
1467
1558
  customFieldDefinitions: {},
1468
1559
  invoice: {}
1469
1560
  },
1470
1561
  setup(e) {
1471
- let t = e, n = j(() => t.invoice), r = h(), i = bn(), a = j(() => T.isEditable(t.invoice.status)), o = Ne({
1472
- isSaving: j(() => i.isLoading.value),
1562
+ let t = e, n = k(() => t.invoice), r = y(), i = Mn(), a = k(() => w.isEditable(t.invoice.status)), o = Re({
1563
+ isSaving: k(() => i.isLoading.value),
1473
1564
  billingDocument: () => n.value,
1474
1565
  canEdit: a,
1475
1566
  customFieldDefinitions: () => t.customFieldDefinitions,
@@ -1477,69 +1568,69 @@ var Sn = O.object({
1477
1568
  body: e,
1478
1569
  params: { invoiceUuid: t.invoice.uuid }
1479
1570
  })
1480
- }), s = Pt().create(wn);
1571
+ }), s = Bt().create(In);
1481
1572
  function c() {
1482
1573
  s.open({ invoice: t.invoice });
1483
1574
  }
1484
- return Ae(o), (e, n) => (z(), M(Le, null, {
1485
- default: V(() => [
1486
- I(Be, {
1487
- "show-apply-discount": B(r).isGlobalDiscountEnabled.value,
1575
+ return Fe(o), (e, n) => (L(), A(He, null, {
1576
+ default: z(() => [
1577
+ P(Ge, {
1578
+ "show-apply-discount": R(r).isGlobalDiscountEnabled.value,
1488
1579
  onApplyDiscount: c
1489
1580
  }, null, 8, ["show-apply-discount"]),
1490
- I(Oe),
1491
- I(Ee, { "billing-document": t.invoice }, null, 8, ["billing-document"]),
1492
- I(ke)
1581
+ P(Ne),
1582
+ P(je, { "billing-document": t.invoice }, null, 8, ["billing-document"]),
1583
+ P(Pe)
1493
1584
  ]),
1494
1585
  _: 1
1495
1586
  }));
1496
1587
  }
1497
- }), En = /* @__PURE__ */ L({
1588
+ }), Rn = /* @__PURE__ */ F({
1498
1589
  __name: "InvoiceDetailView",
1499
1590
  props: {
1500
1591
  customFieldDefinitions: {},
1501
1592
  invoice: {}
1502
1593
  },
1503
1594
  setup(e) {
1504
- let t = e, n = k(), r = $e(!1), i = j(() => [{
1595
+ let t = e, n = O(), r = at(!1), i = k(() => [{
1505
1596
  label: n.t("wise_invoicing.invoice.overview.title"),
1506
1597
  to: { name: "invoicing-invoice-overview" }
1507
1598
  }, { label: t.invoice.sequence ?? t.invoice.subject ?? n.t("wise_invoicing.invoice.detail.fallback_title") }]);
1508
- return (e, a) => (z(), M(ze, {
1599
+ return (e, a) => (L(), A(We, {
1509
1600
  "billing-document": t.invoice,
1510
1601
  breadcrumbs: i.value,
1511
- title: B(n).t("wise_invoicing.invoice.detail.fallback_title")
1602
+ title: R(n).t("wise_invoicing.invoice.detail.fallback_title")
1512
1603
  }, {
1513
- header: V(() => [I(Zt, {
1604
+ header: z(() => [P(rn, {
1514
1605
  invoice: t.invoice,
1515
1606
  "is-pdf-view-active": r.value,
1516
1607
  class: "w-full",
1517
1608
  onTogglePdfView: a[0] ||= (e) => r.value = !r.value
1518
1609
  }, null, 8, ["invoice", "is-pdf-view-active"])]),
1519
- default: V(() => [r.value ? (z(), M(Ie, {
1610
+ default: z(() => [r.value ? (L(), A(Ve, {
1520
1611
  key: 0,
1521
1612
  "billing-document": t.invoice,
1522
1613
  class: "w-full"
1523
- }, null, 8, ["billing-document"])) : (z(), P(A, { key: 1 }, [
1524
- I(Tn, {
1614
+ }, null, 8, ["billing-document"])) : (L(), M(nt, { key: 1 }, [
1615
+ P(Ln, {
1525
1616
  "custom-field-definitions": t.customFieldDefinitions,
1526
1617
  invoice: t.invoice
1527
1618
  }, null, 8, ["custom-field-definitions", "invoice"]),
1528
- B(T).isEditable(t.invoice.status) ? N("", !0) : (z(), M(yn, {
1619
+ R(w).isEditable(t.invoice.status) ? j("", !0) : (L(), A(jn, {
1529
1620
  key: 0,
1530
1621
  invoice: t.invoice,
1531
1622
  class: "w-full"
1532
1623
  }, null, 8, ["invoice"])),
1533
- I($t, {
1624
+ P(on, {
1534
1625
  invoice: t.invoice,
1535
1626
  class: "w-full"
1536
1627
  }, null, 8, ["invoice"]),
1537
- I(tn, {
1628
+ P(cn, {
1538
1629
  invoice: t.invoice,
1539
1630
  class: "w-full"
1540
1631
  }, null, 8, ["invoice"])
1541
1632
  ], 64))]),
1542
- sidebar: V(() => [I(ln, {
1633
+ sidebar: z(() => [P(bn, {
1543
1634
  "custom-field-definitions": t.customFieldDefinitions,
1544
1635
  invoice: t.invoice
1545
1636
  }, null, 8, ["custom-field-definitions", "invoice"])]),
@@ -1550,20 +1641,20 @@ var Sn = O.object({
1550
1641
  "title"
1551
1642
  ]));
1552
1643
  }
1553
- }), Dn = /* @__PURE__ */ L({
1644
+ }), zn = /* @__PURE__ */ F({
1554
1645
  __name: "InvoiceDetailViewDataProvider",
1555
1646
  props: { invoiceUuid: {} },
1556
1647
  setup(e) {
1557
- let t = e, n = k(), r = j(() => [{
1648
+ let t = e, n = O(), r = k(() => [{
1558
1649
  label: n.t("wise_invoicing.invoice.overview.title"),
1559
1650
  to: { name: "invoicing-invoice-overview" }
1560
- }]), i = qe(j(() => t.invoiceUuid)), a = de();
1561
- return (e, t) => (z(), M(Ve, {
1562
- "custom-field-definitions-query": B(a),
1563
- query: B(i),
1651
+ }]), i = Qe(k(() => t.invoiceUuid)), a = _e();
1652
+ return (e, t) => (L(), A(Ke, {
1653
+ "custom-field-definitions-query": R(a),
1654
+ query: R(i),
1564
1655
  "loading-breadcrumbs": r.value
1565
1656
  }, {
1566
- default: V(({ billingDocument: e, customFieldDefinitions: t }) => [I(En, {
1657
+ default: z(({ billingDocument: e, customFieldDefinitions: t }) => [P(Rn, {
1567
1658
  "custom-field-definitions": t,
1568
1659
  invoice: e
1569
1660
  }, null, 8, ["custom-field-definitions", "invoice"])]),
@@ -1576,4 +1667,4 @@ var Sn = O.object({
1576
1667
  }
1577
1668
  });
1578
1669
  //#endregion
1579
- export { Dn as default };
1670
+ export { zn as default };