@ozdao/prometheus-framework 0.2.138 → 0.2.140

Sign up to get free protection for your applications and to get access to all the features.
Files changed (205) hide show
  1. package/dist/auth.server.js +30 -15
  2. package/dist/auth.server.mjs +30 -15
  3. package/dist/community.server.js +3 -3
  4. package/dist/community.server.mjs +3 -3
  5. package/dist/events.server.js +3 -3
  6. package/dist/events.server.mjs +3 -3
  7. package/dist/files.server.js +3 -3
  8. package/dist/files.server.mjs +3 -3
  9. package/dist/gallery.server.js +4 -4
  10. package/dist/gallery.server.mjs +4 -4
  11. package/dist/index-DNI4aUP2.js +259 -0
  12. package/dist/index-Tcyehi73.mjs +260 -0
  13. package/dist/orders.server.js +9 -8
  14. package/dist/orders.server.mjs +9 -8
  15. package/dist/organizations.server.js +31 -15
  16. package/dist/organizations.server.mjs +31 -15
  17. package/dist/products.server.js +37 -5
  18. package/dist/products.server.mjs +37 -5
  19. package/dist/prometheus-framework/src/components/Completion/Completion.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/components/Completion/Completion.vue.js +19 -19
  21. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
  23. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  25. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
  27. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
  31. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +32 -31
  33. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +2 -2
  35. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +2 -2
  37. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +2 -2
  39. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/auth/store/auth.js +50 -47
  41. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
  47. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
  49. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
  51. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
  57. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
  61. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
  63. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +2 -2
  65. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +5 -5
  67. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  69. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  71. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  73. package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +1 -1
  75. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  77. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +16 -16
  79. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +5 -5
  81. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +2 -2
  83. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  87. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +42 -39
  89. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  91. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +4 -4
  93. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +121 -112
  95. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +4 -4
  97. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +17 -16
  99. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  101. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +121 -61
  103. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +6 -6
  105. package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/organizations/store/invites.js +25 -24
  107. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
  109. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  111. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  113. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  115. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  117. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
  119. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +3 -3
  121. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  123. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  125. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
  127. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  129. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
  131. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  133. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +2 -2
  135. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +4 -4
  137. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
  138. package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +66 -67
  139. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +4 -4
  141. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  143. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  144. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +78 -74
  145. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
  146. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
  147. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
  148. package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +2 -2
  149. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  150. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +5 -5
  151. package/dist/reports.server.js +0 -3
  152. package/dist/reports.server.mjs +0 -3
  153. package/dist/style.css +1 -1
  154. package/dist/wallet.server.js +5 -5
  155. package/dist/wallet.server.mjs +8 -8
  156. package/package.json +1 -1
  157. package/src/components/Completion/Completion.vue +29 -30
  158. package/src/modules/auth/components/pages/Invite.vue +4 -2
  159. package/src/modules/auth/controllers/auth.controller.js +31 -13
  160. package/src/modules/auth/middlewares/authJwt.js +80 -0
  161. package/src/modules/{middlewares/server → auth/middlewares}/index.js +1 -3
  162. package/src/modules/{middlewares/server → auth/middlewares}/verifyAccesses.js +1 -1
  163. package/src/modules/auth/routes/auth.routes.js +2 -2
  164. package/src/modules/auth/routes/twofa.routes.js +1 -1
  165. package/src/modules/auth/store/auth.js +9 -0
  166. package/src/modules/chats/routes/chats.routes.js +1 -1
  167. package/src/modules/community/routes/blog.routes.js +2 -2
  168. package/src/modules/events/routes/events.routes.js +2 -2
  169. package/src/modules/files/routes/files.routes.js +2 -2
  170. package/src/modules/gallery/components/pages/Gallery.vue +1 -1
  171. package/src/modules/gallery/routes/gallery.routes.js +4 -5
  172. package/src/modules/globals/services/globals.crud.js +2 -2
  173. package/src/modules/marketplace/store/marketplace.js +1 -1
  174. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +2 -2
  175. package/src/modules/orders/components/sections/FormAddCustomer.vue +2 -2
  176. package/src/modules/orders/controllers/orders.controller.js +1 -2
  177. package/src/modules/orders/routes/applications.routes.js +2 -2
  178. package/src/modules/orders/routes/orders.routes.js +2 -2
  179. package/src/modules/organizations/components/blocks/CardOrganization.vue +9 -7
  180. package/src/modules/organizations/components/pages/Members.vue +26 -15
  181. package/src/modules/organizations/components/sections/DetailsTab.vue +1 -1
  182. package/src/modules/organizations/components/sections/MembersAdd.vue +101 -43
  183. package/src/modules/organizations/controllers/invites.controller.js +18 -13
  184. package/src/modules/organizations/controllers/memberships.controller.js +16 -9
  185. package/src/modules/organizations/controllers/organizations.controller.js +3 -4
  186. package/src/modules/organizations/models/membership.model.js +2 -0
  187. package/src/modules/organizations/models/organization.model.js +4 -0
  188. package/src/modules/organizations/routes/invites.routes.js +2 -2
  189. package/src/modules/organizations/store/invites.js +2 -1
  190. package/src/modules/products/controllers/leftovers.controller.js +1 -1
  191. package/src/modules/products/middlewares/index.js +11 -0
  192. package/src/modules/products/routes/categories.routes.js +2 -2
  193. package/src/modules/reports/routes/reports.routes.js +2 -2
  194. package/src/modules/spots/components/layouts/Spots.vue +2 -2
  195. package/src/modules/spots/components/pages/Map.vue +79 -78
  196. package/src/modules/users/components/pages/ProfileEdit.vue +37 -22
  197. package/src/modules/wallet/controllers/routes/payments.routes.js +2 -2
  198. package/src/modules/wallet/controllers/routes/rewards.routes.js +2 -2
  199. package/src/modules/middlewares/server/authJwt.js +0 -68
  200. /package/src/modules/{middlewares/server → auth/middlewares}/authSecret.js +0 -0
  201. /package/src/modules/{middlewares/server → auth/middlewares}/verifyInvites.js +0 -0
  202. /package/src/modules/{middlewares/server → auth/middlewares}/verifySignUp.js +0 -0
  203. /package/src/modules/{middlewares/server → auth/middlewares}/verifyUser.js +0 -0
  204. /package/src/modules/globals/services/{globals.cashe.js → globals.cache.js} +0 -0
  205. /package/src/modules/{middlewares/server → products/middlewares}/verifyCategory.js +0 -0
@@ -1,142 +1,150 @@
1
- import { ref as h, onMounted as O, computed as D, resolveComponent as F, openBlock as a, createElementBlock as i, createVNode as p, withCtx as u, createBlock as d, unref as l, Fragment as v, renderList as g, createCommentVNode as f, createTextVNode as B } from "vue";
2
- import { useRoute as S, useRouter as V } from "vue-router";
3
- import y from "../../../../components/Feed/Feed.vue.js";
1
+ import { ref as _, onMounted as F, computed as S, resolveComponent as B, openBlock as o, createElementBlock as l, createVNode as u, withCtx as p, createBlock as d, unref as m, Fragment as g, renderList as y, createCommentVNode as b, createTextVNode as U } from "vue";
2
+ import { useRoute as V, useRouter as R } from "vue-router";
3
+ import $ from "../../../../components/Feed/Feed.vue.js";
4
4
  /* empty css */
5
5
  /* empty css */
6
- import R from "../../../../components/Popup/Popup.vue.js";
7
- import U from "../../../globals/components/sections/SectionPageTitle.vue.js";
8
- import E from "../sections/MembersAdd.vue.js";
6
+ import E from "../../../../components/Popup/Popup.vue2.js";
7
+ import L from "../../../globals/components/sections/SectionPageTitle.vue.js";
8
+ import T from "../sections/MembersAdd.vue.js";
9
9
  /* empty css */
10
10
  import "../../../../components/Menu/MenuItem.vue.js";
11
- import C from "../../../users/components/blocks/CardUser.vue.js";
12
- import L from "../blocks/CardDepartment.vue.js";
11
+ import x from "../../../users/components/blocks/CardUser.vue.js";
12
+ import j from "../blocks/CardDepartment.vue.js";
13
13
  import M from "../../../icons/navigation/IconDelete.vue.js";
14
- import { state as $ } from "../../../auth/store/auth.js";
15
- import { actions as w, state as T } from "../../store/invites.js";
16
- import { actions as x, state as j } from "../../store/memberships.js";
17
- import { actions as q, state as G } from "../../store/organizations.js";
18
- import { state as z, actions as H } from "../../store/departments.js";
19
- const J = { class: "pd-thin" }, K = {
14
+ import { state as w } from "../../../auth/store/auth.js";
15
+ import { actions as z } from "../../../globals/store/globals.js";
16
+ import { actions as k } from "../../store/invites.js";
17
+ import { actions as I, state as q } from "../../store/memberships.js";
18
+ import { actions as G, state as H } from "../../store/organizations.js";
19
+ import { state as N, actions as J } from "../../store/departments.js";
20
+ const K = { class: "pd-thin" }, Q = {
20
21
  key: 2,
21
22
  class: "cols-1 gap-thin"
22
- }, Q = { key: 3 }, be = {
23
+ }, W = { key: 3 }, he = {
23
24
  __name: "Members",
24
- setup(W) {
25
- const o = S();
26
- V();
27
- const _ = h(null), n = h("members"), b = h(!1);
28
- function I() {
29
- b.value = !0;
25
+ setup(X) {
26
+ const s = V();
27
+ R();
28
+ const v = _(null), i = _("members"), c = _([]), h = _(!1);
29
+ function P() {
30
+ h.value = !0;
30
31
  }
31
- function k() {
32
- b.value = !1;
32
+ function C() {
33
+ h.value = !1;
33
34
  }
34
- O(async () => {
35
- _.value = (await q.read({ _id: o.params._id, user: $.user._id }))[0];
36
- }), D(() => {
37
- const r = z.departments, s = r.flatMap(
38
- (m) => m.subdepartments.map((t) => t._id)
35
+ F(async () => {
36
+ v.value = (await G.read({ _id: s.params._id, user: w.user._id }))[0];
37
+ }), S(() => {
38
+ const a = N.departments, r = a.flatMap(
39
+ (n) => n.subdepartments.map((e) => e._id)
39
40
  );
40
- return r.filter(
41
- (m) => !s.includes(m._id)
41
+ return a.filter(
42
+ (n) => !r.includes(n._id)
42
43
  );
43
44
  });
44
- async function N(r) {
45
- await w.create({
46
- owner: {
47
- type: "Organization",
48
- target: _.value._id
49
- },
50
- creator: {
51
- type: "User",
52
- target: $.user._id
53
- },
54
- invites: r
55
- }), k();
45
+ async function A(a, r, n) {
46
+ try {
47
+ const e = await k.create({
48
+ owner: {
49
+ type: "Organization",
50
+ target: v.value._id
51
+ },
52
+ creator: {
53
+ type: "User",
54
+ target: w.user._id
55
+ },
56
+ invites: a
57
+ });
58
+ for (let t of e.createdInvites)
59
+ z.add(c.value, t);
60
+ C(), r();
61
+ } catch (e) {
62
+ n(e);
63
+ }
56
64
  }
57
- async function P(r, s) {
58
- confirm("Confirm remove of member") == !0 && (j.memberships.splice(r, 1), await x.delete(s));
65
+ async function O(a, r) {
66
+ confirm("Confirm remove of member") == !0 && (q.memberships.splice(a, 1), await I.delete(r));
59
67
  }
60
- async function A(r, s) {
61
- confirm("Confirm remove of member") == !0 && (T.invites.splice(r, 1), await w.delete(s._id));
68
+ async function D(a, r) {
69
+ confirm("Confirm remove of member") == !0 && (z.delete(c.value, r), await k.delete(r._id));
62
70
  }
63
- return (r, s) => {
64
- const m = F("router-link");
65
- return a(), i("div", J, [
66
- p(U, {
71
+ return (a, r) => {
72
+ const n = B("router-link");
73
+ return o(), l("div", K, [
74
+ u(L, {
67
75
  title: "Members",
68
- "onUpdate:tabs_current": s[0] || (s[0] = (t) => n.value = t),
69
- tabs_current: n.value,
76
+ "onUpdate:tabs_current": r[0] || (r[0] = (e) => i.value = e),
77
+ tabs_current: i.value,
70
78
  tabs: [
71
- { name: `Members (${G.current.numberOfMembers || 0})`, value: "members" },
79
+ { name: `Members (${H.current.numberOfMembers || 0})`, value: "members" },
72
80
  { name: "Departments", value: "departments" },
73
81
  { name: "Invites", value: "invites" }
74
82
  ],
75
83
  actions: [
76
- { method: I, label: "Invite members" }
84
+ { method: P, label: "Invite members" }
77
85
  ],
78
86
  class: "mn-b-small bg-light bg-light radius-big"
79
87
  }, null, 8, ["tabs_current", "tabs", "actions"]),
80
- p(R, {
88
+ u(E, {
81
89
  title: "Add members",
82
- onClosePopup: k,
83
- isPopupOpen: b.value,
90
+ onClosePopup: C,
91
+ isPopupOpen: h.value,
84
92
  class: "bg-white w-min-30r w-max-30r radius-big pd-medium"
85
93
  }, {
86
- default: u(() => [
87
- p(E, {
94
+ default: p(() => [
95
+ u(T, {
88
96
  text: "Please enter your email or phone number to send an invitation link:",
89
- organization: _.value,
90
- onSendInvite: N
97
+ organization: v.value,
98
+ onSendInvite: A
91
99
  }, null, 8, ["organization"])
92
100
  ]),
93
101
  _: 1
94
102
  }, 8, ["isPopupOpen"]),
95
- n.value === "departments" ? (a(), d(y, {
103
+ i.value === "departments" ? (o(), d($, {
96
104
  key: 0,
97
105
  states: {
98
106
  empty: {
99
107
  title: "No Departments Found",
100
108
  description: "Currently, there are no departments available.",
101
109
  action: "Add department",
102
- callback: () => r.$router.push(`/organizations/${l(o).params._id}/departments/create`)
110
+ callback: () => a.$router.push(`/organizations/${m(s).params._id}/departments/create`)
103
111
  }
104
112
  },
105
113
  store: {
106
- read: (t) => H.read(t),
114
+ read: (e) => J.read(e),
107
115
  state: null
108
116
  },
109
117
  options: {
110
- organization: l(o).params._id,
111
- user: $.user._id
118
+ organization: m(s).params._id,
119
+ user: w.user._id
112
120
  }
113
121
  }, {
114
- default: u(({
115
- items: t
122
+ default: p(({
123
+ items: e
116
124
  }) => [
117
- (a(!0), i(v, null, g(t, (e, c) => (a(), d(L, {
118
- key: c,
119
- department: e,
120
- organization: l(o).params._id,
125
+ (o(!0), l(g, null, y(e, (t, f) => (o(), d(j, {
126
+ key: f,
127
+ department: t,
128
+ organization: m(s).params._id,
121
129
  class: "radius-semi bg-light pos-relative mn-b-thin"
122
130
  }, null, 8, ["department", "organization"]))), 128))
123
131
  ]),
124
132
  _: 1
125
- }, 8, ["states", "store", "options"])) : f("", !0),
126
- n.value === "departments" && z.departments.length > 0 ? (a(), d(m, {
133
+ }, 8, ["states", "store", "options"])) : b("", !0),
134
+ i.value === "departments" && N.departments.length > 0 ? (o(), d(n, {
127
135
  key: 1,
128
136
  to: {
129
- path: `/organizations/${l(o).params._id}/departments/create`
137
+ path: `/organizations/${m(s).params._id}/departments/create`
130
138
  },
131
139
  class: "d-block flex-center flex uppercase t-semi bg-main w-100 pd-small radius-extra"
132
140
  }, {
133
- default: u(() => [
134
- B(" Add department ")
141
+ default: p(() => [
142
+ U(" Add department ")
135
143
  ]),
136
144
  _: 1
137
- }, 8, ["to"])) : f("", !0),
138
- n.value === "members" ? (a(), i("div", K, [
139
- p(y, {
145
+ }, 8, ["to"])) : b("", !0),
146
+ i.value === "members" ? (o(), l("div", Q, [
147
+ u($, {
140
148
  search: !0,
141
149
  states: {
142
150
  empty: {
@@ -145,43 +153,44 @@ const J = { class: "pd-thin" }, K = {
145
153
  }
146
154
  },
147
155
  store: {
148
- read: (t) => x.read(t)
156
+ read: (e) => I.read(e)
149
157
  },
150
158
  options: {
151
- target: l(o).params._id,
159
+ target: m(s).params._id,
152
160
  role: ["member", "owner"]
153
161
  },
154
162
  class: "gap-thin cols-1"
155
163
  }, {
156
- default: u(({
157
- items: t
164
+ default: p(({
165
+ items: e
158
166
  }) => [
159
- (a(!0), i(v, null, g(t, (e, c) => (a(), d(C, {
160
- key: c,
161
- user: e,
162
- _id: e.user._id,
163
- photo: e.user.profile.photo,
164
- phone: e.user.phone,
165
- email: e.user.email,
166
- name: e.user.profile.name || "No name",
167
- role: e.label || e.role,
168
- onClick: (X) => r.$router.push(`/profile/${e.user._id}`),
169
- action: e.role !== "owner" ? {
167
+ (o(!0), l(g, null, y(e, (t, f) => (o(), d(x, {
168
+ key: f,
169
+ user: t,
170
+ _id: t.user._id,
171
+ photo: t.user.profile.photo,
172
+ phone: t.user.phone,
173
+ email: t.user.email,
174
+ name: t.user.profile.name || "No name",
175
+ role: t.label || t.role,
176
+ onClick: (Y) => a.$router.push(`/profile/${t.user._id}`),
177
+ action: t.role !== "owner" ? {
170
178
  label: {
171
179
  is: M,
172
180
  props: { class: "i-medium", fill: "rgb(var(--white)" }
173
181
  },
174
- method: () => P(c, e)
182
+ method: () => O(f, t)
175
183
  } : null,
176
184
  class: "h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium"
177
185
  }, null, 8, ["user", "_id", "photo", "phone", "email", "name", "role", "onClick", "action"]))), 128))
178
186
  ]),
179
187
  _: 1
180
188
  }, 8, ["store", "options"])
181
- ])) : f("", !0),
182
- n.value === "invites" ? (a(), i("div", Q, [
183
- p(y, {
184
- search: !0,
189
+ ])) : b("", !0),
190
+ i.value === "invites" ? (o(), l("div", W, [
191
+ u($, {
192
+ items: c.value,
193
+ "onUpdate:items": r[1] || (r[1] = (e) => c.value = e),
185
194
  states: {
186
195
  empty: {
187
196
  title: "No Invites Found",
@@ -189,38 +198,38 @@ const J = { class: "pd-thin" }, K = {
189
198
  }
190
199
  },
191
200
  store: {
192
- read: (t) => w.read(t)
201
+ read: (e) => k.read(e)
193
202
  },
194
203
  options: {
195
- owner: l(o).params._id
204
+ owner: m(s).params._id
196
205
  },
197
206
  class: "gap-thin cols-1"
198
207
  }, {
199
- default: u(({
200
- items: t
208
+ default: p(({
209
+ items: e
201
210
  }) => [
202
- (a(!0), i(v, null, g(t, (e) => (a(), d(C, {
203
- key: r.index,
211
+ (o(!0), l(g, null, y(e, (t) => (o(), d(x, {
212
+ key: a.index,
204
213
  user: { type: "invite" },
205
- name: e.email || e.phone,
206
- role: e.status,
214
+ name: t.email || t.phone,
215
+ role: t.status,
207
216
  action: {
208
217
  label: {
209
218
  is: M,
210
219
  props: { class: "i-medium", fill: "rgb(var(--white)" }
211
220
  },
212
- method: () => A(r.index, e)
221
+ method: () => D(a.index, t)
213
222
  },
214
223
  class: "h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium"
215
224
  }, null, 8, ["name", "role", "action"]))), 128))
216
225
  ]),
217
226
  _: 1
218
- }, 8, ["store", "options"])
219
- ])) : f("", !0)
227
+ }, 8, ["items", "store", "options"])
228
+ ])) : b("", !0)
220
229
  ]);
221
230
  };
222
231
  }
223
232
  };
224
233
  export {
225
- be as default
234
+ he as default
226
235
  };
@@ -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 s=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 b=require("../../../auth/store/auth.cjs"),e=require("../../store/organizations.cjs");require("../../store/memberships.cjs");const g={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"},w=t.createElementVNode("h4",null,"Upload photo",-1),y=t.createElementVNode("h3",{class:"mn-b-small"},"Contacts",-1),U=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),E={__name:"OrganizationEdit",setup(x){const r=i.useRoute(),o=i.useRouter();e.actions.reset(),t.onMounted(async()=>{r.params._id&&await e.actions.read({_id:r.params._id})});const n=t.computed(()=>e.state.current);async function d(){r.params._id?await e.actions.update(r.params._id,n.value):await e.actions.create(e.state.current,b.state.user._id)}function u(){o.replace({name:"Organization",params:{_id:e.state.current._id}})}return(_,l)=>(t.openBlock(),t.createElementBlock("div",g,[h,V,t.createVNode(m.default,{modelValue:e.state.current.types,"onUpdate:modelValue":l[0]||(l[0]=a=>e.state.current.types=a),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":l[1]||(l[1]=a=>e.state.current.profile.photo=a),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"]),w]),t.createVNode(s.default,{field:e.state.current.profile.name,"onUpdate:field":l[2]||(l[2]=a=>e.state.current.profile.name=a),placeholder:"Name of organization",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(s.default,{field:e.state.current.profile.description,"onUpdate:field":l[3]||(l[3]=a=>e.state.current.profile.description=a),placeholder:"Brief description of your group",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(c.default,{onTagsChanged:l[4]||(l[4]=a=>e.state.current.profile.tags=a),tags:e.state.current.profile.tags,class:"mn-b-small"},null,8,["tags"]),y,t.createVNode(s.default,{field:e.state.current.contacts.email,"onUpdate:field":l[5]||(l[5]=a=>e.state.current.contacts.email=a),label:"Email",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(s.default,{field:e.state.current.contacts.website,"onUpdate:field":l[6]||(l[6]=a=>e.state.current.contacts.website=a),label:"Website",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(s.default,{field:e.state.current.contacts.phone,"onUpdate:field":l[7]||(l[7]=a=>e.state.current.contacts.phone=a),label:"Phone",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(s.default,{field:e.state.current.contacts.address,"onUpdate:field":l[8]||(l[8]=a=>e.state.current.contacts.address=a),label:"Address",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),U,v,t.createVNode(s.default,{field:e.state.current.socials.instagram,"onUpdate:field":l[9]||(l[9]=a=>e.state.current.socials.instagram=a),label:"Instagram",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(s.default,{field:e.state.current.socials.twitter,"onUpdate:field":l[10]||(l[10]=a=>e.state.current.socials.twitter=a),label:"Twitter",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(s.default,{field:e.state.current.socials.facebook,"onUpdate:field":l[11]||(l[11]=a=>e.state.current.socials.facebook=a),label:"Facebook",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(s.default,{field:e.state.current.socials.telegram,"onUpdate:field":l[12]||(l[12]=a=>e.state.current.socials.telegram=a),label:"Telegram",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(s.default,{field:e.state.current.socials.youtube,"onUpdate:field":l[13]||(l[13]=a=>e.state.current.socials.youtube=a),label:"Youtube",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=E;
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 s=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 b=require("../../../auth/store/auth.cjs"),e=require("../../store/organizations.cjs");require("../../store/memberships.cjs");const g={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"},w=t.createElementVNode("h4",null,"Upload photo",-1),y=t.createElementVNode("h3",{class:"mn-b-small"},"Contacts",-1),U=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),E={__name:"OrganizationEdit",setup(x){const r=i.useRoute(),o=i.useRouter();e.actions.reset(),t.onMounted(async()=>{r.params._id&&await e.actions.read({_id:r.params._id})});const n=t.computed(()=>e.state.current);async function d(){r.params._id?await e.actions.update(r.params._id,n.value):await e.actions.create(e.state.current,b.state.user._id)}function u(){o.replace({name:"Organization",params:{_id:e.state.current._id}})}return(_,l)=>(t.openBlock(),t.createElementBlock("div",g,[h,V,t.createVNode(m.default,{modelValue:e.state.current.types,"onUpdate:modelValue":l[0]||(l[0]=a=>e.state.current.types=a),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":l[1]||(l[1]=a=>e.state.current.profile.photo=a),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"]),w]),t.createVNode(s.default,{field:e.state.current.profile.name,"onUpdate:field":l[2]||(l[2]=a=>e.state.current.profile.name=a),placeholder:"Name of organization",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(s.default,{field:e.state.current.profile.description,"onUpdate:field":l[3]||(l[3]=a=>e.state.current.profile.description=a),placeholder:"Brief description of your group",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(c.default,{onTagsChanged:l[4]||(l[4]=a=>e.state.current.profile.tags=a),tags:e.state.current.profile.tags,class:"mn-b-small"},null,8,["tags"]),y,t.createVNode(s.default,{field:e.state.current.contacts.email,"onUpdate:field":l[5]||(l[5]=a=>e.state.current.contacts.email=a),label:"Email",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(s.default,{field:e.state.current.contacts.website,"onUpdate:field":l[6]||(l[6]=a=>e.state.current.contacts.website=a),label:"Website",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(s.default,{field:e.state.current.contacts.phone,"onUpdate:field":l[7]||(l[7]=a=>e.state.current.contacts.phone=a),label:"Phone",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(s.default,{field:e.state.current.contacts.address,"onUpdate:field":l[8]||(l[8]=a=>e.state.current.contacts.address=a),label:"Address",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),U,v,t.createVNode(s.default,{field:e.state.current.socials.instagram,"onUpdate:field":l[9]||(l[9]=a=>e.state.current.socials.instagram=a),label:"Instagram",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(s.default,{field:e.state.current.socials.twitter,"onUpdate:field":l[10]||(l[10]=a=>e.state.current.socials.twitter=a),label:"Twitter",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(s.default,{field:e.state.current.socials.facebook,"onUpdate:field":l[11]||(l[11]=a=>e.state.current.socials.facebook=a),label:"Facebook",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(s.default,{field:e.state.current.socials.telegram,"onUpdate:field":l[12]||(l[12]=a=>e.state.current.socials.telegram=a),label:"Telegram",placeholder:"",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field"]),t.createVNode(s.default,{field:e.state.current.socials.youtube,"onUpdate:field":l[13]||(l[13]=a=>e.state.current.socials.youtube=a),label:"Youtube",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=E;
@@ -5,12 +5,12 @@ import "../../../globals/localization/vue-i18n.js";
5
5
  /* empty css */
6
6
  import y from "../../../../components/FieldTags/BlockTags.vue.js";
7
7
  /* empty css */
8
- import s from "../../../../components/Field/Field.vue.js";
9
- /* empty css */
8
+ import s from "../../../../components/Field/Field.vue2.js";
9
+ /* empty css */
10
10
  import U from "../../../../components/SelectMulti/SelectMulti.vue.js";
11
11
  import x from "../../../../components/UploadImage/UploadImage.vue.js";
12
- import v from "../../../../components/Button/Button.vue.js";
13
- /* empty css */
12
+ import v from "../../../../components/Button/Button.vue2.js";
13
+ /* empty css */
14
14
  import { state as k } from "../../../auth/store/auth.js";
15
15
  import { actions as o, state as e } from "../../store/organizations.js";
16
16
  import "../../store/memberships.js";
@@ -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.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
+ "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||"",showToggleText:!0,maxLen:320},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
- 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
- import { useRoute as x } from "vue-router";
3
- import w from "../../../../components/Dropdown/Dropdown.vue2.js";
1
+ import { openBlock as e, createBlock as r, Transition as x, withCtx as c, createElementVNode as n, createVNode as u, createCommentVNode as o, createElementBlock as b, toDisplayString as f, unref as h } from "vue";
2
+ import { useRoute as k } from "vue-router";
3
+ import w from "../../../../components/Dropdown/Dropdown.vue.js";
4
4
  import y from "../../../../components/Text/Text.vue.js";
5
- import p from "../../../../components/Chips/Chips.vue2.js";
5
+ import p from "../../../../components/Chips/Chips.vue.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";
@@ -12,7 +12,7 @@ import R from "../blocks/Socials.vue.js";
12
12
  import S from "../../../reports/components/sections/FormReport.vue.js";
13
13
  import { state as U } from "../../store/organizations.js";
14
14
  import { mutations as v } from "../../store/memberships.js";
15
- const M = { class: "flex-center flex flex-column t-center pd-medium radius-big bg-light" }, V = { class: "bg-black pd-thin radius-small" }, j = /* @__PURE__ */ n("button", { class: "w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button" }, " Report ", -1), C = ["src"], L = { class: "mn-b-thin" }, N = { class: "flex-center pd-r-thin pd-l-thin flex-nowrap flex mn-t-thin bg-white radius-extra w-max" }, D = { class: "mn-t-thin p-medium t-medium uppercase mn-b-thin" }, F = { class: "w-max-50r mn-t-regular mn-b-medium p-big" }, P = {
15
+ const M = { class: "flex-center flex flex-column t-center pd-medium radius-big bg-light" }, T = { class: "bg-black pd-thin radius-small" }, V = /* @__PURE__ */ n("button", { class: "w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button" }, " Report ", -1), j = ["src"], C = { class: "mn-b-thin" }, L = { class: "flex-center pd-r-thin pd-l-thin flex-nowrap flex mn-t-thin bg-white radius-extra w-max" }, N = { class: "mn-t-thin p-medium t-medium uppercase mn-b-thin" }, D = { class: "w-max-50r mn-t-regular mn-b-medium p-big" }, F = {
16
16
  key: 5,
17
17
  class: "mn-t-small mn-b-thin"
18
18
  }, tt = {
@@ -22,10 +22,10 @@ const M = { class: "flex-center flex flex-column t-center pd-medium radius-big b
22
22
  user: Object
23
23
  },
24
24
  setup(t) {
25
- const d = x(), g = ({ membership: s, status: i, target: l }, m, a) => {
25
+ const d = k(), g = ({ membership: s, status: i, target: l }, m, a) => {
26
26
  v.handleMembershipUpdate(U.current, s, i, l, m, a);
27
27
  };
28
- return (s, i) => (e(), r(k, { name: "slide-fade" }, {
28
+ return (s, i) => (e(), r(x, { name: "slide-fade" }, {
29
29
  default: c(() => {
30
30
  var l, m;
31
31
  return [
@@ -37,7 +37,7 @@ const M = { class: "flex-center flex flex-column t-center pd-medium radius-big b
37
37
  class: "cursor-pointer pos-absolute pos-r-regular pos-t-regular pd-thin radius-extra"
38
38
  }, {
39
39
  default: c(() => [
40
- n("section", V, [
40
+ n("section", T, [
41
41
  u(S, {
42
42
  user: t.user._id,
43
43
  type: "organization",
@@ -46,7 +46,7 @@ const M = { class: "flex-center flex flex-column t-center pd-medium radius-big b
46
46
  class: "w-100"
47
47
  }, {
48
48
  default: c(() => [
49
- j
49
+ V
50
50
  ]),
51
51
  _: 1
52
52
  }, 8, ["user", "target"]),
@@ -79,14 +79,14 @@ const M = { class: "flex-center flex flex-column t-center pd-medium radius-big b
79
79
  key: 2,
80
80
  src: (s.FILE_SERVER_URL || "") + t.organization.profile.photo,
81
81
  class: "radius-big bg-light flex-center flex mn-b-small w-8r"
82
- }, null, 8, C)) : (e(), r(E, {
82
+ }, null, 8, j)) : (e(), r(E, {
83
83
  key: 3,
84
84
  class: "radius-medium mn-b-small i-extra"
85
85
  })),
86
- n("h1", L, f(t.organization.profile.name), 1),
87
- n("div", N, [
86
+ n("h1", C, f(t.organization.profile.name), 1),
87
+ n("div", L, [
88
88
  u($, { class: "i-medium mn-r-micro t-transp" }),
89
- n("p", D, f(t.organization.numberOfSubscribers) + " followers", 1),
89
+ n("p", N, f(t.organization.numberOfSubscribers) + " followers", 1),
90
90
  t.user._id && h(d).params._id && h(d).params._id !== t.user._id && t.organization.owner !== t.user._id ? (e(), r(z, {
91
91
  key: 0,
92
92
  user: t.user._id,
@@ -99,10 +99,11 @@ const M = { class: "flex-center flex flex-column t-center pd-medium radius-big b
99
99
  class: "mn-l-thin p-medium t-medium radius-extra i-semi"
100
100
  }, null, 8, ["user", "target", "status"])) : o("", !0)
101
101
  ]),
102
- n("p", F, [
102
+ n("p", D, [
103
103
  u(y, {
104
104
  text: t.organization.profile.description || "",
105
- maxLen: 240
105
+ showToggleText: !0,
106
+ maxLen: 320
106
107
  }, null, 8, ["text"])
107
108
  ]),
108
109
  ((m = (l = t.organization.profile) == null ? void 0 : l.tags) == null ? void 0 : m.length) > 0 ? (e(), r(p, {
@@ -110,7 +111,7 @@ const M = { class: "flex-center flex flex-column t-center pd-medium radius-big b
110
111
  chips: t.organization.profile.tags,
111
112
  class: "p-medium"
112
113
  }, null, 8, ["chips"])) : o("", !0),
113
- Object.values(t.organization.socials).some((a) => a) ? (e(), b("h4", P, " Find us in socials ")) : o("", !0),
114
+ Object.values(t.organization.socials).some((a) => a) ? (e(), b("h4", F, " Find us in socials ")) : o("", !0),
114
115
  u(R, {
115
116
  telegram: t.organization.socials.telegram,
116
117
  facebook: t.organization.socials.facebook,
@@ -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.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
+ "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,11 +1,11 @@
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.vue.js";
3
+ import D from "../../../../components/Field/Field.vue2.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
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",
@@ -1 +1 @@
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
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Field/Field.vue2.cjs");;/* empty css */const v=require("../../../../components/Button/Button.vue2.cjs"),k=require("../../../../components/Feed/Feed.vue.cjs"),b=require("../../../globals/components/blocks/BlockSearch.vue.cjs"),g=require("../../../users/components/blocks/CardUser.vue.cjs"),_=require("../../../icons/navigation/IconDelete.vue.cjs"),B=require("../../../icons/navigation/IconAdd.vue.cjs");require("../../../middlewares/client/inputs.validation.cjs");const w=require("../../../users/store/users.cjs"),x={class:"mn-b-thin t-transp p-medium"},E={class:"mn-b-thin pos-relative"},y={key:0,class:"mn-t-thin pos-absolute w-100 pos-t-100 pos-l-0 z-index-3 bg-light pd-small radius-small"},N={class:"cols-1 mn-b-small radius-medium pd-semi bg-light pos-relative"},V=["onClick"],q=e.createElementVNode("span",null,"Invite to organization",-1),C={__name:"MembersAdd",props:{organization:Object,text:String},emits:["send-invite"],setup(c,{emit:d}){let r=e.ref(null),l=e.ref(!1);const u=e.ref(null),m=d,n=e.ref([{contact:""}]);async function p(){return new Promise((i,s)=>{m("send-invite",n.value,i,s)})}return(i,s)=>{const f=e.resolveDirective("click-outside");return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("p",x,e.toDisplayString(c.text),1),e.createElementVNode("div",E,[e.withDirectives(e.createVNode(b.default,{onSearch:s[0]||(s[0]=o=>{e.isRef(r)?r.value=o:r=o,e.isRef(l)?l.value=!0:l=!0}),placeholder:"Enter name, phone or email",class:"bg-grey"},null,512),[[f,()=>{e.isRef(l)?l.value=!1:l=!1}]]),e.unref(r)&&e.unref(l)?(e.openBlock(),e.createElementBlock("div",y,[e.createVNode(k.default,{states:{empty:{title:"No User Found",description:"Currently, there are no such user."}},store:{read:o=>w.actions.read(o),state:null},options:{search:e.unref(r)},showLoadMore:!1,class:"h-max-20r o-scroll"},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(t,a)=>(e.openBlock(),e.createBlock(g.default,{key:t._id,user:t,photo:t.profile.photo,name:t.profile.name||t.phone||t.email,onClick:()=>{n.value.push({contact:t.email||t.phone}),e.isRef(l)?l.value=!1:l=!1},class:"bg-white h-2r pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0)]),e.createElementVNode("section",N,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(o,t)=>(e.openBlock(),e.createElementBlock("div",{key:t,class:"br-1px br-solid br-grey-transp-25 flex gap-thin radius-small mn-b-thin"},[e.createVNode(h.default,{field:o.contact,"onUpdate:field":a=>o.contact=a,placeholder:"Enter email or phone",class:"w-100 pd-small radius-small bg-white",validation:u.value},{default:e.withCtx(()=>[t<1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:s[1]||(s[1]=()=>n.value.push({contact:""})),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"},[e.createVNode(B.default,{class:"i-medium",fill:"rgb(var(--white)"})])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:()=>n.value.splice(t,1),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},[e.createVNode(_.default,{class:"i-medium",fill:"rgb(var(--white)"})],8,V))]),_:2},1032,["field","onUpdate:field","validation"])]))),128))]),e.createVNode(v.default,{submit:p,class:"w-100 bg-main"},{default:e.withCtx(()=>[q]),_:1})])}}};exports.default=C;