@ozdao/prometheus-framework 0.2.51 → 0.2.52

Sign up to get free protection for your applications and to get access to all the features.
Files changed (183) 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 +2 -2
  7. package/dist/organizations.server.mjs +2 -2
  8. package/dist/products.server.js +20 -7
  9. package/dist/products.server.mjs +20 -7
  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 -48
  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 +117 -146
  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/NavigationBar/NavigationBar.vue +27 -7
  168. package/src/modules/orders/components/partials/ShopCart.vue +4 -1
  169. package/src/modules/organizations/components/blocks/CardDepartment.vue +34 -66
  170. package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +50 -13
  171. package/src/modules/organizations/components/blocks/User.vue +18 -9
  172. package/src/modules/organizations/components/pages/Department.vue +19 -3
  173. package/src/modules/organizations/components/pages/DepartmentEdit.vue +14 -10
  174. package/src/modules/organizations/components/pages/Organization.vue +38 -71
  175. package/src/modules/organizations/components/sections/Feed.vue +1 -1
  176. package/src/modules/organizations/controllers/memberships.controller.js +2 -2
  177. package/src/modules/organizations/controllers/organizations.controller.js +0 -1
  178. package/src/modules/products/components/pages/EditLeftover.vue +6 -4
  179. package/src/modules/products/components/pages/Products.vue +58 -38
  180. package/src/modules/products/components/sections/FilterProducts.vue +5 -5
  181. package/src/modules/products/controllers/leftovers.controller.js +12 -5
  182. package/src/modules/products/controllers/products.controller.js +18 -0
  183. package/src/modules/products/store/products.js +4 -0
@@ -1,4 +1,4 @@
1
- import { openBlock as t, createElementBlock as n, createElementVNode as i, createBlock as c, toDisplayString as o, createCommentVNode as r, createVNode as d, Fragment as h, renderList as g, withModifiers as f } from "vue";
1
+ import { openBlock as t, createElementBlock as n, createElementVNode as i, createBlock as c, toDisplayString as o, createCommentVNode as s, createVNode as d, Fragment as h, renderList as g, withModifiers as f } from "vue";
2
2
  import { useRouter as w } from "vue-router";
3
3
  import b from "../../../orders/components/blocks/CardOrderItem.vue.js";
4
4
  import z from "../../../../components/Chips/Chips.vue.js";
@@ -7,16 +7,16 @@ import y from "../../../icons/entities/IconPrice.vue.js";
7
7
  import x from "../../../icons/entities/IconShopcart.vue.js";
8
8
  import v from "../../../icons/entities/IconTime.vue.js";
9
9
  import k from "../elements/ButtonToggleMembership.vue.js";
10
- const B = { class: "flex pos-relative" }, M = ["src"], S = { class: "pos-relative w-100 flex-h-center flex flex-column flex-child-1 flex-child mn-l-thin w-100" }, C = { class: "h4 t-truncate" }, O = {
10
+ const B = { class: "flex pos-relative" }, M = ["src"], C = { class: "pos-relative w-100 flex-h-center flex flex-column flex-child-1 flex-child mn-l-thin w-100" }, O = { class: "h4 t-truncate" }, P = {
11
11
  key: 1,
12
12
  class: "flex-center gap-thin pd-r-thin pd-l-thin flex-nowrap flex mn-t-thin bg-white radius-extra w-max"
13
- }, P = { class: "mn-t-thin mn-b-thin" }, F = {
13
+ }, S = { class: "mn-t-thin mn-b-thin" }, $ = {
14
14
  key: 0,
15
15
  class: "mn-b-small mn-t-small w-100 flex-nowrap flex flex-v-center pd-small bg-white radius-medium"
16
- }, $ = { class: "mn-r-thin" }, E = {
16
+ }, F = { class: "mn-r-thin" }, E = {
17
17
  key: 0,
18
18
  class: "t-transp mn-r-thin"
19
- }, I = { class: "mn-r-thin" }, R = { class: "mn-r-thin" }, V = { class: "mn-r-thin" }, N = {
19
+ }, R = { class: "mn-r-thin" }, V = { class: "mn-r-thin" }, I = { class: "mn-r-thin" }, N = {
20
20
  key: 1,
21
21
  class: "w-100 o-scroll"
22
22
  }, U = { class: "w-max flex-nowrap flex gap-thin" }, L = /* @__PURE__ */ i("button", { class: "pd-thin w-15r radius-medium bg-main button" }, " View menu ", -1), X = {
@@ -49,30 +49,30 @@ const B = { class: "flex pos-relative" }, M = ["src"], S = { class: "pos-relativ
49
49
  },
50
50
  emits: ["updateMembership"],
51
51
  setup(e, { emit: T }) {
52
- return w(), (s, l) => {
52
+ return w(), (r, l) => {
53
53
  var m, u;
54
54
  return t(), n("div", {
55
55
  class: "o-hidden pos-relative cursor-pointer bg-grey pd-small",
56
- onClick: l[1] || (l[1] = (a) => s.$router.push({ name: "Organization", params: { _id: e.organization._id } }))
56
+ onClick: l[1] || (l[1] = (a) => r.$router.push({ name: "Organization", params: { _id: e.organization._id } }))
57
57
  }, [
58
58
  i("div", B, [
59
59
  e.organization.profile.photo && e.organization.profile.photo.length > 0 ? (t(), n("img", {
60
60
  key: 0,
61
- src: (s.FILE_SERVER_URL || "") + e.organization.profile.photo,
61
+ src: (r.FILE_SERVER_URL || "") + e.organization.profile.photo,
62
62
  class: "h-4r w-4r radius-extra bg-white"
63
63
  }, null, 8, M)) : (t(), c(p, {
64
64
  key: 1,
65
65
  class: "h-4r w-4r"
66
66
  })),
67
- i("div", S, [
68
- i("p", C, o(e.organization.profile.name), 1),
67
+ i("div", C, [
68
+ i("p", O, o(e.organization.profile.name), 1),
69
69
  e.showTags && ((m = e.organization.profile.tags) == null ? void 0 : m.length) > 0 ? (t(), c(z, {
70
70
  key: 0,
71
71
  chips: e.organization.profile.tags.slice(0, 3),
72
72
  class: "pos-relative p-small"
73
- }, null, 8, ["chips"])) : r("", !0),
74
- e.showFollowers ? (t(), n("div", O, [
75
- i("p", P, o(e.organization.numberOfSubscribers) + " followers", 1),
73
+ }, null, 8, ["chips"])) : s("", !0),
74
+ e.showFollowers ? (t(), n("div", P, [
75
+ i("p", S, o(e.organization.numberOfSubscribers) + " followers", 1),
76
76
  (u = e.user) != null && u._id && e.organization.owner !== e.user._id ? (t(), c(k, {
77
77
  key: 0,
78
78
  user: e.user._id,
@@ -81,26 +81,26 @@ const B = { class: "flex pos-relative" }, M = ["src"], S = { class: "pos-relativ
81
81
  target: e.organization._id,
82
82
  status: e.organization.isSubscriber,
83
83
  text: { create: "+", remove: "-" },
84
- onUpdateMembership: l[0] || (l[0] = (a) => s.handleMembershipUpdate(a, "isSubscriber", "numberOfSubscribers")),
84
+ onUpdateMembership: l[0] || (l[0] = (a) => r.handleMembershipUpdate(a, "isSubscriber", "numberOfSubscribers")),
85
85
  class: "i-semi"
86
- }, null, 8, ["user", "target", "status"])) : r("", !0)
87
- ])) : r("", !0)
86
+ }, null, 8, ["user", "target", "status"])) : s("", !0)
87
+ ])) : s("", !0)
88
88
  ])
89
89
  ]),
90
- e.showProducts ? (t(), n("div", F, [
90
+ e.showProducts ? (t(), n("div", $, [
91
91
  d(v, { class: "i-medium mn-r-micro" }),
92
- i("span", $, o(e.organization.distance ? Math.ceil((5 + 5 + 3 * e.organization.distance) / 5) * 5 + "-" + Math.ceil((15 + 5 + 3 * e.organization.distance) / 5) * 5 + " MIN" : "Unavailable"), 1),
93
- e.organization.distance ? (t(), n("span", E, "|")) : r("", !0),
94
- i("span", I, o(e.organization.distance ? e.organization.distance.toFixed(1) + " KM" : ""), 1),
92
+ i("span", F, o(e.organization.distance ? Math.ceil((5 + 5 + 3 * e.organization.distance) / 5) * 5 + "-" + Math.ceil((15 + 5 + 3 * e.organization.distance) / 5) * 5 + " MIN" : "Unavailable"), 1),
93
+ e.organization.distance ? (t(), n("span", E, "|")) : s("", !0),
94
+ i("span", R, o(e.organization.distance ? e.organization.distance.toFixed(1) + " KM" : ""), 1),
95
95
  d(y, { class: "i-medium mn-r-micro" }),
96
- i("span", R, o(s.returnCurrency()) + "500 ", 1),
96
+ i("span", V, o(r.returnCurrency()) + "500 ", 1),
97
97
  d(x, { class: "i-medium mn-r-micro" }),
98
- i("span", V, o(e.organization.products.length) + " products", 1)
99
- ])) : r("", !0),
98
+ i("span", I, o(e.organization.products.length) + " products", 1)
99
+ ])) : s("", !0),
100
100
  e.showProducts && e.organization.products.length > 0 ? (t(), n("div", N, [
101
101
  i("div", U, [
102
102
  (t(!0), n(h, null, g(e.organization.products.slice(0, 10), (a) => (t(), c(b, {
103
- onClick: f((j) => s.$router.push({ name: "Product Organization", params: { _id: e.organization._id, product: a._id } }), ["stop"]),
103
+ onClick: f((j) => r.$router.push({ name: "Product Organization", params: { _id: e.organization._id, product: a._id } }), ["stop"]),
104
104
  key: a._id,
105
105
  editable: !1,
106
106
  product: a,
@@ -108,7 +108,7 @@ const B = { class: "flex pos-relative" }, M = ["src"], S = { class: "pos-relativ
108
108
  }, null, 8, ["onClick", "product"]))), 128)),
109
109
  L
110
110
  ])
111
- ])) : r("", !0)
111
+ ])) : s("", !0)
112
112
  ]);
113
113
  };
114
114
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),d=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");const b=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("./DepartmentMemberModify.vue2.cjs");const p={class:"br-grey radius-small mn-small"},v={key:1,class:"pd-small br-grey br-1px br-solid"},f=["disabled"],y={__name:"DepartmentMemberModify",props:{isPopupOpen:Boolean,member:Number,members:Array,users:Array},emits:["callback","remove"],setup(s,{emit:i}){const t=s,o=i,l=e.ref({user:"",position:""});t.member!==null&&(l.value=t.members[t.member]),e.ref(null);async function n(){t.member!==null?(t.members[t.member]=l.value,o("callback")):(t.members.push(l.value),o("callback"))}async function u(){t.members.splice(t.member,1),o("callback")}return(m,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",p,[e.createTextVNode(e.toDisplayString(l.value.id)+" ",1),t.member===null?(e.openBlock(),e.createBlock(c.default,{key:0,modelValue:l.value.user,"onUpdate:modelValue":r[0]||(r[0]=a=>l.value.user=a),options:s.users,multiple:!1,taggable:!1,placeholder:"Type to search or add type of organization",class:"mn-b-semi bg-grey pd-medium radius-small"},null,8,["modelValue","options"])):(e.openBlock(),e.createElementBlock("div",v,e.toDisplayString(l.value.user.name?l.value.user.name:"Безымянный")+", "+e.toDisplayString(l.value.user.id),1)),e.createVNode(d.default,{field:l.value.position,"onUpdate:field":r[1]||(r[1]=a=>l.value.position=a),label:"Должность",placeholder:"Название должности",class:"bg-white",validation:m.organizationName},null,8,["field","validation"])]),e.createElementVNode("button",{disabled:!l.value.user._id||!l.value.position,onClick:n,class:"w-100 button bg-blue t-white"},e.toDisplayString(t.member!==null?"Редактировать участника":"Добавить участника"),9,f),t.member!==null?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:u,class:"w-100 button bg-red t-white"}," Удалить участника ")):e.createCommentVNode("",!0)]))}},g=b.default(y,[["__scopeId","data-v-d08f2f00"]]);exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),f=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue.cjs");const v=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),h=require("../../../../components/Feed/Feed.vue.cjs"),k=require("./User.vue.cjs"),g=require("../../store/memberships.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("./DepartmentMemberModify.vue2.cjs");const y=o=>(e.pushScopeId("data-v-7a0830c1"),o=o(),e.popScopeId(),o),_={class:"br-grey radius-small mn-small"},V=y(()=>e.createElementVNode("h3",{class:"mn-b-semi"},"Add to deparment",-1)),B={class:"bg-grey mn-b-thin h-min-10r h-max-10r o-scroll pd-medium radius-big"},N=["disabled"],q={__name:"DepartmentMemberModify",props:{isPopupOpen:Boolean,member:Number,members:Array,users:Array},emits:["callback","remove"],setup(o,{emit:m}){const l=o,i=m,s=e.ref(null),n=e.ref(null);l.member!==null&&(s.value=l.members[l.member]),e.ref(null);async function d(){l.member!==null?(l.members[l.member]=s,l.members[l.member].role=n.value,i("callback")):(l.members.push({...s.value,role:n.value}),i("callback"))}async function c(){l.members.splice(l.member,1),i("callback")}return(u,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",_,[V,e.createElementVNode("div",B,[e.createVNode(h.default,{states:{empty:{title:"No Members Found",description:"Currently, there are no members available."}},store:{read:r=>g.actions.read(r),state:null},options:{target:u.$route.params._id}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(t,p)=>(e.openBlock(),e.createBlock(k.default,{key:p,photo:t.user.profile.photo,name:t.user.profile.name||t.user.phone||t.user.email||t.user._id,user:t,position:t.position,onClick:a[0]||(a[0]=S=>u.$router.push(`/app/profile/${u.user._id}`)),class:"mn-b-thin"},null,8,["photo","name","user","position"]))),128))]),_:1},8,["states","store","options"])]),l.member===null?(e.openBlock(),e.createBlock(b.default,{key:0,modelValue:s.value,"onUpdate:modelValue":a[1]||(a[1]=r=>s.value=r),options:o.users,multiple:!1,taggable:!1,placeholder:"Type to search or add type of organization",class:"mn-b-semi bg-grey pd-medium radius-small"},null,8,["modelValue","options"])):e.createCommentVNode("",!0),e.createVNode(f.default,{field:n.value,"onUpdate:field":a[2]||(a[2]=r=>n.value=r),label:"Должность",placeholder:"Название должности",class:"bg-white",validation:u.organizationName},null,8,["field","validation"])]),e.createElementVNode("button",{disabled:!s.value||!n.value,onClick:d,class:"w-100 button bg-blue t-white"},e.toDisplayString(l.member!==null?"Редактировать участника":"Добавить участника"),9,N),l.member!==null?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:c,class:"w-100 button bg-red t-white"}," Удалить участника ")):e.createCommentVNode("",!0)]))}},M=v.default(q,[["__scopeId","data-v-7a0830c1"]]);exports.default=M;
@@ -1,14 +1,14 @@
1
- import { ref as n, openBlock as r, createElementBlock as s, createElementVNode as u, createTextVNode as f, toDisplayString as t, createBlock as v, createVNode as y, createCommentVNode as g } from "vue";
2
- import k from "../../../../components/SelectMulti/SelectMulti.vue.js";
3
- import _ from "../../../../components/Field/Field.vue2.js";
1
+ import { ref as p, openBlock as m, createElementBlock as d, createElementVNode as i, createVNode as b, withCtx as k, Fragment as _, renderList as w, createBlock as c, createCommentVNode as f, toDisplayString as C, pushScopeId as I, popScopeId as M } from "vue";
2
+ import N from "../../../../components/SelectMulti/SelectMulti.vue.js";
3
+ import S from "../../../../components/Field/Field.vue.js";
4
4
  import "../../../../components/Select/Select.vue.js";
5
- import h from "../../../../../../_virtual/_plugin-vue_export-helper.js";
5
+ import V from "../../../../../../_virtual/_plugin-vue_export-helper.js";
6
+ import $ from "../../../../components/Feed/Feed.vue.js";
7
+ import B from "./User.vue.js";
8
+ import { actions as D } from "../../store/memberships.js";
6
9
  import "../../../middlewares/client/inputs.validation.js";
7
10
  import "./DepartmentMemberModify.vue2.js";
8
- const V = { class: "br-grey radius-small mn-small" }, N = {
9
- key: 1,
10
- class: "pd-small br-grey br-1px br-solid"
11
- }, w = ["disabled"], M = {
11
+ const F = (t) => (I("data-v-7a0830c1"), t = t(), M(), t), A = { class: "br-grey radius-small mn-small" }, U = /* @__PURE__ */ F(() => /* @__PURE__ */ i("h3", { class: "mn-b-semi" }, "Add to deparment", -1)), z = { class: "bg-grey mn-b-thin h-min-10r h-max-10r o-scroll pd-medium radius-big" }, E = ["disabled"], x = {
12
12
  __name: "DepartmentMemberModify",
13
13
  props: {
14
14
  isPopupOpen: Boolean,
@@ -17,53 +17,82 @@ const V = { class: "br-grey radius-small mn-small" }, N = {
17
17
  users: Array
18
18
  },
19
19
  emits: ["callback", "remove"],
20
- setup(i, { emit: d }) {
21
- const l = i, a = d, e = n({
22
- user: "",
23
- position: ""
24
- });
25
- l.member !== null && (e.value = l.members[l.member]), n(null);
26
- async function b() {
27
- l.member !== null ? (l.members[l.member] = e.value, a("callback")) : (l.members.push(e.value), a("callback"));
20
+ setup(t, { emit: v }) {
21
+ const e = t, u = v, l = p(null), a = p(null);
22
+ e.member !== null && (l.value = e.members[e.member]), p(null);
23
+ async function h() {
24
+ e.member !== null ? (e.members[e.member] = l, e.members[e.member].role = a.value, u("callback")) : (e.members.push({ ...l.value, role: a.value }), u("callback"));
28
25
  }
29
- async function c() {
30
- l.members.splice(l.member, 1), a("callback");
26
+ async function y() {
27
+ e.members.splice(e.member, 1), u("callback");
31
28
  }
32
- return (p, o) => (r(), s("div", null, [
33
- u("div", V, [
34
- f(t(e.value.id) + " ", 1),
35
- l.member === null ? (r(), v(k, {
29
+ return (n, s) => (m(), d("div", null, [
30
+ i("div", A, [
31
+ U,
32
+ i("div", z, [
33
+ b($, {
34
+ states: {
35
+ empty: {
36
+ title: "No Members Found",
37
+ description: "Currently, there are no members available."
38
+ }
39
+ },
40
+ store: {
41
+ read: (o) => D.read(o),
42
+ state: null
43
+ },
44
+ options: {
45
+ target: n.$route.params._id
46
+ }
47
+ }, {
48
+ default: k(({
49
+ items: o
50
+ }) => [
51
+ (m(!0), d(_, null, w(o, (r, g) => (m(), c(B, {
52
+ key: g,
53
+ photo: r.user.profile.photo,
54
+ name: r.user.profile.name || r.user.phone || r.user.email || r.user._id,
55
+ user: r,
56
+ position: r.position,
57
+ onClick: s[0] || (s[0] = (L) => n.$router.push(`/app/profile/${n.user._id}`)),
58
+ class: "mn-b-thin"
59
+ }, null, 8, ["photo", "name", "user", "position"]))), 128))
60
+ ]),
61
+ _: 1
62
+ }, 8, ["states", "store", "options"])
63
+ ]),
64
+ e.member === null ? (m(), c(N, {
36
65
  key: 0,
37
- modelValue: e.value.user,
38
- "onUpdate:modelValue": o[0] || (o[0] = (m) => e.value.user = m),
39
- options: i.users,
66
+ modelValue: l.value,
67
+ "onUpdate:modelValue": s[1] || (s[1] = (o) => l.value = o),
68
+ options: t.users,
40
69
  multiple: !1,
41
70
  taggable: !1,
42
71
  placeholder: "Type to search or add type of organization",
43
72
  class: "mn-b-semi bg-grey pd-medium radius-small"
44
- }, null, 8, ["modelValue", "options"])) : (r(), s("div", N, t(e.value.user.name ? e.value.user.name : "Безымянный") + ", " + t(e.value.user.id), 1)),
45
- y(_, {
46
- field: e.value.position,
47
- "onUpdate:field": o[1] || (o[1] = (m) => e.value.position = m),
73
+ }, null, 8, ["modelValue", "options"])) : f("", !0),
74
+ b(S, {
75
+ field: a.value,
76
+ "onUpdate:field": s[2] || (s[2] = (o) => a.value = o),
48
77
  label: "Должность",
49
78
  placeholder: "Название должности",
50
79
  class: "bg-white",
51
- validation: p.organizationName
80
+ validation: n.organizationName
52
81
  }, null, 8, ["field", "validation"])
53
82
  ]),
54
- u("button", {
55
- disabled: !e.value.user._id || !e.value.position,
56
- onClick: b,
83
+ i("button", {
84
+ disabled: !l.value || !a.value,
85
+ onClick: h,
57
86
  class: "w-100 button bg-blue t-white"
58
- }, t(l.member !== null ? "Редактировать участника" : "Добавить участника"), 9, w),
59
- l.member !== null ? (r(), s("button", {
87
+ }, C(e.member !== null ? "Редактировать участника" : "Добавить участника"), 9, E),
88
+ e.member !== null ? (m(), d("button", {
60
89
  key: 0,
61
- onClick: c,
90
+ onClick: y,
62
91
  class: "w-100 button bg-red t-white"
63
- }, " Удалить участника ")) : g("", !0)
92
+ }, " Удалить участника ")) : f("", !0)
64
93
  ]));
65
94
  }
66
- }, A = /* @__PURE__ */ h(M, [["__scopeId", "data-v-d08f2f00"]]);
95
+ }, R = /* @__PURE__ */ V(x, [["__scopeId", "data-v-7a0830c1"]]);
67
96
  export {
68
- A as default
97
+ R as default
69
98
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs");require("./User.vue2.cjs");const c=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),d=t=>(e.pushScopeId("data-v-58f07aab"),t=t(),e.popScopeId(),t),m={class:""},p=["src"],h={class:"mn-r-auto"},f={class:"mn-r-small"},k={class:"t-transp"},v=d(()=>e.createElementVNode("br",null,null,-1)),b={class:"mn-r-auto t-transp"},y={key:2,class:"mn-l-medium flex-v-center flex"},E={__name:"User",props:{user:{type:Object,required:!0}},setup(t){return(r,o)=>{var s,n,i,l;return e.openBlock(),e.createElementBlock("div",m,[((s=t.user.profile)==null?void 0:s.photo.length)>0&&r.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(r.FILE_SERVER_URL||"")+r.member.profile.photo,class:"radius-medium object-fit-cover mn-r-thin i-thin",onClick:o[0]||(o[0]=e.withModifiers(a=>r.$router.push({name:t.user.type==="user"?"User Profile":"Organization",params:{_id:t.user._id}}),["stop"]))},null,8,p)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.user)+"123 ",1),!((n=t.user.profile)!=null&&n.photo)&&r.type!=="short"?(e.openBlock(),e.createBlock(u.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:o[1]||(o[1]=e.withModifiers(a=>r.$router.push({name:"User Profile",params:{_id:t.user._id}}),["stop"]))})):e.createCommentVNode("",!0),e.createElementVNode("div",h,[e.createElementVNode("span",f,e.toDisplayString((i=t.user.profile)==null?void 0:i.email)+" "+e.toDisplayString((l=t.user.profile)==null?void 0:l.phone),1),e.createElementVNode("span",k,e.toDisplayString(t.user.role),1),v,e.createElementVNode("span",b,"Member since (date) "+e.toDisplayString(t.user.createdAt),1)]),t.user.position!=="Основатель"?(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("button",{onClick:o[2]||(o[2]=a=>r.removeMember(t.user)),class:"button-small button"},"×")])):e.createCommentVNode("",!0)])}}},V=c.default(E,[["__scopeId","data-v-58f07aab"]]);exports.default=V;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs");require("./User.vue2.cjs");const u=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),s={class:"flex-v-center flex-nowrap flex"},l=["src"],a={__name:"User",props:{user:{type:Object,required:!0},photo:{type:String,default:null},name:{type:String,default:"Anonymous"}},setup(t){return(o,r)=>(e.openBlock(),e.createElementBlock("div",s,[t.photo?(e.openBlock(),e.createElementBlock("img",{key:0,src:(o.FILE_SERVER_URL||"")+t.photo,class:"radius-medium object-fit-cover mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(n=>o.$router.push({name:t.user.type==="user"?"User Profile":"Organization",params:{_id:t.user._id}}),["stop"]))},null,8,l)):e.createCommentVNode("",!0),t.photo?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(i.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(n=>o.$router.push({name:"User Profile",params:{_id:t.user._id}}),["stop"]))})),e.createElementVNode("p",null,e.toDisplayString(t.name),1)]))}},d=u.default(a,[["__scopeId","data-v-84de60e5"]]);exports.default=d;
@@ -1,61 +1,51 @@
1
- import { openBlock as i, createElementBlock as n, withModifiers as p, createCommentVNode as a, createTextVNode as h, toDisplayString as o, createBlock as f, createElementVNode as r, pushScopeId as b, popScopeId as v } from "vue";
2
- import k from "../../../icons/placeholders/PlaceholderUserpic.vue.js";
1
+ import { openBlock as o, createElementBlock as i, withModifiers as n, createCommentVNode as s, createBlock as l, createElementVNode as m, toDisplayString as u } from "vue";
2
+ import d from "../../../icons/placeholders/PlaceholderUserpic.vue.js";
3
3
  import "./User.vue2.js";
4
- import y from "../../../../../../_virtual/_plugin-vue_export-helper.js";
5
- const U = (e) => (b("data-v-58f07aab"), e = e(), v(), e), E = { class: "" }, I = ["src"], S = { class: "mn-r-auto" }, $ = { class: "mn-r-small" }, g = { class: "t-transp" }, C = /* @__PURE__ */ U(() => /* @__PURE__ */ r("br", null, null, -1)), V = { class: "mn-r-auto t-transp" }, B = {
6
- key: 2,
7
- class: "mn-l-medium flex-v-center flex"
8
- }, M = {
4
+ import c from "../../../../../../_virtual/_plugin-vue_export-helper.js";
5
+ const p = { class: "flex-v-center flex-nowrap flex" }, f = ["src"], h = {
9
6
  __name: "User",
10
7
  props: {
11
8
  user: {
12
9
  type: Object,
13
10
  required: !0
11
+ },
12
+ photo: {
13
+ type: String,
14
+ default: null
15
+ },
16
+ name: {
17
+ type: String,
18
+ default: "Anonymous"
14
19
  }
15
20
  // Define other props here
16
21
  },
17
22
  setup(e) {
18
- return (t, s) => {
19
- var l, u, m, d;
20
- return i(), n("div", E, [
21
- ((l = e.user.profile) == null ? void 0 : l.photo.length) > 0 && t.type !== "short" ? (i(), n("img", {
22
- key: 0,
23
- src: (t.FILE_SERVER_URL || "") + t.member.profile.photo,
24
- class: "radius-medium object-fit-cover mn-r-thin i-thin",
25
- onClick: s[0] || (s[0] = p((c) => t.$router.push({
26
- name: e.user.type === "user" ? "User Profile" : "Organization",
27
- params: {
28
- _id: e.user._id
29
- }
30
- }), ["stop"]))
31
- }, null, 8, I)) : a("", !0),
32
- h(" " + o(e.user) + "123 ", 1),
33
- !((u = e.user.profile) != null && u.photo) && t.type !== "short" ? (i(), f(k, {
34
- key: 1,
35
- class: "radius-medium mn-r-thin i-thin",
36
- onClick: s[1] || (s[1] = p((c) => t.$router.push({
37
- name: "User Profile",
38
- params: {
39
- _id: e.user._id
40
- }
41
- }), ["stop"]))
42
- })) : a("", !0),
43
- r("div", S, [
44
- r("span", $, o((m = e.user.profile) == null ? void 0 : m.email) + " " + o((d = e.user.profile) == null ? void 0 : d.phone), 1),
45
- r("span", g, o(e.user.role), 1),
46
- C,
47
- r("span", V, "Member since (date) " + o(e.user.createdAt), 1)
48
- ]),
49
- e.user.position !== "Основатель" ? (i(), n("div", B, [
50
- r("button", {
51
- onClick: s[2] || (s[2] = (c) => t.removeMember(e.user)),
52
- class: "button-small button"
53
- }, "×")
54
- ])) : a("", !0)
55
- ]);
56
- };
23
+ return (r, t) => (o(), i("div", p, [
24
+ e.photo ? (o(), i("img", {
25
+ key: 0,
26
+ src: (r.FILE_SERVER_URL || "") + e.photo,
27
+ class: "radius-medium object-fit-cover mn-r-thin i-thin",
28
+ onClick: t[0] || (t[0] = n((a) => r.$router.push({
29
+ name: e.user.type === "user" ? "User Profile" : "Organization",
30
+ params: {
31
+ _id: e.user._id
32
+ }
33
+ }), ["stop"]))
34
+ }, null, 8, f)) : s("", !0),
35
+ e.photo ? s("", !0) : (o(), l(d, {
36
+ key: 1,
37
+ class: "radius-medium mn-r-thin i-thin",
38
+ onClick: t[1] || (t[1] = n((a) => r.$router.push({
39
+ name: "User Profile",
40
+ params: {
41
+ _id: e.user._id
42
+ }
43
+ }), ["stop"]))
44
+ })),
45
+ m("p", null, u(e.name), 1)
46
+ ]));
57
47
  }
58
- }, w = /* @__PURE__ */ y(M, [["__scopeId", "data-v-58f07aab"]]);
48
+ }, g = /* @__PURE__ */ c(h, [["__scopeId", "data-v-84de60e5"]]);
59
49
  export {
60
- w as default
50
+ g as default
61
51
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),m=require("../../../../components/Button/Button.vue2.cjs");require("../../../auth/store/auth.cjs");const i=require("../../store/memberships.cjs"),g={__name:"ButtonToggleMembership",props:{user:{type:String,required:!0},type:{type:String,required:!0},role:{type:String,required:!1},target:{type:String,required:!0},text:{type:Object,default:{create:"join",remove:"leave"}},status:{type:Boolean,required:!0}},emits:["updateMembership"],setup(o,{emit:n}){const u=n,e=o,c=async()=>{e.status?await l():await p()};async function p(){try{const t={user:e.user,type:e.type,role:e.role,target:e.target},s=await i.actions.create(t);u("updateMembership",{membership:s,target:e.target,status:!0})}catch(t){throw console.log(t),t}}async function l(t){const s={user:e.user,type:e.type,role:e.role,target:e.target};try{const a=await i.actions.delete(s);u("updateMembership",{membership:a,target:e.target,status:!1})}catch(a){throw console.log(a),a}}return(t,s)=>(r.openBlock(),r.createBlock(m.default,{submit:c,showSucces:!1,class:"bg-main button-small button"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.status?e.text.remove:e.text.create),1)]),_:1}))}};exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),m=require("../../../../components/Button/Button.vue.cjs");require("../../../auth/store/auth.cjs");const i=require("../../store/memberships.cjs"),g={__name:"ButtonToggleMembership",props:{user:{type:String,required:!0},type:{type:String,required:!0},role:{type:String,required:!1},target:{type:String,required:!0},text:{type:Object,default:{create:"join",remove:"leave"}},status:{type:Boolean,required:!0}},emits:["updateMembership"],setup(o,{emit:n}){const u=n,e=o,c=async()=>{e.status?await l():await p()};async function p(){try{const t={user:e.user,type:e.type,role:e.role,target:e.target},s=await i.actions.create(t);u("updateMembership",{membership:s,target:e.target,status:!0})}catch(t){throw console.log(t),t}}async function l(t){const s={user:e.user,type:e.type,role:e.role,target:e.target};try{const a=await i.actions.delete(s);u("updateMembership",{membership:a,target:e.target,status:!1})}catch(a){throw console.log(a),a}}return(t,s)=>(r.openBlock(),r.createBlock(m.default,{submit:c,showSucces:!1,class:"bg-main button-small button"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.status?e.text.remove:e.text.create),1)]),_:1}))}};exports.default=g;
@@ -1,5 +1,5 @@
1
1
  import { openBlock as m, createBlock as l, withCtx as g, createTextVNode as h, toDisplayString as y } from "vue";
2
- import b from "../../../../components/Button/Button.vue2.js";
2
+ import b from "../../../../components/Button/Button.vue.js";
3
3
  import "../../../auth/store/auth.js";
4
4
  import { actions as i } from "../../store/memberships.js";
5
5
  const M = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Spoiler/Spoiler.vue.cjs");const m=require("../blocks/DepartmentSub.vue.cjs"),u=require("../blocks/User.vue.cjs"),t=require("../../store/departments.cjs"),p={class:"for-transition w-100"},_={key:0,id:"dash",class:"pd-medium bg-grey"},h={class:"mn-b-medium radius-medium pd-semi bg-white"},k={class:"flex-nowrap flex mn-b-small"},b={class:"w-100"},g=e.createElementVNode("path",{d:"M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z",fill:"rgb(var(--black))"},null,-1),L=[g],B=["innerHTML"],E={class:"mn-b-medium radius-medium pd-semi bg-white"},C=e.createElementVNode("h3",{class:"mn-b-regular"},"Команда",-1),f={key:0},v={class:"mn-b-medium radius-medium pd-semi bg-white"},w=e.createElementVNode("h3",{class:"mn-b-regular"},"Подотделы",-1),N={key:0},V={__name:"Department",async setup(y){let a,l;c.useRouter();const r=c.useRoute();return[a,l]=e.withAsyncContext(()=>t.actions.readOne(r.params.department)),await a,l(),(s,i)=>(e.openBlock(),e.createElementBlock("div",p,[t.state.department?(e.openBlock(),e.createElementBlock("div",_,[e.createElementVNode("section",h,[e.createElementVNode("div",k,[e.createElementVNode("h2",b,e.toDisplayString(t.state.department.profile.name),1),(e.openBlock(),e.createElementBlock("svg",{onClick:i[0]||(i[0]=n=>s.$router.push(`/organizations/${e.unref(r).params._id}/departments/${e.unref(r).params.department}/edit`)),class:"i-regular t-transp",width:"652",height:"652",viewBox:"0 0 652 652",fill:"none",xmlns:"http://www.w3.org/2000/svg"},L))]),e.createElementVNode("p",{class:"t-transp p-big",innerHTML:t.state.department.description},null,8,B)]),e.createElementVNode("section",E,[C,e.createElementVNode("ul",null,[t.state.department.members.length<1?(e.openBlock(),e.createElementBlock("li",f,"В отделе еще нет участников")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(n,o)=>(e.openBlock(),e.createBlock(u.default,{class:"br-b br-solid br-grey",key:o,user:n,position:n.position,onClick:d=>s.$router.push(`/app/profile/${n.user._id}`)},null,8,["user","position","onClick"]))),128))])]),e.createElementVNode("section",v,[w,e.createElementVNode("ul",null,[t.state.department.subdepartments.length<1?(e.openBlock(),e.createElementBlock("li",N,"В отделе еще нет подотделов")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.subdepartments,(n,o)=>(e.openBlock(),e.createBlock(m.default,{onClick:d=>s.$router.push(`/app/organization/departments/${n._id}`),key:o,class:"br-b br-solid br-grey",department:n},null,8,["onClick","department"]))),128))])])])):e.createCommentVNode("",!0)]))}};exports.default=V;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Spoiler/Spoiler.vue.cjs");const u=require("../blocks/DepartmentSub.vue.cjs"),p=require("../blocks/User.vue.cjs"),t=require("../../store/departments.cjs"),_={class:"for-transition w-100"},h={key:0,id:"dash",class:"pd-medium bg-grey"},k={class:"mn-b-medium radius-medium pd-semi bg-white"},b={class:"flex-nowrap flex mn-b-small"},g={class:"w-100"},E=["innerHTML"],B={class:"mn-b-medium radius-medium pd-semi bg-white"},N=e.createElementVNode("h3",{class:"mn-b-regular"},"Команда",-1),V={key:0},f={class:"mn-b-medium radius-medium pd-semi bg-white"},y=e.createElementVNode("h3",{class:"mn-b-regular"},"Подотделы",-1),v={key:0},C={__name:"Department",async setup(w){let s,a;c.useRouter();const n=c.useRoute();return[s,a]=e.withAsyncContext(()=>t.actions.readOne(n.params.department)),await s,a(),(l,q)=>{const i=e.resolveComponent("IconEdit"),d=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",_,[t.state.department?(e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("section",k,[e.createElementVNode("div",b,[e.createElementVNode("h2",g,e.toDisplayString(t.state.department.profile.name),1),e.createVNode(d,{to:{name:"Department Edit",params:{_id:e.unref(n).params._id,department:e.unref(n).params.department}},class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"},{default:e.withCtx(()=>[e.createVNode(i,{class:"i-regular",classes:"fill-white"})]),_:1},8,["to"])]),e.createElementVNode("p",{class:"t-transp p-big",innerHTML:t.state.department.description},null,8,E)]),e.createElementVNode("section",B,[N,e.createElementVNode("ul",null,[t.state.department.members.length<1?(e.openBlock(),e.createElementBlock("li",V,"В отделе еще нет участников")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(r,o)=>(e.openBlock(),e.createBlock(p.default,{class:"br-b br-solid br-grey",key:o,user:r,position:r.position,onClick:m=>l.$router.push(`/app/profile/${r.user._id}`)},null,8,["user","position","onClick"]))),128))])]),e.createElementVNode("section",f,[y,e.createElementVNode("ul",null,[t.state.department.subdepartments.length<1?(e.openBlock(),e.createElementBlock("li",v,"В отделе еще нет подотделов")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.subdepartments,(r,o)=>(e.openBlock(),e.createBlock(u.default,{onClick:m=>l.$router.push(`/app/organization/departments/${r._id}`),key:o,class:"br-b br-solid br-grey",department:r},null,8,["onClick","department"]))),128))])])])):e.createCommentVNode("",!0)])}}};exports.default=C;
@@ -1,73 +1,80 @@
1
- import { withAsyncContext as g, openBlock as t, createElementBlock as r, createElementVNode as e, toDisplayString as L, unref as u, createCommentVNode as l, Fragment as c, renderList as _, createBlock as h } from "vue";
2
- import { useRouter as f, useRoute as C } from "vue-router";
1
+ import { withAsyncContext as y, resolveComponent as p, openBlock as t, createElementBlock as n, createElementVNode as e, toDisplayString as w, createVNode as c, unref as u, withCtx as C, createCommentVNode as a, Fragment as _, renderList as h, createBlock as b } from "vue";
2
+ import { useRouter as v, useRoute as $ } from "vue-router";
3
3
  import "../../../../components/Spoiler/Spoiler.vue.js";
4
- import k from "../blocks/DepartmentSub.vue.js";
5
- import w from "../blocks/User.vue.js";
6
- import { actions as y, state as n } from "../../store/departments.js";
7
- const v = { class: "for-transition w-100" }, $ = {
4
+ import x from "../blocks/DepartmentSub.vue.js";
5
+ import E from "../blocks/User.vue.js";
6
+ import { actions as D, state as s } from "../../store/departments.js";
7
+ const B = { class: "for-transition w-100" }, L = {
8
8
  key: 0,
9
9
  id: "dash",
10
10
  class: "pd-medium bg-grey"
11
- }, M = { class: "mn-b-medium radius-medium pd-semi bg-white" }, x = { class: "flex-nowrap flex mn-b-small" }, B = { class: "w-100" }, Z = /* @__PURE__ */ e("path", {
12
- d: "M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z",
13
- fill: "rgb(var(--black))"
14
- }, null, -1), D = [
15
- Z
16
- ], H = ["innerHTML"], z = { class: "mn-b-medium radius-medium pd-semi bg-white" }, E = /* @__PURE__ */ e("h3", { class: "mn-b-regular" }, "Команда", -1), N = { key: 0 }, R = { class: "mn-b-medium radius-medium pd-semi bg-white" }, S = /* @__PURE__ */ e("h3", { class: "mn-b-regular" }, "Подотделы", -1), T = { key: 0 }, G = {
11
+ }, N = { class: "mn-b-medium radius-medium pd-semi bg-white" }, V = { class: "flex-nowrap flex mn-b-small" }, H = { class: "w-100" }, I = ["innerHTML"], M = { class: "mn-b-medium radius-medium pd-semi bg-white" }, R = /* @__PURE__ */ e("h3", { class: "mn-b-regular" }, "Команда", -1), S = { key: 0 }, T = { class: "mn-b-medium radius-medium pd-semi bg-white" }, z = /* @__PURE__ */ e("h3", { class: "mn-b-regular" }, "Подотделы", -1), A = { key: 0 }, P = {
17
12
  __name: "Department",
18
- async setup(V) {
19
- let m, d;
20
- f();
21
- const o = C();
22
- return [m, d] = g(() => y.readOne(o.params.department)), await m, d(), (i, p) => (t(), r("div", v, [
23
- n.department ? (t(), r("div", $, [
24
- e("section", M, [
25
- e("div", x, [
26
- e("h2", B, L(n.department.profile.name), 1),
27
- (t(), r("svg", {
28
- onClick: p[0] || (p[0] = (s) => i.$router.push(`/organizations/${u(o).params._id}/departments/${u(o).params.department}/edit`)),
29
- class: "i-regular t-transp",
30
- width: "652",
31
- height: "652",
32
- viewBox: "0 0 652 652",
33
- fill: "none",
34
- xmlns: "http://www.w3.org/2000/svg"
35
- }, D))
13
+ async setup(F) {
14
+ let m, l;
15
+ v();
16
+ const o = $();
17
+ return [m, l] = y(() => D.readOne(o.params.department)), await m, l(), (d, O) => {
18
+ const g = p("IconEdit"), f = p("router-link");
19
+ return t(), n("div", B, [
20
+ s.department ? (t(), n("div", L, [
21
+ e("section", N, [
22
+ e("div", V, [
23
+ e("h2", H, w(s.department.profile.name), 1),
24
+ c(f, {
25
+ to: {
26
+ name: "Department Edit",
27
+ params: {
28
+ _id: u(o).params._id,
29
+ department: u(o).params.department
30
+ }
31
+ },
32
+ class: "cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"
33
+ }, {
34
+ default: C(() => [
35
+ c(g, {
36
+ class: "i-regular",
37
+ classes: "fill-white"
38
+ })
39
+ ]),
40
+ _: 1
41
+ }, 8, ["to"])
42
+ ]),
43
+ e("p", {
44
+ class: "t-transp p-big",
45
+ innerHTML: s.department.description
46
+ }, null, 8, I)
36
47
  ]),
37
- e("p", {
38
- class: "t-transp p-big",
39
- innerHTML: n.department.description
40
- }, null, 8, H)
41
- ]),
42
- e("section", z, [
43
- E,
44
- e("ul", null, [
45
- n.department.members.length < 1 ? (t(), r("li", N, "В отделе еще нет участников")) : l("", !0),
46
- (t(!0), r(c, null, _(n.department.members, (s, a) => (t(), h(w, {
47
- class: "br-b br-solid br-grey",
48
- key: a,
49
- user: s,
50
- position: s.position,
51
- onClick: (b) => i.$router.push(`/app/profile/${s.user._id}`)
52
- }, null, 8, ["user", "position", "onClick"]))), 128))
53
- ])
54
- ]),
55
- e("section", R, [
56
- S,
57
- e("ul", null, [
58
- n.department.subdepartments.length < 1 ? (t(), r("li", T, "В отделе еще нет подотделов")) : l("", !0),
59
- (t(!0), r(c, null, _(n.department.subdepartments, (s, a) => (t(), h(k, {
60
- onClick: (b) => i.$router.push(`/app/organization/departments/${s._id}`),
61
- key: a,
62
- class: "br-b br-solid br-grey",
63
- department: s
64
- }, null, 8, ["onClick", "department"]))), 128))
48
+ e("section", M, [
49
+ R,
50
+ e("ul", null, [
51
+ s.department.members.length < 1 ? (t(), n("li", S, "В отделе еще нет участников")) : a("", !0),
52
+ (t(!0), n(_, null, h(s.department.members, (r, i) => (t(), b(E, {
53
+ class: "br-b br-solid br-grey",
54
+ key: i,
55
+ user: r,
56
+ position: r.position,
57
+ onClick: (k) => d.$router.push(`/app/profile/${r.user._id}`)
58
+ }, null, 8, ["user", "position", "onClick"]))), 128))
59
+ ])
60
+ ]),
61
+ e("section", T, [
62
+ z,
63
+ e("ul", null, [
64
+ s.department.subdepartments.length < 1 ? (t(), n("li", A, "В отделе еще нет подотделов")) : a("", !0),
65
+ (t(!0), n(_, null, h(s.department.subdepartments, (r, i) => (t(), b(x, {
66
+ onClick: (k) => d.$router.push(`/app/organization/departments/${r._id}`),
67
+ key: i,
68
+ class: "br-b br-solid br-grey",
69
+ department: r
70
+ }, null, 8, ["onClick", "department"]))), 128))
71
+ ])
65
72
  ])
66
- ])
67
- ])) : l("", !0)
68
- ]));
73
+ ])) : a("", !0)
74
+ ]);
75
+ };
69
76
  }
70
77
  };
71
78
  export {
72
- G as default
79
+ P as default
73
80
  };