@ozdao/prometheus-framework 0.2.60 → 0.2.62

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/auth.server.js +8 -190
  2. package/dist/auth.server.mjs +8 -190
  3. package/dist/community.server.js +3 -2
  4. package/dist/community.server.mjs +2 -1
  5. package/dist/events.server.js +101 -29
  6. package/dist/events.server.mjs +100 -28
  7. package/dist/files.server.js +7 -7
  8. package/dist/files.server.mjs +7 -7
  9. package/dist/gallery.server.js +2 -2
  10. package/dist/gallery.server.mjs +2 -2
  11. package/dist/main-DsseFd2d.mjs +13753 -0
  12. package/dist/main-U466Gwzt.js +91 -0
  13. package/dist/main.css +1 -1
  14. package/dist/metadata.schema-CS6_9GLU.js +174 -0
  15. package/dist/metadata.schema-D88c1Ebp.mjs +175 -0
  16. package/dist/organizations.server.js +212 -16
  17. package/dist/organizations.server.mjs +212 -16
  18. package/dist/ownership.schema-DN0SlQL6.js +36 -0
  19. package/dist/ownership.schema-oyx6eNkZ.mjs +37 -0
  20. package/dist/products.server.js +8 -5
  21. package/dist/products.server.mjs +8 -5
  22. package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +19 -14
  24. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +1 -55
  26. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  27. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +55 -1
  28. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +27 -27
  30. package/dist/prometheus-framework/src/components/Loader/Loader.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/components/Loader/Loader.vue.js +1 -51
  32. package/dist/prometheus-framework/src/components/Loader/Loader.vue2.cjs +1 -1
  33. package/dist/prometheus-framework/src/components/Loader/Loader.vue2.js +51 -1
  34. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -97
  36. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  37. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +97 -1
  38. package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +1 -1
  40. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +1 -36
  42. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
  43. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +36 -1
  44. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
  46. package/dist/prometheus-framework/src/modules/auth/auth.client.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/auth/auth.client.js +12 -14
  48. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +1 -1
  50. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  54. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +1 -1
  56. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.js +1 -1
  60. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  62. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  64. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +197 -183
  66. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -0
  67. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +168 -0
  68. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue2.cjs +1 -0
  69. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue2.js +1 -0
  70. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +1 -1
  72. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +3 -3
  74. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +1 -1
  76. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js +1 -1
  78. package/dist/prometheus-framework/src/modules/events/router/events.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/events/router/events.js +11 -2
  80. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  82. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  84. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +67 -64
  86. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  88. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +13 -1
  90. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +1 -13
  92. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +1 -1
  94. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
  96. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  98. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
  100. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  102. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +3 -3
  104. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +24 -24
  106. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  108. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  110. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +1 -1
  112. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  113. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
  114. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  116. package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
  117. package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +40 -38
  118. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
  119. package/dist/prometheus-framework/src/modules/organizations/store/departments.js +19 -19
  120. package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
  121. package/dist/prometheus-framework/src/modules/organizations/store/invites.js +5 -5
  122. package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.js +36 -27
  124. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  126. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
  127. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.js +1 -1
  128. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  129. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  130. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +7 -7
  132. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +20 -20
  134. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
  136. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +36 -50
  138. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  140. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  142. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +1 -1
  144. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  146. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
  148. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +2 -2
  150. package/dist/prometheus-framework.cjs.js +1 -1
  151. package/dist/prometheus-framework.es.js +1 -1
  152. package/dist/style.css +1 -1
  153. package/dist/web-D7bW32Ul.mjs +54 -0
  154. package/dist/web-DpE9HxA3.js +1 -0
  155. package/package.json +1 -1
  156. package/src/components/Chips/Chips.vue +2 -2
  157. package/src/components/Feed/Feed.vue +2 -1
  158. package/src/modules/auth/auth.client.js +0 -2
  159. package/src/modules/auth/auth.server.js +1 -6
  160. package/src/modules/auth/components/pages/Invite.vue +1 -1
  161. package/src/modules/events/components/pages/EditEvent.vue +19 -0
  162. package/src/modules/events/components/pages/EditEventTickets.vue +194 -0
  163. package/src/modules/events/controllers/tickets.controller.js +103 -28
  164. package/src/modules/events/models/ticket.model.js +22 -4
  165. package/src/modules/events/router/events.js +5 -0
  166. package/src/modules/events/routes/tickets.routes.js +2 -2
  167. package/src/modules/events/store/tickets.js +1 -0
  168. package/src/modules/globals/components/blocks/CardHeader.vue +6 -6
  169. package/src/modules/organizations/components/pages/Members.vue +1 -1
  170. package/src/modules/organizations/components/pages/Organization.vue +4 -4
  171. package/src/modules/organizations/components/sections/MembersAdd.vue +1 -1
  172. package/src/modules/organizations/controllers/departments.controller.js +14 -1
  173. package/src/modules/organizations/models/department.model.js +5 -1
  174. package/src/modules/organizations/organizations.client.js +2 -0
  175. package/src/modules/organizations/organizations.server.js +6 -2
  176. package/src/modules/organizations/routes/departments.routes.js +1 -1
  177. package/src/modules/organizations/store/departments.js +3 -2
  178. package/src/modules/products/components/blocks/CardLeftover.vue +19 -7
  179. package/src/modules/products/components/pages/EditLeftover.vue +1 -1
  180. package/src/modules/products/components/pages/Leftovers.vue +14 -3
  181. package/src/modules/products/components/pages/Products.vue +8 -8
  182. package/src/modules/products/models/leftover.model.js +9 -5
  183. package/src/modules/users/models/client.model.js +60 -0
  184. /package/src/modules/{auth → organizations}/controllers/invites.controller.js +0 -0
  185. /package/src/modules/{auth → organizations}/models/invite.model.js +0 -0
  186. /package/src/modules/{auth → organizations}/routes/invites.routes.js +0 -0
  187. /package/src/modules/{auth → organizations}/store/invites.js +0 -0
@@ -1,29 +1,29 @@
1
- import { openBlock as t, createElementBlock as i, createElementVNode as l, withModifiers as h, createCommentVNode as n, createBlock as y, toDisplayString as d, Fragment as k, renderList as $, normalizeStyle as x, withCtx as b } from "vue";
2
- import { useRouter as v } from "vue-router";
3
- import p from "../../../icons/placeholders/PlaceholderUserpic.vue.js";
4
- import E from "../../../reports/components/sections/FormReport.vue.js";
5
- import R from "../../../../components/Dropdown/Dropdown.vue.js";
1
+ import { openBlock as t, createElementBlock as n, createElementVNode as d, withModifiers as b, createCommentVNode as o, createBlock as w, toDisplayString as f, Fragment as C, renderList as M, normalizeStyle as P, withCtx as R } from "vue";
2
+ import { useRouter as U } from "vue-router";
3
+ import F from "../../../icons/placeholders/PlaceholderUserpic.vue.js";
4
+ import D from "../../../reports/components/sections/FormReport.vue.js";
5
+ import L from "../../../../components/Dropdown/Dropdown.vue2.js";
6
6
  import "../../../../components/Button/Button.vue2.js";
7
7
  import "../../../auth/store/auth.js";
8
8
  import "../../../organizations/store/memberships.js";
9
- import z from "../../../icons/navigation/IconEllipsis.vue.js";
10
- const C = {
9
+ import S from "../../../icons/navigation/IconEllipsis.vue.js";
10
+ const V = {
11
11
  key: 0,
12
12
  class: "pd-b-zero"
13
- }, M = { class: "w-100 flex-v-center flex-nojustify flex" }, P = { class: "w-100 flex-nowrap flex-v-center flex" }, U = ["src"], F = {
13
+ }, B = { class: "w-100 flex-v-center flex-nojustify flex" }, I = { class: "w-100 flex-nowrap flex-v-center flex" }, O = ["src"], T = {
14
14
  key: 2,
15
15
  class: "t-semi"
16
- }, D = { key: 1 }, L = { key: 2 }, S = { class: "d-block mn-l-auto flex-nowrap flex flex-v-center" }, V = {
16
+ }, j = { key: 1 }, N = { key: 2 }, A = { class: "d-block mn-l-auto flex-nowrap flex flex-v-center" }, H = {
17
17
  key: 0,
18
18
  class: "w-4r i-thin"
19
- }, B = {
19
+ }, J = {
20
20
  style: {
21
21
  position: "absolute",
22
22
  top: "0px",
23
23
  right: "0px"
24
24
  },
25
25
  class: "br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"
26
- }, I = ["src"], O = { class: "bg-black pd-thin radius-small" }, T = /* @__PURE__ */ l("button", { class: "w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button" }, " Report ", -1), W = {
26
+ }, q = ["src"], G = { class: "bg-black pd-thin radius-small" }, K = /* @__PURE__ */ d("button", { class: "w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button" }, " Report ", -1), oe = {
27
27
  __name: "CardHeader",
28
28
  props: [
29
29
  "user",
@@ -38,83 +38,86 @@ const C = {
38
38
  "type"
39
39
  ],
40
40
  setup(e) {
41
- v();
42
- function w(s) {
43
- const r = /* @__PURE__ */ new Date(), m = new Date(s), u = Math.abs(r - m), c = Math.floor(u / 1e3), o = Math.floor(c / 60), a = Math.floor(o / 60), f = Math.floor(a / 24), g = Math.floor(f / 7);
44
- return g > 0 ? `${g} week${g > 1 ? "s" : ""} ago` : f > 0 ? `${f} day${f > 1 ? "s" : ""} ago` : a > 0 ? `${a} hour${a > 1 ? "s" : ""} ago` : o > 0 ? `${o} minute${o > 1 ? "s" : ""} ago` : "Just now";
41
+ U();
42
+ function z(i) {
43
+ const r = /* @__PURE__ */ new Date(), h = new Date(i), g = Math.abs(r - h), y = Math.floor(g / 1e3), s = Math.floor(y / 60), a = Math.floor(s / 60), l = Math.floor(a / 24), m = Math.floor(l / 7);
44
+ return m > 0 ? `${m} week${m > 1 ? "s" : ""} ago` : l > 0 ? `${l} day${l > 1 ? "s" : ""} ago` : a > 0 ? `${a} hour${a > 1 ? "s" : ""} ago` : s > 0 ? `${s} minute${s > 1 ? "s" : ""} ago` : "Just now";
45
45
  }
46
- return (s, r) => {
47
- var m, u, c;
48
- return e.owner ? (t(), i("header", C, [
49
- l("div", M, [
50
- l("div", P, [
51
- ((m = e.owner.target.profile.photo) == null ? void 0 : m.length) > 0 && e.type !== "short" ? (t(), i("img", {
46
+ return (i, r) => {
47
+ var h, g, y, s, a, l, m, k, $, x, v, p, E;
48
+ return e.owner ? (t(), n("header", V, [
49
+ d("div", B, [
50
+ d("div", I, [
51
+ ((y = (g = (h = e.owner.target) == null ? void 0 : h.profile) == null ? void 0 : g.photo) == null ? void 0 : y.length) > 0 && e.type !== "short" ? (t(), n("img", {
52
52
  key: 0,
53
- src: (s.FILE_SERVER_URL || "") + e.owner.target.profile.photo,
53
+ src: (i.FILE_SERVER_URL || "") + e.owner.target.profile.photo,
54
54
  class: "radius-medium object-fit-cover mn-r-thin i-thin",
55
- onClick: r[0] || (r[0] = h((o) => s.$router.push({
55
+ onClick: r[0] || (r[0] = b((c) => i.$router.push({
56
56
  name: e.owner.type === "user" ? "User Profile" : "Organization",
57
57
  params: {
58
58
  _id: e.owner.target._id
59
59
  }
60
60
  }), ["stop"]))
61
- }, null, 8, U)) : n("", !0),
62
- !e.owner.target.profile.photo && e.type !== "short" ? (t(), y(p, {
61
+ }, null, 8, O)) : o("", !0),
62
+ !((a = (s = e.owner.target) == null ? void 0 : s.profile) != null && a.photo) && e.type !== "short" ? (t(), w(F, {
63
63
  key: 1,
64
64
  class: "radius-medium mn-r-thin i-thin",
65
- onClick: r[1] || (r[1] = h((o) => s.$router.push({
65
+ onClick: r[1] || (r[1] = b((c) => i.$router.push({
66
66
  name: e.owner.type === "user" ? "User Profile" : "Organization",
67
67
  params: {
68
68
  _id: e.owner.target._id
69
69
  }
70
70
  }), ["stop"]))
71
- })) : n("", !0),
72
- e.type !== "short" ? (t(), i("span", F, [
73
- l("span", {
74
- onClick: r[2] || (r[2] = h((o) => s.$router.push({
71
+ })) : o("", !0),
72
+ e.type !== "short" ? (t(), n("span", T, [
73
+ d("span", {
74
+ onClick: r[2] || (r[2] = b((c) => i.$router.push({
75
75
  name: e.owner.type === "user" ? "User Profile" : "Organization",
76
76
  params: {
77
77
  _id: e.owner.target._id
78
78
  }
79
79
  }), ["stop"]))
80
- }, d(e.owner.target.profile.name), 1),
81
- !e.creator.hidden && e.owner.target.profile.name !== ((u = e.creator.target.profile) == null ? void 0 : u.name) ? (t(), i("span", {
80
+ }, f((m = (l = e.owner.target) == null ? void 0 : l.profile) == null ? void 0 : m.name), 1),
81
+ !e.creator.hidden && (($ = (k = e.owner.target) == null ? void 0 : k.profile) == null ? void 0 : $.name) !== ((v = (x = e.creator.target) == null ? void 0 : x.profile) == null ? void 0 : v.name) ? (t(), n("span", {
82
82
  key: 0,
83
- onClick: r[3] || (r[3] = h((o) => s.$router.push({
84
- name: "User Profile",
85
- params: {
86
- _id: e.creator.target._id
87
- }
88
- }), ["stop"]))
89
- }, " · by " + d((c = e.creator.target.profile) == null ? void 0 : c.name), 1)) : n("", !0),
90
- e.date ? (t(), i("span", D, " · " + d(w(e.date)), 1)) : n("", !0),
91
- e.dateFormatted ? (t(), i("span", L, " · " + d(e.dateFormatted), 1)) : n("", !0)
92
- ])) : n("", !0),
93
- l("div", S, [
94
- e.members ? (t(), i("div", V, [
95
- l("span", B, d(e.members), 1),
96
- (t(!0), i(k, null, $(e.membersPhotos.slice(0, 2), (o, a) => (t(), i("img", {
97
- key: a,
98
- src: (s.FILE_SERVER_URL || "") + o,
99
- style: x({
83
+ onClick: r[3] || (r[3] = b((c) => {
84
+ var u;
85
+ return i.$router.push({
86
+ name: "User Profile",
87
+ params: {
88
+ _id: (u = e.creator.target) == null ? void 0 : u._id
89
+ }
90
+ });
91
+ }, ["stop"]))
92
+ }, " · by " + f((E = (p = e.creator.target) == null ? void 0 : p.profile) == null ? void 0 : E.name), 1)) : o("", !0),
93
+ e.date ? (t(), n("span", j, " · " + f(z(e.date)), 1)) : o("", !0),
94
+ e.dateFormatted ? (t(), n("span", N, " · " + f(e.dateFormatted), 1)) : o("", !0)
95
+ ])) : o("", !0),
96
+ d("div", A, [
97
+ e.members ? (t(), n("div", H, [
98
+ d("span", J, f(e.members), 1),
99
+ (t(!0), n(C, null, M(e.membersPhotos.slice(0, 2), (c, u) => (t(), n("img", {
100
+ key: u,
101
+ src: (i.FILE_SERVER_URL || "") + c,
102
+ style: P({
100
103
  position: "absolute",
101
104
  top: "0px",
102
- right: a * 20 + 20 + "%",
103
- zIndex: 1 - a
105
+ right: u * 20 + 20 + "%",
106
+ zIndex: 1 - u
104
107
  }),
105
108
  class: "br-solid br-2px br-white i-thin bg-grey radius-big"
106
- }, null, 12, I))), 128))
107
- ])) : n("", !0)
109
+ }, null, 12, q))), 128))
110
+ ])) : o("", !0)
108
111
  ]),
109
- e.type !== "short" && e.user && e.user != e.creator.target._id ? (t(), y(R, {
112
+ e.type !== "short" && e.user && e.user != e.creator.target._id ? (t(), w(L, {
110
113
  key: 3,
111
- label: { component: z, class: "t-transp i-regular" },
114
+ label: { component: S, class: "t-transp i-regular" },
112
115
  align: "right",
113
116
  class: "cursor-pointer z-index-2"
114
117
  }, {
115
- default: b(() => [
116
- l("section", O, [
117
- e.user !== e.creator.target._id ? (t(), y(E, {
118
+ default: R(() => [
119
+ d("section", G, [
120
+ e.user !== e.creator.target._id ? (t(), w(D, {
118
121
  key: 0,
119
122
  user: e.user,
120
123
  type: e.entityType,
@@ -122,21 +125,21 @@ const C = {
122
125
  text: "Report",
123
126
  class: "w-100"
124
127
  }, {
125
- default: b(() => [
126
- T
128
+ default: R(() => [
129
+ K
127
130
  ]),
128
131
  _: 1
129
- }, 8, ["user", "type", "target"])) : n("", !0)
132
+ }, 8, ["user", "type", "target"])) : o("", !0)
130
133
  ])
131
134
  ]),
132
135
  _: 1
133
- }, 8, ["label"])) : n("", !0)
136
+ }, 8, ["label"])) : o("", !0)
134
137
  ])
135
138
  ])
136
- ])) : n("", !0);
139
+ ])) : o("", !0);
137
140
  };
138
141
  }
139
142
  };
140
143
  export {
141
- W as default
144
+ oe as default
142
145
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Button/Button.vue2.cjs");const a=require("../../../mobile/components/Menu/Menu.vue2.cjs"),r=require("../../../mobile/components/Menu/MenuItem.vue.cjs"),n=require("vue-router");require("../../../auth/store/auth.cjs");require("./Legal.vue2.cjs");const u={class:"for-transition w-100 pd-medium"},l=e.createStaticVNode('<div class="bg-grey radius-medium pd-medium mn-b-small"><h2 class="mn-b-small">About No More Snow CO., LTD.</h2><p class="mn-b-small"> Welcome to NO MORE SNOW CO., LTD.! We are dedicated to providing top-notch services and creating a trustworthy environment for our users. Your trust and safety are our priority, and we are committed to being transparent about our policies and practices. </p><p class="mn-b-small"> If you have any questions, concerns, or feedback, please do not hesitate to contact us through the following details. Our team is always here to assist you! </p><p class="mn-b-small"> Address: 10/3 Laemsai Rd, Karon, Mueang Phuket District, Phuket 83100<br> Telephone: +660803202142<br> Email: <a href="mailto:hello@thecommunephuket.com">hello@thecommunephuket.com</a><br> Website: <a href="https://thecommunephuket.com" target="_blank">https://thecommunephuket.com</a></p></div>',1),i=e.createElementVNode("span",null,"Terms of Use",-1),c=e.createElementVNode("span",null,"Privacy Policy",-1),d=e.createElementVNode("span",null,"Cookie Policy",-1),m=e.createElementVNode("span",null,"EULA",-1),p={__name:"Legal",setup(h){n.useRoute();const o=n.useRouter();return e.ref(!1),(f,t)=>(e.openBlock(),e.createElementBlock("div",u,[l,e.createVNode(a.default,{class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(r.default,{onClick:t[0]||(t[0]=s=>e.unref(o).push({name:"Terms of Use"})),class:"cursor-pointer"},{default:e.withCtx(()=>[i]),_:1}),e.createVNode(r.default,{onClick:t[1]||(t[1]=s=>e.unref(o).push({name:"Privacy Policy"})),class:"cursor-pointer"},{default:e.withCtx(()=>[c]),_:1}),e.createVNode(r.default,{onClick:t[2]||(t[2]=s=>e.unref(o).push({name:"Cookie Policy"})),class:"cursor-pointer"},{default:e.withCtx(()=>[d]),_:1}),e.createVNode(r.default,{onClick:t[3]||(t[3]=s=>e.unref(o).push({name:"EULA"})),class:"cursor-pointer"},{default:e.withCtx(()=>[m]),_:1})]),_:1})]))}};exports.default=p;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Button/Button.vue2.cjs");const a=require("../../../mobile/components/Menu/Menu.vue.cjs"),r=require("../../../mobile/components/Menu/MenuItem.vue.cjs"),n=require("vue-router");require("../../../auth/store/auth.cjs");require("./Legal.vue2.cjs");const u={class:"for-transition w-100 pd-medium"},l=e.createStaticVNode('<div class="bg-grey radius-medium pd-medium mn-b-small"><h2 class="mn-b-small">About No More Snow CO., LTD.</h2><p class="mn-b-small"> Welcome to NO MORE SNOW CO., LTD.! We are dedicated to providing top-notch services and creating a trustworthy environment for our users. Your trust and safety are our priority, and we are committed to being transparent about our policies and practices. </p><p class="mn-b-small"> If you have any questions, concerns, or feedback, please do not hesitate to contact us through the following details. Our team is always here to assist you! </p><p class="mn-b-small"> Address: 10/3 Laemsai Rd, Karon, Mueang Phuket District, Phuket 83100<br> Telephone: +660803202142<br> Email: <a href="mailto:hello@thecommunephuket.com">hello@thecommunephuket.com</a><br> Website: <a href="https://thecommunephuket.com" target="_blank">https://thecommunephuket.com</a></p></div>',1),i=e.createElementVNode("span",null,"Terms of Use",-1),c=e.createElementVNode("span",null,"Privacy Policy",-1),d=e.createElementVNode("span",null,"Cookie Policy",-1),m=e.createElementVNode("span",null,"EULA",-1),p={__name:"Legal",setup(h){n.useRoute();const o=n.useRouter();return e.ref(!1),(f,t)=>(e.openBlock(),e.createElementBlock("div",u,[l,e.createVNode(a.default,{class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(r.default,{onClick:t[0]||(t[0]=s=>e.unref(o).push({name:"Terms of Use"})),class:"cursor-pointer"},{default:e.withCtx(()=>[i]),_:1}),e.createVNode(r.default,{onClick:t[1]||(t[1]=s=>e.unref(o).push({name:"Privacy Policy"})),class:"cursor-pointer"},{default:e.withCtx(()=>[c]),_:1}),e.createVNode(r.default,{onClick:t[2]||(t[2]=s=>e.unref(o).push({name:"Cookie Policy"})),class:"cursor-pointer"},{default:e.withCtx(()=>[d]),_:1}),e.createVNode(r.default,{onClick:t[3]||(t[3]=s=>e.unref(o).push({name:"EULA"})),class:"cursor-pointer"},{default:e.withCtx(()=>[m]),_:1})]),_:1})]))}};exports.default=p;
@@ -1,7 +1,7 @@
1
1
  import { ref as l, openBlock as m, createElementBlock as u, createVNode as t, withCtx as o, unref as r, createStaticVNode as c, createElementVNode as a } from "vue";
2
2
  import "../../../../components/Field/Field.vue2.js";
3
3
  import "../../../../components/Button/Button.vue2.js";
4
- import p from "../../../mobile/components/Menu/Menu.vue2.js";
4
+ import p from "../../../mobile/components/Menu/Menu.vue.js";
5
5
  import n from "../../../mobile/components/Menu/MenuItem.vue.js";
6
6
  import { useRoute as d, useRouter as h } from "vue-router";
7
7
  import "../../../auth/store/auth.js";
@@ -1 +1 @@
1
- "use strict";
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Menu.vue2.cjs");const r={class:"mobile-menu-section pd-r-zero pd-t-thin pd-b-thin pd-medium radius-medium"},o={__name:"Menu",setup(u){return(t,n)=>(e.openBlock(),e.createElementBlock("section",r,[e.renderSlot(t.$slots,"default")]))}};exports.default=o;
@@ -1 +1,13 @@
1
-
1
+ import { openBlock as t, createElementBlock as o, renderSlot as n } from "vue";
2
+ import "./Menu.vue2.js";
3
+ const r = { class: "mobile-menu-section pd-r-zero pd-t-thin pd-b-thin pd-medium radius-medium" }, d = {
4
+ __name: "Menu",
5
+ setup(s) {
6
+ return (e, i) => (t(), o("section", r, [
7
+ n(e.$slots, "default")
8
+ ]));
9
+ }
10
+ };
11
+ export {
12
+ d as default
13
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Menu.vue.cjs");const r={class:"mobile-menu-section pd-r-zero pd-t-thin pd-b-thin pd-medium radius-medium"},o={__name:"Menu",setup(u){return(t,n)=>(e.openBlock(),e.createElementBlock("section",r,[e.renderSlot(t.$slots,"default")]))}};exports.default=o;
1
+ "use strict";
@@ -1,13 +1 @@
1
- import { openBlock as t, createElementBlock as o, renderSlot as n } from "vue";
2
- import "./Menu.vue.js";
3
- const r = { class: "mobile-menu-section pd-r-zero pd-t-thin pd-b-thin pd-medium radius-medium" }, d = {
4
- __name: "Menu",
5
- setup(s) {
6
- return (e, i) => (t(), o("section", r, [
7
- n(e.$slots, "default")
8
- ]));
9
- }
10
- };
11
- export {
12
- d as default
13
- };
1
+
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),N=require("../../../../components/Feed/Feed.vue.cjs"),p=require("../../../../components/Field/Field.vue.cjs"),q=require("../../../../components/Button/Button.vue.cjs"),w=require("../../../../components/Popup/Popup.vue.cjs"),o=require("../../../../components/Block/Block.vue.cjs"),f=require("../blocks/CardOrderItem.vue.cjs");require("../../../../components/Select/Select.vue2.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");require("../../../../components/FieldPhone/all-countries.cjs");require("../../../../components/FieldPhone/FieldPhone2.vue.cjs");const C=require("../../../auth/store/auth.cjs"),a=require("../../../globals/store/globals.cjs"),t=require("../../store/orders.cjs"),V=require("../../../products/store/products.cjs");require("./EditOrder.vue2.cjs");const x={class:"flex-v-center flex-nowrap flex"},y=e.createElementVNode("h2",{class:"mn-r-auto"},"Create Order",-1),B=e.createElementVNode("h3",{class:"mn-b-small"},"Add to order",-1),v={class:"bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},E={key:0,class:"w-100"},P={class:"h3 flex"},O=e.createElementVNode("span",{class:"mn-r-auto t-transp"},"In total",-1),F={__name:"EditOrder",setup(R){const i=m.useRoute(),h=m.useRouter();let b=e.computed(()=>Number(t.state.current.positions.reduce((c,n)=>c+n.price*n.quantity,0)));const l=e.ref(!1);function _(){l.value=!0}function u(){l.value=!1}e.ref(null);function g(){t.state.current.creator={type:"user",target:C.state.user._id},t.state.current.owner={type:"organization",target:i.params._id},t.actions.create(t.state.current)}function k(){h.push({name:"Backoffice Orders",params:{_id:i.params._id}})}return e.onMounted(async()=>{}),(c,n)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(o.default,{class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("header",x,[y,e.createVNode(q.default,{submit:g,callback:k,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Add Order ")]),_:1})])]),_:1}),e.createVNode(w.default,{title:"Добавить участника",onClosePopup:u,isPopupOpen:l.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[B,e.createElementVNode("div",v,[e.createVNode(N.default,{search:!0,states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>V.actions.read(r),state:null},options:{organization:e.unref(i).params._id},class:""},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(s,S)=>(e.openBlock(),e.createBlock(f.default,{key:s._id,editable:!1,product:s,onClick:()=>{let d={...s};d.quantity=1,a.actions.add(t.state.current.positions,d),u()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["states","store","options"])])]),_:1},8,["isPopupOpen"]),e.createVNode(o.default,{title:"Positions",actions:[{label:"+",function:()=>_()}],class:"mn-b-semi"},{default:e.withCtx(()=>[t.state.current.positions.length===0?(e.openBlock(),e.createElementBlock("span",E," No positions added yet ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(r,s)=>(e.openBlock(),e.createBlock(f.default,{key:r._id,editable:!0,product:r,onIncrease:()=>{a.actions.increment(t.state.current.positions,r)},onDecrease:()=>{a.actions.decrement(t.state.current.positions,r)},onRemove:()=>{a.actions.delete(t.state.current.positions,r)},class:"mn-b-thin pd-thin radius-medium bg-white"},null,8,["product","onIncrease","onDecrease","onRemove"]))),128))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Client",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(p.default,{field:t.state.current.client.name,"onUpdate:field":n[0]||(n[0]=r=>t.state.current.client.name=r),label:"Client",placeholder:"Enter client name",class:"bg-white pd-medium radius-small mn-b-thin"},null,8,["field"]),e.createVNode(p.default,{field:t.state.current.comment,"onUpdate:field":n[1]||(n[1]=r=>t.state.current.comment=r),label:"Comment",placeholder:"Enter comment",class:"bg-white pd-medium radius-small mn-b-thin"},null,8,["field"])]),_:1}),e.createVNode(o.default,{class:"mn-b-semi"},{default:e.withCtx(()=>[e.createElementVNode("div",P,[O,e.createElementVNode("span",null,e.toDisplayString(e.unref(b))+" "+e.toDisplayString(c.returnCurrency()),1)])]),_:1})]))}};exports.default=F;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),N=require("../../../../components/Feed/Feed.vue.cjs"),p=require("../../../../components/Field/Field.vue.cjs"),q=require("../../../../components/Button/Button.vue.cjs"),w=require("../../../../components/Popup/Popup.vue.cjs"),o=require("../../../../components/Block/Block.vue.cjs"),f=require("../blocks/CardOrderItem.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");require("../../../../components/FieldPhone/all-countries.cjs");require("../../../../components/FieldPhone/FieldPhone2.vue.cjs");const C=require("../../../auth/store/auth.cjs"),a=require("../../../globals/store/globals.cjs"),t=require("../../store/orders.cjs"),V=require("../../../products/store/products.cjs");require("./EditOrder.vue2.cjs");const x={class:"flex-v-center flex-nowrap flex"},y=e.createElementVNode("h2",{class:"mn-r-auto"},"Create Order",-1),B=e.createElementVNode("h3",{class:"mn-b-small"},"Add to order",-1),v={class:"bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big"},E={key:0,class:"w-100"},P={class:"h3 flex"},O=e.createElementVNode("span",{class:"mn-r-auto t-transp"},"In total",-1),F={__name:"EditOrder",setup(R){const i=m.useRoute(),h=m.useRouter();let b=e.computed(()=>Number(t.state.current.positions.reduce((c,n)=>c+n.price*n.quantity,0)));const l=e.ref(!1);function _(){l.value=!0}function u(){l.value=!1}e.ref(null);function g(){t.state.current.creator={type:"user",target:C.state.user._id},t.state.current.owner={type:"organization",target:i.params._id},t.actions.create(t.state.current)}function k(){h.push({name:"Backoffice Orders",params:{_id:i.params._id}})}return e.onMounted(async()=>{}),(c,n)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(o.default,{class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("header",x,[y,e.createVNode(q.default,{submit:g,callback:k,class:"pd-small radius-big bg-main t-black uppercase t-medium"},{default:e.withCtx(()=>[e.createTextVNode(" Add Order ")]),_:1})])]),_:1}),e.createVNode(w.default,{title:"Добавить участника",onClosePopup:u,isPopupOpen:l.value,class:"bg-white w-min-30r w-max-30r radius-big pd-medium"},{default:e.withCtx(()=>[B,e.createElementVNode("div",v,[e.createVNode(N.default,{search:!0,states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:r=>V.actions.read(r),state:null},options:{organization:e.unref(i).params._id},class:""},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(s,S)=>(e.openBlock(),e.createBlock(f.default,{key:s._id,editable:!1,product:s,onClick:()=>{let d={...s};d.quantity=1,a.actions.add(t.state.current.positions,d),u()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["product","onClick"]))),128))]),_:1},8,["states","store","options"])])]),_:1},8,["isPopupOpen"]),e.createVNode(o.default,{title:"Positions",actions:[{label:"+",function:()=>_()}],class:"mn-b-semi"},{default:e.withCtx(()=>[t.state.current.positions.length===0?(e.openBlock(),e.createElementBlock("span",E," No positions added yet ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.current.positions,(r,s)=>(e.openBlock(),e.createBlock(f.default,{key:r._id,editable:!0,product:r,onIncrease:()=>{a.actions.increment(t.state.current.positions,r)},onDecrease:()=>{a.actions.decrement(t.state.current.positions,r)},onRemove:()=>{a.actions.delete(t.state.current.positions,r)},class:"mn-b-thin pd-thin radius-medium bg-white"},null,8,["product","onIncrease","onDecrease","onRemove"]))),128))]),_:1},8,["actions"]),e.createVNode(o.default,{title:"Client",class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(p.default,{field:t.state.current.client.name,"onUpdate:field":n[0]||(n[0]=r=>t.state.current.client.name=r),label:"Client",placeholder:"Enter client name",class:"bg-white pd-medium radius-small mn-b-thin"},null,8,["field"]),e.createVNode(p.default,{field:t.state.current.comment,"onUpdate:field":n[1]||(n[1]=r=>t.state.current.comment=r),label:"Comment",placeholder:"Enter comment",class:"bg-white pd-medium radius-small mn-b-thin"},null,8,["field"])]),_:1}),e.createVNode(o.default,{class:"mn-b-semi"},{default:e.withCtx(()=>[e.createElementVNode("div",P,[O,e.createElementVNode("span",null,e.toDisplayString(e.unref(b))+" "+e.toDisplayString(c.returnCurrency()),1)])]),_:1})]))}};exports.default=F;
@@ -6,7 +6,7 @@ import T from "../../../../components/Button/Button.vue.js";
6
6
  import q from "../../../../components/Popup/Popup.vue.js";
7
7
  import c from "../../../../components/Block/Block.vue.js";
8
8
  import x from "../blocks/CardOrderItem.vue.js";
9
- import "../../../../components/Select/Select.vue2.js";
9
+ import "../../../../components/Select/Select.vue.js";
10
10
  import "../../../../components/SelectMulti/SelectMulti.vue2.js";
11
11
  import "../../../../components/FieldPhone/all-countries.js";
12
12
  import "../../../../components/FieldPhone/FieldPhone2.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("../../../icons/navigation/IconEdit.vue.cjs");require("../../../../components/Spoiler/Spoiler.vue2.cjs");require("./DepartmentSub.vue2.cjs");const u=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),c=require("./User.vue.cjs");require("./CardDepartment.vue2.cjs");const d={class:"radius-big o-hidden cols-2-1_3"},p={class:"pd-medium w-100"},m=["innerHTML"],g={key:0},k={__name:"CardDepartment",props:{department:Object,organization:Object},setup(t){const n=t;return(o,a)=>{const s=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",d,[e.createElementVNode("div",p,[e.createVNode(s,{to:{name:"Department Edit",params:{_id:n.organization,department:t.department._id}},class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"},{default:e.withCtx(()=>[e.createVNode(l.default,{class:"i-regular",classes:"fill-white"})]),_:1},8,["to"]),e.createElementVNode("h3",{onClick:a[0]||(a[0]=r=>o.$router.push(`/organizations/${n.organization}/departments/${t.department._id}`)),class:"mn-b-small w-100",innerHTML:t.department.profile.name},null,8,m),e.createElementVNode("ul",null,[t.department.members.length<1?(e.openBlock(),e.createElementBlock("li",g,"В отделе еще нет участников")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.department.members,(r,i)=>(e.openBlock(),e.createBlock(c.default,{class:"br-b br-solid br-grey",key:i,user:r.user,position:r.position,onClick:b=>o.$router.push(`/app/profile/${r.user._id}`)},null,8,["user","position","onClick"]))),128))])])])}}},_=u.default(k,[["__scopeId","data-v-745afcf2"]]);exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("../../../icons/navigation/IconEdit.vue.cjs");require("../../../../components/Spoiler/Spoiler.vue.cjs");require("./DepartmentSub.vue2.cjs");const u=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),c=require("./User.vue.cjs");require("./CardDepartment.vue2.cjs");const d={class:"radius-big o-hidden cols-2-1_3"},p={class:"pd-medium w-100"},m=["innerHTML"],g={key:0},k={__name:"CardDepartment",props:{department:Object,organization:Object},setup(t){const n=t;return(o,a)=>{const s=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",d,[e.createElementVNode("div",p,[e.createVNode(s,{to:{name:"Department Edit",params:{_id:n.organization,department:t.department._id}},class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"},{default:e.withCtx(()=>[e.createVNode(l.default,{class:"i-regular",classes:"fill-white"})]),_:1},8,["to"]),e.createElementVNode("h3",{onClick:a[0]||(a[0]=r=>o.$router.push(`/organizations/${n.organization}/departments/${t.department._id}`)),class:"mn-b-small w-100",innerHTML:t.department.profile.name},null,8,m),e.createElementVNode("ul",null,[t.department.members.length<1?(e.openBlock(),e.createElementBlock("li",g,"В отделе еще нет участников")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.department.members,(r,i)=>(e.openBlock(),e.createBlock(c.default,{class:"br-b br-solid br-grey",key:i,user:r.user,position:r.position,onClick:b=>o.$router.push(`/app/profile/${r.user._id}`)},null,8,["user","position","onClick"]))),128))])])])}}},_=u.default(k,[["__scopeId","data-v-745afcf2"]]);exports.default=_;
@@ -1,6 +1,6 @@
1
1
  import { resolveComponent as p, openBlock as r, createElementBlock as o, createElementVNode as n, createVNode as l, withCtx as c, createCommentVNode as u, Fragment as _, renderList as f, createBlock as g } from "vue";
2
2
  import h from "../../../icons/navigation/IconEdit.vue.js";
3
- import "../../../../components/Spoiler/Spoiler.vue2.js";
3
+ import "../../../../components/Spoiler/Spoiler.vue.js";
4
4
  import "./DepartmentSub.vue2.js";
5
5
  import b from "../../../../../../_virtual/_plugin-vue_export-helper.js";
6
6
  import k from "./User.vue.js";
@@ -1 +1 @@
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.vue2.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
+ "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,7 +1,7 @@
1
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
2
  import N from "../../../../components/SelectMulti/SelectMulti.vue.js";
3
3
  import S from "../../../../components/Field/Field.vue.js";
4
- import "../../../../components/Select/Select.vue2.js";
4
+ import "../../../../components/Select/Select.vue.js";
5
5
  import V from "../../../../../../_virtual/_plugin-vue_export-helper.js";
6
6
  import $ from "../../../../components/Feed/Feed.vue.js";
7
7
  import B from "./User.vue.js";
@@ -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.vue2.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
+ "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,6 +1,6 @@
1
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
2
  import { useRouter as v, useRoute as $ } from "vue-router";
3
- import "../../../../components/Spoiler/Spoiler.vue2.js";
3
+ import "../../../../components/Spoiler/Spoiler.vue.js";
4
4
  import x from "../blocks/DepartmentSub.vue.js";
5
5
  import E from "../blocks/User.vue.js";
6
6
  import { actions as D, state as s } from "../../store/departments.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const C=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const v=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue2.cjs");const n=require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../components/Address/Address.vue.cjs");require("../../../../components/Loader/Loader.vue2.cjs");require("../../../../components/LocationMarker/LocationMarker.vue.cjs");const N=require("../../../../components/Button/Button.vue.cjs"),g=require("../../../../components/Popup/Popup.vue.cjs"),V=require("../../../../components/Block/Block.vue.cjs");require("../blocks/EditArray.vue2.cjs");const P=require("../blocks/DepartmentSub.vue.cjs"),k=require("../blocks/DepartmentMemberModify.vue.cjs"),x=require("../blocks/User.vue.cjs"),t=require("../../store/departments.cjs"),p=require("../../store/memberships.cjs"),O={class:"for-transition pd-thin w-100"},M={class:"mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big"},S={key:0,class:"mn-r-auto"},T={key:1,class:"mn-r-auto"},U={class:"flex-nowrap flex pd-thin"},z={class:"cols-2-fit-content"},F={class:"w-100 flex-child-grow-1 flex-child"},R={class:"cols-2 gap-thin"},$={class:"bg-grey pd-medium o-hidden radius-big"},A=e.createElementVNode("h3",{class:"mn-b-semi"},"Department Settings",-1),L=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please settings for your department:",-1),j={class:"cols-1 gap-thin"},H=e.createElementVNode("h4",null,"Products",-1),I={class:"bg-grey pd-medium o-hidden radius-big"},G=e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1),J=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select organization accesses for user in department:",-1),K={class:"cols-1 gap-thin"},Q=e.createElementVNode("h4",null,"Products",-1),W=e.createElementVNode("h4",null,"Orders",-1),X={key:1,class:"flex-nowrap flex pd-thin"},Y={id:"dash",class:"pd-medium bg-white"},Z={class:"mn-b-regular flex-v-center flex-nowrap flex"},ee=e.createElementVNode("h3",{class:"mn-r-small"},"Подотделы ",-1),te={class:"mn-b-small"},ae={key:0},le={__name:"DepartmentEdit",setup(re){const w=_.useRouter(),l=_.useRoute();async function y(){l.params.department&&await p.actions.read({target:l.params._id}),e.ref(p.state.memberships),await t.actions.read(l.params._id),l.params.department&&await t.actions.readOne(l.params.department)}y();const d=e.ref(!1),i=e.ref(null);function u(r){d.value=!0,typeof r=="number"&&(i.value=r)}function f(){d.value=!1,i.value=null}const m=e.ref(!1),c=e.ref(null);function h(r){m.value=!0,typeof r=="number"&&(c.value=r)}function b(){m.value=!1,c.value=null}async function E(){l.params.department&&await t.actions.update(l.params._id,t.state.department),l.params.department||await t.actions.create(l.params._id,t.state.department)}function D(){w.replace({name:"Department",params:{_id:l.params._id,department:t.state.department._id}})}async function q(){await t.actions.delete(l.params._id,t.state.department)}return(r,s)=>(e.openBlock(),e.createElementBlock("div",O,[e.createElementVNode("header",M,[e.unref(l).params.department?(e.openBlock(),e.createElementBlock("h1",S,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",T,"Create Department")),e.createElementVNode("section",U,[e.createVNode(N.default,{submit:E,callback:D,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode("Save Department")]),_:1})])]),t.state.department.profile?(e.openBlock(),e.createBlock(V.default,{key:0,title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",z,[e.createVNode(C.default,{photo:t.state.department.profile.photo,"onUpdate:photo":s[0]||(s[0]=a=>t.state.department.profile.photo=a),uploadPath:"organizations/"+t.state.department.name+"/avatars",class:"w-8r aspect-1x1 o-hidden mn-r-small radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",F,[e.createVNode(v.default,{field:t.state.department.profile.name,"onUpdate:field":s[1]||(s[1]=a=>t.state.department.profile.name=a),label:"Name",placeholder:"Department Name",class:"mn-b-small bg-white radius-small pd-medium",validation:r.organizationName},null,8,["field","validation"]),e.createVNode(v.default,{field:t.state.department.profile.description,"onUpdate:field":s[2]||(s[2]=a=>t.state.department.profile.description=a),label:"Description",placeholder:"Department description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:r.organizationName},null,8,["field","validation"])])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(V.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>u()}],class:"cols-1 gap-thin mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(a,o)=>(e.openBlock(),e.createBlock(x.default,{class:"bg-grey o-hidden radius-small mn-b-thin",key:o,user:a.user,photo:a.user.profile.photo,name:a.user.profile.name||a.user.phone||a.user.email||a.user._id,position:a.position,onClick:B=>u(o)},null,8,["user","photo","name","position","onClick"]))),128))]),_:1},8,["actions"]),e.createVNode(g.default,{title:"Добавить участника",onClosePopup:f,isPopupOpen:d.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(k.default,{members:t.state.department.members,member:i.value,users:p.state.memberships,onCallback:f},null,8,["members","member","users"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",R,[e.createElementVNode("div",$,[A,L,e.createElementVNode("div",j,[H,e.createVNode(n.default,{label:"Hidden department",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"])])]),e.createElementVNode("div",I,[G,J,e.createElementVNode("div",K,[Q,e.createVNode(n.default,{label:"See products",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(n.default,{label:"Edit products",name:"Delivery",value:"courier",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(n.default,{label:"Delete orders",name:"Delivery",value:"post",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),W,e.createVNode(n.default,{label:"See orders",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(n.default,{label:"Confirm orders",name:"Delivery",value:"courier",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(n.default,{label:"Delete orders",name:"Delivery",value:"post",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"])])])]),e.unref(l).params.department?(e.openBlock(),e.createElementBlock("section",X,[e.createVNode(N.default,{submit:q,callback:r.redirectToDash,class:"bg-grey"},{default:e.withCtx(()=>[e.createTextVNode("Delete Department")]),_:1},8,["callback"])])):e.createCommentVNode("",!0),e.createElementVNode("div",Y,[e.createVNode(g.default,{title:"Добавить подотдел",onClosePopup:b,isPopupOpen:m.value},{default:e.withCtx(()=>[e.createVNode(k.default,{departments:t.state.department.subdepartments,department:c.value,maindepartment:t.state.department,alldepartments:t.state.departments,onCallback:b},null,8,["departments","department","maindepartment","alldepartments"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",Z,[ee,e.createElementVNode("div",null,[e.createElementVNode("a",{class:"t-main h5",onClick:s[3]||(s[3]=a=>h())},"+")])]),e.createElementVNode("ul",te,[t.state.department.subdepartments.length<1?(e.openBlock(),e.createElementBlock("li",ae,"В отделе еще нет подотделов")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.subdepartments,(a,o)=>(e.openBlock(),e.createBlock(P.default,{key:o,class:"bg-grey o-hidden radius-small mn-b-thin",department:a,onClick:B=>h(o)},null,8,["department","onClick"]))),128))])])]))}};exports.default=le;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const C=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const v=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue.cjs");const n=require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../components/Address/Address.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/LocationMarker/LocationMarker.vue.cjs");const N=require("../../../../components/Button/Button.vue.cjs"),g=require("../../../../components/Popup/Popup.vue.cjs"),V=require("../../../../components/Block/Block.vue.cjs");require("../blocks/EditArray.vue2.cjs");const P=require("../blocks/DepartmentSub.vue.cjs"),k=require("../blocks/DepartmentMemberModify.vue.cjs"),x=require("../blocks/User.vue.cjs"),t=require("../../store/departments.cjs"),p=require("../../store/memberships.cjs"),O={class:"for-transition pd-thin w-100"},M={class:"mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big"},S={key:0,class:"mn-r-auto"},T={key:1,class:"mn-r-auto"},U={class:"flex-nowrap flex pd-thin"},z={class:"cols-2-fit-content"},F={class:"w-100 flex-child-grow-1 flex-child"},R={class:"cols-2 gap-thin"},$={class:"bg-grey pd-medium o-hidden radius-big"},A=e.createElementVNode("h3",{class:"mn-b-semi"},"Department Settings",-1),L=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please settings for your department:",-1),j={class:"cols-1 gap-thin"},H=e.createElementVNode("h4",null,"Products",-1),I={class:"bg-grey pd-medium o-hidden radius-big"},G=e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1),J=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select organization accesses for user in department:",-1),K={class:"cols-1 gap-thin"},Q=e.createElementVNode("h4",null,"Products",-1),W=e.createElementVNode("h4",null,"Orders",-1),X={key:1,class:"flex-nowrap flex pd-thin"},Y={id:"dash",class:"pd-medium bg-white"},Z={class:"mn-b-regular flex-v-center flex-nowrap flex"},ee=e.createElementVNode("h3",{class:"mn-r-small"},"Подотделы ",-1),te={class:"mn-b-small"},ae={key:0},le={__name:"DepartmentEdit",setup(re){const w=_.useRouter(),l=_.useRoute();async function y(){l.params.department&&await p.actions.read({target:l.params._id}),e.ref(p.state.memberships),await t.actions.read(l.params._id),l.params.department&&await t.actions.readOne(l.params.department)}y();const d=e.ref(!1),i=e.ref(null);function u(r){d.value=!0,typeof r=="number"&&(i.value=r)}function f(){d.value=!1,i.value=null}const m=e.ref(!1),c=e.ref(null);function h(r){m.value=!0,typeof r=="number"&&(c.value=r)}function b(){m.value=!1,c.value=null}async function E(){l.params.department&&await t.actions.update(l.params._id,t.state.department),l.params.department||await t.actions.create(l.params._id,t.state.department)}function D(){w.replace({name:"Department",params:{_id:l.params._id,department:t.state.department._id}})}async function q(){await t.actions.delete(l.params._id,t.state.department)}return(r,s)=>(e.openBlock(),e.createElementBlock("div",O,[e.createElementVNode("header",M,[e.unref(l).params.department?(e.openBlock(),e.createElementBlock("h1",S,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",T,"Create Department")),e.createElementVNode("section",U,[e.createVNode(N.default,{submit:E,callback:D,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode("Save Department")]),_:1})])]),t.state.department.profile?(e.openBlock(),e.createBlock(V.default,{key:0,title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",z,[e.createVNode(C.default,{photo:t.state.department.profile.photo,"onUpdate:photo":s[0]||(s[0]=a=>t.state.department.profile.photo=a),uploadPath:"organizations/"+t.state.department.name+"/avatars",class:"w-8r aspect-1x1 o-hidden mn-r-small radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",F,[e.createVNode(v.default,{field:t.state.department.profile.name,"onUpdate:field":s[1]||(s[1]=a=>t.state.department.profile.name=a),label:"Name",placeholder:"Department Name",class:"mn-b-small bg-white radius-small pd-medium",validation:r.organizationName},null,8,["field","validation"]),e.createVNode(v.default,{field:t.state.department.profile.description,"onUpdate:field":s[2]||(s[2]=a=>t.state.department.profile.description=a),label:"Description",placeholder:"Department description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:r.organizationName},null,8,["field","validation"])])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(V.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>u()}],class:"cols-1 gap-thin mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(a,o)=>(e.openBlock(),e.createBlock(x.default,{class:"bg-grey o-hidden radius-small mn-b-thin",key:o,user:a.user,photo:a.user.profile.photo,name:a.user.profile.name||a.user.phone||a.user.email||a.user._id,position:a.position,onClick:B=>u(o)},null,8,["user","photo","name","position","onClick"]))),128))]),_:1},8,["actions"]),e.createVNode(g.default,{title:"Добавить участника",onClosePopup:f,isPopupOpen:d.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(k.default,{members:t.state.department.members,member:i.value,users:p.state.memberships,onCallback:f},null,8,["members","member","users"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",R,[e.createElementVNode("div",$,[A,L,e.createElementVNode("div",j,[H,e.createVNode(n.default,{label:"Hidden department",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"])])]),e.createElementVNode("div",I,[G,J,e.createElementVNode("div",K,[Q,e.createVNode(n.default,{label:"See products",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(n.default,{label:"Edit products",name:"Delivery",value:"courier",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(n.default,{label:"Delete orders",name:"Delivery",value:"post",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),W,e.createVNode(n.default,{label:"See orders",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(n.default,{label:"Confirm orders",name:"Delivery",value:"courier",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(n.default,{label:"Delete orders",name:"Delivery",value:"post",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"])])])]),e.unref(l).params.department?(e.openBlock(),e.createElementBlock("section",X,[e.createVNode(N.default,{submit:q,callback:r.redirectToDash,class:"bg-grey"},{default:e.withCtx(()=>[e.createTextVNode("Delete Department")]),_:1},8,["callback"])])):e.createCommentVNode("",!0),e.createElementVNode("div",Y,[e.createVNode(g.default,{title:"Добавить подотдел",onClosePopup:b,isPopupOpen:m.value},{default:e.withCtx(()=>[e.createVNode(k.default,{departments:t.state.department.subdepartments,department:c.value,maindepartment:t.state.department,alldepartments:t.state.departments,onCallback:b},null,8,["departments","department","maindepartment","alldepartments"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",Z,[ee,e.createElementVNode("div",null,[e.createElementVNode("a",{class:"t-main h5",onClick:s[3]||(s[3]=a=>h())},"+")])]),e.createElementVNode("ul",te,[t.state.department.subdepartments.length<1?(e.openBlock(),e.createElementBlock("li",ae,"В отделе еще нет подотделов")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.subdepartments,(a,o)=>(e.openBlock(),e.createBlock(P.default,{key:o,class:"bg-grey o-hidden radius-small mn-b-thin",department:a,onClick:B=>h(o)},null,8,["department","onClick"]))),128))])])]))}};exports.default=le;
@@ -7,10 +7,10 @@ import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
7
7
  import L from "../../../../components/UploadImage/UploadImage.vue.js";
8
8
  import "../../../../components/Tab/Tab.vue.js";
9
9
  import $ from "../../../../components/Field/Field.vue.js";
10
- import "../../../../components/Select/Select.vue2.js";
10
+ import "../../../../components/Select/Select.vue.js";
11
11
  import m from "../../../../components/Checkbox/Checkbox.vue.js";
12
12
  import "../../../../components/Address/Address.vue.js";
13
- import "../../../../components/Loader/Loader.vue2.js";
13
+ import "../../../../components/Loader/Loader.vue.js";
14
14
  import "../../../../components/LocationMarker/LocationMarker.vue.js";
15
15
  import O from "../../../../components/Button/Button.vue.js";
16
16
  import S from "../../../../components/Popup/Popup.vue.js";
@@ -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.vue2.cjs");require("vue-i18n");require("../../../../components/Field/Field.vue2.cjs");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.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;
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");require("../../../../components/Field/Field.vue2.cjs");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("../../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,16 +1,16 @@
1
1
  import { ref as p, onMounted as $, computed as k, openBlock as a, createBlock as _, Transition as x, withCtx as C, createElementVNode as t, createVNode as f, createElementBlock as r, Fragment as b, renderList as v, createCommentVNode as l, toDisplayString as d } from "vue";
2
2
  import { useRoute as M, useRouter as I } from "vue-router";
3
- import "../../../../components/Loader/Loader.vue2.js";
3
+ import "../../../../components/Loader/Loader.vue.js";
4
4
  import "vue-i18n";
5
5
  import "../../../../components/Field/Field.vue2.js";
6
6
  import S from "../../../../components/Tab/Tab.vue2.js";
7
7
  import "../../../../components/Tooltip/Tooltip.vue2.js";
8
8
  import z from "../sections/MembersAdd.vue.js";
9
- import "../../../mobile/components/Menu/Menu.vue.js";
9
+ import "../../../mobile/components/Menu/Menu.vue2.js";
10
10
  import "../../../mobile/components/Menu/MenuItem.vue.js";
11
11
  import B from "../blocks/User.vue.js";
12
12
  import { state as E } from "../../../auth/store/auth.js";
13
- import { actions as c, state as h } from "../../../auth/store/invites.js";
13
+ import { actions as c, state as h } from "../../store/invites.js";
14
14
  import { actions as N, state as V } from "../../store/memberships.js";
15
15
  import { actions as D } from "../../store/organizations.js";
16
16
  import { state as R } from "../../store/departments.js";
@@ -1 +1 @@
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.vue2.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;
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.vue2.cjs"),p=require("../../../../components/Block/Block.vue.cjs"),f=require("../../../../components/Feed/Feed.vue.cjs");require("../../../mobile/components/Menu/Menu.vue2.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"),o=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 o.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:o.state.current,user:s.state.user,class:"mn-b-semi"},null,8,["organization","user"]),e.createVNode(p.default,{title:`${o.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:a=>B.actions.read(a),state:null},options:{organization:e.unref(t).params._id,user:s.state.user._id,hidden:!1}},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(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]=a=>r.value=a),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===o.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:o.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:a=>N.actions.read(e.unref(t).params._id),state:o.state},options:{user:s.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(l,d)=>(e.openBlock(),e.createBlock(q.default,{key:d,spot:l,organization:o.state.current,class:"radius-big bg-grey mn-b-thin"},null,8,["spot","organization"]))),128))]),_:1},8,["states","store","options"]),s.state.user._id===o.state.current.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[1]||(n[1]=a=>i.$router.push(`/spots/${o.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;