@ozdao/prometheus-framework 0.2.133 → 0.2.134

Sign up to get free protection for your applications and to get access to all the features.
Files changed (290) hide show
  1. package/dist/_virtual/alignment-pattern.cjs +1 -0
  2. package/dist/_virtual/alignment-pattern.js +4 -0
  3. package/dist/_virtual/browser.cjs +1 -0
  4. package/dist/_virtual/browser.js +4 -0
  5. package/dist/_virtual/canvas.cjs +1 -0
  6. package/dist/_virtual/canvas.js +4 -0
  7. package/dist/_virtual/dijkstra.cjs +1 -0
  8. package/dist/_virtual/dijkstra.js +4 -0
  9. package/dist/_virtual/error-correction-code.cjs +1 -0
  10. package/dist/_virtual/error-correction-code.js +4 -0
  11. package/dist/_virtual/error-correction-level.cjs +1 -0
  12. package/dist/_virtual/error-correction-level.js +4 -0
  13. package/dist/_virtual/finder-pattern.cjs +1 -0
  14. package/dist/_virtual/finder-pattern.js +4 -0
  15. package/dist/_virtual/format-info.cjs +1 -0
  16. package/dist/_virtual/format-info.js +4 -0
  17. package/dist/_virtual/galois-field.cjs +1 -0
  18. package/dist/_virtual/galois-field.js +4 -0
  19. package/dist/_virtual/mask-pattern.cjs +1 -0
  20. package/dist/_virtual/mask-pattern.js +4 -0
  21. package/dist/_virtual/mode.cjs +1 -0
  22. package/dist/_virtual/mode.js +4 -0
  23. package/dist/_virtual/polynomial.cjs +1 -0
  24. package/dist/_virtual/polynomial.js +4 -0
  25. package/dist/_virtual/qrcode.cjs +1 -0
  26. package/dist/_virtual/qrcode.js +4 -0
  27. package/dist/_virtual/regex.cjs +1 -0
  28. package/dist/_virtual/regex.js +4 -0
  29. package/dist/_virtual/segments.cjs +1 -0
  30. package/dist/_virtual/segments.js +4 -0
  31. package/dist/_virtual/svg-tag.cjs +1 -0
  32. package/dist/_virtual/svg-tag.js +4 -0
  33. package/dist/_virtual/utils.cjs +1 -0
  34. package/dist/_virtual/utils.js +4 -0
  35. package/dist/_virtual/utils2.cjs +1 -0
  36. package/dist/_virtual/utils2.js +4 -0
  37. package/dist/_virtual/version-check.cjs +1 -0
  38. package/dist/_virtual/version-check.js +4 -0
  39. package/dist/_virtual/version.cjs +1 -0
  40. package/dist/_virtual/version.js +4 -0
  41. package/dist/auth.server.js +1 -1
  42. package/dist/auth.server.mjs +1 -1
  43. package/dist/community.server.js +1 -1
  44. package/dist/community.server.mjs +1 -1
  45. package/dist/events.server.js +1 -1
  46. package/dist/events.server.mjs +1 -1
  47. package/dist/files.server.js +1 -1
  48. package/dist/files.server.mjs +1 -1
  49. package/dist/gallery.server.js +1 -1
  50. package/dist/gallery.server.mjs +1 -1
  51. package/dist/index-C-8xOJnM.mjs +244 -0
  52. package/dist/index-CDbtWkBj.js +243 -0
  53. package/dist/main-5IrI2IOV.js +92 -0
  54. package/dist/main-BY2OvGB9.mjs +14509 -0
  55. package/dist/main.css +1 -1
  56. package/dist/middlewares.server.js +1 -1
  57. package/dist/middlewares.server.mjs +1 -1
  58. package/dist/node_modules/dijkstrajs/dijkstra.cjs +1 -0
  59. package/dist/node_modules/dijkstrajs/dijkstra.js +70 -0
  60. package/dist/node_modules/encode-utf8/index.cjs +1 -0
  61. package/dist/node_modules/encode-utf8/index.js +30 -0
  62. package/dist/node_modules/qrcode/lib/browser.cjs +1 -0
  63. package/dist/node_modules/qrcode/lib/browser.js +45 -0
  64. package/dist/node_modules/qrcode/lib/can-promise.cjs +1 -0
  65. package/dist/node_modules/qrcode/lib/can-promise.js +6 -0
  66. package/dist/node_modules/qrcode/lib/core/alignment-pattern.cjs +1 -0
  67. package/dist/node_modules/qrcode/lib/core/alignment-pattern.js +21 -0
  68. package/dist/node_modules/qrcode/lib/core/alphanumeric-data.cjs +1 -0
  69. package/dist/node_modules/qrcode/lib/core/alphanumeric-data.js +73 -0
  70. package/dist/node_modules/qrcode/lib/core/bit-buffer.cjs +1 -0
  71. package/dist/node_modules/qrcode/lib/core/bit-buffer.js +24 -0
  72. package/dist/node_modules/qrcode/lib/core/bit-matrix.cjs +1 -0
  73. package/dist/node_modules/qrcode/lib/core/bit-matrix.js +22 -0
  74. package/dist/node_modules/qrcode/lib/core/byte-data.cjs +1 -0
  75. package/dist/node_modules/qrcode/lib/core/byte-data.js +24 -0
  76. package/dist/node_modules/qrcode/lib/core/error-correction-code.cjs +1 -0
  77. package/dist/node_modules/qrcode/lib/core/error-correction-code.js +359 -0
  78. package/dist/node_modules/qrcode/lib/core/error-correction-level.cjs +1 -0
  79. package/dist/node_modules/qrcode/lib/core/error-correction-level.js +35 -0
  80. package/dist/node_modules/qrcode/lib/core/finder-pattern.cjs +1 -0
  81. package/dist/node_modules/qrcode/lib/core/finder-pattern.js +18 -0
  82. package/dist/node_modules/qrcode/lib/core/format-info.cjs +1 -0
  83. package/dist/node_modules/qrcode/lib/core/format-info.js +14 -0
  84. package/dist/node_modules/qrcode/lib/core/galois-field.cjs +1 -0
  85. package/dist/node_modules/qrcode/lib/core/galois-field.js +22 -0
  86. package/dist/node_modules/qrcode/lib/core/kanji-data.cjs +2 -0
  87. package/dist/node_modules/qrcode/lib/core/kanji-data.js +37 -0
  88. package/dist/node_modules/qrcode/lib/core/mask-pattern.cjs +1 -0
  89. package/dist/node_modules/qrcode/lib/core/mask-pattern.js +96 -0
  90. package/dist/node_modules/qrcode/lib/core/mode.cjs +1 -0
  91. package/dist/node_modules/qrcode/lib/core/mode.js +64 -0
  92. package/dist/node_modules/qrcode/lib/core/numeric-data.cjs +1 -0
  93. package/dist/node_modules/qrcode/lib/core/numeric-data.js +26 -0
  94. package/dist/node_modules/qrcode/lib/core/polynomial.cjs +1 -0
  95. package/dist/node_modules/qrcode/lib/core/polynomial.js +29 -0
  96. package/dist/node_modules/qrcode/lib/core/qrcode.cjs +4 -0
  97. package/dist/node_modules/qrcode/lib/core/qrcode.js +159 -0
  98. package/dist/node_modules/qrcode/lib/core/reed-solomon-encoder.cjs +1 -0
  99. package/dist/node_modules/qrcode/lib/core/reed-solomon-encoder.js +25 -0
  100. package/dist/node_modules/qrcode/lib/core/regex.cjs +2 -0
  101. package/dist/node_modules/qrcode/lib/core/regex.js +24 -0
  102. package/dist/node_modules/qrcode/lib/core/segments.cjs +2 -0
  103. package/dist/node_modules/qrcode/lib/core/segments.js +143 -0
  104. package/dist/node_modules/qrcode/lib/core/utils.cjs +1 -0
  105. package/dist/node_modules/qrcode/lib/core/utils.js +74 -0
  106. package/dist/node_modules/qrcode/lib/core/version-check.cjs +1 -0
  107. package/dist/node_modules/qrcode/lib/core/version-check.js +7 -0
  108. package/dist/node_modules/qrcode/lib/core/version.cjs +1 -0
  109. package/dist/node_modules/qrcode/lib/core/version.js +74 -0
  110. package/dist/node_modules/qrcode/lib/renderer/canvas.cjs +1 -0
  111. package/dist/node_modules/qrcode/lib/renderer/canvas.js +27 -0
  112. package/dist/node_modules/qrcode/lib/renderer/svg-tag.cjs +2 -0
  113. package/dist/node_modules/qrcode/lib/renderer/svg-tag.js +28 -0
  114. package/dist/node_modules/qrcode/lib/renderer/utils.cjs +1 -0
  115. package/dist/node_modules/qrcode/lib/renderer/utils.js +52 -0
  116. package/dist/orders.server.js +1 -1
  117. package/dist/orders.server.mjs +1 -1
  118. package/dist/organizations.server.js +1 -1
  119. package/dist/organizations.server.mjs +1 -1
  120. package/dist/products.server.js +1 -1
  121. package/dist/products.server.mjs +1 -1
  122. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
  124. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/components/Field/Field.vue.js +19 -20
  126. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +5 -5
  128. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
  130. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  132. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +16 -16
  134. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +16 -16
  136. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +13 -13
  138. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +36 -36
  140. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +29 -29
  142. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  144. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  146. package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +1 -1
  148. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
  150. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +23 -23
  152. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
  154. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +14 -14
  156. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  158. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  159. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
  160. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  162. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +12 -12
  164. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  165. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +21 -21
  166. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  167. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
  168. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  169. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +5 -5
  170. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  171. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +7 -7
  172. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  173. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  174. package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
  175. package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +8 -8
  176. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  177. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  178. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  179. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  180. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  181. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +4 -4
  182. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  183. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +3 -3
  184. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  185. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +5 -5
  186. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  187. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +8 -8
  188. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  189. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  190. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  191. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
  192. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  193. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  194. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  195. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +4 -4
  196. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  197. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  198. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  199. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +8 -8
  200. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  201. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
  202. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  203. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +12 -12
  204. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  205. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +16 -16
  206. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  207. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +6 -6
  208. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  209. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +19 -19
  210. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  211. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  212. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  213. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +7 -7
  214. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  215. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  216. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  217. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  218. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  219. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +13 -13
  220. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  221. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +18 -18
  222. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  223. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +32 -32
  224. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  225. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +10 -10
  226. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  227. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +5 -5
  228. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  229. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  230. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  231. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
  232. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  233. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  234. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  235. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  236. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  237. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +9 -9
  238. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.cjs +1 -0
  239. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardBalanceReplenished.vue.js +34 -0
  240. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -0
  241. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +42 -0
  242. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CashDeposit.vue.cjs +1 -0
  243. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CashDeposit.vue.js +26 -0
  244. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -0
  245. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +76 -0
  246. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.cjs +1 -0
  247. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue.js +105 -0
  248. package/dist/prometheus-framework/src/modules/wallet/views/components/elements/ConnectMetamask.vue.cjs +1 -0
  249. package/dist/prometheus-framework/src/modules/wallet/views/components/elements/ConnectMetamask.vue.js +106 -0
  250. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  251. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +140 -125
  252. package/dist/prometheus-framework/src/modules/wallet/views/localization/wallet.json.cjs +1 -0
  253. package/dist/prometheus-framework/src/modules/wallet/views/localization/wallet.json.js +41 -0
  254. package/dist/prometheus-framework/src/modules/wallet/views/store/wallet.store.cjs +1 -1
  255. package/dist/prometheus-framework/src/modules/wallet/views/store/wallet.store.js +98 -22
  256. package/dist/prometheus-framework.cjs.js +1 -1
  257. package/dist/prometheus-framework.es.js +1 -1
  258. package/dist/reports.server.js +1 -1
  259. package/dist/reports.server.mjs +1 -1
  260. package/dist/style.css +1 -1
  261. package/dist/wallet.server.js +103 -13
  262. package/dist/wallet.server.mjs +103 -13
  263. package/dist/web-5eyiz9L7.mjs +54 -0
  264. package/dist/web-C04IcLk4.js +1 -0
  265. package/package.json +1 -1
  266. package/src/components/Field/Field.vue +1 -1
  267. package/src/modules/community/components/pages/Blog.vue +1 -1
  268. package/src/modules/globals/components/partials/Header.vue +2 -2
  269. package/src/modules/globals/localization/vue-i18n.js +5 -5
  270. package/src/modules/landing/components/sections/HowToBuyWDR.vue +2 -3
  271. package/src/modules/landing/components/sections/SectionEarn.vue +1 -6
  272. package/src/modules/middlewares/server/authSecret.js +22 -0
  273. package/src/modules/middlewares/server/index.js +7 -5
  274. package/src/modules/wallet/controllers/factories/rewards.factory.js +87 -2
  275. package/src/modules/wallet/controllers/routes/rewards.routes.js +27 -3
  276. package/src/modules/wallet/models/wallet.model.js +5 -5
  277. package/src/modules/wallet/{components → views/components}/blocks/CardBalanceReplenished.vue +17 -7
  278. package/src/modules/wallet/{components/blocks/CardDeposite.vue → views/components/blocks/CardDeposit.vue} +4 -4
  279. package/src/modules/wallet/views/components/blocks/CryptoDeposit.vue +98 -0
  280. package/src/modules/wallet/views/components/blocks/CryptoDepositProcessing.vue +144 -0
  281. package/src/modules/wallet/views/components/elements/ConnectMetamask.vue +131 -0
  282. package/src/modules/wallet/views/components/pages/Wallet.vue +95 -68
  283. package/src/modules/wallet/views/localization/wallet.json +37 -0
  284. package/src/modules/wallet/views/store/wallet.store.js +145 -28
  285. package/src/modules/wallet/wallet.server.js +2 -2
  286. package/src/modules/wallet/components/blocks/CryptoDeposite.vue +0 -55
  287. package/src/modules/wallet/controllers/factories/rewards.factory.aggr.js +0 -181
  288. package/src/modules/wallet/controllers/factories/rewards.factory.population.js +0 -213
  289. package/src/modules/wallet/localization/Wallet.json +0 -22
  290. /package/src/modules/wallet/{components/blocks/CashDeposite.vue → views/components/blocks/CashDeposit.vue} +0 -0
@@ -1,10 +1,10 @@
1
1
  import { onMounted as n, openBlock as m, createBlock as u, withCtx as y, createElementVNode as t, createVNode as i } from "vue";
2
2
  import { state as o } from "../../../globals/store/globals.js";
3
- import v from "../../../../components/Block/Block.vue.js";
4
- import f from "../../../../components/Address/Address.vue2.js";
5
- import b from "../../../../components/LocationMarker/LocationMarker.vue2.js";
3
+ import f from "../../../../components/Block/Block.vue.js";
4
+ import v from "../../../../components/Address/Address.vue2.js";
5
+ import c from "../../../../components/LocationMarker/LocationMarker.vue2.js";
6
6
  import l from "../../../../components/Radio/Radio.vue.js";
7
- import c from "../../../../components/Field/Field.vue2.js";
7
+ import b from "../../../../components/Field/Field.vue.js";
8
8
  const p = /* @__PURE__ */ t("h4", { class: "font-second mn-b-thin" }, "Select deliverty type", -1), w = { class: "mn-b-small flex-nowrap flex" }, g = /* @__PURE__ */ t("h4", { class: "font-second mn-b-thin" }, "Address", -1), O = {
9
9
  __name: "FormDelivery",
10
10
  props: {
@@ -14,7 +14,7 @@ const p = /* @__PURE__ */ t("h4", { class: "font-second mn-b-thin" }, "Select de
14
14
  const a = e;
15
15
  return n(() => {
16
16
  o.position && (a.order.delivery.address = o.position.address), o.position && (a.order.delivery.location = o.position.location);
17
- }), (s, d) => (m(), u(v, {
17
+ }), (s, d) => (m(), u(f, {
18
18
  title: "Delivery",
19
19
  class: "mn-b-thin",
20
20
  tooltip: "Delivery by mail takes 3-5 days."
@@ -45,7 +45,7 @@ const p = /* @__PURE__ */ t("h4", { class: "font-second mn-b-thin" }, "Select de
45
45
  }, null, 8, ["radio"])
46
46
  ]),
47
47
  g,
48
- i(f, {
48
+ i(v, {
49
49
  label: "Location",
50
50
  apiKey: s.GOOGLE_MAPS_API_KEY,
51
51
  address: e.order.delivery.address,
@@ -59,7 +59,7 @@ const p = /* @__PURE__ */ t("h4", { class: "font-second mn-b-thin" }, "Select de
59
59
  e.order.delivery.address = r;
60
60
  })
61
61
  }, null, 8, ["apiKey", "address", "location"]),
62
- i(b, {
62
+ i(c, {
63
63
  apiKey: s.GOOGLE_MAPS_API_KEY,
64
64
  address: e.order.delivery.address,
65
65
  location: e.order.delivery.location,
@@ -71,7 +71,7 @@ const p = /* @__PURE__ */ t("h4", { class: "font-second mn-b-thin" }, "Select de
71
71
  e.order.delivery.address = r;
72
72
  })
73
73
  }, null, 8, ["apiKey", "address", "location"]),
74
- i(c, {
74
+ i(b, {
75
75
  field: e.order.comment,
76
76
  "onUpdate:field": d[7] || (d[7] = (r) => e.order.comment = r),
77
77
  placeholder: "Comments regarding the address (apartment unit, floor level, building section)",
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Select/Select.vue2.cjs"),o={class:"mn-b-small flex-nowrap flex"},s={__name:"FormPayment",props:{order:Object},setup(t){return(c,l)=>(e.openBlock(),e.createBlock(r.default,{title:"Payment"},{default:e.withCtx(()=>[e.createElementVNode("div",o,[e.createVNode(n.default,{select:t.order.payment.type,"onUpdate:select":l[0]||(l[0]=a=>t.order.payment.type=a),property:"value",options:[{name:"Cash On Delivery",value:"cash"},{name:"Bank Transfer",value:"bank"},{name:"Crypto",value:"crypto"}],placeholder:"Select type of payment",size:"small",class:"bg-white pd-medium radius-small w-100"},null,8,["select"])])]),_:1}))}};exports.default=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("../../../../components/Block/Block.vue.cjs"),n=require("../../../../components/Select/Select.vue.cjs"),o={class:"mn-b-small flex-nowrap flex"},s={__name:"FormPayment",props:{order:Object},setup(t){return(c,l)=>(e.openBlock(),e.createBlock(r.default,{title:"Payment"},{default:e.withCtx(()=>[e.createElementVNode("div",o,[e.createVNode(n.default,{select:t.order.payment.type,"onUpdate:select":l[0]||(l[0]=a=>t.order.payment.type=a),property:"value",options:[{name:"Cash On Delivery",value:"cash"},{name:"Bank Transfer",value:"bank"},{name:"Crypto",value:"crypto"}],placeholder:"Select type of payment",size:"small",class:"bg-white pd-medium radius-small w-100"},null,8,["select"])])]),_:1}))}};exports.default=s;
@@ -1,6 +1,6 @@
1
1
  import { openBlock as r, createBlock as l, withCtx as o, createElementVNode as n, createVNode as m } from "vue";
2
2
  import s from "../../../../components/Block/Block.vue.js";
3
- import p from "../../../../components/Select/Select.vue2.js";
3
+ import p from "../../../../components/Select/Select.vue.js";
4
4
  const c = { class: "mn-b-small flex-nowrap flex" }, f = {
5
5
  __name: "FormPayment",
6
6
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),d=require("../../../orders/components/blocks/CardOrderItem.vue.cjs"),u=require("../../../../components/Chips/Chips.vue.cjs"),m=require("../../../icons/placeholders/PlaceholderOrganizationPic.vue.cjs"),h=require("../../../icons/entities/IconPrice.vue.cjs"),g=require("../../../icons/entities/IconShopcart.vue.cjs"),f=require("../../../icons/entities/IconTime.vue.cjs"),k=require("../elements/ButtonToggleMembership.vue.cjs"),w={class:"flex pos-relative"},b=["src"],p={class:"pos-relative w-100 flex-h-center flex flex-column flex-child-1 flex-child mn-l-thin w-100"},B={class:"h4 t-truncate"},z={key:1,class:"flex-center gap-thin pd-r-thin pd-l-thin flex-nowrap flex mn-t-thin bg-white radius-extra w-max"},y={class:"mn-t-thin mn-b-thin"},V={key:0,class:"mn-b-small mn-t-small w-100 flex-nowrap flex flex-v-center pd-small bg-white radius-medium"},v={class:"mn-r-thin"},E={key:0,class:"t-transp mn-r-thin"},N={class:"mn-r-thin"},x={class:"mn-r-thin"},S={class:"mn-r-thin"},C={key:1,class:"w-100 o-scroll radius-medium"},M={class:"w-max flex-nowrap flex gap-thin"},q=e.createElementVNode("button",{class:"pd-thin w-15r radius-medium bg-main button"}," View menu ",-1),O={__name:"CardOrganization",props:{user:String,organization:Object,showProducts:{type:Boolean,default:!1},showFollowers:{type:Boolean,default:!0},showRating:{type:Boolean,default:!1},showFeatured:{type:Boolean,default:!0},showTags:{type:Boolean,default:!0}},emits:["updateMembership"],setup(t,{emit:l}){const s=l;return c.useRouter(),(o,i)=>{var a,r;return e.openBlock(),e.createElementBlock("div",{class:"o-hidden pos-relative cursor-pointer bg-light pd-small",onClick:i[1]||(i[1]=n=>o.$router.push({name:"Organization",params:{_id:t.organization._id}}))},[e.createElementVNode("div",w,[t.organization.profile.photo&&t.organization.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:0,src:(o.FILE_SERVER_URL||"")+t.organization.profile.photo,class:"h-4r w-4r radius-extra bg-white"},null,8,b)):(e.openBlock(),e.createBlock(m.default,{key:1,class:"h-4r w-4r"})),e.createElementVNode("div",p,[e.createElementVNode("p",B,e.toDisplayString(t.organization.profile.name),1),t.showTags&&((a=t.organization.profile.tags)==null?void 0:a.length)>0?(e.openBlock(),e.createBlock(u.default,{key:0,chips:t.organization.profile.tags.slice(0,3),class:"pos-relative p-small"},null,8,["chips"])):e.createCommentVNode("",!0),t.showFollowers?(e.openBlock(),e.createElementBlock("div",z,[e.createElementVNode("p",y,e.toDisplayString(t.organization.numberOfSubscribers)+" followers",1),(r=t.user)!=null&&r._id&&t.organization.owner!==t.user._id?(e.openBlock(),e.createBlock(k.default,{key:0,user:t.user._id,type:"organization",role:"subscriber",target:t.organization._id,status:t.organization.isSubscriber,text:{create:"+",remove:"-"},onUpdateMembership:i[0]||(i[0]=n=>s("updateMembership",n,"isSubscriber","numberOfSubscribers")),class:"i-semi"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])]),t.showProducts?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(f.default,{class:"i-medium mn-r-micro"}),e.createElementVNode("span",v,e.toDisplayString(t.organization.distance?Math.ceil((10+3*t.organization.distance)/5)*5+"-"+Math.ceil((20+3*t.organization.distance)/5)*5+" MIN":"Unavailable"),1),t.organization.distance?(e.openBlock(),e.createElementBlock("span",E,"|")):e.createCommentVNode("",!0),e.createElementVNode("span",N,e.toDisplayString(t.organization.distance?t.organization.distance.toFixed(1)+" KM":""),1),e.createVNode(h.default,{class:"i-medium mn-r-micro"}),e.createElementVNode("span",x,e.toDisplayString(o.returnCurrency())+"500 ",1),e.createVNode(g.default,{class:"i-medium mn-r-micro"}),e.createElementVNode("span",S,e.toDisplayString(t.organization.products.length)+" products",1)])):e.createCommentVNode("",!0),t.showProducts&&t.organization.products.length>0?(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("div",M,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.organization.products.slice(0,10),n=>(e.openBlock(),e.createBlock(d.default,{onClick:e.withModifiers(P=>o.$router.push({name:"Product Organization",params:{_id:t.organization._id,product:n._id}}),["stop"]),key:n._id,editable:!1,product:n,class:"pd-thin w-15r radius-medium bg-white"},null,8,["onClick","product"]))),128)),q])])):e.createCommentVNode("",!0)])}}};exports.default=O;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router"),d=require("../../../orders/components/blocks/CardOrderItem.vue.cjs"),u=require("../../../../components/Chips/Chips.vue2.cjs"),m=require("../../../icons/placeholders/PlaceholderOrganizationPic.vue.cjs"),h=require("../../../icons/entities/IconPrice.vue.cjs"),g=require("../../../icons/entities/IconShopcart.vue.cjs"),f=require("../../../icons/entities/IconTime.vue.cjs"),k=require("../elements/ButtonToggleMembership.vue.cjs"),w={class:"flex pos-relative"},b=["src"],p={class:"pos-relative w-100 flex-h-center flex flex-column flex-child-1 flex-child mn-l-thin w-100"},B={class:"h4 t-truncate"},z={key:1,class:"flex-center gap-thin pd-r-thin pd-l-thin flex-nowrap flex mn-t-thin bg-white radius-extra w-max"},y={class:"mn-t-thin mn-b-thin"},V={key:0,class:"mn-b-small mn-t-small w-100 flex-nowrap flex flex-v-center pd-small bg-white radius-medium"},v={class:"mn-r-thin"},E={key:0,class:"t-transp mn-r-thin"},N={class:"mn-r-thin"},x={class:"mn-r-thin"},S={class:"mn-r-thin"},C={key:1,class:"w-100 o-scroll radius-medium"},M={class:"w-max flex-nowrap flex gap-thin"},q=e.createElementVNode("button",{class:"pd-thin w-15r radius-medium bg-main button"}," View menu ",-1),O={__name:"CardOrganization",props:{user:String,organization:Object,showProducts:{type:Boolean,default:!1},showFollowers:{type:Boolean,default:!0},showRating:{type:Boolean,default:!1},showFeatured:{type:Boolean,default:!0},showTags:{type:Boolean,default:!0}},emits:["updateMembership"],setup(t,{emit:l}){const s=l;return c.useRouter(),(o,i)=>{var a,r;return e.openBlock(),e.createElementBlock("div",{class:"o-hidden pos-relative cursor-pointer bg-light pd-small",onClick:i[1]||(i[1]=n=>o.$router.push({name:"Organization",params:{_id:t.organization._id}}))},[e.createElementVNode("div",w,[t.organization.profile.photo&&t.organization.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:0,src:(o.FILE_SERVER_URL||"")+t.organization.profile.photo,class:"h-4r w-4r radius-extra bg-white"},null,8,b)):(e.openBlock(),e.createBlock(m.default,{key:1,class:"h-4r w-4r"})),e.createElementVNode("div",p,[e.createElementVNode("p",B,e.toDisplayString(t.organization.profile.name),1),t.showTags&&((a=t.organization.profile.tags)==null?void 0:a.length)>0?(e.openBlock(),e.createBlock(u.default,{key:0,chips:t.organization.profile.tags.slice(0,3),class:"pos-relative p-small"},null,8,["chips"])):e.createCommentVNode("",!0),t.showFollowers?(e.openBlock(),e.createElementBlock("div",z,[e.createElementVNode("p",y,e.toDisplayString(t.organization.numberOfSubscribers)+" followers",1),(r=t.user)!=null&&r._id&&t.organization.owner!==t.user._id?(e.openBlock(),e.createBlock(k.default,{key:0,user:t.user._id,type:"organization",role:"subscriber",target:t.organization._id,status:t.organization.isSubscriber,text:{create:"+",remove:"-"},onUpdateMembership:i[0]||(i[0]=n=>s("updateMembership",n,"isSubscriber","numberOfSubscribers")),class:"i-semi"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])]),t.showProducts?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(f.default,{class:"i-medium mn-r-micro"}),e.createElementVNode("span",v,e.toDisplayString(t.organization.distance?Math.ceil((10+3*t.organization.distance)/5)*5+"-"+Math.ceil((20+3*t.organization.distance)/5)*5+" MIN":"Unavailable"),1),t.organization.distance?(e.openBlock(),e.createElementBlock("span",E,"|")):e.createCommentVNode("",!0),e.createElementVNode("span",N,e.toDisplayString(t.organization.distance?t.organization.distance.toFixed(1)+" KM":""),1),e.createVNode(h.default,{class:"i-medium mn-r-micro"}),e.createElementVNode("span",x,e.toDisplayString(o.returnCurrency())+"500 ",1),e.createVNode(g.default,{class:"i-medium mn-r-micro"}),e.createElementVNode("span",S,e.toDisplayString(t.organization.products.length)+" products",1)])):e.createCommentVNode("",!0),t.showProducts&&t.organization.products.length>0?(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("div",M,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.organization.products.slice(0,10),n=>(e.openBlock(),e.createBlock(d.default,{onClick:e.withModifiers(P=>o.$router.push({name:"Product Organization",params:{_id:t.organization._id,product:n._id}}),["stop"]),key:n._id,editable:!1,product:n,class:"pd-thin w-15r radius-medium bg-white"},null,8,["onClick","product"]))),128)),q])])):e.createCommentVNode("",!0)])}}};exports.default=O;
@@ -1,7 +1,7 @@
1
1
  import { openBlock as t, createElementBlock as n, createElementVNode as i, createBlock as c, toDisplayString as o, createCommentVNode as s, createVNode as d, Fragment as f, renderList as w, withModifiers as b } from "vue";
2
2
  import { useRouter as z } from "vue-router";
3
3
  import p from "../../../orders/components/blocks/CardOrderItem.vue.js";
4
- import x from "../../../../components/Chips/Chips.vue.js";
4
+ import x from "../../../../components/Chips/Chips.vue2.js";
5
5
  import y from "../../../icons/placeholders/PlaceholderOrganizationPic.vue.js";
6
6
  import v from "../../../icons/entities/IconPrice.vue.js";
7
7
  import k from "../../../icons/entities/IconShopcart.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),m=require("../../../../components/Button/Button.vue2.cjs");require("../../../auth/store/auth.cjs");const i=require("../../store/memberships.cjs"),g={__name:"ButtonToggleMembership",props:{user:{type:String,required:!0},type:{type:String,required:!0},role:{type:String,required:!1},target:{type:String,required:!0},text:{type:Object,default:{create:"join",remove:"leave"}},status:{type:Boolean,required:!0}},emits:["updateMembership"],setup(o,{emit:n}){const u=n,e=o,c=async()=>{e.status?await l():await p()};async function p(){try{const t={user:e.user,type:e.type,role:e.role,target:e.target},s=await i.actions.create(t);u("updateMembership",{membership:s,target:e.target,status:!0})}catch(t){throw console.log(t),t}}async function l(t){const s={user:e.user,type:e.type,role:e.role,target:e.target};try{const a=await i.actions.delete(s);u("updateMembership",{membership:a,target:e.target,status:!1})}catch(a){throw console.log(a),a}}return(t,s)=>(r.openBlock(),r.createBlock(m.default,{submit:c,showSucces:!1,class:"bg-main button-small button"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.status?e.text.remove:e.text.create),1)]),_:1}))}};exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),m=require("../../../../components/Button/Button.vue.cjs");require("../../../auth/store/auth.cjs");const i=require("../../store/memberships.cjs"),g={__name:"ButtonToggleMembership",props:{user:{type:String,required:!0},type:{type:String,required:!0},role:{type:String,required:!1},target:{type:String,required:!0},text:{type:Object,default:{create:"join",remove:"leave"}},status:{type:Boolean,required:!0}},emits:["updateMembership"],setup(o,{emit:n}){const u=n,e=o,c=async()=>{e.status?await l():await p()};async function p(){try{const t={user:e.user,type:e.type,role:e.role,target:e.target},s=await i.actions.create(t);u("updateMembership",{membership:s,target:e.target,status:!0})}catch(t){throw console.log(t),t}}async function l(t){const s={user:e.user,type:e.type,role:e.role,target:e.target};try{const a=await i.actions.delete(s);u("updateMembership",{membership:a,target:e.target,status:!1})}catch(a){throw console.log(a),a}}return(t,s)=>(r.openBlock(),r.createBlock(m.default,{submit:c,showSucces:!1,class:"bg-main button-small button"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.status?e.text.remove:e.text.create),1)]),_:1}))}};exports.default=g;
@@ -1,5 +1,5 @@
1
1
  import { openBlock as m, createBlock as l, withCtx as g, createTextVNode as h, toDisplayString as y } from "vue";
2
- import b from "../../../../components/Button/Button.vue2.js";
2
+ import b from "../../../../components/Button/Button.vue.js";
3
3
  import "../../../auth/store/auth.js";
4
4
  import { actions as i } from "../../store/memberships.js";
5
5
  const M = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");;/* empty css */const P=require("../../../../components/UploadImage/UploadImage.vue.cjs");;/* empty css */const u=require("../../../../components/Field/Field.vue2.cjs");;/* empty css */const r=require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs");;/* empty css */;/* empty css */;/* empty css */const f=require("../../../../components/Button/Button.vue2.cjs"),x=require("../../../../components/Popup/Popup.vue2.cjs"),h=require("../../../../components/Block/Block.vue.cjs"),B=require("../../../../components/Feed/Feed.vue.cjs"),D=require("../../../icons/navigation/IconDelete.vue.cjs");;/* empty css */;/* empty css */const b=require("../../../users/components/blocks/CardUser.vue.cjs"),g=require("../../../globals/store/globals.cjs"),t=require("../../store/departments.cjs"),w=require("../../store/memberships.cjs"),U={class:"for-transition pd-thin w-100"},C={class:"mn-b-thin flex-nowrap flex bg-light pd-medium radius-big"},O={key:0,class:"mn-r-auto"},M={key:1,class:"mn-r-auto"},R={class:"flex-nowrap flex gap-thin pd-thin"},S={class:"cols-2-fit-content"},T={class:"w-100 flex-child-grow-1 flex-child"},z={class:"cols-2 gap-thin"},A={class:"bg-light pd-medium o-hidden radius-big"},F=e.createElementVNode("h3",{class:"mn-b-semi"},"Department Settings",-1),I=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please settings for your department:",-1),L={class:"cols-1 gap-thin"},j={class:"bg-light pd-medium o-hidden radius-big"},G=e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1),H=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select organization accesses for user in department:",-1),J={class:"cols-1 gap-thin"},K=e.createElementVNode("h4",null,"Gallery",-1),Q=e.createElementVNode("h4",null,"Products",-1),W=e.createElementVNode("h4",null,"Orders",-1),X=e.createElementVNode("h4",null,"Departments",-1),Y={__name:"DepartmentEdit",setup(Z){const N=c.useRouter(),d=c.useRoute();async function V(){e.ref(w.state.memberships),d.params.department&&await t.actions.readOne(d.params.department)}V();const n=e.ref(!1),_=e.ref(null);function y(o){n.value=!0}function i(){n.value=!1,_.value=null}e.ref(!1),e.ref(null);async function k(){d.params.department&&await t.actions.update(d.params._id,t.state.department),d.params.department||await t.actions.create(d.params._id,t.state.department)}function E(){N.push({name:"Organization Members",params:{_id:d.params._id}})}async function q(){confirm("Are you sure you want to delete this department?")&&await t.actions.delete(d.params._id,t.state.department)}function v(o){confirm("Are you sure you want to remove this member?")&&g.actions.delete(t.state.department.members,{_id:o.user._id})}return(o,a)=>(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("header",C,[e.unref(d).params.department?(e.openBlock(),e.createElementBlock("h1",O,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",M,"Create Department")),e.createElementVNode("section",R,[e.unref(d).params.department?(e.openBlock(),e.createBlock(f.default,{key:0,submit:q,callback:o.redirectToDash,class:"bg-red"},{default:e.withCtx(()=>[e.createTextVNode("Delete")]),_:1},8,["callback"])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:k,callback:E,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1})])]),t.state.department.profile?(e.openBlock(),e.createBlock(h.default,{key:0,title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",S,[e.createVNode(P.default,{photo:t.state.department.profile.photo,"onUpdate:photo":a[0]||(a[0]=s=>t.state.department.profile.photo=s),uploadPath:"organizations/"+t.state.department.name+"/avatars",class:"w-8r aspect-1x1 o-hidden mn-r-small radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",T,[e.createVNode(u.default,{field:t.state.department.profile.name,"onUpdate:field":a[1]||(a[1]=s=>t.state.department.profile.name=s),label:"Name",placeholder:"Department Name",class:"mn-b-small bg-white radius-small pd-medium",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(u.default,{field:t.state.department.profile.description,"onUpdate:field":a[2]||(a[2]=s=>t.state.department.profile.description=s),label:"Description",placeholder:"Department description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:o.organizationName},null,8,["field","validation"])])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(h.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>y()}],class:"cols-1 gap-thin mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(s,l)=>(e.openBlock(),e.createBlock(b.default,{class:"h-4r bg-white pd-thin radius-medium w-100",key:l,user:s.user,photo:s.user.profile.photo,name:s.user.profile.name||s.user.phone||s.user.email||s.user._id,position:s.position,action:{label:{is:D.default,props:{class:"i-medium",fill:"rgb(var(--white)"}},method:()=>v(s)}},null,8,["user","photo","name","position","action"]))),128))]),_:1},8,["actions"]),e.createVNode(x.default,{title:"Add member",onClosePopup:i,isPopupOpen:n.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(B.default,{search:{placeholder:"Search customer...",class:"bg-light mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:s=>w.actions.read(s),state:null},options:{target:e.unref(d).params._id},class:"bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll"},{default:e.withCtx(({items:s})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,(l,$)=>{var m,p;return e.openBlock(),e.createBlock(b.default,{key:l._id,user:l.user,photo:(m=l.user.profile)==null?void 0:m.photo,name:((p=l.user.profile)==null?void 0:p.name)||l.user.phone||l.user.email,onClick:()=>{g.actions.add(t.state.department.members,{_id:l.user._id,user:l.user,position:"Member"}),i()},class:"h-4r bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"])}),128))]),_:1},8,["store","options"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",z,[e.createElementVNode("div",A,[F,I,e.createElementVNode("div",L,[e.createVNode(r.default,{label:"Hidden department",name:"hidden",class:"w-100 mn-r-small bg-white radius-small pd-small","onUpdate:radio":a[3]||(a[3]=s=>t.state.department.hidden=!t.state.department.hidden),radio:t.state.department.hidden},null,8,["radio"])])]),e.createElementVNode("div",j,[G,H,e.createElementVNode("div",J,[K,e.createVNode(r.default,{label:"Read gallery",name:"readProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.gallery.read,"onUpdate:radio":a[4]||(a[4]=s=>t.state.department.accesses.gallery.read=!t.state.department.accesses.gallery.read)},null,8,["radio"]),e.createVNode(r.default,{label:"Edit gallery",name:"editProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.gallery.edit,"onUpdate:radio":a[5]||(a[5]=s=>t.state.department.accesses.gallery.edit=!t.state.department.accesses.gallery.edit)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete gallery",name:"deleteProducts",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.gallery.delete,"onUpdate:radio":a[6]||(a[6]=s=>t.state.department.accesses.gallery.delete=!t.state.department.accesses.gallery.delete)},null,8,["radio"]),Q,e.createVNode(r.default,{label:"Read products",name:"readProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.products.read,"onUpdate:radio":a[7]||(a[7]=s=>t.state.department.accesses.products.read=!t.state.department.accesses.products.read)},null,8,["radio"]),e.createVNode(r.default,{label:"Edit products",name:"editProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.products.edit,"onUpdate:radio":a[8]||(a[8]=s=>t.state.department.accesses.products.edit=!t.state.department.accesses.products.edit)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete products",name:"deleteProducts",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.products.delete,"onUpdate:radio":a[9]||(a[9]=s=>t.state.department.accesses.products.delete=!t.state.department.accesses.products.delete)},null,8,["radio"]),W,e.createVNode(r.default,{label:"Read orders",name:"readOrders",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.orders.read,"onUpdate:radio":a[10]||(a[10]=s=>t.state.department.accesses.orders.read=!t.state.department.accesses.orders.read)},null,8,["radio"]),e.createVNode(r.default,{label:"Confirm orders",name:"confirmOrders",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.orders.confirm,"onUpdate:radio":a[11]||(a[11]=s=>t.state.department.accesses.orders.confirm=!t.state.department.accesses.orders.confirm)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete orders",name:"deleteOrders",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.orders.delete,"onUpdate:radio":a[12]||(a[12]=s=>t.state.department.accesses.orders.delete=!t.state.department.accesses.orders.delete)},null,8,["radio"]),X,e.createVNode(r.default,{label:"Read departments",name:"readDepartments",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.departments.read,"onUpdate:radio":a[13]||(a[13]=s=>t.state.department.accesses.departments.read=!t.state.department.accesses.departments.read)},null,8,["radio"]),e.createVNode(r.default,{label:"Edit departments",name:"editDepartments",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.departments.edit,"onUpdate:radio":a[14]||(a[14]=s=>t.state.department.accesses.departments.edit=!t.state.department.accesses.departments.edit)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete departments",name:"deleteDepartments",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.departments.delete,"onUpdate:radio":a[15]||(a[15]=s=>t.state.department.accesses.departments.delete=!t.state.department.accesses.departments.delete)},null,8,["radio"])])])])]))}};exports.default=Y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");;/* empty css */const P=require("../../../../components/UploadImage/UploadImage.vue.cjs");;/* empty css */const u=require("../../../../components/Field/Field.vue.cjs");;/* empty css */const r=require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs");;/* empty css */;/* empty css */;/* empty css */const f=require("../../../../components/Button/Button.vue.cjs"),x=require("../../../../components/Popup/Popup.vue.cjs"),h=require("../../../../components/Block/Block.vue.cjs"),B=require("../../../../components/Feed/Feed.vue.cjs"),D=require("../../../icons/navigation/IconDelete.vue.cjs");;/* empty css */;/* empty css */const b=require("../../../users/components/blocks/CardUser.vue.cjs"),g=require("../../../globals/store/globals.cjs"),t=require("../../store/departments.cjs"),w=require("../../store/memberships.cjs"),U={class:"for-transition pd-thin w-100"},C={class:"mn-b-thin flex-nowrap flex bg-light pd-medium radius-big"},O={key:0,class:"mn-r-auto"},M={key:1,class:"mn-r-auto"},R={class:"flex-nowrap flex gap-thin pd-thin"},S={class:"cols-2-fit-content"},T={class:"w-100 flex-child-grow-1 flex-child"},z={class:"cols-2 gap-thin"},A={class:"bg-light pd-medium o-hidden radius-big"},F=e.createElementVNode("h3",{class:"mn-b-semi"},"Department Settings",-1),I=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please settings for your department:",-1),L={class:"cols-1 gap-thin"},j={class:"bg-light pd-medium o-hidden radius-big"},G=e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1),H=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select organization accesses for user in department:",-1),J={class:"cols-1 gap-thin"},K=e.createElementVNode("h4",null,"Gallery",-1),Q=e.createElementVNode("h4",null,"Products",-1),W=e.createElementVNode("h4",null,"Orders",-1),X=e.createElementVNode("h4",null,"Departments",-1),Y={__name:"DepartmentEdit",setup(Z){const N=c.useRouter(),d=c.useRoute();async function V(){e.ref(w.state.memberships),d.params.department&&await t.actions.readOne(d.params.department)}V();const n=e.ref(!1),_=e.ref(null);function y(o){n.value=!0}function i(){n.value=!1,_.value=null}e.ref(!1),e.ref(null);async function k(){d.params.department&&await t.actions.update(d.params._id,t.state.department),d.params.department||await t.actions.create(d.params._id,t.state.department)}function E(){N.push({name:"Organization Members",params:{_id:d.params._id}})}async function q(){confirm("Are you sure you want to delete this department?")&&await t.actions.delete(d.params._id,t.state.department)}function v(o){confirm("Are you sure you want to remove this member?")&&g.actions.delete(t.state.department.members,{_id:o.user._id})}return(o,a)=>(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("header",C,[e.unref(d).params.department?(e.openBlock(),e.createElementBlock("h1",O,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",M,"Create Department")),e.createElementVNode("section",R,[e.unref(d).params.department?(e.openBlock(),e.createBlock(f.default,{key:0,submit:q,callback:o.redirectToDash,class:"bg-red"},{default:e.withCtx(()=>[e.createTextVNode("Delete")]),_:1},8,["callback"])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:k,callback:E,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1})])]),t.state.department.profile?(e.openBlock(),e.createBlock(h.default,{key:0,title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",S,[e.createVNode(P.default,{photo:t.state.department.profile.photo,"onUpdate:photo":a[0]||(a[0]=s=>t.state.department.profile.photo=s),uploadPath:"organizations/"+t.state.department.name+"/avatars",class:"w-8r aspect-1x1 o-hidden mn-r-small radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",T,[e.createVNode(u.default,{field:t.state.department.profile.name,"onUpdate:field":a[1]||(a[1]=s=>t.state.department.profile.name=s),label:"Name",placeholder:"Department Name",class:"mn-b-small bg-white radius-small pd-medium",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(u.default,{field:t.state.department.profile.description,"onUpdate:field":a[2]||(a[2]=s=>t.state.department.profile.description=s),label:"Description",placeholder:"Department description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:o.organizationName},null,8,["field","validation"])])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(h.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>y()}],class:"cols-1 gap-thin mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(s,l)=>(e.openBlock(),e.createBlock(b.default,{class:"h-4r bg-white pd-thin radius-medium w-100",key:l,user:s.user,photo:s.user.profile.photo,name:s.user.profile.name||s.user.phone||s.user.email||s.user._id,position:s.position,action:{label:{is:D.default,props:{class:"i-medium",fill:"rgb(var(--white)"}},method:()=>v(s)}},null,8,["user","photo","name","position","action"]))),128))]),_:1},8,["actions"]),e.createVNode(x.default,{title:"Add member",onClosePopup:i,isPopupOpen:n.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(B.default,{search:{placeholder:"Search customer...",class:"bg-light mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:s=>w.actions.read(s),state:null},options:{target:e.unref(d).params._id},class:"bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll"},{default:e.withCtx(({items:s})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s,(l,$)=>{var m,p;return e.openBlock(),e.createBlock(b.default,{key:l._id,user:l.user,photo:(m=l.user.profile)==null?void 0:m.photo,name:((p=l.user.profile)==null?void 0:p.name)||l.user.phone||l.user.email,onClick:()=>{g.actions.add(t.state.department.members,{_id:l.user._id,user:l.user,position:"Member"}),i()},class:"h-4r bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"])}),128))]),_:1},8,["store","options"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",z,[e.createElementVNode("div",A,[F,I,e.createElementVNode("div",L,[e.createVNode(r.default,{label:"Hidden department",name:"hidden",class:"w-100 mn-r-small bg-white radius-small pd-small","onUpdate:radio":a[3]||(a[3]=s=>t.state.department.hidden=!t.state.department.hidden),radio:t.state.department.hidden},null,8,["radio"])])]),e.createElementVNode("div",j,[G,H,e.createElementVNode("div",J,[K,e.createVNode(r.default,{label:"Read gallery",name:"readProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.gallery.read,"onUpdate:radio":a[4]||(a[4]=s=>t.state.department.accesses.gallery.read=!t.state.department.accesses.gallery.read)},null,8,["radio"]),e.createVNode(r.default,{label:"Edit gallery",name:"editProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.gallery.edit,"onUpdate:radio":a[5]||(a[5]=s=>t.state.department.accesses.gallery.edit=!t.state.department.accesses.gallery.edit)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete gallery",name:"deleteProducts",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.gallery.delete,"onUpdate:radio":a[6]||(a[6]=s=>t.state.department.accesses.gallery.delete=!t.state.department.accesses.gallery.delete)},null,8,["radio"]),Q,e.createVNode(r.default,{label:"Read products",name:"readProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.products.read,"onUpdate:radio":a[7]||(a[7]=s=>t.state.department.accesses.products.read=!t.state.department.accesses.products.read)},null,8,["radio"]),e.createVNode(r.default,{label:"Edit products",name:"editProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.products.edit,"onUpdate:radio":a[8]||(a[8]=s=>t.state.department.accesses.products.edit=!t.state.department.accesses.products.edit)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete products",name:"deleteProducts",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.products.delete,"onUpdate:radio":a[9]||(a[9]=s=>t.state.department.accesses.products.delete=!t.state.department.accesses.products.delete)},null,8,["radio"]),W,e.createVNode(r.default,{label:"Read orders",name:"readOrders",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.orders.read,"onUpdate:radio":a[10]||(a[10]=s=>t.state.department.accesses.orders.read=!t.state.department.accesses.orders.read)},null,8,["radio"]),e.createVNode(r.default,{label:"Confirm orders",name:"confirmOrders",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.orders.confirm,"onUpdate:radio":a[11]||(a[11]=s=>t.state.department.accesses.orders.confirm=!t.state.department.accesses.orders.confirm)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete orders",name:"deleteOrders",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.orders.delete,"onUpdate:radio":a[12]||(a[12]=s=>t.state.department.accesses.orders.delete=!t.state.department.accesses.orders.delete)},null,8,["radio"]),X,e.createVNode(r.default,{label:"Read departments",name:"readDepartments",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.departments.read,"onUpdate:radio":a[13]||(a[13]=s=>t.state.department.accesses.departments.read=!t.state.department.accesses.departments.read)},null,8,["radio"]),e.createVNode(r.default,{label:"Edit departments",name:"editDepartments",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.departments.edit,"onUpdate:radio":a[14]||(a[14]=s=>t.state.department.accesses.departments.edit=!t.state.department.accesses.departments.edit)},null,8,["radio"]),e.createVNode(r.default,{label:"Delete departments",name:"deleteDepartments",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.departments.delete,"onUpdate:radio":a[15]||(a[15]=s=>t.state.department.accesses.departments.delete=!t.state.department.accesses.departments.delete)},null,8,["radio"])])])])]))}};exports.default=Y;
@@ -6,15 +6,15 @@ import "../../../globals/localization/vue-i18n.js";
6
6
  /* empty css */
7
7
  import B from "../../../../components/UploadImage/UploadImage.vue.js";
8
8
  /* empty css */
9
- import U from "../../../../components/Field/Field.vue2.js";
10
- /* empty css */
9
+ import U from "../../../../components/Field/Field.vue.js";
10
+ /* empty css */
11
11
  import d from "../../../../components/Checkbox/Checkbox.vue.js";
12
12
  import "../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.js";
13
13
  /* empty css */
14
14
  /* empty css */
15
15
  /* empty css */
16
- import k from "../../../../components/Button/Button.vue2.js";
17
- import F from "../../../../components/Popup/Popup.vue2.js";
16
+ import k from "../../../../components/Button/Button.vue.js";
17
+ import F from "../../../../components/Popup/Popup.vue.js";
18
18
  import x from "../../../../components/Block/Block.vue.js";
19
19
  import G from "../../../../components/Feed/Feed.vue.js";
20
20
  import H from "../../../icons/navigation/IconDelete.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("vue-router"),p=require("../../../../components/Feed/Feed.vue.cjs");;/* empty css */;/* empty css */const q=require("../../../../components/Popup/Popup.vue2.cjs"),M=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),N=require("../sections/MembersAdd.vue.cjs");;/* empty css */require("../../../../components/Menu/MenuItem.vue.cjs");const g=require("../../../users/components/blocks/CardUser.vue.cjs"),x=require("../blocks/CardDepartment.vue.cjs"),_=require("../../../icons/navigation/IconDelete.vue.cjs"),m=require("../../../auth/store/auth.cjs"),u=require("../../store/invites.cjs"),f=require("../../store/memberships.cjs"),k=require("../../store/organizations.cjs"),b=require("../../store/departments.cjs"),z={class:"pd-thin"},P={key:2,class:"cols-1 gap-thin"},V={key:3},I={__name:"Members",setup(A){const o=v.useRoute();v.useRouter();const d=e.ref(null),s=e.ref("members"),c=e.ref(!1);function w(){c.value=!0}function h(){c.value=!1}e.onMounted(async()=>{d.value=(await k.actions.read({_id:o.params._id,user:m.state.user._id}))[0]}),e.computed(()=>{const a=b.state.departments,n=a.flatMap(i=>i.subdepartments.map(r=>r._id));return a.filter(i=>!n.includes(i._id))});async function y(a){await u.actions.create({owner:{type:"Organization",target:d.value._id},creator:{type:"User",target:m.state.user._id},invites:a}),h()}async function B(a,n){confirm("Confirm remove of member")==!0&&(f.state.memberships.splice(a,1),await f.actions.delete(n))}async function C(a,n){confirm("Confirm remove of member")==!0&&(u.state.invites.splice(a,1),await u.actions.delete(n._id))}return(a,n)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",z,[e.createVNode(M.default,{title:"Members","onUpdate:tabs_current":n[0]||(n[0]=r=>s.value=r),tabs_current:s.value,tabs:[{name:`Members (${k.state.current.numberOfMembers||0})`,value:"members"},{name:"Departments",value:"departments"},{name:"Invites",value:"invites"}],actions:[{method:w,label:"Invite members"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current","tabs","actions"]),e.createVNode(q.default,{title:"Add members",onClosePopup:h,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createVNode(N.default,{text:"Please enter your email or phone number to send an invitation link:",organization:d.value,onSendInvite:y},null,8,["organization"])]),_:1},8,["isPopupOpen"]),s.value==="departments"?(e.openBlock(),e.createBlock(p.default,{key:0,states:{empty:{title:"No Departments Found",description:"Currently, there are no departments available.",action:"Add department",callback:()=>a.$router.push(`/organizations/${e.unref(o).params._id}/departments/create`)}},store:{read:r=>b.actions.read(r),state:null},options:{organization:e.unref(o).params._id,user:m.state.user._id}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(t,l)=>(e.openBlock(),e.createBlock(x.default,{key:l,department:t,organization:e.unref(o).params._id,class:"radius-semi bg-light pos-relative mn-b-thin"},null,8,["department","organization"]))),128))]),_:1},8,["states","store","options"])):e.createCommentVNode("",!0),s.value==="departments"&&b.state.departments.length>0?(e.openBlock(),e.createBlock(i,{key:1,to:{path:`/organizations/${e.unref(o).params._id}/departments/create`},class:"d-block flex-center flex uppercase t-semi bg-main w-100 pd-small radius-extra"},{default:e.withCtx(()=>[e.createTextVNode(" Add department ")]),_:1},8,["to"])):e.createCommentVNode("",!0),s.value==="members"?(e.openBlock(),e.createElementBlock("div",P,[e.createVNode(p.default,{search:!0,states:{empty:{title:"No Members Found",description:"Currently, there are no members."}},store:{read:r=>f.actions.read(r)},options:{target:e.unref(o).params._id,role:["member","owner"]},class:"gap-thin cols-1"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(t,l)=>(e.openBlock(),e.createBlock(g.default,{key:l,user:t,_id:t.user._id,photo:t.user.profile.photo,phone:t.user.phone,email:t.user.email,name:t.user.profile.name||"No name",role:t.label||t.role,onClick:F=>a.$router.push(`/profile/${t.user._id}`),action:t.role!=="owner"?{label:{is:_.default,props:{class:"i-medium",fill:"rgb(var(--white)"}},method:()=>B(l,t)}:null,class:"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium"},null,8,["user","_id","photo","phone","email","name","role","onClick","action"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0),s.value==="invites"?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(p.default,{search:!0,states:{empty:{title:"No Invites Found",description:"Currently, there are no members."}},store:{read:r=>u.actions.read(r)},options:{owner:e.unref(o).params._id},class:"gap-thin cols-1"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,t=>(e.openBlock(),e.createBlock(g.default,{key:a.index,user:{type:"invite"},name:t.email||t.phone,role:t.status,action:{label:{is:_.default,props:{class:"i-medium",fill:"rgb(var(--white)"}},method:()=>C(a.index,t)},class:"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium"},null,8,["name","role","action"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0)])}}};exports.default=I;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("vue-router"),p=require("../../../../components/Feed/Feed.vue.cjs");;/* empty css */;/* empty css */const q=require("../../../../components/Popup/Popup.vue.cjs"),M=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),N=require("../sections/MembersAdd.vue.cjs");;/* empty css */require("../../../../components/Menu/MenuItem.vue.cjs");const g=require("../../../users/components/blocks/CardUser.vue.cjs"),x=require("../blocks/CardDepartment.vue.cjs"),_=require("../../../icons/navigation/IconDelete.vue.cjs"),m=require("../../../auth/store/auth.cjs"),u=require("../../store/invites.cjs"),f=require("../../store/memberships.cjs"),k=require("../../store/organizations.cjs"),b=require("../../store/departments.cjs"),z={class:"pd-thin"},P={key:2,class:"cols-1 gap-thin"},V={key:3},I={__name:"Members",setup(A){const o=v.useRoute();v.useRouter();const d=e.ref(null),s=e.ref("members"),c=e.ref(!1);function w(){c.value=!0}function h(){c.value=!1}e.onMounted(async()=>{d.value=(await k.actions.read({_id:o.params._id,user:m.state.user._id}))[0]}),e.computed(()=>{const a=b.state.departments,n=a.flatMap(i=>i.subdepartments.map(r=>r._id));return a.filter(i=>!n.includes(i._id))});async function y(a){await u.actions.create({owner:{type:"Organization",target:d.value._id},creator:{type:"User",target:m.state.user._id},invites:a}),h()}async function B(a,n){confirm("Confirm remove of member")==!0&&(f.state.memberships.splice(a,1),await f.actions.delete(n))}async function C(a,n){confirm("Confirm remove of member")==!0&&(u.state.invites.splice(a,1),await u.actions.delete(n._id))}return(a,n)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",z,[e.createVNode(M.default,{title:"Members","onUpdate:tabs_current":n[0]||(n[0]=r=>s.value=r),tabs_current:s.value,tabs:[{name:`Members (${k.state.current.numberOfMembers||0})`,value:"members"},{name:"Departments",value:"departments"},{name:"Invites",value:"invites"}],actions:[{method:w,label:"Invite members"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current","tabs","actions"]),e.createVNode(q.default,{title:"Add members",onClosePopup:h,isPopupOpen:c.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createVNode(N.default,{text:"Please enter your email or phone number to send an invitation link:",organization:d.value,onSendInvite:y},null,8,["organization"])]),_:1},8,["isPopupOpen"]),s.value==="departments"?(e.openBlock(),e.createBlock(p.default,{key:0,states:{empty:{title:"No Departments Found",description:"Currently, there are no departments available.",action:"Add department",callback:()=>a.$router.push(`/organizations/${e.unref(o).params._id}/departments/create`)}},store:{read:r=>b.actions.read(r),state:null},options:{organization:e.unref(o).params._id,user:m.state.user._id}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(t,l)=>(e.openBlock(),e.createBlock(x.default,{key:l,department:t,organization:e.unref(o).params._id,class:"radius-semi bg-light pos-relative mn-b-thin"},null,8,["department","organization"]))),128))]),_:1},8,["states","store","options"])):e.createCommentVNode("",!0),s.value==="departments"&&b.state.departments.length>0?(e.openBlock(),e.createBlock(i,{key:1,to:{path:`/organizations/${e.unref(o).params._id}/departments/create`},class:"d-block flex-center flex uppercase t-semi bg-main w-100 pd-small radius-extra"},{default:e.withCtx(()=>[e.createTextVNode(" Add department ")]),_:1},8,["to"])):e.createCommentVNode("",!0),s.value==="members"?(e.openBlock(),e.createElementBlock("div",P,[e.createVNode(p.default,{search:!0,states:{empty:{title:"No Members Found",description:"Currently, there are no members."}},store:{read:r=>f.actions.read(r)},options:{target:e.unref(o).params._id,role:["member","owner"]},class:"gap-thin cols-1"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(t,l)=>(e.openBlock(),e.createBlock(g.default,{key:l,user:t,_id:t.user._id,photo:t.user.profile.photo,phone:t.user.phone,email:t.user.email,name:t.user.profile.name||"No name",role:t.label||t.role,onClick:F=>a.$router.push(`/profile/${t.user._id}`),action:t.role!=="owner"?{label:{is:_.default,props:{class:"i-medium",fill:"rgb(var(--white)"}},method:()=>B(l,t)}:null,class:"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium"},null,8,["user","_id","photo","phone","email","name","role","onClick","action"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0),s.value==="invites"?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(p.default,{search:!0,states:{empty:{title:"No Invites Found",description:"Currently, there are no members."}},store:{read:r=>u.actions.read(r)},options:{owner:e.unref(o).params._id},class:"gap-thin cols-1"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,t=>(e.openBlock(),e.createBlock(g.default,{key:a.index,user:{type:"invite"},name:t.email||t.phone,role:t.status,action:{label:{is:_.default,props:{class:"i-medium",fill:"rgb(var(--white)"}},method:()=>C(a.index,t)},class:"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium"},null,8,["name","role","action"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0)])}}};exports.default=I;
@@ -3,7 +3,7 @@ import { useRoute as S, useRouter as V } from "vue-router";
3
3
  import y from "../../../../components/Feed/Feed.vue.js";
4
4
  /* empty css */
5
5
  /* empty css */
6
- import R from "../../../../components/Popup/Popup.vue2.js";
6
+ import R from "../../../../components/Popup/Popup.vue.js";
7
7
  import U from "../../../globals/components/sections/SectionPageTitle.vue.js";
8
8
  import E from "../sections/MembersAdd.vue.js";
9
9
  /* empty css */
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),i=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");;/* empty css */const c=require("../../../../components/FieldTags/BlockTags.vue.cjs");;/* empty css */const r=require("../../../../components/Field/Field.vue2.cjs");;/* empty css */const m=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),p=require("../../../../components/UploadImage/UploadImage.vue.cjs"),f=require("../../../../components/Button/Button.vue2.cjs");;/* empty css */const g=require("../../../auth/store/auth.cjs"),e=require("../../store/organizations.cjs");require("../../store/memberships.cjs");const b={class:"for-transition pd-thin"},h=t.createElementVNode("h3",{class:"mn-b-small"},"Type of group",-1),V=t.createElementVNode("p",{class:"mn-b-thin"},"Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.",-1),N=t.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),q={class:"mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex"},_=t.createElementVNode("h4",null,"Upload photo",-1),y=t.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),v=t.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),w={__name:"OrganizationEdit",setup(U){const s=i.useRoute(),o=i.useRouter();e.actions.reset(),t.onMounted(async()=>{s.params._id&&await e.actions.read({_id:s.params._id})});const n=t.computed(()=>e.state.current);async function d(){s.params._id?await e.actions.update(s.params._id,n.value):await e.actions.create(e.state.current,g.state.user._id)}function u(){o.replace({name:"Organization",params:{_id:e.state.current._id}})}return(x,a)=>(t.openBlock(),t.createElementBlock("div",b,[h,V,t.createVNode(m.default,{modelValue:e.state.current.types,"onUpdate:modelValue":a[0]||(a[0]=l=>e.state.current.types=l),options:["public","exclusive","hidden"],multiple:!1,taggable:!1,placeholder:"Type to search or add type of organization",class:"mn-b-semi bg-light pd-medium radius-small"},null,8,["modelValue"]),N,t.createElementVNode("div",q,[t.createVNode(p.default,{photo:e.state.current.profile.photo,"onUpdate:photo":a[1]||(a[1]=l=>e.state.current.profile.photo=l),uploadPath:"organizations/"+e.state.current._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo","uploadPath"]),_]),t.createVNode(r.default,{field:e.state.current.profile.name,"onUpdate:field":a[2]||(a[2]=l=>e.state.current.profile.name=l),placeholder:"Name of organization",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(r.default,{field:e.state.current.profile.description,"onUpdate:field":a[3]||(a[3]=l=>e.state.current.profile.description=l),placeholder:"Brief description of your group",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(c.default,{onTagsChanged:a[4]||(a[4]=l=>e.state.current.profile.tags=l),tags:e.state.current.profile.tags},null,8,["tags"]),y,v,t.createVNode(r.default,{field:e.state.current.socials.instagram,"onUpdate:field":a[5]||(a[5]=l=>e.state.current.socials.instagram=l),label:"Instagram",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(r.default,{field:e.state.current.socials.twitter,"onUpdate:field":a[6]||(a[6]=l=>e.state.current.socials.twitter=l),label:"Twitter",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(r.default,{field:e.state.current.socials.facebook,"onUpdate:field":a[7]||(a[7]=l=>e.state.current.socials.facebook=l),label:"Facebook",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(r.default,{field:e.state.current.socials.telegram,"onUpdate:field":a[8]||(a[8]=l=>e.state.current.socials.telegram=l),label:"Telegram",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(r.default,{field:e.state.current.socials.youtube,"onUpdate:field":a[9]||(a[9]=l=>e.state.current.socials.youtube=l),label:"Telegram",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(f.default,{submit:d,callback:u,class:"bg-main w-100 mn-b-thin"},{default:t.withCtx(()=>[t.createTextVNode("Save")]),_:1})]))}};exports.default=w;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),i=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");;/* empty css */const c=require("../../../../components/FieldTags/BlockTags.vue.cjs");;/* empty css */const r=require("../../../../components/Field/Field.vue.cjs");;/* empty css */const m=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),p=require("../../../../components/UploadImage/UploadImage.vue.cjs"),f=require("../../../../components/Button/Button.vue.cjs");;/* empty css */const g=require("../../../auth/store/auth.cjs"),e=require("../../store/organizations.cjs");require("../../store/memberships.cjs");const b={class:"for-transition pd-thin"},h=t.createElementVNode("h3",{class:"mn-b-small"},"Type of group",-1),V=t.createElementVNode("p",{class:"mn-b-thin"},"Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.",-1),N=t.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),q={class:"mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex"},_=t.createElementVNode("h4",null,"Upload photo",-1),y=t.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),v=t.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),w={__name:"OrganizationEdit",setup(U){const s=i.useRoute(),o=i.useRouter();e.actions.reset(),t.onMounted(async()=>{s.params._id&&await e.actions.read({_id:s.params._id})});const n=t.computed(()=>e.state.current);async function d(){s.params._id?await e.actions.update(s.params._id,n.value):await e.actions.create(e.state.current,g.state.user._id)}function u(){o.replace({name:"Organization",params:{_id:e.state.current._id}})}return(x,a)=>(t.openBlock(),t.createElementBlock("div",b,[h,V,t.createVNode(m.default,{modelValue:e.state.current.types,"onUpdate:modelValue":a[0]||(a[0]=l=>e.state.current.types=l),options:["public","exclusive","hidden"],multiple:!1,taggable:!1,placeholder:"Type to search or add type of organization",class:"mn-b-semi bg-light pd-medium radius-small"},null,8,["modelValue"]),N,t.createElementVNode("div",q,[t.createVNode(p.default,{photo:e.state.current.profile.photo,"onUpdate:photo":a[1]||(a[1]=l=>e.state.current.profile.photo=l),uploadPath:"organizations/"+e.state.current._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo","uploadPath"]),_]),t.createVNode(r.default,{field:e.state.current.profile.name,"onUpdate:field":a[2]||(a[2]=l=>e.state.current.profile.name=l),placeholder:"Name of organization",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(r.default,{field:e.state.current.profile.description,"onUpdate:field":a[3]||(a[3]=l=>e.state.current.profile.description=l),placeholder:"Brief description of your group",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(c.default,{onTagsChanged:a[4]||(a[4]=l=>e.state.current.profile.tags=l),tags:e.state.current.profile.tags},null,8,["tags"]),y,v,t.createVNode(r.default,{field:e.state.current.socials.instagram,"onUpdate:field":a[5]||(a[5]=l=>e.state.current.socials.instagram=l),label:"Instagram",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(r.default,{field:e.state.current.socials.twitter,"onUpdate:field":a[6]||(a[6]=l=>e.state.current.socials.twitter=l),label:"Twitter",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(r.default,{field:e.state.current.socials.facebook,"onUpdate:field":a[7]||(a[7]=l=>e.state.current.socials.facebook=l),label:"Facebook",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(r.default,{field:e.state.current.socials.telegram,"onUpdate:field":a[8]||(a[8]=l=>e.state.current.socials.telegram=l),label:"Telegram",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(r.default,{field:e.state.current.socials.youtube,"onUpdate:field":a[9]||(a[9]=l=>e.state.current.socials.youtube=l),label:"Telegram",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(f.default,{submit:d,callback:u,class:"bg-main w-100 mn-b-thin"},{default:t.withCtx(()=>[t.createTextVNode("Save")]),_:1})]))}};exports.default=w;
@@ -5,16 +5,16 @@ import "../../../globals/localization/vue-i18n.js";
5
5
  /* empty css */
6
6
  import w from "../../../../components/FieldTags/BlockTags.vue.js";
7
7
  /* empty css */
8
- import o from "../../../../components/Field/Field.vue2.js";
9
- /* empty css */
8
+ import o from "../../../../components/Field/Field.vue.js";
9
+ /* empty css */
10
10
  import x from "../../../../components/SelectMulti/SelectMulti.vue.js";
11
11
  import v from "../../../../components/UploadImage/UploadImage.vue.js";
12
- import U from "../../../../components/Button/Button.vue2.js";
13
- /* empty css */
12
+ import U from "../../../../components/Button/Button.vue.js";
13
+ /* empty css */
14
14
  import { state as k } from "../../../auth/store/auth.js";
15
15
  import { actions as s, state as e } from "../../store/organizations.js";
16
16
  import "../../store/memberships.js";
17
- const T = { class: "for-transition pd-thin" }, z = /* @__PURE__ */ r("h3", { class: "mn-b-small" }, "Type of group", -1), V = /* @__PURE__ */ r("p", { class: "mn-b-thin" }, "Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.", -1), P = /* @__PURE__ */ r("h3", { class: "mn-b-small" }, "Profile", -1), N = { class: "mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex" }, S = /* @__PURE__ */ r("h4", null, "Upload photo", -1), $ = /* @__PURE__ */ r("h3", { class: "mn-b-small" }, "Socials", -1), B = /* @__PURE__ */ r("p", { class: "mn-b-thin" }, "Please provide only the username for social media profiles, without full links.", -1), X = {
17
+ const T = { class: "for-transition pd-thin" }, z = /* @__PURE__ */ r("h3", { class: "mn-b-small" }, "Type of group", -1), V = /* @__PURE__ */ r("p", { class: "mn-b-thin" }, "Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.", -1), P = /* @__PURE__ */ r("h3", { class: "mn-b-small" }, "Profile", -1), $ = { class: "mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex" }, N = /* @__PURE__ */ r("h4", null, "Upload photo", -1), S = /* @__PURE__ */ r("h3", { class: "mn-b-small" }, "Socials", -1), B = /* @__PURE__ */ r("p", { class: "mn-b-thin" }, "Please provide only the username for social media profiles, without full links.", -1), X = {
18
18
  __name: "OrganizationEdit",
19
19
  setup(E) {
20
20
  const a = _(), n = y();
@@ -41,14 +41,14 @@ const T = { class: "for-transition pd-thin" }, z = /* @__PURE__ */ r("h3", { cla
41
41
  class: "mn-b-semi bg-light pd-medium radius-small"
42
42
  }, null, 8, ["modelValue"]),
43
43
  P,
44
- r("div", N, [
44
+ r("div", $, [
45
45
  i(v, {
46
46
  photo: e.current.profile.photo,
47
47
  "onUpdate:photo": t[1] || (t[1] = (l) => e.current.profile.photo = l),
48
48
  uploadPath: "organizations/" + e.current._id + "/avatars",
49
49
  class: "h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"
50
50
  }, null, 8, ["photo", "uploadPath"]),
51
- S
51
+ N
52
52
  ]),
53
53
  i(o, {
54
54
  field: e.current.profile.name,
@@ -66,7 +66,7 @@ const T = { class: "for-transition pd-thin" }, z = /* @__PURE__ */ r("h3", { cla
66
66
  onTagsChanged: t[4] || (t[4] = (l) => e.current.profile.tags = l),
67
67
  tags: e.current.profile.tags
68
68
  }, null, 8, ["tags"]),
69
- $,
69
+ S,
70
70
  B,
71
71
  i(o, {
72
72
  field: e.current.socials.instagram,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router"),d=require("../../../../components/Dropdown/Dropdown.vue.cjs"),m=require("../../../../components/Text/Text.vue.cjs"),g=require("../../../../components/Chips/Chips.vue.cjs"),b=require("../../../icons/entities/IconFollowing.vue.cjs"),h=require("../../../icons/navigation/IconEdit.vue.cjs"),f=require("../../../icons/navigation/IconEllipsis.vue.cjs"),k=require("../../../icons/placeholders/PlaceholderOrganizationPic.vue.cjs"),c=require("../elements/ButtonToggleMembership.vue.cjs"),z=require("../blocks/Socials.vue.cjs"),w=require("../../../reports/components/sections/FormReport.vue.cjs"),x=require("../../store/organizations.cjs"),B=require("../../store/memberships.cjs"),V={class:"flex-center flex flex-column t-center pd-medium radius-big bg-light"},y={class:"bg-black pd-thin radius-small"},N=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),E=["src"],q={class:"mn-b-thin"},p={class:"flex-center pd-r-thin pd-l-thin flex-nowrap flex mn-t-thin bg-white radius-extra w-max"},C={class:"mn-t-thin p-medium t-medium uppercase mn-b-thin"},S={class:"w-max-50r mn-t-regular mn-b-medium p-big"},v={key:5,class:"mn-t-small mn-b-thin"},O={__name:"DetailsTab",props:{organization:Object,user:Object},setup(t){const s=u.useRoute(),l=({membership:o,status:i,target:r},n,a)=>{B.mutations.handleMembershipUpdate(x.state.current,o,i,r,n,a)};return(o,i)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>{var r,n;return[e.createElementVNode("section",V,[t.user._id!==t.organization.owner?(e.openBlock(),e.createBlock(d.default,{key:0,label:{component:f.default,class:"i-regular t-transp"},align:"right",class:"cursor-pointer pos-absolute pos-r-regular pos-t-regular pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",y,[e.createVNode(w.default,{user:t.user._id,type:"organization",target:t.organization._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[N]),_:1},8,["user","target"]),t.user._id&&t.user._id!==t.organization.owner?(e.openBlock(),e.createBlock(c.default,{key:0,user:t.user._id,type:"organization",role:"blocked",target:t.organization._id,status:t.organization.isBlocked,text:{create:"Block",remove:"Unblock"},onUpdateMembership:i[0]||(i[0]=a=>l(a,"isBlocked")),class:"t-white w-100 mn-t-thin bg-red"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0),t.user._id===t.organization.owner?(e.openBlock(),e.createBlock(h.default,{key:1,onClick:i[1]||(i[1]=a=>o.$router.push({name:"Organization Edit",params:{_id:t.organization._id}})),class:"pos-absolute cursor-pointer pos-t-big pos-r-big i-regular t-transp"})):e.createCommentVNode("",!0),t.organization.profile.photo?(e.openBlock(),e.createElementBlock("img",{key:2,src:(o.FILE_SERVER_URL||"")+t.organization.profile.photo,class:"radius-big bg-light flex-center flex mn-b-small w-8r"},null,8,E)):(e.openBlock(),e.createBlock(k.default,{key:3,class:"radius-medium mn-b-small i-extra"})),e.createElementVNode("h1",q,e.toDisplayString(t.organization.profile.name),1),e.createElementVNode("div",p,[e.createVNode(b.default,{class:"i-medium mn-r-micro t-transp"}),e.createElementVNode("p",C,e.toDisplayString(t.organization.numberOfSubscribers)+" followers",1),t.user._id&&e.unref(s).params._id&&e.unref(s).params._id!==t.user._id&&t.organization.owner!==t.user._id?(e.openBlock(),e.createBlock(c.default,{key:0,user:t.user._id,type:"organization",role:"subscriber",target:t.organization._id,status:t.organization.isSubscriber,text:{create:"+",remove:"-"},onUpdateMembership:i[2]||(i[2]=a=>l(a,"isSubscriber","numberOfSubscribers")),class:"mn-l-thin p-medium t-medium radius-extra i-semi"},null,8,["user","target","status"])):e.createCommentVNode("",!0)]),e.createElementVNode("p",S,[e.createVNode(m.default,{text:t.organization.profile.description||"",maxLen:240},null,8,["text"])]),((n=(r=t.organization.profile)==null?void 0:r.tags)==null?void 0:n.length)>0?(e.openBlock(),e.createBlock(g.default,{key:4,chips:t.organization.profile.tags,class:"p-medium"},null,8,["chips"])):e.createCommentVNode("",!0),Object.values(t.organization.socials).some(a=>a)?(e.openBlock(),e.createElementBlock("h4",v," Find us in socials ")):e.createCommentVNode("",!0),e.createVNode(z.default,{telegram:t.organization.socials.telegram,facebook:t.organization.socials.facebook,instagram:t.organization.socials.instagram,twitter:t.organization.socials.twitter,youtube:t.organization.socials.youtube},null,8,["telegram","facebook","instagram","twitter","youtube"])])]}),_:1}))}};exports.default=O;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router"),d=require("../../../../components/Dropdown/Dropdown.vue2.cjs"),m=require("../../../../components/Text/Text.vue.cjs"),g=require("../../../../components/Chips/Chips.vue2.cjs"),b=require("../../../icons/entities/IconFollowing.vue.cjs"),h=require("../../../icons/navigation/IconEdit.vue.cjs"),f=require("../../../icons/navigation/IconEllipsis.vue.cjs"),k=require("../../../icons/placeholders/PlaceholderOrganizationPic.vue.cjs"),c=require("../elements/ButtonToggleMembership.vue.cjs"),z=require("../blocks/Socials.vue.cjs"),w=require("../../../reports/components/sections/FormReport.vue.cjs"),x=require("../../store/organizations.cjs"),B=require("../../store/memberships.cjs"),V={class:"flex-center flex flex-column t-center pd-medium radius-big bg-light"},y={class:"bg-black pd-thin radius-small"},N=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),E=["src"],q={class:"mn-b-thin"},p={class:"flex-center pd-r-thin pd-l-thin flex-nowrap flex mn-t-thin bg-white radius-extra w-max"},C={class:"mn-t-thin p-medium t-medium uppercase mn-b-thin"},S={class:"w-max-50r mn-t-regular mn-b-medium p-big"},v={key:5,class:"mn-t-small mn-b-thin"},O={__name:"DetailsTab",props:{organization:Object,user:Object},setup(t){const s=u.useRoute(),l=({membership:o,status:i,target:r},n,a)=>{B.mutations.handleMembershipUpdate(x.state.current,o,i,r,n,a)};return(o,i)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>{var r,n;return[e.createElementVNode("section",V,[t.user._id!==t.organization.owner?(e.openBlock(),e.createBlock(d.default,{key:0,label:{component:f.default,class:"i-regular t-transp"},align:"right",class:"cursor-pointer pos-absolute pos-r-regular pos-t-regular pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",y,[e.createVNode(w.default,{user:t.user._id,type:"organization",target:t.organization._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[N]),_:1},8,["user","target"]),t.user._id&&t.user._id!==t.organization.owner?(e.openBlock(),e.createBlock(c.default,{key:0,user:t.user._id,type:"organization",role:"blocked",target:t.organization._id,status:t.organization.isBlocked,text:{create:"Block",remove:"Unblock"},onUpdateMembership:i[0]||(i[0]=a=>l(a,"isBlocked")),class:"t-white w-100 mn-t-thin bg-red"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0),t.user._id===t.organization.owner?(e.openBlock(),e.createBlock(h.default,{key:1,onClick:i[1]||(i[1]=a=>o.$router.push({name:"Organization Edit",params:{_id:t.organization._id}})),class:"pos-absolute cursor-pointer pos-t-big pos-r-big i-regular t-transp"})):e.createCommentVNode("",!0),t.organization.profile.photo?(e.openBlock(),e.createElementBlock("img",{key:2,src:(o.FILE_SERVER_URL||"")+t.organization.profile.photo,class:"radius-big bg-light flex-center flex mn-b-small w-8r"},null,8,E)):(e.openBlock(),e.createBlock(k.default,{key:3,class:"radius-medium mn-b-small i-extra"})),e.createElementVNode("h1",q,e.toDisplayString(t.organization.profile.name),1),e.createElementVNode("div",p,[e.createVNode(b.default,{class:"i-medium mn-r-micro t-transp"}),e.createElementVNode("p",C,e.toDisplayString(t.organization.numberOfSubscribers)+" followers",1),t.user._id&&e.unref(s).params._id&&e.unref(s).params._id!==t.user._id&&t.organization.owner!==t.user._id?(e.openBlock(),e.createBlock(c.default,{key:0,user:t.user._id,type:"organization",role:"subscriber",target:t.organization._id,status:t.organization.isSubscriber,text:{create:"+",remove:"-"},onUpdateMembership:i[2]||(i[2]=a=>l(a,"isSubscriber","numberOfSubscribers")),class:"mn-l-thin p-medium t-medium radius-extra i-semi"},null,8,["user","target","status"])):e.createCommentVNode("",!0)]),e.createElementVNode("p",S,[e.createVNode(m.default,{text:t.organization.profile.description||"",maxLen:240},null,8,["text"])]),((n=(r=t.organization.profile)==null?void 0:r.tags)==null?void 0:n.length)>0?(e.openBlock(),e.createBlock(g.default,{key:4,chips:t.organization.profile.tags,class:"p-medium"},null,8,["chips"])):e.createCommentVNode("",!0),Object.values(t.organization.socials).some(a=>a)?(e.openBlock(),e.createElementBlock("h4",v," Find us in socials ")):e.createCommentVNode("",!0),e.createVNode(z.default,{telegram:t.organization.socials.telegram,facebook:t.organization.socials.facebook,instagram:t.organization.socials.instagram,twitter:t.organization.socials.twitter,youtube:t.organization.socials.youtube},null,8,["telegram","facebook","instagram","twitter","youtube"])])]}),_:1}))}};exports.default=O;
@@ -1,8 +1,8 @@
1
1
  import { openBlock as e, createBlock as r, Transition as k, withCtx as c, createElementVNode as n, createVNode as u, createCommentVNode as o, createElementBlock as b, toDisplayString as f, unref as h } from "vue";
2
2
  import { useRoute as x } from "vue-router";
3
- import w from "../../../../components/Dropdown/Dropdown.vue.js";
3
+ import w from "../../../../components/Dropdown/Dropdown.vue2.js";
4
4
  import y from "../../../../components/Text/Text.vue.js";
5
- import p from "../../../../components/Chips/Chips.vue.js";
5
+ import p from "../../../../components/Chips/Chips.vue2.js";
6
6
  import $ from "../../../icons/entities/IconFollowing.vue.js";
7
7
  import O from "../../../icons/navigation/IconEdit.vue.js";
8
8
  import B from "../../../icons/navigation/IconEllipsis.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),m=require("../../../../components/Field/Field.vue2.cjs");require("vue-i18n");;/* empty css */;/* empty css */const _=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");;/* empty css */;/* empty css */const f=o=>(e.pushScopeId("data-v-f93fcad7"),o=o(),e.popScopeId(),o),v={class:"documents"},h=f(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Список документов",-1)),k={class:"mn-b-big cols-4"},b=["onClick"],y={class:"mn-b-small"},E={class:"t-semi t-transp radius-small"},B={__name:"Documents",setup(o){r.useRouter(),r.useRoute();let l=[{name:"Паспорт",status:"Не добавлен",inputs:[{type:"text",name:"Номер и серия"},{type:"text",name:"Место выдачи"},{type:"text",name:"Дата выдачи"}]},{name:"ИНН",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"СНИЛС",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"Военный билет",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]}];const s=e.ref(!1),a=e.ref(null),p=u=>{a.value=u,s.value=!0},c=()=>{s.value=!1},i=()=>{c()};return e.watchEffect(()=>{}),(u,q)=>{const d=e.resolveComponent("Popup");return e.openBlock(),e.createElementBlock("div",v,[h,e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(t,n)=>(e.openBlock(),e.createElementBlock("div",{key:n,onClick:x=>p(n),class:"h-100 pd-medium bg-white radius-small"},[e.createElementVNode("h3",y,e.toDisplayString(t.name),1),e.createElementVNode("p",E,e.toDisplayString(t.status),1)],8,b))),128))]),e.createVNode(d,{title:"Добавить документ",onClosePopup:c,isPopupOpen:s.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l)[a.value].inputs,t=>(e.openBlock(),e.createElementBlock("div",{key:t.name},[e.createVNode(m.default,{field:t.value,"onUpdate:field":n=>t.value=n,label:t.name,_id:t.name,placeholder:t.name,class:"w-100"},null,8,["field","onUpdate:field","label","_id","placeholder"])]))),128)),e.createElementVNode("button",{onClick:i,class:"w-100 mn-b-small button"},"Отправить на верификацию")]),_:1},8,["isPopupOpen"])])}}},g=_.default(B,[["__scopeId","data-v-f93fcad7"]]);exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),m=require("../../../../components/Field/Field.vue.cjs");require("vue-i18n");;/* empty css */;/* empty css */const _=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");;/* empty css */;/* empty css */const f=o=>(e.pushScopeId("data-v-f93fcad7"),o=o(),e.popScopeId(),o),v={class:"documents"},h=f(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Список документов",-1)),k={class:"mn-b-big cols-4"},b=["onClick"],y={class:"mn-b-small"},E={class:"t-semi t-transp radius-small"},B={__name:"Documents",setup(o){r.useRouter(),r.useRoute();let l=[{name:"Паспорт",status:"Не добавлен",inputs:[{type:"text",name:"Номер и серия"},{type:"text",name:"Место выдачи"},{type:"text",name:"Дата выдачи"}]},{name:"ИНН",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"СНИЛС",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"Военный билет",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]}];const s=e.ref(!1),a=e.ref(null),p=u=>{a.value=u,s.value=!0},c=()=>{s.value=!1},i=()=>{c()};return e.watchEffect(()=>{}),(u,q)=>{const d=e.resolveComponent("Popup");return e.openBlock(),e.createElementBlock("div",v,[h,e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(t,n)=>(e.openBlock(),e.createElementBlock("div",{key:n,onClick:x=>p(n),class:"h-100 pd-medium bg-white radius-small"},[e.createElementVNode("h3",y,e.toDisplayString(t.name),1),e.createElementVNode("p",E,e.toDisplayString(t.status),1)],8,b))),128))]),e.createVNode(d,{title:"Добавить документ",onClosePopup:c,isPopupOpen:s.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l)[a.value].inputs,t=>(e.openBlock(),e.createElementBlock("div",{key:t.name},[e.createVNode(m.default,{field:t.value,"onUpdate:field":n=>t.value=n,label:t.name,_id:t.name,placeholder:t.name,class:"w-100"},null,8,["field","onUpdate:field","label","_id","placeholder"])]))),128)),e.createElementVNode("button",{onClick:i,class:"w-100 mn-b-small button"},"Отправить на верификацию")]),_:1},8,["isPopupOpen"])])}}},g=_.default(B,[["__scopeId","data-v-f93fcad7"]]);exports.default=g;
@@ -1,13 +1,13 @@
1
1
  import { ref as r, watchEffect as y, resolveComponent as P, openBlock as t, createElementBlock as s, createElementVNode as o, Fragment as i, renderList as d, unref as _, toDisplayString as f, createVNode as h, withCtx as k, pushScopeId as w, popScopeId as C } from "vue";
2
2
  import { useRouter as I, useRoute as g } from "vue-router";
3
- import D from "../../../../components/Field/Field.vue2.js";
3
+ import D from "../../../../components/Field/Field.vue.js";
4
4
  import "vue-i18n";
5
- /* empty css */
5
+ /* empty css */
6
6
  /* empty css */
7
7
  import S from "../../../../../../_virtual/_plugin-vue_export-helper.js";
8
- /* empty css */
8
+ /* empty css */
9
9
  /* empty css */
10
- const E = (a) => (w("data-v-f93fcad7"), a = a(), C(), a), B = { class: "documents" }, F = /* @__PURE__ */ E(() => /* @__PURE__ */ o("h3", { class: "mn-b-small" }, "Список документов", -1)), N = { class: "mn-b-big cols-4" }, O = ["onClick"], R = { class: "mn-b-small" }, U = { class: "t-semi t-transp radius-small" }, V = {
10
+ const E = (a) => (w("data-v-f93fcad7"), a = a(), C(), a), B = { class: "documents" }, N = /* @__PURE__ */ E(() => /* @__PURE__ */ o("h3", { class: "mn-b-small" }, "Список документов", -1)), O = { class: "mn-b-big cols-4" }, R = ["onClick"], U = { class: "mn-b-small" }, V = { class: "t-semi t-transp radius-small" }, $ = {
11
11
  __name: "Documents",
12
12
  setup(a) {
13
13
  I(), g();
@@ -54,19 +54,19 @@ const E = (a) => (w("data-v-f93fcad7"), a = a(), C(), a), B = { class: "document
54
54
  m();
55
55
  };
56
56
  return y(() => {
57
- }), (u, L) => {
57
+ }), (u, F) => {
58
58
  const x = P("Popup");
59
59
  return t(), s("div", B, [
60
- F,
61
- o("div", N, [
60
+ N,
61
+ o("div", O, [
62
62
  (t(!0), s(i, null, d(_(p), (e, n) => (t(), s("div", {
63
63
  key: n,
64
- onClick: ($) => v(n),
64
+ onClick: (L) => v(n),
65
65
  class: "h-100 pd-medium bg-white radius-small"
66
66
  }, [
67
- o("h3", R, f(e.name), 1),
68
- o("p", U, f(e.status), 1)
69
- ], 8, O))), 128))
67
+ o("h3", U, f(e.name), 1),
68
+ o("p", V, f(e.status), 1)
69
+ ], 8, R))), 128))
70
70
  ]),
71
71
  h(x, {
72
72
  title: "Добавить документ",
@@ -96,7 +96,7 @@ const E = (a) => (w("data-v-f93fcad7"), a = a(), C(), a), B = { class: "document
96
96
  ]);
97
97
  };
98
98
  }
99
- }, Q = /* @__PURE__ */ S(V, [["__scopeId", "data-v-f93fcad7"]]);
99
+ }, Q = /* @__PURE__ */ S($, [["__scopeId", "data-v-f93fcad7"]]);
100
100
  export {
101
101
  Q as default
102
102
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Field/Field.vue2.cjs");;/* empty css */const m=require("../../../../components/Button/Button.vue2.cjs"),p=require("../../../icons/navigation/IconDelete.vue.cjs"),f=require("../../../icons/navigation/IconAdd.vue.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("../../store/invites.cjs");const b={class:"mn-b-thin t-transp p-medium"},g={class:"cols-1 mn-b-small radius-medium pd-semi bg-light"},v=["onClick"],h=e.createElementVNode("span",null,"Invite to organization",-1),k={__name:"MembersAdd",props:{organization:Object,text:String},emits:["send-invite"],setup(a,{emit:s}){const o=e.ref(null),r=s,t=e.ref([{contact:""}]);async function c(){r("send-invite",t.value)}return(_,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("p",b,e.toDisplayString(a.text),1),e.createElementVNode("section",g,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(n,l)=>(e.openBlock(),e.createElementBlock("div",{key:l,class:"br-1px br-solid br-grey-transp-25 flex gap-thin radius-small mn-b-thin"},[e.createVNode(u.default,{field:n.contact,"onUpdate:field":d=>n.contact=d,placeholder:"Enter email or phone",class:"w-100 pd-small radius-small bg-white",validation:o.value},{default:e.withCtx(()=>[l<1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:i[0]||(i[0]=()=>t.value.push({contact:""})),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"},[e.createVNode(f.default,{class:"i-medium",fill:"rgb(var(--white)"})])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:()=>t.value.splice(l,1),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},[e.createVNode(p.default,{class:"i-medium",fill:"rgb(var(--white)"})],8,v))]),_:2},1032,["field","onUpdate:field","validation"])]))),128))]),e.createVNode(m.default,{submit:c,class:"w-100 bg-main"},{default:e.withCtx(()=>[h]),_:1})]))}};exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Field/Field.vue.cjs");;/* empty css */const m=require("../../../../components/Button/Button.vue.cjs"),p=require("../../../icons/navigation/IconDelete.vue.cjs"),f=require("../../../icons/navigation/IconAdd.vue.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("../../store/invites.cjs");const b={class:"mn-b-thin t-transp p-medium"},g={class:"cols-1 mn-b-small radius-medium pd-semi bg-light"},v=["onClick"],h=e.createElementVNode("span",null,"Invite to organization",-1),k={__name:"MembersAdd",props:{organization:Object,text:String},emits:["send-invite"],setup(a,{emit:s}){const o=e.ref(null),r=s,t=e.ref([{contact:""}]);async function c(){r("send-invite",t.value)}return(_,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("p",b,e.toDisplayString(a.text),1),e.createElementVNode("section",g,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(n,l)=>(e.openBlock(),e.createElementBlock("div",{key:l,class:"br-1px br-solid br-grey-transp-25 flex gap-thin radius-small mn-b-thin"},[e.createVNode(u.default,{field:n.contact,"onUpdate:field":d=>n.contact=d,placeholder:"Enter email or phone",class:"w-100 pd-small radius-small bg-white",validation:o.value},{default:e.withCtx(()=>[l<1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:i[0]||(i[0]=()=>t.value.push({contact:""})),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"},[e.createVNode(f.default,{class:"i-medium",fill:"rgb(var(--white)"})])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:()=>t.value.splice(l,1),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},[e.createVNode(p.default,{class:"i-medium",fill:"rgb(var(--white)"})],8,v))]),_:2},1032,["field","onUpdate:field","validation"])]))),128))]),e.createVNode(m.default,{submit:c,class:"w-100 bg-main"},{default:e.withCtx(()=>[h]),_:1})]))}};exports.default=k;
@@ -1,12 +1,12 @@
1
- import { ref as r, openBlock as t, createElementBlock as e, createElementVNode as a, toDisplayString as _, Fragment as g, renderList as h, createVNode as s, withCtx as c } from "vue";
2
- import v from "../../../../components/Field/Field.vue2.js";
3
- /* empty css */
4
- import x from "../../../../components/Button/Button.vue2.js";
1
+ import { ref as r, openBlock as t, createElementBlock as e, createElementVNode as l, toDisplayString as b, Fragment as g, renderList as h, createVNode as s, withCtx as c } from "vue";
2
+ import v from "../../../../components/Field/Field.vue.js";
3
+ /* empty css */
4
+ import x from "../../../../components/Button/Button.vue.js";
5
5
  import k from "../../../icons/navigation/IconDelete.vue.js";
6
6
  import w from "../../../icons/navigation/IconAdd.vue.js";
7
7
  import "../../../middlewares/client/inputs.validation.js";
8
8
  import "../../store/invites.js";
9
- const y = { class: "mn-b-thin t-transp p-medium" }, C = { class: "cols-1 mn-b-small radius-medium pd-semi bg-light" }, E = ["onClick"], V = /* @__PURE__ */ a("span", null, "Invite to organization", -1), A = {
9
+ const y = { class: "mn-b-thin t-transp p-medium" }, C = { class: "cols-1 mn-b-small radius-medium pd-semi bg-light" }, $ = ["onClick"], E = /* @__PURE__ */ l("span", null, "Invite to organization", -1), D = {
10
10
  __name: "MembersAdd",
11
11
  props: {
12
12
  organization: Object,
@@ -18,22 +18,22 @@ const y = { class: "mn-b-thin t-transp p-medium" }, C = { class: "cols-1 mn-b-sm
18
18
  async function f() {
19
19
  u("send-invite", i.value);
20
20
  }
21
- return ($, n) => (t(), e("div", null, [
22
- a("p", y, _(m.text), 1),
23
- a("section", C, [
24
- (t(!0), e(g, null, h(i.value, (o, l) => (t(), e("div", {
25
- key: l,
21
+ return (V, n) => (t(), e("div", null, [
22
+ l("p", y, b(m.text), 1),
23
+ l("section", C, [
24
+ (t(!0), e(g, null, h(i.value, (o, a) => (t(), e("div", {
25
+ key: a,
26
26
  class: "br-1px br-solid br-grey-transp-25 flex gap-thin radius-small mn-b-thin"
27
27
  }, [
28
28
  s(v, {
29
29
  field: o.contact,
30
- "onUpdate:field": (b) => o.contact = b,
30
+ "onUpdate:field": (_) => o.contact = _,
31
31
  placeholder: "Enter email or phone",
32
32
  class: "w-100 pd-small radius-small bg-white",
33
33
  validation: p.value
34
34
  }, {
35
35
  default: c(() => [
36
- l < 1 ? (t(), e("div", {
36
+ a < 1 ? (t(), e("div", {
37
37
  key: 0,
38
38
  onClick: n[0] || (n[0] = () => i.value.push({ contact: "" })),
39
39
  class: "radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"
@@ -44,14 +44,14 @@ const y = { class: "mn-b-thin t-transp p-medium" }, C = { class: "cols-1 mn-b-sm
44
44
  })
45
45
  ])) : (t(), e("div", {
46
46
  key: 1,
47
- onClick: () => i.value.splice(l, 1),
47
+ onClick: () => i.value.splice(a, 1),
48
48
  class: "radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"
49
49
  }, [
50
50
  s(k, {
51
51
  class: "i-medium",
52
52
  fill: "rgb(var(--white)"
53
53
  })
54
- ], 8, E))
54
+ ], 8, $))
55
55
  ]),
56
56
  _: 2
57
57
  }, 1032, ["field", "onUpdate:field", "validation"])
@@ -62,7 +62,7 @@ const y = { class: "mn-b-thin t-transp p-medium" }, C = { class: "cols-1 mn-b-sm
62
62
  class: "w-100 bg-main"
63
63
  }, {
64
64
  default: c(() => [
65
- V
65
+ E
66
66
  ]),
67
67
  _: 1
68
68
  })
@@ -70,5 +70,5 @@ const y = { class: "mn-b-thin t-transp p-medium" }, C = { class: "cols-1 mn-b-sm
70
70
  }
71
71
  };
72
72
  export {
73
- A as default
73
+ D as default
74
74
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const q=require("../../../auth/store/auth.cjs");require("../../store/memberships.cjs");require("vue-i18n");;/* empty css */require("../../../reports/store/reports.cjs");const y=require("../../store/organizations.cjs"),m=require("../blocks/CardOrganization.vue.cjs"),b=require("../blocks/EmptyState.vue.cjs");;/* empty css */;/* empty css */const g={class:"for-transition bg-white radius-big w-100"},k={class:""},_={key:1,class:"cols-1"},h={__name:"Organizations",props:{owner:{type:String,default:null},user:{type:[String,Number],default:null},onlyuser:{type:[String,Number],default:null}},async setup(c){let t,u;const o=c,a=e.ref(null);a.value=([t,u]=e.withAsyncContext(()=>y.actions.read({owner:o.owner,user:o.user,onlyuser:o.onlyuser})),t=await t,u(),t);const d=s.useRouter(),n=s.useRoute();let p=n.query.tab?n.query.tab:"details";const i=e.ref(p);return n.query.tab=i.value,e.watch(i,r=>{d.replace({query:{...n.query,tab:r}})}),(r,v)=>(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",k,[a.value<1?(e.openBlock(),e.createBlock(b.default,{key:0,title:"You Haven't Joined Any Organization Yet",description:"Weeder is all about community. Join an organization or maybe you want to create your own?",action:"Create organization",callback:r.a=()=>r.$router.push("/app/organization/create/details")},null,8,["callback"])):(e.openBlock(),e.createElementBlock("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,l=>(e.openBlock(),e.createBlock(m.default,{key:l._id,organization:l,user:q.state.user,onUpdateMembership:r.handleMembershipUpdate,class:e.normalizeClass(["w-100",{"mn-r-small":r.index!==a.value.length-1}])},null,8,["organization","user","onUpdateMembership","class"]))),128))]))])]))}};exports.default=h;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const q=require("../../../auth/store/auth.cjs");require("../../store/memberships.cjs");require("vue-i18n");;/* empty css */require("../../../reports/store/reports.cjs");const y=require("../../store/organizations.cjs"),m=require("../blocks/CardOrganization.vue.cjs"),b=require("../blocks/EmptyState.vue.cjs");;/* empty css */;/* empty css */const g={class:"for-transition bg-white radius-big w-100"},k={class:""},_={key:1,class:"cols-1"},h={__name:"Organizations",props:{owner:{type:String,default:null},user:{type:[String,Number],default:null},onlyuser:{type:[String,Number],default:null}},async setup(c){let t,u;const o=c,a=e.ref(null);a.value=([t,u]=e.withAsyncContext(()=>y.actions.read({owner:o.owner,user:o.user,onlyuser:o.onlyuser})),t=await t,u(),t);const d=s.useRouter(),n=s.useRoute();let p=n.query.tab?n.query.tab:"details";const i=e.ref(p);return n.query.tab=i.value,e.watch(i,r=>{d.replace({query:{...n.query,tab:r}})}),(r,v)=>(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",k,[a.value<1?(e.openBlock(),e.createBlock(b.default,{key:0,title:"You Haven't Joined Any Organization Yet",description:"Weeder is all about community. Join an organization or maybe you want to create your own?",action:"Create organization",callback:r.a=()=>r.$router.push("/app/organization/create/details")},null,8,["callback"])):(e.openBlock(),e.createElementBlock("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,l=>(e.openBlock(),e.createBlock(m.default,{key:l._id,organization:l,user:q.state.user,onUpdateMembership:r.handleMembershipUpdate,class:e.normalizeClass(["w-100",{"mn-r-small":r.index!==a.value.length-1}])},null,8,["organization","user","onUpdateMembership","class"]))),128))]))])]))}};exports.default=h;
@@ -2,16 +2,16 @@ import { ref as m, withAsyncContext as b, watch as _, openBlock as t, createElem
2
2
  import { useRouter as v, useRoute as z } from "vue-router";
3
3
  import "../../../../../../node_modules/js-cookie/dist/js.cookie.js";
4
4
  /* empty css */
5
- /* empty css */
6
- /* empty css */
7
- /* empty css */
8
- /* empty css */
9
- /* empty css */
10
5
  /* empty css */
6
+ /* empty css */
7
+ /* empty css */
8
+ /* empty css */
9
+ /* empty css */
10
+ /* empty css */
11
11
  import { state as k } from "../../../auth/store/auth.js";
12
12
  import "../../store/memberships.js";
13
13
  import "vue-i18n";
14
- /* empty css */
14
+ /* empty css */
15
15
  import "../../../reports/store/reports.js";
16
16
  import { actions as q } from "../../store/organizations.js";
17
17
  import $ from "../blocks/CardOrganization.vue.js";