@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
@@ -1,64 +1,152 @@
1
1
  <template>
2
- <transition name="slide-fade">
3
- <div class="pd-thin">
4
- <section class="mn-b-medium radius-medium pd-semi bg-grey">
5
- <h2 class="mn-b-regular">Members</h2>
6
- <p class="t-transp p-big">Add new memberships to the group and configure access rights.</p>
7
- </section>
8
-
2
+ <div class="pd-thin">
3
+ <SectionPageTitle
4
+ title="Members"
5
+ @update:tabs_current="(update) => tab = update"
6
+ :tabs_current="tab"
7
+ :tabs="[
8
+ { name: `Members (${organization.state.current.numberOfMembers})`, value: 'members' },
9
+ { name: 'Departments', value: 'departments' },
10
+ { name: 'Invites', value: 'invites' }
11
+ ]"
12
+ :actions="[
13
+ { method: openMembersAddPopup, label: 'Invite members' }
14
+ ]"
15
+ class="mn-b-small bg-grey bg-grey radius-big"
16
+ />
17
+
18
+ <Popup
19
+ title="Add members"
20
+ @close-popup="closeMembersAddPopup"
21
+ :isPopupOpen="isOpenMembersAddPopup"
22
+ class="bg-white w-min-30r w-max-30r radius-big pd-medium"
23
+ >
9
24
  <MembersAdd
25
+ text="Please enter your email or phone number to send an invitation link:"
10
26
  :organization="organizationData"
11
27
  @send-invite="handleSendInvite"
12
28
  />
13
-
14
- <Tab
15
- v-model:selected="tabMemberships"
16
- class="mn-b-medium bg-grey radius-small"
17
- :tabs="[
18
- { name: 'Members', value: 'members' },
19
- { name: 'Invites', value: 'invites' },
20
- ]"
21
- />
22
-
23
- <section class="mn-b-big radius-medium bg-white">
24
- <!-- Members -->
25
- <div
26
- v-if="tabMemberships === 'members'"
27
- class="cols-1 gap-thin"
29
+ </Popup>
30
+
31
+ <Block
32
+ v-if="tab === 'departments'"
33
+ class="mn-b-semi"
34
+ >
35
+ <Feed
36
+ :states="{
37
+ empty: {
38
+ title: 'No Departments Found',
39
+ description: 'Currently, there are no departments available.',
40
+ action: 'Add department',
41
+ callback: () => $router.push(`/organizations/${route.params._id}/departments/create`)
42
+ }
43
+ }"
44
+ :store="{
45
+ read: (options) => departments.actions.read(options),
46
+ state: null
47
+ }"
48
+ :options="{
49
+ organization: route.params._id,
50
+ user: auth.state.user._id,
51
+ hidden: false,
52
+ }"
53
+ v-slot="{
54
+ items
55
+ }"
56
+ >
57
+ <CardDepartment
58
+ v-for="(department, index) in items"
59
+ :key="index"
60
+ :department="department"
61
+ :organization="route.params._id"
62
+ class="radius-big bg-white pos-relative mn-b-thin"
63
+ />
64
+ </Feed>
65
+ </Block>
66
+
67
+ <section class="mn-b-big radius-medium bg-white">
68
+ <!-- Members -->
69
+ <div
70
+ v-if="tab === 'members'"
71
+ class="cols-1 gap-thin"
72
+ >
73
+ <Feed
74
+ :search="true"
75
+ :states="{
76
+ empty: {
77
+ title: 'No Members Found',
78
+ description: 'Currently, there are no members.'
79
+ }
80
+ }"
81
+ :store="{
82
+ read: (options) => memberships.actions.read(options)
83
+ }"
84
+ :options="{
85
+ target: route.params._id
86
+ }"
87
+ v-slot="{
88
+ items
89
+ }"
90
+ class="gap-thin cols-1"
28
91
  >
29
- <User
30
- v-for="(member, index) in memberships.state.memberships"
92
+ <CardUser
93
+ v-for="(member,index) in items"
31
94
  :key="index"
32
- :user="member"
33
- @click="$router.push(`/app/profile/${member._id}`)"
34
- class="bg-grey radius-small flex-nowrap flex pd-medium"
35
-
95
+ :user="member"
96
+ :_id="member.user._id"
97
+ :photo="member.user.profile.photo"
98
+ :phone="member.user.phone"
99
+ :email="member.user.email"
100
+ :name="member.user.profile.name || 'No name'"
101
+ :role="member.label || member.role"
102
+ @click="$router.push(`/profile/${member.user._id}`)"
103
+ :action=" member.role !== 'owner' ? {
104
+ label: 'x',
105
+ method: () => removeMember(index, member)
106
+ } : null"
107
+ class="w-100 bg-grey radius-big flex-nowrap flex pd-medium"
108
+ />
109
+ </Feed>
110
+ </div>
111
+ <!-- Invites -->
112
+ <div
113
+ v-if="tab === 'invites'"
114
+ >
115
+ <Feed
116
+ :search="true"
117
+ :states="{
118
+ empty: {
119
+ title: 'No Invites Found',
120
+ description: 'Currently, there are no members.'
121
+ }
122
+ }"
123
+ :store="{
124
+ read: (options) => invites.actions.read(options)
125
+ }"
126
+ :options="{
127
+ owner: route.params._id
128
+ }"
129
+ v-slot="{
130
+ items
131
+ }"
132
+ class="gap-thin cols-1"
133
+ >
134
+ <CardUser
135
+ v-for="invite in items"
136
+ :key="index"
137
+ :user="{ type: 'invite'} "
138
+ :name="invite.email || invite.phone"
139
+ :role="invite.status"
140
+ :action="{
141
+ label: 'x',
142
+ method: () => removeInvite(index, invite)
143
+ }"
144
+ class="w-100 bg-grey radius-big flex-nowrap flex pd-medium"
36
145
  />
37
- </div>
38
- <!-- Invites -->
39
- <div
40
- v-if="tabMemberships === 'invites'"
41
- >
42
- <span v-if="invites.length < 1">В организации нет приглашений</span>
43
- <div
44
- v-for="(invite, index) in invites.state.invites"
45
- class="br-grey br-1px br-solid radius-small mn-b-thin flex-nowrap flex-v-center flex pd-medium"
46
- >
47
-
48
- <span class="w-100 mn-r-small">{{invite.invitedEmail}} {{invite.invitedPhone}}</span>
49
- <span class="t-transp">{{invite.status}}</span>
50
-
51
- <div class="mn-l-medium flex-v-center flex">
52
- <button @click="removeInvite(index,invite)" class="button-small button">×</button>
53
- </div>
54
-
55
- </div>
56
- </div>
57
-
58
-
59
- </section>
60
- </div>
61
- </transition>
146
+ </Feed>
147
+ </div>
148
+ </section>
149
+ </div>
62
150
  </template>
63
151
 
64
152
  <script setup>
@@ -68,7 +156,9 @@ import { useRoute, useRouter } from 'vue-router'
68
156
  import Feed from '@pf/src/components/Feed/Feed.vue'
69
157
  import Tab from '@pf/src/components/Tab/Tab.vue'
70
158
  import Block from '@pf/src/components/Block/Block.vue'
159
+ import Popup from '@pf/src/components/Popup/Popup.vue';
71
160
 
161
+ import SectionPageTitle from '@pf/src/modules/globals/components/sections/SectionPageTitle.vue'
72
162
  import PlaceholderUserpic from '@pf/src/modules/icons/placeholders/PlaceholderUserpic.vue'
73
163
 
74
164
  import MembersAdd from '@pf/src/modules/organizations/components/sections/MembersAdd.vue';
@@ -77,8 +167,8 @@ import MembersAdd from '@pf/src/modules/organizations/components/sections/Member
77
167
  import Menu from '@pf/src/modules/mobile/components/Menu/Menu.vue'
78
168
  import MenuItem from '@pf/src/modules/mobile/components/Menu/MenuItem.vue'
79
169
 
80
- import User from '@pf/src/modules/organizations/components/blocks/User.vue';
81
-
170
+ import CardUser from '@pf/src/modules/users/components/blocks/CardUser.vue';
171
+ import CardDepartment from '@pf/src/modules/organizations/components/blocks/CardDepartment.vue';
82
172
 
83
173
  import * as auth from '@pf/src/modules/auth/store/auth'
84
174
  import * as invites from '@pf/src/modules/organizations/store/invites';
@@ -90,12 +180,22 @@ const route = useRoute()
90
180
  const router = useRouter()
91
181
  const organizationData = ref(null)
92
182
 
93
- const tabMemberships = ref('members')
183
+ // Tab logic
184
+ const tab = ref('members')
185
+ // Popup
186
+ const isOpenMembersAddPopup = ref(false);
187
+
188
+ function openMembersAddPopup() {
189
+ isOpenMembersAddPopup.value = true;
190
+ }
191
+
192
+ function closeMembersAddPopup() {
193
+ isOpenMembersAddPopup.value = false;
194
+ }
94
195
 
95
196
  onMounted(async () => {
96
197
  organizationData.value = (await organization.actions.read({_id: route.params._id, user: auth.state.user._id}))[0]
97
- await memberships.actions.read({target: route.params._id});
98
- await invites.actions.read(organizationData.value._id);
198
+ ;
99
199
  })
100
200
 
101
201
  const FirstLevelDepartments = computed(() => {
@@ -110,18 +210,32 @@ const FirstLevelDepartments = computed(() => {
110
210
  );
111
211
  });
112
212
 
113
- async function handleSendInvite(invite) {
114
- await invites.actions.create(organizationData.value._id, invite);
213
+ async function handleSendInvite(list) {
214
+ await invites.actions.create({
215
+ owner: {
216
+ type: 'Organization',
217
+ target: organizationData.value._id
218
+ },
219
+ creator: {
220
+ type: 'User',
221
+ target: auth.state.user._id
222
+ },
223
+ invites: list,
224
+ });
115
225
  }
116
226
 
117
227
  async function removeMember(index,member) {
118
- memberships.state.memberships.splice(index, 1);
119
- await memberships.actions.delete(member._id);
228
+ if (confirm("Confirm remove of member") == true) {
229
+ memberships.state.memberships.splice(index, 1);
230
+ await memberships.actions.delete(member._id);
231
+ }
120
232
  }
121
233
 
122
234
  async function removeInvite(index,invite) {
123
- invites.state.invites.splice(index, 1);
124
- await invites.actions.delete(invite._id);
235
+ if (confirm("Confirm remove of member") == true) {
236
+ invites.state.invites.splice(index, 1);
237
+ await invites.actions.delete(invite._id);
238
+ }
125
239
  }
126
240
  </script>
127
241
 
@@ -10,44 +10,6 @@
10
10
  class="mn-b-semi"
11
11
  />
12
12
 
13
- <Block
14
- :title="`${organization.state.current.numberOfMembers} members`"
15
- :actions="[{
16
- label: '>',
17
- function: () => $router.push(`/organizations/${route.params._id}/departments/create`)
18
- }]"
19
- class="mn-b-semi"
20
- >
21
- <Feed
22
- :states="{
23
- empty: {
24
- title: 'No Departments Found',
25
- description: 'Currently, there are no departments available.'
26
- }
27
- }"
28
- :store="{
29
- read: (options) => departments.actions.read(options),
30
- state: null
31
- }"
32
- :options="{
33
- organization: route.params._id,
34
- user: auth.state.user._id,
35
- hidden: false,
36
- }"
37
- v-slot="{
38
- items
39
- }"
40
- >
41
- <CardDepartment
42
- v-for="(department, index) in items"
43
- :key="index"
44
- :department="department"
45
- :organization="route.params._id"
46
- class="radius-big bg-white pos-relative mn-b-thin"
47
- />
48
- </Feed>
49
- </Block>
50
-
51
13
  <Tab
52
14
  v-model:selected="tabOrganization"
53
15
  :tabs="[
@@ -192,9 +154,7 @@
192
154
  import MenuItem from '@pf/src/modules/mobile/components/Menu/MenuItem.vue'
193
155
  // Organizations
194
156
  import DepartmentSub from '@pf/src/modules/organizations/components/blocks/DepartmentSub.vue';
195
- import User from '@pf/src/modules/organizations/components/blocks/User.vue';
196
- // Ssds
197
- import CardDepartment from '@pf/src/modules/organizations/components/blocks/CardDepartment.vue';
157
+ import User from '@pf/src/modules/users/components/blocks/CardUser.vue';
198
158
  // Feeds
199
159
  import FeedEvents from '@pf/src/modules/events/components/sections/Feed.vue';
200
160
  import FeedCommunity from '@pf/src/modules/community/components/sections/Feed.vue';
@@ -1,9 +1,7 @@
1
1
  <template>
2
2
  <div>
3
- <section class="mn-b-medium radius-medium pd-semi bg-grey">
4
- <h3 class="mn-b-medium">Add members</h3>
5
- <p class="mn-b-small t-transp p-medium">Укажите email или телефон, чтобы отправить ссылку с приглашением:</p>
6
-
3
+ <p class="mn-b-thin t-transp p-medium">{{text}}</p>
4
+ <section class="cols-1 mn-b-small radius-medium pd-semi bg-grey">
7
5
  <div
8
6
  v-for="(member, index) in members"
9
7
  :key="index"
@@ -13,40 +11,45 @@
13
11
  gap-thin
14
12
  radius-small
15
13
  mn-b-thin
16
- ">
17
- <Field
18
- v-model:field="member.contact"
19
- placeholder="Enter email or phone"
20
- class="pd-small radius-small w-100 bg-white"
21
- :validation="contactValidation"
22
- />
23
- <Select
24
- v-model:select="member.role"
25
- label="Role"
26
- :options="[
27
- 'owner',
28
- 'manager',
29
- 'member'
30
- ]"
31
- placeholder="Select"
32
- class="pos-relative w-100 bg-white radius-small pd-small"
33
- />
34
- <div v-if="index > 0" class="mn-r-medium flex-v-center flex">
35
- <button @click="removeMember(index)" class="button-small button">×</button>
14
+ "
15
+ >
16
+ <Field
17
+ v-model:field="member.contact"
18
+ placeholder="Enter email or phone"
19
+ class="w-100 pd-small radius-small bg-white"
20
+ :validation="contactValidation"
21
+ >
22
+ <div
23
+ v-if="index < 1"
24
+ @click="() => members.push({contact: ''})"
25
+ class="radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"
26
+ >
27
+ <IconAdd
28
+ class="i-medium"
29
+ :fill="'rgb(var(--white)'"
30
+ />
36
31
  </div>
37
- </div>
38
32
 
39
- <div @click="addMember" class="mn-b-small flex-v-center flex-nowrap flex">
40
- <p class="t-blue mn-r-small">+ Добавить приглашение</p>
41
- </div>
42
-
43
- <Button
44
- :submit="a = () => handleSendInvite(invites.state.invites)"
45
- :callback="reloadPage"
46
- class="w-100 bg-main">
47
- <span>Invite to organization</span>
48
- </Button>
33
+ <div
34
+ v-else
35
+ @click="() => members.splice(index, 1)"
36
+ class="radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"
37
+ >
38
+ <IconDelete
39
+ class="i-medium"
40
+ :fill="'rgb(var(--white)'"
41
+ />
42
+ </div>
43
+ </Field>
44
+ </div>
49
45
  </section>
46
+
47
+
48
+ <Button
49
+ :submit="submitMembers"
50
+ class="w-100 bg-main">
51
+ <span>Invite to organization</span>
52
+ </Button>
50
53
  </div>
51
54
  </template>
52
55
 
@@ -56,12 +59,17 @@
56
59
  import Field from '@pf/src/components/Field/Field.vue'
57
60
  import Select from '@pf/src/components/Select/Select.vue'
58
61
  import Button from '@pf/src/components/Button/Button.vue'
62
+
63
+ import IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue';
64
+ import IconAdd from '@pf/src/modules/icons/navigation/IconAdd.vue';
59
65
  // Import validation
60
66
  import * as inputsValidation from '@pf/src/modules/middlewares/client/inputs.validation'
67
+
61
68
  import * as invites from '@pf/src/modules/organizations/store/invites';
62
69
  // Props
63
70
  const props = defineProps({
64
71
  organization: Object,
72
+ text: String,
65
73
  });
66
74
 
67
75
  // Validation
@@ -69,25 +77,9 @@
69
77
  // Define Emits
70
78
  const emits = defineEmits(['send-invite']);
71
79
  // Define State
72
- const members = ref([{ contact: '', role: ''}]);
73
- // Define Methods
74
- function addMember() {
75
- members.value.push({ contact: '', role: ''});
76
- }
77
-
78
- function removeMember(index) {
79
- members.value.splice(index, 1);
80
- }
81
- async function handleSendInvite(invite) {
82
- await invites.actions.create(props.organization._id, members.value)
83
- }
84
-
80
+ const members = ref([{ contact: ''}]);
85
81
 
86
82
  async function submitMembers() {
87
83
  emits('send-invite', members.value);
88
84
  }
89
-
90
- function reloadPage() {
91
- // location.reload();
92
- }
93
85
  </script>
@@ -17,10 +17,8 @@ const controllerFactory = (db) => {
17
17
  };
18
18
 
19
19
  const read = (req, res) => {
20
- let query = {};
21
- let options = {};
22
-
23
- console.log(req.query)
20
+ let query = {};
21
+ let options = {};
24
22
 
25
23
  if (req.query.organization) {
26
24
  query.organization = new db.mongoose.Types.ObjectId(req.query.organization);
@@ -21,10 +21,12 @@ const сontrollerFactory = (db) => {
21
21
 
22
22
  const read = async (req, res) => {
23
23
  try {
24
- const invites = await Invite.find({ organization: req.params._id })
25
- if (!invites) {
26
- return res.status(404).send({ message: "Invites not found" });
24
+ const invites = await Invite.find({ 'owner.target': req.params._id })
25
+
26
+ if (!invites || invites.length === 0) {
27
+ return res.status(200).send([]);
27
28
  }
29
+
28
30
  res.send(invites);
29
31
  } catch (err) {
30
32
  res.status(500).send({ message: err.message });
@@ -32,12 +34,12 @@ const сontrollerFactory = (db) => {
32
34
  };
33
35
 
34
36
  const create = async (req, res) => {
35
- const userInviter = JSON.parse(req.cookies.user);
36
- const organizationId = req.params._id;
37
+ const creator = req.body.creator
38
+ const owner = req.body.owner
39
+ const list = req.body.invites
37
40
 
38
41
  try {
39
- const invites = req.body;
40
- for (let invite of invites) {
42
+ for (let invite of list) {
41
43
  let user = null;
42
44
 
43
45
  if (invite.contact.includes('@')) {
@@ -47,46 +49,45 @@ const сontrollerFactory = (db) => {
47
49
  }
48
50
 
49
51
  if (user) {
50
-
51
- console.log(invite)
52
52
 
53
53
  const membership = new Membership({
54
54
  user: user._id,
55
55
  type: 'organization',
56
- target: organizationId,
57
- role: invite.role,
56
+ target: req.body.owner.target,
57
+ role: 'member',
58
+ label: 'member'
58
59
  });
59
60
 
60
61
  await membership.save();
61
- res.status(200).json({ message: 'Invites sent successfully!' });
62
62
  } else {
63
63
  const newInvite = new Invite({
64
64
  code: uuid(),
65
- organization: organizationId,
66
- role: invite.role,
67
- createdBy: userInviter._id,
68
- invitedEmail: invite.contact.includes('@') ? invite.contact : null,
69
- invitedPhone: !invite.contact.includes('@') ? invite.contact : null,
65
+ creator: creator,
66
+ owner: owner,
67
+ role: 'member',
68
+ email: invite.contact.includes('@') ? invite.contact : null,
69
+ phone: !invite.contact.includes('@') ? invite.contact : null,
70
70
  });
71
+
71
72
  const savedInvite = await newInvite.save();
72
73
 
73
- if (savedInvite.invitedEmail) {
74
- const to = savedInvite.invitedEmail;
74
+ if (savedInvite.email !== null) {
75
+ const to = savedInvite.email;
75
76
  const subject = 'You have been added to the organization';
76
77
  const text = `You have been invited to join an organization on ${process.env.APP_NAME}! Use this link to register: ${process.env.API_URL}/auth/invite?inviteCode=${newInvite.code}&type=email"`;
78
+
77
79
  await sendEmail(to, subject, text);
78
80
  }
79
81
 
80
- if (savedInvite.invitedPhone !== null) {
81
- const phone = savedInvite.invitedPhone;
82
+ if (savedInvite.phone !== null) {
83
+ const phone = savedInvite.phone;
82
84
  const message = `You have been invited to join an organization on ${process.env.APP_NAME}! Use this link to register: ${process.env.API_URL}/auth/invite?inviteCode=${newInvite.code}&type=phone`;
83
85
 
84
86
  await sendSms(phone, message);
85
87
  }
86
-
87
- res.status(200).json({ message: 'Invites sent successfully!' });
88
88
  }
89
89
  }
90
+ res.status(200).json({ message: 'Invites sent successfully!' });
90
91
  } catch (error) {
91
92
  console.error(error);
92
93
  res.status(500).json({ message: 'Something went wrong' });
@@ -23,7 +23,7 @@ const controllerFactory = (db) => {
23
23
  // Auth Module
24
24
  const User = db.user;
25
25
  const Role = db.role;
26
-
26
+
27
27
  const sortParam = req.query.sortParam || 'numberOfProducts';
28
28
  const sortOrder = req.query.sortOrder || 'desc';
29
29
 
@@ -21,11 +21,59 @@ module.exports = (mongoose) => {
21
21
  start: String,
22
22
  end: String
23
23
  }
24
- }],
24
+ }],
25
25
  hidden: {
26
26
  type: Boolean,
27
27
  default: false,
28
28
  },
29
+
30
+ accesses: {
31
+ products: {
32
+ read: {
33
+ type: Boolean,
34
+ default: false,
35
+ },
36
+ edit: {
37
+ type: Boolean,
38
+ default: false,
39
+ },
40
+ delete: {
41
+ type: Boolean,
42
+ default: false,
43
+ },
44
+ },
45
+
46
+ orders: {
47
+ read: {
48
+ type: Boolean,
49
+ default: false,
50
+ },
51
+ confirm: {
52
+ type: Boolean,
53
+ default: false,
54
+ },
55
+ delete: {
56
+ type: Boolean,
57
+ default: false,
58
+ },
59
+ },
60
+
61
+ departments: {
62
+ read: {
63
+ type: Boolean,
64
+ default: false,
65
+ },
66
+ edit: {
67
+ type: Boolean,
68
+ default: false,
69
+ },
70
+ delete: {
71
+ type: Boolean,
72
+ default: false,
73
+ },
74
+ },
75
+ },
76
+
29
77
  // Marketplace options
30
78
  delivery: [String],
31
79
  payment: [String],
@@ -47,8 +95,10 @@ module.exports = (mongoose) => {
47
95
  ref: 'Department',
48
96
  },
49
97
  ],
98
+ }, {
99
+ timestamps: true
50
100
  });
51
-
101
+
52
102
  departmentSchema.index({ organization: 1 })
53
103
 
54
104
  const Department = mongoose.model('Department', departmentSchema);