@ozdao/martyrs 0.2.522 → 0.2.524

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 (309) hide show
  1. package/dist/_virtual/index.cjs +4 -4
  2. package/dist/_virtual/index.js +4 -4
  3. package/dist/_virtual/index2.cjs +4 -4
  4. package/dist/_virtual/index2.js +4 -4
  5. package/dist/auth.server.cjs +1 -1
  6. package/dist/auth.server.js +1 -1
  7. package/dist/chats.server.cjs +22 -4
  8. package/dist/chats.server.js +22 -4
  9. package/dist/events.server.cjs +1 -1
  10. package/dist/events.server.js +1 -1
  11. package/dist/globals.server.cjs +40 -0
  12. package/dist/globals.server.js +40 -0
  13. package/dist/{mailing-Bs9ThyVZ.cjs → mailing-DCvDBHVh.cjs} +0 -3
  14. package/dist/{mailing-DzlhsxCC.js → mailing-DuEFRsa3.js} +0 -3
  15. package/dist/martyrs/src/components/Button/{Button.vue2.cjs → Button.vue.cjs} +2 -2
  16. package/dist/martyrs/src/components/Button/{Button.vue2.js.map → Button.vue.cjs.map} +1 -1
  17. package/dist/martyrs/src/components/Button/{Button.vue2.js → Button.vue.js} +2 -2
  18. package/dist/martyrs/src/components/Button/Button.vue.js.map +1 -0
  19. package/dist/martyrs/src/components/Chips/{Chips.vue2.cjs → Chips.vue.cjs} +2 -2
  20. package/dist/martyrs/src/components/Chips/Chips.vue.cjs.map +1 -0
  21. package/dist/martyrs/src/components/Chips/{Chips.vue2.js → Chips.vue.js} +2 -2
  22. package/dist/martyrs/src/components/Chips/Chips.vue.js.map +1 -0
  23. package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs +0 -93
  24. package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs.map +1 -1
  25. package/dist/martyrs/src/components/EditImages/EditImages.vue.js +1 -94
  26. package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -1
  27. package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs +93 -0
  28. package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs.map +1 -1
  29. package/dist/martyrs/src/components/EditImages/EditImages.vue2.js +94 -1
  30. package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +1 -1
  31. package/dist/martyrs/src/components/Feed/Feed.vue.cjs +1 -1
  32. package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
  33. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  34. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +1 -1
  35. package/dist/martyrs/src/components/FieldTags/FieldTags.vue.cjs +1 -1
  36. package/dist/martyrs/src/components/FieldTags/FieldTags.vue.js +1 -1
  37. package/dist/martyrs/src/components/Select/{Select.vue.cjs → Select.vue2.cjs} +2 -2
  38. package/dist/martyrs/src/components/Select/Select.vue2.cjs.map +1 -0
  39. package/dist/martyrs/src/components/Select/{Select.vue.js → Select.vue2.js} +2 -2
  40. package/dist/martyrs/src/components/Select/{Select.vue.cjs.map → Select.vue2.js.map} +1 -1
  41. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
  42. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
  43. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
  44. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
  45. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +1 -1
  46. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +1 -1
  47. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs +1 -1
  48. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +1 -1
  49. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +1 -1
  50. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +1 -1
  51. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
  52. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
  53. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -1
  54. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
  55. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
  56. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
  57. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +1 -1
  58. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
  59. package/dist/martyrs/src/modules/auth/views/store/auth.cjs +4 -2
  60. package/dist/martyrs/src/modules/auth/views/store/auth.cjs.map +1 -1
  61. package/dist/martyrs/src/modules/auth/views/store/auth.js +4 -2
  62. package/dist/martyrs/src/modules/auth/views/store/auth.js.map +1 -1
  63. package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.cjs +5 -1
  64. package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.cjs.map +1 -1
  65. package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.js +5 -1
  66. package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.js.map +1 -1
  67. package/dist/martyrs/src/modules/chats/store/chat.store.cjs +38 -11
  68. package/dist/martyrs/src/modules/chats/store/chat.store.cjs.map +1 -1
  69. package/dist/martyrs/src/modules/chats/store/chat.store.js +38 -11
  70. package/dist/martyrs/src/modules/chats/store/chat.store.js.map +1 -1
  71. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  72. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  73. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  74. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +1 -1
  75. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +2 -2
  76. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +2 -2
  77. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +2 -2
  78. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  79. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  80. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  81. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  82. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  83. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  84. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  85. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
  86. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  87. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  88. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  89. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +2 -2
  90. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +2 -2
  91. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +4 -4
  92. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +4 -4
  93. package/dist/martyrs/src/modules/globals/globals.client.cjs +1 -1
  94. package/dist/martyrs/src/modules/globals/globals.client.cjs.map +1 -1
  95. package/dist/martyrs/src/modules/globals/globals.client.js +1 -1
  96. package/dist/martyrs/src/modules/globals/globals.client.js.map +1 -1
  97. package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.cjs +1 -1
  98. package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.js +1 -1
  99. package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs +29 -4
  100. package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs.map +1 -1
  101. package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js +29 -4
  102. package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js.map +1 -1
  103. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
  104. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
  105. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.cjs +1 -1
  106. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.js +1 -1
  107. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +1 -1
  108. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
  109. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
  110. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +1 -1
  111. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +2 -2
  112. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +2 -2
  113. package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
  114. package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
  115. package/dist/martyrs/src/modules/globals/views/components/sections/{Filters.vue.cjs → Filters.vue2.cjs} +2 -2
  116. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs.map +1 -0
  117. package/dist/martyrs/src/modules/globals/views/components/sections/{Filters.vue.js → Filters.vue2.js} +2 -2
  118. package/dist/martyrs/src/modules/globals/views/components/sections/{Filters.vue.cjs.map → Filters.vue2.js.map} +1 -1
  119. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.cjs +2 -2
  120. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +2 -2
  121. package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.cjs +1 -1
  122. package/dist/martyrs/src/modules/inventory/components/forms/ColumnSettingsMenu.vue.js +1 -1
  123. package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.cjs +1 -1
  124. package/dist/martyrs/src/modules/inventory/components/forms/HistoryView.vue.js +1 -1
  125. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.cjs +2 -2
  126. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +2 -2
  127. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs +1 -1
  128. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js +1 -1
  129. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.cjs +2 -2
  130. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +2 -2
  131. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs +1 -1
  132. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +1 -1
  133. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.cjs +1 -1
  134. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +1 -1
  135. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs +1 -1
  136. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +1 -1
  137. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.cjs +1 -1
  138. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +1 -1
  139. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.cjs +2 -2
  140. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +2 -2
  141. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +2 -2
  142. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +2 -2
  143. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs +1 -1
  144. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +1 -1
  145. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs +1 -1
  146. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
  147. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs +2 -2
  148. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +2 -2
  149. package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs +1 -1
  150. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +1 -1
  151. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs +1 -1
  152. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +1 -1
  153. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs +1 -1
  154. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
  155. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs +1 -1
  156. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +1 -1
  157. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs +1 -1
  158. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +1 -1
  159. package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs +1 -1
  160. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +1 -1
  161. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.cjs +1 -1
  162. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
  163. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs +1 -1
  164. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +1 -1
  165. package/dist/martyrs/src/modules/music/router/music.cjs +2 -2
  166. package/dist/martyrs/src/modules/music/router/music.js +2 -2
  167. package/dist/martyrs/src/modules/notifications/notifications.client.cjs +14 -3
  168. package/dist/martyrs/src/modules/notifications/notifications.client.cjs.map +1 -1
  169. package/dist/martyrs/src/modules/notifications/notifications.client.js +14 -3
  170. package/dist/martyrs/src/modules/notifications/notifications.client.js.map +1 -1
  171. package/dist/martyrs/src/modules/notifications/store/notifications.store.cjs +2 -0
  172. package/dist/martyrs/src/modules/notifications/store/notifications.store.cjs.map +1 -1
  173. package/dist/martyrs/src/modules/notifications/store/notifications.store.js +2 -0
  174. package/dist/martyrs/src/modules/notifications/store/notifications.store.js.map +1 -1
  175. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.cjs +2 -2
  176. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +2 -2
  177. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs +2 -2
  178. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +2 -2
  179. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.cjs +1 -1
  180. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +1 -1
  181. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +2 -2
  182. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
  183. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  184. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  185. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  186. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  187. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.cjs +1 -1
  188. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +1 -1
  189. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.cjs +1 -1
  190. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +1 -1
  191. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  192. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  193. package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  194. package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  195. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  196. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  197. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  198. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  199. package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.cjs +1 -1
  200. package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js +1 -1
  201. package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.cjs +1 -1
  202. package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +1 -1
  203. package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.cjs +1 -1
  204. package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +1 -1
  205. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  206. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  207. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
  208. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  209. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  210. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  211. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +2 -2
  212. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  213. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  214. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  215. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
  216. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
  217. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
  218. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  219. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
  220. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  221. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.cjs +1 -1
  222. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js +1 -1
  223. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +40 -19
  224. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs.map +1 -1
  225. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +40 -19
  226. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js.map +1 -1
  227. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +3 -3
  228. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
  229. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +1 -1
  230. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
  231. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +3 -3
  232. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  233. package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +1 -1
  234. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +1 -1
  235. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.cjs +1 -1
  236. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
  237. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.cjs +2 -2
  238. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +2 -2
  239. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +3 -3
  240. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +3 -3
  241. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.cjs +1 -1
  242. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
  243. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs +1 -1
  244. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +1 -1
  245. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  246. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  247. package/dist/martyrs/src/modules/products/store/categories.cjs +2 -4
  248. package/dist/martyrs/src/modules/products/store/categories.cjs.map +1 -1
  249. package/dist/martyrs/src/modules/products/store/categories.js +2 -4
  250. package/dist/martyrs/src/modules/products/store/categories.js.map +1 -1
  251. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.cjs +1 -1
  252. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
  253. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +2 -2
  254. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  255. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  256. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  257. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  258. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  259. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  260. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
  261. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
  262. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
  263. package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.cjs +1 -1
  264. package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.cjs.map +1 -1
  265. package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js +1 -1
  266. package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js.map +1 -1
  267. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +2 -2
  268. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +2 -2
  269. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  270. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  271. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +3 -3
  272. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
  273. package/dist/notifications.server.cjs +21 -33
  274. package/dist/notifications.server.js +21 -33
  275. package/dist/orders.server.cjs +1 -1
  276. package/dist/orders.server.js +1 -1
  277. package/dist/organizations.server.cjs +1 -1
  278. package/dist/organizations.server.js +1 -1
  279. package/dist/products.server.cjs +98 -34
  280. package/dist/products.server.js +98 -34
  281. package/dist/{tickets.controller-DdnndM6c.cjs → tickets.controller-9zoaVPcx.cjs} +1 -1
  282. package/dist/{tickets.controller-C56OvH6v.js → tickets.controller-C8sWVqbB.js} +1 -1
  283. package/dist/wallet.server.cjs +1 -1
  284. package/dist/wallet.server.js +1 -1
  285. package/package.json +1 -1
  286. package/src/modules/auth/views/store/auth.js +6 -10
  287. package/src/modules/chats/components/sections/ChatWindow.vue +10 -1
  288. package/src/modules/chats/models/chat.model.js +5 -1
  289. package/src/modules/chats/routes/chats.routes.js +17 -2
  290. package/src/modules/chats/store/chat.store.js +49 -11
  291. package/src/modules/globals/controllers/classes/globals.websocket.js +56 -2
  292. package/src/modules/globals/controllers/utils/mailing.js +0 -4
  293. package/src/modules/globals/globals.client.js +3 -4
  294. package/src/modules/globals/views/classes/globals.websocket.js +40 -4
  295. package/src/modules/notifications/controllers/notifications.controller.js +27 -36
  296. package/src/modules/notifications/notifications.client.js +17 -4
  297. package/src/modules/notifications/store/notifications.store.js +2 -0
  298. package/src/modules/products/components/pages/Categories.vue +46 -23
  299. package/src/modules/products/controllers/categories.controller.js +117 -40
  300. package/src/modules/products/middlewares/categories.verifier.js +8 -1
  301. package/src/modules/products/store/categories.js +2 -4
  302. package/src/modules/spots/components/pages/Spots.vue +1 -1
  303. package/dist/martyrs/src/components/Button/Button.vue2.cjs.map +0 -1
  304. package/dist/martyrs/src/components/Chips/Chips.vue2.cjs.map +0 -1
  305. package/dist/martyrs/src/components/Chips/Chips.vue2.js.map +0 -1
  306. package/dist/martyrs/src/components/Select/Select.vue.js.map +0 -1
  307. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue.js.map +0 -1
  308. package/src/modules/chats/CLAUDE.md +0 -137
  309. package/src/modules/globals/views/classes/globals.websocket.ws.js +0 -212
@@ -6,11 +6,11 @@ const Block = require("../../../../components/Block/Block.vue.cjs");
6
6
  const UploadImage = require("../../../../components/UploadImage/UploadImage.vue.cjs");
7
7
  ;/* empty css */
8
8
  const Field = require("../../../../components/Field/Field.vue.cjs");
9
- const Select = require("../../../../components/Select/Select.vue.cjs");
9
+ const Select = require("../../../../components/Select/Select.vue2.cjs");
10
10
  const Checkbox = require("../../../../components/Checkbox/Checkbox.vue.cjs");
11
11
  const Address = require("../../../../components/Address/Address.vue.cjs");
12
12
  const LocationMarker = require("../../../../components/LocationMarker/LocationMarker.vue.cjs");
13
- const Button = require("../../../../components/Button/Button.vue2.cjs");
13
+ const Button = require("../../../../components/Button/Button.vue.cjs");
14
14
  ;/* empty css */
15
15
  const WorktimeEdit = require("../sections/WorktimeEdit.vue.cjs");
16
16
  const spots = require("../../store/spots.cjs");
@@ -4,11 +4,11 @@ import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
4
4
  import _sfc_main$3 from "../../../../components/UploadImage/UploadImage.vue.js";
5
5
  /* empty css */
6
6
  import Field from "../../../../components/Field/Field.vue.js";
7
- import Select from "../../../../components/Select/Select.vue.js";
7
+ import Select from "../../../../components/Select/Select.vue2.js";
8
8
  import _sfc_main$4 from "../../../../components/Checkbox/Checkbox.vue.js";
9
9
  import _sfc_main$5 from "../../../../components/Address/Address.vue.js";
10
10
  import _sfc_main$6 from "../../../../components/LocationMarker/LocationMarker.vue.js";
11
- import _sfc_main$2 from "../../../../components/Button/Button.vue2.js";
11
+ import _sfc_main$2 from "../../../../components/Button/Button.vue.js";
12
12
  /* empty css */
13
13
  import WorktimeEdit from "../sections/WorktimeEdit.vue.js";
14
14
  import { actions, state } from "../../store/spots.js";
@@ -58,7 +58,7 @@ const _sfc_main = {
58
58
  vue.unref(hasAccess)(vue.unref(route).params._id, "spots", "create", auth.state.accesses, auth.state.access.roles) ? (vue.openBlock(), vue.createElementBlock("button", {
59
59
  key: 0,
60
60
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$router.push({
61
- name: vue.unref(route).params?._id ? "Organization_SpotAdd" : "SpotAdd"
61
+ name: vue.unref(route).params?._id ? "Spot Creation" : "Spot Creation"
62
62
  })),
63
63
  class: "radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"
64
64
  }, " + ")) : vue.createCommentVNode("", true)
@@ -1 +1 @@
1
- {"version":3,"file":"Spots.vue.cjs","sources":["../../../../../../../src/modules/spots/components/pages/Spots.vue"],"sourcesContent":["<template>\n <div class=\"pos-relative\">\n <header \n v-if=\"route.name !== 'Organization' && !MOBILE_APP\"\n class=\"pd-medium flex-v-center flex-nowrap flex\"\n >\n <h2 class=\"mn-r-medium\">Spots</h2>\n <button \n v-if=\"hasAccess(route.params._id, 'spots', 'create', auth.state.accesses, auth.state.access.roles)\"\n @click=\"$router.push({\n name: route.params?._id ? 'Organization_SpotAdd' : 'SpotAdd'\n })\" \n class=\"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second\">\n +\n </button>\n </header>\n\n <div class=\"w-100 rows-1 pd-thin pos-relative o-hidden\">\n \n <div class=\"mn-b-thin w-100 o-y-scroll scroll-hide scroll-snap-type-x-mandatory scroll-pd-regular\">\n <div class=\"gap-thin flex-nowrap flex\">\n <div\n v-for=\"category in currentCategories\"\n :key=\"category._id\"\n @click=\"selectCategory(category)\"\n class=\"flex-child-default bg-light flex t-nowrap pd-medium radius-medium cursor-pointer hover-bg-light transition-all\"\n >\n {{ category.name }}\n </div>\n </div>\n </div>\n\n <Feed\n :search=\"true\"\n v-model:filter=\"spots.state.filter\"\n v-model:sort=\"spots.state.sort\"\n :showLoadMore=\"false\"\n :states=\"{\n empty: {\n title: 'No Spots Found',\n description: 'Currently, there are no spots available.'\n }\n }\"\n :store=\"{\n read: (options) => spots.actions.read(options),\n state: spots.state\n }\"\n :options=\"{\n limit: 12,\n organization: route.params._id || null,\n user: auth.state.user._id,\n search: route.query.search\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"cols-1 pos-relative w-100 rows-1 gap-thin\"\n >\n <CardSpot\n v-for=\"(spot, index) in items\"\n :key=\"index\"\n :spot=\"spot\"\n :organization=\"organization\"\n :editAccess=\"hasAccess(route.params._id, 'spots', 'edit', auth.state.accesses, auth.state.access.roles)\"\n :showDeliveryOptions=\"true\"\n :showPaymentOptions=\"true\"\n class=\"radius-medium h-min-big bg-light\"\n @click=\"$router.push({ \n name: route.params._id ? 'Organization_Spot' : 'Spot', \n params: { \n _id: route.params._id,\n spot: spot._id \n } \n })\"\n />\n </Feed>\n\n </div>\n </div>\n</template>\n\n<script setup=\"props\">\n // Import libs\n import { ref, computed, watch, onMounted, onUnmounted } from 'vue'\n import { useRoute, useRouter } from 'vue-router'\n\n // Import components\n import Feed from '@martyrs/src/components/Feed/Feed.vue'\n\n import CardSpot from '@martyrs/src/modules/spots/components/blocks/CardSpot.vue'\n\n import IconPlus from '@martyrs/src/modules/icons/navigation/IconPlus.vue'\n\n // Accessing router and store\n import * as auth from '@martyrs/src/modules/auth/views/store/auth.js';\n import * as globals from '@martyrs/src/modules/globals/views/store/globals.js';\n import * as spots from '@martyrs/src/modules/spots/store/spots.js';\n import * as organizations from '@martyrs/src/modules/organizations/store/organizations.js';\n import { useGlobalMixins } from '@martyrs/src/modules/globals/views/mixins/mixins.js';\n\n const route = useRoute()\n const router = useRouter()\n const { hasAccess } = useGlobalMixins()\n\n // Props\n const props = defineProps({\n organization: {\n type: Object,\n default: null\n }\n })\n\n // Categories for mobile view\n const currentCategories = ref([]);\n\n const selectCategory = (category) => {\n // Implementation for category selection\n console.log('Category selected:', category);\n };\n\n globals.state.navigation_bar.actions = [{\n component: IconPlus,\n props: {\n fill: \"rgb(var(--main))\" \n },\n condition: () => auth.state.user && auth.state.user._id,\n action: () => route.params._id ? router.push({ name: 'Organization_SpotAdd', params: { _id: route.params._id} }) : router.push({ name: 'SpotAdd' })\n }]\n\n onMounted(async () => {\n if (route.params._id) {\n await organizations.actions.read({ _id: route.params._id });\n }\n })\n\n onUnmounted(() => {\n globals.state.navigation_bar.actions = [];\n });\n</script>\n\n<style lang=\"scss\">\n</style>"],"names":["useRoute","useRouter","useGlobalMixins","ref","globals.state","IconPlus","auth.state","onMounted","organizations.actions","onUnmounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoGE,UAAM,QAAQA,UAAAA,SAAQ;AACtB,UAAM,SAASC,UAAAA,UAAS;AACxB,UAAM,EAAE,UAAS,IAAKC,OAAAA,gBAAe;AAWrC,UAAM,oBAAoBC,IAAAA,IAAI,EAAE;AAEhC,UAAM,iBAAiB,CAAC,aAAa;AAEnC,cAAQ,IAAI,sBAAsB,QAAQ;AAAA,IAC5C;AAEAC,kBAAc,eAAe,UAAU,CAAC;AAAA,MACtC,WAAWC,SAAAA;AAAAA,MACX,OAAO;AAAA,QACL,MAAM;AAAA,MACZ;AAAA,MACI,WAAW,MAAMC,KAAAA,MAAW,QAAQA,KAAAA,MAAW,KAAK;AAAA,MACpD,QAAQ,MAAM,MAAM,OAAO,MAAM,OAAO,KAAK,EAAE,MAAM,wBAAwB,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG,EAAC,CAAE,IAAI,OAAO,KAAK,EAAE,MAAM,UAAS,CAAE;AAAA,IACtJ,CAAG;AAEDC,QAAAA,UAAU,YAAY;AACpB,UAAI,MAAM,OAAO,KAAK;AACpB,cAAMC,cAAAA,QAAsB,KAAK,EAAE,KAAK,MAAM,OAAO,KAAK;AAAA,MAC5D;AAAA,IACF,CAAC;AAEDC,QAAAA,YAAY,MAAM;AAChBL,oBAAc,eAAe,UAAU,CAAA;AAAA,IACzC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Spots.vue.cjs","sources":["../../../../../../../src/modules/spots/components/pages/Spots.vue"],"sourcesContent":["<template>\n <div class=\"pos-relative\">\n <header \n v-if=\"route.name !== 'Organization' && !MOBILE_APP\"\n class=\"pd-medium flex-v-center flex-nowrap flex\"\n >\n <h2 class=\"mn-r-medium\">Spots</h2>\n <button \n v-if=\"hasAccess(route.params._id, 'spots', 'create', auth.state.accesses, auth.state.access.roles)\"\n @click=\"$router.push({\n name: route.params?._id ? 'Spot Creation' : 'Spot Creation'\n })\" \n class=\"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second\">\n +\n </button>\n </header>\n\n <div class=\"w-100 rows-1 pd-thin pos-relative o-hidden\">\n \n <div class=\"mn-b-thin w-100 o-y-scroll scroll-hide scroll-snap-type-x-mandatory scroll-pd-regular\">\n <div class=\"gap-thin flex-nowrap flex\">\n <div\n v-for=\"category in currentCategories\"\n :key=\"category._id\"\n @click=\"selectCategory(category)\"\n class=\"flex-child-default bg-light flex t-nowrap pd-medium radius-medium cursor-pointer hover-bg-light transition-all\"\n >\n {{ category.name }}\n </div>\n </div>\n </div>\n\n <Feed\n :search=\"true\"\n v-model:filter=\"spots.state.filter\"\n v-model:sort=\"spots.state.sort\"\n :showLoadMore=\"false\"\n :states=\"{\n empty: {\n title: 'No Spots Found',\n description: 'Currently, there are no spots available.'\n }\n }\"\n :store=\"{\n read: (options) => spots.actions.read(options),\n state: spots.state\n }\"\n :options=\"{\n limit: 12,\n organization: route.params._id || null,\n user: auth.state.user._id,\n search: route.query.search\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"cols-1 pos-relative w-100 rows-1 gap-thin\"\n >\n <CardSpot\n v-for=\"(spot, index) in items\"\n :key=\"index\"\n :spot=\"spot\"\n :organization=\"organization\"\n :editAccess=\"hasAccess(route.params._id, 'spots', 'edit', auth.state.accesses, auth.state.access.roles)\"\n :showDeliveryOptions=\"true\"\n :showPaymentOptions=\"true\"\n class=\"radius-medium h-min-big bg-light\"\n @click=\"$router.push({ \n name: route.params._id ? 'Organization_Spot' : 'Spot', \n params: { \n _id: route.params._id,\n spot: spot._id \n } \n })\"\n />\n </Feed>\n\n </div>\n </div>\n</template>\n\n<script setup=\"props\">\n // Import libs\n import { ref, computed, watch, onMounted, onUnmounted } from 'vue'\n import { useRoute, useRouter } from 'vue-router'\n\n // Import components\n import Feed from '@martyrs/src/components/Feed/Feed.vue'\n\n import CardSpot from '@martyrs/src/modules/spots/components/blocks/CardSpot.vue'\n\n import IconPlus from '@martyrs/src/modules/icons/navigation/IconPlus.vue'\n\n // Accessing router and store\n import * as auth from '@martyrs/src/modules/auth/views/store/auth.js';\n import * as globals from '@martyrs/src/modules/globals/views/store/globals.js';\n import * as spots from '@martyrs/src/modules/spots/store/spots.js';\n import * as organizations from '@martyrs/src/modules/organizations/store/organizations.js';\n import { useGlobalMixins } from '@martyrs/src/modules/globals/views/mixins/mixins.js';\n\n const route = useRoute()\n const router = useRouter()\n const { hasAccess } = useGlobalMixins()\n\n // Props\n const props = defineProps({\n organization: {\n type: Object,\n default: null\n }\n })\n\n // Categories for mobile view\n const currentCategories = ref([]);\n\n const selectCategory = (category) => {\n // Implementation for category selection\n console.log('Category selected:', category);\n };\n\n globals.state.navigation_bar.actions = [{\n component: IconPlus,\n props: {\n fill: \"rgb(var(--main))\" \n },\n condition: () => auth.state.user && auth.state.user._id,\n action: () => route.params._id ? router.push({ name: 'Organization_SpotAdd', params: { _id: route.params._id} }) : router.push({ name: 'SpotAdd' })\n }]\n\n onMounted(async () => {\n if (route.params._id) {\n await organizations.actions.read({ _id: route.params._id });\n }\n })\n\n onUnmounted(() => {\n globals.state.navigation_bar.actions = [];\n });\n</script>\n\n<style lang=\"scss\">\n</style>"],"names":["useRoute","useRouter","useGlobalMixins","ref","globals.state","IconPlus","auth.state","onMounted","organizations.actions","onUnmounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoGE,UAAM,QAAQA,UAAAA,SAAQ;AACtB,UAAM,SAASC,UAAAA,UAAS;AACxB,UAAM,EAAE,UAAS,IAAKC,OAAAA,gBAAe;AAWrC,UAAM,oBAAoBC,IAAAA,IAAI,EAAE;AAEhC,UAAM,iBAAiB,CAAC,aAAa;AAEnC,cAAQ,IAAI,sBAAsB,QAAQ;AAAA,IAC5C;AAEAC,kBAAc,eAAe,UAAU,CAAC;AAAA,MACtC,WAAWC,SAAAA;AAAAA,MACX,OAAO;AAAA,QACL,MAAM;AAAA,MACZ;AAAA,MACI,WAAW,MAAMC,KAAAA,MAAW,QAAQA,KAAAA,MAAW,KAAK;AAAA,MACpD,QAAQ,MAAM,MAAM,OAAO,MAAM,OAAO,KAAK,EAAE,MAAM,wBAAwB,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG,EAAC,CAAE,IAAI,OAAO,KAAK,EAAE,MAAM,UAAS,CAAE;AAAA,IACtJ,CAAG;AAEDC,QAAAA,UAAU,YAAY;AACpB,UAAI,MAAM,OAAO,KAAK;AACpB,cAAMC,cAAAA,QAAsB,KAAK,EAAE,KAAK,MAAM,OAAO,KAAK;AAAA,MAC5D;AAAA,IACF,CAAC;AAEDC,QAAAA,YAAY,MAAM;AAChBL,oBAAc,eAAe,UAAU,CAAA;AAAA,IACzC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -56,7 +56,7 @@ const _sfc_main = {
56
56
  unref(hasAccess)(unref(route).params._id, "spots", "create", state.accesses, state.access.roles) ? (openBlock(), createElementBlock("button", {
57
57
  key: 0,
58
58
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$router.push({
59
- name: unref(route).params?._id ? "Organization_SpotAdd" : "SpotAdd"
59
+ name: unref(route).params?._id ? "Spot Creation" : "Spot Creation"
60
60
  })),
61
61
  class: "radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"
62
62
  }, " + ")) : createCommentVNode("", true)
@@ -1 +1 @@
1
- {"version":3,"file":"Spots.vue.js","sources":["../../../../../../../src/modules/spots/components/pages/Spots.vue"],"sourcesContent":["<template>\n <div class=\"pos-relative\">\n <header \n v-if=\"route.name !== 'Organization' && !MOBILE_APP\"\n class=\"pd-medium flex-v-center flex-nowrap flex\"\n >\n <h2 class=\"mn-r-medium\">Spots</h2>\n <button \n v-if=\"hasAccess(route.params._id, 'spots', 'create', auth.state.accesses, auth.state.access.roles)\"\n @click=\"$router.push({\n name: route.params?._id ? 'Organization_SpotAdd' : 'SpotAdd'\n })\" \n class=\"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second\">\n +\n </button>\n </header>\n\n <div class=\"w-100 rows-1 pd-thin pos-relative o-hidden\">\n \n <div class=\"mn-b-thin w-100 o-y-scroll scroll-hide scroll-snap-type-x-mandatory scroll-pd-regular\">\n <div class=\"gap-thin flex-nowrap flex\">\n <div\n v-for=\"category in currentCategories\"\n :key=\"category._id\"\n @click=\"selectCategory(category)\"\n class=\"flex-child-default bg-light flex t-nowrap pd-medium radius-medium cursor-pointer hover-bg-light transition-all\"\n >\n {{ category.name }}\n </div>\n </div>\n </div>\n\n <Feed\n :search=\"true\"\n v-model:filter=\"spots.state.filter\"\n v-model:sort=\"spots.state.sort\"\n :showLoadMore=\"false\"\n :states=\"{\n empty: {\n title: 'No Spots Found',\n description: 'Currently, there are no spots available.'\n }\n }\"\n :store=\"{\n read: (options) => spots.actions.read(options),\n state: spots.state\n }\"\n :options=\"{\n limit: 12,\n organization: route.params._id || null,\n user: auth.state.user._id,\n search: route.query.search\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"cols-1 pos-relative w-100 rows-1 gap-thin\"\n >\n <CardSpot\n v-for=\"(spot, index) in items\"\n :key=\"index\"\n :spot=\"spot\"\n :organization=\"organization\"\n :editAccess=\"hasAccess(route.params._id, 'spots', 'edit', auth.state.accesses, auth.state.access.roles)\"\n :showDeliveryOptions=\"true\"\n :showPaymentOptions=\"true\"\n class=\"radius-medium h-min-big bg-light\"\n @click=\"$router.push({ \n name: route.params._id ? 'Organization_Spot' : 'Spot', \n params: { \n _id: route.params._id,\n spot: spot._id \n } \n })\"\n />\n </Feed>\n\n </div>\n </div>\n</template>\n\n<script setup=\"props\">\n // Import libs\n import { ref, computed, watch, onMounted, onUnmounted } from 'vue'\n import { useRoute, useRouter } from 'vue-router'\n\n // Import components\n import Feed from '@martyrs/src/components/Feed/Feed.vue'\n\n import CardSpot from '@martyrs/src/modules/spots/components/blocks/CardSpot.vue'\n\n import IconPlus from '@martyrs/src/modules/icons/navigation/IconPlus.vue'\n\n // Accessing router and store\n import * as auth from '@martyrs/src/modules/auth/views/store/auth.js';\n import * as globals from '@martyrs/src/modules/globals/views/store/globals.js';\n import * as spots from '@martyrs/src/modules/spots/store/spots.js';\n import * as organizations from '@martyrs/src/modules/organizations/store/organizations.js';\n import { useGlobalMixins } from '@martyrs/src/modules/globals/views/mixins/mixins.js';\n\n const route = useRoute()\n const router = useRouter()\n const { hasAccess } = useGlobalMixins()\n\n // Props\n const props = defineProps({\n organization: {\n type: Object,\n default: null\n }\n })\n\n // Categories for mobile view\n const currentCategories = ref([]);\n\n const selectCategory = (category) => {\n // Implementation for category selection\n console.log('Category selected:', category);\n };\n\n globals.state.navigation_bar.actions = [{\n component: IconPlus,\n props: {\n fill: \"rgb(var(--main))\" \n },\n condition: () => auth.state.user && auth.state.user._id,\n action: () => route.params._id ? router.push({ name: 'Organization_SpotAdd', params: { _id: route.params._id} }) : router.push({ name: 'SpotAdd' })\n }]\n\n onMounted(async () => {\n if (route.params._id) {\n await organizations.actions.read({ _id: route.params._id });\n }\n })\n\n onUnmounted(() => {\n globals.state.navigation_bar.actions = [];\n });\n</script>\n\n<style lang=\"scss\">\n</style>"],"names":["globals.state","IconPlus","auth.state","organizations.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoGE,UAAM,QAAQ,SAAQ;AACtB,UAAM,SAAS,UAAS;AACxB,UAAM,EAAE,UAAS,IAAK,gBAAe;AAWrC,UAAM,oBAAoB,IAAI,EAAE;AAEhC,UAAM,iBAAiB,CAAC,aAAa;AAEnC,cAAQ,IAAI,sBAAsB,QAAQ;AAAA,IAC5C;AAEAA,YAAc,eAAe,UAAU,CAAC;AAAA,MACtC,WAAWC;AAAAA,MACX,OAAO;AAAA,QACL,MAAM;AAAA,MACZ;AAAA,MACI,WAAW,MAAMC,MAAW,QAAQA,MAAW,KAAK;AAAA,MACpD,QAAQ,MAAM,MAAM,OAAO,MAAM,OAAO,KAAK,EAAE,MAAM,wBAAwB,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG,EAAC,CAAE,IAAI,OAAO,KAAK,EAAE,MAAM,UAAS,CAAE;AAAA,IACtJ,CAAG;AAED,cAAU,YAAY;AACpB,UAAI,MAAM,OAAO,KAAK;AACpB,cAAMC,QAAsB,KAAK,EAAE,KAAK,MAAM,OAAO,KAAK;AAAA,MAC5D;AAAA,IACF,CAAC;AAED,gBAAY,MAAM;AAChBH,cAAc,eAAe,UAAU,CAAA;AAAA,IACzC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Spots.vue.js","sources":["../../../../../../../src/modules/spots/components/pages/Spots.vue"],"sourcesContent":["<template>\n <div class=\"pos-relative\">\n <header \n v-if=\"route.name !== 'Organization' && !MOBILE_APP\"\n class=\"pd-medium flex-v-center flex-nowrap flex\"\n >\n <h2 class=\"mn-r-medium\">Spots</h2>\n <button \n v-if=\"hasAccess(route.params._id, 'spots', 'create', auth.state.accesses, auth.state.access.roles)\"\n @click=\"$router.push({\n name: route.params?._id ? 'Spot Creation' : 'Spot Creation'\n })\" \n class=\"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second\">\n +\n </button>\n </header>\n\n <div class=\"w-100 rows-1 pd-thin pos-relative o-hidden\">\n \n <div class=\"mn-b-thin w-100 o-y-scroll scroll-hide scroll-snap-type-x-mandatory scroll-pd-regular\">\n <div class=\"gap-thin flex-nowrap flex\">\n <div\n v-for=\"category in currentCategories\"\n :key=\"category._id\"\n @click=\"selectCategory(category)\"\n class=\"flex-child-default bg-light flex t-nowrap pd-medium radius-medium cursor-pointer hover-bg-light transition-all\"\n >\n {{ category.name }}\n </div>\n </div>\n </div>\n\n <Feed\n :search=\"true\"\n v-model:filter=\"spots.state.filter\"\n v-model:sort=\"spots.state.sort\"\n :showLoadMore=\"false\"\n :states=\"{\n empty: {\n title: 'No Spots Found',\n description: 'Currently, there are no spots available.'\n }\n }\"\n :store=\"{\n read: (options) => spots.actions.read(options),\n state: spots.state\n }\"\n :options=\"{\n limit: 12,\n organization: route.params._id || null,\n user: auth.state.user._id,\n search: route.query.search\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"cols-1 pos-relative w-100 rows-1 gap-thin\"\n >\n <CardSpot\n v-for=\"(spot, index) in items\"\n :key=\"index\"\n :spot=\"spot\"\n :organization=\"organization\"\n :editAccess=\"hasAccess(route.params._id, 'spots', 'edit', auth.state.accesses, auth.state.access.roles)\"\n :showDeliveryOptions=\"true\"\n :showPaymentOptions=\"true\"\n class=\"radius-medium h-min-big bg-light\"\n @click=\"$router.push({ \n name: route.params._id ? 'Organization_Spot' : 'Spot', \n params: { \n _id: route.params._id,\n spot: spot._id \n } \n })\"\n />\n </Feed>\n\n </div>\n </div>\n</template>\n\n<script setup=\"props\">\n // Import libs\n import { ref, computed, watch, onMounted, onUnmounted } from 'vue'\n import { useRoute, useRouter } from 'vue-router'\n\n // Import components\n import Feed from '@martyrs/src/components/Feed/Feed.vue'\n\n import CardSpot from '@martyrs/src/modules/spots/components/blocks/CardSpot.vue'\n\n import IconPlus from '@martyrs/src/modules/icons/navigation/IconPlus.vue'\n\n // Accessing router and store\n import * as auth from '@martyrs/src/modules/auth/views/store/auth.js';\n import * as globals from '@martyrs/src/modules/globals/views/store/globals.js';\n import * as spots from '@martyrs/src/modules/spots/store/spots.js';\n import * as organizations from '@martyrs/src/modules/organizations/store/organizations.js';\n import { useGlobalMixins } from '@martyrs/src/modules/globals/views/mixins/mixins.js';\n\n const route = useRoute()\n const router = useRouter()\n const { hasAccess } = useGlobalMixins()\n\n // Props\n const props = defineProps({\n organization: {\n type: Object,\n default: null\n }\n })\n\n // Categories for mobile view\n const currentCategories = ref([]);\n\n const selectCategory = (category) => {\n // Implementation for category selection\n console.log('Category selected:', category);\n };\n\n globals.state.navigation_bar.actions = [{\n component: IconPlus,\n props: {\n fill: \"rgb(var(--main))\" \n },\n condition: () => auth.state.user && auth.state.user._id,\n action: () => route.params._id ? router.push({ name: 'Organization_SpotAdd', params: { _id: route.params._id} }) : router.push({ name: 'SpotAdd' })\n }]\n\n onMounted(async () => {\n if (route.params._id) {\n await organizations.actions.read({ _id: route.params._id });\n }\n })\n\n onUnmounted(() => {\n globals.state.navigation_bar.actions = [];\n });\n</script>\n\n<style lang=\"scss\">\n</style>"],"names":["globals.state","IconPlus","auth.state","organizations.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoGE,UAAM,QAAQ,SAAQ;AACtB,UAAM,SAAS,UAAS;AACxB,UAAM,EAAE,UAAS,IAAK,gBAAe;AAWrC,UAAM,oBAAoB,IAAI,EAAE;AAEhC,UAAM,iBAAiB,CAAC,aAAa;AAEnC,cAAQ,IAAI,sBAAsB,QAAQ;AAAA,IAC5C;AAEAA,YAAc,eAAe,UAAU,CAAC;AAAA,MACtC,WAAWC;AAAAA,MACX,OAAO;AAAA,QACL,MAAM;AAAA,MACZ;AAAA,MACI,WAAW,MAAMC,MAAW,QAAQA,MAAW,KAAK;AAAA,MACpD,QAAQ,MAAM,MAAM,OAAO,MAAM,OAAO,KAAK,EAAE,MAAM,wBAAwB,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG,EAAC,CAAE,IAAI,OAAO,KAAK,EAAE,MAAM,UAAS,CAAE;AAAA,IACtJ,CAAG;AAED,cAAU,YAAY;AACpB,UAAI,MAAM,OAAO,KAAK;AACpB,cAAMC,QAAsB,KAAK,EAAE,KAAK,MAAM,OAAO,KAAK;AAAA,MAC5D;AAAA,IACF,CAAC;AAED,gBAAY,MAAM;AAChBH,cAAc,eAAe,UAAU,CAAA;AAAA,IACzC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,9 +2,9 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
4
  const vueI18n = require("vue-i18n");
5
- const Button = require("../../../../components/Button/Button.vue2.cjs");
5
+ const Button = require("../../../../components/Button/Button.vue.cjs");
6
6
  const Field = require("../../../../components/Field/Field.vue.cjs");
7
- const Select = require("../../../../components/Select/Select.vue.cjs");
7
+ const Select = require("../../../../components/Select/Select.vue2.cjs");
8
8
  const Checkbox = require("../../../../components/Checkbox/Checkbox.vue.cjs");
9
9
  const Popup = require("../../../../components/Popup/Popup.vue.cjs");
10
10
  ;/* empty css */
@@ -1,8 +1,8 @@
1
1
  import { mergeModels, useModel, ref, computed, onMounted, createElementBlock, openBlock, createElementVNode, createVNode, toDisplayString, unref, withCtx, createTextVNode, Fragment, renderList, normalizeClass, createCommentVNode, createBlock } from "vue";
2
2
  import { useI18n } from "vue-i18n";
3
- import _sfc_main$1 from "../../../../components/Button/Button.vue2.js";
3
+ import _sfc_main$1 from "../../../../components/Button/Button.vue.js";
4
4
  import Field from "../../../../components/Field/Field.vue.js";
5
- import Select from "../../../../components/Select/Select.vue.js";
5
+ import Select from "../../../../components/Select/Select.vue2.js";
6
6
  import _sfc_main$3 from "../../../../components/Checkbox/Checkbox.vue.js";
7
7
  import _sfc_main$2 from "../../../../components/Popup/Popup.vue.js";
8
8
  /* empty css */
@@ -6,7 +6,7 @@ const bignumber = require("../../../../../../node_modules/.pnpm/bignumber.js@9.2
6
6
  const wallet_store = require("../../store/wallet.store.cjs");
7
7
  const wallet = require("../../localization/wallet.json.cjs");
8
8
  const Field = require("../../../../../components/Field/Field.vue.cjs");
9
- const Select = require("../../../../../components/Select/Select.vue.cjs");
9
+ const Select = require("../../../../../components/Select/Select.vue2.cjs");
10
10
  const _hoisted_1 = { class: "mn-b-small t-center t-bold" };
11
11
  const _hoisted_2 = { class: "t-semi" };
12
12
  const _hoisted_3 = ["disabled"];
@@ -4,7 +4,7 @@ import { BigNumber } from "../../../../../../node_modules/.pnpm/bignumber.js@9.2
4
4
  import { state, actions } from "../../store/wallet.store.js";
5
5
  import text from "../../localization/wallet.json.js";
6
6
  import Field from "../../../../../components/Field/Field.vue.js";
7
- import Select from "../../../../../components/Select/Select.vue.js";
7
+ import Select from "../../../../../components/Select/Select.vue2.js";
8
8
  const _hoisted_1 = { class: "mn-b-small t-center t-bold" };
9
9
  const _hoisted_2 = { class: "t-semi" };
10
10
  const _hoisted_3 = ["disabled"];
@@ -6,16 +6,16 @@ const Web3 = require("web3");
6
6
  const wallet_store = require("../../store/wallet.store.cjs");
7
7
  const wallet = require("../../localization/wallet.json.cjs");
8
8
  const Popup = require("../../../../../components/Popup/Popup.vue.cjs");
9
- const Button = require("../../../../../components/Button/Button.vue2.cjs");
9
+ const Button = require("../../../../../components/Button/Button.vue.cjs");
10
10
  require("vue-router");
11
11
  ;/* empty css */
12
12
  ;/* empty css */
13
- ;/* empty css */
13
+ ;/* empty css */
14
14
  require("../../../../reports/store/reports.cjs");
15
15
  require("../../../../auth/views/store/auth.cjs");
16
16
  require("../../../../organizations/store/memberships.store.cjs");
17
17
  require("../../../../community/store/reactions.cjs");
18
- ;/* empty css */
18
+ ;/* empty css */
19
19
  const ConnectMetamask = require("../elements/ConnectMetamask.vue.cjs");
20
20
  const CashDeposit = require("../blocks/CashDeposit.vue.cjs");
21
21
  const CardDeposit = require("../blocks/CardDeposit.vue.cjs");
@@ -4,16 +4,16 @@ import Web3 from "web3";
4
4
  import { state, actions } from "../../store/wallet.store.js";
5
5
  import text from "../../localization/wallet.json.js";
6
6
  import _sfc_main$3 from "../../../../../components/Popup/Popup.vue.js";
7
- import _sfc_main$1 from "../../../../../components/Button/Button.vue2.js";
7
+ import _sfc_main$1 from "../../../../../components/Button/Button.vue.js";
8
8
  import "vue-router";
9
9
  /* empty css */
10
10
  /* empty css */
11
- /* empty css */
11
+ /* empty css */
12
12
  import "../../../../reports/store/reports.js";
13
13
  import "../../../../auth/views/store/auth.js";
14
14
  import "../../../../organizations/store/memberships.store.js";
15
15
  import "../../../../community/store/reactions.js";
16
- /* empty css */
16
+ /* empty css */
17
17
  import _sfc_main$2 from "../elements/ConnectMetamask.vue.js";
18
18
  import _sfc_main$4 from "../blocks/CashDeposit.vue.js";
19
19
  import _sfc_main$5 from "../blocks/CardDeposit.vue.js";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const globals_abac = require("./globals.abac-CPXLas7N.cjs");
4
4
  const mongoose = require("mongoose");
5
5
  const apn = require("apn");
6
- const mailing = require("./mailing-Bs9ThyVZ.cjs");
6
+ const mailing = require("./mailing-DCvDBHVh.cjs");
7
7
  const admin = require("firebase-admin");
8
8
  const path = require("path");
9
9
  const webpush = require("web-push");
@@ -112,46 +112,34 @@ const NotificationsController = (db, wss, notificationService) => {
112
112
  const registerDevice = async (req, res) => {
113
113
  try {
114
114
  const { userId, anonymousId, deviceId, deviceType, deviceToken } = req.body;
115
+ console.log("[RegisterDevice] Request:", { userId, anonymousId, deviceId, isAnonymous: !userId });
115
116
  if (!userId && !anonymousId) {
116
117
  return res.status(400).json({ message: "Either userId or anonymousId is required" });
117
118
  }
118
- const isAnonymous = !userId;
119
- let query, updateData;
120
- if (isAnonymous) {
121
- query = { anonymousId, deviceId };
122
- updateData = {
123
- anonymousId,
124
- deviceId,
125
- deviceType,
126
- deviceToken,
127
- isActive: true,
128
- isAnonymous: true,
129
- lastActive: Date.now()
130
- };
119
+ if (anonymousId) {
120
+ await db.userDevice.deleteMany({ anonymousId, deviceId });
121
+ }
122
+ const updateData = {
123
+ deviceId,
124
+ deviceType,
125
+ deviceToken,
126
+ isActive: true,
127
+ lastActive: Date.now(),
128
+ isAnonymous: !userId
129
+ };
130
+ if (userId) {
131
+ updateData.userId = userId;
132
+ updateData.$unset = { anonymousId: 1 };
131
133
  } else {
132
- await db.userDevice.deleteMany({
133
- $or: [
134
- { deviceId, isAnonymous: true },
135
- { deviceToken, isAnonymous: true }
136
- ]
137
- });
138
- query = { userId, deviceId };
139
- updateData = {
140
- userId,
141
- deviceId,
142
- deviceType,
143
- deviceToken,
144
- isActive: true,
145
- isAnonymous: false,
146
- lastActive: Date.now()
147
- };
134
+ updateData.anonymousId = anonymousId;
135
+ updateData.$unset = { userId: 1 };
148
136
  }
149
137
  const device = await db.userDevice.findOneAndUpdate(
150
- query,
151
- { $set: updateData },
138
+ { deviceToken },
139
+ updateData,
152
140
  { upsert: true, new: true, setDefaultsOnInsert: true }
153
141
  );
154
- return res.status(201).json(device);
142
+ return res.status(200).json(device);
155
143
  } catch (err) {
156
144
  return res.status(500).json({ message: err.message });
157
145
  }
@@ -1,7 +1,7 @@
1
1
  import { g as globalsabac } from "./globals.abac-DNdtSYop.js";
2
2
  import { Types } from "mongoose";
3
3
  import apn from "apn";
4
- import { m as mailing } from "./mailing-DzlhsxCC.js";
4
+ import { m as mailing } from "./mailing-DuEFRsa3.js";
5
5
  import admin from "firebase-admin";
6
6
  import path from "path";
7
7
  import webpush from "web-push";
@@ -110,46 +110,34 @@ const NotificationsController = (db, wss, notificationService) => {
110
110
  const registerDevice = async (req, res) => {
111
111
  try {
112
112
  const { userId, anonymousId, deviceId, deviceType, deviceToken } = req.body;
113
+ console.log("[RegisterDevice] Request:", { userId, anonymousId, deviceId, isAnonymous: !userId });
113
114
  if (!userId && !anonymousId) {
114
115
  return res.status(400).json({ message: "Either userId or anonymousId is required" });
115
116
  }
116
- const isAnonymous = !userId;
117
- let query, updateData;
118
- if (isAnonymous) {
119
- query = { anonymousId, deviceId };
120
- updateData = {
121
- anonymousId,
122
- deviceId,
123
- deviceType,
124
- deviceToken,
125
- isActive: true,
126
- isAnonymous: true,
127
- lastActive: Date.now()
128
- };
117
+ if (anonymousId) {
118
+ await db.userDevice.deleteMany({ anonymousId, deviceId });
119
+ }
120
+ const updateData = {
121
+ deviceId,
122
+ deviceType,
123
+ deviceToken,
124
+ isActive: true,
125
+ lastActive: Date.now(),
126
+ isAnonymous: !userId
127
+ };
128
+ if (userId) {
129
+ updateData.userId = userId;
130
+ updateData.$unset = { anonymousId: 1 };
129
131
  } else {
130
- await db.userDevice.deleteMany({
131
- $or: [
132
- { deviceId, isAnonymous: true },
133
- { deviceToken, isAnonymous: true }
134
- ]
135
- });
136
- query = { userId, deviceId };
137
- updateData = {
138
- userId,
139
- deviceId,
140
- deviceType,
141
- deviceToken,
142
- isActive: true,
143
- isAnonymous: false,
144
- lastActive: Date.now()
145
- };
132
+ updateData.anonymousId = anonymousId;
133
+ updateData.$unset = { userId: 1 };
146
134
  }
147
135
  const device = await db.userDevice.findOneAndUpdate(
148
- query,
149
- { $set: updateData },
136
+ { deviceToken },
137
+ updateData,
150
138
  { upsert: true, new: true, setDefaultsOnInsert: true }
151
139
  );
152
- return res.status(201).json(device);
140
+ return res.status(200).json(device);
153
141
  } catch (err) {
154
142
  return res.status(500).json({ message: err.message });
155
143
  }
@@ -2,7 +2,7 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  require("node-cache");
4
4
  const queryProcessor = require("./queryProcessor-B_X680wC.cjs");
5
- require("./mailing-Bs9ThyVZ.cjs");
5
+ require("./mailing-DCvDBHVh.cjs");
6
6
  const profile_schema = require("./profile.schema-pidHrksV.cjs");
7
7
  const ownership_schema = require("./ownership.schema-D1p5XSpt.cjs");
8
8
  const credentials_schema = require("./credentials.schema-DwhGdrwC.cjs");
@@ -1,6 +1,6 @@
1
1
  import "node-cache";
2
2
  import { q as queryProcessorGlobals } from "./queryProcessor-CVcLPEnv.js";
3
- import "./mailing-DzlhsxCC.js";
3
+ import "./mailing-DuEFRsa3.js";
4
4
  import { m as modelsFactory, a as applyProfileSchema } from "./profile.schema-BGAe5VN5.js";
5
5
  import { a as applyOwnershipSchema } from "./ownership.schema-BqH4v5vH.js";
6
6
  import { a as applyCredentialsSchema } from "./credentials.schema-C9FB2EyY.js";
@@ -5,7 +5,7 @@ const credentials_schema = require("./credentials.schema-DwhGdrwC.cjs");
5
5
  const ownership_schema = require("./ownership.schema-D1p5XSpt.cjs");
6
6
  const engagement_schema = require("./engagement.schema-JADHu8pj.cjs");
7
7
  const index = require("./index-BFxqqmgh.cjs");
8
- const mailing = require("./mailing-Bs9ThyVZ.cjs");
8
+ const mailing = require("./mailing-DCvDBHVh.cjs");
9
9
  const uuidv4 = require("uuidv4");
10
10
  const queryProcessor = require("./queryProcessor-B_X680wC.cjs");
11
11
  const mongoose = require("mongoose");
@@ -3,7 +3,7 @@ import { a as applyCredentialsSchema } from "./credentials.schema-C9FB2EyY.js";
3
3
  import { a as applyOwnershipSchema } from "./ownership.schema-BqH4v5vH.js";
4
4
  import { a as applyEngagementSchema } from "./engagement.schema-Dh1adRsn.js";
5
5
  import { m as middlewareIndexFactory } from "./index-_Edcmck_.js";
6
- import { m as mailing } from "./mailing-DzlhsxCC.js";
6
+ import { m as mailing } from "./mailing-DuEFRsa3.js";
7
7
  import { uuid } from "uuidv4";
8
8
  import { q as queryProcessorGlobals } from "./queryProcessor-CVcLPEnv.js";
9
9
  import { Types } from "mongoose";
@@ -57,33 +57,68 @@ const controllerFactory$1 = (db) => {
57
57
  return tree;
58
58
  };
59
59
  const updateCategoryPaths = async (categoryId, newParentId = null) => {
60
- const category = await Category.findById(categoryId);
61
- if (!category) return;
62
- let newPath = [];
60
+ const [category, parent] = await Promise.all([
61
+ Category.findById(categoryId).lean(),
62
+ newParentId ? Category.findById(newParentId).lean() : null
63
+ ]);
64
+ if (!category) {
65
+ console.log("Category not found");
66
+ return;
67
+ }
68
+ const oldUrl = category.url;
69
+ const oldLevel = category.level;
70
+ const oldParent = category.parent ? category.parent.toString() : null;
71
+ const newParentStr = newParentId ? newParentId.toString() : null;
72
+ if (oldParent === newParentStr) {
73
+ console.log("Parent not changed, skipping path update");
74
+ return;
75
+ }
63
76
  let newLevel = 0;
64
77
  let newUrl = `/${category.slug}`;
65
- if (newParentId) {
66
- const parent = await Category.findById(newParentId);
67
- if (parent) {
68
- newPath = [...parent.path, newParentId];
69
- newLevel = parent.level + 1;
70
- newUrl = `${parent.url}/${category.slug}`;
71
- }
78
+ if (parent) {
79
+ newLevel = parent.level + 1;
80
+ newUrl = `${parent.url}/${category.slug}`;
72
81
  }
73
- await Category.updateOne(
74
- { _id: categoryId },
75
- { path: newPath, level: newLevel, url: newUrl }
76
- );
77
- const oldUrlPattern = new RegExp(`^${category.url}/`);
78
- await Category.updateMany(
79
- { url: oldUrlPattern },
80
- [{
81
- $set: {
82
- url: { $concat: [newUrl, { $substr: ["$url", { $strLenCP: category.url }, -1] }] },
83
- level: { $add: ["$level", newLevel - category.level] }
82
+ if (oldUrl === newUrl) {
83
+ console.log("URL not changed, skipping update");
84
+ return;
85
+ }
86
+ console.log(`URL change: "${oldUrl}" -> "${newUrl}"`);
87
+ const bulkOps = [];
88
+ bulkOps.push({
89
+ updateOne: {
90
+ filter: { _id: categoryId },
91
+ update: {
92
+ $set: {
93
+ level: newLevel,
94
+ url: newUrl,
95
+ parent: newParentId
96
+ }
84
97
  }
85
- }]
86
- );
98
+ }
99
+ });
100
+ const levelDiff = newLevel - oldLevel;
101
+ const oldUrlLength = oldUrl.length;
102
+ bulkOps.push({
103
+ updateMany: {
104
+ filter: { url: { $regex: `^${oldUrl.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}/` } },
105
+ update: [
106
+ {
107
+ $set: {
108
+ url: {
109
+ $concat: [
110
+ newUrl,
111
+ { $substr: ["$url", oldUrlLength, -1] }
112
+ ]
113
+ },
114
+ level: { $add: ["$level", levelDiff] }
115
+ }
116
+ }
117
+ ]
118
+ }
119
+ });
120
+ const result = await Category.bulkWrite(bulkOps, { ordered: false });
121
+ console.log(`Updated ${result.modifiedCount} documents`);
87
122
  };
88
123
  return {
89
124
  async read(req, res) {
@@ -191,13 +226,11 @@ const controllerFactory$1 = (db) => {
191
226
  data.creator ||= { type: "user", target: req.userId };
192
227
  data.owner ||= req.query.owner ? { type: "organization", target: req.query.owner } : { type: "platform", target: null };
193
228
  const slug = await generateSlug(data.name, data.parent);
194
- let path = [];
195
229
  let level = 0;
196
230
  let url = `/${slug}`;
197
231
  if (data.parent) {
198
232
  const parent = await Category.findById(data.parent);
199
233
  if (!parent) throw new Error("Parent category not found");
200
- path = [...parent.path, data.parent];
201
234
  level = parent.level + 1;
202
235
  url = `${parent.url}/${slug}`;
203
236
  }
@@ -207,7 +240,6 @@ const controllerFactory$1 = (db) => {
207
240
  ...data,
208
241
  slug,
209
242
  url,
210
- path,
211
243
  level,
212
244
  order
213
245
  });
@@ -249,24 +281,49 @@ const controllerFactory$1 = (db) => {
249
281
  }
250
282
  },
251
283
  async updateOrder(req, res) {
284
+ const startTime = Date.now();
252
285
  try {
253
- const { categories } = req.verifiedBody;
254
- const bulkOps = categories.map((cat) => ({
286
+ console.log("=== UPDATE ORDER START ===");
287
+ console.log("Affected categories count:", req.verifiedBody?.affectedCategories?.length);
288
+ console.log("Has moved category:", !!req.verifiedBody?.movedCategory);
289
+ const { movedCategory, affectedCategories } = req.verifiedBody;
290
+ if (!affectedCategories || affectedCategories.length === 0) {
291
+ return res.json({ message: "No changes to update" });
292
+ }
293
+ const bulkOps = affectedCategories.map((cat) => ({
255
294
  updateOne: {
256
295
  filter: { _id: cat._id },
257
296
  update: { $set: { order: cat.order } }
258
297
  }
259
298
  }));
260
- const movedCategories = categories.filter((cat) => cat.parent !== void 0);
261
- for (const cat of movedCategories) {
262
- await updateCategoryPaths(cat._id, cat.parent);
299
+ if (movedCategory) {
300
+ bulkOps.push({
301
+ updateOne: {
302
+ filter: { _id: movedCategory._id },
303
+ update: { $set: { parent: movedCategory.newParent } }
304
+ }
305
+ });
263
306
  }
264
- await Category.bulkWrite(bulkOps);
307
+ console.log(`Starting bulkWrite with ${bulkOps.length} operations`);
308
+ const bulkStart = Date.now();
309
+ await Category.bulkWrite(bulkOps, { ordered: false });
310
+ console.log(`BulkWrite completed in ${Date.now() - bulkStart}ms`);
311
+ if (movedCategory) {
312
+ const pathStart = Date.now();
313
+ console.log("Starting updateCategoryPaths...");
314
+ await updateCategoryPaths(movedCategory._id, movedCategory.newParent);
315
+ console.log(`updateCategoryPaths completed in ${Date.now() - pathStart}ms`);
316
+ }
317
+ const cacheStart = Date.now();
265
318
  await cache.delByTags(["categories"]);
266
- logger.info(`Categories order updated: ${categories.map((c) => c._id).join(", ")}`);
319
+ console.log(`Cache clear completed in ${Date.now() - cacheStart}ms`);
320
+ const totalTime = Date.now() - startTime;
321
+ console.log(`=== UPDATE ORDER COMPLETE in ${totalTime}ms ===`);
322
+ logger.info(`Categories order updated: ${affectedCategories.length} items in ${totalTime}ms`);
267
323
  res.json({ message: "Order updated successfully" });
268
324
  } catch (err) {
269
325
  logger.error(`Category order update error: ${err.message}`);
326
+ console.error("Full error:", err);
270
327
  res.status(500).json({ message: "Failed to update categories order" });
271
328
  }
272
329
  },
@@ -1212,7 +1269,14 @@ const verifierFactory$1 = function(db) {
1212
1269
  order: { rule: "optional", validator: globals_verifier.Validator.schema().number() }
1213
1270
  };
1214
1271
  const orderBodyValidatorConfig = {
1215
- categories: {
1272
+ movedCategory: {
1273
+ rule: "optional",
1274
+ validator: globals_verifier.Validator.schema().object({
1275
+ _id: globals_verifier.Validator.schema().string().required(),
1276
+ newParent: globals_verifier.Validator.schema().oneOfTypes(["string", "null"])
1277
+ })
1278
+ },
1279
+ affectedCategories: {
1216
1280
  rule: "optional",
1217
1281
  validator: globals_verifier.Validator.schema().array().required(),
1218
1282
  default: []