@ozdao/prometheus-framework 0.2.55 → 0.2.57

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. package/dist/gallery.server.js +4 -0
  2. package/dist/gallery.server.mjs +4 -0
  3. package/dist/main-37ee0513.mjs +13715 -0
  4. package/dist/main-b11c45d0.js +91 -0
  5. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +55 -32
  7. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +2 -70
  9. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +70 -2
  11. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/Select/Select.vue.js +2 -95
  13. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +95 -2
  15. package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.js +2 -33
  17. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  19. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +6 -4
  21. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  23. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  25. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +3 -2
  27. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  28. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -65
  29. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  30. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +65 -2
  31. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  33. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  35. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  37. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
  39. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  41. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockSearch.vue.js +16 -18
  45. package/dist/prometheus-framework/src/modules/globals/store/globals.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/globals/store/globals.js +48 -33
  47. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  49. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +2 -11
  51. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +11 -2
  53. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrderItem.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/orders/components/blocks/CardOrderItem.vue.js +52 -43
  55. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +110 -78
  57. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  61. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +4 -3
  63. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  65. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  67. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  69. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  71. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  73. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +7 -5
  75. package/dist/prometheus-framework/src/modules/organizations/router/organizations.router.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/organizations/router/organizations.router.js +1 -1
  77. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +15 -15
  79. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  81. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  87. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  89. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  90. package/dist/prometheus-framework/src/modules/products/store/products.js +27 -27
  91. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  92. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  93. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  94. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  95. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  96. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +2 -2
  97. package/dist/style.css +1 -1
  98. package/dist/web-021a4053.js +1 -0
  99. package/dist/web-0a68cf2a.mjs +55 -0
  100. package/package.json +1 -1
  101. package/src/modules/organizations/router/organizations.router.js +2 -2
@@ -1,106 +1,138 @@
1
- import { reactive as C, toRefs as D, ref as l, onMounted as S, computed as x, openBlock as e, createElementBlock as o, Fragment as w, createVNode as u, withCtx as N, createCommentVNode as s, renderList as T, createBlock as U, createElementVNode as i, createTextVNode as p, unref as n, toDisplayString as d } from "vue";
2
- import { useRoute as z } from "vue-router";
3
- import E from "../../../../components/Block/Block.vue.js";
1
+ import { ref as V, onMounted as S, openBlock as e, createElementBlock as t, createVNode as p, withCtx as _, createElementVNode as r, unref as s, Fragment as B, renderList as D, createBlock as E, createCommentVNode as n, createTextVNode as f, toDisplayString as d } from "vue";
2
+ import { useRoute as q } from "vue-router";
3
+ import z from "../../../../components/Feed/Feed.vue.js";
4
+ import A from "../../../../components/Popup/Popup.vue2.js";
5
+ import L from "../../../../components/Block/Block.vue.js";
6
+ import I from "../blocks/CardOrderItem.vue.js";
4
7
  import "../../../../components/Field/Field.vue.js";
5
- import V from "../../../products/components/blocks/CardPosition.vue.js";
6
- import "../../../products/store/leftovers.js";
7
- import "../../../products/components/blocks/ListPositions.vue2.js";
8
- import { actions as m, state as _ } from "../../store/orders.js";
9
- import { actions as F } from "../../../products/store/products.js";
8
+ import "../../../../components/Select/Select.vue.js";
9
+ import "../../../../components/SelectMulti/SelectMulti.vue2.js";
10
+ import { actions as u } from "../../../globals/store/globals.js";
11
+ import { state as a } from "../../store/orders.js";
12
+ import { actions as M } from "../../../products/store/products.js";
10
13
  import "./EditOrder.vue2.js";
11
- const I = /* @__PURE__ */ i("header", { class: "mn-b-medium flex-v-center flex-nowrap flex" }, [
12
- /* @__PURE__ */ i("h2", { class: "mn-r-medium" }, "Edit Order")
13
- ], -1), L = {
14
+ const j = /* @__PURE__ */ r("header", { class: "mn-b-medium flex-v-center flex-nowrap flex" }, [
15
+ /* @__PURE__ */ r("h2", { class: "mn-r-medium" }, "Create Order")
16
+ ], -1), G = /* @__PURE__ */ r("h3", { class: "mn-b-small" }, "Add to order", -1), H = { class: "bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big" }, J = {
14
17
  key: 0,
15
18
  class: "w-100"
16
- }, M = { class: "mn-thinw-100 flex-v-center flex block" }, j = { class: "p-big" }, q = {
19
+ }, K = { class: "mn-thinw-100 flex-v-center flex block" }, Q = { class: "p-big" }, U = {
17
20
  key: 0,
18
21
  class: "p-big t-semi"
19
- }, G = {
22
+ }, W = {
20
23
  key: 1,
21
24
  class: "p-big t-semi"
22
- }, H = {
25
+ }, X = {
23
26
  key: 2,
24
27
  class: "p-big t-semi"
25
- }, J = { key: 3 }, K = { key: 4 }, Q = { key: 5 }, W = /* @__PURE__ */ i("button", { class: "mn-l-auto button" }, "Запросить онлайн", -1), ae = {
28
+ }, Y = { key: 3 }, Z = { key: 4 }, ee = { key: 5 }, te = /* @__PURE__ */ r("button", { class: "mn-l-auto button" }, "Запросить онлайн", -1), ye = {
26
29
  __name: "EditOrder",
27
- props: ["showProduct"],
28
- setup(A) {
29
- const B = z(), O = A;
30
- O.showProduct = [];
31
- function f(t) {
32
- m.addProduct(t);
30
+ setup(oe) {
31
+ const R = q(), m = V(!1);
32
+ function F() {
33
+ m.value = !0;
33
34
  }
34
- function R(t) {
35
- m.deleteProduct(t);
35
+ function h() {
36
+ m.value = !1;
36
37
  }
37
- let $ = C([]);
38
- D($), l(!1);
39
- const a = l([]);
40
- let r = l({});
41
- S(async () => {
42
- try {
43
- const t = await F.read({
44
- organization: "65141c476cf9860013b49f6d"
45
- });
46
- console.log(t), a.value = t;
47
- } catch {
48
- console.error("error");
49
- }
50
- await m.fetchOrder(B.params.id), r.value = _.current;
51
- });
52
- const c = x(() => 100);
53
- return x(() => []), (t, X) => {
54
- var h, v, y, k, b, P;
55
- return e(), o(w, null, [
56
- I,
57
- u(E, {
58
- title: "Add Position",
59
- class: "mn-b-semi"
38
+ let i = V(null);
39
+ return S(async () => {
40
+ }), (l, se) => {
41
+ var b, y, v, g, k, P, w, x, C, N, O, T;
42
+ return e(), t("div", null, [
43
+ j,
44
+ p(A, {
45
+ title: "Добавить участника",
46
+ onClosePopup: h,
47
+ isPopupOpen: m.value,
48
+ class: "bg-white w-min-30r w-max-30r radius-big pd-medium"
60
49
  }, {
61
- default: N(() => [
62
- u(V, {
63
- onAdd: f,
64
- products: a.value
65
- }, null, 8, ["products"])
50
+ default: _(() => [
51
+ G,
52
+ r("div", H, [
53
+ p(z, {
54
+ search: !0,
55
+ states: {
56
+ empty: {
57
+ title: "No Products Found",
58
+ description: "Currently, there are no such products available."
59
+ }
60
+ },
61
+ store: {
62
+ read: (o) => M.read(o),
63
+ state: null
64
+ },
65
+ options: {
66
+ organization: s(R).params._id
67
+ },
68
+ class: ""
69
+ }, {
70
+ default: _(({
71
+ items: o
72
+ }) => [
73
+ (e(!0), t(B, null, D(o, (c, ne) => (e(), E(I, {
74
+ key: c._id,
75
+ editable: !1,
76
+ product: c,
77
+ onClick: () => {
78
+ let $ = { ...c };
79
+ $.quantity = 1, u.add(a.current.positions, $), h();
80
+ },
81
+ class: "bg-white pd-thin radius-medium w-100 mn-b-thin"
82
+ }, null, 8, ["product", "onClick"]))), 128))
83
+ ]),
84
+ _: 1
85
+ }, 8, ["states", "store", "options"])
86
+ ])
66
87
  ]),
67
88
  _: 1
68
- }),
69
- u(E, {
89
+ }, 8, ["isPopupOpen"]),
90
+ p(L, {
70
91
  title: "Invetory Sheet",
92
+ actions: [{
93
+ label: "+",
94
+ function: () => F()
95
+ }],
71
96
  class: "mn-b-semi"
72
97
  }, {
73
- default: N(() => [
74
- _.current.positions.length === 0 ? (e(), o("span", L, " No positions added yet ")) : s("", !0),
75
- (e(!0), o(w, null, T(_.current.positions, (g, Y) => (e(), U(V, {
76
- key: g._id,
77
- product: g,
78
- products: a.value,
79
- onAdd: f,
80
- onDelete: R,
81
- onUpdate: t.updateProduct
82
- }, null, 8, ["product", "products", "onUpdate"]))), 128))
98
+ default: _(() => [
99
+ a.current.positions.length === 0 ? (e(), t("span", J, " No positions added yet ")) : n("", !0),
100
+ (e(!0), t(B, null, D(a.current.positions, (o, c) => (e(), E(I, {
101
+ key: o._id,
102
+ editable: !0,
103
+ product: o,
104
+ onIncrease: () => {
105
+ u.increment(a.current.positions, o);
106
+ },
107
+ onDecrease: () => {
108
+ u.decrement(a.current.positions, o);
109
+ },
110
+ onRemove: () => {
111
+ u.delete(a.current.positions, o);
112
+ },
113
+ class: "mn-b-thin pd-thin radius-medium bg-white"
114
+ }, null, 8, ["product", "onIncrease", "onDecrease", "onRemove"]))), 128))
83
115
  ]),
84
116
  _: 1
85
- }),
86
- i("div", M, [
87
- i("p", j, [
88
- p("Сумма к оплате: "),
89
- ((h = n(r).info) == null ? void 0 : h.delivery) === "Самовывоз" ? (e(), o("span", q, d(c.value / 100) + " ₽", 1)) : s("", !0),
90
- ((v = n(r).info) == null ? void 0 : v.delivery) === "Курьером" ? (e(), o("span", G, d(c.value / 100 + 350) + " ₽", 1)) : s("", !0),
91
- ((y = n(r).info) == null ? void 0 : y.delivery) === "Почтой" ? (e(), o("span", H, d(c.value / 100 + 550) + " ₽", 1)) : s("", !0),
92
- p(" (Заказ " + d(c.value / 100) + " ₽ + доставка ", 1),
93
- ((k = n(r).info) == null ? void 0 : k.delivery) === "Самовывоз" ? (e(), o("span", J, "0")) : s("", !0),
94
- ((b = n(r).info) == null ? void 0 : b.delivery) === "Курьером" ? (e(), o("span", K, "350")) : s("", !0),
95
- ((P = n(r).info) == null ? void 0 : P.delivery) === "Почтой" ? (e(), o("span", Q, "550")) : s("", !0),
96
- p(" ₽) ")
117
+ }, 8, ["actions"]),
118
+ r("div", K, [
119
+ r("p", Q, [
120
+ f("Сумма к оплате: "),
121
+ ((y = (b = s(i)) == null ? void 0 : b.info) == null ? void 0 : y.delivery) === "Самовывоз" ? (e(), t("span", U, d(l.orderTotalPrice / 100) + " ₽", 1)) : n("", !0),
122
+ ((g = (v = s(i)) == null ? void 0 : v.info) == null ? void 0 : g.delivery) === "Курьером" ? (e(), t("span", W, d(l.orderTotalPrice / 100 + 350) + " ₽", 1)) : n("", !0),
123
+ ((P = (k = s(i)) == null ? void 0 : k.info) == null ? void 0 : P.delivery) === "Почтой" ? (e(), t("span", X, d(l.orderTotalPrice / 100 + 550) + " ₽", 1)) : n("", !0),
124
+ f(" (Заказ " + d(l.orderTotalPrice / 100) + " ₽ + доставка ", 1),
125
+ ((x = (w = s(i)) == null ? void 0 : w.info) == null ? void 0 : x.delivery) === "Самовывоз" ? (e(), t("span", Y, "0")) : n("", !0),
126
+ ((N = (C = s(i)) == null ? void 0 : C.info) == null ? void 0 : N.delivery) === "Курьером" ? (e(), t("span", Z, "350")) : n("", !0),
127
+ ((T = (O = s(i)) == null ? void 0 : O.info) == null ? void 0 : T.delivery) === "Почтой" ? (e(), t("span", ee, "550")) : n("", !0),
128
+ f(" ₽) ")
97
129
  ]),
98
- W
130
+ te
99
131
  ])
100
- ], 64);
132
+ ]);
101
133
  };
102
134
  }
103
135
  };
104
136
  export {
105
- ae as default
137
+ ye as default
106
138
  };
@@ -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.vue2.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.vue2.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.vue2.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"),g=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 P=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const N=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue2.cjs");const S=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),o=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 V=require("../../../../components/Button/Button.vue2.cjs"),k=require("../../../../components/Popup/Popup.vue.cjs"),w=require("../../../../components/Block/Block.vue.cjs");require("../../../../../../node_modules/vue-select/dist/vue-select.es.cjs");require("../blocks/EditArray.vue2.cjs");const O=require("../blocks/DepartmentSub.vue.cjs"),y=require("../blocks/DepartmentMemberModify.vue.cjs"),M=require("../blocks/User.vue.cjs"),t=require("../../store/departments.cjs"),f=require("../../store/memberships.cjs");require("./DepartmentEdit.vue2.cjs");const n=i=>(e.pushScopeId("data-v-7ec9277b"),i=i(),e.popScopeId(),i),T={class:"for-transition pd-thin w-100"},I={class:"mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big"},U={key:0,class:"mn-r-auto"},z={key:1,class:"mn-r-auto"},F={class:"flex-nowrap flex pd-thin"},R={class:"cols-2-fit-content"},$={class:"w-100 flex-child-grow-1 flex-child"},A={class:"cols-2 gap-thin"},H={class:"bg-grey pd-medium o-hidden radius-big"},L=n(()=>e.createElementVNode("h3",{class:"mn-b-semi"},"Department Settings",-1)),j=n(()=>e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please settings for your department:",-1)),G={class:"cols-1 gap-thin"},J=n(()=>e.createElementVNode("h4",null,"Products",-1)),K={class:"bg-grey pd-medium o-hidden radius-big"},Q=n(()=>e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1)),W=n(()=>e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select organization accesses for user in department:",-1)),X={class:"cols-1 gap-thin"},Y=n(()=>e.createElementVNode("h4",null,"Products",-1)),Z=n(()=>e.createElementVNode("h4",null,"Orders",-1)),ee={key:1,class:"flex-nowrap flex pd-thin"},te={id:"dash",class:"pd-medium bg-white"},ae={class:"mn-b-regular flex-v-center flex-nowrap flex"},le=n(()=>e.createElementVNode("h3",{class:"mn-r-small"},"Подотделы ",-1)),re={class:"mn-b-small"},se={key:0},ne={__name:"DepartmentEdit",setup(i){const E=g.useRouter(),l=g.useRoute();async function D(){l.params.department&&await f.actions.read({target:l.params._id}),e.ref(f.state.memberships),await t.actions.read(l.params._id),l.params.department&&await t.actions.readOne(l.params.department)}D();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}const p=e.ref(!1),u=e.ref(null);function _(r){p.value=!0,typeof r=="number"&&(u.value=r)}function v(){p.value=!1,u.value=null}async function q(){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 B(){E.replace({name:"Department",params:{_id:l.params._id,department:t.state.department._id}})}async function x(){await t.actions.delete(l.params._id,t.state.department)}return(r,s)=>(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("header",I,[e.unref(l).params.department?(e.openBlock(),e.createElementBlock("h1",U,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",z,"Create Department")),e.createElementVNode("section",F,[e.createVNode(V.default,{submit:q,callback:B,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode("Save Department")]),_:1})])]),t.state.department.profile?(e.openBlock(),e.createBlock(w.default,{key:0,title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",R,[e.createVNode(P.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",$,[e.createVNode(N.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(N.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(w.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>h()}],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,d)=>(e.openBlock(),e.createBlock(M.default,{class:"bg-grey o-hidden radius-small mn-b-thin",key:d,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:C=>h(d)},null,8,["user","photo","name","position","onClick"]))),128))]),_:1},8,["actions"]),e.createVNode(k.default,{title:"Добавить участника",onClosePopup:b,isPopupOpen:m.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(y.default,{members:t.state.department.members,member:c.value,users:f.state.memberships,onCallback:b},null,8,["members","member","users"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",A,[e.createElementVNode("div",H,[L,j,e.createElementVNode("div",G,[J,e.createVNode(o.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",K,[Q,W,e.createElementVNode("div",X,[Y,e.createVNode(o.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(o.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(o.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"]),Z,e.createVNode(o.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(o.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(o.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",ee,[e.createVNode(V.default,{submit:x,callback:r.redirectToDash,class:"bg-grey"},{default:e.withCtx(()=>[e.createTextVNode("Delete Department")]),_:1},8,["callback"])])):e.createCommentVNode("",!0),e.createElementVNode("div",te,[e.createVNode(k.default,{title:"Добавить подотдел",onClosePopup:v,isPopupOpen:p.value},{default:e.withCtx(()=>[e.createVNode(y.default,{departments:t.state.department.subdepartments,department:u.value,maindepartment:t.state.department,alldepartments:t.state.departments,onCallback:v},null,8,["departments","department","maindepartment","alldepartments"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",ae,[le,e.createElementVNode("div",null,[e.createElementVNode("a",{class:"t-main h5",onClick:s[3]||(s[3]=a=>_())},"+")])]),e.createElementVNode("ul",re,[t.state.department.subdepartments.length<1?(e.openBlock(),e.createElementBlock("li",se,"В отделе еще нет подотделов")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.subdepartments,(a,d)=>(e.openBlock(),e.createBlock(O.default,{key:d,class:"bg-grey o-hidden radius-small mn-b-thin",department:a,onClick:C=>_(d)},null,8,["department","onClick"]))),128))])])]))}},oe=S.default(ne,[["__scopeId","data-v-7ec9277b"]]);exports.default=oe;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=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 P=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const N=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");const S=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),o=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 V=require("../../../../components/Button/Button.vue2.cjs"),k=require("../../../../components/Popup/Popup.vue2.cjs"),w=require("../../../../components/Block/Block.vue.cjs");require("../../../../../../node_modules/vue-select/dist/vue-select.es.cjs");require("../blocks/EditArray.vue2.cjs");const O=require("../blocks/DepartmentSub.vue.cjs"),y=require("../blocks/DepartmentMemberModify.vue.cjs"),M=require("../blocks/User.vue.cjs"),t=require("../../store/departments.cjs"),f=require("../../store/memberships.cjs");require("./DepartmentEdit.vue2.cjs");const n=i=>(e.pushScopeId("data-v-7ec9277b"),i=i(),e.popScopeId(),i),T={class:"for-transition pd-thin w-100"},I={class:"mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big"},U={key:0,class:"mn-r-auto"},z={key:1,class:"mn-r-auto"},F={class:"flex-nowrap flex pd-thin"},R={class:"cols-2-fit-content"},$={class:"w-100 flex-child-grow-1 flex-child"},A={class:"cols-2 gap-thin"},H={class:"bg-grey pd-medium o-hidden radius-big"},L=n(()=>e.createElementVNode("h3",{class:"mn-b-semi"},"Department Settings",-1)),j=n(()=>e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please settings for your department:",-1)),G={class:"cols-1 gap-thin"},J=n(()=>e.createElementVNode("h4",null,"Products",-1)),K={class:"bg-grey pd-medium o-hidden radius-big"},Q=n(()=>e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1)),W=n(()=>e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select organization accesses for user in department:",-1)),X={class:"cols-1 gap-thin"},Y=n(()=>e.createElementVNode("h4",null,"Products",-1)),Z=n(()=>e.createElementVNode("h4",null,"Orders",-1)),ee={key:1,class:"flex-nowrap flex pd-thin"},te={id:"dash",class:"pd-medium bg-white"},ae={class:"mn-b-regular flex-v-center flex-nowrap flex"},le=n(()=>e.createElementVNode("h3",{class:"mn-r-small"},"Подотделы ",-1)),re={class:"mn-b-small"},se={key:0},ne={__name:"DepartmentEdit",setup(i){const E=g.useRouter(),l=g.useRoute();async function D(){l.params.department&&await f.actions.read({target:l.params._id}),e.ref(f.state.memberships),await t.actions.read(l.params._id),l.params.department&&await t.actions.readOne(l.params.department)}D();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}const p=e.ref(!1),u=e.ref(null);function _(r){p.value=!0,typeof r=="number"&&(u.value=r)}function v(){p.value=!1,u.value=null}async function q(){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 B(){E.replace({name:"Department",params:{_id:l.params._id,department:t.state.department._id}})}async function x(){await t.actions.delete(l.params._id,t.state.department)}return(r,s)=>(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("header",I,[e.unref(l).params.department?(e.openBlock(),e.createElementBlock("h1",U,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",z,"Create Department")),e.createElementVNode("section",F,[e.createVNode(V.default,{submit:q,callback:B,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode("Save Department")]),_:1})])]),t.state.department.profile?(e.openBlock(),e.createBlock(w.default,{key:0,title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",R,[e.createVNode(P.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",$,[e.createVNode(N.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(N.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(w.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>h()}],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,d)=>(e.openBlock(),e.createBlock(M.default,{class:"bg-grey o-hidden radius-small mn-b-thin",key:d,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:C=>h(d)},null,8,["user","photo","name","position","onClick"]))),128))]),_:1},8,["actions"]),e.createVNode(k.default,{title:"Добавить участника",onClosePopup:b,isPopupOpen:m.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(y.default,{members:t.state.department.members,member:c.value,users:f.state.memberships,onCallback:b},null,8,["members","member","users"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",A,[e.createElementVNode("div",H,[L,j,e.createElementVNode("div",G,[J,e.createVNode(o.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",K,[Q,W,e.createElementVNode("div",X,[Y,e.createVNode(o.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(o.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(o.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"]),Z,e.createVNode(o.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(o.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(o.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",ee,[e.createVNode(V.default,{submit:x,callback:r.redirectToDash,class:"bg-grey"},{default:e.withCtx(()=>[e.createTextVNode("Delete Department")]),_:1},8,["callback"])])):e.createCommentVNode("",!0),e.createElementVNode("div",te,[e.createVNode(k.default,{title:"Добавить подотдел",onClosePopup:v,isPopupOpen:p.value},{default:e.withCtx(()=>[e.createVNode(y.default,{departments:t.state.department.subdepartments,department:u.value,maindepartment:t.state.department,alldepartments:t.state.departments,onCallback:v},null,8,["departments","department","maindepartment","alldepartments"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",ae,[le,e.createElementVNode("div",null,[e.createElementVNode("a",{class:"t-main h5",onClick:s[3]||(s[3]=a=>_())},"+")])]),e.createElementVNode("ul",re,[t.state.department.subdepartments.length<1?(e.openBlock(),e.createElementBlock("li",se,"В отделе еще нет подотделов")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.subdepartments,(a,d)=>(e.openBlock(),e.createBlock(O.default,{key:d,class:"bg-grey o-hidden radius-small mn-b-thin",department:a,onClick:C=>_(d)},null,8,["department","onClick"]))),128))])])]))}},oe=S.default(ne,[["__scopeId","data-v-7ec9277b"]]);exports.default=oe;
@@ -7,14 +7,14 @@ import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
7
7
  import G from "../../../../components/UploadImage/UploadImage.vue.js";
8
8
  import "../../../../components/Tab/Tab.vue.js";
9
9
  import O from "../../../../components/Field/Field.vue2.js";
10
- import "../../../../components/Select/Select.vue2.js";
10
+ import "../../../../components/Select/Select.vue.js";
11
11
  import J from "../../../../../../_virtual/_plugin-vue_export-helper.js";
12
12
  import d from "../../../../components/Checkbox/Checkbox.vue.js";
13
13
  import "../../../../components/Address/Address.vue.js";
14
14
  import "../../../../components/Loader/Loader.vue.js";
15
15
  import "../../../../components/LocationMarker/LocationMarker.vue.js";
16
16
  import E from "../../../../components/Button/Button.vue2.js";
17
- import M from "../../../../components/Popup/Popup.vue.js";
17
+ import M from "../../../../components/Popup/Popup.vue2.js";
18
18
  import z from "../../../../components/Block/Block.vue.js";
19
19
  import "../../../../../../node_modules/vue-select/dist/vue-select.es.js";
20
20
  import "../blocks/EditArray.vue2.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Loader/Loader.vue.cjs");require("vue-i18n");const _=require("../../../../components/Tab/Tab.vue2.cjs");require("../../../../components/Tooltip/Tooltip.vue2.cjs");const b=require("../sections/MembersAdd.vue.cjs");require("../../../mobile/components/Menu/Menu.vue2.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const v=require("../blocks/User.vue.cjs"),g=require("../../../auth/store/auth.cjs"),a=require("../../../auth/store/invites.cjs"),d=require("../../store/memberships.cjs"),h=require("../../store/organizations.cjs"),f=require("../../store/departments.cjs"),k={class:"pd-thin"},q=e.createElementVNode("section",{class:"mn-b-medium radius-medium pd-semi bg-grey"},[e.createElementVNode("h2",{class:"mn-b-regular"},"Members"),e.createElementVNode("p",{class:"t-transp p-big"},"Add new memberships to the group and configure access rights.")],-1),E={class:"mn-b-big radius-medium bg-white"},y={key:0,class:"cols-1 gap-thin"},B={key:1},N={class:"br-grey br-1px br-solid radius-small mn-b-thin flex-nowrap flex-v-center flex pd-medium"},V={class:"w-100 mn-r-small"},w={class:"t-transp"},x={class:"mn-l-medium flex-v-center flex"},M=["onClick"],C={__name:"Members",setup(S){const l=c.useRoute();c.useRouter();const o=e.ref(null),i=e.ref("members");e.onMounted(async()=>{o.value=(await h.actions.read({_id:l.params._id,user:g.state.user._id}))[0],await d.actions.read({target:l.params._id}),await a.actions.read(o.value._id)}),e.computed(()=>{const s=f.state.departments,n=s.flatMap(t=>t.subdepartments.map(r=>r._id));return s.filter(t=>!n.includes(t._id))});async function u(s){await a.actions.create(o.value._id,s)}async function m(s,n){a.state.invites.splice(s,1),await a.actions.delete(n._id)}return(s,n)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("div",k,[q,e.createVNode(b.default,{organization:o.value,onSendInvite:u},null,8,["organization"]),e.createVNode(_.default,{selected:i.value,"onUpdate:selected":n[0]||(n[0]=t=>i.value=t),class:"mn-b-medium bg-grey radius-small",tabs:[{name:"Members",value:"members"},{name:"Invites",value:"invites"}]},null,8,["selected"]),e.createElementVNode("section",E,[i.value==="members"?(e.openBlock(),e.createElementBlock("div",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.state.memberships,(t,r)=>(e.openBlock(),e.createBlock(v.default,{key:r,user:t,onClick:p=>s.$router.push(`/app/profile/${t._id}`),class:"bg-grey radius-small flex-nowrap flex pd-medium"},null,8,["user","onClick"]))),128))])):e.createCommentVNode("",!0),i.value==="invites"?(e.openBlock(),e.createElementBlock("div",B,[e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.state.invites,(t,r)=>(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("span",V,e.toDisplayString(t.invitedEmail)+" "+e.toDisplayString(t.invitedPhone),1),e.createElementVNode("span",w,e.toDisplayString(t.status),1),e.createElementVNode("div",x,[e.createElementVNode("button",{onClick:p=>m(r,t),class:"button-small button"},"×",8,M)])]))),256))])):e.createCommentVNode("",!0)])])]),_:1}))}};exports.default=C;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Loader/Loader.vue.cjs");require("vue-i18n");require("../../../../components/Field/Field.vue.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;
@@ -2,10 +2,11 @@ import { ref as p, onMounted as $, computed as k, openBlock as a, createBlock as
2
2
  import { useRoute as M, useRouter as I } from "vue-router";
3
3
  import "../../../../components/Loader/Loader.vue.js";
4
4
  import "vue-i18n";
5
+ import "../../../../components/Field/Field.vue.js";
5
6
  import S from "../../../../components/Tab/Tab.vue2.js";
6
7
  import "../../../../components/Tooltip/Tooltip.vue2.js";
7
8
  import z from "../sections/MembersAdd.vue.js";
8
- import "../../../mobile/components/Menu/Menu.vue2.js";
9
+ import "../../../mobile/components/Menu/Menu.vue.js";
9
10
  import "../../../mobile/components/Menu/MenuItem.vue.js";
10
11
  import B from "../blocks/User.vue.js";
11
12
  import { state as E } from "../../../auth/store/auth.js";
@@ -19,7 +20,7 @@ const U = { class: "pd-thin" }, A = /* @__PURE__ */ t("section", { class: "mn-b-
19
20
  ], -1), F = { class: "mn-b-big radius-medium bg-white" }, L = {
20
21
  key: 0,
21
22
  class: "cols-1 gap-thin"
22
- }, P = { key: 1 }, T = { class: "br-grey br-1px br-solid radius-small mn-b-thin flex-nowrap flex-v-center flex pd-medium" }, j = { class: "w-100 mn-r-small" }, q = { class: "t-transp" }, G = { class: "mn-l-medium flex-v-center flex" }, H = ["onClick"], me = {
23
+ }, P = { key: 1 }, T = { class: "br-grey br-1px br-solid radius-small mn-b-thin flex-nowrap flex-v-center flex pd-medium" }, j = { class: "w-100 mn-r-small" }, q = { class: "t-transp" }, G = { class: "mn-l-medium flex-v-center flex" }, H = ["onClick"], le = {
23
24
  __name: "Members",
24
25
  setup(J) {
25
26
  const u = M();
@@ -88,5 +89,5 @@ const U = { class: "pd-thin" }, A = /* @__PURE__ */ t("section", { class: "mn-b-
88
89
  }
89
90
  };
90
91
  export {
91
- me as default
92
+ le as default
92
93
  };
@@ -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.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"),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.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;
@@ -6,7 +6,7 @@ import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
6
6
  import P from "../../../../components/Tab/Tab.vue2.js";
7
7
  import $ from "../../../../components/Block/Block.vue.js";
8
8
  import z from "../../../../components/Feed/Feed.vue.js";
9
- import "../../../mobile/components/Menu/Menu.vue2.js";
9
+ import "../../../mobile/components/Menu/Menu.vue.js";
10
10
  import "../../../mobile/components/Menu/MenuItem.vue.js";
11
11
  import "../blocks/DepartmentSub.vue2.js";
12
12
  import "../blocks/User.vue2.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),n=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const p=require("../../../../components/FieldTags/BlockTags.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue2.cjs");const f=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),g=require("../../../../components/UploadImage/UploadImage.vue.cjs"),b=require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Popup/Popup.vue2.cjs");const h=require("../../../auth/store/auth.cjs"),e=require("../../store/organizations.cjs");require("../../store/memberships.cjs");const y={class:"for-transition pd-thin"},V=t.createElementVNode("h3",{class:"mn-b-small"},"Type of group",-1),N=t.createElementVNode("p",{class:"mn-b-thin"},"Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.",-1),_=t.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),q={class:"mn-b-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},v=t.createElementVNode("h4",null,"Upload photo",-1),w=t.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),x=t.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),U={__name:"OrganizationEdit",async setup(T){let o,i;const s=n.useRoute(),d=n.useRouter();e.actions.reset(),s.params._id&&([o,i]=t.withAsyncContext(()=>e.actions.read({_id:s.params._id})),await o,i());const u=t.computed(()=>e.state.current);async function c(){s.params._id?await e.actions.update(s.params._id,u.value):await e.actions.create(e.state.current,h.state.user._id)}function m(){d.replace({name:"Organization",params:{_id:e.state.current._id}})}return(k,a)=>(t.openBlock(),t.createElementBlock("div",y,[V,N,t.createVNode(f.default,{modelValue:e.state.current.types,"onUpdate:modelValue":a[0]||(a[0]=r=>e.state.current.types=r),options:["public","exclusive","hidden"],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"]),_,t.createElementVNode("div",q,[t.createVNode(g.default,{photo:e.state.current.profile.photo,"onUpdate:photo":a[1]||(a[1]=r=>e.state.current.profile.photo=r),uploadPath:"organizations/"+e.state.current._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo","uploadPath"]),v]),t.createVNode(l.default,{field:e.state.current.profile.name,"onUpdate:field":a[2]||(a[2]=r=>e.state.current.profile.name=r),placeholder:"Name of organization",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.profile.description,"onUpdate:field":a[3]||(a[3]=r=>e.state.current.profile.description=r),placeholder:"Brief description of your group",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(p.default,{onTagsChanged:a[4]||(a[4]=r=>e.state.current.profile.tags=r),tags:e.state.current.profile.tags},null,8,["tags"]),w,x,t.createVNode(l.default,{field:e.state.current.socials.instagram,"onUpdate:field":a[5]||(a[5]=r=>e.state.current.socials.instagram=r),label:"Instagram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.twitter,"onUpdate:field":a[6]||(a[6]=r=>e.state.current.socials.twitter=r),label:"Twitter",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.facebook,"onUpdate:field":a[7]||(a[7]=r=>e.state.current.socials.facebook=r),label:"Facebook",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.telegram,"onUpdate:field":a[8]||(a[8]=r=>e.state.current.socials.telegram=r),label:"Telegram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.youtube,"onUpdate:field":a[9]||(a[9]=r=>e.state.current.socials.youtube=r),label:"Telegram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(b.default,{submit:c,callback:m,class:"bg-main w-100 mn-b-thin"},{default:t.withCtx(()=>[t.createTextVNode("Save")]),_:1})]))}};exports.default=U;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),n=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const p=require("../../../../components/FieldTags/BlockTags.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");const f=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),g=require("../../../../components/UploadImage/UploadImage.vue.cjs"),b=require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Popup/Popup.vue.cjs");const h=require("../../../auth/store/auth.cjs"),e=require("../../store/organizations.cjs");require("../../store/memberships.cjs");const y={class:"for-transition pd-thin"},V=t.createElementVNode("h3",{class:"mn-b-small"},"Type of group",-1),N=t.createElementVNode("p",{class:"mn-b-thin"},"Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.",-1),_=t.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),q={class:"mn-b-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},v=t.createElementVNode("h4",null,"Upload photo",-1),w=t.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),x=t.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),U={__name:"OrganizationEdit",async setup(T){let o,i;const s=n.useRoute(),d=n.useRouter();e.actions.reset(),s.params._id&&([o,i]=t.withAsyncContext(()=>e.actions.read({_id:s.params._id})),await o,i());const u=t.computed(()=>e.state.current);async function c(){s.params._id?await e.actions.update(s.params._id,u.value):await e.actions.create(e.state.current,h.state.user._id)}function m(){d.replace({name:"Organization",params:{_id:e.state.current._id}})}return(k,a)=>(t.openBlock(),t.createElementBlock("div",y,[V,N,t.createVNode(f.default,{modelValue:e.state.current.types,"onUpdate:modelValue":a[0]||(a[0]=r=>e.state.current.types=r),options:["public","exclusive","hidden"],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"]),_,t.createElementVNode("div",q,[t.createVNode(g.default,{photo:e.state.current.profile.photo,"onUpdate:photo":a[1]||(a[1]=r=>e.state.current.profile.photo=r),uploadPath:"organizations/"+e.state.current._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo","uploadPath"]),v]),t.createVNode(l.default,{field:e.state.current.profile.name,"onUpdate:field":a[2]||(a[2]=r=>e.state.current.profile.name=r),placeholder:"Name of organization",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.profile.description,"onUpdate:field":a[3]||(a[3]=r=>e.state.current.profile.description=r),placeholder:"Brief description of your group",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(p.default,{onTagsChanged:a[4]||(a[4]=r=>e.state.current.profile.tags=r),tags:e.state.current.profile.tags},null,8,["tags"]),w,x,t.createVNode(l.default,{field:e.state.current.socials.instagram,"onUpdate:field":a[5]||(a[5]=r=>e.state.current.socials.instagram=r),label:"Instagram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.twitter,"onUpdate:field":a[6]||(a[6]=r=>e.state.current.socials.twitter=r),label:"Twitter",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.facebook,"onUpdate:field":a[7]||(a[7]=r=>e.state.current.socials.facebook=r),label:"Facebook",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.telegram,"onUpdate:field":a[8]||(a[8]=r=>e.state.current.socials.telegram=r),label:"Telegram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.youtube,"onUpdate:field":a[9]||(a[9]=r=>e.state.current.socials.youtube=r),label:"Telegram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(b.default,{submit:c,callback:m,class:"bg-main w-100 mn-b-thin"},{default:t.withCtx(()=>[t.createTextVNode("Save")]),_:1})]))}};exports.default=U;
@@ -6,11 +6,11 @@ import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
6
6
  import v from "../../../../components/FieldTags/BlockTags.vue.js";
7
7
  import "../../../../components/Tab/Tab.vue.js";
8
8
  import i from "../../../../components/Field/Field.vue2.js";
9
- import "../../../../components/Select/Select.vue2.js";
9
+ import "../../../../components/Select/Select.vue.js";
10
10
  import U from "../../../../components/SelectMulti/SelectMulti.vue.js";
11
11
  import k from "../../../../components/UploadImage/UploadImage.vue.js";
12
12
  import T from "../../../../components/Button/Button.vue2.js";
13
- import "../../../../components/Popup/Popup.vue2.js";
13
+ import "../../../../components/Popup/Popup.vue.js";
14
14
  import { state as z } from "../../../auth/store/auth.js";
15
15
  import { actions as s, state as e } from "../../store/organizations.js";
16
16
  import "../../store/memberships.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),m=require("../../../../components/Field/Field.vue2.cjs");require("vue-i18n");const _=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/Button/Button.vue.cjs");require("./Documents.vue2.cjs");const f=o=>(e.pushScopeId("data-v-f93fcad7"),o=o(),e.popScopeId(),o),v={class:"documents"},h=f(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Список документов",-1)),k={class:"mn-b-big cols-4"},b=["onClick"],y={class:"mn-b-small"},E={class:"t-semi t-transp radius-small"},B={__name:"Documents",setup(o){r.useRouter(),r.useRoute();let l=[{name:"Паспорт",status:"Не добавлен",inputs:[{type:"text",name:"Номер и серия"},{type:"text",name:"Место выдачи"},{type:"text",name:"Дата выдачи"}]},{name:"ИНН",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"СНИЛС",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"Военный билет",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]}];const s=e.ref(!1),a=e.ref(null),p=u=>{a.value=u,s.value=!0},c=()=>{s.value=!1},i=()=>{c()};return e.watchEffect(()=>{}),(u,x)=>{const d=e.resolveComponent("Popup");return e.openBlock(),e.createElementBlock("div",v,[h,e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(t,n)=>(e.openBlock(),e.createElementBlock("div",{key:n,onClick:P=>p(n),class:"h-100 pd-medium bg-white radius-small"},[e.createElementVNode("h3",y,e.toDisplayString(t.name),1),e.createElementVNode("p",E,e.toDisplayString(t.status),1)],8,b))),128))]),e.createVNode(d,{title:"Добавить документ",onClosePopup:c,isPopupOpen:s.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l)[a.value].inputs,t=>(e.openBlock(),e.createElementBlock("div",{key:t.name},[e.createVNode(m.default,{field:t.value,"onUpdate:field":n=>t.value=n,label:t.name,_id:t.name,placeholder:t.name,class:"w-100"},null,8,["field","onUpdate:field","label","_id","placeholder"])]))),128)),e.createElementVNode("button",{onClick:i,class:"w-100 mn-b-small button"},"Отправить на верификацию")]),_:1},8,["isPopupOpen"])])}}},g=_.default(B,[["__scopeId","data-v-f93fcad7"]]);exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),m=require("../../../../components/Field/Field.vue2.cjs");require("vue-i18n");const _=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("./Documents.vue2.cjs");const f=o=>(e.pushScopeId("data-v-f93fcad7"),o=o(),e.popScopeId(),o),v={class:"documents"},h=f(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Список документов",-1)),k={class:"mn-b-big cols-4"},b=["onClick"],y={class:"mn-b-small"},E={class:"t-semi t-transp radius-small"},B={__name:"Documents",setup(o){r.useRouter(),r.useRoute();let l=[{name:"Паспорт",status:"Не добавлен",inputs:[{type:"text",name:"Номер и серия"},{type:"text",name:"Место выдачи"},{type:"text",name:"Дата выдачи"}]},{name:"ИНН",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"СНИЛС",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]},{name:"Военный билет",status:"Не добавлен",inputs:[{type:"text",name:"Дата регистрации"}]}];const s=e.ref(!1),a=e.ref(null),p=u=>{a.value=u,s.value=!0},c=()=>{s.value=!1},i=()=>{c()};return e.watchEffect(()=>{}),(u,x)=>{const d=e.resolveComponent("Popup");return e.openBlock(),e.createElementBlock("div",v,[h,e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l),(t,n)=>(e.openBlock(),e.createElementBlock("div",{key:n,onClick:P=>p(n),class:"h-100 pd-medium bg-white radius-small"},[e.createElementVNode("h3",y,e.toDisplayString(t.name),1),e.createElementVNode("p",E,e.toDisplayString(t.status),1)],8,b))),128))]),e.createVNode(d,{title:"Добавить документ",onClosePopup:c,isPopupOpen:s.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l)[a.value].inputs,t=>(e.openBlock(),e.createElementBlock("div",{key:t.name},[e.createVNode(m.default,{field:t.value,"onUpdate:field":n=>t.value=n,label:t.name,_id:t.name,placeholder:t.name,class:"w-100"},null,8,["field","onUpdate:field","label","_id","placeholder"])]))),128)),e.createElementVNode("button",{onClick:i,class:"w-100 mn-b-small button"},"Отправить на верификацию")]),_:1},8,["isPopupOpen"])])}}},g=_.default(B,[["__scopeId","data-v-f93fcad7"]]);exports.default=g;
@@ -3,7 +3,7 @@ import { useRouter as I, useRoute as g } from "vue-router";
3
3
  import D from "../../../../components/Field/Field.vue2.js";
4
4
  import "vue-i18n";
5
5
  import S from "../../../../../../_virtual/_plugin-vue_export-helper.js";
6
- import "../../../../components/Popup/Popup.vue2.js";
6
+ import "../../../../components/Popup/Popup.vue.js";
7
7
  import "../../../../components/Button/Button.vue.js";
8
8
  import "./Documents.vue2.js";
9
9
  const E = (a) => (w("data-v-f93fcad7"), a = a(), C(), a), B = { class: "documents" }, F = /* @__PURE__ */ E(() => /* @__PURE__ */ o("h3", { class: "mn-b-small" }, "Список документов", -1)), N = { class: "mn-b-big cols-4" }, O = ["onClick"], R = { class: "mn-b-small" }, U = { class: "t-semi t-transp radius-small" }, V = {
@@ -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"),b=require("../../../../components/Select/Select.vue.cjs"),v=require("../../../../components/Button/Button.vue2.cjs");require("../../../middlewares/client/inputs.validation.cjs");const s=require("../../../auth/store/invites.cjs"),f={class:"mn-b-medium radius-medium pd-semi bg-grey"},h=e.createElementVNode("h3",{class:"mn-b-medium"},"Add members",-1),g=e.createElementVNode("p",{class:"mn-b-small t-transp p-medium"},"Укажите email или телефон, чтобы отправить ссылку с приглашением:",-1),k={key:0,class:"mn-r-medium flex-v-center flex"},E=["onClick"],V=e.createElementVNode("p",{class:"t-blue mn-r-small"},"+ Добавить приглашение",-1),N=[V],w=e.createElementVNode("span",null,"Invite to organization",-1),B={__name:"MembersAdd",props:{organization:Object},emits:["send-invite"],setup(c,{emit:q}){const i=c,r=e.ref(null),t=e.ref([{contact:"",role:""}]);function d(){t.value.push({contact:"",role:""})}function m(l){t.value.splice(l,1)}async function u(l){await s.actions.create(i.organization._id,t.value)}function p(){}return(l,x)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("section",f,[h,g,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(n,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,class:"br-1px br-solid br-grey flex gap-thin radius-small mn-b-thin"},[e.createVNode(_.default,{field:n.contact,"onUpdate:field":o=>n.contact=o,placeholder:"Enter email or phone",class:"pd-small radius-small w-100 bg-white",validation:r.value},null,8,["field","onUpdate:field","validation"]),e.createVNode(b.default,{select:n.role,"onUpdate:select":o=>n.role=o,label:"Role",options:["owner","manager","member"],placeholder:"Select",class:"pos-relative w-100 bg-white radius-small pd-small"},null,8,["select","onUpdate:select"]),a>0?(e.openBlock(),e.createElementBlock("div",k,[e.createElementVNode("button",{onClick:o=>m(a),class:"button-small button"},"×",8,E)])):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("div",{onClick:d,class:"mn-b-small flex-v-center flex-nowrap flex"},N),e.createVNode(v.default,{submit:l.a=()=>u(s.state.invites),callback:p,class:"w-100 bg-main"},{default:e.withCtx(()=>[w]),_:1},8,["submit"])])]))}};exports.default=B;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("../../../../components/Field/Field.vue2.cjs"),b=require("../../../../components/Select/Select.vue2.cjs"),v=require("../../../../components/Button/Button.vue2.cjs");require("../../../middlewares/client/inputs.validation.cjs");const s=require("../../../auth/store/invites.cjs"),f={class:"mn-b-medium radius-medium pd-semi bg-grey"},h=e.createElementVNode("h3",{class:"mn-b-medium"},"Add members",-1),g=e.createElementVNode("p",{class:"mn-b-small t-transp p-medium"},"Укажите email или телефон, чтобы отправить ссылку с приглашением:",-1),k={key:0,class:"mn-r-medium flex-v-center flex"},E=["onClick"],V=e.createElementVNode("p",{class:"t-blue mn-r-small"},"+ Добавить приглашение",-1),N=[V],w=e.createElementVNode("span",null,"Invite to organization",-1),B={__name:"MembersAdd",props:{organization:Object},emits:["send-invite"],setup(c,{emit:q}){const i=c,r=e.ref(null),t=e.ref([{contact:"",role:""}]);function d(){t.value.push({contact:"",role:""})}function m(l){t.value.splice(l,1)}async function u(l){await s.actions.create(i.organization._id,t.value)}function p(){}return(l,x)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("section",f,[h,g,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(n,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,class:"br-1px br-solid br-grey flex gap-thin radius-small mn-b-thin"},[e.createVNode(_.default,{field:n.contact,"onUpdate:field":o=>n.contact=o,placeholder:"Enter email or phone",class:"pd-small radius-small w-100 bg-white",validation:r.value},null,8,["field","onUpdate:field","validation"]),e.createVNode(b.default,{select:n.role,"onUpdate:select":o=>n.role=o,label:"Role",options:["owner","manager","member"],placeholder:"Select",class:"pos-relative w-100 bg-white radius-small pd-small"},null,8,["select","onUpdate:select"]),a>0?(e.openBlock(),e.createElementBlock("div",k,[e.createElementVNode("button",{onClick:o=>m(a),class:"button-small button"},"×",8,E)])):e.createCommentVNode("",!0)]))),128)),e.createElementVNode("div",{onClick:d,class:"mn-b-small flex-v-center flex-nowrap flex"},N),e.createVNode(v.default,{submit:l.a=()=>u(s.state.invites),callback:p,class:"w-100 bg-main"},{default:e.withCtx(()=>[w]),_:1},8,["submit"])])]))}};exports.default=B;
@@ -1,6 +1,6 @@
1
1
  import { ref as r, openBlock as a, createElementBlock as s, createElementVNode as e, Fragment as v, renderList as h, createVNode as c, createCommentVNode as g, withCtx as w } from "vue";
2
2
  import k from "../../../../components/Field/Field.vue2.js";
3
- import x from "../../../../components/Select/Select.vue.js";
3
+ import x from "../../../../components/Select/Select.vue2.js";
4
4
  import y from "../../../../components/Button/Button.vue2.js";
5
5
  import "../../../middlewares/client/inputs.validation.js";
6
6
  import { state as C, actions as U } from "../../../auth/store/invites.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue2.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Dropdown/Dropdown.vue2.cjs");require("../../../../components/Chips/Chips.vue2.cjs");const q=require("../../../auth/store/auth.cjs");require("../../store/memberships.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.vue2.cjs");require("../../../reports/store/reports.cjs");const y=require("../../store/organizations.cjs"),m=require("../blocks/CardOrganization.vue.cjs"),b=require("../blocks/EmptyState.vue.cjs");require("./Unit.vue.cjs");require("./Organizations.vue2.cjs");const g={class:"for-transition bg-white radius-big w-100"},k={class:""},_={key:1,class:"cols-1"},h={__name:"Organizations",props:{owner:{type:String,default:null},user:{type:[String,Number],default:null},onlyuser:{type:[String,Number],default:null}},async setup(c){let t,u;const o=c,a=e.ref(null);a.value=([t,u]=e.withAsyncContext(()=>y.actions.read({owner:o.owner,user:o.user,onlyuser:o.onlyuser})),t=await t,u(),t);const d=s.useRouter(),n=s.useRoute();let p=n.query.tab?n.query.tab:"details";const i=e.ref(p);return n.query.tab=i.value,e.watch(i,r=>{d.replace({query:{...n.query,tab:r}})}),(r,v)=>(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",k,[a.value<1?(e.openBlock(),e.createBlock(b.default,{key:0,title:"You Haven't Joined Any Organization Yet",description:"Weeder is all about community. Join an organization or maybe you want to create your own?",action:"Create organization",callback:r.a=()=>r.$router.push("/app/organization/create/details")},null,8,["callback"])):(e.openBlock(),e.createElementBlock("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,l=>(e.openBlock(),e.createBlock(m.default,{key:l._id,organization:l,user:q.state.user,onUpdateMembership:r.handleMembershipUpdate,class:e.normalizeClass(["w-100",{"mn-r-small":r.index!==a.value.length-1}])},null,8,["organization","user","onUpdateMembership","class"]))),128))]))])]))}};exports.default=h;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Dropdown/Dropdown.vue2.cjs");require("../../../../components/Chips/Chips.vue2.cjs");const q=require("../../../auth/store/auth.cjs");require("../../store/memberships.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.vue.cjs");require("../../../reports/store/reports.cjs");const y=require("../../store/organizations.cjs"),m=require("../blocks/CardOrganization.vue.cjs"),b=require("../blocks/EmptyState.vue.cjs");require("./Unit.vue.cjs");require("./Organizations.vue2.cjs");const g={class:"for-transition bg-white radius-big w-100"},k={class:""},_={key:1,class:"cols-1"},h={__name:"Organizations",props:{owner:{type:String,default:null},user:{type:[String,Number],default:null},onlyuser:{type:[String,Number],default:null}},async setup(c){let t,u;const o=c,a=e.ref(null);a.value=([t,u]=e.withAsyncContext(()=>y.actions.read({owner:o.owner,user:o.user,onlyuser:o.onlyuser})),t=await t,u(),t);const d=s.useRouter(),n=s.useRoute();let p=n.query.tab?n.query.tab:"details";const i=e.ref(p);return n.query.tab=i.value,e.watch(i,r=>{d.replace({query:{...n.query,tab:r}})}),(r,v)=>(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",k,[a.value<1?(e.openBlock(),e.createBlock(b.default,{key:0,title:"You Haven't Joined Any Organization Yet",description:"Weeder is all about community. Join an organization or maybe you want to create your own?",action:"Create organization",callback:r.a=()=>r.$router.push("/app/organization/create/details")},null,8,["callback"])):(e.openBlock(),e.createElementBlock("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,l=>(e.openBlock(),e.createBlock(m.default,{key:l._id,organization:l,user:q.state.user,onUpdateMembership:r.handleMembershipUpdate,class:e.normalizeClass(["w-100",{"mn-r-small":r.index!==a.value.length-1}])},null,8,["organization","user","onUpdateMembership","class"]))),128))]))])]))}};exports.default=h;
@@ -3,14 +3,14 @@ import { useRouter as v, useRoute as z } from "vue-router";
3
3
  import "../../../../../../node_modules/js-cookie/dist/js.cookie.js";
4
4
  import "../../../../components/Tab/Tab.vue.js";
5
5
  import "../../../../components/Field/Field.vue.js";
6
- import "../../../../components/Select/Select.vue2.js";
6
+ import "../../../../components/Select/Select.vue.js";
7
7
  import "../../../../components/Button/Button.vue.js";
8
8
  import "../../../../components/Dropdown/Dropdown.vue2.js";
9
9
  import "../../../../components/Chips/Chips.vue2.js";
10
10
  import { state as k } from "../../../auth/store/auth.js";
11
11
  import "../../store/memberships.js";
12
12
  import "vue-i18n";
13
- import "../../../../components/Popup/Popup.vue2.js";
13
+ import "../../../../components/Popup/Popup.vue.js";
14
14
  import "../../../reports/store/reports.js";
15
15
  import { actions as q } from "../../store/organizations.js";
16
16
  import $ from "../blocks/CardOrganization.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../globals/components/layouts/Empty.vue.cjs"),t=require("./organizations.router.cjs"),r=require("./members.router.cjs"),o=require("./departments.router.cjs"),u=require("./products.router.cjs"),n=require("../../backoffice/router/backoffice.cjs"),a=[{path:"organizations",component:e.default,meta:{title:{en:"Organizations",ru:"Организации"}},children:[...t.default,...r.membersRoutes,...o.default,...u.default,...n.default]}];exports.default=a;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../globals/components/layouts/Empty.vue.cjs"),r=require("./organizations.router.cjs"),t=require("./members.router.cjs"),o=require("./departments.router.cjs"),u=require("./products.router.cjs");require("vue");require("../../backoffice/components/layouts/Backoffice.vue.cjs");require("../../auth/store/auth.cjs");const i=[{path:"organizations",component:e.default,meta:{title:{en:"Organizations",ru:"Организации"}},children:[...r.default,...t.membersRoutes,...o.default,...u.default]}];exports.default=i;