@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
@@ -0,0 +1,799 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { t } from "./documentTitle.composable-CRJjS6p-.js";
3
+ import { r as n } from "./useCurrencyFormat.composable-MtZaqKnO.js";
4
+ import { n as r } from "./invoicingConfig.composable-COn1rKRf.js";
5
+ import { t as i } from "./search.composable-CU9OpyUB.js";
6
+ import { n as a, r as o } from "./reminderConfig.query-DSO0ekC_.js";
7
+ import { B as s, P as c, T as l, c as u, dt as d, l as f, lt as p } from "./dist-BD7Allff.js";
8
+ import { a as m, n as h, r as g, s as _, t as v } from "./DunningCaseSendDialog-BYFXJYMM.js";
9
+ import { n as ee } from "./customerUuid.model-ClN4Vi9n.js";
10
+ import { f as y, i as b, n as te, o as ne, r as x, s as re } from "./dist-D5agTXFI.js";
11
+ import { z as ie } from "zod";
12
+ import { useI18n as S } from "vue-i18n";
13
+ import { Fragment as C, computed as w, createBlock as T, createCommentVNode as E, createElementBlock as D, createElementVNode as O, createVNode as k, defineComponent as A, nextTick as j, normalizeClass as M, normalizeStyle as ae, onMounted as N, openBlock as P, ref as F, renderList as I, toDisplayString as L, unref as R, watch as z, withCtx as B } from "vue";
14
+ import { useMutation as oe, useOffsetInfiniteQuery as V } from "@wisemen/vue-core-api-utils";
15
+ import { useRouter as H } from "vue-router";
16
+ import { Temporal as U } from "temporal-polyfill";
17
+ import { UIBadge as W, UIButton as G, UIDashboardPage as se, UIDialogBody as K, UIDialogFooter as q, UIDialogFooterCancel as J, UIDialogFooterPrimary as Y, UIDialogHeader as X, UIFormDialog as ce, UITable as le, UITableCell as Z, UITableCellInteractiveElement as ue, UITabs as de, UITabsItem as fe, UITabsList as pe, createComponent as Q, defineTableColumns as me, useOverlay as he, useToast as ge } from "@wisemen/vue-core-design-system";
18
+ import { createAction as _e } from "@wisemen/vue-core-actions";
19
+ import { useForm as ve } from "formango";
20
+ //#region src/modules/dunning-case/api/queries/dunningCaseIndex.query.ts
21
+ function $(e) {
22
+ let t = w(() => ({
23
+ customerUuid: e.params.customerUuid?.value,
24
+ isOpen: e.params.isOpen?.value,
25
+ dunningCaseUuids: e.params.dunningCaseUuids?.value,
26
+ level: e.params.level?.value
27
+ }));
28
+ return V("dunningCaseIndex", {
29
+ isEnabled: w(() => e.isEnabled?.value ?? !0),
30
+ params: { queryParams: t },
31
+ queryFn: (e) => o.getAll({
32
+ ...t.value,
33
+ pagination: e
34
+ })
35
+ });
36
+ }
37
+ //#endregion
38
+ //#region src/modules/dunning-case/actions/dunningCaseNavigateToCustomer.action.ts
39
+ function ye() {
40
+ let e = S(), t = H(), n = r();
41
+ return _e({
42
+ id: "dunning-case-navigate-to-customer",
43
+ isApplicable: (e) => {
44
+ let t = e.targetedModelOfType("DunningCase");
45
+ return t !== null && n.getCustomerDetailRoute(t.customer.uuid) !== null;
46
+ },
47
+ name: () => e.t("module.dunning_case.overview.menu.view_customer"),
48
+ execute: (e) => {
49
+ let r = e.targetedModelOfTypeOrThrow("DunningCase"), i = n.getCustomerDetailRoute(r.customer.uuid);
50
+ i !== null && t.push(i);
51
+ },
52
+ icon: () => f
53
+ });
54
+ }
55
+ //#endregion
56
+ //#region src/modules/dunning-case/actions/dunningCaseNavigateToDetail.action.ts
57
+ function be() {
58
+ let e = S(), t = H();
59
+ return _e({
60
+ id: "dunning-case-navigate-to-detail",
61
+ isApplicable: (e) => e.hasTargetedModelsOfType("DunningCase"),
62
+ name: () => e.t("module.dunning_case.overview.menu.view_case"),
63
+ execute: (e) => {
64
+ let n = e.targetedModelOfTypeOrThrow("DunningCase");
65
+ t.push({
66
+ name: "dunning-case-detail",
67
+ params: { dunningCaseUuid: n.uuid }
68
+ });
69
+ },
70
+ icon: () => c
71
+ });
72
+ }
73
+ //#endregion
74
+ //#region src/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewMetrics.vue?vue&type=script&setup=true&lang.ts
75
+ var xe = ["aria-label"], Se = { class: "text-xs font-semibold text-secondary uppercase" }, Ce = { class: "mt-xl font-mono text-4xl font-semibold text-primary" }, we = { class: "mt-xs text-sm text-secondary" }, Te = { class: "lg:col-span-2" }, Ee = { class: "flex h-1.5 w-full overflow-hidden rounded-full bg-secondary" }, De = { class: "mt-xl grid grid-cols-1 gap-md sm:grid-cols-3" }, Oe = { class: "flex min-w-0 items-center gap-sm" }, ke = { class: "truncate text-sm text-secondary" }, Ae = { class: "shrink-0 font-mono text-sm font-semibold text-primary tabular-nums" }, je = /* @__PURE__ */ A({
76
+ __name: "DunningCaseOverviewMetrics",
77
+ props: {
78
+ hasLevelCountError: { type: Boolean },
79
+ levelCounts: {},
80
+ levelCountTotal: {}
81
+ },
82
+ setup(e) {
83
+ let t = e, n = S(), r = w(() => t.hasLevelCountError ? n.t("module.dunning_case.overview.metrics_unavailable") : t.levelCountTotal === null ? n.t("module.dunning_case.common.loading") : n.t("module.dunning_case.overview.case_count", { count: t.levelCountTotal }));
84
+ function i(e) {
85
+ return e === 0 ? n.t("module.dunning_case.level.none") : n.t("module.dunning_case.level.reminder", { level: e });
86
+ }
87
+ return (t, a) => (P(), D("section", {
88
+ "aria-label": R(n).t("module.dunning_case.overview.levels"),
89
+ class: "grid min-w-0 grid-cols-1 gap-2xl rounded-lg border border-secondary bg-primary p-2xl shadow-sm lg:grid-cols-3 lg:items-center"
90
+ }, [O("div", null, [
91
+ O("p", Se, L(R(n).t("module.dunning_case.overview.levels")), 1),
92
+ O("p", Ce, L(e.levelCountTotal ?? "—"), 1),
93
+ O("p", we, L(r.value), 1)
94
+ ]), O("div", Te, [O("div", Ee, [(P(!0), D(C, null, I(e.levelCounts, (e, t) => (P(), D("span", {
95
+ key: t,
96
+ class: M({
97
+ "bg-brand-500": t === 0,
98
+ "bg-error-solid": t === 2,
99
+ "bg-warning-solid": t === 1
100
+ }),
101
+ style: ae({ flexGrow: e ?? 0 })
102
+ }, null, 6))), 128))]), O("div", De, [(P(!0), D(C, null, I(e.levelCounts, (e, t) => (P(), D("div", {
103
+ key: t,
104
+ class: "flex items-center justify-between gap-xl"
105
+ }, [O("div", Oe, [O("span", { class: M([{
106
+ "bg-brand-500": t === 0,
107
+ "bg-error-solid": t === 2,
108
+ "bg-warning-solid": t === 1
109
+ }, "size-2 shrink-0 rounded-full"]) }, null, 2), O("p", ke, L(i(t + 1)), 1)]), O("p", Ae, L(e ?? "—"), 1)]))), 128))])])], 8, xe));
110
+ }
111
+ }), Me = {
112
+ uuid: "00000000-0000-4000-8000-000000000000",
113
+ sentAt: null,
114
+ hasErrors: !1
115
+ };
116
+ function Ne(e, t) {
117
+ if (e === null || t === null) return e === t;
118
+ let n = e.sentAt === null || t.sentAt === null ? e.sentAt === t.sentAt : e.sentAt.equals(t.sentAt);
119
+ return e.uuid === t.uuid && n && e.hasErrors === t.hasErrors;
120
+ }
121
+ function Pe(e) {
122
+ let t = w(() => !0), { isFetchingNextPage: n, isLoading: r, fetchNextPage: i, refetch: a, result: o } = $({ params: {
123
+ customerUuid: e.customerUuid,
124
+ isOpen: t,
125
+ level: w(() => e.activeLevel.value ?? void 0)
126
+ } });
127
+ function s() {
128
+ return o.value.isOk() ? o.value.getValue().data : [];
129
+ }
130
+ let c = F(/* @__PURE__ */ new Map()), l = w(() => s().map((e) => {
131
+ let t = c.value.get(e.uuid);
132
+ return t !== void 0 && Ne(e.latestCreatedReminder, t) ? {
133
+ ...e,
134
+ latestCreatedReminder: Me
135
+ } : e;
136
+ })), u = w(() => o.value.isErr() ? o.value.getError() : null);
137
+ ee({
138
+ refetch: a,
139
+ sendingUuids: () => l.value.filter((e) => m(e.latestCreatedReminder) === "sending").map((e) => e.uuid),
140
+ onLimitReached: () => {
141
+ c.value = /* @__PURE__ */ new Map();
142
+ }
143
+ });
144
+ let d = $({ params: {
145
+ customerUuid: e.customerUuid,
146
+ isOpen: t,
147
+ level: w(() => 1)
148
+ } }), f = $({ params: {
149
+ customerUuid: e.customerUuid,
150
+ isOpen: t,
151
+ level: w(() => 2)
152
+ } }), p = $({ params: {
153
+ customerUuid: e.customerUuid,
154
+ isOpen: t,
155
+ level: w(() => 3)
156
+ } }), h = w(() => [
157
+ d,
158
+ f,
159
+ p
160
+ ].map((e) => e.result.value.isOk() ? e.result.value.getValue().meta.total : null)), g = w(() => [
161
+ d,
162
+ f,
163
+ p
164
+ ].some((e) => e.result.value.isErr())), _ = w(() => h.value.every((e) => e !== null) ? h.value.reduce((e, t) => e + t, 0) : null);
165
+ function v() {
166
+ let e = s();
167
+ return (t) => {
168
+ let n = new Map(c.value);
169
+ for (let r of e) t.includes(r.uuid) || n.set(r.uuid, r.latestCreatedReminder);
170
+ c.value = n;
171
+ };
172
+ }
173
+ return {
174
+ hasLevelCountError: g,
175
+ isFetchingNextPage: n,
176
+ isLoading: r,
177
+ data: l,
178
+ error: u,
179
+ fetchNextPage: i,
180
+ levelCounts: h,
181
+ levelCountTotal: _,
182
+ trackBulkSend: v
183
+ };
184
+ }
185
+ //#endregion
186
+ //#region src/modules/dunning-case/api/queries/dunningCaseCustomerIndex.query.ts
187
+ function Fe(e) {
188
+ let t = w(() => ({ search: e.params.search?.value }));
189
+ return V("dunningCaseCustomerIndex", {
190
+ params: { queryParams: t },
191
+ queryFn: (e) => _.getAll(t.value.search, e)
192
+ });
193
+ }
194
+ //#endregion
195
+ //#region src/modules/dunning-case/use-cases/overview/composables/dunningCaseOverviewFilters.composable.ts
196
+ function Ie() {
197
+ let e = S(), t = i({ debounceMs: 250 }), n = Fe({ params: { search: t.debouncedSearch } }), r = w(() => n.result.value.isOk() ? n.result.value.getValue().data : []), a = b({
198
+ actionGroup: { name: "dunning-cases" },
199
+ filters: [y({
200
+ defaultValue: {
201
+ operator: x.INCLUDES,
202
+ value: []
203
+ },
204
+ disableOperators: !0,
205
+ displayFn: (e) => r.value.find((t) => t.uuid === e)?.name ?? e,
206
+ key: "customerUuids",
207
+ label: e.t("module.dunning_case.overview.filter_customer"),
208
+ options: async (e) => a.values.value.customerUuids.value.length > 0 ? [] : (t.updateSearch(e), await j(), r.value.map((e) => e.uuid))
209
+ })]
210
+ });
211
+ return z(() => a.values.value.customerUuids, (e) => {
212
+ (e.operator !== x.INCLUDES || e.value.length > 1) && (a.values.value.customerUuids = {
213
+ operator: x.INCLUDES,
214
+ value: e.value.slice(-1)
215
+ });
216
+ }, {
217
+ deep: !0,
218
+ immediate: !0
219
+ }), {
220
+ customerUuid: w(() => a.values.value.customerUuids.value[0]),
221
+ filters: a
222
+ };
223
+ }
224
+ //#endregion
225
+ //#region src/modules/dunning-case/use-cases/overview/components/DunningCaseOverviewActionsCell.vue?vue&type=script&setup=true&lang.ts
226
+ var Le = { class: "flex w-full items-center justify-end gap-xs" }, Re = /* @__PURE__ */ A({
227
+ __name: "DunningCaseOverviewActionsCell",
228
+ props: { item: {} },
229
+ emits: [
230
+ "retry",
231
+ "send",
232
+ "viewCustomer"
233
+ ],
234
+ setup(e, { emit: t }) {
235
+ let n = e, i = t, a = S(), o = r(), s = w(() => o.getCustomerDetailRoute(n.item.customer.uuid)), c = w(() => n.item.blockedReason !== null), u = w(() => m(n.item.latestCreatedReminder)), f = w(() => n.item.canRetryReminder ? a.t("module.dunning_case.overview.retry") : c.value ? a.t("module.dunning_case.overview.blocked") : n.item.nextReminderOn === null ? a.t("module.dunning_case.overview.not_scheduled") : a.t("module.dunning_case.overview.send"));
236
+ return (t, n) => (P(), T(R(Z), null, {
237
+ default: B(() => [k(R(ue), { class: "w-full" }, {
238
+ default: B(() => [O("div", Le, [c.value && s.value !== null ? (P(), T(R(G), {
239
+ key: 0,
240
+ "icon-right": R(l),
241
+ label: R(a).t("module.dunning_case.overview.fix"),
242
+ size: "sm",
243
+ variant: "secondary",
244
+ onClick: n[0] ||= (e) => i("viewCustomer")
245
+ }, null, 8, ["icon-right", "label"])) : (P(), T(R(G), {
246
+ key: 1,
247
+ "icon-right": e.item.canSendReminder || e.item.canRetryReminder ? R(d) : void 0,
248
+ "is-disabled": c.value || !e.item.canSendReminder && !e.item.canRetryReminder,
249
+ "is-loading": u.value === "sending",
250
+ label: f.value,
251
+ size: "sm",
252
+ variant: "secondary",
253
+ onClick: n[1] ||= (t) => e.item.canRetryReminder ? i("retry") : i("send")
254
+ }, null, 8, [
255
+ "icon-right",
256
+ "is-disabled",
257
+ "is-loading",
258
+ "label"
259
+ ]))])]),
260
+ _: 1
261
+ })]),
262
+ _: 1
263
+ }));
264
+ }
265
+ }), ze = { class: "truncate text-sm font-medium text-primary" }, Be = /* @__PURE__ */ A({
266
+ __name: "DunningCaseOverviewCustomerCell",
267
+ props: { item: {} },
268
+ setup(e) {
269
+ return (t, n) => (P(), T(R(Z), null, {
270
+ default: B(() => [O("span", ze, L(e.item.customer.name), 1)]),
271
+ _: 1
272
+ }));
273
+ }
274
+ }), Ve = /* @__PURE__ */ A({
275
+ __name: "DunningCaseOverviewDaysOverdueCell",
276
+ props: { item: {} },
277
+ setup(e) {
278
+ return (t, n) => (P(), T(R(Z), null, {
279
+ default: B(() => [O("span", { class: M([{
280
+ "text-error-primary": e.item.level === 3,
281
+ "text-primary": e.item.level !== 3
282
+ }, "w-full text-right font-mono text-sm tabular-nums"]) }, L(e.item.daysOverdue), 3)]),
283
+ _: 1
284
+ }));
285
+ }
286
+ }), He = {
287
+ key: 0,
288
+ class: "font-mono text-xs text-secondary tabular-nums"
289
+ }, Ue = /* @__PURE__ */ A({
290
+ __name: "DunningCaseOverviewLastReminderCell",
291
+ props: { item: {} },
292
+ setup(e) {
293
+ let t = e, n = S(), r = w(() => {
294
+ if (t.item.level === null) return null;
295
+ if (t.item.lastReminderSentAt === null) return n.t("module.dunning_case.overview.last_reminder_not_sent");
296
+ let e = U.Now.instant().epochMilliseconds - t.item.lastReminderSentAt.epochMilliseconds, r = Math.floor(e / 36e5);
297
+ return r < 1 ? n.t("module.dunning_case.overview.last_reminder_sent_just_now", { level: t.item.level }) : r < 24 ? n.t("module.dunning_case.overview.last_reminder_sent_hours", {
298
+ hours: r,
299
+ level: t.item.level
300
+ }) : n.t("module.dunning_case.overview.last_reminder_sent", {
301
+ days: Math.floor(r / 24),
302
+ level: t.item.level
303
+ });
304
+ });
305
+ return (e, t) => (P(), T(R(Z), null, {
306
+ default: B(() => [r.value === null ? E("", !0) : (P(), D("span", He, L(r.value), 1))]),
307
+ _: 1
308
+ }));
309
+ }
310
+ }), We = {
311
+ key: 0,
312
+ class: "flex min-w-0 items-center gap-sm"
313
+ }, Ge = { class: "truncate text-xs text-primary" }, Ke = /* @__PURE__ */ A({
314
+ __name: "DunningCaseOverviewLevelCell",
315
+ props: { item: {} },
316
+ setup(e) {
317
+ let t = S();
318
+ function n(e) {
319
+ return e === 0 ? t.t("module.dunning_case.level.none") : t.t("module.dunning_case.level.reminder", { level: e });
320
+ }
321
+ return (t, r) => (P(), T(R(Z), null, {
322
+ default: B(() => [e.item.level === null ? E("", !0) : (P(), D("div", We, [k(a, {
323
+ level: e.item.level,
324
+ size: "sm"
325
+ }, null, 8, ["level"]), O("span", Ge, L(n(e.item.level)), 1)]))]),
326
+ _: 1
327
+ }));
328
+ }
329
+ }), qe = { class: "w-full text-right font-mono text-sm font-medium text-primary tabular-nums" }, Je = /* @__PURE__ */ A({
330
+ __name: "DunningCaseOverviewOutstandingCell",
331
+ props: { item: {} },
332
+ setup(e) {
333
+ let t = n();
334
+ return (n, r) => (P(), T(R(Z), null, {
335
+ default: B(() => [O("span", qe, L(R(t).formatMonetary(e.item.outstandingBalance)), 1)]),
336
+ _: 1
337
+ }));
338
+ }
339
+ }), Ye = { class: "flex flex-col items-start gap-xxs" }, Xe = /* @__PURE__ */ A({
340
+ __name: "DunningCaseOverviewReminderCell",
341
+ props: { item: {} },
342
+ setup(e) {
343
+ let t = e, n = S(), r = w(() => m(t.item.latestCreatedReminder));
344
+ function i(e) {
345
+ let t = U.Now.plainDateISO().until(e, { largestUnit: "days" }).days;
346
+ return t <= 0 ? n.t("module.dunning_case.overview.due_today") : n.t("module.dunning_case.overview.due_in_days", { count: t });
347
+ }
348
+ function a(e) {
349
+ return U.PlainDate.compare(e, U.Now.plainDateISO()) <= 0;
350
+ }
351
+ return (t, n) => (P(), T(R(Z), null, {
352
+ default: B(() => [O("div", Ye, [e.item.nextReminderOn === null ? E("", !0) : (P(), T(R(W), {
353
+ key: 0,
354
+ color: a(e.item.nextReminderOn) ? "success" : "warning",
355
+ label: i(e.item.nextReminderOn),
356
+ size: "sm",
357
+ variant: "translucent"
358
+ }, null, 8, ["color", "label"])), k(h, {
359
+ "blocked-reason": e.item.blockedReason,
360
+ status: r.value
361
+ }, null, 8, ["blocked-reason", "status"])])]),
362
+ _: 1
363
+ }));
364
+ }
365
+ });
366
+ //#endregion
367
+ //#region src/modules/dunning-case/use-cases/overview/composables/dunningCaseOverviewTableColumns.composable.ts
368
+ function Ze(e) {
369
+ let t = S();
370
+ return w(() => me()([
371
+ {
372
+ headerLabel: t.t("module.dunning_case.overview.table.customer"),
373
+ key: "customer",
374
+ size: {
375
+ max: "1fr",
376
+ min: "12rem"
377
+ },
378
+ component: (e) => Q(Be, { item: e })
379
+ },
380
+ {
381
+ headerLabel: t.t("module.dunning_case.overview.table.level"),
382
+ key: "level",
383
+ size: {
384
+ max: "10rem",
385
+ min: "8rem"
386
+ },
387
+ component: (e) => Q(Ke, { item: e })
388
+ },
389
+ {
390
+ headerLabel: t.t("module.dunning_case.overview.table.days_overdue"),
391
+ key: "daysOverdue",
392
+ size: {
393
+ max: "9rem",
394
+ min: "7rem"
395
+ },
396
+ component: (e) => Q(Ve, { item: e })
397
+ },
398
+ {
399
+ headerLabel: t.t("module.dunning_case.overview.table.next_reminder"),
400
+ key: "nextReminder",
401
+ size: {
402
+ max: "14rem",
403
+ min: "10rem"
404
+ },
405
+ component: (e) => Q(Xe, { item: e })
406
+ },
407
+ {
408
+ headerLabel: t.t("module.dunning_case.overview.table.last_reminder"),
409
+ key: "lastReminder",
410
+ size: {
411
+ max: "12rem",
412
+ min: "9rem"
413
+ },
414
+ component: (e) => Q(Ue, { item: e })
415
+ },
416
+ {
417
+ headerLabel: t.t("module.dunning_case.overview.table.outstanding"),
418
+ key: "outstanding",
419
+ size: {
420
+ max: "10rem",
421
+ min: "8rem"
422
+ },
423
+ component: (e) => Q(Je, { item: e })
424
+ },
425
+ {
426
+ headerLabel: "",
427
+ key: "actions",
428
+ size: {
429
+ max: "11rem",
430
+ min: "9rem"
431
+ },
432
+ component: (t) => Q(Re, {
433
+ item: t,
434
+ onRetry: () => e.onRetry(t),
435
+ onSend: () => e.onSend(t),
436
+ onViewCustomer: () => e.onViewCustomer(t)
437
+ })
438
+ }
439
+ ]));
440
+ }
441
+ //#endregion
442
+ //#region src/modules/dunning-case/api/mutations/dunningCaseBulkSend.mutation.ts
443
+ function Qe() {
444
+ return oe({
445
+ queryFn: (e) => o.sendBulk(e.params.queryParams),
446
+ queryKeysToInvalidate: {
447
+ dunningCaseDetail: {},
448
+ dunningCaseIndex: {}
449
+ }
450
+ });
451
+ }
452
+ //#endregion
453
+ //#region src/modules/dunning-case/use-cases/send/components/DunningCaseBulkSendStat.vue
454
+ var $e = /* @__PURE__ */ A({
455
+ __name: "DunningCaseBulkSendStat",
456
+ props: {
457
+ hasSeparator: { type: Boolean },
458
+ label: {},
459
+ tone: {},
460
+ value: {}
461
+ },
462
+ setup(e) {
463
+ let t = e;
464
+ return (e, n) => (P(), D("div", { class: M([{ "border-r border-secondary": t.hasSeparator }, "p-lg"]) }, [O("p", { class: M([{
465
+ "text-primary": t.tone === "default",
466
+ "text-success-primary": t.tone === "success",
467
+ "text-warning-primary": t.tone === "warning"
468
+ }, "font-mono text-2xl font-semibold tabular-nums"]) }, L(t.value), 3), O("p", { class: M([{
469
+ "text-secondary": t.tone === "default",
470
+ "text-success-primary": t.tone === "success",
471
+ "text-warning-primary": t.tone === "warning"
472
+ }, "mt-xs text-xs font-medium uppercase"]) }, L(t.label), 3)], 2));
473
+ }
474
+ }), et = { class: "flex flex-col gap-md" }, tt = { class: "grid grid-cols-3 overflow-hidden rounded-md border border-secondary" }, nt = { class: "rounded-md bg-success-primary px-lg py-md text-sm font-medium text-success-primary" }, rt = {
475
+ key: 0,
476
+ class: "rounded-md border border-secondary px-lg py-md text-sm text-secondary"
477
+ }, it = /* @__PURE__ */ A({
478
+ __name: "DunningCaseBulkSendSummary",
479
+ props: {
480
+ processableCount: {},
481
+ skippedCount: {},
482
+ totalCount: {}
483
+ },
484
+ setup(e) {
485
+ let t = e, n = S(), r = w(() => [
486
+ {
487
+ label: n.t("module.dunning_case.bulk_send.total"),
488
+ tone: "default",
489
+ value: t.totalCount
490
+ },
491
+ {
492
+ label: n.t("module.dunning_case.bulk_send.ready"),
493
+ tone: "success",
494
+ value: t.processableCount
495
+ },
496
+ {
497
+ label: n.t("module.dunning_case.bulk_send.skipped_label"),
498
+ tone: "warning",
499
+ value: t.skippedCount
500
+ }
501
+ ]);
502
+ return (e, i) => (P(), D("div", et, [
503
+ O("div", tt, [(P(!0), D(C, null, I(r.value, (e, t) => (P(), T($e, {
504
+ key: e.label,
505
+ "has-separator": t < r.value.length - 1,
506
+ label: e.label,
507
+ tone: e.tone,
508
+ value: e.value
509
+ }, null, 8, [
510
+ "has-separator",
511
+ "label",
512
+ "tone",
513
+ "value"
514
+ ]))), 128))]),
515
+ O("p", nt, L(R(n).t("module.dunning_case.bulk_send.processable", { count: t.processableCount })), 1),
516
+ t.skippedCount > 0 ? (P(), D("p", rt, L(R(n).t("module.dunning_case.bulk_send.skipped", { count: t.skippedCount })), 1)) : E("", !0)
517
+ ]));
518
+ }
519
+ }), at = {
520
+ key: 0,
521
+ class: "text-sm text-secondary"
522
+ }, ot = /* @__PURE__ */ A({
523
+ __name: "DunningCaseBulkSendDialog",
524
+ props: { onSent: { type: Function } },
525
+ emits: ["close"],
526
+ setup(e, { emit: t }) {
527
+ let n = e, r = t, i = {}, a = {
528
+ customer_has_no_default_recipient: "module.dunning_case.bulk_send.skip_reason.customer_has_no_default_recipient",
529
+ dunning_case_not_found: "module.dunning_case.bulk_send.skip_reason.dunning_case_not_found",
530
+ dunning_case_reminder_config_not_found: "module.dunning_case.bulk_send.skip_reason.dunning_case_reminder_config_not_found",
531
+ dunning_case_reminder_not_due: "module.dunning_case.bulk_send.skip_reason.dunning_case_reminder_not_due",
532
+ dunning_case_reminder_pending: "module.dunning_case.bulk_send.skip_reason.dunning_case_reminder_pending"
533
+ };
534
+ function s(e) {
535
+ return Object.hasOwn(a, e);
536
+ }
537
+ let c = S(), l = ge(), u = Qe(), f = F(null), p = F(!0), m = w(() => f.value?.meta.processed ?? 0);
538
+ function h(e) {
539
+ let t = e.errors.at(0)?.errors.at(0)?.code;
540
+ return t !== void 0 && s(t) ? c.t(a[t]) : c.t("module.dunning_case.bulk_send.skip_reason.unknown");
541
+ }
542
+ function g(e) {
543
+ let t = /* @__PURE__ */ new Map();
544
+ for (let n of e) {
545
+ let e = h(n);
546
+ t.set(e, (t.get(e) ?? 0) + 1);
547
+ }
548
+ return Array.from(t, ([e, t]) => c.t("module.dunning_case.bulk_send.skip_reason_count", {
549
+ count: t,
550
+ reason: e
551
+ })).join(", ");
552
+ }
553
+ let _ = ve({
554
+ schema: ie.object({}),
555
+ onSubmit: async () => {
556
+ let e = await u.execute({ params: { queryParams: i } });
557
+ if (e.isErr()) {
558
+ l.apiError(e.error);
559
+ return;
560
+ }
561
+ let t = g(e.value.skipped);
562
+ l.show({
563
+ duration: Infinity,
564
+ message: t === "" ? c.t("module.dunning_case.bulk_send.success", {
565
+ count: e.value.meta.processed,
566
+ processed: e.value.meta.processed,
567
+ skipped: e.value.meta.skipped
568
+ }) : c.t("module.dunning_case.bulk_send.success_with_reasons", {
569
+ count: e.value.meta.processed,
570
+ processed: e.value.meta.processed,
571
+ skipped: e.value.meta.skipped,
572
+ summary: t
573
+ })
574
+ }), n.onSent(e.value.skipped.map((e) => e.uuid)), r("close");
575
+ }
576
+ });
577
+ async function v() {
578
+ let e = await o.previewBulk(i);
579
+ if (e.isErr()) {
580
+ l.apiError(e.error), r("close");
581
+ return;
582
+ }
583
+ f.value = e.value, p.value = !1;
584
+ }
585
+ return N(() => {
586
+ v();
587
+ }), (e, t) => (P(), T(R(ce), {
588
+ form: R(_),
589
+ size: "md",
590
+ onClose: t[0] ||= (e) => r("close")
591
+ }, {
592
+ default: B(() => [
593
+ k(R(X), {
594
+ title: p.value ? R(c).t("module.dunning_case.bulk_send.title") : R(c).t("module.dunning_case.bulk_send.confirm_question", { count: m.value }),
595
+ description: R(c).t("module.dunning_case.bulk_send.description"),
596
+ "has-separator": !1,
597
+ icon: R(d)
598
+ }, null, 8, [
599
+ "title",
600
+ "description",
601
+ "icon"
602
+ ]),
603
+ k(R(K), null, {
604
+ default: B(() => [f.value === null ? (P(), D("p", at, L(R(c).t("module.dunning_case.bulk_send.loading")), 1)) : (P(), T(it, {
605
+ key: 1,
606
+ "processable-count": f.value.meta.processed,
607
+ "skipped-count": f.value.meta.skipped,
608
+ "total-count": f.value.meta.total
609
+ }, null, 8, [
610
+ "processable-count",
611
+ "skipped-count",
612
+ "total-count"
613
+ ]))]),
614
+ _: 1
615
+ }),
616
+ k(R(q), { "has-separator": !1 }, {
617
+ right: B(() => [k(R(J)), k(R(Y), {
618
+ "icon-right": R(d),
619
+ "is-disabled": p.value || m.value === 0,
620
+ "is-loading": R(_).isSubmitting.value,
621
+ label: R(c).t("module.dunning_case.bulk_send.confirm", { count: m.value }),
622
+ onClick: R(_).submit
623
+ }, null, 8, [
624
+ "icon-right",
625
+ "is-disabled",
626
+ "is-loading",
627
+ "label",
628
+ "onClick"
629
+ ])]),
630
+ _: 1
631
+ })
632
+ ]),
633
+ _: 1
634
+ }, 8, ["form"]));
635
+ }
636
+ }), st = { class: "flex min-h-0 flex-1 flex-col gap-xl px-3xl py-xl" }, ct = { class: "flex shrink-0 flex-col gap-lg md:flex-row md:items-center md:justify-between" }, lt = { class: "text-lg font-semibold text-primary" }, ut = { class: "mt-xs text-sm text-secondary" }, dt = { class: "flex items-center gap-sm" }, ft = {
637
+ key: 0,
638
+ class: "shrink-0"
639
+ }, pt = { class: "flex min-h-0 flex-1 flex-col overflow-hidden rounded-lg border border-secondary bg-primary shadow-sm" }, mt = { class: "flex flex-col gap-md border-b border-secondary p-sm md:flex-row md:items-center md:justify-between" }, ht = { class: "flex items-center justify-between gap-md border-b border-secondary p-sm" }, gt = {
640
+ key: 0,
641
+ class: "px-sm text-xs text-secondary"
642
+ }, _t = { class: "relative flex min-h-0 flex-1 flex-col" }, vt = /*@__PURE__*/ A({
643
+ __name: "DunningCaseOverviewView",
644
+ setup(e) {
645
+ let n = S(), i = he(), a = ge(), o = H(), l = t(), f = r(), m = g(), h = F("all"), _ = w(() => [
646
+ {
647
+ icon: s,
648
+ key: "all",
649
+ label: n.t("module.dunning_case.overview.filter_all")
650
+ },
651
+ {
652
+ icon: u,
653
+ key: "level-1",
654
+ label: n.t("module.dunning_case.level.reminder", { level: 1 })
655
+ },
656
+ {
657
+ icon: u,
658
+ key: "level-2",
659
+ label: n.t("module.dunning_case.level.reminder", { level: 2 })
660
+ },
661
+ {
662
+ icon: u,
663
+ key: "level-3",
664
+ label: n.t("module.dunning_case.level.reminder", { level: 3 })
665
+ }
666
+ ]), ee = w(() => h.value === "all" ? null : Number(h.value.replace("level-", ""))), y = F(!0), { customerUuid: b, filters: x } = Ie();
667
+ te(x), l.set(() => n.t("module.dunning_case.title"));
668
+ let { hasLevelCountError: ie, isFetchingNextPage: A, isLoading: j, data: M, error: ae, fetchNextPage: N, levelCounts: z, levelCountTotal: oe, trackBulkSend: V } = Pe({
669
+ customerUuid: b,
670
+ activeLevel: ee
671
+ }), U = w(() => x.activeFilters.value.length);
672
+ function W(e) {
673
+ i.create(v, { props: { dunningCaseUuid: e.uuid } }).open();
674
+ }
675
+ async function K(e) {
676
+ if (e.latestCreatedReminder === null) return;
677
+ let t = await m.execute({ params: { dunningCaseReminderUuid: e.latestCreatedReminder.uuid } });
678
+ if (t.isErr()) {
679
+ a.apiError(t.error);
680
+ return;
681
+ }
682
+ a.show({
683
+ duration: Infinity,
684
+ message: n.t("module.dunning_case.retry.success", { customer: e.customer.name })
685
+ });
686
+ }
687
+ function q() {
688
+ i.create(ot, { props: { onSent: V() } }).open();
689
+ }
690
+ function J(e) {
691
+ let t = f.getCustomerDetailRoute(e.customer.uuid);
692
+ t !== null && o.push(t);
693
+ }
694
+ function Y(e) {
695
+ return {
696
+ name: "dunning-case-detail",
697
+ params: { dunningCaseUuid: e.uuid }
698
+ };
699
+ }
700
+ let X = be(), ce = ye(), Z = Ze({
701
+ onRetry: (e) => {
702
+ K(e);
703
+ },
704
+ onSend: W,
705
+ onViewCustomer: J
706
+ });
707
+ return (e, t) => (P(), T(R(se), {
708
+ title: R(n).t("module.dunning_case.title"),
709
+ "is-title-hidden": !0
710
+ }, {
711
+ default: B(() => [O("div", st, [
712
+ O("div", ct, [O("div", null, [O("h2", lt, L(R(n).t("module.dunning_case.title")), 1), O("p", ut, L(R(n).t("module.dunning_case.overview.description")), 1)]), O("div", dt, [k(R(G), {
713
+ "icon-left": y.value ? R(p) : R(c),
714
+ label: R(n).t(y.value ? "module.dunning_case.overview.hide_metrics" : "module.dunning_case.overview.show_metrics"),
715
+ variant: "secondary",
716
+ onClick: t[0] ||= (e) => y.value = !y.value
717
+ }, null, 8, ["icon-left", "label"]), k(R(G), {
718
+ "icon-right": R(d),
719
+ label: R(n).t("module.dunning_case.overview.send_all"),
720
+ onClick: q
721
+ }, null, 8, ["icon-right", "label"])])]),
722
+ y.value ? (P(), D("div", ft, [k(je, {
723
+ "has-level-count-error": R(ie),
724
+ "level-counts": R(z),
725
+ "level-count-total": R(oe)
726
+ }, null, 8, [
727
+ "has-level-count-error",
728
+ "level-counts",
729
+ "level-count-total"
730
+ ])])) : E("", !0),
731
+ O("div", pt, [
732
+ O("div", mt, [k(R(de), {
733
+ modelValue: h.value,
734
+ "onUpdate:modelValue": t[1] ||= (e) => h.value = e,
735
+ "aria-label": R(n).t("module.dunning_case.overview.filter_label"),
736
+ variant: "button-border"
737
+ }, {
738
+ default: B(() => [k(R(pe), null, {
739
+ default: B(() => [(P(!0), D(C, null, I(_.value, (e) => (P(), T(R(fe), {
740
+ key: e.key,
741
+ config: { left: {
742
+ icon: e.icon,
743
+ type: "icon"
744
+ } },
745
+ label: e.label,
746
+ value: e.key
747
+ }, null, 8, [
748
+ "config",
749
+ "label",
750
+ "value"
751
+ ]))), 128))]),
752
+ _: 1
753
+ })]),
754
+ _: 1
755
+ }, 8, ["modelValue", "aria-label"]), k(R(G), {
756
+ "icon-right": R(d),
757
+ label: R(n).t("module.dunning_case.overview.send_all"),
758
+ size: "sm",
759
+ onClick: q
760
+ }, null, 8, ["icon-right", "label"])]),
761
+ O("div", ht, [U.value === 0 ? (P(), D("p", gt, L(R(n).t("module.dunning_case.overview.no_active_filters")), 1)) : (P(), T(R(ne), { key: 1 })), k(R(re))]),
762
+ O("div", _t, [k(R(le), {
763
+ "active-filter-count": U.value,
764
+ columns: R(Z),
765
+ data: R(M),
766
+ error: R(ae),
767
+ "get-key": (e) => e.uuid,
768
+ actions: [R(X), R(ce)],
769
+ "get-action-model": (e) => ({
770
+ key: e.uuid,
771
+ modelName: "DunningCase",
772
+ ...e
773
+ }),
774
+ "get-link": Y,
775
+ "is-fetching-next-page": R(A),
776
+ "is-loading": R(j),
777
+ variant: "full-page",
778
+ onClearFilters: t[2] ||= (e) => R(x).clearAll(),
779
+ onNextPage: R(N)
780
+ }, null, 8, [
781
+ "active-filter-count",
782
+ "columns",
783
+ "data",
784
+ "error",
785
+ "get-key",
786
+ "actions",
787
+ "get-action-model",
788
+ "is-fetching-next-page",
789
+ "is-loading",
790
+ "onNextPage"
791
+ ])])
792
+ ])
793
+ ])]),
794
+ _: 1
795
+ }, 8, ["title"]));
796
+ }
797
+ }), yt = /* @__PURE__ */ e({ default: () => bt }), bt = vt;
798
+ //#endregion
799
+ export { yt as n, $ as r, bt as t };