@ozdao/prometheus-framework 0.2.125 → 0.2.127

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. package/dist/auth.server.js +61 -2
  2. package/dist/auth.server.mjs +61 -2
  3. package/dist/gallery.server.js +55 -3
  4. package/dist/gallery.server.mjs +55 -3
  5. package/dist/main-Ba3zK8PO.js +92 -0
  6. package/dist/main-Btlny-89.mjs +14207 -0
  7. package/dist/main-CF35oB7q.js +92 -0
  8. package/dist/main-CmL_j3wv.mjs +14223 -0
  9. package/dist/organizations.server.js +112 -184
  10. package/dist/organizations.server.mjs +112 -184
  11. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
  13. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Button/Button.vue.js +1 -94
  15. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  16. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +94 -1
  17. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +58 -1
  19. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  20. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +1 -58
  21. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +67 -68
  23. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/components/Field/Field.vue.js +1 -84
  25. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  26. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +84 -1
  27. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  29. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -77
  31. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  32. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +77 -1
  33. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -103
  35. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  36. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +103 -1
  37. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +1 -36
  39. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
  40. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +36 -1
  41. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +1 -45
  43. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
  44. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +45 -1
  45. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
  47. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  49. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
  51. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
  53. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +2 -2
  55. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +2 -2
  57. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +2 -2
  59. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/auth/store/auth.js +57 -50
  61. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +68 -62
  63. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  65. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
  67. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +4 -4
  69. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
  71. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  73. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  74. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
  75. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  76. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
  77. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
  81. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +4 -4
  85. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
  87. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
  89. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +4 -4
  91. package/dist/prometheus-framework/src/modules/gallery/gallery.client.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/gallery/gallery.client.js +4 -4
  93. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  95. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +3 -3
  97. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
  99. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  101. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  103. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +4 -4
  105. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +3 -3
  107. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +2 -2
  109. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  111. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  113. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +15 -15
  115. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  117. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
  119. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +117 -95
  121. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +3 -3
  123. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +4 -4
  125. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  127. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  129. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
  131. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +5 -5
  133. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/organizations/store/departments.js +9 -4
  135. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
  137. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  138. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  139. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  141. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  143. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  144. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  145. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  146. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
  147. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  148. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +3 -3
  149. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  150. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  151. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  152. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  153. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  154. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
  155. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  156. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  157. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  158. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  159. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  160. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
  161. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  162. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  163. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  164. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
  165. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  166. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +5 -5
  167. package/dist/prometheus-framework.cjs.js +1 -1
  168. package/dist/prometheus-framework.es.js +1 -1
  169. package/dist/style.css +1 -1
  170. package/dist/web-BDaOF322.js +1 -0
  171. package/dist/web-CvRd3N_J.mjs +54 -0
  172. package/dist/web-DEysqj0n.js +1 -0
  173. package/dist/web-DtWmpLE-.mjs +54 -0
  174. package/package.json +1 -1
  175. package/src/components/Feed/Feed.vue +5 -1
  176. package/src/modules/auth/controllers/auth.controller.js +68 -2
  177. package/src/modules/auth/routes/auth.routes.js +8 -1
  178. package/src/modules/auth/store/auth.js +21 -9
  179. package/src/modules/backoffice/components/pages/Dashboard.vue +6 -0
  180. package/src/modules/gallery/gallery.client.js +1 -1
  181. package/src/modules/gallery/routes/gallery.routes.js +7 -3
  182. package/src/modules/globals/mixins/mixins.js +17 -0
  183. package/src/modules/marketplace/components/pages/Catalog.vue +1 -1
  184. package/src/modules/middlewares/server/verifyAccesses.js +100 -23
  185. package/src/modules/organizations/components/blocks/CardDepartment.vue +1 -1
  186. package/src/modules/organizations/components/pages/DepartmentEdit.vue +24 -2
  187. package/src/modules/organizations/components/pages/Members.vue +1 -1
  188. package/src/modules/organizations/models/department.model.js +42 -2
  189. package/src/modules/organizations/routes/departments.routes.js +1 -8
  190. package/src/modules/organizations/store/departments.js +5 -0
@@ -1,4 +1,4 @@
1
- import { ref as p, openBlock as n, createElementBlock as c, createElementVNode as r, unref as b, createBlock as u, withCtx as m, createTextVNode as v, createCommentVNode as y, createVNode as s, Fragment as D, renderList as P } from "vue";
1
+ import { ref as p, openBlock as o, createElementBlock as c, createElementVNode as r, unref as b, createBlock as u, withCtx as m, createTextVNode as y, createCommentVNode as v, createVNode as s, Fragment as D, renderList as P } from "vue";
2
2
  import { useRouter as T, useRoute as V } from "vue-router";
3
3
  import "../../../../../../node_modules/js-cookie/dist/js.cookie.js";
4
4
  import "vue-i18n";
@@ -6,95 +6,95 @@ import "../../../globals/localization/vue-i18n.js";
6
6
  import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
7
7
  import B from "../../../../components/UploadImage/UploadImage.vue.js";
8
8
  import "../../../../components/Tab/Tab.vue.js";
9
- import k from "../../../../components/Field/Field.vue.js";
10
- import "../../../../components/Select/Select.vue2.js";
11
- import o from "../../../../components/Checkbox/Checkbox.vue.js";
9
+ import U from "../../../../components/Field/Field.vue2.js";
10
+ import "../../../../components/Select/Select.vue.js";
11
+ import d from "../../../../components/Checkbox/Checkbox.vue.js";
12
12
  import "../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.js";
13
13
  import "../../../../components/Address/Address.vue.js";
14
14
  import "../../../../components/Loader/Loader.vue.js";
15
15
  import "../../../../components/LocationMarker/LocationMarker.vue.js";
16
- import x from "../../../../components/Button/Button.vue.js";
17
- import F from "../../../../components/Popup/Popup.vue.js";
18
- import U from "../../../../components/Block/Block.vue.js";
19
- import H from "../../../../components/Feed/Feed.vue.js";
20
- import L from "../../../icons/navigation/IconDelete.vue.js";
16
+ import k from "../../../../components/Button/Button.vue2.js";
17
+ import F from "../../../../components/Popup/Popup.vue2.js";
18
+ import x from "../../../../components/Block/Block.vue.js";
19
+ import G from "../../../../components/Feed/Feed.vue.js";
20
+ import H from "../../../icons/navigation/IconDelete.vue.js";
21
21
  import "../blocks/EditArray.vue2.js";
22
22
  import "../blocks/DepartmentSub.vue2.js";
23
23
  import $ from "../../../users/components/blocks/CardUser.vue.js";
24
24
  import { actions as N } from "../../../globals/store/globals.js";
25
25
  import { state as e, actions as f } from "../../store/departments.js";
26
- import { actions as j, state as q } from "../../store/memberships.js";
27
- const G = { class: "for-transition pd-thin w-100" }, I = { class: "mn-b-thin flex-nowrap flex bg-light pd-medium radius-big" }, J = {
26
+ import { actions as L, state as j } from "../../store/memberships.js";
27
+ const q = { class: "for-transition pd-thin w-100" }, I = { class: "mn-b-thin flex-nowrap flex bg-light pd-medium radius-big" }, J = {
28
28
  key: 0,
29
29
  class: "mn-r-auto"
30
30
  }, K = {
31
31
  key: 1,
32
32
  class: "mn-r-auto"
33
- }, Q = { class: "flex-nowrap flex gap-thin pd-thin" }, W = { class: "cols-2-fit-content" }, X = { class: "w-100 flex-child-grow-1 flex-child" }, Y = { class: "cols-2 gap-thin" }, Z = { class: "bg-light pd-medium o-hidden radius-big" }, ee = /* @__PURE__ */ r("h3", { class: "mn-b-semi" }, "Department Settings", -1), te = /* @__PURE__ */ r("p", { class: "p-medium mn-b-small" }, "Please settings for your department:", -1), ae = { class: "cols-1 gap-thin" }, se = { class: "bg-light pd-medium o-hidden radius-big" }, re = /* @__PURE__ */ r("h3", { class: "mn-b-semi" }, "Acessess", -1), de = /* @__PURE__ */ r("p", { class: "p-medium mn-b-small" }, "Please select organization accesses for user in department:", -1), ie = { class: "cols-1 gap-thin" }, oe = /* @__PURE__ */ r("h4", null, "Products", -1), ne = /* @__PURE__ */ r("h4", null, "Orders", -1), le = /* @__PURE__ */ r("h4", null, "Departments", -1), Ve = {
33
+ }, Q = { class: "flex-nowrap flex gap-thin pd-thin" }, W = { class: "cols-2-fit-content" }, X = { class: "w-100 flex-child-grow-1 flex-child" }, Y = { class: "cols-2 gap-thin" }, Z = { class: "bg-light pd-medium o-hidden radius-big" }, ee = /* @__PURE__ */ r("h3", { class: "mn-b-semi" }, "Department Settings", -1), te = /* @__PURE__ */ r("p", { class: "p-medium mn-b-small" }, "Please settings for your department:", -1), ae = { class: "cols-1 gap-thin" }, se = { class: "bg-light pd-medium o-hidden radius-big" }, re = /* @__PURE__ */ r("h3", { class: "mn-b-semi" }, "Acessess", -1), de = /* @__PURE__ */ r("p", { class: "p-medium mn-b-small" }, "Please select organization accesses for user in department:", -1), le = { class: "cols-1 gap-thin" }, ie = /* @__PURE__ */ r("h4", null, "Gallery", -1), oe = /* @__PURE__ */ r("h4", null, "Products", -1), ne = /* @__PURE__ */ r("h4", null, "Orders", -1), me = /* @__PURE__ */ r("h4", null, "Departments", -1), Be = {
34
34
  __name: "DepartmentEdit",
35
- setup(me) {
36
- const O = T(), d = V();
35
+ setup(pe) {
36
+ const O = T(), l = V();
37
37
  async function C() {
38
- p(q.memberships), d.params.department && await f.readOne(d.params.department);
38
+ p(j.memberships), l.params.department && await f.readOne(l.params.department);
39
39
  }
40
40
  C();
41
- const h = p(!1), M = p(null);
42
- function E(l) {
41
+ const h = p(!1), E = p(null);
42
+ function M(n) {
43
43
  h.value = !0;
44
44
  }
45
- function _() {
46
- h.value = !1, M.value = null;
45
+ function g() {
46
+ h.value = !1, E.value = null;
47
47
  }
48
48
  p(!1), p(null);
49
- async function z() {
50
- d.params.department && await f.update(
51
- d.params._id,
49
+ async function R() {
50
+ l.params.department && await f.update(
51
+ l.params._id,
52
52
  e.department
53
- ), d.params.department || await f.create(
54
- d.params._id,
53
+ ), l.params.department || await f.create(
54
+ l.params._id,
55
55
  e.department
56
56
  );
57
57
  }
58
- function A() {
59
- O.push({ name: "Organization Members", params: { _id: d.params._id } });
58
+ function z() {
59
+ O.push({ name: "Organization Members", params: { _id: l.params._id } });
60
60
  }
61
- async function R() {
61
+ async function A() {
62
62
  confirm("Are you sure you want to delete this department?") && await f.delete(
63
- d.params._id,
63
+ l.params._id,
64
64
  e.department
65
65
  );
66
66
  }
67
- function S(l) {
68
- confirm("Are you sure you want to remove this member?") && N.delete(e.department.members, { _id: l.user._id });
67
+ function S(n) {
68
+ confirm("Are you sure you want to remove this member?") && N.delete(e.department.members, { _id: n.user._id });
69
69
  }
70
- return (l, a) => (n(), c("div", G, [
70
+ return (n, t) => (o(), c("div", q, [
71
71
  r("header", I, [
72
- b(d).params.department ? (n(), c("h1", J, "Edit Department")) : (n(), c("h1", K, "Create Department")),
72
+ b(l).params.department ? (o(), c("h1", J, "Edit Department")) : (o(), c("h1", K, "Create Department")),
73
73
  r("section", Q, [
74
- b(d).params.department ? (n(), u(x, {
74
+ b(l).params.department ? (o(), u(k, {
75
75
  key: 0,
76
- submit: R,
77
- callback: l.redirectToDash,
76
+ submit: A,
77
+ callback: n.redirectToDash,
78
78
  class: "bg-red"
79
79
  }, {
80
80
  default: m(() => [
81
- v("Delete")
81
+ y("Delete")
82
82
  ]),
83
83
  _: 1
84
- }, 8, ["callback"])) : y("", !0),
85
- s(x, {
86
- submit: z,
87
- callback: A,
84
+ }, 8, ["callback"])) : v("", !0),
85
+ s(k, {
86
+ submit: R,
87
+ callback: z,
88
88
  class: "bg-main"
89
89
  }, {
90
90
  default: m(() => [
91
- v("Save")
91
+ y("Save")
92
92
  ]),
93
93
  _: 1
94
94
  })
95
95
  ])
96
96
  ]),
97
- e.department.profile ? (n(), u(U, {
97
+ e.department.profile ? (o(), u(x, {
98
98
  key: 0,
99
99
  title: "Profile",
100
100
  class: "mn-b-thin"
@@ -103,55 +103,55 @@ const G = { class: "for-transition pd-thin w-100" }, I = { class: "mn-b-thin fle
103
103
  r("div", W, [
104
104
  s(B, {
105
105
  photo: e.department.profile.photo,
106
- "onUpdate:photo": a[0] || (a[0] = (t) => e.department.profile.photo = t),
106
+ "onUpdate:photo": t[0] || (t[0] = (a) => e.department.profile.photo = a),
107
107
  uploadPath: "organizations/" + e.department.name + "/avatars",
108
108
  class: "w-8r aspect-1x1 o-hidden mn-r-small radius-extra"
109
109
  }, null, 8, ["photo", "uploadPath"]),
110
110
  r("div", X, [
111
- s(k, {
111
+ s(U, {
112
112
  field: e.department.profile.name,
113
- "onUpdate:field": a[1] || (a[1] = (t) => e.department.profile.name = t),
113
+ "onUpdate:field": t[1] || (t[1] = (a) => e.department.profile.name = a),
114
114
  label: "Name",
115
115
  placeholder: "Department Name",
116
116
  class: "mn-b-small bg-white radius-small pd-medium",
117
- validation: l.organizationName
117
+ validation: n.organizationName
118
118
  }, null, 8, ["field", "validation"]),
119
- s(k, {
119
+ s(U, {
120
120
  field: e.department.profile.description,
121
- "onUpdate:field": a[2] || (a[2] = (t) => e.department.profile.description = t),
121
+ "onUpdate:field": t[2] || (t[2] = (a) => e.department.profile.description = a),
122
122
  label: "Description",
123
123
  placeholder: "Department description (max 120 symbols)",
124
124
  class: "bg-white radius-small pd-medium",
125
- validation: l.organizationName
125
+ validation: n.organizationName
126
126
  }, null, 8, ["field", "validation"])
127
127
  ])
128
128
  ])
129
129
  ]),
130
130
  _: 1
131
- })) : y("", !0),
132
- s(U, {
131
+ })) : v("", !0),
132
+ s(x, {
133
133
  title: "Team",
134
134
  placeholder: "No members added yet",
135
135
  actions: [{
136
136
  label: "+",
137
- function: () => E()
137
+ function: () => M()
138
138
  }],
139
139
  class: "cols-1 gap-thin mn-b-thin"
140
140
  }, {
141
141
  default: m(() => [
142
- (n(!0), c(D, null, P(e.department.members, (t, i) => (n(), u($, {
143
- class: "bg-white pd-thin radius-medium w-100",
142
+ (o(!0), c(D, null, P(e.department.members, (a, i) => (o(), u($, {
143
+ class: "h-4r bg-white pd-thin radius-medium w-100",
144
144
  key: i,
145
- user: t.user,
146
- photo: t.user.profile.photo,
147
- name: t.user.profile.name || t.user.phone || t.user.email || t.user._id,
148
- position: t.position,
145
+ user: a.user,
146
+ photo: a.user.profile.photo,
147
+ name: a.user.profile.name || a.user.phone || a.user.email || a.user._id,
148
+ position: a.position,
149
149
  action: {
150
150
  label: {
151
- is: L,
151
+ is: H,
152
152
  props: { class: "i-medium", fill: "rgb(var(--white)" }
153
153
  },
154
- method: () => S(t)
154
+ method: () => S(a)
155
155
  }
156
156
  }, null, 8, ["user", "photo", "name", "position", "action"]))), 128))
157
157
  ]),
@@ -159,12 +159,12 @@ const G = { class: "for-transition pd-thin w-100" }, I = { class: "mn-b-thin fle
159
159
  }, 8, ["actions"]),
160
160
  s(F, {
161
161
  title: "Add member",
162
- onClosePopup: _,
162
+ onClosePopup: g,
163
163
  isPopupOpen: h.value,
164
164
  class: "bg-white w-max-30r radius-big pd-big"
165
165
  }, {
166
166
  default: m(() => [
167
- s(H, {
167
+ s(G, {
168
168
  search: {
169
169
  placeholder: "Search customer...",
170
170
  class: "bg-light mn-b-thin"
@@ -176,28 +176,28 @@ const G = { class: "for-transition pd-thin w-100" }, I = { class: "mn-b-thin fle
176
176
  }
177
177
  },
178
178
  store: {
179
- read: (t) => j.read(t),
179
+ read: (a) => L.read(a),
180
180
  state: null
181
181
  },
182
182
  options: {
183
- target: b(d).params._id
183
+ target: b(l).params._id
184
184
  },
185
185
  class: "bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll"
186
186
  }, {
187
187
  default: m(({
188
- items: t
188
+ items: a
189
189
  }) => [
190
- (n(!0), c(D, null, P(t, (i, pe) => {
191
- var g, w;
192
- return n(), u($, {
190
+ (o(!0), c(D, null, P(a, (i, ce) => {
191
+ var w, _;
192
+ return o(), u($, {
193
193
  key: i._id,
194
194
  user: i.user,
195
- photo: (g = i.user.profile) == null ? void 0 : g.photo,
196
- name: ((w = i.user.profile) == null ? void 0 : w.name) || i.user.phone || i.user.email,
195
+ photo: (w = i.user.profile) == null ? void 0 : w.photo,
196
+ name: ((_ = i.user.profile) == null ? void 0 : _.name) || i.user.phone || i.user.email,
197
197
  onClick: () => {
198
- N.add(e.department.members, { _id: i.user._id, user: i.user, position: "Member" }), _();
198
+ N.add(e.department.members, { _id: i.user._id, user: i.user, position: "Member" }), g();
199
199
  },
200
- class: "bg-white pd-thin radius-medium w-100 mn-b-thin"
200
+ class: "h-4r bg-white pd-thin radius-medium w-100 mn-b-thin"
201
201
  }, null, 8, ["user", "photo", "name", "onClick"]);
202
202
  }), 128))
203
203
  ]),
@@ -211,11 +211,11 @@ const G = { class: "for-transition pd-thin w-100" }, I = { class: "mn-b-thin fle
211
211
  ee,
212
212
  te,
213
213
  r("div", ae, [
214
- s(o, {
214
+ s(d, {
215
215
  label: "Hidden department",
216
216
  name: "hidden",
217
217
  class: "w-100 mn-r-small bg-white radius-small pd-small",
218
- "onUpdate:radio": a[3] || (a[3] = (t) => e.department.hidden = !e.department.hidden),
218
+ "onUpdate:radio": t[3] || (t[3] = (a) => e.department.hidden = !e.department.hidden),
219
219
  radio: e.department.hidden
220
220
  }, null, 8, ["radio"])
221
221
  ])
@@ -223,72 +223,94 @@ const G = { class: "for-transition pd-thin w-100" }, I = { class: "mn-b-thin fle
223
223
  r("div", se, [
224
224
  re,
225
225
  de,
226
- r("div", ie, [
226
+ r("div", le, [
227
+ ie,
228
+ s(d, {
229
+ label: "Read gallery",
230
+ name: "readProducts",
231
+ class: "w-100 mn-r-small bg-white radius-small pd-small",
232
+ radio: e.department.accesses.gallery.read,
233
+ "onUpdate:radio": t[4] || (t[4] = (a) => e.department.accesses.gallery.read = !e.department.accesses.gallery.read)
234
+ }, null, 8, ["radio"]),
235
+ s(d, {
236
+ label: "Edit gallery",
237
+ name: "editProducts",
238
+ class: "w-100 mn-r-small bg-white radius-small pd-small",
239
+ radio: e.department.accesses.gallery.edit,
240
+ "onUpdate:radio": t[5] || (t[5] = (a) => e.department.accesses.gallery.edit = !e.department.accesses.gallery.edit)
241
+ }, null, 8, ["radio"]),
242
+ s(d, {
243
+ label: "Delete gallery",
244
+ name: "deleteProducts",
245
+ class: "w-100 bg-white radius-small pd-small",
246
+ radio: e.department.accesses.gallery.delete,
247
+ "onUpdate:radio": t[6] || (t[6] = (a) => e.department.accesses.gallery.delete = !e.department.accesses.gallery.delete)
248
+ }, null, 8, ["radio"]),
227
249
  oe,
228
- s(o, {
250
+ s(d, {
229
251
  label: "Read products",
230
252
  name: "readProducts",
231
253
  class: "w-100 mn-r-small bg-white radius-small pd-small",
232
254
  radio: e.department.accesses.products.read,
233
- "onUpdate:radio": a[4] || (a[4] = (t) => e.department.accesses.products.read = !e.department.accesses.products.read)
255
+ "onUpdate:radio": t[7] || (t[7] = (a) => e.department.accesses.products.read = !e.department.accesses.products.read)
234
256
  }, null, 8, ["radio"]),
235
- s(o, {
257
+ s(d, {
236
258
  label: "Edit products",
237
259
  name: "editProducts",
238
260
  class: "w-100 mn-r-small bg-white radius-small pd-small",
239
261
  radio: e.department.accesses.products.edit,
240
- "onUpdate:radio": a[5] || (a[5] = (t) => e.department.accesses.products.edit = !e.department.accesses.products.edit)
262
+ "onUpdate:radio": t[8] || (t[8] = (a) => e.department.accesses.products.edit = !e.department.accesses.products.edit)
241
263
  }, null, 8, ["radio"]),
242
- s(o, {
264
+ s(d, {
243
265
  label: "Delete products",
244
266
  name: "deleteProducts",
245
267
  class: "w-100 bg-white radius-small pd-small",
246
268
  radio: e.department.accesses.products.delete,
247
- "onUpdate:radio": a[6] || (a[6] = (t) => e.department.accesses.products.delete = !e.department.accesses.products.delete)
269
+ "onUpdate:radio": t[9] || (t[9] = (a) => e.department.accesses.products.delete = !e.department.accesses.products.delete)
248
270
  }, null, 8, ["radio"]),
249
271
  ne,
250
- s(o, {
272
+ s(d, {
251
273
  label: "Read orders",
252
274
  name: "readOrders",
253
275
  class: "w-100 mn-r-small bg-white radius-small pd-small",
254
276
  radio: e.department.accesses.orders.read,
255
- "onUpdate:radio": a[7] || (a[7] = (t) => e.department.accesses.orders.read = !e.department.accesses.orders.read)
277
+ "onUpdate:radio": t[10] || (t[10] = (a) => e.department.accesses.orders.read = !e.department.accesses.orders.read)
256
278
  }, null, 8, ["radio"]),
257
- s(o, {
279
+ s(d, {
258
280
  label: "Confirm orders",
259
281
  name: "confirmOrders",
260
282
  class: "w-100 mn-r-small bg-white radius-small pd-small",
261
283
  radio: e.department.accesses.orders.confirm,
262
- "onUpdate:radio": a[8] || (a[8] = (t) => e.department.accesses.orders.confirm = !e.department.accesses.orders.confirm)
284
+ "onUpdate:radio": t[11] || (t[11] = (a) => e.department.accesses.orders.confirm = !e.department.accesses.orders.confirm)
263
285
  }, null, 8, ["radio"]),
264
- s(o, {
286
+ s(d, {
265
287
  label: "Delete orders",
266
288
  name: "deleteOrders",
267
289
  class: "w-100 bg-white radius-small pd-small",
268
290
  radio: e.department.accesses.orders.delete,
269
- "onUpdate:radio": a[9] || (a[9] = (t) => e.department.accesses.orders.delete = !e.department.accesses.orders.delete)
291
+ "onUpdate:radio": t[12] || (t[12] = (a) => e.department.accesses.orders.delete = !e.department.accesses.orders.delete)
270
292
  }, null, 8, ["radio"]),
271
- le,
272
- s(o, {
293
+ me,
294
+ s(d, {
273
295
  label: "Read departments",
274
296
  name: "readDepartments",
275
297
  class: "w-100 mn-r-small bg-white radius-small pd-small",
276
298
  radio: e.department.accesses.departments.read,
277
- "onUpdate:radio": a[10] || (a[10] = (t) => e.department.accesses.departments.read = !e.department.accesses.departments.read)
299
+ "onUpdate:radio": t[13] || (t[13] = (a) => e.department.accesses.departments.read = !e.department.accesses.departments.read)
278
300
  }, null, 8, ["radio"]),
279
- s(o, {
301
+ s(d, {
280
302
  label: "Edit departments",
281
303
  name: "editDepartments",
282
304
  class: "w-100 mn-r-small bg-white radius-small pd-small",
283
305
  radio: e.department.accesses.departments.edit,
284
- "onUpdate:radio": a[11] || (a[11] = (t) => e.department.accesses.departments.edit = !e.department.accesses.departments.edit)
306
+ "onUpdate:radio": t[14] || (t[14] = (a) => e.department.accesses.departments.edit = !e.department.accesses.departments.edit)
285
307
  }, null, 8, ["radio"]),
286
- s(o, {
308
+ s(d, {
287
309
  label: "Delete departments",
288
310
  name: "deleteDepartments",
289
311
  class: "w-100 bg-white radius-small pd-small",
290
312
  radio: e.department.accesses.departments.delete,
291
- "onUpdate:radio": a[12] || (a[12] = (t) => e.department.accesses.departments.delete = !e.department.accesses.departments.delete)
313
+ "onUpdate:radio": t[15] || (t[15] = (a) => e.department.accesses.departments.delete = !e.department.accesses.departments.delete)
292
314
  }, null, 8, ["radio"])
293
315
  ])
294
316
  ])
@@ -297,5 +319,5 @@ const G = { class: "for-transition pd-thin w-100" }, I = { class: "mn-b-thin fle
297
319
  }
298
320
  };
299
321
  export {
300
- Ve as default
322
+ Be as default
301
323
  };
@@ -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");require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Tooltip/Tooltip.vue2.cjs");const q=require("../../../../components/Popup/Popup.vue.cjs"),M=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),N=require("../sections/MembersAdd.vue.cjs");require("../../../mobile/components/Menu/Menu.vue2.cjs");require("../../../mobile/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._id))}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:"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");require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Tooltip/Tooltip.vue.cjs");const q=require("../../../../components/Popup/Popup.vue2.cjs"),M=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),N=require("../sections/MembersAdd.vue.cjs");require("../../../mobile/components/Menu/Menu.vue2.cjs");require("../../../mobile/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._id))}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;
@@ -2,8 +2,8 @@ import { ref as h, onMounted as O, computed as D, resolveComponent as F, openBlo
2
2
  import { useRoute as S, useRouter as V } from "vue-router";
3
3
  import y from "../../../../components/Feed/Feed.vue.js";
4
4
  import "../../../../components/Tab/Tab.vue.js";
5
- import "../../../../components/Tooltip/Tooltip.vue2.js";
6
- import R from "../../../../components/Popup/Popup.vue.js";
5
+ import "../../../../components/Tooltip/Tooltip.vue.js";
6
+ import R from "../../../../components/Popup/Popup.vue2.js";
7
7
  import U from "../../../globals/components/sections/SectionPageTitle.vue.js";
8
8
  import E from "../sections/MembersAdd.vue.js";
9
9
  import "../../../mobile/components/Menu/Menu.vue2.js";
@@ -211,7 +211,7 @@ const J = { class: "pd-thin" }, K = {
211
211
  },
212
212
  method: () => A(r.index, e)
213
213
  },
214
- class: "w-100 bg-light radius-big flex-nowrap flex pd-medium"
214
+ class: "h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium"
215
215
  }, null, 8, ["name", "role", "action"]))), 128))
216
216
  ]),
217
217
  _: 1
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),n=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const p=require("../../../../components/FieldTags/BlockTags.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const r=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue2.cjs");const f=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),g=require("../../../../components/UploadImage/UploadImage.vue.cjs"),b=require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Popup/Popup.vue2.cjs");const h=require("../../../auth/store/auth.cjs"),e=require("../../store/organizations.cjs");require("../../store/memberships.cjs");const V={class:"for-transition pd-thin"},N=t.createElementVNode("h3",{class:"mn-b-small"},"Type of group",-1),_=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),q=t.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),y={class:"mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex"},v=t.createElementVNode("h4",null,"Upload photo",-1),w=t.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),x=t.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),U={__name:"OrganizationEdit",async setup(T){let i,o;const s=n.useRoute(),d=n.useRouter();e.actions.reset(),s.params._id&&([i,o]=t.withAsyncContext(()=>e.actions.read({_id:s.params._id})),await i,o());const u=t.computed(()=>e.state.current);async function c(){s.params._id?await e.actions.update(s.params._id,u.value):await e.actions.create(e.state.current,h.state.user._id)}function m(){d.replace({name:"Organization",params:{_id:e.state.current._id}})}return(k,a)=>(t.openBlock(),t.createElementBlock("div",V,[N,_,t.createVNode(f.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"]),q,t.createElementVNode("div",y,[t.createVNode(g.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"]),v]),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(p.default,{onTagsChanged:a[4]||(a[4]=l=>e.state.current.profile.tags=l),tags:e.state.current.profile.tags},null,8,["tags"]),w,x,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(b.default,{submit:c,callback:m,class:"bg-main w-100 mn-b-thin"},{default:t.withCtx(()=>[t.createTextVNode("Save")]),_:1})]))}};exports.default=U;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),n=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const p=require("../../../../components/FieldTags/BlockTags.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const r=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");const f=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),g=require("../../../../components/UploadImage/UploadImage.vue.cjs"),b=require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Popup/Popup.vue.cjs");const h=require("../../../auth/store/auth.cjs"),e=require("../../store/organizations.cjs");require("../../store/memberships.cjs");const V={class:"for-transition pd-thin"},N=t.createElementVNode("h3",{class:"mn-b-small"},"Type of group",-1),_=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),q=t.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),y={class:"mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex"},v=t.createElementVNode("h4",null,"Upload photo",-1),w=t.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),x=t.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),U={__name:"OrganizationEdit",async setup(T){let i,o;const s=n.useRoute(),d=n.useRouter();e.actions.reset(),s.params._id&&([i,o]=t.withAsyncContext(()=>e.actions.read({_id:s.params._id})),await i,o());const u=t.computed(()=>e.state.current);async function c(){s.params._id?await e.actions.update(s.params._id,u.value):await e.actions.create(e.state.current,h.state.user._id)}function m(){d.replace({name:"Organization",params:{_id:e.state.current._id}})}return(k,a)=>(t.openBlock(),t.createElementBlock("div",V,[N,_,t.createVNode(f.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"]),q,t.createElementVNode("div",y,[t.createVNode(g.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"]),v]),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(p.default,{onTagsChanged:a[4]||(a[4]=l=>e.state.current.profile.tags=l),tags:e.state.current.profile.tags},null,8,["tags"]),w,x,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(b.default,{submit:c,callback:m,class:"bg-main w-100 mn-b-thin"},{default:t.withCtx(()=>[t.createTextVNode("Save")]),_:1})]))}};exports.default=U;
@@ -5,12 +5,12 @@ import "../../../globals/localization/vue-i18n.js";
5
5
  import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
6
6
  import v from "../../../../components/FieldTags/BlockTags.vue.js";
7
7
  import "../../../../components/Tab/Tab.vue.js";
8
- import o from "../../../../components/Field/Field.vue.js";
9
- import "../../../../components/Select/Select.vue2.js";
8
+ import o from "../../../../components/Field/Field.vue2.js";
9
+ import "../../../../components/Select/Select.vue.js";
10
10
  import U from "../../../../components/SelectMulti/SelectMulti.vue.js";
11
11
  import k from "../../../../components/UploadImage/UploadImage.vue.js";
12
- import T from "../../../../components/Button/Button.vue.js";
13
- import "../../../../components/Popup/Popup.vue2.js";
12
+ import T from "../../../../components/Button/Button.vue2.js";
13
+ import "../../../../components/Popup/Popup.vue.js";
14
14
  import { state as z } from "../../../auth/store/auth.js";
15
15
  import { actions as s, 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.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.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,6 +1,6 @@
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.vue2.js";
3
+ import w from "../../../../components/Dropdown/Dropdown.vue.js";
4
4
  import y from "../../../../components/Text/Text.vue.js";
5
5
  import p from "../../../../components/Chips/Chips.vue.js";
6
6
  import $ from "../../../icons/entities/IconFollowing.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.vue.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/Loader/Loader.vue.cjs");const _=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Button/Button.vue2.cjs");require("./Documents.vue2.cjs");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");require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");const _=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Button/Button.vue.cjs");require("./Documents.vue2.cjs");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
- import "../../../../components/Popup/Popup.vue2.js";
5
+ import "../../../../components/Popup/Popup.vue.js";
6
6
  import "../../../../components/Loader/Loader.vue.js";
7
7
  import S from "../../../../../../_virtual/_plugin-vue_export-helper.js";
8
- import "../../../../components/Button/Button.vue2.js";
8
+ import "../../../../components/Button/Button.vue.js";
9
9
  import "./Documents.vue2.js";
10
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 = {
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");require("../../../../components/Select/Select.vue2.cjs");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"),u=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");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;