@wisemen/wise-invoicing-web 0.0.4 → 0.0.6

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-BGE-p_FL.js} +953 -863
  2. package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
  3. package/dist/{BillingDocumentPdf-Dg5JlQE1.js → BillingDocumentPdf-Ca81NkZq.js} +4 -4
  4. package/dist/{CreditNoteDetailViewDataProvider-C-A0jyVr.js → CreditNoteDetailViewDataProvider-b5dY_4mH.js} +181 -181
  5. package/dist/{CreditNotePdfViewDataProvider-DNUvFVDj.js → CreditNotePdfViewDataProvider-C2QqCdQ7.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-jsh-LlGx.js} +68 -59
  9. package/dist/DunningCaseOverviewView-WbXalMt6.js +747 -0
  10. package/dist/{DunningCaseReminderPdfViewDataProvider-DcM-7ECg.js → DunningCaseReminderPdfViewDataProvider-B3Y2aYFf.js} +1 -1
  11. package/dist/DunningCaseSendDialog-D7jAZ8yT.js +349 -0
  12. package/dist/{InvoiceDetailViewDataProvider-BDL9lAWe.js → InvoiceDetailViewDataProvider-BAVdcJay.js} +589 -498
  13. package/dist/{InvoiceOverviewViewDataProvider-B_jrcC_8.js → InvoiceOverviewViewDataProvider-BT9cuQXw.js} +546 -482
  14. package/dist/{InvoicePdfView-Bygb-9z6.js → InvoicePdfView-BpIaYdZX.js} +2 -2
  15. package/dist/{InvoicePdfViewDataProvider-nBk3XNrE.js → InvoicePdfViewDataProvider-DGCnmNE-.js} +3 -3
  16. package/dist/{InvoicePublicPdfViewDataProvider-DHJP_-7-.js → InvoicePublicPdfViewDataProvider-KV0_hKUI.js} +3 -3
  17. package/dist/{IssuerSettingsViewDataProvider-Dk_Q6w6f.js → IssuerSettingsViewDataProvider-Bs4rEES2.js} +4 -4
  18. package/dist/ReminderSettingsViewDataProvider-D4bRLLXx.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-BGcQ_OBF.js} +50 -2
  29. package/dist/index.d.ts +51 -2
  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-Kad_HHx_.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 -2
  37. package/dist/locales/en-US.json.d.ts +25 -1
  38. package/dist/locales/nl-BE.json.d.ts +25 -1
  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 -3
  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-hmDNKreg.js} +105 -91
  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,6 +1,6 @@
1
- import { t as e } from "./DataProvider-CfHLB3rH.js";
2
- import { t } from "./InvoicePdfView-Bygb-9z6.js";
3
- import { t as n } from "./creditNoteDetail.query-BZqgZRSu.js";
1
+ import { t as e } from "./DataProvider-Dj34ljUX.js";
2
+ import { t } from "./InvoicePdfView-BpIaYdZX.js";
3
+ import { t as n } from "./creditNoteDetail.query-DHP69UiB.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,5 +1,5 @@
1
- import { I as e, t } from "./api.util-Dm_TQedZ.js";
2
- import { m as n, p as r, s as i } from "./documentTitle.composable-CeaFddr1.js";
1
+ import { I as e, t } from "./api.util-BCSgCfpS.js";
2
+ import { h as n, m as r, s as i } from "./documentTitle.composable-4ApFl9TZ.js";
3
3
  import { r as a } from "./useCurrencyFormat.composable-MtZaqKnO.js";
4
4
  import { n as o } from "./dist-YTXTCfo1.js";
5
5
  import { useI18n as s } from "vue-i18n";
@@ -0,0 +1,75 @@
1
+ import { useRouter as e } from "vue-router";
2
+ import { useI18n as t } from "vue-i18n";
3
+ import { computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createVNode as o, defineComponent as s, openBlock as c, renderSlot as l, unref as u } from "vue";
4
+ import { ApiErrorUtil as d } from "@wisemen/vue-core-api-utils";
5
+ import { UIEmptyState as f } from "@wisemen/vue-core-design-system";
6
+ //#endregion
7
+ //#region src/ui/data-provider/DataProviderErrorState.vue
8
+ var p = /* @__PURE__ */ s({
9
+ __name: "DataProviderErrorState",
10
+ props: { error: {} },
11
+ setup(i) {
12
+ let a = i, o = t(), s = e(), l = n(() => d.isExpectedApiError(a.error) ? a.error.errors[0] ?? null : null), p = n(() => l.value?.status === "404"), m = n(() => p.value ? o.t("wise_invoicing.common.not_found.title") : l.value?.status ?? o.t("wise_invoicing.common.error")), h = n(() => p.value ? o.t("wise_invoicing.common.not_found.description") : l.value === null ? d.isExpectedApiError(a.error) ? o.t("wise_invoicing.common.error") : a.error.message : l.value.detail);
13
+ function g() {
14
+ s.back();
15
+ }
16
+ function _() {
17
+ s.push({ name: "invoicing-invoice-overview" });
18
+ }
19
+ return (e, t) => (c(), r(u(f), {
20
+ description: h.value,
21
+ illustration: p.value ? "cloud-search" : null,
22
+ "primary-action": p.value ? {
23
+ label: u(o).t("wise_invoicing.common.not_found.invoice_overview"),
24
+ onClick: _,
25
+ type: "button"
26
+ } : null,
27
+ "secondary-action": p.value ? {
28
+ label: u(o).t("wise_invoicing.common.back"),
29
+ onClick: g,
30
+ type: "button"
31
+ } : null,
32
+ title: m.value
33
+ }, null, 8, [
34
+ "description",
35
+ "illustration",
36
+ "primary-action",
37
+ "secondary-action",
38
+ "title"
39
+ ]));
40
+ }
41
+ }), m = {
42
+ key: 1,
43
+ class: "flex h-full items-center justify-center"
44
+ }, h = /* @__PURE__ */ s({
45
+ __name: "DataProvider",
46
+ props: { queries: {} },
47
+ setup(e) {
48
+ let t = e, r = n(() => {
49
+ for (let e in t.queries) if (t.queries[e].isLoading.value) return !0;
50
+ return !1;
51
+ }), s = n(() => {
52
+ for (let e in t.queries) {
53
+ let n = t.queries[e].result.value;
54
+ if (n != null && n.isErr()) return n.getError();
55
+ }
56
+ return null;
57
+ }), u = n(() => {
58
+ for (let e in t.queries) {
59
+ let n = t.queries[e].result.value;
60
+ if (n == null || n.isErr()) return !1;
61
+ }
62
+ return !0;
63
+ }), d = n(() => {
64
+ let e = {};
65
+ for (let n in t.queries) {
66
+ let r = n, i = t.queries[r].result.value;
67
+ i == null || !i.isOk() || (e[r] = i.getValue());
68
+ }
69
+ return e;
70
+ });
71
+ return (e, t) => r.value ? l(e.$slots, "loading", {}, void 0, void 0, 0) : s.value === null ? u.value ? l(e.$slots, "default", { data: d.value }, void 0, void 0, 2) : i("", !0) : (c(), a("div", m, [o(p, { error: s.value }, null, 8, ["error"])]));
72
+ }
73
+ });
74
+ //#endregion
75
+ export { h as t };
@@ -1,13 +1,13 @@
1
1
  import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import "./api.util-Dm_TQedZ.js";
3
- import { t, y as n } from "./documentTitle.composable-CeaFddr1.js";
2
+ import "./api.util-BCSgCfpS.js";
3
+ import { b as t, t as n } from "./documentTitle.composable-4ApFl9TZ.js";
4
4
  import { r } from "./useCurrencyFormat.composable-MtZaqKnO.js";
5
- import { n as i } from "./invoicingConfig.composable-c6w_aMm1.js";
6
- import { n as a } from "./reminderConfig.query-DzTN2AvU.js";
7
- import { $ as o, J as ee, W as s, nt as c, x as l, z as te } from "./dist-DP8KNFVD.js";
8
- import { a as u, i as ne, n as re, r as ie, t as ae } from "./DunningCaseSendDialog-DBtwr2ue.js";
5
+ import { n as i } from "./invoicingConfig.composable-Kad_HHx_.js";
6
+ import { n as a } from "./reminderConfig.query-hmDNKreg.js";
7
+ import { Q as o, R as ee, U as s, q as te, tt as c, x as l } from "./dist-D9lp7NDv.js";
8
+ import { a as u, i as ne, n as re, r as ie, t as ae } from "./DunningCaseSendDialog-D7jAZ8yT.js";
9
9
  import { n as oe } from "./dist-YTXTCfo1.js";
10
- import { t as d } from "./DataProvider-CfHLB3rH.js";
10
+ import { t as d } from "./DataProvider-Dj34ljUX.js";
11
11
  import { useViewModels as se } from "@wisemen/vue-core-actions";
12
12
  import { RouterLink as ce, useRouter as le } from "vue-router";
13
13
  import { useI18n as f } from "vue-i18n";
@@ -27,42 +27,42 @@ var ye = { class: "flex flex-col gap-4xl" }, be = { class: "flex flex-col gap-lg
27
27
  }, Ye = { class: "grid gap-3xl xl:grid-cols-[minmax(0,2fr)_25.5rem]" }, Xe = { class: "min-w-0" }, Ze = { class: "overflow-hidden rounded-md border border-secondary bg-primary shadow-sm" }, Qe = { class: "border-b border-secondary px-xl pt-lg" }, $e = { class: "overflow-x-auto" }, et = {
28
28
  key: 0,
29
29
  class: "w-full min-w-200 table-fixed border-collapse text-left"
30
- }, tt = { class: "border-b border-secondary bg-secondary" }, nt = { class: "w-[20%] px-xl py-md text-xs font-medium text-secondary" }, rt = { class: "w-[26%] px-xl py-md text-xs font-medium text-secondary" }, it = { class: "w-[14%] px-xl py-md text-xs font-medium text-secondary" }, at = { class: "w-[20%] px-xl py-md text-xs font-medium text-secondary" }, ot = { class: "w-[20%] px-xl py-md text-right text-xs font-medium text-secondary" }, st = { class: "border-b border-secondary" }, ct = { class: "flex items-start gap-md" }, lt = [
30
+ }, tt = { class: "border-b border-secondary bg-secondary" }, nt = { class: "w-[20%] px-xl py-md text-xs font-medium text-secondary" }, rt = { class: "w-[26%] px-xl py-md text-xs font-medium text-secondary" }, it = { class: "w-[14%] px-xl py-md text-xs font-medium text-secondary" }, at = { class: "w-[20%] px-xl py-md text-xs font-medium text-secondary" }, ot = { class: "w-[20%] px-xl py-md text-right text-xs font-medium text-secondary" }, st = { class: "flex items-start gap-md" }, ct = [
31
31
  "aria-expanded",
32
32
  "aria-label",
33
33
  "onClick"
34
- ], ut = {
34
+ ], lt = {
35
35
  key: 1,
36
36
  class: "size-(--spacing-xl) shrink-0"
37
- }, dt = { class: "min-w-0" }, ft = {
37
+ }, N = { class: "min-w-0" }, ut = {
38
38
  key: 0,
39
39
  class: "mt-xxs truncate text-xs text-secondary"
40
- }, pt = { class: "px-xl py-md font-mono text-xs" }, mt = { class: "px-xl py-md" }, ht = {
40
+ }, dt = { class: "px-xl py-md font-mono text-xs" }, ft = { class: "px-xl py-md" }, pt = {
41
41
  key: 1,
42
42
  class: "flex items-center gap-xs text-xs text-primary"
43
- }, N = { class: "px-xl py-md" }, gt = { class: "flex flex-col items-start gap-xs" }, _t = {
43
+ }, mt = { class: "px-xl py-md" }, ht = { class: "flex flex-col items-start gap-xs" }, gt = {
44
44
  key: 0,
45
45
  class: "text-xs text-secondary"
46
- }, vt = { class: "px-xl py-md text-right font-mono text-xs text-primary tabular-nums" }, yt = { class: "font-medium" }, bt = {
46
+ }, _t = { class: "px-xl py-md text-right font-mono text-xs text-secondary tabular-nums" }, vt = { class: "font-medium" }, yt = {
47
47
  key: 0,
48
48
  class: "mt-xxs text-tertiary"
49
- }, xt = ["aria-hidden"], St = {
49
+ }, bt = ["aria-hidden"], xt = {
50
50
  class: "p-none",
51
51
  colspan: "5"
52
- }, Ct = { class: "overflow-hidden" }, wt = { class: "relative flex flex-col items-start gap-xs px-5xl py-md text-xs before:absolute before:inset-y-0 before:left-0 before:w-(--spacing-xxs) before:bg-brand-500" }, Tt = {
52
+ }, St = { class: "overflow-hidden" }, Ct = { class: "relative flex flex-col items-start gap-xs px-5xl py-md text-xs before:absolute before:inset-y-0 before:left-0 before:w-(--spacing-xxs) before:bg-brand-500" }, wt = {
53
53
  key: 1,
54
54
  class: "flex flex-col items-center justify-center gap-md px-xl py-2xl"
55
- }, Et = { class: "flex size-(--spacing-3xl) items-center justify-center rounded-md border border-secondary" }, Dt = { class: "text-sm font-semibold text-secondary" }, Ot = {
55
+ }, Tt = { class: "flex size-(--spacing-3xl) items-center justify-center rounded-md border border-secondary" }, Et = { class: "text-sm font-semibold text-secondary" }, Dt = {
56
56
  key: 0,
57
57
  class: "ml-auto flex w-full max-w-140 flex-col px-xl"
58
- }, kt = { class: "flex items-center justify-between gap-3xl border-b border-secondary py-lg text-sm text-primary" }, At = { class: "shrink-0 font-mono text-2xl font-semibold tabular-nums" }, jt = { class: "flex items-center justify-between gap-3xl py-lg text-sm text-primary" }, Mt = { class: "shrink-0 font-mono text-sm font-medium tabular-nums" }, Nt = { class: "h-full rounded-md border border-secondary bg-primary p-xl shadow-sm" }, Pt = { class: "text-xl font-semibold text-primary" }, Ft = { class: "mt-2xl flex flex-col" }, It = { class: "flex w-(--spacing-3xl) shrink-0 flex-col items-center" }, Lt = {
58
+ }, Ot = { class: "flex items-center justify-between gap-3xl border-b border-secondary py-lg text-sm text-primary" }, kt = { class: "shrink-0 font-mono text-2xl font-semibold tabular-nums" }, At = { class: "flex items-center justify-between gap-3xl py-lg text-sm text-primary" }, jt = { class: "shrink-0 font-mono text-sm font-medium tabular-nums" }, Mt = { class: "h-full rounded-md border border-secondary bg-primary p-xl shadow-sm" }, Nt = { class: "text-xl font-semibold text-primary" }, Pt = { class: "mt-2xl flex flex-col" }, Ft = { class: "flex w-(--spacing-3xl) shrink-0 flex-col items-center" }, It = {
59
59
  key: 0,
60
60
  class: "min-h-(--spacing-xl) w-px flex-1 bg-tertiary"
61
- }, Rt = { class: "text-sm font-semibold text-primary" }, zt = { class: "mt-xxs text-sm text-secondary" }, P = /* @__PURE__ */ x({
61
+ }, Lt = { class: "text-sm font-semibold text-primary" }, Rt = { class: "mt-xxs text-sm text-secondary" }, P = /* @__PURE__ */ x({
62
62
  __name: "DunningCaseDetailView",
63
63
  props: { dunningCase: {} },
64
64
  setup(e) {
65
- let u = e, d = f(), x = ve(), j = r(), P = oe(), F = t(), I = i(), L = le(), R = w("overdue");
65
+ let u = e, d = f(), x = ve(), j = r(), P = oe(), F = n(), I = i(), L = le(), R = w("overdue");
66
66
  function z(e) {
67
67
  return e.payments.length > 0 || e.creditNotes.length > 0;
68
68
  }
@@ -89,7 +89,7 @@ var ye = { class: "flex flex-col gap-4xl" }, be = { class: "flex flex-col gap-lg
89
89
  sequence: e.sequence,
90
90
  type: "credit-note"
91
91
  }))]);
92
- return !u.dunningCase.isClosed && u.dunningCase.nextReminderOn !== null && k.PlainDate.compare(u.dunningCase.nextReminderOn, k.Now.plainDateISO()) <= 0 && e.push({
92
+ return u.dunningCase.nextReminderOn !== null && k.PlainDate.compare(u.dunningCase.nextReminderOn, k.Now.plainDateISO()) <= 0 && e.push({
93
93
  sortDate: k.Now.plainDateISO().toString(),
94
94
  date: u.dunningCase.nextReminderOn,
95
95
  key: `due-${u.dunningCase.nextReminderOn.toString()}`,
@@ -105,13 +105,16 @@ var ye = { class: "flex flex-col gap-4xl" }, be = { class: "flex flex-col gap-lg
105
105
  key: `closed-${u.dunningCase.closedAt.toString()}`,
106
106
  type: "case-closed"
107
107
  }), e.toSorted((e, t) => t.sortDate.localeCompare(e.sortDate));
108
- }), H = m(() => u.dunningCase.invoices.filter((e) => k.PlainDate.compare(e.dueOn, k.Now.plainDateISO()) < 0).toSorted((e, t) => k.PlainDate.compare(e.dueOn, t.dueOn))), Bt = m(() => u.dunningCase.invoices.filter((e) => k.PlainDate.compare(e.dueOn, k.Now.plainDateISO()) >= 0).toSorted((e, t) => k.PlainDate.compare(e.dueOn, t.dueOn))), U = m(() => R.value === "overdue" ? H.value : Bt.value), W = m(() => u.dunningCase.invoices.filter((e) => e.isDisputed).length), G = m(() => ie(u.dunningCase.latestCreatedReminder)), K = m(() => H.value.filter((e) => !e.isDisputed)), q = m(() => K.value.reduce((e, t) => ({
108
+ }), H = m(() => u.dunningCase.invoices.filter((e) => k.PlainDate.compare(e.dueOn, k.Now.plainDateISO()) < 0).toSorted((e, t) => k.PlainDate.compare(e.dueOn, t.dueOn))), zt = m(() => u.dunningCase.invoices.filter((e) => k.PlainDate.compare(e.dueOn, k.Now.plainDateISO()) >= 0).toSorted((e, t) => k.PlainDate.compare(e.dueOn, t.dueOn))), U = m(() => R.value === "overdue" ? H.value : zt.value), W = m(() => u.dunningCase.invoices.filter((e) => e.isDisputed).length), G = m(() => ie(u.dunningCase.latestCreatedReminder)), K = m(() => H.value.filter((e) => !e.isDisputed)), q = m(() => K.value.reduce((e, t) => ({
109
109
  ...e,
110
110
  amount: e.amount + t.balanceDueAmount.amount
111
111
  }), {
112
112
  ...u.dunningCase.outstandingBalance,
113
113
  amount: 0
114
- })), J = m(() => re(K.value, u.dunningCase.outstandingBalance));
114
+ })), J = m(() => re(K.value, u.dunningCase.outstandingBalance)), Bt = m(() => J.value.map((e, t) => ({
115
+ amount: e,
116
+ level: t
117
+ })));
115
118
  function Vt(e) {
116
119
  return q.value.amount === 0 ? 0 : e / q.value.amount * 100;
117
120
  }
@@ -151,8 +154,8 @@ var ye = { class: "flex flex-col gap-4xl" }, be = { class: "flex flex-col gap-lg
151
154
  }
152
155
  function Kt(e) {
153
156
  if (e.type === "reminder-due") return d.t("module.dunning_case.detail.today");
154
- let t = Wt(e);
155
- return e.type === "payment" && e.settlementStatus === n.PARTIALLY_PAID ? d.t("module.dunning_case.detail.payment_partially_paid", { date: t }) : t;
157
+ let n = Wt(e);
158
+ return e.type === "payment" && e.settlementStatus === t.PARTIALLY_PAID ? d.t("module.dunning_case.detail.payment_partially_paid", { date: n }) : n;
156
159
  }
157
160
  function Q(e) {
158
161
  return e.dueOn.until(k.Now.plainDateISO(), { largestUnit: "days" }).days;
@@ -166,12 +169,12 @@ var ye = { class: "flex flex-col gap-4xl" }, be = { class: "flex flex-col gap-lg
166
169
  }
167
170
  function Jt(e) {
168
171
  switch (e) {
169
- case n.PARTIALLY_PAID: return "warning";
170
- case n.CREDITED:
171
- case n.OVERPAID:
172
- case n.PAID:
173
- case n.SETTLED: return "success";
174
- case n.UNPAID: return "error";
172
+ case t.PARTIALLY_PAID: return "warning";
173
+ case t.CREDITED:
174
+ case t.OVERPAID:
175
+ case t.PAID:
176
+ case t.SETTLED: return "success";
177
+ case t.UNPAID: return "error";
175
178
  }
176
179
  }
177
180
  function Yt() {
@@ -194,7 +197,7 @@ var ye = { class: "flex flex-col gap-4xl" }, be = { class: "flex flex-col gap-lg
194
197
  type: "button",
195
198
  onClick: Ut
196
199
  }, E(u.dunningCase.customer.name), 1))]),
197
- v("span", we, [b(a, { level: u.dunningCase.level }, null, 8, ["level"]), y(" " + E(u.dunningCase.isClosed ? D(d).t("module.dunning_case.detail.closed") : $(u.dunningCase.level)), 1)]),
200
+ v("span", we, [b(a, { level: u.dunningCase.level }, null, 8, ["level"]), y(" " + E($(u.dunningCase.level)), 1)]),
198
201
  b(ne, {
199
202
  "blocked-reason": null,
200
203
  status: G.value
@@ -202,7 +205,7 @@ var ye = { class: "flex flex-col gap-4xl" }, be = { class: "flex flex-col gap-lg
202
205
  ]),
203
206
  u.dunningCase.customer.vatNumber || u.dunningCase.customer.email ? (C(), _("p", Te, E([u.dunningCase.customer.vatNumber, u.dunningCase.customer.email].filter(Boolean).join(" · ")), 1)) : g("", !0),
204
207
  v("p", Ee, E(D(d).t("module.dunning_case.detail.last_synced", { date: D(P).toDateTime(u.dunningCase.updatedAt) })), 1)
205
- ]), !u.dunningCase.isClosed && u.dunningCase.canSendReminder ? (C(), h(D(de), {
208
+ ]), u.dunningCase.canSendReminder ? (C(), h(D(de), {
206
209
  key: 0,
207
210
  "icon-right": D(c),
208
211
  "is-loading": G.value === "sending",
@@ -235,24 +238,24 @@ var ye = { class: "flex flex-col gap-4xl" }, be = { class: "flex flex-col gap-lg
235
238
  style: ue({ width: `${Vt(e.amount)}%` })
236
239
  }, null, 6))), 128))])
237
240
  ]),
238
- v("div", Pe, [(C(!0), _(p, null, T(J.value, (e, t) => (C(), h(D(ge), {
239
- key: t,
241
+ v("div", Pe, [(C(!0), _(p, null, T(Bt.value, (e) => (C(), h(D(ge), {
242
+ key: e.level,
240
243
  "popover-side-offset": 8,
241
244
  "popover-align": "start",
242
245
  "popover-side": "top"
243
246
  }, {
244
247
  trigger: O(() => [v("button", {
245
- "aria-label": Z(t, e),
248
+ "aria-label": Z(e.level, e.amount),
246
249
  class: "flex min-w-0 items-center justify-between gap-lg rounded-sm border-none bg-transparent p-none text-left hover:bg-secondary focus-visible:outline-2 focus-visible:outline-brand-500 xl:flex-row xl:items-center xl:gap-lg",
247
250
  type: "button"
248
251
  }, [v("span", Ie, [v("span", { class: S([{
249
- "bg-quaternary": t === 0,
250
- "bg-brand-500": t === 1,
251
- "bg-error-solid": t === 3,
252
- "bg-warning-solid": t === 2
253
- }, "size-(--spacing-sm) shrink-0 rounded-full"]) }, null, 2), v("span", Le, E(X(t)), 1)]), v("span", Re, E(D(j).formatMonetary(e)), 1)], 8, Fe)]),
252
+ "bg-quaternary": e.level === 0,
253
+ "bg-brand-500": e.level === 1,
254
+ "bg-error-solid": e.level === 3,
255
+ "bg-warning-solid": e.level === 2
256
+ }, "size-(--spacing-sm) shrink-0 rounded-full"]) }, null, 2), v("span", Le, E(X(e.level)), 1)]), v("span", Re, E(D(j).formatMonetary(e.amount)), 1)], 8, Fe)]),
254
257
  content: O(() => [b(D(_e), { class: "max-w-80! text-sm!" }, {
255
- default: O(() => [y(E(Z(t, e)), 1)]),
258
+ default: O(() => [y(E(Z(e.level, e.amount)), 1)]),
256
259
  _: 2
257
260
  }, 1024)]),
258
261
  _: 2
@@ -289,18 +292,18 @@ var ye = { class: "flex flex-col gap-4xl" }, be = { class: "flex flex-col gap-lg
289
292
  v("th", it, E(D(d).t("module.dunning_case.detail.table.level")), 1),
290
293
  v("th", at, E(D(d).t("module.dunning_case.detail.table.status")), 1),
291
294
  v("th", ot, E(D(d).t("module.dunning_case.detail.table.remaining")), 1)
292
- ])]), v("tbody", null, [(C(!0), _(p, null, T(U.value, (e) => (C(), _(p, { key: e.uuid }, [v("tr", st, [
295
+ ])]), v("tbody", null, [(C(!0), _(p, null, T(U.value, (e) => (C(), _(p, { key: e.uuid }, [v("tr", { class: S([{ "opacity-60": e.isDisputed }, "border-b border-secondary"]) }, [
293
296
  v("td", { class: S([{
294
297
  "before:opacity-0": B.value !== e.uuid,
295
298
  "before:opacity-100": B.value === e.uuid
296
- }, "relative px-xl py-md before:absolute before:inset-y-0 before:left-0 before:w-(--spacing-xxs) before:bg-brand-500"]) }, [v("div", ct, [z(e) ? (C(), _("button", {
299
+ }, "relative px-xl py-md before:absolute before:inset-y-0 before:left-0 before:w-(--spacing-xxs) before:bg-brand-500"]) }, [v("div", st, [z(e) ? (C(), _("button", {
297
300
  key: 0,
298
301
  "aria-expanded": B.value === e.uuid,
299
302
  "aria-label": D(d).t(B.value === e.uuid ? "module.dunning_case.detail.collapse_updates" : "module.dunning_case.detail.expand_updates", { invoice: e.sequence }),
300
303
  class: "mt-xxs flex size-(--spacing-xl) shrink-0 items-center justify-center text-secondary hover:text-primary",
301
304
  type: "button",
302
305
  onClick: (t) => Xt(e.uuid)
303
- }, [b(D(te), { class: S([{ "rotate-180": B.value === e.uuid }, "size-(--spacing-xl) transition-transform duration-200 ease-out motion-reduce:transition-none"]) }, null, 8, ["class"])], 8, lt)) : (C(), _("span", ut)), v("div", dt, [b(D(ce), {
306
+ }, [b(D(ee), { class: S([{ "rotate-180": B.value === e.uuid }, "size-(--spacing-xl) transition-transform duration-200 ease-out motion-reduce:transition-none"]) }, null, 8, ["class"])], 8, ct)) : (C(), _("span", lt)), v("div", N, [b(D(ce), {
304
307
  to: {
305
308
  name: "invoicing-invoice-detail",
306
309
  params: { invoiceUuid: e.uuid }
@@ -309,31 +312,37 @@ var ye = { class: "flex flex-col gap-4xl" }, be = { class: "flex flex-col gap-lg
309
312
  }, {
310
313
  default: O(() => [y(E(e.sequence), 1)]),
311
314
  _: 2
312
- }, 1032, ["to"]), e.subject === null ? g("", !0) : (C(), _("p", ft, E(e.subject), 1))])])], 2),
313
- v("td", pt, [v("span", { class: S([Q(e) > 0 ? "text-error-primary" : "text-primary", "inline-flex items-center gap-xs whitespace-nowrap"]) }, [y(E(D(P).formatPlainDate(e.dueOn)) + " ", 1), v("span", { class: S([Q(e) > 0 ? "\n border-error bg-error-primary\n text-error-primary\n " : "border-secondary bg-secondary text-secondary", "rounded-sm border px-sm py-px font-sans text-xs"]) }, E(qt(e)), 3)], 2)]),
314
- v("td", mt, [e.isDisputed && R.value === "overdue" ? (C(), h(D(A), {
315
+ }, 1032, ["to"]), e.subject === null ? g("", !0) : (C(), _("p", ut, E(e.subject), 1))])])], 2),
316
+ v("td", dt, [v("span", { class: S([e.isDisputed ? "text-secondary" : Q(e) > 0 ? "text-error-primary" : "text-primary", "inline-flex items-center gap-xs whitespace-nowrap"]) }, [y(E(D(P).formatPlainDate(e.dueOn)) + " ", 1), v("span", { class: S([!e.isDisputed && Q(e) > 0 ? "\n border-error bg-error-primary\n text-error-primary\n " : "border-secondary bg-secondary text-secondary", "rounded-sm border px-sm py-px font-sans text-xs"]) }, E(qt(e)), 3)], 2)]),
317
+ v("td", ft, [e.isDisputed ? (C(), h(D(A), {
315
318
  key: 0,
316
319
  label: D(d).t("module.dunning_case.detail.protested"),
317
320
  color: "error",
318
321
  size: "sm",
319
322
  variant: "translucent"
320
- }, null, 8, ["label"])) : R.value === "overdue" ? (C(), _("span", ht, [b(a, {
323
+ }, null, 8, ["label"])) : R.value === "overdue" ? (C(), _("span", pt, [b(a, {
321
324
  level: e.level,
322
325
  size: "sm"
323
- }, null, 8, ["level"]), y(" " + E(e.level), 1)])) : g("", !0)]),
324
- v("td", N, [v("div", gt, [e.isDisputed ? (C(), _("p", _t, E(D(d).t("module.dunning_case.detail.excluded")), 1)) : (C(), h(D(A), {
326
+ }, null, 8, ["level"]), y(" " + E(e.level === 0 ? "–" : e.level), 1)])) : g("", !0)]),
327
+ v("td", mt, [v("div", ht, [e.isDisputed ? (C(), _("p", gt, E(D(d).t("module.dunning_case.detail.excluded")), 1)) : R.value === "outstanding" ? (C(), h(D(A), {
325
328
  key: 1,
329
+ label: D(d).t("module.dunning_case.detail.not_yet_due"),
330
+ color: "gray",
331
+ size: "sm",
332
+ variant: "translucent"
333
+ }, null, 8, ["label"])) : (C(), h(D(A), {
334
+ key: 2,
326
335
  label: D(d).t(`module.dunning_case.settlement_status.${e.settlementStatus}`),
327
336
  color: Jt(e.settlementStatus),
328
337
  size: "sm",
329
338
  variant: "translucent"
330
339
  }, null, 8, ["label", "color"]))])]),
331
- v("td", vt, [v("p", yt, E(D(j).formatMonetary(e.balanceDueAmount)), 1), e.balanceDueAmount.amount === e.grossAmount.amount ? g("", !0) : (C(), _("p", bt, " /" + E(D(j).formatMonetary(e.grossAmount)), 1))])
332
- ]), z(e) ? (C(), _("tr", {
340
+ v("td", _t, [v("p", vt, E(D(j).formatMonetary(e.balanceDueAmount)), 1), e.balanceDueAmount.amount === e.grossAmount.amount ? g("", !0) : (C(), _("p", yt, " /" + E(D(j).formatMonetary(e.grossAmount)), 1))])
341
+ ], 2), z(e) ? (C(), _("tr", {
333
342
  key: `${e.uuid}-updates`,
334
343
  class: S({ "border-b border-secondary": B.value === e.uuid }),
335
344
  "aria-hidden": B.value !== e.uuid
336
- }, [v("td", St, [v("div", { class: S([B.value === e.uuid ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0", "grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none"]) }, [v("div", Ct, [v("div", wt, [(C(!0), _(p, null, T(e.payments, (e) => (C(), _("span", {
345
+ }, [v("td", xt, [v("div", { class: S([B.value === e.uuid ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0", "grid transition-[grid-template-rows,opacity] duration-200 ease-out motion-reduce:transition-none"]) }, [v("div", St, [v("div", Ct, [(C(!0), _(p, null, T(e.payments, (e) => (C(), _("span", {
337
346
  key: e.uuid,
338
347
  class: "inline-flex items-center gap-sm rounded-sm bg-success-primary px-md py-sm text-success-primary"
339
348
  }, [t[1] ||= v("span", { class: "size-(--spacing-sm) shrink-0 rounded-full bg-success-solid" }, null, -1), y(" " + E(D(d).t("module.dunning_case.detail.payment_line", {
@@ -346,12 +355,12 @@ var ye = { class: "flex flex-col gap-4xl" }, be = { class: "flex flex-col gap-lg
346
355
  amount: D(j).formatMonetary(e.grossAmount),
347
356
  date: D(P).formatPlainDate(e.finalizedOn),
348
357
  sequence: e.sequence
349
- })), 1)]))), 128))])])], 2)])], 10, xt)) : g("", !0)], 64))), 128))])])) : (C(), _("div", Tt, [v("span", Et, [b(D(o), { class: "size-(--spacing-xl) text-primary" })]), v("p", Dt, E(D(d).t(R.value === "overdue" ? "module.dunning_case.detail.empty_overdue" : "module.dunning_case.detail.empty_outstanding")), 1)]))]),
350
- R.value === "overdue" ? (C(), _("div", Ot, [v("div", kt, [v("span", null, E(D(d).t("module.dunning_case.detail.total_outstanding")), 1), v("span", At, E(D(j).formatMonetary(u.dunningCase.outstandingBalance)), 1)]), v("div", jt, [v("span", null, E(u.dunningCase.level === 0 ? D(d).t("module.dunning_case.detail.reminder_fee") : D(d).t("module.dunning_case.detail.fee", { level: u.dunningCase.level })), 1), v("span", Mt, E(D(j).formatMonetary(u.dunningCase.totalFee)), 1)])])) : g("", !0)
351
- ])]), v("aside", Nt, [v("h2", Pt, E(D(d).t("module.dunning_case.detail.activity")), 1), v("ol", Ft, [(C(!0), _(p, null, T(V.value, (e, t) => (C(), _("li", {
358
+ })), 1)]))), 128))])])], 2)])], 10, bt)) : g("", !0)], 64))), 128))])])) : (C(), _("div", wt, [v("span", Tt, [b(D(o), { class: "size-(--spacing-xl) text-primary" })]), v("p", Et, E(D(d).t(R.value === "overdue" ? "module.dunning_case.detail.empty_overdue" : "module.dunning_case.detail.empty_outstanding")), 1)]))]),
359
+ R.value === "overdue" ? (C(), _("div", Dt, [v("div", Ot, [v("span", null, E(D(d).t("module.dunning_case.detail.total_outstanding")), 1), v("span", kt, E(D(j).formatMonetary(q.value)), 1)]), v("div", At, [v("span", null, E(u.dunningCase.level === 0 ? D(d).t("module.dunning_case.detail.reminder_fee") : D(d).t("module.dunning_case.detail.fee", { level: u.dunningCase.level })), 1), v("span", jt, E(D(j).formatMonetary(u.dunningCase.totalFee)), 1)])])) : g("", !0)
360
+ ])]), v("aside", Mt, [v("h2", Nt, E(D(d).t("module.dunning_case.detail.activity")), 1), v("ol", Pt, [(C(!0), _(p, null, T(V.value, (e, t) => (C(), _("li", {
352
361
  key: e.key,
353
362
  class: "flex gap-md"
354
- }, [v("div", It, [v("span", { class: S([{
363
+ }, [v("div", Ft, [v("span", { class: S([{
355
364
  "bg-brand-100": e.type === "reminder-sent",
356
365
  "bg-error-secondary": e.type === "reminder-due",
357
366
  "bg-success-secondary": e.type === "payment" || e.type === "case-closed",
@@ -359,7 +368,7 @@ var ye = { class: "flex flex-col gap-4xl" }, be = { class: "flex flex-col gap-lg
359
368
  }, "flex size-(--spacing-3xl) shrink-0 items-center justify-center rounded-full"]) }, [e.type === "reminder-due" ? (C(), h(D(l), {
360
369
  key: 0,
361
370
  class: "size-(--spacing-lg) text-error-primary"
362
- })) : e.type === "payment" ? (C(), h(D(ee), {
371
+ })) : e.type === "payment" ? (C(), h(D(te), {
363
372
  key: 1,
364
373
  class: "size-(--spacing-lg) text-success-primary"
365
374
  })) : e.type === "credit-note" ? (C(), h(D(s), {
@@ -371,7 +380,7 @@ var ye = { class: "flex flex-col gap-4xl" }, be = { class: "flex flex-col gap-lg
371
380
  })) : e.type === "case-closed" ? (C(), h(D(o), {
372
381
  key: 4,
373
382
  class: "size-(--spacing-lg) text-success-primary"
374
- })) : g("", !0)], 2), t < V.value.length - 1 ? (C(), _("span", Lt)) : g("", !0)]), v("div", { class: S([{ "pb-xl": t < V.value.length - 1 }, "pt-xs"]) }, [v("p", Rt, E(Gt(e)), 1), v("p", zt, E(Kt(e)), 1)], 2)]))), 128))])])])
383
+ })) : g("", !0)], 2), t < V.value.length - 1 ? (C(), _("span", It)) : g("", !0)]), v("div", { class: S([{ "pb-xl": t < V.value.length - 1 }, "pt-xs"]) }, [v("p", Lt, E(Gt(e)), 1), v("p", Rt, E(Kt(e)), 1)], 2)]))), 128))])])])
375
384
  ])]),
376
385
  _: 1
377
386
  })]),