@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,128 +1,261 @@
1
1
  <template>
2
- <div class="for-transition w-100">
2
+ <div class="for-transition w-100 cols-1 pd-thin gap-thin">
3
3
 
4
- <div class="pd-b-zero pd-t-zero pd-thin">
5
- <Breadcrumbs class="pd-medium bg-grey radius-big"/>
6
- </div>
7
-
8
- <div class="pd-thin">
9
- <header class="flex-nowrap flex bg-grey pd-medium radius-big">
10
- <h1 v-if="route.params.product" class="mn-r-auto">Edit Product</h1>
11
- <h1 v-else class="mn-r-auto">Create Product</h1>
12
-
13
- <section class="flex-nowrap flex pd-thin">
14
- <Button :submit="onSubmit" :callback="redirectTo">Save Product</Button>
15
- </section>
16
-
17
- </header>
18
- </div>
19
-
20
- <div class="pd-b-zero pd-t-zero pd-thin cols-2 gap-thin">
21
-
22
- <div class="mn-b-thin bg-grey pd-medium o-hidden radius-big">
23
- <h3 class="mn-b-semi">Profile</h3>
4
+ <Block class="flex-nowrap flex-v-center flex">
5
+
6
+ <h1 class="mn-r-auto">
7
+ {{ route.params.product ? products.state.current.name : 'Create Product' }}
8
+ </h1>
9
+
10
+ <Button
11
+ v-if="route.params.product"
12
+ :submit="onDelete"
13
+ :callback="redirectTo"
14
+ class="bg-red mn-r-thin"
15
+ >
16
+ Delete
17
+ </Button>
18
+
19
+ <Button
20
+ :submit="onSubmit"
21
+ :callback="redirectTo"
22
+ class="bg-main"
23
+ >
24
+ Save
25
+ </Button>
26
+ </Block>
27
+
28
+ <Block
29
+ placeholder="The product doesn't have any images yet."
30
+ class="h-min"
31
+ >
32
+ <EditImages
33
+ :images="products.state.current.images"
34
+ :uploadPath="'photos'"
35
+ @update:images="(imagesNew) => { products.state.current.images = imagesNew }"
36
+ />
37
+ </Block>
38
+
39
+ <div class="cols-2 gap-thin">
40
+
41
+ <Block
42
+ title="Profile"
43
+ >
24
44
  <EditProductInfo
25
45
  :product="products.state.current"
26
46
  />
27
- <div class="mn-b-semi">
28
- <h5>Categories</h5>
29
- <Checkbox
30
- v-for="(category, index) in categories.state.all"
31
- :label="category.name"
32
- name="categories"
33
- :value="category.url"
34
- class="w-100 mn-t-small bg-white radius-small pd-small"
35
- :radio="products.state.current.category"
36
- />
47
+ </Block>
48
+
49
+ <Block
50
+ title="Categories"
51
+ >
52
+ <Checkbox
53
+ v-for="(category, index) in categories.state.all"
54
+ :label="category.name"
55
+ name="categories"
56
+ :value="category.url"
57
+ class="w-100 mn-t-small bg-white radius-small pd-small"
58
+ :radio="products.state.current.category"
59
+ @update:radio="event => products.state.current.category = event"
60
+ />
61
+ </Block>
62
+
63
+ <Block
64
+ title="Parameters"
65
+ placeholder="No parameters added yet"
66
+ :actions="[{
67
+ label: '+',
68
+ function: () => products.state.current.information.push({name: '', value: ''})
69
+ }]"
70
+ class="cols-1 gap-thin"
71
+ >
72
+ <div
73
+ class="gap-thin flex-nowrap flex"
74
+ v-for="(item, index) in products.state.current.information"
75
+ :key="index"
76
+ >
77
+ <Field
78
+ v-model:field="item.name"
79
+ placeholder="Название параметра"
80
+ class="w-100 bg-white radius-small pd-medium"
81
+ />
82
+ <Field
83
+ v-model:field="item.value"
84
+ placeholder="Значение параметра"
85
+ class="w-100 bg-white radius-small pd-medium"
86
+ />
87
+ <div class="radius-small h-100 i-big flex-center flex aspect-1x1 bg-red">
88
+ <IconDelete
89
+ @click="() => products.state.current.information.splice(index, 1)"
90
+ class="i-medium"
91
+ />
92
+ </div>
37
93
  </div>
38
- <EditParameters
39
- :items="products.state.current.information"
40
- title="Parameters"
41
- emptyMessage="No parameters"
42
- addButtonLabel="Add parameter"
43
- keyName="name"
44
- valueName="value"
45
- @add-info="addInfo"
46
- @delete-info="deleteInfo"
47
- />
48
- <EditParameters
49
- :items="products.state.current.localization"
50
- title="Localization"
51
- emptyMessage="No localizations"
52
- addButtonLabel="Add localization"
53
- keyName="locale"
54
- valueName="text"
55
- @add-info="addLocale"
56
- @delete-info="deleteLocale"
57
- />
58
-
59
-
60
- </div>
61
-
62
- <div class="">
63
- <div class="mn-b-thin bg-grey pd-medium o-hidden radius-big">
64
- <h3 class="mn-b-semi">Images</h3>
65
- <EditProductImages
66
- :product="products.state.current"
67
- />
68
- </div>
69
- </div>
70
-
94
+ </Block>
95
+
96
+ <Block
97
+ title="Localization"
98
+ placeholder="No localizations added yet"
99
+ :actions="[{
100
+ label: '+',
101
+ function: () => products.state.current.localization.push({name: '', value: ''})
102
+ }]"
103
+ >
104
+ <div
105
+ class="gap-thin mn-b-thin flex-nowrap flex"
106
+ v-for="(item, index) in products.state.current.localization"
107
+ :key="index"
108
+ >
109
+ <Field
110
+ v-model:field="item.name"
111
+ placeholder="Название параметра"
112
+ class="w-100 bg-white radius-small pd-medium"
113
+ />
114
+ <Field
115
+ v-model:field="item.value"
116
+ placeholder="Значение параметра"
117
+ class="w-100 bg-white radius-small pd-medium"
118
+ />
119
+ <div class="radius-small pd-small flex-center flex aspect-1x1 bg-red">
120
+ <IconDelete
121
+ @click="() => products.state.current.localization.splice(index, 1)"
122
+ class="i-medium"
123
+ />
124
+ </div>
125
+ </div>
126
+ </Block>
127
+
71
128
  </div>
129
+
130
+ <Block
131
+ title="Quantity Discount"
132
+ class="mn-b-semi"
133
+ :actions="[{
134
+ label: '+',
135
+ function: () => products.state.current.quantityDiscount.push({name: '', value: ''})
136
+ }]"
137
+ >
138
+ <div
139
+ class="gap-thin mn-b-thin flex-nowrap flex"
140
+ v-for="(item, index) in products.state.current.quantityDiscount"
141
+ :key="index"
142
+ >
143
+ <Field
144
+ v-model:field="item.name"
145
+ placeholder="Quantity"
146
+ class="w-100 bg-white radius-small pd-medium"
147
+ />
148
+ <Field
149
+ v-model:field="item.value"
150
+ placeholder="Discount"
151
+ class="w-100 bg-white radius-small pd-medium"
152
+ />
153
+ <div class="radius-small pd-small flex-center flex aspect-1x1 bg-red">
154
+ <IconDelete
155
+ @click="() => products.state.current.quantityDiscount.splice(index, 1)"
156
+ class="i-medium"
157
+ />
158
+ </div>
159
+ </div>
160
+ </Block>
161
+
162
+ <!-- <EditModifications
163
+ :product="products.state.current"
164
+ /> -->
165
+
166
+ <Block
167
+ title="Add Ingridient"
168
+ class="mn-b-semi"
169
+ >
170
+ <CardPosition
171
+ @add="(item) => globals.actions.add(
172
+ products.state.current.ingridients,
173
+ item
174
+ )"
175
+ :products="Products"
176
+ />
177
+
178
+ <Block
179
+ placeholder="No positions added yet"
180
+ class="pd-zero mn-b-semi"
181
+ >
182
+ <CardPosition
183
+ v-for="(product, index) in products.state.current.ingridients"
184
+ :key="product._id"
185
+ :product="product"
186
+ :array="products.state.current.ingridients"
187
+ :products="Products"
188
+ @add="(item) => globals.actions.add(
189
+ products.state.current.ingridients,
190
+ item
191
+ )"
192
+ @update="(item) => globals.actions.update(
193
+ products.state.current.ingridients,
194
+ item,
195
+ index
196
+ )"
197
+ @delete="(item) => globals.actions.delete(
198
+ products.state.current.ingridients,
199
+ item,
200
+ index
201
+ )"
202
+ />
203
+ </Block>
204
+ </Block>
205
+
72
206
  </div>
73
207
 
74
208
  </template>
75
209
 
76
210
  <script setup>
77
211
  // Import libs
78
- import { reactive, computed, onMounted, toRefs } from 'vue'
212
+ import { reactive, computed, onMounted, ref } from 'vue'
79
213
  import { useRoute, useRouter } from 'vue-router'
80
214
  // Import components
81
215
  import Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'
82
216
 
217
+ import Block from '@pf/src/components/Block/Block.vue';
83
218
  import Tab from "@pf/src/components/Tab/Tab.vue";
84
219
  import Field from "@pf/src/components/Field/Field.vue";
85
220
  import Select from "@pf/src/components/Select/Select.vue";
86
221
  import Checkbox from "@pf/src/components/Checkbox/Checkbox.vue";
87
222
  import Button from "@pf/src/components/Button/Button.vue";
88
223
  import Popup from "@pf/src/components/Popup/Popup.vue";
224
+ import EditImages from '@pf/src/components/EditImages/EditImages.vue';
225
+
226
+ import IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue';
227
+
228
+ import CardPosition from '@pf/src/modules/products/components/blocks/CardPosition.vue';
229
+
89
230
 
90
231
  import EditProductInfo from '@pf/src/modules/products/components/sections/EditProductInfo.vue';
91
- import EditCategories from '@pf/src/modules/products/components/blocks/EditCategories.vue'
92
- import EditParameters from '@pf/src/modules/products/components/sections/EditParameters.vue';
93
- import EditProductImages from '@pf/src/modules/products/components/sections/EditProductImages.vue';
94
232
  import EditModifications from '@pf/src/modules/products/components/sections/EditModifications.vue';
95
233
 
96
234
  // Accessing router and store
235
+ import * as globals from '@pf/src/modules/globals/store/globals';
97
236
  import * as products from '@pf/src/modules/products/store/products';
98
237
  import * as categories from '@pf/src/modules/products/store/categories';
99
238
 
100
239
  const route = useRoute()
101
240
  const router = useRouter()
102
241
 
242
+ const Products = ref(products.state.all);
243
+
244
+ onMounted(async() => {
245
+
103
246
  // Data prefetching
104
- await categories.actions.fetchCategories()
105
-
106
- if (route.params.product) {
107
- await products.actions.read({ _id: route.params.product });
108
- } else {
109
- // await commit('products/clearProductState')
110
- }
111
- // Accessing state
112
- function addInfo() {
113
- products.state.current.information.push({name: '', value: ''});
114
- }
247
+ await categories.actions.fetchCategories()
115
248
 
116
- function deleteInfo(index) {
117
- products.state.current.information.splice(index, 1);
118
- }
249
+ if (route.params.product) {
250
+ await products.actions.read({ _id: route.params.product });
251
+ } else {
252
+ // await commit('products/clearProductState')
253
+ }
119
254
 
120
- function addLocale() {
121
- products.state.current.localization.push({locale: '', text: ''});
122
- }
255
+ })
123
256
 
124
- function deleteLocale(index) {
125
- products.state.current.localization.splice(index, 1);
257
+ function onImagesUpdate(newImages) {
258
+ products.state.current.images = newImages;
126
259
  }
127
260
 
128
261
  function onSubmit() {
@@ -133,8 +266,17 @@
133
266
  }
134
267
  }
135
268
 
269
+ function onDelete() {
270
+ products.actions.deleteProduct(products.state.current._id)
271
+ }
272
+
136
273
  function redirectTo () {
137
- router.push({name: 'ProductEdit', params: { _id: route.params._id, product: products.state.current._id } })
274
+ router.push({
275
+ name: 'Organization',
276
+ params: {
277
+ _id: route.params._id
278
+ }
279
+ })
138
280
  }
139
281
  </script>
140
282
 
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div id="product-recommendation" class="min-h-100vh t-white bg-black">
2
+ <div id="product-recommendation" class="h-min-100vh t-white bg-black">
3
3
  <Loader v-if="loading" :status="loadingText" class="pos-fixed"/>
4
4
 
5
5
  <div v-if="!loading && !showInput" class="section">
@@ -1,9 +1,8 @@
1
1
  <template>
2
- <div class="cols-2-1_3 gap-thin pd-thin">
2
+ <div class="cols-2-1_3 bg-grey radius-big gap-thin pd-thin">
3
3
  <FilterProducts
4
4
 
5
5
  />
6
-
7
6
  <Feed
8
7
  :states="{
9
8
  empty: {
@@ -18,11 +17,15 @@
18
17
  :options="{
19
18
  limit: 15,
20
19
  organization: route.params._id,
20
+ categories: route.query.categories,
21
+ prices: route.query.prices,
22
+ delivery: route.query.delivery,
21
23
  // user: user
22
24
  }"
23
25
  v-slot="{
24
26
  items
25
27
  }"
28
+ class="cols-3 gap-thin"
26
29
  >
27
30
  <CardProduct
28
31
  v-for="product in items"
@@ -51,7 +54,7 @@
51
54
  // Import components
52
55
  import FilterProducts from '@pf/src/modules/products/components/sections/FilterProducts.vue'
53
56
 
54
- import Feed from '@pf/src/modules/globals/components/sections/Feed.vue'
57
+ import Feed from '@pf/src/components/Feed/Feed.vue'
55
58
  import CardProduct from '@pf/src/modules/products/components/blocks/CardProduct.vue'
56
59
 
57
60
  // Accessing router and store
@@ -5,7 +5,7 @@
5
5
  @click="$router.push({
6
6
  name: 'AddProduct'
7
7
  })"
8
- class="radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second">
8
+ class="radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second">
9
9
  +
10
10
  </button>
11
11
  </header>
@@ -47,10 +47,8 @@
47
47
  :key="product._id"
48
48
  :product="product"
49
49
  @click="$router.push({
50
- name: 'Product Organization',
50
+ name: 'ProductEdit',
51
51
  params: {
52
- _id:
53
- route.params._id,
54
52
  product: product._id
55
53
  }
56
54
  })"
@@ -66,7 +64,7 @@ import { useRoute, useRouter } from 'vue-router'
66
64
  import * as products from '@pf/src/modules/products/store/products' // Путь к вашему стору
67
65
 
68
66
  // Import components
69
- import Feed from '@pf/src/modules/globals/components/sections/Feed.vue'
67
+ import Feed from '@pf/src/components/Feed/Feed.vue'
70
68
  import CardProduct from '@pf/src/modules/products/components/blocks/CardProduct.vue'
71
69
  import Tab from '@pf/src/components/Tab/Tab.vue'
72
70
 
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div>
3
- <!-- <p v-if="product.modifications.length == 0" class="mn-b-small w-100">У продукта еще не заданы модификации.</p> -->
3
+ <p v-if="product.modifications.length == 0" class="mn-b-small w-100">У продукта еще не заданы модификации.</p>
4
4
 
5
5
  <!-- Modification Info -->
6
6
  <div class="mn-b-small flex-column flex-wrap block" v-for="(modification, index) in product.modifications" :key="index">
@@ -20,7 +20,7 @@
20
20
  <button @click="deleteModification(index)" class="mn-l-small i-normal pd-regular button-delete button">
21
21
  <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
22
22
  <rect width="24" height="24" transform="translate(1 1)" />
23
- <path fill-rule="evenodd" clip-rule="evenodd" d="M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z" fill="white"/>
23
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z" fill="rgb(var(--white))"/>
24
24
  </svg>
25
25
 
26
26
  </button>
@@ -41,7 +41,7 @@
41
41
  <button @click="deleteCharacteristic(index, index2)" class="mn-l-small i-normal pd-regular button-delete button">
42
42
  <svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
43
43
  <rect width="24" height="24" transform="translate(1 1)" />
44
- <path fill-rule="evenodd" clip-rule="evenodd" d="M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z" fill="white"/>
44
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z" fill="rgb(var(--white))"/>
45
45
  </svg>
46
46
 
47
47
  </button>
@@ -1,70 +1,60 @@
1
1
  <template>
2
- <div class="mn-b-big flex-column flex">
3
- <!-- {{
4
- store.products.current
5
- }}
2
+ <Select
3
+ v-model:select="product.status"
4
+ label="Status"
5
+ :options="[
6
+ 'unpublished',
7
+ 'published',
8
+ 'archivied'
9
+ ]"
10
+
11
+ placeholder="Display product"
12
+ class="pos-relative w-100 mn-b-small bg-white radius-small pd-medium"
13
+ />
14
+
15
+ <Field
16
+ v-model:field="product.name"
17
+ label="Name"
18
+ placeholder="Введите название"
19
+ class="w-100 mn-b-small bg-white radius-small pd-medium"
20
+ />
21
+ <Field
22
+ v-model:field="product.price"
23
+ label="Price"
24
+ placeholder="Введите цену"
25
+ class="w-100 mn-b-small bg-white radius-small pd-medium"
26
+ type="number"
27
+ >
6
28
  <Select
29
+ v-model:select="product.price.currency"
30
+ placeholder="฿"
7
31
  :options="[
8
- 'unpublished',
9
- 'published',
10
- 'archivied'
32
+ '฿'
11
33
  ]"
12
- v-model:select="store.products.state.current.status"
13
- placeholder="Display product"
14
- class="w-100 mn-b-small bg-white radius-small pd-medium"
34
+ class="pos-relative bg-grey pd-thin radius-thin"
15
35
  />
36
+ </Field>
16
37
 
17
- <Field
18
- v-model:field="store.products.state.current.name"
19
- placeholder="Введите название"
20
- class="w-100 mn-b-small bg-white radius-small pd-medium"
21
- />
22
- <Field
23
- v-model:field="store.products.state.current.price"
24
- placeholder="Введите цену"
25
- class="w-100 mn-b-small bg-white radius-small pd-medium"
26
- type="number"
27
- />
28
38
 
29
- <Field
30
- v-model:field="store.products.state.current.description"
31
- placeholder="Введите описание"
32
- class="w-100 mn-b-small bg-white radius-small pd-medium"
33
- type="textarea"
34
- /> -->
35
- </div>
39
+ <Field
40
+ v-model:field="product.description"
41
+ label="Description"
42
+ placeholder="Введите описание"
43
+ class="w-100 bg-white radius-small pd-medium"
44
+ type="textarea"
45
+ />
36
46
  </template>
37
47
 
38
- <script setup="props">
39
- import Button from '@pf/src/components/Button/Button.vue'
48
+ <script setup>
40
49
 
50
+ import Button from '@pf/src/components/Button/Button.vue'
41
51
  import Field from "@pf/src/components/Field/Field.vue";
42
52
  import Select from "@pf/src/components/Select/Select.vue";
43
53
 
44
- /////////////////////////////
45
- // COMPONENT DEPENDENCIES
46
- /////////////////////////////
47
- import { toRefs } from 'vue';
48
- // import { useStore } from "vuex";
49
- /////////////////////////////
50
- // HELPERS
51
- /////////////////////////////
52
- function functionReload () {
53
- location.reload()
54
- }
55
54
 
56
- /////////////////////////////
57
- // CREATED
58
- /////////////////////////////
59
55
  const props = defineProps({
60
56
  product: Object,
61
57
  });
62
-
63
- const { product } = toRefs(props);
64
-
65
- /////////////////////////////
66
- // MOUNTED
67
- /////////////////////////////
68
58
  </script>
69
59
 
70
60
  <style lang="scss">