@ozdao/prometheus-framework 0.2.252 → 0.2.254

Sign up to get free protection for your applications and to get access to all the features.
Files changed (310) hide show
  1. package/dist/auth.server.js +298 -14
  2. package/dist/auth.server.mjs +298 -14
  3. package/dist/builder.js +4 -4
  4. package/dist/builder.mjs +4 -4
  5. package/dist/chats.server.js +110 -0
  6. package/dist/chats.server.mjs +111 -0
  7. package/dist/community.server.js +38 -21
  8. package/dist/community.server.mjs +38 -21
  9. package/dist/events.server.js +38 -18
  10. package/dist/events.server.mjs +38 -17
  11. package/dist/files.server.js +12 -3
  12. package/dist/files.server.mjs +12 -3
  13. package/dist/gallery.server.js +17 -4
  14. package/dist/gallery.server.mjs +17 -4
  15. package/dist/organizations.server.js +43 -26
  16. package/dist/organizations.server.mjs +43 -26
  17. package/dist/products.server.js +49 -23
  18. package/dist/products.server.mjs +49 -22
  19. package/dist/prometheus-framework/src/modules/auth/auth.client.cjs +15 -3
  20. package/dist/prometheus-framework/src/modules/auth/auth.client.cjs.map +1 -1
  21. package/dist/prometheus-framework/src/modules/auth/auth.client.js +16 -4
  22. package/dist/prometheus-framework/src/modules/auth/auth.client.js.map +1 -1
  23. package/dist/prometheus-framework/src/modules/auth/views/components/blocks/CardUser.vue.cjs +95 -0
  24. package/dist/prometheus-framework/src/modules/auth/views/components/blocks/CardUser.vue.cjs.map +1 -0
  25. package/dist/prometheus-framework/src/modules/auth/views/components/blocks/CardUser.vue.js +95 -0
  26. package/dist/prometheus-framework/src/modules/auth/views/components/blocks/CardUser.vue.js.map +1 -0
  27. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.cjs +284 -0
  28. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.cjs.map +1 -0
  29. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.js +284 -0
  30. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -0
  31. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue2.cjs +2 -0
  32. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue2.cjs.map +1 -0
  33. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue2.js +2 -0
  34. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue2.js.map +1 -0
  35. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileBlogposts.vue.cjs +85 -0
  36. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileBlogposts.vue.cjs.map +1 -0
  37. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js +85 -0
  38. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js.map +1 -0
  39. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +176 -0
  40. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs.map +1 -0
  41. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.js +176 -0
  42. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.js.map +1 -0
  43. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue2.cjs +2 -0
  44. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue2.cjs.map +1 -0
  45. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue2.js +2 -0
  46. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue2.js.map +1 -0
  47. package/dist/prometheus-framework/src/modules/auth/views/components/sections/FeaturedUsers.vue.cjs +114 -0
  48. package/dist/prometheus-framework/src/modules/auth/views/components/sections/FeaturedUsers.vue.cjs.map +1 -0
  49. package/dist/prometheus-framework/src/modules/auth/views/components/sections/FeaturedUsers.vue.js +114 -0
  50. package/dist/prometheus-framework/src/modules/auth/views/components/sections/FeaturedUsers.vue.js.map +1 -0
  51. package/dist/prometheus-framework/src/modules/auth/views/components/sections/ProfileCompletion.vue.cjs +72 -0
  52. package/dist/prometheus-framework/src/modules/auth/views/components/sections/ProfileCompletion.vue.cjs.map +1 -0
  53. package/dist/prometheus-framework/src/modules/auth/views/components/sections/ProfileCompletion.vue.js +72 -0
  54. package/dist/prometheus-framework/src/modules/auth/views/components/sections/ProfileCompletion.vue.js.map +1 -0
  55. package/dist/prometheus-framework/src/modules/auth/views/router/users.cjs +97 -0
  56. package/dist/prometheus-framework/src/modules/auth/views/router/users.cjs.map +1 -0
  57. package/dist/prometheus-framework/src/modules/auth/views/router/users.js +97 -0
  58. package/dist/prometheus-framework/src/modules/auth/views/router/users.js.map +1 -0
  59. package/dist/prometheus-framework/src/modules/auth/views/store/users.cjs +95 -0
  60. package/dist/prometheus-framework/src/modules/auth/views/store/users.cjs.map +1 -0
  61. package/dist/prometheus-framework/src/modules/auth/views/store/users.js +95 -0
  62. package/dist/prometheus-framework/src/modules/auth/views/store/users.js.map +1 -0
  63. package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.cjs +32 -2
  64. package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.cjs.map +1 -1
  65. package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.js +32 -2
  66. package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.js.map +1 -1
  67. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +2 -2
  68. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs.map +1 -1
  69. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +2 -2
  70. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js.map +1 -1
  71. package/dist/prometheus-framework/src/modules/chats/chats.client.cjs +31 -0
  72. package/dist/prometheus-framework/src/modules/chats/chats.client.cjs.map +1 -0
  73. package/dist/prometheus-framework/src/modules/chats/chats.client.js +31 -0
  74. package/dist/prometheus-framework/src/modules/chats/chats.client.js.map +1 -0
  75. package/dist/prometheus-framework/src/modules/community/community.client.cjs +42 -7
  76. package/dist/prometheus-framework/src/modules/community/community.client.cjs.map +1 -1
  77. package/dist/prometheus-framework/src/modules/community/community.client.js +59 -24
  78. package/dist/prometheus-framework/src/modules/community/community.client.js.map +1 -1
  79. package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +68 -70
  80. package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs.map +1 -1
  81. package/dist/prometheus-framework/src/modules/community/router/blogposts.js +68 -70
  82. package/dist/prometheus-framework/src/modules/community/router/blogposts.js.map +1 -1
  83. package/dist/prometheus-framework/src/modules/gallery/gallery.client.cjs +26 -3
  84. package/dist/prometheus-framework/src/modules/gallery/gallery.client.cjs.map +1 -1
  85. package/dist/prometheus-framework/src/modules/gallery/gallery.client.js +27 -4
  86. package/dist/prometheus-framework/src/modules/gallery/gallery.client.js.map +1 -1
  87. package/dist/prometheus-framework/src/modules/gallery/router/gallery.router.cjs +2 -2
  88. package/dist/prometheus-framework/src/modules/gallery/router/gallery.router.cjs.map +1 -1
  89. package/dist/prometheus-framework/src/modules/gallery/router/gallery.router.js +2 -2
  90. package/dist/prometheus-framework/src/modules/gallery/router/gallery.router.js.map +1 -1
  91. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs.map +1 -1
  93. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  94. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js.map +1 -1
  95. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs.map +1 -1
  97. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  98. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js.map +1 -1
  99. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +2 -2
  100. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs.map +1 -1
  101. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
  102. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js.map +1 -1
  103. package/dist/prometheus-framework/src/modules/orders/orders.client.cjs +4 -1
  104. package/dist/prometheus-framework/src/modules/orders/orders.client.cjs.map +1 -1
  105. package/dist/prometheus-framework/src/modules/orders/orders.client.js +4 -1
  106. package/dist/prometheus-framework/src/modules/orders/orders.client.js.map +1 -1
  107. package/dist/prometheus-framework/src/modules/orders/store/testimonials.cjs +63 -0
  108. package/dist/prometheus-framework/src/modules/orders/store/testimonials.cjs.map +1 -0
  109. package/dist/prometheus-framework/src/modules/orders/store/testimonials.js +63 -0
  110. package/dist/prometheus-framework/src/modules/orders/store/testimonials.js.map +1 -0
  111. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +2 -2
  112. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs.map +1 -1
  113. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +2 -2
  114. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js.map +1 -1
  115. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs.map +1 -1
  117. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  118. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js.map +1 -1
  119. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs.map +1 -1
  121. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
  122. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js.map +1 -1
  123. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs.map +1 -1
  125. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  126. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js.map +1 -1
  127. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs.map +1 -1
  129. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  130. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js.map +1 -1
  131. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs.map +1 -1
  132. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js.map +1 -1
  133. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +2 -2
  134. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs.map +1 -1
  135. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  136. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js.map +1 -1
  137. package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +60 -11
  138. package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs.map +1 -1
  139. package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +95 -46
  140. package/dist/prometheus-framework/src/modules/organizations/organizations.client.js.map +1 -1
  141. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +6 -10
  142. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs.map +1 -1
  143. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +8 -12
  144. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js.map +1 -1
  145. package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +500 -500
  146. package/dist/prometheus-framework/src/modules/pages/pages.client.js +500 -500
  147. package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.cjs +179 -0
  148. package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.cjs.map +1 -0
  149. package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.js +179 -0
  150. package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.js.map +1 -0
  151. package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.cjs +64 -0
  152. package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.cjs.map +1 -0
  153. package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.js +64 -0
  154. package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.js.map +1 -0
  155. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +2 -2
  156. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +2 -2
  157. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +2 -2
  158. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs.map +1 -1
  159. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +2 -2
  160. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js.map +1 -1
  161. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  162. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs.map +1 -1
  163. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  164. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js.map +1 -1
  165. package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.cjs +156 -0
  166. package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.cjs.map +1 -0
  167. package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.js +157 -0
  168. package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.js.map +1 -0
  169. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.cjs +1 -1
  170. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.cjs.map +1 -1
  171. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.js +1 -1
  172. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.js.map +1 -1
  173. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
  174. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs.map +1 -1
  175. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +1 -1
  176. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js.map +1 -1
  177. package/dist/prometheus-framework/src/modules/products/products.client.cjs +72 -7
  178. package/dist/prometheus-framework/src/modules/products/products.client.cjs.map +1 -1
  179. package/dist/prometheus-framework/src/modules/products/products.client.js +114 -49
  180. package/dist/prometheus-framework/src/modules/products/products.client.js.map +1 -1
  181. package/dist/prometheus-framework/src/modules/products/router/marketplace.router.cjs +46 -0
  182. package/dist/prometheus-framework/src/modules/products/router/marketplace.router.cjs.map +1 -0
  183. package/dist/prometheus-framework/src/modules/products/router/marketplace.router.js +46 -0
  184. package/dist/prometheus-framework/src/modules/products/router/marketplace.router.js.map +1 -0
  185. package/dist/prometheus-framework/src/modules/products/router/products.router.cjs +79 -36
  186. package/dist/prometheus-framework/src/modules/products/router/products.router.cjs.map +1 -1
  187. package/dist/prometheus-framework/src/modules/products/router/products.router.js +78 -35
  188. package/dist/prometheus-framework/src/modules/products/router/products.router.js.map +1 -1
  189. package/dist/prometheus-framework/src/modules/products/store/marketplace.cjs +57 -0
  190. package/dist/prometheus-framework/src/modules/products/store/marketplace.cjs.map +1 -0
  191. package/dist/prometheus-framework/src/modules/products/store/marketplace.js +57 -0
  192. package/dist/prometheus-framework/src/modules/products/store/marketplace.js.map +1 -0
  193. package/dist/prometheus-framework/src/modules/reports/reports.client.cjs +21 -2
  194. package/dist/prometheus-framework/src/modules/reports/reports.client.cjs.map +1 -1
  195. package/dist/prometheus-framework/src/modules/reports/reports.client.js +20 -1
  196. package/dist/prometheus-framework/src/modules/reports/reports.client.js.map +1 -1
  197. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  198. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs.map +1 -1
  199. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  200. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js.map +1 -1
  201. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +2 -2
  202. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs.map +1 -1
  203. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +2 -2
  204. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js.map +1 -1
  205. package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.cjs +2 -2
  206. package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.cjs.map +1 -1
  207. package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.js +2 -2
  208. package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.js.map +1 -1
  209. package/dist/reports.server.js +21 -8
  210. package/dist/reports.server.mjs +21 -8
  211. package/package.json +9 -1
  212. package/src/builder/webpack/webpack.config.client.js +2 -2
  213. package/src/builder/webpack/webpack.config.server.js +1 -1
  214. package/src/builder/webpack/webpack.config.spa.js +1 -1
  215. package/src/builder/webpack/webpack.config.ssr.js +1 -1
  216. package/src/modules/auth/auth.client.js +16 -3
  217. package/src/modules/auth/auth.server.js +22 -1
  218. package/src/modules/{users → auth/controllers}/routes/users.routes.js +1 -1
  219. package/src/modules/auth/controllers/services/auth.service.js +0 -1
  220. package/src/modules/{users → auth/views}/components/pages/Profile.vue +1 -1
  221. package/src/modules/{users → auth/views}/components/pages/ProfileEdit.vue +2 -2
  222. package/src/modules/{users → auth/views}/components/sections/FeaturedUsers.vue +2 -2
  223. package/src/modules/auth/views/router/users.js +79 -0
  224. package/src/modules/backoffice/backoffice.client.js +53 -11
  225. package/src/modules/backoffice/router/backoffice.js +29 -2
  226. package/src/modules/chats/chats.client.js +48 -0
  227. package/src/modules/chats/chats.server.js +32 -0
  228. package/src/modules/community/community.client.js +56 -10
  229. package/src/modules/community/community.server.js +35 -14
  230. package/src/modules/community/models/comment.model.js +7 -7
  231. package/src/modules/community/models/reaction.model.js +5 -5
  232. package/src/modules/community/router/blogposts.js +55 -57
  233. package/src/modules/events/events.server.js +37 -16
  234. package/src/modules/events/models/ticket.model.js +6 -6
  235. package/src/modules/files/files.server.js +17 -7
  236. package/src/modules/gallery/gallery.client.js +44 -8
  237. package/src/modules/gallery/gallery.server.js +28 -9
  238. package/src/modules/gallery/router/gallery.router.js +2 -2
  239. package/src/modules/orders/components/pages/OrderCreate.vue +1 -1
  240. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +1 -1
  241. package/src/modules/orders/components/sections/FormAddCustomer.vue +2 -2
  242. package/src/modules/orders/orders.client.js +4 -1
  243. package/src/modules/orders/orders.server.js +1 -0
  244. package/src/modules/organizations/components/blocks/CardDepartment.vue +1 -1
  245. package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
  246. package/src/modules/organizations/components/pages/Department.vue +1 -1
  247. package/src/modules/organizations/components/pages/DepartmentEdit.vue +1 -1
  248. package/src/modules/organizations/components/pages/Members.vue +1 -1
  249. package/src/modules/organizations/components/pages/Organization.vue +1 -1
  250. package/src/modules/organizations/components/sections/MembersAdd.vue +2 -2
  251. package/src/modules/organizations/controllers/organizations.controller.js +0 -2
  252. package/src/modules/organizations/models/department.model.js +7 -7
  253. package/src/modules/organizations/models/membership.model.js +5 -5
  254. package/src/modules/organizations/organizations.client.js +71 -16
  255. package/src/modules/organizations/organizations.server.js +43 -18
  256. package/src/modules/organizations/router/organizations.js +6 -13
  257. package/src/modules/{marketplace → products}/components/layouts/Marketplace.vue +20 -19
  258. package/src/modules/{marketplace → products}/components/pages/Catalog.vue +5 -5
  259. package/src/modules/products/components/pages/Products.vue +2 -2
  260. package/src/modules/products/components/sections/FilterProducts.vue +1 -1
  261. package/src/modules/{marketplace → products}/components/sections/Filters.vue +12 -15
  262. package/src/modules/products/components/sections/HeroRecommendation.vue +1 -1
  263. package/src/modules/products/components/sections/PopularProducts.vue +1 -1
  264. package/src/modules/products/models/category.model.js +3 -3
  265. package/src/modules/products/models/product.model.js +7 -7
  266. package/src/modules/products/products.client.js +93 -25
  267. package/src/modules/products/products.server.js +47 -16
  268. package/src/modules/products/router/marketplace.router.js +38 -0
  269. package/src/modules/products/router/products.router.js +72 -32
  270. package/src/modules/reports/models/report.model.js +4 -4
  271. package/src/modules/reports/reports.client.js +35 -14
  272. package/src/modules/reports/reports.server.js +27 -8
  273. package/src/modules/spots/components/layouts/Spots.vue +1 -1
  274. package/src/modules/spots/components/pages/Map.vue +1 -1
  275. package/src/modules/spots/components/pages/Spot.vue +1 -1
  276. package/src/modules/backoffice/router/admin.js +0 -51
  277. package/src/modules/landing/components/pages/404.vue +0 -3
  278. package/src/modules/landing/components/pages/Farming.vue +0 -226
  279. package/src/modules/landing/components/pages/Governance.vue +0 -144
  280. package/src/modules/landing/components/pages/Home.vue +0 -51
  281. package/src/modules/landing/components/pages/Hotel.vue +0 -43
  282. package/src/modules/landing/router/landing.js +0 -39
  283. package/src/modules/legal/components/pages/Legal.vue +0 -62
  284. package/src/modules/legal/components/pages/legal/Cookies.vue +0 -370
  285. package/src/modules/legal/components/pages/legal/EULA.vue +0 -2145
  286. package/src/modules/legal/components/pages/legal/Privacy.vue +0 -4284
  287. package/src/modules/legal/components/pages/legal/Terms.vue +0 -1283
  288. package/src/modules/legal/legal.client.js +0 -18
  289. package/src/modules/legal/router/legal.js +0 -59
  290. package/src/modules/marketplace/router/marketplace.js +0 -54
  291. package/src/modules/users/router/users.js +0 -90
  292. package/src/modules/users/users.client.js +0 -22
  293. package/src/modules/users/users.server.js +0 -13
  294. /package/src/modules/{users → auth/controllers}/middlewares/visitor.logger.js +0 -0
  295. /package/src/modules/{users/controllers/users.controller.js → auth/controllers/services/users.service.js} +0 -0
  296. /package/src/modules/{users → auth}/models/request.model.js +0 -0
  297. /package/src/modules/{users → auth}/models/user.model.js +0 -0
  298. /package/src/modules/{users → auth}/models/visitor.model.js +0 -0
  299. /package/src/modules/{users → auth/views}/components/blocks/CardUser.vue +0 -0
  300. /package/src/modules/{users → auth/views}/components/pages/ProfileBlogposts.vue +0 -0
  301. /package/src/modules/{users → auth/views}/components/pages/ProfileComments.vue +0 -0
  302. /package/src/modules/{users → auth/views}/components/pages/ProfileLikes.vue +0 -0
  303. /package/src/modules/{users → auth/views}/components/sections/ProfileCompletion.vue +0 -0
  304. /package/src/modules/{users → auth/views}/router/account.js +0 -0
  305. /package/src/modules/{users → auth/views}/store/users.js +0 -0
  306. /package/src/modules/{projects/controller → governance/controllers/factories}/projects.controller.js +0 -0
  307. /package/src/modules/{projects → governance/controllers}/routes/projects.routes.js +0 -0
  308. /package/src/modules/{projects → governance}/models/project.model.js +0 -0
  309. /package/src/modules/{projects → governance/views}/store/projects.js +0 -0
  310. /package/src/modules/{marketplace → products}/store/marketplace.js +0 -0
@@ -1,83 +1,81 @@
1
1
  import _sfc_main from "../components/layouts/Community.vue.js";
2
2
  import { requiresAuth } from "../../auth/views/middlewares/auth.validation.js";
3
3
  import { requiresEditAccess } from "../../auth/views/middlewares/ownership.validation.js";
4
- const community = [
5
- {
6
- path: "community",
7
- component: _sfc_main,
4
+ const community = {
5
+ path: "community",
6
+ component: _sfc_main,
7
+ meta: {
8
+ title: {
9
+ en: "Community",
10
+ ru: "Коммьюнити"
11
+ },
12
+ breadcrumbs: {
13
+ hidden: true
14
+ },
15
+ title_hide: true
16
+ },
17
+ children: [{
18
+ path: ":category?",
19
+ name: "Blog",
8
20
  meta: {
9
21
  title: {
10
22
  en: "Community",
11
23
  ru: "Коммьюнити"
12
24
  },
13
- breadcrumbs: {
14
- hidden: true
15
- },
16
25
  title_hide: true
17
26
  },
18
- children: [{
19
- path: ":category?",
20
- name: "Blog",
21
- meta: {
22
- title: {
23
- en: "Community",
24
- ru: "Коммьюнити"
25
- },
26
- title_hide: true
27
- },
28
- component: () => import(
29
- /* webpackChunkName: 'Blog' */
30
- "../components/pages/Blog.vue.js"
31
- )
32
- }, {
33
- path: "posts/create",
34
- name: "Create BlogPost",
35
- meta: {
36
- title: {
37
- en: "Create Post",
38
- ru: "Создать Пост"
39
- }
40
- },
41
- // beforeEnter: [
42
- // validationAuth.requiresAuth,
43
- // ],
44
- component: () => import(
45
- /* webpackChunkName: 'CreateBlogPost' */
46
- "../components/pages/CreateBlogPost.vue.js"
47
- )
48
- }, {
49
- path: "posts/:url",
50
- name: "BlogPost",
51
- meta: {
52
- title: {
53
- en: "Post",
54
- ru: "Пост"
55
- }
56
- },
57
- component: () => import(
58
- /* webpackChunkName: 'BlogPost' */
59
- "../components/pages/BlogPost.vue.js"
60
- )
61
- }, {
62
- path: "posts/:url/edit",
63
- name: "Edit BlogPost",
64
- meta: {
65
- title: {
66
- en: "Edit Post",
67
- ru: "Редактировать пост"
68
- }
69
- },
70
- beforeEnter: [
71
- requiresAuth,
72
- requiresEditAccess
73
- ],
74
- component: () => import(
75
- /* webpackChunkName: 'CreateBlogPost' */
76
- "../components/pages/CreateBlogPost.vue.js"
77
- )
78
- }]
79
- }
80
- ];
27
+ component: () => import(
28
+ /* webpackChunkName: 'Blog' */
29
+ "../components/pages/Blog.vue.js"
30
+ )
31
+ }, {
32
+ path: "posts/create",
33
+ name: "Create BlogPost",
34
+ meta: {
35
+ title: {
36
+ en: "Create Post",
37
+ ru: "Создать Пост"
38
+ }
39
+ },
40
+ // beforeEnter: [
41
+ // validationAuth.requiresAuth,
42
+ // ],
43
+ component: () => import(
44
+ /* webpackChunkName: 'CreateBlogPost' */
45
+ "../components/pages/CreateBlogPost.vue.js"
46
+ )
47
+ }, {
48
+ path: "posts/:url",
49
+ name: "BlogPost",
50
+ meta: {
51
+ title: {
52
+ en: "Post",
53
+ ru: "Пост"
54
+ }
55
+ },
56
+ component: () => import(
57
+ /* webpackChunkName: 'BlogPost' */
58
+ "../components/pages/BlogPost.vue.js"
59
+ )
60
+ }, {
61
+ path: "posts/:url/edit",
62
+ name: "Edit BlogPost",
63
+ meta: {
64
+ title: {
65
+ en: "Edit Post",
66
+ ru: "Редактировать пост"
67
+ }
68
+ },
69
+ beforeEnter: [
70
+ requiresAuth,
71
+ requiresEditAccess
72
+ ],
73
+ component: () => import(
74
+ /* webpackChunkName: 'CreateBlogPost' */
75
+ "../components/pages/CreateBlogPost.vue.js"
76
+ )
77
+ }]
78
+ };
81
79
  export {
82
80
  community as default
83
81
  };
@@ -1 +1 @@
1
- {"version":3,"file":"blogposts.js","sources":["../../../../../../src/modules/community/router/blogposts.js"],"sourcesContent":["import layoutCommunity from '../components/layouts/Community.vue'\nimport * as validationAuth from '@pf/src/modules/auth/views/middlewares/auth.validation';\nimport * as validationOwnership from '@pf/src/modules/auth/views/middlewares/ownership.validation';\n\n\nconst community = [\n {\n path: 'community',\n component: layoutCommunity,\n meta: {\n title: {\n en: 'Community',\n ru: 'Коммьюнити'\n },\n breadcrumbs: {\n hidden: true\n },\n title_hide: true\n\n },\n children: [{\n path: ':category?',\n name: 'Blog',\n meta: {\n title: {\n en: 'Community',\n ru: 'Коммьюнити'\n },\n title_hide: true\n },\n component: () => import(/* webpackChunkName: 'Blog' */ '../components/pages/Blog.vue')\n },{\n path: 'posts/create',\n name: 'Create BlogPost',\n meta: {\n title: {\n en: 'Create Post',\n ru: 'Создать Пост'\n },\n },\n // beforeEnter: [\n // validationAuth.requiresAuth,\n // ],\n component: () => import(/* webpackChunkName: 'CreateBlogPost' */ '../components/pages/CreateBlogPost.vue')\n },{\n path: 'posts/:url',\n name: 'BlogPost',\n meta: {\n title: {\n en: 'Post',\n ru: 'Пост'\n }\n },\n component: () => import(/* webpackChunkName: 'BlogPost' */ '../components/pages/BlogPost.vue')\n },{\n path: 'posts/:url/edit',\n name: 'Edit BlogPost',\n meta: {\n title: {\n en: 'Edit Post',\n ru: 'Редактировать пост'\n },\n },\n beforeEnter: [\n validationAuth.requiresAuth,\n validationOwnership.requiresEditAccess\n ],\n component: () => import(/* webpackChunkName: 'CreateBlogPost' */ '../components/pages/CreateBlogPost.vue')\n }]\n },\n];\n\nexport default community;"],"names":["layoutCommunity","validationAuth.requiresAuth","validationOwnership.requiresEditAccess"],"mappings":";;;AAKK,MAAC,YAAY;AAAA,EAChB;AAAA,IACE,MAAM;AAAA,IACN,WAAWA;AAAAA,IACX,MAAM;AAAA,MACJ,OAAO;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,MACL;AAAA,MACD,aAAa;AAAA,QACX,QAAQ;AAAA,MACT;AAAA,MACD,YAAY;AAAA,IAEb;AAAA,IACD,UAAU,CAAC;AAAA,MACT,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,QACJ,OAAO;AAAA,UACL,IAAI;AAAA,UACJ,IAAI;AAAA,QACL;AAAA,QACD,YAAY;AAAA,MACb;AAAA,MACD,WAAW,MAAM;AAAA;AAAA,QAAsC;AAAA,MAA8B;AAAA,IAC3F,GAAM;AAAA,MACA,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,QACJ,OAAO;AAAA,UACL,IAAI;AAAA,UACJ,IAAI;AAAA,QACL;AAAA,MACF;AAAA;AAAA;AAAA;AAAA,MAID,WAAW,MAAM;AAAA;AAAA,QAAgD;AAAA,MAAwC;AAAA,IAC/G,GAAM;AAAA,MACA,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,QACJ,OAAO;AAAA,UACL,IAAI;AAAA,UACJ,IAAI;AAAA,QACL;AAAA,MACF;AAAA,MACD,WAAW,MAAM;AAAA;AAAA,QAA0C;AAAA,MAAkC;AAAA,IACnG,GAAM;AAAA,MACA,MAAM;AAAA,MACN,MAAM;AAAA,MACL,MAAM;AAAA,QACL,OAAO;AAAA,UACL,IAAI;AAAA,UACJ,IAAI;AAAA,QACL;AAAA,MACF;AAAA,MACD,aAAa;AAAA,QACXC;AAAAA,QACAC;AAAAA,MACD;AAAA,MACD,WAAW,MAAM;AAAA;AAAA,QAAgD;AAAA,MAAwC;AAAA,IAC/G,CAAK;AAAA,EACF;AACH;"}
1
+ {"version":3,"file":"blogposts.js","sources":["../../../../../../src/modules/community/router/blogposts.js"],"sourcesContent":["import layoutCommunity from '../components/layouts/Community.vue'\n\nimport * as validationAuth from '@pf/src/modules/auth/views/middlewares/auth.validation';\nimport * as validationOwnership from '@pf/src/modules/auth/views/middlewares/ownership.validation';\n\nconst community = {\n path: 'community',\n component: layoutCommunity,\n meta: {\n title: {\n en: 'Community',\n ru: 'Коммьюнити'\n },\n breadcrumbs: {\n hidden: true\n },\n title_hide: true\n\n },\n children: [{\n path: ':category?',\n name: 'Blog',\n meta: {\n title: {\n en: 'Community',\n ru: 'Коммьюнити'\n },\n title_hide: true\n },\n component: () => import(/* webpackChunkName: 'Blog' */ '../components/pages/Blog.vue')\n },{\n path: 'posts/create',\n name: 'Create BlogPost',\n meta: {\n title: {\n en: 'Create Post',\n ru: 'Создать Пост'\n },\n },\n // beforeEnter: [\n // validationAuth.requiresAuth,\n // ],\n component: () => import(/* webpackChunkName: 'CreateBlogPost' */ '../components/pages/CreateBlogPost.vue')\n },{\n path: 'posts/:url',\n name: 'BlogPost',\n meta: {\n title: {\n en: 'Post',\n ru: 'Пост'\n }\n },\n component: () => import(/* webpackChunkName: 'BlogPost' */ '../components/pages/BlogPost.vue')\n },{\n path: 'posts/:url/edit',\n name: 'Edit BlogPost',\n meta: {\n title: {\n en: 'Edit Post',\n ru: 'Редактировать пост'\n },\n },\n beforeEnter: [\n validationAuth.requiresAuth,\n validationOwnership.requiresEditAccess\n ],\n component: () => import(/* webpackChunkName: 'CreateBlogPost' */ '../components/pages/CreateBlogPost.vue')\n }]\n}\n\nexport default community;"],"names":["layoutCommunity","validationAuth.requiresAuth","validationOwnership.requiresEditAccess"],"mappings":";;;AAKK,MAAC,YAAY;AAAA,EAChB,MAAM;AAAA,EACN,WAAWA;AAAAA,EACX,MAAM;AAAA,IACJ,OAAO;AAAA,MACL,IAAI;AAAA,MACJ,IAAI;AAAA,IACL;AAAA,IACD,aAAa;AAAA,MACX,QAAQ;AAAA,IACT;AAAA,IACD,YAAY;AAAA,EAEb;AAAA,EACD,UAAU,CAAC;AAAA,IACT,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,MACJ,OAAO;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,MACL;AAAA,MACD,YAAY;AAAA,IACb;AAAA,IACD,WAAW,MAAM;AAAA;AAAA,MAAsC;AAAA,IAA8B;AAAA,EACzF,GAAI;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,MACJ,OAAO;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,MACL;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAID,WAAW,MAAM;AAAA;AAAA,MAAgD;AAAA,IAAwC;AAAA,EAC7G,GAAI;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,MACJ,OAAO;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,MACL;AAAA,IACF;AAAA,IACD,WAAW,MAAM;AAAA;AAAA,MAA0C;AAAA,IAAkC;AAAA,EACjG,GAAI;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,IACL,MAAM;AAAA,MACL,OAAO;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,MACL;AAAA,IACF;AAAA,IACD,aAAa;AAAA,MACXC;AAAAA,MACAC;AAAAA,IACD;AAAA,IACD,WAAW,MAAM;AAAA;AAAA,MAAgD;AAAA,IAAwC;AAAA,EAC7G,CAAG;AACH;"}
@@ -1,7 +1,30 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const gallery = require("./store/gallery.cjs");
4
4
  const gallery_router = require("./router/gallery.router.cjs");
5
- exports.galleryStore = gallery.default;
6
- exports.galleryRouter = gallery_router.default;
5
+ const Gallery = require("./components/pages/Gallery.vue.cjs");
6
+ const BackofficeGallery = require("./components/sections/BackofficeGallery.vue.cjs");
7
+ function initializeGallery(app, store, router, options = {}) {
8
+ const route = options.route || "Home";
9
+ router.addRoute(route, gallery_router.default);
10
+ store.addStore("gallery", gallery);
11
+ }
12
+ const ModuleGallery = {
13
+ initialize: initializeGallery,
14
+ views: {
15
+ store: {
16
+ storeGallery: gallery
17
+ },
18
+ router: {
19
+ routerGallery: gallery_router.default
20
+ },
21
+ components: {
22
+ // Pages
23
+ Gallery: Gallery.default,
24
+ // Sections
25
+ BackofficeGallery: BackofficeGallery.default
26
+ }
27
+ }
28
+ };
29
+ exports.default = ModuleGallery;
7
30
  //# sourceMappingURL=gallery.client.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"gallery.client.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
1
+ {"version":3,"file":"gallery.client.cjs","sources":["../../../../../src/modules/gallery/gallery.client.js"],"sourcesContent":["// Store\nimport * as storeGallery from './store/gallery.js';\n\n// Router\nimport routerGallery from './router/gallery.router';\n// import { createGalleryBackofficeRoutes } from './router/gallery.backoffice.router';\n\n// Views\n// Pages\nimport Gallery from './components/pages/Gallery.vue';\n\n// Sections\nimport BackofficeGallery from './components/sections/BackofficeGallery.vue';\n\n// Пример функции инициализации для модуля галереи\nfunction initializeGallery(app, store, router, options = {}) {\n const route = options.route || 'Home';\n\n // const routesGallery = createGalleryRoutes();\n // const routesGalleryBackoffice = createGalleryBackofficeRoutes();\n \n router.addRoute(route, routerGallery);\n // router.addRoute('Backoffice', routesGalleryBackoffice);\n \n store.addStore('gallery', storeGallery);\n}\n\nconst ModuleGallery = {\n initialize: initializeGallery,\n views: {\n store: {\n storeGallery\n },\n router: {\n routerGallery\n },\n components: {\n // Pages\n Gallery,\n // Sections\n BackofficeGallery\n }\n }\n}\n\nexport default ModuleGallery;"],"names":["routerGallery","storeGallery","Gallery","BackofficeGallery"],"mappings":";;;;;;AAeA,SAAS,kBAAkB,KAAK,OAAO,QAAQ,UAAU,CAAA,GAAI;AAC3D,QAAM,QAAQ,QAAQ,SAAS;AAK/B,SAAO,SAAS,OAAOA,eAAAA,OAAa;AAGpC,QAAM,SAAS,WAAWC,OAAY;AACxC;AAEK,MAAC,gBAAgB;AAAA,EACpB,YAAY;AAAA,EACZ,OAAO;AAAA,IACL,OAAO;AAAA,MACX,cAAMA;AAAAA,IACD;AAAA,IACD,QAAQ;AAAA,MACZ,eAAMD,eAAa;AAAA,IACd;AAAA,IACD,YAAY;AAAA;AAAA,MAEhB,SAAME,QAAO;AAAA;AAAA,MAEb,mBAAMC,kBAAiB;AAAA,IAClB;AAAA,EACF;AACH;;"}
@@ -1,7 +1,30 @@
1
- import { default as default2 } from "./store/gallery.js";
2
- import { default as default3 } from "./router/gallery.router.js";
1
+ import * as gallery from "./store/gallery.js";
2
+ import gallery$1 from "./router/gallery.router.js";
3
+ import _sfc_main from "./components/pages/Gallery.vue.js";
4
+ import _sfc_main$1 from "./components/sections/BackofficeGallery.vue.js";
5
+ function initializeGallery(app, store, router, options = {}) {
6
+ const route = options.route || "Home";
7
+ router.addRoute(route, gallery$1);
8
+ store.addStore("gallery", gallery);
9
+ }
10
+ const ModuleGallery = {
11
+ initialize: initializeGallery,
12
+ views: {
13
+ store: {
14
+ storeGallery: gallery
15
+ },
16
+ router: {
17
+ routerGallery: gallery$1
18
+ },
19
+ components: {
20
+ // Pages
21
+ Gallery: _sfc_main,
22
+ // Sections
23
+ BackofficeGallery: _sfc_main$1
24
+ }
25
+ }
26
+ };
3
27
  export {
4
- default3 as galleryRouter,
5
- default2 as galleryStore
28
+ ModuleGallery as default
6
29
  };
7
30
  //# sourceMappingURL=gallery.client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"gallery.client.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
1
+ {"version":3,"file":"gallery.client.js","sources":["../../../../../src/modules/gallery/gallery.client.js"],"sourcesContent":["// Store\nimport * as storeGallery from './store/gallery.js';\n\n// Router\nimport routerGallery from './router/gallery.router';\n// import { createGalleryBackofficeRoutes } from './router/gallery.backoffice.router';\n\n// Views\n// Pages\nimport Gallery from './components/pages/Gallery.vue';\n\n// Sections\nimport BackofficeGallery from './components/sections/BackofficeGallery.vue';\n\n// Пример функции инициализации для модуля галереи\nfunction initializeGallery(app, store, router, options = {}) {\n const route = options.route || 'Home';\n\n // const routesGallery = createGalleryRoutes();\n // const routesGalleryBackoffice = createGalleryBackofficeRoutes();\n \n router.addRoute(route, routerGallery);\n // router.addRoute('Backoffice', routesGalleryBackoffice);\n \n store.addStore('gallery', storeGallery);\n}\n\nconst ModuleGallery = {\n initialize: initializeGallery,\n views: {\n store: {\n storeGallery\n },\n router: {\n routerGallery\n },\n components: {\n // Pages\n Gallery,\n // Sections\n BackofficeGallery\n }\n }\n}\n\nexport default ModuleGallery;"],"names":["routerGallery","storeGallery","Gallery","BackofficeGallery"],"mappings":";;;;AAeA,SAAS,kBAAkB,KAAK,OAAO,QAAQ,UAAU,CAAA,GAAI;AAC3D,QAAM,QAAQ,QAAQ,SAAS;AAK/B,SAAO,SAAS,OAAOA,SAAa;AAGpC,QAAM,SAAS,WAAWC,OAAY;AACxC;AAEK,MAAC,gBAAgB;AAAA,EACpB,YAAY;AAAA,EACZ,OAAO;AAAA,IACL,OAAO;AAAA,MACX,cAAMA;AAAAA,IACD;AAAA,IACD,QAAQ;AAAA,MACZ,eAAMD;AAAAA,IACD;AAAA,IACD,YAAY;AAAA;AAAA,MAEhB,SAAME;AAAAA;AAAAA,MAEN,mBAAMC;AAAAA,IACD;AAAA,EACF;AACH;"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const gallery = [{
3
+ const gallery = {
4
4
  name: "Gallery",
5
5
  path: "gallery",
6
6
  meta: {
@@ -10,6 +10,6 @@ const gallery = [{
10
10
  /* webpackChunkName: 'Gallery' */
11
11
  "../components/pages/Gallery.vue.cjs"
12
12
  ))
13
- }];
13
+ };
14
14
  exports.default = gallery;
15
15
  //# sourceMappingURL=gallery.router.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"gallery.router.cjs","sources":["../../../../../../src/modules/gallery/router/gallery.router.js"],"sourcesContent":["const gallery = [{\n name: 'Gallery',\n path: 'gallery',\n meta: {\n title_hide: true\n },\n component: () => import(/* webpackChunkName: 'Gallery' */ '@pf/src/modules/gallery/components/pages/Gallery.vue'),\n}];\n\nexport default gallery;"],"names":[],"mappings":";;AAAK,MAAC,UAAU,CAAC;AAAA,EACf,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,IACJ,YAAY;AAAA,EACb;AAAA,EACD,WAAW,MAAM,QAAO,QAAA,EAAA,KAAA,MAAA;AAAA;AAAA,IAAkC;AAAA,EAAsD,CAAC;AACnH,CAAC;;"}
1
+ {"version":3,"file":"gallery.router.cjs","sources":["../../../../../../src/modules/gallery/router/gallery.router.js"],"sourcesContent":["const gallery = {\n name: 'Gallery',\n path: 'gallery',\n meta: {\n title_hide: true\n },\n component: () => import(/* webpackChunkName: 'Gallery' */ '@pf/src/modules/gallery/components/pages/Gallery.vue'),\n};\n\nexport default gallery;"],"names":[],"mappings":";;AAAK,MAAC,UAAU;AAAA,EACd,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,IACJ,YAAY;AAAA,EACb;AAAA,EACD,WAAW,MAAM,QAAO,QAAA,EAAA,KAAA,MAAA;AAAA;AAAA,IAAkC;AAAA,EAAsD,CAAC;AACnH;;"}
@@ -1,4 +1,4 @@
1
- const gallery = [{
1
+ const gallery = {
2
2
  name: "Gallery",
3
3
  path: "gallery",
4
4
  meta: {
@@ -8,7 +8,7 @@ const gallery = [{
8
8
  /* webpackChunkName: 'Gallery' */
9
9
  "../components/pages/Gallery.vue.js"
10
10
  )
11
- }];
11
+ };
12
12
  export {
13
13
  gallery as default
14
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"gallery.router.js","sources":["../../../../../../src/modules/gallery/router/gallery.router.js"],"sourcesContent":["const gallery = [{\n name: 'Gallery',\n path: 'gallery',\n meta: {\n title_hide: true\n },\n component: () => import(/* webpackChunkName: 'Gallery' */ '@pf/src/modules/gallery/components/pages/Gallery.vue'),\n}];\n\nexport default gallery;"],"names":[],"mappings":"AAAK,MAAC,UAAU,CAAC;AAAA,EACf,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,IACJ,YAAY;AAAA,EACb;AAAA,EACD,WAAW,MAAM;AAAA;AAAA,IAAyC;AAAA,EAAsD;AAClH,CAAC;"}
1
+ {"version":3,"file":"gallery.router.js","sources":["../../../../../../src/modules/gallery/router/gallery.router.js"],"sourcesContent":["const gallery = {\n name: 'Gallery',\n path: 'gallery',\n meta: {\n title_hide: true\n },\n component: () => import(/* webpackChunkName: 'Gallery' */ '@pf/src/modules/gallery/components/pages/Gallery.vue'),\n};\n\nexport default gallery;"],"names":[],"mappings":"AAAK,MAAC,UAAU;AAAA,EACd,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,IACJ,YAAY;AAAA,EACb;AAAA,EACD,WAAW,MAAM;AAAA;AAAA,IAAyC;AAAA,EAAsD;AAClH;"}
@@ -14,7 +14,7 @@ const auth = require("../../../auth/views/store/auth.cjs");
14
14
  const shopcart = require("../../store/shopcart.cjs");
15
15
  const organizations = require("../../../organizations/store/organizations.cjs");
16
16
  const orders = require("../../store/orders.cjs");
17
- const users = require("../../../users/store/users.cjs");
17
+ const users = require("../../../auth/views/store/users.cjs");
18
18
  ;/* empty css */
19
19
  const _hoisted_1 = { class: "pd-thin" };
20
20
  const _hoisted_2 = { class: "gap-small mn-b-thin cols-2" };
@@ -1 +1 @@
1
- {"version":3,"file":"OrderCreate.vue.cjs","sources":["../../../../../../../src/modules/orders/components/pages/OrderCreate.vue"],"sourcesContent":["<template>\n\n<section class=\"pd-thin\">\n\n\t<!-- Ask to login -->\n\t<AskToLogin class=\"mn-b-thin\" v-if=\"auth.state.access.status === false\" /> \n\n\t<!-- Order form -->\n\t<div class=\"gap-small mn-b-thin cols-2\">\n\t\t<!-- Empty State -->\n\t\t<EmptyState \n\t\t\tv-if=\"shopcart.state.positions < 1\" \n\t\t/>\t\n\n\t\t<Succes \n\t\t\tv-if=\"order.status === true && shopcart.state.positions.length > 0\" \n\t\t\t:order=\"order\" \n\t\t/>\n\t\t<!-- Order Form -->\n\t\t<div\n\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\" \n\t\t\tclass=\"order-form col\"\n\t\t>\n\t\t\t<FormCustomerDetails\n\t\t\t\t:customer=\"orders.state.current.customer\"\n\t\t\t/>\n\t\t\t<FormDelivery \t\n\t\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t\t\t:order=\"orders.state.current\" \n\t\t\t/>\n\t\t\t<FormPayment \t\n\t\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t\t\t:order=\"orders.state.current\" \n\t\t\t/>\n\t\t</div>\n\n\t\t<!-- Order positions -->\n\t\t<div \n\t\t\tv-if=\"shopcart.state.positions.length > 0\" \n\t\t\tclass=\"bg-light pd-medium radius-big\"\n\t\t>\n\t\t\t<h4 class=\"font-second mn-b-thin\">Your Order</h4>\n\n\t\t\t<ul class=\"flex gap-thin flex-wrap mn-b-thin\">\n\t\t\t\t<CardOrderItem \n\t\t\t\t\tv-for=\"product in shopcart.state.positions\" \n\t\t\t\t\t:key=\"product._id\" \n\t\t\t\t\t:editable=\"true\" \n\t\t\t\t\t:product=\"product\" \n\t :increase=\"product => shopcart.actions.incrementItemQuantity(product._id)\"\n\t :decrease=\"product => shopcart.actions.decrementItemQuantity(product._id)\"\n\t :remove=\"product => shopcart.actions.removeProduct(product._id)\"\n\t class=\"w-100 bg-white pd-small radius-medium\"\n\t />\n\t\t\t</ul>\n\n\t\t\t<div \n\t\t\t\tclass=\"bg-main pd-thin radius-medium mn-b-thin\"\n\t\t\t>\t\n\t\t\t\t<p class=\"pd-small br-b br-solid br-black-transp-10\">\n\t\t\t\t\tSubtotal: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ cartTotalPrice }}\n\t\t\t\t</p>\n\t\t\t\t<p class=\"pd-small br-b br-solid br-black-transp-10\">\n\t\t\t\t\tDelivery: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ deliveryCost }}\n\t\t\t\t</p>\n\t\t\t\t<p class=\"pd-small h3\">\n\t\t\t\t\tTotal: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ deliveryCost + cartTotalPrice.value }}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<!-- Send order -->\n\t\t <button \n\t\t \tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t \t:disabled=\"\n\t\t errorName \n\t\t || errorPhoneOrMessenger \n\t\t || errorCity \n\t\t || errorAddress \n\t\t || errorDelivery \n\t\t || errorPayment\n\t\t \"\n\t\t @click=\"handleCreate()\" \n\t\t class=\"bg-main mn-b-small pd-small radius-big w-100 button\"\n\t\t >\n\t\t Place an Order\n\t\t </button>\n\n\t\t <p class='mn-b-thin'>\n\t\t\t\tI agree that placing the order places me under an obligation to make a payment in accordance with <a class=\"t-semi font-second t-second\" href=\"/legal/terms-of-use\" target=\"_blank\">Terms of Use.</a>\n\t\t\t</p>\n\t\t\t<p >\n\t\t\t\t\n\t\t\t</p>\n\t\t</div>\n\n\t</div>\n\n\t\n\t\n</section>\n\n</template>\n\n\n<script setup>\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Import components\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Block\nimport CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue'\n// Sections\nimport AskToLogin from '@pf/src/modules/orders/components/sections/AskToLogin.vue'\nimport Succes from '@pf/src/modules/orders/components/sections/Succes.vue'\nimport EmptyState from '@pf/src/modules/orders/components/sections/EmptyState.vue'\n\nimport FormCustomerDetails from '@pf/src/modules/orders/components/sections/FormCustomerDetails.vue'\nimport FormDelivery from '@pf/src/modules/orders/components/sections/FormDelivery.vue'\nimport FormPayment from '@pf/src/modules/orders/components/sections/FormPayment.vue'\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Import libs\n///////////////////////////////////////////////////////////////////////////////////////////////////\nimport { ref, computed, onMounted, watch } from 'vue'\nimport { useRoute,useRouter } from 'vue-router'\n// Store\nimport * as globals from '@pf/src/modules/globals/views/store/globals';\nimport * as auth from '@pf/src/modules/auth/views/store/auth';\nimport * as shopcart from '@pf/src/modules/orders/store/shopcart';\nimport * as organizations from '@pf/src/modules/organizations/store/organizations';\nimport * as orders from '@pf/src/modules/orders/store/orders';\nimport * as users from '@pf/src/modules/users/store/users';\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Variables and computed\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Accessing router and store\nconst route = useRoute()\nconst router = useRouter()\n// COMPUTED\nconst order = computed(() => orders.state.current)\nconst user = computed(() => users.state.current)\nconst cartTotalPrice = computed(() => shopcart.getters.cartTotalPrice)\nconst deliveryCost = computed(() => {\n if (orders.state.current.delivery.type === 'pickup') return 0;\n if (orders.state.current.delivery.type === 'mail') return 350;\n if (orders.state.current.delivery.type === 'courier') {\n const distance = orderOrganization.value[0]?.distance || 0;\n return Math.trunc(100 + 20 * distance - 7.5 * (distance / 10));\n }\n return 0;\n});\n\n// Computed property for total cost\nconst totalCost = computed(() => {\n return deliveryCost.value + cartTotalPrice.value.value;\n});\n// Organization\nconst orderOrganization = ref({})\n\n\nonMounted(async()=> {\n\torderOrganization.value = await organizations.actions.read({\n\t _id: shopcart.state.organization,\n\t location: globals.state.position?.location,\n\t})\n})\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// WATCHERS\n///////////////////////////////////////////////////////////////////////////////////////////////////\nwatch(() => orders.state.current.delivery.address, async (newFilterValue, oldFilterValue) => {\n\torderOrganization.value = await organizations.actions.read({\n\t _id: shopcart.state.organization,\n\t location: orders.state.current.delivery.location,\n\t})\n}, { deep: true })\n/////////////////////////////\n// Store Verification\n/////////////////////////////\nconst errorName = computed(() => {\n if (orders.state.current.customer.name?.length < 2) { return true } else { return false }\n});\n\nconst errorPhoneOrMessenger = computed(() => {\n const hasMessengerType = orders.state.current.customer.messenger?.type;\n const hasMessengerValue = orders.state.current.customer.messenger?.value?.length >\t 2;\n const hasPhone = orders.state.current.customer.number?.length > 0;\n // Ошибка, если нет ни номера телефона, ни корректного типа и значения мессенджера\n return !hasPhone && !(hasMessengerType && hasMessengerValue);\n});\n\nconst errorAddress = computed(() => {\n\tlet error = orders.state.current.delivery.type !== \"Pickup\" && orders.state.current.delivery.address < 2\n \n if (error) { return true } else { return false }\n});\n\nconst errorDelivery = computed(() => {\n if (orders.state.current.delivery.type) {return false } else {return true } \n})\n\nconst errorPayment = computed(() => {\n if (orders.state.current.payment.type) { return false } else {return true } \n})\n/////////////////////////////\n// Methods\n/////////////////////////////\nasync function handleCreate() {\n\n\torders.state.current.status = 'created';\n\n\torders.state.current.owner = {\n\t\ttarget: shopcart.state.organization,\n\t\ttype: 'organization'\n\t}\n\n\tif (auth.state.user._id) {\n\t\torders.state.current.creator = {\n\t\t\ttarget: auth.state.user._id,\n\t\t\ttype: 'User'\n\t\t}\n\t}\n\n\torders.state.current.positions = shopcart.state.positions\n\n \tconst referralCode = localStorage.getItem('referalCode');\n \n if (referralCode) {\n orders.state.current.referralCode = referralCode;\n }\n\n let order = await orders.actions.create(orders.state.current);\n\n if (order) {\n \tshopcart.actions.resetShopcart()\n\n \trouter.push({\n \t\tname: 'Order Status',\n \t\tparams: {\n \t\t\torder: order._id\n \t\t}\n \t})\n } else {\n \talert('something wrong')\n }\n}\n</script>\n\n<style lang=\"scss\">\n\n.round-wrapper {\n\tposition: relative;\n\n\t.round {\n\t\tmargin: 0;\n\t\tmargin-right: 1rem;\n\t}\n\n\tinput:checked {\n\t\tbackground: #00ff88;\n\t}\n\n\t.round-checkmark {\n\t\tposition: absolute;\n\t\twidth: 0.5rem;\n\t\theight: 0.5rem;\n\t\tbackground: white;\n\n\t\tleft: 0.5rem;\n\t\ttop: 0.5rem;\n\n\t\topacity: 1;\n\t}\n}\n</style>"],"names":["useRoute","useRouter","computed","orders.state","users.state","shopcart.getters","ref","onMounted","organizations.actions","shopcart.state","globals.state","watch","auth.state","order","orders.actions","shopcart.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2IcA,cAAAA,SAAU;AACxB,UAAM,SAASC,UAAAA,UAAW;AAE1B,UAAM,QAAQC,IAAQ,SAAC,MAAMC,OAAY,MAAC,OAAO;AACpCD,QAAAA,SAAS,MAAME,MAAW,MAAC,OAAO;AAC/C,UAAM,iBAAiBF,IAAQ,SAAC,MAAMG,SAAgB,QAAC,cAAc;AACrE,UAAM,eAAeH,IAAQ,SAAC,MAAM;;AAClC,UAAIC,OAAAA,MAAa,QAAQ,SAAS,SAAS,SAAU,QAAO;AAC5D,UAAIA,OAAAA,MAAa,QAAQ,SAAS,SAAS,OAAQ,QAAO;AAC1D,UAAIA,OAAY,MAAC,QAAQ,SAAS,SAAS,WAAW;AACpD,cAAM,aAAW,uBAAkB,MAAM,CAAC,MAAzB,mBAA4B,aAAY;AACzD,eAAO,KAAK,MAAM,MAAM,KAAK,WAAW,OAAO,WAAW,GAAG;AAAA,MAC9D;AACD,aAAO;AAAA,IACT,CAAC;AAGiBD,QAAAA,SAAS,MAAM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\n\n<section class=\"pd-thin\">\n\n\t<!-- Ask to login -->\n\t<AskToLogin class=\"mn-b-thin\" v-if=\"auth.state.access.status === false\" /> \n\n\t<!-- Order form -->\n\t<div class=\"gap-small mn-b-thin cols-2\">\n\t\t<!-- Empty State -->\n\t\t<EmptyState \n\t\t\tv-if=\"shopcart.state.positions < 1\" \n\t\t/>\t\n\n\t\t<Succes \n\t\t\tv-if=\"order.status === true && shopcart.state.positions.length > 0\" \n\t\t\t:order=\"order\" \n\t\t/>\n\t\t<!-- Order Form -->\n\t\t<div\n\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\" \n\t\t\tclass=\"order-form col\"\n\t\t>\n\t\t\t<FormCustomerDetails\n\t\t\t\t:customer=\"orders.state.current.customer\"\n\t\t\t/>\n\t\t\t<FormDelivery \t\n\t\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t\t\t:order=\"orders.state.current\" \n\t\t\t/>\n\t\t\t<FormPayment \t\n\t\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t\t\t:order=\"orders.state.current\" \n\t\t\t/>\n\t\t</div>\n\n\t\t<!-- Order positions -->\n\t\t<div \n\t\t\tv-if=\"shopcart.state.positions.length > 0\" \n\t\t\tclass=\"bg-light pd-medium radius-big\"\n\t\t>\n\t\t\t<h4 class=\"font-second mn-b-thin\">Your Order</h4>\n\n\t\t\t<ul class=\"flex gap-thin flex-wrap mn-b-thin\">\n\t\t\t\t<CardOrderItem \n\t\t\t\t\tv-for=\"product in shopcart.state.positions\" \n\t\t\t\t\t:key=\"product._id\" \n\t\t\t\t\t:editable=\"true\" \n\t\t\t\t\t:product=\"product\" \n\t :increase=\"product => shopcart.actions.incrementItemQuantity(product._id)\"\n\t :decrease=\"product => shopcart.actions.decrementItemQuantity(product._id)\"\n\t :remove=\"product => shopcart.actions.removeProduct(product._id)\"\n\t class=\"w-100 bg-white pd-small radius-medium\"\n\t />\n\t\t\t</ul>\n\n\t\t\t<div \n\t\t\t\tclass=\"bg-main pd-thin radius-medium mn-b-thin\"\n\t\t\t>\t\n\t\t\t\t<p class=\"pd-small br-b br-solid br-black-transp-10\">\n\t\t\t\t\tSubtotal: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ cartTotalPrice }}\n\t\t\t\t</p>\n\t\t\t\t<p class=\"pd-small br-b br-solid br-black-transp-10\">\n\t\t\t\t\tDelivery: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ deliveryCost }}\n\t\t\t\t</p>\n\t\t\t\t<p class=\"pd-small h3\">\n\t\t\t\t\tTotal: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ deliveryCost + cartTotalPrice.value }}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<!-- Send order -->\n\t\t <button \n\t\t \tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t \t:disabled=\"\n\t\t errorName \n\t\t || errorPhoneOrMessenger \n\t\t || errorCity \n\t\t || errorAddress \n\t\t || errorDelivery \n\t\t || errorPayment\n\t\t \"\n\t\t @click=\"handleCreate()\" \n\t\t class=\"bg-main mn-b-small pd-small radius-big w-100 button\"\n\t\t >\n\t\t Place an Order\n\t\t </button>\n\n\t\t <p class='mn-b-thin'>\n\t\t\t\tI agree that placing the order places me under an obligation to make a payment in accordance with <a class=\"t-semi font-second t-second\" href=\"/legal/terms-of-use\" target=\"_blank\">Terms of Use.</a>\n\t\t\t</p>\n\t\t\t<p >\n\t\t\t\t\n\t\t\t</p>\n\t\t</div>\n\n\t</div>\n\n\t\n\t\n</section>\n\n</template>\n\n\n<script setup>\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Import components\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Block\nimport CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue'\n// Sections\nimport AskToLogin from '@pf/src/modules/orders/components/sections/AskToLogin.vue'\nimport Succes from '@pf/src/modules/orders/components/sections/Succes.vue'\nimport EmptyState from '@pf/src/modules/orders/components/sections/EmptyState.vue'\n\nimport FormCustomerDetails from '@pf/src/modules/orders/components/sections/FormCustomerDetails.vue'\nimport FormDelivery from '@pf/src/modules/orders/components/sections/FormDelivery.vue'\nimport FormPayment from '@pf/src/modules/orders/components/sections/FormPayment.vue'\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Import libs\n///////////////////////////////////////////////////////////////////////////////////////////////////\nimport { ref, computed, onMounted, watch } from 'vue'\nimport { useRoute,useRouter } from 'vue-router'\n// Store\nimport * as globals from '@pf/src/modules/globals/views/store/globals';\nimport * as auth from '@pf/src/modules/auth/views/store/auth';\nimport * as shopcart from '@pf/src/modules/orders/store/shopcart';\nimport * as organizations from '@pf/src/modules/organizations/store/organizations';\nimport * as orders from '@pf/src/modules/orders/store/orders';\nimport * as users from '@pf/src/modules/auth/views/store/users';\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Variables and computed\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Accessing router and store\nconst route = useRoute()\nconst router = useRouter()\n// COMPUTED\nconst order = computed(() => orders.state.current)\nconst user = computed(() => users.state.current)\nconst cartTotalPrice = computed(() => shopcart.getters.cartTotalPrice)\nconst deliveryCost = computed(() => {\n if (orders.state.current.delivery.type === 'pickup') return 0;\n if (orders.state.current.delivery.type === 'mail') return 350;\n if (orders.state.current.delivery.type === 'courier') {\n const distance = orderOrganization.value[0]?.distance || 0;\n return Math.trunc(100 + 20 * distance - 7.5 * (distance / 10));\n }\n return 0;\n});\n\n// Computed property for total cost\nconst totalCost = computed(() => {\n return deliveryCost.value + cartTotalPrice.value.value;\n});\n// Organization\nconst orderOrganization = ref({})\n\n\nonMounted(async()=> {\n\torderOrganization.value = await organizations.actions.read({\n\t _id: shopcart.state.organization,\n\t location: globals.state.position?.location,\n\t})\n})\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// WATCHERS\n///////////////////////////////////////////////////////////////////////////////////////////////////\nwatch(() => orders.state.current.delivery.address, async (newFilterValue, oldFilterValue) => {\n\torderOrganization.value = await organizations.actions.read({\n\t _id: shopcart.state.organization,\n\t location: orders.state.current.delivery.location,\n\t})\n}, { deep: true })\n/////////////////////////////\n// Store Verification\n/////////////////////////////\nconst errorName = computed(() => {\n if (orders.state.current.customer.name?.length < 2) { return true } else { return false }\n});\n\nconst errorPhoneOrMessenger = computed(() => {\n const hasMessengerType = orders.state.current.customer.messenger?.type;\n const hasMessengerValue = orders.state.current.customer.messenger?.value?.length >\t 2;\n const hasPhone = orders.state.current.customer.number?.length > 0;\n // Ошибка, если нет ни номера телефона, ни корректного типа и значения мессенджера\n return !hasPhone && !(hasMessengerType && hasMessengerValue);\n});\n\nconst errorAddress = computed(() => {\n\tlet error = orders.state.current.delivery.type !== \"Pickup\" && orders.state.current.delivery.address < 2\n \n if (error) { return true } else { return false }\n});\n\nconst errorDelivery = computed(() => {\n if (orders.state.current.delivery.type) {return false } else {return true } \n})\n\nconst errorPayment = computed(() => {\n if (orders.state.current.payment.type) { return false } else {return true } \n})\n/////////////////////////////\n// Methods\n/////////////////////////////\nasync function handleCreate() {\n\n\torders.state.current.status = 'created';\n\n\torders.state.current.owner = {\n\t\ttarget: shopcart.state.organization,\n\t\ttype: 'organization'\n\t}\n\n\tif (auth.state.user._id) {\n\t\torders.state.current.creator = {\n\t\t\ttarget: auth.state.user._id,\n\t\t\ttype: 'User'\n\t\t}\n\t}\n\n\torders.state.current.positions = shopcart.state.positions\n\n \tconst referralCode = localStorage.getItem('referalCode');\n \n if (referralCode) {\n orders.state.current.referralCode = referralCode;\n }\n\n let order = await orders.actions.create(orders.state.current);\n\n if (order) {\n \tshopcart.actions.resetShopcart()\n\n \trouter.push({\n \t\tname: 'Order Status',\n \t\tparams: {\n \t\t\torder: order._id\n \t\t}\n \t})\n } else {\n \talert('something wrong')\n }\n}\n</script>\n\n<style lang=\"scss\">\n\n.round-wrapper {\n\tposition: relative;\n\n\t.round {\n\t\tmargin: 0;\n\t\tmargin-right: 1rem;\n\t}\n\n\tinput:checked {\n\t\tbackground: #00ff88;\n\t}\n\n\t.round-checkmark {\n\t\tposition: absolute;\n\t\twidth: 0.5rem;\n\t\theight: 0.5rem;\n\t\tbackground: white;\n\n\t\tleft: 0.5rem;\n\t\ttop: 0.5rem;\n\n\t\topacity: 1;\n\t}\n}\n</style>"],"names":["useRoute","useRouter","computed","orders.state","users.state","shopcart.getters","ref","onMounted","organizations.actions","shopcart.state","globals.state","watch","auth.state","order","orders.actions","shopcart.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2IcA,cAAAA,SAAU;AACxB,UAAM,SAASC,UAAAA,UAAW;AAE1B,UAAM,QAAQC,IAAQ,SAAC,MAAMC,OAAY,MAAC,OAAO;AACpCD,QAAAA,SAAS,MAAME,MAAW,MAAC,OAAO;AAC/C,UAAM,iBAAiBF,IAAQ,SAAC,MAAMG,SAAgB,QAAC,cAAc;AACrE,UAAM,eAAeH,IAAQ,SAAC,MAAM;;AAClC,UAAIC,OAAAA,MAAa,QAAQ,SAAS,SAAS,SAAU,QAAO;AAC5D,UAAIA,OAAAA,MAAa,QAAQ,SAAS,SAAS,OAAQ,QAAO;AAC1D,UAAIA,OAAY,MAAC,QAAQ,SAAS,SAAS,WAAW;AACpD,cAAM,aAAW,uBAAkB,MAAM,CAAC,MAAzB,mBAA4B,aAAY;AACzD,eAAO,KAAK,MAAM,MAAM,KAAK,WAAW,OAAO,WAAW,GAAG;AAAA,MAC9D;AACD,aAAO;AAAA,IACT,CAAC;AAGiBD,QAAAA,SAAS,MAAM;AAC/B,aAAO,aAAa,QAAQ,eAAe,MAAM;AAAA,IACnD,CAAC;AAED,UAAM,oBAAoBI,IAAG,IAAC,EAAE;AAGhCC,QAAAA,UAAU,YAAU;;AACnB,wBAAkB,QAAQ,MAAMC,cAAqB,QAAC,KAAK;AAAA,QACzD,KAAKC,SAAc,MAAC;AAAA,QACpB,WAAUC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AAClC,UAAIC,OAAY,MAAC,QAAQ,QAAQ,MAAM;AAAE,eAAO;AAAA,MAAK,OAAQ;AAAC,eAAO;AAAA,MAAM;AAAA,IAC7E,CAAC;AAID,mBAAe,eAAe;AAE7BA,mBAAa,QAAQ,SAAS;AAE9BA,aAAY,MAAC,QAAQ,QAAQ;AAAA,QAC5B,QAAQM,SAAc,MAAC;AAAA,QACvB,MAAM;AAAA,MACN;AAED,UAAIG,KAAU,MAAC,KAAK,KAAK;AACxBT,eAAY,MAAC,QAAQ,UAAU;AAAA,UAC9B,QAAQS,KAAAA,MAAW,KAAK;AAAA,UACxB,MAAM;AAAA,QACN;AAAA,MACD;AAEDT,aAAAA,MAAa,QAAQ,YAAYM,SAAAA,MAAe;AAE/C,YAAM,eAAe,aAAa,QAAQ,aAAa;AAEvD,UAAI,cAAc;AAChBN,qBAAa,QAAQ,eAAe;AAAA,MACrC;AAED,UAAIU,SAAQ,MAAMC,OAAc,QAAC,OAAOX,OAAY,MAAC,OAAO;AAE5D,UAAIU,QAAO;AACVE,iBAAAA,QAAiB,cAAe;AAEhC,eAAO,KAAK;AAAA,UACX,MAAM;AAAA,UACN,QAAQ;AAAA,YACP,OAAOF,OAAM;AAAA,UACb;AAAA,QACL,CAAI;AAAA,MACJ,OAAS;AACN,cAAM,iBAAiB;AAAA,MACvB;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -12,7 +12,7 @@ import { state as state$4 } from "../../../auth/views/store/auth.js";
12
12
  import { getters, state as state$2, actions as actions$1 } from "../../store/shopcart.js";
13
13
  import { actions } from "../../../organizations/store/organizations.js";
14
14
  import { state, actions as actions$2 } from "../../store/orders.js";
15
- import { state as state$1 } from "../../../users/store/users.js";
15
+ import { state as state$1 } from "../../../auth/views/store/users.js";
16
16
  /* empty css */
17
17
  const _hoisted_1 = { class: "pd-thin" };
18
18
  const _hoisted_2 = { class: "gap-small mn-b-thin cols-2" };
@@ -1 +1 @@
1
- {"version":3,"file":"OrderCreate.vue.js","sources":["../../../../../../../src/modules/orders/components/pages/OrderCreate.vue"],"sourcesContent":["<template>\n\n<section class=\"pd-thin\">\n\n\t<!-- Ask to login -->\n\t<AskToLogin class=\"mn-b-thin\" v-if=\"auth.state.access.status === false\" /> \n\n\t<!-- Order form -->\n\t<div class=\"gap-small mn-b-thin cols-2\">\n\t\t<!-- Empty State -->\n\t\t<EmptyState \n\t\t\tv-if=\"shopcart.state.positions < 1\" \n\t\t/>\t\n\n\t\t<Succes \n\t\t\tv-if=\"order.status === true && shopcart.state.positions.length > 0\" \n\t\t\t:order=\"order\" \n\t\t/>\n\t\t<!-- Order Form -->\n\t\t<div\n\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\" \n\t\t\tclass=\"order-form col\"\n\t\t>\n\t\t\t<FormCustomerDetails\n\t\t\t\t:customer=\"orders.state.current.customer\"\n\t\t\t/>\n\t\t\t<FormDelivery \t\n\t\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t\t\t:order=\"orders.state.current\" \n\t\t\t/>\n\t\t\t<FormPayment \t\n\t\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t\t\t:order=\"orders.state.current\" \n\t\t\t/>\n\t\t</div>\n\n\t\t<!-- Order positions -->\n\t\t<div \n\t\t\tv-if=\"shopcart.state.positions.length > 0\" \n\t\t\tclass=\"bg-light pd-medium radius-big\"\n\t\t>\n\t\t\t<h4 class=\"font-second mn-b-thin\">Your Order</h4>\n\n\t\t\t<ul class=\"flex gap-thin flex-wrap mn-b-thin\">\n\t\t\t\t<CardOrderItem \n\t\t\t\t\tv-for=\"product in shopcart.state.positions\" \n\t\t\t\t\t:key=\"product._id\" \n\t\t\t\t\t:editable=\"true\" \n\t\t\t\t\t:product=\"product\" \n\t :increase=\"product => shopcart.actions.incrementItemQuantity(product._id)\"\n\t :decrease=\"product => shopcart.actions.decrementItemQuantity(product._id)\"\n\t :remove=\"product => shopcart.actions.removeProduct(product._id)\"\n\t class=\"w-100 bg-white pd-small radius-medium\"\n\t />\n\t\t\t</ul>\n\n\t\t\t<div \n\t\t\t\tclass=\"bg-main pd-thin radius-medium mn-b-thin\"\n\t\t\t>\t\n\t\t\t\t<p class=\"pd-small br-b br-solid br-black-transp-10\">\n\t\t\t\t\tSubtotal: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ cartTotalPrice }}\n\t\t\t\t</p>\n\t\t\t\t<p class=\"pd-small br-b br-solid br-black-transp-10\">\n\t\t\t\t\tDelivery: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ deliveryCost }}\n\t\t\t\t</p>\n\t\t\t\t<p class=\"pd-small h3\">\n\t\t\t\t\tTotal: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ deliveryCost + cartTotalPrice.value }}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<!-- Send order -->\n\t\t <button \n\t\t \tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t \t:disabled=\"\n\t\t errorName \n\t\t || errorPhoneOrMessenger \n\t\t || errorCity \n\t\t || errorAddress \n\t\t || errorDelivery \n\t\t || errorPayment\n\t\t \"\n\t\t @click=\"handleCreate()\" \n\t\t class=\"bg-main mn-b-small pd-small radius-big w-100 button\"\n\t\t >\n\t\t Place an Order\n\t\t </button>\n\n\t\t <p class='mn-b-thin'>\n\t\t\t\tI agree that placing the order places me under an obligation to make a payment in accordance with <a class=\"t-semi font-second t-second\" href=\"/legal/terms-of-use\" target=\"_blank\">Terms of Use.</a>\n\t\t\t</p>\n\t\t\t<p >\n\t\t\t\t\n\t\t\t</p>\n\t\t</div>\n\n\t</div>\n\n\t\n\t\n</section>\n\n</template>\n\n\n<script setup>\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Import components\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Block\nimport CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue'\n// Sections\nimport AskToLogin from '@pf/src/modules/orders/components/sections/AskToLogin.vue'\nimport Succes from '@pf/src/modules/orders/components/sections/Succes.vue'\nimport EmptyState from '@pf/src/modules/orders/components/sections/EmptyState.vue'\n\nimport FormCustomerDetails from '@pf/src/modules/orders/components/sections/FormCustomerDetails.vue'\nimport FormDelivery from '@pf/src/modules/orders/components/sections/FormDelivery.vue'\nimport FormPayment from '@pf/src/modules/orders/components/sections/FormPayment.vue'\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Import libs\n///////////////////////////////////////////////////////////////////////////////////////////////////\nimport { ref, computed, onMounted, watch } from 'vue'\nimport { useRoute,useRouter } from 'vue-router'\n// Store\nimport * as globals from '@pf/src/modules/globals/views/store/globals';\nimport * as auth from '@pf/src/modules/auth/views/store/auth';\nimport * as shopcart from '@pf/src/modules/orders/store/shopcart';\nimport * as organizations from '@pf/src/modules/organizations/store/organizations';\nimport * as orders from '@pf/src/modules/orders/store/orders';\nimport * as users from '@pf/src/modules/users/store/users';\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Variables and computed\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Accessing router and store\nconst route = useRoute()\nconst router = useRouter()\n// COMPUTED\nconst order = computed(() => orders.state.current)\nconst user = computed(() => users.state.current)\nconst cartTotalPrice = computed(() => shopcart.getters.cartTotalPrice)\nconst deliveryCost = computed(() => {\n if (orders.state.current.delivery.type === 'pickup') return 0;\n if (orders.state.current.delivery.type === 'mail') return 350;\n if (orders.state.current.delivery.type === 'courier') {\n const distance = orderOrganization.value[0]?.distance || 0;\n return Math.trunc(100 + 20 * distance - 7.5 * (distance / 10));\n }\n return 0;\n});\n\n// Computed property for total cost\nconst totalCost = computed(() => {\n return deliveryCost.value + cartTotalPrice.value.value;\n});\n// Organization\nconst orderOrganization = ref({})\n\n\nonMounted(async()=> {\n\torderOrganization.value = await organizations.actions.read({\n\t _id: shopcart.state.organization,\n\t location: globals.state.position?.location,\n\t})\n})\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// WATCHERS\n///////////////////////////////////////////////////////////////////////////////////////////////////\nwatch(() => orders.state.current.delivery.address, async (newFilterValue, oldFilterValue) => {\n\torderOrganization.value = await organizations.actions.read({\n\t _id: shopcart.state.organization,\n\t location: orders.state.current.delivery.location,\n\t})\n}, { deep: true })\n/////////////////////////////\n// Store Verification\n/////////////////////////////\nconst errorName = computed(() => {\n if (orders.state.current.customer.name?.length < 2) { return true } else { return false }\n});\n\nconst errorPhoneOrMessenger = computed(() => {\n const hasMessengerType = orders.state.current.customer.messenger?.type;\n const hasMessengerValue = orders.state.current.customer.messenger?.value?.length >\t 2;\n const hasPhone = orders.state.current.customer.number?.length > 0;\n // Ошибка, если нет ни номера телефона, ни корректного типа и значения мессенджера\n return !hasPhone && !(hasMessengerType && hasMessengerValue);\n});\n\nconst errorAddress = computed(() => {\n\tlet error = orders.state.current.delivery.type !== \"Pickup\" && orders.state.current.delivery.address < 2\n \n if (error) { return true } else { return false }\n});\n\nconst errorDelivery = computed(() => {\n if (orders.state.current.delivery.type) {return false } else {return true } \n})\n\nconst errorPayment = computed(() => {\n if (orders.state.current.payment.type) { return false } else {return true } \n})\n/////////////////////////////\n// Methods\n/////////////////////////////\nasync function handleCreate() {\n\n\torders.state.current.status = 'created';\n\n\torders.state.current.owner = {\n\t\ttarget: shopcart.state.organization,\n\t\ttype: 'organization'\n\t}\n\n\tif (auth.state.user._id) {\n\t\torders.state.current.creator = {\n\t\t\ttarget: auth.state.user._id,\n\t\t\ttype: 'User'\n\t\t}\n\t}\n\n\torders.state.current.positions = shopcart.state.positions\n\n \tconst referralCode = localStorage.getItem('referalCode');\n \n if (referralCode) {\n orders.state.current.referralCode = referralCode;\n }\n\n let order = await orders.actions.create(orders.state.current);\n\n if (order) {\n \tshopcart.actions.resetShopcart()\n\n \trouter.push({\n \t\tname: 'Order Status',\n \t\tparams: {\n \t\t\torder: order._id\n \t\t}\n \t})\n } else {\n \talert('something wrong')\n }\n}\n</script>\n\n<style lang=\"scss\">\n\n.round-wrapper {\n\tposition: relative;\n\n\t.round {\n\t\tmargin: 0;\n\t\tmargin-right: 1rem;\n\t}\n\n\tinput:checked {\n\t\tbackground: #00ff88;\n\t}\n\n\t.round-checkmark {\n\t\tposition: absolute;\n\t\twidth: 0.5rem;\n\t\theight: 0.5rem;\n\t\tbackground: white;\n\n\t\tleft: 0.5rem;\n\t\ttop: 0.5rem;\n\n\t\topacity: 1;\n\t}\n}\n</style>"],"names":["orders.state","users.state","shopcart.getters","organizations.actions","shopcart.state","globals.state","auth.state","order","orders.actions","shopcart.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2Ic,aAAU;AACxB,UAAM,SAAS,UAAW;AAE1B,UAAM,QAAQ,SAAS,MAAMA,MAAa,OAAO;AACpC,aAAS,MAAMC,QAAY,OAAO;AAC/C,UAAM,iBAAiB,SAAS,MAAMC,QAAiB,cAAc;AACrE,UAAM,eAAe,SAAS,MAAM;;AAClC,UAAIF,MAAa,QAAQ,SAAS,SAAS,SAAU,QAAO;AAC5D,UAAIA,MAAa,QAAQ,SAAS,SAAS,OAAQ,QAAO;AAC1D,UAAIA,MAAa,QAAQ,SAAS,SAAS,WAAW;AACpD,cAAM,aAAW,uBAAkB,MAAM,CAAC,MAAzB,mBAA4B,aAAY;AACzD,eAAO,KAAK,MAAM,MAAM,KAAK,WAAW,OAAO,WAAW,GAAG;AAAA,MAC9D;AACD,aAAO;AAAA,IACT,CAAC;AAGiB,aAAS,MAAM;AAC/B,aAAO,aAAa,QAAQ,eAAe,MAAM;AAAA,IACnD,CAAC;AAED,UAAM,oBAAoB,IAAI,EAAE;AAGhC,cAAU,YAAU;;AACnB,wBAAkB,QAAQ,MAAMG,QAAsB,KAAK;AAAA,QACzD,KAAKC,QAAe;AAAA,QACpB,WAAUC,aAAc,aAAdA,mBAAwB;AAAA,MACrC,CAAE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S;AAE9BA,YAAa,QAAQ,QAAQ;AAAA,QAC5B,QAAQI,QAAe;AAAA,QACvB,MAAM;AAAA,MACN;AAED,UAAIE,QAAW,KAAK,KAAK;AACxBN,cAAa,QAAQ,UAAU;AAAA,UAC9B,QAAQM,QAAW,KAAK;AAAA,UACxB,MAAM;AAAA,QACN;AAAA,MACD;AAEDN,YAAa,QAAQ,YAAYI,QAAe;AAE/C,YAAM,eAAe,aAAa,QAAQ,aAAa;AAEvD,UAAI,cAAc;AAChBJ,cAAa,QAAQ,eAAe;AAAA,MACrC;AAED,UAAIO,SAAQ,MAAMC,UAAe,OAAOR,MAAa,OAAO;AAE5D,UAAIO,QAAO;AACVE,kBAAiB,cAAe;AAEhC,eAAO,KAAK;AAAA,UACX,MAAM;AAAA,UACN,QAAQ;AAAA,YACP,OAAOF,OAAM;AAAA,UACb;AAAA,QACL,CAAI;AAAA,MACJ,OAAS;AACN,cAAM,iBAAiB;AAAA,MACvB;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"OrderCreate.vue.js","sources":["../../../../../../../src/modules/orders/components/pages/OrderCreate.vue"],"sourcesContent":["<template>\n\n<section class=\"pd-thin\">\n\n\t<!-- Ask to login -->\n\t<AskToLogin class=\"mn-b-thin\" v-if=\"auth.state.access.status === false\" /> \n\n\t<!-- Order form -->\n\t<div class=\"gap-small mn-b-thin cols-2\">\n\t\t<!-- Empty State -->\n\t\t<EmptyState \n\t\t\tv-if=\"shopcart.state.positions < 1\" \n\t\t/>\t\n\n\t\t<Succes \n\t\t\tv-if=\"order.status === true && shopcart.state.positions.length > 0\" \n\t\t\t:order=\"order\" \n\t\t/>\n\t\t<!-- Order Form -->\n\t\t<div\n\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\" \n\t\t\tclass=\"order-form col\"\n\t\t>\n\t\t\t<FormCustomerDetails\n\t\t\t\t:customer=\"orders.state.current.customer\"\n\t\t\t/>\n\t\t\t<FormDelivery \t\n\t\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t\t\t:order=\"orders.state.current\" \n\t\t\t/>\n\t\t\t<FormPayment \t\n\t\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t\t\t:order=\"orders.state.current\" \n\t\t\t/>\n\t\t</div>\n\n\t\t<!-- Order positions -->\n\t\t<div \n\t\t\tv-if=\"shopcart.state.positions.length > 0\" \n\t\t\tclass=\"bg-light pd-medium radius-big\"\n\t\t>\n\t\t\t<h4 class=\"font-second mn-b-thin\">Your Order</h4>\n\n\t\t\t<ul class=\"flex gap-thin flex-wrap mn-b-thin\">\n\t\t\t\t<CardOrderItem \n\t\t\t\t\tv-for=\"product in shopcart.state.positions\" \n\t\t\t\t\t:key=\"product._id\" \n\t\t\t\t\t:editable=\"true\" \n\t\t\t\t\t:product=\"product\" \n\t :increase=\"product => shopcart.actions.incrementItemQuantity(product._id)\"\n\t :decrease=\"product => shopcart.actions.decrementItemQuantity(product._id)\"\n\t :remove=\"product => shopcart.actions.removeProduct(product._id)\"\n\t class=\"w-100 bg-white pd-small radius-medium\"\n\t />\n\t\t\t</ul>\n\n\t\t\t<div \n\t\t\t\tclass=\"bg-main pd-thin radius-medium mn-b-thin\"\n\t\t\t>\t\n\t\t\t\t<p class=\"pd-small br-b br-solid br-black-transp-10\">\n\t\t\t\t\tSubtotal: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ cartTotalPrice }}\n\t\t\t\t</p>\n\t\t\t\t<p class=\"pd-small br-b br-solid br-black-transp-10\">\n\t\t\t\t\tDelivery: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ deliveryCost }}\n\t\t\t\t</p>\n\t\t\t\t<p class=\"pd-small h3\">\n\t\t\t\t\tTotal: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ deliveryCost + cartTotalPrice.value }}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<!-- Send order -->\n\t\t <button \n\t\t \tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t \t:disabled=\"\n\t\t errorName \n\t\t || errorPhoneOrMessenger \n\t\t || errorCity \n\t\t || errorAddress \n\t\t || errorDelivery \n\t\t || errorPayment\n\t\t \"\n\t\t @click=\"handleCreate()\" \n\t\t class=\"bg-main mn-b-small pd-small radius-big w-100 button\"\n\t\t >\n\t\t Place an Order\n\t\t </button>\n\n\t\t <p class='mn-b-thin'>\n\t\t\t\tI agree that placing the order places me under an obligation to make a payment in accordance with <a class=\"t-semi font-second t-second\" href=\"/legal/terms-of-use\" target=\"_blank\">Terms of Use.</a>\n\t\t\t</p>\n\t\t\t<p >\n\t\t\t\t\n\t\t\t</p>\n\t\t</div>\n\n\t</div>\n\n\t\n\t\n</section>\n\n</template>\n\n\n<script setup>\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Import components\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Block\nimport CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue'\n// Sections\nimport AskToLogin from '@pf/src/modules/orders/components/sections/AskToLogin.vue'\nimport Succes from '@pf/src/modules/orders/components/sections/Succes.vue'\nimport EmptyState from '@pf/src/modules/orders/components/sections/EmptyState.vue'\n\nimport FormCustomerDetails from '@pf/src/modules/orders/components/sections/FormCustomerDetails.vue'\nimport FormDelivery from '@pf/src/modules/orders/components/sections/FormDelivery.vue'\nimport FormPayment from '@pf/src/modules/orders/components/sections/FormPayment.vue'\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Import libs\n///////////////////////////////////////////////////////////////////////////////////////////////////\nimport { ref, computed, onMounted, watch } from 'vue'\nimport { useRoute,useRouter } from 'vue-router'\n// Store\nimport * as globals from '@pf/src/modules/globals/views/store/globals';\nimport * as auth from '@pf/src/modules/auth/views/store/auth';\nimport * as shopcart from '@pf/src/modules/orders/store/shopcart';\nimport * as organizations from '@pf/src/modules/organizations/store/organizations';\nimport * as orders from '@pf/src/modules/orders/store/orders';\nimport * as users from '@pf/src/modules/auth/views/store/users';\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Variables and computed\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Accessing router and store\nconst route = useRoute()\nconst router = useRouter()\n// COMPUTED\nconst order = computed(() => orders.state.current)\nconst user = computed(() => users.state.current)\nconst cartTotalPrice = computed(() => shopcart.getters.cartTotalPrice)\nconst deliveryCost = computed(() => {\n if (orders.state.current.delivery.type === 'pickup') return 0;\n if (orders.state.current.delivery.type === 'mail') return 350;\n if (orders.state.current.delivery.type === 'courier') {\n const distance = orderOrganization.value[0]?.distance || 0;\n return Math.trunc(100 + 20 * distance - 7.5 * (distance / 10));\n }\n return 0;\n});\n\n// Computed property for total cost\nconst totalCost = computed(() => {\n return deliveryCost.value + cartTotalPrice.value.value;\n});\n// Organization\nconst orderOrganization = ref({})\n\n\nonMounted(async()=> {\n\torderOrganization.value = await organizations.actions.read({\n\t _id: shopcart.state.organization,\n\t location: globals.state.position?.location,\n\t})\n})\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// WATCHERS\n///////////////////////////////////////////////////////////////////////////////////////////////////\nwatch(() => orders.state.current.delivery.address, async (newFilterValue, oldFilterValue) => {\n\torderOrganization.value = await organizations.actions.read({\n\t _id: shopcart.state.organization,\n\t location: orders.state.current.delivery.location,\n\t})\n}, { deep: true })\n/////////////////////////////\n// Store Verification\n/////////////////////////////\nconst errorName = computed(() => {\n if (orders.state.current.customer.name?.length < 2) { return true } else { return false }\n});\n\nconst errorPhoneOrMessenger = computed(() => {\n const hasMessengerType = orders.state.current.customer.messenger?.type;\n const hasMessengerValue = orders.state.current.customer.messenger?.value?.length >\t 2;\n const hasPhone = orders.state.current.customer.number?.length > 0;\n // Ошибка, если нет ни номера телефона, ни корректного типа и значения мессенджера\n return !hasPhone && !(hasMessengerType && hasMessengerValue);\n});\n\nconst errorAddress = computed(() => {\n\tlet error = orders.state.current.delivery.type !== \"Pickup\" && orders.state.current.delivery.address < 2\n \n if (error) { return true } else { return false }\n});\n\nconst errorDelivery = computed(() => {\n if (orders.state.current.delivery.type) {return false } else {return true } \n})\n\nconst errorPayment = computed(() => {\n if (orders.state.current.payment.type) { return false } else {return true } \n})\n/////////////////////////////\n// Methods\n/////////////////////////////\nasync function handleCreate() {\n\n\torders.state.current.status = 'created';\n\n\torders.state.current.owner = {\n\t\ttarget: shopcart.state.organization,\n\t\ttype: 'organization'\n\t}\n\n\tif (auth.state.user._id) {\n\t\torders.state.current.creator = {\n\t\t\ttarget: auth.state.user._id,\n\t\t\ttype: 'User'\n\t\t}\n\t}\n\n\torders.state.current.positions = shopcart.state.positions\n\n \tconst referralCode = localStorage.getItem('referalCode');\n \n if (referralCode) {\n orders.state.current.referralCode = referralCode;\n }\n\n let order = await orders.actions.create(orders.state.current);\n\n if (order) {\n \tshopcart.actions.resetShopcart()\n\n \trouter.push({\n \t\tname: 'Order Status',\n \t\tparams: {\n \t\t\torder: order._id\n \t\t}\n \t})\n } else {\n \talert('something wrong')\n }\n}\n</script>\n\n<style lang=\"scss\">\n\n.round-wrapper {\n\tposition: relative;\n\n\t.round {\n\t\tmargin: 0;\n\t\tmargin-right: 1rem;\n\t}\n\n\tinput:checked {\n\t\tbackground: #00ff88;\n\t}\n\n\t.round-checkmark {\n\t\tposition: absolute;\n\t\twidth: 0.5rem;\n\t\theight: 0.5rem;\n\t\tbackground: white;\n\n\t\tleft: 0.5rem;\n\t\ttop: 0.5rem;\n\n\t\topacity: 1;\n\t}\n}\n</style>"],"names":["orders.state","users.state","shopcart.getters","organizations.actions","shopcart.state","globals.state","auth.state","order","orders.actions","shopcart.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2Ic,aAAU;AACxB,UAAM,SAAS,UAAW;AAE1B,UAAM,QAAQ,SAAS,MAAMA,MAAa,OAAO;AACpC,aAA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cAAM,iBAAiB;AAAA,MACvB;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -11,7 +11,7 @@ const Feed = require("../../../../components/Feed/Feed.vue.cjs");
11
11
  const CardOrderItem = require("../blocks/CardOrderItem.vue.cjs");
12
12
  ;/* empty css */
13
13
  ;/* empty css */
14
- const CardUser = require("../../../users/components/blocks/CardUser.vue.cjs");
14
+ const CardUser = require("../../../auth/views/components/blocks/CardUser.vue.cjs");
15
15
  const FormAddCustomer = require("../sections/FormAddCustomer.vue.cjs");
16
16
  const FormDelivery = require("../sections/FormDelivery.vue.cjs");
17
17
  const FormPayment = require("../sections/FormPayment.vue.cjs");
@@ -1 +1 @@
1
- {"version":3,"file":"OrderCreateBackoffice.vue.cjs","sources":["../../../../../../../src/modules/orders/components/pages/OrderCreateBackoffice.vue"],"sourcesContent":["<template>\n <div class=\"h-100 flex flex-column pd-thin\">\n <Block class=\"mn-b-thin\">\n <header class=\"flex-v-center flex-nowrap flex\">\n <h2 class=\"mn-r-auto\">Create Order</h2>\n <Button \n :submit=\"onSubmit\"\n :callback=\"redirectTo\"\n class=\"pd-small radius-big bg-main t-black uppercase t-medium\"\n >\n Add Order \n </Button>\n </header>\n </Block>\n\n <Tab \n v-model:selected=\"tabOrderCreate\"\n :tabs=\"[\n {name: 'Positions', value: 'positions'},\n {name: 'Customer', value: 'customer'},\n {name: 'Delivery', value: 'delivery'},\n {name: 'Payment', value: 'payment'}\n ]\"\n class=\"t-medium radius-medium bg-light mn-b-small\"\n />\n\n <Popup \n @close-popup=\"closeProductsPopup\" \n :isPopupOpen=\"isOpenProductsPopup\"\n class=\"bg-white w-min-30r w-max-30r h-max-100 flex flex-column radius-big pd-medium pos-relative\"\n >\n\n <h3 class=\"mn-b-small\">Add to order</h3>\n\n <div class=\"bg-light h-max-100 mn-b-thin o-scroll pd-medium radius-big\">\n <Feed\n :search=\"{\n placeholder: 'Search products...',\n class: 'bg-white mn-b-thin'\n }\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no such products available.'\n }\n }\"\n :store=\"{\n read: (options) => products.actions.read(options),\n state: null\n }\"\n :options=\"{\n organization: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"\"\n >\n <CardOrderItem\n v-for=\"(product, index) in items\" :key=\"product._id\"\n :editable=\"false\" \n :product=\"product\" \n @click=\"() => { \n let p = { ...product };\n p.quantity = 1;\n globals.actions.add(orders.state.current.positions, p) \n closeProductsPopup();\n }\"\n class=\"bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </div>\n </Popup>\n\n <Block\n v-if=\"tabOrderCreate === 'positions'\"\n title=\"Positions\"\n :actions=\"[{\n label: '+',\n function: () => openProductsPopup()\n }]\"\n class=\"mn-b-small\"\n >\n <span \n v-if=\"orders.state.current.positions.length === 0\" \n class=\"w-100\"\n >\n No positions added yet\n </span> \n\n <CardOrderItem\n v-for=\"(product, index) in orders.state.current.positions\" \n :key=\"product._id\"\n :editable=\"true\" \n :product=\"product\" \n @increase=\"() => { globals.actions.increment(orders.state.current.positions, product) }\"\n @decrease=\"() => { globals.actions.decrement(orders.state.current.positions, product) }\"\n @remove=\"() => { globals.actions.delete(orders.state.current.positions, product) }\"\n class=\"mn-b-thin pd-thin radius-medium bg-white\"\n /> \n </Block>\n\n <Block\n v-if=\"tabOrderCreate === 'customer'\"\n title=\"Customer\"\n class=\"mn-b-semi\"\n :actions=\"[{\n label: '+',\n function: () => openCustomerPopup()\n }]\"\n >\n <CardUser\n v-if=\"orders.state.current.customer._id\"\n :user=\"orders.state.current.customer\"\n :photo=\"orders.state.current.customer.profile.photo\"\n :name=\"orders.state.current.customer.profile.name || orders.state.current.customer.phone || orders.state.current.customer.email\"\n @click=\"() => { \n orders.mutations.resetCustomer(orders.state.current.customer)\n }\"\n class=\"bg-white pd-thin h-4r radius-medium w-100 mn-b-thin\"\n />\n <Feed\n v-else\n :search=\"{\n placeholder: 'Search customer...',\n class: 'bg-white mn-b-thin'\n }\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no such products available.'\n }\n }\"\n :store=\"{\n read: (options) => customers.read(options),\n state: null\n }\"\n :options=\"{\n owner: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"bg-light h-max-20r o-scroll\"\n >\n <CardUser\n v-for=\"(user, index) in items\" \n :key=\"user._id\"\n :user=\"user\"\n :photo=\"user.profile.photo\"\n :name=\"user.profile.name || user.phone || user.email\"\n @click=\"() => { \n orders.state.current.customer = user\n }\"\n class=\"bg-white pd-thin h-4r radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n \n </Block>\n\n <FormDelivery \n v-if=\"tabOrderCreate === 'delivery'\" \n :order=\"orders.state.current\" \n />\n\n <FormPayment \n v-if=\"tabOrderCreate === 'payment'\"\n :order=\"orders.state.current\" \n />\n\n <Popup \n title=\"Add customer\" \n @close-popup=\"closeCustomerPopup\" \n :isPopupOpen=\"isOpenCustomerPopup\"\n :class=\"'bg-white w-min-30r w-max-30r radius-big pd-medium'\"\n >\n <FormAddCustomer \n @callbackCustomer=\"closeCustomerPopup\"\n />\n </Popup>\n\n <Block\n class=\"mn-b-semi\"\n >\n <div class=\"h3 flex\">\n <span class=\"mn-r-auto t-transp\">In total</span>\n <span>{{ cartTotalPrice }} {{returnCurrency()}} </span >\n </div>\n </Block>\n</div>\n\n\n</template>\n\n<script setup=\"props\">\n import { computed, ref, defineProps, onMounted, reactive, toRefs, watch } from 'vue'\n import { useRoute, useRouter } from 'vue-router'\n\n\n import Field from '@pf/src/components/Field/Field.vue'\n import Button from \"@pf/src/components/Button/Button.vue\"; \n import Tab from '@pf/src/components/Tab/Tab.vue'\n import Popup from '@pf/src/components/Popup/Popup.vue';\n\timport Block from '@pf/src/components/Block/Block.vue';\n import Feed from '@pf/src/components/Feed/Feed.vue'\n\n import CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue'\n import CardPosition from '@pf/src/modules/products/components/blocks/CardPosition.vue';\n import CardUser from '@pf/src/modules/users/components/blocks/CardUser.vue'\n\n import BlockSearch from '@pf/src/modules/globals/views/components/blocks/BlockSearch.vue'\n\n import FormAddCustomer from '@pf/src/modules/orders/components/sections/FormAddCustomer.vue'\n import FormDelivery from '@pf/src/modules/orders/components/sections/FormDelivery.vue'\n import FormPayment from '@pf/src/modules/orders/components/sections/FormPayment.vue'\n\n // Import your store\n import * as globals from '@pf/src/modules/globals/views/store/globals';\n import * as auth from '@pf/src/modules/auth/views/store/auth';\n import * as orders from '@pf/src/modules/orders/store/orders';\n import * as products from '@pf/src/modules/products/store/products';\n\n import customers from '@pf/src/modules/orders/store/customers.store';\n\t\n // Accessing router\n const route = useRoute()\n const router = useRouter()\n\n orders.mutations.resetOrder(orders.state.current)\n\n let cartTotalPrice = computed(() => {\n return Number(orders.state.current.positions.reduce((total, product) => {\n return total + product.price * product.quantity;\n }, 0));\n })\n\n // Tab\n const tabOrderCreate = ref('positions')\n\n // Popup\n const isOpenProductsPopup = ref(false);\n\n function openProductsPopup() {\n isOpenProductsPopup.value = true;\n }\n\n function closeProductsPopup() {\n isOpenProductsPopup.value = false;\n }\n\n const isOpenCustomerPopup = ref(false);\n\n function openCustomerPopup() {\n isOpenCustomerPopup.value = true;\n }\n\n function closeCustomerPopup() {\n isOpenCustomerPopup.value = false;\n }\n\n // Data\n let order = ref(null)\n\n function onSubmit() {\n\n orders.state.current.creator = {\n type: 'User',\n target: auth.state.user._id\n }\n\n orders.state.current.owner = {\n type: 'Organization',\n target: route.params._id,\n }\n\n orders.state.current.customer = {\n type: 'Customer',\n target: orders.state.current.customer._id || null,\n }\n\n orders.actions.create(orders.state.current)\n }\n\n function redirectTo () {\n router.push({\n name: 'Backoffice Orders', \n params: { \n _id: route.params._id\n } \n })\n }\n\n onMounted(() => {\n\n // await orders.actions.fetchOrder(route.params.id) // Implement this action in your store\n\n // order.value = orders.state.current\n })\n\n</script>\n\n\n<style lang=\"scss\">\n\n.vue-select {\n width: inherit;\n\n margin-right: 1rem;\n}\n.vue-select-header {\n height: 3rem;\n}\n</style>\n"],"names":["useRoute","useRouter","orders.mutations","orders.state","computed","ref","auth.state","orders.actions","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiOE,UAAM,QAAQA,UAAAA,SAAU;AACxB,UAAM,SAASC,UAAAA,UAAW;AAEzBC,qBAAiB,WAAWC,OAAY,MAAC,OAAO;AAEjD,QAAI,iBAAiBC,IAAAA,SAAS,MAAM;AAClC,aAAO,OAAOD,OAAAA,MAAa,QAAQ,UAAU,OAAO,CAAC,OAAO,YAAY;AACtE,eAAO,QAAQ,QAAQ,QAAQ,QAAQ;AAAA,MAC7C,GAAO,CAAC,CAAC;AAAA,IACT,CAAG;AAGD,UAAM,iBAAiBE,IAAG,IAAC,WAAW;AAGtC,UAAM,sBAAsBA,QAAI,KAAK;AAErC,aAAS,oBAAoB;AAC3B,0BAAoB,QAAQ;AAAA,IAC7B;AAED,aAAS,qBAAqB;AAC5B,0BAAoB,QAAQ;AAAA,IAC7B;AAED,UAAM,sBAAsBA,QAAI,KAAK;AAErC,aAAS,oBAAoB;AAC3B,0BAAoB,QAAQ;AAAA,IAC7B;AAED,aAAS,qBAAqB;AAC5B,0BAAoB,QAAQ;AAAA,IAC7B;AAGWA,QAAAA,IAAI,IAAI;AAEpB,aAAS,WAAW;AAElBF,aAAY,MAAC,QAAQ,UAAU;AAAA,QAC7B,MAAM;AAAA,QACN,QAAQG,KAAAA,MAAW,KAAK;AAAA,MACzB;AAEDH,aAAY,MAAC,QAAQ,QAAQ;AAAA,QAC3B,MAAM;AAAA,QACN,QAAQ,MAAM,OAAO;AAAA,MACtB;AAEDA,aAAY,MAAC,QAAQ,WAAW;AAAA,QAC9B,MAAM;AAAA,QACN,QAAQA,OAAAA,MAAa,QAAQ,SAAS,OAAO;AAAA,MAC9C;AAEDI,qBAAe,OAAOJ,OAAY,MAAC,OAAO;AAAA,IAC3C;AAED,aAAS,aAAc;AACrB,aAAO,KAAK;AAAA,QACV,MAAM;AAAA,QACN,QAAQ;AAAA,UACN,KAAK,MAAM,OAAO;AAAA,QACnB;AAAA,MACP,CAAK;AAAA,IACF;AAEDK,QAAAA,UAAU,MAAM;AAAA,IAKlB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"OrderCreateBackoffice.vue.cjs","sources":["../../../../../../../src/modules/orders/components/pages/OrderCreateBackoffice.vue"],"sourcesContent":["<template>\n <div class=\"h-100 flex flex-column pd-thin\">\n <Block class=\"mn-b-thin\">\n <header class=\"flex-v-center flex-nowrap flex\">\n <h2 class=\"mn-r-auto\">Create Order</h2>\n <Button \n :submit=\"onSubmit\"\n :callback=\"redirectTo\"\n class=\"pd-small radius-big bg-main t-black uppercase t-medium\"\n >\n Add Order \n </Button>\n </header>\n </Block>\n\n <Tab \n v-model:selected=\"tabOrderCreate\"\n :tabs=\"[\n {name: 'Positions', value: 'positions'},\n {name: 'Customer', value: 'customer'},\n {name: 'Delivery', value: 'delivery'},\n {name: 'Payment', value: 'payment'}\n ]\"\n class=\"t-medium radius-medium bg-light mn-b-small\"\n />\n\n <Popup \n @close-popup=\"closeProductsPopup\" \n :isPopupOpen=\"isOpenProductsPopup\"\n class=\"bg-white w-min-30r w-max-30r h-max-100 flex flex-column radius-big pd-medium pos-relative\"\n >\n\n <h3 class=\"mn-b-small\">Add to order</h3>\n\n <div class=\"bg-light h-max-100 mn-b-thin o-scroll pd-medium radius-big\">\n <Feed\n :search=\"{\n placeholder: 'Search products...',\n class: 'bg-white mn-b-thin'\n }\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no such products available.'\n }\n }\"\n :store=\"{\n read: (options) => products.actions.read(options),\n state: null\n }\"\n :options=\"{\n organization: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"\"\n >\n <CardOrderItem\n v-for=\"(product, index) in items\" :key=\"product._id\"\n :editable=\"false\" \n :product=\"product\" \n @click=\"() => { \n let p = { ...product };\n p.quantity = 1;\n globals.actions.add(orders.state.current.positions, p) \n closeProductsPopup();\n }\"\n class=\"bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </div>\n </Popup>\n\n <Block\n v-if=\"tabOrderCreate === 'positions'\"\n title=\"Positions\"\n :actions=\"[{\n label: '+',\n function: () => openProductsPopup()\n }]\"\n class=\"mn-b-small\"\n >\n <span \n v-if=\"orders.state.current.positions.length === 0\" \n class=\"w-100\"\n >\n No positions added yet\n </span> \n\n <CardOrderItem\n v-for=\"(product, index) in orders.state.current.positions\" \n :key=\"product._id\"\n :editable=\"true\" \n :product=\"product\" \n @increase=\"() => { globals.actions.increment(orders.state.current.positions, product) }\"\n @decrease=\"() => { globals.actions.decrement(orders.state.current.positions, product) }\"\n @remove=\"() => { globals.actions.delete(orders.state.current.positions, product) }\"\n class=\"mn-b-thin pd-thin radius-medium bg-white\"\n /> \n </Block>\n\n <Block\n v-if=\"tabOrderCreate === 'customer'\"\n title=\"Customer\"\n class=\"mn-b-semi\"\n :actions=\"[{\n label: '+',\n function: () => openCustomerPopup()\n }]\"\n >\n <CardUser\n v-if=\"orders.state.current.customer._id\"\n :user=\"orders.state.current.customer\"\n :photo=\"orders.state.current.customer.profile.photo\"\n :name=\"orders.state.current.customer.profile.name || orders.state.current.customer.phone || orders.state.current.customer.email\"\n @click=\"() => { \n orders.mutations.resetCustomer(orders.state.current.customer)\n }\"\n class=\"bg-white pd-thin h-4r radius-medium w-100 mn-b-thin\"\n />\n <Feed\n v-else\n :search=\"{\n placeholder: 'Search customer...',\n class: 'bg-white mn-b-thin'\n }\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no such products available.'\n }\n }\"\n :store=\"{\n read: (options) => customers.read(options),\n state: null\n }\"\n :options=\"{\n owner: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"bg-light h-max-20r o-scroll\"\n >\n <CardUser\n v-for=\"(user, index) in items\" \n :key=\"user._id\"\n :user=\"user\"\n :photo=\"user.profile.photo\"\n :name=\"user.profile.name || user.phone || user.email\"\n @click=\"() => { \n orders.state.current.customer = user\n }\"\n class=\"bg-white pd-thin h-4r radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n \n </Block>\n\n <FormDelivery \n v-if=\"tabOrderCreate === 'delivery'\" \n :order=\"orders.state.current\" \n />\n\n <FormPayment \n v-if=\"tabOrderCreate === 'payment'\"\n :order=\"orders.state.current\" \n />\n\n <Popup \n title=\"Add customer\" \n @close-popup=\"closeCustomerPopup\" \n :isPopupOpen=\"isOpenCustomerPopup\"\n :class=\"'bg-white w-min-30r w-max-30r radius-big pd-medium'\"\n >\n <FormAddCustomer \n @callbackCustomer=\"closeCustomerPopup\"\n />\n </Popup>\n\n <Block\n class=\"mn-b-semi\"\n >\n <div class=\"h3 flex\">\n <span class=\"mn-r-auto t-transp\">In total</span>\n <span>{{ cartTotalPrice }} {{returnCurrency()}} </span >\n </div>\n </Block>\n</div>\n\n\n</template>\n\n<script setup=\"props\">\n import { computed, ref, defineProps, onMounted, reactive, toRefs, watch } from 'vue'\n import { useRoute, useRouter } from 'vue-router'\n\n\n import Field from '@pf/src/components/Field/Field.vue'\n import Button from \"@pf/src/components/Button/Button.vue\"; \n import Tab from '@pf/src/components/Tab/Tab.vue'\n import Popup from '@pf/src/components/Popup/Popup.vue';\n\timport Block from '@pf/src/components/Block/Block.vue';\n import Feed from '@pf/src/components/Feed/Feed.vue'\n\n import CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue'\n import CardPosition from '@pf/src/modules/products/components/blocks/CardPosition.vue';\n import CardUser from '@pf/src/modules/auth/views/components/blocks/CardUser.vue'\n\n import BlockSearch from '@pf/src/modules/globals/views/components/blocks/BlockSearch.vue'\n\n import FormAddCustomer from '@pf/src/modules/orders/components/sections/FormAddCustomer.vue'\n import FormDelivery from '@pf/src/modules/orders/components/sections/FormDelivery.vue'\n import FormPayment from '@pf/src/modules/orders/components/sections/FormPayment.vue'\n\n // Import your store\n import * as globals from '@pf/src/modules/globals/views/store/globals';\n import * as auth from '@pf/src/modules/auth/views/store/auth';\n import * as orders from '@pf/src/modules/orders/store/orders';\n import * as products from '@pf/src/modules/products/store/products';\n\n import customers from '@pf/src/modules/orders/store/customers.store';\n\t\n // Accessing router\n const route = useRoute()\n const router = useRouter()\n\n orders.mutations.resetOrder(orders.state.current)\n\n let cartTotalPrice = computed(() => {\n return Number(orders.state.current.positions.reduce((total, product) => {\n return total + product.price * product.quantity;\n }, 0));\n })\n\n // Tab\n const tabOrderCreate = ref('positions')\n\n // Popup\n const isOpenProductsPopup = ref(false);\n\n function openProductsPopup() {\n isOpenProductsPopup.value = true;\n }\n\n function closeProductsPopup() {\n isOpenProductsPopup.value = false;\n }\n\n const isOpenCustomerPopup = ref(false);\n\n function openCustomerPopup() {\n isOpenCustomerPopup.value = true;\n }\n\n function closeCustomerPopup() {\n isOpenCustomerPopup.value = false;\n }\n\n // Data\n let order = ref(null)\n\n function onSubmit() {\n\n orders.state.current.creator = {\n type: 'User',\n target: auth.state.user._id\n }\n\n orders.state.current.owner = {\n type: 'Organization',\n target: route.params._id,\n }\n\n orders.state.current.customer = {\n type: 'Customer',\n target: orders.state.current.customer._id || null,\n }\n\n orders.actions.create(orders.state.current)\n }\n\n function redirectTo () {\n router.push({\n name: 'Backoffice Orders', \n params: { \n _id: route.params._id\n } \n })\n }\n\n onMounted(() => {\n\n // await orders.actions.fetchOrder(route.params.id) // Implement this action in your store\n\n // order.value = orders.state.current\n })\n\n</script>\n\n\n<style lang=\"scss\">\n\n.vue-select {\n width: inherit;\n\n margin-right: 1rem;\n}\n.vue-select-header {\n height: 3rem;\n}\n</style>\n"],"names":["useRoute","useRouter","orders.mutations","orders.state","computed","ref","auth.state","orders.actions","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiOE,UAAM,QAAQA,UAAAA,SAAU;AACxB,UAAM,SAASC,UAAAA,UAAW;AAEzBC,qBAAiB,WAAWC,OAAY,MAAC,OAAO;AAEjD,QAAI,iBAAiBC,IAAAA,SAAS,MAAM;AAClC,aAAO,OAAOD,OAAAA,MAAa,QAAQ,UAAU,OAAO,CAAC,OAAO,YAAY;AACtE,eAAO,QAAQ,QAAQ,QAAQ,QAAQ;AAAA,MAC7C,GAAO,CAAC,CAAC;AAAA,IACT,CAAG;AAGD,UAAM,iBAAiBE,IAAG,IAAC,WAAW;AAGtC,UAAM,sBAAsBA,QAAI,KAAK;AAErC,aAAS,oBAAoB;AAC3B,0BAAoB,QAAQ;AAAA,IAC7B;AAED,aAAS,qBAAqB;AAC5B,0BAAoB,QAAQ;AAAA,IAC7B;AAED,UAAM,sBAAsBA,QAAI,KAAK;AAErC,aAAS,oBAAoB;AAC3B,0BAAoB,QAAQ;AAAA,IAC7B;AAED,aAAS,qBAAqB;AAC5B,0BAAoB,QAAQ;AAAA,IAC7B;AAGWA,QAAAA,IAAI,IAAI;AAEpB,aAAS,WAAW;AAElBF,aAAY,MAAC,QAAQ,UAAU;AAAA,QAC7B,MAAM;AAAA,QACN,QAAQG,KAAAA,MAAW,KAAK;AAAA,MACzB;AAEDH,aAAY,MAAC,QAAQ,QAAQ;AAAA,QAC3B,MAAM;AAAA,QACN,QAAQ,MAAM,OAAO;AAAA,MACtB;AAEDA,aAAY,MAAC,QAAQ,WAAW;AAAA,QAC9B,MAAM;AAAA,QACN,QAAQA,OAAAA,MAAa,QAAQ,SAAS,OAAO;AAAA,MAC9C;AAEDI,qBAAe,OAAOJ,OAAY,MAAC,OAAO;AAAA,IAC3C;AAED,aAAS,aAAc;AACrB,aAAO,KAAK;AAAA,QACV,MAAM;AAAA,QACN,QAAQ;AAAA,UACN,KAAK,MAAM,OAAO;AAAA,QACnB;AAAA,MACP,CAAK;AAAA,IACF;AAEDK,QAAAA,UAAU,MAAM;AAAA,IAKlB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -9,7 +9,7 @@ import _sfc_main$5 from "../../../../components/Feed/Feed.vue.js";
9
9
  import _sfc_main$6 from "../blocks/CardOrderItem.vue.js";
10
10
  /* empty css */
11
11
  /* empty css */
12
- import _sfc_main$7 from "../../../users/components/blocks/CardUser.vue.js";
12
+ import _sfc_main$7 from "../../../auth/views/components/blocks/CardUser.vue.js";
13
13
  import _sfc_main$a from "../sections/FormAddCustomer.vue.js";
14
14
  import _sfc_main$8 from "../sections/FormDelivery.vue.js";
15
15
  import _sfc_main$9 from "../sections/FormPayment.vue.js";