@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,111 +1,98 @@
1
1
  <template>
2
- <div class="for-transition w-100">
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.spot" class="mn-r-auto">Edit Spot</h1>
11
- <h1 v-else class="mn-r-auto">Create Spot</h1>
2
+ <div class="for-transition w-100 cols-1 pd-thin gap-thin">
12
3
 
13
- <section class="flex-nowrap flex pd-thin">
14
- <Button :submit="onSubmit" :callback="redirectTo">Save Spot</Button>
15
- </section>
16
4
 
17
- </header>
18
- </div>
19
-
20
- <div class="pd-b-zero pd-t-zero pd-thin cols-2 gap-thin">
5
+ <Block class="flex-nowrap flex-v-center flex">
6
+
7
+ <h1 class="mn-r-auto">
8
+ {{ route.params.spot ? spots.state.spot.profile.name : 'Create Spot' }}
9
+ </h1>
10
+
11
+ <Button
12
+ :submit="onSubmit"
13
+ :callback="redirectTo"
14
+ class="bg-main"
15
+ >
16
+ Save Spot
17
+ </Button>
18
+ </Block>
21
19
 
22
- <div class="flex-stretch flex-column flex">
23
20
 
24
- <div class="mn-b-thin bg-grey pd-medium o-hidden radius-big">
25
- <h3 class="mn-b-semi">Profile</h3>
26
-
27
- <div class="radius-small flex-nowrap flex">
28
- <UploadImage
29
- v-model:photo="spots.state.spot.profile.photo"
30
- :uploadPath="'organizations/' + spots.state.spot.name + '/avatars'"
31
- class="w-8r aspect-1x1 o-hidden mn-r-small radius-extra"
21
+ <div class="cols-2 gap-thin">
22
+
23
+ <Block
24
+ title="Profile"
25
+ class="mn-b-semi"
26
+ >
27
+
28
+
29
+
30
+ <div class="gap-small mn-b-small cols-2-fit-content">
31
+ <UploadImage
32
+ v-model:photo="spots.state.spot.profile.photo"
33
+ :uploadPath="'organizations/' + spots.state.spot.name + '/avatars'"
34
+ class="aspect-1x1 w-8r o-hidden radius-extra"
35
+ />
36
+
37
+ <div class="w-100">
38
+ <Field
39
+ v-model:field="spots.state.spot.profile.name"
40
+ label="Name"
41
+ placeholder="Spot Name"
42
+ class="mn-b-small bg-white radius-small pd-medium"
43
+ :validation="organizationName"
32
44
  />
33
- <div class="w-100 flex-child-grow-1 flex-child ">
34
- <Field
35
- v-model:field="spots.state.spot.profile.name"
36
- label="Name"
37
- placeholder="Spot Name"
38
- class="mn-b-small bg-white radius-small pd-medium"
39
- :validation="organizationName"
40
- />
41
- <Field
42
- v-model:field="spots.state.spot.profile.description"
43
- label="Description"
44
- placeholder="Spot description (max 120 symbols)"
45
- class="bg-white radius-small pd-medium"
46
- :validation="organizationName"
47
- />
48
- </div>
45
+ <Field
46
+ v-model:field="spots.state.spot.profile.description"
47
+ label="Description"
48
+ placeholder="Spot description (max 120 symbols)"
49
+ class="bg-white radius-small pd-medium"
50
+ :validation="organizationName"
51
+ />
49
52
  </div>
50
53
  </div>
51
54
 
52
- <div class="bg-grey pd-medium o-hidden radius-big">
53
- <h3 class="mn-b-semi">Details</h3>
55
+ <Select
56
+ v-model:select="spots.state.spot.status"
57
+ label="Status"
58
+ :options="[
59
+ 'unpublished',
60
+ 'published',
61
+ 'archivied'
62
+ ]"
63
+ placeholder="Display product"
64
+ class="pos-relative w-100 mn-b-small bg-white radius-small pd-medium"
65
+ />
54
66
 
55
- <p class="p-medium mn-b-small">Please the available delivery options:</p>
56
- <div class="mn-b-medium flex-nowrap flex">
57
- <Checkbox
58
- label="Pickup"
59
- name="Delivery"
60
- value="pickup"
61
- class="w-100 mn-r-small bg-white radius-small pd-small"
62
- :radio="spots.state.spot.delivery"
63
- />
64
- <Checkbox
65
- label="Delivery"
66
- name="Delivery"
67
- value="courier"
68
- class="w-100 mn-r-small bg-white radius-small pd-small"
69
- :radio="spots.state.spot.delivery"
70
- />
71
- <Checkbox
72
- label="Post"
73
- name="Delivery"
74
- value="post"
75
- class="w-100 bg-white radius-small pd-small"
76
- :radio="spots.state.spot.delivery"
77
- />
78
- </div>
67
+ <p class="p-medium mn-b-small">Please the available delivery options:</p>
68
+
69
+ <Checkbox
70
+ v-for="option in ['pickup','courier','post']"
71
+ :label="option"
72
+ name="Delivery"
73
+ :value="option"
74
+ class="w-100 mn-b-small bg-white radius-small pd-small"
75
+ :radio="spots.state.spot.delivery"
76
+ @update:radio="event => spots.state.spot.delivery = event"
77
+ />
79
78
 
80
- <p class="p-medium mn-b-small">Please select the available payment methods:</p>
81
- <div class="flex-nowrap flex">
82
- <Checkbox
83
- label="Cash"
84
- name="Payment"
85
- value="cash"
86
- class="w-100 mn-r-small bg-white radius-small pd-small"
87
- :radio="spots.state.spot.payment"
88
- />
89
- <Checkbox
90
- label="Bank Transfer"
91
- name="Payment"
92
- value="bank"
93
- class="w-100 mn-r-small bg-white radius-small pd-small"
94
- :radio="spots.state.spot.payment"
95
- />
96
- <Checkbox
97
- label="Crypto"
98
- name="Payment"
99
- value="crypto"
100
- class="w-100 bg-white radius-small pd-small"
101
- :radio="spots.state.spot.payment"
102
- />
103
- </div>
104
- </div>
105
- </div>
79
+ <p class="p-medium mn-b-small">Please select the available payment methods:</p>
80
+
81
+ <Checkbox
82
+ v-for="option in ['cash','bank transfer','crypto']"
83
+ :label="option"
84
+ name="Payment"
85
+ :value="option"
86
+ class="w-100 mn-b-small bg-white radius-small pd-small"
87
+ :radio="spots.state.spot.payment"
88
+ @update:radio="event => spots.state.spot.payment = event"
89
+ />
90
+ </Block>
106
91
 
107
- <div class="bg-grey pd-medium o-hidden radius-big">
108
- <h3 class="mn-b-semi">Location</h3>
92
+ <Block
93
+ title="Location"
94
+ class="pos-relative"
95
+ >
109
96
  <Address
110
97
  :apiKey="GOOGLE_MAPS_API_KEY"
111
98
  :address="spots.state.spot.address"
@@ -113,7 +100,7 @@
113
100
  label="Address"
114
101
  placeholder="Enter delivery address"
115
102
  class="
116
- bg-white radius-small pd-small mn-b-small
103
+ bg-white pd-small radius-tl-medium radius-tr-medium
117
104
  "
118
105
  @update:location="newLocation => {
119
106
  spots.state.spot.location = newLocation;
@@ -122,14 +109,13 @@
122
109
  spots.state.spot.address = newAddress;
123
110
  }"
124
111
  />
125
-
126
- <p class="mn-b-small p-medium">Or choose on map:</p>
127
-
128
112
  <LocationMarker
113
+ :apiKey="GOOGLE_MAPS_API_KEY"
114
+
129
115
  :address="spots.state.spot.address"
130
116
  :location="spots.state.spot.location"
131
- :apiKey="GOOGLE_MAPS_API_KEY"
132
- class="radius-big o-hidden"
117
+
118
+ class="h-20r mn-b-small radius-bl-medium radius-br-medium o-hidden"
133
119
  @update:location="newLocation => {
134
120
  spots.state.spot.location = newLocation;
135
121
  }"
@@ -137,86 +123,36 @@
137
123
  spots.state.spot.address = newAddress;
138
124
  }"
139
125
  />
126
+ <p class="mn-b-small p-medium">Options:</p>
127
+ <Checkbox
128
+ :label="'Hide address'"
129
+ name="address"
130
+ class="w-100 mn-r-small bg-white radius-small pd-small"
131
+ :radio="spots.state.spot.position?.hide"
132
+ @update:radio="event => spots.state.spot.position.hide = event"
140
133
 
141
- </div>
142
- </div>
143
-
144
- <section class="flex-nowrap flex pd-thin">
145
- <Button :submit="onDelete" :callback="redirectToDash" class="bg-grey">Delete Spot</Button>
146
- </section>
147
-
148
-
149
-
150
- <!-- <div id="dash" class="pd-medium bg-white">
151
-
152
-
153
- <div class="mn-b-regular flex-v-center flex-nowrap flex">
154
- <h3 class="mn-r-small">Команда</h3>
155
- <div>
156
- <a class="t-main h5" @click="openMemberPopup()">+</a>
157
- </div>
158
- </div>
159
-
160
- <Popup title="Добавить участника" @close-popup="closeMemberPopup" :isPopupOpen="isOpenAddMemberPopup">
161
- <SpotMemberModify
162
- :members="spots.state.spot.members"
163
- :member="selectedMember"
164
- :users="users"
165
- @callback="closeMemberPopup"
166
- />
167
- </Popup>
168
-
169
-
170
- <ul class=mn-b-small>
171
- <li v-if="spots.state.spot.members.length < 1">В отделе еще нет участников</li>
172
- <User
173
- class="bg-grey o-hidden radius-small mn-b-thin"
174
- v-for="(member, index) in spots.state.spot.members"
175
- :key="index"
176
- :user="member.user"
177
- :position="member.position"
178
- @click="openMemberPopup(index)"
179
134
  />
180
- </ul>
181
135
 
136
+ <Field
137
+ v-model:field="spots.state.spot.minorder"
138
+ label="Min.order"
139
+ placeholder="Enter minimum order value"
140
+ class="bg-white radius-small pd-medium"
141
+ :validation="organizationName"
142
+ />
182
143
 
183
- <Popup title="Добавить подотдел" @close-popup="closeSpotPopup" :isPopupOpen="isOpenSpotPopup">
184
- <SpotSubSpotModify
185
- :spots="spots.state.spot.subspots"
186
- :spot="selectedSpot"
187
- :mainspot="spots.state.spot"
188
- :allspots="spots.state.spots"
189
- @callback="closeSpotPopup"
190
- />
191
- </Popup>
192
-
193
- <div class="mn-b-regular flex-v-center flex-nowrap flex">
194
- <h3 class="mn-r-small">Подотделы </h3>
195
- <div>
196
- <a class="t-main h5" @click="openSpotPopup()">+</a>
197
- </div>
198
- </div>
199
-
200
- <ul class="mn-b-small">
201
- <li v-if="spots.state.spot.subspots.length < 1">В отделе еще нет подотделов</li>
202
- <SpotSub
203
- v-for="(subspot, index) in spots.state.spot.subspots"
204
- :key="index" class="bg-grey o-hidden radius-small mn-b-thin"
205
- :spot="subspot"
206
- @click="openSpotPopup(index)"
207
- />
208
- </ul>
144
+ </Block>
145
+ </div>
209
146
 
210
-
211
- </div> -->
147
+ <Button :submit="onDelete" :callback="redirectToDash" class="w-100 bg-grey">Delete Spot</Button>
212
148
  </div>
213
149
  </template>
214
150
 
215
151
  <script setup>
216
- import { ref } from "vue";
152
+ import { ref, onMounted } from "vue";
217
153
  import { useRoute, useRouter } from "vue-router";
218
- import Cookies from "js-cookie";
219
- import Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'
154
+
155
+ import Block from '@pf/src/components/Block/Block.vue';
220
156
  import UploadImage from '@pf/src/components/UploadImage/UploadImage.vue';
221
157
 
222
158
 
@@ -243,17 +179,31 @@ const route = useRoute();
243
179
  const tabOrganization = ref("details");
244
180
  const showAddNew = ref(false);
245
181
 
182
+ onMounted(() => {
183
+ // spots.state.spot.location = spots.state.spot.location
184
+ })
185
+
246
186
  async function fetchData() {
247
187
  if (route.params.spot) {
248
188
  await memberships.actions.read(route.params.spot);
249
189
  }
250
190
  const users = ref(memberships.state.memberships);
251
191
 
252
- await spots.actions.read(route.params._id);
253
192
  if (route.params.spot) await spots.actions.readOne(route.params.spot);
193
+
254
194
  }
255
195
 
256
- fetchData();
196
+ await fetchData();
197
+
198
+ // const [ lng, lat ] = spots.state.spot.location?.coordinates
199
+
200
+ const lng = spots.state.spot.location?.coordinates[0]
201
+ const lat = spots.state.spot.location?.coordinates[1]
202
+
203
+ spots.state.spot.location = {
204
+ lat: lat || 1,
205
+ lng: lng || 1
206
+ }
257
207
 
258
208
  const members = ref(spots.state.spot.members);
259
209
 
@@ -284,6 +234,13 @@ function closeSpotPopup() {
284
234
  }
285
235
 
286
236
  async function onSubmit() {
237
+
238
+ spots.state.spot.location = {
239
+ type: 'Point',
240
+ coordinates: [spots.state.spot.location.lng, spots.state.spot.location.lat]
241
+ }
242
+
243
+
287
244
  if (route.params.spot) {
288
245
  await spots.actions.update(
289
246
  route.params._id,
@@ -41,6 +41,7 @@ const controllerFactory = (db) => {
41
41
  const data = await newSpot.save();
42
42
  res.send(data);
43
43
  } catch (err) {
44
+ console.log(err)
44
45
  res.status(500).send({ message: err.message });
45
46
  }
46
47
  };
@@ -15,15 +15,18 @@ module.exports = (mongoose) => {
15
15
  description: { type: String },
16
16
  categories: [String]
17
17
  },
18
+ minorder: { type: Number },
19
+ position: {
20
+ hide: { type: Boolean}
21
+ },
18
22
  // Working hours
19
23
  address: String,
20
24
  // Position on map
21
25
  location: {
22
- lat: Number,
23
- lng: Number,
24
26
  type: {
25
27
  type: String,
26
- enum: ['Point'], // 'location.type' must be 'Point'
28
+ enum: ['Point'],
29
+ default: 'Point',
27
30
  required: true
28
31
  },
29
32
  coordinates: {
@@ -13,18 +13,24 @@ $axios.defaults.withCredentials = true
13
13
  const state = reactive({
14
14
  spots: [],
15
15
  spot: {
16
+ status: 'unpublished',
16
17
  organization: '',
18
+
17
19
  profile: {
18
20
  photo: '',
19
21
  name: '',
20
22
  description: '',
21
23
  categories: [],
22
24
  },
23
- address: '',
24
- location: {
25
- lat: null,
26
- lng: null,
25
+ position: {
26
+ address: undefined,
27
+ location: undefined,
28
+ hide: false
27
29
  },
30
+
31
+ address: undefined,
32
+ location: undefined,
33
+
28
34
  worktime: [],
29
35
  delivery: [],
30
36
  payment: [],
@@ -37,58 +43,46 @@ const state = reactive({
37
43
  // Methods
38
44
  const actions = {
39
45
  async readOne(spotID) {
40
- await $axios
41
- .get(`/api/spots/get/${spotID}`)
42
- .then(response => {
43
- state.spot = response.data;
44
- state.error = null;
45
- })
46
- .catch(error => {
47
- setError(error)
48
- });
46
+ try {
47
+ const response = await $axios.get(`/api/spots/get/${spotID}`);
48
+
49
+ state.spot = response.data;
50
+ } catch (error) {
51
+ setError(error);
52
+ }
49
53
  },
50
54
  async read(organizationId) {
51
- await $axios
52
- .get(`/api/spots/${organizationId}`)
53
- .then(response => {
54
- console.log('Response:', response);
55
- state.spots = response.data;
56
- state.error = null;
57
- })
58
- .catch(error => {
59
- setError(error)
60
- });
55
+ try {
56
+ const response = await $axios.get(`/api/spots/${organizationId}`);
57
+
58
+ state.spots = response.data;
59
+ return response.data
60
+ } catch (error) {
61
+ setError(error);
62
+ }
61
63
  },
62
64
  async create(organizationId, spot) {
63
- await $axios
64
- .post(`/api/spots/${organizationId}/create`, spot)
65
- .then(response => {
66
- state.error = null;
67
- state.spot = response.data;
68
- })
69
- .catch(error => {
70
- setError(error)
71
- });
65
+ try {
66
+ const response = await $axios.post(`/api/spots/${organizationId}/create`, spot);
67
+
68
+ state.spot = response.data;
69
+ } catch (error) {
70
+ setError(error);
71
+ }
72
72
  },
73
73
  async update(organizationId, spot) {
74
- await $axios
75
- .post(`/api/spots/${organizationId}/update`, spot)
76
- .then(() => {
77
- state.error = null;
78
- })
79
- .catch(error => {
80
- setError(error)
81
- });
74
+ try {
75
+ await $axios.post(`/api/spots/${organizationId}/update`, spot);
76
+ } catch (error) {
77
+ setError(error);
78
+ }
82
79
  },
83
80
  async delete(organizationId, spotId) {
84
- await $axios
85
- .delete(`/api/spots/${organizationId}/delete`, { data: { _id: spotId } })
86
- .then(() => {
87
- state.error = null;
88
- })
89
- .catch(error => {
90
- setError(error)
91
- });
81
+ try {
82
+ await $axios.delete(`/api/spots/${organizationId}/delete`, { data: { _id: spotId } });
83
+ } catch (error) {
84
+ setError(error);
85
+ }
92
86
  },
93
87
  };
94
88
 
@@ -24,7 +24,7 @@
24
24
 
25
25
  <section
26
26
 
27
- class="flex-center flex flex-column t-center w-100 mn-b-semi radius-medium pd-medium bg-grey"
27
+ class="flex-center pos-relative flex flex-column t-center w-100 mn-b-semi radius-medium pd-medium bg-grey"
28
28
  >
29
29
 
30
30
  <Dropdown
@@ -73,7 +73,7 @@
73
73
  _id: auth.state.user._id
74
74
  }
75
75
  })"
76
- class="pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
76
+ class="cursor-pointer pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
77
77
  />
78
78
 
79
79
  <img
@@ -152,25 +152,7 @@
152
152
 
153
153
  </section>
154
154
 
155
- <Menu
156
- v-if="(auth.state.access.roles && auth.state.user._id === route.params._id) && (auth.state.access.roles.includes('ROLE_MODERATOR') || auth.state.access.roles.includes('ROLE_ADMIN'))"
157
- class="mn-b-regular bg-black t-white"
158
- >
159
- <MenuItem
160
- @click="router.push({
161
- name: 'Backoffice',
162
- params: {
163
- _id: route.params._id
164
- }
165
- })"
166
- class="cursor-pointer"
167
- theme="white"
168
- >
169
- <span>
170
- Backoffice
171
- </span>
172
- </MenuItem>
173
- </Menu>
155
+
174
156
 
175
157
  <Menu class="mn-b-regular bg-grey">
176
158
 
@@ -187,19 +169,15 @@
187
169
  <MenuItem @click="router.push({name: 'User Blogposts', params: {_id: route.params._id}})" class="cursor-pointer">
188
170
  <IconCommunity class="i-semi" :icon="true"/>
189
171
  <span>Posts</span>
190
- </MenuItem>
172
+ </MenuItem>
191
173
  </Menu>
192
174
 
193
-
194
-
195
- <!-- <Menu class="mn-b-regular bg-grey">
175
+ <Menu class="mn-b-regular bg-grey">
196
176
  <MenuItem @click="router.push({name: 'User Wallet', params: {_id: route.params._id}})" class="cursor-pointer">
197
177
  <IconGroups class="i-semi" :icon="true"/>
198
178
  <span>Wallet</span>
199
179
  </MenuItem>
200
- </Menu> -->
201
-
202
-
180
+ </Menu>
203
181
 
204
182
  <!-- <MenuItem @click="router.push({name: 'User Comments', params: {_id: route.params._id}})" class="cursor-pointer">
205
183
  <span>Comments</span>
@@ -7,7 +7,7 @@
7
7
  @click="$router.push({
8
8
  name: 'Create BlogPost'
9
9
  })"
10
- class="radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second">
10
+ class="radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second">
11
11
  +
12
12
  </button>
13
13
  </header>
@@ -19,7 +19,7 @@
19
19
  :validation="organizationName"
20
20
  />
21
21
 
22
- <p class="mn-b-semi">Your username will be used for URL of profile like thecommunephuket/users/username</p>
22
+ <p class="mn-b-semi">Your username will be used for URL of profile like {{API_URL}}/users/username</p>
23
23
  <!-- -->
24
24
  <h3 class="mn-b-small">Profile</h3>
25
25
 
@@ -14,7 +14,7 @@
14
14
  <button
15
15
  v-if="auth.state.user._id === route.params._id"
16
16
  @click="router.push({name: 'Create Event'})"
17
- class="radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"
17
+ class="radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"
18
18
  >
19
19
  +
20
20
  </button>
@@ -7,7 +7,7 @@
7
7
  @click="$router.push({
8
8
  name: 'Create Organization'
9
9
  })"
10
- class="radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second">
10
+ class="radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second">
11
11
  +
12
12
  </button>
13
13
  </header>
@@ -53,7 +53,7 @@ const users = [{
53
53
  ru: 'Группы'
54
54
  }
55
55
  },
56
- component: () => import(/* webpackChunkName: "profile" */ '../components/pages/ProfileOrganizations.vue'),
56
+ component: () => import(/* webpackChunkName: "profile" */ '@pf/src/modules/organizations/components/pages/Organizations.vue'),
57
57
  },{
58
58
  path: 'profile/:_id/wallet',
59
59
  name: 'User Wallet',