@ozdao/prometheus-framework 0.2.59 → 0.2.60

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. package/dist/community.server.js +1 -1
  2. package/dist/community.server.mjs +1 -1
  3. package/dist/events.server.js +23 -3
  4. package/dist/events.server.mjs +23 -3
  5. package/dist/metadata.schema-CjpDDEnW.mjs +210 -0
  6. package/dist/metadata.schema-doiYQfuO.js +209 -0
  7. package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
  9. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +1 -373
  11. package/dist/prometheus-framework/src/components/Loader/Loader.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/Loader/Loader.vue.js +51 -1
  13. package/dist/prometheus-framework/src/components/Loader/Loader.vue2.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Loader/Loader.vue2.js +1 -51
  15. package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +1 -1
  17. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +36 -1
  19. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
  20. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +1 -36
  21. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
  23. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  25. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +1 -1
  27. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.js +1 -1
  31. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
  33. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
  34. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
  35. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
  36. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
  37. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  39. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  41. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +2 -2
  42. package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +44 -44
  43. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js +1 -1
  49. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +31 -31
  51. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
  55. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
  57. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +166 -123
  59. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +56 -45
  61. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/orders/store/orders.js +19 -24
  63. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
  65. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  69. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
  71. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  73. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +1 -1
  75. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  76. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +15 -15
  77. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
  78. package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.js +1 -1
  79. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  80. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +8 -8
  81. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
  82. package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
  83. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  84. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  85. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
  86. package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +1 -1
  87. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  88. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  89. package/dist/style.css +1 -1
  90. package/package.json +1 -1
@@ -1,138 +1,181 @@
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.vue.js";
5
- import L from "../../../../components/Block/Block.vue.js";
6
- import I from "../blocks/CardOrderItem.vue.js";
7
- import "../../../../components/Field/Field.vue2.js";
1
+ import { computed as E, ref as b, onMounted as B, openBlock as i, createElementBlock as l, createVNode as r, withCtx as s, createElementVNode as o, createTextVNode as R, unref as h, Fragment as g, renderList as y, createBlock as w, createCommentVNode as V, toDisplayString as P } from "vue";
2
+ import { useRoute as D, useRouter as F } from "vue-router";
3
+ import I from "../../../../components/Feed/Feed.vue.js";
4
+ import k from "../../../../components/Field/Field.vue.js";
5
+ import T from "../../../../components/Button/Button.vue.js";
6
+ import q from "../../../../components/Popup/Popup.vue.js";
7
+ import c from "../../../../components/Block/Block.vue.js";
8
+ import x from "../blocks/CardOrderItem.vue.js";
8
9
  import "../../../../components/Select/Select.vue2.js";
9
10
  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";
11
+ import "../../../../components/FieldPhone/all-countries.js";
12
+ import "../../../../components/FieldPhone/FieldPhone2.vue.js";
13
+ import { state as z } from "../../../auth/store/auth.js";
14
+ import { actions as m } from "../../../globals/store/globals.js";
15
+ import { state as e, actions as A } from "../../store/orders.js";
16
+ import { actions as S } from "../../../products/store/products.js";
13
17
  import "./EditOrder.vue2.js";
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 = {
18
+ const U = { class: "flex-v-center flex-nowrap flex" }, L = /* @__PURE__ */ o("h2", { class: "mn-r-auto" }, "Create Order", -1), M = /* @__PURE__ */ o("h3", { class: "mn-b-small" }, "Add to order", -1), j = { class: "bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big" }, G = {
17
19
  key: 0,
18
20
  class: "w-100"
19
- }, K = { class: "mn-thinw-100 flex-v-center flex block" }, Q = { class: "p-big" }, U = {
20
- key: 0,
21
- class: "p-big t-semi"
22
- }, W = {
23
- key: 1,
24
- class: "p-big t-semi"
25
- }, X = {
26
- key: 2,
27
- class: "p-big t-semi"
28
- }, Y = { key: 3 }, Z = { key: 4 }, ee = { key: 5 }, te = /* @__PURE__ */ r("button", { class: "mn-l-auto button" }, "Запросить онлайн", -1), ye = {
21
+ }, H = { class: "h3 flex" }, J = /* @__PURE__ */ o("span", { class: "mn-r-auto t-transp" }, "In total", -1), pe = {
29
22
  __name: "EditOrder",
30
- setup(oe) {
31
- const R = q(), m = V(!1);
32
- function F() {
33
- m.value = !0;
23
+ setup(K) {
24
+ const u = D(), C = F();
25
+ let v = E(() => Number(e.current.positions.reduce((p, n) => p + n.price * n.quantity, 0)));
26
+ const d = b(!1);
27
+ function $() {
28
+ d.value = !0;
29
+ }
30
+ function f() {
31
+ d.value = !1;
32
+ }
33
+ b(null);
34
+ function N() {
35
+ e.current.creator = {
36
+ type: "user",
37
+ target: z.user._id
38
+ }, e.current.owner = {
39
+ type: "organization",
40
+ target: u.params._id
41
+ }, A.create(e.current);
34
42
  }
35
- function h() {
36
- m.value = !1;
43
+ function O() {
44
+ C.push({
45
+ name: "Backoffice Orders",
46
+ params: {
47
+ _id: u.params._id
48
+ }
49
+ });
37
50
  }
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"
49
- }, {
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
- ])
87
- ]),
88
- _: 1
89
- }, 8, ["isPopupOpen"]),
90
- p(L, {
91
- title: "Invetory Sheet",
92
- actions: [{
93
- label: "+",
94
- function: () => F()
95
- }],
96
- class: "mn-b-semi"
97
- }, {
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);
51
+ return B(async () => {
52
+ }), (p, n) => (i(), l("div", null, [
53
+ r(c, { class: "mn-b-thin" }, {
54
+ default: s(() => [
55
+ o("header", U, [
56
+ L,
57
+ r(T, {
58
+ submit: N,
59
+ callback: O,
60
+ class: "pd-small radius-big bg-main t-black uppercase t-medium"
61
+ }, {
62
+ default: s(() => [
63
+ R(" Add Order ")
64
+ ]),
65
+ _: 1
66
+ })
67
+ ])
68
+ ]),
69
+ _: 1
70
+ }),
71
+ r(q, {
72
+ title: "Добавить участника",
73
+ onClosePopup: f,
74
+ isPopupOpen: d.value,
75
+ class: "bg-white w-min-30r w-max-30r radius-big pd-medium"
76
+ }, {
77
+ default: s(() => [
78
+ M,
79
+ o("div", j, [
80
+ r(I, {
81
+ search: !0,
82
+ states: {
83
+ empty: {
84
+ title: "No Products Found",
85
+ description: "Currently, there are no such products available."
86
+ }
106
87
  },
107
- onDecrease: () => {
108
- u.decrement(a.current.positions, o);
88
+ store: {
89
+ read: (t) => S.read(t),
90
+ state: null
109
91
  },
110
- onRemove: () => {
111
- u.delete(a.current.positions, o);
92
+ options: {
93
+ organization: h(u).params._id
112
94
  },
113
- class: "mn-b-thin pd-thin radius-medium bg-white"
114
- }, null, 8, ["product", "onIncrease", "onDecrease", "onRemove"]))), 128))
115
- ]),
116
- _: 1
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(" ₽) ")
129
- ]),
130
- te
131
- ])
132
- ]);
133
- };
95
+ class: ""
96
+ }, {
97
+ default: s(({
98
+ items: t
99
+ }) => [
100
+ (i(!0), l(g, null, y(t, (a, Q) => (i(), w(x, {
101
+ key: a._id,
102
+ editable: !1,
103
+ product: a,
104
+ onClick: () => {
105
+ let _ = { ...a };
106
+ _.quantity = 1, m.add(e.current.positions, _), f();
107
+ },
108
+ class: "bg-white pd-thin radius-medium w-100 mn-b-thin"
109
+ }, null, 8, ["product", "onClick"]))), 128))
110
+ ]),
111
+ _: 1
112
+ }, 8, ["states", "store", "options"])
113
+ ])
114
+ ]),
115
+ _: 1
116
+ }, 8, ["isPopupOpen"]),
117
+ r(c, {
118
+ title: "Positions",
119
+ actions: [{
120
+ label: "+",
121
+ function: () => $()
122
+ }],
123
+ class: "mn-b-semi"
124
+ }, {
125
+ default: s(() => [
126
+ e.current.positions.length === 0 ? (i(), l("span", G, " No positions added yet ")) : V("", !0),
127
+ (i(!0), l(g, null, y(e.current.positions, (t, a) => (i(), w(x, {
128
+ key: t._id,
129
+ editable: !0,
130
+ product: t,
131
+ onIncrease: () => {
132
+ m.increment(e.current.positions, t);
133
+ },
134
+ onDecrease: () => {
135
+ m.decrement(e.current.positions, t);
136
+ },
137
+ onRemove: () => {
138
+ m.delete(e.current.positions, t);
139
+ },
140
+ class: "mn-b-thin pd-thin radius-medium bg-white"
141
+ }, null, 8, ["product", "onIncrease", "onDecrease", "onRemove"]))), 128))
142
+ ]),
143
+ _: 1
144
+ }, 8, ["actions"]),
145
+ r(c, {
146
+ title: "Client",
147
+ class: "mn-b-semi"
148
+ }, {
149
+ default: s(() => [
150
+ r(k, {
151
+ field: e.current.client.name,
152
+ "onUpdate:field": n[0] || (n[0] = (t) => e.current.client.name = t),
153
+ label: "Client",
154
+ placeholder: "Enter client name",
155
+ class: "bg-white pd-medium radius-small mn-b-thin"
156
+ }, null, 8, ["field"]),
157
+ r(k, {
158
+ field: e.current.comment,
159
+ "onUpdate:field": n[1] || (n[1] = (t) => e.current.comment = t),
160
+ label: "Comment",
161
+ placeholder: "Enter comment",
162
+ class: "bg-white pd-medium radius-small mn-b-thin"
163
+ }, null, 8, ["field"])
164
+ ]),
165
+ _: 1
166
+ }),
167
+ r(c, { class: "mn-b-semi" }, {
168
+ default: s(() => [
169
+ o("div", H, [
170
+ J,
171
+ o("span", null, P(h(v)) + " " + P(p.returnCurrency()), 1)
172
+ ])
173
+ ]),
174
+ _: 1
175
+ })
176
+ ]));
134
177
  }
135
178
  };
136
179
  export {
137
- ye as default
180
+ pe as default
138
181
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("vue-router"),i=require("../../../../components/Tab/Tab.vue2.cjs"),l=require("../../store/orders.cjs");require("../blocks/CardOrder.vue.cjs");const c={class:"mn-b-medium flex-v-center flex-nowrap flex"},u=e.createElementVNode("h2",{class:"mn-r-medium"},"Orders",-1),m={class:"cols-3 gap-thin"},p={class:"bg-grey pd-small radius-big"},_={class:"w-100 mn-b-thin p-big"},b=e.createElementVNode("p",{class:"mn-b-small t-transp w-100"},null,-1),g={__name:"Orders",setup(h){const n=o.useRoute();o.useRouter();const r=e.ref(n.query.tab?n.query.tab:"posts");return e.onMounted(async()=>{await l.actions.read()}),(a,s)=>{const d=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("header",c,[u,e.createElementVNode("button",{onClick:s[0]||(s[0]=t=>a.$router.push({name:"AdminOrderAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createVNode(i.default,{selected:r.value,"onUpdate:selected":s[1]||(s[1]=t=>r.value=t),tabs:[{name:"All",value:"all"},{name:"New",value:"new"},{name:"Confirmed",value:"confirmed"},{name:"Finished",value:"finished"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("section",m,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.state.all,t=>(e.openBlock(),e.createElementBlock("div",p,[e.createTextVNode(" Status: "+e.toDisplayString(t.status)+" ",1),e.createElementVNode("p",_," Order No.: #"+e.toDisplayString(t._id),1),b,e.createElementVNode("p",{class:e.normalizeClass([{new:t.status==="Создан"},"mn-b-small"])},[e.createTextVNode(" Order Created: "+e.toDisplayString(a.formatDate(t.createdAt))+" ",1),e.createVNode(d,{to:{name:"AdminOrderEdit",params:{order:t._id}},class:"i-small"},{default:e.withCtx(()=>[e.createTextVNode(" EDIT ")]),_:2},1032,["to"])],2)]))),256))])],64)}}};exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("vue-router"),i=require("../../../../components/Tab/Tab.vue2.cjs"),o=require("../../store/orders.cjs"),c=require("../../../auth/store/auth.cjs");require("../blocks/CardOrder.vue.cjs");const u=require("../../../globals/components/blocks/CardHeader.vue.cjs"),m={class:"mn-b-medium flex-v-center flex-nowrap flex"},p=e.createElementVNode("h2",{class:"mn-r-medium"},"Orders",-1),b={class:"cols-3 gap-thin"},h={class:"pd-small"},_={class:"w-100 mn-b-thin p-big"},g={class:"mn-b-thin pd-r-thin pd-l-thin pd-b-nano pd-t-nano bg-second radius-extra t-white t-medium d-block w-max uppercase"},f=e.createElementVNode("p",{class:"mn-b-small t-transp w-100"},null,-1),v={__name:"Orders",setup(y){const r=l.useRoute();l.useRouter();const a=e.ref(r.query.tab?r.query.tab:"posts");return e.onMounted(async()=>{await o.actions.read()}),(n,s)=>{const d=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("header",m,[p,e.createElementVNode("button",{onClick:s[0]||(s[0]=t=>n.$router.push({name:"AdminOrderAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createVNode(i.default,{selected:a.value,"onUpdate:selected":s[1]||(s[1]=t=>a.value=t),tabs:[{name:"All",value:"all"},{name:"New",value:"new"},{name:"Confirmed",value:"confirmed"},{name:"Finished",value:"finished"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("section",b,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.state.all,t=>(e.openBlock(),e.createBlock(d,{to:{name:"Order Edit",params:{order:t._id}},class:"bg-grey radius-big"},{default:e.withCtx(()=>[e.createVNode(u.default,{class:e.normalizeClass({"mn-b-small pd-medium":n.type!=="short","flex-child-order-last flex-child mn-l-small":n.type==="short"}),entity:t,entityType:"order",user:c.state.user,owner:t.creator,creator:t.creator,date:t.createdAt},null,8,["class","entity","user","owner","creator","date"]),e.createElementVNode("div",h,[e.createElementVNode("p",_," Order No.: #"+e.toDisplayString(t._id),1),e.createElementVNode("span",g,e.toDisplayString(t.status),1),f,e.createElementVNode("p",{class:e.normalizeClass([{new:t.status==="Создан"},"mn-b-small"])},null,2)])]),_:2},1032,["to"]))),256))])],64)}}};exports.default=v;
@@ -1,31 +1,33 @@
1
- import { ref as p, onMounted as _, resolveComponent as b, openBlock as n, createElementBlock as a, Fragment as m, createElementVNode as t, createVNode as u, renderList as f, createTextVNode as r, toDisplayString as o, normalizeClass as h, withCtx as g } from "vue";
2
- import { useRoute as v, useRouter as w } from "vue-router";
3
- import y from "../../../../components/Tab/Tab.vue2.js";
4
- import { actions as C, state as O } from "../../store/orders.js";
1
+ import { ref as p, onMounted as _, resolveComponent as h, openBlock as a, createElementBlock as l, Fragment as i, createElementVNode as t, createVNode as m, renderList as b, createBlock as f, withCtx as g, normalizeClass as d, toDisplayString as c } from "vue";
2
+ import { useRoute as w, useRouter as y } from "vue-router";
3
+ import v from "../../../../components/Tab/Tab.vue2.js";
4
+ import { actions as k, state as x } from "../../store/orders.js";
5
+ import { state as C } from "../../../auth/store/auth.js";
5
6
  import "../blocks/CardOrder.vue.js";
6
- const k = { class: "mn-b-medium flex-v-center flex-nowrap flex" }, x = /* @__PURE__ */ t("h2", { class: "mn-r-medium" }, "Orders", -1), A = { class: "cols-3 gap-thin" }, N = { class: "bg-grey pd-small radius-big" }, E = { class: "w-100 mn-b-thin p-big" }, D = /* @__PURE__ */ t("p", { class: "mn-b-small t-transp w-100" }, null, -1), S = {
7
+ import O from "../../../globals/components/blocks/CardHeader.vue.js";
8
+ const $ = { class: "mn-b-medium flex-v-center flex-nowrap flex" }, A = /* @__PURE__ */ t("h2", { class: "mn-r-medium" }, "Orders", -1), N = { class: "cols-3 gap-thin" }, B = { class: "pd-small" }, E = { class: "w-100 mn-b-thin p-big" }, q = { class: "mn-b-thin pd-r-thin pd-l-thin pd-b-nano pd-t-nano bg-second radius-extra t-white t-medium d-block w-max uppercase" }, F = /* @__PURE__ */ t("p", { class: "mn-b-small t-transp w-100" }, null, -1), U = {
7
9
  __name: "Orders",
8
- setup(V) {
9
- const l = v();
10
- w();
11
- const i = p(l.query.tab ? l.query.tab : "posts");
10
+ setup(R) {
11
+ const r = w();
12
+ y();
13
+ const o = p(r.query.tab ? r.query.tab : "posts");
12
14
  return _(async () => {
13
- await C.read();
14
- }), (d, s) => {
15
- const c = b("router-link");
16
- return n(), a(m, null, [
17
- t("header", k, [
18
- x,
15
+ await k.read();
16
+ }), (n, s) => {
17
+ const u = h("router-link");
18
+ return a(), l(i, null, [
19
+ t("header", $, [
20
+ A,
19
21
  t("button", {
20
- onClick: s[0] || (s[0] = (e) => d.$router.push({
22
+ onClick: s[0] || (s[0] = (e) => n.$router.push({
21
23
  name: "AdminOrderAdd"
22
24
  })),
23
25
  class: "radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"
24
26
  }, " + ")
25
27
  ]),
26
- u(y, {
27
- selected: i.value,
28
- "onUpdate:selected": s[1] || (s[1] = (e) => i.value = e),
28
+ m(v, {
29
+ selected: o.value,
30
+ "onUpdate:selected": s[1] || (s[1] = (e) => o.value = e),
29
31
  tabs: [
30
32
  { name: "All", value: "all" },
31
33
  { name: "New", value: "new" },
@@ -34,36 +36,45 @@ const k = { class: "mn-b-medium flex-v-center flex-nowrap flex" }, x = /* @__PUR
34
36
  ],
35
37
  class: "mn-b-small o-hidden h5 radius-big bg-grey"
36
38
  }, null, 8, ["selected"]),
37
- t("section", A, [
38
- (n(!0), a(m, null, f(O.all, (e) => (n(), a("div", N, [
39
- r(" Status: " + o(e.status) + " ", 1),
40
- t("p", E, " Order No.: #" + o(e._id), 1),
41
- D,
42
- t("p", {
43
- class: h([{ new: e.status === "Создан" }, "mn-b-small"])
44
- }, [
45
- r(" Order Created: " + o(d.formatDate(e.createdAt)) + " ", 1),
46
- u(c, {
47
- to: {
48
- name: "AdminOrderEdit",
49
- params: {
50
- order: e._id
51
- }
52
- },
53
- class: "i-small"
54
- }, {
55
- default: g(() => [
56
- r(" EDIT ")
57
- ]),
58
- _: 2
59
- }, 1032, ["to"])
60
- ], 2)
61
- ]))), 256))
39
+ t("section", N, [
40
+ (a(!0), l(i, null, b(x.all, (e) => (a(), f(u, {
41
+ to: {
42
+ name: "Order Edit",
43
+ params: {
44
+ order: e._id
45
+ }
46
+ },
47
+ class: "bg-grey radius-big"
48
+ }, {
49
+ default: g(() => [
50
+ m(O, {
51
+ class: d({
52
+ "mn-b-small pd-medium": n.type !== "short",
53
+ "flex-child-order-last flex-child mn-l-small": n.type === "short"
54
+ }),
55
+ entity: e,
56
+ entityType: "order",
57
+ user: C.user,
58
+ owner: e.creator,
59
+ creator: e.creator,
60
+ date: e.createdAt
61
+ }, null, 8, ["class", "entity", "user", "owner", "creator", "date"]),
62
+ t("div", B, [
63
+ t("p", E, " Order No.: #" + c(e._id), 1),
64
+ t("span", q, c(e.status), 1),
65
+ F,
66
+ t("p", {
67
+ class: d([{ new: e.status === "Создан" }, "mn-b-small"])
68
+ }, null, 2)
69
+ ])
70
+ ]),
71
+ _: 2
72
+ }, 1032, ["to"]))), 256))
62
73
  ])
63
74
  ], 64);
64
75
  };
65
76
  }
66
77
  };
67
78
  export {
68
- S as default
79
+ U as default
69
80
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),d=require("../../../../node_modules/axios/lib/axios.cjs"),n=require("../../globals/store/globals.cjs"),l=d.default.create({baseURL:process.env.API_URL,withCredentials:!0}),a=c.reactive({all:[],current:{_id:null,positions:[],status:null,comment:"",owner:{type:"organization",target:null},creator:{type:"client",target:null},client:{name:null,phone:null,messenger:{type:null,value:null}},payment:{type:"",status:""},delivery:{type:null,address:"",status:""}}}),u={async create(e,t,r){try{let s={positions:e,owner:t,creator:r};const i=await l.post("/api/orders/create",s);return a.all.push(i.data),i.data}catch(s){n.setError(s)}},async read(e={}){try{e._id&&(e.params={_id:e._id});const t=await l.get("/api/orders/read",{params:e.params});return e._id?o(t.data[0],"current"):o(t.data,"all"),t.data}catch(t){throw n.setError(t),t}},async update(e){try{const t=await l.post(`/api/orders/${e._id}`,e),r=a.all.findIndex(s=>s._id===e._id);return r!==-1&&(a.all[r]=t.data),t.data}catch(t){n.setError(t)}},async delete(e){try{await l.delete(`/api/orders/${e}`),a.all=a.all.filter(t=>t._id!==e)}catch(t){n.setError(t)}},async changePaymentStatus(e,t){try{const r=await l.post(`/api/orders/payment/${e}`,{status:t}),s=a.all.findIndex(i=>i._id===e);s!==-1&&(a.all[s]=r.data)}catch(r){n.setError(r)}}};function o(e,t){a[t]=e}c.watch(a,(e,t)=>{});exports.actions=u;exports.state=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),d=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),n=d.default.create({baseURL:process.env.API_URL,withCredentials:!0}),a=c.reactive({all:[],current:{_id:null,positions:[],status:null,comment:"",owner:{type:"organization",target:null},creator:{type:"client",target:null},client:{name:null,phone:null,messenger:{type:null,value:null}},payment:{type:"",status:""},delivery:{type:null,address:"",status:""}}}),u={async create(e){try{const t=await n.post("/api/orders/create",e);return a.all.push(t.data),t.data}catch(t){s.setError(t)}},async read(e={}){try{e._id&&(e.params={_id:e._id});const t=await n.get("/api/orders/read",{params:e.params});return e._id?i(t.data[0],"current"):i(t.data,"all"),t.data}catch(t){throw s.setError(t),t}},async update(e){try{const t=await n.post(`/api/orders/${e._id}`,e),r=a.all.findIndex(l=>l._id===e._id);return r!==-1&&(a.all[r]=t.data),t.data}catch(t){s.setError(t)}},async delete(e){try{await n.delete(`/api/orders/${e}`),a.all=a.all.filter(t=>t._id!==e)}catch(t){s.setError(t)}},async changePaymentStatus(e,t){try{const r=await n.post(`/api/orders/payment/${e}`,{status:t}),l=a.all.findIndex(o=>o._id===e);l!==-1&&(a.all[l]=r.data)}catch(r){s.setError(r)}}};function i(e,t){a[t]=e}c.watch(a,(e,t)=>{});exports.actions=u;exports.state=a;
@@ -1,7 +1,7 @@
1
- import { reactive as c, watch as d } from "vue";
1
+ import { reactive as o, watch as d } from "vue";
2
2
  import p from "../../../../node_modules/axios/lib/axios.js";
3
- import { setError as s } from "../../globals/store/globals.js";
4
- const l = p.create({ baseURL: process.env.API_URL, withCredentials: !0 }), e = c({
3
+ import { setError as n } from "../../globals/store/globals.js";
4
+ const s = p.create({ baseURL: process.env.API_URL, withCredentials: !0 }), e = o({
5
5
  all: [],
6
6
  current: {
7
7
  _id: null,
@@ -35,53 +35,48 @@ const l = p.create({ baseURL: process.env.API_URL, withCredentials: !0 }), e = c
35
35
  }
36
36
  }
37
37
  }), f = {
38
- async create(a, t, r) {
38
+ async create(a) {
39
39
  try {
40
- let n = {
41
- positions: a,
42
- owner: t,
43
- creator: r
44
- };
45
- const i = await l.post("/api/orders/create", n);
46
- return e.all.push(i.data), i.data;
47
- } catch (n) {
48
- s(n);
40
+ const t = await s.post("/api/orders/create", a);
41
+ return e.all.push(t.data), t.data;
42
+ } catch (t) {
43
+ n(t);
49
44
  }
50
45
  },
51
46
  async read(a = {}) {
52
47
  try {
53
48
  a._id && (a.params = { _id: a._id });
54
- const t = await l.get("/api/orders/read", { params: a.params });
55
- return a._id ? o(t.data[0], "current") : o(t.data, "all"), t.data;
49
+ const t = await s.get("/api/orders/read", { params: a.params });
50
+ return a._id ? i(t.data[0], "current") : i(t.data, "all"), t.data;
56
51
  } catch (t) {
57
- throw s(t), t;
52
+ throw n(t), t;
58
53
  }
59
54
  },
60
55
  async update(a) {
61
56
  try {
62
- const t = await l.post(`/api/orders/${a._id}`, a), r = e.all.findIndex((n) => n._id === a._id);
57
+ const t = await s.post(`/api/orders/${a._id}`, a), r = e.all.findIndex((l) => l._id === a._id);
63
58
  return r !== -1 && (e.all[r] = t.data), t.data;
64
59
  } catch (t) {
65
- s(t);
60
+ n(t);
66
61
  }
67
62
  },
68
63
  async delete(a) {
69
64
  try {
70
- await l.delete(`/api/orders/${a}`), e.all = e.all.filter((t) => t._id !== a);
65
+ await s.delete(`/api/orders/${a}`), e.all = e.all.filter((t) => t._id !== a);
71
66
  } catch (t) {
72
- s(t);
67
+ n(t);
73
68
  }
74
69
  },
75
70
  async changePaymentStatus(a, t) {
76
71
  try {
77
- const r = await l.post(`/api/orders/payment/${a}`, { status: t }), n = e.all.findIndex((i) => i._id === a);
78
- n !== -1 && (e.all[n] = r.data);
72
+ const r = await s.post(`/api/orders/payment/${a}`, { status: t }), l = e.all.findIndex((c) => c._id === a);
73
+ l !== -1 && (e.all[l] = r.data);
79
74
  } catch (r) {
80
- s(r);
75
+ n(r);
81
76
  }
82
77
  }
83
78
  };
84
- function o(a, t) {
79
+ function i(a, t) {
85
80
  e[t] = a;
86
81
  }
87
82
  d(e, (a, t) => {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("../../../icons/navigation/IconEdit.vue.cjs");require("../../../../components/Spoiler/Spoiler.vue.cjs");require("./DepartmentSub.vue2.cjs");const u=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),c=require("./User.vue.cjs");require("./CardDepartment.vue2.cjs");const d={class:"radius-big o-hidden cols-2-1_3"},p={class:"pd-medium w-100"},m=["innerHTML"],g={key:0},k={__name:"CardDepartment",props:{department:Object,organization:Object},setup(t){const n=t;return(o,a)=>{const s=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",d,[e.createElementVNode("div",p,[e.createVNode(s,{to:{name:"Department Edit",params:{_id:n.organization,department:t.department._id}},class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"},{default:e.withCtx(()=>[e.createVNode(l.default,{class:"i-regular",classes:"fill-white"})]),_:1},8,["to"]),e.createElementVNode("h3",{onClick:a[0]||(a[0]=r=>o.$router.push(`/organizations/${n.organization}/departments/${t.department._id}`)),class:"mn-b-small w-100",innerHTML:t.department.profile.name},null,8,m),e.createElementVNode("ul",null,[t.department.members.length<1?(e.openBlock(),e.createElementBlock("li",g,"В отделе еще нет участников")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.department.members,(r,i)=>(e.openBlock(),e.createBlock(c.default,{class:"br-b br-solid br-grey",key:i,user:r.user,position:r.position,onClick:b=>o.$router.push(`/app/profile/${r.user._id}`)},null,8,["user","position","onClick"]))),128))])])])}}},_=u.default(k,[["__scopeId","data-v-745afcf2"]]);exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("../../../icons/navigation/IconEdit.vue.cjs");require("../../../../components/Spoiler/Spoiler.vue2.cjs");require("./DepartmentSub.vue2.cjs");const u=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),c=require("./User.vue.cjs");require("./CardDepartment.vue2.cjs");const d={class:"radius-big o-hidden cols-2-1_3"},p={class:"pd-medium w-100"},m=["innerHTML"],g={key:0},k={__name:"CardDepartment",props:{department:Object,organization:Object},setup(t){const n=t;return(o,a)=>{const s=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",d,[e.createElementVNode("div",p,[e.createVNode(s,{to:{name:"Department Edit",params:{_id:n.organization,department:t.department._id}},class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"},{default:e.withCtx(()=>[e.createVNode(l.default,{class:"i-regular",classes:"fill-white"})]),_:1},8,["to"]),e.createElementVNode("h3",{onClick:a[0]||(a[0]=r=>o.$router.push(`/organizations/${n.organization}/departments/${t.department._id}`)),class:"mn-b-small w-100",innerHTML:t.department.profile.name},null,8,m),e.createElementVNode("ul",null,[t.department.members.length<1?(e.openBlock(),e.createElementBlock("li",g,"В отделе еще нет участников")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.department.members,(r,i)=>(e.openBlock(),e.createBlock(c.default,{class:"br-b br-solid br-grey",key:i,user:r.user,position:r.position,onClick:b=>o.$router.push(`/app/profile/${r.user._id}`)},null,8,["user","position","onClick"]))),128))])])])}}},_=u.default(k,[["__scopeId","data-v-745afcf2"]]);exports.default=_;
@@ -1,6 +1,6 @@
1
1
  import { resolveComponent as p, openBlock as r, createElementBlock as o, createElementVNode as n, createVNode as l, withCtx as c, createCommentVNode as u, Fragment as _, renderList as f, createBlock as g } from "vue";
2
2
  import h from "../../../icons/navigation/IconEdit.vue.js";
3
- import "../../../../components/Spoiler/Spoiler.vue.js";
3
+ import "../../../../components/Spoiler/Spoiler.vue2.js";
4
4
  import "./DepartmentSub.vue2.js";
5
5
  import b from "../../../../../../_virtual/_plugin-vue_export-helper.js";
6
6
  import k from "./User.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Spoiler/Spoiler.vue.cjs");const u=require("../blocks/DepartmentSub.vue.cjs"),p=require("../blocks/User.vue.cjs"),t=require("../../store/departments.cjs"),_={class:"for-transition w-100"},h={key:0,id:"dash",class:"pd-medium bg-grey"},k={class:"mn-b-medium radius-medium pd-semi bg-white"},b={class:"flex-nowrap flex mn-b-small"},g={class:"w-100"},E=["innerHTML"],B={class:"mn-b-medium radius-medium pd-semi bg-white"},N=e.createElementVNode("h3",{class:"mn-b-regular"},"Команда",-1),V={key:0},f={class:"mn-b-medium radius-medium pd-semi bg-white"},y=e.createElementVNode("h3",{class:"mn-b-regular"},"Подотделы",-1),v={key:0},C={__name:"Department",async setup(w){let s,a;c.useRouter();const n=c.useRoute();return[s,a]=e.withAsyncContext(()=>t.actions.readOne(n.params.department)),await s,a(),(l,q)=>{const i=e.resolveComponent("IconEdit"),d=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",_,[t.state.department?(e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("section",k,[e.createElementVNode("div",b,[e.createElementVNode("h2",g,e.toDisplayString(t.state.department.profile.name),1),e.createVNode(d,{to:{name:"Department Edit",params:{_id:e.unref(n).params._id,department:e.unref(n).params.department}},class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"},{default:e.withCtx(()=>[e.createVNode(i,{class:"i-regular",classes:"fill-white"})]),_:1},8,["to"])]),e.createElementVNode("p",{class:"t-transp p-big",innerHTML:t.state.department.description},null,8,E)]),e.createElementVNode("section",B,[N,e.createElementVNode("ul",null,[t.state.department.members.length<1?(e.openBlock(),e.createElementBlock("li",V,"В отделе еще нет участников")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(r,o)=>(e.openBlock(),e.createBlock(p.default,{class:"br-b br-solid br-grey",key:o,user:r,position:r.position,onClick:m=>l.$router.push(`/app/profile/${r.user._id}`)},null,8,["user","position","onClick"]))),128))])]),e.createElementVNode("section",f,[y,e.createElementVNode("ul",null,[t.state.department.subdepartments.length<1?(e.openBlock(),e.createElementBlock("li",v,"В отделе еще нет подотделов")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.subdepartments,(r,o)=>(e.openBlock(),e.createBlock(u.default,{onClick:m=>l.$router.push(`/app/organization/departments/${r._id}`),key:o,class:"br-b br-solid br-grey",department:r},null,8,["onClick","department"]))),128))])])])):e.createCommentVNode("",!0)])}}};exports.default=C;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Spoiler/Spoiler.vue2.cjs");const u=require("../blocks/DepartmentSub.vue.cjs"),p=require("../blocks/User.vue.cjs"),t=require("../../store/departments.cjs"),_={class:"for-transition w-100"},h={key:0,id:"dash",class:"pd-medium bg-grey"},k={class:"mn-b-medium radius-medium pd-semi bg-white"},b={class:"flex-nowrap flex mn-b-small"},g={class:"w-100"},E=["innerHTML"],B={class:"mn-b-medium radius-medium pd-semi bg-white"},N=e.createElementVNode("h3",{class:"mn-b-regular"},"Команда",-1),V={key:0},f={class:"mn-b-medium radius-medium pd-semi bg-white"},y=e.createElementVNode("h3",{class:"mn-b-regular"},"Подотделы",-1),v={key:0},C={__name:"Department",async setup(w){let s,a;c.useRouter();const n=c.useRoute();return[s,a]=e.withAsyncContext(()=>t.actions.readOne(n.params.department)),await s,a(),(l,q)=>{const i=e.resolveComponent("IconEdit"),d=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",_,[t.state.department?(e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("section",k,[e.createElementVNode("div",b,[e.createElementVNode("h2",g,e.toDisplayString(t.state.department.profile.name),1),e.createVNode(d,{to:{name:"Department Edit",params:{_id:e.unref(n).params._id,department:e.unref(n).params.department}},class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"},{default:e.withCtx(()=>[e.createVNode(i,{class:"i-regular",classes:"fill-white"})]),_:1},8,["to"])]),e.createElementVNode("p",{class:"t-transp p-big",innerHTML:t.state.department.description},null,8,E)]),e.createElementVNode("section",B,[N,e.createElementVNode("ul",null,[t.state.department.members.length<1?(e.openBlock(),e.createElementBlock("li",V,"В отделе еще нет участников")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(r,o)=>(e.openBlock(),e.createBlock(p.default,{class:"br-b br-solid br-grey",key:o,user:r,position:r.position,onClick:m=>l.$router.push(`/app/profile/${r.user._id}`)},null,8,["user","position","onClick"]))),128))])]),e.createElementVNode("section",f,[y,e.createElementVNode("ul",null,[t.state.department.subdepartments.length<1?(e.openBlock(),e.createElementBlock("li",v,"В отделе еще нет подотделов")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.subdepartments,(r,o)=>(e.openBlock(),e.createBlock(u.default,{onClick:m=>l.$router.push(`/app/organization/departments/${r._id}`),key:o,class:"br-b br-solid br-grey",department:r},null,8,["onClick","department"]))),128))])])])):e.createCommentVNode("",!0)])}}};exports.default=C;
@@ -1,6 +1,6 @@
1
1
  import { withAsyncContext as y, resolveComponent as p, openBlock as t, createElementBlock as n, createElementVNode as e, toDisplayString as w, createVNode as c, unref as u, withCtx as C, createCommentVNode as a, Fragment as _, renderList as h, createBlock as b } from "vue";
2
2
  import { useRouter as v, useRoute as $ } from "vue-router";
3
- import "../../../../components/Spoiler/Spoiler.vue.js";
3
+ import "../../../../components/Spoiler/Spoiler.vue2.js";
4
4
  import x from "../blocks/DepartmentSub.vue.js";
5
5
  import E from "../blocks/User.vue.js";
6
6
  import { actions as D, state as s } from "../../store/departments.js";