@ozdao/martyrs 0.2.506 → 0.2.507

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 (574) hide show
  1. package/dist/auth.server.cjs +1 -1
  2. package/dist/auth.server.js +1 -1
  3. package/dist/builder.cjs +52 -60
  4. package/dist/builder.js +52 -60
  5. package/dist/chats.server.cjs +1 -1
  6. package/dist/chats.server.js +1 -1
  7. package/dist/events.server.cjs +1 -1
  8. package/dist/events.server.js +1 -1
  9. package/dist/{mailing-q7sR8gCV.cjs → mailing-Bs9ThyVZ.cjs} +1 -24
  10. package/dist/{mailing-C11EYWm-.js → mailing-DzlhsxCC.js} +1 -24
  11. package/dist/main-AWSb_d2P.cjs +11 -0
  12. package/dist/{main-DC__VS5b.js → main-Dq-UfO4G.js} +2562 -2477
  13. package/dist/martyrs/src/components/Button/{Button.vue.cjs → Button.vue2.cjs} +2 -2
  14. package/dist/martyrs/src/components/Button/Button.vue2.cjs.map +1 -0
  15. package/dist/martyrs/src/components/Button/{Button.vue.js → Button.vue2.js} +2 -2
  16. package/dist/martyrs/src/components/Button/{Button.vue.cjs.map → Button.vue2.js.map} +1 -1
  17. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.cjs +3 -3
  18. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.cjs.map +1 -1
  19. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js +3 -3
  20. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js.map +1 -1
  21. package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs +0 -93
  22. package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs.map +1 -1
  23. package/dist/martyrs/src/components/EditImages/EditImages.vue.js +1 -94
  24. package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -1
  25. package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs +93 -0
  26. package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs.map +1 -1
  27. package/dist/martyrs/src/components/EditImages/EditImages.vue2.js +94 -1
  28. package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +1 -1
  29. package/dist/martyrs/src/components/Feed/Feed.vue.cjs +14 -45
  30. package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
  31. package/dist/martyrs/src/components/Feed/Feed.vue.js +21 -52
  32. package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
  33. package/dist/martyrs/src/components/Field/Field.vue.cjs +14 -6
  34. package/dist/martyrs/src/components/Field/Field.vue.cjs.map +1 -1
  35. package/dist/martyrs/src/components/Field/Field.vue.js +14 -6
  36. package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -1
  37. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs +58 -11
  38. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs.map +1 -1
  39. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +60 -13
  40. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js.map +1 -1
  41. package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.cjs +2 -2
  42. package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.cjs.map +1 -1
  43. package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.js +2 -2
  44. package/dist/martyrs/src/components/PhotoViewer/PhotoViewer.vue.js.map +1 -1
  45. package/dist/martyrs/src/components/Spoiler/{Spoiler.vue.cjs → Spoiler.vue2.cjs} +2 -2
  46. package/dist/martyrs/src/components/Spoiler/Spoiler.vue2.cjs.map +1 -0
  47. package/dist/martyrs/src/components/Spoiler/{Spoiler.vue.js → Spoiler.vue2.js} +2 -2
  48. package/dist/martyrs/src/components/Spoiler/{Spoiler.vue.cjs.map → Spoiler.vue2.js.map} +1 -1
  49. package/dist/martyrs/src/components/Tab/{Tab.vue.cjs → Tab.vue2.cjs} +2 -2
  50. package/dist/martyrs/src/components/Tab/Tab.vue2.cjs.map +1 -0
  51. package/dist/martyrs/src/components/Tab/{Tab.vue.js → Tab.vue2.js} +2 -2
  52. package/dist/martyrs/src/components/Tab/{Tab.vue.cjs.map → Tab.vue2.js.map} +1 -1
  53. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +2 -2
  54. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +2 -2
  55. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +2 -2
  56. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +2 -2
  57. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +2 -2
  58. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs.map +1 -1
  59. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +2 -2
  60. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
  61. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.cjs +1 -1
  62. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js +1 -1
  63. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +42 -10
  64. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs.map +1 -1
  65. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +44 -12
  66. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js.map +1 -1
  67. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs +12 -16
  68. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs.map +1 -1
  69. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +22 -26
  70. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js.map +1 -1
  71. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +13 -17
  72. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs.map +1 -1
  73. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +34 -38
  74. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js.map +1 -1
  75. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.cjs +13 -9
  76. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.cjs.map +1 -1
  77. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.js +13 -9
  78. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditSidebar.vue.js.map +1 -1
  79. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +2 -2
  80. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +2 -2
  81. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -2
  82. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +2 -2
  83. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +2 -2
  84. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +2 -2
  85. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +1 -1
  86. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
  87. package/dist/martyrs/src/modules/auth/views/router/users.cjs +0 -4
  88. package/dist/martyrs/src/modules/auth/views/router/users.cjs.map +1 -1
  89. package/dist/martyrs/src/modules/auth/views/router/users.js +0 -4
  90. package/dist/martyrs/src/modules/auth/views/router/users.js.map +1 -1
  91. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  92. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +1 -1
  93. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  94. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  95. package/dist/martyrs/src/modules/community/components/pages/Posts.vue.cjs +431 -0
  96. package/dist/martyrs/src/modules/community/components/pages/Posts.vue.cjs.map +1 -0
  97. package/dist/martyrs/src/modules/community/components/pages/Posts.vue.js +431 -0
  98. package/dist/martyrs/src/modules/community/components/pages/Posts.vue.js.map +1 -0
  99. package/dist/martyrs/src/modules/community/router/blogposts.cjs +17 -0
  100. package/dist/martyrs/src/modules/community/router/blogposts.cjs.map +1 -1
  101. package/dist/martyrs/src/modules/community/router/blogposts.js +17 -0
  102. package/dist/martyrs/src/modules/community/router/blogposts.js.map +1 -1
  103. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  104. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  105. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  106. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  107. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
  108. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  109. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  110. package/dist/martyrs/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  111. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +1 -3
  112. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs.map +1 -1
  113. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -3
  114. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
  115. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.cjs +1 -1
  116. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js +1 -1
  117. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +2 -2
  118. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  119. package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs +4 -6
  120. package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.cjs.map +1 -1
  121. package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js +4 -6
  122. package/dist/martyrs/src/modules/globals/views/classes/globals.websocket.js.map +1 -1
  123. package/dist/martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue.cjs +1 -1
  124. package/dist/martyrs/src/modules/globals/views/components/blocks/BlockFilter.vue.js +1 -1
  125. package/dist/martyrs/src/modules/globals/views/components/blocks/Card.vue.cjs +5 -2
  126. package/dist/martyrs/src/modules/globals/views/components/blocks/Card.vue.cjs.map +1 -1
  127. package/dist/martyrs/src/modules/globals/views/components/blocks/Card.vue.js +6 -3
  128. package/dist/martyrs/src/modules/globals/views/components/blocks/Card.vue.js.map +1 -1
  129. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
  130. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
  131. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.cjs +1 -1
  132. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.js +1 -1
  133. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +1 -1
  134. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
  135. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +2 -3
  136. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
  137. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +2 -3
  138. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
  139. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +1 -1
  140. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +1 -1
  141. package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +1 -1
  142. package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +1 -1
  143. package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
  144. package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
  145. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs +324 -0
  146. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs.map +1 -0
  147. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js +324 -0
  148. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js.map +1 -0
  149. package/dist/martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -1
  150. package/dist/martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +1 -1
  151. package/dist/martyrs/src/modules/icons/entities/IconLock.vue.cjs +32 -0
  152. package/dist/martyrs/src/modules/icons/entities/IconLock.vue.cjs.map +1 -0
  153. package/dist/martyrs/src/modules/icons/entities/IconLock.vue.js +32 -0
  154. package/dist/martyrs/src/modules/icons/entities/IconLock.vue.js.map +1 -0
  155. package/dist/martyrs/src/modules/icons/icons.client.cjs +2 -0
  156. package/dist/martyrs/src/modules/icons/icons.client.cjs.map +1 -1
  157. package/dist/martyrs/src/modules/icons/icons.client.js +116 -114
  158. package/dist/martyrs/src/modules/icons/icons.client.js.map +1 -1
  159. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs +5 -3
  160. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.cjs.map +1 -1
  161. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js +117 -115
  162. package/dist/martyrs/src/modules/icons/pages/IconsPage.vue.js.map +1 -1
  163. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.cjs +1 -1
  164. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +1 -1
  165. package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.cjs +1 -1
  166. package/dist/martyrs/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
  167. package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.cjs +11 -36
  168. package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.cjs.map +1 -1
  169. package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.js +11 -36
  170. package/dist/martyrs/src/modules/landing/components/sections/SubscribeNewsletter.vue.js.map +1 -1
  171. package/dist/martyrs/src/modules/landing/landing.client.cjs +3 -0
  172. package/dist/martyrs/src/modules/landing/landing.client.cjs.map +1 -1
  173. package/dist/martyrs/src/modules/landing/landing.client.js +3 -0
  174. package/dist/martyrs/src/modules/landing/landing.client.js.map +1 -1
  175. package/dist/martyrs/src/modules/landing/locales/en.cjs +12 -0
  176. package/dist/martyrs/src/modules/landing/locales/en.cjs.map +1 -0
  177. package/dist/martyrs/src/modules/landing/locales/en.js +12 -0
  178. package/dist/martyrs/src/modules/landing/locales/en.js.map +1 -0
  179. package/dist/martyrs/src/modules/landing/locales/index.cjs +10 -0
  180. package/dist/martyrs/src/modules/landing/locales/index.cjs.map +1 -0
  181. package/dist/martyrs/src/modules/landing/locales/index.js +10 -0
  182. package/dist/martyrs/src/modules/landing/locales/index.js.map +1 -0
  183. package/dist/martyrs/src/modules/landing/locales/ru.cjs +12 -0
  184. package/dist/martyrs/src/modules/landing/locales/ru.cjs.map +1 -0
  185. package/dist/martyrs/src/modules/landing/locales/ru.js +12 -0
  186. package/dist/martyrs/src/modules/landing/locales/ru.js.map +1 -0
  187. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs +1 -1
  188. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +1 -1
  189. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.cjs +1 -1
  190. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +1 -1
  191. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs +1 -1
  192. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +1 -1
  193. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.cjs +1 -1
  194. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +1 -1
  195. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.cjs +1 -1
  196. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +1 -1
  197. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +1 -1
  198. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
  199. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs +1 -1
  200. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +1 -1
  201. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs +1 -1
  202. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
  203. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs +1 -1
  204. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +1 -1
  205. package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs +2 -2
  206. package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs.map +1 -1
  207. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +2 -2
  208. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js.map +1 -1
  209. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs +1 -1
  210. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +1 -1
  211. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs +1 -1
  212. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
  213. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs +2 -2
  214. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs.map +1 -1
  215. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +2 -2
  216. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js.map +1 -1
  217. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs +1 -1
  218. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +1 -1
  219. package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs +2 -2
  220. package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs.map +1 -1
  221. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +2 -2
  222. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js.map +1 -1
  223. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.cjs +1 -1
  224. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
  225. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs +1 -1
  226. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +1 -1
  227. package/dist/martyrs/src/modules/music/router/music.cjs +2 -4
  228. package/dist/martyrs/src/modules/music/router/music.cjs.map +1 -1
  229. package/dist/martyrs/src/modules/music/router/music.js +2 -4
  230. package/dist/martyrs/src/modules/music/router/music.js.map +1 -1
  231. package/dist/martyrs/src/modules/notifications/components/pages/Notifications.vue.cjs +1 -1
  232. package/dist/martyrs/src/modules/notifications/components/pages/Notifications.vue.js +1 -1
  233. package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.cjs +86 -0
  234. package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.cjs.map +1 -0
  235. package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.js +86 -0
  236. package/dist/martyrs/src/modules/orders/components/blocks/CardApplication.vue.js.map +1 -0
  237. package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.cjs +103 -0
  238. package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.cjs.map +1 -0
  239. package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.js +103 -0
  240. package/dist/martyrs/src/modules/orders/components/blocks/CardCustomer.vue.js.map +1 -0
  241. package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.cjs +194 -0
  242. package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.cjs.map +1 -0
  243. package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js +194 -0
  244. package/dist/martyrs/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue.js.map +1 -0
  245. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.cjs +138 -0
  246. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.cjs.map +1 -0
  247. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +138 -0
  248. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js.map +1 -0
  249. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs +189 -0
  250. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs.map +1 -0
  251. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +189 -0
  252. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js.map +1 -0
  253. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.cjs +173 -0
  254. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.cjs.map +1 -0
  255. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +173 -0
  256. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js.map +1 -0
  257. package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.cjs +233 -0
  258. package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.cjs.map +1 -0
  259. package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.js +233 -0
  260. package/dist/martyrs/src/modules/orders/components/pages/Applications.vue.js.map +1 -0
  261. package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.cjs +234 -0
  262. package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.cjs.map +1 -0
  263. package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.js +234 -0
  264. package/dist/martyrs/src/modules/orders/components/pages/Customers.vue.js.map +1 -0
  265. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  266. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  267. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +10 -9
  268. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs.map +1 -1
  269. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +10 -9
  270. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js.map +1 -1
  271. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +9 -83
  272. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs.map +1 -1
  273. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +10 -84
  274. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js.map +1 -1
  275. package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  276. package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +1 -1
  277. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.cjs +119 -0
  278. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.cjs.map +1 -0
  279. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +119 -0
  280. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js.map +1 -0
  281. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.cjs +139 -0
  282. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.cjs.map +1 -0
  283. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +139 -0
  284. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js.map +1 -0
  285. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -3
  286. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs.map +1 -1
  287. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -3
  288. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js.map +1 -1
  289. package/dist/martyrs/src/modules/orders/locales/en.cjs +38 -0
  290. package/dist/martyrs/src/modules/orders/locales/en.cjs.map +1 -0
  291. package/dist/martyrs/src/modules/orders/locales/en.js +38 -0
  292. package/dist/martyrs/src/modules/orders/locales/en.js.map +1 -0
  293. package/dist/martyrs/src/modules/orders/locales/index.cjs +10 -0
  294. package/dist/martyrs/src/modules/orders/locales/index.cjs.map +1 -0
  295. package/dist/martyrs/src/modules/orders/locales/index.js +10 -0
  296. package/dist/martyrs/src/modules/orders/locales/index.js.map +1 -0
  297. package/dist/martyrs/src/modules/orders/locales/ru.cjs +38 -0
  298. package/dist/martyrs/src/modules/orders/locales/ru.cjs.map +1 -0
  299. package/dist/martyrs/src/modules/orders/locales/ru.js +38 -0
  300. package/dist/martyrs/src/modules/orders/locales/ru.js.map +1 -0
  301. package/dist/martyrs/src/modules/orders/orders.client.cjs +78 -3
  302. package/dist/martyrs/src/modules/orders/orders.client.cjs.map +1 -1
  303. package/dist/martyrs/src/modules/orders/orders.client.js +80 -5
  304. package/dist/martyrs/src/modules/orders/orders.client.js.map +1 -1
  305. package/dist/martyrs/src/modules/orders/router/applications.router.cjs +17 -0
  306. package/dist/martyrs/src/modules/orders/router/applications.router.cjs.map +1 -0
  307. package/dist/martyrs/src/modules/orders/router/applications.router.js +17 -0
  308. package/dist/martyrs/src/modules/orders/router/applications.router.js.map +1 -0
  309. package/dist/martyrs/src/modules/orders/router/customers.router.cjs +18 -0
  310. package/dist/martyrs/src/modules/orders/router/customers.router.cjs.map +1 -0
  311. package/dist/martyrs/src/modules/orders/router/customers.router.js +18 -0
  312. package/dist/martyrs/src/modules/orders/router/customers.router.js.map +1 -0
  313. package/dist/martyrs/src/modules/orders/store/applications.cjs +4 -42
  314. package/dist/martyrs/src/modules/orders/store/applications.cjs.map +1 -1
  315. package/dist/martyrs/src/modules/orders/store/applications.js +3 -41
  316. package/dist/martyrs/src/modules/orders/store/applications.js.map +1 -1
  317. package/dist/martyrs/src/modules/orders/store/models/application.cjs +20 -0
  318. package/dist/martyrs/src/modules/orders/store/models/application.cjs.map +1 -0
  319. package/dist/martyrs/src/modules/orders/store/models/application.js +20 -0
  320. package/dist/martyrs/src/modules/orders/store/models/application.js.map +1 -0
  321. package/dist/martyrs/src/modules/orders/store/models/customer.cjs +13 -1
  322. package/dist/martyrs/src/modules/orders/store/models/customer.cjs.map +1 -1
  323. package/dist/martyrs/src/modules/orders/store/models/customer.js +13 -1
  324. package/dist/martyrs/src/modules/orders/store/models/customer.js.map +1 -1
  325. package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  326. package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
  327. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  328. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  329. package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  330. package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js +1 -1
  331. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +2 -2
  332. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  333. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  334. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +1 -1
  335. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +16 -192
  336. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs.map +1 -1
  337. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +17 -193
  338. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js.map +1 -1
  339. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
  340. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  341. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  342. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  343. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +2 -11
  344. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs.map +1 -1
  345. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js +6 -15
  346. package/dist/martyrs/src/modules/organizations/components/sections/DetailsTabSection.vue.js.map +1 -1
  347. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  348. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  349. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  350. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  351. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +2 -2
  352. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  353. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs +85 -89
  354. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs.map +1 -1
  355. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js +92 -96
  356. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js.map +1 -1
  357. package/dist/martyrs/src/modules/organizations/router/organizations.cjs +4 -0
  358. package/dist/martyrs/src/modules/organizations/router/organizations.cjs.map +1 -1
  359. package/dist/martyrs/src/modules/organizations/router/organizations.js +4 -0
  360. package/dist/martyrs/src/modules/organizations/router/organizations.js.map +1 -1
  361. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
  362. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
  363. package/dist/martyrs/src/modules/pages/views/components/pages/Page.vue.cjs +3 -6
  364. package/dist/martyrs/src/modules/pages/views/components/pages/Page.vue.cjs.map +1 -1
  365. package/dist/martyrs/src/modules/pages/views/components/pages/Page.vue.js +3 -6
  366. package/dist/martyrs/src/modules/pages/views/components/pages/Page.vue.js.map +1 -1
  367. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
  368. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  369. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
  370. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  371. package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.cjs +1 -1
  372. package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.cjs.map +1 -1
  373. package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.js +1 -1
  374. package/dist/martyrs/src/modules/products/components/blocks/CardCategory.vue.js.map +1 -1
  375. package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.cjs +2 -2
  376. package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.cjs.map +1 -1
  377. package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js +2 -2
  378. package/dist/martyrs/src/modules/products/components/blocks/ProductImages.vue.js.map +1 -1
  379. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +22 -19
  380. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs.map +1 -1
  381. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +22 -19
  382. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js.map +1 -1
  383. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +28 -19
  384. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs.map +1 -1
  385. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +28 -19
  386. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
  387. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +2 -2
  388. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +2 -2
  389. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +3 -3
  390. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  391. package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +360 -105
  392. package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs.map +1 -1
  393. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +378 -123
  394. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
  395. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.cjs +1 -1
  396. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
  397. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.cjs +1 -1
  398. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +1 -1
  399. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +2 -2
  400. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +2 -2
  401. package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  402. package/dist/martyrs/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  403. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.cjs +1 -1
  404. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
  405. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs +33 -3
  406. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs.map +1 -1
  407. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +34 -4
  408. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js.map +1 -1
  409. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.cjs +2 -2
  410. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +2 -2
  411. package/dist/martyrs/src/modules/products/router/products.router.cjs +15 -0
  412. package/dist/martyrs/src/modules/products/router/products.router.cjs.map +1 -1
  413. package/dist/martyrs/src/modules/products/router/products.router.js +15 -0
  414. package/dist/martyrs/src/modules/products/router/products.router.js.map +1 -1
  415. package/dist/martyrs/src/modules/products/store/categories.cjs +25 -7
  416. package/dist/martyrs/src/modules/products/store/categories.cjs.map +1 -1
  417. package/dist/martyrs/src/modules/products/store/categories.js +25 -7
  418. package/dist/martyrs/src/modules/products/store/categories.js.map +1 -1
  419. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.cjs +2 -2
  420. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +2 -2
  421. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.cjs +1 -1
  422. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +1 -1
  423. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  424. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  425. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  426. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  427. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  428. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
  429. package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.cjs +1 -1
  430. package/dist/martyrs/src/modules/spots/components/pages/Spot.vue.js +1 -1
  431. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
  432. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
  433. package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.cjs +345 -0
  434. package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.cjs.map +1 -0
  435. package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js +345 -0
  436. package/dist/martyrs/src/modules/spots/components/pages/Spots.vue.js.map +1 -0
  437. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +1 -1
  438. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +1 -1
  439. package/dist/martyrs/src/modules/spots/router/spots.cjs +17 -0
  440. package/dist/martyrs/src/modules/spots/router/spots.cjs.map +1 -1
  441. package/dist/martyrs/src/modules/spots/router/spots.js +17 -0
  442. package/dist/martyrs/src/modules/spots/router/spots.js.map +1 -1
  443. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  444. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
  445. package/dist/martyrs.cjs.js +1 -1
  446. package/dist/martyrs.css +1 -1
  447. package/dist/martyrs.es.js +1 -1
  448. package/dist/notifications.server.cjs +1 -1
  449. package/dist/notifications.server.js +1 -1
  450. package/dist/orders.server.cjs +459 -201
  451. package/dist/orders.server.js +459 -201
  452. package/dist/organizations.server.cjs +1 -1
  453. package/dist/organizations.server.js +1 -1
  454. package/dist/products.server.cjs +428 -255
  455. package/dist/products.server.js +428 -255
  456. package/dist/style.css +115 -139
  457. package/dist/{tickets.controller-DQQcjyui.js → tickets.controller-C56OvH6v.js} +1 -1
  458. package/dist/{tickets.controller-D0V0gJCA.cjs → tickets.controller-DdnndM6c.cjs} +1 -1
  459. package/dist/wallet.server.cjs +1 -1
  460. package/dist/wallet.server.js +1 -1
  461. package/dist/{web-B1bEJ1W9.js → web-BXajFCU2.js} +1 -1
  462. package/dist/{web-D5i9k2Vv.cjs → web-DaBwwCQ5.cjs} +1 -1
  463. package/package.json +1 -1
  464. package/src/builder/modes/ssr.dev.js +10 -10
  465. package/src/builder/rspack/rspack.config.ssr.client.js +50 -50
  466. package/src/components/Checkbox/Checkbox.vue +3 -4
  467. package/src/components/Feed/Feed.old.vue +522 -0
  468. package/src/components/Feed/Feed.vue +4 -4
  469. package/src/components/Field/Field.vue +7 -1
  470. package/src/components/FieldBig/FieldBig.vue +62 -8
  471. package/src/components/PhotoViewer/PhotoViewer.vue +1 -1
  472. package/src/modules/STYLES.MD +198 -0
  473. package/src/modules/auth/views/components/pages/Profile.vue +1 -1
  474. package/src/modules/auth/views/components/pages/ProfileEdit.vue +42 -8
  475. package/src/modules/auth/views/components/pages/ProfileEditAccount.vue +9 -11
  476. package/src/modules/auth/views/components/pages/ProfileEditProfile.vue +9 -11
  477. package/src/modules/auth/views/components/pages/ProfileEditSidebar.vue +7 -4
  478. package/src/modules/auth/views/router/users.js +0 -4
  479. package/src/modules/community/components/pages/Posts.vue +444 -0
  480. package/src/modules/community/router/blogposts.js +15 -0
  481. package/src/modules/globals/views/classes/globals.websocket.js +7 -8
  482. package/src/modules/globals/views/components/blocks/Card.vue +2 -1
  483. package/src/modules/globals/views/components/layouts/Client.vue +1 -2
  484. package/src/modules/globals/views/components/partials/FooterAlt.vue +161 -188
  485. package/src/modules/globals/views/components/sections/Filters.vue +261 -121
  486. package/src/modules/globals/views/components/sections/filters/FilterCheckbox.vue +78 -0
  487. package/src/modules/globals/views/components/sections/filters/FilterDateRange.vue +177 -0
  488. package/src/modules/globals/views/components/sections/filters/FilterRange.vue +51 -50
  489. package/src/modules/icons/entities/IconLock.vue +14 -0
  490. package/src/modules/icons/icons.client.js +2 -1
  491. package/src/modules/icons/pages/IconsPage.vue +4 -2
  492. package/src/modules/landing/components/sections/SubscribeNewsletter.vue +11 -61
  493. package/src/modules/landing/landing.client.js +6 -0
  494. package/src/modules/landing/locales/en.js +9 -0
  495. package/src/modules/landing/locales/index.js +7 -0
  496. package/src/modules/landing/locales/ru.js +9 -0
  497. package/src/modules/music/components/pages/Album.vue +1 -1
  498. package/src/modules/music/components/pages/Playlist.vue +1 -1
  499. package/src/modules/music/components/pages/Track.vue +1 -1
  500. package/src/modules/orders/components/blocks/CardApplication.vue +74 -0
  501. package/src/modules/orders/components/blocks/CardCustomer.vue +90 -0
  502. package/src/modules/orders/components/elements/FieldSubscribeNewsletter.vue +199 -0
  503. package/src/modules/orders/components/forms/FormApplicationDetails.vue +117 -0
  504. package/src/modules/orders/components/forms/FormCustomerDetails.vue +165 -0
  505. package/src/modules/orders/components/forms/FormSelectCustomer.vue +172 -0
  506. package/src/modules/orders/components/pages/Applications.vue +240 -0
  507. package/src/modules/orders/components/pages/Customers.vue +239 -0
  508. package/src/modules/orders/components/pages/OrderCreate.vue +2 -2
  509. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +4 -75
  510. package/src/modules/orders/components/sections/ApplicationDetails.vue +91 -0
  511. package/src/modules/orders/components/sections/CustomerDetails.vue +107 -0
  512. package/src/modules/orders/locales/en.js +35 -0
  513. package/src/modules/orders/locales/index.js +7 -0
  514. package/src/modules/orders/locales/ru.js +35 -0
  515. package/src/modules/orders/middlewares/applications.verifier.js +189 -0
  516. package/src/modules/orders/middlewares/customers.verifier.js +251 -0
  517. package/src/modules/orders/models/application.model.js +21 -0
  518. package/src/modules/orders/models/customer.model.js +26 -0
  519. package/src/modules/orders/orders.client.js +86 -1
  520. package/src/modules/orders/orders.server.js +3 -1
  521. package/src/modules/orders/router/applications.router.js +15 -0
  522. package/src/modules/orders/router/customers.router.js +17 -0
  523. package/src/modules/orders/routes/applications.routes.js +124 -12
  524. package/src/modules/orders/routes/customers.routes.js +43 -0
  525. package/src/modules/orders/store/applications.js +3 -159
  526. package/src/modules/orders/store/models/application.js +18 -0
  527. package/src/modules/orders/store/models/customer.js +12 -0
  528. package/src/modules/organizations/components/pages/Organization.new.vue +593 -0
  529. package/src/modules/organizations/components/pages/Organization.vue +10 -201
  530. package/src/modules/organizations/components/sections/DetailsTabSection.vue +2 -2
  531. package/src/modules/organizations/configs/navigation.organization.config.js +69 -85
  532. package/src/modules/organizations/router/organizations.js +5 -0
  533. package/src/modules/pages/views/components/pages/Page.vue +1 -1
  534. package/src/modules/products/TASKS.MD +157 -0
  535. package/src/modules/products/components/blocks/CardCategory.vue +1 -1
  536. package/src/modules/products/components/blocks/ProductImages.vue +1 -1
  537. package/src/modules/products/components/pages/Categories.vue +27 -22
  538. package/src/modules/products/components/pages/CategoryEdit.vue +24 -13
  539. package/src/modules/products/components/pages/Products.vue +414 -173
  540. package/src/modules/products/components/sections/ProductsRecommended.vue +46 -2
  541. package/src/modules/products/controllers/categories.controller.js +321 -282
  542. package/src/modules/products/controllers/configs/products.lookup.config.js +9 -0
  543. package/src/modules/products/controllers/products.controller.js +2 -1
  544. package/src/modules/products/controllers/queries/products.queries.js +183 -11
  545. package/src/modules/products/middlewares/categories.verifier.js +58 -15
  546. package/src/modules/products/migrations/categories-to-materialized-path.js +433 -0
  547. package/src/modules/products/migrations/path-to-url.js +27 -0
  548. package/src/modules/products/models/category.model.js +8 -23
  549. package/src/modules/products/router/products.router.js +12 -0
  550. package/src/modules/products/store/categories.js +26 -7
  551. package/src/modules/rents/TASK.MD +161 -0
  552. package/src/modules/spots/components/pages/Spots.vue +342 -0
  553. package/src/modules/spots/router/spots.js +15 -0
  554. package/src/styles/base/all.scss +2 -3
  555. package/src/styles/layout.scss +16 -0
  556. package/dist/main-w3rPUBVh.cjs +0 -11
  557. package/dist/martyrs/src/components/BottomSheet/BottomSheet.vue.cjs +0 -96
  558. package/dist/martyrs/src/components/BottomSheet/BottomSheet.vue.cjs.map +0 -1
  559. package/dist/martyrs/src/components/BottomSheet/BottomSheet.vue.js +0 -96
  560. package/dist/martyrs/src/components/BottomSheet/BottomSheet.vue.js.map +0 -1
  561. package/dist/martyrs/src/components/Button/Button.vue.js.map +0 -1
  562. package/dist/martyrs/src/components/Spoiler/Spoiler.vue.js.map +0 -1
  563. package/dist/martyrs/src/components/Tab/Tab.vue.js.map +0 -1
  564. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +0 -155
  565. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.cjs.map +0 -1
  566. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js +0 -155
  567. package/dist/martyrs/src/modules/orders/components/sections/FormAddCustomer.vue.js.map +0 -1
  568. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +0 -81
  569. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs.map +0 -1
  570. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.js +0 -81
  571. package/dist/martyrs/src/modules/orders/components/sections/FormCustomerDetails.vue.js.map +0 -1
  572. package/src/modules/orders/components/sections/FormAddCustomer.vue +0 -152
  573. package/src/modules/orders/components/sections/FormCustomerDetails.vue +0 -67
  574. package/src/modules/orders/controllers/applications.controller.js +0 -122
@@ -15,133 +15,200 @@ const controllerFactory$1 = (db) => {
15
15
  const Category = db.category;
16
16
  const logger = new Logger(db);
17
17
  const cache = new Cache();
18
+ const generateSlug = async (name, parentId = null) => {
19
+ const baseSlug = name.toLowerCase().replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").trim("-");
20
+ let slug = baseSlug;
21
+ let counter = 1;
22
+ while (await Category.exists({ slug, parent: parentId })) {
23
+ slug = `${baseSlug}-${counter++}`;
24
+ }
25
+ return slug;
26
+ };
27
+ const buildTreeFromUrl = (categories, sortParam = "order", sortOrder = "asc") => {
28
+ console.log("cat buildtree", categories);
29
+ categories.sort((a, b) => a.url.localeCompare(b.url));
30
+ const tree = [];
31
+ const nodeMap = /* @__PURE__ */ new Map();
32
+ console.log("cat buildtree", categories);
33
+ categories.forEach((cat) => {
34
+ const node = { ...cat, children: [] };
35
+ nodeMap.set(cat.url, node);
36
+ const parentUrl = cat.url.substring(0, cat.url.lastIndexOf("/"));
37
+ console.log("cat parent buildtree", parentUrl);
38
+ if (parentUrl && nodeMap.has(parentUrl)) {
39
+ nodeMap.get(parentUrl).children.push(node);
40
+ console.log("cat nodeMap buildtree", nodeMap);
41
+ } else if (cat.level === 0) {
42
+ tree.push(node);
43
+ }
44
+ });
45
+ const sortNodes = (nodes) => {
46
+ nodes.sort((a, b) => {
47
+ const va = a[sortParam] ?? Number.MAX_SAFE_INTEGER;
48
+ const vb = b[sortParam] ?? Number.MAX_SAFE_INTEGER;
49
+ const diff = typeof va === "number" ? va - vb : String(va).localeCompare(String(vb));
50
+ return sortOrder === "asc" ? diff : -diff;
51
+ });
52
+ nodes.forEach((n) => n.children?.length && sortNodes(n.children));
53
+ };
54
+ sortNodes(tree);
55
+ return tree;
56
+ };
57
+ const updateCategoryPaths = async (categoryId, newParentId = null) => {
58
+ const category = await Category.findById(categoryId);
59
+ if (!category) return;
60
+ let newPath = [];
61
+ let newLevel = 0;
62
+ let newUrl = `/${category.slug}`;
63
+ if (newParentId) {
64
+ const parent = await Category.findById(newParentId);
65
+ if (parent) {
66
+ newPath = [...parent.path, newParentId];
67
+ newLevel = parent.level + 1;
68
+ newUrl = `${parent.url}/${category.slug}`;
69
+ }
70
+ }
71
+ await Category.updateOne(
72
+ { _id: categoryId },
73
+ { path: newPath, level: newLevel, url: newUrl }
74
+ );
75
+ const oldUrlPattern = new RegExp(`^${category.url}/`);
76
+ await Category.updateMany(
77
+ { url: oldUrlPattern },
78
+ [{
79
+ $set: {
80
+ url: { $concat: [newUrl, { $substr: ["$url", { $strLenCP: category.url }, -1] }] },
81
+ level: { $add: ["$level", newLevel - category.level] }
82
+ }
83
+ }]
84
+ );
85
+ };
18
86
  return {
19
87
  async read(req, res) {
20
88
  try {
21
- let { parent, url, search, sortParam, sortOrder, skip, limit, excludeChildren, rootOnly, type } = req.verifiedQuery;
22
- const cacheKey = JSON.stringify(req.verifiedQuery);
23
- let cachedResult = await cache.get(cacheKey);
24
- if (cachedResult) {
25
- return res.status(200).json(cachedResult);
26
- }
27
- const matchStage = {
28
- ...req.query.status && { status: req.query.status },
29
- ...url && { url },
89
+ const {
90
+ _id,
91
+ parent,
92
+ url,
93
+ status,
94
+ search,
95
+ sortParam = "order",
96
+ sortOrder = "asc",
97
+ skip,
98
+ limit,
99
+ root = false,
100
+ owner,
101
+ type,
102
+ tree,
103
+ depth = -1
104
+ } = req.query;
105
+ const depthNum = parseInt(depth, 10);
106
+ const isTree = tree === "true" || tree === true;
107
+ const isRoot = root === "true" || root === true;
108
+ console.log("🚀 Read categories params:", { url, depth: depthNum, tree: isTree, root });
109
+ const cacheKey = JSON.stringify(req.query);
110
+ const cached = await cache.get(cacheKey);
111
+ if (cached) return res.json(cached);
112
+ const match = {
113
+ ..._id && { _id: new db.mongoose.Types.ObjectId(_id) },
114
+ ...status && { status },
30
115
  ...search && { name: { $regex: search, $options: "i" } },
31
- ...parent ? { parent: new db.mongoose.Types.ObjectId(parent) } : {},
32
- ...rootOnly === "true" && !search ? { parent: null } : {}
116
+ ...type && { "owner.type": type },
117
+ ...owner && { "owner.target": new db.mongoose.Types.ObjectId(owner) },
118
+ ...parent && { parent: new db.mongoose.Types.ObjectId(parent) }
119
+ // Исправлено: было owner вместо parent
33
120
  };
34
- if (type === "platform") {
35
- matchStage["owner.type"] = "platform";
36
- } else if (type === "organization" && req.query.organizationId) {
37
- matchStage["owner.type"] = "organization";
38
- matchStage["owner.target"] = new db.mongoose.Types.ObjectId(req.query.organizationId);
39
- }
40
- if (search) {
41
- excludeChildren = "true";
121
+ if (url && !_id) {
122
+ if (depth === 0) {
123
+ match.url = url;
124
+ } else if (depth === 1) {
125
+ match.$or = [
126
+ { url },
127
+ { url: { $regex: "^${url}/[^/]+$" } }
128
+ ];
129
+ } else {
130
+ match.$or = [
131
+ { url },
132
+ { url: { $regex: `^${url}/` } }
133
+ ];
134
+ }
135
+ } else if (isRoot && !_id) {
136
+ match.url = { $regex: "^/[^/]+$" };
42
137
  }
43
- let pipeline = [
44
- { $match: matchStage },
45
- queryProcessorGlobals.getCreatorUserLookupStage(),
46
- queryProcessorGlobals.getCreatorOrganizationLookupStage(),
47
- // For owner
48
- queryProcessorGlobals.getOwnerUserLookupStage(),
49
- queryProcessorGlobals.getOwnerOrganizationLookupStage(),
50
- queryProcessorGlobals.getAddFieldsCreatorOwnerStage(),
51
- { $sort: { [sortParam]: sortOrder === "asc" ? 1 : -1 } },
52
- { $skip: Number(skip) },
53
- { $limit: Number(limit) },
54
- queryProcessorGlobals.removeTempPropeties()
138
+ console.log("🔎 Match object:", JSON.stringify(match, null, 2));
139
+ const pipeline = [
140
+ { $match: match },
141
+ ...queryProcessorGlobals.getSortingOptions(sortParam, sortOrder)
142
+ // ...(skip || limit ? globalsQuery.getPaginationOptions(skip, limit) : []),
55
143
  ];
56
- if (excludeChildren !== "true") {
57
- pipeline.push({
58
- $graphLookup: {
59
- from: "categories",
60
- startWith: "$_id",
61
- connectFromField: "_id",
62
- connectToField: "parent",
63
- as: "allDescendants",
64
- maxDepth: 10
65
- }
144
+ console.log("🔧 Pipeline:", JSON.stringify(pipeline, null, 2));
145
+ let results = await Category.aggregate(pipeline);
146
+ console.log("🔍 Aggregate results:", results.length, "categories found");
147
+ console.log("🔍 Results URLs:", results.map((r) => r.url));
148
+ if (url && depthNum > 1) {
149
+ const maxLevel = url.split("/").filter(Boolean).length + depthNum - 1;
150
+ results = results.filter((cat) => {
151
+ const catLevel = cat.url.split("/").filter(Boolean).length;
152
+ return cat.url === url || catLevel <= maxLevel;
66
153
  });
154
+ console.log("🔍 After depth filter:", results.length, "categories");
67
155
  }
68
- const results = await Category.aggregate(pipeline);
69
- let response;
70
- if (excludeChildren === "true") {
71
- response = results;
72
- } else {
73
- let allCategories = [];
74
- results.forEach((doc) => {
75
- let category = { ...doc };
76
- delete category.allDescendants;
77
- allCategories.push(category);
78
- if (doc.allDescendants && doc.allDescendants.length > 0) {
79
- allCategories.push(...doc.allDescendants);
80
- }
81
- });
82
- let uniqueCategories = Array.from(new Map(allCategories.map((item) => [item._id.toString(), item])).values());
83
- let tree = buildAdjacencyTree(uniqueCategories, sortParam, sortOrder);
84
- if (rootOnly === "true") {
85
- response = tree;
156
+ if (isTree && results.length > 0) {
157
+ console.log("🌳 Building tree from results");
158
+ results = buildTreeFromUrl(results, sortParam, sortOrder);
159
+ } else if (!isTree && depthNum === 1 && url && results.length > 0) {
160
+ console.log("📋 Processing tree=false, depth=1");
161
+ console.log("📋 Looking for main category with url:", url);
162
+ const mainCategory = results.find((c) => c.url === url);
163
+ console.log("📋 Main category found:", !!mainCategory, mainCategory?.url);
164
+ if (mainCategory) {
165
+ const children = results.filter(
166
+ (c) => c.url !== url && c.url.startsWith(url + "/")
167
+ );
168
+ console.log("📋 Children found:", children.length, children.map((c) => c.url));
169
+ mainCategory.children = children;
170
+ results = [mainCategory];
171
+ console.log("📋 Final result with children:", results[0].url, "children:", results[0].children.length);
86
172
  } else {
87
- const requestedCategoryIds = results.map((r) => r._id.toString());
88
- response = tree.filter((category) => requestedCategoryIds.includes(category._id.toString()));
89
- }
90
- }
91
- let tags = ["categories"];
92
- if (type === "organization" && req.query.organizationId) {
93
- tags.push(`organization_${req.query.organizationId}`);
94
- }
95
- for (const cat of response) {
96
- if (cat._id) {
97
- tags.push(`category_${cat._id}`);
173
+ console.log("❌ Main category not found in results!");
98
174
  }
99
175
  }
100
- await cache.setWithTags(cacheKey, response, tags);
101
- res.status(200).json(response);
176
+ const tags = ["categories"];
177
+ if (owner) tags.push(`organization_${owner}`);
178
+ await cache.setWithTags(cacheKey, results, tags);
179
+ console.log("✅ Final results count:", results.length);
180
+ res.json(results);
102
181
  } catch (err) {
103
- console.log(err);
104
182
  logger.error(`Error reading categories: ${err.message}`);
105
183
  res.status(500).json({ message: err.message });
106
184
  }
107
185
  },
108
186
  async create(req, res) {
109
187
  try {
110
- const categoryData = req.verifiedBody;
111
- if (!categoryData.creator && req.userId) {
112
- categoryData.creator = {
113
- type: "user",
114
- target: req.userId
115
- };
116
- }
117
- if (!categoryData.owner) {
118
- if (req.query.organizationId) {
119
- categoryData.owner = {
120
- type: "organization",
121
- target: req.query.organizationId
122
- };
123
- } else {
124
- categoryData.owner = {
125
- type: "platform",
126
- target: null
127
- };
128
- }
188
+ const data = req.verifiedBody;
189
+ data.creator ||= { type: "user", target: req.userId };
190
+ data.owner ||= req.query.owner ? { type: "organization", target: req.query.owner } : { type: "platform", target: null };
191
+ const slug = await generateSlug(data.name, data.parent);
192
+ let path = [];
193
+ let level = 0;
194
+ let url = `/${slug}`;
195
+ if (data.parent) {
196
+ const parent = await Category.findById(data.parent);
197
+ if (!parent) throw new Error("Parent category not found");
198
+ path = [...parent.path, data.parent];
199
+ level = parent.level + 1;
200
+ url = `${parent.url}/${slug}`;
129
201
  }
130
- const highestOrder = await Category.findOne().sort("-order");
131
- const order = highestOrder ? highestOrder.order + 1 : 1;
132
- const category = new Category({
133
- ...categoryData,
202
+ const maxOrder = await Category.findOne({ parent: data.parent || null }).sort("-order").select("order");
203
+ const order = (maxOrder?.order || 0) + 1;
204
+ const category = await Category.create({
205
+ ...data,
206
+ slug,
207
+ url,
208
+ path,
209
+ level,
134
210
  order
135
211
  });
136
- if (categoryData.parent) {
137
- const parent = await Category.findByIdAndUpdate(categoryData.parent, { $push: { children: category._id } }, { new: true });
138
- if (!parent) throw new Error("Parent category not found");
139
- category.parent = parent._id;
140
- }
141
- if (categoryData.children && categoryData.children.length > 0) {
142
- await Category.updateMany({ _id: { $in: categoryData.children } }, { $set: { parent: category._id } });
143
- }
144
- await category.save();
145
212
  await cache.delByTags(["categories"]);
146
213
  if (category.owner.type === "organization") {
147
214
  await cache.delByTag(`organization_${category.owner.target}`);
@@ -150,23 +217,30 @@ const controllerFactory$1 = (db) => {
150
217
  res.status(201).json(category);
151
218
  } catch (err) {
152
219
  logger.error(`Error creating category: ${err.message}`);
153
- res.status(err.message === "Parent category not found" ? 404 : 500).json({ message: err.message });
220
+ res.status(err.message.includes("not found") ? 404 : 500).json({ message: err.message });
154
221
  }
155
222
  },
156
223
  async update(req, res) {
157
224
  try {
158
- const category = req.verifiedBody;
159
- const updatedCategory = await Category.findByIdAndUpdate(category._id, { $set: category }, { new: true }).lean();
160
- if (!updatedCategory) {
225
+ const data = req.verifiedBody;
226
+ const oldCategory = await Category.findById(data._id);
227
+ if (!oldCategory) {
161
228
  return res.status(404).json({ message: "Category not found" });
162
229
  }
163
- await cache.delByTag(`category_${category._id}`);
230
+ if (data.parent !== void 0 && data.parent != oldCategory.parent) {
231
+ await updateCategoryPaths(data._id, data.parent);
232
+ }
233
+ const updated = await Category.findByIdAndUpdate(
234
+ data._id,
235
+ { $set: data },
236
+ { new: true }
237
+ ).lean();
164
238
  await cache.delByTags(["categories"]);
165
- if (updatedCategory.owner && updatedCategory.owner.type === "organization") {
166
- await cache.delByTag(`organization_${updatedCategory.owner.target}`);
239
+ if (updated.owner?.type === "organization") {
240
+ await cache.delByTag(`organization_${updated.owner.target}`);
167
241
  }
168
- logger.info(`Category updated: ${category._id}`);
169
- res.status(200).json(updatedCategory);
242
+ logger.info(`Category updated: ${data._id}`);
243
+ res.json(updated);
170
244
  } catch (err) {
171
245
  logger.error(`Category update error: ${err.message}`);
172
246
  res.status(500).json({ message: "Failed to update category" });
@@ -175,45 +249,20 @@ const controllerFactory$1 = (db) => {
175
249
  async updateOrder(req, res) {
176
250
  try {
177
251
  const { categories } = req.verifiedBody;
178
- const bulkOps = categories.map((category) => ({
252
+ const bulkOps = categories.map((cat) => ({
179
253
  updateOne: {
180
- filter: { _id: category._id },
181
- update: {
182
- $set: {
183
- order: category.order,
184
- parent: category.parent ? new db.mongoose.Types.ObjectId(category.parent) : null
185
- }
186
- }
254
+ filter: { _id: cat._id },
255
+ update: { $set: { order: cat.order } }
187
256
  }
188
257
  }));
258
+ const movedCategories = categories.filter((cat) => cat.parent !== void 0);
259
+ for (const cat of movedCategories) {
260
+ await updateCategoryPaths(cat._id, cat.parent);
261
+ }
189
262
  await Category.bulkWrite(bulkOps);
190
- const categoryIds = categories.map((cat) => cat._id);
191
- const organizationIds = /* @__PURE__ */ new Set();
192
- const updatedCategories = await Category.find({ _id: { $in: categoryIds } }).lean();
193
- updatedCategories.forEach((cat) => {
194
- if (cat.owner && cat.owner.type === "organization") {
195
- organizationIds.add(cat.owner.target.toString());
196
- }
197
- });
198
263
  await cache.delByTags(["categories"]);
199
- for (const catId of categoryIds) {
200
- await cache.delByTag(`category_${catId}`);
201
- }
202
- for (const orgId of organizationIds) {
203
- await cache.delByTag(`organization_${orgId}`);
204
- }
205
- let query = {};
206
- if (req.query.type === "platform") {
207
- query = { "owner.type": "platform" };
208
- } else if (req.query.type === "organization" && req.query.organizationId) {
209
- query = {
210
- "owner.type": "organization",
211
- "owner.target": new db.mongoose.Types.ObjectId(req.query.organizationId)
212
- };
213
- }
214
- const result = await Category.find(query).sort({ order: "asc" }).lean();
215
- logger.info(`Categories order updated: ${categoryIds.join(", ")}`);
216
- res.status(200).json(result);
264
+ logger.info(`Categories order updated: ${categories.map((c) => c._id).join(", ")}`);
265
+ res.json({ message: "Order updated successfully" });
217
266
  } catch (err) {
218
267
  logger.error(`Category order update error: ${err.message}`);
219
268
  res.status(500).json({ message: "Failed to update categories order" });
@@ -222,83 +271,33 @@ const controllerFactory$1 = (db) => {
222
271
  async delete(req, res) {
223
272
  try {
224
273
  const category = req.currentResource;
225
- let ownerOrgId = null;
226
- if (category.owner && category.owner.type === "organization") {
227
- ownerOrgId = category.owner.target;
228
- }
229
- const result = await Category.aggregate([
230
- { $match: { _id: category._id } },
231
- {
232
- $graphLookup: {
233
- from: "categories",
234
- startWith: "$_id",
235
- connectFromField: "_id",
236
- connectToField: "parent",
237
- as: "descendants"
238
- }
239
- },
274
+ await Category.updateMany(
275
+ { parent: category._id },
240
276
  {
241
- $project: { descendants: 1 }
277
+ $set: { parent: category.parent },
278
+ $inc: { level: -1 }
242
279
  }
243
- ]);
244
- const idsToDelete = [category._id, ...(result[0]?.descendants || []).map(({ _id }) => _id)];
245
- const categoryIdsTags = idsToDelete.map((id) => `category_${id}`);
246
- await Category.deleteMany({ _id: { $in: idsToDelete } });
280
+ );
281
+ if (category.parent) {
282
+ const parent = await Category.findById(category.parent);
283
+ const children = await Category.find({ parent: category.parent });
284
+ for (const child of children) {
285
+ await updateCategoryPaths(child._id, category.parent);
286
+ }
287
+ }
288
+ await Category.deleteOne({ _id: category._id });
247
289
  await cache.delByTags(["categories"]);
248
- await cache.delByTags(categoryIdsTags);
249
- if (ownerOrgId) {
250
- await cache.delByTag(`organization_${ownerOrgId}`);
290
+ if (category.owner?.type === "organization") {
291
+ await cache.delByTag(`organization_${category.owner.target}`);
251
292
  }
252
- logger.info(`Category and its subcategories deleted: ${category.url}`);
253
- res.status(200).json({ message: "Category and its subcategories deleted successfully" });
293
+ logger.info(`Category deleted: ${category.slug}`);
294
+ res.json({ message: "Category deleted successfully" });
254
295
  } catch (err) {
255
296
  logger.error(`Error deleting category: ${err.message}`);
256
- res.status(500).json({ message: err.message || "Internal server error" });
297
+ res.status(500).json({ message: err.message });
257
298
  }
258
299
  }
259
300
  };
260
- function buildAdjacencyTree(categories, sortParam, sortOrder) {
261
- const categoryMap = /* @__PURE__ */ new Map();
262
- categories.forEach((category) => {
263
- categoryMap.set(category._id.toString(), {
264
- ...category,
265
- children: []
266
- });
267
- });
268
- const rootCategories = [];
269
- categories.forEach((category) => {
270
- const categoryWithChildren = categoryMap.get(category._id.toString());
271
- if (category.parent && categoryMap.has(category.parent.toString())) {
272
- const parentCategory = categoryMap.get(category.parent.toString());
273
- parentCategory.children.push(categoryWithChildren);
274
- } else if (!category.parent) {
275
- rootCategories.push(categoryWithChildren);
276
- }
277
- });
278
- function sortCategories(nodes) {
279
- if (!nodes || nodes.length === 0) {
280
- return nodes;
281
- }
282
- nodes.sort((a, b) => {
283
- const valueA = a[sortParam] ?? (sortParam === "order" ? Number.MAX_SAFE_INTEGER : "");
284
- const valueB = b[sortParam] ?? (sortParam === "order" ? Number.MAX_SAFE_INTEGER : "");
285
- if (typeof valueA === "number" && typeof valueB === "number") {
286
- return sortOrder === "asc" ? valueA - valueB : valueB - valueA;
287
- } else {
288
- const stringA = String(valueA);
289
- const stringB = String(valueB);
290
- return sortOrder === "asc" ? stringA.localeCompare(stringB) : stringB.localeCompare(stringA);
291
- }
292
- });
293
- nodes.forEach((node) => {
294
- if (node.children && node.children.length > 0) {
295
- sortCategories(node.children);
296
- }
297
- });
298
- return nodes;
299
- }
300
- return sortCategories(rootCategories);
301
- }
302
301
  };
303
302
  class OpenAIGlobal {
304
303
  constructor() {
@@ -389,15 +388,42 @@ const openaiGlobal = new OpenAIGlobal();
389
388
  const ObjectId = Types.ObjectId;
390
389
  function getCategoriesFilterStage(categories) {
391
390
  if (!categories) return [];
392
- const categoryIds = categories.split(",").filter(Boolean);
393
- if (categoryIds.length === 0) return [];
394
- return [{
395
- $match: {
396
- category: {
397
- $in: categoryIds.map((id) => new ObjectId(id))
391
+ if (typeof categories === "string") {
392
+ return [
393
+ {
394
+ $lookup: {
395
+ from: "categories",
396
+ localField: "category",
397
+ foreignField: "_id",
398
+ as: "categoryData"
399
+ }
400
+ },
401
+ {
402
+ $match: {
403
+ "categoryData.url": {
404
+ $regex: `^${categories}(/|$)`
405
+ }
406
+ }
407
+ },
408
+ {
409
+ $project: {
410
+ categoryData: 0
411
+ }
398
412
  }
399
- }
400
- }];
413
+ ];
414
+ }
415
+ if (Array.isArray(categories)) {
416
+ const categoryIds = categories.filter(Boolean);
417
+ if (categoryIds.length === 0) return [];
418
+ return [{
419
+ $match: {
420
+ category: {
421
+ $in: categoryIds.map((id) => new ObjectId(id))
422
+ }
423
+ }
424
+ }];
425
+ }
426
+ return [];
401
427
  }
402
428
  function getDeliveryFilterStage(delivery) {
403
429
  if (!delivery) return [];
@@ -439,13 +465,134 @@ function getAttributeFiltersStage(filtersString) {
439
465
  return [];
440
466
  }
441
467
  }
468
+ function getVariantPriceFilterStage(prices) {
469
+ if (!prices) return [];
470
+ try {
471
+ const priceRanges = prices.split(",");
472
+ const priceConditions = [];
473
+ priceRanges.forEach((priceRange) => {
474
+ if (priceRange.startsWith("<")) {
475
+ priceConditions.push({
476
+ variants: {
477
+ $elemMatch: {
478
+ price: { $lt: parseFloat(priceRange.slice(1)) }
479
+ }
480
+ }
481
+ });
482
+ } else if (priceRange.startsWith(">")) {
483
+ priceConditions.push({
484
+ variants: {
485
+ $elemMatch: {
486
+ price: { $gt: parseFloat(priceRange.slice(1)) }
487
+ }
488
+ }
489
+ });
490
+ } else {
491
+ const [min, max] = priceRange.split("-").map(Number);
492
+ if (!isNaN(min) && !isNaN(max)) {
493
+ priceConditions.push({
494
+ variants: {
495
+ $elemMatch: {
496
+ price: { $gte: min, $lte: max }
497
+ }
498
+ }
499
+ });
500
+ }
501
+ }
502
+ });
503
+ return priceConditions.length > 0 ? [{ $match: { $or: priceConditions } }] : [];
504
+ } catch (error) {
505
+ console.error("Error parsing price filters:", error);
506
+ return [];
507
+ }
508
+ }
509
+ function getAvailabilityFilterStage(dateStart, dateEnd) {
510
+ if (!dateStart || !dateEnd) return [];
511
+ const startDate = new Date(dateStart);
512
+ const endDate = new Date(dateEnd);
513
+ return [
514
+ {
515
+ $lookup: {
516
+ from: "rents",
517
+ let: { productId: "$_id" },
518
+ pipeline: [
519
+ {
520
+ $match: {
521
+ $expr: {
522
+ $and: [
523
+ { $eq: ["$product", "$$productId"] },
524
+ { $in: ["$status", ["confirmed", "active"]] },
525
+ {
526
+ $or: [
527
+ {
528
+ $and: [
529
+ { $gte: ["$startDate", startDate] },
530
+ { $lte: ["$startDate", endDate] }
531
+ ]
532
+ },
533
+ {
534
+ $and: [
535
+ { $gte: ["$endDate", startDate] },
536
+ { $lte: ["$endDate", endDate] }
537
+ ]
538
+ },
539
+ {
540
+ $and: [
541
+ { $lte: ["$startDate", startDate] },
542
+ { $gte: ["$endDate", endDate] }
543
+ ]
544
+ }
545
+ ]
546
+ }
547
+ ]
548
+ }
549
+ }
550
+ },
551
+ {
552
+ $group: {
553
+ _id: null,
554
+ totalRented: { $sum: { $ifNull: ["$quantity", 1] } }
555
+ }
556
+ }
557
+ ],
558
+ as: "rentInfo"
559
+ }
560
+ },
561
+ {
562
+ $addFields: {
563
+ rentedQuantity: {
564
+ $ifNull: [{ $arrayElemAt: ["$rentInfo.totalRented", 0] }, 0]
565
+ },
566
+ availableQuantity: {
567
+ $subtract: [
568
+ { $ifNull: ["$quantity", 1] },
569
+ { $ifNull: [{ $arrayElemAt: ["$rentInfo.totalRented", 0] }, 0] }
570
+ ]
571
+ }
572
+ }
573
+ },
574
+ {
575
+ $match: {
576
+ availableQuantity: { $gt: 0 }
577
+ }
578
+ },
579
+ {
580
+ $project: {
581
+ rentInfo: 0,
582
+ rentedQuantity: 0
583
+ }
584
+ }
585
+ ];
586
+ }
442
587
  function escapeRegex(string) {
443
588
  return string.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
444
589
  }
445
590
  const queryProcessorProducts = {
446
591
  getAttributeFiltersStage,
447
592
  getCategoriesFilterStage,
448
- getDeliveryFilterStage
593
+ getDeliveryFilterStage,
594
+ getVariantPriceFilterStage,
595
+ getAvailabilityFilterStage
449
596
  };
450
597
  const productLookupConfigs = {
451
598
  // NEW: Лукап для availability продуктов из inventory модуля
@@ -556,6 +703,15 @@ const productLookupConfigs = {
556
703
  }
557
704
  }
558
705
  }]
706
+ },
707
+ // Лукап для аренд продукта
708
+ rents: {
709
+ lookup: {
710
+ from: "rents",
711
+ localField: "_id",
712
+ foreignField: "product",
713
+ as: "rents"
714
+ }
559
715
  }
560
716
  };
561
717
  const controllerFactory = (db) => {
@@ -585,10 +741,11 @@ const controllerFactory = (db) => {
585
741
  start: "startDate",
586
742
  end: "endDate"
587
743
  }),
588
- ...queryProcessorGlobals.getPriceConditions(req.query.prices),
589
744
  ...queryProcessorProducts.getCategoriesFilterStage(req.query.categories),
590
745
  ...queryProcessorProducts.getDeliveryFilterStage(req.query.delivery),
591
746
  ...queryProcessorProducts.getAttributeFiltersStage(req.query.filters),
747
+ ...queryProcessorProducts.getVariantPriceFilterStage(req.query.prices),
748
+ ...queryProcessorProducts.getAvailabilityFilterStage(req.query.dateStart, req.query.dateEnd),
592
749
  ...queryProcessorGlobals.getLookupStages(requestedLookups, productLookupConfigs),
593
750
  queryProcessorGlobals.getCreatorUserLookupStage(),
594
751
  queryProcessorGlobals.getCreatorOrganizationLookupStage(),
@@ -704,8 +861,10 @@ const CategoryModel = (db) => {
704
861
  description: { type: String, trim: true },
705
862
  photo: { type: String },
706
863
  order: { type: Number, required: true },
864
+ slug: { type: String, required: true, trim: true },
707
865
  url: { type: String, required: true, trim: true, unique: true },
708
866
  parent: { type: db.mongoose.Schema.Types.ObjectId, ref: "Category" },
867
+ level: { type: Number, required: true, default: 0 },
709
868
  localization: { type: Array },
710
869
  filters: { type: Array }
711
870
  },
@@ -717,23 +876,12 @@ const CategoryModel = (db) => {
717
876
  applyOwnershipSchema(CategorySchema, db);
718
877
  applyMetadataSchema(CategorySchema);
719
878
  applyEngagementSchema(CategorySchema);
720
- CategorySchema.index({ name: 1 });
721
879
  CategorySchema.index({ name: "text", description: "text" });
722
- CategorySchema.index({ "owner.type": 1, "owner.target": 1, status: 1, parent: 1 });
723
- CategorySchema.index({ "owner.type": 1, "owner.target": 1, order: 1 });
880
+ CategorySchema.index({ url: 1, "owner.target": 1, status: 1, level: 1 });
881
+ CategorySchema.index({ "owner.type": 1, "owner.target": 1, status: 1, level: 1 });
724
882
  CategorySchema.index({ parent: 1, status: 1, order: 1 });
725
- CategorySchema.index({ parent: 1, status: 1, "owner.type": 1 });
726
- CategorySchema.index({ parent: 1, name: 1 });
727
- CategorySchema.index({ parent: 1, createdAt: -1 });
728
- CategorySchema.index({ parent: 1, updatedAt: -1 });
883
+ CategorySchema.index({ level: 1, status: 1, order: 1 });
729
884
  CategorySchema.index({ status: 1, order: 1 });
730
- CategorySchema.index({ status: 1, name: 1 });
731
- CategorySchema.index({ status: 1, createdAt: -1 });
732
- CategorySchema.index({ status: 1, updatedAt: -1 });
733
- CategorySchema.index({ _id: 1, parent: 1 });
734
- CategorySchema.index({ order: 1 });
735
- CategorySchema.index({ createdAt: -1 });
736
- CategorySchema.index({ updatedAt: -1 });
737
885
  const Category = db.mongoose.model("Category", CategorySchema, "categories");
738
886
  return Category;
739
887
  };
@@ -970,9 +1118,21 @@ const VariantModel = (db) => {
970
1118
  return Variant;
971
1119
  };
972
1120
  const verifierFactory$1 = function(db) {
1121
+ const generateSlug = (name, existingSlugs = []) => {
1122
+ let baseSlug = name.toLowerCase().replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-").trim("-");
1123
+ let slug = baseSlug;
1124
+ let counter = 1;
1125
+ while (existingSlugs.includes(slug)) {
1126
+ slug = `${baseSlug}-${counter}`;
1127
+ counter++;
1128
+ }
1129
+ return slug;
1130
+ };
973
1131
  const queryValidatorConfig = {
974
1132
  parent: { rule: "optional", validator: Validator.schema().string() },
1133
+ slug: { rule: "optional", validator: Validator.schema().string() },
975
1134
  url: { rule: "optional", validator: Validator.schema().string() },
1135
+ parentUrl: { rule: "optional", validator: Validator.schema().string() },
976
1136
  search: { rule: "optional", validator: Validator.schema().string() },
977
1137
  sortParam: {
978
1138
  rule: "optional",
@@ -1021,7 +1181,7 @@ const verifierFactory$1 = function(db) {
1021
1181
  validator: Validator.schema().string().oneOf(["draft", "internal", "published", "removed"]),
1022
1182
  default: "draft"
1023
1183
  },
1024
- url: { rule: "optional", validator: Validator.schema().string().required() },
1184
+ slug: { rule: "optional", validator: Validator.schema().string() },
1025
1185
  parent: { rule: "optional", validator: Validator.schema().oneOfTypes(["string", "null"]) },
1026
1186
  localization: { rule: "optional" },
1027
1187
  filters: { rule: "optional" },
@@ -1050,7 +1210,7 @@ const verifierFactory$1 = function(db) {
1050
1210
  }
1051
1211
  };
1052
1212
  const deleteBodyValidatorConfig = {
1053
- url: {
1213
+ _id: {
1054
1214
  rule: "optional",
1055
1215
  validator: Validator.schema().string().required()
1056
1216
  }
@@ -1109,18 +1269,31 @@ const verifierFactory$1 = function(db) {
1109
1269
  req.verifiedBody = verification.verifiedData;
1110
1270
  next();
1111
1271
  },
1112
- // Проверка на существование категории с тем же URL (для создания)
1272
+ // Проверка на существование категории с тем же slug в рамках parent
1113
1273
  async checkCategoryExistOrNot(req, res, next) {
1114
1274
  try {
1115
- if (!req.verifiedBody.url) {
1116
- return res.status(400).json({ message: "URL is required" });
1275
+ const { name, parent, slug } = req.verifiedBody;
1276
+ if (!name) {
1277
+ return res.status(400).json({ message: "Name is required" });
1117
1278
  }
1118
- const existingCategory = await db.category.findOne({ url: req.verifiedBody.url });
1119
- if (existingCategory) {
1120
- return res.status(409).json({
1121
- message: "Category with this URL already exists",
1122
- category: existingCategory
1279
+ let categorySlug = slug;
1280
+ if (!categorySlug) {
1281
+ const existingSlugs = await db.category.find({
1282
+ parent: parent || null
1283
+ }).distinct("slug");
1284
+ categorySlug = generateSlug(name, existingSlugs);
1285
+ req.verifiedBody.slug = categorySlug;
1286
+ } else {
1287
+ const existingCategory = await db.category.findOne({
1288
+ slug: categorySlug,
1289
+ parent: parent || null
1123
1290
  });
1291
+ if (existingCategory) {
1292
+ return res.status(409).json({
1293
+ message: "Category with this slug already exists in this parent",
1294
+ category: existingCategory
1295
+ });
1296
+ }
1124
1297
  }
1125
1298
  next();
1126
1299
  } catch (error) {
@@ -1144,14 +1317,14 @@ const verifierFactory$1 = function(db) {
1144
1317
  res.status(500).json({ message: error.message });
1145
1318
  }
1146
1319
  },
1147
- // Загрузка категории по URL для удаления
1320
+ // Загрузка категории по _id для удаления
1148
1321
  async loadCategoryForDelete(req, res, next) {
1149
1322
  try {
1150
- const url = req.verifiedBody.url;
1151
- if (!url) {
1152
- return res.status(400).json({ message: "Category URL is required" });
1323
+ const _id = req.verifiedBody._id;
1324
+ if (!_id) {
1325
+ return res.status(400).json({ message: "Category _id is required" });
1153
1326
  }
1154
- const category = await db.category.findOne({ url }).lean();
1327
+ const category = await db.category.findById(_id).lean();
1155
1328
  if (!category) {
1156
1329
  return res.status(404).json({ message: "Category not found" });
1157
1330
  }