@ozdao/martyrs 0.2.519 → 0.2.520

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 (341) hide show
  1. package/dist/chats.server.cjs +198 -1
  2. package/dist/chats.server.js +198 -1
  3. package/dist/{main-Wr1_4rwl.cjs → main-BM3GslOO.cjs} +6 -6
  4. package/dist/{main-DgGUrhjT.js → main-Qcn7YlTx.js} +1832 -1828
  5. package/dist/martyrs/src/components/Address/{Address.vue2.cjs → Address.vue.cjs} +2 -2
  6. package/dist/martyrs/src/components/Address/{Address.vue2.js.map → Address.vue.cjs.map} +1 -1
  7. package/dist/martyrs/src/components/Address/{Address.vue2.js → Address.vue.js} +2 -2
  8. package/dist/martyrs/src/components/Address/Address.vue.js.map +1 -0
  9. package/dist/martyrs/src/components/Feed/Feed.vue.cjs +0 -1
  10. package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
  11. package/dist/martyrs/src/components/Feed/Feed.vue.js +0 -1
  12. package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
  13. package/dist/martyrs/src/components/LocationMarker/{LocationMarker.vue2.cjs → LocationMarker.vue.cjs} +2 -2
  14. package/dist/martyrs/src/components/LocationMarker/{LocationMarker.vue2.js.map → LocationMarker.vue.cjs.map} +1 -1
  15. package/dist/martyrs/src/components/LocationMarker/{LocationMarker.vue2.js → LocationMarker.vue.js} +2 -2
  16. package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue.js.map +1 -0
  17. package/dist/martyrs/src/components/Select/{Select.vue2.cjs → Select.vue.cjs} +2 -2
  18. package/dist/martyrs/src/components/Select/{Select.vue2.js.map → Select.vue.cjs.map} +1 -1
  19. package/dist/martyrs/src/components/Select/{Select.vue2.js → Select.vue.js} +2 -2
  20. package/dist/martyrs/src/components/Select/Select.vue.js.map +1 -0
  21. package/dist/martyrs/src/modules/auth/views/components/blocks/CardUser.vue.cjs +2 -2
  22. package/dist/martyrs/src/modules/auth/views/components/blocks/CardUser.vue.js +2 -2
  23. package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.cjs +1 -1
  24. package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.cjs.map +1 -1
  25. package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.js +1 -1
  26. package/dist/martyrs/src/modules/auth/views/components/layouts/Auth.vue.js.map +1 -1
  27. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +2 -2
  28. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs.map +1 -1
  29. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +4 -4
  30. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js.map +1 -1
  31. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +40 -50
  32. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs.map +1 -1
  33. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +59 -69
  34. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
  35. package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.cjs +11 -13
  36. package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.cjs.map +1 -1
  37. package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.js +11 -13
  38. package/dist/martyrs/src/modules/auth/views/components/sections/SliderFeatures.vue.js.map +1 -1
  39. package/dist/martyrs/src/modules/auth/views/store/auth.cjs +9 -0
  40. package/dist/martyrs/src/modules/auth/views/store/auth.cjs.map +1 -1
  41. package/dist/martyrs/src/modules/auth/views/store/auth.js +9 -0
  42. package/dist/martyrs/src/modules/auth/views/store/auth.js.map +1 -1
  43. package/dist/martyrs/src/modules/chats/components/blocks/ChatMessage.vue.cjs +27 -11
  44. package/dist/martyrs/src/modules/chats/components/blocks/ChatMessage.vue.cjs.map +1 -1
  45. package/dist/martyrs/src/modules/chats/components/blocks/ChatMessage.vue.js +28 -12
  46. package/dist/martyrs/src/modules/chats/components/blocks/ChatMessage.vue.js.map +1 -1
  47. package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.cjs +62 -0
  48. package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.cjs.map +1 -1
  49. package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.js +63 -1
  50. package/dist/martyrs/src/modules/chats/components/sections/ChatWindow.vue.js.map +1 -1
  51. package/dist/martyrs/src/modules/chats/store/chat.store.cjs +60 -1
  52. package/dist/martyrs/src/modules/chats/store/chat.store.cjs.map +1 -1
  53. package/dist/martyrs/src/modules/chats/store/chat.store.js +60 -1
  54. package/dist/martyrs/src/modules/chats/store/chat.store.js.map +1 -1
  55. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.cjs +3 -3
  56. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.cjs.map +1 -1
  57. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +3 -3
  58. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js.map +1 -1
  59. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  60. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +1 -1
  61. package/dist/martyrs/src/modules/community/components/pages/Posts.vue.cjs +50 -368
  62. package/dist/martyrs/src/modules/community/components/pages/Posts.vue.cjs.map +1 -1
  63. package/dist/martyrs/src/modules/community/components/pages/Posts.vue.js +53 -371
  64. package/dist/martyrs/src/modules/community/components/pages/Posts.vue.js.map +1 -1
  65. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  66. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs.map +1 -1
  67. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  68. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js.map +1 -1
  69. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +0 -1
  70. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs.map +1 -1
  71. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +0 -1
  72. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
  73. package/dist/martyrs/src/modules/events/components/pages/Events.vue.cjs +2 -2
  74. package/dist/martyrs/src/modules/events/components/pages/Events.vue.cjs.map +1 -1
  75. package/dist/martyrs/src/modules/events/components/pages/Events.vue.js +2 -2
  76. package/dist/martyrs/src/modules/events/components/pages/Events.vue.js.map +1 -1
  77. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  78. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  79. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
  80. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
  81. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +1 -1
  82. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +1 -1
  83. package/dist/martyrs/src/modules/globals/views/components/partials/LocationSelection.vue.cjs +2 -2
  84. package/dist/martyrs/src/modules/globals/views/components/partials/LocationSelection.vue.js +2 -2
  85. package/dist/martyrs/src/modules/globals/views/components/sections/Walkthrough.vue.cjs +1 -1
  86. package/dist/martyrs/src/modules/globals/views/mixins/mixins.cjs +7 -0
  87. package/dist/martyrs/src/modules/globals/views/mixins/mixins.cjs.map +1 -1
  88. package/dist/martyrs/src/modules/globals/views/mixins/mixins.js +7 -0
  89. package/dist/martyrs/src/modules/globals/views/mixins/mixins.js.map +1 -1
  90. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs +1 -1
  91. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.cjs +1 -1
  92. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +1 -1
  93. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.cjs +1 -1
  94. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +1 -1
  95. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.cjs +1 -1
  96. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +1 -1
  97. package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.cjs +180 -19
  98. package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.cjs.map +1 -1
  99. package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.js +181 -20
  100. package/dist/martyrs/src/modules/marketplace/views/components/layouts/Marketplace.vue.js.map +1 -1
  101. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.cjs +1 -1
  102. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +1 -1
  103. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +1 -1
  104. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
  105. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs +1 -1
  106. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +1 -1
  107. package/dist/martyrs/src/modules/music/router/music.cjs +0 -1
  108. package/dist/martyrs/src/modules/music/router/music.cjs.map +1 -1
  109. package/dist/martyrs/src/modules/music/router/music.js +0 -1
  110. package/dist/martyrs/src/modules/music/router/music.js.map +1 -1
  111. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.cjs +2 -2
  112. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.cjs.map +1 -1
  113. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.js +2 -2
  114. package/dist/martyrs/src/modules/orders/components/blocks/CardOrderBackoffice.vue.js.map +1 -1
  115. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.cjs +1 -1
  116. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +1 -1
  117. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs +1 -1
  118. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +1 -1
  119. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  120. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  121. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +2 -3
  122. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs.map +1 -1
  123. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +2 -3
  124. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js.map +1 -1
  125. package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  126. package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  127. package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +2 -24
  128. package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.cjs.map +1 -1
  129. package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +5 -27
  130. package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js.map +1 -1
  131. package/dist/martyrs/src/modules/organizations/components/blocks/Socials.vue.cjs +4 -1
  132. package/dist/martyrs/src/modules/organizations/components/blocks/Socials.vue.cjs.map +1 -1
  133. package/dist/martyrs/src/modules/organizations/components/blocks/Socials.vue.js +4 -1
  134. package/dist/martyrs/src/modules/organizations/components/blocks/Socials.vue.js.map +1 -1
  135. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +3 -3
  136. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs.map +1 -1
  137. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +3 -3
  138. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js.map +1 -1
  139. package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.cjs +195 -0
  140. package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.cjs.map +1 -0
  141. package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js +195 -0
  142. package/dist/martyrs/src/modules/organizations/components/forms/AddExistingMembersForm.vue.js.map +1 -0
  143. package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.cjs +402 -0
  144. package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.cjs.map +1 -0
  145. package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js +402 -0
  146. package/dist/martyrs/src/modules/organizations/components/forms/DepartmentForm.vue.js.map +1 -0
  147. package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.cjs +86 -0
  148. package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.cjs.map +1 -0
  149. package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js +86 -0
  150. package/dist/martyrs/src/modules/organizations/components/forms/InviteForm.vue.js.map +1 -0
  151. package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.cjs +10 -10
  152. package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.cjs.map +1 -1
  153. package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js +11 -11
  154. package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js.map +1 -1
  155. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +279 -191
  156. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs.map +1 -1
  157. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +285 -197
  158. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js.map +1 -1
  159. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +5 -5
  160. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs.map +1 -1
  161. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +5 -5
  162. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js.map +1 -1
  163. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
  164. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs.map +1 -1
  165. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  166. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js.map +1 -1
  167. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  168. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.cjs.map +1 -1
  169. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  170. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js.map +1 -1
  171. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  172. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  173. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +3 -3
  174. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs.map +1 -1
  175. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  176. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js.map +1 -1
  177. package/dist/martyrs/src/modules/organizations/components/sections/Publics.vue.cjs +4 -4
  178. package/dist/martyrs/src/modules/organizations/components/sections/Publics.vue.cjs.map +1 -1
  179. package/dist/martyrs/src/modules/organizations/components/sections/Publics.vue.js +4 -4
  180. package/dist/martyrs/src/modules/organizations/components/sections/Publics.vue.js.map +1 -1
  181. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs +42 -41
  182. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs.map +1 -1
  183. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js +53 -52
  184. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js.map +1 -1
  185. package/dist/martyrs/src/modules/organizations/organizations.client.cjs +23 -16
  186. package/dist/martyrs/src/modules/organizations/organizations.client.cjs.map +1 -1
  187. package/dist/martyrs/src/modules/organizations/organizations.client.js +35 -28
  188. package/dist/martyrs/src/modules/organizations/organizations.client.js.map +1 -1
  189. package/dist/martyrs/src/modules/organizations/router/departments.router.cjs +0 -18
  190. package/dist/martyrs/src/modules/organizations/router/departments.router.cjs.map +1 -1
  191. package/dist/martyrs/src/modules/organizations/router/departments.router.js +0 -18
  192. package/dist/martyrs/src/modules/organizations/router/departments.router.js.map +1 -1
  193. package/dist/martyrs/src/modules/organizations/store/departments.store.cjs +6 -0
  194. package/dist/martyrs/src/modules/organizations/store/departments.store.cjs.map +1 -0
  195. package/dist/martyrs/src/modules/organizations/store/departments.store.js +6 -0
  196. package/dist/martyrs/src/modules/organizations/store/departments.store.js.map +1 -0
  197. package/dist/martyrs/src/modules/organizations/store/invites.store.cjs +6 -0
  198. package/dist/martyrs/src/modules/organizations/store/invites.store.cjs.map +1 -0
  199. package/dist/martyrs/src/modules/organizations/store/invites.store.js +6 -0
  200. package/dist/martyrs/src/modules/organizations/store/invites.store.js.map +1 -0
  201. package/dist/martyrs/src/modules/organizations/store/memberships.store.cjs +20 -0
  202. package/dist/martyrs/src/modules/organizations/store/memberships.store.cjs.map +1 -0
  203. package/dist/martyrs/src/modules/organizations/store/memberships.store.js +20 -0
  204. package/dist/martyrs/src/modules/organizations/store/memberships.store.js.map +1 -0
  205. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +2 -3
  206. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs.map +1 -1
  207. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +2 -3
  208. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
  209. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  210. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  211. package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +1 -1
  212. package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs.map +1 -1
  213. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +1 -1
  214. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
  215. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.cjs +1 -1
  216. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +1 -1
  217. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +1 -1
  218. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +1 -1
  219. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  220. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  221. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs +2 -2
  222. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs.map +1 -1
  223. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +2 -2
  224. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js.map +1 -1
  225. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  226. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  227. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +3 -3
  228. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +3 -3
  229. package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.cjs +60 -272
  230. package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.cjs.map +1 -1
  231. package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js +62 -274
  232. package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js.map +1 -1
  233. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +1 -1
  234. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +1 -1
  235. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  236. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  237. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +2 -2
  238. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
  239. package/dist/martyrs.cjs.js +1 -1
  240. package/dist/martyrs.css +1 -1
  241. package/dist/martyrs.es.js +1 -1
  242. package/dist/notifications.server.cjs +0 -24
  243. package/dist/notifications.server.js +0 -24
  244. package/dist/orders.server.cjs +1 -4
  245. package/dist/orders.server.js +1 -4
  246. package/dist/organizations.server.cjs +115 -39
  247. package/dist/organizations.server.js +115 -39
  248. package/dist/style.css +9 -9
  249. package/dist/{web-42I-Howt.cjs → web-B0cfxzgu.cjs} +1 -1
  250. package/dist/{web-ByhZ_fIu.js → web-DVR8m2fm.js} +1 -1
  251. package/package.json +1 -1
  252. package/src/components/Feed/Feed.old.vue +0 -1
  253. package/src/components/Feed/Feed.vue +0 -30
  254. package/src/modules/auth/FIXES.md +2 -26
  255. package/src/modules/auth/views/components/blocks/CardUser.vue +2 -2
  256. package/src/modules/auth/views/components/layouts/Auth.vue +1 -1
  257. package/src/modules/auth/views/components/pages/Invite.vue +2 -2
  258. package/src/modules/auth/views/components/pages/Profile.vue +33 -48
  259. package/src/modules/auth/views/components/sections/SliderFeatures.vue +5 -7
  260. package/src/modules/auth/views/store/auth.js +15 -0
  261. package/src/modules/chats/CLAUDE.md +137 -0
  262. package/src/modules/chats/components/blocks/ChatMessage.vue +12 -0
  263. package/src/modules/chats/components/sections/ChatWindow.vue +84 -2
  264. package/src/modules/chats/controllers/chats.controller.js +187 -0
  265. package/src/modules/chats/models/chat.model.js +21 -0
  266. package/src/modules/chats/routes/chats.routes.js +46 -0
  267. package/src/modules/chats/store/chat.store.js +67 -0
  268. package/src/modules/community/components/layouts/Community.vue +2 -2
  269. package/src/modules/community/components/pages/Posts.vue +3 -328
  270. package/src/modules/events/components/pages/EditEventTickets.vue +1 -1
  271. package/src/modules/events/components/pages/Events.vue +2 -2
  272. package/src/modules/globals/views/mixins/mixins.js +7 -0
  273. package/src/modules/marketplace/views/components/layouts/Marketplace.vue +160 -8
  274. package/src/modules/notifications/controllers/notifications.controller.js +0 -6
  275. package/src/modules/notifications/services/notification.service.js +1 -17
  276. package/src/modules/notifications/services/web-push.service.js +0 -2
  277. package/src/modules/orders/components/blocks/CardOrderBackoffice.vue +2 -2
  278. package/src/modules/orders/components/blocks/CardOrderVar1.vue +1 -1
  279. package/src/modules/orders/controllers/orders.controller.js +2 -4
  280. package/src/modules/organizations/CLAUDE.md +259 -0
  281. package/src/modules/organizations/components/blocks/CardDepartment.vue +1 -22
  282. package/src/modules/organizations/components/blocks/Socials.vue +1 -1
  283. package/src/modules/organizations/components/elements/ButtonToggleMembership.vue +3 -3
  284. package/src/modules/organizations/components/forms/AddExistingMembersForm.vue +191 -0
  285. package/src/modules/organizations/components/forms/DepartmentForm.vue +390 -0
  286. package/src/modules/organizations/components/forms/InviteForm.vue +81 -0
  287. package/src/modules/organizations/components/pages/Department.vue +10 -10
  288. package/src/modules/organizations/components/pages/DepartmentEdit.vue +8 -8
  289. package/src/modules/organizations/components/pages/Members.vue +265 -171
  290. package/src/modules/organizations/components/pages/Organization.new.vue +172 -183
  291. package/src/modules/organizations/components/pages/Organization.vue +6 -6
  292. package/src/modules/organizations/components/pages/OrganizationEdit.vue +1 -1
  293. package/src/modules/organizations/components/pages/Organizations.vue +1 -1
  294. package/src/modules/organizations/components/sections/Organizations.vue +2 -2
  295. package/src/modules/organizations/components/sections/Publics.vue +4 -4
  296. package/src/modules/organizations/configs/navigation.organization.config.js +40 -39
  297. package/src/modules/organizations/controllers/departments.controller.js +53 -34
  298. package/src/modules/organizations/controllers/invites.controller.js +44 -5
  299. package/src/modules/organizations/controllers/memberships.controller.js +43 -4
  300. package/src/modules/organizations/organizations.client.js +24 -15
  301. package/src/modules/organizations/router/departments.router.js +0 -18
  302. package/src/modules/organizations/routes/departments.routes.js +6 -8
  303. package/src/modules/organizations/routes/invites.routes.js +6 -4
  304. package/src/modules/organizations/routes/memberships.routes.js +6 -5
  305. package/src/modules/organizations/store/departments.store.js +5 -0
  306. package/src/modules/organizations/store/invites.store.js +5 -0
  307. package/src/modules/organizations/store/memberships.store.js +23 -0
  308. package/src/modules/products/components/pages/Products.vue +0 -1
  309. package/src/modules/spots/components/blocks/CardSpot.vue +1 -1
  310. package/src/modules/spots/components/pages/Spots.vue +3 -203
  311. package/src/styles/base/all.scss +0 -15
  312. package/src/styles/typography.scss +20 -5
  313. package/dist/martyrs/src/components/Address/Address.vue2.cjs.map +0 -1
  314. package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue2.cjs.map +0 -1
  315. package/dist/martyrs/src/components/Select/Select.vue2.cjs.map +0 -1
  316. package/dist/martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue.cjs +0 -76
  317. package/dist/martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue.cjs.map +0 -1
  318. package/dist/martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue.js +0 -76
  319. package/dist/martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue.js.map +0 -1
  320. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +0 -280
  321. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs.map +0 -1
  322. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +0 -280
  323. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js.map +0 -1
  324. package/dist/martyrs/src/modules/organizations/store/departments.cjs +0 -121
  325. package/dist/martyrs/src/modules/organizations/store/departments.cjs.map +0 -1
  326. package/dist/martyrs/src/modules/organizations/store/departments.js +0 -121
  327. package/dist/martyrs/src/modules/organizations/store/departments.js.map +0 -1
  328. package/dist/martyrs/src/modules/organizations/store/invites.cjs +0 -64
  329. package/dist/martyrs/src/modules/organizations/store/invites.cjs.map +0 -1
  330. package/dist/martyrs/src/modules/organizations/store/invites.js +0 -64
  331. package/dist/martyrs/src/modules/organizations/store/invites.js.map +0 -1
  332. package/dist/martyrs/src/modules/organizations/store/memberships.cjs +0 -87
  333. package/dist/martyrs/src/modules/organizations/store/memberships.cjs.map +0 -1
  334. package/dist/martyrs/src/modules/organizations/store/memberships.js +0 -87
  335. package/dist/martyrs/src/modules/organizations/store/memberships.js.map +0 -1
  336. package/src/CLAUDE.MD +0 -15
  337. package/src/modules/globals/controllers/classes/globals.websocket.ws.js +0 -102
  338. package/src/modules/globals/views/components/blocks/BlockFilter.vue +0 -60
  339. package/src/modules/organizations/store/departments.js +0 -137
  340. package/src/modules/organizations/store/invites.js +0 -76
  341. package/src/modules/organizations/store/memberships.js +0 -110
@@ -1,4 +1,4 @@
1
- import { _ as e, a as o, b as d, C as r, k as t, c as l, d as i, e as p, f as u, g as n, h as M, i as S, j as c, F as m, l as C, n as F, o as g, L as h, p as b, M as k, q as x, H as B, r as T, s as U, t as f, u as w, S as D, v as E, w as I, x as L, y as P, z as q, A as y, B as A, D as j, U as v, E as z, G, m as H } from "./main-DgGUrhjT.js";
1
+ import { _ as e, a as o, b as d, C as r, k as t, c as l, d as i, e as p, f as u, g as n, h as M, i as S, j as c, F as m, l as C, n as F, o as g, L as h, p as b, M as k, q as x, H as B, r as T, s as U, t as f, u as w, S as D, v as E, w as I, x as L, y as P, z as q, A as y, B as A, D as j, U as v, E as z, G, m as H } from "./main-Qcn7YlTx.js";
2
2
  export {
3
3
  e as Address,
4
4
  o as Breadcrumbs,
@@ -18,17 +18,12 @@ const NotificationsController = (db, wss, notificationService) => {
18
18
  }
19
19
  };
20
20
  const createBatch = async (req, res) => {
21
- console.log("=== Batch notifications endpoint ===");
22
- console.log("Request body:", JSON.stringify(req.body, null, 2));
23
21
  try {
24
22
  const { notifications } = req.body;
25
23
  if (!notifications || !Array.isArray(notifications)) {
26
- console.error("Invalid request: notifications array is required");
27
24
  return res.status(400).json({ message: "notifications array is required" });
28
25
  }
29
- console.log("Creating notifications count:", notifications.length);
30
26
  const createdNotifications = await db.notification.insertMany(notifications);
31
- console.log("Created notifications:", createdNotifications.map((n) => n._id));
32
27
  setImmediate(() => {
33
28
  Promise.allSettled(createdNotifications.map(
34
29
  (notif) => notificationService.processNotification(notif)
@@ -511,9 +506,7 @@ const WebPushService = {
511
506
  badge: process.env.NOTIFICATION_BADGE_URL || "/favicon.ico",
512
507
  data
513
508
  });
514
- console.log("payload is", payload);
515
509
  const result = await webpush.sendNotification(subscription, payload);
516
- console.log("web push is", result);
517
510
  return { success: true, statusCode: result.statusCode };
518
511
  } catch (error) {
519
512
  console.error("Web Push service error:", error);
@@ -553,35 +546,23 @@ const NotificationService = function(db, wss) {
553
546
  userId: new ObjectId(userId),
554
547
  isActive: true
555
548
  });
556
- console.log("=== CHANNEL SELECTION DEBUG ===");
557
- console.log("userDevices found:", userDevices.length);
558
- console.log("userDevices:", userDevices);
559
- console.log("user.email:", user.email);
560
- console.log("user.phoneNumber:", user.phoneNumber);
561
- console.log("preferences.length:", preferences.length);
562
549
  let channels = ["web"];
563
550
  if (userDevices.length > 0) {
564
551
  channels.push("push");
565
- console.log("Added push channel - devices found");
566
552
  } else {
567
553
  console.log("No push channel - no devices found");
568
554
  }
569
555
  if (user.email) {
570
556
  channels.push("email");
571
- console.log("Added email channel");
572
557
  }
573
558
  if (user.phoneNumber) {
574
559
  channels.push("sms");
575
- console.log("Added SMS channel");
576
560
  }
577
561
  if (preferences.length > 0) {
578
562
  channels = preferences.filter((pref) => pref.isEnabled).map((pref) => pref.channelType);
579
- console.log("Overridden with user preferences:", channels);
580
563
  }
581
- console.log("=== FINAL CHANNELS ===", channels);
582
564
  const channelPromises = [];
583
565
  for (const channel of channels) {
584
- console.log(`=== PREPARING CHANNEL: ${channel} ===`);
585
566
  const sendFunc = channelRouters[channel];
586
567
  if (!sendFunc) {
587
568
  channelPromises.push(Promise.resolve({
@@ -592,14 +573,11 @@ const NotificationService = function(db, wss) {
592
573
  continue;
593
574
  }
594
575
  if (channel === "push") {
595
- console.log(`Preparing push to ${userDevices.length} devices`);
596
576
  for (const device of userDevices) {
597
577
  channelPromises.push(
598
578
  sendFunc(notification, user, device).then(() => {
599
- console.log(`Push sent successfully to device ${device.deviceId}`);
600
579
  return { channel: "push", deviceId: device.deviceId, success: true };
601
580
  }).catch((err) => {
602
- console.error(`Push failed for device ${device.deviceId}:`, err);
603
581
  return { channel: "push", deviceId: device.deviceId, success: false, error: err.message };
604
582
  })
605
583
  );
@@ -616,7 +594,6 @@ const NotificationService = function(db, wss) {
616
594
  );
617
595
  }
618
596
  }
619
- console.log(`=== PROCESSING ${channelPromises.length} PARALLEL OPERATIONS ===`);
620
597
  const results = await Promise.allSettled(channelPromises);
621
598
  const logs = [];
622
599
  const channelSuccessMap = /* @__PURE__ */ new Map();
@@ -659,7 +636,6 @@ const NotificationService = function(db, wss) {
659
636
  }
660
637
  };
661
638
  const sendWebNotification = async (notification, user) => {
662
- console.log(`[WebSocket][notification] sending to user ${user._id}`);
663
639
  const result = await wss.sendToUserInModule("notification", user._id, {
664
640
  type: "notification",
665
641
  data: notification
@@ -16,17 +16,12 @@ const NotificationsController = (db, wss, notificationService) => {
16
16
  }
17
17
  };
18
18
  const createBatch = async (req, res) => {
19
- console.log("=== Batch notifications endpoint ===");
20
- console.log("Request body:", JSON.stringify(req.body, null, 2));
21
19
  try {
22
20
  const { notifications } = req.body;
23
21
  if (!notifications || !Array.isArray(notifications)) {
24
- console.error("Invalid request: notifications array is required");
25
22
  return res.status(400).json({ message: "notifications array is required" });
26
23
  }
27
- console.log("Creating notifications count:", notifications.length);
28
24
  const createdNotifications = await db.notification.insertMany(notifications);
29
- console.log("Created notifications:", createdNotifications.map((n) => n._id));
30
25
  setImmediate(() => {
31
26
  Promise.allSettled(createdNotifications.map(
32
27
  (notif) => notificationService.processNotification(notif)
@@ -509,9 +504,7 @@ const WebPushService = {
509
504
  badge: process.env.NOTIFICATION_BADGE_URL || "/favicon.ico",
510
505
  data
511
506
  });
512
- console.log("payload is", payload);
513
507
  const result = await webpush.sendNotification(subscription, payload);
514
- console.log("web push is", result);
515
508
  return { success: true, statusCode: result.statusCode };
516
509
  } catch (error) {
517
510
  console.error("Web Push service error:", error);
@@ -551,35 +544,23 @@ const NotificationService = function(db, wss) {
551
544
  userId: new ObjectId(userId),
552
545
  isActive: true
553
546
  });
554
- console.log("=== CHANNEL SELECTION DEBUG ===");
555
- console.log("userDevices found:", userDevices.length);
556
- console.log("userDevices:", userDevices);
557
- console.log("user.email:", user.email);
558
- console.log("user.phoneNumber:", user.phoneNumber);
559
- console.log("preferences.length:", preferences.length);
560
547
  let channels = ["web"];
561
548
  if (userDevices.length > 0) {
562
549
  channels.push("push");
563
- console.log("Added push channel - devices found");
564
550
  } else {
565
551
  console.log("No push channel - no devices found");
566
552
  }
567
553
  if (user.email) {
568
554
  channels.push("email");
569
- console.log("Added email channel");
570
555
  }
571
556
  if (user.phoneNumber) {
572
557
  channels.push("sms");
573
- console.log("Added SMS channel");
574
558
  }
575
559
  if (preferences.length > 0) {
576
560
  channels = preferences.filter((pref) => pref.isEnabled).map((pref) => pref.channelType);
577
- console.log("Overridden with user preferences:", channels);
578
561
  }
579
- console.log("=== FINAL CHANNELS ===", channels);
580
562
  const channelPromises = [];
581
563
  for (const channel of channels) {
582
- console.log(`=== PREPARING CHANNEL: ${channel} ===`);
583
564
  const sendFunc = channelRouters[channel];
584
565
  if (!sendFunc) {
585
566
  channelPromises.push(Promise.resolve({
@@ -590,14 +571,11 @@ const NotificationService = function(db, wss) {
590
571
  continue;
591
572
  }
592
573
  if (channel === "push") {
593
- console.log(`Preparing push to ${userDevices.length} devices`);
594
574
  for (const device of userDevices) {
595
575
  channelPromises.push(
596
576
  sendFunc(notification, user, device).then(() => {
597
- console.log(`Push sent successfully to device ${device.deviceId}`);
598
577
  return { channel: "push", deviceId: device.deviceId, success: true };
599
578
  }).catch((err) => {
600
- console.error(`Push failed for device ${device.deviceId}:`, err);
601
579
  return { channel: "push", deviceId: device.deviceId, success: false, error: err.message };
602
580
  })
603
581
  );
@@ -614,7 +592,6 @@ const NotificationService = function(db, wss) {
614
592
  );
615
593
  }
616
594
  }
617
- console.log(`=== PROCESSING ${channelPromises.length} PARALLEL OPERATIONS ===`);
618
595
  const results = await Promise.allSettled(channelPromises);
619
596
  const logs = [];
620
597
  const channelSuccessMap = /* @__PURE__ */ new Map();
@@ -657,7 +634,6 @@ const NotificationService = function(db, wss) {
657
634
  }
658
635
  };
659
636
  const sendWebNotification = async (notification, user) => {
660
- console.log(`[WebSocket][notification] sending to user ${user._id}`);
661
637
  const result = await wss.sendToUserInModule("notification", user._id, {
662
638
  type: "notification",
663
639
  data: notification
@@ -404,10 +404,7 @@ const controllerFactory = (db) => {
404
404
  console.log("Sending notification for status change...");
405
405
  try {
406
406
  const usersWithAccess = await getUsersWithOrdersConfirmAccess(order.owner.target);
407
- const filteredUsers = usersWithAccess.filter(
408
- (userId) => userId.toString() !== order.creator.target.toString()
409
- );
410
- await sendOrderNotifications(order, "order_status", filteredUsers, {
407
+ await sendOrderNotifications(order, "order_status", usersWithAccess, {
411
408
  oldStatus,
412
409
  newStatus: order.status,
413
410
  organization: order.owner.target
@@ -402,10 +402,7 @@ const controllerFactory = (db) => {
402
402
  console.log("Sending notification for status change...");
403
403
  try {
404
404
  const usersWithAccess = await getUsersWithOrdersConfirmAccess(order.owner.target);
405
- const filteredUsers = usersWithAccess.filter(
406
- (userId) => userId.toString() !== order.creator.target.toString()
407
- );
408
- await sendOrderNotifications(order, "order_status", filteredUsers, {
405
+ await sendOrderNotifications(order, "order_status", usersWithAccess, {
409
406
  oldStatus,
410
407
  newStatus: order.status,
411
408
  organization: order.owner.target
@@ -35,7 +35,7 @@ const googleMapsServicesJs__namespace = /* @__PURE__ */ _interopNamespaceDefault
35
35
  const controllerFactory$2 = (db) => {
36
36
  const Department = db.department;
37
37
  const readOne = (req, res) => {
38
- Department.findOne({ _id: req.params._id }).populate("members.user").populate("subdepartments").then((department) => {
38
+ Department.findOne({ _id: req.params._id }).populate("members.user", "-password").populate("subdepartments").then((department) => {
39
39
  if (!department) {
40
40
  return res.status(404).send({ message: "Отдел не найден" });
41
41
  }
@@ -44,38 +44,43 @@ const controllerFactory$2 = (db) => {
44
44
  res.status(500).send({ message: err.message });
45
45
  });
46
46
  };
47
- const read = (req, res) => {
48
- let query = {};
49
- let options = {};
50
- if (req.query.organization) {
51
- query.organization = new db.mongoose.Types.ObjectId(req.query.organization);
52
- }
53
- if (req.query.hidden) {
54
- query.hidden = req.query.hidden;
55
- }
56
- Department.find(query, null, options).populate("members.user").populate("subdepartments").then((departments) => {
57
- if (!departments) {
58
- return res.status(404).send({ message: "Departments not found" });
47
+ const read = async (req, res) => {
48
+ try {
49
+ const { skip = 0, limit = 10, organization, hidden, _id, search } = req.query;
50
+ let query = {};
51
+ if (_id) {
52
+ query._id = _id;
53
+ }
54
+ if (organization) {
55
+ query.organization = new db.mongoose.Types.ObjectId(organization);
56
+ }
57
+ if (hidden !== void 0) {
58
+ query.hidden = hidden === "true";
59
59
  }
60
+ if (search) {
61
+ query["profile.name"] = new RegExp(search, "i");
62
+ }
63
+ const departments = await Department.find(query).skip(parseInt(skip)).limit(parseInt(limit)).populate("members.user", "-password").populate("subdepartments").sort({ createdAt: -1 });
60
64
  res.send(departments);
61
- }).catch((err) => {
65
+ } catch (err) {
62
66
  res.status(500).send({ message: err.message });
63
- });
67
+ }
64
68
  };
65
69
  const create = async (req, res) => {
66
70
  try {
67
71
  const newDepartment = new Department({
68
72
  ...req.body,
69
- organization: req.params._id
73
+ organization: req.body.organization || req.params._id
70
74
  });
71
75
  const data = await newDepartment.save();
72
- res.send(data);
76
+ const populated = await Department.findById(data._id).populate("members.user", "-password").populate("subdepartments");
77
+ res.send(populated);
73
78
  } catch (err) {
74
79
  res.status(500).send({ message: err.message });
75
80
  }
76
81
  };
77
82
  const update = (req, res) => {
78
- Department.findOneAndUpdate({ _id: req.body._id }, req.body, { new: true }).then((department) => {
83
+ Department.findOneAndUpdate({ _id: req.body._id }, req.body, { new: true }).populate("members.user", "-password").populate("subdepartments").then((department) => {
79
84
  if (!department) {
80
85
  return res.status(404).send({ message: "Department not found" });
81
86
  }
@@ -84,15 +89,20 @@ const controllerFactory$2 = (db) => {
84
89
  res.status(500).send({ message: err.message });
85
90
  });
86
91
  };
87
- const deleteDepartment = (req, res) => {
88
- Department.findOneAndRemove({ _id: req.body._id, organization: req.params._id }).then((department) => {
92
+ const deleteDepartment = async (req, res) => {
93
+ try {
94
+ const { _id } = req.body;
95
+ if (!_id) {
96
+ return res.status(400).send({ message: "Department ID is required" });
97
+ }
98
+ const department = await Department.findOneAndRemove({ _id });
89
99
  if (!department) {
90
100
  return res.status(404).send({ message: "Department not found" });
91
101
  }
92
- res.send({ message: "Department deleted successfully" });
93
- }).catch((err) => {
102
+ res.send(department);
103
+ } catch (err) {
94
104
  res.status(500).send({ message: err.message });
95
- });
105
+ }
96
106
  };
97
107
  return {
98
108
  readOne,
@@ -524,10 +534,10 @@ const OrganizationModel = (db) => {
524
534
  const departmentsRoutes = function(app, db) {
525
535
  const controller = controllerFactory$2(db);
526
536
  app.get("/api/departments/read", controller.read);
537
+ app.post("/api/departments/create", controller.create);
538
+ app.put("/api/departments/update", controller.update);
539
+ app.post("/api/departments/delete", controller.delete);
527
540
  app.get("/api/departments/get/:_id", controller.readOne);
528
- app.post("/api/departments/:_id/create", controller.create);
529
- app.post("/api/departments/:_id/update", controller.update);
530
- app.delete("/api/departments/:_id/delete", controller.delete);
531
541
  };
532
542
  const { sendEmail, sendSms } = mailing.mailing;
533
543
  const сontrollerFactory = (db) => {
@@ -547,10 +557,17 @@ const сontrollerFactory = (db) => {
547
557
  };
548
558
  const read = async (req, res) => {
549
559
  try {
550
- const invites = await Invite.find({ "owner.target": req.params._id });
551
- if (!invites || invites.length === 0) {
552
- return res.status(200).send([]);
560
+ const { skip = 0, limit = 10, owner, target, search } = req.query;
561
+ const query = {};
562
+ if (owner) query["owner.user"] = owner;
563
+ if (target) query["owner.target"] = target;
564
+ if (search) {
565
+ query.$or = [
566
+ { email: new RegExp(search, "i") },
567
+ { phone: new RegExp(search, "i") }
568
+ ];
553
569
  }
570
+ const invites = await Invite.find(query).skip(parseInt(skip)).limit(parseInt(limit)).sort({ createdAt: -1 });
554
571
  res.send(invites);
555
572
  } catch (err) {
556
573
  res.status(500).send({ message: err.message });
@@ -617,13 +634,36 @@ const сontrollerFactory = (db) => {
617
634
  res.status(500).json({ message: "Something went wrong" });
618
635
  }
619
636
  };
637
+ const update = async (req, res) => {
638
+ try {
639
+ const { _id, ...updateData } = req.body;
640
+ if (!_id) {
641
+ return res.status(400).send({ message: "Invite ID is required" });
642
+ }
643
+ const invite = await Invite.findByIdAndUpdate(
644
+ _id,
645
+ updateData,
646
+ { new: true, runValidators: true }
647
+ );
648
+ if (!invite) {
649
+ return res.status(404).send({ message: "Invite not found" });
650
+ }
651
+ res.send(invite);
652
+ } catch (err) {
653
+ res.status(500).send({ message: err.message });
654
+ }
655
+ };
620
656
  const deleteInvite = async (req, res) => {
621
657
  try {
622
- const invite = await Invite.findOneAndDelete({ _id: req.params._id });
658
+ const { _id } = req.body;
659
+ if (!_id) {
660
+ return res.status(400).send({ message: "Invite ID is required" });
661
+ }
662
+ const invite = await Invite.findOneAndDelete({ _id });
623
663
  if (!invite) {
624
664
  return res.status(404).send({ message: "Invite not found" });
625
665
  }
626
- res.send({ message: "Invite deleted successfully" });
666
+ res.send(invite);
627
667
  } catch (err) {
628
668
  res.status(500).send({ message: err.message });
629
669
  }
@@ -632,16 +672,18 @@ const сontrollerFactory = (db) => {
632
672
  getOneByCode,
633
673
  read,
634
674
  create,
675
+ update,
635
676
  delete: deleteInvite
636
677
  };
637
678
  };
638
679
  const invitesRoutes = function(app, db) {
639
680
  const controller = сontrollerFactory(db);
640
681
  const { verifyInvites } = index.middlewareIndexFactory(db);
682
+ app.get("/api/invites/read", controller.read);
641
683
  app.get("/api/invites/get/:_id", controller.getOneByCode);
642
- app.get("/api/invites/:_id", controller.read);
643
684
  app.post("/api/invites/create", [verifyInvites.checkInviteExist, verifyInvites.checkUsersExist], controller.create);
644
- app.delete("/api/invites/delete/:_id", controller.delete);
685
+ app.put("/api/invites/update", controller.update);
686
+ app.post("/api/invites/delete", controller.delete);
645
687
  };
646
688
  const ObjectId$1 = { Types: mongoose.Types }.Types.ObjectId;
647
689
  const controllerFactory$1 = (db) => {
@@ -687,7 +729,30 @@ const controllerFactory$1 = (db) => {
687
729
  {
688
730
  $unwind: "$user"
689
731
  },
690
- // Pagination
732
+ {
733
+ $project: {
734
+ _id: 1,
735
+ user: {
736
+ _id: 1,
737
+ profile: 1,
738
+ roles: 1,
739
+ phone: 1,
740
+ email: 1,
741
+ username: 1,
742
+ socials: 1,
743
+ status: 1,
744
+ createdAt: 1,
745
+ updatedAt: 1
746
+ },
747
+ type: 1,
748
+ role: 1,
749
+ label: 1,
750
+ target: 1,
751
+ createdAt: 1,
752
+ updatedAt: 1
753
+ }
754
+ },
755
+ // Sorting and Pagination
691
756
  ...queryProcessor.queryProcessorGlobals.getSortingOptions(req.query.sortParam, req.query.sortOrder),
692
757
  ...queryProcessor.queryProcessorGlobals.getPaginationOptions(req.query.skip, req.query.limit)
693
758
  ]);
@@ -709,7 +774,8 @@ const controllerFactory$1 = (db) => {
709
774
  });
710
775
  try {
711
776
  const data = await newMembership.save();
712
- res.send(data);
777
+ const populated = await Membership.findById(data._id).populate("user", "-password");
778
+ res.send(populated);
713
779
  } catch (err) {
714
780
  console.log(err);
715
781
  res.status(500).send({ errorCode: "SERVER_ERROR" });
@@ -717,7 +783,7 @@ const controllerFactory$1 = (db) => {
717
783
  };
718
784
  const update = async (req, res) => {
719
785
  try {
720
- const membership = await Membership.findByIdAndUpdate(req.body._id, req.body, { new: true });
786
+ const membership = await Membership.findByIdAndUpdate(req.body._id, req.body, { new: true }).populate("user", "-password");
721
787
  if (!membership) {
722
788
  return res.status(404).send({ errorCode: "MEMBERSHIP_NOT_FOUND" });
723
789
  }
@@ -728,8 +794,17 @@ const controllerFactory$1 = (db) => {
728
794
  };
729
795
  const deleteMembership = async (req, res) => {
730
796
  const { _id, type, target, user, role } = req.body;
797
+ console.log("Delete membership request:", { _id, type, target, user, role });
731
798
  try {
732
- const membership = _id ? await Membership.findOneAndDelete({ _id: new ObjectId$1(_id) }) : await Membership.findOneAndDelete({ type, target, user, role });
799
+ const query = _id ? { _id: new ObjectId$1(_id) } : {
800
+ type,
801
+ target: new ObjectId$1(target),
802
+ user: new ObjectId$1(user),
803
+ role
804
+ };
805
+ console.log("Delete query:", query);
806
+ const membership = await Membership.findOneAndDelete(query);
807
+ console.log("Deleted membership:", membership);
733
808
  if (!membership) {
734
809
  return res.status(404).send({ errorCode: "MEMBERSHIP_NOT_FOUND" });
735
810
  }
@@ -751,10 +826,11 @@ const controllerFactory$1 = (db) => {
751
826
  };
752
827
  const membershipsRoutes = function(app, db) {
753
828
  const controller = controllerFactory$1(db);
754
- app.get("/api/memberships", controller.read);
829
+ app.get("/api/memberships/read", controller.read);
755
830
  app.post("/api/memberships/create", controller.create);
756
- app.post("/api/memberships/update", controller.update);
831
+ app.put("/api/memberships/update", controller.update);
757
832
  app.post("/api/memberships/delete", controller.deleteMembership);
833
+ app.get("/api/memberships", controller.read);
758
834
  };
759
835
  const lookupConfigs = {
760
836
  products: {