@ozdao/prometheus-framework 0.2.39 → 0.2.41

Sign up to get free protection for your applications and to get access to all the features.
Files changed (296) hide show
  1. package/dist/auth.server.js +1 -2
  2. package/dist/auth.server.mjs +1 -2
  3. package/dist/files.server.js +1 -2
  4. package/dist/files.server.mjs +1 -2
  5. package/dist/globals.server.js +1 -1
  6. package/dist/globals.server.mjs +1 -1
  7. package/dist/mailing-10560277.mjs +78 -0
  8. package/dist/mailing-902d13d5.js +77 -0
  9. package/dist/main.css +1 -1
  10. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  11. package/dist/prometheus-framework/src/components/Button/Button.vue.js +225 -2
  12. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  13. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +2 -225
  14. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +61 -2
  16. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.js +2 -61
  18. package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +13 -9
  20. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +1 -0
  21. package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +4 -0
  22. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +26 -22
  24. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +29 -30
  26. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/components/Field/Field.vue.js +76 -2
  28. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  29. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +2 -76
  30. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +70 -2
  32. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  33. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +2 -70
  34. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/components/Select/Select.vue.js +95 -2
  36. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  37. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +2 -95
  38. package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -0
  39. package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +69 -0
  40. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +44 -2
  42. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  43. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +2 -44
  44. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  46. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  48. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  50. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
  52. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  54. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
  56. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  58. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/auth/store/auth.js +8 -8
  60. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  62. package/dist/prometheus-framework/src/modules/community/community.client.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/community/community.client.js +18 -20
  64. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +88 -62
  66. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +97 -68
  68. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +35 -34
  70. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +18 -18
  72. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue2.js +2 -2
  73. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +5 -5
  75. package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.js +4 -4
  77. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +65 -19
  79. package/dist/prometheus-framework/src/modules/community/components/sections/JoinUs.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/community/components/sections/JoinUs.vue.js +9 -9
  81. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +8 -7
  83. package/dist/prometheus-framework/src/modules/constructor/components/elements/Image.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/constructor/components/elements/Image.vue.js +6 -6
  85. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
  86. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +65 -2
  87. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
  88. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +2 -65
  89. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +64 -70
  91. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +6 -6
  92. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  94. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  96. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +5 -5
  98. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +6 -5
  100. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
  102. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +3 -3
  104. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +43 -42
  106. package/dist/prometheus-framework/src/modules/icons/entities/IconFeatured.vue.cjs +1 -0
  107. package/dist/prometheus-framework/src/modules/icons/entities/IconFeatured.vue.js +30 -0
  108. package/dist/prometheus-framework/src/modules/icons/entities/IconFollowing.vue.cjs +1 -0
  109. package/dist/prometheus-framework/src/modules/icons/entities/IconFollowing.vue.js +47 -0
  110. package/dist/prometheus-framework/src/modules/icons/entities/IconPopular.vue.cjs +1 -0
  111. package/dist/prometheus-framework/src/modules/icons/entities/IconPopular.vue.js +28 -0
  112. package/dist/prometheus-framework/src/modules/icons/entities/IconRecent.vue.cjs +1 -0
  113. package/dist/prometheus-framework/src/modules/icons/entities/IconRecent.vue.js +45 -0
  114. package/dist/prometheus-framework/src/modules/icons/navigation/IconArrow.vue.cjs +1 -0
  115. package/dist/prometheus-framework/src/modules/icons/navigation/IconArrow.vue.js +32 -0
  116. package/dist/prometheus-framework/src/modules/icons/navigation/IconChevronRight.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/icons/navigation/IconChevronRight.vue.js +3 -3
  118. package/dist/prometheus-framework/src/modules/icons/navigation/IconEdit.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/icons/navigation/IconEdit.vue.js +25 -14
  120. package/dist/prometheus-framework/src/modules/icons/navigation/IconEllipsis.vue.cjs +1 -0
  121. package/dist/prometheus-framework/src/modules/icons/navigation/IconEllipsis.vue.js +44 -0
  122. package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.js +90 -67
  124. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
  126. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +2 -11
  128. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +11 -2
  130. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +1 -1
  132. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  134. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +2 -2
  136. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +45 -42
  138. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +2 -2
  140. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  142. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +6 -6
  144. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  146. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +3 -3
  148. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +5 -5
  150. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  152. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +60 -55
  154. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  156. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +1 -1
  158. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  159. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
  160. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +1 -1
  162. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +18 -17
  164. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.cjs +1 -1
  165. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.js +20 -21
  166. package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.js +7 -7
  167. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  168. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
  169. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  170. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  171. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  172. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  173. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  174. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  175. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  176. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +6 -6
  177. package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.cjs +1 -1
  178. package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.js +1 -1
  179. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  180. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
  181. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  182. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  183. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
  184. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +37 -34
  185. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  186. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +23 -23
  187. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  188. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
  189. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +8 -8
  190. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  191. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +7 -7
  192. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  193. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  194. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  195. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  196. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  197. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  198. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  199. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +31 -30
  200. package/dist/prometheus-framework.cjs.js +20 -20
  201. package/dist/prometheus-framework.es.js +1278 -1288
  202. package/dist/style.css +1 -1
  203. package/package.json +1 -1
  204. package/src/components/Button/Button.vue +2 -3
  205. package/src/components/Chips/Chips.vue +9 -3
  206. package/src/components/Countdown/Countdown.vue +4 -3
  207. package/src/components/Dropdown/Dropdown.vue +9 -3
  208. package/src/components/Feed/Feed.vue +7 -11
  209. package/src/components/Feed/Masonry.vue +177 -0
  210. package/src/components/FieldBig/FieldBig.vue +3 -3
  211. package/src/components/Header/Header.vue +2 -0
  212. package/src/components/Navigation/Navigation.vue +2 -0
  213. package/src/components/Shader/Shader.vue +161 -116
  214. package/src/components/Slider/Slider.vue +92 -0
  215. package/src/modules/applications/applications.client.js +2 -0
  216. package/src/modules/applications/components/sections/SubscribeNewsletter.vue +114 -0
  217. package/src/modules/applications/controllers/applications.controller.js +125 -136
  218. package/src/modules/applications/models/application.model.js +22 -7
  219. package/src/modules/applications/routes/applications.routes.js +29 -13
  220. package/src/modules/auth/controllers/auth.controller.js +2 -3
  221. package/src/modules/auth/store/auth.js +3 -5
  222. package/src/modules/chats/components/blocks/ChatMessage.vue +3 -2
  223. package/src/modules/chats/components/pages/ChatPage.vue +6 -6
  224. package/src/modules/chats/components/sections/ChatWindow.vue +57 -12
  225. package/src/modules/chats/store/chat.store.js +6 -1
  226. package/src/modules/community/community.client.js +0 -2
  227. package/src/modules/community/components/blocks/CardBlogpost.vue +71 -33
  228. package/src/modules/community/components/layouts/Community.vue +65 -26
  229. package/src/modules/community/components/pages/Blog.vue +37 -0
  230. package/src/modules/community/components/pages/BlogPost.vue +5 -6
  231. package/src/modules/community/components/pages/Community.vue +1 -0
  232. package/src/modules/community/components/pages/CreateBlogPost.vue +1 -0
  233. package/src/modules/community/components/sections/Feed.vue +1 -1
  234. package/src/modules/community/components/sections/HotPosts.vue +64 -24
  235. package/src/modules/community/components/sections/JoinUs.vue +4 -5
  236. package/src/modules/community/store/blogposts.js +1 -0
  237. package/src/modules/constructor/components/elements/Embed.vue +7 -6
  238. package/src/modules/constructor/components/elements/Image.vue +2 -2
  239. package/src/modules/constructor/components/elements/Textarea.vue +1 -1
  240. package/src/modules/constructor/components/sections/Constructor.vue +3 -19
  241. package/src/modules/events/components/pages/EditEvent.vue +48 -3
  242. package/src/modules/events/components/pages/Event.vue +16 -8
  243. package/src/modules/events/components/sections/HeroEvent.vue +32 -28
  244. package/src/modules/events/components/sections/SectionMainGuest.vue +3 -2
  245. package/src/modules/events/components/sections/SectionPreviousEvents.vue +22 -15
  246. package/src/modules/events/models/event.model.js +9 -0
  247. package/src/modules/files/middlewares/server/middlewareBusboy.js +14 -3
  248. package/src/modules/files/routes/files.routes.js +9 -1
  249. package/src/modules/globals/components/blocks/CardHeader.vue +6 -3
  250. package/src/modules/globals/utils/mailing.js +12 -0
  251. package/src/modules/icons/entities/IconEarn.vue +20 -0
  252. package/src/modules/icons/entities/IconFeatured.vue +14 -0
  253. package/src/modules/icons/entities/IconFollowing.vue +17 -0
  254. package/src/modules/icons/entities/IconPopular.vue +14 -0
  255. package/src/modules/icons/entities/IconRecent.vue +17 -0
  256. package/src/modules/icons/navigation/IconAdd.vue +1 -3
  257. package/src/modules/icons/navigation/IconArrow.vue +21 -0
  258. package/src/modules/icons/navigation/IconCheckmark.vue +16 -0
  259. package/src/modules/icons/navigation/IconChevronRight.vue +2 -2
  260. package/src/modules/icons/navigation/IconEdit.vue +16 -2
  261. package/src/modules/icons/navigation/IconEllipsis.vue +16 -0
  262. package/src/modules/icons/placeholders/PlaceholderChat.vue +9 -0
  263. package/src/modules/landing/components/sections/MobileApp.vue +38 -21
  264. package/src/modules/landing/components/sections/SectionEarn.vue +104 -0
  265. package/src/modules/landing/components/sections/SectionFeatures.vue +7 -8
  266. package/src/modules/marketplace/components/layouts/Marketplace.vue +3 -3
  267. package/src/modules/orders/components/blocks/StatusHistory.vue +7 -1
  268. package/src/modules/orders/components/pages/Order.vue +3 -4
  269. package/src/modules/orders/store/shopcart.js +21 -5
  270. package/src/modules/organizations/components/blocks/CardOrganization.vue +6 -6
  271. package/src/modules/organizations/components/pages/Organization.vue +1 -1
  272. package/src/modules/organizations/components/sections/DetailsTab.vue +42 -43
  273. package/src/modules/organizations/components/sections/Publics.vue +3 -4
  274. package/src/modules/payments/controller/payments.controller.js +54 -200
  275. package/src/modules/payments/controller/payments.tinkoff.controller.js +242 -0
  276. package/src/modules/payments/models/payment.model.js +22 -0
  277. package/src/modules/payments/routes/payments.routes.js +4 -25
  278. package/src/modules/payments/routes/payments.tinkoff.routes.js +58 -0
  279. package/src/modules/products/components/pages/Product.vue +3 -1
  280. package/src/modules/products/components/sections/HeroRecommendation.vue +9 -170
  281. package/src/modules/products/components/sections/MenuSection.vue +4 -4
  282. package/src/modules/products/components/sections/PopularProducts.vue +3 -3
  283. package/src/modules/products/components/sections/SectionProduct.vue +3 -0
  284. package/src/modules/products/controllers/products.controller.js +188 -109
  285. package/src/modules/products/models/product.model.js +1 -0
  286. package/src/modules/spots/components/layouts/Spots.vue +2 -2
  287. package/src/modules/wallet/components/pages/Wallet.vue +73 -88
  288. package/src/modules/wallet/controllers/crypto.controller.js +79 -0
  289. package/src/modules/wallet/models/wallet.model.js +27 -0
  290. package/src/styles/base/all.scss +4 -0
  291. package/src/styles/base/backgrounds.scss +2 -2
  292. package/src/styles/base/shadow_transitions_hover_refactor.scss +11 -1
  293. package/src/styles/typography.scss +19 -12
  294. package/src/modules/community/components/sections/SubscribeNewsletter.vue +0 -67
  295. package/src/modules/constructor/components/elements/Youtube.vue +0 -52
  296. /package/src/modules/{orders/models/payment.model.js → payments/models/payment.tinkoff.model.js} +0 -0
@@ -167,77 +167,142 @@ const controllerFactory = (db) => {
167
167
 
168
168
  const getProducts = (req, res) => {
169
169
 
170
- Product.aggregate([{
171
- $lookup: {
172
- from: "modifications",
173
- let: { "productId": "$_id" },
174
- pipeline: [{
175
- $match: {
176
- "$expr": {
177
- "$eq": ["$product", "$$productId"]
178
- }
170
+ // {
171
+ // $lookup: {
172
+ // from: "modifications",
173
+ // let: { "productId": "$_id" },
174
+ // pipeline: [{
175
+ // $match: {
176
+ // "$expr": {
177
+ // "$eq": ["$product", "$$productId"]
178
+ // }
179
+ // }
180
+ // },{
181
+ // $lookup: {
182
+ // from: "leftovers",
183
+ // let: { "productId": "$_id" },
184
+ // pipeline: [{
185
+ // $unwind: "$positions"
186
+ // },{
187
+ // "$match": { "$expr": { "$eq": ["$positions._id", "$$productId"] }}
188
+ // },{
189
+ // "$project": {
190
+ // _id: "$positions._id",
191
+ // quantity: "$positions.quantity",
192
+ // name: "$positions.name",
193
+ // }
194
+ // }],
195
+ // as: "variantsMods"
196
+ // },
197
+ // },{
198
+ // $set: {
199
+ // quantity:{
200
+ // $sum:["$quantity",{$sum:"$variantsMods.quantity"}]
201
+ // }
202
+ // }
203
+ // },{
204
+ // $unset: "variants"
205
+ // }],
206
+ // as: "modifications"
207
+ // },
208
+ // }
209
+
210
+ Product.aggregate([
211
+ {
212
+ $facet: {
213
+ "withIngredients": [
214
+ {
215
+ $match: {
216
+ ingridients: { $exists: true, $not: {$size: 0} } // Продукты с ингредиентами
179
217
  }
180
- },{
218
+ },
219
+ {
220
+ $lookup: {
221
+ from: "products",
222
+ localField: "ingridients",
223
+ foreignField: "_id",
224
+ as: "ingredientDetails"
225
+ }
226
+ },
227
+ { $unwind: "$ingredientDetails" },
228
+ {
229
+ $lookup: {
230
+ from: "leftovers",
231
+ let: { "ingredientId": "$ingredientDetails._id" },
232
+ pipeline: [
233
+ { $unwind: "$positions" },
234
+ {
235
+ $match: {
236
+ $expr: {
237
+ $eq: ["$positions._id", "$$ingredientId"]
238
+ }
239
+ }
240
+ },
241
+ {
242
+ $project: {
243
+ quantity: "$positions.quantity"
244
+ }
245
+ }
246
+ ],
247
+ as: "ingredientLeftovers"
248
+ }
249
+ },
250
+ {
251
+ $group: {
252
+ _id: "$_id",
253
+ name: { $first: "$name" },
254
+ minQuantity: { $min: "$ingredientLeftovers.quantity" }
255
+ }
256
+ }
257
+ ],
258
+ "withoutIngredients": [
259
+ {
260
+ $match: {
261
+ $or: [
262
+ { ingridients: { $exists: false } }, // Продукты без ингредиентов
263
+ { ingridients: { $size: 0 } }
264
+ ]
265
+ }
266
+ },
267
+ {
181
268
  $lookup: {
182
269
  from: "leftovers",
183
270
  let: { "productId": "$_id" },
184
- pipeline: [{
185
- $unwind: "$positions"
186
- },{
187
- "$match": { "$expr": { "$eq": ["$positions._id", "$$productId"] }}
188
- },{
189
- "$project": {
190
- _id: "$positions._id",
191
- quantity: "$positions.quantity",
192
- name: "$positions.name",
271
+ pipeline: [
272
+ { $unwind: "$positions" },
273
+ {
274
+ $match: {
275
+ $expr: {
276
+ $eq: ["$positions._id", "$$productId"]
277
+ }
278
+ }
279
+ },
280
+ {
281
+ $project: {
282
+ quantity: "$positions.quantity"
283
+ }
193
284
  }
194
- }],
195
- as: "variantsMods"
196
- },
197
- },{
198
- $set: {
199
- quantity:{
200
- $sum:["$quantity",{$sum:"$variantsMods.quantity"}]
201
- }
285
+ ],
286
+ as: "productLeftovers"
202
287
  }
203
- },{
204
- $unset: "variants"
205
- }],
206
- as: "modifications"
207
- },
208
- },
209
- {
210
- $lookup: {
211
- from: "leftovers",
212
- let: { "productId": "$_id" },
213
- pipeline: [
214
- {
215
- $unwind: "$positions"
216
- },
217
-
218
- {
219
- "$match": { "$expr": { "$eq": ["$positions._id", "$$productId"] }}
220
- },
221
- {
222
- "$project": {
223
- _id: "$positions._id",
224
- quantity: "$positions.quantity",
225
- name: "$positions.name",
288
+ },
289
+ {
290
+ $set: {
291
+ minQuantity: { $sum: "$productLeftovers.quantity" }
226
292
  }
227
293
  }
228
- ],
229
- as: "variants"
230
- }
231
- },
232
- {
233
- $set: {
234
- quantity:{
235
- $sum:["$quantity",{$sum:"$variants.quantity"}]
236
- }
237
- }
238
- },
239
- { $unset: "variants" }
240
- ])
294
+ ]
295
+ }
296
+ },
297
+ {
298
+ $project: {
299
+ products: { $setUnion: ["$withIngredients", "$withoutIngredients"] }
300
+ }
301
+ },
302
+ { $unwind: "$products" },
303
+ { $replaceRoot: { newRoot: "$products" } }
304
+ ])
305
+
241
306
  .exec((err, products) => {
242
307
  // If error
243
308
  if (err) {return res.status(500).send({ message: err }); }
@@ -338,58 +403,72 @@ const controllerFactory = (db) => {
338
403
  // Get product
339
404
  const getProduct = async (req, res) => {
340
405
  try {
341
- const product = await Product.aggregate([{
342
- $match: { "_id" : new ObjectId(req.params._id) }
343
- },{
344
- $lookup: {
345
- from: "leftovers",
346
- let: { "productId": "$_id" },
347
- pipeline: [
348
- {
349
- $unwind: "$positions"
350
- },
351
- {
352
- "$match": { "$expr": { "$eq": ["$positions._id", "$$productId"] }}
353
- },
354
- {
355
- "$project": {
356
- _id: "$positions._id",
357
- quantity: "$positions.quantity",
358
- name: "$positions.name",
359
- // "quantity": "$$quantity"
406
+ const product = await Product.aggregate([
407
+ {
408
+ $match: { "_id": new ObjectId(req.params._id) }
409
+ },
410
+ {
411
+ $lookup: {
412
+ from: "leftovers",
413
+ let: { productId: "$_id", ingredients: { $ifNull: ["$ingredients", []] } },
414
+ pipeline: [
415
+ {
416
+ $unwind: "$positions"
417
+ },
418
+ {
419
+ "$match": { "$expr": { "$eq": ["$positions._id", "$$productId"] }}
420
+ },
421
+ {
422
+ "$addFields": {
423
+ "positions.quantity": {
424
+ $cond: {
425
+ if: { $eq: ["$type", "stock-in"] },
426
+ then: "$positions.quantity",
427
+ else: { $multiply: ["$positions.quantity", -1] }
428
+ }
429
+ }
430
+ }
431
+ },
432
+ {
433
+ "$project": {
434
+ _id: "$positions._id",
435
+ quantity: "$positions.quantity",
436
+ name: "$positions.name",
437
+ }
360
438
  }
361
- }
362
- ],
363
- as: "variants"
364
- }
365
- },{
366
- $set: {
367
- quantity:{
368
- $sum:["$quantity",{$sum:"$variants.quantity"}]
439
+ ],
440
+ as: "variants"
441
+ }
442
+ },
443
+ {
444
+ $set: {
445
+ quantity: {
446
+ $sum: ["$quantity", {$sum: "$variants.quantity"}]
447
+ }
369
448
  }
370
- }
371
- },
372
- { $unset: "variants" }
373
- ])
449
+ },
374
450
 
375
- if (!product || product.length < 1) {
376
- return res.status(404).send({ message: "Product not found." });
377
- }
451
+ { $unset: "variants" }
452
+ ]);
378
453
 
379
- const updatedProduct = await Product.findOneAndUpdate(
380
- { _id: req.params._id },
381
- { $inc: { popularity: 1 } },
382
- { new: true }
383
- );
454
+ if (!product || product.length < 1) {
455
+ return res.status(404).send({ message: "Product not found." });
456
+ }
384
457
 
385
- console.log('Popularity updated:', updatedProduct);
458
+ const updatedProduct = await Product.findOneAndUpdate(
459
+ { _id: req.params._id },
460
+ { $inc: { popularity: 1 } },
461
+ { new: true }
462
+ );
386
463
 
387
- res.status(200).send(product);
388
- } catch (err) {
389
- console.error('Error:', err);
390
- res.status(500).send({ message: err });
391
- }
392
- };
464
+ console.log('Popularity updated:', updatedProduct);
465
+
466
+ res.status(200).send(product);
467
+ } catch (err) {
468
+ console.error('Error:', err);
469
+ res.status(500).send({ message: err });
470
+ }
471
+ };
393
472
 
394
473
  return {
395
474
  Create,
@@ -18,6 +18,7 @@ module.exports = (mongoose) => {
18
18
  images: {type: Array},
19
19
  popularity: {type: Number},
20
20
  localization: {type: Array},
21
+ ingredients: {type: Array},
21
22
  information: [{
22
23
  name: {type: String},
23
24
  value: {type: String}
@@ -4,13 +4,13 @@
4
4
  <div class="h-100 w-100 flex-nowrap flex-column flex gap-thin pd-thin">
5
5
 
6
6
  <!-- Sorting section -->
7
- <div class="pd-medium bg-grey radius-big">
7
+ <div class="pd-medium bg-main radius-big">
8
8
  <div class="flex-nowrap flex flex-v-center">
9
9
  <header class="mn-r-auto flex-v-center t-left flex-nowrap flex">
10
10
  <h2 class="t-left">
11
11
  <span class="">Weed in </span>
12
12
 
13
- <span @click="a => { globals.state.isOpenLocationPopup = true }" v-if="localPosition.city || localPosition.state || localPosition.country" class="t-semi t-main">
13
+ <span @click="a => { globals.state.isOpenLocationPopup = true }" v-if="localPosition.city || localPosition.state || localPosition.country" class="t-semi t-black">
14
14
  <span v-if="localPosition.city">{{localPosition.city}}, </span>
15
15
  <span v-if="localPosition.state">{{localPosition.state}}, </span>
16
16
  <span v-if="localPosition.country">{{localPosition.country}}</span>
@@ -1,117 +1,102 @@
1
1
  <template>
2
- <section class="pd-big">
3
- <h1 class="mn-b-small">Your Wallet</h1>
2
+ <section class="pd-thin">
4
3
 
5
- <p class="mn-b-semi p-big">
6
- Earn Weeder Token Crypto with buying our weed, use it as money when buying our products or withdraw and trade
7
- </p>
4
+ <section class="bg-black t-white mn-b-thin radius-big pd-big">
5
+ <h1 class="mn-b-medium ">Your Wallet</h1>
8
6
 
9
- <div class="mn-b-semi cols-2 gap-thin">
10
- <div
11
- v-if="!state.account"
12
- class="w-100 pd-medium radius-medium t-center bg-grey"
13
- >
14
- <h3 class="mn-b-small">Make first order and start earning Weeder Token</h3>
15
- <button class="mn-l-auto mn-r-auto bg-main button">Explore marketplace</button>
16
- </div>
7
+ <p class="mn-b-semi t-transp p-big">
8
+ Earn Weeder Tokens by purchasing our weed or contributing to the community.
9
+ </p>
17
10
 
18
- <div
11
+ <div
19
12
  v-if="state.account"
20
- class="w-100 pd-medium radius-medium bg-grey"
13
+ class="gap-thin flex-nowrap bg-black radius-extra t-white br-solid br-white-transp-10 br-1px flex-v-center flex pd-medium"
21
14
  >
22
- <p class="h4 mn-b-thin">You own:</p>
23
- <h3 class="mn-b-small">{{state.share}}% of Weeder</h3>
24
- <button class="w-100 bg-main button">Get More</button>
25
- </div>
26
-
27
- <div class="w-100 bg-black radius-semi pd-medium t-white">
28
- <p class="h4 mn-b-thin">Your Metamask</p>
29
-
30
- <div
31
- v-if="state.account"
32
- class="mn-b-small pd-small br-solid br-1px br-white-transp-10 radius-small"
33
- >
34
- {{state.account}}
15
+ <div class="flex-v-center flex-nowrap flex mn-r-auto">
16
+ <img src="/logo/wdt.svg" class="mn-r-thin i-big">
17
+ <h2>{{state.tokenBalance}} WDT</h2>
35
18
  </div>
36
19
 
37
- <p
38
- v-if="!state.account"
39
- class="p-medium t-transp mn-b-small"
40
- >
41
- Connect Metamask to withdrawal your earnings.
42
- </p>
43
-
44
- <button
45
- v-if="!state.account"
46
- @click="actions.connectWallet"
47
- class="w-100 br-solid br-2px br-white t-white button"
48
- >
49
- Connect Wallet
50
- </button>
51
-
52
- <button
53
- v-if="state.account"
54
- @click="actions.disconnectWallet"
55
- class="w-100 bg-red button"
56
- >
57
- Disconnect Wallet
58
- </button>
20
+ <button class="w-max bg-main t-medium button">Get More</button>
21
+ <button class="w-max bg-white t-black t-medium button" @click="actions.collectRewards">Withdraw</button>
59
22
  </div>
60
- </div>
61
23
 
62
- <div
63
- v-if="state.account"
64
- class="w-100 pd-medium radius-medium bg-grey"
65
- >
66
- <p class="h4 mn-b-thin">You earn:</p>
67
- <h3 class="mn-b-small">{{state.tokenBalance}} WDT</h3>
68
- <button class="w-100 bg-main button" @click="actions.collectRewards">Withdraw</button>
69
- </div>
70
-
71
-
72
- <h3 class="mn-b-small" v-if="state.rewards.length > 0">Latest Rewards </h3>
24
+ </section>
73
25
 
74
- <section class="cols-3 gap-thin">
75
- <div
76
- class="radius-medium bg-grey"
77
- v-for="income in state.rewards"
78
- >
79
- <!-- <pre>{{income}}</pre> -->
80
-
81
- <div class="pd-medium">
82
- <span class="w-max mn-b-small d-block pd-t-nano pd-b-nano pd-l-thin pd-r-thin bg-main radius-extra t-semi p-small">{{income.type === 'blogpost' ? 'Community Reward' : income.type}}</span>
83
- <h4 class="mn-b-thin">{{income.name}}</h4>
84
- <p class="mn-b-small p-small">{{income.content[0].content}}</p>
26
+ <div v-if="!state.account" class="mn-b-semi cols-2 gap-thin">
27
+ <div
28
+ class="w-100 pd-medium radius-medium t-center bg-grey"
29
+ >
30
+ <h3 class="mn-b-small">Make first order and start earning Weeder Token</h3>
31
+ <button class="mn-l-auto mn-r-auto bg-main button">Explore marketplace</button>
32
+ </div>
85
33
 
86
- <div class="bg-black t-white radius-extra pd-thin flex-center flex-nowrap flex">
87
- <!-- <img src="/logo/wdt-plus.svg" class="mn-r-thin i-semi"> -->
88
- <p class="t-semi">{{income.amount}} WDT</p>
34
+ <div
35
+ class="w-100 pd-medium flex-center flex flex-column radius-medium t-center bg-grey"
36
+ >
37
+ <h3
38
+ v-if="!state.account"
39
+ class="mn-b-small"
40
+ >
41
+ Connect Metamask to withdrawal your earnings.
42
+ </h3>
43
+
44
+ <button
45
+ v-if="!state.account"
46
+ @click="actions.connectWallet"
47
+ class="br-solid br-2px br-black-transp-10 t-black button"
48
+ >
49
+ Connect Wallet
50
+ </button>
89
51
  </div>
90
52
  </div>
91
-
92
-
93
- <!-- <CardBlogpost
94
- :key="income._id"
95
- :blogpost="income"
96
- class=""
97
- /> -->
98
53
 
99
- </div>
54
+ <div
55
+ v-if="state.account"
56
+ class="w-100 mn-b-semi flex-column flex pd-big radius-big bg-main t-black"
57
+ >
58
+ <p class="t-transp t-medium mn-b-thin">You own:</p>
59
+ <p class="h1 mn-b-small">{{state.share}}%</p>
60
+ <p class="t-white p-big t-medium mn-b-semi">of all shares</p>
61
+
62
+ <div
63
+ class="flex-v-center mn-b-small flex-nowrap flex pd-small bg-black-transp-5 radius-extra"
64
+ >
65
+ <img src="@/assets/icons/metamask.svg" class="mn-r-small i-big" >
66
+
67
+ <p v-if="state.account" class="t-transp t-medium ">
68
+ <span class="uppercase p-small t-medium t-transp">Connected Metamask</span><br>
69
+ <span>{{state.account}}</span>
70
+ </p>
71
+
72
+ <button
73
+ v-if="state.account"
74
+ @click="actions.disconnectWallet"
75
+ class="mn-l-auto bg-red button"
76
+ >
77
+ Disconnect Wallet
78
+ </button>
79
+ </div>
80
+
81
+
82
+ </div>
83
+ <h2 class="mn-b-small" v-if="state.rewards.length > 0">Latest Rewards </h2>
100
84
 
85
+ <section class="cols-3 gap-thin">
101
86
  <div
102
87
  class="radius-medium bg-grey"
103
88
  v-for="income in state.rewards"
104
89
  >
105
- <div class="flex-nowrap flex pd-medium">
106
- <!-- <img src="/logo/wdt-plus.svg" class="mn-r-thin i-semi"> -->
90
+ <div class="flex-nowrap br-b br-black-transp-10 br-solid flex pd-medium">
91
+ <img src="/logo/wdt-plus.svg" class="mn-r-thin i-semi">
107
92
  <p class="t-semi mn-r-auto">{{income.amount}} WDT</p>
108
93
 
109
94
  <span class="pd-t-nano pd-b-nano pd-l-thin pd-r-thin bg-main flex flex-center radius-extra t-semi p-small">{{income.type === 'blogpost' ? 'Community Reward' : income.type}}</span>
110
95
  </div>
111
96
 
112
97
  <div class="pd-medium">
113
- <h4 class="mn-b-thin">{{income.name}}</h4>
114
- <p class="p-small">{{income.content[0].content}}</p>
98
+ <h4 class="t-regular mn-b-thin">{{income.name}}</h4>
99
+ <!-- <p class="p-small">{{income.content[0].content}}</p> -->
115
100
  </div>
116
101
 
117
102
  </div>
@@ -26,6 +26,85 @@ const cryptoControllerFactory = (db, wdmClient) => {
26
26
  const Comment = db.comment;
27
27
  const Reward = db.reward;
28
28
 
29
+ // const listRewards = async (req, res) => {
30
+ // try {
31
+ // const rewards = await Blogpost.aggregate([
32
+ // // Шаг 1: Фильтрация блогпостов по создателю
33
+ // { $match: { "creator.target": req.userId } },
34
+ // // Шаг 2: Соединение с Reaction для подсчета реакций
35
+ // {
36
+ // $lookup: {
37
+ // from: "reactions",
38
+ // localField: "_id",
39
+ // foreignField: "target",
40
+ // as: "reactions"
41
+ // }
42
+ // },
43
+ // // Шаг 3: Соединение с Comment для подсчета комментариев
44
+ // {
45
+ // $lookup: {
46
+ // from: "comments",
47
+ // localField: "_id",
48
+ // foreignField: "target",
49
+ // as: "comments"
50
+ // }
51
+ // },
52
+ // // Шаг 4: Соединение с Reward для получения предыдущих наград
53
+ // {
54
+ // $lookup: {
55
+ // from: "rewards",
56
+ // let: { blogId: "$_id", userId: req.userId },
57
+ // pipeline: [
58
+ // { $match: {
59
+ // $expr: {
60
+ // $and: [
61
+ // { $eq: ["$user", "$$userId"] },
62
+ // { $eq: ["$type", "blogpost"] },
63
+ // { $eq: ["$target", "$$blogId"] }
64
+ // ]
65
+ // }
66
+ // }
67
+ // },
68
+ // { $sort: { createdAt: -1 } },
69
+ // { $limit: 1 }
70
+ // ],
71
+ // as: "previousReward"
72
+ // }
73
+ // },
74
+ // // Шаг 5: Проецирование результата и преобразование массивов в счетчики
75
+ // {
76
+ // $project: {
77
+ // user: req.userId,
78
+ // type: 'blogpost',
79
+ // name: "$name",
80
+ // content: "$content",
81
+ // url: "$url",
82
+ // views: "$views",
83
+ // reactionsCount: { $size: "$reactions" },
84
+ // commentsCount: { $size: "$comments" },
85
+ // previousRewardSnapshot: { $arrayElemAt: ["$previousReward.snapshot", 0] },
86
+ // }
87
+ // }
88
+ // ]).exec();
89
+
90
+ // // Пересчет наград на основе полученных данных
91
+ // const calculatedRewards = rewards.map(reward => ({
92
+ // ...reward,
93
+ // amount: calculateRewardForPost(
94
+ // reward.previousRewardSnapshot,
95
+ // reward.views,
96
+ // reward.reactionsCount,
97
+ // reward.commentsCount
98
+ // ).toString(),
99
+ // }));
100
+
101
+ // res.status(200).send(calculatedRewards);
102
+ // } catch (error) {
103
+ // console.error("Error listing rewards:", error);
104
+ // res.status(500).send({ message: "Internal server error" });
105
+ // }
106
+ // };
107
+
29
108
  const listRewards = async (req, res) => {
30
109
  const blogs = await Blogpost.find({ "creator.target": req.userId }).exec();
31
110
 
@@ -0,0 +1,27 @@
1
+ module.exports = (mongoose) => {
2
+ const WalletSchema = new mongoose.Schema(
3
+ {
4
+ owner: {
5
+ type: mongoose.Schema.Types.ObjectId,
6
+ ref: () => {
7
+ if (this.owner.type === 'user') return 'User';
8
+ if (this.owner.type === 'organization') return 'Organization';
9
+ },
10
+ required: true,
11
+ },
12
+ amount: {
13
+ type: Number,
14
+ required: true,
15
+ default: 0
16
+ },
17
+ },
18
+ {
19
+ timestamps: {
20
+ currentTime: () => Date.now(),
21
+ },
22
+ },
23
+ { strict: false },
24
+ );
25
+
26
+ return mongoose.model("Wallet", WalletSchema);
27
+ };
@@ -191,6 +191,10 @@ body {
191
191
  &-items-baseline { align-items: baseline; }
192
192
  }
193
193
 
194
+ .align-self-start {
195
+ align-self: start;
196
+ }
197
+
194
198
  .flex-child {
195
199
  &-noresize { flex: 0 }
196
200
  &-grow-0 { flex-grow: 0; }