@wisemen/wise-invoicing-web 0.8.0 → 0.10.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 (57) hide show
  1. package/dist/{ApprovalReminderSettingsViewDataProvider-Dsp3ee3c.js → ApprovalReminderSettingsViewDataProvider-zMiQCYJI.js} +1 -1
  2. package/dist/{BillingDocumentDetailViewDataProvider-V5c_cJwt.js → BillingDocumentDetailViewDataProvider-CvIY5PkX.js} +72 -84
  3. package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
  4. package/dist/{BillingDocumentPdf-BYn3lUyl.js → BillingDocumentPdf-unchUddW.js} +68 -62
  5. package/dist/{CreditNoteDetailViewDataProvider-BqLYeBUQ.js → CreditNoteDetailViewDataProvider-sYgZYTGA.js} +3 -3
  6. package/dist/{CreditNotePdfViewDataProvider-Co4R7QJx.js → CreditNotePdfViewDataProvider-CEog3yg4.js} +2 -2
  7. package/dist/{CustomFieldValueText-BP4bKQh7.js → CustomFieldValueText-BLqu_dSP.js} +1 -1
  8. package/dist/{DunningCaseDetailViewDataProvider-BNByfQTc.js → DunningCaseDetailViewDataProvider-RwcDBSoU.js} +2 -2
  9. package/dist/{DunningCaseOverviewView-Dvwaw597.js → DunningCaseOverviewView-DCoHPpsV.js} +2 -2
  10. package/dist/{DunningCaseSendDialog-DwB_jFum.js → DunningCaseSendDialog-ybWpcDSu.js} +1 -1
  11. package/dist/{InvoiceApprovalOutOfSyncIndicator-B_9HLzpt.js → InvoiceApprovalOutOfSyncIndicator-Br7dIeVh.js} +1 -1
  12. package/dist/{InvoiceApprovalOverviewView-jawT-M1t.js → InvoiceApprovalOverviewView-CIRgP9Te.js} +2 -2
  13. package/dist/{InvoiceApproveDialogDataProvider-Bwb8bP1e.js → InvoiceApproveDialogDataProvider-Cf1Ar7tH.js} +2 -2
  14. package/dist/{InvoiceDetailViewDataProvider-DSG6VnDh.js → InvoiceDetailViewDataProvider-CStQkka5.js} +9 -9
  15. package/dist/{InvoiceOverviewViewDataProvider-CLgV-Jcv.js → InvoiceOverviewViewDataProvider-C5OBVOfy.js} +649 -612
  16. package/dist/{InvoicePdfView-BIDvRCr4.js → InvoicePdfView-BR3kWz1Z.js} +1 -1
  17. package/dist/{InvoicePdfViewDataProvider-Ct1HBqqa.js → InvoicePdfViewDataProvider--PHFxD5U.js} +3 -3
  18. package/dist/{InvoicePublicPdfViewDataProvider-DS0Q-BEX.js → InvoicePublicPdfViewDataProvider-CP3zlMFC.js} +3 -3
  19. package/dist/{InvoicePublicProFormaPdfViewDataProvider-DqWKGeAm.js → InvoicePublicProFormaPdfViewDataProvider-BJJw0mZv.js} +3 -3
  20. package/dist/{ReminderSettingsViewDataProvider-BZgzQIxM.js → ReminderSettingsViewDataProvider-DYUclTJG.js} +1 -1
  21. package/dist/composables/invoicingConfig.composable.d.ts +2 -0
  22. package/dist/{i18n.lib-MOiHLIGc.js → i18n.lib-CN9MRGQ0.js} +2 -6
  23. package/dist/index.d.ts +2 -6
  24. package/dist/index.js +21 -21
  25. package/dist/{invoice.service-Fv4F4aZq.js → invoice.service-Yw5_HhZ9.js} +221 -227
  26. package/dist/{invoiceCustomer.service-CDyrtcwH.js → invoiceCustomer.service-BWBjCw9i.js} +1 -1
  27. package/dist/{invoiceDetail.query-UHE0NCLh.js → invoiceDetail.query-BTd7SVPv.js} +1 -1
  28. package/dist/{invoiceIndexCache.util-CLM7FO6z.js → invoiceIndexCache.util-DKExdA6g.js} +1 -1
  29. package/dist/{invoicingConfig.composable-UC7tGtBj.js → invoicingConfig.composable-SNsMETxy.js} +14 -13
  30. package/dist/libs/i18n.lib.d.ts +2 -6
  31. package/dist/locales/en-US.json.d.ts +1 -3
  32. package/dist/locales/nl-BE.json.d.ts +1 -3
  33. package/dist/modules/invoice/api/mutations/invoiceBulkFinalize.mutation.d.ts +2 -2
  34. package/dist/modules/invoice/api/mutations/invoiceBulkMarkAsReady.mutation.d.ts +2 -2
  35. package/dist/modules/invoice/api/mutations/invoiceBulkSend.mutation.d.ts +2 -2
  36. package/dist/modules/invoice/api/mutations/invoiceBulkSendApproval.mutation.d.ts +2 -2
  37. package/dist/modules/invoice/api/services/invoice.service.d.ts +9 -8
  38. package/dist/modules/invoice/models/invoice/bulk/invoiceBulkTarget.model.d.ts +15 -0
  39. package/dist/modules/invoice/models/invoice/bulk/invoiceBulkTarget.transformer.d.ts +10 -0
  40. package/dist/modules/invoice/models/invoice/bulk/invoiceBulkTarget.transformer.spec.d.ts +1 -0
  41. package/dist/modules/invoice/models/invoice/index/invoiceIndexQueryParams.transformer.d.ts +7 -1
  42. package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewBulkActionBar.vue.d.ts +0 -3
  43. package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewBulkActionPlan.composable.d.ts +36 -0
  44. package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewBulkActionPlan.composable.spec.d.ts +1 -0
  45. package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewBulkSendEligibility.composable.d.ts +4 -1
  46. package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewFilters.composable.d.ts +1 -1
  47. package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewSelection.composable.d.ts +28 -15
  48. package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewSelection.composable.spec.d.ts +1 -0
  49. package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewTableColumns.composable.d.ts +0 -4
  50. package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkFinalizeDialog.vue.d.ts +2 -0
  51. package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkMarkAsReadyDialog.vue.d.ts +2 -0
  52. package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendApprovalDialog.vue.d.ts +2 -0
  53. package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendDialog.vue.d.ts +2 -0
  54. package/dist/modules/invoice/use-cases/overview/views/InvoiceOverviewView.vue.d.ts +2 -2
  55. package/dist/style.css +1 -1
  56. package/package.json +1 -1
  57. package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewTableSelectionCell.vue.d.ts +0 -10
@@ -1,5 +1,5 @@
1
1
  import { $ as e, Q as t, t as n } from "./api.util-CR2xLnNj.js";
2
- import { o as r } from "./invoice.service-Fv4F4aZq.js";
2
+ import { o as r } from "./invoice.service-Yw5_HhZ9.js";
3
3
  //#region src/models/customer/customerDetail.transformer.ts
4
4
  var i = class {
5
5
  static fromDto(e) {
@@ -1,4 +1,4 @@
1
- import { t as e } from "./invoice.service-Fv4F4aZq.js";
1
+ import { t as e } from "./invoice.service-Yw5_HhZ9.js";
2
2
  import { useQuery as t } from "@wisemen/vue-core-api-utils";
3
3
  //#region src/modules/invoice/api/queries/invoiceDetail.query.ts
4
4
  function n(n) {
@@ -1,7 +1,7 @@
1
1
  import "./api.util-CR2xLnNj.js";
2
2
  import { E as e, v as t } from "./documentTitle.composable-RvqrZTBa.js";
3
3
  import { r as n } from "./useCurrencyFormat.composable-MtZaqKnO.js";
4
- import { n as r } from "./CustomFieldValueText-BP4bKQh7.js";
4
+ import { n as r } from "./CustomFieldValueText-BLqu_dSP.js";
5
5
  import { useI18n as i } from "vue-i18n";
6
6
  import { computed as a, createBlock as o, createCommentVNode as s, createVNode as c, defineComponent as l, openBlock as u, unref as d, withCtx as f } from "vue";
7
7
  import { QueryClient as p, getTanstackQueryClient as m } from "@wisemen/vue-core-api-utils";
@@ -1,4 +1,4 @@
1
- import { t as e } from "./i18n.lib-MOiHLIGc.js";
1
+ import { t as e } from "./i18n.lib-CN9MRGQ0.js";
2
2
  import { ht as t } from "./api.util-CR2xLnNj.js";
3
3
  import { useI18n as n } from "vue-i18n";
4
4
  import { computed as r, ref as i, shallowRef as a, toValue as o, watch as s } from "vue";
@@ -25,27 +25,27 @@ function f(e) {
25
25
  }
26
26
  //#endregion
27
27
  //#region src/composables/invoicingConfig.composable.ts
28
- var p = i(!1), m = i(!0), h = i(!0), g = i(!0);
29
- function _(e) {
28
+ var p = i(!1), m = i(!0), h = i(!0), g = i(!0), _ = i(!0);
29
+ function v(e) {
30
30
  return null;
31
31
  }
32
- function v(e) {
32
+ function y(e) {
33
33
  return null;
34
34
  }
35
- var y = i(_), b = i(v), x = a(null);
36
- function S(t) {
35
+ var b = i(v), x = i(y), S = a(null);
36
+ function C(t) {
37
37
  return s(() => o(t.locale), (t) => {
38
38
  e.global.locale.value = t;
39
39
  }), f({
40
40
  apiInvoicingBaseUrl: t.apiInvoicingBaseUrl,
41
41
  getAccessToken: t.getAccessToken,
42
42
  getLocale: () => o(t.locale)
43
- }), m.value = t.config?.isDeliveryDateVisible ?? !0, h.value = t.config?.isGlobalDiscountEnabled ?? !0, g.value = t.config?.isLineDiscountEnabled ?? !0, y.value = t.getCustomerDetailRoute ?? _, b.value = t.getCustomFieldReferenceRoute ?? v, x.value = t.invoicePdfComponent ?? null, p.value = !0, Promise.resolve();
43
+ }), m.value = t.config?.isDeliveryDateVisible ?? !0, h.value = t.config?.isGlobalDiscountEnabled ?? !0, g.value = t.config?.isLineDiscountEnabled ?? !0, _.value = t.config?.isUnitVisible ?? !0, b.value = t.getCustomerDetailRoute ?? v, x.value = t.getCustomFieldReferenceRoute ?? y, S.value = t.invoicePdfComponent ?? null, p.value = !0, Promise.resolve();
44
44
  }
45
- function C() {
45
+ function w() {
46
46
  let e = n();
47
47
  function t(t) {
48
- return S({
48
+ return C({
49
49
  ...t,
50
50
  locale: e.locale
51
51
  });
@@ -55,11 +55,12 @@ function C() {
55
55
  isGlobalDiscountEnabled: r(() => h.value),
56
56
  isInitialized: r(() => p.value),
57
57
  isLineDiscountEnabled: r(() => g.value),
58
- getCustomerDetailRoute: (e) => y.value(e),
59
- getCustomFieldReferenceRoute: (e) => b.value(e),
58
+ isUnitVisible: r(() => _.value),
59
+ getCustomerDetailRoute: (e) => b.value(e),
60
+ getCustomFieldReferenceRoute: (e) => x.value(e),
60
61
  init: t,
61
- invoicePdfComponent: r(() => x.value)
62
+ invoicePdfComponent: r(() => S.value)
62
63
  };
63
64
  }
64
65
  //#endregion
65
- export { C as n, S as t };
66
+ export { w as n, C as t };
@@ -80,7 +80,7 @@ export declare const i18nPlugin: import('vue-i18n').I18n<{
80
80
  "wise_invoicing.invoice.overview.tabs.overpaid": string;
81
81
  "wise_invoicing.invoice.overview.tabs.expired": string;
82
82
  "wise_invoicing.invoice.overview.tabs.protested": string;
83
- "wise_invoicing.invoice.overview.tabs.settled": string;
83
+ "wise_invoicing.invoice.overview.tabs.approvals": string;
84
84
  "wise_invoicing.invoice.overview.columns.name": string;
85
85
  "wise_invoicing.invoice.overview.columns.invoice_number": string;
86
86
  "wise_invoicing.invoice.overview.columns.date_created": string;
@@ -117,8 +117,6 @@ export declare const i18nPlugin: import('vue-i18n').I18n<{
117
117
  "wise_invoicing.invoice.overview.bulk.mark_as_ready.skipped_preview": string;
118
118
  "wise_invoicing.invoice.overview.bulk.mark_as_ready.success": string;
119
119
  "wise_invoicing.invoice.overview.bulk.mark_as_ready.title": string;
120
- "wise_invoicing.invoice.overview.bulk.select_all": string;
121
- "wise_invoicing.invoice.overview.bulk.select_document": string;
122
120
  "wise_invoicing.invoice.overview.bulk.send_approval.action": string;
123
121
  "wise_invoicing.invoice.overview.bulk.send_approval.confirm": string;
124
122
  "wise_invoicing.invoice.overview.bulk.send_approval.description": string;
@@ -1023,7 +1021,7 @@ export declare const i18nPlugin: import('vue-i18n').I18n<{
1023
1021
  "wise_invoicing.invoice.overview.tabs.overpaid": string;
1024
1022
  "wise_invoicing.invoice.overview.tabs.expired": string;
1025
1023
  "wise_invoicing.invoice.overview.tabs.protested": string;
1026
- "wise_invoicing.invoice.overview.tabs.settled": string;
1024
+ "wise_invoicing.invoice.overview.tabs.approvals": string;
1027
1025
  "wise_invoicing.invoice.overview.columns.name": string;
1028
1026
  "wise_invoicing.invoice.overview.columns.invoice_number": string;
1029
1027
  "wise_invoicing.invoice.overview.columns.date_created": string;
@@ -1060,8 +1058,6 @@ export declare const i18nPlugin: import('vue-i18n').I18n<{
1060
1058
  "wise_invoicing.invoice.overview.bulk.mark_as_ready.skipped_preview": string;
1061
1059
  "wise_invoicing.invoice.overview.bulk.mark_as_ready.success": string;
1062
1060
  "wise_invoicing.invoice.overview.bulk.mark_as_ready.title": string;
1063
- "wise_invoicing.invoice.overview.bulk.select_all": string;
1064
- "wise_invoicing.invoice.overview.bulk.select_document": string;
1065
1061
  "wise_invoicing.invoice.overview.bulk.send_approval.action": string;
1066
1062
  "wise_invoicing.invoice.overview.bulk.send_approval.confirm": string;
1067
1063
  "wise_invoicing.invoice.overview.bulk.send_approval.description": string;
@@ -73,7 +73,7 @@ declare const _default: {
73
73
  "wise_invoicing.invoice.overview.tabs.overpaid": "Overpaid",
74
74
  "wise_invoicing.invoice.overview.tabs.expired": "Expired",
75
75
  "wise_invoicing.invoice.overview.tabs.protested": "Protested",
76
- "wise_invoicing.invoice.overview.tabs.settled": "Settled",
76
+ "wise_invoicing.invoice.overview.tabs.approvals": "Approvals",
77
77
  "wise_invoicing.invoice.overview.columns.name": "Name",
78
78
  "wise_invoicing.invoice.overview.columns.invoice_number": "Invoice number",
79
79
  "wise_invoicing.invoice.overview.columns.date_created": "Date created",
@@ -110,8 +110,6 @@ declare const _default: {
110
110
  "wise_invoicing.invoice.overview.bulk.mark_as_ready.skipped_preview": "{count} invoice is not ready to mark as ready. | {count} invoices are not ready to mark as ready.",
111
111
  "wise_invoicing.invoice.overview.bulk.mark_as_ready.success": "{count} invoice has been marked as ready. | {count} invoices have been marked as ready.",
112
112
  "wise_invoicing.invoice.overview.bulk.mark_as_ready.title": "Mark {count} invoice as ready? | Mark {count} invoices as ready?",
113
- "wise_invoicing.invoice.overview.bulk.select_all": "Select all",
114
- "wise_invoicing.invoice.overview.bulk.select_document": "Select document",
115
113
  "wise_invoicing.invoice.overview.bulk.send_approval.action": "Send approval requests",
116
114
  "wise_invoicing.invoice.overview.bulk.send_approval.confirm": "Send requests",
117
115
  "wise_invoicing.invoice.overview.bulk.send_approval.description": "Each customer receives the proforma of their invoice to approve.",
@@ -73,7 +73,7 @@ declare const _default: {
73
73
  "wise_invoicing.invoice.overview.tabs.overpaid": "Overbetaald",
74
74
  "wise_invoicing.invoice.overview.tabs.expired": "Vervallen",
75
75
  "wise_invoicing.invoice.overview.tabs.protested": "Geprotesteerd",
76
- "wise_invoicing.invoice.overview.tabs.settled": "Vereffend",
76
+ "wise_invoicing.invoice.overview.tabs.approvals": "Goedkeuringen",
77
77
  "wise_invoicing.invoice.overview.columns.name": "Naam",
78
78
  "wise_invoicing.invoice.overview.columns.invoice_number": "Factuurnummer",
79
79
  "wise_invoicing.invoice.overview.columns.date_created": "Aanmaakdatum",
@@ -110,8 +110,6 @@ declare const _default: {
110
110
  "wise_invoicing.invoice.overview.bulk.mark_as_ready.skipped_preview": "{count} factuur is niet klaar om als klaar te markeren. | {count} facturen zijn niet klaar om als klaar te markeren.",
111
111
  "wise_invoicing.invoice.overview.bulk.mark_as_ready.success": "{count} factuur is als klaar gemarkeerd. | {count} facturen zijn als klaar gemarkeerd.",
112
112
  "wise_invoicing.invoice.overview.bulk.mark_as_ready.title": "Markeer {count} factuur als klaar? | Markeer {count} facturen als klaar?",
113
- "wise_invoicing.invoice.overview.bulk.select_all": "Alles selecteren",
114
- "wise_invoicing.invoice.overview.bulk.select_document": "Document selecteren",
115
113
  "wise_invoicing.invoice.overview.bulk.send_approval.action": "Goedkeuringsaanvragen versturen",
116
114
  "wise_invoicing.invoice.overview.bulk.send_approval.confirm": "Aanvragen versturen",
117
115
  "wise_invoicing.invoice.overview.bulk.send_approval.description": "Elke klant ontvangt de proforma van zijn factuur ter goedkeuring.",
@@ -1,5 +1,5 @@
1
1
  import { BulkFinalizeInvoiceResponse } from '../../../../client/index.ts';
2
- import { InvoiceUuid } from '../../models/invoiceUuid.model.ts';
2
+ import { InvoiceBulkTarget } from '../../models/invoice/bulk/invoiceBulkTarget.model.ts';
3
3
  export declare function useInvoiceBulkFinalizeMutation(): import('@wisemen/vue-core-api-utils').UseMutationReturnType<void, BulkFinalizeInvoiceResponse, {
4
- invoiceUuids: InvoiceUuid[];
4
+ target: InvoiceBulkTarget;
5
5
  }, string>;
@@ -1,5 +1,5 @@
1
1
  import { BulkMarkInvoiceAsReadyResponse } from '../../../../client/index.ts';
2
- import { InvoiceUuid } from '../../models/invoiceUuid.model.ts';
2
+ import { InvoiceBulkTarget } from '../../models/invoice/bulk/invoiceBulkTarget.model.ts';
3
3
  export declare function useInvoiceBulkMarkAsReadyMutation(): import('@wisemen/vue-core-api-utils').UseMutationReturnType<void, BulkMarkInvoiceAsReadyResponse, {
4
- invoiceUuids: InvoiceUuid[];
4
+ target: InvoiceBulkTarget;
5
5
  }, string>;
@@ -1,5 +1,5 @@
1
1
  import { BulkSendInvoiceResponse } from '../../../../client/index.ts';
2
- import { InvoiceUuid } from '../../models/invoiceUuid.model.ts';
2
+ import { InvoiceBulkTarget } from '../../models/invoice/bulk/invoiceBulkTarget.model.ts';
3
3
  export declare function useInvoiceBulkSendMutation(): import('@wisemen/vue-core-api-utils').UseMutationReturnType<void, BulkSendInvoiceResponse, {
4
- invoiceUuids: InvoiceUuid[];
4
+ target: InvoiceBulkTarget;
5
5
  }, string>;
@@ -1,5 +1,5 @@
1
1
  import { BulkSendInvoiceApprovalResponse } from '../../../../client/index.ts';
2
- import { InvoiceUuid } from '../../models/invoiceUuid.model.ts';
2
+ import { InvoiceBulkTarget } from '../../models/invoice/bulk/invoiceBulkTarget.model.ts';
3
3
  export declare function useInvoiceBulkSendApprovalMutation(): import('@wisemen/vue-core-api-utils').UseMutationReturnType<void, BulkSendInvoiceApprovalResponse, {
4
- invoiceUuids: InvoiceUuid[];
4
+ target: InvoiceBulkTarget;
5
5
  }, string>;
@@ -5,6 +5,7 @@ import { CreditNoteUuid } from '../../../credit-note/models/creditNoteUuid.model
5
5
  import { InvoiceApprovalUuid } from '../../models/invoice/approval/invoiceApprovalUuid.model.ts';
6
6
  import { InvoiceApproveForm } from '../../models/invoice/approval/invoiceApproveForm.model.ts';
7
7
  import { InvoiceRejectForm } from '../../models/invoice/approval/invoiceRejectForm.model.ts';
8
+ import { InvoiceBulkTarget } from '../../models/invoice/bulk/invoiceBulkTarget.model.ts';
8
9
  import { InvoiceCreateForm } from '../../models/invoice/create/invoiceCreateForm.model.ts';
9
10
  import { InvoiceDetail } from '../../models/invoice/detail/invoiceDetail.model.ts';
10
11
  import { InvoiceIndex } from '../../models/invoice/index/invoiceIndex.model.ts';
@@ -23,10 +24,10 @@ export declare class InvoiceService {
23
24
  static applyDiscount(invoiceUuid: InvoiceUuid, form: InvoiceApplyDiscountForm): Promise<ApiResult<void>>;
24
25
  static approveApproval(approvalUuid: InvoiceApprovalUuid, form: InvoiceApproveForm): Promise<ApiResult<void>>;
25
26
  static archiveApproval(approvalUuid: InvoiceApprovalUuid): Promise<ApiResult<void>>;
26
- static bulkFinalize(invoiceUuids: InvoiceUuid[]): Promise<ApiResult<BulkFinalizeInvoiceResponse>>;
27
- static bulkMarkAsReady(invoiceUuids: InvoiceUuid[]): Promise<ApiResult<BulkMarkInvoiceAsReadyResponse>>;
28
- static bulkSend(invoiceUuids: InvoiceUuid[]): Promise<ApiResult<BulkSendInvoiceResponse>>;
29
- static bulkSendApproval(invoiceUuids: InvoiceUuid[]): Promise<ApiResult<BulkSendInvoiceApprovalResponse>>;
27
+ static bulkFinalize(target: InvoiceBulkTarget): Promise<ApiResult<BulkFinalizeInvoiceResponse>>;
28
+ static bulkMarkAsReady(target: InvoiceBulkTarget): Promise<ApiResult<BulkMarkInvoiceAsReadyResponse>>;
29
+ static bulkSend(target: InvoiceBulkTarget): Promise<ApiResult<BulkSendInvoiceResponse>>;
30
+ static bulkSendApproval(target: InvoiceBulkTarget): Promise<ApiResult<BulkSendInvoiceApprovalResponse>>;
30
31
  static create(form: InvoiceCreateForm): Promise<ApiResult<InvoiceUuid>>;
31
32
  static createCreditNote(invoiceUuid: InvoiceUuid): Promise<ApiResult<CreditNoteUuid>>;
32
33
  static createPayment(invoiceUuid: InvoiceUuid, form: InvoicePaymentCreateForm): Promise<ApiResult<void>>;
@@ -45,10 +46,10 @@ export declare class InvoiceService {
45
46
  static markAsPriorApprovalRequired(invoiceUuid: InvoiceUuid): Promise<ApiResult<void>>;
46
47
  static markAsProtested(invoiceUuid: InvoiceUuid): Promise<ApiResult<void>>;
47
48
  static markAsReady(invoiceUuid: InvoiceUuid): Promise<ApiResult<void>>;
48
- static previewBulkFinalize(invoiceUuids: InvoiceUuid[]): Promise<ApiResult<PreviewBulkFinalizeInvoiceResponse>>;
49
- static previewBulkMarkAsReady(invoiceUuids: InvoiceUuid[]): Promise<ApiResult<PreviewBulkMarkInvoiceAsReadyResponse>>;
50
- static previewBulkSend(invoiceUuids: InvoiceUuid[]): Promise<ApiResult<PreviewBulkSendInvoiceResponse>>;
51
- static previewBulkSendApproval(invoiceUuids: InvoiceUuid[]): Promise<ApiResult<PreviewBulkSendInvoiceApprovalResponse>>;
49
+ static previewBulkFinalize(target: InvoiceBulkTarget): Promise<ApiResult<PreviewBulkFinalizeInvoiceResponse>>;
50
+ static previewBulkMarkAsReady(target: InvoiceBulkTarget): Promise<ApiResult<PreviewBulkMarkInvoiceAsReadyResponse>>;
51
+ static previewBulkSend(target: InvoiceBulkTarget): Promise<ApiResult<PreviewBulkSendInvoiceResponse>>;
52
+ static previewBulkSendApproval(target: InvoiceBulkTarget): Promise<ApiResult<PreviewBulkSendInvoiceApprovalResponse>>;
52
53
  static rejectApproval(approvalUuid: InvoiceApprovalUuid, form: InvoiceRejectForm): Promise<ApiResult<void>>;
53
54
  static restartApproval(invoiceUuid: InvoiceUuid): Promise<ApiResult<void>>;
54
55
  static restoreFromProForma(invoiceUuid: InvoiceUuid): Promise<ApiResult<void>>;
@@ -0,0 +1,15 @@
1
+ import { InvoiceIndexQueryParams } from '../index/invoiceIndexQueryParams.model.ts';
2
+ import { InvoiceUuid } from '../../invoiceUuid.model.ts';
3
+ /**
4
+ * The invoices a bulk action or its preview applies to: either an explicit
5
+ * list, or every invoice matching the overview's filters and search except the
6
+ * ones the user deselected.
7
+ */
8
+ export type InvoiceBulkTarget = {
9
+ excludedInvoiceUuids: InvoiceUuid[];
10
+ queryParams: Pick<InvoiceIndexQueryParams, 'filters' | 'search'>;
11
+ type: 'matching';
12
+ } | {
13
+ invoiceUuids: InvoiceUuid[];
14
+ type: 'invoices';
15
+ };
@@ -0,0 +1,10 @@
1
+ import { ViewInvoiceIndexFilterQuery } from '../../../../../client/index.ts';
2
+ import { InvoiceBulkTarget } from './invoiceBulkTarget.model.ts';
3
+ interface InvoiceBulkTargetQueryDto {
4
+ filter: ViewInvoiceIndexFilterQuery;
5
+ search?: string;
6
+ }
7
+ export declare class InvoiceBulkTargetTransformer {
8
+ static toDto(target: InvoiceBulkTarget): InvoiceBulkTargetQueryDto;
9
+ }
10
+ export {};
@@ -1,7 +1,13 @@
1
1
  import { OffsetPagination } from '@wisemen/vue-core-api-utils';
2
- import { ViewInvoiceIndexV1Data } from '../../../../../client/index.ts';
2
+ import { InvoiceLifecycleStatus, ViewInvoiceIndexFilterQuery, ViewInvoiceIndexV1Data } from '../../../../../client/index.ts';
3
3
  import { InvoiceIndexQueryParams } from './invoiceIndexQueryParams.model.ts';
4
+ type InvoiceIndexFilterQuery = ViewInvoiceIndexFilterQuery & {
5
+ lifecycleStatuses?: InvoiceLifecycleStatus[];
6
+ };
4
7
  export declare class InvoiceIndexQueryParamsTransformer {
5
8
  private static toDateRangeDto;
6
9
  static toDto(options: OffsetPagination<InvoiceIndexQueryParams>): ViewInvoiceIndexV1Data['query'];
10
+ /** Also used by the bulk actions, which accept the same filter as the index. */
11
+ static toFilterDto(queryFilters: InvoiceIndexQueryParams['filters']): InvoiceIndexFilterQuery;
7
12
  }
13
+ export {};
@@ -1,7 +1,6 @@
1
1
  type __VLS_Props = {
2
2
  canFinalize: boolean;
3
3
  canMarkAsReady: boolean;
4
- canSelectAll: boolean;
5
4
  canSend: boolean;
6
5
  canSendApproval: boolean;
7
6
  selectedCount: number;
@@ -11,14 +10,12 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {
11
10
  send: () => any;
12
11
  finalize: () => any;
13
12
  markAsReady: () => any;
14
- selectAll: () => any;
15
13
  sendApproval: () => any;
16
14
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
17
15
  onCancel?: (() => any) | undefined;
18
16
  onSend?: (() => any) | undefined;
19
17
  onFinalize?: (() => any) | undefined;
20
18
  onMarkAsReady?: (() => any) | undefined;
21
- onSelectAll?: (() => any) | undefined;
22
19
  onSendApproval?: (() => any) | undefined;
23
20
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
24
21
  declare const _default: typeof __VLS_export;
@@ -0,0 +1,36 @@
1
+ import { BulkActionMeta, BulkActionSkippedItem } from '../../../../../client/index.ts';
2
+ import { InvoiceBulkTarget } from '../../../models/invoice/bulk/invoiceBulkTarget.model.ts';
3
+ import { InvoiceUuid } from '../../../models/invoiceUuid.model.ts';
4
+ import { InvoiceOverviewBulkMatching } from './invoiceOverviewSelection.composable.ts';
5
+ import { InvoiceOverviewBulkActionItem } from '../utils/invoiceOverviewBulkActionFeedback.util.ts';
6
+ interface InvoiceOverviewBulkActionPreview {
7
+ skipped: BulkActionSkippedItem[];
8
+ meta: BulkActionMeta;
9
+ }
10
+ interface UseInvoiceOverviewBulkActionPlanOptions<TItem extends InvoiceOverviewBulkActionItem> {
11
+ /** The selected invoices the action applies to, judged on the loaded data. */
12
+ eligibleInvoices: () => TItem[];
13
+ /** The selected invoices that are loaded in the overview. */
14
+ invoices: () => TItem[];
15
+ matching: () => InvoiceOverviewBulkMatching | null;
16
+ preview: () => InvoiceOverviewBulkActionPreview | null;
17
+ }
18
+ /**
19
+ * Decides what a bulk action dialog previews and submits.
20
+ *
21
+ * Picked invoices are all loaded, so the dialog narrows them down to the
22
+ * eligible ones itself and submits those the preview kept. With every matching
23
+ * invoice selected most of them are not loaded: the backend resolves the
24
+ * selection from the overview's filters, and only the skipped invoices that
25
+ * are loaded can be named.
26
+ */
27
+ export declare function useInvoiceOverviewBulkActionPlan<TItem extends InvoiceOverviewBulkActionItem>(options: UseInvoiceOverviewBulkActionPlanOptions<TItem>): {
28
+ getProcessedInvoiceUuids: (target: InvoiceBulkTarget, skipped: BulkActionSkippedItem[]) => InvoiceUuid[];
29
+ previewTarget: import('vue').ComputedRef<InvoiceBulkTarget | null>;
30
+ processableCount: import('vue').ComputedRef<number>;
31
+ skippedCount: import('vue').ComputedRef<number>;
32
+ skippedInvoices: import('vue').ComputedRef<TItem[]>;
33
+ submitTarget: import('vue').ComputedRef<InvoiceBulkTarget | null>;
34
+ titleCount: import('vue').ComputedRef<number>;
35
+ };
36
+ export {};
@@ -1,5 +1,7 @@
1
1
  import { InvoiceIndex } from '../../../models/invoice/index/invoiceIndex.model.ts';
2
+ import { InvoiceOverviewBulkMatching } from './invoiceOverviewSelection.composable.ts';
2
3
  interface UseInvoiceOverviewBulkSendEligibilityOptions {
4
+ matching?: () => InvoiceOverviewBulkMatching | null;
3
5
  selectedInvoices: () => InvoiceIndex[];
4
6
  }
5
7
  /**
@@ -7,7 +9,8 @@ interface UseInvoiceOverviewBulkSendEligibilityOptions {
7
9
  * backend also requires a generated PDF and a default recipient, neither of
8
10
  * which is exposed on the index. We therefore confirm real send eligibility
9
11
  * against the bulk send preview so the action is only offered when at least one
10
- * selected document can actually be sent.
12
+ * selected document can actually be sent. With every matching invoice selected
13
+ * most of them are not loaded, so the preview runs on the whole selection.
11
14
  */
12
15
  export declare function useInvoiceOverviewBulkSendEligibility(options: UseInvoiceOverviewBulkSendEligibilityOptions): {
13
16
  canSend: import('vue').ComputedRef<boolean>;
@@ -1,5 +1,5 @@
1
1
  import { InvoiceIndexQueryParams } from '../../../models/invoice/index/invoiceIndexQueryParams.model.ts';
2
- export type InvoiceOverviewTab = 'all' | 'awaiting_payment' | 'credited' | 'overdue' | 'paid' | 'settled';
2
+ export type InvoiceOverviewTab = 'all' | 'approvals' | 'awaiting_payment' | 'credited' | 'overdue' | 'paid';
3
3
  export interface TabItem {
4
4
  key: InvoiceOverviewTab;
5
5
  label: string;
@@ -1,20 +1,33 @@
1
- interface UseInvoiceOverviewSelectionOptions<TRow extends {
2
- uuid: string;
3
- }> {
4
- rows: () => TRow[];
1
+ import { InvoiceBulkTarget } from '../../../models/invoice/bulk/invoiceBulkTarget.model.ts';
2
+ import { InvoiceIndex } from '../../../models/invoice/index/invoiceIndex.model.ts';
3
+ import { InvoiceIndexQueryParams } from '../../../models/invoice/index/invoiceIndexQueryParams.model.ts';
4
+ /**
5
+ * What the table's `select` event reports: the rows picked one by one, or,
6
+ * once the header checkbox selected everything, the rows left out again.
7
+ */
8
+ export interface InvoiceOverviewTableSelection {
9
+ items: InvoiceIndex[];
10
+ type: 'excludes' | 'includes';
5
11
  }
6
- export declare function useInvoiceOverviewSelection<TRow extends {
7
- uuid: string;
8
- }>(options: UseInvoiceOverviewSelectionOptions<TRow>): {
9
- isSelected: (id: TRow["uuid"]) => boolean;
10
- allSelected: import('vue').ComputedRef<boolean>;
11
- canSelectAll: import('vue').ComputedRef<boolean>;
12
+ /**
13
+ * Set when the header checkbox selected every invoice matching the overview's
14
+ * filters and search, including the pages that are not loaded yet.
15
+ */
16
+ export interface InvoiceOverviewBulkMatching {
17
+ count: number;
18
+ target: InvoiceBulkTarget;
19
+ }
20
+ interface UseInvoiceOverviewSelectionOptions {
21
+ queryParams: () => Pick<InvoiceIndexQueryParams, 'filters' | 'search'>;
22
+ rows: () => InvoiceIndex[];
23
+ totalCount: () => number;
24
+ }
25
+ export declare function useInvoiceOverviewSelection(options: UseInvoiceOverviewSelectionOptions): {
12
26
  clearSelection: () => void;
13
- selectAll: () => void;
27
+ matching: import('vue').ComputedRef<InvoiceOverviewBulkMatching | null>;
14
28
  selectedCount: import('vue').ComputedRef<number>;
15
- selectedIds: import('vue').ShallowRef<TRow["uuid"][], TRow["uuid"][]>;
16
- selectedInvoices: import('vue').ComputedRef<TRow[]>;
17
- syncSelection: () => void;
18
- toggleRow: (id: TRow["uuid"]) => void;
29
+ selectedInvoices: import('vue').ComputedRef<InvoiceIndex[]>;
30
+ tableKey: import('vue').Ref<number, number>;
31
+ onSelect: (selection: InvoiceOverviewTableSelection) => void;
19
32
  };
20
33
  export {};
@@ -4,10 +4,6 @@ import { CustomFieldDefinition } from '../../../../custom-field/models/custom-fi
4
4
  import { InvoiceIndex } from '../../../models/invoice/index/invoiceIndex.model.ts';
5
5
  interface UseInvoiceOverviewTableColumnsOptions {
6
6
  customFieldDefinitions?: () => CustomFieldDefinition[];
7
- selection?: {
8
- isSelected: (invoiceUuid: InvoiceIndex['uuid']) => boolean;
9
- toggleRow: (invoiceUuid: InvoiceIndex['uuid']) => void;
10
- };
11
7
  }
12
8
  export declare function useInvoiceOverviewTableColumns(options?: UseInvoiceOverviewTableColumnsOptions): import('vue').ComputedRef<UITableColumn<InvoiceIndex, string>[]>;
13
9
  export type InvoiceOverviewTableColumnKeys = UIInferTableColumnKeys<UnwrapRef<ReturnType<typeof useInvoiceOverviewTableColumns>>>[];
@@ -1,6 +1,8 @@
1
1
  import { InvoiceIndex } from '../../../models/invoice/index/invoiceIndex.model.ts';
2
+ import { InvoiceOverviewBulkMatching } from '../composables/invoiceOverviewSelection.composable.ts';
2
3
  type __VLS_Props = {
3
4
  invoices: InvoiceIndex[];
5
+ matching: InvoiceOverviewBulkMatching | null;
4
6
  onFinalized: () => void;
5
7
  };
6
8
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
@@ -1,6 +1,8 @@
1
1
  import { InvoiceIndex } from '../../../models/invoice/index/invoiceIndex.model.ts';
2
+ import { InvoiceOverviewBulkMatching } from '../composables/invoiceOverviewSelection.composable.ts';
2
3
  type __VLS_Props = {
3
4
  invoices: InvoiceIndex[];
5
+ matching: InvoiceOverviewBulkMatching | null;
4
6
  onMarkedAsReady: () => void;
5
7
  };
6
8
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
@@ -1,8 +1,10 @@
1
1
  import { InvoiceIndex } from '../../../models/invoice/index/invoiceIndex.model.ts';
2
+ import { InvoiceOverviewBulkMatching } from '../composables/invoiceOverviewSelection.composable.ts';
2
3
  import { InvoiceOverviewBulkActionItem } from '../utils/invoiceOverviewBulkActionFeedback.util.ts';
3
4
  type InvoiceOverviewBulkSendApprovalItem = InvoiceOverviewBulkActionItem & Pick<InvoiceIndex, 'approval' | 'requiresPriorApproval'>;
4
5
  type __VLS_Props = {
5
6
  invoices: InvoiceOverviewBulkSendApprovalItem[];
7
+ matching: InvoiceOverviewBulkMatching | null;
6
8
  onSent: () => void;
7
9
  };
8
10
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
@@ -1,6 +1,8 @@
1
1
  import { InvoiceIndex } from '../../../models/invoice/index/invoiceIndex.model.ts';
2
+ import { InvoiceOverviewBulkMatching } from '../composables/invoiceOverviewSelection.composable.ts';
2
3
  type __VLS_Props = {
3
4
  invoices: InvoiceIndex[];
5
+ matching: InvoiceOverviewBulkMatching | null;
4
6
  onSent: () => void;
5
7
  };
6
8
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
@@ -5,9 +5,9 @@ type __VLS_Props = {
5
5
  customFieldDefinitions: CustomFieldDefinition[];
6
6
  onCreateInvoice?: () => void;
7
7
  };
8
- declare var __VLS_49: {};
8
+ declare var __VLS_56: {};
9
9
  type __VLS_Slots = {} & {
10
- actions?: (props: typeof __VLS_49) => any;
10
+ actions?: (props: typeof __VLS_56) => any;
11
11
  };
12
12
  declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
13
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;