@ozdao/prometheus-framework 0.2.81 → 0.2.82

Sign up to get free protection for your applications and to get access to all the features.
Files changed (327) 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-CDZCKfEI.mjs +106 -0
  6. package/dist/credentials.schema-CfhPcsuI.js +105 -0
  7. package/dist/events.server.js +4 -15
  8. package/dist/events.server.mjs +3 -14
  9. package/dist/files.server.js +1 -1
  10. package/dist/files.server.mjs +1 -1
  11. package/dist/gallery.server.js +1 -1
  12. package/dist/gallery.server.mjs +1 -1
  13. package/dist/index-B6a1mPgp.mjs +217 -0
  14. package/dist/index-BCCiEK_u.js +216 -0
  15. package/dist/main-8N2Jmsuk.js +91 -0
  16. package/dist/main-CkeuHuCY.mjs +13619 -0
  17. package/dist/main.css +1 -1
  18. package/dist/metadata.schema-Cu_mPkjE.js +77 -0
  19. package/dist/metadata.schema-cbFgazeK.mjs +78 -0
  20. package/dist/middlewares.server.js +1 -1
  21. package/dist/middlewares.server.mjs +1 -1
  22. package/dist/node_modules/@googlemaps/js-api-loader/dist/index.cjs +1 -0
  23. package/dist/node_modules/@googlemaps/js-api-loader/dist/index.js +238 -0
  24. package/dist/organizations.server.js +297 -134
  25. package/dist/organizations.server.mjs +295 -132
  26. package/dist/products.server.js +2 -2
  27. package/dist/products.server.mjs +2 -2
  28. package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
  29. package/dist/prometheus-framework/src/components/Address/Address.vue2.js +33 -24
  30. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/components/Block/Block.vue.js +23 -20
  32. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/components/Button/Button.vue.js +1 -225
  34. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  35. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +102 -1
  36. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +71 -60
  38. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/components/Field/Field.vue.js +1 -84
  40. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  41. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +84 -1
  42. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  44. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +325 -340
  46. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +2 -2
  48. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  49. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +53 -44
  50. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  51. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +41 -40
  52. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  53. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +37 -31
  54. package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +18 -19
  56. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +1 -36
  58. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  59. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +36 -1
  60. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
  62. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
  63. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
  64. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  66. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  68. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  70. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +30 -30
  72. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  74. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
  76. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  78. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/auth/store/auth.js +26 -26
  80. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +78 -103
  82. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
  84. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  86. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +15 -15
  88. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  90. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +4 -4
  92. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  94. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  96. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  98. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
  100. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +29 -27
  102. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  104. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
  106. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  108. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  110. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/globals/components/sections/SectionPageTitle.vue.js +33 -26
  112. package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +6 -3
  114. package/dist/prometheus-framework/src/modules/globals/services/globals.store.cjs +1 -0
  115. package/dist/prometheus-framework/src/modules/globals/services/globals.store.js +70 -0
  116. package/dist/prometheus-framework/src/modules/icons/entities/IconGallery.vue.cjs +1 -0
  117. package/dist/prometheus-framework/src/modules/icons/entities/IconGallery.vue.js +28 -0
  118. package/dist/prometheus-framework/src/modules/icons/entities/IconLeftovers.vue.cjs +1 -0
  119. package/dist/prometheus-framework/src/modules/icons/entities/IconLeftovers.vue.js +30 -0
  120. package/dist/prometheus-framework/src/modules/icons/entities/IconOrders.vue.cjs +1 -0
  121. package/dist/prometheus-framework/src/modules/icons/entities/IconOrders.vue.js +35 -0
  122. package/dist/prometheus-framework/src/modules/icons/entities/IconProducts.vue.cjs +1 -0
  123. package/dist/prometheus-framework/src/modules/icons/entities/IconProducts.vue.js +28 -0
  124. package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.js +63 -86
  126. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  128. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +174 -114
  130. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +40 -40
  132. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -0
  133. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +141 -0
  134. package/dist/prometheus-framework/src/modules/orders/components/sections/FormClientDetails.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/orders/components/sections/FormClientDetails.vue.js +1 -1
  136. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -0
  137. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +77 -0
  138. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +46 -35
  140. package/dist/prometheus-framework/src/modules/orders/store/customers.store.cjs +1 -0
  141. package/dist/prometheus-framework/src/modules/orders/store/customers.store.js +5 -0
  142. package/dist/prometheus-framework/src/modules/orders/store/models/customer.cjs +1 -0
  143. package/dist/prometheus-framework/src/modules/orders/store/models/customer.js +30 -0
  144. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/orders/store/orders.js +24 -25
  146. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +16 -16
  148. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  150. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +38 -49
  152. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  154. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +6 -6
  156. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +161 -138
  158. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  159. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +198 -78
  160. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +82 -125
  162. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  164. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  165. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  166. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  167. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  168. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  169. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +59 -70
  170. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  171. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  172. package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
  173. package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +34 -36
  174. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
  175. package/dist/prometheus-framework/src/modules/organizations/store/departments.js +38 -18
  176. package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
  177. package/dist/prometheus-framework/src/modules/organizations/store/invites.js +34 -35
  178. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  179. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  180. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
  181. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +41 -21
  182. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  183. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  184. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  185. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  186. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  187. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  188. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  189. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  190. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  191. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  192. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  193. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  194. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  195. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  196. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  197. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +3 -3
  198. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  199. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  200. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  201. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
  202. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  203. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  204. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  205. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +24 -26
  206. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -0
  207. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +78 -0
  208. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  209. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  210. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  211. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  212. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  213. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  214. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  215. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  216. package/dist/prometheus-framework/src/modules/users/store/users.cjs +1 -1
  217. package/dist/prometheus-framework/src/modules/users/store/users.js +13 -14
  218. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  219. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
  220. package/dist/prometheus-framework.cjs.js +1 -1
  221. package/dist/prometheus-framework.es.js +1 -1
  222. package/dist/queryProcessor-BJdKh0Ow.mjs +162 -0
  223. package/dist/queryProcessor-DRMo_GWK.js +161 -0
  224. package/dist/reports.server.js +1 -1
  225. package/dist/reports.server.mjs +1 -1
  226. package/dist/style.css +1 -1
  227. package/dist/users.server.js +69 -38
  228. package/dist/users.server.mjs +67 -36
  229. package/dist/wallet.server.js +2 -2
  230. package/dist/wallet.server.mjs +2 -2
  231. package/dist/web-CtVocufd.js +1 -0
  232. package/dist/web-DNq1tHCE.mjs +54 -0
  233. package/package.json +1 -1
  234. package/src/components/Address/Address.vue +13 -2
  235. package/src/components/Block/Block.vue +3 -2
  236. package/src/components/Button/Button.vue +9 -12
  237. package/src/components/Feed/Feed.vue +28 -6
  238. package/src/components/FieldPhone/FieldPhone.vue +592 -558
  239. package/src/components/LocationMarker/LocationMarker.vue +26 -22
  240. package/src/components/Popup/Popup.vue +22 -23
  241. package/src/components/Select/Select.vue +43 -32
  242. package/src/components/Slider/Slider.vue +3 -4
  243. package/src/modules/auth/components/pages/Invite.vue +7 -7
  244. package/src/modules/auth/store/auth.js +1 -1
  245. package/src/modules/backoffice/components/pages/Dashboard.vue +44 -29
  246. package/src/modules/community/components/sections/HotPosts.vue +1 -1
  247. package/src/modules/events/components/blocks/CardEvent.vue +4 -3
  248. package/src/modules/events/components/pages/Events.vue +23 -6
  249. package/src/modules/globals/components/sections/SectionPageTitle.vue +19 -7
  250. package/src/modules/globals/controllers/utils/queryProcessor.js +21 -7
  251. package/src/modules/globals/localization/vue-i18n.js +3 -0
  252. package/src/modules/globals/models/credentials.schema.js +7 -0
  253. package/src/modules/globals/models/metadata.schema.js +17 -0
  254. package/src/modules/globals/models/profile.schema.js +23 -0
  255. package/src/modules/globals/models/socials.schema.js +22 -0
  256. package/src/modules/globals/router/routerGuards.js +1 -0
  257. package/src/modules/globals/services/globals.cashe.js +26 -0
  258. package/src/modules/globals/services/globals.crud.js +115 -0
  259. package/src/modules/globals/services/globals.logger.js +41 -0
  260. package/src/modules/globals/services/globals.store.js +114 -0
  261. package/src/modules/icons/entities/IconGallery.vue +14 -0
  262. package/src/modules/icons/entities/IconLeftovers.vue +14 -0
  263. package/src/modules/icons/entities/IconOrders.vue +15 -0
  264. package/src/modules/icons/entities/IconProducts.vue +14 -0
  265. package/src/modules/landing/components/sections/HeroSection.vue +1 -1
  266. package/src/modules/landing/components/sections/MobileApp.vue +4 -4
  267. package/src/modules/landing/router/landing.js +1 -1
  268. package/src/modules/marketplace/components/sections/Filters.vue +3 -3
  269. package/src/modules/middlewares/server/accessors/AccessController.js +33 -0
  270. package/src/modules/middlewares/server/accessors/ReadDepartments.js +101 -0
  271. package/src/modules/middlewares/server/verifyAccesses.js +33 -0
  272. package/src/modules/middlewares/server/verifyInvites.js +4 -4
  273. package/src/modules/orders/components/pages/OrderCreate.vue +2 -2
  274. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +105 -68
  275. package/src/modules/orders/components/pages/Orders.vue +2 -2
  276. package/src/modules/orders/components/sections/FormAddCustomer.vue +152 -0
  277. package/src/modules/orders/components/sections/FormCustomerDetails.vue +67 -0
  278. package/src/modules/orders/components/sections/FormDelivery.vue +17 -3
  279. package/src/modules/orders/controllers/applications.controller.js +2 -0
  280. package/src/modules/orders/controllers/orders.controller.js +77 -52
  281. package/src/modules/orders/models/customer.model.js +54 -18
  282. package/src/modules/orders/models/order.model.js +1 -1
  283. package/src/modules/orders/orders.client.js +51 -51
  284. package/src/modules/orders/orders.server.js +32 -12
  285. package/src/modules/orders/router/orders.router.js +36 -41
  286. package/src/modules/orders/routes/orders.routes.js +3 -21
  287. package/src/modules/orders/store/customers.store.js +5 -0
  288. package/src/modules/orders/store/models/customer.js +29 -0
  289. package/src/modules/orders/store/orders.js +14 -20
  290. package/src/modules/organizations/components/blocks/CardDepartment.vue +3 -3
  291. package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
  292. package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +1 -12
  293. package/src/modules/organizations/components/pages/Department.vue +1 -1
  294. package/src/modules/organizations/components/pages/DepartmentEdit.vue +72 -48
  295. package/src/modules/organizations/components/pages/Members.vue +178 -64
  296. package/src/modules/organizations/components/pages/Organization.vue +1 -41
  297. package/src/modules/organizations/components/sections/MembersAdd.vue +44 -52
  298. package/src/modules/organizations/controllers/departments.controller.js +2 -4
  299. package/src/modules/organizations/controllers/invites.controller.js +24 -23
  300. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  301. package/src/modules/organizations/models/department.model.js +52 -2
  302. package/src/modules/organizations/models/invite.model.js +29 -32
  303. package/src/modules/organizations/models/membership.model.js +2 -0
  304. package/src/modules/organizations/models/organization.model.js +2 -1
  305. package/src/modules/organizations/organizations.client.js +0 -2
  306. package/src/modules/organizations/routes/departments.routes.js +18 -7
  307. package/src/modules/organizations/routes/invites.routes.js +2 -2
  308. package/src/modules/organizations/store/departments.js +22 -1
  309. package/src/modules/organizations/store/invites.js +74 -90
  310. package/src/modules/products/components/blocks/CardProduct.vue +24 -0
  311. package/src/modules/products/components/pages/Products.vue +1 -1
  312. package/src/modules/reports/components/sections/FormReport.vue +40 -40
  313. package/src/modules/spots/components/pages/Spot.vue +1 -1
  314. package/src/modules/spots/components/pages/SpotEdit.vue +1 -1
  315. package/src/modules/users/components/blocks/CardUser.vue +85 -0
  316. package/src/modules/users/controllers/users.controller.js +36 -13
  317. package/src/modules/users/middlewares/visitor.logger.js +66 -0
  318. package/src/modules/users/models/request.model.js +18 -0
  319. package/src/modules/users/models/user.model.js +26 -55
  320. package/src/modules/users/models/visitor.model.js +14 -0
  321. package/src/modules/users/store/users.js +2 -11
  322. package/src/modules/wallet/controllers/routes/payments.routes.js +2 -0
  323. package/src/components/FieldPhone/FieldPhone(script-setup).vue +0 -1646
  324. package/src/components/FieldPhone/FieldPhone2.vue +0 -671
  325. package/src/modules/orders/components/sections/FormClientDetails.vue +0 -61
  326. package/src/modules/organizations/components/blocks/User.vue +0 -69
  327. /package/src/modules/backoffice/components/admin/{User.vue → UserEdit.vue} +0 -0
@@ -1,278 +1,301 @@
1
- import { ref as u, openBlock as r, createElementBlock as o, createElementVNode as t, unref as P, createVNode as a, withCtx as d, createTextVNode as x, createBlock as v, createCommentVNode as g, Fragment as C, renderList as N } from "vue";
2
- import { useRouter as R, useRoute as H } from "vue-router";
1
+ import { ref as c, openBlock as n, createElementBlock as i, createElementVNode as s, unref as k, createVNode as r, withCtx as m, createTextVNode as x, createBlock as g, createCommentVNode as w, Fragment as C, renderList as U } from "vue";
2
+ import { useRouter as F, useRoute as H } from "vue-router";
3
3
  import "../../../../../../node_modules/js-cookie/dist/js.cookie.js";
4
4
  import "vue-i18n";
5
5
  import "../../../globals/localization/vue-i18n.js";
6
6
  import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
7
7
  import L from "../../../../components/UploadImage/UploadImage.vue.js";
8
- import "../../../../components/Tab/Tab.vue2.js";
9
- import $ from "../../../../components/Field/Field.vue.js";
8
+ import "../../../../components/Tab/Tab.vue.js";
9
+ import O from "../../../../components/Field/Field.vue2.js";
10
10
  import "../../../../components/Select/Select.vue.js";
11
- import m from "../../../../components/Checkbox/Checkbox.vue.js";
11
+ import l from "../../../../components/Checkbox/Checkbox.vue.js";
12
+ import "../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.js";
12
13
  import "../../../../components/Address/Address.vue.js";
13
14
  import "../../../../components/Loader/Loader.vue.js";
14
15
  import "../../../../components/LocationMarker/LocationMarker.vue.js";
15
- import O from "../../../../components/Button/Button.vue.js";
16
- import S from "../../../../components/Popup/Popup.vue2.js";
16
+ import $ from "../../../../components/Button/Button.vue2.js";
17
+ import N from "../../../../components/Popup/Popup.vue2.js";
17
18
  import E from "../../../../components/Block/Block.vue.js";
18
19
  import "../blocks/EditArray.vue2.js";
19
20
  import j from "../blocks/DepartmentSub.vue.js";
20
21
  import M from "../blocks/DepartmentMemberModify.vue.js";
21
- import q from "../blocks/User.vue.js";
22
- import { state as e, actions as c } from "../../store/departments.js";
23
- import { state as z, actions as G } from "../../store/memberships.js";
22
+ import q from "../../../users/components/blocks/CardUser.vue.js";
23
+ import { state as e, actions as u } from "../../store/departments.js";
24
+ import { state as R, actions as G } from "../../store/memberships.js";
24
25
  const I = { class: "for-transition pd-thin w-100" }, J = { class: "mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big" }, K = {
25
26
  key: 0,
26
27
  class: "mn-r-auto"
27
28
  }, Q = {
28
29
  key: 1,
29
30
  class: "mn-r-auto"
30
- }, W = { class: "flex-nowrap flex pd-thin" }, X = { class: "cols-2-fit-content" }, Y = { class: "w-100 flex-child-grow-1 flex-child" }, Z = { class: "cols-2 gap-thin" }, ee = { class: "bg-grey pd-medium o-hidden radius-big" }, te = /* @__PURE__ */ t("h3", { class: "mn-b-semi" }, "Department Settings", -1), ae = /* @__PURE__ */ t("p", { class: "p-medium mn-b-small" }, "Please settings for your department:", -1), se = { class: "cols-1 gap-thin" }, le = /* @__PURE__ */ t("h4", null, "Products", -1), re = { class: "bg-grey pd-medium o-hidden radius-big" }, ie = /* @__PURE__ */ t("h3", { class: "mn-b-semi" }, "Acessess", -1), ne = /* @__PURE__ */ t("p", { class: "p-medium mn-b-small" }, "Please select organization accesses for user in department:", -1), oe = { class: "cols-1 gap-thin" }, me = /* @__PURE__ */ t("h4", null, "Products", -1), de = /* @__PURE__ */ t("h4", null, "Orders", -1), pe = {
31
+ }, W = { class: "flex-nowrap flex pd-thin" }, X = { class: "cols-2-fit-content" }, Y = { class: "w-100 flex-child-grow-1 flex-child" }, Z = { class: "cols-2 gap-thin" }, ee = { class: "bg-grey pd-medium o-hidden radius-big" }, te = /* @__PURE__ */ s("h3", { class: "mn-b-semi" }, "Department Settings", -1), ae = /* @__PURE__ */ s("p", { class: "p-medium mn-b-small" }, "Please settings for your department:", -1), se = { class: "cols-1 gap-thin" }, re = /* @__PURE__ */ s("h4", null, "Products", -1), de = { class: "bg-grey pd-medium o-hidden radius-big" }, ne = /* @__PURE__ */ s("h3", { class: "mn-b-semi" }, "Acessess", -1), le = /* @__PURE__ */ s("p", { class: "p-medium mn-b-small" }, "Please select organization accesses for user in department:", -1), oe = { class: "cols-1 gap-thin" }, ie = /* @__PURE__ */ s("h4", null, "Products", -1), me = /* @__PURE__ */ s("h4", null, "Orders", -1), pe = /* @__PURE__ */ s("h4", null, "Departments", -1), ce = {
31
32
  key: 1,
32
33
  class: "flex-nowrap flex pd-thin"
33
34
  }, ue = {
34
35
  id: "dash",
35
36
  class: "pd-medium bg-white"
36
- }, ce = { class: "mn-b-regular flex-v-center flex-nowrap flex" }, fe = /* @__PURE__ */ t("h3", { class: "mn-r-small" }, "Подотделы ", -1), he = { class: "mn-b-small" }, _e = { key: 0 }, He = {
37
+ }, fe = { class: "mn-b-regular flex-v-center flex-nowrap flex" }, be = /* @__PURE__ */ s("h3", { class: "mn-r-small" }, "Подотделы ", -1), he = { class: "mn-b-small" }, _e = { key: 0 }, je = {
37
38
  __name: "DepartmentEdit",
38
- setup(be) {
39
- const T = R(), l = H();
40
- async function U() {
41
- l.params.department && await G.read({ target: l.params._id }), u(z.memberships), await c.read(l.params._id), l.params.department && await c.readOne(l.params.department);
39
+ setup(ge) {
40
+ const S = F(), d = H();
41
+ async function z() {
42
+ d.params.department && await G.read({ target: d.params._id }), c(R.memberships), d.params.department && await u.readOne(d.params.department);
42
43
  }
43
- U();
44
- const f = u(!1), h = u(null);
45
- function y(i) {
46
- f.value = !0, typeof i == "number" && (h.value = i);
44
+ z();
45
+ const f = c(!1), b = c(null);
46
+ function v(o) {
47
+ f.value = !0, typeof o == "number" && (b.value = o);
47
48
  }
48
- function w() {
49
- f.value = !1, h.value = null;
49
+ function D() {
50
+ f.value = !1, b.value = null;
50
51
  }
51
- const _ = u(!1), b = u(null);
52
- function D(i) {
53
- _.value = !0, typeof i == "number" && (b.value = i);
52
+ const h = c(!1), _ = c(null);
53
+ function y(o) {
54
+ h.value = !0, typeof o == "number" && (_.value = o);
54
55
  }
55
- function k() {
56
- _.value = !1, b.value = null;
56
+ function P() {
57
+ h.value = !1, _.value = null;
57
58
  }
58
- async function V() {
59
- l.params.department && await c.update(
60
- l.params._id,
59
+ async function T() {
60
+ d.params.department && await u.update(
61
+ d.params._id,
61
62
  e.department
62
- ), l.params.department || await c.create(
63
- l.params._id,
63
+ ), d.params.department || await u.create(
64
+ d.params._id,
64
65
  e.department
65
66
  );
66
67
  }
67
- function B() {
68
- T.replace({ name: "Department", params: { _id: l.params._id, department: e.department._id } });
68
+ function V() {
69
+ S.replace({ name: "Department", params: { _id: d.params._id, department: e.department._id } });
69
70
  }
70
71
  async function A() {
71
- await c.delete(
72
- l.params._id,
72
+ await u.delete(
73
+ d.params._id,
73
74
  e.department
74
75
  );
75
76
  }
76
- return (i, n) => (r(), o("div", I, [
77
- t("header", J, [
78
- P(l).params.department ? (r(), o("h1", K, "Edit Department")) : (r(), o("h1", Q, "Create Department")),
79
- t("section", W, [
80
- a(O, {
81
- submit: V,
82
- callback: B,
77
+ return (o, t) => (n(), i("div", I, [
78
+ s("header", J, [
79
+ k(d).params.department ? (n(), i("h1", K, "Edit Department")) : (n(), i("h1", Q, "Create Department")),
80
+ s("section", W, [
81
+ r($, {
82
+ submit: T,
83
+ callback: V,
83
84
  class: "bg-main"
84
85
  }, {
85
- default: d(() => [
86
+ default: m(() => [
86
87
  x("Save Department")
87
88
  ]),
88
89
  _: 1
89
90
  })
90
91
  ])
91
92
  ]),
92
- e.department.profile ? (r(), v(E, {
93
+ e.department.profile ? (n(), g(E, {
93
94
  key: 0,
94
95
  title: "Profile",
95
96
  class: "mn-b-thin"
96
97
  }, {
97
- default: d(() => [
98
- t("div", X, [
99
- a(L, {
98
+ default: m(() => [
99
+ s("div", X, [
100
+ r(L, {
100
101
  photo: e.department.profile.photo,
101
- "onUpdate:photo": n[0] || (n[0] = (s) => e.department.profile.photo = s),
102
+ "onUpdate:photo": t[0] || (t[0] = (a) => e.department.profile.photo = a),
102
103
  uploadPath: "organizations/" + e.department.name + "/avatars",
103
104
  class: "w-8r aspect-1x1 o-hidden mn-r-small radius-extra"
104
105
  }, null, 8, ["photo", "uploadPath"]),
105
- t("div", Y, [
106
- a($, {
106
+ s("div", Y, [
107
+ r(O, {
107
108
  field: e.department.profile.name,
108
- "onUpdate:field": n[1] || (n[1] = (s) => e.department.profile.name = s),
109
+ "onUpdate:field": t[1] || (t[1] = (a) => e.department.profile.name = a),
109
110
  label: "Name",
110
111
  placeholder: "Department Name",
111
112
  class: "mn-b-small bg-white radius-small pd-medium",
112
- validation: i.organizationName
113
+ validation: o.organizationName
113
114
  }, null, 8, ["field", "validation"]),
114
- a($, {
115
+ r(O, {
115
116
  field: e.department.profile.description,
116
- "onUpdate:field": n[2] || (n[2] = (s) => e.department.profile.description = s),
117
+ "onUpdate:field": t[2] || (t[2] = (a) => e.department.profile.description = a),
117
118
  label: "Description",
118
119
  placeholder: "Department description (max 120 symbols)",
119
120
  class: "bg-white radius-small pd-medium",
120
- validation: i.organizationName
121
+ validation: o.organizationName
121
122
  }, null, 8, ["field", "validation"])
122
123
  ])
123
124
  ])
124
125
  ]),
125
126
  _: 1
126
- })) : g("", !0),
127
- a(E, {
127
+ })) : w("", !0),
128
+ r(E, {
128
129
  title: "Team",
129
130
  placeholder: "No members added yet",
130
131
  actions: [{
131
132
  label: "+",
132
- function: () => y()
133
+ function: () => v()
133
134
  }],
134
135
  class: "cols-1 gap-thin mn-b-thin"
135
136
  }, {
136
- default: d(() => [
137
- (r(!0), o(C, null, N(e.department.members, (s, p) => (r(), v(q, {
137
+ default: m(() => [
138
+ (n(!0), i(C, null, U(e.department.members, (a, p) => (n(), g(q, {
138
139
  class: "bg-grey o-hidden radius-small mn-b-thin",
139
140
  key: p,
140
- user: s.user,
141
- photo: s.user.profile.photo,
142
- name: s.user.profile.name || s.user.phone || s.user.email || s.user._id,
143
- position: s.position,
144
- onClick: (F) => y(p)
141
+ user: a.user,
142
+ photo: a.user.profile.photo,
143
+ name: a.user.profile.name || a.user.phone || a.user.email || a.user._id,
144
+ position: a.position,
145
+ onClick: (B) => v(p)
145
146
  }, null, 8, ["user", "photo", "name", "position", "onClick"]))), 128))
146
147
  ]),
147
148
  _: 1
148
149
  }, 8, ["actions"]),
149
- a(S, {
150
- title: "Добавить участника",
151
- onClosePopup: w,
150
+ r(N, {
151
+ title: "Add member",
152
+ onClosePopup: D,
152
153
  isPopupOpen: f.value,
153
154
  class: "bg-white w-max-30r radius-big pd-big"
154
155
  }, {
155
- default: d(() => [
156
- a(M, {
156
+ default: m(() => [
157
+ r(M, {
157
158
  members: e.department.members,
158
- member: h.value,
159
- users: z.memberships,
160
- onCallback: w
159
+ member: b.value,
160
+ users: R.memberships,
161
+ onCallback: D
161
162
  }, null, 8, ["members", "member", "users"])
162
163
  ]),
163
164
  _: 1
164
165
  }, 8, ["isPopupOpen"]),
165
- t("div", Z, [
166
- t("div", ee, [
166
+ s("div", Z, [
167
+ s("div", ee, [
167
168
  te,
168
169
  ae,
169
- t("div", se, [
170
- le,
171
- a(m, {
170
+ s("div", se, [
171
+ re,
172
+ r(l, {
172
173
  label: "Hidden department",
173
- name: "Delivery",
174
- value: "pickup",
174
+ name: "hidden",
175
175
  class: "w-100 mn-r-small bg-white radius-small pd-small",
176
- radio: e.department.delivery
176
+ "onUpdate:radio": t[3] || (t[3] = (a) => e.department.hidden = !e.department.hidden),
177
+ radio: e.department.hidden
177
178
  }, null, 8, ["radio"])
178
179
  ])
179
180
  ]),
180
- t("div", re, [
181
- ie,
181
+ s("div", de, [
182
182
  ne,
183
- t("div", oe, [
184
- me,
185
- a(m, {
186
- label: "See products",
187
- name: "Delivery",
188
- value: "pickup",
183
+ le,
184
+ s("div", oe, [
185
+ ie,
186
+ r(l, {
187
+ label: "Read products",
188
+ name: "readProducts",
189
189
  class: "w-100 mn-r-small bg-white radius-small pd-small",
190
- radio: e.department.delivery
190
+ radio: e.department.accesses.products.read,
191
+ "onUpdate:radio": t[4] || (t[4] = (a) => e.department.accesses.products.read = !e.department.accesses.products.read)
191
192
  }, null, 8, ["radio"]),
192
- a(m, {
193
+ r(l, {
193
194
  label: "Edit products",
194
- name: "Delivery",
195
- value: "courier",
195
+ name: "editProducts",
196
196
  class: "w-100 mn-r-small bg-white radius-small pd-small",
197
- radio: e.department.delivery
197
+ radio: e.department.accesses.products.edit,
198
+ "onUpdate:radio": t[5] || (t[5] = (a) => e.department.accesses.products.edit = !e.department.accesses.products.edit)
198
199
  }, null, 8, ["radio"]),
199
- a(m, {
200
- label: "Delete orders",
201
- name: "Delivery",
202
- value: "post",
200
+ r(l, {
201
+ label: "Delete products",
202
+ name: "deleteProducts",
203
203
  class: "w-100 bg-white radius-small pd-small",
204
- radio: e.department.delivery
204
+ radio: e.department.accesses.products.delete,
205
+ "onUpdate:radio": t[6] || (t[6] = (a) => e.department.accesses.products.delete = !e.department.accesses.products.delete)
205
206
  }, null, 8, ["radio"]),
206
- de,
207
- a(m, {
208
- label: "See orders",
209
- name: "Delivery",
210
- value: "pickup",
207
+ me,
208
+ r(l, {
209
+ label: "Read orders",
210
+ name: "readOrders",
211
211
  class: "w-100 mn-r-small bg-white radius-small pd-small",
212
- radio: e.department.delivery
212
+ radio: e.department.accesses.orders.read,
213
+ "onUpdate:radio": t[7] || (t[7] = (a) => e.department.accesses.orders.read = !e.department.accesses.orders.read)
213
214
  }, null, 8, ["radio"]),
214
- a(m, {
215
+ r(l, {
215
216
  label: "Confirm orders",
216
- name: "Delivery",
217
- value: "courier",
217
+ name: "confirmOrders",
218
218
  class: "w-100 mn-r-small bg-white radius-small pd-small",
219
- radio: e.department.delivery
219
+ radio: e.department.accesses.orders.confirm,
220
+ "onUpdate:radio": t[8] || (t[8] = (a) => e.department.accesses.orders.confirm = !e.department.accesses.orders.confirm)
220
221
  }, null, 8, ["radio"]),
221
- a(m, {
222
+ r(l, {
222
223
  label: "Delete orders",
223
- name: "Delivery",
224
- value: "post",
224
+ name: "deleteOrders",
225
+ class: "w-100 bg-white radius-small pd-small",
226
+ radio: e.department.accesses.orders.delete,
227
+ "onUpdate:radio": t[9] || (t[9] = (a) => e.department.accesses.orders.delete = !e.department.accesses.orders.delete)
228
+ }, null, 8, ["radio"]),
229
+ pe,
230
+ r(l, {
231
+ label: "Read departments",
232
+ name: "readDepartments",
233
+ class: "w-100 mn-r-small bg-white radius-small pd-small",
234
+ radio: e.department.accesses.departments.read,
235
+ "onUpdate:radio": t[10] || (t[10] = (a) => e.department.accesses.departments.read = !e.department.accesses.departments.read)
236
+ }, null, 8, ["radio"]),
237
+ r(l, {
238
+ label: "Edit departments",
239
+ name: "editDepartments",
240
+ class: "w-100 mn-r-small bg-white radius-small pd-small",
241
+ radio: e.department.accesses.departments.edit,
242
+ "onUpdate:radio": t[11] || (t[11] = (a) => e.department.accesses.departments.edit = !e.department.accesses.departments.edit)
243
+ }, null, 8, ["radio"]),
244
+ r(l, {
245
+ label: "Delete departments",
246
+ name: "deleteDepartments",
225
247
  class: "w-100 bg-white radius-small pd-small",
226
- radio: e.department.delivery
248
+ radio: e.department.accesses.departments.delete,
249
+ "onUpdate:radio": t[12] || (t[12] = (a) => e.department.accesses.departments.delete = !e.department.accesses.departments.delete)
227
250
  }, null, 8, ["radio"])
228
251
  ])
229
252
  ])
230
253
  ]),
231
- P(l).params.department ? (r(), o("section", pe, [
232
- a(O, {
254
+ k(d).params.department ? (n(), i("section", ce, [
255
+ r($, {
233
256
  submit: A,
234
- callback: i.redirectToDash,
257
+ callback: o.redirectToDash,
235
258
  class: "bg-grey"
236
259
  }, {
237
- default: d(() => [
260
+ default: m(() => [
238
261
  x("Delete Department")
239
262
  ]),
240
263
  _: 1
241
264
  }, 8, ["callback"])
242
- ])) : g("", !0),
243
- t("div", ue, [
244
- a(S, {
265
+ ])) : w("", !0),
266
+ s("div", ue, [
267
+ r(N, {
245
268
  title: "Добавить подотдел",
246
- onClosePopup: k,
247
- isPopupOpen: _.value
269
+ onClosePopup: P,
270
+ isPopupOpen: h.value
248
271
  }, {
249
- default: d(() => [
250
- a(M, {
272
+ default: m(() => [
273
+ r(M, {
251
274
  departments: e.department.subdepartments,
252
- department: b.value,
275
+ department: _.value,
253
276
  maindepartment: e.department,
254
277
  alldepartments: e.departments,
255
- onCallback: k
278
+ onCallback: P
256
279
  }, null, 8, ["departments", "department", "maindepartment", "alldepartments"])
257
280
  ]),
258
281
  _: 1
259
282
  }, 8, ["isPopupOpen"]),
260
- t("div", ce, [
261
- fe,
262
- t("div", null, [
263
- t("a", {
283
+ s("div", fe, [
284
+ be,
285
+ s("div", null, [
286
+ s("a", {
264
287
  class: "t-main h5",
265
- onClick: n[3] || (n[3] = (s) => D())
288
+ onClick: t[13] || (t[13] = (a) => y())
266
289
  }, "+")
267
290
  ])
268
291
  ]),
269
- t("ul", he, [
270
- e.department.subdepartments.length < 1 ? (r(), o("li", _e, "В отделе еще нет подотделов")) : g("", !0),
271
- (r(!0), o(C, null, N(e.department.subdepartments, (s, p) => (r(), v(j, {
292
+ s("ul", he, [
293
+ e.department.subdepartments.length < 1 ? (n(), i("li", _e, "В отделе еще нет подотделов")) : w("", !0),
294
+ (n(!0), i(C, null, U(e.department.subdepartments, (a, p) => (n(), g(j, {
272
295
  key: p,
273
296
  class: "bg-grey o-hidden radius-small mn-b-thin",
274
- department: s,
275
- onClick: (F) => D(p)
297
+ department: a,
298
+ onClick: (B) => y(p)
276
299
  }, null, 8, ["department", "onClick"]))), 128))
277
300
  ])
278
301
  ])
@@ -280,5 +303,5 @@ const I = { class: "for-transition pd-thin w-100" }, J = { class: "mn-b-thin fle
280
303
  }
281
304
  };
282
305
  export {
283
- He as default
306
+ je as default
284
307
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Loader/Loader.vue.cjs");require("vue-i18n");require("../../../../components/Field/Field.vue2.cjs");const _=require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Tooltip/Tooltip.vue.cjs");const b=require("../sections/MembersAdd.vue.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const v=require("../blocks/User.vue.cjs"),g=require("../../../auth/store/auth.cjs"),a=require("../../store/invites.cjs"),d=require("../../store/memberships.cjs"),h=require("../../store/organizations.cjs"),f=require("../../store/departments.cjs"),k={class:"pd-thin"},q=e.createElementVNode("section",{class:"mn-b-medium radius-medium pd-semi bg-grey"},[e.createElementVNode("h2",{class:"mn-b-regular"},"Members"),e.createElementVNode("p",{class:"t-transp p-big"},"Add new memberships to the group and configure access rights.")],-1),E={class:"mn-b-big radius-medium bg-white"},y={key:0,class:"cols-1 gap-thin"},B={key:1},N={class:"br-grey br-1px br-solid radius-small mn-b-thin flex-nowrap flex-v-center flex pd-medium"},V={class:"w-100 mn-r-small"},w={class:"t-transp"},x={class:"mn-l-medium flex-v-center flex"},M=["onClick"],C={__name:"Members",setup(S){const l=c.useRoute();c.useRouter();const o=e.ref(null),i=e.ref("members");e.onMounted(async()=>{o.value=(await h.actions.read({_id:l.params._id,user:g.state.user._id}))[0],await d.actions.read({target:l.params._id}),await a.actions.read(o.value._id)}),e.computed(()=>{const s=f.state.departments,n=s.flatMap(t=>t.subdepartments.map(r=>r._id));return s.filter(t=>!n.includes(t._id))});async function u(s){await a.actions.create(o.value._id,s)}async function m(s,n){a.state.invites.splice(s,1),await a.actions.delete(n._id)}return(s,n)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("div",k,[q,e.createVNode(b.default,{organization:o.value,onSendInvite:u},null,8,["organization"]),e.createVNode(_.default,{selected:i.value,"onUpdate:selected":n[0]||(n[0]=t=>i.value=t),class:"mn-b-medium bg-grey radius-small",tabs:[{name:"Members",value:"members"},{name:"Invites",value:"invites"}]},null,8,["selected"]),e.createElementVNode("section",E,[i.value==="members"?(e.openBlock(),e.createElementBlock("div",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.state.memberships,(t,r)=>(e.openBlock(),e.createBlock(v.default,{key:r,user:t,onClick:p=>s.$router.push(`/app/profile/${t._id}`),class:"bg-grey radius-small flex-nowrap flex pd-medium"},null,8,["user","onClick"]))),128))])):e.createCommentVNode("",!0),i.value==="invites"?(e.openBlock(),e.createElementBlock("div",B,[e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.state.invites,(t,r)=>(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("span",V,e.toDisplayString(t.invitedEmail)+" "+e.toDisplayString(t.invitedPhone),1),e.createElementVNode("span",w,e.toDisplayString(t.status),1),e.createElementVNode("div",x,[e.createElementVNode("button",{onClick:p=>m(r,t),class:"button-small button"},"×",8,M)])]))),256))])):e.createCommentVNode("",!0)])])]),_:1}))}};exports.default=C;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("vue-router"),c=require("../../../../components/Feed/Feed.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const B=require("../../../../components/Block/Block.vue.cjs"),C=require("../../../../components/Popup/Popup.vue2.cjs"),q=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),M=require("../sections/MembersAdd.vue.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const b=require("../../../users/components/blocks/CardUser.vue.cjs"),N=require("../blocks/CardDepartment.vue.cjs"),m=require("../../../auth/store/auth.cjs"),l=require("../../store/invites.cjs"),p=require("../../store/memberships.cjs"),h=require("../../store/organizations.cjs"),_=require("../../store/departments.cjs"),x={class:"pd-thin"},P={class:"mn-b-big radius-medium bg-white"},V={key:0,class:"cols-1 gap-thin"},z={key:1},E={__name:"Members",setup(F){const o=f.useRoute();f.useRouter();const u=e.ref(null),s=e.ref("members"),d=e.ref(!1);function g(){d.value=!0}function v(){d.value=!1}e.onMounted(async()=>{u.value=(await h.actions.read({_id:o.params._id,user:m.state.user._id}))[0]}),e.computed(()=>{const a=_.state.departments,n=a.flatMap(r=>r.subdepartments.map(t=>t._id));return a.filter(r=>!n.includes(r._id))});async function k(a){await l.actions.create({owner:{type:"Organization",target:u.value._id},creator:{type:"User",target:m.state.user._id},invites:a})}async function y(a,n){confirm("Confirm remove of member")==!0&&(p.state.memberships.splice(a,1),await p.actions.delete(n._id))}async function w(a,n){confirm("Confirm remove of member")==!0&&(l.state.invites.splice(a,1),await l.actions.delete(n._id))}return(a,n)=>(e.openBlock(),e.createElementBlock("div",x,[e.createVNode(q.default,{title:"Members","onUpdate:tabs_current":n[0]||(n[0]=r=>s.value=r),tabs_current:s.value,tabs:[{name:`Members (${h.state.current.numberOfMembers})`,value:"members"},{name:"Departments",value:"departments"},{name:"Invites",value:"invites"}],actions:[{method:g,label:"Invite members"}],class:"mn-b-small bg-grey bg-grey radius-big"},null,8,["tabs_current","tabs","actions"]),e.createVNode(C.default,{title:"Add members",onClosePopup:v,isPopupOpen:d.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createVNode(M.default,{text:"Please enter your email or phone number to send an invitation link:",organization:u.value,onSendInvite:k},null,8,["organization"])]),_:1},8,["isPopupOpen"]),s.value==="departments"?(e.openBlock(),e.createBlock(B.default,{key:0,class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(c.default,{states:{empty:{title:"No Departments Found",description:"Currently, there are no departments available.",action:"Add department",callback:()=>a.$router.push(`/organizations/${e.unref(o).params._id}/departments/create`)}},store:{read:r=>_.actions.read(r),state:null},options:{organization:e.unref(o).params._id,user:m.state.user._id,hidden:!1}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(t,i)=>(e.openBlock(),e.createBlock(N.default,{key:i,department:t,organization:e.unref(o).params._id,class:"radius-big bg-white pos-relative mn-b-thin"},null,8,["department","organization"]))),128))]),_:1},8,["states","store","options"])]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("section",P,[s.value==="members"?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(c.default,{search:!0,states:{empty:{title:"No Members Found",description:"Currently, there are no members."}},store:{read:r=>p.actions.read(r)},options:{target:e.unref(o).params._id},class:"gap-thin cols-1"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(t,i)=>(e.openBlock(),e.createBlock(b.default,{key:i,user:t,_id:t.user._id,photo:t.user.profile.photo,phone:t.user.phone,email:t.user.email,name:t.user.profile.name||"No name",role:t.label||t.role,onClick:I=>a.$router.push(`/profile/${t.user._id}`),action:t.role!=="owner"?{label:"x",method:()=>y(i,t)}:null,class:"w-100 bg-grey radius-big flex-nowrap flex pd-medium"},null,8,["user","_id","photo","phone","email","name","role","onClick","action"]))),128))]),_:1},8,["states","store","options"])])):e.createCommentVNode("",!0),s.value==="invites"?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(c.default,{search:!0,states:{empty:{title:"No Invites Found",description:"Currently, there are no members."}},store:{read:r=>l.actions.read(r)},options:{owner:e.unref(o).params._id},class:"gap-thin cols-1"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,t=>(e.openBlock(),e.createBlock(b.default,{key:a.index,user:{type:"invite"},name:t.email||t.phone,role:t.status,action:{label:"x",method:()=>w(a.index,t)},class:"w-100 bg-grey radius-big flex-nowrap flex pd-medium"},null,8,["name","role","action"]))),128))]),_:1},8,["states","store","options"])])):e.createCommentVNode("",!0)])]))}};exports.default=E;