@ozdao/prometheus-framework 0.2.50 → 0.2.52

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. package/dist/main-482dc398.mjs +13626 -0
  2. package/dist/main-b2JI9sFg.js +91 -0
  3. package/dist/main-c56d4c09.js +91 -0
  4. package/dist/main-x-9D8zvb.mjs +13604 -0
  5. package/dist/main.css +1 -1
  6. package/dist/organizations.server.js +22 -16
  7. package/dist/organizations.server.mjs +22 -16
  8. package/dist/products.server.js +32 -16
  9. package/dist/products.server.mjs +32 -16
  10. package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
  11. package/dist/prometheus-framework/src/components/Button/Button.vue.js +223 -2
  12. package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
  13. package/dist/prometheus-framework/src/components/Button/Button.vue2.js +2 -225
  14. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/Feed/Feed.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 +76 -2
  18. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +2 -76
  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/LocationMarker/LocationMarker.vue2.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +2 -2
  24. package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/components/Map/Map.vue.js +35 -2
  26. package/dist/prometheus-framework/src/components/Map/Map.vue2.cjs +1 -1
  27. package/dist/prometheus-framework/src/components/Map/Map.vue2.js +2 -35
  28. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +44 -2
  30. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  31. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +2 -44
  32. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
  34. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
  36. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
  38. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
  40. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
  42. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
  44. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
  46. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  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 +2 -2
  50. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
  54. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  56. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +2 -2
  60. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +2 -2
  62. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -0
  63. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +37 -0
  64. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  66. package/dist/prometheus-framework/src/modules/icons/entities/IconShopcart.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/icons/entities/IconShopcart.vue.js +21 -14
  68. package/dist/prometheus-framework/src/modules/icons/navigation/IconSearch.vue.cjs +1 -0
  69. package/dist/prometheus-framework/src/modules/icons/navigation/IconSearch.vue.js +24 -0
  70. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
  72. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +2 -11
  74. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +11 -2
  76. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +1 -1
  78. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
  80. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +1 -1
  82. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +49 -101
  84. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +25 -25
  85. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +68 -39
  87. package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.js +38 -47
  89. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
  91. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +69 -62
  93. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +134 -129
  95. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  97. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  98. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +128 -158
  99. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  100. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  101. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  102. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  103. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  104. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
  105. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
  106. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +13 -13
  107. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  108. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  109. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  110. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  111. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  112. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  113. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
  114. package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
  115. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
  116. package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
  117. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  118. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +44 -44
  119. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  120. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
  121. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  122. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -3
  123. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  124. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +64 -51
  125. package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.cjs +1 -1
  126. package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.js +1 -1
  127. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
  128. package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
  129. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  130. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
  131. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  132. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +22 -23
  133. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
  134. package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
  135. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  136. package/dist/prometheus-framework/src/modules/products/store/products.js +23 -23
  137. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  138. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  139. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  140. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +1 -1
  141. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  142. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
  143. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  144. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  145. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  146. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
  147. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  148. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  149. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  150. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +1 -1
  151. package/dist/prometheus-framework.cjs.js +1 -1
  152. package/dist/prometheus-framework.es.js +1 -1
  153. package/dist/style.css +1 -1
  154. package/dist/web-6dcbb74b.mjs +55 -0
  155. package/dist/web-caJAdsxy.js +1 -0
  156. package/dist/web-ee302c1d.js +1 -0
  157. package/dist/web-i08OVMw9.mjs +55 -0
  158. package/package.json +1 -1
  159. package/src/components/Button/Button.vue +3 -3
  160. package/src/components/Feed/Feed.vue +2 -1
  161. package/src/components/LocationMarker/LocationMarker.vue +1 -0
  162. package/src/modules/applications/applications.client.js +0 -1
  163. package/src/modules/globals/components/blocks/BlockSearch.vue +42 -0
  164. package/src/modules/icons/entities/IconProfile.vue +10 -1
  165. package/src/modules/icons/entities/IconShopcart.vue +12 -2
  166. package/src/modules/marketplace/components/layouts/Marketplace.vue +7 -14
  167. package/src/modules/mobile/components/BottomNavigation/BottomNavigation.vue +86 -0
  168. package/src/modules/mobile/components/BottomSheet/BottomSheet.vue +86 -0
  169. package/src/modules/mobile/components/NavigationBar/NavigationBar.vue +152 -0
  170. package/src/modules/mobile/components/Walkthrough/Walkthrough.vue +195 -0
  171. package/src/modules/orders/components/partials/ShopCart.vue +4 -1
  172. package/src/modules/organizations/components/blocks/CardDepartment.vue +34 -66
  173. package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +50 -13
  174. package/src/modules/organizations/components/blocks/User.vue +19 -10
  175. package/src/modules/organizations/components/pages/Department.vue +19 -3
  176. package/src/modules/organizations/components/pages/DepartmentEdit.vue +14 -10
  177. package/src/modules/organizations/components/pages/Organization.vue +38 -72
  178. package/src/modules/organizations/components/sections/Feed.vue +1 -1
  179. package/src/modules/organizations/controllers/memberships.controller.js +27 -24
  180. package/src/modules/organizations/controllers/organizations.controller.js +0 -1
  181. package/src/modules/products/components/pages/EditLeftover.vue +6 -4
  182. package/src/modules/products/components/pages/Products.vue +58 -38
  183. package/src/modules/products/components/sections/FilterProducts.vue +5 -5
  184. package/src/modules/products/controllers/leftovers.controller.js +12 -5
  185. package/src/modules/products/controllers/products.controller.js +30 -9
  186. package/src/modules/products/store/products.js +4 -0
  187. package/src/styles/layout.scss +1 -1
@@ -1,172 +1,177 @@
1
- import { ref as d, openBlock as r, createElementBlock as m, createElementVNode as t, unref as x, createVNode as a, withCtx as c, createTextVNode as C, createCommentVNode as y, Fragment as S, renderList as N, createBlock as $, pushScopeId as R, popScopeId as H } from "vue";
2
- import { useRouter as L, useRoute as j } from "vue-router";
1
+ import { ref as c, openBlock as r, createElementBlock as m, createElementVNode as t, unref as C, createVNode as a, withCtx as p, createTextVNode as S, createBlock as y, createCommentVNode as w, Fragment as N, renderList as $, pushScopeId as H, popScopeId as L } from "vue";
2
+ import { useRouter as j, useRoute as q } from "vue-router";
3
3
  import "../../../../../../node_modules/js-cookie/dist/js.cookie.js";
4
4
  import "vue-i18n";
5
5
  import "../../../globals/localization/vue-i18n.js";
6
6
  import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
7
- import q from "../../../../components/UploadImage/UploadImage.vue.js";
8
- import "../../../../components/Tab/Tab.vue.js";
9
- import O from "../../../../components/Field/Field.vue2.js";
7
+ import G from "../../../../components/UploadImage/UploadImage.vue.js";
8
+ import "../../../../components/Tab/Tab.vue2.js";
9
+ import O from "../../../../components/Field/Field.vue.js";
10
10
  import "../../../../components/Select/Select.vue.js";
11
- import G from "../../../../../../_virtual/_plugin-vue_export-helper.js";
12
- import p from "../../../../components/Checkbox/Checkbox.vue.js";
11
+ import J from "../../../../../../_virtual/_plugin-vue_export-helper.js";
12
+ import d from "../../../../components/Checkbox/Checkbox.vue.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 E from "../../../../components/Button/Button.vue2.js";
16
+ import E from "../../../../components/Button/Button.vue.js";
17
17
  import M from "../../../../components/Popup/Popup.vue2.js";
18
- import J from "../../../../components/Block/Block.vue.js";
18
+ import z from "../../../../components/Block/Block.vue.js";
19
19
  import "../../../../../../node_modules/vue-select/dist/vue-select.es.js";
20
20
  import "../blocks/EditArray.vue2.js";
21
21
  import K from "../blocks/DepartmentSub.vue.js";
22
- import z from "../blocks/DepartmentMemberModify.vue.js";
22
+ import I from "../blocks/DepartmentMemberModify.vue.js";
23
23
  import Q from "../blocks/User.vue.js";
24
24
  import { state as e, actions as f } from "../../store/departments.js";
25
- import { state as I, actions as W } from "../../store/memberships.js";
25
+ import { state as T, actions as W } from "../../store/memberships.js";
26
26
  import "./DepartmentEdit.vue2.js";
27
- const n = (h) => (R("data-v-e983b0b2"), h = h(), H(), h), X = { class: "for-transition pd-thin w-100" }, Y = { class: "mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big" }, Z = {
27
+ const o = (h) => (H("data-v-7ec9277b"), h = h(), L(), h), X = { class: "for-transition pd-thin w-100" }, Y = { class: "mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big" }, Z = {
28
28
  key: 0,
29
29
  class: "mn-r-auto"
30
30
  }, ee = {
31
31
  key: 1,
32
32
  class: "mn-r-auto"
33
- }, te = { class: "flex-nowrap flex pd-thin" }, ae = { class: "mn-b-thin bg-grey pd-medium o-hidden radius-big" }, se = /* @__PURE__ */ n(() => /* @__PURE__ */ t("h3", { class: "mn-b-semi" }, "Profile", -1)), le = {
34
- key: 0,
35
- class: "radius-small flex-nowrap flex"
36
- }, re = { class: "w-100 flex-child-grow-1 flex-child" }, ie = { class: "cols-2 gap-thin" }, ne = { class: "bg-grey pd-medium o-hidden radius-big" }, oe = /* @__PURE__ */ n(() => /* @__PURE__ */ t("h3", { class: "mn-b-semi" }, "Department Settings", -1)), me = /* @__PURE__ */ n(() => /* @__PURE__ */ t("p", { class: "p-medium mn-b-small" }, "Please settings for your department:", -1)), de = { class: "cols-1 gap-thin" }, pe = /* @__PURE__ */ n(() => /* @__PURE__ */ t("h4", null, "Products", -1)), ue = { class: "bg-grey pd-medium o-hidden radius-big" }, ce = /* @__PURE__ */ n(() => /* @__PURE__ */ t("h3", { class: "mn-b-semi" }, "Acessess", -1)), fe = /* @__PURE__ */ n(() => /* @__PURE__ */ t("p", { class: "p-medium mn-b-small" }, "Please select organization accesses for user in department:", -1)), he = { class: "cols-1 gap-thin" }, be = /* @__PURE__ */ n(() => /* @__PURE__ */ t("h4", null, "Products", -1)), _e = /* @__PURE__ */ n(() => /* @__PURE__ */ t("h4", null, "Orders", -1)), ve = {
37
- key: 0,
33
+ }, te = { class: "flex-nowrap flex pd-thin" }, ae = { class: "cols-2-fit-content" }, se = { class: "w-100 flex-child-grow-1 flex-child" }, le = { class: "cols-2 gap-thin" }, re = { class: "bg-grey pd-medium o-hidden radius-big" }, ie = /* @__PURE__ */ o(() => /* @__PURE__ */ t("h3", { class: "mn-b-semi" }, "Department Settings", -1)), ne = /* @__PURE__ */ o(() => /* @__PURE__ */ t("p", { class: "p-medium mn-b-small" }, "Please settings for your department:", -1)), oe = { class: "cols-1 gap-thin" }, me = /* @__PURE__ */ o(() => /* @__PURE__ */ t("h4", null, "Products", -1)), de = { class: "bg-grey pd-medium o-hidden radius-big" }, pe = /* @__PURE__ */ o(() => /* @__PURE__ */ t("h3", { class: "mn-b-semi" }, "Acessess", -1)), ue = /* @__PURE__ */ o(() => /* @__PURE__ */ t("p", { class: "p-medium mn-b-small" }, "Please select organization accesses for user in department:", -1)), ce = { class: "cols-1 gap-thin" }, fe = /* @__PURE__ */ o(() => /* @__PURE__ */ t("h4", null, "Products", -1)), he = /* @__PURE__ */ o(() => /* @__PURE__ */ t("h4", null, "Orders", -1)), _e = {
34
+ key: 1,
38
35
  class: "flex-nowrap flex pd-thin"
39
- }, ge = {
36
+ }, be = {
40
37
  id: "dash",
41
38
  class: "pd-medium bg-white"
42
- }, ye = { class: "mn-b-regular flex-v-center flex-nowrap flex" }, we = /* @__PURE__ */ n(() => /* @__PURE__ */ t("h3", { class: "mn-r-small" }, "Подотделы ", -1)), De = { class: "mn-b-small" }, ke = { key: 0 }, Pe = {
39
+ }, ve = { class: "mn-b-regular flex-v-center flex-nowrap flex" }, ge = /* @__PURE__ */ o(() => /* @__PURE__ */ t("h3", { class: "mn-r-small" }, "Подотделы ", -1)), ye = { class: "mn-b-small" }, we = { key: 0 }, De = {
43
40
  __name: "DepartmentEdit",
44
41
  setup(h) {
45
- const T = L(), s = j();
46
- d("details"), d(!1);
47
- async function U() {
48
- s.params.department && await W.read({ target: s.params._id }), d(I.memberships), await f.read(s.params._id), s.params.department && await f.readOne(s.params.department);
42
+ const U = j(), l = q();
43
+ async function V() {
44
+ l.params.department && await W.read({ target: l.params._id }), c(T.memberships), await f.read(l.params._id), l.params.department && await f.readOne(l.params.department);
49
45
  }
50
- U();
51
- const b = d(!1), _ = d(null);
52
- function w(i) {
53
- b.value = !0, typeof i == "number" && (_.value = i);
46
+ V();
47
+ const _ = c(!1), b = c(null);
48
+ function D(i) {
49
+ _.value = !0, typeof i == "number" && (b.value = i);
54
50
  }
55
- function D() {
56
- b.value = !1, _.value = null;
51
+ function k() {
52
+ _.value = !1, b.value = null;
57
53
  }
58
- const v = d(!1), g = d(null);
59
- function k(i) {
54
+ const v = c(!1), g = c(null);
55
+ function P(i) {
60
56
  v.value = !0, typeof i == "number" && (g.value = i);
61
57
  }
62
- function P() {
58
+ function x() {
63
59
  v.value = !1, g.value = null;
64
60
  }
65
- async function V() {
66
- s.params.department && await f.update(
67
- s.params._id,
61
+ async function B() {
62
+ l.params.department && await f.update(
63
+ l.params._id,
68
64
  e.department
69
- ), s.params.department || await f.create(
70
- s.params._id,
65
+ ), l.params.department || await f.create(
66
+ l.params._id,
71
67
  e.department
72
68
  );
73
69
  }
74
- function B() {
75
- T.replace({ name: "Department", params: { _id: s.params._id, department: e.department._id } });
70
+ function A() {
71
+ U.replace({ name: "Department", params: { _id: l.params._id, department: e.department._id } });
76
72
  }
77
- async function A() {
73
+ async function F() {
78
74
  await f.delete(
79
- s.params._id,
75
+ l.params._id,
80
76
  e.department
81
77
  );
82
78
  }
83
- return (i, o) => (r(), m("div", X, [
79
+ return (i, n) => (r(), m("div", X, [
84
80
  t("header", Y, [
85
- x(s).params.department ? (r(), m("h1", Z, "Edit Department")) : (r(), m("h1", ee, "Create Department")),
81
+ C(l).params.department ? (r(), m("h1", Z, "Edit Department")) : (r(), m("h1", ee, "Create Department")),
86
82
  t("section", te, [
87
83
  a(E, {
88
- submit: V,
89
- callback: B,
84
+ submit: B,
85
+ callback: A,
90
86
  class: "bg-main"
91
87
  }, {
92
- default: c(() => [
93
- C("Save Department")
88
+ default: p(() => [
89
+ S("Save Department")
94
90
  ]),
95
91
  _: 1
96
92
  })
97
93
  ])
98
94
  ]),
99
- t("div", ae, [
100
- se,
101
- e.department.profile ? (r(), m("div", le, [
102
- a(q, {
103
- photo: e.department.profile.photo,
104
- "onUpdate:photo": o[0] || (o[0] = (l) => e.department.profile.photo = l),
105
- uploadPath: "organizations/" + e.department.name + "/avatars",
106
- class: "w-8r aspect-1x1 o-hidden mn-r-small radius-extra"
107
- }, null, 8, ["photo", "uploadPath"]),
108
- t("div", re, [
109
- a(O, {
110
- field: e.department.profile.name,
111
- "onUpdate:field": o[1] || (o[1] = (l) => e.department.profile.name = l),
112
- label: "Name",
113
- placeholder: "Department Name",
114
- class: "mn-b-small bg-white radius-small pd-medium",
115
- validation: i.organizationName
116
- }, null, 8, ["field", "validation"]),
117
- a(O, {
118
- field: e.department.profile.description,
119
- "onUpdate:field": o[2] || (o[2] = (l) => e.department.profile.description = l),
120
- label: "Description",
121
- placeholder: "Department description (max 120 symbols)",
122
- class: "bg-white radius-small pd-medium",
123
- validation: i.organizationName
124
- }, null, 8, ["field", "validation"])
95
+ e.department.profile ? (r(), y(z, {
96
+ key: 0,
97
+ title: "Profile",
98
+ class: "mn-b-thin"
99
+ }, {
100
+ default: p(() => [
101
+ t("div", ae, [
102
+ a(G, {
103
+ photo: e.department.profile.photo,
104
+ "onUpdate:photo": n[0] || (n[0] = (s) => e.department.profile.photo = s),
105
+ uploadPath: "organizations/" + e.department.name + "/avatars",
106
+ class: "w-8r aspect-1x1 o-hidden mn-r-small radius-extra"
107
+ }, null, 8, ["photo", "uploadPath"]),
108
+ t("div", se, [
109
+ a(O, {
110
+ field: e.department.profile.name,
111
+ "onUpdate:field": n[1] || (n[1] = (s) => e.department.profile.name = s),
112
+ label: "Name",
113
+ placeholder: "Department Name",
114
+ class: "mn-b-small bg-white radius-small pd-medium",
115
+ validation: i.organizationName
116
+ }, null, 8, ["field", "validation"]),
117
+ a(O, {
118
+ field: e.department.profile.description,
119
+ "onUpdate:field": n[2] || (n[2] = (s) => e.department.profile.description = s),
120
+ label: "Description",
121
+ placeholder: "Department description (max 120 symbols)",
122
+ class: "bg-white radius-small pd-medium",
123
+ validation: i.organizationName
124
+ }, null, 8, ["field", "validation"])
125
+ ])
125
126
  ])
126
- ])) : y("", !0)
127
- ]),
128
- a(J, {
127
+ ]),
128
+ _: 1
129
+ })) : w("", !0),
130
+ a(z, {
129
131
  title: "Team",
130
132
  placeholder: "No members added yet",
131
133
  actions: [{
132
134
  label: "+",
133
- function: () => w()
135
+ function: () => D()
134
136
  }],
135
137
  class: "cols-1 gap-thin mn-b-thin"
136
138
  }, {
137
- default: c(() => [
138
- (r(!0), m(S, null, N(e.department.members, (l, u) => (r(), $(Q, {
139
+ default: p(() => [
140
+ (r(!0), m(N, null, $(e.department.members, (s, u) => (r(), y(Q, {
139
141
  class: "bg-grey o-hidden radius-small mn-b-thin",
140
142
  key: u,
141
- user: l.user,
142
- position: l.position,
143
- onClick: (F) => w(u)
144
- }, null, 8, ["user", "position", "onClick"]))), 128))
143
+ user: s.user,
144
+ photo: s.user.profile.photo,
145
+ name: s.user.profile.name || s.user.phone || s.user.email || s.user._id,
146
+ position: s.position,
147
+ onClick: (R) => D(u)
148
+ }, null, 8, ["user", "photo", "name", "position", "onClick"]))), 128))
145
149
  ]),
146
150
  _: 1
147
151
  }, 8, ["actions"]),
148
152
  a(M, {
149
153
  title: "Добавить участника",
150
- onClosePopup: D,
151
- isPopupOpen: b.value
154
+ onClosePopup: k,
155
+ isPopupOpen: _.value,
156
+ class: "bg-white w-max-30r radius-big pd-big"
152
157
  }, {
153
- default: c(() => [
154
- a(z, {
158
+ default: p(() => [
159
+ a(I, {
155
160
  members: e.department.members,
156
- member: _.value,
157
- users: I.memberships,
158
- onCallback: D
161
+ member: b.value,
162
+ users: T.memberships,
163
+ onCallback: k
159
164
  }, null, 8, ["members", "member", "users"])
160
165
  ]),
161
166
  _: 1
162
167
  }, 8, ["isPopupOpen"]),
163
- t("div", ie, [
164
- t("div", ne, [
165
- oe,
166
- me,
167
- t("div", de, [
168
- pe,
169
- a(p, {
168
+ t("div", le, [
169
+ t("div", re, [
170
+ ie,
171
+ ne,
172
+ t("div", oe, [
173
+ me,
174
+ a(d, {
170
175
  label: "Hidden department",
171
176
  name: "Delivery",
172
177
  value: "pickup",
@@ -175,48 +180,48 @@ const n = (h) => (R("data-v-e983b0b2"), h = h(), H(), h), X = { class: "for-tran
175
180
  }, null, 8, ["radio"])
176
181
  ])
177
182
  ]),
178
- t("div", ue, [
179
- ce,
180
- fe,
181
- t("div", he, [
182
- be,
183
- a(p, {
183
+ t("div", de, [
184
+ pe,
185
+ ue,
186
+ t("div", ce, [
187
+ fe,
188
+ a(d, {
184
189
  label: "See products",
185
190
  name: "Delivery",
186
191
  value: "pickup",
187
192
  class: "w-100 mn-r-small bg-white radius-small pd-small",
188
193
  radio: e.department.delivery
189
194
  }, null, 8, ["radio"]),
190
- a(p, {
195
+ a(d, {
191
196
  label: "Edit products",
192
197
  name: "Delivery",
193
198
  value: "courier",
194
199
  class: "w-100 mn-r-small bg-white radius-small pd-small",
195
200
  radio: e.department.delivery
196
201
  }, null, 8, ["radio"]),
197
- a(p, {
202
+ a(d, {
198
203
  label: "Delete orders",
199
204
  name: "Delivery",
200
205
  value: "post",
201
206
  class: "w-100 bg-white radius-small pd-small",
202
207
  radio: e.department.delivery
203
208
  }, null, 8, ["radio"]),
204
- _e,
205
- a(p, {
209
+ he,
210
+ a(d, {
206
211
  label: "See orders",
207
212
  name: "Delivery",
208
213
  value: "pickup",
209
214
  class: "w-100 mn-r-small bg-white radius-small pd-small",
210
215
  radio: e.department.delivery
211
216
  }, null, 8, ["radio"]),
212
- a(p, {
217
+ a(d, {
213
218
  label: "Confirm orders",
214
219
  name: "Delivery",
215
220
  value: "courier",
216
221
  class: "w-100 mn-r-small bg-white radius-small pd-small",
217
222
  radio: e.department.delivery
218
223
  }, null, 8, ["radio"]),
219
- a(p, {
224
+ a(d, {
220
225
  label: "Delete orders",
221
226
  name: "Delivery",
222
227
  value: "post",
@@ -226,57 +231,57 @@ const n = (h) => (R("data-v-e983b0b2"), h = h(), H(), h), X = { class: "for-tran
226
231
  ])
227
232
  ])
228
233
  ]),
229
- x(s).params.department ? (r(), m("section", ve, [
234
+ C(l).params.department ? (r(), m("section", _e, [
230
235
  a(E, {
231
- submit: A,
236
+ submit: F,
232
237
  callback: i.redirectToDash,
233
238
  class: "bg-grey"
234
239
  }, {
235
- default: c(() => [
236
- C("Delete Department")
240
+ default: p(() => [
241
+ S("Delete Department")
237
242
  ]),
238
243
  _: 1
239
244
  }, 8, ["callback"])
240
- ])) : y("", !0),
241
- t("div", ge, [
245
+ ])) : w("", !0),
246
+ t("div", be, [
242
247
  a(M, {
243
248
  title: "Добавить подотдел",
244
- onClosePopup: P,
249
+ onClosePopup: x,
245
250
  isPopupOpen: v.value
246
251
  }, {
247
- default: c(() => [
248
- a(z, {
252
+ default: p(() => [
253
+ a(I, {
249
254
  departments: e.department.subdepartments,
250
255
  department: g.value,
251
256
  maindepartment: e.department,
252
257
  alldepartments: e.departments,
253
- onCallback: P
258
+ onCallback: x
254
259
  }, null, 8, ["departments", "department", "maindepartment", "alldepartments"])
255
260
  ]),
256
261
  _: 1
257
262
  }, 8, ["isPopupOpen"]),
258
- t("div", ye, [
259
- we,
263
+ t("div", ve, [
264
+ ge,
260
265
  t("div", null, [
261
266
  t("a", {
262
267
  class: "t-main h5",
263
- onClick: o[3] || (o[3] = (l) => k())
268
+ onClick: n[3] || (n[3] = (s) => P())
264
269
  }, "+")
265
270
  ])
266
271
  ]),
267
- t("ul", De, [
268
- e.department.subdepartments.length < 1 ? (r(), m("li", ke, "В отделе еще нет подотделов")) : y("", !0),
269
- (r(!0), m(S, null, N(e.department.subdepartments, (l, u) => (r(), $(K, {
272
+ t("ul", ye, [
273
+ e.department.subdepartments.length < 1 ? (r(), m("li", we, "В отделе еще нет подотделов")) : w("", !0),
274
+ (r(!0), m(N, null, $(e.department.subdepartments, (s, u) => (r(), y(K, {
270
275
  key: u,
271
276
  class: "bg-grey o-hidden radius-small mn-b-thin",
272
- department: l,
273
- onClick: (F) => k(u)
277
+ department: s,
278
+ onClick: (R) => P(u)
274
279
  }, null, 8, ["department", "onClick"]))), 128))
275
280
  ])
276
281
  ])
277
282
  ]));
278
283
  }
279
- }, Xe = /* @__PURE__ */ G(Pe, [["__scopeId", "data-v-e983b0b2"]]);
284
+ }, Qe = /* @__PURE__ */ J(De, [["__scopeId", "data-v-7ec9277b"]]);
280
285
  export {
281
- Xe as default
286
+ Qe as default
282
287
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Loader/Loader.vue.cjs");require("vue-i18n");const _=require("../../../../components/Tab/Tab.vue2.cjs");require("../../../../components/Tooltip/Tooltip.vue2.cjs");const b=require("../sections/MembersAdd.vue.cjs");require("../../../mobile/components/Menu/Menu.vue2.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const v=require("../blocks/User.vue.cjs"),g=require("../../../auth/store/auth.cjs"),a=require("../../../auth/store/invites.cjs"),d=require("../../store/memberships.cjs"),h=require("../../store/organizations.cjs"),f=require("../../store/departments.cjs"),k={class:"pd-thin"},q=e.createElementVNode("section",{class:"mn-b-medium radius-medium pd-semi bg-grey"},[e.createElementVNode("h2",{class:"mn-b-regular"},"Members"),e.createElementVNode("p",{class:"t-transp p-big"},"Add new memberships to the group and configure access rights.")],-1),E={class:"mn-b-big radius-medium bg-white"},y={key:0,class:"cols-1 gap-thin"},B={key:1},N={class:"br-grey br-1px br-solid radius-small mn-b-thin flex-nowrap flex-v-center flex pd-medium"},V={class:"w-100 mn-r-small"},w={class:"t-transp"},x={class:"mn-l-medium flex-v-center flex"},M=["onClick"],C={__name:"Members",setup(S){const l=c.useRoute();c.useRouter();const o=e.ref(null),i=e.ref("members");e.onMounted(async()=>{o.value=(await h.actions.read({_id:l.params._id,user:g.state.user._id}))[0],await d.actions.read({target:l.params._id}),await a.actions.read(o.value._id)}),e.computed(()=>{const s=f.state.departments,n=s.flatMap(t=>t.subdepartments.map(r=>r._id));return s.filter(t=>!n.includes(t._id))});async function u(s){await a.actions.create(o.value._id,s)}async function m(s,n){a.state.invites.splice(s,1),await a.actions.delete(n._id)}return(s,n)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("div",k,[q,e.createVNode(b.default,{organization:o.value,onSendInvite:u},null,8,["organization"]),e.createVNode(_.default,{selected:i.value,"onUpdate:selected":n[0]||(n[0]=t=>i.value=t),class:"mn-b-medium bg-grey radius-small",tabs:[{name:"Members",value:"members"},{name:"Invites",value:"invites"}]},null,8,["selected"]),e.createElementVNode("section",E,[i.value==="members"?(e.openBlock(),e.createElementBlock("div",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.state.memberships,(t,r)=>(e.openBlock(),e.createBlock(v.default,{key:r,user:t,onClick:p=>s.$router.push(`/app/profile/${t._id}`),class:"bg-grey radius-small flex-nowrap flex pd-medium"},null,8,["user","onClick"]))),128))])):e.createCommentVNode("",!0),i.value==="invites"?(e.openBlock(),e.createElementBlock("div",B,[e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.state.invites,(t,r)=>(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("span",V,e.toDisplayString(t.invitedEmail)+" "+e.toDisplayString(t.invitedPhone),1),e.createElementVNode("span",w,e.toDisplayString(t.status),1),e.createElementVNode("div",x,[e.createElementVNode("button",{onClick:p=>m(r,t),class:"button-small button"},"×",8,M)])]))),256))])):e.createCommentVNode("",!0)])])]),_:1}))}};exports.default=C;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Loader/Loader.vue.cjs");require("vue-i18n");const _=require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Tooltip/Tooltip.vue2.cjs");const b=require("../sections/MembersAdd.vue.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const v=require("../blocks/User.vue.cjs"),g=require("../../../auth/store/auth.cjs"),a=require("../../../auth/store/invites.cjs"),d=require("../../store/memberships.cjs"),h=require("../../store/organizations.cjs"),f=require("../../store/departments.cjs"),k={class:"pd-thin"},q=e.createElementVNode("section",{class:"mn-b-medium radius-medium pd-semi bg-grey"},[e.createElementVNode("h2",{class:"mn-b-regular"},"Members"),e.createElementVNode("p",{class:"t-transp p-big"},"Add new memberships to the group and configure access rights.")],-1),E={class:"mn-b-big radius-medium bg-white"},y={key:0,class:"cols-1 gap-thin"},B={key:1},N={class:"br-grey br-1px br-solid radius-small mn-b-thin flex-nowrap flex-v-center flex pd-medium"},V={class:"w-100 mn-r-small"},w={class:"t-transp"},x={class:"mn-l-medium flex-v-center flex"},M=["onClick"],C={__name:"Members",setup(S){const l=c.useRoute();c.useRouter();const o=e.ref(null),i=e.ref("members");e.onMounted(async()=>{o.value=(await h.actions.read({_id:l.params._id,user:g.state.user._id}))[0],await d.actions.read({target:l.params._id}),await a.actions.read(o.value._id)}),e.computed(()=>{const s=f.state.departments,n=s.flatMap(t=>t.subdepartments.map(r=>r._id));return s.filter(t=>!n.includes(t._id))});async function u(s){await a.actions.create(o.value._id,s)}async function m(s,n){a.state.invites.splice(s,1),await a.actions.delete(n._id)}return(s,n)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("div",k,[q,e.createVNode(b.default,{organization:o.value,onSendInvite:u},null,8,["organization"]),e.createVNode(_.default,{selected:i.value,"onUpdate:selected":n[0]||(n[0]=t=>i.value=t),class:"mn-b-medium bg-grey radius-small",tabs:[{name:"Members",value:"members"},{name:"Invites",value:"invites"}]},null,8,["selected"]),e.createElementVNode("section",E,[i.value==="members"?(e.openBlock(),e.createElementBlock("div",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.state.memberships,(t,r)=>(e.openBlock(),e.createBlock(v.default,{key:r,user:t,onClick:p=>s.$router.push(`/app/profile/${t._id}`),class:"bg-grey radius-small flex-nowrap flex pd-medium"},null,8,["user","onClick"]))),128))])):e.createCommentVNode("",!0),i.value==="invites"?(e.openBlock(),e.createElementBlock("div",B,[e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.state.invites,(t,r)=>(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("span",V,e.toDisplayString(t.invitedEmail)+" "+e.toDisplayString(t.invitedPhone),1),e.createElementVNode("span",w,e.toDisplayString(t.status),1),e.createElementVNode("div",x,[e.createElementVNode("button",{onClick:p=>m(r,t),class:"button-small button"},"×",8,M)])]))),256))])):e.createCommentVNode("",!0)])])]),_:1}))}};exports.default=C;
@@ -2,10 +2,10 @@ import { ref as p, onMounted as $, computed as k, openBlock as a, createBlock as
2
2
  import { useRoute as M, useRouter as I } from "vue-router";
3
3
  import "../../../../components/Loader/Loader.vue.js";
4
4
  import "vue-i18n";
5
- import S from "../../../../components/Tab/Tab.vue2.js";
5
+ import S from "../../../../components/Tab/Tab.vue.js";
6
6
  import "../../../../components/Tooltip/Tooltip.vue2.js";
7
7
  import z from "../sections/MembersAdd.vue.js";
8
- import "../../../mobile/components/Menu/Menu.vue2.js";
8
+ import "../../../mobile/components/Menu/Menu.vue.js";
9
9
  import "../../../mobile/components/Menu/MenuItem.vue.js";
10
10
  import B from "../blocks/User.vue.js";
11
11
  import { state as E } from "../../../auth/store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const b=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Block/Block.vue.cjs"),_=require("../../../../components/Feed/Feed.vue.cjs"),g=require("../../../mobile/components/Menu/Menu.vue.cjs"),h=require("../../../mobile/components/Menu/MenuItem.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");const v=require("../blocks/User.vue.cjs"),y=require("../blocks/CardDepartment.vue.cjs"),C=require("../../../events/components/sections/Feed.vue.cjs"),N=require("../../../community/components/sections/Feed.vue.cjs"),q=require("../../../spots/components/blocks/CardSpot.vue.cjs"),w=require("../sections/DetailsTab.vue.cjs"),B=require("../../../products/components/pages/Products.vue.cjs"),s=require("../../../auth/store/auth.cjs"),a=require("../../store/organizations.cjs"),V=require("../../store/memberships.cjs"),x=require("../../store/departments.cjs"),z=require("../../../spots/store/spots.cjs");require("./Organization.vue2.cjs");const E={key:0,class:"pd-thin for-transition w-100"},$={class:"cols-2 pd-medium bg-grey radius-bg"},M={class:"pos-relative"},T={key:0},F={__name:"Organization",setup(O){const c=p.useRouter(),t=p.useRoute();let k=t.query.tab?t.query.tab:"products";const m=e.ref(null);e.onMounted(async()=>{m.value=await a.actions.read({_id:t.params._id,user:s.state.user._id}),await V.actions.read(t.params._id)});const o=e.ref(k);return t.query.tab=o.value,e.watch(o,i=>{c.replace({query:{...t.query,tab:i}})}),(i,n)=>{const d=e.resolveComponent("router-link");return m.value?(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(w.default,{organization:a.state.current,user:s.state.user,class:"mn-b-semi"},null,8,["organization","user"]),e.createVNode(g.default,{class:"mn-b-regular bg-grey"},{default:e.withCtx(()=>[e.createVNode(h.default,{onClick:n[0]||(n[0]=r=>e.unref(c).push({name:"Organization Members",params:{_id:e.unref(t).params._id}})),class:"cursor-pointer",theme:"black"},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(a.state.current.numberOfMembers)+" members ",1)]),_:1})]),_:1}),e.createElementVNode("div",$,[e.createVNode(f.default,{title:"Departments",actions:[{label:"+",function:()=>i.$router.push(`/organizations/${e.unref(t).params._id}/departments/create`)}]},{default:e.withCtx(()=>[e.createVNode(_.default,{states:{empty:{title:"No Departments Found",description:"Currently, there are no departments available."}},store:{read:r=>x.actions.read(e.unref(t).params._id),state:null},options:{user:s.state.user._id,sort:"numberOfMemberships",limit:10}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(u,l)=>(e.openBlock(),e.createBlock(y.default,{key:l,department:u,organization:e.unref(t).params._id,class:"radius-big bg-white pos-relative mn-b-thin"},null,8,["department","organization"]))),128))]),_:1},8,["states","store","options"])]),_:1},8,["actions"]),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.state.current.memberships,(r,u)=>(e.openBlock(),e.createBlock(v.default,{key:u,user:r,position:r.position,onClick:l=>i.$router.push(`/app/profile/${r.user._id}`),class:"bg-grey radius-small flex-nowrap flex pd-medium"},null,8,["user","position","onClick"]))),128))])]),e.createVNode(b.default,{selected:o.value,"onUpdate:selected":n[1]||(n[1]=r=>o.value=r),tabs:[{name:"Community",value:"community"},{name:"Menu",value:"products"},{name:"Events",value:"events"},{name:"Spots",value:"spots"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("div",M,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[o.value==="community"?(e.openBlock(),e.createBlock(N.default,{key:0,user:s.state.user._id,owner:e.unref(t).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[o.value==="events"?(e.openBlock(),e.createBlock(C.default,{key:0,user:s.state.user._id,owner:e.unref(t).params._id,sortOrder:"desc",sortParam:"date.start"},null,8,["user","owner","sortParam"])):e.createCommentVNode("",!0)]),_:1}),o.value==="products"&&s.state.user._id===a.state.current.owner?(e.openBlock(),e.createBlock(f.default,{key:0,class:"flex-nowrap gap-thin mn-b-small flex"},{default:e.withCtx(()=>[e.createVNode(d,{class:"bg-black t-white uppercase t-semi pd-thin radius-extra",to:{name:"ProductAdd",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Add Product ")]),_:1},8,["to"]),e.createVNode(d,{class:"uppercase t-semi pd-thin radius-extra",to:{name:"Leftovers",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Change Invetory ")]),_:1},8,["to"]),e.createVNode(d,{class:"d-block mn-l-auto uppercase t-semi bg-white pd-thin radius-extra",to:{name:"Backoffice",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Go to Backoffice ")]),_:1},8,["to"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[o.value==="products"?(e.openBlock(),e.createBlock(B.default,{key:0,organization:a.state.current},null,8,["organization"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[o.value==="spots"?(e.openBlock(),e.createElementBlock("div",T,[e.createVNode(_.default,{states:{empty:{title:"No Spots Found",description:"Currently, there are no spots available."}},store:{read:r=>z.actions.read(e.unref(t).params._id),state:a.state},options:{user:s.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(u,l)=>(e.openBlock(),e.createBlock(q.default,{key:l,spot:u,organization:a.state.current,class:"radius-big bg-grey mn-b-thin"},null,8,["spot","organization"]))),128))]),_:1},8,["states","store","options"]),s.state.user._id===a.state.current.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[2]||(n[2]=r=>i.$router.push(`/spots/${a.state.current._id}/spots/create`)),class:"mn-b-thin button w-100"}," Add spot ")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})])])):e.createCommentVNode("",!0)}}};exports.default=F;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const k=require("../../../../components/Tab/Tab.vue.cjs"),p=require("../../../../components/Block/Block.vue.cjs"),f=require("../../../../components/Feed/Feed.vue.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/User.vue2.cjs");const h=require("../blocks/CardDepartment.vue.cjs"),v=require("../../../events/components/sections/Feed.vue.cjs"),g=require("../../../community/components/sections/Feed.vue.cjs"),q=require("../../../spots/components/blocks/CardSpot.vue.cjs"),w=require("../sections/DetailsTab.vue.cjs"),C=require("../../../products/components/pages/Products.vue.cjs"),s=require("../../../auth/store/auth.cjs"),a=require("../../store/organizations.cjs"),y=require("../../store/memberships.cjs"),B=require("../../store/departments.cjs"),N=require("../../../spots/store/spots.cjs");require("./Organization.vue2.cjs");const V={key:0,class:"pd-thin for-transition w-100"},x={class:"pos-relative"},z={key:0},T={__name:"Organization",setup($){const _=m.useRouter(),t=m.useRoute();let b=t.query.tab?t.query.tab:"products";const c=e.ref(null);e.onMounted(async()=>{c.value=await a.actions.read({_id:t.params._id,user:s.state.user._id}),await y.actions.read(t.params._id)});const r=e.ref(b);return t.query.tab=r.value,e.watch(r,i=>{_.replace({query:null})}),(i,n)=>{const u=e.resolveComponent("router-link");return c.value?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(w.default,{organization:a.state.current,user:s.state.user,class:"mn-b-semi"},null,8,["organization","user"]),e.createVNode(p.default,{title:`${a.state.current.numberOfMembers} members`,actions:[{label:">",function:()=>i.$router.push(`/organizations/${e.unref(t).params._id}/departments/create`)}],class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(f.default,{states:{empty:{title:"No Departments Found",description:"Currently, there are no departments available."}},store:{read:o=>B.actions.read(e.unref(t).params._id),state:null},options:{user:s.state.user._id,sort:"numberOfMemberships",limit:10}},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(l,d)=>(e.openBlock(),e.createBlock(h.default,{key:d,department:l,organization:e.unref(t).params._id,class:"radius-big bg-white pos-relative mn-b-thin"},null,8,["department","organization"]))),128))]),_:1},8,["states","store","options"])]),_:1},8,["title","actions"]),e.createVNode(k.default,{selected:r.value,"onUpdate:selected":n[0]||(n[0]=o=>r.value=o),tabs:[{name:"Community",value:"community"},{name:"Menu",value:"products"},{name:"Events",value:"events"},{name:"Spots",value:"spots"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("div",x,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="community"?(e.openBlock(),e.createBlock(g.default,{key:0,user:s.state.user._id,owner:e.unref(t).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="events"?(e.openBlock(),e.createBlock(v.default,{key:0,user:s.state.user._id,owner:e.unref(t).params._id,sortOrder:"desc",sortParam:"date.start"},null,8,["user","owner","sortParam"])):e.createCommentVNode("",!0)]),_:1}),r.value==="products"&&s.state.user._id===a.state.current.owner?(e.openBlock(),e.createBlock(p.default,{key:0,class:"flex-nowrap gap-thin mn-b-small flex"},{default:e.withCtx(()=>[e.createVNode(u,{class:"bg-black t-white uppercase t-semi pd-thin radius-extra",to:{name:"ProductAdd",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Add Product ")]),_:1},8,["to"]),e.createVNode(u,{class:"uppercase t-semi pd-thin radius-extra",to:{name:"Leftovers",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Change Invetory ")]),_:1},8,["to"]),e.createVNode(u,{class:"d-block mn-l-auto uppercase t-semi bg-white pd-thin radius-extra",to:{name:"Backoffice",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Go to Backoffice ")]),_:1},8,["to"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="products"?(e.openBlock(),e.createBlock(C.default,{key:0,organization:a.state.current},null,8,["organization"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="spots"?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(f.default,{states:{empty:{title:"No Spots Found",description:"Currently, there are no spots available."}},store:{read:o=>N.actions.read(e.unref(t).params._id),state:a.state},options:{user:s.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(l,d)=>(e.openBlock(),e.createBlock(q.default,{key:d,spot:l,organization:a.state.current,class:"radius-big bg-grey mn-b-thin"},null,8,["spot","organization"]))),128))]),_:1},8,["states","store","options"]),s.state.user._id===a.state.current.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[1]||(n[1]=o=>i.$router.push(`/spots/${a.state.current._id}/spots/create`)),class:"mn-b-thin button w-100"}," Add spot ")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})])])):e.createCommentVNode("",!0)}}};exports.default=T;