@ozdao/martyrs 0.2.604 → 0.2.605

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 (833) hide show
  1. package/README.md +2 -2
  2. package/dist/_virtual/dayjs.min.js +1 -1
  3. package/dist/_virtual/weekOfYear.js +1 -1
  4. package/dist/{abac-Blt8bUTL.js → abac-kz5xI99l.js} +1 -0
  5. package/dist/auth.server.js +52 -12
  6. package/dist/builder.js +67 -2
  7. package/dist/chats.server.js +2 -2
  8. package/dist/community.server.js +3 -3
  9. package/dist/core.server.js +2 -2
  10. package/dist/{core.websocket-Cl76z2wT.js → core.websocket-B2FA8gGl.js} +0 -2
  11. package/dist/{crud-BT5FIvQC.js → crud-Cwn0frBP.js} +8 -2
  12. package/dist/events.server.js +4 -4
  13. package/dist/files.server.js +1 -1
  14. package/dist/gallery.server.js +2 -2
  15. package/dist/governance.server.js +10 -10
  16. package/dist/{index-kvBwwb0w.js → index-CPACC651.js} +1 -1
  17. package/dist/inventory.server.js +4 -4
  18. package/dist/{mailing-DT7nbNjZ.js → mailing-BBCidXGr.js} +38 -2
  19. package/dist/marketplace.server.js +2 -2
  20. package/dist/martyrs/dist/martyrs.es3.js +1 -1
  21. package/dist/martyrs/dist/martyrs.es3.js.map +1 -1
  22. package/dist/{node_modules/.pnpm/dayjs@1.11.13 → martyrs/node_modules/.pnpm/dayjs@1.11.19}/node_modules/dayjs/dayjs.min.js +1 -1
  23. package/dist/{node_modules/.pnpm/dayjs@1.11.13 → martyrs/node_modules/.pnpm/dayjs@1.11.19}/node_modules/dayjs/dayjs.min.js.map +1 -1
  24. package/dist/{node_modules/.pnpm/dayjs@1.11.13 → martyrs/node_modules/.pnpm/dayjs@1.11.19}/node_modules/dayjs/plugin/weekOfYear.js +1 -1
  25. package/dist/{node_modules/.pnpm/dayjs@1.11.13 → martyrs/node_modules/.pnpm/dayjs@1.11.19}/node_modules/dayjs/plugin/weekOfYear.js.map +1 -1
  26. package/dist/{node_modules/.pnpm/vue-draggable-next@2.2.1_sortablejs@1.15.6_vue@3.5.13_typescript@5.8.3_ → martyrs/node_modules/.pnpm/vue-draggable-next@2.3.0_sortablejs@1.15.7_vue@3.5.13}/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js +305 -268
  27. package/dist/martyrs/node_modules/.pnpm/vue-draggable-next@2.3.0_sortablejs@1.15.7_vue@3.5.13/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js.map +1 -0
  28. package/dist/martyrs/src/components/Address/Address.vue2.js +13 -13
  29. package/dist/martyrs/src/components/Address/Address.vue2.js.map +1 -1
  30. package/dist/martyrs/src/components/Block/Block.vue.js +1 -1
  31. package/dist/martyrs/src/components/Button/Button.vue2.js +1 -1
  32. package/dist/martyrs/src/components/Button/Button.vue2.js.map +1 -1
  33. package/dist/martyrs/src/components/Calendar/Calendar.vue2.js +150 -143
  34. package/dist/martyrs/src/components/Calendar/Calendar.vue2.js.map +1 -1
  35. package/dist/martyrs/src/components/Chart/Chart.vue.js +296 -0
  36. package/dist/martyrs/src/components/Chart/Chart.vue.js.map +1 -0
  37. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js +1 -1
  38. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js.map +1 -1
  39. package/dist/martyrs/src/components/Chips/Chips.vue.js +5 -6
  40. package/dist/martyrs/src/components/Chips/Chips.vue.js.map +1 -1
  41. package/dist/martyrs/src/components/Countdown/Countdown.vue.js +5 -5
  42. package/dist/martyrs/src/components/Countdown/Countdown.vue.js.map +1 -1
  43. package/dist/martyrs/src/components/DatePicker/DatePicker.vue.js +2 -2
  44. package/dist/martyrs/src/components/DatePicker/DatePicker.vue.js.map +1 -1
  45. package/dist/martyrs/src/components/EditImages/{EditImages.vue2.js → EditImages.vue.js} +6 -6
  46. package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -0
  47. package/dist/martyrs/src/components/EmptyState/EmptyState.vue.js +1 -1
  48. package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
  49. package/dist/martyrs/src/components/Field/Field.vue.js +4 -4
  50. package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -1
  51. package/dist/martyrs/src/components/FieldDate/FieldDate.vue.js +3 -3
  52. package/dist/martyrs/src/components/FieldDate/FieldDate.vue.js.map +1 -1
  53. package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.js +27 -21
  54. package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.js.map +1 -1
  55. package/dist/martyrs/src/components/Map/Map.vue.js +20 -16
  56. package/dist/martyrs/src/components/Map/Map.vue.js.map +1 -1
  57. package/dist/martyrs/src/components/Popup/Popup.vue.js +3 -4
  58. package/dist/martyrs/src/components/Popup/Popup.vue.js.map +1 -1
  59. package/dist/martyrs/src/components/Radio/Radio.vue.js +12 -10
  60. package/dist/martyrs/src/components/Radio/Radio.vue.js.map +1 -1
  61. package/dist/martyrs/src/components/Select/Select.vue.js +2 -2
  62. package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -1
  63. package/dist/martyrs/src/components/Status/Snack.vue.js +1 -1
  64. package/dist/martyrs/src/components/Status/Snack.vue.js.map +1 -1
  65. package/dist/martyrs/src/components/Status/Status.vue.js +1 -1
  66. package/dist/martyrs/src/components/Status/Status.vue.js.map +1 -1
  67. package/dist/martyrs/src/components/Table/Table.vue.js +21 -4
  68. package/dist/martyrs/src/components/Table/Table.vue.js.map +1 -1
  69. package/dist/martyrs/src/components/Tooltip/{Tooltip.vue2.js → Tooltip.vue.js} +2 -2
  70. package/dist/martyrs/src/components/Tooltip/Tooltip.vue.js.map +1 -0
  71. package/dist/martyrs/src/components/Tree/Tree.vue.js +1 -1
  72. package/dist/martyrs/src/components/Upload/Upload.vue2.js +2 -2
  73. package/dist/martyrs/src/components/Upload/Upload.vue2.js.map +1 -1
  74. package/dist/martyrs/src/components/UploadImage/UploadImage.vue.js +2 -2
  75. package/dist/martyrs/src/components/UploadImage/UploadImage.vue.js.map +1 -1
  76. package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
  77. package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js.map +1 -1
  78. package/dist/martyrs/src/modules/auth/auth.client.js +14 -2
  79. package/dist/martyrs/src/modules/auth/auth.client.js.map +1 -1
  80. package/dist/martyrs/src/modules/auth/views/components/blocks/OtpDialog.vue.js +4 -4
  81. package/dist/martyrs/src/modules/auth/views/components/blocks/OtpDialog.vue.js.map +1 -1
  82. package/dist/martyrs/src/modules/auth/views/components/blocks/PopupAuth.vue.js +1 -1
  83. package/dist/martyrs/src/modules/auth/views/components/blocks/PopupAuth.vue.js.map +1 -1
  84. package/dist/martyrs/src/modules/auth/views/components/blocks/SidebarUserCard.vue.js +96 -0
  85. package/dist/martyrs/src/modules/auth/views/components/blocks/SidebarUserCard.vue.js.map +1 -0
  86. package/dist/martyrs/src/modules/auth/views/components/pages/BackofficeUsers.vue.js +337 -0
  87. package/dist/martyrs/src/modules/auth/views/components/pages/BackofficeUsers.vue.js.map +1 -0
  88. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
  89. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js.map +1 -1
  90. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +1 -1
  91. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
  92. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +32 -18
  93. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js.map +1 -1
  94. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +76 -40
  95. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js.map +1 -1
  96. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.js +6 -5
  97. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.js.map +1 -1
  98. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +4 -4
  99. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js.map +1 -1
  100. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +3 -1
  101. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
  102. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +3 -3
  103. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js.map +1 -1
  104. package/dist/martyrs/src/modules/auth/views/components/pages/UserDashboard.vue.js +28 -16
  105. package/dist/martyrs/src/modules/auth/views/components/pages/UserDashboard.vue.js.map +1 -1
  106. package/dist/martyrs/src/modules/auth/views/components/sections/FeaturedUsers.vue.js +1 -1
  107. package/dist/martyrs/src/modules/auth/views/components/sections/FeaturedUsers.vue.js.map +1 -1
  108. package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.js +1 -1
  109. package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.js.map +1 -1
  110. package/dist/martyrs/src/modules/auth/views/middlewares/auth.validation.js +6 -2
  111. package/dist/martyrs/src/modules/auth/views/middlewares/auth.validation.js.map +1 -1
  112. package/dist/martyrs/src/modules/auth/views/router/users.backoffice.router.js +53 -0
  113. package/dist/martyrs/src/modules/auth/views/router/users.backoffice.router.js.map +1 -0
  114. package/dist/martyrs/src/modules/auth/views/store/auth.js +2 -2
  115. package/dist/martyrs/src/modules/auth/views/store/auth.js.map +1 -1
  116. package/dist/martyrs/src/modules/backoffice/components/pages/Dashboard.vue.js +179 -253
  117. package/dist/martyrs/src/modules/backoffice/components/pages/Dashboard.vue.js.map +1 -1
  118. package/dist/martyrs/src/modules/backoffice/configs/navigation.backoffice.config.js +105 -44
  119. package/dist/martyrs/src/modules/backoffice/configs/navigation.backoffice.config.js.map +1 -1
  120. package/dist/martyrs/src/modules/backoffice/router/backoffice.router.js +11 -5
  121. package/dist/martyrs/src/modules/backoffice/router/backoffice.router.js.map +1 -1
  122. package/dist/martyrs/src/modules/chats/components/blocks/ChatMessage.vue.js +1 -1
  123. package/dist/martyrs/src/modules/chats/components/blocks/ChatMessage.vue.js.map +1 -1
  124. package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.js.map +1 -1
  125. package/dist/martyrs/src/modules/community/community.client.js +4 -4
  126. package/dist/martyrs/src/modules/community/community.client.js.map +1 -1
  127. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  128. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js.map +1 -1
  129. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +4 -4
  130. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js.map +1 -1
  131. package/dist/martyrs/src/modules/community/components/sections/Comment.vue.js +2 -2
  132. package/dist/martyrs/src/modules/community/components/sections/Comment.vue.js.map +1 -1
  133. package/dist/martyrs/src/modules/constructor/components/elements/ImageUpload.vue.js +1 -1
  134. package/dist/martyrs/src/modules/constructor/components/elements/ImageUpload.vue.js.map +1 -1
  135. package/dist/martyrs/src/modules/core/core.client.js +18 -16
  136. package/dist/martyrs/src/modules/core/core.client.js.map +1 -1
  137. package/dist/martyrs/src/modules/core/views/classes/core.app.js +25 -6
  138. package/dist/martyrs/src/modules/core/views/classes/core.app.js.map +1 -1
  139. package/dist/martyrs/src/modules/core/views/classes/module.manager.js +4 -2
  140. package/dist/martyrs/src/modules/core/views/classes/module.manager.js.map +1 -1
  141. package/dist/martyrs/src/modules/core/views/components/blocks/AlertDialog.vue.js +1 -1
  142. package/dist/martyrs/src/modules/core/views/components/blocks/AlertDialog.vue.js.map +1 -1
  143. package/dist/martyrs/src/modules/core/views/components/blocks/BlockSearch.vue.js +1 -1
  144. package/dist/martyrs/src/modules/core/views/components/blocks/BlockSearch.vue.js.map +1 -1
  145. package/dist/martyrs/src/modules/core/views/components/blocks/BlockSlider.vue.js +132 -0
  146. package/dist/martyrs/src/modules/core/views/components/blocks/BlockSlider.vue.js.map +1 -0
  147. package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js +3 -3
  148. package/dist/martyrs/src/modules/core/views/components/blocks/CardHeader.vue.js.map +1 -1
  149. package/dist/martyrs/src/modules/core/views/components/blocks/CardStat.vue.js +6 -28
  150. package/dist/martyrs/src/modules/core/views/components/blocks/CardStat.vue.js.map +1 -1
  151. package/dist/martyrs/src/modules/{auth → core}/views/components/blocks/CardUser.vue.js +29 -11
  152. package/dist/martyrs/src/modules/{auth → core}/views/components/blocks/CardUser.vue.js.map +1 -1
  153. package/dist/martyrs/src/modules/core/views/components/blocks/HelpCard.vue.js +2 -2
  154. package/dist/martyrs/src/modules/core/views/components/blocks/HelpCard.vue.js.map +1 -1
  155. package/dist/martyrs/src/modules/core/views/components/blocks/PopupDateSelector.vue.js +41 -26
  156. package/dist/martyrs/src/modules/core/views/components/blocks/PopupDateSelector.vue.js.map +1 -1
  157. package/dist/martyrs/src/modules/core/views/components/elements/OnlineIndicator.vue.js +1 -1
  158. package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js +2 -1
  159. package/dist/martyrs/src/modules/core/views/components/layouts/Client.vue.js.map +1 -1
  160. package/dist/martyrs/src/modules/core/views/components/pages/404.vue.js +2 -2
  161. package/dist/martyrs/src/modules/core/views/components/pages/404.vue.js.map +1 -1
  162. package/dist/martyrs/src/modules/core/views/components/partials/BottomNavigationBar.vue.js +5 -5
  163. package/dist/martyrs/src/modules/core/views/components/partials/BottomNavigationBar.vue.js.map +1 -1
  164. package/dist/martyrs/src/modules/core/views/components/partials/CitySelection.vue.js +2 -2
  165. package/dist/martyrs/src/modules/core/views/components/partials/CitySelection.vue.js.map +1 -1
  166. package/dist/martyrs/src/modules/core/views/components/partials/Footer.vue.js +2 -2
  167. package/dist/martyrs/src/modules/core/views/components/partials/Footer.vue.js.map +1 -1
  168. package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js +4 -4
  169. package/dist/martyrs/src/modules/core/views/components/partials/Header.vue.js.map +1 -1
  170. package/dist/martyrs/src/modules/core/views/components/partials/LocationSelection.vue.js +1 -1
  171. package/dist/martyrs/src/modules/core/views/components/partials/LocationSelection.vue.js.map +1 -1
  172. package/dist/martyrs/src/modules/core/views/components/partials/Navigation.vue.js +2 -2
  173. package/dist/martyrs/src/modules/core/views/components/partials/Navigation.vue.js.map +1 -1
  174. package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue2.js +3 -3
  175. package/dist/martyrs/src/modules/core/views/components/sections/Filters.vue2.js.map +1 -1
  176. package/dist/martyrs/src/modules/core/views/components/sections/SectionPageTitle.vue.js +2 -2
  177. package/dist/martyrs/src/modules/core/views/components/sections/SectionPageTitle.vue.js.map +1 -1
  178. package/dist/martyrs/src/modules/core/views/components/sections/Walkthrough.vue.js +6 -6
  179. package/dist/martyrs/src/modules/core/views/components/sections/Walkthrough.vue.js.map +1 -1
  180. package/dist/martyrs/src/modules/core/views/mixins/mixins.js +14 -1
  181. package/dist/martyrs/src/modules/core/views/mixins/mixins.js.map +1 -1
  182. package/dist/martyrs/src/modules/core/views/plugins/date-picker.plugin.js +8 -5
  183. package/dist/martyrs/src/modules/core/views/plugins/date-picker.plugin.js.map +1 -1
  184. package/dist/martyrs/src/modules/core/views/store/core.store.js +4 -0
  185. package/dist/martyrs/src/modules/core/views/store/core.store.js.map +1 -1
  186. package/dist/martyrs/src/modules/core/views/utils/vue-app-renderer.js +3 -0
  187. package/dist/martyrs/src/modules/core/views/utils/vue-app-renderer.js.map +1 -1
  188. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  189. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +9 -9
  190. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js.map +1 -1
  191. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -1
  192. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
  193. package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js +1 -1
  194. package/dist/martyrs/src/modules/events/components/sections/EditTickets.vue.js.map +1 -1
  195. package/dist/martyrs/src/modules/events/components/sections/SelectDate.vue.js +1 -1
  196. package/dist/martyrs/src/modules/events/components/sections/SelectDate.vue.js.map +1 -1
  197. package/dist/martyrs/src/modules/events/events.client.js +4 -4
  198. package/dist/martyrs/src/modules/events/events.client.js.map +1 -1
  199. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  200. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js.map +1 -1
  201. package/dist/martyrs/src/modules/gallery/router/gallery.router.js +3 -3
  202. package/dist/martyrs/src/modules/gallery/router/gallery.router.js.map +1 -1
  203. package/dist/martyrs/src/modules/governance/views/components/blocks/CardInitiativeItem.vue.js +3 -3
  204. package/dist/martyrs/src/modules/governance/views/components/blocks/CardInitiativeItem.vue.js.map +1 -1
  205. package/dist/martyrs/src/modules/governance/views/components/blocks/CardSprintItem.vue.js +4 -4
  206. package/dist/martyrs/src/modules/governance/views/components/blocks/CardSprintItem.vue.js.map +1 -1
  207. package/dist/martyrs/src/modules/governance/views/components/blocks/CardTaskItem.vue.js +2 -2
  208. package/dist/martyrs/src/modules/governance/views/components/blocks/CardTaskItem.vue.js.map +1 -1
  209. package/dist/martyrs/src/modules/governance/views/components/blocks/CardVotingItem.vue.js +3 -3
  210. package/dist/martyrs/src/modules/governance/views/components/blocks/CardVotingItem.vue.js.map +1 -1
  211. package/dist/martyrs/src/modules/governance/views/components/pages/Initiatives.vue.js +3 -3
  212. package/dist/martyrs/src/modules/governance/views/components/pages/Initiatives.vue.js.map +1 -1
  213. package/dist/martyrs/src/modules/governance/views/components/partials/TaskStatusBadge.vue.js +1 -1
  214. package/dist/martyrs/src/modules/governance/views/components/partials/TaskStatusBadge.vue.js.map +1 -1
  215. package/dist/martyrs/src/modules/governance/views/components/sections/FormSprintDetails.vue.js +1 -1
  216. package/dist/martyrs/src/modules/governance/views/components/sections/FormSprintDetails.vue.js.map +1 -1
  217. package/dist/martyrs/src/modules/governance/views/components/sections/FormTaskDetails.vue.js +1 -1
  218. package/dist/martyrs/src/modules/governance/views/components/sections/FormTaskDetails.vue.js.map +1 -1
  219. package/dist/martyrs/src/modules/governance/views/router/governance.router.js +3 -3
  220. package/dist/martyrs/src/modules/governance/views/router/governance.router.js.map +1 -1
  221. package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.js +2 -2
  222. package/dist/martyrs/src/modules/icons/components/IconSearchPopup.vue.js.map +1 -1
  223. package/dist/martyrs/src/modules/icons/entities/IconApplications.vue.js +32 -0
  224. package/dist/martyrs/src/modules/icons/entities/IconApplications.vue.js.map +1 -0
  225. package/dist/martyrs/src/modules/icons/entities/IconCustomers.vue.js +32 -0
  226. package/dist/martyrs/src/modules/icons/entities/IconCustomers.vue.js.map +1 -0
  227. package/dist/martyrs/src/modules/icons/entities/IconUsers.vue.js +32 -0
  228. package/dist/martyrs/src/modules/icons/entities/IconUsers.vue.js.map +1 -0
  229. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +2 -2
  230. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js.map +1 -1
  231. package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js +2 -2
  232. package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js.map +1 -1
  233. package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js +1 -1
  234. package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js.map +1 -1
  235. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +3 -3
  236. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js.map +1 -1
  237. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js +290 -173
  238. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js.map +1 -1
  239. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +1 -1
  240. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js.map +1 -1
  241. package/dist/martyrs/src/modules/inventory/inventory.client.js +4 -4
  242. package/dist/martyrs/src/modules/inventory/inventory.client.js.map +1 -1
  243. package/dist/martyrs/src/modules/inventory/router/inventory.router.js +15 -0
  244. package/dist/martyrs/src/modules/inventory/router/inventory.router.js.map +1 -1
  245. package/dist/martyrs/src/modules/landing/components/sections/SectionEarn.vue.js +4 -4
  246. package/dist/martyrs/src/modules/landing/components/sections/SectionEarn.vue.js.map +1 -1
  247. package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.js +1 -1
  248. package/dist/martyrs/src/modules/landing/components/sections/SectionFeatures.vue.js.map +1 -1
  249. package/dist/martyrs/src/modules/landing/components/sections/SectionFeaturesImages.vue.js +3 -3
  250. package/dist/martyrs/src/modules/landing/components/sections/SectionFeaturesImages.vue.js.map +1 -1
  251. package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js +2 -2
  252. package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js.map +1 -1
  253. package/dist/martyrs/src/modules/landing/components/sections/SectionHeroToken.vue.js +1 -1
  254. package/dist/martyrs/src/modules/landing/components/sections/SectionHeroToken.vue.js.map +1 -1
  255. package/dist/martyrs/src/modules/landing/components/sections/SectionMobileApp.vue.js +2 -2
  256. package/dist/martyrs/src/modules/landing/components/sections/SectionMobileApp.vue.js.map +1 -1
  257. package/dist/martyrs/src/modules/landing/components/sections/SectionOverview.vue.js +1 -1
  258. package/dist/martyrs/src/modules/landing/components/sections/SectionOverview.vue.js.map +1 -1
  259. package/dist/martyrs/src/modules/landing/components/sections/SectionRoadmap.vue.js +2 -2
  260. package/dist/martyrs/src/modules/landing/components/sections/SectionRoadmap.vue.js.map +1 -1
  261. package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.js +1 -1
  262. package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.js.map +1 -1
  263. package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js +3 -3
  264. package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js.map +1 -1
  265. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +2 -2
  266. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js.map +1 -1
  267. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js +2 -2
  268. package/dist/martyrs/src/modules/music/components/cards/ArtistCard.vue.js.map +1 -1
  269. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +2 -2
  270. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js.map +1 -1
  271. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +2 -2
  272. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js.map +1 -1
  273. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +6 -6
  274. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js.map +1 -1
  275. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +2 -2
  276. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js.map +1 -1
  277. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
  278. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js.map +1 -1
  279. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +5 -5
  280. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js.map +1 -1
  281. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +3 -3
  282. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js.map +1 -1
  283. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +8 -8
  284. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js.map +1 -1
  285. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +5 -5
  286. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js.map +1 -1
  287. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +11 -11
  288. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js.map +1 -1
  289. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +3 -3
  290. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js.map +1 -1
  291. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +11 -11
  292. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js.map +1 -1
  293. package/dist/martyrs/src/modules/music/components/player/FullscreenPlayer.vue.js +4 -4
  294. package/dist/martyrs/src/modules/music/components/player/FullscreenPlayer.vue.js.map +1 -1
  295. package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.js +2 -2
  296. package/dist/martyrs/src/modules/music/components/player/TrackProgress.vue.js.map +1 -1
  297. package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.js +162 -68
  298. package/dist/martyrs/src/modules/notifications/components/sections/NotificationPreferences.vue.js.map +1 -1
  299. package/dist/martyrs/src/modules/notifications/notifications.client.js +181 -17
  300. package/dist/martyrs/src/modules/notifications/notifications.client.js.map +1 -1
  301. package/dist/martyrs/src/modules/notifications/router/notifications.backoffice.router.js +21 -0
  302. package/dist/martyrs/src/modules/notifications/router/notifications.backoffice.router.js.map +1 -0
  303. package/dist/martyrs/src/modules/notifications/router/notifications.router.js +13 -42
  304. package/dist/martyrs/src/modules/notifications/router/notifications.router.js.map +1 -1
  305. package/dist/martyrs/src/modules/notifications/store/notifications.store.js +66 -1
  306. package/dist/martyrs/src/modules/notifications/store/notifications.store.js.map +1 -1
  307. package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.js +9 -7
  308. package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.js.map +1 -1
  309. package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.js +11 -9
  310. package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.js.map +1 -1
  311. package/dist/martyrs/src/modules/orders/components/blocks/CardOrder.vue.js +9 -9
  312. package/dist/martyrs/src/modules/orders/components/blocks/CardOrder.vue.js.map +1 -1
  313. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.js +66 -19
  314. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.js.map +1 -1
  315. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderItem.vue.js +29 -27
  316. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderItem.vue.js.map +1 -1
  317. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js +7 -12
  318. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderUser.vue.js.map +1 -1
  319. package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js +1 -1
  320. package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js.map +1 -1
  321. package/dist/martyrs/src/modules/orders/components/elements/PriceTotal.vue.js +4 -4
  322. package/dist/martyrs/src/modules/orders/components/elements/PriceTotal.vue.js.map +1 -1
  323. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +1 -1
  324. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js.map +1 -1
  325. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +46 -25
  326. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js.map +1 -1
  327. package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.js +2 -2
  328. package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.js.map +1 -1
  329. package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.js +54 -38
  330. package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.js.map +1 -1
  331. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +454 -139
  332. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js.map +1 -1
  333. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +2 -1
  334. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js.map +1 -1
  335. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +141 -68
  336. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js.map +1 -1
  337. package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +38 -32
  338. package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js.map +1 -1
  339. package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.js +1 -1
  340. package/dist/martyrs/src/modules/orders/components/partials/ShopCart.vue.js.map +1 -1
  341. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +4 -4
  342. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js.map +1 -1
  343. package/dist/martyrs/src/modules/orders/components/sections/AskToLogin.vue.js +1 -1
  344. package/dist/martyrs/src/modules/orders/components/sections/AskToLogin.vue.js.map +1 -1
  345. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +167 -95
  346. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js.map +1 -1
  347. package/dist/martyrs/src/modules/orders/orders.client.js +22 -20
  348. package/dist/martyrs/src/modules/orders/orders.client.js.map +1 -1
  349. package/dist/martyrs/src/modules/orders/store/orders.js +3 -5
  350. package/dist/martyrs/src/modules/orders/store/orders.js.map +1 -1
  351. package/dist/martyrs/src/modules/orders/store/shopcart.js +5 -5
  352. package/dist/martyrs/src/modules/orders/store/shopcart.js.map +1 -1
  353. package/dist/martyrs/src/modules/orders/utils/rent-price.js +60 -0
  354. package/dist/martyrs/src/modules/orders/utils/rent-price.js.map +1 -0
  355. package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +2 -2
  356. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +45 -55
  357. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js.map +1 -1
  358. package/dist/martyrs/src/modules/organizations/components/blocks/EmptyState.vue.js +1 -1
  359. package/dist/martyrs/src/modules/organizations/components/blocks/Rating.vue.js +1 -1
  360. package/dist/martyrs/src/modules/organizations/components/blocks/Socials.vue.js +2 -2
  361. package/dist/martyrs/src/modules/organizations/components/blocks/Socials.vue.js.map +1 -1
  362. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  363. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js.map +1 -1
  364. package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js +3 -3
  365. package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js.map +1 -1
  366. package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +1 -1
  367. package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js.map +1 -1
  368. package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +1 -1
  369. package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js.map +1 -1
  370. package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js +2 -2
  371. package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js.map +1 -1
  372. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +8 -8
  373. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js.map +1 -1
  374. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +216 -83
  375. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js.map +1 -1
  376. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +35 -25
  377. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js.map +1 -1
  378. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +3 -2
  379. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js.map +1 -1
  380. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  381. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js.map +1 -1
  382. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  383. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js.map +1 -1
  384. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js +20 -18
  385. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js.map +1 -1
  386. package/dist/martyrs/src/modules/organizations/organizations.client.js +39 -33
  387. package/dist/martyrs/src/modules/organizations/organizations.client.js.map +1 -1
  388. package/dist/martyrs/src/modules/organizations/router/organizations.backoffice.router.js +81 -0
  389. package/dist/martyrs/src/modules/organizations/router/organizations.backoffice.router.js.map +1 -1
  390. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  391. package/dist/martyrs/src/modules/pages/views/components/pages/Pages.vue.js +1 -1
  392. package/dist/martyrs/src/modules/pages/views/components/pages/Pages.vue.js.map +1 -1
  393. package/dist/martyrs/src/modules/pages/views/router/pages.router.js +2 -2
  394. package/dist/martyrs/src/modules/pages/views/router/pages.router.js.map +1 -1
  395. package/dist/martyrs/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  396. package/dist/martyrs/src/modules/products/components/blocks/CardPosition.vue.js.map +1 -1
  397. package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.js +2 -2
  398. package/dist/martyrs/src/modules/products/components/blocks/CardProduct.vue.js.map +1 -1
  399. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js +3 -3
  400. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js.map +1 -1
  401. package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js +2 -2
  402. package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js.map +1 -1
  403. package/dist/martyrs/src/modules/products/components/blocks/ProductVariants.vue.js +3 -3
  404. package/dist/martyrs/src/modules/products/components/blocks/ProductVariants.vue.js.map +1 -1
  405. package/dist/martyrs/src/modules/products/components/elements/Price.vue.js +2 -2
  406. package/dist/martyrs/src/modules/products/components/elements/Price.vue.js.map +1 -1
  407. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +9 -25
  408. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js.map +1 -1
  409. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +34 -17
  410. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js.map +1 -1
  411. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +96 -96
  412. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
  413. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
  414. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js.map +1 -1
  415. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +2 -2
  416. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js.map +1 -1
  417. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +22 -9
  418. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js.map +1 -1
  419. package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  420. package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.js.map +1 -1
  421. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
  422. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js.map +1 -1
  423. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +3 -3
  424. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js.map +1 -1
  425. package/dist/martyrs/src/modules/products/router/categories.router.js +2 -2
  426. package/dist/martyrs/src/modules/products/router/categories.router.js.map +1 -1
  427. package/dist/martyrs/src/modules/products/router/products.router.js +17 -3
  428. package/dist/martyrs/src/modules/products/router/products.router.js.map +1 -1
  429. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttBar.vue.js +11 -10
  430. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttBar.vue.js.map +1 -1
  431. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttChart.vue.js +197 -81
  432. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttChart.vue.js.map +1 -1
  433. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttHeaderCell.vue.js +2 -2
  434. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttHeaderCell.vue.js.map +1 -1
  435. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +2 -2
  436. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js.map +1 -1
  437. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +685 -80
  438. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js.map +1 -1
  439. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js +68 -18
  440. package/dist/martyrs/src/modules/rents/views/components/pages/RentsEdit.vue.js.map +1 -1
  441. package/dist/martyrs/src/modules/rents/views/router/rents.router.js +3 -3
  442. package/dist/martyrs/src/modules/rents/views/router/rents.router.js.map +1 -1
  443. package/dist/martyrs/src/modules/rents/views/store/rents.store.js +1 -1
  444. package/dist/martyrs/src/modules/rents/views/store/rents.store.js.map +1 -1
  445. package/dist/martyrs/src/modules/reports/components/pages/BackofficeReports.vue.js +3 -3
  446. package/dist/martyrs/src/modules/reports/components/pages/BackofficeReports.vue.js.map +1 -1
  447. package/dist/martyrs/src/modules/reports/router/reports.router.js +1 -1
  448. package/dist/martyrs/src/modules/reports/router/reports.router.js.map +1 -1
  449. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +5 -5
  450. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js.map +1 -1
  451. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
  452. package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.js +3 -3
  453. package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.js.map +1 -1
  454. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +9 -7
  455. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js.map +1 -1
  456. package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js +29 -37
  457. package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js.map +1 -1
  458. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +8 -8
  459. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js.map +1 -1
  460. package/dist/martyrs/src/modules/spots/router/spots.router.js +3 -3
  461. package/dist/martyrs/src/modules/spots/router/spots.router.js.map +1 -1
  462. package/dist/martyrs/src/modules/wallet/views/components/elements/ConnectMetamask.vue.js +3 -3
  463. package/dist/martyrs/src/modules/wallet/views/components/elements/ConnectMetamask.vue.js.map +1 -1
  464. package/dist/martyrs/src/modules/wallet/views/components/pages/Payments.vue.js +1 -1
  465. package/dist/martyrs/src/modules/wallet/views/components/pages/Payments.vue.js.map +1 -1
  466. package/dist/martyrs/src/modules/wallet/views/router/wallet.router.js +1 -1
  467. package/dist/martyrs/src/modules/wallet/views/router/wallet.router.js.map +1 -1
  468. package/dist/martyrs.es10.js +59 -57
  469. package/dist/martyrs.es106.js +2 -2
  470. package/dist/martyrs.es11.js +31 -30
  471. package/dist/martyrs.es113.js +22 -166
  472. package/dist/martyrs.es114.js +4 -457
  473. package/dist/martyrs.es115.js +8 -40
  474. package/dist/martyrs.es116.js +166 -9
  475. package/dist/martyrs.es117.js +451 -43
  476. package/dist/martyrs.es118.js +38 -10
  477. package/dist/martyrs.es119.js +9 -44
  478. package/dist/martyrs.es12.js +8 -9
  479. package/dist/martyrs.es120.js +49 -4
  480. package/dist/martyrs.es121.js +10 -127
  481. package/dist/martyrs.es122.js +42 -98
  482. package/dist/martyrs.es123.js +4 -86
  483. package/dist/martyrs.es124.js +120 -29
  484. package/dist/martyrs.es125.js +99 -10
  485. package/dist/martyrs.es126.js +71 -24
  486. package/dist/martyrs.es127.js +37 -8
  487. package/dist/martyrs.es128.js +11 -22
  488. package/dist/martyrs.es129.js +39 -4
  489. package/dist/martyrs.es13.js +22 -19
  490. package/dist/martyrs.es130.js +9 -8
  491. package/dist/martyrs.es131.js +7 -7
  492. package/dist/martyrs.es132.js +2 -2
  493. package/dist/martyrs.es133.js +1 -1
  494. package/dist/martyrs.es135.js +1 -1
  495. package/dist/martyrs.es137.js +1 -1
  496. package/dist/martyrs.es138.js +7 -8
  497. package/dist/martyrs.es139.js +8 -7
  498. package/dist/martyrs.es14.js +2 -2
  499. package/dist/martyrs.es140.js +2 -2
  500. package/dist/martyrs.es144.js +10 -29
  501. package/dist/martyrs.es145.js +29 -10
  502. package/dist/martyrs.es146.js +2 -2
  503. package/dist/martyrs.es147.js +2 -2
  504. package/dist/martyrs.es149.js +1 -1
  505. package/dist/martyrs.es2.js +31 -30
  506. package/dist/martyrs.es22.js +16 -16
  507. package/dist/martyrs.es23.js +8 -8
  508. package/dist/martyrs.es24.js +9 -9
  509. package/dist/martyrs.es26.js +9 -11
  510. package/dist/martyrs.es27.js +9 -9
  511. package/dist/martyrs.es28.js +1 -1
  512. package/dist/martyrs.es29.js +5 -5
  513. package/dist/martyrs.es3.js +1 -1
  514. package/dist/martyrs.es38.js +1 -1
  515. package/dist/martyrs.es4.js +12 -12
  516. package/dist/martyrs.es41.js +34 -224
  517. package/dist/martyrs.es5.js +251 -238
  518. package/dist/martyrs.es61.js +33 -26
  519. package/dist/martyrs.es74.js +7 -7
  520. package/dist/martyrs.es76.js +12 -12
  521. package/dist/martyrs.es8.js +31 -31
  522. package/dist/music.server.js +3 -3
  523. package/dist/node_modules/.pnpm/@googlemaps_js-api-loader@2.0.2/node_modules/@googlemaps/js-api-loader/dist/index.js +90 -0
  524. package/dist/node_modules/.pnpm/@googlemaps_js-api-loader@2.0.2/node_modules/@googlemaps/js-api-loader/dist/index.js.map +1 -0
  525. package/dist/notifications.server.js +255 -23
  526. package/dist/orders.server.js +674 -136
  527. package/dist/organizations.server.js +11 -6
  528. package/dist/products.server.js +68 -7
  529. package/dist/{queryProcessor-C_5Iipam.js → queryProcessor-B2FCngFP.js} +3 -2
  530. package/dist/rents.server.js +183 -7
  531. package/dist/{socials.schema-DxnnaBgO.js → socials.schema-C3RjkqJv.js} +4 -0
  532. package/dist/spots.server.js +1 -1
  533. package/dist/style.css +292 -204
  534. package/dist/{tickets.controller-DdF85W-i.js → tickets.controller-Dpzf4kQx.js} +1 -1
  535. package/dist/wallet.server.js +2 -2
  536. package/package.json +5 -3
  537. package/src/builder/modes/ssr.rspack.dev.js +2 -0
  538. package/src/builder/rspack/rspack.config.ssr.client.js +58 -1
  539. package/src/builder/ssr/asset-resolver.js +1 -1
  540. package/src/builder/templates/page.js +2 -0
  541. package/src/components/Address/Address.vue +16 -16
  542. package/src/components/Button/Button.vue +0 -1
  543. package/src/components/ButtonSegmented/ButtonSegmented.vue +1 -1
  544. package/src/components/Calendar/Calendar.vue +141 -118
  545. package/src/components/Chart/Chart.vue +216 -0
  546. package/src/components/Checkbox/Checkbox.vue +1 -1
  547. package/src/components/Chips/Chips.vue +4 -5
  548. package/src/components/Countdown/Countdown.vue +5 -5
  549. package/src/components/DatePicker/DatePicker.vue +2 -2
  550. package/src/components/EditImages/EditImages.vue +3 -3
  551. package/src/components/EmptyState/EmptyState.vue +1 -1
  552. package/src/components/Feed/Feed.vue +5 -0
  553. package/src/components/Field/Field.vue +3 -3
  554. package/src/components/FieldDate/FieldDate.vue +2 -2
  555. package/src/components/LocationMarker/LocationMarker.vue +28 -21
  556. package/src/components/Map/Map.vue +20 -15
  557. package/src/components/Popup/Popup.vue +3 -3
  558. package/src/components/Radio/Radio.vue +2 -2
  559. package/src/components/Select/Select.vue +1 -1
  560. package/src/components/Status/Snack.vue +1 -1
  561. package/src/components/Status/Status.vue +1 -1
  562. package/src/components/Table/Table.vue +16 -1
  563. package/src/components/Upload/Upload.vue +1 -1
  564. package/src/components/UploadImage/UploadImage.vue +1 -1
  565. package/src/components/UploadImageMultiple/UploadImageMultiple.vue +1 -1
  566. package/src/jit/rules.js +4 -0
  567. package/src/modules/TASKS.MD +16 -3
  568. package/src/modules/auth/auth.client.js +18 -3
  569. package/src/modules/auth/controllers/routes/users.routes.js +18 -0
  570. package/src/modules/auth/controllers/services/auth.service.js +3 -3
  571. package/src/modules/auth/controllers/services/users.service.js +34 -5
  572. package/src/modules/auth/views/components/blocks/OtpDialog.vue +4 -4
  573. package/src/modules/auth/views/components/blocks/PopupAuth.vue +1 -1
  574. package/src/modules/auth/views/components/blocks/SidebarUserCard.vue +95 -0
  575. package/src/modules/auth/views/components/pages/BackofficeUsers.vue +337 -0
  576. package/src/modules/auth/views/components/pages/Invite.vue +1 -1
  577. package/src/modules/auth/views/components/pages/Profile.vue +1 -1
  578. package/src/modules/auth/views/components/pages/ProfileEdit.vue +23 -14
  579. package/src/modules/auth/views/components/pages/ProfileEditAccount.vue +45 -26
  580. package/src/modules/auth/views/components/pages/ProfileEditSidebar.vue +8 -7
  581. package/src/modules/auth/views/components/pages/ResetPassword.vue +4 -4
  582. package/src/modules/auth/views/components/pages/SignUp.vue +3 -3
  583. package/src/modules/auth/views/components/pages/UserDashboard.vue +8 -5
  584. package/src/modules/auth/views/components/sections/FeaturedUsers.vue +1 -1
  585. package/src/modules/auth/views/components/sections/SliderFeatures.vue +1 -1
  586. package/src/modules/auth/views/middlewares/auth.validation.js +7 -2
  587. package/src/modules/auth/views/router/users.backoffice.router.js +39 -0
  588. package/src/modules/auth/views/store/auth.js +2 -2
  589. package/src/modules/backoffice/components/admin/Backcalls.vue +2 -2
  590. package/src/modules/backoffice/components/admin/Dashboard.sublime-workspace +1 -1
  591. package/src/modules/backoffice/components/admin/FastOrders.vue +3 -3
  592. package/src/modules/backoffice/components/admin/UserEdit.vue +1 -1
  593. package/src/modules/backoffice/components/pages/Dashboard.vue +102 -139
  594. package/src/modules/backoffice/configs/navigation.backoffice.config.js +91 -29
  595. package/src/modules/backoffice/router/backoffice.router.js +7 -1
  596. package/src/modules/chats/components/blocks/ChatMessage.vue +1 -1
  597. package/src/modules/chats/components/sections/ChatWindow.vue +1 -1
  598. package/src/modules/community/community.client.js +4 -4
  599. package/src/modules/community/components/blocks/CardBlogpost.vue +1 -1
  600. package/src/modules/community/components/layouts/Community.vue +4 -4
  601. package/src/modules/community/components/sections/Comment.vue +1 -1
  602. package/src/modules/constructor/components/elements/ImageUpload.vue +1 -1
  603. package/src/modules/core/TASK.MD +2 -2
  604. package/src/modules/core/controllers/classes/abac/abac.core.js +1 -0
  605. package/src/modules/core/controllers/classes/core.websocket.js +0 -2
  606. package/src/modules/core/controllers/classes/crud/crud.core.js +6 -0
  607. package/src/modules/core/controllers/classes/crud/crud.service.js +6 -0
  608. package/src/modules/core/controllers/utils/mailing.js +35 -26
  609. package/src/modules/core/controllers/utils/queryProcessor.js +4 -2
  610. package/src/modules/core/core.client.js +1 -0
  611. package/src/modules/core/models/schemas/embedding.schema.js +8 -0
  612. package/src/modules/core/models/schemas/socials.schema.js +4 -0
  613. package/src/modules/core/sw.js +448 -0
  614. package/src/modules/core/views/classes/core.app.js +37 -13
  615. package/src/modules/core/views/classes/module.manager.js +3 -1
  616. package/src/modules/core/views/components/blocks/AlertDialog.vue +1 -1
  617. package/src/modules/core/views/components/blocks/BlockSearch.vue +1 -1
  618. package/src/modules/core/views/components/blocks/BlockSlider.vue +96 -0
  619. package/src/modules/core/views/components/blocks/CardHeader.vue +2 -2
  620. package/src/modules/core/views/components/blocks/CardStat.vue +4 -18
  621. package/src/modules/{auth → core}/views/components/blocks/CardUser.vue +45 -20
  622. package/src/modules/core/views/components/blocks/HelpCard.vue +1 -1
  623. package/src/modules/core/views/components/blocks/PopupAuth.vue +1 -1
  624. package/src/modules/core/views/components/blocks/PopupDateSelector.vue +41 -24
  625. package/src/modules/core/views/components/layouts/Client.vue +1 -1
  626. package/src/modules/core/views/components/pages/404.vue +5 -5
  627. package/src/modules/core/views/components/partials/BottomNavigationBar.vue +5 -5
  628. package/src/modules/core/views/components/partials/CitySelection.vue +2 -2
  629. package/src/modules/core/views/components/partials/Footer.centered.vue +2 -2
  630. package/src/modules/core/views/components/partials/Footer.vue +2 -2
  631. package/src/modules/core/views/components/partials/Header.vue +3 -3
  632. package/src/modules/core/views/components/partials/LocationSelection.vue +1 -1
  633. package/src/modules/core/views/components/partials/Navigation.vue +1 -1
  634. package/src/modules/core/views/components/sections/Filters.vue +2 -2
  635. package/src/modules/core/views/components/sections/SectionPageTitle.vue +2 -2
  636. package/src/modules/core/views/components/sections/Walkthrough.vue +6 -6
  637. package/src/modules/core/views/mixins/mixins.js +17 -0
  638. package/src/modules/core/views/plugins/date-picker.plugin.js +8 -5
  639. package/src/modules/core/views/store/core.store.js +5 -0
  640. package/src/modules/core/views/utils/vue-app-renderer.js +5 -0
  641. package/src/modules/events/components/pages/EditEventTickets.vue +9 -9
  642. package/src/modules/events/components/pages/Event.vue +2 -2
  643. package/src/modules/events/components/sections/EditTickets.vue +1 -1
  644. package/src/modules/events/components/sections/SelectDate.vue +1 -1
  645. package/src/modules/events/events.client.js +4 -4
  646. package/src/modules/gallery/components/sections/BackofficeGallery.vue +1 -1
  647. package/src/modules/gallery/router/gallery.router.js +3 -3
  648. package/src/modules/governance/middlewares/sprints.verifier.js +3 -3
  649. package/src/modules/governance/middlewares/tasks.verifier.js +3 -3
  650. package/src/modules/governance/models/sprint.model.js +1 -1
  651. package/src/modules/governance/models/task.model.js +1 -1
  652. package/src/modules/governance/reactcode/src/components/TaskStatusBadge.tsx +1 -1
  653. package/src/modules/governance/views/components/blocks/CardInitiativeItem.vue +3 -3
  654. package/src/modules/governance/views/components/blocks/CardSprintItem.vue +4 -4
  655. package/src/modules/governance/views/components/blocks/CardTaskItem.vue +2 -2
  656. package/src/modules/governance/views/components/blocks/CardVotingItem.vue +3 -3
  657. package/src/modules/governance/views/components/pages/Initiatives.vue +3 -3
  658. package/src/modules/governance/views/components/partials/TaskStatusBadge.vue +1 -1
  659. package/src/modules/governance/views/components/sections/FormSprintDetails.vue +1 -1
  660. package/src/modules/governance/views/components/sections/FormTaskDetails.vue +1 -1
  661. package/src/modules/governance/views/router/governance.router.js +3 -3
  662. package/src/modules/icons/components/IconSearchPopup.vue +1 -1
  663. package/src/modules/icons/entities/IconApplications.vue +14 -0
  664. package/src/modules/icons/entities/IconCustomers.vue +14 -0
  665. package/src/modules/icons/entities/IconUsers.vue +14 -0
  666. package/src/modules/inventory/components/forms/AdjustmentForm.vue +2 -2
  667. package/src/modules/inventory/components/forms/ColumnSettingsMenu.vue +2 -2
  668. package/src/modules/inventory/components/forms/HistoryView.vue +1 -1
  669. package/src/modules/inventory/components/forms/StockAlertsForm.vue +3 -3
  670. package/src/modules/inventory/components/pages/Inventory.vue +278 -159
  671. package/src/modules/inventory/components/pages/InventoryEdit.vue +2 -2
  672. package/src/modules/inventory/inventory.client.js +4 -4
  673. package/src/modules/inventory/models/stock.audit.model.js +1 -1
  674. package/src/modules/inventory/router/inventory.router.js +12 -0
  675. package/src/modules/landing/components/sections/SectionEarn.vue +3 -3
  676. package/src/modules/landing/components/sections/SectionFeature.vue +1 -1
  677. package/src/modules/landing/components/sections/SectionFeatures.vue +1 -1
  678. package/src/modules/landing/components/sections/SectionFeaturesImages.vue +2 -2
  679. package/src/modules/landing/components/sections/SectionGuide.vue +2 -2
  680. package/src/modules/landing/components/sections/SectionHeroToken.vue +1 -1
  681. package/src/modules/landing/components/sections/SectionHeroVideo.vue +1 -1
  682. package/src/modules/landing/components/sections/SectionMobileApp.vue +2 -2
  683. package/src/modules/landing/components/sections/SectionOverview.vue +1 -1
  684. package/src/modules/landing/components/sections/SectionRoadmap.vue +1 -1
  685. package/src/modules/landing/components/sections/SubscribeNewsletter.vue +1 -1
  686. package/src/modules/marketplace/views/components/sections/SectionMenu.vue +2 -2
  687. package/src/modules/music/components/SidebarMusic.vue +1 -1
  688. package/src/modules/music/components/cards/AlbumCard.vue +1 -1
  689. package/src/modules/music/components/cards/ArtistCard.vue +1 -1
  690. package/src/modules/music/components/cards/ArtistCardSmall.vue +1 -1
  691. package/src/modules/music/components/cards/PlaylistCard.vue +1 -1
  692. package/src/modules/music/components/cards/TrackListCard.vue +6 -6
  693. package/src/modules/music/components/forms/AlbumForm.vue +2 -2
  694. package/src/modules/music/components/forms/ArtistForm.vue +1 -1
  695. package/src/modules/music/components/forms/PlaylistForm.vue +5 -5
  696. package/src/modules/music/components/forms/TrackForm.vue +3 -3
  697. package/src/modules/music/components/pages/Album.vue +8 -8
  698. package/src/modules/music/components/pages/Artist.vue +5 -5
  699. package/src/modules/music/components/pages/Playlist.vue +11 -11
  700. package/src/modules/music/components/pages/SearchResults.vue +2 -2
  701. package/src/modules/music/components/pages/Track.vue +11 -11
  702. package/src/modules/music/components/player/FullscreenPlayer.vue +3 -3
  703. package/src/modules/music/components/player/TrackProgress.vue +1 -1
  704. package/src/modules/notifications/components/sections/NotificationPreferences.vue +182 -52
  705. package/src/modules/notifications/controllers/notifications.controller.js +242 -17
  706. package/src/modules/notifications/models/notification-preference.model.js +4 -0
  707. package/src/modules/notifications/notifications.client.js +213 -20
  708. package/src/modules/notifications/router/notifications.backoffice.router.js +16 -0
  709. package/src/modules/notifications/router/notifications.router.js +13 -45
  710. package/src/modules/notifications/routes/notifications.routes.js +9 -0
  711. package/src/modules/notifications/services/notification.service.js +33 -9
  712. package/src/modules/notifications/services/telegram.service.js +2 -2
  713. package/src/modules/notifications/services/web-push.service.js +6 -2
  714. package/src/modules/notifications/store/notifications.store.js +69 -0
  715. package/src/modules/orders/components/blocks/CardApplication.vue +9 -6
  716. package/src/modules/orders/components/blocks/CardCustomer.vue +10 -7
  717. package/src/modules/orders/components/blocks/CardOrder.vue +8 -8
  718. package/src/modules/orders/components/blocks/CardOrderBackoffice.vue +58 -12
  719. package/src/modules/orders/components/blocks/CardOrderItem.vue +31 -28
  720. package/src/modules/orders/components/blocks/CardOrderUser.vue +7 -12
  721. package/src/modules/orders/components/blocks/CardOrderVar1.vue +3 -3
  722. package/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue +1 -1
  723. package/src/modules/orders/components/elements/PriceTotal.vue +4 -4
  724. package/src/modules/orders/components/forms/FormApplicationDetails.vue +1 -1
  725. package/src/modules/orders/components/forms/FormSelectCustomer.vue +48 -25
  726. package/src/modules/orders/components/pages/Applications.vue +2 -2
  727. package/src/modules/orders/components/pages/Customers.vue +35 -23
  728. package/src/modules/orders/components/pages/OrderBackoffice.vue +780 -393
  729. package/src/modules/orders/components/pages/OrderCreate.vue +5 -4
  730. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +112 -42
  731. package/src/modules/orders/components/pages/Orders.vue +20 -19
  732. package/src/modules/orders/components/pages/Orders_refact.vue +3 -3
  733. package/src/modules/orders/components/partials/ShopCart.vue +1 -1
  734. package/src/modules/orders/components/sections/ApplicationDetails.vue +2 -2
  735. package/src/modules/orders/components/sections/AskToLogin.vue +1 -1
  736. package/src/modules/orders/components/sections/CustomerDetails.vue +130 -64
  737. package/src/modules/orders/controllers/orders.controller.js +463 -134
  738. package/src/modules/orders/middlewares/applications.verifier.js +3 -3
  739. package/src/modules/orders/middlewares/customers.verifier.js +4 -0
  740. package/src/modules/orders/middlewares/orders.verifier.js +187 -0
  741. package/src/modules/orders/models/customer.model.js +2 -0
  742. package/src/modules/orders/models/order.model.js +20 -2
  743. package/src/modules/orders/orders.client.js +21 -19
  744. package/src/modules/orders/routes/applications.routes.js +13 -3
  745. package/src/modules/orders/routes/customers.routes.js +2 -0
  746. package/src/modules/orders/routes/orders.routes.js +46 -4
  747. package/src/modules/orders/store/orders.js +4 -7
  748. package/src/modules/orders/store/shopcart.js +6 -7
  749. package/src/modules/orders/utils/rent-price.js +90 -0
  750. package/src/modules/organizations/components/blocks/CardDepartment.vue +1 -1
  751. package/src/modules/organizations/components/blocks/CardOrganization.vue +30 -33
  752. package/src/modules/organizations/components/blocks/EmptyState.vue +1 -1
  753. package/src/modules/organizations/components/blocks/Rating.vue +1 -1
  754. package/src/modules/organizations/components/blocks/Socials.vue +2 -2
  755. package/src/modules/organizations/components/elements/ButtonToggleMembership.vue +1 -1
  756. package/src/modules/organizations/components/forms/AddExistingMembersForm.vue +3 -3
  757. package/src/modules/organizations/components/forms/DepartmentForm.vue +1 -1
  758. package/src/modules/organizations/components/forms/InviteForm.vue +1 -1
  759. package/src/modules/organizations/components/pages/Department.vue +2 -2
  760. package/src/modules/organizations/components/pages/DepartmentEdit.vue +1 -1
  761. package/src/modules/organizations/components/pages/Members.vue +8 -8
  762. package/src/modules/organizations/components/pages/Organization.vue +232 -124
  763. package/src/modules/organizations/components/pages/OrganizationCreate.vue +3 -3
  764. package/src/modules/organizations/components/pages/OrganizationDocuments.vue +1 -1
  765. package/src/modules/organizations/components/pages/OrganizationEdit.vue +15 -6
  766. package/src/modules/organizations/components/pages/Organizations.vue +3 -2
  767. package/src/modules/organizations/components/sections/Documents.vue +1 -1
  768. package/src/modules/organizations/components/sections/MembersAdd.vue +2 -2
  769. package/src/modules/organizations/configs/navigation.organization.config.js +34 -26
  770. package/src/modules/organizations/controllers/organizations.controller.js +8 -3
  771. package/src/modules/organizations/models/organization.model.js +1 -0
  772. package/src/modules/organizations/organizations.client.js +39 -33
  773. package/src/modules/organizations/router/organizations.backoffice.router.js +67 -0
  774. package/src/modules/pages/views/components/pages/Pages.vue +1 -1
  775. package/src/modules/pages/views/router/pages.router.js +2 -2
  776. package/src/modules/products/components/blocks/CardPosition.vue +2 -2
  777. package/src/modules/products/components/blocks/CardProduct.vue +2 -2
  778. package/src/modules/products/components/blocks/ProductDiscounts.vue +1 -1
  779. package/src/modules/products/components/blocks/ProductImages.vue +1 -1
  780. package/src/modules/products/components/blocks/ProductVariants.vue +3 -3
  781. package/src/modules/products/components/elements/Price.vue +2 -2
  782. package/src/modules/products/components/forms/ColumnSettingsMenu.vue +2 -2
  783. package/src/modules/products/components/forms/ReorderSettingsForm.vue +3 -3
  784. package/src/modules/products/components/forms/StockAuditForm.vue +2 -2
  785. package/src/modules/products/components/forms/StockHistoryView.vue +1 -1
  786. package/src/modules/products/components/pages/Categories.vue +9 -20
  787. package/src/modules/products/components/pages/ProductEdit.vue +19 -3
  788. package/src/modules/products/components/pages/Products.vue +20 -19
  789. package/src/modules/products/components/sections/EditAttributes.vue +1 -1
  790. package/src/modules/products/components/sections/EditCategories.vue +1 -1
  791. package/src/modules/products/components/sections/EditDiscounts.vue +2 -2
  792. package/src/modules/products/components/sections/EditVariants.vue +14 -2
  793. package/src/modules/products/components/sections/FilterProducts.vue +1 -1
  794. package/src/modules/products/components/sections/ProductConfigurator.vue +1 -1
  795. package/src/modules/products/components/sections/SectionProduct.vue +3 -3
  796. package/src/modules/products/controllers/products.controller.js +50 -5
  797. package/src/modules/products/experiments/product-recommendation/components/HeroRecommendation.vue +2 -2
  798. package/src/modules/products/models/product.model.js +7 -0
  799. package/src/modules/products/models/variant.model.js +4 -0
  800. package/src/modules/products/router/categories.router.js +2 -2
  801. package/src/modules/products/router/products.router.js +14 -3
  802. package/src/modules/rents/controllers/routes/rents.routes.js +11 -0
  803. package/src/modules/rents/controllers/services/rents.services.js +193 -2
  804. package/src/modules/rents/models/rent.model.js +9 -0
  805. package/src/modules/rents/views/components/pages/Gant/GanttBar.vue +28 -11
  806. package/src/modules/rents/views/components/pages/Gant/GanttChart.vue +200 -40
  807. package/src/modules/rents/views/components/pages/Gant/GanttHeaderCell.vue +2 -2
  808. package/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue +2 -2
  809. package/src/modules/rents/views/components/pages/Rents.vue +641 -142
  810. package/src/modules/rents/views/components/pages/RentsEdit.vue +44 -4
  811. package/src/modules/rents/views/router/rents.router.js +3 -3
  812. package/src/modules/rents/views/store/rents.store.js +1 -1
  813. package/src/modules/reports/components/pages/BackofficeReports.vue +3 -3
  814. package/src/modules/reports/router/reports.router.js +1 -1
  815. package/src/modules/spots/components/blocks/CardSpot.vue +6 -6
  816. package/src/modules/spots/components/pages/Spot.vue +2 -2
  817. package/src/modules/spots/components/pages/SpotEdit.vue +8 -6
  818. package/src/modules/spots/components/pages/Spots.vue +18 -24
  819. package/src/modules/spots/components/sections/WorktimeEdit.vue +7 -7
  820. package/src/modules/spots/router/spots.router.js +3 -3
  821. package/src/modules/wallet/views/components/blocks/CashDeposit.vue +1 -1
  822. package/src/modules/wallet/views/components/elements/ConnectMetamask.vue +3 -3
  823. package/src/modules/wallet/views/components/pages/Payments.vue +1 -1
  824. package/src/modules/wallet/views/components/pages/Wallet.vue +4 -4
  825. package/src/modules/wallet/views/router/wallet.router.js +1 -1
  826. package/src/styles/layout.scss +1 -1
  827. package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +0 -1
  828. package/dist/martyrs/src/components/Tooltip/Tooltip.vue2.js.map +0 -1
  829. package/dist/martyrs/src/modules/icons/entities/IconCash.vue.js +0 -70
  830. package/dist/martyrs/src/modules/icons/entities/IconCash.vue.js.map +0 -1
  831. package/dist/node_modules/.pnpm/@googlemaps_js-api-loader@1.16.8/node_modules/@googlemaps/js-api-loader/dist/index.js +0 -336
  832. package/dist/node_modules/.pnpm/@googlemaps_js-api-loader@1.16.8/node_modules/@googlemaps/js-api-loader/dist/index.js.map +0 -1
  833. package/dist/node_modules/.pnpm/vue-draggable-next@2.2.1_sortablejs@1.15.6_vue@3.5.13_typescript@5.8.3_/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  <!-- components/player/TrackProgress.vue -->
2
2
  <template>
3
3
  <div class="progress-section">
4
- <span class="time-current t-transp">{{ formatTime(currentTime) }}</span>
4
+ <span class="time-current opacity-50">{{ formatTime(currentTime) }}</span>
5
5
  <div
6
6
  ref="progressBarContainer"
7
7
  class="progress-bar"
@@ -1,35 +1,37 @@
1
1
  <template>
2
2
  <div>
3
- <!-- Push Permission Toggle -->
3
+ <!-- Push Permission Banner -->
4
4
  <div class="bg-light radius-small pd-small mn-b-small">
5
5
  <div class="flex flex-v-center flex-between">
6
- <div class="flex flex-v-center gap-small">
6
+ <div class="w-100 flex flex-v-center gap-small">
7
7
  <div class="h4">🔔</div>
8
8
  <div class="flex-column flex gap-micro">
9
- <p class="fw-medium">Push Notifications</p>
9
+ <p class="fw-medium">Push on This Device</p>
10
10
  <p class="p-small" :class="pushStatusClass">{{ pushStatusText }}</p>
11
11
  </div>
12
12
  </div>
13
13
  <Checkbox
14
14
  mode="switch"
15
15
  :radio="pushEnabled"
16
- :disabled="pushPermission === 'denied'"
16
+ :disabled="!pushSupported"
17
17
  @update:radio="togglePush"
18
18
  class="flex-shrink-0"
19
19
  />
20
20
  </div>
21
21
  </div>
22
22
 
23
- <template v-if="pushEnabled && pushPermission === 'granted'">
24
- <p class="t-transp mn-b-small">Choose how you want to receive notifications</p>
23
+ <!-- Channel preferences always visible -->
24
+ <p class="opacity-50 mn-b-small">Choose how you want to receive notifications</p>
25
25
 
26
- <div v-if="loading" class="pd-large t-center t-transp">
27
- <Loader />
28
- </div>
26
+ <div v-if="loading" class="pd-large t-center opacity-50">
27
+ <Loader />
28
+ </div>
29
29
 
30
- <div v-else class="gap-thin flex-column flex">
30
+ <div v-else class="flex-column flex gap-small">
31
+ <!-- Standard channels -->
32
+ <div class="gap-thin flex-column flex">
31
33
  <div
32
- v-for="(enabled, channelType) in preferences"
34
+ v-for="channelType in standardChannels"
33
35
  :key="channelType"
34
36
  class="flex flex-v-center flex-between bg-light radius-small pd-small"
35
37
  >
@@ -37,42 +39,86 @@
37
39
  <div class="h4">{{ getChannelIcon(channelType) }}</div>
38
40
  <div class="flex-column flex gap-micro">
39
41
  <p class="fw-medium">{{ getChannelName(channelType) }}</p>
40
- <p class="p-small t-transp">{{ getChannelDescription(channelType) }}</p>
42
+ <p class="p-small opacity-50">{{ getChannelDescription(channelType) }}</p>
41
43
  </div>
42
44
  </div>
43
45
  <Checkbox
44
46
  mode="switch"
45
- :radio="enabled"
47
+ :radio="preferences[channelType]"
46
48
  @update:radio="updatePreference(channelType, $event)"
47
49
  class="flex-shrink-0"
48
50
  />
49
51
  </div>
52
+ </div>
50
53
 
51
- <div class="flex flex-end gap-small mn-t-thin">
52
- <Button
53
- v-if="hasChanges"
54
- :submit="resetChanges"
55
- :showLoader="false"
56
- :showSucces="false"
57
- class="bg-white t-dark"
58
- >
59
- Cancel
60
- </Button>
61
- <Button
62
- :submit="savePreferences"
63
- :validation="!hasChanges || saving"
64
- class="bg-main t-white"
65
- >
66
- {{ saving ? 'Saving...' : 'Save Changes' }}
67
- </Button>
54
+ <!-- Messengers -->
55
+ <div>
56
+ <p class="fw-medium opacity-50 mn-b-thin">Messengers</p>
57
+ <div class="gap-thin flex-column flex">
58
+ <!-- Telegram -->
59
+ <div class="flex flex-v-center flex-between bg-light radius-small pd-small">
60
+ <div class="flex w-100 flex-v-center gap-small mn-r-small">
61
+ <div class="h4">📬</div>
62
+ <div class="flex-column flex gap-micro">
63
+ <p class="fw-medium">Telegram</p>
64
+ <p class="p-small opacity-50">Receive notifications via Telegram bot</p>
65
+ </div>
66
+ </div>
67
+ <div class="flex flex-v-center gap-small flex-shrink-0">
68
+ <template v-if="telegramConnected">
69
+ <Button
70
+ :submit="handleDisconnectTelegram"
71
+ class="bg-white t-dark pd-thin pd-h-small p-small"
72
+ >Disconnect</Button>
73
+ </template>
74
+ <template v-else>
75
+ <Button
76
+ :submit="handleConnectTelegram"
77
+ :loading="telegramLinking"
78
+ class="bg-main t-white pd-thin pd-h-small p-small"
79
+ >Connect</Button>
80
+ </template>
81
+ </div>
82
+ </div>
83
+
84
+ <!-- WhatsApp -->
85
+ <div class="flex flex-v-center flex-between bg-light radius-small pd-small opacity-50">
86
+ <div class="flex w-100 flex-v-center gap-small mn-r-small">
87
+ <div class="h4">💬</div>
88
+ <div class="flex-column flex gap-micro">
89
+ <p class="fw-medium">WhatsApp</p>
90
+ <p class="p-small opacity-50">Coming soon</p>
91
+ </div>
92
+ </div>
93
+ </div>
68
94
  </div>
69
95
  </div>
70
- </template>
96
+
97
+ <!-- Save / Cancel -->
98
+ <div class="flex flex-end gap-small mn-t-thin">
99
+ <Button
100
+ v-if="hasChanges"
101
+ :submit="resetChanges"
102
+ :showLoader="false"
103
+ :showSucces="false"
104
+ class="bg-white t-dark"
105
+ >
106
+ Cancel
107
+ </Button>
108
+ <Button
109
+ :submit="savePreferences"
110
+ :validation="!hasChanges || saving"
111
+ class="bg-main t-white w-100"
112
+ >
113
+ {{ saving ? 'Saving...' : 'Save Changes' }}
114
+ </Button>
115
+ </div>
116
+ </div>
71
117
  </div>
72
118
  </template>
73
119
 
74
120
  <script setup>
75
- import { ref, reactive, computed, onMounted, inject } from 'vue';
121
+ import { ref, reactive, computed, onMounted, inject, watch } from 'vue';
76
122
  import Checkbox from '@martyrs/src/components/Checkbox/Checkbox.vue';
77
123
  import Button from '@martyrs/src/components/Button/Button.vue';
78
124
  import Loader from '@martyrs/src/components/Loader/Loader.vue';
@@ -84,6 +130,12 @@ const {
84
130
  getPreferences,
85
131
  updatePreferences,
86
132
  registerWebPush,
133
+ unregisterWebPush,
134
+ getSubscriptionState,
135
+ telegramConnected: storeTelegramConnected,
136
+ generateTelegramLink,
137
+ getTelegramStatus,
138
+ disconnectTelegram,
87
139
  } = inject('useNotifications')();
88
140
 
89
141
  // Local reactive state for form
@@ -92,45 +144,70 @@ const originalPreferences = ref({});
92
144
  const saving = ref(false);
93
145
 
94
146
  // Push permission state
95
- const pushPermission = ref(typeof window !== 'undefined' && 'Notification' in window ? Notification.permission : 'default');
96
- const pushEnabled = ref(pushPermission.value === 'granted');
147
+ const pushSupported = ref(typeof window !== 'undefined' && 'serviceWorker' in navigator && 'PushManager' in window);
148
+ const pushPermission = ref('default');
149
+ const pushEnabled = ref(false);
150
+
151
+ // Telegram state
152
+ const telegramConnected = ref(false);
153
+ const telegramLinking = ref(false);
154
+
155
+ // Watch for WS-driven telegram connection updates
156
+ watch(storeTelegramConnected, (val) => {
157
+ if (val) telegramConnected.value = true;
158
+ });
97
159
 
98
160
  const pushStatusText = computed(() => {
99
- if (pushPermission.value === 'denied') return 'Blocked by browser. Allow in site settings';
100
- if (pushEnabled.value && pushPermission.value === 'granted') return 'Notifications are enabled';
101
- return 'Enable to receive push notifications';
161
+ if (!pushSupported.value) return 'Not supported in this browser';
162
+ if (pushEnabled.value) return 'Notifications enabled on this device';
163
+ // НЕ показываем "Blocked" только по permission === 'denied' на iOS это ненадёжно
164
+ // Показываем "Blocked" только если permission denied И подписки нет
165
+ if (pushPermission.value === 'denied' && !pushEnabled.value) return 'Blocked by browser. Allow in site settings';
166
+ return 'Allow notifications on this device';
102
167
  });
103
168
 
104
169
  const pushStatusClass = computed(() => {
170
+ if (!pushSupported.value) return 'opacity-50';
171
+ if (pushEnabled.value) return 't-green';
105
172
  if (pushPermission.value === 'denied') return 't-red';
106
- if (pushEnabled.value && pushPermission.value === 'granted') return 't-green';
107
- return 't-transp';
173
+ return 'opacity-50';
108
174
  });
109
175
 
110
176
  const togglePush = async (value) => {
177
+ // Переключаем свитч сразу — optimistic UI
178
+ pushEnabled.value = value;
179
+
111
180
  if (value) {
112
- // Turning ON → request browser permission DIRECTLY in click handler
113
181
  try {
114
- const permission = await Notification.requestPermission();
115
- pushPermission.value = permission;
116
- if (permission === 'granted') {
117
- pushEnabled.value = true;
118
- // Now register subscription in background
119
- registerWebPush().catch(err => console.error('Web push registration error:', err));
120
- } else {
121
- pushEnabled.value = false;
182
+ // 1. Запрашиваем permission в контексте user gesture (ОБЯЗАТЕЛЬНО для Safari)
183
+ // НО результат НЕ проверяем — на iOS он может врать "denied"
184
+ if ('Notification' in window) {
185
+ await Notification.requestPermission();
122
186
  }
187
+ // 2. Пробуем subscribe — если реально нет разрешения, выкинет NotAllowedError
188
+ // Если iOS вернул "denied" но реально granted — subscribe сработает
189
+ await registerWebPush();
190
+ // 3. Перечитываем реальный state через надёжные API
191
+ const { permission } = await getSubscriptionState();
192
+ pushPermission.value = permission;
123
193
  } catch (error) {
124
- console.error('Push permission error:', error);
125
- pushPermission.value = Notification.permission;
194
+ console.error('Push subscribe error:', error);
195
+ // Revert — подписка не удалась
126
196
  pushEnabled.value = false;
197
+ const { permission } = await getSubscriptionState();
198
+ pushPermission.value = permission;
127
199
  }
128
200
  } else {
129
- // Turning OFF
130
- pushEnabled.value = false;
201
+ unregisterWebPush().catch(err => console.error('Push unsubscribe error:', err));
131
202
  }
132
203
  };
133
204
 
205
+ // Standard channels (exclude messengers — they have their own section)
206
+ const messengerChannels = ['telegram', 'whatsapp'];
207
+ const standardChannels = computed(() =>
208
+ Object.keys(preferences).filter(ch => !messengerChannels.includes(ch))
209
+ );
210
+
134
211
  // Computed properties
135
212
  const hasChanges = computed(() => {
136
213
  return Object.keys(preferences).some(key =>
@@ -161,6 +238,38 @@ const resetChanges = () => {
161
238
  });
162
239
  };
163
240
 
241
+ const handleConnectTelegram = async () => {
242
+ try {
243
+ telegramLinking.value = true;
244
+
245
+ // Открываем окно синхронно, пока ещё в контексте user gesture
246
+ const win = window.open('', '_blank');
247
+
248
+ const result = await generateTelegramLink();
249
+
250
+ if (result?.deepLink) {
251
+ if (win) {
252
+ win.location.href = result.deepLink;
253
+ } else {
254
+ // Fallback если всё равно заблокировали
255
+ window.location.href = result.deepLink;
256
+ }
257
+ } else {
258
+ win?.close();
259
+ }
260
+
261
+ telegramLinking.value = false;
262
+ } catch (error) {
263
+ console.error('Error generating Telegram link:', error);
264
+ telegramLinking.value = false;
265
+ }
266
+ };
267
+
268
+ const handleDisconnectTelegram = async () => {
269
+ await disconnectTelegram();
270
+ telegramConnected.value = false;
271
+ };
272
+
164
273
  const getChannelIcon = (channelType) => {
165
274
  switch (channelType) {
166
275
  case 'web': return '🖥️';
@@ -206,8 +315,29 @@ const getChannelDescription = (channelType) => {
206
315
 
207
316
  // Lifecycle
208
317
  onMounted(async () => {
318
+ // Определяем реальное состояние подписки через getSubscriptionState (robust для iOS)
319
+ if (pushSupported.value) {
320
+ try {
321
+ const { permission, subscribed } = await getSubscriptionState();
322
+ pushPermission.value = permission;
323
+ pushEnabled.value = subscribed;
324
+ } catch (e) {
325
+ console.error('Failed to get subscription state:', e);
326
+ }
327
+ }
328
+
209
329
  await getPreferences();
210
330
 
331
+ // Check Telegram connection status
332
+ try {
333
+ const tgStatus = await getTelegramStatus();
334
+ if (tgStatus) {
335
+ telegramConnected.value = tgStatus.connected;
336
+ }
337
+ } catch (e) {
338
+ console.error('Failed to get Telegram status:', e);
339
+ }
340
+
211
341
  // Copy store preferences to local state
212
342
  Object.keys(storePreferences.value).forEach(key => {
213
343
  preferences[key] = storePreferences.value[key];
@@ -1,3 +1,4 @@
1
+ import crypto from 'crypto';
1
2
  // controllers/notifications.controller.js
2
3
  const NotificationsController = (db, wss, notificationService) => {
3
4
  // Create a new notification
@@ -85,7 +86,22 @@ const NotificationsController = (db, wss, notificationService) => {
85
86
  return res.status(500).json({ message: err.message });
86
87
  }
87
88
  };
88
- // controllers/notifications.controller.js (добавить к существующему контроллеру)
89
+ // Deactivate device (set isActive: false)
90
+ const deactivateDevice = async (req, res) => {
91
+ try {
92
+ const { deviceId, userId, anonymousId } = req.body;
93
+ if (!deviceId) return res.status(400).json({ message: 'deviceId is required' });
94
+
95
+ const filter = userId ? { userId, deviceId } : anonymousId ? { anonymousId, deviceId } : { deviceId };
96
+ const result = await db.userDevice.findOneAndUpdate(filter, { $set: { isActive: false, lastActive: Date.now() } }, { new: true });
97
+
98
+ if (!result) return res.status(404).json({ message: 'Device not found' });
99
+ return res.json({ message: 'Device deactivated', device: result });
100
+ } catch (err) {
101
+ return res.status(500).json({ message: err.message });
102
+ }
103
+ };
104
+
89
105
  // Mark all notifications as read for a user
90
106
  const markAllAsRead = async (req, res) => {
91
107
  try {
@@ -122,27 +138,18 @@ const NotificationsController = (db, wss, notificationService) => {
122
138
  try {
123
139
  const { userId, anonymousId, deviceId, deviceType, deviceToken } = req.body;
124
140
 
125
- console.log('[RegisterDevice] Request:', { userId, anonymousId, deviceId, isAnonymous: !userId });
126
-
127
141
  // Validate that either userId or anonymousId is provided
128
142
  if (!userId && !anonymousId) {
129
143
  return res.status(400).json({ message: 'Either userId or anonymousId is required' });
130
144
  }
131
145
 
132
- // FIRST: Check if deviceToken is already used by another device
133
- const tokenDevice = await db.userDevice.findOne({
134
- deviceToken,
135
- $or: [
136
- { userId: { $ne: userId } },
137
- { deviceId: { $ne: deviceId } }
138
- ]
139
- });
146
+ // FIRST: Remove any existing device with the same token but different identity
147
+ // This handles anonymous→authenticated transition and device re-registration
148
+ const existingFilter = userId
149
+ ? { deviceToken, $or: [{ userId: { $exists: false } }, { userId: null }, { userId: { $ne: userId } }, { deviceId: { $ne: deviceId } }] }
150
+ : { deviceToken, $or: [{ anonymousId: { $exists: false } }, { anonymousId: null }, { anonymousId: { $ne: anonymousId } }, { deviceId: { $ne: deviceId } }] };
140
151
 
141
- if (tokenDevice) {
142
- // This token is already registered to another device, remove it
143
- console.log('[RegisterDevice] Token exists for different device, removing:', tokenDevice._id);
144
- await tokenDevice.deleteOne();
145
- }
152
+ await db.userDevice.deleteMany(existingFilter);
146
153
 
147
154
  // Use atomic findOneAndUpdate with upsert to avoid race condition
148
155
  const filter = userId
@@ -172,7 +179,6 @@ const NotificationsController = (db, wss, notificationService) => {
172
179
  }
173
180
  );
174
181
 
175
- console.log('[RegisterDevice] Device upserted:', device._id);
176
182
  return res.status(200).json(device);
177
183
  } catch (err) {
178
184
  console.error('[RegisterDevice] Error:', err.message);
@@ -320,17 +326,236 @@ const NotificationsController = (db, wss, notificationService) => {
320
326
  }
321
327
  };
322
328
 
329
+ // Update subscription when endpoint rotates (pushsubscriptionchange from SW)
330
+ const updateSubscription = async (req, res) => {
331
+ try {
332
+ const { oldEndpoint, newSubscription } = req.body;
333
+
334
+ if (!oldEndpoint || !newSubscription) {
335
+ return res.status(400).json({ message: 'oldEndpoint and newSubscription are required' });
336
+ }
337
+
338
+ const newToken = JSON.stringify(newSubscription);
339
+
340
+ // Find device by old endpoint (stored as JSON in deviceToken)
341
+ const devices = await db.userDevice.find({ deviceType: 'web', isActive: true });
342
+ let updated = false;
343
+
344
+ for (const device of devices) {
345
+ try {
346
+ const parsed = JSON.parse(device.deviceToken);
347
+ if (parsed.endpoint === oldEndpoint) {
348
+ device.deviceToken = newToken;
349
+ device.lastActive = Date.now();
350
+ await device.save();
351
+ updated = true;
352
+ console.log('[UpdateSubscription] Updated device:', device._id);
353
+ break;
354
+ }
355
+ } catch (e) {}
356
+ }
357
+
358
+ if (!updated) {
359
+ return res.status(404).json({ message: 'Device with old endpoint not found' });
360
+ }
361
+
362
+ return res.json({ message: 'Subscription updated' });
363
+ } catch (err) {
364
+ console.error('[UpdateSubscription] Error:', err.message);
365
+ return res.status(500).json({ message: err.message });
366
+ }
367
+ };
368
+
369
+ // Generate a Telegram deep link for user to connect their account
370
+ const generateTelegramLink = async (req, res) => {
371
+ try {
372
+ const { userId } = req.body;
373
+ if (!userId) return res.status(400).json({ message: 'userId is required' });
374
+
375
+ const botUsername = process.env.TELEGRAM_BOT_USERNAME;
376
+ if (!botUsername) return res.status(500).json({ message: 'TELEGRAM_BOT_USERNAME not configured' });
377
+
378
+ const token = crypto.randomBytes(32).toString('hex');
379
+ const expiry = new Date(Date.now() + 10 * 60 * 1000); // 10 minutes
380
+
381
+ // Upsert telegram preference with link token
382
+ await db.notificationPreference.findOneAndUpdate(
383
+ { userId, channelType: 'telegram', notificationType: 'all' },
384
+ { $set: { telegramLinkToken: token, telegramLinkExpiry: expiry } },
385
+ { upsert: true, new: true }
386
+ );
387
+
388
+ const deepLink = `https://t.me/${botUsername}?start=${token}`;
389
+ return res.json({ deepLink, expiresAt: expiry });
390
+ } catch (err) {
391
+ return res.status(500).json({ message: err.message });
392
+ }
393
+ };
394
+
395
+ // Get Telegram connection status for a user
396
+ const getTelegramStatus = async (req, res) => {
397
+ try {
398
+ const { userId } = req.params;
399
+ const pref = await db.notificationPreference.findOne({
400
+ userId, channelType: 'telegram', notificationType: 'all'
401
+ });
402
+ return res.json({
403
+ connected: !!pref?.telegramChatId,
404
+ chatId: pref?.telegramChatId || null,
405
+ });
406
+ } catch (err) {
407
+ return res.status(500).json({ message: err.message });
408
+ }
409
+ };
410
+
411
+ // Disconnect Telegram
412
+ const disconnectTelegram = async (req, res) => {
413
+ try {
414
+ const { userId } = req.body;
415
+ if (!userId) return res.status(400).json({ message: 'userId is required' });
416
+
417
+ await db.notificationPreference.findOneAndUpdate(
418
+ { userId, channelType: 'telegram', notificationType: 'all' },
419
+ { $set: { telegramChatId: null, isEnabled: false } }
420
+ );
421
+ return res.json({ message: 'Telegram disconnected' });
422
+ } catch (err) {
423
+ return res.status(500).json({ message: err.message });
424
+ }
425
+ };
426
+
427
+ // Telegram bot webhook — receives updates from Telegram
428
+ const telegramWebhook = async (req, res) => {
429
+ try {
430
+ const update = req.body;
431
+
432
+ // Handle inline keyboard callback queries (Confirm/Cancel order buttons)
433
+ if (update?.callback_query) {
434
+ const callbackQuery = update.callback_query;
435
+ const data = callbackQuery.data; // e.g. "order_confirm:orderId" or "order_cancel:orderId"
436
+ const chatId = callbackQuery.message?.chat?.id?.toString();
437
+ const messageId = callbackQuery.message?.message_id;
438
+
439
+ const { sendChatMessageTelegram } = await import('@martyrs/src/modules/core/controllers/utils/mailing.js');
440
+
441
+ // Answer callback query to remove loading state
442
+ const telegramToken = process.env.TELEGRAM_BOT_TOKEN;
443
+ await fetch(`https://api.telegram.org/bot${telegramToken}/answerCallbackQuery`, {
444
+ method: 'POST',
445
+ headers: { 'Content-Type': 'application/json' },
446
+ body: JSON.stringify({ callback_query_id: callbackQuery.id }),
447
+ }).catch(() => {});
448
+
449
+ if (data?.startsWith('order_confirm:') || data?.startsWith('order_cancel:')) {
450
+ const [actionPart, orderId] = data.split(':');
451
+ const action = actionPart === 'order_confirm' ? 'confirm' : 'cancel';
452
+
453
+ try {
454
+ const response = await fetch(`${process.env.API_URL || ''}/api/orders/telegram-action`, {
455
+ method: 'POST',
456
+ headers: {
457
+ 'Content-Type': 'application/json',
458
+ 'X-Service-Key': process.env.SERVICE_KEY,
459
+ },
460
+ body: JSON.stringify({ action, orderId }),
461
+ });
462
+
463
+ const result = await response.json();
464
+
465
+ // Remove inline keyboard buttons from the message
466
+ const statusEmoji = action === 'confirm' ? '✅' : '❌';
467
+ const statusText = action === 'confirm' ? 'CONFIRMED' : 'CANCELLED';
468
+
469
+ await fetch(`https://api.telegram.org/bot${telegramToken}/editMessageReplyMarkup`, {
470
+ method: 'POST',
471
+ headers: { 'Content-Type': 'application/json' },
472
+ body: JSON.stringify({
473
+ chat_id: chatId,
474
+ message_id: messageId,
475
+ reply_markup: { inline_keyboard: [[
476
+ { text: `${statusEmoji} ${statusText}`, callback_data: 'noop' }
477
+ ]] },
478
+ }),
479
+ }).catch(e => console.error('[Telegram] Failed to edit message:', e.message));
480
+
481
+ if (!response.ok) {
482
+ await sendChatMessageTelegram([chatId], `⚠️ ${result.message || 'Failed to process action'}`);
483
+ }
484
+ } catch (err) {
485
+ console.error('[Telegram Callback] Action error:', err);
486
+ await sendChatMessageTelegram([chatId], '⚠️ Error processing order action');
487
+ }
488
+ }
489
+
490
+ return res.json({ ok: true });
491
+ }
492
+
493
+ // Only handle /start messages
494
+ const message = update?.message;
495
+ if (!message?.text?.startsWith('/start ')) {
496
+ return res.json({ ok: true });
497
+ }
498
+
499
+ const token = message.text.replace('/start ', '').trim();
500
+ const chatId = message.chat.id.toString();
501
+
502
+ // Find preference with matching token
503
+ const pref = await db.notificationPreference.findOne({
504
+ channelType: 'telegram',
505
+ telegramLinkToken: token,
506
+ telegramLinkExpiry: { $gt: new Date() },
507
+ });
508
+
509
+ if (!pref) {
510
+ // Token invalid or expired — send message via bot
511
+ const { sendChatMessageTelegram } = await import('@martyrs/src/modules/core/controllers/utils/mailing.js');
512
+ await sendChatMessageTelegram([chatId], 'Link expired or invalid. Please generate a new link in notification settings.');
513
+ return res.json({ ok: true });
514
+ }
515
+
516
+ // Link successful — save chatId, clear token, enable
517
+ pref.telegramChatId = chatId;
518
+ pref.telegramLinkToken = null;
519
+ pref.telegramLinkExpiry = null;
520
+ pref.isEnabled = true;
521
+ await pref.save();
522
+
523
+ // Send confirmation to user
524
+ const { sendChatMessageTelegram } = await import('@martyrs/src/modules/core/controllers/utils/mailing.js');
525
+ await sendChatMessageTelegram([chatId], '✅ Telegram connected! You will now receive notifications here.');
526
+
527
+ // Notify frontend via WebSocket
528
+ if (wss) {
529
+ wss.sendToUserInModule('notification', pref.userId, {
530
+ type: 'telegram_connected',
531
+ data: { chatId },
532
+ });
533
+ }
534
+
535
+ return res.json({ ok: true });
536
+ } catch (err) {
537
+ console.error('[Telegram Webhook] Error:', err);
538
+ return res.json({ ok: true }); // Always return 200 to Telegram
539
+ }
540
+ };
541
+
323
542
  return {
324
543
  create,
325
544
  createBatch,
326
545
  getUserNotifications,
327
546
  markAsRead,
328
547
  registerDevice,
548
+ deactivateDevice,
549
+ updateSubscription,
329
550
  updatePreferences,
330
551
  getUserPreferences,
331
552
  markAllAsRead,
332
553
  sendToTokens,
333
554
  sendToAnonymous,
555
+ generateTelegramLink,
556
+ getTelegramStatus,
557
+ disconnectTelegram,
558
+ telegramWebhook,
334
559
  };
335
560
  };
336
561
  export default NotificationsController;
@@ -8,6 +8,10 @@ export default (db, additionalFields = {}) => {
8
8
  },
9
9
  notificationType: { type: String, required: true }, // Type of notification (alerts, promotions, etc.)
10
10
  isEnabled: { type: Boolean, default: true },
11
+ // Telegram-specific fields
12
+ telegramChatId: { type: String, default: null },
13
+ telegramLinkToken: { type: String, default: null },
14
+ telegramLinkExpiry: { type: Date, default: null },
11
15
  });
12
16
  schema.index({ userId: 1, channelType: 1, notificationType: 1 }, { unique: true });
13
17
  return db.mongoose.model('NotificationPreference', schema);