@ozdao/martyrs 0.2.508 → 0.2.509

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 (230) hide show
  1. package/dist/_virtual/index.cjs +4 -4
  2. package/dist/_virtual/index.js +4 -4
  3. package/dist/_virtual/index2.cjs +4 -4
  4. package/dist/_virtual/index2.js +4 -4
  5. package/dist/{main-AWSb_d2P.cjs → main-D89N_jml.cjs} +1 -1
  6. package/dist/{main-Dq-UfO4G.js → main-DSiCr7yl.js} +7 -8
  7. package/dist/martyrs/src/components/Chips/{Chips.vue2.cjs → Chips.vue.cjs} +2 -2
  8. package/dist/martyrs/src/components/Chips/Chips.vue.cjs.map +1 -0
  9. package/dist/martyrs/src/components/Chips/{Chips.vue2.js → Chips.vue.js} +2 -2
  10. package/dist/martyrs/src/components/Chips/Chips.vue.js.map +1 -0
  11. package/dist/martyrs/src/components/Dropdown/{Dropdown.vue2.cjs → Dropdown.vue.cjs} +2 -2
  12. package/dist/martyrs/src/components/Dropdown/{Dropdown.vue2.js.map → Dropdown.vue.cjs.map} +1 -1
  13. package/dist/martyrs/src/components/Dropdown/{Dropdown.vue2.js → Dropdown.vue.js} +2 -2
  14. package/dist/martyrs/src/components/Dropdown/Dropdown.vue.js.map +1 -0
  15. package/dist/martyrs/src/components/Feed/Carousel.vue.cjs +4 -3
  16. package/dist/martyrs/src/components/Feed/Carousel.vue.cjs.map +1 -1
  17. package/dist/martyrs/src/components/Feed/Carousel.vue.js +5 -4
  18. package/dist/martyrs/src/components/Feed/Carousel.vue.js.map +1 -1
  19. package/dist/martyrs/src/components/Feed/Feed.vue.cjs +1 -1
  20. package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
  21. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs +2 -2
  22. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.cjs.map +1 -1
  23. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js +2 -2
  24. package/dist/martyrs/src/components/FieldBig/FieldBig.vue.js.map +1 -1
  25. package/dist/martyrs/src/components/FieldTags/FieldTags.vue.cjs +1 -1
  26. package/dist/martyrs/src/components/FieldTags/FieldTags.vue.js +1 -1
  27. package/dist/martyrs/src/components/Menu/{Menu.vue.cjs → Menu.vue2.cjs} +2 -2
  28. package/dist/martyrs/src/components/Menu/Menu.vue2.cjs.map +1 -0
  29. package/dist/martyrs/src/components/Menu/{Menu.vue.js → Menu.vue2.js} +2 -2
  30. package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +1 -0
  31. package/dist/martyrs/src/components/Select/{Select.vue.cjs → Select.vue2.cjs} +2 -2
  32. package/dist/martyrs/src/components/Select/Select.vue2.cjs.map +1 -0
  33. package/dist/martyrs/src/components/Select/{Select.vue.js → Select.vue2.js} +2 -2
  34. package/dist/martyrs/src/components/Select/{Select.vue.cjs.map → Select.vue2.js.map} +1 -1
  35. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +2 -2
  36. package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +2 -2
  37. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +17 -11
  38. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs.map +1 -1
  39. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +18 -12
  40. package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js.map +1 -1
  41. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  42. package/dist/martyrs/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  43. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  44. package/dist/martyrs/src/modules/community/components/layouts/Community.vue.js +1 -1
  45. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  46. package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +1 -1
  47. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  48. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  49. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  50. package/dist/martyrs/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  51. package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +2 -2
  52. package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +2 -2
  53. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +2 -2
  54. package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  55. package/dist/martyrs/src/modules/globals/globals.client.js +15 -15
  56. package/dist/martyrs/src/modules/globals/globals.client.js.map +1 -1
  57. package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.cjs +1 -1
  58. package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.js +1 -1
  59. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
  60. package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
  61. package/dist/martyrs/src/modules/globals/views/components/partials/Footer.vue.cjs +121 -107
  62. package/dist/martyrs/src/modules/globals/views/components/partials/Footer.vue.cjs.map +1 -1
  63. package/dist/martyrs/src/modules/globals/views/components/partials/Footer.vue.js +131 -117
  64. package/dist/martyrs/src/modules/globals/views/components/partials/Footer.vue.js.map +1 -1
  65. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs +2 -2
  66. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.cjs.map +1 -1
  67. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js +2 -2
  68. package/dist/martyrs/src/modules/globals/views/components/partials/Header.vue.js.map +1 -1
  69. package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +1 -1
  70. package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +1 -1
  71. package/dist/martyrs/src/modules/icons/logos/Logotype.vue.cjs +3 -3
  72. package/dist/martyrs/src/modules/icons/logos/Logotype.vue.js +3 -3
  73. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.cjs +1 -1
  74. package/dist/martyrs/src/modules/inventory/components/forms/AdjustmentForm.vue.js +1 -1
  75. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.cjs +1 -1
  76. package/dist/martyrs/src/modules/inventory/components/forms/StockAlertsForm.vue.js +1 -1
  77. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs +138 -136
  78. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs.map +1 -1
  79. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js +137 -135
  80. package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js.map +1 -1
  81. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.cjs +2 -2
  82. package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +2 -2
  83. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.cjs +1 -1
  84. package/dist/martyrs/src/modules/music/components/forms/AlbumForm.vue.js +1 -1
  85. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +1 -1
  86. package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
  87. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.cjs +1 -1
  88. package/dist/martyrs/src/modules/music/components/forms/TrackForm.vue.js +1 -1
  89. package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs +1 -1
  90. package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +1 -1
  91. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs +1 -1
  92. package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +1 -1
  93. package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs +1 -1
  94. package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +1 -1
  95. package/dist/martyrs/src/modules/music/router/music.cjs +1 -1
  96. package/dist/martyrs/src/modules/music/router/music.js +1 -1
  97. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.cjs +1 -1
  98. package/dist/martyrs/src/modules/orders/components/forms/FormApplicationDetails.vue.js +1 -1
  99. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs +61 -9
  100. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.cjs.map +1 -1
  101. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js +61 -9
  102. package/dist/martyrs/src/modules/orders/components/forms/FormCustomerDetails.vue.js.map +1 -1
  103. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  104. package/dist/martyrs/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  105. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  106. package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  107. package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  108. package/dist/martyrs/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  109. package/dist/martyrs/src/modules/orders/orders.client.cjs +36 -38
  110. package/dist/martyrs/src/modules/orders/orders.client.cjs.map +1 -1
  111. package/dist/martyrs/src/modules/orders/orders.client.js +36 -38
  112. package/dist/martyrs/src/modules/orders/orders.client.js.map +1 -1
  113. package/dist/martyrs/src/modules/orders/store/models/customer.cjs +7 -0
  114. package/dist/martyrs/src/modules/orders/store/models/customer.cjs.map +1 -1
  115. package/dist/martyrs/src/modules/orders/store/models/customer.js +7 -0
  116. package/dist/martyrs/src/modules/orders/store/models/customer.js.map +1 -1
  117. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  118. package/dist/martyrs/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  119. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  120. package/dist/martyrs/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  121. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  122. package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +1 -1
  123. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +3 -3
  124. package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +3 -3
  125. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
  126. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
  127. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  128. package/dist/martyrs/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  129. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  130. package/dist/martyrs/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  131. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  132. package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  133. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs +17 -28
  134. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.cjs.map +1 -1
  135. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js +17 -28
  136. package/dist/martyrs/src/modules/organizations/configs/navigation.organization.config.js.map +1 -1
  137. package/dist/martyrs/src/modules/organizations/router/organizations.cjs +1 -1
  138. package/dist/martyrs/src/modules/organizations/router/organizations.js +1 -1
  139. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.cjs +1 -1
  140. package/dist/martyrs/src/modules/products/components/blocks/ProductDiscounts.vue.js +1 -1
  141. package/dist/martyrs/src/modules/products/components/elements/QuantitySelector.vue.cjs +9 -1
  142. package/dist/martyrs/src/modules/products/components/elements/QuantitySelector.vue.cjs.map +1 -1
  143. package/dist/martyrs/src/modules/products/components/elements/QuantitySelector.vue.js +9 -1
  144. package/dist/martyrs/src/modules/products/components/elements/QuantitySelector.vue.js.map +1 -1
  145. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +2 -2
  146. package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  147. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +1 -1
  148. package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs.map +1 -1
  149. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
  150. package/dist/martyrs/src/modules/products/components/pages/Product.vue.js.map +1 -1
  151. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  152. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  153. package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs.map +1 -1
  154. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
  155. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.cjs +1 -1
  156. package/dist/martyrs/src/modules/products/components/sections/EditDiscounts.vue.js +1 -1
  157. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +1 -1
  158. package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +1 -1
  159. package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.cjs +10 -5
  160. package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.cjs.map +1 -1
  161. package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.js +10 -5
  162. package/dist/martyrs/src/modules/products/components/sections/ProductsPopular.vue.js.map +1 -1
  163. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs +5 -2
  164. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.cjs.map +1 -1
  165. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js +5 -2
  166. package/dist/martyrs/src/modules/products/components/sections/ProductsRecommended.vue.js.map +1 -1
  167. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.cjs +1 -1
  168. package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
  169. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  170. package/dist/martyrs/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  171. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  172. package/dist/martyrs/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  173. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  174. package/dist/martyrs/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  175. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  176. package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  177. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  178. package/dist/martyrs/src/modules/spots/components/pages/SpotEdit.vue.js +1 -1
  179. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.cjs +1 -1
  180. package/dist/martyrs/src/modules/spots/components/sections/WorktimeEdit.vue.js +1 -1
  181. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  182. package/dist/martyrs/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  183. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +3 -3
  184. package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
  185. package/dist/martyrs.cjs.js +1 -1
  186. package/dist/martyrs.css +1 -1
  187. package/dist/martyrs.es.js +1 -1
  188. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.cjs +1 -1
  189. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
  190. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.cjs +1 -1
  191. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
  192. package/dist/orders.server.cjs +58 -0
  193. package/dist/orders.server.js +58 -0
  194. package/dist/products.server.cjs +11 -1
  195. package/dist/products.server.js +11 -1
  196. package/dist/style.css +30 -41
  197. package/dist/{web-DaBwwCQ5.cjs → web-XyQNm3cW.cjs} +1 -1
  198. package/dist/{web-BXajFCU2.js → web-gtBkwjra.js} +1 -1
  199. package/package.json +1 -1
  200. package/src/components/Feed/Carousel.vue +3 -1
  201. package/src/components/FieldBig/FieldBig.vue +2 -2
  202. package/src/modules/auth/views/components/pages/ProfileEdit.vue +17 -10
  203. package/src/modules/globals/views/components/partials/Footer.centered.vue +338 -0
  204. package/src/modules/globals/views/components/partials/Footer.vue +104 -99
  205. package/src/modules/globals/views/components/partials/Header.vue +1 -1
  206. package/src/modules/icons/logos/Logotype.vue +1 -1
  207. package/src/modules/inventory/components/pages/Inventory.vue +126 -119
  208. package/src/modules/orders/components/forms/FormCustomerDetails.vue +51 -0
  209. package/src/modules/orders/middlewares/customers.verifier.js +60 -0
  210. package/src/modules/orders/models/customer.model.js +18 -0
  211. package/src/modules/orders/orders.client.js +36 -38
  212. package/src/modules/orders/store/models/customer.js +7 -0
  213. package/src/modules/organizations/configs/navigation.organization.config.js +17 -26
  214. package/src/modules/products/TASKS.MD +1 -157
  215. package/src/modules/products/components/elements/QuantitySelector.vue +17 -9
  216. package/src/modules/products/components/pages/Product.vue +1 -1
  217. package/src/modules/products/components/pages/Products.vue +0 -1
  218. package/src/modules/products/components/sections/ProductsPopular.vue +9 -5
  219. package/src/modules/products/components/sections/ProductsRecommended.vue +4 -1
  220. package/src/modules/products/controllers/configs/products.lookup.config.js +11 -1
  221. package/src/styles/base/all.scss +9 -4
  222. package/src/styles/config.scss +10 -0
  223. package/src/styles/responsive.scss +2 -1
  224. package/src/styles/typography.scss +0 -5
  225. package/dist/martyrs/src/components/Chips/Chips.vue2.cjs.map +0 -1
  226. package/dist/martyrs/src/components/Chips/Chips.vue2.js.map +0 -1
  227. package/dist/martyrs/src/components/Dropdown/Dropdown.vue2.cjs.map +0 -1
  228. package/dist/martyrs/src/components/Menu/Menu.vue.cjs.map +0 -1
  229. package/dist/martyrs/src/components/Menu/Menu.vue.js.map +0 -1
  230. package/dist/martyrs/src/components/Select/Select.vue.js.map +0 -1
@@ -1,157 +1 @@
1
- теперь добавь фильтрацию по выбранному периоду на фронте и беке. На фронте в lookups надо добавить rents в случае если есть период (чтобы не грузить лишний раз), в products.lookup.config
2
- добавить rents и добавить в product.query фильтрацию по доступности с учетом quantityЖ Для фильтрации доступных товаров при агрегации на основе аренд, вам нужно использовать $lookup для
3
- проверки пересечений с активными арендами. Вот пример агрегации:
4
-
5
- javascript
6
- const checkAvailability = async (startDate, endDate) => {
7
- const pipeline = [
8
- // Фильтр по нужным критериям товаров
9
- {
10
- $match: {
11
- listing: 'rent',
12
- status: 'active' // или другие условия
13
- }
14
- },
15
-
16
- // Присоединяем аренды для каждого товара
17
- {
18
- $lookup: {
19
- from: 'rents',
20
- let: { productId: '$_id' },
21
- pipeline: [
22
- {
23
- $match: {
24
- $expr: {
25
- $and: [
26
- { $eq: ['$product', '$productId'] },
27
- // Только активные аренды
28
- { $in: ['$status', ['confirmed', 'active']] },
29
- // Проверка пересечения дат
30
- {
31
- $or: [
32
- // Аренда начинается в запрашиваемый период
33
- {
34
- $and: [
35
- { $gte: ['$startDate', new Date(startDate)] },
36
- { $lte: ['$startDate', new Date(endDate)] }
37
- ]
38
- },
39
- // Аренда заканчивается в запрашиваемый период
40
- {
41
- $and: [
42
- { $gte: ['$endDate', new Date(startDate)] },
43
- { $lte: ['$endDate', new Date(endDate)] }
44
- ]
45
- },
46
- // Аренда полностью покрывает запрашиваемый период
47
- {
48
- $and: [
49
- { $lte: ['$startDate', new Date(startDate)] },
50
- { $gte: ['$endDate', new Date(endDate)] }
51
- ]
52
- }
53
- ]
54
- }
55
- ]
56
- }
57
- }
58
- }
59
- ],
60
- as: 'activeRents'
61
- }
62
- },
63
-
64
- // Фильтруем только доступные товары
65
- {
66
- $match: {
67
- activeRents: { $size: 0 } // Нет активных аренд в этот период
68
- }
69
- },
70
-
71
- // Убираем поле activeRents из результата
72
- {
73
- $project: {
74
- activeRents: 0
75
- }
76
- }
77
- ];
78
-
79
- return await Product.aggregate(pipeline);
80
- };
81
- Если у вас товары могут иметь количество (например, несколько единиц одного товара), то нужно модифицировать логику:
82
-
83
- javascript
84
- const checkAvailabilityWithQuantity = async (startDate, endDate, requestedQuantity = 1) => {
85
- const pipeline = [
86
- {
87
- $match: {
88
- listing: 'rent',
89
- status: 'active'
90
- }
91
- },
92
-
93
- {
94
- $lookup: {
95
- from: 'rents',
96
- let: { productId: '$_id' },
97
- pipeline: [
98
- {
99
- $match: {
100
- $expr: {
101
- $and: [
102
- { $eq: ['$product', '$productId'] },
103
- { $in: ['$status', ['confirmed', 'active']] },
104
- // Проверка пересечения дат (та же логика)
105
- ]
106
- }
107
- }
108
- },
109
- // Суммируем количество в активных арендах
110
- {
111
- $group: {
112
- _id: null,
113
- totalRented: { $sum: '$quantity' }
114
- }
115
- }
116
- ],
117
- as: 'rentInfo'
118
- }
119
- },
120
-
121
- // Добавляем поле с доступным количеством
122
- {
123
- $addFields: {
124
- rentedQuantity: {
125
- $ifNull: [{ $arrayElemAt: ['$rentInfo.totalRented', 0] }, 0]
126
- },
127
- availableQuantity: {
128
- $subtract: [
129
- { $ifNull: ['$quantity', 1] }, // quantity товара или 1 по умолчанию
130
- { $ifNull: [{ $arrayElemAt: ['$rentInfo.totalRented', 0] }, 0] }
131
- ]
132
- }
133
- }
134
- },
135
-
136
- // Фильтруем товары с достаточным количеством
137
- {
138
- $match: {
139
- availableQuantity: { $gte: requestedQuantity }
140
- }
141
- },
142
-
143
- // Убираем временные поля
144
- {
145
- $project: {
146
- rentInfo: 0,
147
- rentedQuantity: 0
148
- }
149
- }
150
- ];
151
-
152
- return await Product.aggregate(pipeline);
153
- };
154
-
155
-
156
-
157
- сделать нужно минималистично и ничего кроме этого
1
+ ПРОВЕРИТЬ РАБОТУ ИНГРЕДИЕНТОВ НА БЕКЕНДЕ И ФРОНТЕНДЕ
@@ -8,15 +8,15 @@
8
8
  >
9
9
  <span class="i-regular">-</span>
10
10
  </button>
11
-
12
11
  <div class="radius-small br-solid br-1px br-light w-3r pd-small">
13
- <input
14
- type="number"
15
- v-model.number="modelValue"
16
- class="w-100 h-1r t-center"
17
- :min="1"
18
- :max="maxValue"
19
- />
12
+ <input
13
+ type="number"
14
+ v-model.number="modelValue"
15
+ @input="validateInput"
16
+ class="w-100 h-1r t-center"
17
+ :min="1"
18
+ :max="maxValue"
19
+ />
20
20
  </div>
21
21
  <button
22
22
  @click="incrementQuantity"
@@ -38,6 +38,14 @@ const props = defineProps({
38
38
 
39
39
  const modelValue = defineModel();
40
40
 
41
+ function validateInput() {
42
+ if (modelValue.value < 1) {
43
+ modelValue.value = 1;
44
+ } else if (modelValue.value > props.maxValue) {
45
+ modelValue.value = props.maxValue;
46
+ }
47
+ }
48
+
41
49
  function incrementQuantity() {
42
50
  if (modelValue.value < props.maxValue) {
43
51
  modelValue.value++;
@@ -49,4 +57,4 @@ function decrementQuantity() {
49
57
  modelValue.value--;
50
58
  }
51
59
  }
52
- </script>
60
+ </script>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div v-if="products.state.current" class="w-100 mobile:pd-thin pd-small bg-white">
3
- <div class="cols-2 mobile:cols-1 w-100 gap-medium">
3
+ <div class="cols-2 mobile:cols-1 tablet:cols-1 w-100 gap-medium">
4
4
 
5
5
  <ProductImages
6
6
  :images="currentImages"
@@ -69,7 +69,6 @@
69
69
  </template>
70
70
  </Spoiler>
71
71
 
72
-
73
72
  <!-- Цена за сутки -->
74
73
  <Spoiler
75
74
  class="o-hidden mn-b-medium"
@@ -1,18 +1,23 @@
1
1
  <template>
2
2
  <Carousel
3
3
  :store="{
4
- read: products.actions.read
4
+ read: (options) => products.actions.read(options)
5
5
  }"
6
6
  :options="{
7
- limit: 10
7
+ limit: 16,
8
+ sortParam: 'popularity',
9
+ owner: $route.name?.includes('Organization') ? $route.params._id : null,
10
+ lookup: ['variants'],
8
11
  }"
9
12
  :text="{ title: 'No products available' }"
10
13
  :showDots="true"
11
14
  class="popupar_products"
15
+ v-slot="{
16
+ item
17
+ }"
12
18
  >
13
- <template #default="{ item }">
14
19
  <router-link
15
- :to="{ name: 'Organization_Product', params: { _id: item.owner.target, product: item._id } }"
20
+ :to="{ name: 'Organization_Product', params: { _id: item.owner.target._id || item.owner.target, product: item._id } }"
16
21
  class="h-100 pos-relative block"
17
22
  >
18
23
  <CardProduct
@@ -20,7 +25,6 @@
20
25
  class="h-max-40r h-100 bg-light"
21
26
  />
22
27
  </router-link>
23
- </template>
24
28
  </Carousel>
25
29
  </template>
26
30
 
@@ -139,7 +139,7 @@ const addSelectedToCart = async () => {
139
139
  <template>
140
140
  <div>
141
141
  <h3 class="mn-b-small">Frequently Bought Together</h3>
142
- <div class="recommended-products cols-4 mobile:cols-2 gap-thin">
142
+ <div class="recommended-products cols-4 rows-auto-1fr mobile:cols-2 gap-thin">
143
143
 
144
144
  <CardProduct
145
145
  v-for="(product, index) in products"
@@ -166,7 +166,10 @@ const addSelectedToCart = async () => {
166
166
  <p class="mn-b-small">Total price:</p>
167
167
  <p class="mn-b-medium h3 t-medium">${{ totalPrice }}</p>
168
168
  <Button
169
+ :disabled="selectedProducts.length < 1"
169
170
  class="bg-main gap-micro"
171
+ :showSuccess="false"
172
+ :showLoader="false"
170
173
  :submit="canAddToCart ? addSelectedToCart : undefined"
171
174
  >
172
175
  <IconShopcartAdd class="i-semi"/>
@@ -81,7 +81,17 @@ export default {
81
81
  from: 'products',
82
82
  localField: 'recommended',
83
83
  foreignField: '_id',
84
- as: 'recommended'
84
+ as: 'recommended',
85
+ pipeline: [
86
+ {
87
+ $lookup: {
88
+ from: 'variants',
89
+ localField: '_id',
90
+ foreignField: 'product',
91
+ as: 'variants'
92
+ }
93
+ }
94
+ ]
85
95
  }
86
96
  },
87
97
  // Лукап для категорий продукта
@@ -259,10 +259,15 @@ body {
259
259
  }
260
260
  .rows-1 {display: grid; grid-template-columns: 100%; grid-auto-rows: minmax(auto, max-content); }
261
261
  .rows-1-min0_max1 {display: grid; grid-template-rows: minmax(0, 1fr); }
262
- .rows-auto { grid-auto-flow: row;
263
- grid-auto-columns: auto;
264
- grid-template-rows: auto;
265
- grid-auto-rows: auto;}
262
+ .rows-auto {
263
+ grid-auto-flow: row;
264
+ grid-auto-columns: auto;
265
+ grid-template-rows: auto;
266
+ grid-auto-rows: auto;
267
+ }
268
+ .rows-auto-1fr {
269
+ grid-auto-rows: 1fr;
270
+ }
266
271
  // REFACTOR THIS SHIT
267
272
  .grid {
268
273
  display: grid;
@@ -336,6 +336,12 @@ $display-values: (
336
336
  'table-cell': table-cell
337
337
  );
338
338
 
339
+ $text-align-values: (
340
+ 'left': left,
341
+ 'center': center,
342
+ 'right': right,
343
+ );
344
+
339
345
  $order: (
340
346
  '1': 1,
341
347
  '2': 2,
@@ -395,6 +401,10 @@ body {
395
401
  @include generate-utility-classes('o-y', 'overflow-y', null, $overflow-xy-values, $breakpoints);
396
402
  @include generate-utility-classes('d', 'display', null, $display-values, $breakpoints);
397
403
 
404
+ /* Typography */
405
+ @include generate-utility-classes('t', 'text-align', null, $text-align-values, $breakpoints);
406
+
407
+
398
408
 
399
409
  @include generate-utility-classes('cols', 'grid-template-columns', null, $cols, $breakpoints);
400
410
 
@@ -65,7 +65,8 @@ $xxl-desktop-min: 1921px;
65
65
  }
66
66
 
67
67
  // Cols
68
- .cols-1, .cols-2, .cols-4, .cols-2-2_1, .cols-2-1_2, .cols-2-1_3, .cols-2-golden-ration { display: grid !important; grid-template-columns: 1fr !important; }
68
+ /* .cols-2,*/
69
+ .cols-1, .cols-4, .cols-2-2_1, .cols-2-1_2, .cols-2-1_3, .cols-2-golden-ration { display: grid !important; grid-template-columns: 1fr !important; }
69
70
  .cols-4.no-responsive { grid-template-columns: 1fr 1fr 1fr 1fr !important }
70
71
  .cols-2 { >.col { width: 100% !important; } }
71
72
 
@@ -80,11 +80,6 @@ a:hover { cursor: pointer;}
80
80
  -ms-user-select: none; /* IE 10 and IE 11 */
81
81
  user-select: none; /* Standard syntax */
82
82
  }
83
- // Text align
84
-
85
- .t-left { text-align: left; }
86
- .t-center { text-align: center; }
87
- .t-right { text-align: right; }
88
83
  // Font weights
89
84
  .t-bold { font-weight: 900;}
90
85
  .t-demi { font-weight: 700;}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Chips.vue2.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Chips.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Dropdown.vue2.cjs","sources":["../../../../../src/components/Dropdown/Dropdown.vue"],"sourcesContent":["<template>\n <div class=\"dropdown pos-relative\" v-click-outside=\"clickedOutside\" @click.stop=\"isOpen = !isOpen\">\n <div v-if=\"isComponentLabel\" class=\"w-100 h-100 flex-center flex\">\n <component :is=\"label.component\" v-bind=\"label.props\" :class=\"label.class\"></component>\n </div>\n <div v-else>\n {{ label }}\n </div>\n <transition name=\"TransitionTranslateY\" mode=\"out-in\">\n <div \n v-show=\"isOpen\" \n :style=\"{ left: align === 'left' ? '0' : 'auto', right: align === 'right' ? '0' : 'auto' }\" \n class=\"dropdown-content radius-big\" \n >\n <slot></slot>\n </div>\n </transition>\n </div>\n</template>\n\n<script setup>\nimport { ref, computed } from 'vue';\nimport clickOutside from '../FieldPhone/click-outside.js';\n\nlet vClickOutside = clickOutside\n\nconst props = defineProps({\n label: {\n type: [String, Object],\n default: 'Open'\n },\n align: {\n type: String,\n default: 'left'\n }\n})\n\nconst isOpen = ref(false);\nconst isComponentLabel = computed(() => typeof props.label === 'object');\n\nfunction clickedOutside () {\n isOpen.value = false\n}\n</script>\n\n<style >\n.dropdown-content {\n display: block;\n position: absolute;\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n z-index: 1;\n}\n\n/*.dropdown:hover .dropdown-content {\n display: block;\n}*/\n</style>\n"],"names":["clickOutside","ref","computed"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAwBA,QAAI,gBAAgBA,aAAAA;AAEpB,UAAM,QAAQ;AAWd,UAAM,SAASC,IAAAA,IAAI,KAAK;AACxB,UAAM,mBAAmBC,IAAAA,SAAS,MAAM,OAAO,MAAM,UAAU,QAAQ;AAEvE,aAAS,iBAAkB;AACzB,aAAO,QAAQ;AAAA,IACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Menu.vue.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Menu.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Select.vue.js","sources":["../../../../../src/components/Select/Select.vue"],"sourcesContent":["<template>\n <!-- Input Wrapper -->\n <div \n ref=\"fieldWrapper\"\n tabindex=\"0\"\n @click.stop=\"toggleMenu\" \n v-click-outside=\"clickedOutside\" \n :class=\"$attrs.class\" \n class=\"cursor-pointer field-wrapper flex-v-center flex-nowrap flex pos-relative\"\n >\n <!-- Label -->\n <span v-if=\"label\" class=\"t-transp mn-r-small\">{{label}}</span>\n \n <!-- Input -->\n <span>\n {{ optionsSelected ? (optionsSelected.name || optionsSelected[props.value] || optionsSelected) : placeholder }}\n </span>\n <!-- Dropdown menu -->\n <transition mode=\"out-in\" name=\"TransitionTranslateY\">\n <ul \n v-show=\"showMenu\" \n class=\"bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 pd-small radius-small bg-white mn-t-thin w-100\"\n style=\"min-width: max-content;\"\n >\n <li @click.stop=\"selectOption(option)\" v-for=\"option in optionsListed\" class=\"radius-thin hover-bg-light pd-thin text-box-trim\">\n <span v-if=\"option\" class=\"w-100\">\n {{ option.name || option[props.value] || option }}\n </span>\n </li>\n </ul>\n </transition>\n </div>\n <!-- Validation -->\n <transition mode=\"out-in\" name=\"fade\">\n <div v-if=\"validation\" class=\"mn-t-thin invalid-feedback\">\n * {{validation.message}}\n </div>\n </transition>\n</template>\n<script setup>\nimport { ref, computed, watch, nextTick } from 'vue'\nimport clickOutside from '../FieldPhone/click-outside.js';\nlet vClickOutside = clickOutside\nconst emit = defineEmits([\n 'update:select', \n 'focus', \n 'blur'\n])\nconst props = defineProps({\n label: String,\n placeholder: { type: String, default: 'Please select an item' },\n select: [String, Object],\n property: String,\n value: String,\n options: { type: Array, default: () => [] },\n validation: Boolean,\n})\nconst showMenu = ref(false)\nconst fieldWrapper = ref(null)\nconst optionsSelected = ref(\n props.property \n ? findObjectByValue(props.select, props.property, props.options) \n : props.select\n)\nconst optionsListed = computed(() => {\n return props.select \n ? props.options.filter(option => option !== props.select) \n : props.options\n})\nwatch(() => props.select, (newSelect) => {\n optionsSelected.value = \n props.property \n ? findObjectByValue(props.select, props.property, props.options) \n : props.select;\n});\nconst toggleMenu = async () => {\n showMenu.value = !showMenu.value\n \n if (showMenu.value) {\n await nextTick()\n fieldWrapper.value?.focus()\n emit('focus')\n } else {\n emit('blur')\n }\n}\nfunction clickedOutside () {\n showMenu.value = false\n}\nconst selectOption = option => {\n optionsSelected.value = option\n \n toggleMenu()\n if (props.property) { \n emit('update:select', optionsSelected.value[props.property])\n } else {\n emit('update:select', optionsSelected.value)\n }\n}\nfunction findObjectByValue (value, property, objects) {\n for (const object of objects) {\n if (object[property] === value || object === value) {\n return object;\n }\n }\n return null;\n}\n</script>\n<style lang=\"scss\" scoped>\n li {\n list-style-type: none;\n }\n ul li {\n line-height: 2;\n }\n .field-wrapper:focus {\n outline: none;\n }\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,QAAI,gBAAgB;AACpB,UAAM,OAAO;AAKb,UAAM,QAAQ;AASd,UAAM,WAAW,IAAI,KAAK;AAC1B,UAAM,eAAe,IAAI,IAAI;AAC7B,UAAM,kBAAkB;AAAA,MACtB,MAAM,WACJ,kBAAkB,MAAM,QAAQ,MAAM,UAAU,MAAM,OAAO,IAC7D,MAAM;AAAA,IACV;AACA,UAAM,gBAAgB,SAAS,MAAM;AACnC,aAAO,MAAM,SACX,MAAM,QAAQ,OAAO,YAAU,WAAW,MAAM,MAAM,IACtD,MAAM;AAAA,IACV,CAAC;AACD,UAAM,MAAM,MAAM,QAAQ,CAAC,cAAc;AACvC,sBAAgB,QAChB,MAAM,WACJ,kBAAkB,MAAM,QAAQ,MAAM,UAAU,MAAM,OAAO,IAC7D,MAAM;AAAA,IACV,CAAC;AACD,UAAM,aAAa,YAAY;AAC7B,eAAS,QAAQ,CAAC,SAAS;AAE3B,UAAI,SAAS,OAAO;AAClB,cAAM,SAAQ;AACd,qBAAa,OAAO,MAAK;AACzB,aAAK,OAAO;AAAA,MACd,OAAO;AACL,aAAK,MAAM;AAAA,MACb;AAAA,IACF;AACA,aAAS,iBAAkB;AACzB,eAAS,QAAQ;AAAA,IACnB;AACA,UAAM,eAAe,YAAU;AAC7B,sBAAgB,QAAQ;AAExB,iBAAU;AACV,UAAI,MAAM,UAAU;AAClB,aAAK,iBAAiB,gBAAgB,MAAM,MAAM,QAAQ,CAAC;AAAA,MAC7D,OAAO;AACL,aAAK,iBAAiB,gBAAgB,KAAK;AAAA,MAC7C;AAAA,IACF;AACA,aAAS,kBAAmB,OAAO,UAAU,SAAS;AACpD,iBAAW,UAAU,SAAS;AAC5B,YAAI,OAAO,QAAQ,MAAM,SAAS,WAAW,OAAO;AAClD,iBAAO;AAAA,QACT;AAAA,MACF;AACA,aAAO;AAAA,IACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}