@ozdao/prometheus-framework 0.2.30 → 0.2.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (269) hide show
  1. package/dist/addMembersQuantity-3505b6f3.mjs +98 -0
  2. package/dist/addMembersQuantity-fb552ca0.js +97 -0
  3. package/dist/auth.server.js +6 -9
  4. package/dist/auth.server.mjs +6 -9
  5. package/dist/community.server.js +28 -21
  6. package/dist/community.server.mjs +28 -21
  7. package/dist/events.server.js +1 -1
  8. package/dist/events.server.mjs +1 -1
  9. package/dist/files.server.js +114 -111
  10. package/dist/files.server.mjs +114 -111
  11. package/dist/gallery.server.js +3 -3
  12. package/dist/gallery.server.mjs +3 -3
  13. package/dist/globals.server.js +1 -1
  14. package/dist/globals.server.mjs +1 -1
  15. package/dist/index-a8dffc0c.js +213 -0
  16. package/dist/index-d769324d.mjs +214 -0
  17. package/dist/mailing-37c2ba41.mjs +68 -0
  18. package/dist/mailing-fe16a26a.js +67 -0
  19. package/dist/main.css +1 -1
  20. package/dist/middlewares.server.js +1 -1
  21. package/dist/middlewares.server.mjs +1 -1
  22. package/dist/organizations.server.js +125 -25
  23. package/dist/organizations.server.mjs +125 -25
  24. package/dist/prometheus-framework.cjs.js +30 -29
  25. package/dist/prometheus-framework.es.js +2478 -2282
  26. package/dist/reports.server.js +1 -1
  27. package/dist/reports.server.mjs +1 -1
  28. package/dist/users.server.js +1 -1
  29. package/dist/users.server.mjs +1 -1
  30. package/package.json +4 -2
  31. package/src/assets/images/logo.svg +7 -7
  32. package/src/components/Block/Block.vue +77 -0
  33. package/src/components/Breadcrumbs/Breadcrumbs.vue +2 -2
  34. package/src/components/Button/Button.vue +32 -227
  35. package/src/components/Checkbox/Checkbox.vue +1 -1
  36. package/src/components/Chips/Chips.vue +8 -8
  37. package/src/components/DatePicker/DatePicker.vue +3 -4
  38. package/src/components/EditImages/EditImages.vue +32 -14
  39. package/src/{modules/globals/components/sections → components/Feed}/Feed.vue +60 -45
  40. package/src/components/FieldBig/FieldBig.vue +16 -5
  41. package/src/components/FieldPhone/FieldPhone.vue +2 -1
  42. package/src/components/Footer/Footer.vue +36 -27
  43. package/src/components/Header/Header.vue +161 -166
  44. package/src/components/Loader/Loader.vue +9 -2
  45. package/src/components/LocationMarker/LocationMarker.vue +38 -12
  46. package/src/components/LocationSelection/LocationSelection.vue +67 -75
  47. package/src/components/Magnifier/Magnifier.vue +3 -3
  48. package/src/components/Navigation/Navigation.vue +16 -16
  49. package/src/components/Popup/Popup.vue +8 -6
  50. package/src/components/Select/Select.vue +35 -6
  51. package/src/components/SelectMulti/SelectMulti.vue +5 -13
  52. package/src/components/Shader/Shader.vue +128 -0
  53. package/src/components/Sidebar/Sidebar.vue +71 -35
  54. package/src/components/Spoiler/Spoiler.vue +1 -1
  55. package/src/components/Tab/Tab.vue +1 -1
  56. package/src/components/Tooltip/Tooltip.vue +1 -1
  57. package/src/components/UploadImage/UploadImage.vue +4 -4
  58. package/src/components/UploadImageMultiple/UploadImageMultiple.vue +54 -10
  59. package/src/modules/applications/controllers/applications.controller.js +0 -1
  60. package/src/modules/auth/components/pages/EnterCode.vue +1 -1
  61. package/src/modules/auth/components/pages/EnterPassword.vue +3 -3
  62. package/src/modules/auth/components/pages/ResetPassword.vue +1 -2
  63. package/src/modules/auth/components/pages/SignIn.vue +26 -10
  64. package/src/modules/auth/components/pages/SignUp.vue +1 -2
  65. package/src/modules/auth/controllers/twofa.controller.js +4 -4
  66. package/src/modules/auth/localization/EnterCode.json +2 -2
  67. package/src/modules/auth/localization/EnterPassword.json +2 -2
  68. package/src/modules/auth/localization/ResetPassword.json +2 -2
  69. package/src/modules/auth/localization/SignIn.json +3 -3
  70. package/src/modules/auth/localization/SignUp.json +3 -3
  71. package/src/modules/auth/utils/server/verifyAppleIdToken.js +0 -1
  72. package/src/modules/backoffice/components/layouts/Backoffice.vue +1 -1
  73. package/src/modules/backoffice/components/pages/Dashboard.vue +171 -120
  74. package/src/modules/backoffice/router/backoffice.js +119 -129
  75. package/src/modules/chats/components/blocks/ChatMessage.vue +25 -0
  76. package/src/modules/chats/components/pages/ChatPage.vue +50 -0
  77. package/src/modules/chats/components/sections/ChatWindow.vue +38 -0
  78. package/src/modules/chats/controllers/chats.controller.js +32 -0
  79. package/src/modules/chats/models/chat.model.js +26 -0
  80. package/src/modules/chats/routes/chats.routes.js +53 -0
  81. package/src/modules/chats/store/chat.store.js +61 -0
  82. package/src/modules/community/components/blocks/CardBlogpost.vue +19 -4
  83. package/src/modules/community/components/layouts/Community.vue +96 -39
  84. package/src/modules/community/components/pages/Blog.vue +4 -3
  85. package/src/modules/community/components/pages/BlogPost.vue +10 -1
  86. package/src/modules/community/components/pages/CreateBlogPost.vue +36 -17
  87. package/src/modules/community/components/sections/HotPosts.vue +3 -3
  88. package/src/modules/community/components/sections/JoinUs.vue +19 -13
  89. package/src/modules/community/controllers/blog.controller.js +3 -4
  90. package/src/modules/community/controllers/utils/queryProcessor.js +16 -17
  91. package/src/modules/community/models/blogpost.model.js +6 -3
  92. package/src/modules/community/store/blogposts.js +1 -0
  93. package/src/modules/constructor/components/elements/Embed.vue +12 -1
  94. package/src/modules/constructor/components/elements/ImageUpload.vue +2 -2
  95. package/src/modules/constructor/components/elements/Textarea.vue +6 -1
  96. package/src/modules/constructor/components/elements/Video.vue +79 -0
  97. package/src/modules/constructor/components/elements/VideoPlayer.vue +59 -0
  98. package/src/modules/constructor/components/elements/Youtube.vue +52 -0
  99. package/src/modules/constructor/components/sections/Constructor.vue +27 -3
  100. package/src/modules/events/components/layouts/layoutEvents.vue +7 -28
  101. package/src/modules/files/controllers/files.controller.js +9 -22
  102. package/src/modules/files/middlewares/server/index.js +2 -2
  103. package/src/modules/files/middlewares/server/middlewareBusboy.js +137 -0
  104. package/src/modules/files/routes/files.routes.js +9 -9
  105. package/src/modules/globals/localization/vue-i18n.js +8 -1
  106. package/src/modules/globals/mixins/mixins.js +23 -13
  107. package/src/modules/globals/router/routerGuards.js +2 -2
  108. package/src/modules/globals/store/globals.js +86 -9
  109. package/src/modules/globals/utils/mailing.js +24 -3
  110. package/src/modules/icons/entities/IconCommunity.vue +4 -4
  111. package/src/modules/icons/entities/IconEvents.vue +1 -1
  112. package/src/modules/icons/entities/IconGroups.vue +1 -1
  113. package/src/modules/icons/entities/IconPrice.vue +5 -0
  114. package/src/modules/icons/entities/IconProfile.vue +5 -0
  115. package/src/modules/icons/entities/IconShopcart.vue +5 -0
  116. package/src/modules/icons/entities/IconTime.vue +5 -0
  117. package/src/modules/icons/icons.client.js +4 -0
  118. package/src/modules/icons/labels/LabelAppStore.vue +24 -24
  119. package/src/modules/icons/labels/LabelGooglePlay.vue +9 -9
  120. package/src/modules/icons/logos/Logotype.vue +20 -0
  121. package/src/modules/icons/navigation/IconAdd.vue +17 -0
  122. package/src/modules/icons/navigation/IconChevronBottom.vue +18 -0
  123. package/src/modules/icons/navigation/IconChevronRight.vue +3 -3
  124. package/src/modules/icons/navigation/IconDelete.vue +19 -0
  125. package/src/modules/icons/navigation/IconMinus.vue +15 -0
  126. package/src/modules/icons/navigation/IconSearch.vue +17 -0
  127. package/src/modules/icons/navigation/IconUpload.vue +16 -0
  128. package/src/modules/icons/placeholders/PlaceholderImage.vue +5 -0
  129. package/src/modules/icons/placeholders/PlaceholderOrganizationPic.vue +20 -0
  130. package/src/modules/icons/placeholders/PlaceholderUserpic.vue +4 -18
  131. package/src/modules/icons/socials/instagram.vue +1 -1
  132. package/src/modules/icons/socials/line.vue +1 -1
  133. package/src/modules/icons/socials/reddit.vue +1 -1
  134. package/src/modules/icons/socials/telegram.vue +1 -1
  135. package/src/modules/icons/socials/twitter.vue +1 -1
  136. package/src/modules/icons/socials/youtube.vue +1 -1
  137. package/src/modules/landing/components/sections/Guide.vue +92 -0
  138. package/src/modules/landing/components/sections/MobileApp.vue +23 -12
  139. package/src/modules/marketplace/components/layouts/Marketplace.vue +76 -188
  140. package/src/modules/marketplace/components/pages/Catalog.vue +65 -119
  141. package/src/modules/marketplace/components/sections/Filters.vue +195 -0
  142. package/src/modules/marketplace/store/marketplace.js +2 -2
  143. package/src/modules/middlewares/client/auth.validation.js +0 -6
  144. package/src/modules/middlewares/client/states.validation.js +2 -8
  145. package/src/modules/middlewares/server/authJwt.js +1 -1
  146. package/src/modules/mobile/components/Menu/MenuItem.vue +3 -6
  147. package/src/modules/openai/controllers/openai.controller.js +0 -1
  148. package/src/modules/orders/components/blocks/CardOrder.vue +166 -0
  149. package/src/modules/orders/components/blocks/CardOrderItem.vue +59 -66
  150. package/src/modules/orders/components/blocks/Positions.vue +4 -4
  151. package/src/modules/orders/components/pages/EditOrder.vue +78 -142
  152. package/src/modules/orders/components/pages/FormOrder.vue +192 -0
  153. package/src/modules/orders/components/pages/Order.vue +326 -120
  154. package/src/modules/orders/components/pages/Orders.vue +13 -9
  155. package/src/modules/orders/components/pages/{ViewOrder.vue → Orders_refact.vue} +13 -10
  156. package/src/modules/orders/components/partials/ShopCart.vue +22 -13
  157. package/src/modules/orders/components/sections/EmptyState.vue +1 -1
  158. package/src/modules/orders/components/sections/{Form.vue → FormOrderDetails.vue} +38 -106
  159. package/src/modules/orders/controllers/orders.controller.js +37 -28
  160. package/src/modules/orders/models/order.model.js +39 -9
  161. package/src/modules/orders/router/orders.router.js +23 -2
  162. package/src/modules/orders/routes/orders.routes.js +14 -17
  163. package/src/modules/orders/store/orders.js +24 -9
  164. package/src/modules/orders/store/shopcart.js +20 -19
  165. package/src/modules/organizations/components/blocks/CardDepartment.vue +1 -1
  166. package/src/modules/organizations/components/blocks/CardOrganization.vue +98 -46
  167. package/src/modules/organizations/components/blocks/Rating.vue +1 -1
  168. package/src/modules/organizations/components/blocks/Socials.vue +11 -3
  169. package/src/modules/organizations/components/elements/ButtonToggleMembership.vue +1 -1
  170. package/src/modules/organizations/components/pages/Department.vue +1 -1
  171. package/src/modules/organizations/components/pages/DepartmentEdit.vue +4 -4
  172. package/src/modules/organizations/components/pages/Members.vue +6 -4
  173. package/src/modules/organizations/components/pages/Organization.vue +120 -49
  174. package/src/modules/organizations/components/pages/OrganizationEdit.vue +8 -1
  175. package/src/modules/organizations/components/pages/Organizations.vue +27 -6
  176. package/src/modules/organizations/components/sections/DetailsTab.vue +11 -9
  177. package/src/modules/organizations/components/sections/Feed.vue +0 -3
  178. package/src/modules/organizations/components/sections/FeedDepartments.vue +2 -2
  179. package/src/modules/organizations/controllers/organizations.controller.js +126 -15
  180. package/src/modules/organizations/controllers/utils/addMembersQuantity.js +19 -9
  181. package/src/modules/organizations/models/organization.model.js +5 -2
  182. package/src/modules/organizations/router/members.router.js +1 -3
  183. package/src/modules/organizations/router/organizations.js +8 -6
  184. package/src/modules/organizations/router/products.router.js +36 -2
  185. package/src/modules/organizations/store/organizations.js +38 -84
  186. package/src/modules/pages/controllers/pages.controller.js +0 -4
  187. package/src/modules/payments/controller/payments.controller.js +1 -1
  188. package/src/modules/products/components/blocks/CardLeftover.vue +17 -22
  189. package/src/modules/products/components/blocks/CardPosition.vue +96 -49
  190. package/src/modules/products/components/blocks/CardProduct.vue +24 -53
  191. package/src/modules/products/components/blocks/Images360.vue +4 -4
  192. package/src/modules/products/components/blocks/ImagesThumbnails.vue +2 -7
  193. package/src/modules/products/components/blocks/ListPositions.vue +74 -0
  194. package/src/modules/products/components/elements/Price.vue +11 -5
  195. package/src/modules/products/components/elements/THC.vue +6 -6
  196. package/src/modules/products/components/pages/{LeftoverAdd.vue → EditLeftover.vue} +93 -79
  197. package/src/modules/products/components/pages/Leftovers.vue +74 -70
  198. package/src/modules/products/components/pages/Product.vue +4 -7
  199. package/src/modules/products/components/pages/ProductEdit.vue +230 -88
  200. package/src/modules/products/components/pages/ProductRecommmendation.vue +1 -1
  201. package/src/modules/products/components/pages/Products.vue +6 -3
  202. package/src/modules/products/components/pages/ProductsBackoffice.vue +3 -5
  203. package/src/modules/products/components/sections/EditModifications.vue +3 -3
  204. package/src/modules/products/components/sections/EditProductInfo.vue +40 -50
  205. package/src/modules/products/components/sections/FilterProducts.vue +57 -18
  206. package/src/modules/products/components/sections/HeroRecommendation.vue +233 -99
  207. package/src/modules/products/components/sections/MenuSection.vue +127 -0
  208. package/src/modules/products/components/sections/PopularProducts.vue +81 -37
  209. package/src/modules/products/components/sections/SectionProduct.vue +21 -23
  210. package/src/modules/products/controllers/leftovers.controller.js +11 -1
  211. package/src/modules/products/controllers/products.controller.js +100 -97
  212. package/src/modules/products/models/leftover.model.js +6 -4
  213. package/src/modules/products/models/product.model.js +13 -1
  214. package/src/modules/products/routes/products.routes.js +4 -4
  215. package/src/modules/products/store/leftovers.js +4 -24
  216. package/src/modules/products/store/products.js +44 -30
  217. package/src/modules/spots/components/blocks/CardSpot.vue +43 -72
  218. package/src/modules/spots/components/layouts/Spots.vue +9 -91
  219. package/src/modules/spots/components/pages/Map.vue +171 -62
  220. package/src/modules/spots/components/pages/Spot.vue +1 -1
  221. package/src/modules/spots/components/pages/SpotEdit.vue +131 -174
  222. package/src/modules/spots/controllers/spots.controller.js +1 -0
  223. package/src/modules/spots/models/spot.model.js +6 -3
  224. package/src/modules/spots/store/spots.js +42 -48
  225. package/src/modules/users/components/pages/Profile.vue +6 -28
  226. package/src/modules/users/components/pages/ProfileBlogposts.vue +1 -1
  227. package/src/modules/users/components/pages/ProfileEdit.vue +1 -1
  228. package/src/modules/users/components/pages/ProfileEvents.vue +1 -1
  229. package/src/modules/users/components/pages/ProfileOrganizations.vue +1 -1
  230. package/src/modules/users/router/users.js +1 -1
  231. package/src/modules/wallet/components/pages/Wallet.vue +105 -109
  232. package/src/modules/wallet/controllers/crypto.controller.js +129 -0
  233. package/src/modules/wallet/models/reward.model.js +53 -0
  234. package/src/modules/wallet/routes/crypto.routes.js +36 -0
  235. package/src/modules/wallet/store/wallet.js +52 -49
  236. package/src/styles/base/all.scss +143 -11
  237. package/src/styles/base/backgrounds.scss +2 -34
  238. package/src/styles/base/borders.scss +18 -23
  239. package/src/styles/base/scrolling.scss +97 -29
  240. package/src/styles/base/{shadows.scss → shadow_transitions_hover_refactor.scss} +55 -2
  241. package/src/styles/config.scss +69 -17
  242. package/src/styles/layout.scss +12 -182
  243. package/src/styles/reset.scss +20 -21
  244. package/src/styles/responsive.scss +4 -67
  245. package/src/styles/theme.scss +3 -4
  246. package/src/styles/typography.scss +15 -17
  247. package/src/assets/fonts/AvenirNext-Bold.woff2 +0 -0
  248. package/src/assets/fonts/AvenirNext-DemiBold.woff2 +0 -0
  249. package/src/assets/fonts/AvenirNext-Heavy.woff2 +0 -0
  250. package/src/assets/fonts/AvenirNext-Medium.woff2 +0 -0
  251. package/src/assets/fonts/AvenirNext-Regular.woff2 +0 -0
  252. package/src/assets/fonts/AvenirNext-UltraLight.woff2 +0 -0
  253. package/src/modules/files/middlewares/server/md.js +0 -152
  254. package/src/modules/files/middlewares/server/middlewareMulter.js +0 -121
  255. package/src/modules/organizations/controllers/organizations.new.controller.js +0 -372
  256. package/src/modules/products/components/blocks/EditCategories.vue +0 -68
  257. package/src/modules/products/components/sections/EditParameters.vue +0 -58
  258. package/src/modules/products/components/sections/EditProductImages.vue +0 -67
  259. package/src/modules/spots/components/sections/Feed.vue +0 -64
  260. package/src/styles/base/border-radius.scss +0 -47
  261. package/src/styles/base/cursors.scss +0 -23
  262. package/src/styles/base/height.scss +0 -60
  263. package/src/styles/base/hovers.scss +0 -110
  264. package/src/styles/base/positions.scss +0 -192
  265. package/src/styles/base/transitions.scss +0 -137
  266. package/src/styles/base/width.scss +0 -2
  267. package/src/styles/components/block.scss +0 -18
  268. package/src/styles/components/breadcrumbs.scss +0 -0
  269. package/src/styles/components/input.scss +0 -319
@@ -1,8 +1,10 @@
1
+ const { ObjectId } = require('mongodb');
2
+
1
3
  module.exports = (mongoose) => {
2
4
  const OrganizationSchema = new mongoose.Schema({
3
5
  // Creator and owner of organizations
4
6
  owner: {
5
- type: mongoose.Schema.Types.ObjectId,
7
+ type: ObjectId,
6
8
  ref: 'User',
7
9
  required: true,
8
10
  },
@@ -39,7 +41,8 @@ module.exports = (mongoose) => {
39
41
  telegram: String,
40
42
  twitter: String,
41
43
  facebook: String,
42
- instagram: String
44
+ instagram: String,
45
+ youtube: String
43
46
  },
44
47
  // departments
45
48
  structure: {
@@ -1,6 +1,6 @@
1
1
  import * as validationAuth from '@pf/src/modules/middlewares/client/auth.validation.js';
2
2
 
3
- const memberRoutes = [{
3
+ export const membersRoutes = [{
4
4
  path: ':_id/members',
5
5
  name: 'Organization Members',
6
6
  meta: {
@@ -15,5 +15,3 @@ const memberRoutes = [{
15
15
  name: 'Invite Member',
16
16
  component: () => import('@pf/src/modules/organizations/components/sections/MembersAdd.vue')
17
17
  }];
18
-
19
- export default memberRoutes;
@@ -1,9 +1,10 @@
1
1
  import layoutEmpty from '@pf/src/modules/globals/components/layouts/Empty.vue';
2
2
 
3
3
  import organizationRoutes from './organizations.router.js';
4
- // import { departmentRoutes } from './departments.router.js';
5
- // import { membersRoutes } from './members.router.js';
6
- // import { productRoutes } from './products.router.js';
4
+
5
+ import { membersRoutes } from './members.router.js';
6
+ import departmentRoutes from './departments.router.js'
7
+ import productRoutes from './products.router.js';
7
8
 
8
9
  const organizations = [{
9
10
  path: 'organizations',
@@ -16,9 +17,10 @@ const organizations = [{
16
17
  },
17
18
  children: [
18
19
  ...organizationRoutes,
19
- // ...departmentRoutes,
20
- // ...productRoutes,
21
- // ...membersRoutes
20
+ ...membersRoutes,
21
+ ...departmentRoutes,
22
+ ...productRoutes
23
+
22
24
  ]
23
25
  }];
24
26
 
@@ -17,8 +17,42 @@ const productRoutes = [{
17
17
  component: () => import('@pf/src/modules/products/components/pages/ProductEdit.vue')
18
18
  }, {
19
19
  path: ':_id/products/add',
20
- name: 'AddProduct',
20
+ name: 'ProductAdd',
21
21
  component: () => import('@pf/src/modules/products/components/pages/ProductEdit.vue')
22
- }];
22
+ },{
23
+ path: ':_id/leftovers',
24
+ name: 'Leftovers',
25
+ meta: {
26
+ title: {
27
+ en: 'Leftovers',
28
+ ru: 'Остатки'
29
+ },
30
+ authorize: []
31
+ },
32
+ component: () => import(/* webpackChunkName: 'ProductsLeftovers' */ '@pf/src/modules/products/components/pages/Leftovers.vue'),
33
+ },{
34
+ path: ':_id/leftovers/add',
35
+ name: 'LeftoverAdd',
36
+ meta: {
37
+ title: {
38
+ en: 'Leftovers Add',
39
+ ru: 'Управление Остатками'
40
+ },
41
+ authorize: []
42
+ },
43
+ component: () => import(/* webpackChunkName: 'LeftoverEdit' */ '@pf/src/modules/products/components/pages/EditLeftover.vue')
44
+ },
45
+ {
46
+ path: ':_id/leftovers/:leftover',
47
+ name: 'LeftoverEdit',
48
+ meta: {
49
+ title: {
50
+ en: 'Leftovers Edit',
51
+ ru: 'Управление Остатками'
52
+ },
53
+ authorize: []
54
+ },
55
+ component: () => import(/* webpackChunkName: 'LeftoverEdit' */ '@pf/src/modules/products/components/pages/EditLeftover.vue')
56
+ },];
23
57
 
24
58
  export default productRoutes;
@@ -31,7 +31,8 @@ const state = reactive({
31
31
  telegram: '',
32
32
  line: '',
33
33
  facebook: '',
34
- instagram: ''
34
+ instagram: '',
35
+ youtube: ''
35
36
  },
36
37
  rating: {
37
38
  popularity: 0,
@@ -56,94 +57,46 @@ const actions = {
56
57
  throw error;
57
58
  }
58
59
  },
59
- // Read
60
- async read(options = {}) {
61
- console.log(options)
62
-
63
- options.params = options.params || {};
64
-
65
- // Handle fetching a specific organization by website
66
- if (options.location) {
67
- options.params.location = options.location;
68
- }
69
- if (options.country) {
70
- options.params.country = options.country;
71
- }
72
-
73
- if (options.state) {
74
- options.params.state = options.state;
75
- }
76
-
77
- if (options.city) {
78
- options.params.city = options.city;
79
- }
80
-
81
- if (options.categories) {
82
- options.params.categories = options.categories;
83
- }
84
-
85
- if (options.prices) {
86
- options.params.prices = options.prices;
87
- }
88
-
89
- if (options.delivery) {
90
- options.params.delivery = options.delivery;
91
- }
92
-
93
- if (options._id) {
94
- options.params = options.params || {};
95
- options.params._id = options._id;
96
- }
97
-
98
- // Handle fetching organization by type
99
- if (options.types) {
100
- options.params = options.params || [];
101
- options.params.types = options.types;
102
- }
103
-
104
- if (options.owner) {
105
- options.params = options.params || {};
106
- options.params.owner = options.owner;
107
- }
108
-
109
- if (options.user) {
110
- options.params = options.params || {};
111
- options.params.user = options.user;
112
- }
113
-
114
- if (options.member) {
115
- options.params = options.params || {};
116
- options.params.member = options.member;
117
- }
118
-
119
- if (options.subscriber) {
120
- options.params = options.params || {};
121
- options.params.subscriber = options.subscriber;
122
- }
123
-
124
- if (options.postable) {
125
- options.params = options.params || {};
126
- options.params.postable = options.postable;
127
- }
128
-
129
- // Handle pagination
130
- options.params = options.params || {};
131
- options.params.skip = options.skip || 0;
132
- options.params.limit = options.limit || 9;
133
- options.params.sortParam = options.sort;
134
-
135
- // console,log()
136
-
60
+ async read(options = {}) {
61
+
62
+ let params = {}
63
+
64
+ if (options._id) params._id = options._id;
65
+ if (options.owner) params.owner = options.owner;
66
+ if (options.user) params.user = options.user;
67
+ if (options.member) params.member = options.member;
68
+ if (options.subscriber) params.subscriber = options.subscriber;
69
+ if (options.postable) params.postable = options.postable;
70
+ if (options.location) params.location = options.location;
71
+ if (options.search) params.search = options.search;
72
+
73
+ if (options.location) params.location = options.location;
74
+ if (options.locationRadius) params.locationRadius = options.locationRadius;
75
+
76
+ if (options.country) params.country = options.country;
77
+ if (options.state) params.state = options.state;
78
+ if (options.city) params.city = options.city;
79
+ if (options.categories) params.categories = options.categories;
80
+ if (options.prices) params.prices = options.prices;
81
+ if (options.delivery) params.delivery = options.delivery;
82
+ if (options.types) params.types = options.types;
83
+ if (options.skip) params.skip = options.skip;
84
+ if (options.limit) params.limit = options.limit;
85
+
86
+
87
+ params.contain = options.contain || [];
88
+
89
+
90
+ params.sortParam = options.sortParam;
91
+ params.sortOrder = options.sortOrder;
92
+
93
+ console.log(params)
137
94
  try {
138
- console.log('Request params:' + options.params)
139
- const response = await $axios.get('/api/organizations', { params: options.params });
95
+ const response = await $axios.get('/api/organizations', { params: params });
140
96
 
141
- // Check if we are fetching a single organization or all organizations
142
97
  if (options._id) {
143
98
  Object.assign(state.current || {}, response.data[0])
144
- console.log(state.current) // Assuming that the response.data is the organization object
145
99
  } else {
146
- console.log(response.data)
147
100
  // state.all = [...state.all, ...response.data];
148
101
  // state.all = response.data; // Assuming that the response.data is an array of organization objects
149
102
  }
@@ -169,6 +122,7 @@ const actions = {
169
122
  }
170
123
  );
171
124
  },
125
+
172
126
  // Remove
173
127
  async remove(organizationId) {
174
128
  await $axios
@@ -1,7 +1,3 @@
1
- // --------------------------------------------------
2
- // DEPENENCY
3
- // --------------------------------------------------
4
- const fetch = require('node-fetch')
5
1
  // --------------------------------------------------
6
2
  // Used models
7
3
  // --------------------------------------------------
@@ -1,4 +1,4 @@
1
- const fetch = require('node-fetch')
1
+
2
2
  var jwt = require("jsonwebtoken");
3
3
  var axios = require('axios');
4
4
  var bcrypt = require("bcryptjs");
@@ -1,27 +1,19 @@
1
1
  <template>
2
- <div class="flex-column flex-wrap block">
2
+ <div class="flex-column pos-relative flex-wrap block">
3
3
  <div class="w-100 mn-b-thin flex">
4
- <div>
5
- <p class="p-big">
6
- {{leftover.type}} #{{leftover._id}}
7
- </p>
8
- <p class="p-small">
9
-
10
- </p>
11
-
12
- </div>
13
- <div>
14
- <IconEdit
15
- @click="$router.push({
16
- name: 'LeftoverEdit',
17
- params: {
18
- _id: leftover._id
19
- }
20
- })"
21
- class="pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
22
- />
23
- </div>
24
- <hr class="mn-t-small mn-b-thin">
4
+ <p class="p-big">
5
+ {{leftover.type}} #{{leftover._id}} {{leftover.organization}}
6
+ </p>
7
+ <IconEdit
8
+ @click="$router.push({
9
+ name: 'LeftoverEdit',
10
+ params: {
11
+ _id: leftover.organization,
12
+ leftover: leftover._id
13
+ }
14
+ })"
15
+ class="pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
16
+ />
25
17
  </div>
26
18
 
27
19
  <div class="w-100 spoiler">
@@ -85,6 +77,9 @@
85
77
  &:first-of-type { padding-top: 0;}
86
78
  }
87
79
 
80
+ .spoiler-active {
81
+ transform: rotate(180deg);
82
+ }
88
83
  </style>
89
84
 
90
85
 
@@ -1,81 +1,128 @@
1
1
  <template>
2
- <SelectMulti
3
- v-model="product"
4
- :options="products"
5
- label="name"
6
- :multiple="false"
7
- :taggable="false"
8
- placeholder="Select a product"
9
- class="bg-grey pd-medium radius-small"
10
- />
11
- <Field
12
- v-model:field="productPrice"
13
- type="number"
14
- label="Price"
15
- :symbol="returnCurrency()"
16
- class="bg-grey pd-medium radius-small"
17
- />
18
- <Field
19
- v-model:field="productQuantity"
20
- type="number"
21
- label="Quantity"
22
- class="bg-grey pd-medium radius-small"
23
- >
24
- <Select
25
- v-model:select="productQuantityType"
26
- :options="[
27
- 'pcs',
28
- 'g',
29
- 'ml'
30
- ]"
31
- class="bg-white pd-thin radius-thin"
32
- />
33
-
34
- </Field>
35
-
36
- <button
37
- :disabled="!isProductValid"
38
- @click="addProduct"
39
- class="bg-main button"
40
- >
41
- Add
42
- </button>
2
+ <div class="gap-thin flex-nowrap flex">
3
+ <SelectMulti
4
+ v-model="productSelected"
5
+ :options="products"
6
+ label="name"
7
+ :multiple="false"
8
+ :taggable="false"
9
+ placeholder="Select a product"
10
+ class="bg-white h-100 pd-small radius-small"
11
+ />
12
+ <Field
13
+ v-model:field="productPrice"
14
+ type="number"
15
+ label="Price"
16
+ :symbol="returnCurrency()"
17
+ class="bg-white pd-small radius-small"
18
+ />
19
+ <Field
20
+ v-model:field="productQuantity"
21
+ type="number"
22
+ label="Quantity"
23
+ class="bg-white pd-small radius-small"
24
+ >
25
+ <Select
26
+ v-model:select="productQuantityType"
27
+ :options="[
28
+ 'pcs',
29
+ 'g',
30
+ 'ml'
31
+ ]"
32
+ class="bg-grey pd-thin radius-thin"
33
+ />
34
+
35
+ </Field>
36
+
37
+ <button
38
+ v-if="!product"
39
+ :disabled="!isProductValid"
40
+ @click="addProduct"
41
+ class="bg-main aspect-1x1 radius-small pd-small"
42
+ >
43
+ <IconAdd class="i-semi"/>
44
+ </button>
45
+
46
+ <button
47
+ v-if="product"
48
+ @click="deleteProduct"
49
+ class="bg-red aspect-1x1 radius-small pd-small"
50
+ >
51
+ <IconDelete class="i-semi"/>
52
+ </button>
53
+ </div>
43
54
  </template>
44
55
 
45
56
  <script setup>
46
- import { ref, computed } from 'vue';
57
+ import { ref, computed, watch } from 'vue';
47
58
 
48
59
  import Field from '@pf/src/components/Field/Field.vue';
49
60
  import Select from '@pf/src/components/Select/Select.vue';
50
61
  import SelectMulti from '@pf/src/components/SelectMulti/SelectMulti.vue';
51
62
 
63
+ import { IconAdd, IconDelete} from '@pf/src/modules/icons/icons.client.js';
64
+
52
65
  const props = defineProps({
53
66
  product: Object,
67
+ array: Array,
54
68
  products: Array,
55
- quantity: Number,
56
- type: String,
57
- price: Number,
58
69
  });
59
70
 
60
71
  const emits = defineEmits([
61
72
  'add',
62
- 'remove'
73
+ 'delete',
74
+ 'update'
63
75
  ])
64
76
 
65
- const product = ref(null);
77
+ const productSelected = ref(null);
66
78
  const productQuantity = ref(null);
67
79
  const productQuantityType = ref('pcs');
68
80
  const productPrice = ref(null);
69
81
 
70
82
  const isProductValid = computed(() =>
71
- product.value
83
+ productSelected.value
72
84
  && productQuantity.value > 0
73
85
  && productPrice.value > 0
74
86
  );
75
87
 
88
+ watch(props.array, () => {
89
+ productSelected.value = props.product
90
+ productQuantity.value = props.product.quantity
91
+ productPrice.value = props.product.price
92
+ productQuantityType.value = props.product.type
93
+ });
94
+
95
+ if (props.product) {
96
+ productSelected.value = props.product
97
+ productQuantity.value = props.product.quantity
98
+ productPrice.value = props.product.price
99
+ productQuantityType.value = props.product.type
100
+ }
101
+
102
+
103
+
104
+ watch([productSelected, productQuantity, productPrice, productQuantityType], () => {
105
+ emits('update', {
106
+ ...productSelected.value,
107
+ price: productPrice.value,
108
+ quantity: productQuantity.value,
109
+ type: productQuantityType.value
110
+ });
111
+ });
112
+
113
+
76
114
  function addProduct() {
77
115
  emits('add', {
78
- product: product.value,
116
+ ...productSelected.value,
117
+ price: productPrice.value,
118
+ quantity: productQuantity.value,
119
+ type: productQuantityType.value
120
+ });
121
+ }
122
+
123
+ function deleteProduct() {
124
+ emits('delete', {
125
+ ...productSelected.value,
79
126
  price: productPrice.value,
80
127
  quantity: productQuantity.value,
81
128
  type: productQuantityType.value
@@ -2,7 +2,8 @@
2
2
  <div
3
3
  class="
4
4
  radius-big
5
- product
5
+ cols-1
6
+ o-hidden
6
7
  "
7
8
  :class="
8
9
  product.information[2]
@@ -15,7 +16,7 @@
15
16
  <!-- Product Image Sqaure -->
16
17
 
17
18
  <div
18
- class="o-hidden w-100 h-100 square"
19
+ class="o-hidden w-100 pos-relative aspect-1x1"
19
20
  :class="
20
21
  product.information[2]
21
22
  && product.information[2].value === 'AAAA'
@@ -23,37 +24,25 @@
23
24
  : 'bg-white'
24
25
  "
25
26
  >
27
+
26
28
  <!-- Image Wrappers -->
27
- <img v-if="product.images[0]" :src="(FILE_SERVER_URL || '') + product.images[0]" class="w-100 h-100">
29
+ <img
30
+ v-if="product.images[0]"
31
+ :src="(FILE_SERVER_URL || '') + product.images[0]"
32
+ class="pos-absolute object-fit-cover h-max-100 w-100"
33
+ >
28
34
 
29
- <svg
35
+ <PlaceholderImage
30
36
  v-else
31
- class="h-100 w-100"
32
- style="object-fit: cover;"
33
- width="524"
34
- height="345"
35
- viewBox="0 0 524 345"
36
- fill="none"
37
- xmlns="http://www.w3.org/2000/svg"
38
- >
39
- <rect width="524" height="345" fill="white"/>
40
- <rect width="524" height="345" fill="white" />
41
- <circle cx="262" cy="172" r="56" fill="#00ff88" fill-opacity="0.1"/>
42
- <path
43
- fill="#00ff88"
44
- d="M229.348 186.819C230.243 191.884 233.393 194.231 238.458 193.273V193.644C238.458 198.832 241.206 201.581 246.364 201.581H291.545C296.733 201.581 299.481 198.74 299.481 193.644V162.576C299.481 157.481 296.733 154.64 291.545 154.64H285.677L284.071 145.653C283.175 140.619 279.995 138.303 274.899 139.198L230.398 147.043C225.302 147.969 223.048 151.15 223.943 156.246L229.348 186.819ZM230.83 186.479L225.456 156.06C224.715 151.86 226.537 149.266 230.737 148.525L275.084 140.712C279.13 140.001 281.848 141.762 282.62 145.993L284.102 154.64H246.364C241.206 154.64 238.458 157.419 238.458 162.576V191.729L238.365 191.76C234.165 192.532 231.571 190.679 230.83 186.479ZM239.971 162.669C239.971 158.376 242.164 156.153 246.456 156.153H291.483C295.59 156.153 297.968 158.376 297.968 162.669V190.093L284.565 177.894C283.145 176.597 281.662 175.856 279.809 175.856C277.987 175.856 276.628 176.566 275.146 177.863L262.052 189.073L257.142 184.565C255.875 183.36 254.764 182.743 253.158 182.743C251.675 182.743 250.656 183.36 249.39 184.503L239.971 193.212V162.669ZM257.636 178.419C261.373 178.419 264.43 175.3 264.43 171.471C264.43 167.734 261.373 164.584 257.636 164.584C253.806 164.584 250.718 167.734 250.718 171.471C250.718 175.3 253.806 178.419 257.636 178.419Z"
45
- />
46
- </svg>
37
+ class="pos-absolute h-100 w-100"
38
+ />
47
39
  <!-- THC -->
48
- <THC v-if="product.information.length > 0" :product="product" />
49
- <!-- Addiotional text (UNSUED) -->
50
- <!-- <p v-if="product.quantity < 1 && product.modifications.length < 1" class=" p-small sizes">Нет в наличии</p> -->
40
+ <THC v-if="product.information.length > 0" :product="product" />
51
41
  </div>
52
42
 
53
43
  <!-- Product Info Start -->
54
44
  <div class="pd-medium t-left product-card-content">
55
- <!-- Name -->
56
-
45
+ <!-- Detail -->
57
46
  <p
58
47
  v-if="product.information.length > 0"
59
48
  class="t-semi h6"
@@ -66,9 +55,15 @@
66
55
  >
67
56
  {{product.information[0].value}}
68
57
  </p>
69
- <p class="mn-b-thin h4">{{product.name}}</p>
58
+ <!-- Name -->
59
+ <p class="mn-b-thin t-semi h4">
60
+ {{product.name}}
61
+ </p>
70
62
 
71
- <p v-if="product.description && !product.localization" class="mn-b-small t-transp p-small">
63
+ <p
64
+ v-if="product.description && !product.localization"
65
+ class="mn-b-small t-transp p-small"
66
+ >
72
67
  {{product.description.substring(0, 99)}}...
73
68
  </p>
74
69
 
@@ -87,12 +82,7 @@
87
82
  : ''
88
83
  "
89
84
  />
90
- <!-- Price -->
91
-
92
85
  </div>
93
- <!-- Product Info End -->
94
- <div>
95
- </div>
96
86
 
97
87
  </div>
98
88
 
@@ -106,6 +96,8 @@
106
96
  import THC from '@pf/src/modules/products/components/elements/THC.vue'
107
97
  import Price from '@pf/src/modules/products/components/elements/Price.vue'
108
98
 
99
+ import PlaceholderImage from '@pf/src/modules/icons/placeholders/PlaceholderImage.vue'
100
+
109
101
  const props = defineProps(['product'])
110
102
 
111
103
  const { t } = useI18n()
@@ -113,27 +105,6 @@
113
105
 
114
106
  <style lang="scss">
115
107
 
116
- .product {
117
- display: flex;
118
- flex-direction: column;
119
- overflow: hidden;
120
- transform: scale(1);
121
-
122
- transition: all 0.33s ease;
123
-
124
- &:hover {
125
- cursor: pointer;
126
- // background: #f7f7f7 !important;
127
- // border: 1px solid #00ff88 !important;
128
- box-shadow: 0px 32px 96px -4px rgba(0,0,0, 0.05) !important;
129
- // .h5, .price { color: #00ff88 !important; }
130
- transform: scale(1.02);
131
- }
132
-
133
- &:active {
134
- transform: scale(0.99);
135
- }
136
- }
137
108
  </style>
138
109
 
139
110
 
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <div class="product-360-viewer">
3
3
  <svg class="pos-absolute z-index-2 pos-b-0 pd-small" width="73" height="50" viewBox="0 0 73 50" fill="none" xmlns="http://www.w3.org/2000/svg">
4
- <path d="M42.5934 17.2017C42.5934 20.8208 39.8428 23.7544 36.45 23.7544C33.0573 23.7544 30.3066 20.8208 30.3066 17.2017C30.3066 13.5826 33.0573 10.6484 36.45 10.6484C39.8428 10.6484 42.5934 13.5826 42.5934 17.2017Z" fill="black" fill-opacity="0.1"/>
5
- <path d="M22.5953 29.4883H50.3053C53.7389 29.4883 56.5197 26.778 56.5197 23.4405V10.8396C56.5197 7.49996 53.739 4.79176 50.3053 4.79176H48.8712C48.2747 2.05313 45.7826 0 42.7962 0H30.1063C27.1179 0 24.6257 2.053 24.0313 4.78967H22.5971C19.1656 4.78967 16.3828 7.49788 16.3828 10.8375V23.4384C16.3807 26.778 19.1634 29.4882 22.595 29.4882L22.5953 29.4883ZM36.449 8.31471C41.4535 8.31471 45.5123 12.2648 45.5123 17.1352C45.5123 22.0062 41.4535 25.9582 36.449 25.9582C31.4445 25.9582 27.3856 22.0081 27.3856 17.1377C27.3856 12.2673 31.4445 8.31471 36.449 8.31471ZM20.9092 9.32597H24.0182C24.9472 9.32597 25.7019 10.0584 25.7019 10.9625C25.7019 11.8686 24.9493 12.6011 24.0182 12.6011H20.9092C19.9823 12.6011 19.2254 11.8707 19.2254 10.9625C19.2275 10.0604 19.9822 9.32597 20.9092 9.32597Z" fill="black" fill-opacity="0.1"/>
6
- <path d="M58.8645 12.2878C58.8645 12.2878 77.1839 21.8549 65.5604 32.0445C63.6718 33.6967 55.2747 38.9138 42.5947 39.9368V45.0519C50.0424 44.2514 61.7635 41.887 68.4037 34.9253C82.5323 20.1097 58.8657 12.2871 58.8657 12.2871L58.8645 12.2878Z" fill="black" fill-opacity="0.1"/>
7
- <path d="M37.6664 41.209L29.1818 35.5097C28.077 34.7658 27.1702 35.2358 27.1702 36.5516V39.5855C16.2598 38.0408 9.07761 33.565 7.35125 32.0517C-4.2894 21.858 14.0557 12.2871 14.0557 12.2871C14.0557 12.2871 -9.64257 20.1134 4.5039 34.9343C10.2723 40.9769 19.8619 43.5552 27.1712 44.656V44.952V48.5701C27.1712 49.8901 28.078 50.3554 29.1827 49.6141L37.6673 43.9127C38.7757 43.1683 38.7757 41.9525 37.6673 41.2092L37.6664 41.209Z" fill="black" fill-opacity="0.1"/>
4
+ <path d="M42.5934 17.2017C42.5934 20.8208 39.8428 23.7544 36.45 23.7544C33.0573 23.7544 30.3066 20.8208 30.3066 17.2017C30.3066 13.5826 33.0573 10.6484 36.45 10.6484C39.8428 10.6484 42.5934 13.5826 42.5934 17.2017Z" fill="rgb(var(--black))" fill-opacity="0.1"/>
5
+ <path d="M22.5953 29.4883H50.3053C53.7389 29.4883 56.5197 26.778 56.5197 23.4405V10.8396C56.5197 7.49996 53.739 4.79176 50.3053 4.79176H48.8712C48.2747 2.05313 45.7826 0 42.7962 0H30.1063C27.1179 0 24.6257 2.053 24.0313 4.78967H22.5971C19.1656 4.78967 16.3828 7.49788 16.3828 10.8375V23.4384C16.3807 26.778 19.1634 29.4882 22.595 29.4882L22.5953 29.4883ZM36.449 8.31471C41.4535 8.31471 45.5123 12.2648 45.5123 17.1352C45.5123 22.0062 41.4535 25.9582 36.449 25.9582C31.4445 25.9582 27.3856 22.0081 27.3856 17.1377C27.3856 12.2673 31.4445 8.31471 36.449 8.31471ZM20.9092 9.32597H24.0182C24.9472 9.32597 25.7019 10.0584 25.7019 10.9625C25.7019 11.8686 24.9493 12.6011 24.0182 12.6011H20.9092C19.9823 12.6011 19.2254 11.8707 19.2254 10.9625C19.2275 10.0604 19.9822 9.32597 20.9092 9.32597Z" fill="rgb(var(--black))" fill-opacity="0.1"/>
6
+ <path d="M58.8645 12.2878C58.8645 12.2878 77.1839 21.8549 65.5604 32.0445C63.6718 33.6967 55.2747 38.9138 42.5947 39.9368V45.0519C50.0424 44.2514 61.7635 41.887 68.4037 34.9253C82.5323 20.1097 58.8657 12.2871 58.8657 12.2871L58.8645 12.2878Z" fill="rgb(var(--black))" fill-opacity="0.1"/>
7
+ <path d="M37.6664 41.209L29.1818 35.5097C28.077 34.7658 27.1702 35.2358 27.1702 36.5516V39.5855C16.2598 38.0408 9.07761 33.565 7.35125 32.0517C-4.2894 21.858 14.0557 12.2871 14.0557 12.2871C14.0557 12.2871 -9.64257 20.1134 4.5039 34.9343C10.2723 40.9769 19.8619 43.5552 27.1712 44.656V44.952V48.5701C27.1712 49.8901 28.078 50.3554 29.1827 49.6141L37.6673 43.9127C38.7757 43.1683 38.7757 41.9525 37.6673 41.2092L37.6664 41.209Z" fill="rgb(var(--black))" fill-opacity="0.1"/>
8
8
  </svg>
9
9
 
10
10