@wisemen/wise-invoicing-web 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/{ApprovalReminderSettingsViewDataProvider-CD0Seawd.js → ApprovalReminderSettingsViewDataProvider-Dsp3ee3c.js} +4 -4
  2. package/dist/{BillingDocumentDetailViewDataProvider-BgVYrLu8.js → BillingDocumentDetailViewDataProvider-TX-tovKU.js} +1708 -1576
  3. package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
  4. package/dist/{BillingDocumentPdf-LYvPMzYT.js → BillingDocumentPdf-c-7N80u4.js} +266 -205
  5. package/dist/{CreditNoteDetailViewDataProvider-CpSIbMM2.js → CreditNoteDetailViewDataProvider-BNT0h67Q.js} +196 -189
  6. package/dist/{CreditNotePdfViewDataProvider-Dtnu9gS3.js → CreditNotePdfViewDataProvider-qgOuhUf_.js} +2 -2
  7. package/dist/{CustomFieldValueText-DA0aPKwC.js → CustomFieldValueText-BP4bKQh7.js} +68 -38
  8. package/dist/{DunningCaseDetailViewDataProvider-DutSCkco.js → DunningCaseDetailViewDataProvider-BNByfQTc.js} +13 -13
  9. package/dist/{DunningCaseOverviewView-D8o4VMQD.js → DunningCaseOverviewView-Dvwaw597.js} +23 -23
  10. package/dist/{DunningCaseReminderPdfViewDataProvider-I_ZQiAuK.js → DunningCaseReminderPdfViewDataProvider-D1avIVyK.js} +1 -1
  11. package/dist/{DunningCaseSendDialog-DGg7bXeZ.js → DunningCaseSendDialog-DwB_jFum.js} +17 -17
  12. package/dist/{InvoiceApprovalOutOfSyncIndicator-AJOQe8j8.js → InvoiceApprovalOutOfSyncIndicator-B_9HLzpt.js} +2 -2
  13. package/dist/{InvoiceApprovalOverviewView-C4MI4IqD.js → InvoiceApprovalOverviewView-jawT-M1t.js} +213 -213
  14. package/dist/{InvoiceApprovalStatusBadge-BJ3Q18bf.js → InvoiceApprovalStatusBadge-D6Sr6JmN.js} +4 -4
  15. package/dist/{InvoiceApproveDialogDataProvider-CMZ0zDZo.js → InvoiceApproveDialogDataProvider-Bwb8bP1e.js} +16 -16
  16. package/dist/{InvoiceDetailViewDataProvider-k1yIeHYP.js → InvoiceDetailViewDataProvider-B8mMYTQf.js} +648 -642
  17. package/dist/{InvoiceOverviewViewDataProvider-BrgmweRE.js → InvoiceOverviewViewDataProvider-CLgV-Jcv.js} +501 -501
  18. package/dist/{InvoicePdfView-CB8gx8TE.js → InvoicePdfView-C518PlHp.js} +2 -2
  19. package/dist/{InvoicePdfViewDataProvider-Cs4Gqa0h.js → InvoicePdfViewDataProvider-ClfBkHUZ.js} +3 -3
  20. package/dist/{InvoicePublicPdfViewDataProvider-BaSvVJ8W.js → InvoicePublicPdfViewDataProvider-CoXBj3Je.js} +3 -3
  21. package/dist/{InvoicePublicProFormaPdfViewDataProvider-S3N9E91M.js → InvoicePublicProFormaPdfViewDataProvider-WlVD7sw1.js} +3 -3
  22. package/dist/{InvoicingFileUploadProvider-BLBjPKqx.js → InvoicingFileUploadProvider-Dl1LvCPm.js} +2 -2
  23. package/dist/{IssuerSettingsViewDataProvider-BStn0jFI.js → IssuerSettingsViewDataProvider-CXyyCvoZ.js} +51 -46
  24. package/dist/PeppolSettingsViewDataProvider-Cptga29B.js +276 -0
  25. package/dist/{ReminderSettingsViewDataProvider-BotrOSmS.js → ReminderSettingsViewDataProvider-BZgzQIxM.js} +63 -63
  26. package/dist/{api.util-D6m6OY3_.js → api.util-CR2xLnNj.js} +785 -670
  27. package/dist/{billingDocumentDetail.transformer-Da-Nt4bI.js → billingDocumentDetail.transformer-D1f6Nv-U.js} +9 -2
  28. package/dist/client/index.d.ts +2 -2
  29. package/dist/client/sdk.gen.d.ts +4 -1
  30. package/dist/client/types.gen.d.ts +240 -56
  31. package/dist/client/zod.gen.d.ts +4206 -1343
  32. package/dist/composables/invoicingConfig.composable.d.ts +12 -0
  33. package/dist/{creditNoteDetail.query-Yb8TdZNm.js → creditNoteDetail.query-DGeG9_sO.js} +15 -15
  34. package/dist/{dist-DCbLgB6Y.js → dist-BMzyJZTx.js} +258 -114
  35. package/dist/{dist-BpDuRYDT.js → dist-DALBiuub.js} +134 -134
  36. package/dist/{documentTitle.composable-CRJjS6p-.js → documentTitle.composable-RvqrZTBa.js} +28 -26
  37. package/dist/{download.util-B5Q7KUC9.js → download.util-LyRpGWKA.js} +9 -0
  38. package/dist/{i18n.lib-DBxdqkbJ.js → i18n.lib-MOiHLIGc.js} +58 -2
  39. package/dist/index.d.ts +59 -2
  40. package/dist/index.js +232 -212
  41. package/dist/{invoice.service-DWDl9XRh.js → invoice.service-Fv4F4aZq.js} +39 -38
  42. package/dist/{invoiceApproval.service-Fwlxgd9o.js → invoiceApproval.service-DJvXagC7.js} +7 -7
  43. package/dist/{invoiceApprovalStatus.util-q-zHLdFV.js → invoiceApprovalStatus.util-B98WeAf0.js} +2 -2
  44. package/dist/{invoiceCustomer.service-DOexR54S.js → invoiceCustomer.service-CDyrtcwH.js} +6 -6
  45. package/dist/{invoiceDetail.query-B5w0Vlsy.js → invoiceDetail.query-UHE0NCLh.js} +1 -1
  46. package/dist/{invoiceIndexCache.util-CUlp4R7R.js → invoiceIndexCache.util-CLM7FO6z.js} +3 -3
  47. package/dist/{invoicingConfig.composable-CaWQMTP1.js → invoicingConfig.composable-UC7tGtBj.js} +14 -10
  48. package/dist/{issuerSettings.query-BHuLjV9P.js → issuerSettings.query-CoiXblSm.js} +2 -2
  49. package/dist/libs/i18n.lib.d.ts +56 -0
  50. package/dist/locales/en-US.json.d.ts +29 -1
  51. package/dist/locales/nl-BE.json.d.ts +29 -1
  52. package/dist/models/billing-document/billingDocumentAdvancePayment.util.d.ts +9 -0
  53. package/dist/models/billing-document/billingDocumentAdvancePayment.util.spec.d.ts +1 -0
  54. package/dist/models/billing-document/billingDocumentDetail.model.d.ts +1 -0
  55. package/dist/modules/custom-field/components/CustomFieldList.vue.d.ts +0 -1
  56. package/dist/modules/custom-field/components/customFieldList.spec.d.ts +1 -0
  57. package/dist/modules/custom-field/components/customFieldTypeIcon.d.ts +16 -0
  58. package/dist/modules/custom-field/components/customFieldValueText.spec.d.ts +1 -0
  59. package/dist/modules/custom-field/composables/customFieldReferenceLinks.composable.d.ts +16 -0
  60. package/dist/modules/custom-field/composables/customFieldReferenceLinks.composable.spec.d.ts +1 -0
  61. package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.model.d.ts +6 -0
  62. package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.transformer.spec.d.ts +1 -0
  63. package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.util.d.ts +6 -0
  64. package/dist/modules/custom-field/models/custom-field-definition/customFieldViewKey.model.d.ts +9 -0
  65. package/dist/modules/custom-field/models/custom-field-value/customFieldValue.model.d.ts +1 -1
  66. package/dist/modules/custom-field/models/custom-field-value/customFieldValue.util.d.ts +10 -0
  67. package/dist/modules/custom-field/test/builders/customFieldDefinition.builder.d.ts +3 -1
  68. package/dist/modules/invoice/models/invoice/pdf/invoicePdfDetail.model.d.ts +1 -0
  69. package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailPaymentsTableColumns.composable.d.ts +1 -1
  70. package/dist/modules/invoice-delivery/api/mutations/peppolConnectionUpdate.mutation.d.ts +6 -0
  71. package/dist/modules/invoice-delivery/api/queries/peppolConnection.query.d.ts +1 -0
  72. package/dist/modules/invoice-delivery/api/query-keys/invoiceDelivery.queryKeys.d.ts +6 -0
  73. package/dist/modules/invoice-delivery/api/services/peppolConnection.service.d.ts +8 -0
  74. package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormApiKeyField.vue.d.ts +8 -0
  75. package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormCompanyField.vue.d.ts +11 -0
  76. package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormEnabledField.vue.d.ts +7 -0
  77. package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormProviderField.vue.d.ts +9 -0
  78. package/dist/modules/invoice-delivery/index.d.ts +1 -0
  79. package/dist/modules/invoice-delivery/models/deliveryReason.util.d.ts +6 -0
  80. package/dist/modules/invoice-delivery/models/peppolConnection.model.d.ts +18 -0
  81. package/dist/modules/invoice-delivery/models/peppolConnection.transformer.d.ts +9 -0
  82. package/dist/modules/invoice-delivery/models/peppolConnectionForm.model.d.ts +9 -0
  83. package/dist/modules/invoice-delivery/use-cases/settings/views/PeppolSettingsView.vue.d.ts +7 -0
  84. package/dist/modules/invoice-delivery/use-cases/settings/views/PeppolSettingsViewDataProvider.vue.d.ts +3 -0
  85. package/dist/modules/settings/routes/settings.routes.d.ts +7 -0
  86. package/dist/{reminderConfig.query-C4J6m4ER.js → reminderConfig.query-aRFzY6uZ.js} +22 -22
  87. package/dist/style.css +1 -1
  88. package/dist/types/queryKey.type.d.ts +2 -1
  89. package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +114 -0
  90. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +57 -36
  91. package/dist/ui/customer-invoice-list/composables/customerInvoiceTableColumns.composable.d.ts +6 -1
  92. package/dist/ui/customer-invoice-list/composables/customerInvoiceTableColumns.composable.spec.d.ts +1 -0
  93. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { t as e } from "./DataProvider-C3uEds9v.js";
2
- import { t } from "./InvoicePdfView-CB8gx8TE.js";
3
- import { t as n } from "./creditNoteDetail.query-Yb8TdZNm.js";
2
+ import { t } from "./InvoicePdfView-C518PlHp.js";
3
+ import { t as n } from "./creditNoteDetail.query-DGeG9_sO.js";
4
4
  import { useI18n as r } from "vue-i18n";
5
5
  import { computed as i, createBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, openBlock as l, unref as u, withCtx as d } from "vue";
6
6
  import { UIText as f } from "@wisemen/vue-core-design-system";
@@ -1,13 +1,17 @@
1
- import { Y as e, t } from "./api.util-D6m6OY3_.js";
2
- import { b as n, u as r, y as i } from "./documentTitle.composable-CRJjS6p-.js";
1
+ import { Z as e, t } from "./api.util-CR2xLnNj.js";
2
+ import { b as n, u as r, y as i } from "./documentTitle.composable-RvqrZTBa.js";
3
3
  import { r as a } from "./useCurrencyFormat.composable-MtZaqKnO.js";
4
- import { n as o } from "./dist-Cdbpkd3Y.js";
5
- import { useI18n as s } from "vue-i18n";
6
- import { computed as c, createBlock as l, defineComponent as u, normalizeClass as d, openBlock as f, unref as p } from "vue";
7
- import { useQuery as m } from "@wisemen/vue-core-api-utils";
8
- import { UIText as h } from "@wisemen/vue-core-design-system";
9
- //#region src/modules/custom-field/models/custom-field-definition/customFieldDefinition.transformer.ts
10
- var g = class {
4
+ import { n as o } from "./invoicingConfig.composable-UC7tGtBj.js";
5
+ import { n as s } from "./dist-Cdbpkd3Y.js";
6
+ import { useI18n as c } from "vue-i18n";
7
+ import { computed as l, createBlock as u, createTextVNode as d, defineComponent as f, normalizeClass as p, openBlock as m, toDisplayString as h, unref as g, withCtx as _ } from "vue";
8
+ import { useQuery as v } from "@wisemen/vue-core-api-utils";
9
+ import { RouterLink as y } from "vue-router";
10
+ import { UIText as b } from "@wisemen/vue-core-design-system";
11
+ //#region src/modules/custom-field/models/custom-field-definition/customFieldViewKey.model.ts
12
+ var x = /* @__PURE__ */ function(e) {
13
+ return e.CREDIT_NOTE_DETAIL = "credit-note-detail", e.INVOICE_DETAIL = "invoice-detail", e.INVOICE_OVERVIEW = "invoice-overview", e;
14
+ }({}), S = class {
11
15
  static fromDto(e) {
12
16
  return {
13
17
  uuid: e.uuid,
@@ -22,28 +26,41 @@ var g = class {
22
26
  key: e.key,
23
27
  label: e.label,
24
28
  rules: e.rules,
25
- type: e.type
29
+ type: e.type,
30
+ views: e.views.filter((e) => Object.values(x).includes(e.key)).map((e) => ({
31
+ key: e.key,
32
+ order: e.order
33
+ }))
26
34
  };
27
35
  }
28
- }, _ = class {
36
+ }, C = class {
29
37
  static async getAll(n) {
30
- return (await t.fromPromise(e({ query: n?.entityTypes === void 0 ? void 0 : { filter: { entityTypes: n.entityTypes } } }))).map((e) => e.data.map(g.fromDto));
38
+ return (await t.fromPromise(e({ query: n?.entityTypes === void 0 ? void 0 : { filter: { entityTypes: n.entityTypes } } }))).map((e) => e.data.map(S.fromDto));
31
39
  }
32
40
  };
33
41
  //#endregion
34
42
  //#region src/modules/custom-field/api/queries/customFieldDefinitionIndex.query.ts
35
- function v(e) {
36
- return m("customFieldDefinitionIndex", {
43
+ function w(e) {
44
+ return v("customFieldDefinitionIndex", {
37
45
  params: { queryParams: e },
38
- queryFn: () => _.getAll(e?.value)
46
+ queryFn: () => C.getAll(e?.value)
39
47
  });
40
48
  }
41
49
  //#endregion
42
50
  //#region src/modules/custom-field/models/custom-field-definition/customFieldDefinition.util.ts
43
- var y = class {
51
+ var T = class {
44
52
  static filterByEntityType(e, t) {
45
53
  return e.filter((e) => e.entityType === t);
46
54
  }
55
+ static filterByView(e, t) {
56
+ return e.flatMap((e) => {
57
+ let n = e.views.find((e) => e.key === t);
58
+ return n === void 0 ? [] : [{
59
+ definition: e,
60
+ order: n.order
61
+ }];
62
+ }).toSorted((e, t) => e.order - t.order).map(({ definition: e }) => e);
63
+ }
47
64
  static getChoiceLabel(e, t, n) {
48
65
  let r = e.choices.find((e) => e.value === t);
49
66
  return r === void 0 ? t : this.getLocalizedValue(r.label, n) || t;
@@ -55,7 +72,7 @@ var y = class {
55
72
  let n = t.toLowerCase(), r = n.split("-")[0], i = e.items.find((e) => e.locale.toLowerCase() === n), a = e.items.find((e) => e.locale.toLowerCase().split("-")[0] === r);
56
73
  return i?.value ?? a?.value ?? e.items[0]?.value ?? "";
57
74
  }
58
- }, b = {
75
+ }, E = {
59
76
  [n.CREDITED]: {
60
77
  isEditable: !1,
61
78
  isRefreshable: !1,
@@ -140,21 +157,21 @@ var y = class {
140
157
  tone: "purple",
141
158
  translationKey: "wise_invoicing.invoice.status.sent"
142
159
  }
143
- }, x = {
144
- [i.DRAFT]: b[n.DRAFT],
145
- [i.FINALIZED]: b[n.FINALIZED],
146
- [i.READY]: b[n.READY]
147
- }, S = class {
160
+ }, D = {
161
+ [i.DRAFT]: E[n.DRAFT],
162
+ [i.FINALIZED]: E[n.FINALIZED],
163
+ [i.READY]: E[n.READY]
164
+ }, O = class {
148
165
  static getLifecycleMetadata(e) {
149
- return x[e];
166
+ return D[e];
150
167
  }
151
168
  static getMetadata(e) {
152
- return b[e];
169
+ return E[e];
153
170
  }
154
171
  static isEditable(e) {
155
- return b[e].isEditable;
172
+ return E[e].isEditable;
156
173
  }
157
- }, C = /* @__PURE__ */ u({
174
+ }, k = /* @__PURE__ */ f({
158
175
  __name: "CustomFieldValueText",
159
176
  props: {
160
177
  definition: {},
@@ -162,28 +179,41 @@ var y = class {
162
179
  value: {}
163
180
  },
164
181
  setup(e) {
165
- let t = e, n = s(), i = a(), u = o(), m = c(() => {
182
+ let t = e, n = c(), i = a(), f = s(), v = o(), x = l(() => {
166
183
  switch (t.value.type) {
167
184
  case r.BOOLEAN: return t.value.value ? n.t("wise_invoicing.common.yes") : n.t("wise_invoicing.common.no");
168
- case r.DATE: return t.value.value === "infinity" ? n.t("wise_invoicing.custom_field.date.infinity") : t.value.value === "-infinity" ? n.t("wise_invoicing.custom_field.date.negative_infinity") : u.formatPlainDate(t.value.value);
185
+ case r.DATE: return t.value.value === "infinity" ? n.t("wise_invoicing.custom_field.date.infinity") : t.value.value === "-infinity" ? n.t("wise_invoicing.custom_field.date.negative_infinity") : f.formatPlainDate(t.value.value);
169
186
  case r.MONETARY: return i.formatMonetary(t.value.value);
170
- case r.MULTI_SELECT: return t.value.value.map((e) => _(e)).join(", ");
187
+ case r.MULTI_SELECT: return t.value.value.map((e) => w(e)).join(", ");
171
188
  case r.NUMBER: return new Intl.NumberFormat(n.locale.value, { maximumFractionDigits: 20 }).format(t.value.value);
172
- case r.SINGLE_SELECT: return _(t.value.value);
189
+ case r.REFERENCE: return t.value.value;
190
+ case r.SINGLE_SELECT: return w(t.value.value);
173
191
  case r.TEXT: return t.value.value;
174
192
  case r.TEXT_ARRAY: return t.value.value.join(", ");
175
- case r.TIMESTAMP: return u.toDateTime(t.value.value);
193
+ case r.TIMESTAMP: return f.toDateTime(t.value.value);
176
194
  default: throw TypeError("Unsupported custom field value type");
177
195
  }
178
- }), g = c(() => t.size === "md" ? "min-w-0 text-sm/5 text-primary" : "min-w-0 text-xs text-primary");
179
- function _(e) {
180
- return t.definition === void 0 ? e : y.getChoiceLabel(t.definition, e, n.locale.value);
196
+ }), S = l(() => t.value.type !== r.REFERENCE || t.definition === void 0 ? null : v.getCustomFieldReferenceRoute({
197
+ entityType: t.definition.entityType,
198
+ key: t.definition.key,
199
+ value: t.value.value
200
+ })), C = l(() => t.size === "md" ? "min-w-0 text-sm/5 text-primary" : "min-w-0 text-xs text-primary");
201
+ function w(e) {
202
+ return t.definition === void 0 ? e : T.getChoiceLabel(t.definition, e, n.locale.value);
181
203
  }
182
- return (e, t) => (f(), l(p(h), {
183
- text: m.value || "-",
184
- class: d(g.value)
204
+ return (e, r) => S.value !== null && t.definition !== void 0 ? (m(), u(g(y), {
205
+ key: 0,
206
+ to: S.value,
207
+ class: p([C.value, "underline underline-offset-2 transition-colors hover:text-brand-700 focus-visible:text-brand-700 focus-visible:outline-none"])
208
+ }, {
209
+ default: _(() => [d(h(g(T).getLabel(t.definition, g(n).locale.value)), 1)]),
210
+ _: 1
211
+ }, 8, ["to", "class"])) : (m(), u(g(b), {
212
+ key: 1,
213
+ text: x.value || "-",
214
+ class: p(C.value)
185
215
  }, null, 8, ["text", "class"]));
186
216
  }
187
217
  });
188
218
  //#endregion
189
- export { v as i, S as n, y as r, C as t };
219
+ export { x as a, w as i, O as n, T as r, k as t };
@@ -1,11 +1,11 @@
1
1
  import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import "./api.util-D6m6OY3_.js";
3
- import { T as t, t as n } from "./documentTitle.composable-CRJjS6p-.js";
2
+ import "./api.util-CR2xLnNj.js";
3
+ import { E as t, t as n } from "./documentTitle.composable-RvqrZTBa.js";
4
4
  import { r } from "./useCurrencyFormat.composable-MtZaqKnO.js";
5
- import { n as i } from "./invoicingConfig.composable-CaWQMTP1.js";
6
- import { n as a } from "./reminderConfig.query-C4J6m4ER.js";
7
- import { D as o, Y as ee, at as te, et as s, ft as c, gt as l } from "./dist-DCbLgB6Y.js";
8
- import { a as u, i as ne, n as re, o as d, r as ie, t as ae } from "./DunningCaseSendDialog-DGg7bXeZ.js";
5
+ import { n as i } from "./invoicingConfig.composable-UC7tGtBj.js";
6
+ import { n as a } from "./reminderConfig.query-aRFzY6uZ.js";
7
+ import { N as o, Tt as s, it as ee, lt as c, mt as te, xt as l } from "./dist-BMzyJZTx.js";
8
+ import { a as u, i as ne, n as re, o as d, r as ie, t as ae } from "./DunningCaseSendDialog-DwB_jFum.js";
9
9
  import { n as f } from "./customerUuid.model-ClN4Vi9n.js";
10
10
  import { n as oe } from "./dist-Cdbpkd3Y.js";
11
11
  import { t as p } from "./DataProvider-C3uEds9v.js";
@@ -220,7 +220,7 @@ var ye = { class: "flex flex-col gap-4xl" }, be = { class: "flex flex-col gap-lg
220
220
  b("p", Ee, O(k(f).t("module.dunning_case.detail.last_synced", { date: k(I).toDateTime(d.dunningCase.updatedAt) })), 1)
221
221
  ]), d.dunningCase.canSendReminder || J.value === "sending" ? (T(), _(k(N), {
222
222
  key: 0,
223
- "icon-right": k(l),
223
+ "icon-right": k(s),
224
224
  "is-loading": J.value === "sending",
225
225
  label: k(f).t("module.dunning_case.detail.send"),
226
226
  class: "w-fit self-start lg:ml-auto",
@@ -232,7 +232,7 @@ var ye = { class: "flex flex-col gap-4xl" }, be = { class: "flex flex-col gap-lg
232
232
  "label"
233
233
  ])) : d.dunningCase.canRetryReminder ? (T(), _(k(N), {
234
234
  key: 1,
235
- "icon-right": k(l),
235
+ "icon-right": k(s),
236
236
  "is-loading": k(B).result.value.isLoading(),
237
237
  label: k(f).t("module.dunning_case.detail.retry"),
238
238
  class: "w-fit self-start lg:ml-auto",
@@ -286,7 +286,7 @@ var ye = { class: "flex flex-col gap-4xl" }, be = { class: "flex flex-col gap-lg
286
286
  _: 2
287
287
  }, 1024))), 128))]),
288
288
  b("div", ze, [b("span", Be, [S(k(o), { class: "size-(--spacing-xl) text-brand-700" })]), b("div", Ve, [b("p", He, O(k(f).t("module.dunning_case.detail.next_reminder")), 1), b("p", Ue, O(d.dunningCase.nextReminderOn === null ? k(f).t("module.dunning_case.overview.not_scheduled") : k(I).formatPlainDate(d.dunningCase.nextReminderOn)), 1)])]),
289
- b("div", We, [b("span", Ge, [S(k(s), { class: "size-(--spacing-xl) text-brand-700" })]), b("div", null, [
289
+ b("div", We, [b("span", Ge, [S(k(c), { class: "size-(--spacing-xl) text-brand-700" })]), b("div", null, [
290
290
  b("p", Ke, O(k(f).t("module.dunning_case.detail.invoices")), 1),
291
291
  b("p", qe, O(d.dunningCase.invoices.length), 1),
292
292
  q.value > 0 ? (T(), y("p", Je, O(k(f).t("module.dunning_case.detail.protested_count", { count: q.value })), 1)) : v("", !0)
@@ -380,7 +380,7 @@ var ye = { class: "flex flex-col gap-4xl" }, be = { class: "flex flex-col gap-lg
380
380
  amount: k(P).formatMonetary(e.grossAmount),
381
381
  date: k(I).formatPlainDate(e.finalizedOn),
382
382
  sequence: e.sequence
383
- })), 1)]))), 128))])])], 2)])], 10, xt)) : v("", !0)], 64))), 128))])])) : (T(), y("div", Tt, [b("span", Et, [S(k(c), { class: "size-(--spacing-xl) text-primary" })]), b("p", Dt, O(k(f).t(V.value === "overdue" ? "module.dunning_case.detail.empty_overdue" : "module.dunning_case.detail.empty_outstanding")), 1)]))]),
383
+ })), 1)]))), 128))])])], 2)])], 10, xt)) : v("", !0)], 64))), 128))])])) : (T(), y("div", Tt, [b("span", Et, [S(k(l), { class: "size-(--spacing-xl) text-primary" })]), b("p", Dt, O(k(f).t(V.value === "overdue" ? "module.dunning_case.detail.empty_overdue" : "module.dunning_case.detail.empty_outstanding")), 1)]))]),
384
384
  V.value === "overdue" ? (T(), y("div", Ot, [b("div", kt, [b("span", null, O(k(f).t("module.dunning_case.detail.total_outstanding")), 1), b("span", At, O(k(P).formatMonetary(X.value)), 1)]), b("div", jt, [b("span", null, O(d.dunningCase.level === 0 ? k(f).t("module.dunning_case.detail.reminder_fee") : k(f).t("module.dunning_case.detail.fee", { level: d.dunningCase.level })), 1), b("span", Mt, O(k(P).formatMonetary(d.dunningCase.totalFee)), 1)])])) : v("", !0)
385
385
  ])]), b("aside", Nt, [b("h2", Pt, O(k(f).t("module.dunning_case.detail.activity")), 1), b("ol", Ft, [(T(!0), y(h, null, D(W.value, (e, t) => (T(), y("li", {
386
386
  key: e.key,
@@ -396,13 +396,13 @@ var ye = { class: "flex flex-col gap-4xl" }, be = { class: "flex flex-col gap-lg
396
396
  })) : e.type === "payment" ? (T(), _(k(te), {
397
397
  key: 1,
398
398
  class: "size-(--spacing-lg) text-success-primary"
399
- })) : e.type === "credit-note" ? (T(), _(k(s), {
399
+ })) : e.type === "credit-note" ? (T(), _(k(c), {
400
400
  key: 2,
401
401
  class: "size-(--spacing-lg) text-secondary"
402
- })) : e.type === "reminder-sent" ? (T(), _(k(l), {
402
+ })) : e.type === "reminder-sent" ? (T(), _(k(s), {
403
403
  key: 3,
404
404
  class: "size-(--spacing-lg) text-brand-tertiary"
405
- })) : e.type === "case-closed" ? (T(), _(k(c), {
405
+ })) : e.type === "case-closed" ? (T(), _(k(l), {
406
406
  key: 4,
407
407
  class: "size-(--spacing-lg) text-success-primary"
408
408
  })) : v("", !0)], 2), t < W.value.length - 1 ? (T(), y("span", Lt)) : v("", !0)]), b("div", { class: w([{ "pb-xl": t < W.value.length - 1 }, "pt-xs"]) }, [b("p", Rt, O(Jt(e)), 1), b("p", zt, O(Yt(e)), 1)], 2)]))), 128))])])])
@@ -1,13 +1,13 @@
1
1
  import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { t } from "./documentTitle.composable-CRJjS6p-.js";
2
+ import { t } from "./documentTitle.composable-RvqrZTBa.js";
3
3
  import { r as n } from "./useCurrencyFormat.composable-MtZaqKnO.js";
4
- import { n as r } from "./invoicingConfig.composable-CaWQMTP1.js";
4
+ import { n as r } from "./invoicingConfig.composable-UC7tGtBj.js";
5
5
  import { t as i } from "./search.composable-CU9OpyUB.js";
6
- import { n as a, r as o } from "./reminderConfig.query-C4J6m4ER.js";
7
- import { L as s, O as c, U as l, c as u, gt as d, l as f, mt as p } from "./dist-DCbLgB6Y.js";
8
- import { a as m, n as h, r as g, s as _, t as v } from "./DunningCaseSendDialog-DGg7bXeZ.js";
6
+ import { n as a, r as o } from "./reminderConfig.query-aRFzY6uZ.js";
7
+ import { Ct as s, P as c, Q as l, Tt as u, W as d, l as f, u as p } from "./dist-BMzyJZTx.js";
8
+ import { a as m, n as h, r as g, s as _, t as v } from "./DunningCaseSendDialog-DwB_jFum.js";
9
9
  import { n as ee } from "./customerUuid.model-ClN4Vi9n.js";
10
- import { f as y, i as b, n as te, o as ne, r as x, s as re } from "./dist-BpDuRYDT.js";
10
+ import { f as y, i as b, n as te, o as ne, r as x, s as re } from "./dist-DALBiuub.js";
11
11
  import { z as S } from "zod";
12
12
  import { useI18n as C } from "vue-i18n";
13
13
  import { Fragment as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createVNode as A, defineComponent as j, nextTick as M, normalizeClass as N, normalizeStyle as ie, onMounted as ae, openBlock as P, ref as F, renderList as I, toDisplayString as L, unref as R, watch as oe, withCtx as z } from "vue";
@@ -49,7 +49,7 @@ function ye() {
49
49
  let r = e.targetedModelOfTypeOrThrow("DunningCase"), i = n.getCustomerDetailRoute(r.customer.uuid);
50
50
  i !== null && t.push(i);
51
51
  },
52
- icon: () => f
52
+ icon: () => p
53
53
  });
54
54
  }
55
55
  //#endregion
@@ -67,7 +67,7 @@ function be() {
67
67
  params: { dunningCaseUuid: n.uuid }
68
68
  });
69
69
  },
70
- icon: () => s
70
+ icon: () => d
71
71
  });
72
72
  }
73
73
  //#endregion
@@ -232,7 +232,7 @@ var Le = { class: "flex w-full items-center justify-end gap-xs" }, Re = /* @__PU
232
232
  "viewCustomer"
233
233
  ],
234
234
  setup(e, { emit: t }) {
235
- let n = e, i = t, a = C(), o = r(), s = T(() => o.getCustomerDetailRoute(n.item.customer.uuid)), l = T(() => n.item.blockedReason !== null), u = T(() => m(n.item.latestCreatedReminder)), f = T(() => n.item.canRetryReminder ? a.t("module.dunning_case.overview.retry") : l.value ? a.t("module.dunning_case.overview.blocked") : n.item.nextReminderOn === null ? a.t("module.dunning_case.overview.not_scheduled") : a.t("module.dunning_case.overview.send"));
235
+ let n = e, i = t, a = C(), o = r(), s = T(() => o.getCustomerDetailRoute(n.item.customer.uuid)), l = T(() => n.item.blockedReason !== null), d = T(() => m(n.item.latestCreatedReminder)), f = T(() => n.item.canRetryReminder ? a.t("module.dunning_case.overview.retry") : l.value ? a.t("module.dunning_case.overview.blocked") : n.item.nextReminderOn === null ? a.t("module.dunning_case.overview.not_scheduled") : a.t("module.dunning_case.overview.send"));
236
236
  return (t, n) => (P(), E(R(Z), null, {
237
237
  default: z(() => [A(R(ue), { class: "w-full" }, {
238
238
  default: z(() => [k("div", Le, [l.value && s.value !== null ? (P(), E(R(G), {
@@ -244,9 +244,9 @@ var Le = { class: "flex w-full items-center justify-end gap-xs" }, Re = /* @__PU
244
244
  onClick: n[0] ||= (e) => i("viewCustomer")
245
245
  }, null, 8, ["icon-right", "label"])) : (P(), E(R(G), {
246
246
  key: 1,
247
- "icon-right": e.item.canSendReminder || e.item.canRetryReminder ? R(d) : void 0,
247
+ "icon-right": e.item.canSendReminder || e.item.canRetryReminder ? R(u) : void 0,
248
248
  "is-disabled": l.value || !e.item.canSendReminder && !e.item.canRetryReminder,
249
- "is-loading": u.value === "sending",
249
+ "is-loading": d.value === "sending",
250
250
  label: f.value,
251
251
  size: "sm",
252
252
  variant: "secondary",
@@ -534,7 +534,7 @@ var $e = /* @__PURE__ */ j({
534
534
  function s(e) {
535
535
  return Object.hasOwn(a, e);
536
536
  }
537
- let c = C(), l = ge(), u = Qe(), f = F(null), p = F(!0), m = T(() => f.value?.meta.processed ?? 0);
537
+ let c = C(), l = ge(), d = Qe(), f = F(null), p = F(!0), m = T(() => f.value?.meta.processed ?? 0);
538
538
  function h(e) {
539
539
  let t = e.errors.at(0)?.errors.at(0)?.code;
540
540
  return t !== void 0 && s(t) ? c.t(a[t]) : c.t("module.dunning_case.bulk_send.skip_reason.unknown");
@@ -553,7 +553,7 @@ var $e = /* @__PURE__ */ j({
553
553
  let _ = ve({
554
554
  schema: S.object({}),
555
555
  onSubmit: async () => {
556
- let e = await u.execute({ params: { queryParams: i } });
556
+ let e = await d.execute({ params: { queryParams: i } });
557
557
  if (e.isErr()) {
558
558
  l.apiError(e.error);
559
559
  return;
@@ -594,7 +594,7 @@ var $e = /* @__PURE__ */ j({
594
594
  title: p.value ? R(c).t("module.dunning_case.bulk_send.title") : R(c).t("module.dunning_case.bulk_send.confirm_question", { count: m.value }),
595
595
  description: R(c).t("module.dunning_case.bulk_send.description"),
596
596
  "has-separator": !1,
597
- icon: R(d)
597
+ icon: R(u)
598
598
  }, null, 8, [
599
599
  "title",
600
600
  "description",
@@ -615,7 +615,7 @@ var $e = /* @__PURE__ */ j({
615
615
  }),
616
616
  A(R(q), { "has-separator": !1 }, {
617
617
  right: z(() => [A(R(J)), A(R(Y), {
618
- "icon-right": R(d),
618
+ "icon-right": R(u),
619
619
  "is-disabled": p.value || m.value === 0,
620
620
  "is-loading": R(_).isSubmitting.value,
621
621
  label: R(c).t("module.dunning_case.bulk_send.confirm", { count: m.value }),
@@ -642,24 +642,24 @@ var $e = /* @__PURE__ */ j({
642
642
  }, _t = { class: "relative flex min-h-0 flex-1 flex-col" }, vt = /*@__PURE__*/ j({
643
643
  __name: "DunningCaseOverviewView",
644
644
  setup(e) {
645
- let n = C(), i = he(), a = ge(), o = H(), c = t(), f = r(), m = g(), h = F("all"), _ = T(() => [
645
+ let n = C(), i = he(), a = ge(), o = H(), c = t(), p = r(), m = g(), h = F("all"), _ = T(() => [
646
646
  {
647
647
  icon: l,
648
648
  key: "all",
649
649
  label: n.t("module.dunning_case.overview.filter_all")
650
650
  },
651
651
  {
652
- icon: u,
652
+ icon: f,
653
653
  key: "level-1",
654
654
  label: n.t("module.dunning_case.level.reminder", { level: 1 })
655
655
  },
656
656
  {
657
- icon: u,
657
+ icon: f,
658
658
  key: "level-2",
659
659
  label: n.t("module.dunning_case.level.reminder", { level: 2 })
660
660
  },
661
661
  {
662
- icon: u,
662
+ icon: f,
663
663
  key: "level-3",
664
664
  label: n.t("module.dunning_case.level.reminder", { level: 3 })
665
665
  }
@@ -688,7 +688,7 @@ var $e = /* @__PURE__ */ j({
688
688
  i.create(ot, { props: { onSent: V() } }).open();
689
689
  }
690
690
  function J(e) {
691
- let t = f.getCustomerDetailRoute(e.customer.uuid);
691
+ let t = p.getCustomerDetailRoute(e.customer.uuid);
692
692
  t !== null && o.push(t);
693
693
  }
694
694
  function Y(e) {
@@ -710,12 +710,12 @@ var $e = /* @__PURE__ */ j({
710
710
  }, {
711
711
  default: z(() => [k("div", st, [
712
712
  k("div", ct, [k("div", null, [k("h2", lt, L(R(n).t("module.dunning_case.title")), 1), k("p", ut, L(R(n).t("module.dunning_case.overview.description")), 1)]), k("div", dt, [A(R(G), {
713
- "icon-left": y.value ? R(p) : R(s),
713
+ "icon-left": y.value ? R(s) : R(d),
714
714
  label: R(n).t(y.value ? "module.dunning_case.overview.hide_metrics" : "module.dunning_case.overview.show_metrics"),
715
715
  variant: "secondary",
716
716
  onClick: t[0] ||= (e) => y.value = !y.value
717
717
  }, null, 8, ["icon-left", "label"]), A(R(G), {
718
- "icon-right": R(d),
718
+ "icon-right": R(u),
719
719
  label: R(n).t("module.dunning_case.overview.send_all"),
720
720
  onClick: q
721
721
  }, null, 8, ["icon-right", "label"])])]),
@@ -753,7 +753,7 @@ var $e = /* @__PURE__ */ j({
753
753
  })]),
754
754
  _: 1
755
755
  }, 8, ["modelValue", "aria-label"]), A(R(G), {
756
- "icon-right": R(d),
756
+ "icon-right": R(u),
757
757
  label: R(n).t("module.dunning_case.overview.send_all"),
758
758
  size: "sm",
759
759
  onClick: q
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { ot as t, t as n } from "./api.util-D6m6OY3_.js";
2
+ import { lt as t, t as n } from "./api.util-CR2xLnNj.js";
3
3
  import { r } from "./useCurrencyFormat.composable-MtZaqKnO.js";
4
4
  import { n as i } from "./src-DUSgQTKr.js";
5
5
  import { n as a, t as o } from "./address.transformer-jGddczLV.js";
@@ -1,8 +1,8 @@
1
- import { Q as e, Z as t, t as n } from "./api.util-D6m6OY3_.js";
1
+ import { $ as e, et as t, t as n } from "./api.util-CR2xLnNj.js";
2
2
  import { r } from "./useCurrencyFormat.composable-MtZaqKnO.js";
3
- import { n as i } from "./invoicingConfig.composable-CaWQMTP1.js";
4
- import { n as a, r as o, t as s } from "./reminderConfig.query-C4J6m4ER.js";
5
- import { gt as c, p as l, rt as u } from "./dist-DCbLgB6Y.js";
3
+ import { n as i } from "./invoicingConfig.composable-UC7tGtBj.js";
4
+ import { n as a, r as o, t as s } from "./reminderConfig.query-aRFzY6uZ.js";
5
+ import { Tt as c, ft as l, m as u } from "./dist-BMzyJZTx.js";
6
6
  import { t as d } from "./customerUuid.model-ClN4Vi9n.js";
7
7
  import { z as f } from "zod";
8
8
  import { useI18n as p } from "vue-i18n";
@@ -15,10 +15,10 @@ import { UIBadge as P, UIColumnLayout as F, UIDialogBody as I, UIDialogFooter as
15
15
  import { useForm as U } from "formango";
16
16
  //#region src/modules/dunning-case/api/services/dunningCaseCustomer.service.ts
17
17
  var W = class {
18
- static async getAll(e, r) {
19
- return (await n.fromPromise(t({ query: {
18
+ static async getAll(t, r) {
19
+ return (await n.fromPromise(e({ query: {
20
20
  pagination: r,
21
- search: e
21
+ search: t
22
22
  } }))).map((e) => ({
23
23
  data: e.data.items.map((e) => ({
24
24
  uuid: e.uuid,
@@ -27,15 +27,15 @@ var W = class {
27
27
  meta: e.data.meta
28
28
  }));
29
29
  }
30
- static async getRecipients(t) {
30
+ static async getRecipients(e) {
31
31
  let r = [], i = 0, a = 0;
32
32
  do {
33
- let o = await n.fromPromise(e({
33
+ let o = await n.fromPromise(t({
34
34
  query: { pagination: {
35
35
  limit: 100,
36
36
  offset: i
37
37
  } },
38
- path: { uuid: t }
38
+ path: { uuid: e }
39
39
  }));
40
40
  if (o.isErr()) return te(o.error);
41
41
  if (r.push(...o.value.data.items.map((e) => ({
@@ -45,9 +45,9 @@ var W = class {
45
45
  } while (i < a);
46
46
  return ne(r);
47
47
  }
48
- static async getUuidByExternalId(e) {
49
- return (await n.fromPromise(t({ query: {
50
- filter: { externalId: e },
48
+ static async getUuidByExternalId(t) {
49
+ return (await n.fromPromise(e({ query: {
50
+ filter: { externalId: t },
51
51
  pagination: {
52
52
  limit: 1,
53
53
  offset: 0
@@ -101,7 +101,7 @@ var X = /* @__PURE__ */ S({
101
101
  },
102
102
  setup(e) {
103
103
  let t = e, n = p(), r = {
104
- icon: u,
104
+ icon: l,
105
105
  type: "icon"
106
106
  };
107
107
  return (e, i) => t.blockedReason === null ? t.status === "failed" ? (w(), g(O(P), {
@@ -275,7 +275,7 @@ var Ne = {
275
275
  },
276
276
  emits: ["close"],
277
277
  setup(e, { emit: t }) {
278
- let n = e, r = t, a = p(), o = H(), s = i(), u = Z(), d = K(h(() => n.dunningCaseUuid)), b = h(() => d.result.value.isOk() ? d.result.value.getValue() : null), S = Me(h(() => b.value?.customer.uuid ?? null)), C = je(h(() => b.value?.level ?? null)), T = h(() => {
278
+ let n = e, r = t, a = p(), o = H(), s = i(), l = Z(), d = K(h(() => n.dunningCaseUuid)), b = h(() => d.result.value.isOk() ? d.result.value.getValue() : null), S = Me(h(() => b.value?.customer.uuid ?? null)), C = je(h(() => b.value?.level ?? null)), T = h(() => {
279
279
  let e = b.value?.customer.uuid;
280
280
  return e === void 0 ? null : s.getCustomerDetailRoute(e);
281
281
  }), E = h(() => b.value === null ? 0 : ce(b.value.invoices).length), k = h(() => typeof S.defaultEmail.value == "string" ? a.t("module.dunning_case.send.grouped_to", { email: S.defaultEmail.value }) : S.isMissing.value ? a.t("module.dunning_case.send.no_default_recipient") : a.t("module.dunning_case.send.description")), j = U({
@@ -285,7 +285,7 @@ var Ne = {
285
285
  o.show({ message: a.t("module.dunning_case.send.no_default_recipient_blocked") });
286
286
  return;
287
287
  }
288
- let e = await u.execute({ params: { dunningCaseUuid: n.dunningCaseUuid } });
288
+ let e = await l.execute({ params: { dunningCaseUuid: n.dunningCaseUuid } });
289
289
  if (e.isErr()) {
290
290
  o.apiError(e.error);
291
291
  return;
@@ -326,7 +326,7 @@ var Ne = {
326
326
  "dunning-case": b.value,
327
327
  subject: O(C)
328
328
  }, null, 8, ["dunning-case", "subject"]),
329
- y("div", Pe, [x(O(l), { class: "mt-xxs size-(--spacing-xl) shrink-0" }), y("p", Fe, D(O(a).t("module.dunning_case.send.impact", {
329
+ y("div", Pe, [x(O(u), { class: "mt-xxs size-(--spacing-xl) shrink-0" }), y("p", Fe, D(O(a).t("module.dunning_case.send.impact", {
330
330
  count: E.value,
331
331
  level: b.value.level
332
332
  })), 1)])
@@ -1,5 +1,5 @@
1
- import { rt as e } from "./dist-DCbLgB6Y.js";
2
- import { t } from "./invoiceCustomer.service-DOexR54S.js";
1
+ import { ft as e } from "./dist-BMzyJZTx.js";
2
+ import { t } from "./invoiceCustomer.service-CDyrtcwH.js";
3
3
  import { useI18n as n } from "vue-i18n";
4
4
  import { computed as r, createBlock as i, createVNode as a, defineComponent as o, openBlock as s, unref as c, withCtx as l } from "vue";
5
5
  import { useOffsetInfiniteQuery as u } from "@wisemen/vue-core-api-utils";