@wisemen/wise-invoicing-web 0.1.1 → 0.3.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 (253) hide show
  1. package/dist/ApprovalReminderSettingsViewDataProvider-DwtfyQpx.js +151 -0
  2. package/dist/{BillingDocumentDetailViewDataProvider-f5goWm_i.js → BillingDocumentDetailViewDataProvider-TJUwMhtn.js} +1499 -1407
  3. package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
  4. package/dist/{BillingDocumentPdf-5vi2pgRM.js → BillingDocumentPdf-PU9Ldfhs.js} +20 -13
  5. package/dist/{CreditNoteDetailViewDataProvider-Byd1QvfY.js → CreditNoteDetailViewDataProvider-DOPmal5D.js} +166 -166
  6. package/dist/{CreditNotePdfViewDataProvider-DI4eQkpM.js → CreditNotePdfViewDataProvider-BH7MaReQ.js} +3 -3
  7. package/dist/{CustomFieldValueText-BGbQwhON.js → CustomFieldValueText-BjRVovZL.js} +72 -72
  8. package/dist/DataProvider-C3uEds9v.js +75 -0
  9. package/dist/DunningCaseDetailViewDataProvider-CW8ijY3H.js +439 -0
  10. package/dist/DunningCaseOverviewView-Cfo-4VIw.js +799 -0
  11. package/dist/{DunningCaseReminderPdfViewDataProvider-I0I_WQQB.js → DunningCaseReminderPdfViewDataProvider-Dr-CS_VQ.js} +25 -25
  12. package/dist/DunningCaseSendDialog-BYFXJYMM.js +360 -0
  13. package/dist/InvoiceApprovalOutOfSyncIndicator-CP2GLaeh.js +45 -0
  14. package/dist/InvoiceApprovalOverviewView-Cjdu9iZC.js +814 -0
  15. package/dist/InvoiceApprovalStatusBadge-CcX8agTF.js +127 -0
  16. package/dist/InvoiceApproveDialogDataProvider-4wNAetBn.js +377 -0
  17. package/dist/InvoiceDetailViewDataProvider-C9O3hXGo.js +2214 -0
  18. package/dist/InvoiceOverviewViewDataProvider-DBdw7FvZ.js +1892 -0
  19. package/dist/{InvoicePdfView-C-7m2g3b.js → InvoicePdfView-CvU9bRVd.js} +10 -4
  20. package/dist/{InvoicePdfViewDataProvider-BPiK110e.js → InvoicePdfViewDataProvider-CFjHQ58K.js} +4 -4
  21. package/dist/InvoicePublicPdfViewDataProvider-DDv-LdBU.js +45 -0
  22. package/dist/InvoicePublicProFormaPdfViewDataProvider-BTjJnELb.js +47 -0
  23. package/dist/InvoicingFileUploadProvider-Kcq7kSSt.js +94 -0
  24. package/dist/{IssuerSettingsViewDataProvider-COqHGUE6.js → IssuerSettingsViewDataProvider-BuSIVnIl.js} +4 -4
  25. package/dist/{ReminderSettingsViewDataProvider-Dys4bUU7.js → ReminderSettingsViewDataProvider-CH7gSXnj.js} +68 -70
  26. package/dist/{api.util-BCSgCfpS.js → api.util-CkIRZS3h.js} +1537 -872
  27. package/dist/{billingDocumentDetail.transformer-BBn9R_cx.js → billingDocumentDetail.transformer-Bfd8geNo.js} +60 -63
  28. package/dist/client/index.d.ts +2 -2
  29. package/dist/client/sdk.gen.d.ts +19 -1
  30. package/dist/client/types.gen.d.ts +1155 -119
  31. package/dist/client/zod.gen.d.ts +25353 -8465
  32. package/dist/composables/sending-refetch/sendingRefetch.composable.d.ts +7 -0
  33. package/dist/composables/sending-refetch/sendingRefetch.composable.spec.d.ts +1 -0
  34. package/dist/{creditNoteDetail.query-BcPsB96h.js → creditNoteDetail.query-tLnfqsEB.js} +32 -32
  35. package/dist/customerUuid.model-ClN4Vi9n.js +18 -0
  36. package/dist/{dist-D9lp7NDv.js → dist-BD7Allff.js} +270 -110
  37. package/dist/{dist-BBjpqvUl.js → dist-D5agTXFI.js} +605 -605
  38. package/dist/{documentTitle.composable-4ApFl9TZ.js → documentTitle.composable-CRJjS6p-.js} +25 -15
  39. package/dist/{customFieldValue.util-BwsX8exl.js → download.util-B5Q7KUC9.js} +6 -6
  40. package/dist/{i18n.lib-C6eb-F-e.js → i18n.lib--mzprLMR.js} +336 -38
  41. package/dist/index.d.ts +349 -49
  42. package/dist/index.js +347 -335
  43. package/dist/invoice.service-B1w16_Md.js +757 -0
  44. package/dist/invoiceApproval.service-BHAJmFkU.js +72 -0
  45. package/dist/invoiceApprovalStatus.util-DohOKR4q.js +83 -0
  46. package/dist/invoiceCustomer.service-DpVfpQUD.js +39 -0
  47. package/dist/{invoiceDetail.query-Cek8nyaw.js → invoiceDetail.query-CfyNSXLS.js} +1 -1
  48. package/dist/invoiceIndexCache.util-jHsrFwcA.js +288 -0
  49. package/dist/{invoicingConfig.composable-DTmad1fe.js → invoicingConfig.composable-COn1rKRf.js} +2 -2
  50. package/dist/{issuerSettings.query-Bvz-Oj5D.js → issuerSettings.query-CDFk2GiP.js} +6 -5
  51. package/dist/libs/i18n.lib.d.ts +322 -24
  52. package/dist/locales/en-US.json.d.ts +168 -19
  53. package/dist/locales/nl-BE.json.d.ts +168 -19
  54. package/dist/models/billing-document/activity-log/billingDocumentActivityLog.model.d.ts +8 -1
  55. package/dist/models/billing-document/activity-log/billingDocumentActivityLog.util.d.ts +12 -0
  56. package/dist/models/billing-document/activity-log/billingDocumentActivityLog.util.spec.d.ts +1 -0
  57. package/dist/models/billing-document/billingDocumentDetail.model.d.ts +2 -6
  58. package/dist/modules/dunning-case/api/mutations/dunningCaseReminderRetry.mutation.d.ts +4 -0
  59. package/dist/modules/dunning-case/api/services/dunningCase.service.d.ts +2 -1
  60. package/dist/modules/dunning-case/models/dunningCase.model.d.ts +5 -0
  61. package/dist/modules/dunning-case/models/dunningCase.transformer.d.ts +0 -1
  62. package/dist/modules/dunning-case/models/dunningCaseReminderPdf.model.d.ts +0 -4
  63. package/dist/modules/dunning-case/models/dunningCaseReminderPdf.transformer.d.ts +0 -1
  64. package/dist/modules/dunning-case/test/builders/dunningCaseReminderPdfDto.builder.d.ts +1 -0
  65. package/dist/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewActionsCell.vue.d.ts +2 -0
  66. package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverview.composable.d.ts +2 -2
  67. package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverview.composable.spec.d.ts +1 -0
  68. package/dist/modules/dunning-case/use-cases/overview/composables/dunningCaseOverviewTableColumns.composable.d.ts +1 -0
  69. package/dist/modules/dunning-case/use-cases/pdf/components/DunningCaseReminderPdfTable.vue.d.ts +0 -4
  70. package/dist/modules/dunning-case/use-cases/send/dialogs/DunningCaseBulkSendDialog.vue.d.ts +2 -1
  71. package/dist/modules/dunning-case/use-cases/settings/components/ReminderLadderRow.vue.d.ts +4 -4
  72. package/dist/modules/dunning-case/use-cases/settings/composables/reminderLadder.composable.d.ts +2 -2
  73. package/dist/modules/dunning-case/use-cases/settings/composables/reminderLadder.composable.spec.d.ts +1 -0
  74. package/dist/modules/invoice/api/mutations/invoiceApproveApproval.mutation.d.ts +16 -0
  75. package/dist/modules/invoice/api/mutations/invoiceArchiveApproval.mutation.d.ts +6 -0
  76. package/dist/modules/invoice/api/mutations/invoiceBulkSendApproval.mutation.d.ts +5 -0
  77. package/dist/modules/invoice/api/mutations/invoiceMarkAsPriorApprovalRequired.mutation.d.ts +4 -0
  78. package/dist/modules/invoice/api/mutations/invoiceRejectApproval.mutation.d.ts +17 -0
  79. package/dist/modules/invoice/api/mutations/invoiceRestoreFromProForma.mutation.d.ts +4 -0
  80. package/dist/modules/invoice/api/mutations/invoiceSendApproval.mutation.d.ts +5 -0
  81. package/dist/modules/invoice/api/mutations/invoiceUnmarkAsPriorApprovalRequired.mutation.d.ts +4 -0
  82. package/dist/modules/invoice/api/queries/invoicePublicProFormaDetail.query.d.ts +2 -0
  83. package/dist/modules/invoice/api/query-keys/invoice.queryKeys.d.ts +6 -0
  84. package/dist/modules/invoice/api/services/invoice.service.d.ts +15 -1
  85. package/dist/modules/invoice/components/InvoiceApprovalOutOfSyncIndicator.vue.d.ts +3 -0
  86. package/dist/{ui/DisplayState.vue.d.ts → modules/invoice/components/InvoiceApprovalStatusBadge.vue.d.ts} +7 -10
  87. package/dist/modules/invoice/components/InvoiceApprovalStatusChip.vue.d.ts +16 -0
  88. package/dist/modules/invoice/models/invoice/approval/invoiceApprovalTransformers.spec.d.ts +1 -0
  89. package/dist/modules/invoice/models/invoice/approval/invoiceApprovalUuid.model.d.ts +3 -0
  90. package/dist/modules/invoice/models/invoice/approval/invoiceApprove.transformer.d.ts +5 -0
  91. package/dist/modules/invoice/models/invoice/approval/invoiceApproveForm.model.d.ts +15 -0
  92. package/dist/modules/invoice/models/invoice/approval/invoiceApproveForm.model.spec.d.ts +1 -0
  93. package/dist/modules/invoice/models/invoice/approval/invoiceReject.transformer.d.ts +5 -0
  94. package/dist/modules/invoice/models/invoice/approval/invoiceRejectForm.model.d.ts +15 -0
  95. package/dist/modules/invoice/models/invoice/approval/invoiceRejectForm.model.spec.d.ts +1 -0
  96. package/dist/modules/invoice/models/invoice/detail/invoiceDetail.model.d.ts +14 -1
  97. package/dist/modules/invoice/models/invoice/detail/invoiceDetail.transformer.d.ts +1 -0
  98. package/dist/modules/invoice/models/invoice/index/invoiceIndex.model.d.ts +4 -0
  99. package/dist/modules/invoice/models/invoice/index/invoiceIndexQueryParams.model.d.ts +3 -1
  100. package/dist/modules/invoice/models/invoice/invoiceApproval.transformer.d.ts +7 -0
  101. package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.model.d.ts +27 -0
  102. package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.util.d.ts +12 -0
  103. package/dist/modules/invoice/models/invoice/invoiceApprovalStatus.util.spec.d.ts +1 -0
  104. package/dist/modules/invoice/models/invoice/payment/invoicePaymentCreate.transformer.spec.d.ts +1 -0
  105. package/dist/modules/invoice/models/invoice/pdf/invoicePdfDetail.transformer.d.ts +2 -1
  106. package/dist/modules/invoice/routes/invoice.routes.d.ts +4 -0
  107. package/dist/modules/invoice/use-cases/detail/components/InvoiceApprovalBanner.vue.d.ts +19 -0
  108. package/dist/modules/invoice/use-cases/detail/components/InvoiceDetailHeaderSection.vue.d.ts +4 -0
  109. package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailHeaderActions.composable.d.ts +5 -0
  110. package/dist/modules/invoice/use-cases/detail/composables/invoiceDetailPaymentsTableColumns.composable.d.ts +1 -1
  111. package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApprovalArchiveDialog.vue.d.ts +13 -0
  112. package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApprovalRevertDialog.vue.d.ts +15 -0
  113. package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApproveDialog.vue.d.ts +14 -0
  114. package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceApproveDialogDataProvider.vue.d.ts +13 -0
  115. package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceFinalizeOutOfSyncDialog.vue.d.ts +21 -0
  116. package/dist/modules/invoice/use-cases/detail/dialogs/InvoicePaymentDeleteDialog.vue.d.ts +13 -0
  117. package/dist/modules/invoice/use-cases/detail/dialogs/InvoiceRejectDialog.vue.d.ts +13 -0
  118. package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewBulkActionBar.vue.d.ts +3 -0
  119. package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewTableApprovalCell.vue.d.ts +9 -0
  120. package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewDataTableFilters.composable.d.ts +3 -1
  121. package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewSelection.composable.d.ts +11 -9
  122. package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkActionDialog.vue.d.ts +3 -2
  123. package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendApprovalDialog.vue.d.ts +14 -0
  124. package/dist/modules/invoice/use-cases/overview/utils/invoiceOverviewBulkActionFeedback.util.d.ts +9 -4
  125. package/dist/modules/invoice/use-cases/overview/utils/invoiceOverviewBulkActionFeedback.util.spec.d.ts +1 -0
  126. package/dist/modules/invoice/use-cases/overview/views/InvoiceOverviewView.vue.d.ts +0 -5
  127. package/dist/modules/invoice/use-cases/pdf/components/BillingDocumentPdf.vue.d.ts +1 -0
  128. package/dist/modules/invoice/use-cases/pdf/components/InvoicePdfWatermark.vue.d.ts +4 -1
  129. package/dist/modules/invoice/use-cases/pdf/views/InvoicePdfView.vue.d.ts +1 -0
  130. package/dist/modules/invoice/use-cases/pdf/views/InvoicePublicProFormaPdfViewDataProvider.vue.d.ts +3 -0
  131. package/dist/modules/invoice-approval/actions/invoiceApproval.actions.d.ts +5 -0
  132. package/dist/modules/invoice-approval/actions/invoiceApprovalArchive.action.d.ts +1 -0
  133. package/dist/modules/invoice-approval/actions/invoiceApprovalMarkAsApproved.action.d.ts +1 -0
  134. package/dist/modules/invoice-approval/actions/invoiceApprovalReject.action.d.ts +1 -0
  135. package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.action.d.ts +3 -0
  136. package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.spec.d.ts +1 -0
  137. package/dist/modules/invoice-approval/api/mutations/approvalReminderConfigUpdate.mutation.d.ts +8 -0
  138. package/dist/modules/invoice-approval/api/queries/approvalReminderConfig.query.d.ts +1 -0
  139. package/dist/modules/invoice-approval/api/queries/invoiceApprovalIndex.query.d.ts +3 -0
  140. package/dist/modules/invoice-approval/api/query-keys/invoiceApproval.queryKeys.d.ts +15 -0
  141. package/dist/modules/invoice-approval/api/services/invoiceApproval.service.d.ts +10 -0
  142. package/dist/modules/invoice-approval/components/InvoiceApprovalReminderLevelIndicator.vue.d.ts +7 -0
  143. package/dist/modules/invoice-approval/models/approvalReminderConfig.transformer.d.ts +6 -0
  144. package/dist/modules/invoice-approval/models/approvalReminderConfigForm.model.d.ts +11 -0
  145. package/dist/modules/invoice-approval/models/approvalReminderConfigForm.spec.d.ts +1 -0
  146. package/dist/modules/invoice-approval/models/invoiceApprovalIndex.model.d.ts +21 -0
  147. package/dist/modules/invoice-approval/models/invoiceApprovalIndex.transformer.d.ts +5 -0
  148. package/dist/modules/invoice-approval/models/invoiceApprovalIndex.transformer.spec.d.ts +1 -0
  149. package/dist/modules/invoice-approval/models/invoiceApprovalIndexQueryParams.model.d.ts +9 -0
  150. package/dist/modules/invoice-approval/models/invoiceApprovalIndexQueryParams.transformer.d.ts +6 -0
  151. package/dist/modules/invoice-approval/models/invoiceApprovalIndexQueryParams.transformer.spec.d.ts +1 -0
  152. package/dist/modules/invoice-approval/routes/invoiceApproval.routes.d.ts +24 -0
  153. package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewActionsCell.vue.d.ts +7 -0
  154. package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewAmountCell.vue.d.ts +7 -0
  155. package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewInvoiceCell.vue.d.ts +7 -0
  156. package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewMetrics.vue.d.ts +18 -0
  157. package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewNextReminderCell.vue.d.ts +7 -0
  158. package/dist/modules/invoice-approval/use-cases/overview/components/InvoiceApprovalOverviewStatusCell.vue.d.ts +7 -0
  159. package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverview.composable.d.ts +41 -0
  160. package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewFilters.composable.d.ts +5 -0
  161. package/dist/modules/invoice-approval/use-cases/overview/composables/invoiceApprovalOverviewTableColumns.composable.d.ts +3 -0
  162. package/dist/modules/invoice-approval/use-cases/overview/views/InvoiceApprovalOverviewView.vue.d.ts +3 -0
  163. package/dist/modules/invoice-approval/use-cases/settings/views/ApprovalReminderSettingsView.vue.d.ts +7 -0
  164. package/dist/modules/invoice-approval/use-cases/settings/views/ApprovalReminderSettingsViewDataProvider.vue.d.ts +3 -0
  165. package/dist/modules/settings/models/issuer-settings/issuerSettings.model.d.ts +1 -0
  166. package/dist/modules/settings/routes/settings.routes.d.ts +7 -0
  167. package/dist/{plainDate.transformer-BxvJpJOv.js → plainDate.transformer-Bhiz9jW7.js} +17 -4
  168. package/dist/reminderConfig.query-DSO0ekC_.js +316 -0
  169. package/dist/routes/invoicingPublicRoutes.composable.d.ts +4 -0
  170. package/dist/routes/invoicingRoutes.composable.d.ts +14 -6
  171. package/dist/search.composable-CU9OpyUB.js +52 -0
  172. package/dist/{src-BFgnUugN.js → src-DUSgQTKr.js} +45 -45
  173. package/dist/style.css +1 -1
  174. package/dist/types/queryKey.type.d.ts +3 -2
  175. package/dist/ui/billing-document/sidebar/BillingDocumentDetailSidebarActivityApprovalDetails.vue.d.ts +7 -0
  176. package/dist/utils/html.util.d.ts +4 -0
  177. package/package.json +3 -2
  178. package/dist/AddOpenBoundaryIcon-9SqBHfoz.js +0 -25
  179. package/dist/AirlineIcon-Z6sH_StM.js +0 -26
  180. package/dist/AirplaneIcon-C-nSkD1w.js +0 -19
  181. package/dist/AirportIcon-m4itDKCV.js +0 -16
  182. package/dist/AlertTriangleIcon-DtYLCC-Y.js +0 -23
  183. package/dist/AllocationsIcon-hcg93Sll.js +0 -16
  184. package/dist/ArrowNarrowRightIcon-2-Sml68f.js +0 -23
  185. package/dist/AssetIcon-qOYs6Wna.js +0 -16
  186. package/dist/BarChartIcon-DDyzpV_3.js +0 -22
  187. package/dist/BellIcon-DF1OBFta.js +0 -21
  188. package/dist/BuildingIcon-CC5PMNeP.js +0 -22
  189. package/dist/ChargerIcon-aM_endLr.js +0 -16
  190. package/dist/ChevronDownIcon-4QiK-Z6-.js +0 -23
  191. package/dist/ChevronUpIcon-qBsjZ5Dz.js +0 -23
  192. package/dist/ClockIcon-BNiPCaiB.js +0 -23
  193. package/dist/ClockSnoozeIcon-BxGfwJB6.js +0 -23
  194. package/dist/CopyIcon-DH5ly0dZ.js +0 -19
  195. package/dist/DataProvider-Dj34ljUX.js +0 -75
  196. package/dist/DownloadCloudIcon-Cf8ftklG.js +0 -22
  197. package/dist/DunningCaseDetailViewDataProvider-DKuuysqS.js +0 -409
  198. package/dist/DunningCaseOverviewView-aWttPLrC.js +0 -747
  199. package/dist/DunningCaseSendDialog-DyvA5R1p.js +0 -349
  200. package/dist/EditIcon-Dr7OHBBR.js +0 -21
  201. package/dist/EraserIcon-B1VJSvdI.js +0 -23
  202. package/dist/FileIcon-ssmQI5Yl.js +0 -23
  203. package/dist/FilterLinesIcon-C7YdyPBk.js +0 -23
  204. package/dist/GlobeIcon-BfRM6Ike.js +0 -22
  205. package/dist/HelpIcon-BrJ49P5y.js +0 -22
  206. package/dist/HourGlassIcon-D9rfU1Is.js +0 -22
  207. package/dist/InfoCircleIcon-Ee0SyiMc.js +0 -23
  208. package/dist/InvoiceDetailViewDataProvider-BU6jZfD7.js +0 -1670
  209. package/dist/InvoiceOverviewViewDataProvider-i8tXATJE.js +0 -1677
  210. package/dist/InvoicePublicPdfViewDataProvider-BJe-8hC5.js +0 -45
  211. package/dist/KeyboardIcon-T3o_g-1c.js +0 -22
  212. package/dist/LinkExternalIcon-BkHS4fCx.js +0 -22
  213. package/dist/LinkIcon-DuPwae98.js +0 -22
  214. package/dist/MarkerIcon-B1Jqenjb.js +0 -28
  215. package/dist/MobileBatteryIcon-GZ1SMRDV.js +0 -16
  216. package/dist/MonitorIcon-pbK22reU.js +0 -22
  217. package/dist/NotificationIcon-Ctv8vyWt.js +0 -19
  218. package/dist/ParkingIcon-DnUPW3pB.js +0 -24
  219. package/dist/PlanningIcon-CXvrskgj.js +0 -16
  220. package/dist/PreferenceIcon-BHS8uDyi.js +0 -22
  221. package/dist/ReceiptCheckIcon-QTestqCJ.js +0 -23
  222. package/dist/RefreshIcon-DShY-aoS.js +0 -22
  223. package/dist/RemoveOpenBoundaryIcon-CN8YWs6o.js +0 -28
  224. package/dist/RewindIcon-GWg2AQax.js +0 -22
  225. package/dist/SettingsIcon-CBLJ6B5u.js +0 -25
  226. package/dist/ShieldIcon-CVnrOcxl.js +0 -19
  227. package/dist/ShieldOffIcon-B9l0dDVb.js +0 -23
  228. package/dist/SignOutIcon-CmDkjJ5F.js +0 -21
  229. package/dist/SlashCircleIcon-jY5FBko5.js +0 -22
  230. package/dist/StandIcon-CoYnBLMn.js +0 -23
  231. package/dist/StarsIcon-D7ZlqOW7.js +0 -22
  232. package/dist/StopwatchIcon-BK0vh1lg.js +0 -22
  233. package/dist/TargetIcon-HMWj77-Q.js +0 -22
  234. package/dist/ThreeDotsIcon-BtFruOKz.js +0 -32
  235. package/dist/ToolIcon-DRfDb7fE.js +0 -22
  236. package/dist/TrashIcon-BwxBjHv5.js +0 -19
  237. package/dist/TurnaroundIcon-b1X61TwZ.js +0 -27
  238. package/dist/UploadCloudIcon-BF0equKg.js +0 -22
  239. package/dist/UserIcon-B0rCC6KE.js +0 -22
  240. package/dist/UsersIcon-cK5l_zKG.js +0 -22
  241. package/dist/VerifiedIcon-CELYlqcv.js +0 -22
  242. package/dist/WifiIcon--JPvMNEF.js +0 -23
  243. package/dist/WifiOffIcon-BS2KftcP.js +0 -23
  244. package/dist/ZapIcon-BHwcIQc0.js +0 -23
  245. package/dist/ZoomInIcon-Cu6r915V.js +0 -23
  246. package/dist/ZoomOutIcon-DwB4FRj-.js +0 -23
  247. package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
  248. package/dist/customerUuid.model-GUFYq3O2.js +0 -5
  249. package/dist/instant.transformer-KmBsH3E9.js +0 -18
  250. package/dist/invoice.service-Bb8VqQvc.js +0 -635
  251. package/dist/invoiceDeliveryStatus.util-BPkGCQM6.js +0 -331
  252. package/dist/reminderConfig.query-DsJNqqi7.js +0 -331
  253. package/dist/search.composable-BCtYqudV.js +0 -52
@@ -1,10 +1,9 @@
1
1
  import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
- import { K as t, t as n } from "./api.util-BCSgCfpS.js";
2
+ import { ot as t, t as n } from "./api.util-CkIRZS3h.js";
3
3
  import { r } from "./useCurrencyFormat.composable-MtZaqKnO.js";
4
- import { n as i } from "./src-BFgnUugN.js";
5
- import { n as a, t as o } from "./plainDate.transformer-BxvJpJOv.js";
6
- import { n as s, t as c } from "./address.transformer-jGddczLV.js";
7
- import { t as l } from "./instant.transformer-KmBsH3E9.js";
4
+ import { n as i } from "./src-DUSgQTKr.js";
5
+ import { n as a, t as o } from "./address.transformer-jGddczLV.js";
6
+ import { n as s, r as c, t as l } from "./plainDate.transformer-Bhiz9jW7.js";
8
7
  import { n as u, r as ee } from "./dist-boJIIxnT.js";
9
8
  import { useI18n as d } from "vue-i18n";
10
9
  import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as te, createVNode as v, defineComponent as y, normalizeClass as b, onUnmounted as x, openBlock as S, renderList as C, toDisplayString as w, unref as T, withCtx as E } from "vue";
@@ -15,35 +14,36 @@ import { useRouteQuery as M } from "@vueuse/router";
15
14
  var N = class e {
16
15
  static fromInvoiceDto(e) {
17
16
  return {
18
- dueOn: o.fromDto(e.dueOn),
19
- issuedOn: o.fromDto(e.issuedOn),
17
+ dueOn: l.fromDto(e.dueOn),
18
+ issuedOn: l.fromDto(e.issuedOn),
20
19
  isNew: e.isNew,
21
20
  daysOverdue: e.daysOverdue,
22
- fee: a.fromDto(e.fee),
21
+ fee: s.fromDto(e.fee),
23
22
  level: e.level,
24
- outstandingBalance: a.fromDto(e.outstandingBalance),
23
+ outstandingBalance: s.fromDto(e.outstandingBalance),
25
24
  sequence: e.sequence
26
25
  };
27
26
  }
28
27
  static fromOutstandingInvoiceDto(e) {
29
28
  return {
30
- dueOn: o.fromDto(e.dueOn),
31
- issuedOn: o.fromDto(e.issuedOn),
29
+ dueOn: l.fromDto(e.dueOn),
30
+ issuedOn: l.fromDto(e.issuedOn),
32
31
  isNew: !1,
33
32
  daysOverdue: e.daysOverdue,
34
33
  fee: null,
35
34
  level: null,
36
- outstandingBalance: a.fromDto(e.outstandingBalance),
35
+ outstandingBalance: s.fromDto(e.outstandingBalance),
37
36
  sequence: e.sequence
38
37
  };
39
38
  }
40
39
  static fromPublicDto(t) {
40
+ let n = new Set(t.invoices.map((e) => e.sequence)), r = t.outstandingInvoices.filter((e) => e.daysOverdue > 0 && !n.has(e.sequence));
41
41
  return {
42
- createdAt: l.fromDto(t.createdAt),
43
- sentAt: l.fromNullableDto(t.sentAt),
42
+ createdAt: c.fromDto(t.createdAt),
43
+ sentAt: c.fromNullableDto(t.sentAt),
44
44
  issuer: {
45
45
  name: t.issuer.name,
46
- address: c.fromNullableDto(t.issuer.address),
46
+ address: o.fromNullableDto(t.issuer.address),
47
47
  alternativeBankAccountNumber: t.issuer.alternativeBankAccountNumber,
48
48
  bankAccountNumber: t.issuer.bankAccountNumber,
49
49
  email: t.issuer.email,
@@ -53,17 +53,17 @@ var N = class e {
53
53
  },
54
54
  customer: {
55
55
  name: t.customer.name,
56
- address: c.fromNullableDto(t.customer.address),
56
+ address: o.fromNullableDto(t.customer.address),
57
57
  locale: t.customer.locale
58
58
  },
59
- invoices: t.invoices.map(e.fromInvoiceDto).toSorted((e, t) => (t.level ?? 0) - (e.level ?? 0) || t.outstandingBalance.amount - e.outstandingBalance.amount),
59
+ invoices: [...t.invoices.map(e.fromInvoiceDto), ...r.map(e.fromOutstandingInvoiceDto)].toSorted((e, t) => (t.level ?? 0) - (e.level ?? 0) || t.outstandingBalance.amount - e.outstandingBalance.amount),
60
60
  level: t.level,
61
- outstandingInvoices: t.outstandingInvoices.map(e.fromOutstandingInvoiceDto),
61
+ outstandingInvoices: t.outstandingInvoices.filter((e) => e.daysOverdue <= 0).map(e.fromOutstandingInvoiceDto),
62
62
  recipient: {
63
63
  name: t.recipient.name,
64
64
  email: t.recipient.email
65
65
  },
66
- totalFee: a.fromDto(t.totalFee)
66
+ totalFee: s.fromDto(t.totalFee)
67
67
  };
68
68
  }
69
69
  }, P = class {
@@ -92,11 +92,11 @@ var I = /* @__PURE__ */ y({
92
92
  __name: "DunningCaseReminderPdfFooter",
93
93
  props: { issuer: {} },
94
94
  setup(e) {
95
- let t = e, n = d(), r = p(() => t.issuer.name ?? n.t("module.dunning_case.pdf.not_available")), i = p(() => s.formatLines(t.issuer.address).join(", ")), a = p(() => t.issuer.bankAccountNumber ?? t.issuer.alternativeBankAccountNumber);
96
- function o(...e) {
95
+ let t = e, n = d(), r = p(() => t.issuer.name ?? n.t("module.dunning_case.pdf.not_available")), i = p(() => a.formatLines(t.issuer.address).join(", ")), o = p(() => t.issuer.bankAccountNumber ?? t.issuer.alternativeBankAccountNumber);
96
+ function s(...e) {
97
97
  return e.flatMap(([e, t]) => t === null || t === "" ? [] : `${e}: ${t}`);
98
98
  }
99
- let c = p(() => [o([n.t("module.dunning_case.pdf.footer.email"), t.issuer.email], [n.t("module.dunning_case.pdf.footer.phone"), t.issuer.phoneNumber]), o([n.t("module.dunning_case.pdf.footer.address"), i.value], [n.t("module.dunning_case.pdf.footer.vat_number"), t.issuer.vatNumber], [n.t("module.dunning_case.pdf.footer.iban"), a.value])].filter((e) => e.length > 0));
99
+ let c = p(() => [s([n.t("module.dunning_case.pdf.footer.email"), t.issuer.email], [n.t("module.dunning_case.pdf.footer.phone"), t.issuer.phoneNumber]), s([n.t("module.dunning_case.pdf.footer.address"), i.value], [n.t("module.dunning_case.pdf.footer.vat_number"), t.issuer.vatNumber], [n.t("module.dunning_case.pdf.footer.iban"), o.value])].filter((e) => e.length > 0));
100
100
  return (e, t) => (S(), m(T(O), {
101
101
  as: "footer",
102
102
  align: "stretch",
@@ -169,7 +169,7 @@ var I = /* @__PURE__ */ y({
169
169
  __name: "DunningCaseReminderPdfHeader",
170
170
  props: { reminder: {} },
171
171
  setup(e) {
172
- let t = e, n = d(), r = u(), i = p(() => t.reminder.issuer.name ?? n.t("module.dunning_case.pdf.not_available")), a = p(() => s.formatLines(t.reminder.customer.address)), o = p(() => n.t(z.getLetterCopy(t.reminder.level).subtitleKey)), c = p(() => t.reminder.sentAt === null ? n.t("module.dunning_case.pdf.created_date") : n.t("module.dunning_case.pdf.reminder_date")), l = p(() => r.toDate(t.reminder.sentAt ?? t.reminder.createdAt));
172
+ let t = e, n = d(), r = u(), i = p(() => t.reminder.issuer.name ?? n.t("module.dunning_case.pdf.not_available")), o = p(() => a.formatLines(t.reminder.customer.address)), s = p(() => n.t(z.getLetterCopy(t.reminder.level).subtitleKey)), c = p(() => t.reminder.sentAt === null ? n.t("module.dunning_case.pdf.created_date") : n.t("module.dunning_case.pdf.reminder_date")), l = p(() => r.toDate(t.reminder.sentAt ?? t.reminder.createdAt));
173
173
  return (e, r) => (S(), m(T(O), {
174
174
  as: "header",
175
175
  align: "center",
@@ -196,7 +196,7 @@ var I = /* @__PURE__ */ y({
196
196
  class: "text-lg/7 font-medium"
197
197
  }, null, 8, ["text"]),
198
198
  v(T(A), {
199
- text: o.value,
199
+ text: s.value,
200
200
  truncate: !1,
201
201
  as: "p",
202
202
  class: "text-secondary"
@@ -213,7 +213,7 @@ var I = /* @__PURE__ */ y({
213
213
  class: "leading-3.5 font-semibold"
214
214
  }, null, 8, ["text"]), _("div", null, [
215
215
  _("p", null, w(t.reminder.customer.name), 1),
216
- (S(!0), g(f, null, C(a.value, (e) => (S(), g("p", { key: e }, w(e), 1))), 128)),
216
+ (S(!0), g(f, null, C(o.value, (e) => (S(), g("p", { key: e }, w(e), 1))), 128)),
217
217
  _("p", null, w(t.reminder.recipient.email), 1)
218
218
  ])]),
219
219
  _: 1
@@ -0,0 +1,360 @@
1
+ import { Q as e, Z as t, t as n } from "./api.util-CkIRZS3h.js";
2
+ import { r } from "./useCurrencyFormat.composable-MtZaqKnO.js";
3
+ import { n as i } from "./invoicingConfig.composable-COn1rKRf.js";
4
+ import { n as a, r as o, t as s } from "./reminderConfig.query-DSO0ekC_.js";
5
+ import { dt as c, et as l, f as u } from "./dist-BD7Allff.js";
6
+ import { t as d } from "./customerUuid.model-ClN4Vi9n.js";
7
+ import { z as f } from "zod";
8
+ import { useI18n as p } from "vue-i18n";
9
+ import { Fragment as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createTextVNode as b, createVNode as x, defineComponent as S, normalizeClass as C, openBlock as w, ref as T, renderList as E, toDisplayString as D, unref as O, watch as k, withCtx as A } from "vue";
10
+ import { useMutation as j, useQuery as ee } from "@wisemen/vue-core-api-utils";
11
+ import { useRouter as M } from "vue-router";
12
+ import { Temporal as N } from "temporal-polyfill";
13
+ import { err as te, ok as ne } from "neverthrow";
14
+ import { UIBadge as P, UIColumnLayout as F, UIDialogBody as I, UIDialogFooter as L, UIDialogFooterCancel as R, UIDialogFooterPrimary as z, UIDialogHeader as B, UIFormDialog as V, useToast as H } from "@wisemen/vue-core-design-system";
15
+ import { useForm as U } from "formango";
16
+ //#region src/modules/dunning-case/api/services/dunningCaseCustomer.service.ts
17
+ var W = class {
18
+ static async getAll(e, r) {
19
+ return (await n.fromPromise(t({ query: {
20
+ pagination: r,
21
+ search: e
22
+ } }))).map((e) => ({
23
+ data: e.data.items.map((e) => ({
24
+ uuid: e.uuid,
25
+ name: e.name
26
+ })),
27
+ meta: e.data.meta
28
+ }));
29
+ }
30
+ static async getRecipients(t) {
31
+ let r = [], i = 0, a = 0;
32
+ do {
33
+ let o = await n.fromPromise(e({
34
+ query: { pagination: {
35
+ limit: 100,
36
+ offset: i
37
+ } },
38
+ path: { uuid: t }
39
+ }));
40
+ if (o.isErr()) return te(o.error);
41
+ if (r.push(...o.value.data.items.map((e) => ({
42
+ isDefault: e.isDefault,
43
+ email: e.email
44
+ }))), a = o.value.data.meta.total, i += o.value.data.items.length, o.value.data.items.length === 0) break;
45
+ } while (i < a);
46
+ return ne(r);
47
+ }
48
+ static async getUuidByExternalId(e) {
49
+ return (await n.fromPromise(t({ query: {
50
+ filter: { externalId: e },
51
+ pagination: {
52
+ limit: 1,
53
+ offset: 0
54
+ }
55
+ } }))).map((e) => e.data.items[0]?.uuid ?? null);
56
+ }
57
+ }, G = 3e4;
58
+ function K(e) {
59
+ return ee("dunningCaseDetail", {
60
+ staleTime: G,
61
+ params: { dunningCaseUuid: e },
62
+ queryFn: () => o.getByUuid(e.value)
63
+ });
64
+ }
65
+ f.uuid().brand("DunningCaseUuid"), f.uuid().brand("DunningCaseReminderUuid");
66
+ function q(e) {
67
+ return e === null ? "none" : e.hasErrors ? "failed" : e.sentAt === null ? "sending" : "sent";
68
+ }
69
+ function J(e, t) {
70
+ return [
71
+ 0,
72
+ 1,
73
+ 2,
74
+ 3
75
+ ].map((n) => e.filter((e) => !e.isDisputed && e.level === n).reduce((e, t) => ({
76
+ ...e,
77
+ amount: e.amount + t.balanceDueAmount.amount
78
+ }), {
79
+ ...t,
80
+ amount: 0
81
+ }));
82
+ }
83
+ //#endregion
84
+ //#region src/modules/dunning-case/api/mutations/dunningCaseReminderRetry.mutation.ts
85
+ function Y() {
86
+ return j({
87
+ queryFn: (e) => o.retry(e.params.dunningCaseReminderUuid),
88
+ queryKeysToInvalidate: {
89
+ dunningCaseDetail: {},
90
+ dunningCaseIndex: {}
91
+ }
92
+ });
93
+ }
94
+ //#endregion
95
+ //#region src/modules/dunning-case/components/DunningCaseReminderStatusIndicator.vue
96
+ var X = /* @__PURE__ */ S({
97
+ __name: "DunningCaseReminderStatusIndicator",
98
+ props: {
99
+ blockedReason: {},
100
+ status: {}
101
+ },
102
+ setup(e) {
103
+ let t = e, n = p(), r = {
104
+ icon: l,
105
+ type: "icon"
106
+ };
107
+ return (e, i) => t.blockedReason === null ? t.status === "failed" ? (w(), g(O(P), {
108
+ key: 1,
109
+ label: O(n).t("module.dunning_case.reminder_status.failed"),
110
+ left: r,
111
+ color: "warning",
112
+ size: "sm",
113
+ variant: "translucent"
114
+ }, null, 8, ["label"])) : _("", !0) : (w(), g(O(P), {
115
+ key: 0,
116
+ label: O(n).t(`module.dunning_case.blocked_reason.${t.blockedReason}`),
117
+ left: r,
118
+ color: "error",
119
+ size: "sm",
120
+ variant: "translucent"
121
+ }, null, 8, ["label"]));
122
+ }
123
+ });
124
+ //#endregion
125
+ //#region src/modules/dunning-case/api/mutations/dunningCaseSend.mutation.ts
126
+ function Z() {
127
+ return j({
128
+ queryFn: (e) => o.send(e.params.dunningCaseUuid),
129
+ queryKeysToInvalidate: {
130
+ dunningCaseDetail: { dunningCaseUuid: (e) => e.dunningCaseUuid },
131
+ dunningCaseIndex: {}
132
+ }
133
+ });
134
+ }
135
+ //#endregion
136
+ //#region src/modules/dunning-case/use-cases/send/components/DunningCaseSendFeeRow.vue?vue&type=script&setup=true&lang.ts
137
+ var re = { class: "flex items-center justify-between gap-lg px-lg py-xs" }, ie = { class: "text-xs text-secondary" }, ae = { class: "font-mono text-xs font-medium text-primary tabular-nums" }, oe = /* @__PURE__ */ S({
138
+ __name: "DunningCaseSendFeeRow",
139
+ props: {
140
+ fee: {},
141
+ level: {}
142
+ },
143
+ setup(e) {
144
+ let t = e, n = p(), i = r();
145
+ return (e, r) => (w(), v("dl", re, [y("dt", ie, D(O(n).t("module.dunning_case.detail.reminder_fee")) + " · " + D(O(n).t("module.dunning_case.level.reminder", { level: t.level })), 1), y("dd", ae, D(O(i).formatMonetary(t.fee)), 1)]));
146
+ }
147
+ });
148
+ //#endregion
149
+ //#region src/modules/dunning-case/use-cases/send/utils/dunningCaseSend.util.ts
150
+ function Q(e) {
151
+ return N.PlainDate.compare(e.dueOn, N.Now.plainDateISO()) >= 0;
152
+ }
153
+ function se(e) {
154
+ return !e.isDisputed && !Q(e);
155
+ }
156
+ function ce(e) {
157
+ return e.filter(se);
158
+ }
159
+ function le(e, t) {
160
+ let n = e.map((e) => ({
161
+ invoice: e,
162
+ type: "invoice"
163
+ }));
164
+ if (!t) return n;
165
+ let r = e.findIndex((e) => !e.isDisputed && Q(e));
166
+ return n.splice(r === -1 ? n.length : r, 0, { type: "fee" }), n;
167
+ }
168
+ //#endregion
169
+ //#region src/modules/dunning-case/use-cases/send/components/DunningCaseSendInvoiceRow.vue?vue&type=script&setup=true&lang.ts
170
+ var ue = { class: "min-w-0" }, de = { class: "flex min-w-0 items-center gap-sm" }, fe = { class: "font-mono text-sm font-medium text-primary" }, pe = {
171
+ key: 0,
172
+ class: "truncate text-xs text-error-primary"
173
+ }, me = {
174
+ key: 1,
175
+ class: "truncate text-xs text-secondary"
176
+ }, he = {
177
+ key: 2,
178
+ class: "flex shrink-0 gap-xxs"
179
+ }, ge = { class: "font-mono text-xs font-medium text-primary tabular-nums" }, _e = /* @__PURE__ */ S({
180
+ __name: "DunningCaseSendInvoiceRow",
181
+ props: {
182
+ hasSeparator: { type: Boolean },
183
+ invoice: {}
184
+ },
185
+ setup(e) {
186
+ let t = e, n = p(), i = r();
187
+ return (e, r) => (w(), v("div", { class: C([{ "border-t border-secondary": t.hasSeparator }, "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-lg px-lg py-xs"]) }, [y("div", ue, [y("div", de, [y("p", fe, D(t.invoice.sequence), 1), t.invoice.isDisputed ? (w(), v("span", pe, " · " + D(O(n).t("module.dunning_case.detail.protested")), 1)) : O(Q)(t.invoice) ? (w(), v("span", me, " (" + D(O(n).t("module.dunning_case.send.not_yet_due")) + ") ", 1)) : (w(), v("span", he, [x(a, {
188
+ level: t.invoice.level,
189
+ size: "sm"
190
+ }, null, 8, ["level"])]))])]), y("p", ge, D(t.invoice.isDisputed ? "—" : O(i).formatMonetary(t.invoice.balanceDueAmount)), 1)], 2));
191
+ }
192
+ }), ve = { class: "w-full overflow-hidden rounded-md border border-secondary bg-primary shadow-xs" }, ye = { class: "flex items-start justify-between gap-lg border-b border-secondary px-lg py-md" }, be = { class: "min-w-0" }, xe = { class: "text-sm font-semibold text-primary" }, Se = { class: "shrink-0" }, Ce = { class: "max-h-72 overflow-y-auto border-b border-secondary" }, we = { class: "flex items-center justify-between gap-xl bg-secondary px-lg py-md" }, Te = { class: "text-sm font-medium text-primary" }, Ee = { class: "font-mono text-xl font-semibold text-primary tabular-nums" }, De = /* @__PURE__ */ S({
193
+ __name: "DunningCaseSendInvoiceSummary",
194
+ props: {
195
+ dunningCase: {},
196
+ subject: {}
197
+ },
198
+ setup(e) {
199
+ let t = e, n = p(), i = r(), a = h(() => le(t.dunningCase.invoices, t.dunningCase.totalFee.amount > 0)), o = h(() => t.dunningCase.level === 0 ? n.t("module.dunning_case.level.none") : n.t("module.dunning_case.level.reminder", { level: t.dunningCase.level }));
200
+ return (e, r) => (w(), v("section", ve, [
201
+ y("div", ye, [y("div", be, [y("p", xe, D(t.subject ?? O(n).t("module.dunning_case.detail.invoices")), 1)]), y("span", Se, [x(O(P), {
202
+ label: o.value,
203
+ color: "gray",
204
+ size: "sm",
205
+ variant: "translucent"
206
+ }, null, 8, ["label"])])]),
207
+ y("div", Ce, [(w(!0), v(m, null, E(a.value, (e, n) => (w(), v(m, { key: e.type === "fee" ? "fee" : e.invoice.uuid }, [e.type === "fee" ? (w(), g(oe, {
208
+ key: 0,
209
+ fee: t.dunningCase.totalFee,
210
+ level: t.dunningCase.level
211
+ }, null, 8, ["fee", "level"])) : (w(), g(_e, {
212
+ key: 1,
213
+ "has-separator": a.value[n - 1]?.type === "fee",
214
+ invoice: e.invoice
215
+ }, null, 8, ["has-separator", "invoice"]))], 64))), 128))]),
216
+ y("dl", we, [y("dt", Te, D(O(n).t("module.dunning_case.send.outstanding_balance")), 1), y("dd", Ee, D(O(i).formatMonetary(t.dunningCase.outstandingBalance)), 1)])
217
+ ]));
218
+ }
219
+ }), $ = { class: "rounded-md border border-secondary bg-secondary p-md" }, Oe = { class: "text-sm text-error-primary" }, ke = /* @__PURE__ */ S({
220
+ __name: "DunningCaseSendRecipientAlert",
221
+ props: { customerDetailRoute: {} },
222
+ setup(e) {
223
+ let t = e, n = p(), r = M();
224
+ function i() {
225
+ t.customerDetailRoute !== null && r.push(t.customerDetailRoute);
226
+ }
227
+ return (e, r) => (w(), v("div", $, [y("p", Oe, [b(D(O(n).t("module.dunning_case.send.no_default_recipient_description")) + " ", 1), t.customerDetailRoute === null ? _("", !0) : (w(), v("button", {
228
+ key: 0,
229
+ class: "font-medium underline hover:no-underline",
230
+ type: "button",
231
+ onClick: i
232
+ }, D(O(n).t("module.dunning_case.send.open_customer")), 1))])]));
233
+ }
234
+ });
235
+ //#endregion
236
+ //#region src/modules/dunning-case/use-cases/send/composables/dunningCaseReminderSubject.composable.ts
237
+ function Ae(e) {
238
+ return e === "fr-BE" || e === "nl-BE" ? e : "en-US";
239
+ }
240
+ function je(e) {
241
+ let t = p(), n = s();
242
+ return h(() => {
243
+ let r = e.value;
244
+ return r === null || !n.result.value.isOk() ? null : n.result.value.getValue().find((e) => e.sequence === r)?.template[Ae(t.locale.value)].subject || null;
245
+ });
246
+ }
247
+ //#endregion
248
+ //#region src/modules/dunning-case/use-cases/send/composables/dunningCaseSendRecipient.composable.ts
249
+ function Me(e) {
250
+ let t = T(void 0), n = T(!0);
251
+ return k(e, async (e) => {
252
+ if (t.value = void 0, n.value = !0, e === null) return;
253
+ let r = await W.getRecipients(d.parse(e));
254
+ if (r.isErr()) {
255
+ n.value = !1;
256
+ return;
257
+ }
258
+ t.value = r.value.find((e) => e.isDefault)?.email ?? null, n.value = !1;
259
+ }, { immediate: !0 }), {
260
+ isMissing: h(() => t.value === null),
261
+ isPending: n,
262
+ defaultEmail: t
263
+ };
264
+ }
265
+ //#endregion
266
+ //#region src/modules/dunning-case/use-cases/send/dialogs/DunningCaseSendDialog.vue?vue&type=script&setup=true&lang.ts
267
+ var Ne = {
268
+ key: 0,
269
+ class: "text-sm text-secondary"
270
+ }, Pe = { class: "flex w-full items-start gap-md rounded-md bg-secondary px-lg py-md text-secondary" }, Fe = { class: "text-xs/relaxed" }, Ie = /* @__PURE__ */ S({
271
+ __name: "DunningCaseSendDialog",
272
+ props: {
273
+ dunningCaseUuid: {},
274
+ onSent: { type: Function }
275
+ },
276
+ emits: ["close"],
277
+ setup(e, { emit: t }) {
278
+ let n = e, r = t, a = p(), o = H(), s = i(), l = Z(), d = K(h(() => n.dunningCaseUuid)), b = h(() => d.result.value.isOk() ? d.result.value.getValue() : null), S = Me(h(() => b.value?.customer.uuid ?? null)), C = je(h(() => b.value?.level ?? null)), T = h(() => {
279
+ let e = b.value?.customer.uuid;
280
+ return e === void 0 ? null : s.getCustomerDetailRoute(e);
281
+ }), E = h(() => b.value === null ? 0 : ce(b.value.invoices).length), k = h(() => typeof S.defaultEmail.value == "string" ? a.t("module.dunning_case.send.grouped_to", { email: S.defaultEmail.value }) : S.isMissing.value ? a.t("module.dunning_case.send.no_default_recipient") : a.t("module.dunning_case.send.description")), j = U({
282
+ schema: f.object({}),
283
+ onSubmit: async () => {
284
+ if (S.isMissing.value) {
285
+ o.show({ message: a.t("module.dunning_case.send.no_default_recipient_blocked") });
286
+ return;
287
+ }
288
+ let e = await l.execute({ params: { dunningCaseUuid: n.dunningCaseUuid } });
289
+ if (e.isErr()) {
290
+ o.apiError(e.error);
291
+ return;
292
+ }
293
+ o.show({
294
+ duration: Infinity,
295
+ message: a.t("module.dunning_case.send.success", { customer: b.value?.customer.name ?? "" })
296
+ }), n.onSent?.(), r("close");
297
+ }
298
+ });
299
+ return (e, t) => (w(), g(O(V), {
300
+ form: O(j),
301
+ size: "lg",
302
+ onClose: t[0] ||= (e) => r("close")
303
+ }, {
304
+ default: A(() => [
305
+ x(O(B), {
306
+ title: O(a).t("module.dunning_case.send.title", {
307
+ customer: b.value?.customer.name ?? "",
308
+ level: b.value?.level ?? ""
309
+ }),
310
+ description: k.value,
311
+ "has-separator": !1,
312
+ icon: O(c)
313
+ }, null, 8, [
314
+ "title",
315
+ "description",
316
+ "icon"
317
+ ]),
318
+ x(O(I), null, {
319
+ default: A(() => [x(O(F), { gap: "lg" }, {
320
+ default: A(() => [O(d).isLoading.value ? (w(), v("p", Ne, D(O(a).t("module.dunning_case.common.loading")), 1)) : b.value === null ? _("", !0) : (w(), v(m, { key: 1 }, [
321
+ O(S).isMissing.value ? (w(), g(ke, {
322
+ key: 0,
323
+ "customer-detail-route": T.value
324
+ }, null, 8, ["customer-detail-route"])) : _("", !0),
325
+ x(De, {
326
+ "dunning-case": b.value,
327
+ subject: O(C)
328
+ }, null, 8, ["dunning-case", "subject"]),
329
+ y("div", Pe, [x(O(u), { class: "mt-xxs size-(--spacing-xl) shrink-0" }), y("p", Fe, D(O(a).t("module.dunning_case.send.impact", {
330
+ count: E.value,
331
+ level: b.value.level
332
+ })), 1)])
333
+ ], 64))]),
334
+ _: 1
335
+ })]),
336
+ _: 1
337
+ }),
338
+ x(O(L), { "has-separator": !1 }, {
339
+ right: A(() => [x(O(R)), x(O(z), {
340
+ "icon-right": O(c),
341
+ "is-disabled": b.value === null || O(S).isPending.value || O(S).isMissing.value,
342
+ "is-loading": O(j).isSubmitting.value,
343
+ label: O(a).t("module.dunning_case.send.send_now"),
344
+ onClick: O(j).submit
345
+ }, null, 8, [
346
+ "icon-right",
347
+ "is-disabled",
348
+ "is-loading",
349
+ "label",
350
+ "onClick"
351
+ ])]),
352
+ _: 1
353
+ })
354
+ ]),
355
+ _: 1
356
+ }, 8, ["form"]));
357
+ }
358
+ });
359
+ //#endregion
360
+ export { q as a, J as i, X as n, K as o, Y as r, W as s, Ie as t };
@@ -0,0 +1,45 @@
1
+ import { et as e } from "./dist-BD7Allff.js";
2
+ import { t } from "./invoiceCustomer.service-DpVfpQUD.js";
3
+ import { useI18n as n } from "vue-i18n";
4
+ import { computed as r, createBlock as i, createVNode as a, defineComponent as o, openBlock as s, unref as c, withCtx as l } from "vue";
5
+ import { useOffsetInfiniteQuery as u } from "@wisemen/vue-core-api-utils";
6
+ import { UIText as d, UITooltip as f, UITooltipContent as p } from "@wisemen/vue-core-design-system";
7
+ //#region src/modules/invoice/api/queries/invoiceCustomerSearch.query.ts
8
+ function m(e) {
9
+ let n = r(() => ({ search: e.params.search?.value }));
10
+ return u("invoiceCustomerSearch", {
11
+ params: { queryParams: n },
12
+ queryFn: (n) => t.getAll({
13
+ pagination: n,
14
+ search: e.params.search?.value ?? ""
15
+ })
16
+ });
17
+ }
18
+ //#endregion
19
+ //#region src/modules/invoice/components/InvoiceApprovalOutOfSyncIndicator.vue
20
+ var h = /* @__PURE__ */ o({
21
+ __name: "InvoiceApprovalOutOfSyncIndicator",
22
+ setup(t) {
23
+ let r = n();
24
+ return (t, n) => (s(), i(c(f), {
25
+ "popover-side-offset": 8,
26
+ "popover-align": "center",
27
+ "popover-side": "bottom"
28
+ }, {
29
+ trigger: l(() => [a(c(e), {
30
+ "aria-label": c(r).t("wise_invoicing.invoice.approval_status.out_of_sync"),
31
+ class: "size-(--spacing-xl) shrink-0 text-warning-primary"
32
+ }, null, 8, ["aria-label"])]),
33
+ content: l(() => [a(c(p), null, {
34
+ default: l(() => [a(c(d), {
35
+ text: c(r).t("wise_invoicing.invoice.approval_status.out_of_sync"),
36
+ class: "text-sm text-primary"
37
+ }, null, 8, ["text"])]),
38
+ _: 1
39
+ })]),
40
+ _: 1
41
+ }));
42
+ }
43
+ });
44
+ //#endregion
45
+ export { m as n, h as t };