@ozdao/martyrs 0.2.508 → 0.2.510

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 (317) hide show
  1. package/dist/{main-Dq-UfO4G.js → main-DrpgUZcn.js} +2808 -2615
  2. package/dist/main-XJQJFmgj.cjs +11 -0
  3. package/dist/martyrs/src/components/Button/{Button.vue.cjs → Button.vue2.cjs} +2 -2
  4. package/dist/martyrs/src/components/Button/Button.vue2.cjs.map +1 -0
  5. package/dist/martyrs/src/components/Button/{Button.vue.js → Button.vue2.js} +2 -2
  6. package/dist/martyrs/src/components/Button/{Button.vue.cjs.map → Button.vue2.js.map} +1 -1
  7. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.cjs +1 -1
  8. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.cjs.map +1 -1
  9. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js +1 -1
  10. package/dist/martyrs/src/components/Checkbox/Checkbox.vue.js.map +1 -1
  11. package/dist/martyrs/src/components/Feed/Carousel.vue.cjs +4 -3
  12. package/dist/martyrs/src/components/Feed/Carousel.vue.cjs.map +1 -1
  13. package/dist/martyrs/src/components/Feed/Carousel.vue.js +5 -4
  14. package/dist/martyrs/src/components/Feed/Carousel.vue.js.map +1 -1
  15. package/dist/martyrs/src/components/Feed/Feed.vue.cjs +1 -1
  16. package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
  17. package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
  18. package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
  19. package/dist/martyrs/src/components/Field/Field.vue.cjs +1 -1
  20. package/dist/martyrs/src/components/Field/Field.vue.cjs.map +1 -1
  21. package/dist/martyrs/src/components/Field/Field.vue.js +1 -1
  22. package/dist/martyrs/src/components/Field/Field.vue.js.map +1 -1
  23. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs +3 -3
  24. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs.map +1 -1
  25. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +3 -3
  26. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js.map +1 -1
  27. package/dist/martyrs/src/components/Tab/{Tab.vue2.cjs → Tab.vue.cjs} +2 -2
  28. package/dist/martyrs/src/components/Tab/{Tab.vue2.js.map → Tab.vue.cjs.map} +1 -1
  29. package/dist/martyrs/src/components/Tab/{Tab.vue2.js → Tab.vue.js} +2 -2
  30. package/dist/martyrs/src/components/Tab/Tab.vue.js.map +1 -0
  31. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +2 -2
  32. package/dist/martyrs/src/modules/auth/views/components/pages/EnterPassword.vue.js +2 -2
  33. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.cjs +2 -2
  34. package/dist/martyrs/src/modules/auth/views/components/pages/Invite.vue.js +2 -2
  35. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +1 -1
  36. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +1 -1
  37. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.cjs +1 -1
  38. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js +1 -1
  39. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +17 -11
  40. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs.map +1 -1
  41. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +18 -12
  42. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js.map +1 -1
  43. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.cjs +1 -1
  44. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditAccount.vue.js +1 -1
  45. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.cjs +1 -1
  46. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEditProfile.vue.js +1 -1
  47. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +2 -2
  48. package/dist/martyrs/src/modules/auth/views/components/pages/ResetPassword.vue.js +2 -2
  49. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -2
  50. package/dist/martyrs/src/modules/auth/views/components/pages/SignIn.vue.js +2 -2
  51. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.cjs +2 -2
  52. package/dist/martyrs/src/modules/auth/views/components/pages/SignUp.vue.js +2 -2
  53. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +1 -1
  54. package/dist/martyrs/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +1 -1
  55. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  56. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +1 -1
  57. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  58. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  59. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  60. package/dist/martyrs/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  61. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  62. package/dist/martyrs/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  63. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  64. package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +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.js +1 -1
  67. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +1 -0
  68. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs.map +1 -1
  69. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +1 -0
  70. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js.map +1 -1
  71. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.cjs +1 -1
  72. package/dist/martyrs/src/modules/events/components/pages/EventsBackoffice.vue.js +1 -1
  73. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  74. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  75. package/dist/martyrs/src/modules/globals/globals.client.js +15 -15
  76. package/dist/martyrs/src/modules/globals/globals.client.js.map +1 -1
  77. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
  78. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
  79. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.cjs +1 -1
  80. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupAuth.vue.js +1 -1
  81. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +1 -1
  82. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
  83. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +8 -3
  84. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
  85. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +8 -3
  86. package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
  87. package/dist/martyrs/src/modules/globals/views/components/partials/Footer.vue.cjs +121 -107
  88. package/dist/martyrs/src/modules/globals/views/components/partials/Footer.vue.cjs.map +1 -1
  89. package/dist/martyrs/src/modules/globals/views/components/partials/Footer.vue.js +131 -117
  90. package/dist/martyrs/src/modules/globals/views/components/partials/Footer.vue.js.map +1 -1
  91. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +2 -2
  92. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs.map +1 -1
  93. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +2 -2
  94. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js.map +1 -1
  95. package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
  96. package/dist/martyrs/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
  97. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs +112 -49
  98. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs.map +1 -1
  99. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js +121 -58
  100. package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.js.map +1 -1
  101. package/dist/martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -1
  102. package/dist/martyrs/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +1 -1
  103. package/dist/martyrs/src/modules/icons/logos/Logotype.vue.cjs +3 -3
  104. package/dist/martyrs/src/modules/icons/logos/Logotype.vue.js +3 -3
  105. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs +136 -134
  106. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs.map +1 -1
  107. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js +136 -134
  108. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js.map +1 -1
  109. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.cjs +1 -1
  110. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +1 -1
  111. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.cjs +1 -1
  112. package/dist/martyrs/src/modules/music/components/cards/AlbumCard.vue.js +1 -1
  113. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.cjs +1 -1
  114. package/dist/martyrs/src/modules/music/components/cards/ArtistCardSmall.vue.js +1 -1
  115. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.cjs +1 -1
  116. package/dist/martyrs/src/modules/music/components/cards/PlaylistCard.vue.js +1 -1
  117. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.cjs +1 -1
  118. package/dist/martyrs/src/modules/music/components/cards/TrackListCard.vue.js +1 -1
  119. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.cjs +1 -1
  120. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +1 -1
  121. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +1 -1
  122. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
  123. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.cjs +1 -1
  124. package/dist/martyrs/src/modules/music/components/forms/PlaylistForm.vue.js +1 -1
  125. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.cjs +1 -1
  126. package/dist/martyrs/src/modules/music/components/forms/SearchForm.vue.js +1 -1
  127. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs +1 -1
  128. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +1 -1
  129. package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs +1 -1
  130. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +1 -1
  131. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs +1 -1
  132. package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +1 -1
  133. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.cjs +1 -1
  134. package/dist/martyrs/src/modules/music/components/pages/MusicLibrary.vue.js +1 -1
  135. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs +1 -1
  136. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +1 -1
  137. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs +1 -1
  138. package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +1 -1
  139. package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs +1 -1
  140. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +1 -1
  141. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.cjs +1 -1
  142. package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
  143. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.cjs +1 -1
  144. package/dist/martyrs/src/modules/music/components/player/MusicPlayer.vue.js +1 -1
  145. package/dist/martyrs/src/modules/music/router/music.cjs +2 -1
  146. package/dist/martyrs/src/modules/music/router/music.cjs.map +1 -1
  147. package/dist/martyrs/src/modules/music/router/music.js +2 -1
  148. package/dist/martyrs/src/modules/music/router/music.js.map +1 -1
  149. package/dist/martyrs/src/modules/notifications/components/pages/Notifications.vue.cjs +1 -1
  150. package/dist/martyrs/src/modules/notifications/components/pages/Notifications.vue.js +1 -1
  151. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.cjs +1 -1
  152. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +1 -1
  153. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs +61 -9
  154. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs.map +1 -1
  155. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +61 -9
  156. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js.map +1 -1
  157. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.cjs +1 -1
  158. package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +1 -1
  159. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  160. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  161. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  162. package/dist/martyrs/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  163. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +2 -2
  164. package/dist/martyrs/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +2 -2
  165. package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  166. package/dist/martyrs/src/modules/orders/components/pages/Orders.vue.js +1 -1
  167. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.cjs +1 -1
  168. package/dist/martyrs/src/modules/orders/components/sections/ApplicationDetails.vue.js +1 -1
  169. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.cjs +1 -1
  170. package/dist/martyrs/src/modules/orders/components/sections/CustomerDetails.vue.js +1 -1
  171. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +2 -1
  172. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs.map +1 -1
  173. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +2 -1
  174. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js.map +1 -1
  175. package/dist/martyrs/src/modules/orders/orders.client.cjs +36 -44
  176. package/dist/martyrs/src/modules/orders/orders.client.cjs.map +1 -1
  177. package/dist/martyrs/src/modules/orders/orders.client.js +36 -44
  178. package/dist/martyrs/src/modules/orders/orders.client.js.map +1 -1
  179. package/dist/martyrs/src/modules/orders/store/models/customer.cjs +7 -0
  180. package/dist/martyrs/src/modules/orders/store/models/customer.cjs.map +1 -1
  181. package/dist/martyrs/src/modules/orders/store/models/customer.js +7 -0
  182. package/dist/martyrs/src/modules/orders/store/models/customer.js.map +1 -1
  183. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  184. package/dist/martyrs/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  185. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +2 -2
  186. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  187. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  188. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +1 -1
  189. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +2 -2
  190. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  191. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  192. package/dist/martyrs/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  193. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  194. package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  195. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  196. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  197. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +2 -2
  198. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  199. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs +17 -28
  200. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs.map +1 -1
  201. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js +17 -28
  202. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js.map +1 -1
  203. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
  204. package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
  205. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
  206. package/dist/martyrs/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  207. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
  208. package/dist/martyrs/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  209. package/dist/martyrs/src/modules/products/components/elements/QuantitySelector.vue.cjs +9 -1
  210. package/dist/martyrs/src/modules/products/components/elements/QuantitySelector.vue.cjs.map +1 -1
  211. package/dist/martyrs/src/modules/products/components/elements/QuantitySelector.vue.js +9 -1
  212. package/dist/martyrs/src/modules/products/components/elements/QuantitySelector.vue.js.map +1 -1
  213. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  214. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
  215. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +3 -2
  216. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs.map +1 -1
  217. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +3 -2
  218. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
  219. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +3 -3
  220. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs.map +1 -1
  221. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +3 -3
  222. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js.map +1 -1
  223. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +2 -2
  224. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  225. package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +118 -135
  226. package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs.map +1 -1
  227. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +123 -140
  228. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
  229. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.cjs +1 -1
  230. package/dist/martyrs/src/modules/products/components/sections/EditAttributes.vue.js +1 -1
  231. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.cjs +1 -1
  232. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +1 -1
  233. package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.cjs +3 -5
  234. package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.cjs.map +1 -1
  235. package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.js +4 -6
  236. package/dist/martyrs/src/modules/products/components/sections/EditRecommended.vue.js.map +1 -1
  237. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +1 -1
  238. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +1 -1
  239. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.cjs +1 -1
  240. package/dist/martyrs/src/modules/products/components/sections/ProductConfigurator.vue.js +1 -1
  241. package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.cjs +10 -5
  242. package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.cjs.map +1 -1
  243. package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.js +10 -5
  244. package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.js.map +1 -1
  245. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs +6 -3
  246. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs.map +1 -1
  247. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +6 -3
  248. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js.map +1 -1
  249. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.cjs +2 -2
  250. package/dist/martyrs/src/modules/products/components/sections/SectionProduct.vue.js +2 -2
  251. package/dist/martyrs/src/modules/products/store/products.cjs +5 -5
  252. package/dist/martyrs/src/modules/products/store/products.cjs.map +1 -1
  253. package/dist/martyrs/src/modules/products/store/products.js +5 -5
  254. package/dist/martyrs/src/modules/products/store/products.js.map +1 -1
  255. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.cjs +2 -2
  256. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +2 -2
  257. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.cjs +1 -1
  258. package/dist/martyrs/src/modules/rents/views/components/pages/Rents.vue.js +1 -1
  259. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  260. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  261. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  262. package/dist/martyrs/src/modules/spots/components/pages/Map.vue.js +1 -1
  263. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
  264. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
  265. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +1 -1
  266. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +1 -1
  267. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  268. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
  269. package/dist/martyrs.cjs.js +1 -1
  270. package/dist/martyrs.css +1 -1
  271. package/dist/martyrs.es.js +1 -1
  272. package/dist/orders.server.cjs +58 -0
  273. package/dist/orders.server.js +58 -0
  274. package/dist/products.server.cjs +79 -45
  275. package/dist/products.server.js +79 -45
  276. package/dist/style.css +44 -52
  277. package/dist/{web-BXajFCU2.js → web-C5cmb1FH.js} +1 -1
  278. package/dist/{web-DaBwwCQ5.cjs → web-d40xcY_Y.cjs} +1 -1
  279. package/package.json +1 -1
  280. package/src/components/Checkbox/Checkbox.vue +1 -1
  281. package/src/components/Feed/Carousel.vue +3 -1
  282. package/src/components/Feed/Feed.vue +1 -1
  283. package/src/components/Field/Field.vue +5 -0
  284. package/src/components/FieldBig/FieldBig.vue +2 -2
  285. package/src/modules/auth/views/components/pages/ProfileEdit.vue +17 -10
  286. package/src/modules/globals/views/components/layouts/Client.vue +12 -1
  287. package/src/modules/globals/views/components/partials/Footer.centered.vue +338 -0
  288. package/src/modules/globals/views/components/partials/Footer.vue +104 -99
  289. package/src/modules/globals/views/components/partials/Header.vue +1 -1
  290. package/src/modules/globals/views/components/sections/Filters.vue +73 -15
  291. package/src/modules/icons/logos/Logotype.vue +1 -1
  292. package/src/modules/inventory/components/pages/Inventory.vue +126 -119
  293. package/src/modules/orders/components/forms/FormCustomerDetails.vue +51 -0
  294. package/src/modules/orders/middlewares/customers.verifier.js +60 -0
  295. package/src/modules/orders/models/customer.model.js +18 -0
  296. package/src/modules/orders/orders.client.js +36 -44
  297. package/src/modules/orders/store/models/customer.js +7 -0
  298. package/src/modules/organizations/configs/navigation.organization.config.js +17 -26
  299. package/src/modules/products/TASKS.MD +1 -157
  300. package/src/modules/products/components/elements/QuantitySelector.vue +17 -9
  301. package/src/modules/products/components/pages/Product.vue +1 -1
  302. package/src/modules/products/components/pages/Products.vue +148 -175
  303. package/src/modules/products/components/sections/EditRecommended.vue +1 -3
  304. package/src/modules/products/components/sections/ProductsPopular.vue +9 -5
  305. package/src/modules/products/components/sections/ProductsRecommended.vue +4 -1
  306. package/src/modules/products/controllers/configs/products.lookup.config.js +31 -4
  307. package/src/modules/products/controllers/products.controller.js +14 -2
  308. package/src/modules/products/controllers/queries/products.queries.js +46 -43
  309. package/src/modules/products/models/product.model.js +4 -0
  310. package/src/modules/products/store/products.js +5 -5
  311. package/src/styles/base/all.scss +9 -4
  312. package/src/styles/config.scss +10 -0
  313. package/src/styles/responsive.scss +2 -1
  314. package/src/styles/typography.scss +0 -5
  315. package/dist/main-AWSb_d2P.cjs +0 -11
  316. package/dist/martyrs/src/components/Button/Button.vue.js.map +0 -1
  317. package/dist/martyrs/src/components/Tab/Tab.vue2.cjs.map +0 -1
@@ -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-Dq-UfO4G.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-DrpgUZcn.js";
2
2
  export {
3
3
  e as Address,
4
4
  o as Breadcrumbs,
@@ -577,6 +577,24 @@ const ModelCustomer = (db) => {
577
577
  type: String,
578
578
  enum: ["active", "inactive", "blocked"],
579
579
  default: "active"
580
+ },
581
+ address: {
582
+ country: {
583
+ type: String
584
+ },
585
+ addressLine1: {
586
+ type: String,
587
+ required: true
588
+ },
589
+ addressLine2: {
590
+ type: String
591
+ },
592
+ city: {
593
+ type: String
594
+ },
595
+ postalCode: {
596
+ type: String
597
+ }
580
598
  }
581
599
  },
582
600
  {
@@ -1059,6 +1077,26 @@ const verifierFactory = function(db) {
1059
1077
  type: globals_verifier.Validator.schema().string().oneOf(["user", "organization", "User", "Organization"]),
1060
1078
  target: globals_verifier.Validator.schema().string().pattern(/^[0-9a-fA-F]{24}$/)
1061
1079
  })
1080
+ },
1081
+ "address.country": {
1082
+ rule: "optional",
1083
+ validator: globals_verifier.Validator.schema().string().max(100, "Country must not exceed 100 characters")
1084
+ },
1085
+ "address.addressLine1": {
1086
+ rule: "optional",
1087
+ validator: globals_verifier.Validator.schema().string().max(255, "Address line 1 must not exceed 255 characters")
1088
+ },
1089
+ "address.addressLine2": {
1090
+ rule: "optional",
1091
+ validator: globals_verifier.Validator.schema().string().max(255, "Address line 2 must not exceed 255 characters")
1092
+ },
1093
+ "address.city": {
1094
+ rule: "optional",
1095
+ validator: globals_verifier.Validator.schema().string().max(100, "City must not exceed 100 characters")
1096
+ },
1097
+ "address.postalCode": {
1098
+ rule: "optional",
1099
+ validator: globals_verifier.Validator.schema().string().max(20, "Postal code must not exceed 20 characters")
1062
1100
  }
1063
1101
  });
1064
1102
  const updateVerifier = new globals_verifier.Verifier({
@@ -1109,6 +1147,26 @@ const verifierFactory = function(db) {
1109
1147
  status: {
1110
1148
  rule: "optional",
1111
1149
  validator: globals_verifier.Validator.schema().string().oneOf(["active", "inactive", "blocked"])
1150
+ },
1151
+ "address.country": {
1152
+ rule: "optional",
1153
+ validator: globals_verifier.Validator.schema().string().max(100, "Country must not exceed 100 characters")
1154
+ },
1155
+ "address.addressLine1": {
1156
+ rule: "optional",
1157
+ validator: globals_verifier.Validator.schema().string().max(255, "Address line 1 must not exceed 255 characters")
1158
+ },
1159
+ "address.addressLine2": {
1160
+ rule: "optional",
1161
+ validator: globals_verifier.Validator.schema().string().max(255, "Address line 2 must not exceed 255 characters")
1162
+ },
1163
+ "address.city": {
1164
+ rule: "optional",
1165
+ validator: globals_verifier.Validator.schema().string().max(100, "City must not exceed 100 characters")
1166
+ },
1167
+ "address.postalCode": {
1168
+ rule: "optional",
1169
+ validator: globals_verifier.Validator.schema().string().max(20, "Postal code must not exceed 20 characters")
1112
1170
  }
1113
1171
  });
1114
1172
  const readVerifier = new globals_verifier.Verifier({
@@ -575,6 +575,24 @@ const ModelCustomer = (db) => {
575
575
  type: String,
576
576
  enum: ["active", "inactive", "blocked"],
577
577
  default: "active"
578
+ },
579
+ address: {
580
+ country: {
581
+ type: String
582
+ },
583
+ addressLine1: {
584
+ type: String,
585
+ required: true
586
+ },
587
+ addressLine2: {
588
+ type: String
589
+ },
590
+ city: {
591
+ type: String
592
+ },
593
+ postalCode: {
594
+ type: String
595
+ }
578
596
  }
579
597
  },
580
598
  {
@@ -1057,6 +1075,26 @@ const verifierFactory = function(db) {
1057
1075
  type: Validator.schema().string().oneOf(["user", "organization", "User", "Organization"]),
1058
1076
  target: Validator.schema().string().pattern(/^[0-9a-fA-F]{24}$/)
1059
1077
  })
1078
+ },
1079
+ "address.country": {
1080
+ rule: "optional",
1081
+ validator: Validator.schema().string().max(100, "Country must not exceed 100 characters")
1082
+ },
1083
+ "address.addressLine1": {
1084
+ rule: "optional",
1085
+ validator: Validator.schema().string().max(255, "Address line 1 must not exceed 255 characters")
1086
+ },
1087
+ "address.addressLine2": {
1088
+ rule: "optional",
1089
+ validator: Validator.schema().string().max(255, "Address line 2 must not exceed 255 characters")
1090
+ },
1091
+ "address.city": {
1092
+ rule: "optional",
1093
+ validator: Validator.schema().string().max(100, "City must not exceed 100 characters")
1094
+ },
1095
+ "address.postalCode": {
1096
+ rule: "optional",
1097
+ validator: Validator.schema().string().max(20, "Postal code must not exceed 20 characters")
1060
1098
  }
1061
1099
  });
1062
1100
  const updateVerifier = new Verifier({
@@ -1107,6 +1145,26 @@ const verifierFactory = function(db) {
1107
1145
  status: {
1108
1146
  rule: "optional",
1109
1147
  validator: Validator.schema().string().oneOf(["active", "inactive", "blocked"])
1148
+ },
1149
+ "address.country": {
1150
+ rule: "optional",
1151
+ validator: Validator.schema().string().max(100, "Country must not exceed 100 characters")
1152
+ },
1153
+ "address.addressLine1": {
1154
+ rule: "optional",
1155
+ validator: Validator.schema().string().max(255, "Address line 1 must not exceed 255 characters")
1156
+ },
1157
+ "address.addressLine2": {
1158
+ rule: "optional",
1159
+ validator: Validator.schema().string().max(255, "Address line 2 must not exceed 255 characters")
1160
+ },
1161
+ "address.city": {
1162
+ rule: "optional",
1163
+ validator: Validator.schema().string().max(100, "City must not exceed 100 characters")
1164
+ },
1165
+ "address.postalCode": {
1166
+ rule: "optional",
1167
+ validator: Validator.schema().string().max(20, "Postal code must not exceed 20 characters")
1110
1168
  }
1111
1169
  });
1112
1170
  const readVerifier = new Verifier({
@@ -467,42 +467,31 @@ function getAttributeFiltersStage(filtersString) {
467
467
  return [];
468
468
  }
469
469
  }
470
- function getVariantPriceFilterStage(prices) {
471
- if (!prices) return [];
470
+ function getVariantPriceFilterStage(priceMin, priceMax) {
471
+ const hasValidMin = priceMin && priceMin.trim() !== "";
472
+ const hasValidMax = priceMax && priceMax.trim() !== "";
473
+ if (!hasValidMin && !hasValidMax) return [];
472
474
  try {
473
- const priceRanges = prices.split(",");
474
- const priceConditions = [];
475
- priceRanges.forEach((priceRange) => {
476
- if (priceRange.startsWith("<")) {
477
- priceConditions.push({
478
- variants: {
479
- $elemMatch: {
480
- price: { $lt: parseFloat(priceRange.slice(1)) }
481
- }
482
- }
483
- });
484
- } else if (priceRange.startsWith(">")) {
485
- priceConditions.push({
486
- variants: {
487
- $elemMatch: {
488
- price: { $gt: parseFloat(priceRange.slice(1)) }
489
- }
490
- }
491
- });
492
- } else {
493
- const [min, max] = priceRange.split("-").map(Number);
494
- if (!isNaN(min) && !isNaN(max)) {
495
- priceConditions.push({
496
- variants: {
497
- $elemMatch: {
498
- price: { $gte: min, $lte: max }
499
- }
500
- }
501
- });
475
+ const priceCondition = {
476
+ variants: {
477
+ $elemMatch: {
478
+ price: {}
502
479
  }
503
480
  }
504
- });
505
- return priceConditions.length > 0 ? [{ $match: { $or: priceConditions } }] : [];
481
+ };
482
+ if (hasValidMin) {
483
+ const minPrice = parseFloat(priceMin);
484
+ if (!isNaN(minPrice)) {
485
+ priceCondition.variants.$elemMatch.price.$gte = minPrice;
486
+ }
487
+ }
488
+ if (hasValidMax) {
489
+ const maxPrice = parseFloat(priceMax);
490
+ if (!isNaN(maxPrice)) {
491
+ priceCondition.variants.$elemMatch.price.$lte = maxPrice;
492
+ }
493
+ }
494
+ return [{ $match: priceCondition }];
506
495
  } catch (error) {
507
496
  console.error("Error parsing price filters:", error);
508
497
  return [];
@@ -512,11 +501,19 @@ function getAvailabilityFilterStage(dateStart, dateEnd) {
512
501
  if (!dateStart || !dateEnd) return [];
513
502
  const startDate = new Date(dateStart);
514
503
  const endDate = new Date(dateEnd);
504
+ if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
505
+ console.warn("Invalid dates provided for availability filter:", { dateStart, dateEnd });
506
+ return [];
507
+ }
515
508
  return [
516
509
  {
517
510
  $lookup: {
518
511
  from: "rents",
519
- let: { productId: "$_id" },
512
+ let: {
513
+ productId: "$_id",
514
+ dateStart: startDate,
515
+ dateEnd: endDate
516
+ },
520
517
  pipeline: [
521
518
  {
522
519
  $match: {
@@ -528,20 +525,20 @@ function getAvailabilityFilterStage(dateStart, dateEnd) {
528
525
  $or: [
529
526
  {
530
527
  $and: [
531
- { $gte: ["$startDate", startDate] },
532
- { $lte: ["$startDate", endDate] }
528
+ { $gte: ["$startDate", "$$dateStart"] },
529
+ { $lte: ["$startDate", "$$dateEnd"] }
533
530
  ]
534
531
  },
535
532
  {
536
533
  $and: [
537
- { $gte: ["$endDate", startDate] },
538
- { $lte: ["$endDate", endDate] }
534
+ { $gte: ["$endDate", "$$dateStart"] },
535
+ { $lte: ["$endDate", "$$dateEnd"] }
539
536
  ]
540
537
  },
541
538
  {
542
539
  $and: [
543
- { $lte: ["$startDate", startDate] },
544
- { $gte: ["$endDate", endDate] }
540
+ { $lte: ["$startDate", "$$dateStart"] },
541
+ { $gte: ["$endDate", "$$dateEnd"] }
545
542
  ]
546
543
  }
547
544
  ]
@@ -678,7 +675,17 @@ const productLookupConfigs = {
678
675
  from: "products",
679
676
  localField: "recommended",
680
677
  foreignField: "_id",
681
- as: "recommended"
678
+ as: "recommended",
679
+ pipeline: [
680
+ {
681
+ $lookup: {
682
+ from: "variants",
683
+ localField: "_id",
684
+ foreignField: "product",
685
+ as: "variants"
686
+ }
687
+ }
688
+ ]
682
689
  }
683
690
  },
684
691
  // Лукап для категорий продукта
@@ -706,13 +713,30 @@ const productLookupConfigs = {
706
713
  }
707
714
  }]
708
715
  },
709
- // Лукап для аренд продукта
716
+ // Лукап для аренд продуктов (статичный без дат)
710
717
  rents: {
711
718
  lookup: {
712
719
  from: "rents",
713
720
  localField: "_id",
714
721
  foreignField: "product",
715
- as: "rents"
722
+ as: "rents",
723
+ pipeline: [
724
+ {
725
+ $match: {
726
+ status: { $in: ["confirmed", "active"] }
727
+ }
728
+ },
729
+ {
730
+ $project: {
731
+ _id: 1,
732
+ product: 1,
733
+ startDate: 1,
734
+ endDate: 1,
735
+ quantity: 1,
736
+ status: 1
737
+ }
738
+ }
739
+ ]
716
740
  }
717
741
  }
718
742
  };
@@ -734,6 +758,15 @@ const controllerFactory = (db) => {
734
758
  const Read = async (req, res) => {
735
759
  try {
736
760
  const requestedLookups = queryProcessor.queryProcessorGlobals.getRequestedLookups(req.query);
761
+ if (req.query.dateStart || req.query.dateEnd) {
762
+ console.log("Availability filter params:", {
763
+ dateStart: req.query.dateStart,
764
+ dateEnd: req.query.dateEnd,
765
+ dateStartType: typeof req.query.dateStart,
766
+ dateEndType: typeof req.query.dateEnd
767
+ });
768
+ }
769
+ console.log("availability variant", JSON.stringify(...queryProcessorProducts.getAvailabilityFilterStage(req.query.dateStart, req.query.dateEnd), null, 2));
737
770
  const stages = [
738
771
  ...queryProcessor.queryProcessorGlobals.getBasicOptions(req.query),
739
772
  ...queryProcessor.queryProcessorGlobals.getSearchOptions(req.query.search, {
@@ -746,9 +779,9 @@ const controllerFactory = (db) => {
746
779
  ...queryProcessorProducts.getCategoriesFilterStage(req.query.categories),
747
780
  ...queryProcessorProducts.getDeliveryFilterStage(req.query.delivery),
748
781
  ...queryProcessorProducts.getAttributeFiltersStage(req.query.filters),
749
- ...queryProcessorProducts.getVariantPriceFilterStage(req.query.prices),
750
- ...queryProcessorProducts.getAvailabilityFilterStage(req.query.dateStart, req.query.dateEnd),
751
782
  ...queryProcessor.queryProcessorGlobals.getLookupStages(requestedLookups, productLookupConfigs),
783
+ ...queryProcessorProducts.getVariantPriceFilterStage(req.query.priceMin, req.query.priceMax),
784
+ ...queryProcessorProducts.getAvailabilityFilterStage(req.query.dateStart, req.query.dateEnd),
752
785
  queryProcessor.queryProcessorGlobals.getCreatorUserLookupStage(),
753
786
  queryProcessor.queryProcessorGlobals.getCreatorOrganizationLookupStage(),
754
787
  queryProcessor.queryProcessorGlobals.getOwnerUserLookupStage(),
@@ -967,6 +1000,7 @@ const ProductModel = (db) => {
967
1000
  });
968
1001
  common_schema.applyCommonSchema(ProductSchema);
969
1002
  ownership_schema.applyOwnershipSchema(ProductSchema, db);
1003
+ engagement_schema.applyEngagementSchema(ProductSchema);
970
1004
  ProductSchema.index({ name: "text", description: "text" });
971
1005
  ProductSchema.index({ "owner.type": 1, "owner.target": 1, status: 1, category: 1 });
972
1006
  ProductSchema.index({ category: 1, status: 1, delivery: 1, price: 1 });
@@ -465,42 +465,31 @@ function getAttributeFiltersStage(filtersString) {
465
465
  return [];
466
466
  }
467
467
  }
468
- function getVariantPriceFilterStage(prices) {
469
- if (!prices) return [];
468
+ function getVariantPriceFilterStage(priceMin, priceMax) {
469
+ const hasValidMin = priceMin && priceMin.trim() !== "";
470
+ const hasValidMax = priceMax && priceMax.trim() !== "";
471
+ if (!hasValidMin && !hasValidMax) return [];
470
472
  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
- });
473
+ const priceCondition = {
474
+ variants: {
475
+ $elemMatch: {
476
+ price: {}
500
477
  }
501
478
  }
502
- });
503
- return priceConditions.length > 0 ? [{ $match: { $or: priceConditions } }] : [];
479
+ };
480
+ if (hasValidMin) {
481
+ const minPrice = parseFloat(priceMin);
482
+ if (!isNaN(minPrice)) {
483
+ priceCondition.variants.$elemMatch.price.$gte = minPrice;
484
+ }
485
+ }
486
+ if (hasValidMax) {
487
+ const maxPrice = parseFloat(priceMax);
488
+ if (!isNaN(maxPrice)) {
489
+ priceCondition.variants.$elemMatch.price.$lte = maxPrice;
490
+ }
491
+ }
492
+ return [{ $match: priceCondition }];
504
493
  } catch (error) {
505
494
  console.error("Error parsing price filters:", error);
506
495
  return [];
@@ -510,11 +499,19 @@ function getAvailabilityFilterStage(dateStart, dateEnd) {
510
499
  if (!dateStart || !dateEnd) return [];
511
500
  const startDate = new Date(dateStart);
512
501
  const endDate = new Date(dateEnd);
502
+ if (isNaN(startDate.getTime()) || isNaN(endDate.getTime())) {
503
+ console.warn("Invalid dates provided for availability filter:", { dateStart, dateEnd });
504
+ return [];
505
+ }
513
506
  return [
514
507
  {
515
508
  $lookup: {
516
509
  from: "rents",
517
- let: { productId: "$_id" },
510
+ let: {
511
+ productId: "$_id",
512
+ dateStart: startDate,
513
+ dateEnd: endDate
514
+ },
518
515
  pipeline: [
519
516
  {
520
517
  $match: {
@@ -526,20 +523,20 @@ function getAvailabilityFilterStage(dateStart, dateEnd) {
526
523
  $or: [
527
524
  {
528
525
  $and: [
529
- { $gte: ["$startDate", startDate] },
530
- { $lte: ["$startDate", endDate] }
526
+ { $gte: ["$startDate", "$$dateStart"] },
527
+ { $lte: ["$startDate", "$$dateEnd"] }
531
528
  ]
532
529
  },
533
530
  {
534
531
  $and: [
535
- { $gte: ["$endDate", startDate] },
536
- { $lte: ["$endDate", endDate] }
532
+ { $gte: ["$endDate", "$$dateStart"] },
533
+ { $lte: ["$endDate", "$$dateEnd"] }
537
534
  ]
538
535
  },
539
536
  {
540
537
  $and: [
541
- { $lte: ["$startDate", startDate] },
542
- { $gte: ["$endDate", endDate] }
538
+ { $lte: ["$startDate", "$$dateStart"] },
539
+ { $gte: ["$endDate", "$$dateEnd"] }
543
540
  ]
544
541
  }
545
542
  ]
@@ -676,7 +673,17 @@ const productLookupConfigs = {
676
673
  from: "products",
677
674
  localField: "recommended",
678
675
  foreignField: "_id",
679
- as: "recommended"
676
+ as: "recommended",
677
+ pipeline: [
678
+ {
679
+ $lookup: {
680
+ from: "variants",
681
+ localField: "_id",
682
+ foreignField: "product",
683
+ as: "variants"
684
+ }
685
+ }
686
+ ]
680
687
  }
681
688
  },
682
689
  // Лукап для категорий продукта
@@ -704,13 +711,30 @@ const productLookupConfigs = {
704
711
  }
705
712
  }]
706
713
  },
707
- // Лукап для аренд продукта
714
+ // Лукап для аренд продуктов (статичный без дат)
708
715
  rents: {
709
716
  lookup: {
710
717
  from: "rents",
711
718
  localField: "_id",
712
719
  foreignField: "product",
713
- as: "rents"
720
+ as: "rents",
721
+ pipeline: [
722
+ {
723
+ $match: {
724
+ status: { $in: ["confirmed", "active"] }
725
+ }
726
+ },
727
+ {
728
+ $project: {
729
+ _id: 1,
730
+ product: 1,
731
+ startDate: 1,
732
+ endDate: 1,
733
+ quantity: 1,
734
+ status: 1
735
+ }
736
+ }
737
+ ]
714
738
  }
715
739
  }
716
740
  };
@@ -732,6 +756,15 @@ const controllerFactory = (db) => {
732
756
  const Read = async (req, res) => {
733
757
  try {
734
758
  const requestedLookups = queryProcessorGlobals.getRequestedLookups(req.query);
759
+ if (req.query.dateStart || req.query.dateEnd) {
760
+ console.log("Availability filter params:", {
761
+ dateStart: req.query.dateStart,
762
+ dateEnd: req.query.dateEnd,
763
+ dateStartType: typeof req.query.dateStart,
764
+ dateEndType: typeof req.query.dateEnd
765
+ });
766
+ }
767
+ console.log("availability variant", JSON.stringify(...queryProcessorProducts.getAvailabilityFilterStage(req.query.dateStart, req.query.dateEnd), null, 2));
735
768
  const stages = [
736
769
  ...queryProcessorGlobals.getBasicOptions(req.query),
737
770
  ...queryProcessorGlobals.getSearchOptions(req.query.search, {
@@ -744,9 +777,9 @@ const controllerFactory = (db) => {
744
777
  ...queryProcessorProducts.getCategoriesFilterStage(req.query.categories),
745
778
  ...queryProcessorProducts.getDeliveryFilterStage(req.query.delivery),
746
779
  ...queryProcessorProducts.getAttributeFiltersStage(req.query.filters),
747
- ...queryProcessorProducts.getVariantPriceFilterStage(req.query.prices),
748
- ...queryProcessorProducts.getAvailabilityFilterStage(req.query.dateStart, req.query.dateEnd),
749
780
  ...queryProcessorGlobals.getLookupStages(requestedLookups, productLookupConfigs),
781
+ ...queryProcessorProducts.getVariantPriceFilterStage(req.query.priceMin, req.query.priceMax),
782
+ ...queryProcessorProducts.getAvailabilityFilterStage(req.query.dateStart, req.query.dateEnd),
750
783
  queryProcessorGlobals.getCreatorUserLookupStage(),
751
784
  queryProcessorGlobals.getCreatorOrganizationLookupStage(),
752
785
  queryProcessorGlobals.getOwnerUserLookupStage(),
@@ -965,6 +998,7 @@ const ProductModel = (db) => {
965
998
  });
966
999
  applyCommonSchema(ProductSchema);
967
1000
  applyOwnershipSchema(ProductSchema, db);
1001
+ applyEngagementSchema(ProductSchema);
968
1002
  ProductSchema.index({ name: "text", description: "text" });
969
1003
  ProductSchema.index({ "owner.type": 1, "owner.target": 1, status: 1, category: 1 });
970
1004
  ProductSchema.index({ category: 1, status: 1, delivery: 1, price: 1 });