@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 +1 @@
1
- {"version":3,"file":"OrderCreateBackoffice.vue.js","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":["orders.mutations","orders.state","auth.state","orders.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiOE,UAAM,QAAQ,SAAU;AACxB,UAAM,SAAS,UAAW;AAEzBA,cAAiB,WAAWC,MAAa,OAAO;AAEjD,QAAI,iBAAiB,SAAS,MAAM;AAClC,aAAO,OAAOA,MAAa,QAAQ,UAAU,OAAO,CAAC,OAAO,YAAY;AACtE,eAAO,QAAQ,QAAQ,QAAQ,QAAQ;AAAA,MAC7C,GAAO,CAAC,CAAC;AAAA,IACT,CAAG;AAGD,UAAM,iBAAiB,IAAI,WAAW;AAGtC,UAAM,sBAAsB,IAAI,KAAK;AAErC,aAAS,oBAAoB;AAC3B,0BAAoB,QAAQ;AAAA,IAC7B;AAED,aAAS,qBAAqB;AAC5B,0BAAoB,QAAQ;AAAA,IAC7B;AAED,UAAM,sBAAsB,IAAI,KAAK;AAErC,aAAS,oBAAoB;AAC3B,0BAAoB,QAAQ;AAAA,IAC7B;AAED,aAAS,qBAAqB;AAC5B,0BAAoB,QAAQ;AAAA,IAC7B;AAGW,QAAI,IAAI;AAEpB,aAAS,WAAW;AAElBA,YAAa,QAAQ,UAAU;AAAA,QAC7B,MAAM;AAAA,QACN,QAAQC,QAAW,KAAK;AAAA,MACzB;AAEDD,YAAa,QAAQ,QAAQ;AAAA,QAC3B,MAAM;AAAA,QACN,QAAQ,MAAM,OAAO;AAAA,MACtB;AAEDA,YAAa,QAAQ,WAAW;AAAA,QAC9B,MAAM;AAAA,QACN,QAAQA,MAAa,QAAQ,SAAS,OAAO;AAAA,MAC9C;AAEDE,gBAAe,OAAOF,MAAa,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;AAED,cAAU,MAAM;AAAA,IAKlB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"OrderCreateBackoffice.vue.js","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":["orders.mutations","orders.state","auth.state","orders.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiOE,UAAM,QAAQ,SAAU;AACxB,UAAM,SAAS,UAAW;AAEzBA,cAAiB,WAAWC,MAAa,OAAO;AAEjD,QAAI,iBAAiB,SAAS,MAAM;AAClC,aAAO,OAAOA,MAAa,QAAQ,UAAU,OAAO,CAAC,OAAO,YAAY;AACtE,eAAO,QAAQ,QAAQ,QAAQ,QAAQ;AAAA,MAC7C,GAAO,CAAC,CAAC;AAAA,IACT,CAAG;AAGD,UAAM,iBAAiB,IAAI,WAAW;AAGtC,UAAM,sBAAsB,IAAI,KAAK;AAErC,aAAS,oBAAoB;AAC3B,0BAAoB,QAAQ;AAAA,IAC7B;AAED,aAAS,qBAAqB;AAC5B,0BAAoB,QAAQ;AAAA,IAC7B;AAED,UAAM,sBAAsB,IAAI,KAAK;AAErC,aAAS,oBAAoB;AAC3B,0BAAoB,QAAQ;AAAA,IAC7B;AAED,aAAS,qBAAqB;AAC5B,0BAAoB,QAAQ;AAAA,IAC7B;AAGW,QAAI,IAAI;AAEpB,aAAS,WAAW;AAElBA,YAAa,QAAQ,UAAU;AAAA,QAC7B,MAAM;AAAA,QACN,QAAQC,QAAW,KAAK;AAAA,MACzB;AAEDD,YAAa,QAAQ,QAAQ;AAAA,QAC3B,MAAM;AAAA,QACN,QAAQ,MAAM,OAAO;AAAA,MACtB;AAEDA,YAAa,QAAQ,WAAW;AAAA,QAC9B,MAAM;AAAA,QACN,QAAQA,MAAa,QAAQ,SAAS,OAAO;AAAA,MAC9C;AAEDE,gBAAe,OAAOF,MAAa,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;AAED,cAAU,MAAM;AAAA,IAKlB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -9,9 +9,9 @@ const clickOutside = require("../../../../components/FieldPhone/click-outside.cj
9
9
  const Feed = require("../../../../components/Feed/Feed.vue.cjs");
10
10
  const Button = require("../../../../components/Button/Button.vue2.cjs");
11
11
  const BlockSearch = require("../../../globals/views/components/blocks/BlockSearch.vue.cjs");
12
- const CardUser = require("../../../users/components/blocks/CardUser.vue.cjs");
12
+ const CardUser = require("../../../auth/views/components/blocks/CardUser.vue.cjs");
13
13
  const FormCustomerDetails = require("./FormCustomerDetails.vue.cjs");
14
- const users = require("../../../users/store/users.cjs");
14
+ const users = require("../../../auth/views/store/users.cjs");
15
15
  const auth = require("../../../auth/views/store/auth.cjs");
16
16
  const globals = require("../../../globals/views/store/globals.cjs");
17
17
  const customers_store = require("../../store/customers.store.cjs");
@@ -1 +1 @@
1
- {"version":3,"file":"FormAddCustomer.vue.cjs","sources":["../../../../../../../src/modules/orders/components/sections/FormAddCustomer.vue"],"sourcesContent":["<template>\n <Block class=\"pos-relative mn-b-thin\">\n <BlockSearch \n v-click-outside=\"() => {searchUserShow = false}\" \n v-if=\"!dataCustomer.user\"\n @search=\"(event) => { searchUser = event; searchUserShow = true }\"\n placeholder=\"Enter name, phone or email\"\n class=\"bg-white\"\n />\n <CardUser\n v-else\n :user=\"dataCustomer.user\"\n :photo=\"dataCustomer.user.profile.photo\"\n :name=\"dataCustomer.user.profile.name || dataCustomer.user.phone || dataCustomer.user.email\"\n @click=\"() => { \n dataCustomer.user = null\n }\"\n class=\"bg-white h-2r pd-thin radius-medium w-100\"\n />\n\n <div \n v-if=\"searchUser && searchUserShow && !dataCustomer.user \" \n class=\"mn-t-thin pos-absolute w-100 pos-t-100 pos-l-0 z-index-3 bg-light pd-small radius-small\n \">\n <Feed\n :states=\"{\n empty: {\n title: 'No User Found',\n description: 'Currently, there are no such user.'\n }\n }\"\n :store=\"{\n read: (options) => users.actions.read(options),\n state: null\n }\"\n :options=\"{\n search: searchUser\n }\"\n :showLoadMore=\"false\"\n v-slot=\"{ \n items \n }\"\n class=\"h-max-20r o-scroll\"\n >\n <CardUser\n v-for=\"(user, index) in items\" :key=\"user._id\"\n :user=\"user\"\n :photo=\"user.profile.photo\"\n :name=\"user.profile.name || user.phone || user.email\"\n @click=\"() => { \n dataCustomer.user = user\n dataCustomer.profile = user.profile\n dataCustomer.phone = user.phone\n dataCustomer.email = user.email\n dataCustomer.socials = user.socials\n }\"\n class=\"bg-white h-2r pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </div>\n </Block>\n\n <FormCustomerDetails\n :customer=\"dataCustomer\" \n class=\"mn-b-thin bg-light\"\n />\n\n <Button \n :submit=\"addCustomer\"\n :callback=\"callbackCustomer\"\n @error=\"setError\"\n class=\"w-100 pd-small radius-big bg-main t-black uppercase t-medium\"\n >\n Add Customer \n </Button>\n</template>\n\n<script setup>\nimport { ref } from \"vue\"\nimport { useRoute, useRouter } from 'vue-router'\n\nimport Block from '@pf/src/components/Block/Block.vue'\nimport Field from '@pf/src/components/Field/Field.vue'\nimport Select from '@pf/src/components/Select/Select.vue'\nimport Feed from '@pf/src/components/Feed/Feed.vue'\nimport Button from '@pf/src/components/Button/Button.vue'\n\nimport BlockSearch from '@pf/src/modules/globals/views/components/blocks/BlockSearch.vue'\n\nimport CardUser from '@pf/src/modules/users/components/blocks/CardUser.vue'\n\nimport FormCustomerDetails from '@pf/src/modules/orders/components/sections/FormCustomerDetails.vue'\n\nimport * as users from '@pf/src/modules/users/store/users';\nimport * as auth from '@pf/src/modules/auth/views/store/auth';\n\nimport { setError } from '@pf/src/modules/globals/views/store/globals'\n\nimport customers from '@pf/src/modules/orders/store/customers.store';\nimport customerInitState from \"@pf/src/modules/orders/store/models/customer\"\n\nimport clickOutside from '@pf/src/components/FieldPhone/click-outside';\n\n// Directives\nlet vClickOutside = clickOutside\n// Props\nconst props = defineProps({\n order: Object,\n});\n// Emits\nconst emits = defineEmits(['callbackCustomer']);\n// Router\nconst route = useRoute()\n\nlet dataCustomer = ref(customerInitState)\n\nlet searchUser = ref(null)\nlet searchUserShow = ref(false)\n\nasync function addCustomer() {\n let customerData = {\n identity: {\n type: dataCustomer.value.user ? 'User' : 'Visitor',\n target: dataCustomer.value.user ? dataCustomer.value.user._id : null\n },\n owner: {\n type: 'Organization',\n target: route.params._id\n },\n creator: {\n type: 'User',\n target: auth.state.user._id\n },\n phone: dataCustomer.value.phone,\n email: dataCustomer.value.email,\n profile: dataCustomer.value.profile,\n socials: dataCustomer.value.socials\n }\n\n try { \n let customer = await customers.create(customerData)\n \n dataCustomer.value = customer\n } catch(err) {\n console.log(err)\n }\n}\n\nfunction callbackCustomer() {\n emits('callbackCustomer', dataCustomer.value)\n}\n</script>"],"names":["clickOutside","useRoute","ref","customerInitState","auth.state","customer","customers"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwGA,QAAI,gBAAgBA,aAAY;AAMhC,UAAM,QAAQ;AAEd,UAAM,QAAQC,UAAAA,SAAU;AAExB,QAAI,eAAeC,IAAG,IAACC,gBAAiB;AAExC,QAAI,aAAaD,IAAG,IAAC,IAAI;AACzB,QAAI,iBAAiBA,IAAG,IAAC,KAAK;AAE9B,mBAAe,cAAc;AAC3B,UAAI,eAAe;AAAA,QACjB,UAAU;AAAA,UACR,MAAM,aAAa,MAAM,OAAO,SAAS;AAAA,UACzC,QAAQ,aAAa,MAAM,OAAO,aAAa,MAAM,KAAK,MAAM;AAAA,QACjE;AAAA,QACD,OAAO;AAAA,UACL,MAAM;AAAA,UACN,QAAQ,MAAM,OAAO;AAAA,QACtB;AAAA,QACD,SAAS;AAAA,UACP,MAAM;AAAA,UACN,QAAQE,KAAAA,MAAW,KAAK;AAAA,QACzB;AAAA,QACD,OAAO,aAAa,MAAM;AAAA,QAC1B,OAAO,aAAa,MAAM;AAAA,QAC1B,SAAS,aAAa,MAAM;AAAA,QAC5B,SAAS,aAAa,MAAM;AAAA,MAC7B;AAED,UAAI;AACF,YAAIC,YAAW,MAAMC,wBAAU,OAAO,YAAY;AAElD,qBAAa,QAAQD;AAAA,MACtB,SAAO,KAAK;AACX,gBAAQ,IAAI,GAAG;AAAA,MAChB;AAAA,IACH;AAEA,aAAS,mBAAmB;AAC1B,YAAM,oBAAoB,aAAa,KAAK;AAAA,IAC9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"FormAddCustomer.vue.cjs","sources":["../../../../../../../src/modules/orders/components/sections/FormAddCustomer.vue"],"sourcesContent":["<template>\n <Block class=\"pos-relative mn-b-thin\">\n <BlockSearch \n v-click-outside=\"() => {searchUserShow = false}\" \n v-if=\"!dataCustomer.user\"\n @search=\"(event) => { searchUser = event; searchUserShow = true }\"\n placeholder=\"Enter name, phone or email\"\n class=\"bg-white\"\n />\n <CardUser\n v-else\n :user=\"dataCustomer.user\"\n :photo=\"dataCustomer.user.profile.photo\"\n :name=\"dataCustomer.user.profile.name || dataCustomer.user.phone || dataCustomer.user.email\"\n @click=\"() => { \n dataCustomer.user = null\n }\"\n class=\"bg-white h-2r pd-thin radius-medium w-100\"\n />\n\n <div \n v-if=\"searchUser && searchUserShow && !dataCustomer.user \" \n class=\"mn-t-thin pos-absolute w-100 pos-t-100 pos-l-0 z-index-3 bg-light pd-small radius-small\n \">\n <Feed\n :states=\"{\n empty: {\n title: 'No User Found',\n description: 'Currently, there are no such user.'\n }\n }\"\n :store=\"{\n read: (options) => users.actions.read(options),\n state: null\n }\"\n :options=\"{\n search: searchUser\n }\"\n :showLoadMore=\"false\"\n v-slot=\"{ \n items \n }\"\n class=\"h-max-20r o-scroll\"\n >\n <CardUser\n v-for=\"(user, index) in items\" :key=\"user._id\"\n :user=\"user\"\n :photo=\"user.profile.photo\"\n :name=\"user.profile.name || user.phone || user.email\"\n @click=\"() => { \n dataCustomer.user = user\n dataCustomer.profile = user.profile\n dataCustomer.phone = user.phone\n dataCustomer.email = user.email\n dataCustomer.socials = user.socials\n }\"\n class=\"bg-white h-2r pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </div>\n </Block>\n\n <FormCustomerDetails\n :customer=\"dataCustomer\" \n class=\"mn-b-thin bg-light\"\n />\n\n <Button \n :submit=\"addCustomer\"\n :callback=\"callbackCustomer\"\n @error=\"setError\"\n class=\"w-100 pd-small radius-big bg-main t-black uppercase t-medium\"\n >\n Add Customer \n </Button>\n</template>\n\n<script setup>\nimport { ref } from \"vue\"\nimport { useRoute, useRouter } from 'vue-router'\n\nimport Block from '@pf/src/components/Block/Block.vue'\nimport Field from '@pf/src/components/Field/Field.vue'\nimport Select from '@pf/src/components/Select/Select.vue'\nimport Feed from '@pf/src/components/Feed/Feed.vue'\nimport Button from '@pf/src/components/Button/Button.vue'\n\nimport BlockSearch from '@pf/src/modules/globals/views/components/blocks/BlockSearch.vue'\n\nimport CardUser from '@pf/src/modules/auth/views/components/blocks/CardUser.vue'\n\nimport FormCustomerDetails from '@pf/src/modules/orders/components/sections/FormCustomerDetails.vue'\n\nimport * as users from '@pf/src/modules/auth/views/store/users';\nimport * as auth from '@pf/src/modules/auth/views/store/auth';\n\nimport { setError } from '@pf/src/modules/globals/views/store/globals'\n\nimport customers from '@pf/src/modules/orders/store/customers.store';\nimport customerInitState from \"@pf/src/modules/orders/store/models/customer\"\n\nimport clickOutside from '@pf/src/components/FieldPhone/click-outside';\n\n// Directives\nlet vClickOutside = clickOutside\n// Props\nconst props = defineProps({\n order: Object,\n});\n// Emits\nconst emits = defineEmits(['callbackCustomer']);\n// Router\nconst route = useRoute()\n\nlet dataCustomer = ref(customerInitState)\n\nlet searchUser = ref(null)\nlet searchUserShow = ref(false)\n\nasync function addCustomer() {\n let customerData = {\n identity: {\n type: dataCustomer.value.user ? 'User' : 'Visitor',\n target: dataCustomer.value.user ? dataCustomer.value.user._id : null\n },\n owner: {\n type: 'Organization',\n target: route.params._id\n },\n creator: {\n type: 'User',\n target: auth.state.user._id\n },\n phone: dataCustomer.value.phone,\n email: dataCustomer.value.email,\n profile: dataCustomer.value.profile,\n socials: dataCustomer.value.socials\n }\n\n try { \n let customer = await customers.create(customerData)\n \n dataCustomer.value = customer\n } catch(err) {\n console.log(err)\n }\n}\n\nfunction callbackCustomer() {\n emits('callbackCustomer', dataCustomer.value)\n}\n</script>"],"names":["clickOutside","useRoute","ref","customerInitState","auth.state","customer","customers"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwGA,QAAI,gBAAgBA,aAAY;AAMhC,UAAM,QAAQ;AAEd,UAAM,QAAQC,UAAAA,SAAU;AAExB,QAAI,eAAeC,IAAG,IAACC,gBAAiB;AAExC,QAAI,aAAaD,IAAG,IAAC,IAAI;AACzB,QAAI,iBAAiBA,IAAG,IAAC,KAAK;AAE9B,mBAAe,cAAc;AAC3B,UAAI,eAAe;AAAA,QACjB,UAAU;AAAA,UACR,MAAM,aAAa,MAAM,OAAO,SAAS;AAAA,UACzC,QAAQ,aAAa,MAAM,OAAO,aAAa,MAAM,KAAK,MAAM;AAAA,QACjE;AAAA,QACD,OAAO;AAAA,UACL,MAAM;AAAA,UACN,QAAQ,MAAM,OAAO;AAAA,QACtB;AAAA,QACD,SAAS;AAAA,UACP,MAAM;AAAA,UACN,QAAQE,KAAAA,MAAW,KAAK;AAAA,QACzB;AAAA,QACD,OAAO,aAAa,MAAM;AAAA,QAC1B,OAAO,aAAa,MAAM;AAAA,QAC1B,SAAS,aAAa,MAAM;AAAA,QAC5B,SAAS,aAAa,MAAM;AAAA,MAC7B;AAED,UAAI;AACF,YAAIC,YAAW,MAAMC,wBAAU,OAAO,YAAY;AAElD,qBAAa,QAAQD;AAAA,MACtB,SAAO,KAAK;AACX,gBAAQ,IAAI,GAAG;AAAA,MAChB;AAAA,IACH;AAEA,aAAS,mBAAmB;AAC1B,YAAM,oBAAoB,aAAa,KAAK;AAAA,IAC9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -7,9 +7,9 @@ import clickOutside from "../../../../components/FieldPhone/click-outside.js";
7
7
  import _sfc_main$4 from "../../../../components/Feed/Feed.vue.js";
8
8
  import _sfc_main$6 from "../../../../components/Button/Button.vue2.js";
9
9
  import _sfc_main$2 from "../../../globals/views/components/blocks/BlockSearch.vue.js";
10
- import _sfc_main$3 from "../../../users/components/blocks/CardUser.vue.js";
10
+ import _sfc_main$3 from "../../../auth/views/components/blocks/CardUser.vue.js";
11
11
  import _sfc_main$5 from "./FormCustomerDetails.vue.js";
12
- import { actions } from "../../../users/store/users.js";
12
+ import { actions } from "../../../auth/views/store/users.js";
13
13
  import { state } from "../../../auth/views/store/auth.js";
14
14
  import { setError } from "../../../globals/views/store/globals.js";
15
15
  import customers from "../../store/customers.store.js";
@@ -1 +1 @@
1
- {"version":3,"file":"FormAddCustomer.vue.js","sources":["../../../../../../../src/modules/orders/components/sections/FormAddCustomer.vue"],"sourcesContent":["<template>\n <Block class=\"pos-relative mn-b-thin\">\n <BlockSearch \n v-click-outside=\"() => {searchUserShow = false}\" \n v-if=\"!dataCustomer.user\"\n @search=\"(event) => { searchUser = event; searchUserShow = true }\"\n placeholder=\"Enter name, phone or email\"\n class=\"bg-white\"\n />\n <CardUser\n v-else\n :user=\"dataCustomer.user\"\n :photo=\"dataCustomer.user.profile.photo\"\n :name=\"dataCustomer.user.profile.name || dataCustomer.user.phone || dataCustomer.user.email\"\n @click=\"() => { \n dataCustomer.user = null\n }\"\n class=\"bg-white h-2r pd-thin radius-medium w-100\"\n />\n\n <div \n v-if=\"searchUser && searchUserShow && !dataCustomer.user \" \n class=\"mn-t-thin pos-absolute w-100 pos-t-100 pos-l-0 z-index-3 bg-light pd-small radius-small\n \">\n <Feed\n :states=\"{\n empty: {\n title: 'No User Found',\n description: 'Currently, there are no such user.'\n }\n }\"\n :store=\"{\n read: (options) => users.actions.read(options),\n state: null\n }\"\n :options=\"{\n search: searchUser\n }\"\n :showLoadMore=\"false\"\n v-slot=\"{ \n items \n }\"\n class=\"h-max-20r o-scroll\"\n >\n <CardUser\n v-for=\"(user, index) in items\" :key=\"user._id\"\n :user=\"user\"\n :photo=\"user.profile.photo\"\n :name=\"user.profile.name || user.phone || user.email\"\n @click=\"() => { \n dataCustomer.user = user\n dataCustomer.profile = user.profile\n dataCustomer.phone = user.phone\n dataCustomer.email = user.email\n dataCustomer.socials = user.socials\n }\"\n class=\"bg-white h-2r pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </div>\n </Block>\n\n <FormCustomerDetails\n :customer=\"dataCustomer\" \n class=\"mn-b-thin bg-light\"\n />\n\n <Button \n :submit=\"addCustomer\"\n :callback=\"callbackCustomer\"\n @error=\"setError\"\n class=\"w-100 pd-small radius-big bg-main t-black uppercase t-medium\"\n >\n Add Customer \n </Button>\n</template>\n\n<script setup>\nimport { ref } from \"vue\"\nimport { useRoute, useRouter } from 'vue-router'\n\nimport Block from '@pf/src/components/Block/Block.vue'\nimport Field from '@pf/src/components/Field/Field.vue'\nimport Select from '@pf/src/components/Select/Select.vue'\nimport Feed from '@pf/src/components/Feed/Feed.vue'\nimport Button from '@pf/src/components/Button/Button.vue'\n\nimport BlockSearch from '@pf/src/modules/globals/views/components/blocks/BlockSearch.vue'\n\nimport CardUser from '@pf/src/modules/users/components/blocks/CardUser.vue'\n\nimport FormCustomerDetails from '@pf/src/modules/orders/components/sections/FormCustomerDetails.vue'\n\nimport * as users from '@pf/src/modules/users/store/users';\nimport * as auth from '@pf/src/modules/auth/views/store/auth';\n\nimport { setError } from '@pf/src/modules/globals/views/store/globals'\n\nimport customers from '@pf/src/modules/orders/store/customers.store';\nimport customerInitState from \"@pf/src/modules/orders/store/models/customer\"\n\nimport clickOutside from '@pf/src/components/FieldPhone/click-outside';\n\n// Directives\nlet vClickOutside = clickOutside\n// Props\nconst props = defineProps({\n order: Object,\n});\n// Emits\nconst emits = defineEmits(['callbackCustomer']);\n// Router\nconst route = useRoute()\n\nlet dataCustomer = ref(customerInitState)\n\nlet searchUser = ref(null)\nlet searchUserShow = ref(false)\n\nasync function addCustomer() {\n let customerData = {\n identity: {\n type: dataCustomer.value.user ? 'User' : 'Visitor',\n target: dataCustomer.value.user ? dataCustomer.value.user._id : null\n },\n owner: {\n type: 'Organization',\n target: route.params._id\n },\n creator: {\n type: 'User',\n target: auth.state.user._id\n },\n phone: dataCustomer.value.phone,\n email: dataCustomer.value.email,\n profile: dataCustomer.value.profile,\n socials: dataCustomer.value.socials\n }\n\n try { \n let customer = await customers.create(customerData)\n \n dataCustomer.value = customer\n } catch(err) {\n console.log(err)\n }\n}\n\nfunction callbackCustomer() {\n emits('callbackCustomer', dataCustomer.value)\n}\n</script>"],"names":["auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAwGA,QAAI,gBAAgB;AAMpB,UAAM,QAAQ;AAEd,UAAM,QAAQ,SAAU;AAExB,QAAI,eAAe,IAAI,iBAAiB;AAExC,QAAI,aAAa,IAAI,IAAI;AACzB,QAAI,iBAAiB,IAAI,KAAK;AAE9B,mBAAe,cAAc;AAC3B,UAAI,eAAe;AAAA,QACjB,UAAU;AAAA,UACR,MAAM,aAAa,MAAM,OAAO,SAAS;AAAA,UACzC,QAAQ,aAAa,MAAM,OAAO,aAAa,MAAM,KAAK,MAAM;AAAA,QACjE;AAAA,QACD,OAAO;AAAA,UACL,MAAM;AAAA,UACN,QAAQ,MAAM,OAAO;AAAA,QACtB;AAAA,QACD,SAAS;AAAA,UACP,MAAM;AAAA,UACN,QAAQA,MAAW,KAAK;AAAA,QACzB;AAAA,QACD,OAAO,aAAa,MAAM;AAAA,QAC1B,OAAO,aAAa,MAAM;AAAA,QAC1B,SAAS,aAAa,MAAM;AAAA,QAC5B,SAAS,aAAa,MAAM;AAAA,MAC7B;AAED,UAAI;AACF,YAAI,WAAW,MAAM,UAAU,OAAO,YAAY;AAElD,qBAAa,QAAQ;AAAA,MACtB,SAAO,KAAK;AACX,gBAAQ,IAAI,GAAG;AAAA,MAChB;AAAA,IACH;AAEA,aAAS,mBAAmB;AAC1B,YAAM,oBAAoB,aAAa,KAAK;AAAA,IAC9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"FormAddCustomer.vue.js","sources":["../../../../../../../src/modules/orders/components/sections/FormAddCustomer.vue"],"sourcesContent":["<template>\n <Block class=\"pos-relative mn-b-thin\">\n <BlockSearch \n v-click-outside=\"() => {searchUserShow = false}\" \n v-if=\"!dataCustomer.user\"\n @search=\"(event) => { searchUser = event; searchUserShow = true }\"\n placeholder=\"Enter name, phone or email\"\n class=\"bg-white\"\n />\n <CardUser\n v-else\n :user=\"dataCustomer.user\"\n :photo=\"dataCustomer.user.profile.photo\"\n :name=\"dataCustomer.user.profile.name || dataCustomer.user.phone || dataCustomer.user.email\"\n @click=\"() => { \n dataCustomer.user = null\n }\"\n class=\"bg-white h-2r pd-thin radius-medium w-100\"\n />\n\n <div \n v-if=\"searchUser && searchUserShow && !dataCustomer.user \" \n class=\"mn-t-thin pos-absolute w-100 pos-t-100 pos-l-0 z-index-3 bg-light pd-small radius-small\n \">\n <Feed\n :states=\"{\n empty: {\n title: 'No User Found',\n description: 'Currently, there are no such user.'\n }\n }\"\n :store=\"{\n read: (options) => users.actions.read(options),\n state: null\n }\"\n :options=\"{\n search: searchUser\n }\"\n :showLoadMore=\"false\"\n v-slot=\"{ \n items \n }\"\n class=\"h-max-20r o-scroll\"\n >\n <CardUser\n v-for=\"(user, index) in items\" :key=\"user._id\"\n :user=\"user\"\n :photo=\"user.profile.photo\"\n :name=\"user.profile.name || user.phone || user.email\"\n @click=\"() => { \n dataCustomer.user = user\n dataCustomer.profile = user.profile\n dataCustomer.phone = user.phone\n dataCustomer.email = user.email\n dataCustomer.socials = user.socials\n }\"\n class=\"bg-white h-2r pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </div>\n </Block>\n\n <FormCustomerDetails\n :customer=\"dataCustomer\" \n class=\"mn-b-thin bg-light\"\n />\n\n <Button \n :submit=\"addCustomer\"\n :callback=\"callbackCustomer\"\n @error=\"setError\"\n class=\"w-100 pd-small radius-big bg-main t-black uppercase t-medium\"\n >\n Add Customer \n </Button>\n</template>\n\n<script setup>\nimport { ref } from \"vue\"\nimport { useRoute, useRouter } from 'vue-router'\n\nimport Block from '@pf/src/components/Block/Block.vue'\nimport Field from '@pf/src/components/Field/Field.vue'\nimport Select from '@pf/src/components/Select/Select.vue'\nimport Feed from '@pf/src/components/Feed/Feed.vue'\nimport Button from '@pf/src/components/Button/Button.vue'\n\nimport BlockSearch from '@pf/src/modules/globals/views/components/blocks/BlockSearch.vue'\n\nimport CardUser from '@pf/src/modules/auth/views/components/blocks/CardUser.vue'\n\nimport FormCustomerDetails from '@pf/src/modules/orders/components/sections/FormCustomerDetails.vue'\n\nimport * as users from '@pf/src/modules/auth/views/store/users';\nimport * as auth from '@pf/src/modules/auth/views/store/auth';\n\nimport { setError } from '@pf/src/modules/globals/views/store/globals'\n\nimport customers from '@pf/src/modules/orders/store/customers.store';\nimport customerInitState from \"@pf/src/modules/orders/store/models/customer\"\n\nimport clickOutside from '@pf/src/components/FieldPhone/click-outside';\n\n// Directives\nlet vClickOutside = clickOutside\n// Props\nconst props = defineProps({\n order: Object,\n});\n// Emits\nconst emits = defineEmits(['callbackCustomer']);\n// Router\nconst route = useRoute()\n\nlet dataCustomer = ref(customerInitState)\n\nlet searchUser = ref(null)\nlet searchUserShow = ref(false)\n\nasync function addCustomer() {\n let customerData = {\n identity: {\n type: dataCustomer.value.user ? 'User' : 'Visitor',\n target: dataCustomer.value.user ? dataCustomer.value.user._id : null\n },\n owner: {\n type: 'Organization',\n target: route.params._id\n },\n creator: {\n type: 'User',\n target: auth.state.user._id\n },\n phone: dataCustomer.value.phone,\n email: dataCustomer.value.email,\n profile: dataCustomer.value.profile,\n socials: dataCustomer.value.socials\n }\n\n try { \n let customer = await customers.create(customerData)\n \n dataCustomer.value = customer\n } catch(err) {\n console.log(err)\n }\n}\n\nfunction callbackCustomer() {\n emits('callbackCustomer', dataCustomer.value)\n}\n</script>"],"names":["auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAwGA,QAAI,gBAAgB;AAMpB,UAAM,QAAQ;AAEd,UAAM,QAAQ,SAAU;AAExB,QAAI,eAAe,IAAI,iBAAiB;AAExC,QAAI,aAAa,IAAI,IAAI;AACzB,QAAI,iBAAiB,IAAI,KAAK;AAE9B,mBAAe,cAAc;AAC3B,UAAI,eAAe;AAAA,QACjB,UAAU;AAAA,UACR,MAAM,aAAa,MAAM,OAAO,SAAS;AAAA,UACzC,QAAQ,aAAa,MAAM,OAAO,aAAa,MAAM,KAAK,MAAM;AAAA,QACjE;AAAA,QACD,OAAO;AAAA,UACL,MAAM;AAAA,UACN,QAAQ,MAAM,OAAO;AAAA,QACtB;AAAA,QACD,SAAS;AAAA,UACP,MAAM;AAAA,UACN,QAAQA,MAAW,KAAK;AAAA,QACzB;AAAA,QACD,OAAO,aAAa,MAAM;AAAA,QAC1B,OAAO,aAAa,MAAM;AAAA,QAC1B,SAAS,aAAa,MAAM;AAAA,QAC5B,SAAS,aAAa,MAAM;AAAA,MAC7B;AAED,UAAI;AACF,YAAI,WAAW,MAAM,UAAU,OAAO,YAAY;AAElD,qBAAa,QAAQ;AAAA,MACtB,SAAO,KAAK;AACX,gBAAQ,IAAI,GAAG;AAAA,MAChB;AAAA,IACH;AAEA,aAAS,mBAAmB;AAC1B,YAAM,oBAAoB,aAAa,KAAK;AAAA,IAC9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const orders = require("./store/orders.cjs");
4
4
  const shopcart = require("./store/shopcart.cjs");
5
+ const testimonials = require("./store/testimonials.cjs");
5
6
  const orders_router = require("./router/orders.router.cjs");
6
7
  const Orders = require("./components/pages/Orders.vue.cjs");
7
8
  const Order = require("./components/pages/Order.vue.cjs");
@@ -22,13 +23,15 @@ function initializeOrders(app, store, router, options = {}) {
22
23
  router.addRoute(route, orders_router.default);
23
24
  store.addStore("orders", orders);
24
25
  store.addStore("shopcart", shopcart);
26
+ store.addStore("testimonials", testimonials);
25
27
  }
26
28
  const ModuleOrder = {
27
29
  initialize: initializeOrders,
28
30
  views: {
29
31
  store: {
30
32
  storeOrders: orders,
31
- storeShopcart: shopcart
33
+ storeShopcart: shopcart,
34
+ storeTestimonials: testimonials
32
35
  },
33
36
  router: {
34
37
  routerOrders: orders_router.default
@@ -1 +1 @@
1
- {"version":3,"file":"orders.client.cjs","sources":["../../../../../src/modules/orders/orders.client.js"],"sourcesContent":["// Store\nimport * as storeOrders from './store/orders.js';\nimport * as storeShopcart from './store/shopcart.js';\n// Router\nimport routerOrders from './router/orders.router.js';\n// Views\nimport Orders from './components/pages/Orders.vue';\nimport Order from './components/pages/Order.vue';\nimport OrderCreate from './components/pages/OrderCreate.vue';\nimport OrderCreateBackoffice from './components/pages/OrderCreateBackoffice.vue';\n// import Favorites from './components/pages/Favorites.vue';\n// Importing blocks components\nimport CardOrderItem from './components/blocks/CardOrderItem.vue';\nimport CardOrder from './components/blocks/CardOrder.vue';\nimport StatusHistory from './components/blocks/StatusHistory.vue';\n// Importing sections components\nimport FormCustomerDetails from './components/sections/FormCustomerDetails.vue';\nimport FormPayment from './components/sections/FormPayment.vue';\nimport FormDelivery from './components/sections/FormDelivery.vue';\nimport EmptyState from './components/sections/EmptyState.vue';\nimport AskToLogin from './components/sections/AskToLogin.vue';\nimport Succes from './components/sections/Succes.vue';\n// Importing partials components\nimport ShopCart from './components/partials/ShopCart.vue';\n\n// Пример функции инициализации для модуля заказов\nfunction initializeOrders(app, store, router, options = {}) {\n const route = options.route || 'Home';\n \n router.addRoute(route, routerOrders);\n store.addStore('orders', storeOrders);\n store.addStore('shopcart', storeShopcart);\n}\n\nconst ModuleOrder = {\n initialize: initializeOrders,\n views: {\n store: {\n storeOrders,\n storeShopcart\n },\n router: {\n routerOrders\n },\n components: {\n // Pages\n Orders,\n Order,\n OrderCreate,\n OrderCreateBackoffice,\n // Favorites,\n // Blocks\n CardOrderItem,\n CardOrder,\n StatusHistory,\n // Sections\n FormCustomerDetails,\n AskToLogin,\n FormDelivery,\n EmptyState,\n Succes,\n FormPayment,\n // Partials\n ShopCart,\n }\n }\n}\n\nexport default ModuleOrder\n"],"names":["routerOrders","storeOrders","storeShopcart","Orders","Order","OrderCreate","OrderCreateBackoffice","CardOrderItem","CardOrder","StatusHistory","FormCustomerDetails","AskToLogin","FormDelivery","EmptyState","Succes","FormPayment","ShopCart"],"mappings":";;;;;;;;;;;;;;;;;;;AA0BA,SAAS,iBAAiB,KAAK,OAAO,QAAQ,UAAU,CAAA,GAAI;AAC1D,QAAM,QAAQ,QAAQ,SAAS;AAE/B,SAAO,SAAS,OAAOA,cAAAA,OAAY;AACnC,QAAM,SAAS,UAAUC,MAAW;AACpC,QAAM,SAAS,YAAYC,QAAa;AAC1C;AAEK,MAAC,cAAc;AAAA,EAClB,YAAY;AAAA,EACZ,OAAO;AAAA,IACL,OAAO;AAAA,MACX,aAAMD;AAAAA,MACN,eAAMC;AAAAA,IACD;AAAA,IACD,QAAQ;AAAA,MACZ,cAAMF,cAAY;AAAA,IACb;AAAA,IACD,YAAY;AAAA;AAAA,MAEhB,QAAMG,OAAM;AAAA,MACZ,OAAMC,MAAK;AAAA,MACX,aAAMC,YAAW;AAAA,MACjB,uBAAMC,sBAAqB;AAAA;AAAA;AAAA,MAG3B,eAAMC,cAAa;AAAA,MACnB,WAAMC,UAAS;AAAA,MACf,eAAMC,cAAa;AAAA;AAAA,MAEnB,qBAAMC,oBAAmB;AAAA,MACzB,YAAMC,WAAU;AAAA,MAChB,cAAMC,aAAY;AAAA,MAClB,YAAMC,WAAU;AAAA,MAChB,QAAMC,OAAM;AAAA,MACZ,aAAMC,YAAW;AAAA;AAAA,MAEjB,UAAMC,SAAQ;AAAA,IACT;AAAA,EACF;AACH;;"}
1
+ {"version":3,"file":"orders.client.cjs","sources":["../../../../../src/modules/orders/orders.client.js"],"sourcesContent":["// Store\nimport * as storeOrders from './store/orders.js';\nimport * as storeShopcart from './store/shopcart.js';\nimport * as storeTestimonials from './store/testimonials'; \n// Router\nimport routerOrders from './router/orders.router.js';\n// Views\nimport Orders from './components/pages/Orders.vue';\nimport Order from './components/pages/Order.vue';\nimport OrderCreate from './components/pages/OrderCreate.vue';\nimport OrderCreateBackoffice from './components/pages/OrderCreateBackoffice.vue';\n// import Favorites from './components/pages/Favorites.vue';\n// Importing blocks components\nimport CardOrderItem from './components/blocks/CardOrderItem.vue';\nimport CardOrder from './components/blocks/CardOrder.vue';\nimport StatusHistory from './components/blocks/StatusHistory.vue';\n// Importing sections components\nimport FormCustomerDetails from './components/sections/FormCustomerDetails.vue';\nimport FormPayment from './components/sections/FormPayment.vue';\nimport FormDelivery from './components/sections/FormDelivery.vue';\nimport EmptyState from './components/sections/EmptyState.vue';\nimport AskToLogin from './components/sections/AskToLogin.vue';\nimport Succes from './components/sections/Succes.vue';\n// Importing partials components\nimport ShopCart from './components/partials/ShopCart.vue';\n\n// Пример функции инициализации для модуля заказов\nfunction initializeOrders(app, store, router, options = {}) {\n const route = options.route || 'Home';\n \n router.addRoute(route, routerOrders);\n store.addStore('orders', storeOrders);\n store.addStore('shopcart', storeShopcart);\n store.addStore('testimonials', storeTestimonials);\n}\n\nconst ModuleOrder = {\n initialize: initializeOrders,\n views: {\n store: {\n storeOrders,\n storeShopcart,\n storeTestimonials\n },\n router: {\n routerOrders\n },\n components: {\n // Pages\n Orders,\n Order,\n OrderCreate,\n OrderCreateBackoffice,\n // Favorites,\n // Blocks\n CardOrderItem,\n CardOrder,\n StatusHistory,\n // Sections\n FormCustomerDetails,\n AskToLogin,\n FormDelivery,\n EmptyState,\n Succes,\n FormPayment,\n // Partials\n ShopCart,\n }\n }\n}\n\nexport default ModuleOrder\n"],"names":["routerOrders","storeOrders","storeShopcart","storeTestimonials","Orders","Order","OrderCreate","OrderCreateBackoffice","CardOrderItem","CardOrder","StatusHistory","FormCustomerDetails","AskToLogin","FormDelivery","EmptyState","Succes","FormPayment","ShopCart"],"mappings":";;;;;;;;;;;;;;;;;;;;AA2BA,SAAS,iBAAiB,KAAK,OAAO,QAAQ,UAAU,CAAA,GAAI;AAC1D,QAAM,QAAQ,QAAQ,SAAS;AAE/B,SAAO,SAAS,OAAOA,cAAAA,OAAY;AACnC,QAAM,SAAS,UAAUC,MAAW;AACpC,QAAM,SAAS,YAAYC,QAAa;AACxC,QAAM,SAAS,gBAAgBC,YAAiB;AAClD;AAEK,MAAC,cAAc;AAAA,EAClB,YAAY;AAAA,EACZ,OAAO;AAAA,IACL,OAAO;AAAA,MACX,aAAMF;AAAAA,MACN,eAAMC;AAAAA,MACN,mBAAMC;AAAAA,IACD;AAAA,IACD,QAAQ;AAAA,MACZ,cAAMH,cAAY;AAAA,IACb;AAAA,IACD,YAAY;AAAA;AAAA,MAEhB,QAAMI,OAAM;AAAA,MACZ,OAAMC,MAAK;AAAA,MACX,aAAMC,YAAW;AAAA,MACjB,uBAAMC,sBAAqB;AAAA;AAAA;AAAA,MAG3B,eAAMC,cAAa;AAAA,MACnB,WAAMC,UAAS;AAAA,MACf,eAAMC,cAAa;AAAA;AAAA,MAEnB,qBAAMC,oBAAmB;AAAA,MACzB,YAAMC,WAAU;AAAA,MAChB,cAAMC,aAAY;AAAA,MAClB,YAAMC,WAAU;AAAA,MAChB,QAAMC,OAAM;AAAA,MACZ,aAAMC,YAAW;AAAA;AAAA,MAEjB,UAAMC,SAAQ;AAAA,IACT;AAAA,EACF;AACH;;"}
@@ -1,5 +1,6 @@
1
1
  import * as orders from "./store/orders.js";
2
2
  import * as shopcart from "./store/shopcart.js";
3
+ import * as testimonials from "./store/testimonials.js";
3
4
  import orders$1 from "./router/orders.router.js";
4
5
  import _sfc_main from "./components/pages/Orders.vue.js";
5
6
  import Order from "./components/pages/Order.vue.js";
@@ -20,13 +21,15 @@ function initializeOrders(app, store, router, options = {}) {
20
21
  router.addRoute(route, orders$1);
21
22
  store.addStore("orders", orders);
22
23
  store.addStore("shopcart", shopcart);
24
+ store.addStore("testimonials", testimonials);
23
25
  }
24
26
  const ModuleOrder = {
25
27
  initialize: initializeOrders,
26
28
  views: {
27
29
  store: {
28
30
  storeOrders: orders,
29
- storeShopcart: shopcart
31
+ storeShopcart: shopcart,
32
+ storeTestimonials: testimonials
30
33
  },
31
34
  router: {
32
35
  routerOrders: orders$1
@@ -1 +1 @@
1
- {"version":3,"file":"orders.client.js","sources":["../../../../../src/modules/orders/orders.client.js"],"sourcesContent":["// Store\nimport * as storeOrders from './store/orders.js';\nimport * as storeShopcart from './store/shopcart.js';\n// Router\nimport routerOrders from './router/orders.router.js';\n// Views\nimport Orders from './components/pages/Orders.vue';\nimport Order from './components/pages/Order.vue';\nimport OrderCreate from './components/pages/OrderCreate.vue';\nimport OrderCreateBackoffice from './components/pages/OrderCreateBackoffice.vue';\n// import Favorites from './components/pages/Favorites.vue';\n// Importing blocks components\nimport CardOrderItem from './components/blocks/CardOrderItem.vue';\nimport CardOrder from './components/blocks/CardOrder.vue';\nimport StatusHistory from './components/blocks/StatusHistory.vue';\n// Importing sections components\nimport FormCustomerDetails from './components/sections/FormCustomerDetails.vue';\nimport FormPayment from './components/sections/FormPayment.vue';\nimport FormDelivery from './components/sections/FormDelivery.vue';\nimport EmptyState from './components/sections/EmptyState.vue';\nimport AskToLogin from './components/sections/AskToLogin.vue';\nimport Succes from './components/sections/Succes.vue';\n// Importing partials components\nimport ShopCart from './components/partials/ShopCart.vue';\n\n// Пример функции инициализации для модуля заказов\nfunction initializeOrders(app, store, router, options = {}) {\n const route = options.route || 'Home';\n \n router.addRoute(route, routerOrders);\n store.addStore('orders', storeOrders);\n store.addStore('shopcart', storeShopcart);\n}\n\nconst ModuleOrder = {\n initialize: initializeOrders,\n views: {\n store: {\n storeOrders,\n storeShopcart\n },\n router: {\n routerOrders\n },\n components: {\n // Pages\n Orders,\n Order,\n OrderCreate,\n OrderCreateBackoffice,\n // Favorites,\n // Blocks\n CardOrderItem,\n CardOrder,\n StatusHistory,\n // Sections\n FormCustomerDetails,\n AskToLogin,\n FormDelivery,\n EmptyState,\n Succes,\n FormPayment,\n // Partials\n ShopCart,\n }\n }\n}\n\nexport default ModuleOrder\n"],"names":["routerOrders","storeOrders","storeShopcart","Orders","OrderCreate","OrderCreateBackoffice","CardOrderItem","StatusHistory","FormCustomerDetails","AskToLogin","FormDelivery","EmptyState","Succes","FormPayment","ShopCart"],"mappings":";;;;;;;;;;;;;;;;;AA0BA,SAAS,iBAAiB,KAAK,OAAO,QAAQ,UAAU,CAAA,GAAI;AAC1D,QAAM,QAAQ,QAAQ,SAAS;AAE/B,SAAO,SAAS,OAAOA,QAAY;AACnC,QAAM,SAAS,UAAUC,MAAW;AACpC,QAAM,SAAS,YAAYC,QAAa;AAC1C;AAEK,MAAC,cAAc;AAAA,EAClB,YAAY;AAAA,EACZ,OAAO;AAAA,IACL,OAAO;AAAA,MACX,aAAMD;AAAAA,MACN,eAAMC;AAAAA,IACD;AAAA,IACD,QAAQ;AAAA,MACZ,cAAMF;AAAAA,IACD;AAAA,IACD,YAAY;AAAA;AAAA,MAEhB,QAAMG;AAAAA,MACA;AAAA,MACN,aAAMC;AAAAA,MACN,uBAAMC;AAAAA;AAAAA;AAAAA,MAGN,eAAMC;AAAAA,MACA;AAAA,MACN,eAAMC;AAAAA;AAAAA,MAEN,qBAAMC;AAAAA,MACN,YAAMC;AAAAA,MACN,cAAMC;AAAAA,MACN,YAAMC;AAAAA,MACN,QAAMC;AAAAA,MACN,aAAMC;AAAAA;AAAAA,MAEN,UAAMC;AAAAA,IACD;AAAA,EACF;AACH;"}
1
+ {"version":3,"file":"orders.client.js","sources":["../../../../../src/modules/orders/orders.client.js"],"sourcesContent":["// Store\nimport * as storeOrders from './store/orders.js';\nimport * as storeShopcart from './store/shopcart.js';\nimport * as storeTestimonials from './store/testimonials'; \n// Router\nimport routerOrders from './router/orders.router.js';\n// Views\nimport Orders from './components/pages/Orders.vue';\nimport Order from './components/pages/Order.vue';\nimport OrderCreate from './components/pages/OrderCreate.vue';\nimport OrderCreateBackoffice from './components/pages/OrderCreateBackoffice.vue';\n// import Favorites from './components/pages/Favorites.vue';\n// Importing blocks components\nimport CardOrderItem from './components/blocks/CardOrderItem.vue';\nimport CardOrder from './components/blocks/CardOrder.vue';\nimport StatusHistory from './components/blocks/StatusHistory.vue';\n// Importing sections components\nimport FormCustomerDetails from './components/sections/FormCustomerDetails.vue';\nimport FormPayment from './components/sections/FormPayment.vue';\nimport FormDelivery from './components/sections/FormDelivery.vue';\nimport EmptyState from './components/sections/EmptyState.vue';\nimport AskToLogin from './components/sections/AskToLogin.vue';\nimport Succes from './components/sections/Succes.vue';\n// Importing partials components\nimport ShopCart from './components/partials/ShopCart.vue';\n\n// Пример функции инициализации для модуля заказов\nfunction initializeOrders(app, store, router, options = {}) {\n const route = options.route || 'Home';\n \n router.addRoute(route, routerOrders);\n store.addStore('orders', storeOrders);\n store.addStore('shopcart', storeShopcart);\n store.addStore('testimonials', storeTestimonials);\n}\n\nconst ModuleOrder = {\n initialize: initializeOrders,\n views: {\n store: {\n storeOrders,\n storeShopcart,\n storeTestimonials\n },\n router: {\n routerOrders\n },\n components: {\n // Pages\n Orders,\n Order,\n OrderCreate,\n OrderCreateBackoffice,\n // Favorites,\n // Blocks\n CardOrderItem,\n CardOrder,\n StatusHistory,\n // Sections\n FormCustomerDetails,\n AskToLogin,\n FormDelivery,\n EmptyState,\n Succes,\n FormPayment,\n // Partials\n ShopCart,\n }\n }\n}\n\nexport default ModuleOrder\n"],"names":["routerOrders","storeOrders","storeShopcart","storeTestimonials","Orders","OrderCreate","OrderCreateBackoffice","CardOrderItem","StatusHistory","FormCustomerDetails","AskToLogin","FormDelivery","EmptyState","Succes","FormPayment","ShopCart"],"mappings":";;;;;;;;;;;;;;;;;;AA2BA,SAAS,iBAAiB,KAAK,OAAO,QAAQ,UAAU,CAAA,GAAI;AAC1D,QAAM,QAAQ,QAAQ,SAAS;AAE/B,SAAO,SAAS,OAAOA,QAAY;AACnC,QAAM,SAAS,UAAUC,MAAW;AACpC,QAAM,SAAS,YAAYC,QAAa;AACxC,QAAM,SAAS,gBAAgBC,YAAiB;AAClD;AAEK,MAAC,cAAc;AAAA,EAClB,YAAY;AAAA,EACZ,OAAO;AAAA,IACL,OAAO;AAAA,MACX,aAAMF;AAAAA,MACN,eAAMC;AAAAA,MACN,mBAAMC;AAAAA,IACD;AAAA,IACD,QAAQ;AAAA,MACZ,cAAMH;AAAAA,IACD;AAAA,IACD,YAAY;AAAA;AAAA,MAEhB,QAAMI;AAAAA,MACA;AAAA,MACN,aAAMC;AAAAA,MACN,uBAAMC;AAAAA;AAAAA;AAAAA,MAGN,eAAMC;AAAAA,MACA;AAAA,MACN,eAAMC;AAAAA;AAAAA,MAEN,qBAAMC;AAAAA,MACN,YAAMC;AAAAA,MACN,cAAMC;AAAAA,MACN,YAAMC;AAAAA,MACN,QAAMC;AAAAA,MACN,aAAMC;AAAAA;AAAAA,MAEN,UAAMC;AAAAA,IACD;AAAA,EACF;AACH;"}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const axios = require("axios");
4
+ const vue = require("vue");
5
+ const $axios = axios.create({ baseURL: process.env.API_URL, withCredentials: true });
6
+ const state = vue.reactive({
7
+ testimonials: []
8
+ });
9
+ const actions = {
10
+ async fetchTestimonials() {
11
+ try {
12
+ const response = await axios.get("/api/testimonials");
13
+ state.testimonials = response.data;
14
+ } catch (error) {
15
+ console.error(error);
16
+ }
17
+ },
18
+ async createTestimonial(testimonial) {
19
+ console.log(testimonial.profile.photo);
20
+ try {
21
+ const formData = new FormData();
22
+ formData.append("avatar", testimonial.profile.photo);
23
+ formData.append("rating", testimonial.rating);
24
+ formData.append("name", testimonial.name);
25
+ formData.append("position", testimonial.position);
26
+ formData.append("description", testimonial.description);
27
+ console.log(formData);
28
+ const response = await $axios.post("/api/testimonials/create", formData, {
29
+ headers: {
30
+ "Content-Type": "multipart/form-data"
31
+ }
32
+ });
33
+ state.testimonials.push(response.data);
34
+ } catch (error) {
35
+ console.error(error);
36
+ }
37
+ },
38
+ async updateTestimonial(testimonial) {
39
+ try {
40
+ const response = await axios.post(`/api/testimonials/update`, testimonial);
41
+ const index = state.testimonials.findIndex((t) => t._id === testimonial._id);
42
+ if (index !== -1) {
43
+ state.testimonials[index] = response.data;
44
+ }
45
+ } catch (error) {
46
+ console.error(error);
47
+ }
48
+ },
49
+ async deleteTestimonial(testimonialId) {
50
+ try {
51
+ await axios.delete(`/api/testimonials/delete/${testimonialId}`);
52
+ const index = state.testimonials.findIndex((t) => t._id === testimonialId);
53
+ if (index !== -1) {
54
+ state.testimonials.splice(index, 1);
55
+ }
56
+ } catch (error) {
57
+ console.error(error);
58
+ }
59
+ }
60
+ };
61
+ exports.actions = actions;
62
+ exports.state = state;
63
+ //# sourceMappingURL=testimonials.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testimonials.cjs","sources":["../../../../../../src/modules/orders/store/testimonials.js"],"sourcesContent":["// Dependencies\nimport axios from 'axios';\nimport { reactive } from \"vue\";\n\nconst $axios = axios.create({baseURL: process.env.API_URL, withCredentials: true})\n\n// State\nconst state = reactive({\n testimonials: [],\n});\n\nconst actions = {\n async fetchTestimonials() {\n try {\n const response = await axios.get('/api/testimonials');\n state.testimonials = response.data;\n } catch (error) {\n console.error(error);\n }\n },\n\n async createTestimonial(testimonial) {\n console.log(testimonial.profile.photo)\n try {\n const formData = new FormData();\n formData.append('avatar', testimonial.profile.photo);\n formData.append('rating', testimonial.rating);\n formData.append('name', testimonial.name);\n formData.append('position', testimonial.position);\n formData.append('description', testimonial.description);\n\n console.log(formData)\n\n const response = await $axios.post('/api/testimonials/create', formData, {\n headers: {\n 'Content-Type': 'multipart/form-data'\n }\n });\n\n state.testimonials.push(response.data);\n } catch (error) {\n console.error(error);\n }\n },\n\n async updateTestimonial(testimonial) {\n try {\n const response = await axios.post(`/api/testimonials/update`, testimonial);\n const index = state.testimonials.findIndex(t => t._id === testimonial._id);\n if (index !== -1) {\n state.testimonials[index] = response.data;\n }\n } catch (error) {\n console.error(error);\n }\n },\n\n async deleteTestimonial(testimonialId) {\n try {\n await axios.delete(`/api/testimonials/delete/${testimonialId}`);\n const index = state.testimonials.findIndex(t => t._id === testimonialId);\n if (index !== -1) {\n state.testimonials.splice(index, 1);\n }\n } catch (error) {\n console.error(error);\n }\n },\n};\n\nexport {\n state,\n actions\n};\n"],"names":["reactive"],"mappings":";;;;AAIA,MAAM,SAAS,MAAM,OAAO,EAAC,SAAS,QAAQ,IAAI,SAAS,iBAAiB,KAAI,CAAC;AAG5E,MAAC,QAAQA,IAAAA,SAAS;AAAA,EACrB,cAAc,CAAE;AAClB,CAAC;AAEI,MAAC,UAAU;AAAA,EACd,MAAM,oBAAoB;AACxB,QAAI;AACF,YAAM,WAAW,MAAM,MAAM,IAAI,mBAAmB;AACpD,YAAM,eAAe,SAAS;AAAA,IAC/B,SAAQ,OAAO;AACd,cAAQ,MAAM,KAAK;AAAA,IACpB;AAAA,EACF;AAAA,EAED,MAAM,kBAAkB,aAAa;AACnC,YAAQ,IAAI,YAAY,QAAQ,KAAK;AACrC,QAAI;AACF,YAAM,WAAW,IAAI;AACrB,eAAS,OAAO,UAAU,YAAY,QAAQ,KAAK;AACnD,eAAS,OAAO,UAAU,YAAY,MAAM;AAC5C,eAAS,OAAO,QAAQ,YAAY,IAAI;AACxC,eAAS,OAAO,YAAY,YAAY,QAAQ;AAChD,eAAS,OAAO,eAAe,YAAY,WAAW;AAEtD,cAAQ,IAAI,QAAQ;AAEpB,YAAM,WAAW,MAAM,OAAO,KAAK,4BAA4B,UAAU;AAAA,QACvE,SAAS;AAAA,UACP,gBAAgB;AAAA,QACjB;AAAA,MACT,CAAO;AAED,YAAM,aAAa,KAAK,SAAS,IAAI;AAAA,IACtC,SAAQ,OAAO;AACd,cAAQ,MAAM,KAAK;AAAA,IACpB;AAAA,EACF;AAAA,EAED,MAAM,kBAAkB,aAAa;AACnC,QAAI;AACF,YAAM,WAAW,MAAM,MAAM,KAAK,4BAA4B,WAAW;AACzE,YAAM,QAAQ,MAAM,aAAa,UAAU,OAAK,EAAE,QAAQ,YAAY,GAAG;AACzE,UAAI,UAAU,IAAI;AAChB,cAAM,aAAa,KAAK,IAAI,SAAS;AAAA,MACtC;AAAA,IACF,SAAQ,OAAO;AACd,cAAQ,MAAM,KAAK;AAAA,IACpB;AAAA,EACF;AAAA,EAED,MAAM,kBAAkB,eAAe;AACrC,QAAI;AACF,YAAM,MAAM,OAAO,4BAA4B,aAAa,EAAE;AAC9D,YAAM,QAAQ,MAAM,aAAa,UAAU,OAAK,EAAE,QAAQ,aAAa;AACvE,UAAI,UAAU,IAAI;AAChB,cAAM,aAAa,OAAO,OAAO,CAAC;AAAA,MACnC;AAAA,IACF,SAAQ,OAAO;AACd,cAAQ,MAAM,KAAK;AAAA,IACpB;AAAA,EACF;AACH;;;"}
@@ -0,0 +1,63 @@
1
+ import axios from "axios";
2
+ import { reactive } from "vue";
3
+ const $axios = axios.create({ baseURL: process.env.API_URL, withCredentials: true });
4
+ const state = reactive({
5
+ testimonials: []
6
+ });
7
+ const actions = {
8
+ async fetchTestimonials() {
9
+ try {
10
+ const response = await axios.get("/api/testimonials");
11
+ state.testimonials = response.data;
12
+ } catch (error) {
13
+ console.error(error);
14
+ }
15
+ },
16
+ async createTestimonial(testimonial) {
17
+ console.log(testimonial.profile.photo);
18
+ try {
19
+ const formData = new FormData();
20
+ formData.append("avatar", testimonial.profile.photo);
21
+ formData.append("rating", testimonial.rating);
22
+ formData.append("name", testimonial.name);
23
+ formData.append("position", testimonial.position);
24
+ formData.append("description", testimonial.description);
25
+ console.log(formData);
26
+ const response = await $axios.post("/api/testimonials/create", formData, {
27
+ headers: {
28
+ "Content-Type": "multipart/form-data"
29
+ }
30
+ });
31
+ state.testimonials.push(response.data);
32
+ } catch (error) {
33
+ console.error(error);
34
+ }
35
+ },
36
+ async updateTestimonial(testimonial) {
37
+ try {
38
+ const response = await axios.post(`/api/testimonials/update`, testimonial);
39
+ const index = state.testimonials.findIndex((t) => t._id === testimonial._id);
40
+ if (index !== -1) {
41
+ state.testimonials[index] = response.data;
42
+ }
43
+ } catch (error) {
44
+ console.error(error);
45
+ }
46
+ },
47
+ async deleteTestimonial(testimonialId) {
48
+ try {
49
+ await axios.delete(`/api/testimonials/delete/${testimonialId}`);
50
+ const index = state.testimonials.findIndex((t) => t._id === testimonialId);
51
+ if (index !== -1) {
52
+ state.testimonials.splice(index, 1);
53
+ }
54
+ } catch (error) {
55
+ console.error(error);
56
+ }
57
+ }
58
+ };
59
+ export {
60
+ actions,
61
+ state
62
+ };
63
+ //# sourceMappingURL=testimonials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testimonials.js","sources":["../../../../../../src/modules/orders/store/testimonials.js"],"sourcesContent":["// Dependencies\nimport axios from 'axios';\nimport { reactive } from \"vue\";\n\nconst $axios = axios.create({baseURL: process.env.API_URL, withCredentials: true})\n\n// State\nconst state = reactive({\n testimonials: [],\n});\n\nconst actions = {\n async fetchTestimonials() {\n try {\n const response = await axios.get('/api/testimonials');\n state.testimonials = response.data;\n } catch (error) {\n console.error(error);\n }\n },\n\n async createTestimonial(testimonial) {\n console.log(testimonial.profile.photo)\n try {\n const formData = new FormData();\n formData.append('avatar', testimonial.profile.photo);\n formData.append('rating', testimonial.rating);\n formData.append('name', testimonial.name);\n formData.append('position', testimonial.position);\n formData.append('description', testimonial.description);\n\n console.log(formData)\n\n const response = await $axios.post('/api/testimonials/create', formData, {\n headers: {\n 'Content-Type': 'multipart/form-data'\n }\n });\n\n state.testimonials.push(response.data);\n } catch (error) {\n console.error(error);\n }\n },\n\n async updateTestimonial(testimonial) {\n try {\n const response = await axios.post(`/api/testimonials/update`, testimonial);\n const index = state.testimonials.findIndex(t => t._id === testimonial._id);\n if (index !== -1) {\n state.testimonials[index] = response.data;\n }\n } catch (error) {\n console.error(error);\n }\n },\n\n async deleteTestimonial(testimonialId) {\n try {\n await axios.delete(`/api/testimonials/delete/${testimonialId}`);\n const index = state.testimonials.findIndex(t => t._id === testimonialId);\n if (index !== -1) {\n state.testimonials.splice(index, 1);\n }\n } catch (error) {\n console.error(error);\n }\n },\n};\n\nexport {\n state,\n actions\n};\n"],"names":[],"mappings":";;AAIA,MAAM,SAAS,MAAM,OAAO,EAAC,SAAS,QAAQ,IAAI,SAAS,iBAAiB,KAAI,CAAC;AAG5E,MAAC,QAAQ,SAAS;AAAA,EACrB,cAAc,CAAE;AAClB,CAAC;AAEI,MAAC,UAAU;AAAA,EACd,MAAM,oBAAoB;AACxB,QAAI;AACF,YAAM,WAAW,MAAM,MAAM,IAAI,mBAAmB;AACpD,YAAM,eAAe,SAAS;AAAA,IAC/B,SAAQ,OAAO;AACd,cAAQ,MAAM,KAAK;AAAA,IACpB;AAAA,EACF;AAAA,EAED,MAAM,kBAAkB,aAAa;AACnC,YAAQ,IAAI,YAAY,QAAQ,KAAK;AACrC,QAAI;AACF,YAAM,WAAW,IAAI;AACrB,eAAS,OAAO,UAAU,YAAY,QAAQ,KAAK;AACnD,eAAS,OAAO,UAAU,YAAY,MAAM;AAC5C,eAAS,OAAO,QAAQ,YAAY,IAAI;AACxC,eAAS,OAAO,YAAY,YAAY,QAAQ;AAChD,eAAS,OAAO,eAAe,YAAY,WAAW;AAEtD,cAAQ,IAAI,QAAQ;AAEpB,YAAM,WAAW,MAAM,OAAO,KAAK,4BAA4B,UAAU;AAAA,QACvE,SAAS;AAAA,UACP,gBAAgB;AAAA,QACjB;AAAA,MACT,CAAO;AAED,YAAM,aAAa,KAAK,SAAS,IAAI;AAAA,IACtC,SAAQ,OAAO;AACd,cAAQ,MAAM,KAAK;AAAA,IACpB;AAAA,EACF;AAAA,EAED,MAAM,kBAAkB,aAAa;AACnC,QAAI;AACF,YAAM,WAAW,MAAM,MAAM,KAAK,4BAA4B,WAAW;AACzE,YAAM,QAAQ,MAAM,aAAa,UAAU,OAAK,EAAE,QAAQ,YAAY,GAAG;AACzE,UAAI,UAAU,IAAI;AAChB,cAAM,aAAa,KAAK,IAAI,SAAS;AAAA,MACtC;AAAA,IACF,SAAQ,OAAO;AACd,cAAQ,MAAM,KAAK;AAAA,IACpB;AAAA,EACF;AAAA,EAED,MAAM,kBAAkB,eAAe;AACrC,QAAI;AACF,YAAM,MAAM,OAAO,4BAA4B,aAAa,EAAE;AAC9D,YAAM,QAAQ,MAAM,aAAa,UAAU,OAAK,EAAE,QAAQ,aAAa;AACvE,UAAI,UAAU,IAAI;AAChB,cAAM,aAAa,OAAO,OAAO,CAAC;AAAA,MACnC;AAAA,IACF,SAAQ,OAAO;AACd,cAAQ,MAAM,KAAK;AAAA,IACpB;AAAA,EACF;AACH;"}
@@ -5,7 +5,7 @@ const IconEdit = require("../../../icons/navigation/IconEdit.vue.cjs");
5
5
  ;/* empty css */
6
6
  ;/* empty css */
7
7
  const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");
8
- const CardUser = require("../../../users/components/blocks/CardUser.vue.cjs");
8
+ const CardUser = require("../../../auth/views/components/blocks/CardUser.vue.cjs");
9
9
  ;/* empty css */
10
10
  const _hoisted_1 = { class: "" };
11
11
  const _hoisted_2 = { class: "pd-medium w-100" };
@@ -65,6 +65,6 @@ const _sfc_main = {
65
65
  };
66
66
  }
67
67
  };
68
- const CardDepartment = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-de9a0606"]]);
68
+ const CardDepartment = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-15358182"]]);
69
69
  exports.default = CardDepartment;
70
70
  //# sourceMappingURL=CardDepartment.vue.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"CardDepartment.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/blocks/CardDepartment.vue"],"sourcesContent":["<template>\n <div class=\"\">\n\n <div class=\"pd-medium w-100\">\n\n <router-link \n :to=\"{\n name: 'Department Edit', \n params: {\n _id: props.organization,\n department: department._id\n }\n }\" \n class=\"\n cursor-pointer \n pos-absolute pos-t-regular pos-r-regular\n radius-extra pd-thin bg-second\n \"\n >\n <IconEdit\n class=\"i-regular\"\n classes=\"fill-white\"\n />\n </router-link>\n\n <h3 \n @click=\"$router.push(`/organizations/${props.organization}/departments/${department._id}`)\"\n class=\"mn-b-small w-100\"\n v-html=\"department.profile.name\"\n />\n \n <ul>\n <li v-if=\"department.members.length < 1\">No members in department</li>\n <User \n class=\"h-4r pd-small br-solid br-1px br-black-transp-5 radius-small mn-b-thin\" \n v-for=\"(member, index) in department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n @click=\"$router.push(`/app/profile/${member.user._id}`)\" \n />\n </ul>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref } from 'vue';\n\nimport IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'\n\nimport Spoiler from '@pf/src/components/Spoiler/Spoiler.vue';\nimport DepartmentSub from '@pf/src/modules/organizations/components/blocks/DepartmentSub.vue';\nimport User from '@pf/src/modules/users/components/blocks/CardUser.vue';\n\nconst props = defineProps({\n department: Object,\n organization: Object\n});\n</script>\n<style scoped>\n.subdepartmentsartment {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin-top: 1rem;\n}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAyDA,UAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CardDepartment.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/blocks/CardDepartment.vue"],"sourcesContent":["<template>\n <div class=\"\">\n\n <div class=\"pd-medium w-100\">\n\n <router-link \n :to=\"{\n name: 'Department Edit', \n params: {\n _id: props.organization,\n department: department._id\n }\n }\" \n class=\"\n cursor-pointer \n pos-absolute pos-t-regular pos-r-regular\n radius-extra pd-thin bg-second\n \"\n >\n <IconEdit\n class=\"i-regular\"\n classes=\"fill-white\"\n />\n </router-link>\n\n <h3 \n @click=\"$router.push(`/organizations/${props.organization}/departments/${department._id}`)\"\n class=\"mn-b-small w-100\"\n v-html=\"department.profile.name\"\n />\n \n <ul>\n <li v-if=\"department.members.length < 1\">No members in department</li>\n <User \n class=\"h-4r pd-small br-solid br-1px br-black-transp-5 radius-small mn-b-thin\" \n v-for=\"(member, index) in department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n @click=\"$router.push(`/app/profile/${member.user._id}`)\" \n />\n </ul>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref } from 'vue';\n\nimport IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'\n\nimport Spoiler from '@pf/src/components/Spoiler/Spoiler.vue';\nimport DepartmentSub from '@pf/src/modules/organizations/components/blocks/DepartmentSub.vue';\nimport User from '@pf/src/modules/auth/views/components/blocks/CardUser.vue';\n\nconst props = defineProps({\n department: Object,\n organization: Object\n});\n</script>\n<style scoped>\n.subdepartmentsartment {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin-top: 1rem;\n}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAyDA,UAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,7 +3,7 @@ import _sfc_main$1 from "../../../icons/navigation/IconEdit.vue.js";
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
6
- import _sfc_main$2 from "../../../users/components/blocks/CardUser.vue.js";
6
+ import _sfc_main$2 from "../../../auth/views/components/blocks/CardUser.vue.js";
7
7
  /* empty css */
8
8
  const _hoisted_1 = { class: "" };
9
9
  const _hoisted_2 = { class: "pd-medium w-100" };
@@ -63,7 +63,7 @@ const _sfc_main = {
63
63
  };
64
64
  }
65
65
  };
66
- const CardDepartment = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-de9a0606"]]);
66
+ const CardDepartment = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-15358182"]]);
67
67
  export {
68
68
  CardDepartment as default
69
69
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CardDepartment.vue.js","sources":["../../../../../../../src/modules/organizations/components/blocks/CardDepartment.vue"],"sourcesContent":["<template>\n <div class=\"\">\n\n <div class=\"pd-medium w-100\">\n\n <router-link \n :to=\"{\n name: 'Department Edit', \n params: {\n _id: props.organization,\n department: department._id\n }\n }\" \n class=\"\n cursor-pointer \n pos-absolute pos-t-regular pos-r-regular\n radius-extra pd-thin bg-second\n \"\n >\n <IconEdit\n class=\"i-regular\"\n classes=\"fill-white\"\n />\n </router-link>\n\n <h3 \n @click=\"$router.push(`/organizations/${props.organization}/departments/${department._id}`)\"\n class=\"mn-b-small w-100\"\n v-html=\"department.profile.name\"\n />\n \n <ul>\n <li v-if=\"department.members.length < 1\">No members in department</li>\n <User \n class=\"h-4r pd-small br-solid br-1px br-black-transp-5 radius-small mn-b-thin\" \n v-for=\"(member, index) in department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n @click=\"$router.push(`/app/profile/${member.user._id}`)\" \n />\n </ul>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref } from 'vue';\n\nimport IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'\n\nimport Spoiler from '@pf/src/components/Spoiler/Spoiler.vue';\nimport DepartmentSub from '@pf/src/modules/organizations/components/blocks/DepartmentSub.vue';\nimport User from '@pf/src/modules/users/components/blocks/CardUser.vue';\n\nconst props = defineProps({\n department: Object,\n organization: Object\n});\n</script>\n<style scoped>\n.subdepartmentsartment {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin-top: 1rem;\n}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAyDA,UAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CardDepartment.vue.js","sources":["../../../../../../../src/modules/organizations/components/blocks/CardDepartment.vue"],"sourcesContent":["<template>\n <div class=\"\">\n\n <div class=\"pd-medium w-100\">\n\n <router-link \n :to=\"{\n name: 'Department Edit', \n params: {\n _id: props.organization,\n department: department._id\n }\n }\" \n class=\"\n cursor-pointer \n pos-absolute pos-t-regular pos-r-regular\n radius-extra pd-thin bg-second\n \"\n >\n <IconEdit\n class=\"i-regular\"\n classes=\"fill-white\"\n />\n </router-link>\n\n <h3 \n @click=\"$router.push(`/organizations/${props.organization}/departments/${department._id}`)\"\n class=\"mn-b-small w-100\"\n v-html=\"department.profile.name\"\n />\n \n <ul>\n <li v-if=\"department.members.length < 1\">No members in department</li>\n <User \n class=\"h-4r pd-small br-solid br-1px br-black-transp-5 radius-small mn-b-thin\" \n v-for=\"(member, index) in department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n @click=\"$router.push(`/app/profile/${member.user._id}`)\" \n />\n </ul>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref } from 'vue';\n\nimport IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'\n\nimport Spoiler from '@pf/src/components/Spoiler/Spoiler.vue';\nimport DepartmentSub from '@pf/src/modules/organizations/components/blocks/DepartmentSub.vue';\nimport User from '@pf/src/modules/auth/views/components/blocks/CardUser.vue';\n\nconst props = defineProps({\n department: Object,\n organization: Object\n});\n</script>\n<style scoped>\n.subdepartmentsartment {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin-top: 1rem;\n}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAyDA,UAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -123,7 +123,7 @@ const _sfc_main = {
123
123
  vue.createElementVNode("div", _hoisted_14, [
124
124
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.organization.products.slice(0, 5), (product) => {
125
125
  return vue.openBlock(), vue.createBlock(CardOrderItem.default, {
126
- onClick: vue.withModifiers(($event) => _ctx.$router.push({ name: "Product Organization", params: { _id: __props.organization._id, product: product._id } }), ["stop"]),
126
+ onClick: vue.withModifiers(($event) => _ctx.$router.push({ name: "Organization_Product", params: { _id: __props.organization._id, product: product._id } }), ["stop"]),
127
127
  key: product._id,
128
128
  editable: false,
129
129
  product,
@@ -1 +1 @@
1
- {"version":3,"file":"CardOrganization.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/blocks/CardOrganization.vue"],"sourcesContent":["<template>\n <div \n class=\"o-hidden pos-relative cursor-pointer bg-light pd-small\"\n @click=\"$router.push({name: 'Organization', params: {_id: organization._id}})\"\n >\n <div class=\"flex pos-relative\">\n\n <img loading=\"lazy\" \n v-if=\"organization.profile.photo && organization.profile.photo.length > 0\"\n :src=\"(FILE_SERVER_URL || '') + organization.profile.photo\" \n class=\"h-4r w-4r radius-extra bg-white\" \n />\n\n <PlaceholderOrganizationPic\n v-else\n class=\"h-4r w-4r\"\n />\n \n <div class=\"pos-relative w-100 flex-h-center flex flex-column flex-child-1 flex-child mn-l-thin w-100\">\n \n <!-- <Text :text=\"organization.profile.name ? organization.profile.name : ''\" :maxLen=\"18\" class=\"h3 d-block\"/> -->\n <p class=\"h4 t-truncate\">{{organization.profile.name}}</p>\n <!-- RATING -->\n <!-- <div v-if=\"showRating && organization.rating\" class=\"w-max star-container flex-v-center flex\">\n <img loading=\"lazy\" \n v-for=\"i in 5\"\n class=\"i-small mn-r-thin\"\n :src=\"i <= organization.rating.median ? '/icons/star.svg' : '/icons/star-stroke.svg'\"\n >\n\n <span class=\"p-small t-semi mn-r-thin\">{{organization.rating.median}}</span>\n <span class=\"p-small\">({{organization.rating.amount}})</span>\n </div> -->\n\n <Chips \n v-if=\"showTags && organization.profile.tags?.length > 0\" \n :chips=\"organization.profile.tags.slice(0,3)\"\n class=\"pos-relative p-small\"\n />\n\n <div v-if=\"showFollowers\" class=\"flex-center gap-thin pd-r-thin pd-l-thin flex-nowrap flex mn-t-thin bg-white radius-extra w-max\">\n <p class=\"mn-t-thin mn-b-thin\">{{organization.numberOfSubscribers}} followers</p>\n\n <ButtonToggleMembership\n v-if=\"\n user?._id \n && organization.owner !== user._id\n \"\n :user=\"user._id\"\n :type=\"'organization'\" \n :role=\"'subscriber'\" \n :target=\"organization._id\" \n :status=\"organization.isSubscriber\" \n :text=\"{create: '+', remove: '-'}\"\n @updateMembership=\"event => emits('updateMembership', event, 'isSubscriber', 'numberOfSubscribers')\"\n class=\"i-semi\" \n />\n </div>\n\n </div>\n\n </div>\n\n\n <div \n v-if=\"showProducts\" \n class=\"mn-b-small mn-t-small w-100 flex-nowrap flex flex-v-center pd-small bg-white radius-medium\"\n >\n <IconTime class=\"i-medium mn-r-micro\"/>\n <span class=\"mn-r-thin\">{{\n organization.distance ? \n organization.distance > 50 ? \n '3-5 days' : \n Math.ceil((5 + 5 + 3 * organization.distance) / 5) * 5 \n + '-' \n + Math.ceil((15 + 5 + 3 * organization.distance) / 5) * 5 \n + ' MIN' : 'Unavailable' \n }} \n </span>\n <span v-if=\"organization.distance && organization.distance < 50\" class=\"t-transp mn-r-thin\">|</span>\n <span v-if=\"organization.distance && organization.distance < 50\" class=\"mn-r-thin\">{{organization.distance ? organization.distance.toFixed(1) + ' KM' : ''}} </span>\n <!-- <span class=\"mn-r-thin\">{{organization.nearestSpotDistance}}</span> -->\n <IconPrice class=\"i-medium mn-r-micro\"/>\n <span class=\"mn-r-thin\">{{returnCurrency()}}500 </span>\n <IconShopcart class=\"i-medium mn-r-micro\"/>\n <span class=\"mn-r-thin\"> {{organization.products.length}} products</span>\n </div>\n\n <div v-if=\"showProducts && organization.products.length > 0\" class=\"w-100 o-scroll radius-medium\">\n <div class=\"w-max flex-nowrap flex gap-thin\">\n <CardOrderItem \n @click.stop=\"$router.push({name: 'Product Organization', params: {_id: organization._id, product: product._id}})\" \n v-for=\"product in organization.products.slice(0,5)\" \n :key=\"product._id\" \n :editable=\"false\" \n :product=\"product\" \n class=\"pd-thin w-15r radius-medium bg-white\"\n \n />\n <button class=\"pd-thin w-15r radius-medium bg-main button\">\n View menu\n </button>\n </div>\n </div>\n\n </div>\n</template>\n\n<script setup>\n import { ref } from 'vue'\n import { useRouter } from 'vue-router'\n import CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue';\n\n import Text from '@pf/src/components/Text/Text.vue'\n import Chips from '@pf/src/components/Chips/Chips.vue'\n\n import PlaceholderOrganizationPic from '@pf/src/modules/icons/placeholders/PlaceholderOrganizationPic.vue'\n\n import IconPrice from '@pf/src/modules/icons/entities/IconPrice.vue'\n import IconShopcart from '@pf/src/modules/icons/entities/IconShopcart.vue'\n import IconTime from '@pf/src/modules/icons/entities/IconTime.vue'\n\n import ButtonToggleMembership from '@pf/src/modules/organizations/components/elements/ButtonToggleMembership.vue'\n\n const props = defineProps({\n // Model\n user: String,\n organization: Object,\n // View\n showProducts: {\n type: Boolean,\n default: false\n },\n showFollowers: {\n type: Boolean,\n default: true\n },\n showRating: {\n type: Boolean,\n default: false\n },\n showFeatured: {\n type: Boolean,\n default: true\n },\n showTags: {\n type: Boolean,\n default: true\n },\n });\n\n const emits = defineEmits(['updateMembership'])\n\n const router = useRouter();\n</script>"],"names":["useRouter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuJE,UAAM,QAAQ;AAECA,wBAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CardOrganization.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/blocks/CardOrganization.vue"],"sourcesContent":["<template>\n <div \n class=\"o-hidden pos-relative cursor-pointer bg-light pd-small\"\n @click=\"$router.push({name: 'Organization', params: {_id: organization._id}})\"\n >\n <div class=\"flex pos-relative\">\n\n <img loading=\"lazy\" \n v-if=\"organization.profile.photo && organization.profile.photo.length > 0\"\n :src=\"(FILE_SERVER_URL || '') + organization.profile.photo\" \n class=\"h-4r w-4r radius-extra bg-white\" \n />\n\n <PlaceholderOrganizationPic\n v-else\n class=\"h-4r w-4r\"\n />\n \n <div class=\"pos-relative w-100 flex-h-center flex flex-column flex-child-1 flex-child mn-l-thin w-100\">\n \n <!-- <Text :text=\"organization.profile.name ? organization.profile.name : ''\" :maxLen=\"18\" class=\"h3 d-block\"/> -->\n <p class=\"h4 t-truncate\">{{organization.profile.name}}</p>\n <!-- RATING -->\n <!-- <div v-if=\"showRating && organization.rating\" class=\"w-max star-container flex-v-center flex\">\n <img loading=\"lazy\" \n v-for=\"i in 5\"\n class=\"i-small mn-r-thin\"\n :src=\"i <= organization.rating.median ? '/icons/star.svg' : '/icons/star-stroke.svg'\"\n >\n\n <span class=\"p-small t-semi mn-r-thin\">{{organization.rating.median}}</span>\n <span class=\"p-small\">({{organization.rating.amount}})</span>\n </div> -->\n\n <Chips \n v-if=\"showTags && organization.profile.tags?.length > 0\" \n :chips=\"organization.profile.tags.slice(0,3)\"\n class=\"pos-relative p-small\"\n />\n\n <div v-if=\"showFollowers\" class=\"flex-center gap-thin pd-r-thin pd-l-thin flex-nowrap flex mn-t-thin bg-white radius-extra w-max\">\n <p class=\"mn-t-thin mn-b-thin\">{{organization.numberOfSubscribers}} followers</p>\n\n <ButtonToggleMembership\n v-if=\"\n user?._id \n && organization.owner !== user._id\n \"\n :user=\"user._id\"\n :type=\"'organization'\" \n :role=\"'subscriber'\" \n :target=\"organization._id\" \n :status=\"organization.isSubscriber\" \n :text=\"{create: '+', remove: '-'}\"\n @updateMembership=\"event => emits('updateMembership', event, 'isSubscriber', 'numberOfSubscribers')\"\n class=\"i-semi\" \n />\n </div>\n\n </div>\n\n </div>\n\n\n <div \n v-if=\"showProducts\" \n class=\"mn-b-small mn-t-small w-100 flex-nowrap flex flex-v-center pd-small bg-white radius-medium\"\n >\n <IconTime class=\"i-medium mn-r-micro\"/>\n <span class=\"mn-r-thin\">{{\n organization.distance ? \n organization.distance > 50 ? \n '3-5 days' : \n Math.ceil((5 + 5 + 3 * organization.distance) / 5) * 5 \n + '-' \n + Math.ceil((15 + 5 + 3 * organization.distance) / 5) * 5 \n + ' MIN' : 'Unavailable' \n }} \n </span>\n <span v-if=\"organization.distance && organization.distance < 50\" class=\"t-transp mn-r-thin\">|</span>\n <span v-if=\"organization.distance && organization.distance < 50\" class=\"mn-r-thin\">{{organization.distance ? organization.distance.toFixed(1) + ' KM' : ''}} </span>\n <!-- <span class=\"mn-r-thin\">{{organization.nearestSpotDistance}}</span> -->\n <IconPrice class=\"i-medium mn-r-micro\"/>\n <span class=\"mn-r-thin\">{{returnCurrency()}}500 </span>\n <IconShopcart class=\"i-medium mn-r-micro\"/>\n <span class=\"mn-r-thin\"> {{organization.products.length}} products</span>\n </div>\n\n <div v-if=\"showProducts && organization.products.length > 0\" class=\"w-100 o-scroll radius-medium\">\n <div class=\"w-max flex-nowrap flex gap-thin\">\n <CardOrderItem \n @click.stop=\"$router.push({name: 'Organization_Product', params: {_id: organization._id, product: product._id}})\" \n v-for=\"product in organization.products.slice(0,5)\" \n :key=\"product._id\" \n :editable=\"false\" \n :product=\"product\" \n class=\"pd-thin w-15r radius-medium bg-white\"\n \n />\n <button class=\"pd-thin w-15r radius-medium bg-main button\">\n View menu\n </button>\n </div>\n </div>\n\n </div>\n</template>\n\n<script setup>\n import { ref } from 'vue'\n import { useRouter } from 'vue-router'\n import CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue';\n\n import Text from '@pf/src/components/Text/Text.vue'\n import Chips from '@pf/src/components/Chips/Chips.vue'\n\n import PlaceholderOrganizationPic from '@pf/src/modules/icons/placeholders/PlaceholderOrganizationPic.vue'\n\n import IconPrice from '@pf/src/modules/icons/entities/IconPrice.vue'\n import IconShopcart from '@pf/src/modules/icons/entities/IconShopcart.vue'\n import IconTime from '@pf/src/modules/icons/entities/IconTime.vue'\n\n import ButtonToggleMembership from '@pf/src/modules/organizations/components/elements/ButtonToggleMembership.vue'\n\n const props = defineProps({\n // Model\n user: String,\n organization: Object,\n // View\n showProducts: {\n type: Boolean,\n default: false\n },\n showFollowers: {\n type: Boolean,\n default: true\n },\n showRating: {\n type: Boolean,\n default: false\n },\n showFeatured: {\n type: Boolean,\n default: true\n },\n showTags: {\n type: Boolean,\n default: true\n },\n });\n\n const emits = defineEmits(['updateMembership'])\n\n const router = useRouter();\n</script>"],"names":["useRouter"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuJE,UAAM,QAAQ;AAECA,wBAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -121,7 +121,7 @@ const _sfc_main = {
121
121
  createElementVNode("div", _hoisted_14, [
122
122
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.organization.products.slice(0, 5), (product) => {
123
123
  return openBlock(), createBlock(_sfc_main$4, {
124
- onClick: withModifiers(($event) => _ctx.$router.push({ name: "Product Organization", params: { _id: __props.organization._id, product: product._id } }), ["stop"]),
124
+ onClick: withModifiers(($event) => _ctx.$router.push({ name: "Organization_Product", params: { _id: __props.organization._id, product: product._id } }), ["stop"]),
125
125
  key: product._id,
126
126
  editable: false,
127
127
  product,
@@ -1 +1 @@
1
- {"version":3,"file":"CardOrganization.vue.js","sources":["../../../../../../../src/modules/organizations/components/blocks/CardOrganization.vue"],"sourcesContent":["<template>\n <div \n class=\"o-hidden pos-relative cursor-pointer bg-light pd-small\"\n @click=\"$router.push({name: 'Organization', params: {_id: organization._id}})\"\n >\n <div class=\"flex pos-relative\">\n\n <img loading=\"lazy\" \n v-if=\"organization.profile.photo && organization.profile.photo.length > 0\"\n :src=\"(FILE_SERVER_URL || '') + organization.profile.photo\" \n class=\"h-4r w-4r radius-extra bg-white\" \n />\n\n <PlaceholderOrganizationPic\n v-else\n class=\"h-4r w-4r\"\n />\n \n <div class=\"pos-relative w-100 flex-h-center flex flex-column flex-child-1 flex-child mn-l-thin w-100\">\n \n <!-- <Text :text=\"organization.profile.name ? organization.profile.name : ''\" :maxLen=\"18\" class=\"h3 d-block\"/> -->\n <p class=\"h4 t-truncate\">{{organization.profile.name}}</p>\n <!-- RATING -->\n <!-- <div v-if=\"showRating && organization.rating\" class=\"w-max star-container flex-v-center flex\">\n <img loading=\"lazy\" \n v-for=\"i in 5\"\n class=\"i-small mn-r-thin\"\n :src=\"i <= organization.rating.median ? '/icons/star.svg' : '/icons/star-stroke.svg'\"\n >\n\n <span class=\"p-small t-semi mn-r-thin\">{{organization.rating.median}}</span>\n <span class=\"p-small\">({{organization.rating.amount}})</span>\n </div> -->\n\n <Chips \n v-if=\"showTags && organization.profile.tags?.length > 0\" \n :chips=\"organization.profile.tags.slice(0,3)\"\n class=\"pos-relative p-small\"\n />\n\n <div v-if=\"showFollowers\" class=\"flex-center gap-thin pd-r-thin pd-l-thin flex-nowrap flex mn-t-thin bg-white radius-extra w-max\">\n <p class=\"mn-t-thin mn-b-thin\">{{organization.numberOfSubscribers}} followers</p>\n\n <ButtonToggleMembership\n v-if=\"\n user?._id \n && organization.owner !== user._id\n \"\n :user=\"user._id\"\n :type=\"'organization'\" \n :role=\"'subscriber'\" \n :target=\"organization._id\" \n :status=\"organization.isSubscriber\" \n :text=\"{create: '+', remove: '-'}\"\n @updateMembership=\"event => emits('updateMembership', event, 'isSubscriber', 'numberOfSubscribers')\"\n class=\"i-semi\" \n />\n </div>\n\n </div>\n\n </div>\n\n\n <div \n v-if=\"showProducts\" \n class=\"mn-b-small mn-t-small w-100 flex-nowrap flex flex-v-center pd-small bg-white radius-medium\"\n >\n <IconTime class=\"i-medium mn-r-micro\"/>\n <span class=\"mn-r-thin\">{{\n organization.distance ? \n organization.distance > 50 ? \n '3-5 days' : \n Math.ceil((5 + 5 + 3 * organization.distance) / 5) * 5 \n + '-' \n + Math.ceil((15 + 5 + 3 * organization.distance) / 5) * 5 \n + ' MIN' : 'Unavailable' \n }} \n </span>\n <span v-if=\"organization.distance && organization.distance < 50\" class=\"t-transp mn-r-thin\">|</span>\n <span v-if=\"organization.distance && organization.distance < 50\" class=\"mn-r-thin\">{{organization.distance ? organization.distance.toFixed(1) + ' KM' : ''}} </span>\n <!-- <span class=\"mn-r-thin\">{{organization.nearestSpotDistance}}</span> -->\n <IconPrice class=\"i-medium mn-r-micro\"/>\n <span class=\"mn-r-thin\">{{returnCurrency()}}500 </span>\n <IconShopcart class=\"i-medium mn-r-micro\"/>\n <span class=\"mn-r-thin\"> {{organization.products.length}} products</span>\n </div>\n\n <div v-if=\"showProducts && organization.products.length > 0\" class=\"w-100 o-scroll radius-medium\">\n <div class=\"w-max flex-nowrap flex gap-thin\">\n <CardOrderItem \n @click.stop=\"$router.push({name: 'Product Organization', params: {_id: organization._id, product: product._id}})\" \n v-for=\"product in organization.products.slice(0,5)\" \n :key=\"product._id\" \n :editable=\"false\" \n :product=\"product\" \n class=\"pd-thin w-15r radius-medium bg-white\"\n \n />\n <button class=\"pd-thin w-15r radius-medium bg-main button\">\n View menu\n </button>\n </div>\n </div>\n\n </div>\n</template>\n\n<script setup>\n import { ref } from 'vue'\n import { useRouter } from 'vue-router'\n import CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue';\n\n import Text from '@pf/src/components/Text/Text.vue'\n import Chips from '@pf/src/components/Chips/Chips.vue'\n\n import PlaceholderOrganizationPic from '@pf/src/modules/icons/placeholders/PlaceholderOrganizationPic.vue'\n\n import IconPrice from '@pf/src/modules/icons/entities/IconPrice.vue'\n import IconShopcart from '@pf/src/modules/icons/entities/IconShopcart.vue'\n import IconTime from '@pf/src/modules/icons/entities/IconTime.vue'\n\n import ButtonToggleMembership from '@pf/src/modules/organizations/components/elements/ButtonToggleMembership.vue'\n\n const props = defineProps({\n // Model\n user: String,\n organization: Object,\n // View\n showProducts: {\n type: Boolean,\n default: false\n },\n showFollowers: {\n type: Boolean,\n default: true\n },\n showRating: {\n type: Boolean,\n default: false\n },\n showFeatured: {\n type: Boolean,\n default: true\n },\n showTags: {\n type: Boolean,\n default: true\n },\n });\n\n const emits = defineEmits(['updateMembership'])\n\n const router = useRouter();\n</script>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuJE,UAAM,QAAQ;AAEC,cAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CardOrganization.vue.js","sources":["../../../../../../../src/modules/organizations/components/blocks/CardOrganization.vue"],"sourcesContent":["<template>\n <div \n class=\"o-hidden pos-relative cursor-pointer bg-light pd-small\"\n @click=\"$router.push({name: 'Organization', params: {_id: organization._id}})\"\n >\n <div class=\"flex pos-relative\">\n\n <img loading=\"lazy\" \n v-if=\"organization.profile.photo && organization.profile.photo.length > 0\"\n :src=\"(FILE_SERVER_URL || '') + organization.profile.photo\" \n class=\"h-4r w-4r radius-extra bg-white\" \n />\n\n <PlaceholderOrganizationPic\n v-else\n class=\"h-4r w-4r\"\n />\n \n <div class=\"pos-relative w-100 flex-h-center flex flex-column flex-child-1 flex-child mn-l-thin w-100\">\n \n <!-- <Text :text=\"organization.profile.name ? organization.profile.name : ''\" :maxLen=\"18\" class=\"h3 d-block\"/> -->\n <p class=\"h4 t-truncate\">{{organization.profile.name}}</p>\n <!-- RATING -->\n <!-- <div v-if=\"showRating && organization.rating\" class=\"w-max star-container flex-v-center flex\">\n <img loading=\"lazy\" \n v-for=\"i in 5\"\n class=\"i-small mn-r-thin\"\n :src=\"i <= organization.rating.median ? '/icons/star.svg' : '/icons/star-stroke.svg'\"\n >\n\n <span class=\"p-small t-semi mn-r-thin\">{{organization.rating.median}}</span>\n <span class=\"p-small\">({{organization.rating.amount}})</span>\n </div> -->\n\n <Chips \n v-if=\"showTags && organization.profile.tags?.length > 0\" \n :chips=\"organization.profile.tags.slice(0,3)\"\n class=\"pos-relative p-small\"\n />\n\n <div v-if=\"showFollowers\" class=\"flex-center gap-thin pd-r-thin pd-l-thin flex-nowrap flex mn-t-thin bg-white radius-extra w-max\">\n <p class=\"mn-t-thin mn-b-thin\">{{organization.numberOfSubscribers}} followers</p>\n\n <ButtonToggleMembership\n v-if=\"\n user?._id \n && organization.owner !== user._id\n \"\n :user=\"user._id\"\n :type=\"'organization'\" \n :role=\"'subscriber'\" \n :target=\"organization._id\" \n :status=\"organization.isSubscriber\" \n :text=\"{create: '+', remove: '-'}\"\n @updateMembership=\"event => emits('updateMembership', event, 'isSubscriber', 'numberOfSubscribers')\"\n class=\"i-semi\" \n />\n </div>\n\n </div>\n\n </div>\n\n\n <div \n v-if=\"showProducts\" \n class=\"mn-b-small mn-t-small w-100 flex-nowrap flex flex-v-center pd-small bg-white radius-medium\"\n >\n <IconTime class=\"i-medium mn-r-micro\"/>\n <span class=\"mn-r-thin\">{{\n organization.distance ? \n organization.distance > 50 ? \n '3-5 days' : \n Math.ceil((5 + 5 + 3 * organization.distance) / 5) * 5 \n + '-' \n + Math.ceil((15 + 5 + 3 * organization.distance) / 5) * 5 \n + ' MIN' : 'Unavailable' \n }} \n </span>\n <span v-if=\"organization.distance && organization.distance < 50\" class=\"t-transp mn-r-thin\">|</span>\n <span v-if=\"organization.distance && organization.distance < 50\" class=\"mn-r-thin\">{{organization.distance ? organization.distance.toFixed(1) + ' KM' : ''}} </span>\n <!-- <span class=\"mn-r-thin\">{{organization.nearestSpotDistance}}</span> -->\n <IconPrice class=\"i-medium mn-r-micro\"/>\n <span class=\"mn-r-thin\">{{returnCurrency()}}500 </span>\n <IconShopcart class=\"i-medium mn-r-micro\"/>\n <span class=\"mn-r-thin\"> {{organization.products.length}} products</span>\n </div>\n\n <div v-if=\"showProducts && organization.products.length > 0\" class=\"w-100 o-scroll radius-medium\">\n <div class=\"w-max flex-nowrap flex gap-thin\">\n <CardOrderItem \n @click.stop=\"$router.push({name: 'Organization_Product', params: {_id: organization._id, product: product._id}})\" \n v-for=\"product in organization.products.slice(0,5)\" \n :key=\"product._id\" \n :editable=\"false\" \n :product=\"product\" \n class=\"pd-thin w-15r radius-medium bg-white\"\n \n />\n <button class=\"pd-thin w-15r radius-medium bg-main button\">\n View menu\n </button>\n </div>\n </div>\n\n </div>\n</template>\n\n<script setup>\n import { ref } from 'vue'\n import { useRouter } from 'vue-router'\n import CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue';\n\n import Text from '@pf/src/components/Text/Text.vue'\n import Chips from '@pf/src/components/Chips/Chips.vue'\n\n import PlaceholderOrganizationPic from '@pf/src/modules/icons/placeholders/PlaceholderOrganizationPic.vue'\n\n import IconPrice from '@pf/src/modules/icons/entities/IconPrice.vue'\n import IconShopcart from '@pf/src/modules/icons/entities/IconShopcart.vue'\n import IconTime from '@pf/src/modules/icons/entities/IconTime.vue'\n\n import ButtonToggleMembership from '@pf/src/modules/organizations/components/elements/ButtonToggleMembership.vue'\n\n const props = defineProps({\n // Model\n user: String,\n organization: Object,\n // View\n showProducts: {\n type: Boolean,\n default: false\n },\n showFollowers: {\n type: Boolean,\n default: true\n },\n showRating: {\n type: Boolean,\n default: false\n },\n showFeatured: {\n type: Boolean,\n default: true\n },\n showTags: {\n type: Boolean,\n default: true\n },\n });\n\n const emits = defineEmits(['updateMembership'])\n\n const router = useRouter();\n</script>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuJE,UAAM,QAAQ;AAEC,cAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -4,7 +4,7 @@ const vue = require("vue");
4
4
  const vueRouter = require("vue-router");
5
5
  ;/* empty css */
6
6
  const DepartmentSub = require("../blocks/DepartmentSub.vue.cjs");
7
- const CardUser = require("../../../users/components/blocks/CardUser.vue.cjs");
7
+ const CardUser = require("../../../auth/views/components/blocks/CardUser.vue.cjs");
8
8
  const departments = require("../../store/departments.cjs");
9
9
  const IconEdit = require("../../../icons/navigation/IconEdit.vue.cjs");
10
10
  const _hoisted_1 = { class: "for-transition w-100" };