@ozdao/prometheus-framework 0.2.251 → 0.2.253

Sign up to get free protection for your applications and to get access to all the features.
Files changed (450) hide show
  1. package/dist/auth.server.js +298 -14
  2. package/dist/auth.server.mjs +298 -14
  3. package/dist/builder.js +4 -4
  4. package/dist/builder.mjs +4 -4
  5. package/dist/community.server.js +38 -21
  6. package/dist/community.server.mjs +38 -21
  7. package/dist/events.server.js +38 -18
  8. package/dist/events.server.mjs +38 -17
  9. package/dist/gallery.server.js +17 -4
  10. package/dist/gallery.server.mjs +17 -4
  11. package/dist/organizations.server.js +43 -26
  12. package/dist/organizations.server.mjs +43 -26
  13. package/dist/products.server.js +49 -23
  14. package/dist/products.server.mjs +49 -22
  15. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
  17. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  18. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +1 -1
  19. package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +1 -1
  21. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
  23. package/dist/prometheus-framework/src/modules/auth/auth.client.cjs +15 -3
  24. package/dist/prometheus-framework/src/modules/auth/auth.client.cjs.map +1 -1
  25. package/dist/prometheus-framework/src/modules/auth/auth.client.js +16 -4
  26. package/dist/prometheus-framework/src/modules/auth/auth.client.js.map +1 -1
  27. package/dist/prometheus-framework/src/modules/auth/views/components/blocks/CardUser.vue.cjs +95 -0
  28. package/dist/prometheus-framework/src/modules/auth/views/components/blocks/CardUser.vue.cjs.map +1 -0
  29. package/dist/prometheus-framework/src/modules/auth/views/components/blocks/CardUser.vue.js +95 -0
  30. package/dist/prometheus-framework/src/modules/auth/views/components/blocks/CardUser.vue.js.map +1 -0
  31. package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +2 -2
  32. package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +2 -2
  33. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
  35. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.cjs +284 -0
  38. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.cjs.map +1 -0
  39. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.js +284 -0
  40. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -0
  41. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue2.cjs +2 -0
  42. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue2.cjs.map +1 -0
  43. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue2.js +2 -0
  44. package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue2.js.map +1 -0
  45. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileBlogposts.vue.cjs +85 -0
  46. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileBlogposts.vue.cjs.map +1 -0
  47. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js +85 -0
  48. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js.map +1 -0
  49. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +176 -0
  50. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs.map +1 -0
  51. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.js +176 -0
  52. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.js.map +1 -0
  53. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue2.cjs +2 -0
  54. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue2.cjs.map +1 -0
  55. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue2.js +2 -0
  56. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue2.js.map +1 -0
  57. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +1 -1
  61. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
  63. package/dist/prometheus-framework/src/modules/auth/views/components/sections/FeaturedUsers.vue.cjs +114 -0
  64. package/dist/prometheus-framework/src/modules/auth/views/components/sections/FeaturedUsers.vue.cjs.map +1 -0
  65. package/dist/prometheus-framework/src/modules/auth/views/components/sections/FeaturedUsers.vue.js +114 -0
  66. package/dist/prometheus-framework/src/modules/auth/views/components/sections/FeaturedUsers.vue.js.map +1 -0
  67. package/dist/prometheus-framework/src/modules/auth/views/components/sections/ProfileCompletion.vue.cjs +72 -0
  68. package/dist/prometheus-framework/src/modules/auth/views/components/sections/ProfileCompletion.vue.cjs.map +1 -0
  69. package/dist/prometheus-framework/src/modules/auth/views/components/sections/ProfileCompletion.vue.js +72 -0
  70. package/dist/prometheus-framework/src/modules/auth/views/components/sections/ProfileCompletion.vue.js.map +1 -0
  71. package/dist/prometheus-framework/src/modules/auth/views/router/users.cjs +97 -0
  72. package/dist/prometheus-framework/src/modules/auth/views/router/users.cjs.map +1 -0
  73. package/dist/prometheus-framework/src/modules/auth/views/router/users.js +97 -0
  74. package/dist/prometheus-framework/src/modules/auth/views/router/users.js.map +1 -0
  75. package/dist/prometheus-framework/src/modules/auth/views/store/users.cjs +95 -0
  76. package/dist/prometheus-framework/src/modules/auth/views/store/users.cjs.map +1 -0
  77. package/dist/prometheus-framework/src/modules/auth/views/store/users.js +95 -0
  78. package/dist/prometheus-framework/src/modules/auth/views/store/users.js.map +1 -0
  79. package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.cjs +32 -2
  80. package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.cjs.map +1 -1
  81. package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.js +32 -2
  82. package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.js.map +1 -1
  83. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +2 -2
  84. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs.map +1 -1
  85. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +2 -2
  86. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js.map +1 -1
  87. package/dist/prometheus-framework/src/modules/community/community.client.cjs +42 -7
  88. package/dist/prometheus-framework/src/modules/community/community.client.cjs.map +1 -1
  89. package/dist/prometheus-framework/src/modules/community/community.client.js +59 -24
  90. package/dist/prometheus-framework/src/modules/community/community.client.js.map +1 -1
  91. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  93. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +2 -2
  94. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +2 -2
  95. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +3 -3
  96. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
  97. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +2 -2
  98. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  99. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  101. package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +68 -70
  102. package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs.map +1 -1
  103. package/dist/prometheus-framework/src/modules/community/router/blogposts.js +68 -70
  104. package/dist/prometheus-framework/src/modules/community/router/blogposts.js.map +1 -1
  105. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  107. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  109. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
  110. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  111. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +2 -2
  112. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
  113. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +1 -1
  115. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +1 -1
  117. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js +1 -1
  119. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
  121. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +3 -3
  122. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
  123. package/dist/prometheus-framework/src/modules/gallery/gallery.client.cjs +26 -3
  124. package/dist/prometheus-framework/src/modules/gallery/gallery.client.cjs.map +1 -1
  125. package/dist/prometheus-framework/src/modules/gallery/gallery.client.js +27 -4
  126. package/dist/prometheus-framework/src/modules/gallery/gallery.client.js.map +1 -1
  127. package/dist/prometheus-framework/src/modules/gallery/router/gallery.router.cjs +2 -2
  128. package/dist/prometheus-framework/src/modules/gallery/router/gallery.router.cjs.map +1 -1
  129. package/dist/prometheus-framework/src/modules/gallery/router/gallery.router.js +2 -2
  130. package/dist/prometheus-framework/src/modules/gallery/router/gallery.router.js.map +1 -1
  131. package/dist/prometheus-framework/src/modules/globals/globals.client.cjs.map +1 -1
  132. package/dist/prometheus-framework/src/modules/globals/globals.client.js.map +1 -1
  133. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +2 -2
  134. package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +2 -2
  135. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +2 -2
  136. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +2 -2
  137. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs +2 -2
  138. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js +2 -2
  139. package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
  141. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +2 -2
  142. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  143. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  144. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  145. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  146. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs.map +1 -1
  147. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
  148. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js.map +1 -1
  149. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +4 -4
  150. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs.map +1 -1
  151. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +4 -4
  152. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js.map +1 -1
  153. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +4 -4
  154. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs.map +1 -1
  155. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +4 -4
  156. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js.map +1 -1
  157. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  158. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  159. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  160. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  161. package/dist/prometheus-framework/src/modules/orders/orders.client.cjs +4 -1
  162. package/dist/prometheus-framework/src/modules/orders/orders.client.cjs.map +1 -1
  163. package/dist/prometheus-framework/src/modules/orders/orders.client.js +4 -1
  164. package/dist/prometheus-framework/src/modules/orders/orders.client.js.map +1 -1
  165. package/dist/prometheus-framework/src/modules/orders/store/testimonials.cjs +63 -0
  166. package/dist/prometheus-framework/src/modules/orders/store/testimonials.cjs.map +1 -0
  167. package/dist/prometheus-framework/src/modules/orders/store/testimonials.js +63 -0
  168. package/dist/prometheus-framework/src/modules/orders/store/testimonials.js.map +1 -0
  169. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +2 -2
  170. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs.map +1 -1
  171. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +2 -2
  172. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js.map +1 -1
  173. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  174. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs.map +1 -1
  175. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  176. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js.map +1 -1
  177. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  178. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  179. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  180. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs.map +1 -1
  181. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
  182. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js.map +1 -1
  183. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +5 -5
  184. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs.map +1 -1
  185. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +5 -5
  186. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js.map +1 -1
  187. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +2 -2
  188. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs.map +1 -1
  189. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  190. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js.map +1 -1
  191. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs.map +1 -1
  192. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js.map +1 -1
  193. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +3 -3
  194. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  195. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +3 -3
  196. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  197. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
  198. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +1 -1
  199. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +4 -4
  200. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs.map +1 -1
  201. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +4 -4
  202. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js.map +1 -1
  203. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +3 -3
  204. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  205. package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +60 -11
  206. package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs.map +1 -1
  207. package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +95 -46
  208. package/dist/prometheus-framework/src/modules/organizations/organizations.client.js.map +1 -1
  209. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +6 -10
  210. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs.map +1 -1
  211. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +8 -12
  212. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js.map +1 -1
  213. package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +786 -773
  214. package/dist/prometheus-framework/src/modules/pages/pages.client.js +786 -773
  215. package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.cjs +2 -2
  216. package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.js +2 -2
  217. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
  218. package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +1 -1
  219. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +2 -2
  220. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +2 -2
  221. package/dist/prometheus-framework/src/modules/pages/views/store/pages.cjs +5 -7
  222. package/dist/prometheus-framework/src/modules/pages/views/store/pages.cjs.map +1 -1
  223. package/dist/prometheus-framework/src/modules/pages/views/store/pages.js +1 -3
  224. package/dist/prometheus-framework/src/modules/pages/views/store/pages.js.map +1 -1
  225. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  226. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  227. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
  228. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.js +1 -1
  229. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  230. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  231. package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.cjs +178 -0
  232. package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.cjs.map +1 -0
  233. package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.js +178 -0
  234. package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.js.map +1 -0
  235. package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.cjs +62 -0
  236. package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.cjs.map +1 -0
  237. package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.js +62 -0
  238. package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.js.map +1 -0
  239. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  240. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  241. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +2 -2
  242. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  243. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +2 -2
  244. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
  245. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +2 -2
  246. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  247. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +3 -3
  248. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +3 -3
  249. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +2 -2
  250. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs.map +1 -1
  251. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +2 -2
  252. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js.map +1 -1
  253. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +3 -3
  254. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
  255. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  256. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs.map +1 -1
  257. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  258. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js.map +1 -1
  259. package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.cjs +156 -0
  260. package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.cjs.map +1 -0
  261. package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.js +157 -0
  262. package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.js.map +1 -0
  263. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.cjs +1 -1
  264. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.cjs.map +1 -1
  265. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.js +1 -1
  266. package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.js.map +1 -1
  267. package/dist/prometheus-framework/src/modules/products/components/sections/MenuSection.vue.cjs +128 -0
  268. package/dist/prometheus-framework/src/modules/products/components/sections/MenuSection.vue.cjs.map +1 -0
  269. package/dist/prometheus-framework/src/modules/products/components/sections/MenuSection.vue.js +128 -0
  270. package/dist/prometheus-framework/src/modules/products/components/sections/MenuSection.vue.js.map +1 -0
  271. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +2 -2
  272. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs.map +1 -1
  273. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +2 -2
  274. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js.map +1 -1
  275. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  276. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  277. package/dist/prometheus-framework/src/modules/products/products.client.cjs +74 -7
  278. package/dist/prometheus-framework/src/modules/products/products.client.cjs.map +1 -1
  279. package/dist/prometheus-framework/src/modules/products/products.client.js +114 -47
  280. package/dist/prometheus-framework/src/modules/products/products.client.js.map +1 -1
  281. package/dist/prometheus-framework/src/modules/products/router/marketplace.router.cjs +46 -0
  282. package/dist/prometheus-framework/src/modules/products/router/marketplace.router.cjs.map +1 -0
  283. package/dist/prometheus-framework/src/modules/products/router/marketplace.router.js +46 -0
  284. package/dist/prometheus-framework/src/modules/products/router/marketplace.router.js.map +1 -0
  285. package/dist/prometheus-framework/src/modules/products/router/products.router.cjs +79 -36
  286. package/dist/prometheus-framework/src/modules/products/router/products.router.cjs.map +1 -1
  287. package/dist/prometheus-framework/src/modules/products/router/products.router.js +78 -35
  288. package/dist/prometheus-framework/src/modules/products/router/products.router.js.map +1 -1
  289. package/dist/prometheus-framework/src/modules/products/store/marketplace.cjs +57 -0
  290. package/dist/prometheus-framework/src/modules/products/store/marketplace.cjs.map +1 -0
  291. package/dist/prometheus-framework/src/modules/products/store/marketplace.js +57 -0
  292. package/dist/prometheus-framework/src/modules/products/store/marketplace.js.map +1 -0
  293. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +3 -3
  294. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
  295. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  296. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
  297. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  298. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs.map +1 -1
  299. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
  300. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js.map +1 -1
  301. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +3 -3
  302. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs.map +1 -1
  303. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +3 -3
  304. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js.map +1 -1
  305. package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.cjs +2 -2
  306. package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.cjs.map +1 -1
  307. package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.js +2 -2
  308. package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.js.map +1 -1
  309. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +3 -3
  310. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +3 -3
  311. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +2 -2
  312. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  313. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  314. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
  315. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  316. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
  317. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +3 -3
  318. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
  319. package/package.json +1 -1
  320. package/src/builder/webpack/webpack.config.client.js +2 -2
  321. package/src/builder/webpack/webpack.config.server.js +1 -1
  322. package/src/builder/webpack/webpack.config.spa.js +1 -1
  323. package/src/builder/webpack/webpack.config.ssr.js +1 -1
  324. package/src/modules/auth/auth.client.js +16 -3
  325. package/src/modules/auth/auth.server.js +22 -1
  326. package/src/modules/{users → auth/controllers}/routes/users.routes.js +1 -1
  327. package/src/modules/auth/controllers/services/auth.service.js +0 -1
  328. package/src/modules/{users → auth/views}/components/pages/Profile.vue +1 -1
  329. package/src/modules/{users → auth/views}/components/pages/ProfileEdit.vue +2 -2
  330. package/src/modules/{users → auth/views}/components/sections/FeaturedUsers.vue +2 -2
  331. package/src/modules/auth/views/router/users.js +79 -0
  332. package/src/modules/backoffice/backoffice.client.js +53 -11
  333. package/src/modules/backoffice/router/backoffice.js +29 -2
  334. package/src/modules/community/community.client.js +56 -10
  335. package/src/modules/community/community.server.js +35 -14
  336. package/src/modules/community/models/comment.model.js +7 -7
  337. package/src/modules/community/models/reaction.model.js +5 -5
  338. package/src/modules/community/router/blogposts.js +55 -57
  339. package/src/modules/events/events.server.js +37 -16
  340. package/src/modules/events/models/ticket.model.js +6 -6
  341. package/src/modules/gallery/gallery.client.js +44 -8
  342. package/src/modules/gallery/gallery.server.js +28 -9
  343. package/src/modules/gallery/router/gallery.router.js +2 -2
  344. package/src/modules/globals/globals.client.js +15 -14
  345. package/src/modules/governance/controllers/factories/initiatives.controller.js +94 -0
  346. package/src/modules/governance/controllers/factories/tasks.controller.js +94 -0
  347. package/src/modules/governance/controllers/factories/votes.controller.js +68 -0
  348. package/src/modules/governance/controllers/factories/votings.controller.js +112 -0
  349. package/src/modules/governance/controllers/routes/initiatives.routes.js +13 -0
  350. package/src/modules/governance/controllers/routes/tasks.routes.js +13 -0
  351. package/src/modules/governance/controllers/routes/votes.routes.js +11 -0
  352. package/src/modules/governance/controllers/routes/votings.routes.js +14 -0
  353. package/src/modules/governance/models/initiative.model.js +25 -0
  354. package/src/modules/governance/models/task.model.js +21 -0
  355. package/src/modules/governance/models/vote.model.js +20 -0
  356. package/src/modules/governance/models/voting.model.js +22 -0
  357. package/src/modules/governance/views/components/blocks/CardInitiativeItem.vue +18 -0
  358. package/src/modules/governance/views/components/blocks/CardTaskItem.vue +19 -0
  359. package/src/modules/governance/views/components/blocks/CardVotingItem.vue +18 -0
  360. package/src/modules/governance/views/components/pages/Initiative.vue +22 -0
  361. package/src/modules/governance/views/components/pages/InitiativeCreate.vue +24 -0
  362. package/src/modules/governance/views/components/pages/Initiatives.vue +19 -0
  363. package/src/modules/governance/views/components/pages/Task.vue +23 -0
  364. package/src/modules/governance/views/components/pages/TaskCreate.vue +25 -0
  365. package/src/modules/governance/views/components/pages/Tasks.vue +19 -0
  366. package/src/modules/governance/views/components/pages/Voting.vue +30 -0
  367. package/src/modules/governance/views/components/pages/VotingCreate.vue +25 -0
  368. package/src/modules/governance/views/components/pages/Votings.vue +19 -0
  369. package/src/modules/governance/views/components/partials/RewardDisplay.vue +19 -0
  370. package/src/modules/governance/views/components/partials/VoteDisplay.vue +21 -0
  371. package/src/modules/governance/views/components/partials/VotingResult.vue +21 -0
  372. package/src/modules/governance/views/components/sections/FormInitiativeDetails.vue +37 -0
  373. package/src/modules/governance/views/components/sections/FormTaskDetails.vue +41 -0
  374. package/src/modules/governance/views/components/sections/FormVotingDetails.vue +37 -0
  375. package/src/modules/governance/views/components/sections/VoteForm.vue +29 -0
  376. package/src/modules/governance/views/store/initiatives.js +102 -0
  377. package/src/modules/governance/views/store/tasks.js +104 -0
  378. package/src/modules/governance/views/store/votes.js +115 -0
  379. package/src/modules/governance/views/store/votings.js +81 -0
  380. package/src/modules/orders/components/pages/OrderCreate.vue +1 -1
  381. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +1 -1
  382. package/src/modules/orders/components/sections/FormAddCustomer.vue +2 -2
  383. package/src/modules/orders/orders.client.js +4 -1
  384. package/src/modules/orders/orders.server.js +1 -0
  385. package/src/modules/organizations/components/blocks/CardDepartment.vue +1 -1
  386. package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
  387. package/src/modules/organizations/components/pages/Department.vue +1 -1
  388. package/src/modules/organizations/components/pages/DepartmentEdit.vue +1 -1
  389. package/src/modules/organizations/components/pages/Members.vue +1 -1
  390. package/src/modules/organizations/components/pages/Organization.vue +1 -1
  391. package/src/modules/organizations/components/sections/MembersAdd.vue +2 -2
  392. package/src/modules/organizations/controllers/organizations.controller.js +0 -2
  393. package/src/modules/organizations/models/department.model.js +7 -7
  394. package/src/modules/organizations/models/membership.model.js +5 -5
  395. package/src/modules/organizations/organizations.client.js +71 -16
  396. package/src/modules/organizations/organizations.server.js +43 -18
  397. package/src/modules/organizations/router/organizations.js +6 -13
  398. package/src/modules/pages/views/store/pages.js +1 -3
  399. package/src/modules/{marketplace → products}/components/layouts/Marketplace.vue +19 -19
  400. package/src/modules/{marketplace → products}/components/pages/Catalog.vue +0 -2
  401. package/src/modules/products/components/pages/Products.vue +2 -2
  402. package/src/modules/products/components/sections/FilterProducts.vue +1 -1
  403. package/src/modules/{marketplace → products}/components/sections/Filters.vue +12 -15
  404. package/src/modules/products/components/sections/HeroRecommendation.vue +1 -1
  405. package/src/modules/products/components/sections/MenuSection.vue +8 -9
  406. package/src/modules/products/components/sections/PopularProducts.vue +1 -1
  407. package/src/modules/products/models/category.model.js +3 -3
  408. package/src/modules/products/models/product.model.js +7 -7
  409. package/src/modules/products/products.client.js +95 -27
  410. package/src/modules/products/products.server.js +47 -16
  411. package/src/modules/products/router/marketplace.router.js +38 -0
  412. package/src/modules/products/router/products.router.js +72 -32
  413. package/src/modules/spots/components/layouts/Spots.vue +1 -1
  414. package/src/modules/spots/components/pages/Map.vue +1 -1
  415. package/src/modules/spots/components/pages/Spot.vue +1 -1
  416. package/src/modules/backoffice/router/admin.js +0 -51
  417. package/src/modules/landing/components/pages/404.vue +0 -3
  418. package/src/modules/landing/components/pages/Farming.vue +0 -226
  419. package/src/modules/landing/components/pages/Governance.vue +0 -144
  420. package/src/modules/landing/components/pages/Home.vue +0 -51
  421. package/src/modules/landing/components/pages/Hotel.vue +0 -43
  422. package/src/modules/landing/router/landing.js +0 -39
  423. package/src/modules/legal/components/pages/Legal.vue +0 -62
  424. package/src/modules/legal/components/pages/legal/Cookies.vue +0 -370
  425. package/src/modules/legal/components/pages/legal/EULA.vue +0 -2145
  426. package/src/modules/legal/components/pages/legal/Privacy.vue +0 -4284
  427. package/src/modules/legal/components/pages/legal/Terms.vue +0 -1283
  428. package/src/modules/legal/legal.client.js +0 -18
  429. package/src/modules/legal/router/legal.js +0 -59
  430. package/src/modules/marketplace/router/marketplace.js +0 -55
  431. package/src/modules/users/router/users.js +0 -90
  432. package/src/modules/users/users.client.js +0 -22
  433. package/src/modules/users/users.server.js +0 -13
  434. /package/src/modules/{users → auth/controllers}/middlewares/visitor.logger.js +0 -0
  435. /package/src/modules/{users/controllers/users.controller.js → auth/controllers/services/users.service.js} +0 -0
  436. /package/src/modules/{users → auth}/models/request.model.js +0 -0
  437. /package/src/modules/{users → auth}/models/user.model.js +0 -0
  438. /package/src/modules/{users → auth}/models/visitor.model.js +0 -0
  439. /package/src/modules/{users → auth/views}/components/blocks/CardUser.vue +0 -0
  440. /package/src/modules/{users → auth/views}/components/pages/ProfileBlogposts.vue +0 -0
  441. /package/src/modules/{users → auth/views}/components/pages/ProfileComments.vue +0 -0
  442. /package/src/modules/{users → auth/views}/components/pages/ProfileLikes.vue +0 -0
  443. /package/src/modules/{users → auth/views}/components/sections/ProfileCompletion.vue +0 -0
  444. /package/src/modules/{users → auth/views}/router/account.js +0 -0
  445. /package/src/modules/{users → auth/views}/store/users.js +0 -0
  446. /package/src/modules/{projects/controller → governance/controllers/factories}/projects.controller.js +0 -0
  447. /package/src/modules/{projects → governance/controllers}/routes/projects.routes.js +0 -0
  448. /package/src/modules/{projects → governance}/models/project.model.js +0 -0
  449. /package/src/modules/{projects → governance/views}/store/projects.js +0 -0
  450. /package/src/modules/{marketplace → products}/store/marketplace.js +0 -0
@@ -121,7 +121,7 @@ const _sfc_main = {
121
121
  createElementVNode("div", _hoisted_14, [
122
122
  (openBlock(true), createElementBlock(Fragment, null, renderList(__props.organization.products.slice(0, 5), (product) => {
123
123
  return openBlock(), createBlock(_sfc_main$4, {
124
- onClick: withModifiers(($event) => _ctx.$router.push({ name: "Product Organization", params: { _id: __props.organization._id, product: product._id } }), ["stop"]),
124
+ onClick: withModifiers(($event) => _ctx.$router.push({ name: "Organization_Product", params: { _id: __props.organization._id, product: product._id } }), ["stop"]),
125
125
  key: product._id,
126
126
  editable: false,
127
127
  product,
@@ -1 +1 @@
1
- {"version":3,"file":"CardOrganization.vue.js","sources":["../../../../../../../src/modules/organizations/components/blocks/CardOrganization.vue"],"sourcesContent":["<template>\n <div \n class=\"o-hidden pos-relative cursor-pointer bg-light pd-small\"\n @click=\"$router.push({name: 'Organization', params: {_id: organization._id}})\"\n >\n <div class=\"flex pos-relative\">\n\n <img loading=\"lazy\" \n v-if=\"organization.profile.photo && organization.profile.photo.length > 0\"\n :src=\"(FILE_SERVER_URL || '') + organization.profile.photo\" \n class=\"h-4r w-4r radius-extra bg-white\" \n />\n\n <PlaceholderOrganizationPic\n v-else\n class=\"h-4r w-4r\"\n />\n \n <div class=\"pos-relative w-100 flex-h-center flex flex-column flex-child-1 flex-child mn-l-thin w-100\">\n \n <!-- <Text :text=\"organization.profile.name ? organization.profile.name : ''\" :maxLen=\"18\" class=\"h3 d-block\"/> -->\n <p class=\"h4 t-truncate\">{{organization.profile.name}}</p>\n <!-- RATING -->\n <!-- <div v-if=\"showRating && organization.rating\" class=\"w-max star-container flex-v-center flex\">\n <img loading=\"lazy\" \n v-for=\"i in 5\"\n class=\"i-small mn-r-thin\"\n :src=\"i <= organization.rating.median ? '/icons/star.svg' : '/icons/star-stroke.svg'\"\n >\n\n <span class=\"p-small t-semi mn-r-thin\">{{organization.rating.median}}</span>\n <span class=\"p-small\">({{organization.rating.amount}})</span>\n </div> -->\n\n <Chips \n v-if=\"showTags && organization.profile.tags?.length > 0\" \n :chips=\"organization.profile.tags.slice(0,3)\"\n class=\"pos-relative p-small\"\n />\n\n <div v-if=\"showFollowers\" class=\"flex-center gap-thin pd-r-thin pd-l-thin flex-nowrap flex mn-t-thin bg-white radius-extra w-max\">\n <p class=\"mn-t-thin mn-b-thin\">{{organization.numberOfSubscribers}} followers</p>\n\n <ButtonToggleMembership\n v-if=\"\n user?._id \n && organization.owner !== user._id\n \"\n :user=\"user._id\"\n :type=\"'organization'\" \n :role=\"'subscriber'\" \n :target=\"organization._id\" \n :status=\"organization.isSubscriber\" \n :text=\"{create: '+', remove: '-'}\"\n @updateMembership=\"event => emits('updateMembership', event, 'isSubscriber', 'numberOfSubscribers')\"\n class=\"i-semi\" \n />\n </div>\n\n </div>\n\n </div>\n\n\n <div \n v-if=\"showProducts\" \n class=\"mn-b-small mn-t-small w-100 flex-nowrap flex flex-v-center pd-small bg-white radius-medium\"\n >\n <IconTime class=\"i-medium mn-r-micro\"/>\n <span class=\"mn-r-thin\">{{\n organization.distance ? \n organization.distance > 50 ? \n '3-5 days' : \n Math.ceil((5 + 5 + 3 * organization.distance) / 5) * 5 \n + '-' \n + Math.ceil((15 + 5 + 3 * organization.distance) / 5) * 5 \n + ' MIN' : 'Unavailable' \n }} \n </span>\n <span v-if=\"organization.distance && organization.distance < 50\" class=\"t-transp mn-r-thin\">|</span>\n <span v-if=\"organization.distance && organization.distance < 50\" class=\"mn-r-thin\">{{organization.distance ? organization.distance.toFixed(1) + ' KM' : ''}} </span>\n <!-- <span class=\"mn-r-thin\">{{organization.nearestSpotDistance}}</span> -->\n <IconPrice class=\"i-medium mn-r-micro\"/>\n <span class=\"mn-r-thin\">{{returnCurrency()}}500 </span>\n <IconShopcart class=\"i-medium mn-r-micro\"/>\n <span class=\"mn-r-thin\"> {{organization.products.length}} products</span>\n </div>\n\n <div v-if=\"showProducts && organization.products.length > 0\" class=\"w-100 o-scroll radius-medium\">\n <div class=\"w-max flex-nowrap flex gap-thin\">\n <CardOrderItem \n @click.stop=\"$router.push({name: 'Product Organization', params: {_id: organization._id, product: product._id}})\" \n v-for=\"product in organization.products.slice(0,5)\" \n :key=\"product._id\" \n :editable=\"false\" \n :product=\"product\" \n class=\"pd-thin w-15r radius-medium bg-white\"\n \n />\n <button class=\"pd-thin w-15r radius-medium bg-main button\">\n View menu\n </button>\n </div>\n </div>\n\n </div>\n</template>\n\n<script setup>\n import { ref } from 'vue'\n import { useRouter } from 'vue-router'\n import CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue';\n\n import Text from '@pf/src/components/Text/Text.vue'\n import Chips from '@pf/src/components/Chips/Chips.vue'\n\n import PlaceholderOrganizationPic from '@pf/src/modules/icons/placeholders/PlaceholderOrganizationPic.vue'\n\n import IconPrice from '@pf/src/modules/icons/entities/IconPrice.vue'\n import IconShopcart from '@pf/src/modules/icons/entities/IconShopcart.vue'\n import IconTime from '@pf/src/modules/icons/entities/IconTime.vue'\n\n import ButtonToggleMembership from '@pf/src/modules/organizations/components/elements/ButtonToggleMembership.vue'\n\n const props = defineProps({\n // Model\n user: String,\n organization: Object,\n // View\n showProducts: {\n type: Boolean,\n default: false\n },\n showFollowers: {\n type: Boolean,\n default: true\n },\n showRating: {\n type: Boolean,\n default: false\n },\n showFeatured: {\n type: Boolean,\n default: true\n },\n showTags: {\n type: Boolean,\n default: true\n },\n });\n\n const emits = defineEmits(['updateMembership'])\n\n const router = useRouter();\n</script>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuJE,UAAM,QAAQ;AAEC,cAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CardOrganization.vue.js","sources":["../../../../../../../src/modules/organizations/components/blocks/CardOrganization.vue"],"sourcesContent":["<template>\n <div \n class=\"o-hidden pos-relative cursor-pointer bg-light pd-small\"\n @click=\"$router.push({name: 'Organization', params: {_id: organization._id}})\"\n >\n <div class=\"flex pos-relative\">\n\n <img loading=\"lazy\" \n v-if=\"organization.profile.photo && organization.profile.photo.length > 0\"\n :src=\"(FILE_SERVER_URL || '') + organization.profile.photo\" \n class=\"h-4r w-4r radius-extra bg-white\" \n />\n\n <PlaceholderOrganizationPic\n v-else\n class=\"h-4r w-4r\"\n />\n \n <div class=\"pos-relative w-100 flex-h-center flex flex-column flex-child-1 flex-child mn-l-thin w-100\">\n \n <!-- <Text :text=\"organization.profile.name ? organization.profile.name : ''\" :maxLen=\"18\" class=\"h3 d-block\"/> -->\n <p class=\"h4 t-truncate\">{{organization.profile.name}}</p>\n <!-- RATING -->\n <!-- <div v-if=\"showRating && organization.rating\" class=\"w-max star-container flex-v-center flex\">\n <img loading=\"lazy\" \n v-for=\"i in 5\"\n class=\"i-small mn-r-thin\"\n :src=\"i <= organization.rating.median ? '/icons/star.svg' : '/icons/star-stroke.svg'\"\n >\n\n <span class=\"p-small t-semi mn-r-thin\">{{organization.rating.median}}</span>\n <span class=\"p-small\">({{organization.rating.amount}})</span>\n </div> -->\n\n <Chips \n v-if=\"showTags && organization.profile.tags?.length > 0\" \n :chips=\"organization.profile.tags.slice(0,3)\"\n class=\"pos-relative p-small\"\n />\n\n <div v-if=\"showFollowers\" class=\"flex-center gap-thin pd-r-thin pd-l-thin flex-nowrap flex mn-t-thin bg-white radius-extra w-max\">\n <p class=\"mn-t-thin mn-b-thin\">{{organization.numberOfSubscribers}} followers</p>\n\n <ButtonToggleMembership\n v-if=\"\n user?._id \n && organization.owner !== user._id\n \"\n :user=\"user._id\"\n :type=\"'organization'\" \n :role=\"'subscriber'\" \n :target=\"organization._id\" \n :status=\"organization.isSubscriber\" \n :text=\"{create: '+', remove: '-'}\"\n @updateMembership=\"event => emits('updateMembership', event, 'isSubscriber', 'numberOfSubscribers')\"\n class=\"i-semi\" \n />\n </div>\n\n </div>\n\n </div>\n\n\n <div \n v-if=\"showProducts\" \n class=\"mn-b-small mn-t-small w-100 flex-nowrap flex flex-v-center pd-small bg-white radius-medium\"\n >\n <IconTime class=\"i-medium mn-r-micro\"/>\n <span class=\"mn-r-thin\">{{\n organization.distance ? \n organization.distance > 50 ? \n '3-5 days' : \n Math.ceil((5 + 5 + 3 * organization.distance) / 5) * 5 \n + '-' \n + Math.ceil((15 + 5 + 3 * organization.distance) / 5) * 5 \n + ' MIN' : 'Unavailable' \n }} \n </span>\n <span v-if=\"organization.distance && organization.distance < 50\" class=\"t-transp mn-r-thin\">|</span>\n <span v-if=\"organization.distance && organization.distance < 50\" class=\"mn-r-thin\">{{organization.distance ? organization.distance.toFixed(1) + ' KM' : ''}} </span>\n <!-- <span class=\"mn-r-thin\">{{organization.nearestSpotDistance}}</span> -->\n <IconPrice class=\"i-medium mn-r-micro\"/>\n <span class=\"mn-r-thin\">{{returnCurrency()}}500 </span>\n <IconShopcart class=\"i-medium mn-r-micro\"/>\n <span class=\"mn-r-thin\"> {{organization.products.length}} products</span>\n </div>\n\n <div v-if=\"showProducts && organization.products.length > 0\" class=\"w-100 o-scroll radius-medium\">\n <div class=\"w-max flex-nowrap flex gap-thin\">\n <CardOrderItem \n @click.stop=\"$router.push({name: 'Organization_Product', params: {_id: organization._id, product: product._id}})\" \n v-for=\"product in organization.products.slice(0,5)\" \n :key=\"product._id\" \n :editable=\"false\" \n :product=\"product\" \n class=\"pd-thin w-15r radius-medium bg-white\"\n \n />\n <button class=\"pd-thin w-15r radius-medium bg-main button\">\n View menu\n </button>\n </div>\n </div>\n\n </div>\n</template>\n\n<script setup>\n import { ref } from 'vue'\n import { useRouter } from 'vue-router'\n import CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue';\n\n import Text from '@pf/src/components/Text/Text.vue'\n import Chips from '@pf/src/components/Chips/Chips.vue'\n\n import PlaceholderOrganizationPic from '@pf/src/modules/icons/placeholders/PlaceholderOrganizationPic.vue'\n\n import IconPrice from '@pf/src/modules/icons/entities/IconPrice.vue'\n import IconShopcart from '@pf/src/modules/icons/entities/IconShopcart.vue'\n import IconTime from '@pf/src/modules/icons/entities/IconTime.vue'\n\n import ButtonToggleMembership from '@pf/src/modules/organizations/components/elements/ButtonToggleMembership.vue'\n\n const props = defineProps({\n // Model\n user: String,\n organization: Object,\n // View\n showProducts: {\n type: Boolean,\n default: false\n },\n showFollowers: {\n type: Boolean,\n default: true\n },\n showRating: {\n type: Boolean,\n default: false\n },\n showFeatured: {\n type: Boolean,\n default: true\n },\n showTags: {\n type: Boolean,\n default: true\n },\n });\n\n const emits = defineEmits(['updateMembership'])\n\n const router = useRouter();\n</script>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuJE,UAAM,QAAQ;AAEC,cAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const vue = require("vue");
4
- const Button = require("../../../../components/Button/Button.vue.cjs");
4
+ const Button = require("../../../../components/Button/Button.vue2.cjs");
5
5
  require("../../../auth/views/store/auth.cjs");
6
6
  const memberships = require("../../store/memberships.cjs");
7
7
  const _sfc_main = {
@@ -1,5 +1,5 @@
1
1
  import { openBlock, createBlock, withCtx, createTextVNode, toDisplayString } from "vue";
2
- import _sfc_main$1 from "../../../../components/Button/Button.vue.js";
2
+ import _sfc_main$1 from "../../../../components/Button/Button.vue2.js";
3
3
  import "../../../auth/views/store/auth.js";
4
4
  import { actions } from "../../store/memberships.js";
5
5
  const _sfc_main = {
@@ -4,7 +4,7 @@ const vue = require("vue");
4
4
  const vueRouter = require("vue-router");
5
5
  ;/* empty css */
6
6
  const DepartmentSub = require("../blocks/DepartmentSub.vue.cjs");
7
- const CardUser = require("../../../users/components/blocks/CardUser.vue.cjs");
7
+ const CardUser = require("../../../auth/views/components/blocks/CardUser.vue.cjs");
8
8
  const departments = require("../../store/departments.cjs");
9
9
  const IconEdit = require("../../../icons/navigation/IconEdit.vue.cjs");
10
10
  const _hoisted_1 = { class: "for-transition w-100" };
@@ -1 +1 @@
1
- {"version":3,"file":"Department.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/pages/Department.vue"],"sourcesContent":["<template>\n <div class=\"for-transition w-100\">\n \n <div v-if=\"departments.state.department\" id=\"dash\" class=\"pd-medium bg-light\">\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <div class=\"flex-nowrap flex mn-b-small\">\n\n <h2 class=\"w-100\">{{ departments.state.department.profile.name }}</h2>\n\n <router-link \n :to=\"{\n name: 'Department Edit', \n params: {\n _id: route.params._id,\n department: route.params.department\n }\n }\" \n class=\"\n cursor-pointer \n pos-absolute pos-t-regular pos-r-regular\n radius-extra pd-thin bg-second\n \"\n >\n <IconEdit\n class=\"i-regular\"\n classes=\"fill-white\"\n />\n </router-link>\n\n </div>\n <p class=\"t-transp p-big\" v-html=\"departments.state.department.description\"></p>\n </section>\n\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <h3 class=\"mn-b-regular\">Команда</h3>\n <ul>\n <li v-if=\"departments.state.department.members.length < 1\">В отделе еще нет участников</li>\n <User \n class=\"br-b br-solid br-grey-transp-25\" \n v-for=\"(member, index) in departments.state.department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n @click=\"$router.push(`/app/profile/${member.user._id}`)\" \n />\n </ul>\n </section>\n\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <h3 class=\"mn-b-regular\">Подотделы</h3>\n <ul>\n <li v-if=\"departments.state.department.subdepartments.length < 1\">В отделе еще нет подотделов</li>\n <DepartmentSub v-for=\"(subdepartment, index) in departments.state.department.subdepartments\" @click=\"$router.push(`/app/organization/departments/${subdepartment._id}`)\" :key=\"index\" class=\"br-b br-solid br-grey-transp-25\" :department=\"subdepartment\" />\n </ul> \n </section>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { useRoute, useRouter } from 'vue-router';\n\nimport Spoiler from '@pf/src/components/Spoiler/Spoiler.vue';\nimport DepartmentSub from '@pf/src/modules/organizations/components/blocks/DepartmentSub.vue';\nimport User from '@pf/src/modules/users/components/blocks/CardUser.vue';\nimport * as departments from '@pf/src/modules/organizations/store/departments';\n\nimport IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'\n\nconst router = useRouter();\nconst route = useRoute();\n\nawait departments.actions.readOne(route.params.department);\n</script>\n\n<style scoped>\n</style>\n"],"names":["useRouter","useRoute","_withAsyncContext","departments.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEeA,cAAAA,UAAY;AAC3B,UAAM,QAAQC,UAAQ,SAAA;AAEtB,IAAM,CAAA,QAAA,SAAA,IAAAC,qBAAA,MAAAC,oBAAoB,QAAQ,MAAM,OAAO,UAAU,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Department.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/pages/Department.vue"],"sourcesContent":["<template>\n <div class=\"for-transition w-100\">\n \n <div v-if=\"departments.state.department\" id=\"dash\" class=\"pd-medium bg-light\">\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <div class=\"flex-nowrap flex mn-b-small\">\n\n <h2 class=\"w-100\">{{ departments.state.department.profile.name }}</h2>\n\n <router-link \n :to=\"{\n name: 'Department Edit', \n params: {\n _id: route.params._id,\n department: route.params.department\n }\n }\" \n class=\"\n cursor-pointer \n pos-absolute pos-t-regular pos-r-regular\n radius-extra pd-thin bg-second\n \"\n >\n <IconEdit\n class=\"i-regular\"\n classes=\"fill-white\"\n />\n </router-link>\n\n </div>\n <p class=\"t-transp p-big\" v-html=\"departments.state.department.description\"></p>\n </section>\n\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <h3 class=\"mn-b-regular\">Команда</h3>\n <ul>\n <li v-if=\"departments.state.department.members.length < 1\">В отделе еще нет участников</li>\n <User \n class=\"br-b br-solid br-grey-transp-25\" \n v-for=\"(member, index) in departments.state.department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n @click=\"$router.push(`/app/profile/${member.user._id}`)\" \n />\n </ul>\n </section>\n\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <h3 class=\"mn-b-regular\">Подотделы</h3>\n <ul>\n <li v-if=\"departments.state.department.subdepartments.length < 1\">В отделе еще нет подотделов</li>\n <DepartmentSub v-for=\"(subdepartment, index) in departments.state.department.subdepartments\" @click=\"$router.push(`/app/organization/departments/${subdepartment._id}`)\" :key=\"index\" class=\"br-b br-solid br-grey-transp-25\" :department=\"subdepartment\" />\n </ul> \n </section>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { useRoute, useRouter } from 'vue-router';\n\nimport Spoiler from '@pf/src/components/Spoiler/Spoiler.vue';\nimport DepartmentSub from '@pf/src/modules/organizations/components/blocks/DepartmentSub.vue';\nimport User from '@pf/src/modules/auth/views/components/blocks/CardUser.vue';\nimport * as departments from '@pf/src/modules/organizations/store/departments';\n\nimport IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'\n\nconst router = useRouter();\nconst route = useRoute();\n\nawait departments.actions.readOne(route.params.department);\n</script>\n\n<style scoped>\n</style>\n"],"names":["useRouter","useRoute","_withAsyncContext","departments.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEeA,cAAAA,UAAY;AAC3B,UAAM,QAAQC,UAAQ,SAAA;AAEtB,IAAM,CAAA,QAAA,SAAA,IAAAC,qBAAA,MAAAC,oBAAoB,QAAQ,MAAM,OAAO,UAAU,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@ import { withAsyncContext, resolveComponent, openBlock, createElementBlock, crea
2
2
  import { useRouter, useRoute } from "vue-router";
3
3
  /* empty css */
4
4
  import DepartmentSub from "../blocks/DepartmentSub.vue.js";
5
- import _sfc_main$2 from "../../../users/components/blocks/CardUser.vue.js";
5
+ import _sfc_main$2 from "../../../auth/views/components/blocks/CardUser.vue.js";
6
6
  import { actions, state } from "../../store/departments.js";
7
7
  import _sfc_main$1 from "../../../icons/navigation/IconEdit.vue.js";
8
8
  const _hoisted_1 = { class: "for-transition w-100" };
@@ -1 +1 @@
1
- {"version":3,"file":"Department.vue.js","sources":["../../../../../../../src/modules/organizations/components/pages/Department.vue"],"sourcesContent":["<template>\n <div class=\"for-transition w-100\">\n \n <div v-if=\"departments.state.department\" id=\"dash\" class=\"pd-medium bg-light\">\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <div class=\"flex-nowrap flex mn-b-small\">\n\n <h2 class=\"w-100\">{{ departments.state.department.profile.name }}</h2>\n\n <router-link \n :to=\"{\n name: 'Department Edit', \n params: {\n _id: route.params._id,\n department: route.params.department\n }\n }\" \n class=\"\n cursor-pointer \n pos-absolute pos-t-regular pos-r-regular\n radius-extra pd-thin bg-second\n \"\n >\n <IconEdit\n class=\"i-regular\"\n classes=\"fill-white\"\n />\n </router-link>\n\n </div>\n <p class=\"t-transp p-big\" v-html=\"departments.state.department.description\"></p>\n </section>\n\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <h3 class=\"mn-b-regular\">Команда</h3>\n <ul>\n <li v-if=\"departments.state.department.members.length < 1\">В отделе еще нет участников</li>\n <User \n class=\"br-b br-solid br-grey-transp-25\" \n v-for=\"(member, index) in departments.state.department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n @click=\"$router.push(`/app/profile/${member.user._id}`)\" \n />\n </ul>\n </section>\n\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <h3 class=\"mn-b-regular\">Подотделы</h3>\n <ul>\n <li v-if=\"departments.state.department.subdepartments.length < 1\">В отделе еще нет подотделов</li>\n <DepartmentSub v-for=\"(subdepartment, index) in departments.state.department.subdepartments\" @click=\"$router.push(`/app/organization/departments/${subdepartment._id}`)\" :key=\"index\" class=\"br-b br-solid br-grey-transp-25\" :department=\"subdepartment\" />\n </ul> \n </section>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { useRoute, useRouter } from 'vue-router';\n\nimport Spoiler from '@pf/src/components/Spoiler/Spoiler.vue';\nimport DepartmentSub from '@pf/src/modules/organizations/components/blocks/DepartmentSub.vue';\nimport User from '@pf/src/modules/users/components/blocks/CardUser.vue';\nimport * as departments from '@pf/src/modules/organizations/store/departments';\n\nimport IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'\n\nconst router = useRouter();\nconst route = useRoute();\n\nawait departments.actions.readOne(route.params.department);\n</script>\n\n<style scoped>\n</style>\n"],"names":["_withAsyncContext","departments.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAuEe,cAAY;AAC3B,UAAM,QAAQ,SAAQ;AAEtB,IAAM,CAAA,QAAA,SAAA,IAAAA,iBAAA,MAAAC,QAAoB,QAAQ,MAAM,OAAO,UAAU,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Department.vue.js","sources":["../../../../../../../src/modules/organizations/components/pages/Department.vue"],"sourcesContent":["<template>\n <div class=\"for-transition w-100\">\n \n <div v-if=\"departments.state.department\" id=\"dash\" class=\"pd-medium bg-light\">\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <div class=\"flex-nowrap flex mn-b-small\">\n\n <h2 class=\"w-100\">{{ departments.state.department.profile.name }}</h2>\n\n <router-link \n :to=\"{\n name: 'Department Edit', \n params: {\n _id: route.params._id,\n department: route.params.department\n }\n }\" \n class=\"\n cursor-pointer \n pos-absolute pos-t-regular pos-r-regular\n radius-extra pd-thin bg-second\n \"\n >\n <IconEdit\n class=\"i-regular\"\n classes=\"fill-white\"\n />\n </router-link>\n\n </div>\n <p class=\"t-transp p-big\" v-html=\"departments.state.department.description\"></p>\n </section>\n\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <h3 class=\"mn-b-regular\">Команда</h3>\n <ul>\n <li v-if=\"departments.state.department.members.length < 1\">В отделе еще нет участников</li>\n <User \n class=\"br-b br-solid br-grey-transp-25\" \n v-for=\"(member, index) in departments.state.department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n @click=\"$router.push(`/app/profile/${member.user._id}`)\" \n />\n </ul>\n </section>\n\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <h3 class=\"mn-b-regular\">Подотделы</h3>\n <ul>\n <li v-if=\"departments.state.department.subdepartments.length < 1\">В отделе еще нет подотделов</li>\n <DepartmentSub v-for=\"(subdepartment, index) in departments.state.department.subdepartments\" @click=\"$router.push(`/app/organization/departments/${subdepartment._id}`)\" :key=\"index\" class=\"br-b br-solid br-grey-transp-25\" :department=\"subdepartment\" />\n </ul> \n </section>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { useRoute, useRouter } from 'vue-router';\n\nimport Spoiler from '@pf/src/components/Spoiler/Spoiler.vue';\nimport DepartmentSub from '@pf/src/modules/organizations/components/blocks/DepartmentSub.vue';\nimport User from '@pf/src/modules/auth/views/components/blocks/CardUser.vue';\nimport * as departments from '@pf/src/modules/organizations/store/departments';\n\nimport IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'\n\nconst router = useRouter();\nconst route = useRoute();\n\nawait departments.actions.readOne(route.params.department);\n</script>\n\n<style scoped>\n</style>\n"],"names":["_withAsyncContext","departments.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAuEe,cAAY;AAC3B,UAAM,QAAQ,SAAQ;AAEtB,IAAM,CAAA,QAAA,SAAA,IAAAA,iBAAA,MAAAC,QAAoB,QAAQ,MAAM,OAAO,UAAU,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -8,20 +8,20 @@ require("vue-i18n");
8
8
  const UploadImage = require("../../../../components/UploadImage/UploadImage.vue.cjs");
9
9
  ;/* empty css */
10
10
  const Field = require("../../../../components/Field/Field.vue2.cjs");
11
- ;/* empty css */
11
+ ;/* empty css */
12
12
  const Checkbox = require("../../../../components/Checkbox/Checkbox.vue.cjs");
13
13
  require("../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs");
14
14
  ;/* empty css */
15
- ;/* empty css */
15
+ ;/* empty css */
16
16
  ;/* empty css */
17
- const Button = require("../../../../components/Button/Button.vue.cjs");
18
- const Popup = require("../../../../components/Popup/Popup.vue.cjs");
17
+ const Button = require("../../../../components/Button/Button.vue2.cjs");
18
+ const Popup = require("../../../../components/Popup/Popup.vue2.cjs");
19
19
  const Block = require("../../../../components/Block/Block.vue.cjs");
20
20
  const Feed = require("../../../../components/Feed/Feed.vue.cjs");
21
21
  const IconDelete = require("../../../icons/navigation/IconDelete.vue.cjs");
22
22
  ;/* empty css */
23
23
  ;/* empty css */
24
- const CardUser = require("../../../users/components/blocks/CardUser.vue.cjs");
24
+ const CardUser = require("../../../auth/views/components/blocks/CardUser.vue.cjs");
25
25
  const globals = require("../../../globals/views/store/globals.cjs");
26
26
  const departments = require("../../store/departments.cjs");
27
27
  const memberships = require("../../store/memberships.cjs");
@@ -1 +1 @@
1
- {"version":3,"file":"DepartmentEdit.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/pages/DepartmentEdit.vue"],"sourcesContent":["<template>\n <div class=\"for-transition pd-thin w-100\">\n\n <header class=\"mn-b-thin flex-nowrap flex bg-light pd-medium radius-big\">\n <h1 v-if=\"route.params.department\" class=\"mn-r-auto\">Edit Department</h1>\n <h1 v-else class=\"mn-r-auto\">Create Department</h1>\n\n <section class=\"flex-nowrap flex gap-thin pd-thin\">\n <Button v-if=\"route.params.department\" :submit=\"onDelete\" :callback=\"redirectToDash\" class=\"bg-red\">Delete</Button>\n <Button :submit=\"onSubmit\" :callback=\"redirectTo\" class=\"bg-main\">Save</Button>\n </section>\n\n </header>\n \n <Block\n title=\"Profile\"\n v-if=\"departments.state.department.profile\"\n class=\"mn-b-thin\"\n >\n <div\n class=\"cols-2-fit-content\"\n >\n <UploadImage \n v-model:photo=\"departments.state.department.profile.photo\"\n :uploadPath=\"'organizations/' + departments.state.department.name + '/avatars'\"\n class=\"w-8r aspect-1x1 o-hidden mn-r-small radius-extra\" \n />\n <div class=\"w-100 flex-child-grow-1 flex-child \">\n <Field \n v-model:field=\"departments.state.department.profile.name\" \n label=\"Name\" \n placeholder=\"Department Name\" \n class=\"mn-b-small bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n />\n <Field \n v-model:field=\"departments.state.department.profile.description\" \n label=\"Description\" \n placeholder=\"Department description (max 120 symbols)\" \n class=\"bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n /> \n </div>\n </div>\n </Block>\n\n <Block\n title=\"Team\"\n placeholder=\"No members added yet\"\n :actions=\"[{\n label: '+',\n function: () => openMemberPopup()\n }]\"\n class=\"cols-1 gap-thin mn-b-thin\"\n > \n <CardUser \n class=\"h-4r bg-white pd-thin radius-medium w-100\" \n v-for=\"(member, index) in departments.state.department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n :action=\"{\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeMember(member)\n }\"\n />\n </Block>\n\n <Popup \n title=\"Add member\" \n @close-popup=\"closeMemberPopup\" \n :isPopupOpen=\"isOpenAddMemberPopup\"\n class=\"bg-white w-max-30r radius-big pd-big\"\n >\n <Feed\n :search=\"{\n placeholder: 'Search customer...',\n class: 'bg-light mn-b-thin'\n }\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no such products available.'\n }\n }\"\n :store=\"{\n read: (options) => memberships.actions.read(options),\n state: null\n }\"\n :options=\"{\n target: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll\"\n >\n <CardUser\n v-for=\"(user, index) in items\" \n :key=\"user._id\"\n :user=\"user.user\"\n :photo=\"user.user.profile?.photo\"\n :name=\"user.user.profile?.name || user.user.phone || user.user.email\"\n @click=\"() => { \n globals.actions.add(departments.state.department.members, { _id: user.user._id, user: user.user, position: 'Member'})\n closeMemberPopup();\n }\"\n class=\"h-4r bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </Popup>\n \n\n <div class=\"cols-2 gap-thin\">\n \n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Department Settings</h3>\n \n <p class=\"p-medium mn-b-small\">Please settings for your department:</p>\n <div class=\"cols-1 gap-thin\">\n <Checkbox \n label=\"Hidden department\"\n name=\"hidden\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n @update:radio=\"updated => departments.state.department.hidden = !departments.state.department.hidden\"\n :radio=\"departments.state.department.hidden\"\n />\n </div>\n </div>\n\n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Acessess</h3>\n \n <p class=\"p-medium mn-b-small\">Please select organization accesses for user in department:</p>\n \n <div class=\"cols-1 gap-thin\">\n <h4>Events</h4>\n <Checkbox\n label=\"Read events\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.read\"\n @update:radio=\"updated => (departments.state.department.accesses.events.read = !departments.state.department.accesses.events.read)\"\n />\n <Checkbox\n label=\"Create events\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.create\"\n @update:radio=\"updated => (departments.state.department.accesses.events.create = !departments.state.department.accesses.events.create)\"\n />\n <Checkbox\n label=\"Edit events\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.events.edit = !departments.state.department.accesses.events.edit)\"\n />\n <Checkbox\n label=\"Delete events\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.events.delete = !departments.state.department.accesses.events.delete)\"\n />\n <h4>Gallery</h4>\n <Checkbox\n label=\"Read gallery\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.read\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.read = !departments.state.department.accesses.gallery.read)\"\n />\n <Checkbox\n label=\"Create photos\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.create\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.create = !departments.state.department.accesses.gallery.create)\"\n />\n <Checkbox\n label=\"Edit gallery\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.edit = !departments.state.department.accesses.gallery.edit)\"\n />\n <Checkbox\n label=\"Delete gallery\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.delete = !departments.state.department.accesses.gallery.delete)\"\n />\n <h4>Products</h4>\n <Checkbox\n label=\"Read products\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.read\"\n @update:radio=\"updated => (departments.state.department.accesses.products.read = !departments.state.department.accesses.products.read)\"\n />\n <Checkbox\n label=\"Edit products\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.products.edit = !departments.state.department.accesses.products.edit)\"\n />\n <Checkbox\n label=\"Delete products\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.products.delete = !departments.state.department.accesses.products.delete)\"\n />\n\n <h4>Orders</h4>\n <Checkbox\n label=\"Read orders\"\n name=\"readOrders\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.read\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.read = !departments.state.department.accesses.orders.read)\"\n />\n <Checkbox\n label=\"Confirm orders\"\n name=\"confirmOrders\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.confirm\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.confirm = !departments.state.department.accesses.orders.confirm)\"\n />\n <Checkbox\n label=\"Delete orders\"\n name=\"deleteOrders\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.delete = !departments.state.department.accesses.orders.delete)\"\n />\n\n <h4>Departments</h4>\n <Checkbox\n label=\"Read departments\"\n name=\"readDepartments\" class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.read\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.read = !departments.state.department.accesses.departments.read)\"\n />\n <Checkbox\n label=\"Edit departments\"\n name=\"editDepartments\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.edit = !departments.state.department.accesses.departments.edit)\"\n />\n <Checkbox\n label=\"Delete departments\"\n name=\"deleteDepartments\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.delete = !departments.state.department.accesses.departments.delete)\"\n />\n </div>\n </div>\n\n\n </div>\n\n \n \n\n\n<!-- <div id=\"dash\" class=\"pd-medium bg-white\">\n\n <Popup title=\"Добавить подотдел\" @close-popup=\"closeDepartmentPopup\" :isPopupOpen=\"isOpenDepartmentPopup\">\n <DepartmentSubDepartmentModify \n :departments=\"departments.state.department.subdepartments\" \n :department=\"selectedDepartment\" \n :maindepartment=\"departments.state.department\"\n :alldepartments=\"departments.state.departments\"\n @callback=\"closeDepartmentPopup\"\n />\n </Popup>\n \n <div class=\"mn-b-regular flex-v-center flex-nowrap flex\">\n <h3 class=\"mn-r-small\">Подотделы </h3>\n <div>\n <a class=\"t-main h5\" @click=\"openDepartmentPopup()\">+</a>\n </div>\n </div>\n\n <ul class=\"mn-b-small\">\n <li v-if=\"departments.state.department.subdepartments.length < 1\">В отделе еще нет подотделов</li>\n <DepartmentSub \n v-for=\"(subdepartment, index) in departments.state.department.subdepartments\" \n :key=\"index\" class=\"bg-light o-hidden radius-small mn-b-thin\" \n :department=\"subdepartment\" \n @click=\"openDepartmentPopup(index)\"\n />\n </ul> \n\n \n </div> -->\n </div>\n</template>\n\n<script setup>\nimport { ref } from \"vue\";\nimport { useRoute, useRouter } from \"vue-router\";\nimport Cookies from \"js-cookie\";\nimport Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\nimport UploadImage from '@pf/src/components/UploadImage/UploadImage.vue';\n\nimport Tab from \"@pf/src/components/Tab/Tab.vue\";\nimport Field from \"@pf/src/components/Field/Field.vue\";\nimport Select from \"@pf/src/components/Select/Select.vue\";\nimport Checkbox from \"@pf/src/components/Checkbox/Checkbox.vue\";\nimport Address from \"@pf/src/components/Address/Address.vue\";\nimport LocationMarker from \"@pf/src/components/LocationMarker/LocationMarker.vue\";\nimport Button from \"@pf/src/components/Button/Button.vue\";\nimport Popup from \"@pf/src/components/Popup/Popup.vue\";\nimport Block from '@pf/src/components/Block/Block.vue';\nimport Feed from '@pf/src/components/Feed/Feed.vue'\n\nimport IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'\n\nimport EditArray from \"@pf/src/modules/organizations/components/blocks/EditArray.vue\";\nimport DepartmentSub from \"@pf/src/modules/organizations/components/blocks/DepartmentSub.vue\";\n\nimport CardUser from '@pf/src/modules/users/components/blocks/CardUser.vue'\n\nimport * as globals from \"@pf/src/modules/globals/views/store/globals\";\nimport * as departments from \"@pf/src/modules/organizations/store/departments\";\nimport * as memberships from \"@pf/src/modules/organizations/store/memberships\";\n\nconst router = useRouter();\nconst route = useRoute();\n\nasync function fetchData() {\n const users = ref(memberships.state.memberships);\n // await departments.actions.read({organization: route.params._id});\n if (route.params.department) await departments.actions.readOne(route.params.department);\n}\n\nfetchData();\n\n// const members = ref(departments.state.department.members);\n\nconst isOpenAddMemberPopup = ref(false);\nconst selectedMember = ref(null);\n\nfunction openMemberPopup(member) {\n isOpenAddMemberPopup.value = true;\n if (typeof member === \"number\") selectedMember.value = member;\n}\n\nfunction closeMemberPopup() {\n isOpenAddMemberPopup.value = false;\n selectedMember.value = null;\n}\n\nconst isOpenDepartmentPopup = ref(false);\nconst selectedDepartment = ref(null);\n\nfunction openDepartmentPopup(department) {\n isOpenDepartmentPopup.value = true;\n if (typeof department === \"number\") selectedDepartment.value = department;\n}\n\nfunction closeDepartmentPopup() {\n isOpenDepartmentPopup.value = false;\n selectedDepartment.value = null;\n}\n\nasync function onSubmit() {\n if (route.params.department) {\n await departments.actions.update(\n route.params._id,\n departments.state.department\n );\n }\n if (!route.params.department) {\n await departments.actions.create(\n route.params._id,\n departments.state.department\n );\n }\n}\n\nfunction redirectTo() {\n router.push({ name: \"Organization Members\", params: { _id: route.params._id } });\n}\n\nasync function onDelete() {\n if (confirm(\"Are you sure you want to delete this department?\")) {\n await departments.actions.delete(\n route.params._id,\n departments.state.department\n );\n }\n \n}\n\nfunction removeMember(member) {\n if (confirm(\"Are you sure you want to remove this member?\")) {\n globals.actions.delete(departments.state.department.members, { _id: member.user._id}) \n }\n}\n\nfunction redirectDash() {\n router.replace({ name: \"Organization\" });\n}\n</script>\n\n<style scoped>\n</style>"],"names":["useRouter","useRoute","ref","memberships.state","departments.actions","departments.state","globals.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmVA,UAAM,SAASA,UAAS,UAAA;AACxB,UAAM,QAAQC,UAAQ,SAAA;AAEtB,mBAAe,YAAY;AACXC,UAAG,IAACC,YAAiB,MAAC,WAAW;AAE/C,UAAI,MAAM,OAAO,WAAY,OAAMC,YAAAA,QAAoB,QAAQ,MAAM,OAAO,UAAU;AAAA,IACxF;AAEA;AAIA,UAAM,uBAAuBF,IAAAA,IAAI,KAAK;AACtC,UAAM,iBAAiBA,IAAAA,IAAI,IAAI;AAE/B,aAAS,gBAAgB,QAAQ;AAC/B,2BAAqB,QAAQ;AAAA,IAE/B;AAEA,aAAS,mBAAmB;AAC1B,2BAAqB,QAAQ;AAC7B,qBAAe,QAAQ;AAAA,IACzB;AAE8BA,QAAG,IAAC,KAAK;AACZA,QAAG,IAAC,IAAI;AAYnC,mBAAe,WAAW;AACxB,UAAI,MAAM,OAAO,YAAY;AAC3B,cAAME,YAAmB,QAAC;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,YAAAA,MAAkB;AAAA,QACxB;AAAA,MACG;AACD,UAAI,CAAC,MAAM,OAAO,YAAY;AAC5B,cAAMD,YAAmB,QAAC;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,YAAAA,MAAkB;AAAA,QACxB;AAAA,MACG;AAAA,IACH;AAEA,aAAS,aAAa;AACpB,aAAO,KAAK,EAAE,MAAM,wBAAwB,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG,EAAI,CAAA;AAAA,IACjF;AAEA,mBAAe,WAAW;AACxB,UAAI,QAAQ,kDAAkD,GAAG;AAC/D,cAAMD,YAAmB,QAAC;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,YAAAA,MAAkB;AAAA,QACxB;AAAA,MACG;AAAA,IAEH;AAEA,aAAS,aAAa,QAAQ;AAC3B,UAAI,QAAQ,8CAA8C,GAAG;AAC5DC,wBAAgB,OAAOD,YAAiB,MAAC,WAAW,SAAS,EAAE,KAAK,OAAO,KAAK,IAAG,CAAC;AAAA,MACrF;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"DepartmentEdit.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/pages/DepartmentEdit.vue"],"sourcesContent":["<template>\n <div class=\"for-transition pd-thin w-100\">\n\n <header class=\"mn-b-thin flex-nowrap flex bg-light pd-medium radius-big\">\n <h1 v-if=\"route.params.department\" class=\"mn-r-auto\">Edit Department</h1>\n <h1 v-else class=\"mn-r-auto\">Create Department</h1>\n\n <section class=\"flex-nowrap flex gap-thin pd-thin\">\n <Button v-if=\"route.params.department\" :submit=\"onDelete\" :callback=\"redirectToDash\" class=\"bg-red\">Delete</Button>\n <Button :submit=\"onSubmit\" :callback=\"redirectTo\" class=\"bg-main\">Save</Button>\n </section>\n\n </header>\n \n <Block\n title=\"Profile\"\n v-if=\"departments.state.department.profile\"\n class=\"mn-b-thin\"\n >\n <div\n class=\"cols-2-fit-content\"\n >\n <UploadImage \n v-model:photo=\"departments.state.department.profile.photo\"\n :uploadPath=\"'organizations/' + departments.state.department.name + '/avatars'\"\n class=\"w-8r aspect-1x1 o-hidden mn-r-small radius-extra\" \n />\n <div class=\"w-100 flex-child-grow-1 flex-child \">\n <Field \n v-model:field=\"departments.state.department.profile.name\" \n label=\"Name\" \n placeholder=\"Department Name\" \n class=\"mn-b-small bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n />\n <Field \n v-model:field=\"departments.state.department.profile.description\" \n label=\"Description\" \n placeholder=\"Department description (max 120 symbols)\" \n class=\"bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n /> \n </div>\n </div>\n </Block>\n\n <Block\n title=\"Team\"\n placeholder=\"No members added yet\"\n :actions=\"[{\n label: '+',\n function: () => openMemberPopup()\n }]\"\n class=\"cols-1 gap-thin mn-b-thin\"\n > \n <CardUser \n class=\"h-4r bg-white pd-thin radius-medium w-100\" \n v-for=\"(member, index) in departments.state.department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n :action=\"{\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeMember(member)\n }\"\n />\n </Block>\n\n <Popup \n title=\"Add member\" \n @close-popup=\"closeMemberPopup\" \n :isPopupOpen=\"isOpenAddMemberPopup\"\n class=\"bg-white w-max-30r radius-big pd-big\"\n >\n <Feed\n :search=\"{\n placeholder: 'Search customer...',\n class: 'bg-light mn-b-thin'\n }\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no such products available.'\n }\n }\"\n :store=\"{\n read: (options) => memberships.actions.read(options),\n state: null\n }\"\n :options=\"{\n target: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll\"\n >\n <CardUser\n v-for=\"(user, index) in items\" \n :key=\"user._id\"\n :user=\"user.user\"\n :photo=\"user.user.profile?.photo\"\n :name=\"user.user.profile?.name || user.user.phone || user.user.email\"\n @click=\"() => { \n globals.actions.add(departments.state.department.members, { _id: user.user._id, user: user.user, position: 'Member'})\n closeMemberPopup();\n }\"\n class=\"h-4r bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </Popup>\n \n\n <div class=\"cols-2 gap-thin\">\n \n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Department Settings</h3>\n \n <p class=\"p-medium mn-b-small\">Please settings for your department:</p>\n <div class=\"cols-1 gap-thin\">\n <Checkbox \n label=\"Hidden department\"\n name=\"hidden\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n @update:radio=\"updated => departments.state.department.hidden = !departments.state.department.hidden\"\n :radio=\"departments.state.department.hidden\"\n />\n </div>\n </div>\n\n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Acessess</h3>\n \n <p class=\"p-medium mn-b-small\">Please select organization accesses for user in department:</p>\n \n <div class=\"cols-1 gap-thin\">\n <h4>Events</h4>\n <Checkbox\n label=\"Read events\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.read\"\n @update:radio=\"updated => (departments.state.department.accesses.events.read = !departments.state.department.accesses.events.read)\"\n />\n <Checkbox\n label=\"Create events\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.create\"\n @update:radio=\"updated => (departments.state.department.accesses.events.create = !departments.state.department.accesses.events.create)\"\n />\n <Checkbox\n label=\"Edit events\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.events.edit = !departments.state.department.accesses.events.edit)\"\n />\n <Checkbox\n label=\"Delete events\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.events.delete = !departments.state.department.accesses.events.delete)\"\n />\n <h4>Gallery</h4>\n <Checkbox\n label=\"Read gallery\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.read\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.read = !departments.state.department.accesses.gallery.read)\"\n />\n <Checkbox\n label=\"Create photos\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.create\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.create = !departments.state.department.accesses.gallery.create)\"\n />\n <Checkbox\n label=\"Edit gallery\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.edit = !departments.state.department.accesses.gallery.edit)\"\n />\n <Checkbox\n label=\"Delete gallery\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.delete = !departments.state.department.accesses.gallery.delete)\"\n />\n <h4>Products</h4>\n <Checkbox\n label=\"Read products\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.read\"\n @update:radio=\"updated => (departments.state.department.accesses.products.read = !departments.state.department.accesses.products.read)\"\n />\n <Checkbox\n label=\"Edit products\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.products.edit = !departments.state.department.accesses.products.edit)\"\n />\n <Checkbox\n label=\"Delete products\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.products.delete = !departments.state.department.accesses.products.delete)\"\n />\n\n <h4>Orders</h4>\n <Checkbox\n label=\"Read orders\"\n name=\"readOrders\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.read\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.read = !departments.state.department.accesses.orders.read)\"\n />\n <Checkbox\n label=\"Confirm orders\"\n name=\"confirmOrders\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.confirm\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.confirm = !departments.state.department.accesses.orders.confirm)\"\n />\n <Checkbox\n label=\"Delete orders\"\n name=\"deleteOrders\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.delete = !departments.state.department.accesses.orders.delete)\"\n />\n\n <h4>Departments</h4>\n <Checkbox\n label=\"Read departments\"\n name=\"readDepartments\" class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.read\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.read = !departments.state.department.accesses.departments.read)\"\n />\n <Checkbox\n label=\"Edit departments\"\n name=\"editDepartments\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.edit = !departments.state.department.accesses.departments.edit)\"\n />\n <Checkbox\n label=\"Delete departments\"\n name=\"deleteDepartments\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.delete = !departments.state.department.accesses.departments.delete)\"\n />\n </div>\n </div>\n\n\n </div>\n\n \n \n\n\n<!-- <div id=\"dash\" class=\"pd-medium bg-white\">\n\n <Popup title=\"Добавить подотдел\" @close-popup=\"closeDepartmentPopup\" :isPopupOpen=\"isOpenDepartmentPopup\">\n <DepartmentSubDepartmentModify \n :departments=\"departments.state.department.subdepartments\" \n :department=\"selectedDepartment\" \n :maindepartment=\"departments.state.department\"\n :alldepartments=\"departments.state.departments\"\n @callback=\"closeDepartmentPopup\"\n />\n </Popup>\n \n <div class=\"mn-b-regular flex-v-center flex-nowrap flex\">\n <h3 class=\"mn-r-small\">Подотделы </h3>\n <div>\n <a class=\"t-main h5\" @click=\"openDepartmentPopup()\">+</a>\n </div>\n </div>\n\n <ul class=\"mn-b-small\">\n <li v-if=\"departments.state.department.subdepartments.length < 1\">В отделе еще нет подотделов</li>\n <DepartmentSub \n v-for=\"(subdepartment, index) in departments.state.department.subdepartments\" \n :key=\"index\" class=\"bg-light o-hidden radius-small mn-b-thin\" \n :department=\"subdepartment\" \n @click=\"openDepartmentPopup(index)\"\n />\n </ul> \n\n \n </div> -->\n </div>\n</template>\n\n<script setup>\nimport { ref } from \"vue\";\nimport { useRoute, useRouter } from \"vue-router\";\nimport Cookies from \"js-cookie\";\nimport Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\nimport UploadImage from '@pf/src/components/UploadImage/UploadImage.vue';\n\nimport Tab from \"@pf/src/components/Tab/Tab.vue\";\nimport Field from \"@pf/src/components/Field/Field.vue\";\nimport Select from \"@pf/src/components/Select/Select.vue\";\nimport Checkbox from \"@pf/src/components/Checkbox/Checkbox.vue\";\nimport Address from \"@pf/src/components/Address/Address.vue\";\nimport LocationMarker from \"@pf/src/components/LocationMarker/LocationMarker.vue\";\nimport Button from \"@pf/src/components/Button/Button.vue\";\nimport Popup from \"@pf/src/components/Popup/Popup.vue\";\nimport Block from '@pf/src/components/Block/Block.vue';\nimport Feed from '@pf/src/components/Feed/Feed.vue'\n\nimport IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'\n\nimport EditArray from \"@pf/src/modules/organizations/components/blocks/EditArray.vue\";\nimport DepartmentSub from \"@pf/src/modules/organizations/components/blocks/DepartmentSub.vue\";\n\nimport CardUser from '@pf/src/modules/auth/views/components/blocks/CardUser.vue'\n\nimport * as globals from \"@pf/src/modules/globals/views/store/globals\";\nimport * as departments from \"@pf/src/modules/organizations/store/departments\";\nimport * as memberships from \"@pf/src/modules/organizations/store/memberships\";\n\nconst router = useRouter();\nconst route = useRoute();\n\nasync function fetchData() {\n const users = ref(memberships.state.memberships);\n // await departments.actions.read({organization: route.params._id});\n if (route.params.department) await departments.actions.readOne(route.params.department);\n}\n\nfetchData();\n\n// const members = ref(departments.state.department.members);\n\nconst isOpenAddMemberPopup = ref(false);\nconst selectedMember = ref(null);\n\nfunction openMemberPopup(member) {\n isOpenAddMemberPopup.value = true;\n if (typeof member === \"number\") selectedMember.value = member;\n}\n\nfunction closeMemberPopup() {\n isOpenAddMemberPopup.value = false;\n selectedMember.value = null;\n}\n\nconst isOpenDepartmentPopup = ref(false);\nconst selectedDepartment = ref(null);\n\nfunction openDepartmentPopup(department) {\n isOpenDepartmentPopup.value = true;\n if (typeof department === \"number\") selectedDepartment.value = department;\n}\n\nfunction closeDepartmentPopup() {\n isOpenDepartmentPopup.value = false;\n selectedDepartment.value = null;\n}\n\nasync function onSubmit() {\n if (route.params.department) {\n await departments.actions.update(\n route.params._id,\n departments.state.department\n );\n }\n if (!route.params.department) {\n await departments.actions.create(\n route.params._id,\n departments.state.department\n );\n }\n}\n\nfunction redirectTo() {\n router.push({ name: \"Organization Members\", params: { _id: route.params._id } });\n}\n\nasync function onDelete() {\n if (confirm(\"Are you sure you want to delete this department?\")) {\n await departments.actions.delete(\n route.params._id,\n departments.state.department\n );\n }\n \n}\n\nfunction removeMember(member) {\n if (confirm(\"Are you sure you want to remove this member?\")) {\n globals.actions.delete(departments.state.department.members, { _id: member.user._id}) \n }\n}\n\nfunction redirectDash() {\n router.replace({ name: \"Organization\" });\n}\n</script>\n\n<style scoped>\n</style>"],"names":["useRouter","useRoute","ref","memberships.state","departments.actions","departments.state","globals.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmVA,UAAM,SAASA,UAAS,UAAA;AACxB,UAAM,QAAQC,UAAQ,SAAA;AAEtB,mBAAe,YAAY;AACXC,UAAG,IAACC,YAAiB,MAAC,WAAW;AAE/C,UAAI,MAAM,OAAO,WAAY,OAAMC,YAAAA,QAAoB,QAAQ,MAAM,OAAO,UAAU;AAAA,IACxF;AAEA;AAIA,UAAM,uBAAuBF,IAAAA,IAAI,KAAK;AACtC,UAAM,iBAAiBA,IAAAA,IAAI,IAAI;AAE/B,aAAS,gBAAgB,QAAQ;AAC/B,2BAAqB,QAAQ;AAAA,IAE/B;AAEA,aAAS,mBAAmB;AAC1B,2BAAqB,QAAQ;AAC7B,qBAAe,QAAQ;AAAA,IACzB;AAE8BA,QAAG,IAAC,KAAK;AACZA,QAAG,IAAC,IAAI;AAYnC,mBAAe,WAAW;AACxB,UAAI,MAAM,OAAO,YAAY;AAC3B,cAAME,YAAmB,QAAC;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,YAAAA,MAAkB;AAAA,QACxB;AAAA,MACG;AACD,UAAI,CAAC,MAAM,OAAO,YAAY;AAC5B,cAAMD,YAAmB,QAAC;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,YAAAA,MAAkB;AAAA,QACxB;AAAA,MACG;AAAA,IACH;AAEA,aAAS,aAAa;AACpB,aAAO,KAAK,EAAE,MAAM,wBAAwB,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG,EAAI,CAAA;AAAA,IACjF;AAEA,mBAAe,WAAW;AACxB,UAAI,QAAQ,kDAAkD,GAAG;AAC/D,cAAMD,YAAmB,QAAC;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,YAAAA,MAAkB;AAAA,QACxB;AAAA,MACG;AAAA,IAEH;AAEA,aAAS,aAAa,QAAQ;AAC3B,UAAI,QAAQ,8CAA8C,GAAG;AAC5DC,wBAAgB,OAAOD,YAAiB,MAAC,WAAW,SAAS,EAAE,KAAK,OAAO,KAAK,IAAG,CAAC;AAAA,MACrF;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -6,20 +6,20 @@ import "vue-i18n";
6
6
  import _sfc_main$3 from "../../../../components/UploadImage/UploadImage.vue.js";
7
7
  /* empty css */
8
8
  import Field from "../../../../components/Field/Field.vue2.js";
9
- /* empty css */
9
+ /* empty css */
10
10
  import _sfc_main$8 from "../../../../components/Checkbox/Checkbox.vue.js";
11
11
  import "../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.js";
12
12
  /* empty css */
13
- /* empty css */
13
+ /* empty css */
14
14
  /* empty css */
15
- import _sfc_main$1 from "../../../../components/Button/Button.vue.js";
16
- import _sfc_main$6 from "../../../../components/Popup/Popup.vue.js";
15
+ import _sfc_main$1 from "../../../../components/Button/Button.vue2.js";
16
+ import _sfc_main$6 from "../../../../components/Popup/Popup.vue2.js";
17
17
  import _sfc_main$2 from "../../../../components/Block/Block.vue.js";
18
18
  import _sfc_main$7 from "../../../../components/Feed/Feed.vue.js";
19
19
  import _sfc_main$5 from "../../../icons/navigation/IconDelete.vue.js";
20
20
  /* empty css */
21
21
  /* empty css */
22
- import _sfc_main$4 from "../../../users/components/blocks/CardUser.vue.js";
22
+ import _sfc_main$4 from "../../../auth/views/components/blocks/CardUser.vue.js";
23
23
  import { actions as actions$1 } from "../../../globals/views/store/globals.js";
24
24
  import { state, actions as actions$2 } from "../../store/departments.js";
25
25
  import { actions, state as state$1 } from "../../store/memberships.js";
@@ -1 +1 @@
1
- {"version":3,"file":"DepartmentEdit.vue.js","sources":["../../../../../../../src/modules/organizations/components/pages/DepartmentEdit.vue"],"sourcesContent":["<template>\n <div class=\"for-transition pd-thin w-100\">\n\n <header class=\"mn-b-thin flex-nowrap flex bg-light pd-medium radius-big\">\n <h1 v-if=\"route.params.department\" class=\"mn-r-auto\">Edit Department</h1>\n <h1 v-else class=\"mn-r-auto\">Create Department</h1>\n\n <section class=\"flex-nowrap flex gap-thin pd-thin\">\n <Button v-if=\"route.params.department\" :submit=\"onDelete\" :callback=\"redirectToDash\" class=\"bg-red\">Delete</Button>\n <Button :submit=\"onSubmit\" :callback=\"redirectTo\" class=\"bg-main\">Save</Button>\n </section>\n\n </header>\n \n <Block\n title=\"Profile\"\n v-if=\"departments.state.department.profile\"\n class=\"mn-b-thin\"\n >\n <div\n class=\"cols-2-fit-content\"\n >\n <UploadImage \n v-model:photo=\"departments.state.department.profile.photo\"\n :uploadPath=\"'organizations/' + departments.state.department.name + '/avatars'\"\n class=\"w-8r aspect-1x1 o-hidden mn-r-small radius-extra\" \n />\n <div class=\"w-100 flex-child-grow-1 flex-child \">\n <Field \n v-model:field=\"departments.state.department.profile.name\" \n label=\"Name\" \n placeholder=\"Department Name\" \n class=\"mn-b-small bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n />\n <Field \n v-model:field=\"departments.state.department.profile.description\" \n label=\"Description\" \n placeholder=\"Department description (max 120 symbols)\" \n class=\"bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n /> \n </div>\n </div>\n </Block>\n\n <Block\n title=\"Team\"\n placeholder=\"No members added yet\"\n :actions=\"[{\n label: '+',\n function: () => openMemberPopup()\n }]\"\n class=\"cols-1 gap-thin mn-b-thin\"\n > \n <CardUser \n class=\"h-4r bg-white pd-thin radius-medium w-100\" \n v-for=\"(member, index) in departments.state.department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n :action=\"{\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeMember(member)\n }\"\n />\n </Block>\n\n <Popup \n title=\"Add member\" \n @close-popup=\"closeMemberPopup\" \n :isPopupOpen=\"isOpenAddMemberPopup\"\n class=\"bg-white w-max-30r radius-big pd-big\"\n >\n <Feed\n :search=\"{\n placeholder: 'Search customer...',\n class: 'bg-light mn-b-thin'\n }\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no such products available.'\n }\n }\"\n :store=\"{\n read: (options) => memberships.actions.read(options),\n state: null\n }\"\n :options=\"{\n target: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll\"\n >\n <CardUser\n v-for=\"(user, index) in items\" \n :key=\"user._id\"\n :user=\"user.user\"\n :photo=\"user.user.profile?.photo\"\n :name=\"user.user.profile?.name || user.user.phone || user.user.email\"\n @click=\"() => { \n globals.actions.add(departments.state.department.members, { _id: user.user._id, user: user.user, position: 'Member'})\n closeMemberPopup();\n }\"\n class=\"h-4r bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </Popup>\n \n\n <div class=\"cols-2 gap-thin\">\n \n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Department Settings</h3>\n \n <p class=\"p-medium mn-b-small\">Please settings for your department:</p>\n <div class=\"cols-1 gap-thin\">\n <Checkbox \n label=\"Hidden department\"\n name=\"hidden\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n @update:radio=\"updated => departments.state.department.hidden = !departments.state.department.hidden\"\n :radio=\"departments.state.department.hidden\"\n />\n </div>\n </div>\n\n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Acessess</h3>\n \n <p class=\"p-medium mn-b-small\">Please select organization accesses for user in department:</p>\n \n <div class=\"cols-1 gap-thin\">\n <h4>Events</h4>\n <Checkbox\n label=\"Read events\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.read\"\n @update:radio=\"updated => (departments.state.department.accesses.events.read = !departments.state.department.accesses.events.read)\"\n />\n <Checkbox\n label=\"Create events\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.create\"\n @update:radio=\"updated => (departments.state.department.accesses.events.create = !departments.state.department.accesses.events.create)\"\n />\n <Checkbox\n label=\"Edit events\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.events.edit = !departments.state.department.accesses.events.edit)\"\n />\n <Checkbox\n label=\"Delete events\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.events.delete = !departments.state.department.accesses.events.delete)\"\n />\n <h4>Gallery</h4>\n <Checkbox\n label=\"Read gallery\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.read\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.read = !departments.state.department.accesses.gallery.read)\"\n />\n <Checkbox\n label=\"Create photos\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.create\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.create = !departments.state.department.accesses.gallery.create)\"\n />\n <Checkbox\n label=\"Edit gallery\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.edit = !departments.state.department.accesses.gallery.edit)\"\n />\n <Checkbox\n label=\"Delete gallery\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.delete = !departments.state.department.accesses.gallery.delete)\"\n />\n <h4>Products</h4>\n <Checkbox\n label=\"Read products\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.read\"\n @update:radio=\"updated => (departments.state.department.accesses.products.read = !departments.state.department.accesses.products.read)\"\n />\n <Checkbox\n label=\"Edit products\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.products.edit = !departments.state.department.accesses.products.edit)\"\n />\n <Checkbox\n label=\"Delete products\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.products.delete = !departments.state.department.accesses.products.delete)\"\n />\n\n <h4>Orders</h4>\n <Checkbox\n label=\"Read orders\"\n name=\"readOrders\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.read\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.read = !departments.state.department.accesses.orders.read)\"\n />\n <Checkbox\n label=\"Confirm orders\"\n name=\"confirmOrders\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.confirm\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.confirm = !departments.state.department.accesses.orders.confirm)\"\n />\n <Checkbox\n label=\"Delete orders\"\n name=\"deleteOrders\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.delete = !departments.state.department.accesses.orders.delete)\"\n />\n\n <h4>Departments</h4>\n <Checkbox\n label=\"Read departments\"\n name=\"readDepartments\" class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.read\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.read = !departments.state.department.accesses.departments.read)\"\n />\n <Checkbox\n label=\"Edit departments\"\n name=\"editDepartments\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.edit = !departments.state.department.accesses.departments.edit)\"\n />\n <Checkbox\n label=\"Delete departments\"\n name=\"deleteDepartments\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.delete = !departments.state.department.accesses.departments.delete)\"\n />\n </div>\n </div>\n\n\n </div>\n\n \n \n\n\n<!-- <div id=\"dash\" class=\"pd-medium bg-white\">\n\n <Popup title=\"Добавить подотдел\" @close-popup=\"closeDepartmentPopup\" :isPopupOpen=\"isOpenDepartmentPopup\">\n <DepartmentSubDepartmentModify \n :departments=\"departments.state.department.subdepartments\" \n :department=\"selectedDepartment\" \n :maindepartment=\"departments.state.department\"\n :alldepartments=\"departments.state.departments\"\n @callback=\"closeDepartmentPopup\"\n />\n </Popup>\n \n <div class=\"mn-b-regular flex-v-center flex-nowrap flex\">\n <h3 class=\"mn-r-small\">Подотделы </h3>\n <div>\n <a class=\"t-main h5\" @click=\"openDepartmentPopup()\">+</a>\n </div>\n </div>\n\n <ul class=\"mn-b-small\">\n <li v-if=\"departments.state.department.subdepartments.length < 1\">В отделе еще нет подотделов</li>\n <DepartmentSub \n v-for=\"(subdepartment, index) in departments.state.department.subdepartments\" \n :key=\"index\" class=\"bg-light o-hidden radius-small mn-b-thin\" \n :department=\"subdepartment\" \n @click=\"openDepartmentPopup(index)\"\n />\n </ul> \n\n \n </div> -->\n </div>\n</template>\n\n<script setup>\nimport { ref } from \"vue\";\nimport { useRoute, useRouter } from \"vue-router\";\nimport Cookies from \"js-cookie\";\nimport Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\nimport UploadImage from '@pf/src/components/UploadImage/UploadImage.vue';\n\nimport Tab from \"@pf/src/components/Tab/Tab.vue\";\nimport Field from \"@pf/src/components/Field/Field.vue\";\nimport Select from \"@pf/src/components/Select/Select.vue\";\nimport Checkbox from \"@pf/src/components/Checkbox/Checkbox.vue\";\nimport Address from \"@pf/src/components/Address/Address.vue\";\nimport LocationMarker from \"@pf/src/components/LocationMarker/LocationMarker.vue\";\nimport Button from \"@pf/src/components/Button/Button.vue\";\nimport Popup from \"@pf/src/components/Popup/Popup.vue\";\nimport Block from '@pf/src/components/Block/Block.vue';\nimport Feed from '@pf/src/components/Feed/Feed.vue'\n\nimport IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'\n\nimport EditArray from \"@pf/src/modules/organizations/components/blocks/EditArray.vue\";\nimport DepartmentSub from \"@pf/src/modules/organizations/components/blocks/DepartmentSub.vue\";\n\nimport CardUser from '@pf/src/modules/users/components/blocks/CardUser.vue'\n\nimport * as globals from \"@pf/src/modules/globals/views/store/globals\";\nimport * as departments from \"@pf/src/modules/organizations/store/departments\";\nimport * as memberships from \"@pf/src/modules/organizations/store/memberships\";\n\nconst router = useRouter();\nconst route = useRoute();\n\nasync function fetchData() {\n const users = ref(memberships.state.memberships);\n // await departments.actions.read({organization: route.params._id});\n if (route.params.department) await departments.actions.readOne(route.params.department);\n}\n\nfetchData();\n\n// const members = ref(departments.state.department.members);\n\nconst isOpenAddMemberPopup = ref(false);\nconst selectedMember = ref(null);\n\nfunction openMemberPopup(member) {\n isOpenAddMemberPopup.value = true;\n if (typeof member === \"number\") selectedMember.value = member;\n}\n\nfunction closeMemberPopup() {\n isOpenAddMemberPopup.value = false;\n selectedMember.value = null;\n}\n\nconst isOpenDepartmentPopup = ref(false);\nconst selectedDepartment = ref(null);\n\nfunction openDepartmentPopup(department) {\n isOpenDepartmentPopup.value = true;\n if (typeof department === \"number\") selectedDepartment.value = department;\n}\n\nfunction closeDepartmentPopup() {\n isOpenDepartmentPopup.value = false;\n selectedDepartment.value = null;\n}\n\nasync function onSubmit() {\n if (route.params.department) {\n await departments.actions.update(\n route.params._id,\n departments.state.department\n );\n }\n if (!route.params.department) {\n await departments.actions.create(\n route.params._id,\n departments.state.department\n );\n }\n}\n\nfunction redirectTo() {\n router.push({ name: \"Organization Members\", params: { _id: route.params._id } });\n}\n\nasync function onDelete() {\n if (confirm(\"Are you sure you want to delete this department?\")) {\n await departments.actions.delete(\n route.params._id,\n departments.state.department\n );\n }\n \n}\n\nfunction removeMember(member) {\n if (confirm(\"Are you sure you want to remove this member?\")) {\n globals.actions.delete(departments.state.department.members, { _id: member.user._id}) \n }\n}\n\nfunction redirectDash() {\n router.replace({ name: \"Organization\" });\n}\n</script>\n\n<style scoped>\n</style>"],"names":["memberships.state","departments.actions","departments.state","globals.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmVA,UAAM,SAAS,UAAS;AACxB,UAAM,QAAQ,SAAQ;AAEtB,mBAAe,YAAY;AACX,UAAIA,QAAkB,WAAW;AAE/C,UAAI,MAAM,OAAO,WAAY,OAAMC,UAAoB,QAAQ,MAAM,OAAO,UAAU;AAAA,IACxF;AAEA;AAIA,UAAM,uBAAuB,IAAI,KAAK;AACtC,UAAM,iBAAiB,IAAI,IAAI;AAE/B,aAAS,gBAAgB,QAAQ;AAC/B,2BAAqB,QAAQ;AAAA,IAE/B;AAEA,aAAS,mBAAmB;AAC1B,2BAAqB,QAAQ;AAC7B,qBAAe,QAAQ;AAAA,IACzB;AAE8B,QAAI,KAAK;AACZ,QAAI,IAAI;AAYnC,mBAAe,WAAW;AACxB,UAAI,MAAM,OAAO,YAAY;AAC3B,cAAMA,UAAoB;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,MAAkB;AAAA,QACxB;AAAA,MACG;AACD,UAAI,CAAC,MAAM,OAAO,YAAY;AAC5B,cAAMD,UAAoB;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,MAAkB;AAAA,QACxB;AAAA,MACG;AAAA,IACH;AAEA,aAAS,aAAa;AACpB,aAAO,KAAK,EAAE,MAAM,wBAAwB,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG,EAAI,CAAA;AAAA,IACjF;AAEA,mBAAe,WAAW;AACxB,UAAI,QAAQ,kDAAkD,GAAG;AAC/D,cAAMD,UAAoB;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,MAAkB;AAAA,QACxB;AAAA,MACG;AAAA,IAEH;AAEA,aAAS,aAAa,QAAQ;AAC3B,UAAI,QAAQ,8CAA8C,GAAG;AAC5DC,kBAAgB,OAAOD,MAAkB,WAAW,SAAS,EAAE,KAAK,OAAO,KAAK,IAAG,CAAC;AAAA,MACrF;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"DepartmentEdit.vue.js","sources":["../../../../../../../src/modules/organizations/components/pages/DepartmentEdit.vue"],"sourcesContent":["<template>\n <div class=\"for-transition pd-thin w-100\">\n\n <header class=\"mn-b-thin flex-nowrap flex bg-light pd-medium radius-big\">\n <h1 v-if=\"route.params.department\" class=\"mn-r-auto\">Edit Department</h1>\n <h1 v-else class=\"mn-r-auto\">Create Department</h1>\n\n <section class=\"flex-nowrap flex gap-thin pd-thin\">\n <Button v-if=\"route.params.department\" :submit=\"onDelete\" :callback=\"redirectToDash\" class=\"bg-red\">Delete</Button>\n <Button :submit=\"onSubmit\" :callback=\"redirectTo\" class=\"bg-main\">Save</Button>\n </section>\n\n </header>\n \n <Block\n title=\"Profile\"\n v-if=\"departments.state.department.profile\"\n class=\"mn-b-thin\"\n >\n <div\n class=\"cols-2-fit-content\"\n >\n <UploadImage \n v-model:photo=\"departments.state.department.profile.photo\"\n :uploadPath=\"'organizations/' + departments.state.department.name + '/avatars'\"\n class=\"w-8r aspect-1x1 o-hidden mn-r-small radius-extra\" \n />\n <div class=\"w-100 flex-child-grow-1 flex-child \">\n <Field \n v-model:field=\"departments.state.department.profile.name\" \n label=\"Name\" \n placeholder=\"Department Name\" \n class=\"mn-b-small bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n />\n <Field \n v-model:field=\"departments.state.department.profile.description\" \n label=\"Description\" \n placeholder=\"Department description (max 120 symbols)\" \n class=\"bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n /> \n </div>\n </div>\n </Block>\n\n <Block\n title=\"Team\"\n placeholder=\"No members added yet\"\n :actions=\"[{\n label: '+',\n function: () => openMemberPopup()\n }]\"\n class=\"cols-1 gap-thin mn-b-thin\"\n > \n <CardUser \n class=\"h-4r bg-white pd-thin radius-medium w-100\" \n v-for=\"(member, index) in departments.state.department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n :action=\"{\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeMember(member)\n }\"\n />\n </Block>\n\n <Popup \n title=\"Add member\" \n @close-popup=\"closeMemberPopup\" \n :isPopupOpen=\"isOpenAddMemberPopup\"\n class=\"bg-white w-max-30r radius-big pd-big\"\n >\n <Feed\n :search=\"{\n placeholder: 'Search customer...',\n class: 'bg-light mn-b-thin'\n }\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no such products available.'\n }\n }\"\n :store=\"{\n read: (options) => memberships.actions.read(options),\n state: null\n }\"\n :options=\"{\n target: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll\"\n >\n <CardUser\n v-for=\"(user, index) in items\" \n :key=\"user._id\"\n :user=\"user.user\"\n :photo=\"user.user.profile?.photo\"\n :name=\"user.user.profile?.name || user.user.phone || user.user.email\"\n @click=\"() => { \n globals.actions.add(departments.state.department.members, { _id: user.user._id, user: user.user, position: 'Member'})\n closeMemberPopup();\n }\"\n class=\"h-4r bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </Popup>\n \n\n <div class=\"cols-2 gap-thin\">\n \n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Department Settings</h3>\n \n <p class=\"p-medium mn-b-small\">Please settings for your department:</p>\n <div class=\"cols-1 gap-thin\">\n <Checkbox \n label=\"Hidden department\"\n name=\"hidden\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n @update:radio=\"updated => departments.state.department.hidden = !departments.state.department.hidden\"\n :radio=\"departments.state.department.hidden\"\n />\n </div>\n </div>\n\n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Acessess</h3>\n \n <p class=\"p-medium mn-b-small\">Please select organization accesses for user in department:</p>\n \n <div class=\"cols-1 gap-thin\">\n <h4>Events</h4>\n <Checkbox\n label=\"Read events\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.read\"\n @update:radio=\"updated => (departments.state.department.accesses.events.read = !departments.state.department.accesses.events.read)\"\n />\n <Checkbox\n label=\"Create events\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.create\"\n @update:radio=\"updated => (departments.state.department.accesses.events.create = !departments.state.department.accesses.events.create)\"\n />\n <Checkbox\n label=\"Edit events\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.events.edit = !departments.state.department.accesses.events.edit)\"\n />\n <Checkbox\n label=\"Delete events\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.events.delete = !departments.state.department.accesses.events.delete)\"\n />\n <h4>Gallery</h4>\n <Checkbox\n label=\"Read gallery\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.read\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.read = !departments.state.department.accesses.gallery.read)\"\n />\n <Checkbox\n label=\"Create photos\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.create\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.create = !departments.state.department.accesses.gallery.create)\"\n />\n <Checkbox\n label=\"Edit gallery\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.edit = !departments.state.department.accesses.gallery.edit)\"\n />\n <Checkbox\n label=\"Delete gallery\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.delete = !departments.state.department.accesses.gallery.delete)\"\n />\n <h4>Products</h4>\n <Checkbox\n label=\"Read products\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.read\"\n @update:radio=\"updated => (departments.state.department.accesses.products.read = !departments.state.department.accesses.products.read)\"\n />\n <Checkbox\n label=\"Edit products\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.products.edit = !departments.state.department.accesses.products.edit)\"\n />\n <Checkbox\n label=\"Delete products\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.products.delete = !departments.state.department.accesses.products.delete)\"\n />\n\n <h4>Orders</h4>\n <Checkbox\n label=\"Read orders\"\n name=\"readOrders\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.read\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.read = !departments.state.department.accesses.orders.read)\"\n />\n <Checkbox\n label=\"Confirm orders\"\n name=\"confirmOrders\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.confirm\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.confirm = !departments.state.department.accesses.orders.confirm)\"\n />\n <Checkbox\n label=\"Delete orders\"\n name=\"deleteOrders\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.delete = !departments.state.department.accesses.orders.delete)\"\n />\n\n <h4>Departments</h4>\n <Checkbox\n label=\"Read departments\"\n name=\"readDepartments\" class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.read\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.read = !departments.state.department.accesses.departments.read)\"\n />\n <Checkbox\n label=\"Edit departments\"\n name=\"editDepartments\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.edit = !departments.state.department.accesses.departments.edit)\"\n />\n <Checkbox\n label=\"Delete departments\"\n name=\"deleteDepartments\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.delete = !departments.state.department.accesses.departments.delete)\"\n />\n </div>\n </div>\n\n\n </div>\n\n \n \n\n\n<!-- <div id=\"dash\" class=\"pd-medium bg-white\">\n\n <Popup title=\"Добавить подотдел\" @close-popup=\"closeDepartmentPopup\" :isPopupOpen=\"isOpenDepartmentPopup\">\n <DepartmentSubDepartmentModify \n :departments=\"departments.state.department.subdepartments\" \n :department=\"selectedDepartment\" \n :maindepartment=\"departments.state.department\"\n :alldepartments=\"departments.state.departments\"\n @callback=\"closeDepartmentPopup\"\n />\n </Popup>\n \n <div class=\"mn-b-regular flex-v-center flex-nowrap flex\">\n <h3 class=\"mn-r-small\">Подотделы </h3>\n <div>\n <a class=\"t-main h5\" @click=\"openDepartmentPopup()\">+</a>\n </div>\n </div>\n\n <ul class=\"mn-b-small\">\n <li v-if=\"departments.state.department.subdepartments.length < 1\">В отделе еще нет подотделов</li>\n <DepartmentSub \n v-for=\"(subdepartment, index) in departments.state.department.subdepartments\" \n :key=\"index\" class=\"bg-light o-hidden radius-small mn-b-thin\" \n :department=\"subdepartment\" \n @click=\"openDepartmentPopup(index)\"\n />\n </ul> \n\n \n </div> -->\n </div>\n</template>\n\n<script setup>\nimport { ref } from \"vue\";\nimport { useRoute, useRouter } from \"vue-router\";\nimport Cookies from \"js-cookie\";\nimport Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\nimport UploadImage from '@pf/src/components/UploadImage/UploadImage.vue';\n\nimport Tab from \"@pf/src/components/Tab/Tab.vue\";\nimport Field from \"@pf/src/components/Field/Field.vue\";\nimport Select from \"@pf/src/components/Select/Select.vue\";\nimport Checkbox from \"@pf/src/components/Checkbox/Checkbox.vue\";\nimport Address from \"@pf/src/components/Address/Address.vue\";\nimport LocationMarker from \"@pf/src/components/LocationMarker/LocationMarker.vue\";\nimport Button from \"@pf/src/components/Button/Button.vue\";\nimport Popup from \"@pf/src/components/Popup/Popup.vue\";\nimport Block from '@pf/src/components/Block/Block.vue';\nimport Feed from '@pf/src/components/Feed/Feed.vue'\n\nimport IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'\n\nimport EditArray from \"@pf/src/modules/organizations/components/blocks/EditArray.vue\";\nimport DepartmentSub from \"@pf/src/modules/organizations/components/blocks/DepartmentSub.vue\";\n\nimport CardUser from '@pf/src/modules/auth/views/components/blocks/CardUser.vue'\n\nimport * as globals from \"@pf/src/modules/globals/views/store/globals\";\nimport * as departments from \"@pf/src/modules/organizations/store/departments\";\nimport * as memberships from \"@pf/src/modules/organizations/store/memberships\";\n\nconst router = useRouter();\nconst route = useRoute();\n\nasync function fetchData() {\n const users = ref(memberships.state.memberships);\n // await departments.actions.read({organization: route.params._id});\n if (route.params.department) await departments.actions.readOne(route.params.department);\n}\n\nfetchData();\n\n// const members = ref(departments.state.department.members);\n\nconst isOpenAddMemberPopup = ref(false);\nconst selectedMember = ref(null);\n\nfunction openMemberPopup(member) {\n isOpenAddMemberPopup.value = true;\n if (typeof member === \"number\") selectedMember.value = member;\n}\n\nfunction closeMemberPopup() {\n isOpenAddMemberPopup.value = false;\n selectedMember.value = null;\n}\n\nconst isOpenDepartmentPopup = ref(false);\nconst selectedDepartment = ref(null);\n\nfunction openDepartmentPopup(department) {\n isOpenDepartmentPopup.value = true;\n if (typeof department === \"number\") selectedDepartment.value = department;\n}\n\nfunction closeDepartmentPopup() {\n isOpenDepartmentPopup.value = false;\n selectedDepartment.value = null;\n}\n\nasync function onSubmit() {\n if (route.params.department) {\n await departments.actions.update(\n route.params._id,\n departments.state.department\n );\n }\n if (!route.params.department) {\n await departments.actions.create(\n route.params._id,\n departments.state.department\n );\n }\n}\n\nfunction redirectTo() {\n router.push({ name: \"Organization Members\", params: { _id: route.params._id } });\n}\n\nasync function onDelete() {\n if (confirm(\"Are you sure you want to delete this department?\")) {\n await departments.actions.delete(\n route.params._id,\n departments.state.department\n );\n }\n \n}\n\nfunction removeMember(member) {\n if (confirm(\"Are you sure you want to remove this member?\")) {\n globals.actions.delete(departments.state.department.members, { _id: member.user._id}) \n }\n}\n\nfunction redirectDash() {\n router.replace({ name: \"Organization\" });\n}\n</script>\n\n<style scoped>\n</style>"],"names":["memberships.state","departments.actions","departments.state","globals.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmVA,UAAM,SAAS,UAAS;AACxB,UAAM,QAAQ,SAAQ;AAEtB,mBAAe,YAAY;AACX,UAAIA,QAAkB,WAAW;AAE/C,UAAI,MAAM,OAAO,WAAY,OAAMC,UAAoB,QAAQ,MAAM,OAAO,UAAU;AAAA,IACxF;AAEA;AAIA,UAAM,uBAAuB,IAAI,KAAK;AACtC,UAAM,iBAAiB,IAAI,IAAI;AAE/B,aAAS,gBAAgB,QAAQ;AAC/B,2BAAqB,QAAQ;AAAA,IAE/B;AAEA,aAAS,mBAAmB;AAC1B,2BAAqB,QAAQ;AAC7B,qBAAe,QAAQ;AAAA,IACzB;AAE8B,QAAI,KAAK;AACZ,QAAI,IAAI;AAYnC,mBAAe,WAAW;AACxB,UAAI,MAAM,OAAO,YAAY;AAC3B,cAAMA,UAAoB;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,MAAkB;AAAA,QACxB;AAAA,MACG;AACD,UAAI,CAAC,MAAM,OAAO,YAAY;AAC5B,cAAMD,UAAoB;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,MAAkB;AAAA,QACxB;AAAA,MACG;AAAA,IACH;AAEA,aAAS,aAAa;AACpB,aAAO,KAAK,EAAE,MAAM,wBAAwB,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG,EAAI,CAAA;AAAA,IACjF;AAEA,mBAAe,WAAW;AACxB,UAAI,QAAQ,kDAAkD,GAAG;AAC/D,cAAMD,UAAoB;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,MAAkB;AAAA,QACxB;AAAA,MACG;AAAA,IAEH;AAEA,aAAS,aAAa,QAAQ;AAC3B,UAAI,QAAQ,8CAA8C,GAAG;AAC5DC,kBAAgB,OAAOD,MAAkB,WAAW,SAAS,EAAE,KAAK,OAAO,KAAK,IAAG,CAAC;AAAA,MACrF;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -5,12 +5,12 @@ const vueRouter = require("vue-router");
5
5
  const Feed = require("../../../../components/Feed/Feed.vue.cjs");
6
6
  ;/* empty css */
7
7
  ;/* empty css */
8
- const Popup = require("../../../../components/Popup/Popup.vue.cjs");
8
+ const Popup = require("../../../../components/Popup/Popup.vue2.cjs");
9
9
  const SectionPageTitle = require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs");
10
10
  const MembersAdd = require("../sections/MembersAdd.vue.cjs");
11
11
  ;/* empty css */
12
12
  require("../../../../components/Menu/MenuItem.vue.cjs");
13
- const CardUser = require("../../../users/components/blocks/CardUser.vue.cjs");
13
+ const CardUser = require("../../../auth/views/components/blocks/CardUser.vue.cjs");
14
14
  const CardDepartment = require("../blocks/CardDepartment.vue.cjs");
15
15
  const IconDelete = require("../../../icons/navigation/IconDelete.vue.cjs");
16
16
  const auth = require("../../../auth/views/store/auth.cjs");
@@ -1 +1 @@
1
- {"version":3,"file":"Members.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/pages/Members.vue"],"sourcesContent":["<template>\n <div class=\"pd-thin\">\n <SectionPageTitle\n title=\"Members\"\n @update:tabs_current=\"(update) => tab = update\"\n :tabs_current=\"tab\"\n :tabs=\"[\n { name: `Members (${organization.state.current.numberOfMembers || 0})`, value: 'members' },\n { name: 'Departments', value: 'departments' },\n { name: 'Invites', value: 'invites' }\n ]\"\n :actions=\"[\n { method: openMembersAddPopup, label: 'Invite members' }\n ]\"\n class=\"mn-b-small bg-light bg-light radius-big\"\n />\n\n <Popup \n title=\"Add members\"\n @close-popup=\"closeMembersAddPopup\" \n :isPopupOpen=\"isOpenMembersAddPopup\"\n class=\"bg-white w-min-30r w-max-30r radius-big pd-medium\"\n >\n <MembersAdd \n text=\"Please enter your email or phone number to send an invitation link:\"\n :organization=\"organizationData\"\n @send-invite=\"handleSendInvite\"\n />\n </Popup> \n\n <Feed\n v-if=\"tab === 'departments'\"\n :states=\"{\n empty: {\n title: 'No Departments Found',\n description: 'Currently, there are no departments available.',\n action: 'Add department',\n callback: () => $router.push(`/organizations/${route.params._id}/departments/create`)\n }\n }\"\n :store=\"{\n read: (options) => departments.actions.read(options),\n state: null\n }\"\n :options=\"{\n organization: route.params._id,\n user: auth.state.user._id,\n }\"\n v-slot=\"{ \n items \n }\"\n >\n <CardDepartment\n v-for=\"(department, index) in items\"\n :key=\"index\"\n :department=\"department\"\n :organization=\"route.params._id\"\n class=\"radius-semi bg-light pos-relative mn-b-thin\"\n />\n\n </Feed>\n <router-link\n v-if=\"tab === 'departments' && departments.state.departments.length > 0\"\n :to=\"{\n path: `/organizations/${route.params._id}/departments/create`\n }\"\n class=\"d-block flex-center flex uppercase t-semi bg-main w-100 pd-small radius-extra\"\n >\n Add department\n </router-link>\n <!-- Members -->\n <div \n v-if=\"tab === 'members'\"\n class=\"cols-1 gap-thin\"\n >\n <Feed\n :search=\"true\"\n :states=\"{\n empty: {\n title: 'No Members Found',\n description: 'Currently, there are no members.'\n }\n }\"\n :store=\"{\n read: (options) => memberships.actions.read(options)\n }\"\n :options=\"{\n target: route.params._id,\n role: ['member','owner']\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"gap-thin cols-1\"\n >\n <CardUser \n v-for=\"(member,index) in items\" \n :key=\"index\" \n :user=\"member\"\n :_id=\"member.user._id\"\n :photo=\"member.user.profile.photo\" \n :phone=\"member.user.phone\"\n :email=\"member.user.email\"\n :name=\"member.user.profile.name || 'No name'\"\n :role=\"member.label || member.role\"\n @click=\"$router.push(`/profile/${member.user._id}`)\" \n :action=\" member.role !== 'owner' ? {\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeMember(index, member)\n } : null\"\n class=\"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium\"\n />\n </Feed>\n </div>\n <!-- Invites -->\n <div \n v-if=\"tab === 'invites'\"\n > \n <Feed\n v-model:items=\"invitesState\"\n :states=\"{\n empty: {\n title: 'No Invites Found',\n description: 'Currently, there are no members.'\n }\n }\"\n :store=\"{\n read: (options) => invites.actions.read(options)\n }\"\n :options=\"{\n owner: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"gap-thin cols-1\"\n >\n <CardUser \n v-for=\"invite in items\" \n :key=\"index\" \n :user=\"{ type: 'invite'} \"\n :name=\"invite.email || invite.phone\"\n :role=\"invite.status\"\n :action=\"{\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeInvite(index, invite)\n }\"\n class=\"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium\"\n />\n </Feed>\n </div>\n \n </div>\n</template>\n\n<script setup>\nimport { ref, computed, onMounted } from 'vue';\nimport { useRoute, useRouter } from 'vue-router'\n\nimport Feed from '@pf/src/components/Feed/Feed.vue'\nimport Tab from '@pf/src/components/Tab/Tab.vue'\nimport Block from '@pf/src/components/Block/Block.vue'\nimport Popup from '@pf/src/components/Popup/Popup.vue';\n\nimport SectionPageTitle from '@pf/src/modules/globals/views/components/sections/SectionPageTitle.vue'\nimport PlaceholderUserpic from '@pf/src/modules/icons/placeholders/PlaceholderUserpic.vue'\n\nimport MembersAdd from '@pf/src/modules/organizations/components/sections/MembersAdd.vue';\n\n// Mobile Module\nimport Menu from '@pf/src/components/Menu/Menu.vue'\nimport MenuItem from '@pf/src/components/Menu/MenuItem.vue'\n\nimport CardUser from '@pf/src/modules/users/components/blocks/CardUser.vue';\nimport CardDepartment from '@pf/src/modules/organizations/components/blocks/CardDepartment.vue';\n\nimport IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'\n\nimport * as auth from '@pf/src/modules/auth/views/store/auth'\nimport * as globals from '@pf/src/modules/globals/views/store/globals'\nimport * as invites from '@pf/src/modules/organizations/store/invites';\nimport * as memberships from '@pf/src/modules/organizations/store/memberships';\nimport * as organization from '@pf/src/modules/organizations/store/organizations'\nimport * as departments from '@pf/src/modules/organizations/store/departments';\n\nconst route = useRoute()\nconst router = useRouter()\nconst organizationData = ref(null)\n\n// Tab logic\nconst tab = ref('members')\n// States\nconst invitesState = ref([])\n// Popup\nconst isOpenMembersAddPopup = ref(false);\n\nfunction openMembersAddPopup() {\n isOpenMembersAddPopup.value = true;\n}\n\nfunction closeMembersAddPopup() {\n isOpenMembersAddPopup.value = false;\n}\n\nonMounted(async () => {\n organizationData.value = (await organization.actions.read({_id: route.params._id, user: auth.state.user._id}))[0]\n ;\n})\n\nconst FirstLevelDepartments = computed(() => {\n const departmentsState = departments.state.departments;\n\n const subdepartmentIds = departmentsState.flatMap(department =>\n department.subdepartments.map(subdepartment => subdepartment._id)\n );\n\n return departmentsState.filter(department =>\n !subdepartmentIds.includes(department._id)\n );\n});\n\nasync function handleSendInvite(list, resolve, reject) {\n try {\n const response = await invites.actions.create({\n owner: {\n type: 'Organization',\n target: organizationData.value._id\n },\n creator: {\n type: 'User',\n target: auth.state.user._id\n },\n invites: list,\n });\n for (let invite of response.createdInvites) {\n globals.actions.add(invitesState.value, invite)\n }\n closeMembersAddPopup();\n resolve(); // Вызываем resolve, когда все операции завершены успешно\n } catch (error) {\n reject(error); // Вызываем reject, если произошла ошибка\n }\n}\n\nasync function removeMember(index,member) {\n if (confirm(\"Confirm remove of member\") == true) {\n memberships.state.memberships.splice(index, 1);\n await memberships.actions.delete(member);\n } \n}\n\nasync function removeInvite(index,invite) {\n if (confirm(\"Confirm remove of member\") == true) {\n globals.actions.delete(invitesState.value, invite)\n await invites.actions.delete(invite._id);\n }\n}\n</script>\n\n<style scoped>\n</style>\n"],"names":["useRoute","useRouter","ref","onMounted","organization.actions","auth.state","computed","departments.state","invites.actions","globals.actions","memberships.state","memberships.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+LA,UAAM,QAAUA,UAAAA,SAAU;AACTC,cAAAA,UAAW;AAC5B,UAAM,mBAAmBC,IAAG,IAAC,IAAI;AAGjC,UAAM,MAAMA,IAAG,IAAC,SAAS;AAEzB,UAAM,eAAeA,IAAG,IAAC,EAAE;AAE3B,UAAM,wBAAwBA,IAAAA,IAAI,KAAK;AAEvC,aAAS,sBAAsB;AAC7B,4BAAsB,QAAQ;AAAA,IAChC;AAEA,aAAS,uBAAuB;AAC9B,4BAAsB,QAAQ;AAAA,IAChC;AAEAC,QAAAA,UAAU,YAAY;AACpB,uBAAiB,SAAS,MAAMC,cAAoB,QAAC,KAAK,EAAC,KAAK,MAAM,OAAO,KAAK,MAAMC,KAAU,MAAC,KAAK,IAAG,CAAC,GAAG,CAAC;AAAA,IAElH,CAAC;AAE6BC,QAAAA,SAAS,MAAM;AAC3C,YAAM,mBAAmBC,YAAiB,MAAC;AAE3C,YAAM,mBAAmB,iBAAiB;AAAA,QAAQ,gBAChD,WAAW,eAAe,IAAI,mBAAiB,cAAc,GAAG;AAAA,MACpE;AAEE,aAAO,iBAAiB;AAAA,QAAO,gBAC7B,CAAC,iBAAiB,SAAS,WAAW,GAAG;AAAA,MAC7C;AAAA,IACA,CAAC;AAED,mBAAe,iBAAiB,MAAM,SAAS,QAAQ;AACrD,UAAI;AACF,cAAM,WAAW,MAAMC,QAAe,QAAC,OAAO;AAAA,UAC5C,OAAO;AAAA,YACL,MAAM;AAAA,YACN,QAAQ,iBAAiB,MAAM;AAAA,UAChC;AAAA,UACD,SAAS;AAAA,YACP,MAAM;AAAA,YACN,QAAQH,KAAAA,MAAW,KAAK;AAAA,UACzB;AAAA,UACD,SAAS;AAAA,QACf,CAAK;AACD,iBAAS,UAAU,SAAS,gBAAgB;AAC1CI,kBAAAA,QAAgB,IAAI,aAAa,OAAO,MAAM;AAAA,QAC/C;AACD;AACA;MACD,SAAQ,OAAO;AACd,eAAO,KAAK;AAAA,MACb;AAAA,IACH;AAEA,mBAAe,aAAa,OAAM,QAAQ;AACxC,UAAI,QAAQ,0BAA0B,KAAK,MAAM;AAC/CC,oBAAAA,MAAkB,YAAY,OAAO,OAAO,CAAC;AAC7C,cAAMC,YAAmB,QAAC,OAAO,MAAM;AAAA,MACxC;AAAA,IACH;AAEA,mBAAe,aAAa,OAAM,QAAQ;AACxC,UAAI,QAAQ,0BAA0B,KAAK,MAAM;AAC/CF,gBAAAA,QAAgB,OAAO,aAAa,OAAO,MAAM;AACjD,cAAMD,gBAAgB,OAAO,OAAO,GAAG;AAAA,MACxC;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Members.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/pages/Members.vue"],"sourcesContent":["<template>\n <div class=\"pd-thin\">\n <SectionPageTitle\n title=\"Members\"\n @update:tabs_current=\"(update) => tab = update\"\n :tabs_current=\"tab\"\n :tabs=\"[\n { name: `Members (${organization.state.current.numberOfMembers || 0})`, value: 'members' },\n { name: 'Departments', value: 'departments' },\n { name: 'Invites', value: 'invites' }\n ]\"\n :actions=\"[\n { method: openMembersAddPopup, label: 'Invite members' }\n ]\"\n class=\"mn-b-small bg-light bg-light radius-big\"\n />\n\n <Popup \n title=\"Add members\"\n @close-popup=\"closeMembersAddPopup\" \n :isPopupOpen=\"isOpenMembersAddPopup\"\n class=\"bg-white w-min-30r w-max-30r radius-big pd-medium\"\n >\n <MembersAdd \n text=\"Please enter your email or phone number to send an invitation link:\"\n :organization=\"organizationData\"\n @send-invite=\"handleSendInvite\"\n />\n </Popup> \n\n <Feed\n v-if=\"tab === 'departments'\"\n :states=\"{\n empty: {\n title: 'No Departments Found',\n description: 'Currently, there are no departments available.',\n action: 'Add department',\n callback: () => $router.push(`/organizations/${route.params._id}/departments/create`)\n }\n }\"\n :store=\"{\n read: (options) => departments.actions.read(options),\n state: null\n }\"\n :options=\"{\n organization: route.params._id,\n user: auth.state.user._id,\n }\"\n v-slot=\"{ \n items \n }\"\n >\n <CardDepartment\n v-for=\"(department, index) in items\"\n :key=\"index\"\n :department=\"department\"\n :organization=\"route.params._id\"\n class=\"radius-semi bg-light pos-relative mn-b-thin\"\n />\n\n </Feed>\n <router-link\n v-if=\"tab === 'departments' && departments.state.departments.length > 0\"\n :to=\"{\n path: `/organizations/${route.params._id}/departments/create`\n }\"\n class=\"d-block flex-center flex uppercase t-semi bg-main w-100 pd-small radius-extra\"\n >\n Add department\n </router-link>\n <!-- Members -->\n <div \n v-if=\"tab === 'members'\"\n class=\"cols-1 gap-thin\"\n >\n <Feed\n :search=\"true\"\n :states=\"{\n empty: {\n title: 'No Members Found',\n description: 'Currently, there are no members.'\n }\n }\"\n :store=\"{\n read: (options) => memberships.actions.read(options)\n }\"\n :options=\"{\n target: route.params._id,\n role: ['member','owner']\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"gap-thin cols-1\"\n >\n <CardUser \n v-for=\"(member,index) in items\" \n :key=\"index\" \n :user=\"member\"\n :_id=\"member.user._id\"\n :photo=\"member.user.profile.photo\" \n :phone=\"member.user.phone\"\n :email=\"member.user.email\"\n :name=\"member.user.profile.name || 'No name'\"\n :role=\"member.label || member.role\"\n @click=\"$router.push(`/profile/${member.user._id}`)\" \n :action=\" member.role !== 'owner' ? {\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeMember(index, member)\n } : null\"\n class=\"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium\"\n />\n </Feed>\n </div>\n <!-- Invites -->\n <div \n v-if=\"tab === 'invites'\"\n > \n <Feed\n v-model:items=\"invitesState\"\n :states=\"{\n empty: {\n title: 'No Invites Found',\n description: 'Currently, there are no members.'\n }\n }\"\n :store=\"{\n read: (options) => invites.actions.read(options)\n }\"\n :options=\"{\n owner: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"gap-thin cols-1\"\n >\n <CardUser \n v-for=\"invite in items\" \n :key=\"index\" \n :user=\"{ type: 'invite'} \"\n :name=\"invite.email || invite.phone\"\n :role=\"invite.status\"\n :action=\"{\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeInvite(index, invite)\n }\"\n class=\"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium\"\n />\n </Feed>\n </div>\n \n </div>\n</template>\n\n<script setup>\nimport { ref, computed, onMounted } from 'vue';\nimport { useRoute, useRouter } from 'vue-router'\n\nimport Feed from '@pf/src/components/Feed/Feed.vue'\nimport Tab from '@pf/src/components/Tab/Tab.vue'\nimport Block from '@pf/src/components/Block/Block.vue'\nimport Popup from '@pf/src/components/Popup/Popup.vue';\n\nimport SectionPageTitle from '@pf/src/modules/globals/views/components/sections/SectionPageTitle.vue'\nimport PlaceholderUserpic from '@pf/src/modules/icons/placeholders/PlaceholderUserpic.vue'\n\nimport MembersAdd from '@pf/src/modules/organizations/components/sections/MembersAdd.vue';\n\n// Mobile Module\nimport Menu from '@pf/src/components/Menu/Menu.vue'\nimport MenuItem from '@pf/src/components/Menu/MenuItem.vue'\n\nimport CardUser from '@pf/src/modules/auth/views/components/blocks/CardUser.vue';\nimport CardDepartment from '@pf/src/modules/organizations/components/blocks/CardDepartment.vue';\n\nimport IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'\n\nimport * as auth from '@pf/src/modules/auth/views/store/auth'\nimport * as globals from '@pf/src/modules/globals/views/store/globals'\nimport * as invites from '@pf/src/modules/organizations/store/invites';\nimport * as memberships from '@pf/src/modules/organizations/store/memberships';\nimport * as organization from '@pf/src/modules/organizations/store/organizations'\nimport * as departments from '@pf/src/modules/organizations/store/departments';\n\nconst route = useRoute()\nconst router = useRouter()\nconst organizationData = ref(null)\n\n// Tab logic\nconst tab = ref('members')\n// States\nconst invitesState = ref([])\n// Popup\nconst isOpenMembersAddPopup = ref(false);\n\nfunction openMembersAddPopup() {\n isOpenMembersAddPopup.value = true;\n}\n\nfunction closeMembersAddPopup() {\n isOpenMembersAddPopup.value = false;\n}\n\nonMounted(async () => {\n organizationData.value = (await organization.actions.read({_id: route.params._id, user: auth.state.user._id}))[0]\n ;\n})\n\nconst FirstLevelDepartments = computed(() => {\n const departmentsState = departments.state.departments;\n\n const subdepartmentIds = departmentsState.flatMap(department =>\n department.subdepartments.map(subdepartment => subdepartment._id)\n );\n\n return departmentsState.filter(department =>\n !subdepartmentIds.includes(department._id)\n );\n});\n\nasync function handleSendInvite(list, resolve, reject) {\n try {\n const response = await invites.actions.create({\n owner: {\n type: 'Organization',\n target: organizationData.value._id\n },\n creator: {\n type: 'User',\n target: auth.state.user._id\n },\n invites: list,\n });\n for (let invite of response.createdInvites) {\n globals.actions.add(invitesState.value, invite)\n }\n closeMembersAddPopup();\n resolve(); // Вызываем resolve, когда все операции завершены успешно\n } catch (error) {\n reject(error); // Вызываем reject, если произошла ошибка\n }\n}\n\nasync function removeMember(index,member) {\n if (confirm(\"Confirm remove of member\") == true) {\n memberships.state.memberships.splice(index, 1);\n await memberships.actions.delete(member);\n } \n}\n\nasync function removeInvite(index,invite) {\n if (confirm(\"Confirm remove of member\") == true) {\n globals.actions.delete(invitesState.value, invite)\n await invites.actions.delete(invite._id);\n }\n}\n</script>\n\n<style scoped>\n</style>\n"],"names":["useRoute","useRouter","ref","onMounted","organization.actions","auth.state","computed","departments.state","invites.actions","globals.actions","memberships.state","memberships.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+LA,UAAM,QAAUA,UAAAA,SAAU;AACTC,cAAAA,UAAW;AAC5B,UAAM,mBAAmBC,IAAG,IAAC,IAAI;AAGjC,UAAM,MAAMA,IAAG,IAAC,SAAS;AAEzB,UAAM,eAAeA,IAAG,IAAC,EAAE;AAE3B,UAAM,wBAAwBA,IAAAA,IAAI,KAAK;AAEvC,aAAS,sBAAsB;AAC7B,4BAAsB,QAAQ;AAAA,IAChC;AAEA,aAAS,uBAAuB;AAC9B,4BAAsB,QAAQ;AAAA,IAChC;AAEAC,QAAAA,UAAU,YAAY;AACpB,uBAAiB,SAAS,MAAMC,cAAoB,QAAC,KAAK,EAAC,KAAK,MAAM,OAAO,KAAK,MAAMC,KAAU,MAAC,KAAK,IAAG,CAAC,GAAG,CAAC;AAAA,IAElH,CAAC;AAE6BC,QAAAA,SAAS,MAAM;AAC3C,YAAM,mBAAmBC,YAAiB,MAAC;AAE3C,YAAM,mBAAmB,iBAAiB;AAAA,QAAQ,gBAChD,WAAW,eAAe,IAAI,mBAAiB,cAAc,GAAG;AAAA,MACpE;AAEE,aAAO,iBAAiB;AAAA,QAAO,gBAC7B,CAAC,iBAAiB,SAAS,WAAW,GAAG;AAAA,MAC7C;AAAA,IACA,CAAC;AAED,mBAAe,iBAAiB,MAAM,SAAS,QAAQ;AACrD,UAAI;AACF,cAAM,WAAW,MAAMC,QAAe,QAAC,OAAO;AAAA,UAC5C,OAAO;AAAA,YACL,MAAM;AAAA,YACN,QAAQ,iBAAiB,MAAM;AAAA,UAChC;AAAA,UACD,SAAS;AAAA,YACP,MAAM;AAAA,YACN,QAAQH,KAAAA,MAAW,KAAK;AAAA,UACzB;AAAA,UACD,SAAS;AAAA,QACf,CAAK;AACD,iBAAS,UAAU,SAAS,gBAAgB;AAC1CI,kBAAAA,QAAgB,IAAI,aAAa,OAAO,MAAM;AAAA,QAC/C;AACD;AACA;MACD,SAAQ,OAAO;AACd,eAAO,KAAK;AAAA,MACb;AAAA,IACH;AAEA,mBAAe,aAAa,OAAM,QAAQ;AACxC,UAAI,QAAQ,0BAA0B,KAAK,MAAM;AAC/CC,oBAAAA,MAAkB,YAAY,OAAO,OAAO,CAAC;AAC7C,cAAMC,YAAmB,QAAC,OAAO,MAAM;AAAA,MACxC;AAAA,IACH;AAEA,mBAAe,aAAa,OAAM,QAAQ;AACxC,UAAI,QAAQ,0BAA0B,KAAK,MAAM;AAC/CF,gBAAAA,QAAgB,OAAO,aAAa,OAAO,MAAM;AACjD,cAAMD,gBAAgB,OAAO,OAAO,GAAG;AAAA,MACxC;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -3,12 +3,12 @@ import { useRoute, useRouter } from "vue-router";
3
3
  import _sfc_main$4 from "../../../../components/Feed/Feed.vue.js";
4
4
  /* empty css */
5
5
  /* empty css */
6
- import _sfc_main$2 from "../../../../components/Popup/Popup.vue.js";
6
+ import _sfc_main$2 from "../../../../components/Popup/Popup.vue2.js";
7
7
  import _sfc_main$1 from "../../../globals/views/components/sections/SectionPageTitle.vue.js";
8
8
  import _sfc_main$3 from "../sections/MembersAdd.vue.js";
9
9
  /* empty css */
10
10
  import "../../../../components/Menu/MenuItem.vue.js";
11
- import _sfc_main$5 from "../../../users/components/blocks/CardUser.vue.js";
11
+ import _sfc_main$5 from "../../../auth/views/components/blocks/CardUser.vue.js";
12
12
  import CardDepartment from "../blocks/CardDepartment.vue.js";
13
13
  import _sfc_main$6 from "../../../icons/navigation/IconDelete.vue.js";
14
14
  import { state } from "../../../auth/views/store/auth.js";
@@ -1 +1 @@
1
- {"version":3,"file":"Members.vue.js","sources":["../../../../../../../src/modules/organizations/components/pages/Members.vue"],"sourcesContent":["<template>\n <div class=\"pd-thin\">\n <SectionPageTitle\n title=\"Members\"\n @update:tabs_current=\"(update) => tab = update\"\n :tabs_current=\"tab\"\n :tabs=\"[\n { name: `Members (${organization.state.current.numberOfMembers || 0})`, value: 'members' },\n { name: 'Departments', value: 'departments' },\n { name: 'Invites', value: 'invites' }\n ]\"\n :actions=\"[\n { method: openMembersAddPopup, label: 'Invite members' }\n ]\"\n class=\"mn-b-small bg-light bg-light radius-big\"\n />\n\n <Popup \n title=\"Add members\"\n @close-popup=\"closeMembersAddPopup\" \n :isPopupOpen=\"isOpenMembersAddPopup\"\n class=\"bg-white w-min-30r w-max-30r radius-big pd-medium\"\n >\n <MembersAdd \n text=\"Please enter your email or phone number to send an invitation link:\"\n :organization=\"organizationData\"\n @send-invite=\"handleSendInvite\"\n />\n </Popup> \n\n <Feed\n v-if=\"tab === 'departments'\"\n :states=\"{\n empty: {\n title: 'No Departments Found',\n description: 'Currently, there are no departments available.',\n action: 'Add department',\n callback: () => $router.push(`/organizations/${route.params._id}/departments/create`)\n }\n }\"\n :store=\"{\n read: (options) => departments.actions.read(options),\n state: null\n }\"\n :options=\"{\n organization: route.params._id,\n user: auth.state.user._id,\n }\"\n v-slot=\"{ \n items \n }\"\n >\n <CardDepartment\n v-for=\"(department, index) in items\"\n :key=\"index\"\n :department=\"department\"\n :organization=\"route.params._id\"\n class=\"radius-semi bg-light pos-relative mn-b-thin\"\n />\n\n </Feed>\n <router-link\n v-if=\"tab === 'departments' && departments.state.departments.length > 0\"\n :to=\"{\n path: `/organizations/${route.params._id}/departments/create`\n }\"\n class=\"d-block flex-center flex uppercase t-semi bg-main w-100 pd-small radius-extra\"\n >\n Add department\n </router-link>\n <!-- Members -->\n <div \n v-if=\"tab === 'members'\"\n class=\"cols-1 gap-thin\"\n >\n <Feed\n :search=\"true\"\n :states=\"{\n empty: {\n title: 'No Members Found',\n description: 'Currently, there are no members.'\n }\n }\"\n :store=\"{\n read: (options) => memberships.actions.read(options)\n }\"\n :options=\"{\n target: route.params._id,\n role: ['member','owner']\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"gap-thin cols-1\"\n >\n <CardUser \n v-for=\"(member,index) in items\" \n :key=\"index\" \n :user=\"member\"\n :_id=\"member.user._id\"\n :photo=\"member.user.profile.photo\" \n :phone=\"member.user.phone\"\n :email=\"member.user.email\"\n :name=\"member.user.profile.name || 'No name'\"\n :role=\"member.label || member.role\"\n @click=\"$router.push(`/profile/${member.user._id}`)\" \n :action=\" member.role !== 'owner' ? {\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeMember(index, member)\n } : null\"\n class=\"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium\"\n />\n </Feed>\n </div>\n <!-- Invites -->\n <div \n v-if=\"tab === 'invites'\"\n > \n <Feed\n v-model:items=\"invitesState\"\n :states=\"{\n empty: {\n title: 'No Invites Found',\n description: 'Currently, there are no members.'\n }\n }\"\n :store=\"{\n read: (options) => invites.actions.read(options)\n }\"\n :options=\"{\n owner: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"gap-thin cols-1\"\n >\n <CardUser \n v-for=\"invite in items\" \n :key=\"index\" \n :user=\"{ type: 'invite'} \"\n :name=\"invite.email || invite.phone\"\n :role=\"invite.status\"\n :action=\"{\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeInvite(index, invite)\n }\"\n class=\"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium\"\n />\n </Feed>\n </div>\n \n </div>\n</template>\n\n<script setup>\nimport { ref, computed, onMounted } from 'vue';\nimport { useRoute, useRouter } from 'vue-router'\n\nimport Feed from '@pf/src/components/Feed/Feed.vue'\nimport Tab from '@pf/src/components/Tab/Tab.vue'\nimport Block from '@pf/src/components/Block/Block.vue'\nimport Popup from '@pf/src/components/Popup/Popup.vue';\n\nimport SectionPageTitle from '@pf/src/modules/globals/views/components/sections/SectionPageTitle.vue'\nimport PlaceholderUserpic from '@pf/src/modules/icons/placeholders/PlaceholderUserpic.vue'\n\nimport MembersAdd from '@pf/src/modules/organizations/components/sections/MembersAdd.vue';\n\n// Mobile Module\nimport Menu from '@pf/src/components/Menu/Menu.vue'\nimport MenuItem from '@pf/src/components/Menu/MenuItem.vue'\n\nimport CardUser from '@pf/src/modules/users/components/blocks/CardUser.vue';\nimport CardDepartment from '@pf/src/modules/organizations/components/blocks/CardDepartment.vue';\n\nimport IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'\n\nimport * as auth from '@pf/src/modules/auth/views/store/auth'\nimport * as globals from '@pf/src/modules/globals/views/store/globals'\nimport * as invites from '@pf/src/modules/organizations/store/invites';\nimport * as memberships from '@pf/src/modules/organizations/store/memberships';\nimport * as organization from '@pf/src/modules/organizations/store/organizations'\nimport * as departments from '@pf/src/modules/organizations/store/departments';\n\nconst route = useRoute()\nconst router = useRouter()\nconst organizationData = ref(null)\n\n// Tab logic\nconst tab = ref('members')\n// States\nconst invitesState = ref([])\n// Popup\nconst isOpenMembersAddPopup = ref(false);\n\nfunction openMembersAddPopup() {\n isOpenMembersAddPopup.value = true;\n}\n\nfunction closeMembersAddPopup() {\n isOpenMembersAddPopup.value = false;\n}\n\nonMounted(async () => {\n organizationData.value = (await organization.actions.read({_id: route.params._id, user: auth.state.user._id}))[0]\n ;\n})\n\nconst FirstLevelDepartments = computed(() => {\n const departmentsState = departments.state.departments;\n\n const subdepartmentIds = departmentsState.flatMap(department =>\n department.subdepartments.map(subdepartment => subdepartment._id)\n );\n\n return departmentsState.filter(department =>\n !subdepartmentIds.includes(department._id)\n );\n});\n\nasync function handleSendInvite(list, resolve, reject) {\n try {\n const response = await invites.actions.create({\n owner: {\n type: 'Organization',\n target: organizationData.value._id\n },\n creator: {\n type: 'User',\n target: auth.state.user._id\n },\n invites: list,\n });\n for (let invite of response.createdInvites) {\n globals.actions.add(invitesState.value, invite)\n }\n closeMembersAddPopup();\n resolve(); // Вызываем resolve, когда все операции завершены успешно\n } catch (error) {\n reject(error); // Вызываем reject, если произошла ошибка\n }\n}\n\nasync function removeMember(index,member) {\n if (confirm(\"Confirm remove of member\") == true) {\n memberships.state.memberships.splice(index, 1);\n await memberships.actions.delete(member);\n } \n}\n\nasync function removeInvite(index,invite) {\n if (confirm(\"Confirm remove of member\") == true) {\n globals.actions.delete(invitesState.value, invite)\n await invites.actions.delete(invite._id);\n }\n}\n</script>\n\n<style scoped>\n</style>\n"],"names":["organization.actions","auth.state","departments.state","invites.actions","globals.actions","memberships.state","memberships.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+LA,UAAM,QAAU,SAAU;AACT,cAAW;AAC5B,UAAM,mBAAmB,IAAI,IAAI;AAGjC,UAAM,MAAM,IAAI,SAAS;AAEzB,UAAM,eAAe,IAAI,EAAE;AAE3B,UAAM,wBAAwB,IAAI,KAAK;AAEvC,aAAS,sBAAsB;AAC7B,4BAAsB,QAAQ;AAAA,IAChC;AAEA,aAAS,uBAAuB;AAC9B,4BAAsB,QAAQ;AAAA,IAChC;AAEA,cAAU,YAAY;AACpB,uBAAiB,SAAS,MAAMA,QAAqB,KAAK,EAAC,KAAK,MAAM,OAAO,KAAK,MAAMC,MAAW,KAAK,IAAG,CAAC,GAAG,CAAC;AAAA,IAElH,CAAC;AAE6B,aAAS,MAAM;AAC3C,YAAM,mBAAmBC,QAAkB;AAE3C,YAAM,mBAAmB,iBAAiB;AAAA,QAAQ,gBAChD,WAAW,eAAe,IAAI,mBAAiB,cAAc,GAAG;AAAA,MACpE;AAEE,aAAO,iBAAiB;AAAA,QAAO,gBAC7B,CAAC,iBAAiB,SAAS,WAAW,GAAG;AAAA,MAC7C;AAAA,IACA,CAAC;AAED,mBAAe,iBAAiB,MAAM,SAAS,QAAQ;AACrD,UAAI;AACF,cAAM,WAAW,MAAMC,UAAgB,OAAO;AAAA,UAC5C,OAAO;AAAA,YACL,MAAM;AAAA,YACN,QAAQ,iBAAiB,MAAM;AAAA,UAChC;AAAA,UACD,SAAS;AAAA,YACP,MAAM;AAAA,YACN,QAAQF,MAAW,KAAK;AAAA,UACzB;AAAA,UACD,SAAS;AAAA,QACf,CAAK;AACD,iBAAS,UAAU,SAAS,gBAAgB;AAC1CG,oBAAgB,IAAI,aAAa,OAAO,MAAM;AAAA,QAC/C;AACD;AACA;MACD,SAAQ,OAAO;AACd,eAAO,KAAK;AAAA,MACb;AAAA,IACH;AAEA,mBAAe,aAAa,OAAM,QAAQ;AACxC,UAAI,QAAQ,0BAA0B,KAAK,MAAM;AAC/CC,gBAAkB,YAAY,OAAO,OAAO,CAAC;AAC7C,cAAMC,UAAoB,OAAO,MAAM;AAAA,MACxC;AAAA,IACH;AAEA,mBAAe,aAAa,OAAM,QAAQ;AACxC,UAAI,QAAQ,0BAA0B,KAAK,MAAM;AAC/CF,kBAAgB,OAAO,aAAa,OAAO,MAAM;AACjD,cAAMD,UAAgB,OAAO,OAAO,GAAG;AAAA,MACxC;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Members.vue.js","sources":["../../../../../../../src/modules/organizations/components/pages/Members.vue"],"sourcesContent":["<template>\n <div class=\"pd-thin\">\n <SectionPageTitle\n title=\"Members\"\n @update:tabs_current=\"(update) => tab = update\"\n :tabs_current=\"tab\"\n :tabs=\"[\n { name: `Members (${organization.state.current.numberOfMembers || 0})`, value: 'members' },\n { name: 'Departments', value: 'departments' },\n { name: 'Invites', value: 'invites' }\n ]\"\n :actions=\"[\n { method: openMembersAddPopup, label: 'Invite members' }\n ]\"\n class=\"mn-b-small bg-light bg-light radius-big\"\n />\n\n <Popup \n title=\"Add members\"\n @close-popup=\"closeMembersAddPopup\" \n :isPopupOpen=\"isOpenMembersAddPopup\"\n class=\"bg-white w-min-30r w-max-30r radius-big pd-medium\"\n >\n <MembersAdd \n text=\"Please enter your email or phone number to send an invitation link:\"\n :organization=\"organizationData\"\n @send-invite=\"handleSendInvite\"\n />\n </Popup> \n\n <Feed\n v-if=\"tab === 'departments'\"\n :states=\"{\n empty: {\n title: 'No Departments Found',\n description: 'Currently, there are no departments available.',\n action: 'Add department',\n callback: () => $router.push(`/organizations/${route.params._id}/departments/create`)\n }\n }\"\n :store=\"{\n read: (options) => departments.actions.read(options),\n state: null\n }\"\n :options=\"{\n organization: route.params._id,\n user: auth.state.user._id,\n }\"\n v-slot=\"{ \n items \n }\"\n >\n <CardDepartment\n v-for=\"(department, index) in items\"\n :key=\"index\"\n :department=\"department\"\n :organization=\"route.params._id\"\n class=\"radius-semi bg-light pos-relative mn-b-thin\"\n />\n\n </Feed>\n <router-link\n v-if=\"tab === 'departments' && departments.state.departments.length > 0\"\n :to=\"{\n path: `/organizations/${route.params._id}/departments/create`\n }\"\n class=\"d-block flex-center flex uppercase t-semi bg-main w-100 pd-small radius-extra\"\n >\n Add department\n </router-link>\n <!-- Members -->\n <div \n v-if=\"tab === 'members'\"\n class=\"cols-1 gap-thin\"\n >\n <Feed\n :search=\"true\"\n :states=\"{\n empty: {\n title: 'No Members Found',\n description: 'Currently, there are no members.'\n }\n }\"\n :store=\"{\n read: (options) => memberships.actions.read(options)\n }\"\n :options=\"{\n target: route.params._id,\n role: ['member','owner']\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"gap-thin cols-1\"\n >\n <CardUser \n v-for=\"(member,index) in items\" \n :key=\"index\" \n :user=\"member\"\n :_id=\"member.user._id\"\n :photo=\"member.user.profile.photo\" \n :phone=\"member.user.phone\"\n :email=\"member.user.email\"\n :name=\"member.user.profile.name || 'No name'\"\n :role=\"member.label || member.role\"\n @click=\"$router.push(`/profile/${member.user._id}`)\" \n :action=\" member.role !== 'owner' ? {\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeMember(index, member)\n } : null\"\n class=\"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium\"\n />\n </Feed>\n </div>\n <!-- Invites -->\n <div \n v-if=\"tab === 'invites'\"\n > \n <Feed\n v-model:items=\"invitesState\"\n :states=\"{\n empty: {\n title: 'No Invites Found',\n description: 'Currently, there are no members.'\n }\n }\"\n :store=\"{\n read: (options) => invites.actions.read(options)\n }\"\n :options=\"{\n owner: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"gap-thin cols-1\"\n >\n <CardUser \n v-for=\"invite in items\" \n :key=\"index\" \n :user=\"{ type: 'invite'} \"\n :name=\"invite.email || invite.phone\"\n :role=\"invite.status\"\n :action=\"{\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeInvite(index, invite)\n }\"\n class=\"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium\"\n />\n </Feed>\n </div>\n \n </div>\n</template>\n\n<script setup>\nimport { ref, computed, onMounted } from 'vue';\nimport { useRoute, useRouter } from 'vue-router'\n\nimport Feed from '@pf/src/components/Feed/Feed.vue'\nimport Tab from '@pf/src/components/Tab/Tab.vue'\nimport Block from '@pf/src/components/Block/Block.vue'\nimport Popup from '@pf/src/components/Popup/Popup.vue';\n\nimport SectionPageTitle from '@pf/src/modules/globals/views/components/sections/SectionPageTitle.vue'\nimport PlaceholderUserpic from '@pf/src/modules/icons/placeholders/PlaceholderUserpic.vue'\n\nimport MembersAdd from '@pf/src/modules/organizations/components/sections/MembersAdd.vue';\n\n// Mobile Module\nimport Menu from '@pf/src/components/Menu/Menu.vue'\nimport MenuItem from '@pf/src/components/Menu/MenuItem.vue'\n\nimport CardUser from '@pf/src/modules/auth/views/components/blocks/CardUser.vue';\nimport CardDepartment from '@pf/src/modules/organizations/components/blocks/CardDepartment.vue';\n\nimport IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'\n\nimport * as auth from '@pf/src/modules/auth/views/store/auth'\nimport * as globals from '@pf/src/modules/globals/views/store/globals'\nimport * as invites from '@pf/src/modules/organizations/store/invites';\nimport * as memberships from '@pf/src/modules/organizations/store/memberships';\nimport * as organization from '@pf/src/modules/organizations/store/organizations'\nimport * as departments from '@pf/src/modules/organizations/store/departments';\n\nconst route = useRoute()\nconst router = useRouter()\nconst organizationData = ref(null)\n\n// Tab logic\nconst tab = ref('members')\n// States\nconst invitesState = ref([])\n// Popup\nconst isOpenMembersAddPopup = ref(false);\n\nfunction openMembersAddPopup() {\n isOpenMembersAddPopup.value = true;\n}\n\nfunction closeMembersAddPopup() {\n isOpenMembersAddPopup.value = false;\n}\n\nonMounted(async () => {\n organizationData.value = (await organization.actions.read({_id: route.params._id, user: auth.state.user._id}))[0]\n ;\n})\n\nconst FirstLevelDepartments = computed(() => {\n const departmentsState = departments.state.departments;\n\n const subdepartmentIds = departmentsState.flatMap(department =>\n department.subdepartments.map(subdepartment => subdepartment._id)\n );\n\n return departmentsState.filter(department =>\n !subdepartmentIds.includes(department._id)\n );\n});\n\nasync function handleSendInvite(list, resolve, reject) {\n try {\n const response = await invites.actions.create({\n owner: {\n type: 'Organization',\n target: organizationData.value._id\n },\n creator: {\n type: 'User',\n target: auth.state.user._id\n },\n invites: list,\n });\n for (let invite of response.createdInvites) {\n globals.actions.add(invitesState.value, invite)\n }\n closeMembersAddPopup();\n resolve(); // Вызываем resolve, когда все операции завершены успешно\n } catch (error) {\n reject(error); // Вызываем reject, если произошла ошибка\n }\n}\n\nasync function removeMember(index,member) {\n if (confirm(\"Confirm remove of member\") == true) {\n memberships.state.memberships.splice(index, 1);\n await memberships.actions.delete(member);\n } \n}\n\nasync function removeInvite(index,invite) {\n if (confirm(\"Confirm remove of member\") == true) {\n globals.actions.delete(invitesState.value, invite)\n await invites.actions.delete(invite._id);\n }\n}\n</script>\n\n<style scoped>\n</style>\n"],"names":["organization.actions","auth.state","departments.state","invites.actions","globals.actions","memberships.state","memberships.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+LA,UAAM,QAAU,SAAU;AACT,cAAW;AAC5B,UAAM,mBAAmB,IAAI,IAAI;AAGjC,UAAM,MAAM,IAAI,SAAS;AAEzB,UAAM,eAAe,IAAI,EAAE;AAE3B,UAAM,wBAAwB,IAAI,KAAK;AAEvC,aAAS,sBAAsB;AAC7B,4BAAsB,QAAQ;AAAA,IAChC;AAEA,aAAS,uBAAuB;AAC9B,4BAAsB,QAAQ;AAAA,IAChC;AAEA,cAAU,YAAY;AACpB,uBAAiB,SAAS,MAAMA,QAAqB,KAAK,EAAC,KAAK,MAAM,OAAO,KAAK,MAAMC,MAAW,KAAK,IAAG,CAAC,GAAG,CAAC;AAAA,IAElH,CAAC;AAE6B,aAAS,MAAM;AAC3C,YAAM,mBAAmBC,QAAkB;AAE3C,YAAM,mBAAmB,iBAAiB;AAAA,QAAQ,gBAChD,WAAW,eAAe,IAAI,mBAAiB,cAAc,GAAG;AAAA,MACpE;AAEE,aAAO,iBAAiB;AAAA,QAAO,gBAC7B,CAAC,iBAAiB,SAAS,WAAW,GAAG;AAAA,MAC7C;AAAA,IACA,CAAC;AAED,mBAAe,iBAAiB,MAAM,SAAS,QAAQ;AACrD,UAAI;AACF,cAAM,WAAW,MAAMC,UAAgB,OAAO;AAAA,UAC5C,OAAO;AAAA,YACL,MAAM;AAAA,YACN,QAAQ,iBAAiB,MAAM;AAAA,UAChC;AAAA,UACD,SAAS;AAAA,YACP,MAAM;AAAA,YACN,QAAQF,MAAW,KAAK;AAAA,UACzB;AAAA,UACD,SAAS;AAAA,QACf,CAAK;AACD,iBAAS,UAAU,SAAS,gBAAgB;AAC1CG,oBAAgB,IAAI,aAAa,OAAO,MAAM;AAAA,QAC/C;AACD;AACA;MACD,SAAQ,OAAO;AACd,eAAO,KAAK;AAAA,MACb;AAAA,IACH;AAEA,mBAAe,aAAa,OAAM,QAAQ;AACxC,UAAI,QAAQ,0BAA0B,KAAK,MAAM;AAC/CC,gBAAkB,YAAY,OAAO,OAAO,CAAC;AAC7C,cAAMC,UAAoB,OAAO,MAAM;AAAA,MACxC;AAAA,IACH;AAEA,mBAAe,aAAa,OAAM,QAAQ;AACxC,UAAI,QAAQ,0BAA0B,KAAK,MAAM;AAC/CF,kBAAgB,OAAO,aAAa,OAAO,MAAM;AACjD,cAAMD,UAAgB,OAAO,OAAO,GAAG;AAAA,MACxC;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}