@ozdao/prometheus-framework 0.2.53 → 0.2.54

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. package/dist/main-180a9315.js +91 -0
  2. package/dist/main-3b7bd446.mjs +13631 -0
  3. package/dist/main-Im8ovDCi.mjs +13609 -0
  4. package/dist/main-MjvO1l5U.js +91 -0
  5. package/dist/main.css +1 -1
  6. package/dist/organizations.server.js +17 -3
  7. package/dist/organizations.server.mjs +17 -3
  8. package/dist/products.server.js +1 -1
  9. package/dist/products.server.mjs +1 -1
  10. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +1 -1
  11. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +20 -20
  12. package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
  13. package/dist/prometheus-framework/src/components/Field/Field.vue2.js +28 -25
  14. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +70 -2
  16. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +2 -70
  18. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/Select/Select.vue.js +95 -2
  20. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  21. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +2 -95
  22. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +57 -77
  24. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
  25. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +1 -1
  26. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  28. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  30. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
  31. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +65 -2
  32. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
  33. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +2 -65
  34. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  36. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  38. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +98 -94
  40. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
  42. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js +59 -52
  44. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js +1 -1
  46. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  48. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  50. package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.js +8 -13
  52. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  54. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +11 -2
  56. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +2 -11
  58. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +53 -77
  60. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/orders/store/orders.js +42 -32
  62. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  64. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  66. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  68. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  70. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  72. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  74. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  76. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  78. package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +5 -3
  80. package/dist/prometheus-framework/src/modules/organizations/router/organizations.router.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/organizations/router/organizations.router.js +20 -5
  82. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  84. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  86. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  88. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  90. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  92. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  94. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  96. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +61 -75
  98. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +2 -2
  100. package/dist/prometheus-framework.cjs.js +1 -1
  101. package/dist/prometheus-framework.es.js +1 -1
  102. package/dist/style.css +1 -1
  103. package/dist/web-8b404cc2.js +1 -0
  104. package/dist/web-e9b09dc6.mjs +55 -0
  105. package/dist/web-i-suCpLM.mjs +55 -0
  106. package/dist/web-vB7UhMOt.js +1 -0
  107. package/package.json +1 -1
  108. package/src/components/EditImages/EditImages.vue +1 -1
  109. package/src/components/Field/Field.vue +5 -0
  110. package/src/components/LocationSelection/LocationSelection.vue +2 -2
  111. package/src/modules/backoffice/components/pages/Dashboard.vue +4 -25
  112. package/src/modules/backoffice/router/admin.js +0 -14
  113. package/src/modules/backoffice/router/backoffice.js +1 -1
  114. package/src/modules/events/components/pages/EditEvent.vue +10 -6
  115. package/src/modules/events/components/sections/HeroEvent.vue +12 -2
  116. package/src/modules/events/components/sections/SectionPreviousEvents.vue +1 -1
  117. package/src/modules/landing/components/sections/MobileApp.vue +2 -6
  118. package/src/modules/orders/components/blocks/StatusHistory.vue +91 -31
  119. package/src/modules/orders/components/pages/EditOrder.vue +4 -21
  120. package/src/modules/orders/components/pages/FormOrder.vue +53 -15
  121. package/src/modules/orders/components/pages/Order.vue +2 -2
  122. package/src/modules/orders/components/sections/FormClientDetails.vue +63 -0
  123. package/src/modules/orders/components/sections/FormDelivery.vue +72 -0
  124. package/src/modules/orders/components/sections/FormPayment.vue +27 -0
  125. package/src/modules/orders/controllers/orders.controller.js +63 -49
  126. package/src/modules/orders/models/order.model.js +9 -13
  127. package/src/modules/orders/routes/orders.routes.js +6 -20
  128. package/src/modules/orders/store/orders.js +24 -12
  129. package/src/modules/organizations/controllers/organizations.controller.js +28 -9
  130. package/src/modules/organizations/router/organizations.js +4 -1
  131. package/src/modules/organizations/router/organizations.router.js +18 -2
  132. package/src/modules/products/controllers/products.controller.js +3 -2
  133. package/src/modules/users/components/pages/Profile.vue +2 -2
  134. package/src/modules/orders/components/sections/FormOrderDetails.vue +0 -220
@@ -1,130 +1,106 @@
1
- import { reactive as D, toRefs as S, ref as m, onMounted as T, computed as P, openBlock as o, createElementBlock as r, Fragment as C, createElementVNode as e, createTextVNode as i, toDisplayString as a, unref as n, createVNode as l, withCtx as N, createCommentVNode as d, renderList as U, createBlock as z } from "vue";
2
- import { useRoute as F } from "vue-router";
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
3
  import E from "../../../../components/Block/Block.vue.js";
4
4
  import "../../../../components/Field/Field.vue.js";
5
5
  import V from "../../../products/components/blocks/CardPosition.vue.js";
6
6
  import "../../../products/store/leftovers.js";
7
7
  import "../../../products/components/blocks/ListPositions.vue2.js";
8
- import I from "../sections/FormOrderDetails.vue.js";
9
- import { actions as _, state as u } from "../../store/orders.js";
10
- import { actions as L } from "../../../products/store/products.js";
8
+ import { actions as m, state as _ } from "../../store/orders.js";
9
+ import { actions as F } from "../../../products/store/products.js";
11
10
  import "./EditOrder.vue2.js";
12
- const M = /* @__PURE__ */ e("header", { class: "mn-b-medium flex-v-center flex-nowrap flex" }, [
13
- /* @__PURE__ */ e("h2", { class: "mn-r-medium" }, "Edit Order")
14
- ], -1), j = { class: "gap-thin flex-nowrap flex mn-b-semi" }, q = { class: "w-100 br-solid br-1px br-black-transp-10 radius-big pd-medium" }, G = { class: "mn-b-small p-big" }, H = /* @__PURE__ */ e("br", null, null, -1), J = /* @__PURE__ */ e("button", { class: "button" }, "Подтвердить заказ", -1), K = { class: "w-100 br-solid br-1px br-black-transp-10 radius-big pd-medium" }, Q = { class: "mn-b-semi p-big" }, W = /* @__PURE__ */ e("br", null, null, -1), X = /* @__PURE__ */ e("button", { class: "button" }, "Изменить статус оплаты", -1), Y = {
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 = {
15
14
  key: 0,
16
15
  class: "w-100"
17
- }, Z = { class: "mn-thinw-100 flex-v-center flex block" }, ee = { class: "p-big" }, te = {
16
+ }, M = { class: "mn-thinw-100 flex-v-center flex block" }, j = { class: "p-big" }, q = {
18
17
  key: 0,
19
18
  class: "p-big t-semi"
20
- }, oe = {
19
+ }, G = {
21
20
  key: 1,
22
21
  class: "p-big t-semi"
23
- }, se = {
22
+ }, H = {
24
23
  key: 2,
25
24
  class: "p-big t-semi"
26
- }, re = { key: 3 }, ne = { key: 4 }, ie = { key: 5 }, de = /* @__PURE__ */ e("button", { class: "mn-l-auto button" }, "Запросить онлайн", -1), ke = {
25
+ }, J = { key: 3 }, K = { key: 4 }, Q = { key: 5 }, W = /* @__PURE__ */ i("button", { class: "mn-l-auto button" }, "Запросить онлайн", -1), ae = {
27
26
  __name: "EditOrder",
28
27
  props: ["showProduct"],
29
- setup($) {
30
- const A = F(), B = $;
31
- B.showProduct = [];
28
+ setup(A) {
29
+ const B = z(), O = A;
30
+ O.showProduct = [];
32
31
  function f(t) {
33
- _.addProduct(t);
32
+ m.addProduct(t);
34
33
  }
35
- function O(t) {
36
- _.deleteProduct(t);
34
+ function R(t) {
35
+ m.deleteProduct(t);
37
36
  }
38
- let R = D([]);
39
- S(R), m(!1);
40
- const p = m([]);
41
- let s = m({});
42
- T(async () => {
37
+ let $ = C([]);
38
+ D($), l(!1);
39
+ const a = l([]);
40
+ let r = l({});
41
+ S(async () => {
43
42
  try {
44
- const t = await L.read({
43
+ const t = await F.read({
45
44
  organization: "65141c476cf9860013b49f6d"
46
45
  });
47
- console.log(t), p.value = t;
46
+ console.log(t), a.value = t;
48
47
  } catch {
49
48
  console.error("error");
50
49
  }
51
- await _.fetchOrder(A.params.id), s.value = u.current;
50
+ await m.fetchOrder(B.params.id), r.value = _.current;
52
51
  });
53
- const c = P(() => 100);
54
- return P(() => []), (t, ae) => {
55
- var b, h, v, y, g, k, x;
56
- return o(), r(C, null, [
57
- M,
58
- e("section", j, [
59
- e("div", q, [
60
- e("p", G, [
61
- i(" Статус заказа:"),
62
- H,
63
- i(a(n(s).status), 1)
64
- ]),
65
- J
66
- ]),
67
- e("div", K, [
68
- e("p", Q, [
69
- i("Статус оплаты:"),
70
- W,
71
- i(a((b = n(s).payment) == null ? void 0 : b.status), 1)
72
- ]),
73
- X
74
- ])
75
- ]),
76
- l(E, {
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, {
77
58
  title: "Add Position",
78
59
  class: "mn-b-semi"
79
60
  }, {
80
61
  default: N(() => [
81
- l(V, {
62
+ u(V, {
82
63
  onAdd: f,
83
- products: p.value
64
+ products: a.value
84
65
  }, null, 8, ["products"])
85
66
  ]),
86
67
  _: 1
87
68
  }),
88
- l(E, {
69
+ u(E, {
89
70
  title: "Invetory Sheet",
90
71
  class: "mn-b-semi"
91
72
  }, {
92
73
  default: N(() => [
93
- u.current.positions.length === 0 ? (o(), r("span", Y, " No positions added yet ")) : d("", !0),
94
- (o(!0), r(C, null, U(u.current.positions, (w, ce) => (o(), z(V, {
95
- key: w._id,
96
- product: w,
97
- products: p.value,
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,
98
79
  onAdd: f,
99
- onDelete: O,
80
+ onDelete: R,
100
81
  onUpdate: t.updateProduct
101
82
  }, null, 8, ["product", "products", "onUpdate"]))), 128))
102
83
  ]),
103
84
  _: 1
104
85
  }),
105
- l(I, {
106
- order: u.current,
107
- onCreate: t.handleCreate,
108
- class: "bg-grey pd-medium radius-big mn-b-semi"
109
- }, null, 8, ["order", "onCreate"]),
110
- e("div", Z, [
111
- e("p", ee, [
112
- i("Сумма к оплате: "),
113
- ((h = n(s).info) == null ? void 0 : h.delivery) === "Самовывоз" ? (o(), r("span", te, a(c.value / 100) + "", 1)) : d("", !0),
114
- ((v = n(s).info) == null ? void 0 : v.delivery) === "Курьером" ? (o(), r("span", oe, a(c.value / 100 + 350) + "", 1)) : d("", !0),
115
- ((y = n(s).info) == null ? void 0 : y.delivery) === "Почтой" ? (o(), r("span", se, a(c.value / 100 + 550) + " ", 1)) : d("", !0),
116
- i(" (Заказ " + a(c.value / 100) + " ₽ + доставка ", 1),
117
- ((g = n(s).info) == null ? void 0 : g.delivery) === "Самовывоз" ? (o(), r("span", re, "0")) : d("", !0),
118
- ((k = n(s).info) == null ? void 0 : k.delivery) === "Курьером" ? (o(), r("span", ne, "350")) : d("", !0),
119
- ((x = n(s).info) == null ? void 0 : x.delivery) === "Почтой" ? (o(), r("span", ie, "550")) : d("", !0),
120
- i(" ₽) ")
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(" ₽) ")
121
97
  ]),
122
- de
98
+ W
123
99
  ])
124
100
  ], 64);
125
101
  };
126
102
  }
127
103
  };
128
104
  export {
129
- ke as default
105
+ ae as default
130
106
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),l=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),n=l.default.create({baseURL:process.env.API_URL,withCredentials:!0}),r=c.reactive({all:[],current:{_id:"",organization:"",positions:[],status:null,comment:"",user:{_id:null,name:"",phone:null,messenger:{type:"",value:""}},payment:{type:"",status:""},delivery:{type:null,address:"",status:""}}}),d={async create(e,t){try{r.current.positions=e,r.current.organization=t;const a=await n.post("/api/orders/create",r.current);return r.all.push(a.data),a.data}catch(a){s.setError(a)}},async fetchOrder(e){try{const t=await n.get(`/api/orders/${e}`);return r.current=t.data,console.log(t.data),t.data}catch(t){throw s.setError(t),err}},async read(e){try{const t=await n.get("/api/orders/read");return r.all=t.data,t.data}catch(t){throw s.setError(t),t}},async update(e){try{const t=await n.post(`/api/orders/${e._id}`,e),a=r.all.findIndex(o=>o._id===e._id);return a!==-1&&(r.all[a]=t.data),t.data}catch(t){s.setError(t)}},async delete(e){try{await n.delete(`/api/orders/${e}`),r.all=r.all.filter(t=>t._id!==e)}catch(t){s.setError(t)}},async changePaymentStatus(e,t){try{const a=await n.post(`/api/orders/payment/${e}`,{status:t}),o=r.all.findIndex(i=>i._id===e);o!==-1&&(r.all[o]=a.data)}catch(a){s.setError(a)}}};c.watch(r,(e,t)=>{});exports.actions=d;exports.state=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),i=require("../../../../node_modules/axios/lib/axios.cjs"),n=require("../../globals/store/globals.cjs"),o=i.default.create({baseURL:process.env.API_URL,withCredentials:!0}),r=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:""}}}),d={async create(e,t,a){try{let s={positions:e,owner:t,creator:a};const l=await o.post("/api/orders/create",s);return r.all.push(l.data),l.data}catch(s){n.setError(s)}},async fetchOrder(e){try{const t=await o.get(`/api/orders/${e}`);return r.current=t.data,console.log(t.data),t.data}catch(t){throw n.setError(t),err}},async read(e){try{const t=await o.get("/api/orders/read");return r.all=t.data,t.data}catch(t){throw n.setError(t),t}},async update(e){try{const t=await o.post(`/api/orders/${e._id}`,e),a=r.all.findIndex(s=>s._id===e._id);return a!==-1&&(r.all[a]=t.data),t.data}catch(t){n.setError(t)}},async delete(e){try{await o.delete(`/api/orders/${e}`),r.all=r.all.filter(t=>t._id!==e)}catch(t){n.setError(t)}},async changePaymentStatus(e,t){try{const a=await o.post(`/api/orders/payment/${e}`,{status:t}),s=r.all.findIndex(l=>l._id===e);s!==-1&&(r.all[s]=a.data)}catch(a){n.setError(a)}}};c.watch(r,(e,t)=>{});exports.actions=d;exports.state=r;
@@ -1,21 +1,27 @@
1
- import { reactive as i, watch as d } from "vue";
2
- import l from "../../../../node_modules/axios/lib/axios.js";
1
+ import { reactive as c, watch as i } from "vue";
2
+ import d from "../../../../node_modules/axios/lib/axios.js";
3
3
  import { setError as s } from "../../globals/store/globals.js";
4
- const n = l.create({ baseURL: process.env.API_URL, withCredentials: !0 }), e = i({
4
+ const o = d.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = c({
5
5
  all: [],
6
6
  current: {
7
- _id: "",
8
- organization: "",
7
+ _id: null,
9
8
  positions: [],
10
9
  status: null,
11
10
  comment: "",
12
- user: {
13
- _id: null,
14
- name: "",
11
+ owner: {
12
+ type: "organization",
13
+ target: null
14
+ },
15
+ creator: {
16
+ type: "client",
17
+ target: null
18
+ },
19
+ client: {
20
+ name: null,
15
21
  phone: null,
16
22
  messenger: {
17
- type: "",
18
- value: ""
23
+ type: null,
24
+ value: null
19
25
  }
20
26
  },
21
27
  payment: {
@@ -29,58 +35,62 @@ const n = l.create({ baseURL: process.env.API_URL, withCredentials: !0 }), e = i
29
35
  }
30
36
  }
31
37
  }), h = {
32
- async create(a, t) {
38
+ async create(e, t, r) {
33
39
  try {
34
- e.current.positions = a, e.current.organization = t;
35
- const r = await n.post("/api/orders/create", e.current);
36
- return e.all.push(r.data), r.data;
37
- } catch (r) {
38
- s(r);
40
+ let n = {
41
+ positions: e,
42
+ owner: t,
43
+ creator: r
44
+ };
45
+ const l = await o.post("/api/orders/create", n);
46
+ return a.all.push(l.data), l.data;
47
+ } catch (n) {
48
+ s(n);
39
49
  }
40
50
  },
41
- async fetchOrder(a) {
51
+ async fetchOrder(e) {
42
52
  try {
43
- const t = await n.get(`/api/orders/${a}`);
44
- return e.current = t.data, console.log(t.data), t.data;
53
+ const t = await o.get(`/api/orders/${e}`);
54
+ return a.current = t.data, console.log(t.data), t.data;
45
55
  } catch (t) {
46
56
  throw s(t), err;
47
57
  }
48
58
  },
49
- async read(a) {
59
+ async read(e) {
50
60
  try {
51
- const t = await n.get("/api/orders/read");
52
- return e.all = t.data, t.data;
61
+ const t = await o.get("/api/orders/read");
62
+ return a.all = t.data, t.data;
53
63
  } catch (t) {
54
64
  throw s(t), t;
55
65
  }
56
66
  },
57
- async update(a) {
67
+ async update(e) {
58
68
  try {
59
- const t = await n.post(`/api/orders/${a._id}`, a), r = e.all.findIndex((o) => o._id === a._id);
60
- return r !== -1 && (e.all[r] = t.data), t.data;
69
+ const t = await o.post(`/api/orders/${e._id}`, e), r = a.all.findIndex((n) => n._id === e._id);
70
+ return r !== -1 && (a.all[r] = t.data), t.data;
61
71
  } catch (t) {
62
72
  s(t);
63
73
  }
64
74
  },
65
- async delete(a) {
75
+ async delete(e) {
66
76
  try {
67
- await n.delete(`/api/orders/${a}`), e.all = e.all.filter((t) => t._id !== a);
77
+ await o.delete(`/api/orders/${e}`), a.all = a.all.filter((t) => t._id !== e);
68
78
  } catch (t) {
69
79
  s(t);
70
80
  }
71
81
  },
72
- async changePaymentStatus(a, t) {
82
+ async changePaymentStatus(e, t) {
73
83
  try {
74
- const r = await n.post(`/api/orders/payment/${a}`, { status: t }), o = e.all.findIndex((c) => c._id === a);
75
- o !== -1 && (e.all[o] = r.data);
84
+ const r = await o.post(`/api/orders/payment/${e}`, { status: t }), n = a.all.findIndex((l) => l._id === e);
85
+ n !== -1 && (a.all[n] = r.data);
76
86
  } catch (r) {
77
87
  s(r);
78
88
  }
79
89
  }
80
90
  };
81
- d(e, (a, t) => {
91
+ i(a, (e, t) => {
82
92
  });
83
93
  export {
84
94
  h as actions,
85
- e as state
95
+ a as state
86
96
  };
@@ -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.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
+ "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,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.vue.js";
4
+ import "../../../../components/Select/Select.vue2.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.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;
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;
@@ -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.vue.js";
10
+ import "../../../../components/Select/Select.vue2.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.vue2.js";
17
+ import M from "../../../../components/Popup/Popup.vue.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.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const v=require("../blocks/User.vue.cjs"),g=require("../../../auth/store/auth.cjs"),a=require("../../../auth/store/invites.cjs"),d=require("../../store/memberships.cjs"),h=require("../../store/organizations.cjs"),f=require("../../store/departments.cjs"),k={class:"pd-thin"},q=e.createElementVNode("section",{class:"mn-b-medium radius-medium pd-semi bg-grey"},[e.createElementVNode("h2",{class:"mn-b-regular"},"Members"),e.createElementVNode("p",{class:"t-transp p-big"},"Add new memberships to the group and configure access rights.")],-1),E={class:"mn-b-big radius-medium bg-white"},y={key:0,class:"cols-1 gap-thin"},B={key:1},N={class:"br-grey br-1px br-solid radius-small mn-b-thin flex-nowrap flex-v-center flex pd-medium"},V={class:"w-100 mn-r-small"},w={class:"t-transp"},x={class:"mn-l-medium flex-v-center flex"},M=["onClick"],C={__name:"Members",setup(S){const l=c.useRoute();c.useRouter();const o=e.ref(null),i=e.ref("members");e.onMounted(async()=>{o.value=(await h.actions.read({_id:l.params._id,user:g.state.user._id}))[0],await d.actions.read({target:l.params._id}),await a.actions.read(o.value._id)}),e.computed(()=>{const s=f.state.departments,n=s.flatMap(t=>t.subdepartments.map(r=>r._id));return s.filter(t=>!n.includes(t._id))});async function u(s){await a.actions.create(o.value._id,s)}async function m(s,n){a.state.invites.splice(s,1),await a.actions.delete(n._id)}return(s,n)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("div",k,[q,e.createVNode(b.default,{organization:o.value,onSendInvite:u},null,8,["organization"]),e.createVNode(_.default,{selected:i.value,"onUpdate:selected":n[0]||(n[0]=t=>i.value=t),class:"mn-b-medium bg-grey radius-small",tabs:[{name:"Members",value:"members"},{name:"Invites",value:"invites"}]},null,8,["selected"]),e.createElementVNode("section",E,[i.value==="members"?(e.openBlock(),e.createElementBlock("div",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.state.memberships,(t,r)=>(e.openBlock(),e.createBlock(v.default,{key:r,user:t,onClick:p=>s.$router.push(`/app/profile/${t._id}`),class:"bg-grey radius-small flex-nowrap flex pd-medium"},null,8,["user","onClick"]))),128))])):e.createCommentVNode("",!0),i.value==="invites"?(e.openBlock(),e.createElementBlock("div",B,[e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.state.invites,(t,r)=>(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("span",V,e.toDisplayString(t.invitedEmail)+" "+e.toDisplayString(t.invitedPhone),1),e.createElementVNode("span",w,e.toDisplayString(t.status),1),e.createElementVNode("div",x,[e.createElementVNode("button",{onClick:p=>m(r,t),class:"button-small button"},"×",8,M)])]))),256))])):e.createCommentVNode("",!0)])])]),_:1}))}};exports.default=C;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Loader/Loader.vue.cjs");require("vue-i18n");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;
@@ -5,7 +5,7 @@ import "vue-i18n";
5
5
  import S from "../../../../components/Tab/Tab.vue2.js";
6
6
  import "../../../../components/Tooltip/Tooltip.vue2.js";
7
7
  import z from "../sections/MembersAdd.vue.js";
8
- import "../../../mobile/components/Menu/Menu.vue.js";
8
+ import "../../../mobile/components/Menu/Menu.vue2.js";
9
9
  import "../../../mobile/components/Menu/MenuItem.vue.js";
10
10
  import B from "../blocks/User.vue.js";
11
11
  import { state as E } from "../../../auth/store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const k=require("../../../../components/Tab/Tab.vue2.cjs"),p=require("../../../../components/Block/Block.vue.cjs"),f=require("../../../../components/Feed/Feed.vue.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/User.vue2.cjs");const h=require("../blocks/CardDepartment.vue.cjs"),v=require("../../../events/components/sections/Feed.vue.cjs"),g=require("../../../community/components/sections/Feed.vue.cjs"),q=require("../../../spots/components/blocks/CardSpot.vue.cjs"),w=require("../sections/DetailsTab.vue.cjs"),C=require("../../../products/components/pages/Products.vue.cjs"),s=require("../../../auth/store/auth.cjs"),a=require("../../store/organizations.cjs"),y=require("../../store/memberships.cjs"),B=require("../../store/departments.cjs"),N=require("../../../spots/store/spots.cjs");require("./Organization.vue2.cjs");const V={key:0,class:"pd-thin for-transition w-100"},x={class:"pos-relative"},z={key:0},T={__name:"Organization",setup($){const _=m.useRouter(),t=m.useRoute();let b=t.query.tab?t.query.tab:"products";const c=e.ref(null);e.onMounted(async()=>{c.value=await a.actions.read({_id:t.params._id,user:s.state.user._id}),await y.actions.read(t.params._id)});const r=e.ref(b);return t.query.tab=r.value,e.watch(r,i=>{_.replace({query:null})}),(i,n)=>{const u=e.resolveComponent("router-link");return c.value?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(w.default,{organization:a.state.current,user:s.state.user,class:"mn-b-semi"},null,8,["organization","user"]),e.createVNode(p.default,{title:`${a.state.current.numberOfMembers} members`,actions:[{label:">",function:()=>i.$router.push(`/organizations/${e.unref(t).params._id}/departments/create`)}],class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(f.default,{states:{empty:{title:"No Departments Found",description:"Currently, there are no departments available."}},store:{read:o=>B.actions.read(e.unref(t).params._id),state:null},options:{user:s.state.user._id,sort:"numberOfMemberships",limit:10}},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(l,d)=>(e.openBlock(),e.createBlock(h.default,{key:d,department:l,organization:e.unref(t).params._id,class:"radius-big bg-white pos-relative mn-b-thin"},null,8,["department","organization"]))),128))]),_:1},8,["states","store","options"])]),_:1},8,["title","actions"]),e.createVNode(k.default,{selected:r.value,"onUpdate:selected":n[0]||(n[0]=o=>r.value=o),tabs:[{name:"Community",value:"community"},{name:"Menu",value:"products"},{name:"Events",value:"events"},{name:"Spots",value:"spots"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("div",x,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="community"?(e.openBlock(),e.createBlock(g.default,{key:0,user:s.state.user._id,owner:e.unref(t).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="events"?(e.openBlock(),e.createBlock(v.default,{key:0,user:s.state.user._id,owner:e.unref(t).params._id,sortOrder:"desc",sortParam:"date.start"},null,8,["user","owner","sortParam"])):e.createCommentVNode("",!0)]),_:1}),r.value==="products"&&s.state.user._id===a.state.current.owner?(e.openBlock(),e.createBlock(p.default,{key:0,class:"flex-nowrap gap-thin mn-b-small flex"},{default:e.withCtx(()=>[e.createVNode(u,{class:"bg-black t-white uppercase t-semi pd-thin radius-extra",to:{name:"ProductAdd",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Add Product ")]),_:1},8,["to"]),e.createVNode(u,{class:"uppercase t-semi pd-thin radius-extra",to:{name:"Leftovers",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Change Invetory ")]),_:1},8,["to"]),e.createVNode(u,{class:"d-block mn-l-auto uppercase t-semi bg-white pd-thin radius-extra",to:{name:"Backoffice",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Go to Backoffice ")]),_:1},8,["to"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="products"?(e.openBlock(),e.createBlock(C.default,{key:0,organization:a.state.current},null,8,["organization"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="spots"?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(f.default,{states:{empty:{title:"No Spots Found",description:"Currently, there are no spots available."}},store:{read:o=>N.actions.read(e.unref(t).params._id),state:a.state},options:{user:s.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(l,d)=>(e.openBlock(),e.createBlock(q.default,{key:d,spot:l,organization:a.state.current,class:"radius-big bg-grey mn-b-thin"},null,8,["spot","organization"]))),128))]),_:1},8,["states","store","options"]),s.state.user._id===a.state.current.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[1]||(n[1]=o=>i.$router.push(`/spots/${a.state.current._id}/spots/create`)),class:"mn-b-thin button w-100"}," Add spot ")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})])])):e.createCommentVNode("",!0)}}};exports.default=T;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const k=require("../../../../components/Tab/Tab.vue2.cjs"),p=require("../../../../components/Block/Block.vue.cjs"),f=require("../../../../components/Feed/Feed.vue.cjs");require("../../../mobile/components/Menu/Menu.vue2.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/User.vue2.cjs");const h=require("../blocks/CardDepartment.vue.cjs"),v=require("../../../events/components/sections/Feed.vue.cjs"),g=require("../../../community/components/sections/Feed.vue.cjs"),q=require("../../../spots/components/blocks/CardSpot.vue.cjs"),w=require("../sections/DetailsTab.vue.cjs"),C=require("../../../products/components/pages/Products.vue.cjs"),s=require("../../../auth/store/auth.cjs"),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.vue.js";
9
+ import "../../../mobile/components/Menu/Menu.vue2.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.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;
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;
@@ -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.vue.js";
9
+ import "../../../../components/Select/Select.vue2.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.vue.js";
13
+ import "../../../../components/Popup/Popup.vue2.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.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;
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;
@@ -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.vue.js";
6
+ import "../../../../components/Popup/Popup.vue2.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.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
+ "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;