@ozdao/prometheus-framework 0.2.81 → 0.2.83

Sign up to get free protection for your applications and to get access to all the features.
Files changed (388) hide show
  1. package/dist/auth.server.js +1 -1
  2. package/dist/auth.server.mjs +1 -1
  3. package/dist/community.server.js +3 -3
  4. package/dist/community.server.mjs +3 -3
  5. package/dist/credentials.schema-B-KD_ozQ.js +9 -0
  6. package/dist/credentials.schema-C9dmNy7o.mjs +10 -0
  7. package/dist/credentials.schema-CDZCKfEI.mjs +106 -0
  8. package/dist/credentials.schema-CfhPcsuI.js +105 -0
  9. package/dist/events.server.js +4 -15
  10. package/dist/events.server.mjs +3 -14
  11. package/dist/files.server.js +1 -1
  12. package/dist/files.server.mjs +1 -1
  13. package/dist/gallery.server.js +1 -1
  14. package/dist/gallery.server.mjs +1 -1
  15. package/dist/index-B6a1mPgp.mjs +217 -0
  16. package/dist/index-BCCiEK_u.js +216 -0
  17. package/dist/main-8N2Jmsuk.js +91 -0
  18. package/dist/main-CkeuHuCY.mjs +13619 -0
  19. package/dist/main.css +1 -1
  20. package/dist/metadata.schema-Cu_mPkjE.js +77 -0
  21. package/dist/metadata.schema-cbFgazeK.mjs +78 -0
  22. package/dist/middlewares.server.js +1 -1
  23. package/dist/middlewares.server.mjs +1 -1
  24. package/dist/node_modules/@googlemaps/js-api-loader/dist/index.cjs +1 -0
  25. package/dist/node_modules/@googlemaps/js-api-loader/dist/index.js +238 -0
  26. package/dist/orders.server.js +592 -0
  27. package/dist/orders.server.mjs +593 -0
  28. package/dist/organizations.server.js +295 -131
  29. package/dist/organizations.server.mjs +295 -131
  30. package/dist/products.server.js +2 -2
  31. package/dist/products.server.mjs +2 -2
  32. package/dist/profile.schema-24ZpZQJe.mjs +25 -0
  33. package/dist/profile.schema-CkOhhf37.js +24 -0
  34. package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
  35. package/dist/prometheus-framework/src/components/Address/Address.vue2.js +33 -24
  36. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/components/Block/Block.vue.js +23 -20
  38. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/components/Button/Button.vue.js +1 -225
  40. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  41. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +102 -1
  42. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +71 -60
  44. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/components/Field/Field.vue.js +1 -84
  46. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  47. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +84 -1
  48. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  50. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +325 -340
  52. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +2 -2
  54. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  55. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +53 -44
  56. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  57. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +41 -40
  58. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  59. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +37 -31
  60. package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +18 -19
  62. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +1 -36
  64. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  65. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +36 -1
  66. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
  68. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
  69. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
  70. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  72. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  74. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  76. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +30 -30
  78. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  80. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
  82. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  84. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/auth/store/auth.js +26 -26
  86. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +78 -103
  88. package/dist/prometheus-framework/src/modules/chats/components/blocks/ChatMessage.vue.cjs +1 -0
  89. package/dist/prometheus-framework/src/modules/chats/components/blocks/ChatMessage.vue.js +28 -0
  90. package/dist/prometheus-framework/src/modules/chats/components/pages/ChatPage.vue.cjs +1 -0
  91. package/dist/prometheus-framework/src/modules/chats/components/pages/ChatPage.vue.js +26 -0
  92. package/dist/prometheus-framework/src/modules/chats/components/pages/ChatPage.vue2.cjs +1 -0
  93. package/dist/prometheus-framework/src/modules/chats/components/pages/ChatPage.vue2.js +1 -0
  94. package/dist/prometheus-framework/src/modules/chats/components/sections/ChatWindow.vue.cjs +1 -0
  95. package/dist/prometheus-framework/src/modules/chats/components/sections/ChatWindow.vue.js +77 -0
  96. package/dist/prometheus-framework/src/modules/chats/components/sections/ChatWindow.vue2.cjs +1 -0
  97. package/dist/prometheus-framework/src/modules/chats/components/sections/ChatWindow.vue2.js +1 -0
  98. package/dist/prometheus-framework/src/modules/chats/store/chat.store.cjs +1 -0
  99. package/dist/prometheus-framework/src/modules/chats/store/chat.store.js +40 -0
  100. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
  102. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
  104. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +15 -15
  106. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  108. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  109. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
  110. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  111. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
  112. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  114. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +4 -4
  116. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  118. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  120. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
  122. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
  124. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +29 -27
  126. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  128. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
  130. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  132. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  134. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +33 -26
  136. package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +6 -3
  138. package/dist/prometheus-framework/src/modules/globals/services/globals.store.cjs +1 -0
  139. package/dist/prometheus-framework/src/modules/globals/services/globals.store.js +70 -0
  140. package/dist/prometheus-framework/src/modules/icons/entities/IconGallery.vue.cjs +1 -0
  141. package/dist/prometheus-framework/src/modules/icons/entities/IconGallery.vue.js +28 -0
  142. package/dist/prometheus-framework/src/modules/icons/entities/IconLeftovers.vue.cjs +1 -0
  143. package/dist/prometheus-framework/src/modules/icons/entities/IconLeftovers.vue.js +30 -0
  144. package/dist/prometheus-framework/src/modules/icons/entities/IconOrders.vue.cjs +1 -0
  145. package/dist/prometheus-framework/src/modules/icons/entities/IconOrders.vue.js +35 -0
  146. package/dist/prometheus-framework/src/modules/icons/entities/IconProducts.vue.cjs +1 -0
  147. package/dist/prometheus-framework/src/modules/icons/entities/IconProducts.vue.js +28 -0
  148. package/dist/prometheus-framework/src/modules/icons/navigation/IconCheckmark.vue.cjs +1 -0
  149. package/dist/prometheus-framework/src/modules/icons/navigation/IconCheckmark.vue.js +29 -0
  150. package/dist/prometheus-framework/src/modules/icons/placeholders/PlaceholderChat.vue.cjs +1 -0
  151. package/dist/prometheus-framework/src/modules/icons/placeholders/PlaceholderChat.vue.js +30 -0
  152. package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.js +63 -86
  154. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  156. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrder.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrder.vue.js +121 -1
  158. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrder.vue2.cjs +1 -0
  159. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrder.vue2.js +1 -0
  160. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.cjs +3 -0
  161. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.js +92 -0
  162. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -0
  163. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +202 -0
  164. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue2.cjs +1 -0
  165. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue2.js +1 -0
  166. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -0
  167. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +127 -0
  168. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue2.cjs +1 -0
  169. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue2.js +1 -0
  170. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  171. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +174 -114
  172. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  173. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +41 -41
  174. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.cjs +1 -0
  175. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.js +89 -0
  176. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue2.cjs +1 -0
  177. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue2.js +1 -0
  178. package/dist/prometheus-framework/src/modules/orders/components/sections/AskToLogin.vue.cjs +1 -0
  179. package/dist/prometheus-framework/src/modules/orders/components/sections/AskToLogin.vue.js +24 -0
  180. package/dist/prometheus-framework/src/modules/orders/components/sections/EmptyState.vue.cjs +1 -0
  181. package/dist/prometheus-framework/src/modules/orders/components/sections/EmptyState.vue.js +13 -0
  182. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -0
  183. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +141 -0
  184. package/dist/prometheus-framework/src/modules/orders/components/sections/FormClientDetails.vue.cjs +1 -1
  185. package/dist/prometheus-framework/src/modules/orders/components/sections/FormClientDetails.vue.js +1 -1
  186. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -0
  187. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +77 -0
  188. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  189. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +46 -35
  190. package/dist/prometheus-framework/src/modules/orders/components/sections/Succes.vue.cjs +1 -0
  191. package/dist/prometheus-framework/src/modules/orders/components/sections/Succes.vue.js +25 -0
  192. package/dist/prometheus-framework/src/modules/orders/orders.client.cjs +1 -0
  193. package/dist/prometheus-framework/src/modules/orders/orders.client.js +56 -0
  194. package/dist/prometheus-framework/src/modules/orders/router/orders.router.cjs +1 -0
  195. package/dist/prometheus-framework/src/modules/orders/router/orders.router.js +58 -0
  196. package/dist/prometheus-framework/src/modules/orders/store/customers.store.cjs +1 -0
  197. package/dist/prometheus-framework/src/modules/orders/store/customers.store.js +5 -0
  198. package/dist/prometheus-framework/src/modules/orders/store/models/customer.cjs +1 -0
  199. package/dist/prometheus-framework/src/modules/orders/store/models/customer.js +30 -0
  200. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  201. package/dist/prometheus-framework/src/modules/orders/store/orders.js +24 -25
  202. package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
  203. package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +5 -1
  204. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  205. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +16 -16
  206. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  207. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  208. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  209. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +38 -49
  210. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  211. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  212. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  213. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +6 -6
  214. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  215. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +161 -138
  216. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  217. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +198 -78
  218. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  219. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +82 -125
  220. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  221. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  222. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  223. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  224. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  225. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  226. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  227. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +59 -70
  228. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  229. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  230. package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
  231. package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +34 -36
  232. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
  233. package/dist/prometheus-framework/src/modules/organizations/store/departments.js +38 -18
  234. package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
  235. package/dist/prometheus-framework/src/modules/organizations/store/invites.js +34 -35
  236. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  237. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  238. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
  239. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +41 -21
  240. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  241. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  242. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  243. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  244. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  245. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  246. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  247. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  248. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  249. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  250. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  251. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  252. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  253. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  254. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  255. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +3 -3
  256. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  257. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  258. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  259. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
  260. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  261. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  262. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  263. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +24 -26
  264. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -0
  265. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +78 -0
  266. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  267. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  268. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  269. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  270. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  271. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  272. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  273. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  274. package/dist/prometheus-framework/src/modules/users/store/users.cjs +1 -1
  275. package/dist/prometheus-framework/src/modules/users/store/users.js +13 -14
  276. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  277. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
  278. package/dist/prometheus-framework.cjs.js +1 -1
  279. package/dist/prometheus-framework.es.js +1 -1
  280. package/dist/queryProcessor-BJdKh0Ow.mjs +162 -0
  281. package/dist/queryProcessor-DRMo_GWK.js +161 -0
  282. package/dist/reports.server.js +1 -1
  283. package/dist/reports.server.mjs +1 -1
  284. package/dist/style.css +1 -1
  285. package/dist/users.server.js +58 -47
  286. package/dist/users.server.mjs +58 -47
  287. package/dist/wallet.server.js +2 -2
  288. package/dist/wallet.server.mjs +2 -2
  289. package/dist/web-CtVocufd.js +1 -0
  290. package/dist/web-DNq1tHCE.mjs +54 -0
  291. package/package.json +1 -1
  292. package/src/components/Address/Address.vue +13 -2
  293. package/src/components/Block/Block.vue +3 -2
  294. package/src/components/Button/Button.vue +9 -12
  295. package/src/components/Feed/Feed.vue +28 -6
  296. package/src/components/FieldPhone/FieldPhone.vue +592 -558
  297. package/src/components/LocationMarker/LocationMarker.vue +26 -22
  298. package/src/components/Popup/Popup.vue +22 -23
  299. package/src/components/Select/Select.vue +43 -32
  300. package/src/components/Slider/Slider.vue +3 -4
  301. package/src/modules/auth/components/pages/Invite.vue +7 -7
  302. package/src/modules/auth/store/auth.js +1 -1
  303. package/src/modules/backoffice/components/pages/Dashboard.vue +44 -29
  304. package/src/modules/chats/components/blocks/ChatMessage.vue +1 -1
  305. package/src/modules/community/components/sections/HotPosts.vue +1 -1
  306. package/src/modules/events/components/blocks/CardEvent.vue +4 -3
  307. package/src/modules/events/components/pages/Events.vue +23 -6
  308. package/src/modules/globals/components/sections/SectionPageTitle.vue +19 -7
  309. package/src/modules/globals/controllers/utils/queryProcessor.js +21 -7
  310. package/src/modules/globals/localization/vue-i18n.js +3 -0
  311. package/src/modules/globals/models/credentials.schema.js +7 -0
  312. package/src/modules/globals/models/metadata.schema.js +17 -0
  313. package/src/modules/globals/models/profile.schema.js +23 -0
  314. package/src/modules/globals/models/socials.schema.js +22 -0
  315. package/src/modules/globals/router/routerGuards.js +1 -0
  316. package/src/modules/globals/services/globals.cashe.js +26 -0
  317. package/src/modules/globals/services/globals.crud.js +115 -0
  318. package/src/modules/globals/services/globals.logger.js +41 -0
  319. package/src/modules/globals/services/globals.store.js +114 -0
  320. package/src/modules/icons/entities/IconGallery.vue +14 -0
  321. package/src/modules/icons/entities/IconLeftovers.vue +14 -0
  322. package/src/modules/icons/entities/IconOrders.vue +15 -0
  323. package/src/modules/icons/entities/IconProducts.vue +14 -0
  324. package/src/modules/landing/components/sections/HeroSection.vue +1 -1
  325. package/src/modules/landing/components/sections/MobileApp.vue +4 -4
  326. package/src/modules/landing/router/landing.js +1 -1
  327. package/src/modules/marketplace/components/sections/Filters.vue +3 -3
  328. package/src/modules/middlewares/server/accessors/AccessController.js +33 -0
  329. package/src/modules/middlewares/server/accessors/ReadDepartments.js +101 -0
  330. package/src/modules/middlewares/server/verifyAccesses.js +33 -0
  331. package/src/modules/middlewares/server/verifyInvites.js +4 -4
  332. package/src/modules/orders/components/pages/OrderCreate.vue +2 -2
  333. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +105 -68
  334. package/src/modules/orders/components/pages/Orders.vue +2 -2
  335. package/src/modules/orders/components/sections/FormAddCustomer.vue +152 -0
  336. package/src/modules/orders/components/sections/FormCustomerDetails.vue +67 -0
  337. package/src/modules/orders/components/sections/FormDelivery.vue +17 -3
  338. package/src/modules/orders/controllers/applications.controller.js +2 -0
  339. package/src/modules/orders/controllers/orders.controller.js +77 -52
  340. package/src/modules/orders/models/application.model.js +25 -25
  341. package/src/modules/orders/models/customer.model.js +54 -18
  342. package/src/modules/orders/models/order.model.js +1 -1
  343. package/src/modules/orders/models/testimonial.model.js +22 -23
  344. package/src/modules/orders/orders.client.js +51 -51
  345. package/src/modules/orders/orders.server.js +36 -12
  346. package/src/modules/orders/router/orders.router.js +36 -41
  347. package/src/modules/orders/routes/orders.routes.js +3 -21
  348. package/src/modules/orders/store/customers.store.js +5 -0
  349. package/src/modules/orders/store/models/customer.js +29 -0
  350. package/src/modules/orders/store/orders.js +14 -20
  351. package/src/modules/organizations/components/blocks/CardDepartment.vue +3 -3
  352. package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
  353. package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +1 -12
  354. package/src/modules/organizations/components/pages/Department.vue +1 -1
  355. package/src/modules/organizations/components/pages/DepartmentEdit.vue +72 -48
  356. package/src/modules/organizations/components/pages/Members.vue +178 -64
  357. package/src/modules/organizations/components/pages/Organization.vue +1 -41
  358. package/src/modules/organizations/components/sections/MembersAdd.vue +44 -52
  359. package/src/modules/organizations/controllers/departments.controller.js +2 -4
  360. package/src/modules/organizations/controllers/invites.controller.js +24 -23
  361. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  362. package/src/modules/organizations/models/department.model.js +52 -2
  363. package/src/modules/organizations/models/invite.model.js +29 -32
  364. package/src/modules/organizations/models/membership.model.js +2 -0
  365. package/src/modules/organizations/models/organization.model.js +2 -1
  366. package/src/modules/organizations/organizations.client.js +0 -2
  367. package/src/modules/organizations/routes/departments.routes.js +18 -7
  368. package/src/modules/organizations/routes/invites.routes.js +2 -2
  369. package/src/modules/organizations/store/departments.js +22 -1
  370. package/src/modules/organizations/store/invites.js +74 -90
  371. package/src/modules/products/components/blocks/CardProduct.vue +24 -0
  372. package/src/modules/products/components/pages/Products.vue +1 -1
  373. package/src/modules/reports/components/sections/FormReport.vue +40 -40
  374. package/src/modules/spots/components/pages/Spot.vue +1 -1
  375. package/src/modules/spots/components/pages/SpotEdit.vue +1 -1
  376. package/src/modules/users/components/blocks/CardUser.vue +85 -0
  377. package/src/modules/users/controllers/users.controller.js +36 -13
  378. package/src/modules/users/middlewares/visitor.logger.js +66 -0
  379. package/src/modules/users/models/request.model.js +18 -0
  380. package/src/modules/users/models/user.model.js +26 -55
  381. package/src/modules/users/models/visitor.model.js +14 -0
  382. package/src/modules/users/store/users.js +2 -11
  383. package/src/modules/wallet/controllers/routes/payments.routes.js +2 -0
  384. package/src/components/FieldPhone/FieldPhone(script-setup).vue +0 -1646
  385. package/src/components/FieldPhone/FieldPhone2.vue +0 -671
  386. package/src/modules/orders/components/sections/FormClientDetails.vue +0 -61
  387. package/src/modules/organizations/components/blocks/User.vue +0 -69
  388. /package/src/modules/backoffice/components/admin/{User.vue → UserEdit.vue} +0 -0
@@ -4,7 +4,7 @@ import { Preferences as l } from "../../../../node_modules/@capacitor/preference
4
4
  import { reactive as w, watch as f } from "vue";
5
5
  import { setError as i } from "../../globals/store/globals.js";
6
6
  import { state as O } from "./twofa.js";
7
- const p = m.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = w({
7
+ const p = m.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = w({
8
8
  user: {
9
9
  _id: void 0,
10
10
  username: "",
@@ -22,8 +22,8 @@ const p = m.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = w
22
22
  async function g() {
23
23
  const e = await k("user");
24
24
  if (e) {
25
- const { _id: t, email: s, phone: c, roles: r, accessToken: n } = e;
26
- Object.assign(a.user, { _id: t, email: s, phone: c }), Object.assign(a.access, { token: n, roles: r, status: !!n }), p.interceptors.request.use((o) => (n && (o.headers["x-access-token"] = n), o), (o) => Promise.reject(o));
25
+ const { _id: t, email: s, phone: c, roles: a, accessToken: n } = e;
26
+ Object.assign(r.user, { _id: t, email: s, phone: c }), Object.assign(r.access, { token: n, roles: a, status: !!n }), p.interceptors.request.use((o) => (n && (o.headers["x-access-token"] = n), o), (o) => Promise.reject(o));
27
27
  }
28
28
  }
29
29
  g();
@@ -34,15 +34,15 @@ const R = {
34
34
  ...e,
35
35
  type: t
36
36
  });
37
- return u("user", s.data), Object.assign(a.user, {
37
+ return u("user", s.data), Object.assign(r.user, {
38
38
  ...s.data
39
- }), Object.assign(a.access, {
39
+ }), Object.assign(r.access, {
40
40
  token: s.data.accessToken,
41
41
  status: !0,
42
42
  roles: s.data.roles
43
43
  }), s.data;
44
44
  } catch (s) {
45
- return Object.assign(a.access, {
45
+ return Object.assign(r.access, {
46
46
  token: null,
47
47
  status: !1,
48
48
  roles: null
@@ -51,8 +51,8 @@ const R = {
51
51
  },
52
52
  async signup(e, t, s) {
53
53
  var n;
54
- const { password: c, passwordRepeat: r } = a.user;
55
- if (console.log(c), console.log(r), c !== r) {
54
+ const { password: c, passwordRepeat: a } = r.user;
55
+ if (console.log(c), console.log(a), c !== a) {
56
56
  const o = {
57
57
  response: {
58
58
  data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
@@ -67,9 +67,9 @@ const R = {
67
67
  type: t,
68
68
  inviteCode: s
69
69
  });
70
- return console.log(o), o.data.accessToken && u("user", o.data), Object.assign(a.user, {
70
+ return console.log(o), o.data.accessToken && u("user", o.data), Object.assign(r.user, {
71
71
  ...o.data
72
- }), Object.assign(a.access, {
72
+ }), Object.assign(r.access, {
73
73
  token: o.data.accessToken,
74
74
  status: !0,
75
75
  roles: o.data.roles
@@ -79,12 +79,12 @@ const R = {
79
79
  }
80
80
  },
81
81
  logout() {
82
- P("user"), Object.assign(a.user, {
82
+ P("user"), Object.assign(r.user, {
83
83
  email: "",
84
84
  phone: "",
85
85
  password: "",
86
86
  passwordRepeat: ""
87
- }), Object.assign(a.access, {
87
+ }), Object.assign(r.access, {
88
88
  token: null,
89
89
  status: !1
90
90
  });
@@ -105,35 +105,35 @@ const R = {
105
105
  }
106
106
  },
107
107
  async updatePassword(e, t) {
108
- const { password: s, passwordRepeat: c } = a.user;
108
+ const { password: s, passwordRepeat: c } = r.user;
109
109
  if (s !== c) {
110
- const r = {
110
+ const a = {
111
111
  response: {
112
112
  data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
113
113
  }
114
114
  };
115
- throw i(r), new Error(r.response.status);
115
+ throw i(a), new Error(a.response.status);
116
116
  }
117
117
  try {
118
- const r = await p.post("/api/auth/update-password", {
118
+ const a = await p.post("/api/auth/update-password", {
119
119
  email: e.email,
120
120
  phone: e.phone.number,
121
121
  password: e.password,
122
122
  passwordRepeat: e.passwordRepeat,
123
123
  type: t
124
124
  });
125
- return r.data.accessToken && u("user", r.data), Object.assign(a.user, {
126
- ...r.data
127
- }), Object.assign(a.access, {
128
- token: r.data.accessToken,
125
+ return a.data.accessToken && u("user", a.data), Object.assign(r.user, {
126
+ ...a.data
127
+ }), Object.assign(r.access, {
128
+ token: a.data.accessToken,
129
129
  status: !0
130
- }), r.data;
131
- } catch (r) {
132
- return i(r), Promise.reject(r);
130
+ }), a.data;
131
+ } catch (a) {
132
+ return i(a), Promise.reject(a);
133
133
  }
134
134
  }
135
135
  }, h = {
136
- development: { secure: !1, expires: 7 },
136
+ development: { secure: !1, expires: 7, sameSite: "Lax" },
137
137
  production: { expires: 7, path: "/", domain: process.env.API_URL, sameSite: "none", secure: !0 }
138
138
  };
139
139
  async function k(e) {
@@ -159,9 +159,9 @@ function P(e, t = process.env.NODE_ENV) {
159
159
  d.remove(e, s);
160
160
  }
161
161
  }
162
- f(a, (e, t) => {
162
+ f(r, (e, t) => {
163
163
  });
164
164
  export {
165
165
  R as actions,
166
- a as state
166
+ r as state
167
167
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("../../../mobile/components/Menu/Menu.vue2.cjs"),s=require("../../../mobile/components/Menu/MenuItem.vue.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const u=require("vue-router");require("../../../auth/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const l={class:""},i=e.createElementVNode("h1",null,"Welcome to Backoffice",-1),d=e.createElementVNode("span",null," Members ",-1),f=e.createElementVNode("span",null," Events ",-1),c=e.createElementVNode("span",null," Community ",-1),p=e.createElementVNode("span",null," Products ",-1),m=e.createElementVNode("span",null," Leftovers ",-1),_=e.createElementVNode("span",null," Orders ",-1),C=e.createElementVNode("span",null," Payments ",-1),N=e.createElementVNode("span",null," Organizations ",-1),V=e.createElementVNode("span",null," Gallery ",-1),v=e.createElementVNode("span",null," Reports ",-1),k={__name:"Dashboard",props:{favorites:Array},setup(h){const r=u.useRoute(),n=u.useRouter();return e.ref(null),e.ref([]),e.onMounted(async()=>{}),(E,t)=>(e.openBlock(),e.createElementBlock("div",l,[i,e.createVNode(o.default,{class:"bg-grey mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(s.default,{onClick:t[0]||(t[0]=a=>e.unref(n).push({name:"Organization Members",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[d]),_:1}),e.createVNode(s.default,{onClick:t[1]||(t[1]=a=>e.unref(n).push({name:"Backoffice Events",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[f]),_:1}),e.createVNode(s.default,{onClick:t[2]||(t[2]=a=>e.unref(n).push({name:"Backoffice Community",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[c]),_:1}),e.createVNode(s.default,{onClick:t[3]||(t[3]=a=>e.unref(n).push({name:"Products",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[p]),_:1}),e.createVNode(s.default,{onClick:t[4]||(t[4]=a=>e.unref(n).push({name:"Leftovers",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[m]),_:1}),e.createVNode(s.default,{onClick:t[5]||(t[5]=a=>e.unref(n).push({name:"Backoffice Orders",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[_]),_:1}),e.createVNode(s.default,{onClick:t[6]||(t[6]=a=>e.unref(n).push({name:"Payments",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[C]),_:1})]),_:1}),e.createVNode(o.default,{class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(s.default,{onClick:t[7]||(t[7]=a=>e.unref(n).push({name:"Backoffice Organizations",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[N]),_:1}),e.createVNode(s.default,{onClick:t[8]||(t[8]=a=>e.unref(n).push({name:"Backoffice Gallery",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[V]),_:1}),e.createVNode(s.default,{onClick:t[9]||(t[9]=a=>e.unref(n).push({name:"Backoffice Reports",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[v]),_:1})]),_:1})]))}};exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("../../../mobile/components/Menu/Menu.vue2.cjs"),l=require("../../../mobile/components/Menu/MenuItem.vue.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const i=require("../../../icons/entities/IconProducts.vue.cjs"),u=require("../../../icons/entities/IconEvents.vue.cjs"),c=require("../../../icons/entities/IconGroups.vue.cjs"),d=require("../../../icons/entities/IconGallery.vue.cjs"),f=require("../../../icons/entities/IconOrders.vue.cjs"),m=require("../../../icons/entities/IconLeftovers.vue.cjs"),o=require("vue-router");require("../../../auth/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const p={class:""},_=e.createElementVNode("h1",{class:"pd-medium radius-medium bg-grey mn-b-small"},"Welcome to Backoffice",-1),v=e.createElementVNode("span",null," Members ",-1),N=e.createElementVNode("span",null," Products ",-1),V=e.createElementVNode("span",null," Leftovers ",-1),h=e.createElementVNode("span",null," Orders ",-1),b=e.createElementVNode("span",null," Gallery ",-1),g=e.createElementVNode("span",null," Events ",-1),q={__name:"Dashboard",props:{favorites:Array},setup(w){const t=o.useRoute(),s=o.useRouter();return e.ref(null),e.ref([]),e.onMounted(async()=>{}),(C,r)=>(e.openBlock(),e.createElementBlock("div",p,[_,e.createVNode(a.default,{class:"bg-grey mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(l.default,{onClick:r[0]||(r[0]=n=>e.unref(s).push({name:"Organization Members",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(c.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"},null,8,["fill"]),v]),_:1}),e.createVNode(l.default,{onClick:r[1]||(r[1]=n=>e.unref(s).push({name:"Products",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(i.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"},null,8,["fill"]),N]),_:1}),e.createVNode(l.default,{onClick:r[2]||(r[2]=n=>e.unref(s).push({name:"Leftovers",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(m.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"},null,8,["fill"]),V]),_:1}),e.createVNode(l.default,{onClick:r[3]||(r[3]=n=>e.unref(s).push({name:"Backoffice Orders",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"},null,8,["fill"]),h]),_:1}),e.createVNode(l.default,{onClick:r[4]||(r[4]=n=>e.unref(s).push({name:"Backoffice Gallery",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(d.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"},null,8,["fill"]),b]),_:1}),e.createVNode(l.default,{onClick:r[5]||(r[5]=n=>e.unref(s).push({name:"Backoffice Events",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(u.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"},null,8,["fill"]),g]),_:1})]),_:1})]))}};exports.default=q;
@@ -1,164 +1,139 @@
1
- import { ref as p, onMounted as m, openBlock as d, createElementBlock as _, createVNode as o, withCtx as n, unref as e, createElementVNode as t } from "vue";
2
- import u from "../../../mobile/components/Menu/Menu.vue2.js";
3
- import i from "../../../mobile/components/Menu/MenuItem.vue.js";
1
+ import { ref as m, onMounted as u, openBlock as p, createElementBlock as f, createVNode as s, withCtx as e, unref as i, createElementVNode as o } from "vue";
2
+ import c from "../../../mobile/components/Menu/Menu.vue2.js";
3
+ import n from "../../../mobile/components/Menu/MenuItem.vue.js";
4
4
  import "../../../../components/SelectMulti/SelectMulti.vue2.js";
5
- import { useRoute as f, useRouter as c } from "vue-router";
5
+ import _ from "../../../icons/entities/IconProducts.vue.js";
6
+ import d from "../../../icons/entities/IconEvents.vue.js";
7
+ import v from "../../../icons/entities/IconGroups.vue.js";
8
+ import b from "../../../icons/entities/IconGallery.vue.js";
9
+ import $ from "../../../icons/entities/IconOrders.vue.js";
10
+ import h from "../../../icons/entities/IconLeftovers.vue.js";
11
+ import { useRoute as k, useRouter as g } from "vue-router";
6
12
  import "../../../auth/store/auth.js";
7
13
  import "../../../organizations/store/organizations.js";
8
- const k = { class: "" }, v = /* @__PURE__ */ t("h1", null, "Welcome to Backoffice", -1), C = /* @__PURE__ */ t("span", null, " Members ", -1), $ = /* @__PURE__ */ t("span", null, " Events ", -1), y = /* @__PURE__ */ t("span", null, " Community ", -1), B = /* @__PURE__ */ t("span", null, " Products ", -1), g = /* @__PURE__ */ t("span", null, " Leftovers ", -1), b = /* @__PURE__ */ t("span", null, " Orders ", -1), h = /* @__PURE__ */ t("span", null, " Payments ", -1), O = /* @__PURE__ */ t("span", null, " Organizations ", -1), E = /* @__PURE__ */ t("span", null, " Gallery ", -1), P = /* @__PURE__ */ t("span", null, " Reports ", -1), A = {
14
+ const w = { class: "" }, C = /* @__PURE__ */ o("h1", { class: "pd-medium radius-medium bg-grey mn-b-small" }, "Welcome to Backoffice", -1), y = /* @__PURE__ */ o("span", null, " Members ", -1), B = /* @__PURE__ */ o("span", null, " Products ", -1), E = /* @__PURE__ */ o("span", null, " Leftovers ", -1), x = /* @__PURE__ */ o("span", null, " Orders ", -1), G = /* @__PURE__ */ o("span", null, " Gallery ", -1), M = /* @__PURE__ */ o("span", null, " Events ", -1), J = {
9
15
  __name: "Dashboard",
10
16
  props: {
11
17
  favorites: Array
12
18
  },
13
- setup(R) {
14
- const r = f(), a = c();
15
- return p(null), p([]), m(async () => {
16
- }), (x, s) => (d(), _("div", k, [
17
- v,
18
- o(u, { class: "bg-grey mn-b-semi" }, {
19
- default: n(() => [
20
- o(i, {
21
- onClick: s[0] || (s[0] = (l) => e(a).push({
19
+ setup(O) {
20
+ const l = k(), t = g();
21
+ return m(null), m([]), u(async () => {
22
+ }), (L, r) => (p(), f("div", w, [
23
+ C,
24
+ s(c, { class: "bg-grey mn-b-semi" }, {
25
+ default: e(() => [
26
+ s(n, {
27
+ onClick: r[0] || (r[0] = (a) => i(t).push({
22
28
  name: "Organization Members",
23
29
  params: {
24
- _id: e(r).params._id
30
+ _id: i(l).params._id
25
31
  }
26
32
  })),
27
33
  class: "cursor-pointer"
28
34
  }, {
29
- default: n(() => [
30
- C
31
- ]),
32
- _: 1
33
- }),
34
- o(i, {
35
- onClick: s[1] || (s[1] = (l) => e(a).push({
36
- name: "Backoffice Events",
37
- params: {
38
- _id: e(r).params._id
39
- }
40
- })),
41
- class: "cursor-pointer"
42
- }, {
43
- default: n(() => [
44
- $
45
- ]),
46
- _: 1
47
- }),
48
- o(i, {
49
- onClick: s[2] || (s[2] = (l) => e(a).push({
50
- name: "Backoffice Community",
51
- params: {
52
- _id: e(r).params._id
53
- }
54
- })),
55
- class: "cursor-pointer"
56
- }, {
57
- default: n(() => [
35
+ default: e(() => [
36
+ s(v, {
37
+ class: "i-semi",
38
+ icon: !0,
39
+ fill: "rgb(var(--white))"
40
+ }, null, 8, ["fill"]),
58
41
  y
59
42
  ]),
60
43
  _: 1
61
44
  }),
62
- o(i, {
63
- onClick: s[3] || (s[3] = (l) => e(a).push({
45
+ s(n, {
46
+ onClick: r[1] || (r[1] = (a) => i(t).push({
64
47
  name: "Products",
65
48
  params: {
66
- _id: e(r).params._id
49
+ _id: i(l).params._id
67
50
  }
68
51
  })),
69
52
  class: "cursor-pointer"
70
53
  }, {
71
- default: n(() => [
54
+ default: e(() => [
55
+ s(_, {
56
+ class: "i-semi",
57
+ icon: !0,
58
+ fill: "rgb(var(--white))"
59
+ }, null, 8, ["fill"]),
72
60
  B
73
61
  ]),
74
62
  _: 1
75
63
  }),
76
- o(i, {
77
- onClick: s[4] || (s[4] = (l) => e(a).push({
64
+ s(n, {
65
+ onClick: r[2] || (r[2] = (a) => i(t).push({
78
66
  name: "Leftovers",
79
67
  params: {
80
- _id: e(r).params._id
68
+ _id: i(l).params._id
81
69
  }
82
70
  })),
83
71
  class: "cursor-pointer"
84
72
  }, {
85
- default: n(() => [
86
- g
73
+ default: e(() => [
74
+ s(h, {
75
+ class: "i-semi",
76
+ icon: !0,
77
+ fill: "rgb(var(--white))"
78
+ }, null, 8, ["fill"]),
79
+ E
87
80
  ]),
88
81
  _: 1
89
82
  }),
90
- o(i, {
91
- onClick: s[5] || (s[5] = (l) => e(a).push({
83
+ s(n, {
84
+ onClick: r[3] || (r[3] = (a) => i(t).push({
92
85
  name: "Backoffice Orders",
93
86
  params: {
94
- _id: e(r).params._id
95
- }
96
- })),
97
- class: "cursor-pointer"
98
- }, {
99
- default: n(() => [
100
- b
101
- ]),
102
- _: 1
103
- }),
104
- o(i, {
105
- onClick: s[6] || (s[6] = (l) => e(a).push({
106
- name: "Payments",
107
- params: {
108
- _id: e(r).params._id
87
+ _id: i(l).params._id
109
88
  }
110
89
  })),
111
90
  class: "cursor-pointer"
112
91
  }, {
113
- default: n(() => [
114
- h
115
- ]),
116
- _: 1
117
- })
118
- ]),
119
- _: 1
120
- }),
121
- o(u, { class: "bg-grey" }, {
122
- default: n(() => [
123
- o(i, {
124
- onClick: s[7] || (s[7] = (l) => e(a).push({
125
- name: "Backoffice Organizations",
126
- params: {
127
- _id: e(r).params._id
128
- }
129
- })),
130
- class: "cursor-pointer"
131
- }, {
132
- default: n(() => [
133
- O
92
+ default: e(() => [
93
+ s($, {
94
+ class: "i-semi",
95
+ icon: !0,
96
+ fill: "rgb(var(--white))"
97
+ }, null, 8, ["fill"]),
98
+ x
134
99
  ]),
135
100
  _: 1
136
101
  }),
137
- o(i, {
138
- onClick: s[8] || (s[8] = (l) => e(a).push({
102
+ s(n, {
103
+ onClick: r[4] || (r[4] = (a) => i(t).push({
139
104
  name: "Backoffice Gallery",
140
105
  params: {
141
- _id: e(r).params._id
106
+ _id: i(l).params._id
142
107
  }
143
108
  })),
144
109
  class: "cursor-pointer"
145
110
  }, {
146
- default: n(() => [
147
- E
111
+ default: e(() => [
112
+ s(b, {
113
+ class: "i-semi",
114
+ icon: !0,
115
+ fill: "rgb(var(--white))"
116
+ }, null, 8, ["fill"]),
117
+ G
148
118
  ]),
149
119
  _: 1
150
120
  }),
151
- o(i, {
152
- onClick: s[9] || (s[9] = (l) => e(a).push({
153
- name: "Backoffice Reports",
121
+ s(n, {
122
+ onClick: r[5] || (r[5] = (a) => i(t).push({
123
+ name: "Backoffice Events",
154
124
  params: {
155
- _id: e(r).params._id
125
+ _id: i(l).params._id
156
126
  }
157
127
  })),
158
128
  class: "cursor-pointer"
159
129
  }, {
160
- default: n(() => [
161
- P
130
+ default: e(() => [
131
+ s(d, {
132
+ class: "i-semi",
133
+ icon: !0,
134
+ fill: "rgb(var(--white))"
135
+ }, null, 8, ["fill"]),
136
+ M
162
137
  ]),
163
138
  _: 1
164
139
  })
@@ -169,5 +144,5 @@ const k = { class: "" }, v = /* @__PURE__ */ t("h1", null, "Welcome to Backoffic
169
144
  }
170
145
  };
171
146
  export {
172
- A as default
147
+ J as default
173
148
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),n={props:{message:{type:Object,required:!0}}},r={class:"flex-v-center gap-thin flex-nowrap flex w-100 p-small"},o={class:"mn-r-auto"},l={class:"t-semi"},c={class:"t-transp"};function i(s,u,t,m,p,_){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pd-small",{"bg-main-nano":t.message.username==="Weeder Support"}])},[e.createElementVNode("p",r,[e.createElementVNode("strong",o,[e.createElementVNode("span",l,e.toDisplayString(t.message.username),1),e.createTextVNode(),e.createElementVNode("span",c,e.toDisplayString(s.formatDate(t.message.createdAt)),1)])]),e.createElementVNode("p",null,e.toDisplayString(t.message.text),1)],2)}const d=a.default(n,[["render",i]]);exports.default=d;
@@ -0,0 +1,28 @@
1
+ import { openBlock as n, createElementBlock as o, normalizeClass as r, createElementVNode as e, toDisplayString as t, createTextVNode as c } from "vue";
2
+ import l from "../../../../../../_virtual/_plugin-vue_export-helper.js";
3
+ const m = {
4
+ props: {
5
+ message: {
6
+ type: Object,
7
+ required: !0
8
+ }
9
+ }
10
+ }, i = { class: "flex-v-center gap-thin flex-nowrap flex w-100 p-small" }, p = { class: "mn-r-auto" }, d = { class: "t-semi" }, _ = { class: "t-transp" };
11
+ function f(a, u, s, g, h, x) {
12
+ return n(), o("div", {
13
+ class: r(["pd-small", { "bg-main-nano": s.message.username === "Weeder Support" }])
14
+ }, [
15
+ e("p", i, [
16
+ e("strong", p, [
17
+ e("span", d, t(s.message.username), 1),
18
+ c(),
19
+ e("span", _, t(a.formatDate(s.message.createdAt)), 1)
20
+ ])
21
+ ]),
22
+ e("p", null, t(s.message.text), 1)
23
+ ], 2);
24
+ }
25
+ const v = /* @__PURE__ */ l(m, [["render", f]]);
26
+ export {
27
+ v as default
28
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("../sections/ChatWindow.vue.cjs"),t=require("../../store/chat.store.cjs");require("./ChatPage.vue2.cjs");const n={__name:"ChatPage",props:{username:{type:String,required:!0},chatID:{type:String,required:!0}},setup(u){const r=u;return e.onMounted(async()=>{t.default.methods.setUsername(r.username||"user"),await t.default.methods.connectWebSocket(),t.default.methods.setCurrentChat(r.chatID)}),(o,s)=>(e.openBlock(),e.createBlock(a.default))}};exports.default=n;
@@ -0,0 +1,26 @@
1
+ import { onMounted as o, openBlock as a, createBlock as n } from "vue";
2
+ import s from "../sections/ChatWindow.vue.js";
3
+ import e from "../../store/chat.store.js";
4
+ import "./ChatPage.vue2.js";
5
+ const _ = {
6
+ __name: "ChatPage",
7
+ props: {
8
+ username: {
9
+ type: String,
10
+ required: !0
11
+ },
12
+ chatID: {
13
+ type: String,
14
+ required: !0
15
+ }
16
+ },
17
+ setup(r) {
18
+ const t = r;
19
+ return o(async () => {
20
+ e.methods.setUsername(t.username || "user"), await e.methods.connectWebSocket(), e.methods.setCurrentChat(t.chatID);
21
+ }), (c, m) => (a(), n(s));
22
+ }
23
+ };
24
+ export {
25
+ _ as default
26
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../icons/navigation/IconAdd.vue.cjs"),i=require("../../../icons/placeholders/PlaceholderChat.vue.cjs"),d=require("../blocks/ChatMessage.vue.cjs"),l=require("../../store/chat.store.cjs");require("./ChatWindow.vue2.cjs");const h={class:"bg-white radius-semi bg-white o-hidden pos-relative"},m={class:"pos-relative h-min-20r flex-justify-end flex flex-column br-b br-solid br-black-transp-10"},f={key:0,class:"flex-center w-100 h-100 flex-column flex pos-absolute"},g=e.createElementVNode("h4",null,"Here you can view your chat history",-1),p=e.createElementVNode("p",null,"Feel free to ask if you have any questions.",-1),v={class:"flex-nowrap flex-v-center flex bg-white w-100 radius-big pd-small"},_={__name:"ChatWindow",setup(k){const s=e.ref(""),t=e.ref(null),o=e.computed(()=>l.default.state.messages),c=()=>{if(s.value){const n={text:s.value,username:l.default.state.username,chatId:l.default.state.currentChatId};l.default.methods.addMessage(n),console.log(t.value.lastElementChild.offsetHeight),t.value.scrollTop=t.value.lastElementChild.offsetHeight,s.value=""}};return e.watch(l.default.state.messages,()=>{t.value.scrollTop=t.value.lastElementChild.offsetHeight},{deep:!0}),(n,r)=>(e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("div",{ref_key:"allMessages",ref:t,class:"chat-messages o-scroll h-max-20r"},[e.createElementVNode("div",m,[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[o.value.length<1?(e.openBlock(),e.createElementBlock("div",f,[e.createVNode(i.default,{class:"radius-100 mn-b-thin"}),g,p])):(e.openBlock(),e.createBlock(e.TransitionGroup,{key:1,name:"list",tag:"ul",class:"w-100 o-hidden"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,a=>(e.openBlock(),e.createBlock(d.default,{key:a._id,message:a},null,8,["message"]))),128))]),_:1}))]),_:1})])],512),e.createElementVNode("div",v,[e.createVNode(u.default,{class:"mn-r-thin t-transp i-regular"}),e.withDirectives(e.createElementVNode("input",{class:"",placeholder:"Enter your message",type:"text","onUpdate:modelValue":r[0]||(r[0]=a=>s.value=a),onKeyup:e.withKeys(c,["enter"])},null,544),[[e.vModelText,s.value]])])]))}};exports.default=_;
@@ -0,0 +1,77 @@
1
+ import { ref as d, computed as p, watch as g, openBlock as a, createElementBlock as n, createElementVNode as s, createVNode as r, Transition as v, withCtx as m, createBlock as h, TransitionGroup as _, Fragment as x, renderList as w, withDirectives as y, withKeys as b, vModelText as k } from "vue";
2
+ import C from "../../../icons/navigation/IconAdd.vue.js";
3
+ import M from "../../../icons/placeholders/PlaceholderChat.vue.js";
4
+ import E from "../blocks/ChatMessage.vue.js";
5
+ import l from "../../store/chat.store.js";
6
+ import "./ChatWindow.vue2.js";
7
+ const T = { class: "bg-white radius-semi bg-white o-hidden pos-relative" }, H = { class: "pos-relative h-min-20r flex-justify-end flex flex-column br-b br-solid br-black-transp-10" }, B = {
8
+ key: 0,
9
+ class: "flex-center w-100 h-100 flex-column flex pos-absolute"
10
+ }, I = /* @__PURE__ */ s("h4", null, "Here you can view your chat history", -1), V = /* @__PURE__ */ s("p", null, "Feel free to ask if you have any questions.", -1), F = { class: "flex-nowrap flex-v-center flex bg-white w-100 radius-big pd-small" }, P = {
11
+ __name: "ChatWindow",
12
+ setup(K) {
13
+ const t = d(""), e = d(null), i = p(() => l.state.messages), f = () => {
14
+ if (t.value) {
15
+ const c = {
16
+ text: t.value,
17
+ username: l.state.username,
18
+ chatId: l.state.currentChatId
19
+ };
20
+ l.methods.addMessage(c), console.log(e.value.lastElementChild.offsetHeight), e.value.scrollTop = e.value.lastElementChild.offsetHeight, t.value = "";
21
+ }
22
+ };
23
+ return g(l.state.messages, () => {
24
+ e.value.scrollTop = e.value.lastElementChild.offsetHeight;
25
+ }, { deep: !0 }), (c, u) => (a(), n("div", T, [
26
+ s("div", {
27
+ ref_key: "allMessages",
28
+ ref: e,
29
+ class: "chat-messages o-scroll h-max-20r"
30
+ }, [
31
+ s("div", H, [
32
+ r(v, {
33
+ name: "scaleIn",
34
+ mode: "out-in"
35
+ }, {
36
+ default: m(() => [
37
+ i.value.length < 1 ? (a(), n("div", B, [
38
+ r(M, { class: "radius-100 mn-b-thin" }),
39
+ I,
40
+ V
41
+ ])) : (a(), h(_, {
42
+ key: 1,
43
+ name: "list",
44
+ tag: "ul",
45
+ class: "w-100 o-hidden"
46
+ }, {
47
+ default: m(() => [
48
+ (a(!0), n(x, null, w(i.value, (o) => (a(), h(E, {
49
+ key: o._id,
50
+ message: o
51
+ }, null, 8, ["message"]))), 128))
52
+ ]),
53
+ _: 1
54
+ }))
55
+ ]),
56
+ _: 1
57
+ })
58
+ ])
59
+ ], 512),
60
+ s("div", F, [
61
+ r(C, { class: "mn-r-thin t-transp i-regular" }),
62
+ y(s("input", {
63
+ class: "",
64
+ placeholder: "Enter your message",
65
+ type: "text",
66
+ "onUpdate:modelValue": u[0] || (u[0] = (o) => t.value = o),
67
+ onKeyup: b(f, ["enter"])
68
+ }, null, 544), [
69
+ [k, t.value]
70
+ ])
71
+ ])
72
+ ]));
73
+ }
74
+ };
75
+ export {
76
+ P as default
77
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("vue"),e=c.reactive({messages:[],currentChatId:null,username:null,websocket:null}),a={connectWebSocket(){return console.log("process env"),console.log(process.env.WSS_URL),new Promise(function(s,o){e.websocket=new WebSocket(process.env.WSS_URL),e.websocket.onopen=function(){s(e.websocket)},e.websocket.onmessage=t=>{const n=JSON.parse(t.data);n.chatId===e.currentChatId&&e.messages.push(n)},e.websocket.onerror=function(t){o(t)}})},setMessages(s){console.log(process.env.API_URL),e.messages=s},addMessage(s){e.websocket&&e.websocket.send(JSON.stringify(s))},async setCurrentChat(s){e.currentChatId=s,e.messages=[],e.websocket&&e.websocket.send(JSON.stringify({type:"joinChat",chatId:s}));const t=await(await fetch(`/messages/${s}`)).json();a.setMessages(t)},setUsername(s){e.username=s}},r={state:c.readonly(e),methods:a};exports.default=r;
@@ -0,0 +1,40 @@
1
+ import { reactive as a, readonly as r } from "vue";
2
+ const e = a({
3
+ messages: [],
4
+ currentChatId: null,
5
+ username: null,
6
+ websocket: null
7
+ }), c = {
8
+ connectWebSocket() {
9
+ return console.log("process env"), console.log(process.env.WSS_URL), new Promise(function(s, o) {
10
+ e.websocket = new WebSocket(process.env.WSS_URL), e.websocket.onopen = function() {
11
+ s(e.websocket);
12
+ }, e.websocket.onmessage = (t) => {
13
+ const n = JSON.parse(t.data);
14
+ n.chatId === e.currentChatId && e.messages.push(n);
15
+ }, e.websocket.onerror = function(t) {
16
+ o(t);
17
+ };
18
+ });
19
+ },
20
+ setMessages(s) {
21
+ console.log(process.env.API_URL), e.messages = s;
22
+ },
23
+ addMessage(s) {
24
+ e.websocket && e.websocket.send(JSON.stringify(s));
25
+ },
26
+ async setCurrentChat(s) {
27
+ e.currentChatId = s, e.messages = [], e.websocket && e.websocket.send(JSON.stringify({ type: "joinChat", chatId: s }));
28
+ const t = await (await fetch(`/messages/${s}`)).json();
29
+ c.setMessages(t);
30
+ },
31
+ setUsername(s) {
32
+ e.username = s;
33
+ }
34
+ }, i = {
35
+ state: r(e),
36
+ methods: c
37
+ };
38
+ export {
39
+ i as default
40
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Field/Field.vue2.cjs");const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Upload/Upload.vue2.cjs");const _=require("../blocks/CardBlogpost.vue.cjs"),l=require("../../store/blogposts.cjs"),f=require("../../../auth/store/auth.cjs"),b=require("vue-router");require("./Community.vue2.cjs");const v=r=>(e.pushScopeId("data-v-bdf0e48a"),r=r(),e.popScopeId(),r),g={class:"flex-v-center flex-nowrap flex mn-b-medium"},h=v(()=>e.createElementVNode("h3",{class:"mn-r-medium"},"Blog",-1)),k={class:""},w={class:"flex-nowrap flex pd-t-zero pd-b-zero pd-big"},y=["onClick"],C=["onClick"],q={__name:"Community",async setup(r){let s,c;const i=b.useRouter();[s,c]=e.withAsyncContext(()=>l.read()),await s,c(),console.log(l.state),e.ref({title:"",content:"",categories:[]});const d=async t=>{window.confirm("Are you sure you want to delete this post?")&&(console.log(t),await l.remove(t))};let u=e.ref("all");const a=e.computed(()=>u.value==="all"?l.state.all:l.state.all.filter(t=>t.categories.includes(u.value)));return e.computed(()=>{for(let t of a.value)if(t.blocks&&t.blocks.length>0){const n=t.blocks.find(o=>o.type.name==="ImageUpload");if(n)return n.content}return null}),(t,n)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",g,[h,e.createElementVNode("button",{onClick:n[0]||(n[0]=o=>e.unref(i).push({name:"Create BlogPost"})),class:"t-white bg-second button-small button"},"+")]),e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,o=>(e.openBlock(),e.createBlock(_.default,{key:o._id,blogpost:o,owner:f.state.user._id,class:"mn-b-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createElementVNode("button",{class:"mn-r-thin button-small w-100 button",onClick:m=>t.$router.push({path:"/community/posts/"+o.url+"/edit"})},"Edit",8,y),e.createElementVNode("button",{class:"button-small w-100 button",onClick:m=>d(o._id)},"Delete",8,C)])]),_:2},1032,["blogpost","owner"]))),128))])]))}},B=p.default(q,[["__scopeId","data-v-bdf0e48a"]]);exports.default=B;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Field/Field.vue.cjs");const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Upload/Upload.vue2.cjs");const _=require("../blocks/CardBlogpost.vue.cjs"),l=require("../../store/blogposts.cjs"),f=require("../../../auth/store/auth.cjs"),b=require("vue-router");require("./Community.vue2.cjs");const v=r=>(e.pushScopeId("data-v-bdf0e48a"),r=r(),e.popScopeId(),r),g={class:"flex-v-center flex-nowrap flex mn-b-medium"},h=v(()=>e.createElementVNode("h3",{class:"mn-r-medium"},"Blog",-1)),k={class:""},w={class:"flex-nowrap flex pd-t-zero pd-b-zero pd-big"},y=["onClick"],C=["onClick"],q={__name:"Community",async setup(r){let s,c;const i=b.useRouter();[s,c]=e.withAsyncContext(()=>l.read()),await s,c(),console.log(l.state),e.ref({title:"",content:"",categories:[]});const d=async t=>{window.confirm("Are you sure you want to delete this post?")&&(console.log(t),await l.remove(t))};let u=e.ref("all");const a=e.computed(()=>u.value==="all"?l.state.all:l.state.all.filter(t=>t.categories.includes(u.value)));return e.computed(()=>{for(let t of a.value)if(t.blocks&&t.blocks.length>0){const n=t.blocks.find(o=>o.type.name==="ImageUpload");if(n)return n.content}return null}),(t,n)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",g,[h,e.createElementVNode("button",{onClick:n[0]||(n[0]=o=>e.unref(i).push({name:"Create BlogPost"})),class:"t-white bg-second button-small button"},"+")]),e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,o=>(e.openBlock(),e.createBlock(_.default,{key:o._id,blogpost:o,owner:f.state.user._id,class:"mn-b-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createElementVNode("button",{class:"mn-r-thin button-small w-100 button",onClick:m=>t.$router.push({path:"/community/posts/"+o.url+"/edit"})},"Edit",8,y),e.createElementVNode("button",{class:"button-small w-100 button",onClick:m=>d(o._id)},"Delete",8,C)])]),_:2},1032,["blogpost","owner"]))),128))])]))}},B=p.default(q,[["__scopeId","data-v-bdf0e48a"]]);exports.default=B;