@wisemen/wise-invoicing-web 0.1.1 → 0.2.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 (206) hide show
  1. package/dist/ApprovalReminderSettingsViewDataProvider-D-qXZrPT.js +151 -0
  2. package/dist/{BillingDocumentDetailViewDataProvider-f5goWm_i.js → BillingDocumentDetailViewDataProvider-DDdtlW-2.js} +1386 -1450
  3. package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
  4. package/dist/{BillingDocumentPdf-5vi2pgRM.js → BillingDocumentPdf-ehdFB6mr.js} +4 -4
  5. package/dist/{CreditNoteDetailViewDataProvider-Byd1QvfY.js → CreditNoteDetailViewDataProvider-11a-JO3H.js} +201 -201
  6. package/dist/{CreditNotePdfViewDataProvider-DI4eQkpM.js → CreditNotePdfViewDataProvider-bfeaya3P.js} +3 -3
  7. package/dist/{CustomFieldValueText-BGbQwhON.js → CustomFieldValueText-CZQXGE5F.js} +81 -81
  8. package/dist/DataProvider-C3uEds9v.js +75 -0
  9. package/dist/{DunningCaseDetailViewDataProvider-DKuuysqS.js → DunningCaseDetailViewDataProvider-DC-ziMoO.js} +35 -35
  10. package/dist/{DunningCaseOverviewView-aWttPLrC.js → DunningCaseOverviewView-y_bCmi5j.js} +180 -180
  11. package/dist/{DunningCaseReminderPdfViewDataProvider-I0I_WQQB.js → DunningCaseReminderPdfViewDataProvider-DNODfED_.js} +22 -23
  12. package/dist/{DunningCaseSendDialog-DyvA5R1p.js → DunningCaseSendDialog-BPXcqit5.js} +82 -82
  13. package/dist/InvoiceApprovalOverviewView-DZ14mi4L.js +870 -0
  14. package/dist/InvoiceApprovalStatusBadge-U-dW2hR4.js +161 -0
  15. package/dist/InvoiceApproveDialog-2LXneG2r.js +308 -0
  16. package/dist/InvoiceDetailViewDataProvider-BYeaaQzL.js +2156 -0
  17. package/dist/InvoiceOverviewBulkSendApprovalDialog-99dfuN4i.js +318 -0
  18. package/dist/InvoiceOverviewViewDataProvider-CZIQeftL.js +1620 -0
  19. package/dist/{InvoicePdfView-C-7m2g3b.js → InvoicePdfView-BJRTg_TH.js} +2 -2
  20. package/dist/{InvoicePdfViewDataProvider-BPiK110e.js → InvoicePdfViewDataProvider-CwI_uGm3.js} +4 -4
  21. package/dist/InvoicePublicPdfViewDataProvider-uZUfsr5K.js +45 -0
  22. package/dist/InvoicingFileUploadProvider-D9Xk4rQM.js +94 -0
  23. package/dist/{IssuerSettingsViewDataProvider-COqHGUE6.js → IssuerSettingsViewDataProvider-CGRa8F-2.js} +4 -4
  24. package/dist/{ReminderSettingsViewDataProvider-Dys4bUU7.js → ReminderSettingsViewDataProvider-1ucp3z2T.js} +58 -58
  25. package/dist/{api.util-BCSgCfpS.js → api.util-C_kMGlJN.js} +1456 -846
  26. package/dist/{billingDocumentDetail.transformer-BBn9R_cx.js → billingDocumentDetail.transformer-Da6_-Hv9.js} +58 -59
  27. package/dist/client/index.d.ts +2 -2
  28. package/dist/client/sdk.gen.d.ts +18 -1
  29. package/dist/client/types.gen.d.ts +1059 -106
  30. package/dist/client/zod.gen.d.ts +32759 -16136
  31. package/dist/{creditNoteDetail.query-BcPsB96h.js → creditNoteDetail.query-DLR7L0Ep.js} +30 -30
  32. package/dist/{dist-BBjpqvUl.js → dist-CoztMdYH.js} +614 -614
  33. package/dist/{dist-D9lp7NDv.js → dist-Cxdm09Lp.js} +210 -98
  34. package/dist/{documentTitle.composable-4ApFl9TZ.js → documentTitle.composable-DsBbzhXN.js} +23 -15
  35. package/dist/{customFieldValue.util-BwsX8exl.js → download.util-B5Q7KUC9.js} +6 -6
  36. package/dist/{i18n.lib-C6eb-F-e.js → i18n.lib-Cvr8pcDw.js} +272 -8
  37. package/dist/index.d.ts +297 -31
  38. package/dist/index.js +344 -324
  39. package/dist/invoice.service-DEEA9mal.js +745 -0
  40. package/dist/invoiceApproval.service-DvL3LliM.js +72 -0
  41. package/dist/invoiceApprovalStatus.util-3Zh10Pj8.js +79 -0
  42. package/dist/invoiceDeliveryStatus.util-nCsqDypY.js +211 -0
  43. package/dist/{invoiceDetail.query-Cek8nyaw.js → invoiceDetail.query-CRoH_SgM.js} +1 -1
  44. package/dist/{invoicingConfig.composable-DTmad1fe.js → invoicingConfig.composable-rxjGK882.js} +2 -2
  45. package/dist/{issuerSettings.query-Bvz-Oj5D.js → issuerSettings.query-Dc5gsaEm.js} +5 -5
  46. package/dist/libs/i18n.lib.d.ts +270 -6
  47. package/dist/locales/en-US.json.d.ts +136 -4
  48. package/dist/locales/nl-BE.json.d.ts +136 -4
  49. package/dist/modules/dunning-case/models/dunningCase.transformer.d.ts +0 -1
  50. package/dist/modules/invoice/api/mutations/invoiceApproveApproval.mutation.d.ts +16 -0
  51. package/dist/modules/invoice/api/mutations/invoiceArchiveApproval.mutation.d.ts +6 -0
  52. package/dist/modules/invoice/api/mutations/invoiceBulkSendApproval.mutation.d.ts +5 -0
  53. package/dist/modules/invoice/api/mutations/invoiceMarkAsPriorApprovalRequired.mutation.d.ts +4 -0
  54. package/dist/modules/invoice/api/mutations/invoiceRejectApproval.mutation.d.ts +9 -0
  55. package/dist/modules/invoice/api/mutations/invoiceRestoreFromProForma.mutation.d.ts +4 -0
  56. package/dist/modules/invoice/api/mutations/invoiceSendApproval.mutation.d.ts +5 -0
  57. package/dist/modules/invoice/api/mutations/invoiceUnmarkAsPriorApprovalRequired.mutation.d.ts +4 -0
  58. package/dist/modules/invoice/api/services/invoice.service.d.ts +14 -1
  59. package/dist/modules/invoice/components/InvoiceApprovalOutOfSyncIndicator.vue.d.ts +3 -0
  60. package/dist/{ui/DisplayState.vue.d.ts → modules/invoice/components/InvoiceApprovalStatusBadge.vue.d.ts} +7 -10
  61. package/dist/modules/invoice/components/InvoiceApprovalStatusChip.vue.d.ts +16 -0
  62. package/dist/modules/invoice/models/invoice/approval/invoiceApprovalTransformers.spec.d.ts +1 -0
  63. package/dist/modules/invoice/models/invoice/approval/invoiceApprovalUuid.model.d.ts +3 -0
  64. package/dist/modules/invoice/models/invoice/approval/invoiceApprove.transformer.d.ts +5 -0
  65. package/dist/modules/invoice/models/invoice/approval/invoiceApproveForm.model.d.ts +13 -0
  66. package/dist/modules/invoice/models/invoice/approval/invoiceReject.transformer.d.ts +5 -0
  67. package/dist/modules/invoice/models/invoice/approval/invoiceRejectForm.model.d.ts +7 -0
  68. package/dist/modules/invoice/models/invoice/approval/invoiceRejectForm.model.spec.d.ts +1 -0
  69. package/dist/modules/invoice/models/invoice/detail/invoiceDetail.model.d.ts +13 -1
  70. package/dist/modules/invoice/models/invoice/detail/invoiceDetail.transformer.d.ts +1 -0
  71. package/dist/modules/invoice/models/invoice/index/invoiceIndex.model.d.ts +4 -0
  72. package/dist/modules/invoice/models/invoice/index/invoiceIndexQueryParams.model.d.ts +3 -0
  73. package/dist/modules/invoice/models/invoice/invoiceApproval.transformer.d.ts +7 -0
  74. package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.model.d.ts +34 -0
  75. package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.util.d.ts +10 -0
  76. package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.util.spec.d.ts +1 -0
  77. package/dist/modules/invoice/use-cases/detail/components/InvoiceApprovalBanner.vue.d.ts +19 -0
  78. package/dist/modules/invoice/use-cases/detail/components/InvoiceDetailHeaderSection.vue.d.ts +4 -0
  79. package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailHeaderActions.composable.d.ts +5 -0
  80. package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailPaymentsTableColumns.composable.d.ts +1 -1
  81. package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApprovalArchiveDialog.vue.d.ts +13 -0
  82. package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApprovalRevertDialog.vue.d.ts +15 -0
  83. package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApproveDialog.vue.d.ts +13 -0
  84. package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceFinalizeOutOfSyncDialog.vue.d.ts +21 -0
  85. package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceRejectDialog.vue.d.ts +13 -0
  86. package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewBulkActionBar.vue.d.ts +3 -0
  87. package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewTableApprovalCell.vue.d.ts +9 -0
  88. package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewDataTableFilters.composable.d.ts +3 -0
  89. package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkActionDialog.vue.d.ts +1 -0
  90. package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendApprovalDialog.vue.d.ts +12 -0
  91. package/dist/modules/invoice/use-cases/overview/utils/invoiceOverviewBulkActionFeedback.util.d.ts +2 -0
  92. package/dist/modules/invoice/use-cases/overview/views/InvoiceOverviewView.vue.d.ts +0 -5
  93. package/dist/modules/invoice-approval/actions/invoiceApproval.actions.d.ts +5 -0
  94. package/dist/modules/invoice-approval/actions/invoiceApprovalArchive.action.d.ts +1 -0
  95. package/dist/modules/invoice-approval/actions/invoiceApprovalMarkAsApproved.action.d.ts +1 -0
  96. package/dist/modules/invoice-approval/actions/invoiceApprovalReject.action.d.ts +1 -0
  97. package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.action.d.ts +1 -0
  98. package/dist/modules/invoice-approval/actions/invoiceApprovalUnmarkAsNeedsApproval.action.d.ts +1 -0
  99. package/dist/modules/invoice-approval/api/mutations/approvalReminderConfigUpdate.mutation.d.ts +8 -0
  100. package/dist/modules/invoice-approval/api/queries/approvalReminderConfig.query.d.ts +1 -0
  101. package/dist/modules/invoice-approval/api/queries/invoiceApprovalIndex.query.d.ts +3 -0
  102. package/dist/modules/invoice-approval/api/query-keys/invoiceApproval.queryKeys.d.ts +15 -0
  103. package/dist/modules/invoice-approval/api/services/invoiceApproval.service.d.ts +10 -0
  104. package/dist/modules/invoice-approval/components/InvoiceApprovalReminderLevelIndicator.vue.d.ts +7 -0
  105. package/dist/modules/invoice-approval/models/approvalReminderConfig.transformer.d.ts +6 -0
  106. package/dist/modules/invoice-approval/models/approvalReminderConfigForm.model.d.ts +11 -0
  107. package/dist/modules/invoice-approval/models/approvalReminderConfigForm.spec.d.ts +1 -0
  108. package/dist/modules/invoice-approval/models/invoiceApprovalIndex.model.d.ts +21 -0
  109. package/dist/modules/invoice-approval/models/invoiceApprovalIndex.transformer.d.ts +5 -0
  110. package/dist/modules/invoice-approval/models/invoiceApprovalIndexQueryParams.model.d.ts +9 -0
  111. package/dist/modules/invoice-approval/models/invoiceApprovalIndexQueryParams.transformer.d.ts +6 -0
  112. package/dist/modules/invoice-approval/routes/invoiceApproval.routes.d.ts +24 -0
  113. package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewActionsCell.vue.d.ts +7 -0
  114. package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewAmountCell.vue.d.ts +7 -0
  115. package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewInvoiceCell.vue.d.ts +7 -0
  116. package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewMetrics.vue.d.ts +18 -0
  117. package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewNextReminderCell.vue.d.ts +7 -0
  118. package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewStatusCell.vue.d.ts +7 -0
  119. package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverview.composable.d.ts +42 -0
  120. package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewFilters.composable.d.ts +10 -0
  121. package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewTableColumns.composable.d.ts +3 -0
  122. package/dist/modules/invoice-approval/use-cases/overview/views/InvoiceApprovalOverviewView.vue.d.ts +3 -0
  123. package/dist/modules/invoice-approval/use-cases/settings/views/ApprovalReminderSettingsView.vue.d.ts +7 -0
  124. package/dist/modules/invoice-approval/use-cases/settings/views/ApprovalReminderSettingsViewDataProvider.vue.d.ts +3 -0
  125. package/dist/modules/settings/routes/settings.routes.d.ts +7 -0
  126. package/dist/{plainDate.transformer-BxvJpJOv.js → plainDate.transformer-Bhiz9jW7.js} +17 -4
  127. package/dist/reminderConfig.query-snaHQmrY.js +309 -0
  128. package/dist/routes/invoicingRoutes.composable.d.ts +14 -6
  129. package/dist/search.composable-CU9OpyUB.js +52 -0
  130. package/dist/{src-BFgnUugN.js → src-DUSgQTKr.js} +45 -45
  131. package/dist/style.css +1 -1
  132. package/dist/types/queryKey.type.d.ts +3 -2
  133. package/dist/utils/html.util.d.ts +4 -0
  134. package/package.json +2 -1
  135. package/dist/AddOpenBoundaryIcon-9SqBHfoz.js +0 -25
  136. package/dist/AirlineIcon-Z6sH_StM.js +0 -26
  137. package/dist/AirplaneIcon-C-nSkD1w.js +0 -19
  138. package/dist/AirportIcon-m4itDKCV.js +0 -16
  139. package/dist/AlertTriangleIcon-DtYLCC-Y.js +0 -23
  140. package/dist/AllocationsIcon-hcg93Sll.js +0 -16
  141. package/dist/ArrowNarrowRightIcon-2-Sml68f.js +0 -23
  142. package/dist/AssetIcon-qOYs6Wna.js +0 -16
  143. package/dist/BarChartIcon-DDyzpV_3.js +0 -22
  144. package/dist/BellIcon-DF1OBFta.js +0 -21
  145. package/dist/BuildingIcon-CC5PMNeP.js +0 -22
  146. package/dist/ChargerIcon-aM_endLr.js +0 -16
  147. package/dist/ChevronDownIcon-4QiK-Z6-.js +0 -23
  148. package/dist/ChevronUpIcon-qBsjZ5Dz.js +0 -23
  149. package/dist/ClockIcon-BNiPCaiB.js +0 -23
  150. package/dist/ClockSnoozeIcon-BxGfwJB6.js +0 -23
  151. package/dist/CopyIcon-DH5ly0dZ.js +0 -19
  152. package/dist/DataProvider-Dj34ljUX.js +0 -75
  153. package/dist/DownloadCloudIcon-Cf8ftklG.js +0 -22
  154. package/dist/EditIcon-Dr7OHBBR.js +0 -21
  155. package/dist/EraserIcon-B1VJSvdI.js +0 -23
  156. package/dist/FileIcon-ssmQI5Yl.js +0 -23
  157. package/dist/FilterLinesIcon-C7YdyPBk.js +0 -23
  158. package/dist/GlobeIcon-BfRM6Ike.js +0 -22
  159. package/dist/HelpIcon-BrJ49P5y.js +0 -22
  160. package/dist/HourGlassIcon-D9rfU1Is.js +0 -22
  161. package/dist/InfoCircleIcon-Ee0SyiMc.js +0 -23
  162. package/dist/InvoiceDetailViewDataProvider-BU6jZfD7.js +0 -1670
  163. package/dist/InvoiceOverviewViewDataProvider-i8tXATJE.js +0 -1677
  164. package/dist/InvoicePublicPdfViewDataProvider-BJe-8hC5.js +0 -45
  165. package/dist/KeyboardIcon-T3o_g-1c.js +0 -22
  166. package/dist/LinkExternalIcon-BkHS4fCx.js +0 -22
  167. package/dist/LinkIcon-DuPwae98.js +0 -22
  168. package/dist/MarkerIcon-B1Jqenjb.js +0 -28
  169. package/dist/MobileBatteryIcon-GZ1SMRDV.js +0 -16
  170. package/dist/MonitorIcon-pbK22reU.js +0 -22
  171. package/dist/NotificationIcon-Ctv8vyWt.js +0 -19
  172. package/dist/ParkingIcon-DnUPW3pB.js +0 -24
  173. package/dist/PlanningIcon-CXvrskgj.js +0 -16
  174. package/dist/PreferenceIcon-BHS8uDyi.js +0 -22
  175. package/dist/ReceiptCheckIcon-QTestqCJ.js +0 -23
  176. package/dist/RefreshIcon-DShY-aoS.js +0 -22
  177. package/dist/RemoveOpenBoundaryIcon-CN8YWs6o.js +0 -28
  178. package/dist/RewindIcon-GWg2AQax.js +0 -22
  179. package/dist/SettingsIcon-CBLJ6B5u.js +0 -25
  180. package/dist/ShieldIcon-CVnrOcxl.js +0 -19
  181. package/dist/ShieldOffIcon-B9l0dDVb.js +0 -23
  182. package/dist/SignOutIcon-CmDkjJ5F.js +0 -21
  183. package/dist/SlashCircleIcon-jY5FBko5.js +0 -22
  184. package/dist/StandIcon-CoYnBLMn.js +0 -23
  185. package/dist/StarsIcon-D7ZlqOW7.js +0 -22
  186. package/dist/StopwatchIcon-BK0vh1lg.js +0 -22
  187. package/dist/TargetIcon-HMWj77-Q.js +0 -22
  188. package/dist/ThreeDotsIcon-BtFruOKz.js +0 -32
  189. package/dist/ToolIcon-DRfDb7fE.js +0 -22
  190. package/dist/TrashIcon-BwxBjHv5.js +0 -19
  191. package/dist/TurnaroundIcon-b1X61TwZ.js +0 -27
  192. package/dist/UploadCloudIcon-BF0equKg.js +0 -22
  193. package/dist/UserIcon-B0rCC6KE.js +0 -22
  194. package/dist/UsersIcon-cK5l_zKG.js +0 -22
  195. package/dist/VerifiedIcon-CELYlqcv.js +0 -22
  196. package/dist/WifiIcon--JPvMNEF.js +0 -23
  197. package/dist/WifiOffIcon-BS2KftcP.js +0 -23
  198. package/dist/ZapIcon-BHwcIQc0.js +0 -23
  199. package/dist/ZoomInIcon-Cu6r915V.js +0 -23
  200. package/dist/ZoomOutIcon-DwB4FRj-.js +0 -23
  201. package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
  202. package/dist/instant.transformer-KmBsH3E9.js +0 -18
  203. package/dist/invoice.service-Bb8VqQvc.js +0 -635
  204. package/dist/invoiceDeliveryStatus.util-BPkGCQM6.js +0 -331
  205. package/dist/reminderConfig.query-DsJNqqi7.js +0 -331
  206. package/dist/search.composable-BCtYqudV.js +0 -52
@@ -1,331 +0,0 @@
1
- import { L as e, R as t, t as n } from "./api.util-BCSgCfpS.js";
2
- import { b as r, p as i } from "./documentTitle.composable-4ApFl9TZ.js";
3
- import { r as a } from "./useCurrencyFormat.composable-MtZaqKnO.js";
4
- import { o } from "./invoice.service-Bb8VqQvc.js";
5
- import { i as s } from "./CustomFieldValueText-BGbQwhON.js";
6
- import { t as c } from "./_plugin-vue_export-helper-B3ysoDQm.js";
7
- import "./AlertTriangleIcon-DtYLCC-Y.js";
8
- import "./ArrowNarrowRightIcon-2-Sml68f.js";
9
- import "./ChevronDownIcon-4QiK-Z6-.js";
10
- import "./ChevronUpIcon-qBsjZ5Dz.js";
11
- import "./ClockIcon-BNiPCaiB.js";
12
- import "./ClockSnoozeIcon-BxGfwJB6.js";
13
- import "./EraserIcon-B1VJSvdI.js";
14
- import "./FilterLinesIcon-C7YdyPBk.js";
15
- import "./InfoCircleIcon-Ee0SyiMc.js";
16
- import "./ReceiptCheckIcon-QTestqCJ.js";
17
- import "./ShieldOffIcon-B9l0dDVb.js";
18
- import "./StandIcon-CoYnBLMn.js";
19
- import "./WifiIcon--JPvMNEF.js";
20
- import "./WifiOffIcon-BS2KftcP.js";
21
- import "./ZapIcon-BHwcIQc0.js";
22
- import "./ZoomInIcon-Cu6r915V.js";
23
- import "./ZoomOutIcon-DwB4FRj-.js";
24
- import { useI18n as l } from "vue-i18n";
25
- import { computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createVNode as h, defineComponent as g, openBlock as _, unref as v, withCtx as y } from "vue";
26
- import { UIBadge as b, UIColumnLayout as x, UIText as S, UITooltip as C, UITooltipContent as w } from "@wisemen/vue-core-design-system";
27
- //#region src/models/customer/customerDetail.transformer.ts
28
- var T = class {
29
- static fromDto(e) {
30
- return {
31
- uuid: e.uuid,
32
- defaultPaymentTermDays: e.defaultPaymentTerm.value
33
- };
34
- }
35
- }, E = class {
36
- static fromDto(e) {
37
- return {
38
- uuid: e.uuid,
39
- name: e.name,
40
- type: e.type
41
- };
42
- }
43
- }, D = class {
44
- static toDto(e) {
45
- return {
46
- filter: { isDeactivated: !1 },
47
- pagination: e.pagination,
48
- search: o.toDto(e.search)
49
- };
50
- }
51
- }, O = class {
52
- static async getAll(e) {
53
- return (await n.fromPromise(t({ query: D.toDto(e) }))).map((e) => ({
54
- data: e.data.items.map(E.fromDto),
55
- meta: e.data.meta
56
- }));
57
- }
58
- static async getByUuid(t) {
59
- return (await n.fromPromise(e({ path: { uuid: t } }))).map((e) => T.fromDto(e.data));
60
- }
61
- }, k = {
62
- [r.CREDITED]: {
63
- tone: "success",
64
- translationKey: "wise_invoicing.invoice.settlement_status.credited"
65
- },
66
- [r.OVERPAID]: {
67
- tone: "warning",
68
- translationKey: "wise_invoicing.invoice.settlement_status.paid"
69
- },
70
- [r.PAID]: {
71
- tone: "success",
72
- translationKey: "wise_invoicing.invoice.settlement_status.paid"
73
- },
74
- [r.PARTIALLY_PAID]: {
75
- tone: "blue",
76
- translationKey: "wise_invoicing.invoice.settlement_status.partially_paid"
77
- },
78
- [r.SETTLED]: {
79
- tone: "brand",
80
- translationKey: "wise_invoicing.invoice.settlement_status.settled"
81
- },
82
- [r.UNPAID]: {
83
- tone: "gray",
84
- translationKey: "wise_invoicing.invoice.settlement_status.unpaid"
85
- }
86
- }, A = {
87
- tone: "warning",
88
- translationKey: "wise_invoicing.invoice.settlement_status.awaiting_payment"
89
- }, j = /* @__PURE__ */ new Set([r.PARTIALLY_PAID, r.UNPAID]), M = class e {
90
- static getCreditedAmount(e) {
91
- if (e.totalCreditedAmount !== null) return e.totalCreditedAmount.amount > 0 ? e.totalCreditedAmount : null;
92
- if (e.balanceDueAmount == null) return null;
93
- let t = e.paidAmount?.amount ?? 0, n = Math.max(e.grossAmount.amount - e.balanceDueAmount.amount - t, 0);
94
- return n > 0 ? {
95
- ...e.grossAmount,
96
- amount: n
97
- } : null;
98
- }
99
- static getMetadata(e, t) {
100
- return t && j.has(e) ? A : k[e];
101
- }
102
- static getSubtextParts(t) {
103
- let n = t.paidAmount, i = e.getCreditedAmount(t);
104
- switch (t.settlementStatus) {
105
- case r.OVERPAID: {
106
- if (n === null) return null;
107
- let e = Math.max(n.amount - t.grossAmount.amount, 0), r = Math.min(n.amount, t.grossAmount.amount);
108
- return e > 0 ? {
109
- creditedAmount: null,
110
- overpaidAmount: {
111
- ...t.grossAmount,
112
- amount: e
113
- },
114
- paidAmount: {
115
- ...t.grossAmount,
116
- amount: r
117
- }
118
- } : null;
119
- }
120
- case r.PARTIALLY_PAID:
121
- case r.SETTLED: return n === null && i === null ? null : {
122
- creditedAmount: i,
123
- overpaidAmount: null,
124
- paidAmount: n ?? null
125
- };
126
- default: return null;
127
- }
128
- }
129
- }, N = /* @__PURE__ */ g({
130
- __name: "InvoiceDisputedBadge",
131
- props: { size: { default: "sm" } },
132
- setup(e) {
133
- let t = e, n = l(), r = u(() => n.t("wise_invoicing.invoice.status.disputed"));
134
- return (e, n) => (_(), d(v(b), {
135
- label: r.value,
136
- size: t.size,
137
- color: "warning",
138
- variant: "translucent"
139
- }, null, 8, ["label", "size"]));
140
- }
141
- }), P = /* @__PURE__ */ g({
142
- __name: "InvoiceStatusBadge",
143
- props: {
144
- lifecycleStatus: {},
145
- size: { default: "sm" }
146
- },
147
- setup(e) {
148
- let t = e, n = l(), r = u(() => s.getLifecycleMetadata(t.lifecycleStatus)), i = u(() => n.t(r.value.translationKey));
149
- return (e, n) => (_(), d(v(b), {
150
- label: i.value,
151
- color: r.value.tone,
152
- size: t.size
153
- }, null, 8, [
154
- "label",
155
- "color",
156
- "size"
157
- ]));
158
- }
159
- }), F = {}, I = {
160
- width: "100%",
161
- height: "100%",
162
- viewBox: "0 0 24 24",
163
- fill: "none",
164
- xmlns: "http://www.w3.org/2000/svg"
165
- };
166
- function L(e, t) {
167
- return _(), p("svg", I, [...t[0] ||= [m("path", {
168
- d: "M20 6L9 17L4 12",
169
- stroke: "currentColor",
170
- "stroke-width": "2",
171
- "stroke-linecap": "round",
172
- "stroke-linejoin": "round"
173
- }, null, -1)]]);
174
- }
175
- var R = /*#__PURE__*/ c(F, [["render", L]]), z = {}, B = {
176
- width: "100%",
177
- height: "100%",
178
- viewBox: "0 0 24 24",
179
- fill: "none",
180
- xmlns: "http://www.w3.org/2000/svg"
181
- };
182
- function V(e, t) {
183
- return _(), p("svg", B, [...t[0] ||= [m("path", {
184
- d: "M6 16C6 18.2091 7.79086 20 10 20H14C16.2091 20 18 18.2091 18 16C18 13.7909 16.2091 12 14 12H10C7.79086 12 6 10.2091 6 8C6 5.79086 7.79086 4 10 4H14C16.2091 4 18 5.79086 18 8M12 2V22",
185
- stroke: "currentColor",
186
- "stroke-width": "2",
187
- "stroke-linecap": "round",
188
- "stroke-linejoin": "round"
189
- }, null, -1)]]);
190
- }
191
- var H = /*#__PURE__*/ c(z, [["render", V]]), U = {}, W = {
192
- width: "100%",
193
- height: "100%",
194
- viewBox: "0 0 24 24",
195
- fill: "none",
196
- xmlns: "http://www.w3.org/2000/svg"
197
- };
198
- function G(e, t) {
199
- return _(), p("svg", W, [...t[0] ||= [m("path", {
200
- d: "M12 5V19M5 12H19",
201
- stroke: "currentColor",
202
- "stroke-width": "2",
203
- "stroke-linecap": "round",
204
- "stroke-linejoin": "round"
205
- }, null, -1)]]);
206
- }
207
- var K = /*#__PURE__*/ c(U, [["render", G]]), q = {}, J = {
208
- width: "100%",
209
- height: "100%",
210
- viewBox: "0 0 24 24",
211
- fill: "none",
212
- xmlns: "http://www.w3.org/2000/svg"
213
- };
214
- function Y(e, t) {
215
- return _(), p("svg", J, [...t[0] ||= [m("path", {
216
- d: "M16 6V5.2C16 4.0799 16 3.51984 15.782 3.09202C15.5903 2.71569 15.2843 2.40973 14.908 2.21799C14.4802 2 13.9201 2 12.8 2H11.2C10.0799 2 9.51984 2 9.09202 2.21799C8.71569 2.40973 8.40973 2.71569 8.21799 3.09202C8 3.51984 8 4.0799 8 5.2V6M10 11.5V16.5M14 11.5V16.5M3 6H21M19 6V17.2C19 18.8802 19 19.7202 18.673 20.362C18.3854 20.9265 17.9265 21.3854 17.362 21.673C16.7202 22 15.8802 22 14.2 22H9.8C8.11984 22 7.27976 22 6.63803 21.673C6.07354 21.3854 5.6146 20.9265 5.32698 20.362C5 19.7202 5 18.8802 5 17.2V6",
217
- stroke: "currentColor",
218
- "stroke-width": "2",
219
- "stroke-linecap": "round",
220
- "stroke-linejoin": "round"
221
- }, null, -1)]]);
222
- }
223
- var X = /*#__PURE__*/ c(q, [["render", Y]]);
224
- import("./AddOpenBoundaryIcon-9SqBHfoz.js"), import("./AirlineIcon-Z6sH_StM.js"), import("./AirplaneIcon-C-nSkD1w.js"), import("./AirportIcon-m4itDKCV.js"), import("./AlertTriangleIcon-DtYLCC-Y.js").then((e) => e.t), import("./AllocationsIcon-hcg93Sll.js"), import("./ArrowNarrowRightIcon-2-Sml68f.js").then((e) => e.t), import("./AssetIcon-qOYs6Wna.js"), import("./BarChartIcon-DDyzpV_3.js"), import("./BellIcon-DF1OBFta.js"), import("./BuildingIcon-CC5PMNeP.js"), import("./ChargerIcon-aM_endLr.js"), import("./ChevronDownIcon-4QiK-Z6-.js").then((e) => e.t), import("./ChevronUpIcon-qBsjZ5Dz.js").then((e) => e.t), import("./ClockIcon-BNiPCaiB.js").then((e) => e.t), import("./ClockSnoozeIcon-BxGfwJB6.js").then((e) => e.t), import("./CopyIcon-DH5ly0dZ.js"), import("./DownloadCloudIcon-Cf8ftklG.js"), import("./EditIcon-Dr7OHBBR.js"), import("./EraserIcon-B1VJSvdI.js").then((e) => e.t), import("./FileIcon-ssmQI5Yl.js"), import("./FilterLinesIcon-C7YdyPBk.js").then((e) => e.t), import("./GlobeIcon-BfRM6Ike.js"), import("./HelpIcon-BrJ49P5y.js"), import("./HourGlassIcon-D9rfU1Is.js"), import("./InfoCircleIcon-Ee0SyiMc.js").then((e) => e.t), import("./KeyboardIcon-T3o_g-1c.js"), import("./LinkIcon-DuPwae98.js"), import("./LinkExternalIcon-BkHS4fCx.js"), import("./MarkerIcon-B1Jqenjb.js"), import("./MobileBatteryIcon-GZ1SMRDV.js"), import("./MonitorIcon-pbK22reU.js"), import("./NotificationIcon-Ctv8vyWt.js"), import("./ParkingIcon-DnUPW3pB.js"), import("./PlanningIcon-CXvrskgj.js"), import("./PreferenceIcon-BHS8uDyi.js"), import("./ReceiptCheckIcon-QTestqCJ.js").then((e) => e.t), import("./RefreshIcon-DShY-aoS.js"), import("./RemoveOpenBoundaryIcon-CN8YWs6o.js"), import("./RewindIcon-GWg2AQax.js"), import("./SettingsIcon-CBLJ6B5u.js"), import("./ShieldIcon-CVnrOcxl.js"), import("./ShieldOffIcon-B9l0dDVb.js").then((e) => e.t), import("./SignOutIcon-CmDkjJ5F.js"), import("./SlashCircleIcon-jY5FBko5.js"), import("./StandIcon-CoYnBLMn.js").then((e) => e.t), import("./StarsIcon-D7ZlqOW7.js"), import("./StopwatchIcon-BK0vh1lg.js"), import("./TargetIcon-HMWj77-Q.js"), import("./ThreeDotsIcon-BtFruOKz.js"), import("./ToolIcon-DRfDb7fE.js"), import("./TrashIcon-BwxBjHv5.js"), import("./TurnaroundIcon-b1X61TwZ.js"), import("./UploadCloudIcon-BF0equKg.js"), import("./UserIcon-B0rCC6KE.js"), import("./UsersIcon-cK5l_zKG.js"), import("./VerifiedIcon-CELYlqcv.js"), import("./WifiIcon--JPvMNEF.js").then((e) => e.t), import("./WifiOffIcon-BS2KftcP.js").then((e) => e.t), import("./ZapIcon-BHwcIQc0.js").then((e) => e.t), import("./ZoomInIcon-Cu6r915V.js").then((e) => e.t), import("./ZoomOutIcon-DwB4FRj-.js").then((e) => e.t);
225
- //#endregion
226
- //#region src/modules/invoice/components/InvoiceSettlementStatusBadge.vue
227
- var Z = /* @__PURE__ */ g({
228
- __name: "InvoiceSettlementStatusBadge",
229
- props: {
230
- isSent: { type: Boolean },
231
- balanceDueAmount: {},
232
- grossAmount: {},
233
- paidAmount: {},
234
- settlementStatus: {},
235
- showSubtext: {
236
- type: Boolean,
237
- default: !0
238
- },
239
- size: { default: "sm" },
240
- totalCreditedAmount: {}
241
- },
242
- setup(e) {
243
- let t = e, n = l(), i = a(), o = u(() => t.isSent || t.settlementStatus !== r.UNPAID), s = u(() => M.getMetadata(t.settlementStatus, t.isSent)), c = u(() => n.t(s.value.translationKey)), p = u(() => {
244
- let e = M.getSubtextParts({
245
- balanceDueAmount: t.balanceDueAmount,
246
- grossAmount: t.grossAmount,
247
- paidAmount: t.paidAmount,
248
- settlementStatus: t.settlementStatus,
249
- totalCreditedAmount: t.totalCreditedAmount
250
- });
251
- return e == null ? null : e.paidAmount !== null && e.overpaidAmount !== null ? n.t("wise_invoicing.invoice.status_subtext.paid_overpaid", {
252
- overpaidAmount: i.formatMonetary(e.overpaidAmount),
253
- paidAmount: i.formatMonetary(e.paidAmount)
254
- }) : e.paidAmount !== null && e.creditedAmount !== null ? n.t("wise_invoicing.invoice.status_subtext.paid_credited", {
255
- creditedAmount: i.formatMonetary(e.creditedAmount),
256
- paidAmount: i.formatMonetary(e.paidAmount)
257
- }) : e.paidAmount === null ? e.creditedAmount === null ? null : n.t("wise_invoicing.invoice.status_subtext.credited", { creditedAmount: i.formatMonetary(e.creditedAmount) }) : n.t("wise_invoicing.invoice.status_subtext.paid", { paidAmount: i.formatMonetary(e.paidAmount) });
258
- }), m = u(() => t.showSubtext && p.value !== null), g = u(() => p.value ?? "");
259
- return (e, n) => o.value ? (_(), d(v(x), {
260
- key: 0,
261
- gap: "xs"
262
- }, {
263
- default: y(() => [m.value ? (_(), d(v(C), {
264
- key: 0,
265
- "popover-side-offset": 8,
266
- "popover-align": "center",
267
- "popover-side": "bottom"
268
- }, {
269
- trigger: y(() => [h(v(b), {
270
- label: c.value,
271
- color: s.value.tone,
272
- size: t.size,
273
- variant: "translucent"
274
- }, null, 8, [
275
- "label",
276
- "color",
277
- "size"
278
- ])]),
279
- content: y(() => [h(v(w), null, {
280
- default: y(() => [h(v(S), {
281
- text: g.value,
282
- class: "text-sm text-primary"
283
- }, null, 8, ["text"])]),
284
- _: 1
285
- })]),
286
- _: 1
287
- })) : (_(), d(v(b), {
288
- key: 1,
289
- label: c.value,
290
- color: s.value.tone,
291
- size: t.size,
292
- variant: "translucent"
293
- }, null, 8, [
294
- "label",
295
- "color",
296
- "size"
297
- ]))]),
298
- _: 1
299
- })) : f("", !0);
300
- }
301
- }), Q = {
302
- [i.FAILED]: {
303
- tone: "error",
304
- translationKey: "wise_invoicing.invoice.delivery_status.failed"
305
- },
306
- [i.PROCESSING]: {
307
- tone: "blue",
308
- translationKey: "wise_invoicing.invoice.delivery_status.processing"
309
- },
310
- [i.SENT]: {
311
- tone: "brand",
312
- translationKey: "wise_invoicing.invoice.delivery_status.sent"
313
- },
314
- [i.UNSENT]: {
315
- tone: "gray",
316
- translationKey: "wise_invoicing.invoice.delivery_status.unsent"
317
- },
318
- [i.VIEWED]: {
319
- tone: "success",
320
- translationKey: "wise_invoicing.invoice.delivery_status.viewed"
321
- }
322
- }, $ = class {
323
- static getMetadata(e) {
324
- return Q[e];
325
- }
326
- static isSent(e) {
327
- return [i.SENT, i.VIEWED].includes(e);
328
- }
329
- };
330
- //#endregion
331
- export { H as a, N as c, K as i, M as l, Z as n, R as o, X as r, P as s, $ as t, O as u };
@@ -1,331 +0,0 @@
1
- import { B as e, E as t, J as n, P as r, V as i, a, t as o, w as s } from "./api.util-BCSgCfpS.js";
2
- import { a as c, d as l, f as u } from "./documentTitle.composable-4ApFl9TZ.js";
3
- import { n as d, t as f } from "./plainDate.transformer-BxvJpJOv.js";
4
- import { n as p } from "./percentage.util-Bl78kSSk.js";
5
- import { Fragment as m, computed as h, createElementBlock as g, createElementVNode as _, defineComponent as v, normalizeClass as y, openBlock as b, renderList as x } from "vue";
6
- import { useQuery as S } from "@wisemen/vue-core-api-utils";
7
- import { Temporal as C } from "temporal-polyfill";
8
- //#region src/modules/dunning-case/models/dunningCase.transformer.ts
9
- var w = [
10
- "en-US",
11
- "nl-BE",
12
- "fr-BE"
13
- ], T = /* @__PURE__ */ new Set(/* @__PURE__ */ "address.article.aside.blockquote.div.dl.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hr.li.main.nav.ol.p.pre.section.table.tbody.td.tfoot.th.thead.tr.ul".split(".")), E = /^\/?([a-z][a-z0-9-]*)/i, D = /&(#(?:x[\da-f]+|\d+)|[a-z][\da-z]+);/gi;
14
- function O(e) {
15
- return e.nodeType === 3;
16
- }
17
- function k(e) {
18
- return e.nodeType === 1;
19
- }
20
- function A(e) {
21
- let t = e;
22
- for (; t.startsWith("\n\n");) t = t.slice(2);
23
- for (; t.endsWith("\n\n");) t = t.slice(0, -2);
24
- return t;
25
- }
26
- function j(e) {
27
- let t = globalThis.DOMParser;
28
- return A(t === void 0 ? F(e) : M(new t().parseFromString(e, "text/html").body.childNodes));
29
- }
30
- function M(e) {
31
- let t = "";
32
- function n(e) {
33
- t += e.replaceAll("\xA0", " ");
34
- }
35
- function r(e) {
36
- if (O(e)) {
37
- n(e.data);
38
- return;
39
- }
40
- if (!k(e)) return;
41
- let i = e.tagName.toLowerCase();
42
- if (i === "script" || i === "style") return;
43
- if (i === "br") {
44
- n("\n");
45
- return;
46
- }
47
- let a = T.has(i);
48
- a && t.length > 0 && !t.endsWith("\n") && n("\n\n");
49
- for (let t of e.childNodes) r(t);
50
- a && t.length > 0 && !t.endsWith("\n") && n("\n\n");
51
- }
52
- for (let t of e) r(t);
53
- return t;
54
- }
55
- function N(e) {
56
- return `<p>${e.split("\n").map((e) => P(e)).join("<br>")}</p>`;
57
- }
58
- function P(e) {
59
- return e.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll("\"", "&quot;").replaceAll("'", "&#39;");
60
- }
61
- function F(e) {
62
- let t = "", n = 0, r = null;
63
- function i(e) {
64
- t += I(e.replaceAll("\xA0", " "));
65
- }
66
- function a() {
67
- t.length > 0 && !t.endsWith("\n") && (t += "\n\n");
68
- }
69
- for (; n < e.length;) {
70
- let o = e.indexOf("<", n);
71
- if (o === -1) {
72
- r === null && i(e.slice(n));
73
- break;
74
- }
75
- r === null && i(e.slice(n, o));
76
- let s = e.indexOf("-->", o + 4);
77
- if (e.startsWith("<!--", o)) {
78
- n = s === -1 ? e.length : s + 3;
79
- continue;
80
- }
81
- let c = e.indexOf(">", o + 1);
82
- if (c === -1) {
83
- r === null && i(e.slice(o));
84
- break;
85
- }
86
- let l = e.slice(o + 1, c).trim(), u = l.startsWith("/"), d = E.exec(l)?.[1]?.toLowerCase();
87
- if (d === void 0) {
88
- n = c + 1;
89
- continue;
90
- }
91
- if (r !== null) {
92
- u && d === r && (r = null), n = c + 1;
93
- continue;
94
- }
95
- if (d === "script" || d === "style") {
96
- r = u ? null : d, n = c + 1;
97
- continue;
98
- }
99
- d === "br" ? t += "\n" : T.has(d) && (a(), (u || l.endsWith("/")) && a()), n = c + 1;
100
- }
101
- return t;
102
- }
103
- function I(e) {
104
- let t = {
105
- amp: "&",
106
- apos: "'",
107
- gt: ">",
108
- lt: "<",
109
- nbsp: " ",
110
- quot: "\""
111
- };
112
- return e.replace(D, (e, n) => n.startsWith("#x") || n.startsWith("#X") ? String.fromCodePoint(Number.parseInt(n.slice(2), 16)) : n.startsWith("#") ? String.fromCodePoint(Number.parseInt(n.slice(1), 10)) : t[n.toLowerCase()] ?? e);
113
- }
114
- function L(e, t) {
115
- return e.items.find((e) => e.locale === t)?.value ?? "";
116
- }
117
- function R(e, t) {
118
- return { items: w.map((n) => ({
119
- locale: n,
120
- value: t === "body" ? N(e[n][t]) : e[n][t]
121
- })) };
122
- }
123
- var z = class e {
124
- static fromDetailDto(t) {
125
- return {
126
- uuid: t.uuid,
127
- closedAt: t.closedAt === null ? null : C.Instant.from(t.closedAt),
128
- createdAt: C.Instant.from(t.createdAt),
129
- lastReminderSentAt: e.fromNullableInstant(t.lastReminderSentAt),
130
- nextReminderOn: f.fromNullableDto(t.nextReminderOn),
131
- updatedAt: C.Instant.from(t.updatedAt),
132
- blockedReason: t.blockedReason,
133
- canSendReminder: t.canSendReminder,
134
- customer: t.customer,
135
- invoices: t.invoices.map(e.fromInvoiceDto),
136
- latestCreatedReminder: e.fromReminderDto(t.latestCreatedReminder),
137
- level: t.level ?? 0,
138
- outstandingBalance: d.fromDto(t.outstandingBalance),
139
- totalCredited: d.fromDto(t.totalCredited),
140
- totalFee: d.fromDto(t.totalFee),
141
- totalInvoiced: d.fromDto(t.totalInvoiced),
142
- totalPaid: d.fromDto(t.totalPaid)
143
- };
144
- }
145
- static fromIndexDto(t) {
146
- return {
147
- uuid: t.uuid,
148
- lastReminderSentAt: e.fromNullableInstant(t.lastReminderSentAt),
149
- nextReminderOn: t.nextReminderOn === null || t.nextReminderOn === "infinity" || t.nextReminderOn === "-infinity" ? null : f.fromDto(t.nextReminderOn),
150
- blockedReason: t.blockedReason,
151
- canSendReminder: t.canSendReminder,
152
- customer: t.customer,
153
- daysOverdue: t.daysOverdue,
154
- latestCreatedReminder: e.fromReminderDto(t.latestCreatedReminder),
155
- level: t.level,
156
- outstandingBalance: d.fromDto(t.outstandingBalance)
157
- };
158
- }
159
- static fromInvoiceDto(e) {
160
- return {
161
- uuid: e.uuid,
162
- dueOn: f.fromDto(e.dueOn),
163
- isDisputed: e.isDisputed,
164
- balanceDueAmount: d.fromDto(e.balanceDueAmount),
165
- creditNotes: e.creditNotes.map((e) => ({
166
- uuid: e.uuid,
167
- finalizedOn: f.fromDto(e.finalizedOn),
168
- grossAmount: d.fromDto(e.grossAmount),
169
- sequence: e.sequence
170
- })),
171
- grossAmount: d.fromDto(e.grossAmount),
172
- level: e.level ?? 0,
173
- paidAmount: d.fromDto(e.paidAmount),
174
- payments: e.payments.map((e) => ({
175
- uuid: e.uuid,
176
- amount: d.fromDto(e.amount),
177
- date: f.fromDto(e.date)
178
- })),
179
- sequence: e.sequence,
180
- settlementStatus: e.settlementStatus,
181
- subject: e.subject,
182
- totalCreditedAmount: d.fromDto(e.totalCreditedAmount)
183
- };
184
- }
185
- static fromNullableInstant(e) {
186
- return e === null || e === "infinity" || e === "-infinity" ? null : C.Instant.from(e);
187
- }
188
- static fromReminderConfigDto(e) {
189
- return {
190
- uuid: e.uuid,
191
- fee: {
192
- amount: e.fee.amount === null ? null : d.fromDto(e.fee.amount),
193
- percentage: p.fromNullableDto(e.fee.percentage),
194
- type: e.fee.type
195
- },
196
- offsetDays: e.offsetDays,
197
- schedule: e.schedule,
198
- sequence: e.sequence,
199
- template: {
200
- "en-US": {
201
- body: j(L(e.template.body, "en-US")),
202
- subject: L(e.template.subject, "en-US")
203
- },
204
- "fr-BE": {
205
- body: j(L(e.template.body, "fr-BE")),
206
- subject: L(e.template.subject, "fr-BE")
207
- },
208
- "nl-BE": {
209
- body: j(L(e.template.body, "nl-BE")),
210
- subject: L(e.template.subject, "nl-BE")
211
- }
212
- }
213
- };
214
- }
215
- static fromReminderDto(t) {
216
- return t === null ? null : {
217
- sentAt: e.fromNullableInstant(t.sentAt),
218
- hasErrors: t.hasErrors
219
- };
220
- }
221
- static reminderConfigsToDto(e) {
222
- return e.reminders.map((e) => ({
223
- fee: e.feeType === l.PERCENTAGE ? {
224
- amount: null,
225
- percentage: e.feePercentage / 100,
226
- type: l.PERCENTAGE
227
- } : {
228
- amount: {
229
- amount: Math.round(e.feeAmount * 10 ** e.feePrecision),
230
- currency: e.feeCurrency,
231
- precision: e.feePrecision
232
- },
233
- percentage: null,
234
- type: l.AMOUNT
235
- },
236
- offsetDays: e.offsetDays,
237
- schedule: e.schedule,
238
- sequence: e.sequence,
239
- template: {
240
- body: R(e.template, "body"),
241
- subject: R(e.template, "subject")
242
- }
243
- }));
244
- }
245
- static reminderConfigsToForm(e) {
246
- let t = e.find((e) => e.fee.amount !== null)?.fee.amount ?? null, n = t?.currency ?? c.EUR, r = t?.precision ?? 2;
247
- return { reminders: e.toSorted((e, t) => e.sequence - t.sequence).map((e) => ({
248
- feeAmount: e.fee.amount === null ? 0 : e.fee.amount.amount / 10 ** e.fee.amount.precision,
249
- feeCurrency: e.fee.amount?.currency ?? n,
250
- feePercentage: e.fee.percentage?.value ?? 0,
251
- feePrecision: e.fee.amount?.precision ?? r,
252
- feeType: e.fee.type,
253
- offsetDays: e.offsetDays,
254
- schedule: e.schedule,
255
- sequence: e.sequence,
256
- template: e.template
257
- })) };
258
- }
259
- };
260
- //#endregion
261
- //#region src/modules/dunning-case/api/services/dunningCase.service.ts
262
- function B(e) {
263
- return {
264
- customerUuid: e.customerUuid,
265
- isOpen: e.isOpen,
266
- dunningCaseUuids: e.dunningCaseUuids === void 0 ? void 0 : {
267
- scope: u.INCLUDE,
268
- values: e.dunningCaseUuids
269
- },
270
- level: e.level
271
- };
272
- }
273
- var V = class {
274
- static async getAll(e) {
275
- return (await o.fromPromise(i({ query: {
276
- filter: B(e),
277
- pagination: e.pagination
278
- } }))).map((e) => ({
279
- data: e.data.items.map(z.fromIndexDto),
280
- meta: e.data.meta
281
- }));
282
- }
283
- static async getByUuid(t) {
284
- return (await o.fromPromise(e({ path: { uuid: t } }))).map((e) => z.fromDetailDto(e.data));
285
- }
286
- static async getReminderConfigs() {
287
- return (await o.fromPromise(n())).map((e) => e.data.items.map(z.fromReminderConfigDto));
288
- }
289
- static async previewBulk(e) {
290
- return (await o.fromPromise(s({ query: { filter: B(e) } }))).map((e) => e.data);
291
- }
292
- static async send(e) {
293
- let n = await o.fromPromise(t({ path: { uuid: e } }));
294
- return o.void(n);
295
- }
296
- static async sendBulk(e) {
297
- return (await o.fromPromise(a({ query: { filter: B(e) } }))).map((e) => e.data);
298
- }
299
- static async updateReminderConfigs(e) {
300
- let t = await o.fromPromise(r({ body: { reminders: z.reminderConfigsToDto(e) } }));
301
- return o.void(t);
302
- }
303
- }, H = {
304
- class: "flex shrink-0 gap-xxs",
305
- "aria-hidden": "true"
306
- }, U = /* @__PURE__ */ v({
307
- __name: "DunningCaseReminderLevelIndicator",
308
- props: {
309
- level: {},
310
- size: { default: "md" }
311
- },
312
- setup(e) {
313
- let t = e, n = h(() => Math.min(3, Math.max(0, t.level ?? 0))), r = h(() => t.level === 3 ? "error" : t.level === 2 ? "warning" : "brand"), i = h(() => t.size === "sm" ? "h-(--spacing-sm) w-(--spacing-md)" : "h-(--spacing-sm) w-(--spacing-lg)");
314
- return (e, t) => (b(), g("span", H, [(b(), g(m, null, x(3, (e) => _("span", {
315
- key: e,
316
- class: y([[i.value, e <= n.value ? {
317
- "border-brand-500 bg-brand-500": r.value === "brand",
318
- "border-warning-500 bg-warning-solid": r.value === "warning",
319
- "border-error bg-error-solid": r.value === "error"
320
- } : "border-secondary bg-primary"], "rounded-full border"])
321
- }, null, 2)), 64))]));
322
- }
323
- }), W = 3e5;
324
- function G() {
325
- return S("reminderConfig", {
326
- staleTime: W,
327
- queryFn: () => V.getReminderConfigs()
328
- });
329
- }
330
- //#endregion
331
- export { z as i, U as n, V as r, G as t };