@ozdao/prometheus-framework 0.2.94 → 0.2.96

Sign up to get free protection for your applications and to get access to all the features.
Files changed (200) hide show
  1. package/dist/auth.server.js +15 -14
  2. package/dist/auth.server.mjs +15 -14
  3. package/dist/main-BJvlNekm.mjs +13631 -0
  4. package/dist/main-pGo7JpSP.js +92 -0
  5. package/dist/orders.server.js +26 -22
  6. package/dist/orders.server.mjs +26 -22
  7. package/dist/organizations.server.js +31 -10
  8. package/dist/organizations.server.mjs +31 -10
  9. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Block/Block.vue.js +2 -2
  11. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/Button/Button.vue.js +94 -1
  13. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +1 -94
  15. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +19 -19
  16. package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Field/Field.vue.js +84 -1
  18. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +1 -84
  20. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
  21. package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
  22. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +12 -12
  23. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
  25. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
  26. package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
  27. package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +21 -21
  28. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
  30. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  32. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
  34. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
  36. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +2 -2
  38. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +2 -2
  40. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +2 -2
  42. package/dist/prometheus-framework/src/modules/auth/router/auth.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/auth/router/auth.js +4 -0
  44. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +8 -8
  46. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
  48. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
  50. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  54. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
  55. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +66 -0
  56. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
  57. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +0 -66
  58. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  60. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  62. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  64. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
  66. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
  68. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +60 -60
  70. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
  72. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +1 -1
  74. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
  76. package/dist/prometheus-framework/src/modules/icons/navigation/IconCross.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/icons/navigation/IconCross.vue.js +22 -21
  78. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
  80. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.cjs +2 -2
  81. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.js +48 -37
  82. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +160 -167
  84. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +50 -49
  86. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +113 -110
  88. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.js +14 -14
  89. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
  91. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  93. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
  95. package/dist/prometheus-framework/src/modules/orders/store/models/order.cjs +1 -0
  96. package/dist/prometheus-framework/src/modules/orders/store/models/order.js +28 -0
  97. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/orders/store/orders.js +25 -43
  99. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +19 -19
  101. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  103. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +47 -47
  105. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +143 -131
  107. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  109. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  111. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
  113. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  115. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  117. package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +32 -34
  119. package/dist/prometheus-framework/src/modules/organizations/router/members.router.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/organizations/router/members.router.js +1 -1
  121. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/organizations/store/departments.js +1 -1
  123. package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +30 -32
  125. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  127. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  129. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  131. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
  133. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
  135. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  137. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  138. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +155 -187
  139. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  141. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +19 -19
  143. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  144. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  145. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  146. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  147. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
  148. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +26 -22
  149. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  150. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +68 -65
  151. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  152. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
  153. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  154. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
  155. package/dist/prometheus-framework.cjs.js +1 -1
  156. package/dist/prometheus-framework.es.js +1 -1
  157. package/dist/style.css +1 -1
  158. package/dist/web-B2xhKZNK.js +1 -0
  159. package/dist/web-DTzbVshr.mjs +54 -0
  160. package/package.json +1 -1
  161. package/src/components/Block/Block.vue +1 -1
  162. package/src/components/Completion/Completion.vue +2 -2
  163. package/src/modules/auth/controllers/auth.controller.js +19 -16
  164. package/src/modules/auth/router/auth.js +4 -0
  165. package/src/modules/backoffice/router/backoffice.js +3 -3
  166. package/src/modules/chats/routes/chats.routes.js +1 -2
  167. package/src/modules/gallery/components/sections/BackofficeGallery.vue +2 -1
  168. package/src/modules/globals/services/globals.crud.js +2 -0
  169. package/src/modules/icons/navigation/IconCross.vue +11 -7
  170. package/src/modules/orders/components/blocks/StatusHistory.vue +8 -11
  171. package/src/modules/orders/components/pages/OrderBackoffice.vue +37 -50
  172. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +8 -4
  173. package/src/modules/orders/components/pages/Orders.vue +1 -1
  174. package/src/modules/orders/controllers/orders.controller.js +26 -25
  175. package/src/modules/orders/models/order.model.js +1 -1
  176. package/src/modules/orders/routes/orders.routes.js +9 -3
  177. package/src/modules/orders/store/customers.store.js +1 -1
  178. package/src/modules/orders/store/models/order.js +33 -0
  179. package/src/modules/orders/store/orders.js +7 -28
  180. package/src/modules/organizations/components/blocks/CardDepartment.vue +2 -2
  181. package/src/modules/organizations/components/pages/DepartmentEdit.vue +7 -5
  182. package/src/modules/organizations/components/pages/Members.vue +50 -38
  183. package/src/modules/organizations/components/pages/Organization.vue +1 -1
  184. package/src/modules/organizations/components/pages/Organizations.vue +2 -1
  185. package/src/modules/organizations/controllers/invites.controller.js +2 -0
  186. package/src/modules/organizations/controllers/memberships.controller.js +35 -11
  187. package/src/modules/organizations/controllers/organizations.controller.js +5 -4
  188. package/src/modules/organizations/models/invite.model.js +4 -0
  189. package/src/modules/organizations/organizations.client.js +0 -2
  190. package/src/modules/organizations/router/members.router.js +1 -1
  191. package/src/modules/organizations/store/departments.js +0 -1
  192. package/src/modules/organizations/store/memberships.js +1 -8
  193. package/src/modules/products/components/pages/ProductEdit.vue +39 -33
  194. package/src/modules/products/components/sections/EditProductInfo.vue +3 -3
  195. package/src/modules/users/components/blocks/CardUser.vue +9 -5
  196. package/src/modules/users/components/pages/Profile.vue +5 -3
  197. package/src/modules/users/components/pages/ProfileBlogposts.vue +1 -1
  198. package/src/modules/users/components/sections/ProfileCompletion.vue +2 -2
  199. package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +0 -126
  200. package/src/modules/users/components/pages/ProfileOrganizations.vue +0 -97
@@ -6,49 +6,47 @@ 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 x from "../../../../components/Field/Field.vue2.js";
9
+ import k from "../../../../components/Field/Field.vue.js";
10
10
  import "../../../../components/Select/Select.vue2.js";
11
11
  import i 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 k from "../../../../components/Button/Button.vue2.js";
16
+ import x from "../../../../components/Button/Button.vue.js";
17
17
  import F from "../../../../components/Popup/Popup.vue.js";
18
18
  import U from "../../../../components/Block/Block.vue.js";
19
19
  import H from "../../../../components/Feed/Feed.vue.js";
20
+ import L from "../../../icons/navigation/IconDelete.vue.js";
20
21
  import "../blocks/EditArray.vue2.js";
21
22
  import "../blocks/DepartmentSub.vue2.js";
22
- import "../../../../components/SelectMulti/SelectMulti.vue2.js";
23
23
  import N from "../../../users/components/blocks/CardUser.vue.js";
24
- import { actions as L, state as j } from "../../store/memberships.js";
25
- import "../../../middlewares/client/inputs.validation.js";
26
- import "../blocks/DepartmentMemberModify.vue2.js";
27
- import { actions as C } from "../../../globals/store/globals.js";
24
+ import { actions as $ } from "../../../globals/store/globals.js";
28
25
  import { state as e, actions as f } from "../../store/departments.js";
29
- const q = { class: "for-transition pd-thin w-100" }, G = { class: "mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big" }, I = {
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-grey pd-medium radius-big" }, J = {
30
28
  key: 0,
31
29
  class: "mn-r-auto"
32
- }, J = {
30
+ }, K = {
33
31
  key: 1,
34
32
  class: "mn-r-auto"
35
- }, K = { class: "flex-nowrap flex gap-thin pd-thin" }, Q = { class: "cols-2-fit-content" }, W = { class: "w-100 flex-child-grow-1 flex-child" }, X = { class: "cols-2 gap-thin" }, Y = { class: "bg-grey pd-medium o-hidden radius-big" }, Z = /* @__PURE__ */ r("h3", { class: "mn-b-semi" }, "Department Settings", -1), ee = /* @__PURE__ */ r("p", { class: "p-medium mn-b-small" }, "Please settings for your department:", -1), te = { class: "cols-1 gap-thin" }, ae = /* @__PURE__ */ r("h4", null, "Products", -1), se = { class: "bg-grey 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), oe = { class: "cols-1 gap-thin" }, ie = /* @__PURE__ */ r("h4", null, "Products", -1), ne = /* @__PURE__ */ r("h4", null, "Orders", -1), le = /* @__PURE__ */ r("h4", null, "Departments", -1), Fe = {
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-grey 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-grey 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), oe = { class: "cols-1 gap-thin" }, ie = /* @__PURE__ */ r("h4", null, "Products", -1), ne = /* @__PURE__ */ r("h4", null, "Orders", -1), le = /* @__PURE__ */ r("h4", null, "Departments", -1), Ve = {
36
34
  __name: "DepartmentEdit",
37
35
  setup(me) {
38
- const $ = T(), d = V();
36
+ const C = T(), d = V();
39
37
  async function O() {
40
- p(j.memberships), d.params.department && await f.readOne(d.params.department);
38
+ p(q.memberships), d.params.department && await f.readOne(d.params.department);
41
39
  }
42
40
  O();
43
- const h = p(!1), E = p(null);
44
- function M(l) {
41
+ const h = p(!1), M = p(null);
42
+ function E(l) {
45
43
  h.value = !0;
46
44
  }
47
- function _() {
48
- h.value = !1, E.value = null;
45
+ function g() {
46
+ h.value = !1, M.value = null;
49
47
  }
50
48
  p(!1), p(null);
51
- async function A() {
49
+ async function z() {
52
50
  d.params.department && await f.update(
53
51
  d.params._id,
54
52
  e.department
@@ -57,25 +55,25 @@ const q = { class: "for-transition pd-thin w-100" }, G = { class: "mn-b-thin fle
57
55
  e.department
58
56
  );
59
57
  }
60
- function R() {
61
- $.replace({ name: "Department", params: { _id: d.params._id, department: e.department._id } });
58
+ function A() {
59
+ C.push({ name: "Organization Members", params: { _id: d.params._id } });
62
60
  }
63
- async function z() {
61
+ async function R() {
64
62
  confirm("Are you sure you want to delete this department?") && await f.delete(
65
63
  d.params._id,
66
64
  e.department
67
65
  );
68
66
  }
69
67
  function S(l) {
70
- confirm("Are you sure you want to remove this member?") && C.delete(e.department.members, { _id: l.user._id });
68
+ confirm("Are you sure you want to remove this member?") && $.delete(e.department.members, { _id: l.user._id });
71
69
  }
72
- return (l, a) => (n(), c("div", q, [
73
- r("header", G, [
74
- b(d).params.department ? (n(), c("h1", I, "Edit Department")) : (n(), c("h1", J, "Create Department")),
75
- r("section", K, [
76
- b(d).params.department ? (n(), u(k, {
70
+ return (l, a) => (n(), c("div", G, [
71
+ r("header", I, [
72
+ b(d).params.department ? (n(), c("h1", J, "Edit Department")) : (n(), c("h1", K, "Create Department")),
73
+ r("section", Q, [
74
+ b(d).params.department ? (n(), u(x, {
77
75
  key: 0,
78
- submit: z,
76
+ submit: R,
79
77
  callback: l.redirectToDash,
80
78
  class: "bg-red"
81
79
  }, {
@@ -84,9 +82,9 @@ const q = { class: "for-transition pd-thin w-100" }, G = { class: "mn-b-thin fle
84
82
  ]),
85
83
  _: 1
86
84
  }, 8, ["callback"])) : v("", !0),
87
- s(k, {
88
- submit: A,
89
- callback: R,
85
+ s(x, {
86
+ submit: z,
87
+ callback: A,
90
88
  class: "bg-main"
91
89
  }, {
92
90
  default: m(() => [
@@ -102,15 +100,15 @@ const q = { class: "for-transition pd-thin w-100" }, G = { class: "mn-b-thin fle
102
100
  class: "mn-b-thin"
103
101
  }, {
104
102
  default: m(() => [
105
- r("div", Q, [
103
+ r("div", W, [
106
104
  s(B, {
107
105
  photo: e.department.profile.photo,
108
106
  "onUpdate:photo": a[0] || (a[0] = (t) => e.department.profile.photo = t),
109
107
  uploadPath: "organizations/" + e.department.name + "/avatars",
110
108
  class: "w-8r aspect-1x1 o-hidden mn-r-small radius-extra"
111
109
  }, null, 8, ["photo", "uploadPath"]),
112
- r("div", W, [
113
- s(x, {
110
+ r("div", X, [
111
+ s(k, {
114
112
  field: e.department.profile.name,
115
113
  "onUpdate:field": a[1] || (a[1] = (t) => e.department.profile.name = t),
116
114
  label: "Name",
@@ -118,7 +116,7 @@ const q = { class: "for-transition pd-thin w-100" }, G = { class: "mn-b-thin fle
118
116
  class: "mn-b-small bg-white radius-small pd-medium",
119
117
  validation: l.organizationName
120
118
  }, null, 8, ["field", "validation"]),
121
- s(x, {
119
+ s(k, {
122
120
  field: e.department.profile.description,
123
121
  "onUpdate:field": a[2] || (a[2] = (t) => e.department.profile.description = t),
124
122
  label: "Description",
@@ -136,7 +134,7 @@ const q = { class: "for-transition pd-thin w-100" }, G = { class: "mn-b-thin fle
136
134
  placeholder: "No members added yet",
137
135
  actions: [{
138
136
  label: "+",
139
- function: () => M()
137
+ function: () => E()
140
138
  }],
141
139
  class: "cols-1 gap-thin mn-b-thin"
142
140
  }, {
@@ -149,7 +147,10 @@ const q = { class: "for-transition pd-thin w-100" }, G = { class: "mn-b-thin fle
149
147
  name: t.user.profile.name || t.user.phone || t.user.email || t.user._id,
150
148
  position: t.position,
151
149
  action: {
152
- label: "x",
150
+ label: {
151
+ is: L,
152
+ props: { class: "i-medium", fill: "rgb(var(--white)" }
153
+ },
153
154
  method: () => S(t)
154
155
  }
155
156
  }, null, 8, ["user", "photo", "name", "position", "action"]))), 128))
@@ -158,7 +159,7 @@ const q = { class: "for-transition pd-thin w-100" }, G = { class: "mn-b-thin fle
158
159
  }, 8, ["actions"]),
159
160
  s(F, {
160
161
  title: "Add member",
161
- onClosePopup: _,
162
+ onClosePopup: g,
162
163
  isPopupOpen: h.value,
163
164
  class: "bg-white w-max-30r radius-big pd-big"
164
165
  }, {
@@ -175,7 +176,7 @@ const q = { class: "for-transition pd-thin w-100" }, G = { class: "mn-b-thin fle
175
176
  }
176
177
  },
177
178
  store: {
178
- read: (t) => L.read(t),
179
+ read: (t) => j.read(t),
179
180
  state: null
180
181
  },
181
182
  options: {
@@ -187,14 +188,14 @@ const q = { class: "for-transition pd-thin w-100" }, G = { class: "mn-b-thin fle
187
188
  items: t
188
189
  }) => [
189
190
  (n(!0), c(D, null, P(t, (o, pe) => {
190
- var g, w;
191
+ var _, w;
191
192
  return n(), u(N, {
192
193
  key: o._id,
193
194
  user: o.user,
194
- photo: (g = o.user.profile) == null ? void 0 : g.photo,
195
+ photo: (_ = o.user.profile) == null ? void 0 : _.photo,
195
196
  name: ((w = o.user.profile) == null ? void 0 : w.name) || o.user.phone || o.user.email,
196
197
  onClick: () => {
197
- C.add(e.department.members, { _id: o.user._id, user: o.user, position: "Member" }), _();
198
+ $.add(e.department.members, { _id: o.user._id, user: o.user, position: "Member" }), g();
198
199
  },
199
200
  class: "bg-white pd-thin radius-medium w-100 mn-b-thin"
200
201
  }, null, 8, ["user", "photo", "name", "onClick"]);
@@ -205,12 +206,11 @@ const q = { class: "for-transition pd-thin w-100" }, G = { class: "mn-b-thin fle
205
206
  ]),
206
207
  _: 1
207
208
  }, 8, ["isPopupOpen"]),
208
- r("div", X, [
209
- r("div", Y, [
210
- Z,
209
+ r("div", Y, [
210
+ r("div", Z, [
211
211
  ee,
212
- r("div", te, [
213
- ae,
212
+ te,
213
+ r("div", ae, [
214
214
  s(i, {
215
215
  label: "Hidden department",
216
216
  name: "hidden",
@@ -297,5 +297,5 @@ const q = { class: "for-transition pd-thin w-100" }, G = { class: "mn-b-thin fle
297
297
  }
298
298
  };
299
299
  export {
300
- Fe as default
300
+ Ve as default
301
301
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("vue-router"),c=require("../../../../components/Feed/Feed.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const B=require("../../../../components/Block/Block.vue.cjs"),C=require("../../../../components/Popup/Popup.vue.cjs"),q=require("../../../globals/components/sections/SectionPageTitle.vue.cjs"),M=require("../sections/MembersAdd.vue.cjs");require("../../../mobile/components/Menu/Menu.vue2.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const b=require("../../../users/components/blocks/CardUser.vue.cjs"),N=require("../blocks/CardDepartment.vue.cjs"),m=require("../../../auth/store/auth.cjs"),l=require("../../store/invites.cjs"),p=require("../../store/memberships.cjs"),h=require("../../store/organizations.cjs"),_=require("../../store/departments.cjs"),x={class:"pd-thin"},P={class:"mn-b-big radius-medium bg-white"},V={key:0,class:"cols-1 gap-thin"},z={key:1},E={__name:"Members",setup(F){const o=f.useRoute();f.useRouter();const u=e.ref(null),s=e.ref("members"),d=e.ref(!1);function g(){d.value=!0}function v(){d.value=!1}e.onMounted(async()=>{u.value=(await h.actions.read({_id:o.params._id,user:m.state.user._id}))[0]}),e.computed(()=>{const a=_.state.departments,n=a.flatMap(r=>r.subdepartments.map(t=>t._id));return a.filter(r=>!n.includes(r._id))});async function k(a){await l.actions.create({owner:{type:"Organization",target:u.value._id},creator:{type:"User",target:m.state.user._id},invites:a})}async function y(a,n){confirm("Confirm remove of member")==!0&&(p.state.memberships.splice(a,1),await p.actions.delete(n._id))}async function w(a,n){confirm("Confirm remove of member")==!0&&(l.state.invites.splice(a,1),await l.actions.delete(n._id))}return(a,n)=>(e.openBlock(),e.createElementBlock("div",x,[e.createVNode(q.default,{title:"Members","onUpdate:tabs_current":n[0]||(n[0]=r=>s.value=r),tabs_current:s.value,tabs:[{name:`Members (${h.state.current.numberOfMembers})`,value:"members"},{name:"Departments",value:"departments"},{name:"Invites",value:"invites"}],actions:[{method:g,label:"Invite members"}],class:"mn-b-small bg-grey bg-grey radius-big"},null,8,["tabs_current","tabs","actions"]),e.createVNode(C.default,{title:"Add members",onClosePopup:v,isPopupOpen:d.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[e.createVNode(M.default,{text:"Please enter your email or phone number to send an invitation link:",organization:u.value,onSendInvite:k},null,8,["organization"])]),_:1},8,["isPopupOpen"]),s.value==="departments"?(e.openBlock(),e.createBlock(B.default,{key:0,class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(c.default,{states:{empty:{title:"No Departments Found",description:"Currently, there are no departments available.",action:"Add department",callback:()=>a.$router.push(`/organizations/${e.unref(o).params._id}/departments/create`)}},store:{read:r=>_.actions.read(r),state:null},options:{organization:e.unref(o).params._id,user:m.state.user._id,hidden:!1}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(t,i)=>(e.openBlock(),e.createBlock(N.default,{key:i,department:t,organization:e.unref(o).params._id,class:"radius-big bg-white pos-relative mn-b-thin"},null,8,["department","organization"]))),128))]),_:1},8,["states","store","options"])]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("section",P,[s.value==="members"?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(c.default,{search:!0,states:{empty:{title:"No Members Found",description:"Currently, there are no members."}},store:{read:r=>p.actions.read(r)},options:{target:e.unref(o).params._id,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,i)=>(e.openBlock(),e.createBlock(b.default,{key:i,user:t,_id:t.user._id,photo:t.user.profile.photo,phone:t.user.phone,email:t.user.email,name:t.user.profile.name||"No name",role:t.label||t.role,onClick:I=>a.$router.push(`/profile/${t.user._id}`),action:t.role!=="owner"?{label:"x",method:()=>y(i,t)}:null,class:"w-100 bg-grey radius-big flex-nowrap flex pd-medium"},null,8,["user","_id","photo","phone","email","name","role","onClick","action"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0),s.value==="invites"?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(c.default,{search:!0,states:{empty:{title:"No Invites Found",description:"Currently, there are no members."}},store:{read:r=>l.actions.read(r)},options:{owner:e.unref(o).params._id},class:"gap-thin cols-1"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,t=>(e.openBlock(),e.createBlock(b.default,{key:a.index,user:{type:"invite"},name:t.email||t.phone,role:t.status,action:{label:"x",method:()=>w(a.index,t)},class:"w-100 bg-grey radius-big flex-nowrap flex pd-medium"},null,8,["name","role","action"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0)])]))}};exports.default=E;
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"),h=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 k(){c.value=!0}function y(){c.value=!1}e.onMounted(async()=>{d.value=(await h.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 w(a){console.log("invite.list"),await u.actions.create({owner:{type:"Organization",target:d.value._id},creator:{type:"User",target:m.state.user._id},invites:a})}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 (${h.state.current.numberOfMembers||0})`,value:"members"},{name:"Departments",value:"departments"},{name:"Invites",value:"invites"}],actions:[{method:k,label:"Invite members"}],class:"mn-b-small bg-grey bg-grey radius-big"},null,8,["tabs_current","tabs","actions"]),e.createVNode(q.default,{title:"Add members",onClosePopup:y,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:w},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-grey 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:"w-100 bg-grey radius-big flex-nowrap flex pd-medium"},null,8,["user","_id","photo","phone","email","name","role","onClick","action"]))),128))]),_:1},8,["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-grey radius-big flex-nowrap flex pd-medium"},null,8,["name","role","action"]))),128))]),_:1},8,["store","options"])])):e.createCommentVNode("",!0)])}}};exports.default=I;
@@ -1,136 +1,142 @@
1
- import { ref as _, onMounted as N, computed as P, openBlock as a, createElementBlock as n, createVNode as i, withCtx as l, createBlock as d, unref as u, Fragment as b, renderList as h, createCommentVNode as v, createElementVNode as A } from "vue";
2
- import { useRoute as O, useRouter as D } from "vue-router";
3
- import g from "../../../../components/Feed/Feed.vue.js";
1
+ import { ref as v, 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 g, renderList as h, 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";
4
4
  import "../../../../components/Tab/Tab.vue.js";
5
- import F from "../../../../components/Block/Block.vue.js";
6
- import B from "../../../../components/Popup/Popup.vue.js";
7
- import S from "../../../globals/components/sections/SectionPageTitle.vue.js";
8
- import V from "../sections/MembersAdd.vue.js";
5
+ import "../../../../components/Tooltip/Tooltip.vue2.js";
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";
9
9
  import "../../../mobile/components/Menu/Menu.vue2.js";
10
10
  import "../../../mobile/components/Menu/MenuItem.vue.js";
11
- import w from "../../../users/components/blocks/CardUser.vue.js";
12
- import E from "../blocks/CardDepartment.vue.js";
13
- import { state as y } from "../../../auth/store/auth.js";
14
- import { actions as $, state as R } from "../../store/invites.js";
15
- import { actions as k, state as U } from "../../store/memberships.js";
16
- import { actions as L, state as j } from "../../store/organizations.js";
17
- import { state as q, actions as G } from "../../store/departments.js";
18
- const H = { class: "pd-thin" }, J = { class: "mn-b-big radius-medium bg-white" }, K = {
19
- key: 0,
11
+ import k from "../../../users/components/blocks/CardUser.vue.js";
12
+ import L from "../blocks/CardDepartment.vue.js";
13
+ import C 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 M, state as j } from "../../store/memberships.js";
17
+ import { actions as q, state as G } from "../../store/organizations.js";
18
+ import { state as x, actions as H } from "../../store/departments.js";
19
+ const J = { class: "pd-thin" }, K = {
20
+ key: 2,
20
21
  class: "cols-1 gap-thin"
21
- }, Q = { key: 1 }, fe = {
22
+ }, Q = { key: 3 }, be = {
22
23
  __name: "Members",
23
- setup(T) {
24
- const o = O();
25
- D();
26
- const c = _(null), m = _("members"), f = _(!1);
27
- function C() {
28
- f.value = !0;
24
+ setup(W) {
25
+ const o = S();
26
+ V();
27
+ const _ = v(null), n = v("members"), b = v(!1);
28
+ function z() {
29
+ b.value = !0;
29
30
  }
30
- function M() {
31
- f.value = !1;
31
+ function I() {
32
+ b.value = !1;
32
33
  }
33
- N(async () => {
34
- c.value = (await L.read({ _id: o.params._id, user: y.user._id }))[0];
35
- }), P(() => {
36
- const r = q.departments, s = r.flatMap(
37
- (t) => t.subdepartments.map((e) => e._id)
34
+ O(async () => {
35
+ _.value = (await q.read({ _id: o.params._id, user: $.user._id }))[0];
36
+ }), D(() => {
37
+ const r = x.departments, s = r.flatMap(
38
+ (m) => m.subdepartments.map((t) => t._id)
38
39
  );
39
40
  return r.filter(
40
- (t) => !s.includes(t._id)
41
+ (m) => !s.includes(m._id)
41
42
  );
42
43
  });
43
- async function x(r) {
44
- await $.create({
44
+ async function N(r) {
45
+ console.log("invite.list"), await w.create({
45
46
  owner: {
46
47
  type: "Organization",
47
- target: c.value._id
48
+ target: _.value._id
48
49
  },
49
50
  creator: {
50
51
  type: "User",
51
- target: y.user._id
52
+ target: $.user._id
52
53
  },
53
54
  invites: r
54
55
  });
55
56
  }
56
- async function z(r, s) {
57
- confirm("Confirm remove of member") == !0 && (U.memberships.splice(r, 1), await k.delete(s._id));
57
+ async function P(r, s) {
58
+ confirm("Confirm remove of member") == !0 && (j.memberships.splice(r, 1), await M.delete(s._id));
58
59
  }
59
- async function I(r, s) {
60
- confirm("Confirm remove of member") == !0 && (R.invites.splice(r, 1), await $.delete(s._id));
60
+ async function A(r, s) {
61
+ confirm("Confirm remove of member") == !0 && (T.invites.splice(r, 1), await w.delete(s._id));
61
62
  }
62
- return (r, s) => (a(), n("div", H, [
63
- i(S, {
64
- title: "Members",
65
- "onUpdate:tabs_current": s[0] || (s[0] = (t) => m.value = t),
66
- tabs_current: m.value,
67
- tabs: [
68
- { name: `Members (${j.current.numberOfMembers})`, value: "members" },
69
- { name: "Departments", value: "departments" },
70
- { name: "Invites", value: "invites" }
71
- ],
72
- actions: [
73
- { method: C, label: "Invite members" }
74
- ],
75
- class: "mn-b-small bg-grey bg-grey radius-big"
76
- }, null, 8, ["tabs_current", "tabs", "actions"]),
77
- i(B, {
78
- title: "Add members",
79
- onClosePopup: M,
80
- isPopupOpen: f.value,
81
- class: "bg-white w-min-30r w-max-30r radius-big pd-medium"
82
- }, {
83
- default: l(() => [
84
- i(V, {
85
- text: "Please enter your email or phone number to send an invitation link:",
86
- organization: c.value,
87
- onSendInvite: x
88
- }, null, 8, ["organization"])
89
- ]),
90
- _: 1
91
- }, 8, ["isPopupOpen"]),
92
- m.value === "departments" ? (a(), d(F, {
93
- key: 0,
94
- class: "mn-b-semi"
95
- }, {
96
- default: l(() => [
97
- i(g, {
98
- states: {
99
- empty: {
100
- title: "No Departments Found",
101
- description: "Currently, there are no departments available.",
102
- action: "Add department",
103
- callback: () => r.$router.push(`/organizations/${u(o).params._id}/departments/create`)
104
- }
105
- },
106
- store: {
107
- read: (t) => G.read(t),
108
- state: null
109
- },
110
- options: {
111
- organization: u(o).params._id,
112
- user: y.user._id,
113
- hidden: !1
63
+ return (r, s) => {
64
+ const m = F("router-link");
65
+ return a(), i("div", J, [
66
+ p(U, {
67
+ title: "Members",
68
+ "onUpdate:tabs_current": s[0] || (s[0] = (t) => n.value = t),
69
+ tabs_current: n.value,
70
+ tabs: [
71
+ { name: `Members (${G.current.numberOfMembers || 0})`, value: "members" },
72
+ { name: "Departments", value: "departments" },
73
+ { name: "Invites", value: "invites" }
74
+ ],
75
+ actions: [
76
+ { method: z, label: "Invite members" }
77
+ ],
78
+ class: "mn-b-small bg-grey bg-grey radius-big"
79
+ }, null, 8, ["tabs_current", "tabs", "actions"]),
80
+ p(R, {
81
+ title: "Add members",
82
+ onClosePopup: I,
83
+ isPopupOpen: b.value,
84
+ class: "bg-white w-min-30r w-max-30r radius-big pd-medium"
85
+ }, {
86
+ default: u(() => [
87
+ p(E, {
88
+ text: "Please enter your email or phone number to send an invitation link:",
89
+ organization: _.value,
90
+ onSendInvite: N
91
+ }, null, 8, ["organization"])
92
+ ]),
93
+ _: 1
94
+ }, 8, ["isPopupOpen"]),
95
+ n.value === "departments" ? (a(), d(y, {
96
+ key: 0,
97
+ states: {
98
+ empty: {
99
+ title: "No Departments Found",
100
+ description: "Currently, there are no departments available.",
101
+ action: "Add department",
102
+ callback: () => r.$router.push(`/organizations/${l(o).params._id}/departments/create`)
114
103
  }
115
- }, {
116
- default: l(({
117
- items: t
118
- }) => [
119
- (a(!0), n(b, null, h(t, (e, p) => (a(), d(E, {
120
- key: p,
121
- department: e,
122
- organization: u(o).params._id,
123
- class: "radius-big bg-white pos-relative mn-b-thin"
124
- }, null, 8, ["department", "organization"]))), 128))
125
- ]),
126
- _: 1
127
- }, 8, ["states", "store", "options"])
128
- ]),
129
- _: 1
130
- })) : v("", !0),
131
- A("section", J, [
132
- m.value === "members" ? (a(), n("div", K, [
133
- i(g, {
104
+ },
105
+ store: {
106
+ read: (t) => H.read(t),
107
+ state: null
108
+ },
109
+ options: {
110
+ organization: l(o).params._id,
111
+ user: $.user._id
112
+ }
113
+ }, {
114
+ default: u(({
115
+ items: t
116
+ }) => [
117
+ (a(!0), i(g, null, h(t, (e, c) => (a(), d(L, {
118
+ key: c,
119
+ department: e,
120
+ organization: l(o).params._id,
121
+ class: "radius-semi bg-grey pos-relative mn-b-thin"
122
+ }, null, 8, ["department", "organization"]))), 128))
123
+ ]),
124
+ _: 1
125
+ }, 8, ["states", "store", "options"])) : f("", !0),
126
+ n.value === "departments" && x.departments.length > 0 ? (a(), d(m, {
127
+ key: 1,
128
+ to: {
129
+ path: `/organizations/${l(o).params._id}/departments/create`
130
+ },
131
+ class: "d-block flex-center flex uppercase t-semi bg-main w-100 pd-small radius-extra"
132
+ }, {
133
+ default: u(() => [
134
+ B(" Add department ")
135
+ ]),
136
+ _: 1
137
+ }, 8, ["to"])) : f("", !0),
138
+ n.value === "members" ? (a(), i("div", K, [
139
+ p(y, {
134
140
  search: !0,
135
141
  states: {
136
142
  empty: {
@@ -139,19 +145,19 @@ const H = { class: "pd-thin" }, J = { class: "mn-b-big radius-medium bg-white" }
139
145
  }
140
146
  },
141
147
  store: {
142
- read: (t) => k.read(t)
148
+ read: (t) => M.read(t)
143
149
  },
144
150
  options: {
145
- target: u(o).params._id,
151
+ target: l(o).params._id,
146
152
  role: ["member", "owner"]
147
153
  },
148
154
  class: "gap-thin cols-1"
149
155
  }, {
150
- default: l(({
156
+ default: u(({
151
157
  items: t
152
158
  }) => [
153
- (a(!0), n(b, null, h(t, (e, p) => (a(), d(w, {
154
- key: p,
159
+ (a(!0), i(g, null, h(t, (e, c) => (a(), d(k, {
160
+ key: c,
155
161
  user: e,
156
162
  _id: e.user._id,
157
163
  photo: e.user.profile.photo,
@@ -159,19 +165,22 @@ const H = { class: "pd-thin" }, J = { class: "mn-b-big radius-medium bg-white" }
159
165
  email: e.user.email,
160
166
  name: e.user.profile.name || "No name",
161
167
  role: e.label || e.role,
162
- onClick: (W) => r.$router.push(`/profile/${e.user._id}`),
168
+ onClick: (X) => r.$router.push(`/profile/${e.user._id}`),
163
169
  action: e.role !== "owner" ? {
164
- label: "x",
165
- method: () => z(p, e)
170
+ label: {
171
+ is: C,
172
+ props: { class: "i-medium", fill: "rgb(var(--white)" }
173
+ },
174
+ method: () => P(c, e)
166
175
  } : null,
167
176
  class: "w-100 bg-grey radius-big flex-nowrap flex pd-medium"
168
177
  }, null, 8, ["user", "_id", "photo", "phone", "email", "name", "role", "onClick", "action"]))), 128))
169
178
  ]),
170
179
  _: 1
171
180
  }, 8, ["store", "options"])
172
- ])) : v("", !0),
173
- m.value === "invites" ? (a(), n("div", Q, [
174
- i(g, {
181
+ ])) : f("", !0),
182
+ n.value === "invites" ? (a(), i("div", Q, [
183
+ p(y, {
175
184
  search: !0,
176
185
  states: {
177
186
  empty: {
@@ -180,35 +189,38 @@ const H = { class: "pd-thin" }, J = { class: "mn-b-big radius-medium bg-white" }
180
189
  }
181
190
  },
182
191
  store: {
183
- read: (t) => $.read(t)
192
+ read: (t) => w.read(t)
184
193
  },
185
194
  options: {
186
- owner: u(o).params._id
195
+ owner: l(o).params._id
187
196
  },
188
197
  class: "gap-thin cols-1"
189
198
  }, {
190
- default: l(({
199
+ default: u(({
191
200
  items: t
192
201
  }) => [
193
- (a(!0), n(b, null, h(t, (e) => (a(), d(w, {
202
+ (a(!0), i(g, null, h(t, (e) => (a(), d(k, {
194
203
  key: r.index,
195
204
  user: { type: "invite" },
196
205
  name: e.email || e.phone,
197
206
  role: e.status,
198
207
  action: {
199
- label: "x",
200
- method: () => I(r.index, e)
208
+ label: {
209
+ is: C,
210
+ props: { class: "i-medium", fill: "rgb(var(--white)" }
211
+ },
212
+ method: () => A(r.index, e)
201
213
  },
202
214
  class: "w-100 bg-grey radius-big flex-nowrap flex pd-medium"
203
215
  }, null, 8, ["name", "role", "action"]))), 128))
204
216
  ]),
205
217
  _: 1
206
218
  }, 8, ["store", "options"])
207
- ])) : v("", !0)
208
- ])
209
- ]));
219
+ ])) : f("", !0)
220
+ ]);
221
+ };
210
222
  }
211
223
  };
212
224
  export {
213
- fe as default
225
+ be as default
214
226
  };