@ozdao/prometheus-framework 0.2.93 → 0.2.95

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. package/dist/auth.server.js +15 -14
  2. package/dist/auth.server.mjs +15 -14
  3. package/dist/main-BJvlNekm.mjs +13631 -0
  4. package/dist/main-pGo7JpSP.js +92 -0
  5. package/dist/orders.server.js +31 -27
  6. package/dist/orders.server.mjs +31 -27
  7. package/dist/organizations.server.js +31 -10
  8. package/dist/organizations.server.mjs +31 -10
  9. package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
  11. package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +19 -19
  12. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +12 -12
  13. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +36 -1
  15. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
  16. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +1 -36
  17. package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +21 -21
  18. package/dist/prometheus-framework/src/modules/auth/router/auth.cjs +1 -1
  19. package/dist/prometheus-framework/src/modules/auth/router/auth.js +4 -0
  20. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
  21. package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +8 -8
  22. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +58 -58
  24. package/dist/prometheus-framework/src/modules/icons/navigation/IconCross.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/modules/icons/navigation/IconCross.vue.js +22 -21
  26. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.cjs +2 -2
  27. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.js +48 -37
  28. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +160 -167
  30. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +49 -48
  32. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +113 -110
  34. package/dist/prometheus-framework/src/modules/orders/components/partials/ShopCart.vue.js +14 -14
  35. package/dist/prometheus-framework/src/modules/orders/store/models/order.cjs +1 -0
  36. package/dist/prometheus-framework/src/modules/orders/store/models/order.js +28 -0
  37. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/orders/store/orders.js +25 -43
  39. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +20 -20
  41. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +47 -47
  47. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +143 -131
  49. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  51. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +32 -34
  55. package/dist/prometheus-framework/src/modules/organizations/router/members.router.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/organizations/router/members.router.js +1 -1
  57. package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/organizations/store/departments.js +1 -1
  59. package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +30 -32
  61. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +155 -187
  63. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +18 -18
  65. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +26 -22
  69. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +66 -63
  71. package/dist/prometheus-framework.cjs.js +1 -1
  72. package/dist/prometheus-framework.es.js +1 -1
  73. package/dist/style.css +1 -1
  74. package/dist/web-B2xhKZNK.js +1 -0
  75. package/dist/web-DTzbVshr.mjs +54 -0
  76. package/package.json +1 -1
  77. package/src/components/Block/Block.vue +1 -1
  78. package/src/modules/auth/controllers/auth.controller.js +19 -16
  79. package/src/modules/auth/router/auth.js +4 -0
  80. package/src/modules/backoffice/router/backoffice.js +3 -3
  81. package/src/modules/chats/routes/chats.routes.js +1 -2
  82. package/src/modules/gallery/components/sections/BackofficeGallery.vue +2 -1
  83. package/src/modules/icons/navigation/IconCross.vue +11 -7
  84. package/src/modules/orders/components/blocks/StatusHistory.vue +8 -11
  85. package/src/modules/orders/components/pages/OrderBackoffice.vue +37 -50
  86. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +7 -3
  87. package/src/modules/orders/components/pages/Orders.vue +1 -1
  88. package/src/modules/orders/controllers/orders.controller.js +25 -25
  89. package/src/modules/orders/models/order.model.js +1 -1
  90. package/src/modules/orders/routes/orders.routes.js +6 -0
  91. package/src/modules/orders/store/models/order.js +33 -0
  92. package/src/modules/orders/store/orders.js +7 -28
  93. package/src/modules/organizations/components/blocks/CardDepartment.vue +2 -2
  94. package/src/modules/organizations/components/pages/DepartmentEdit.vue +7 -5
  95. package/src/modules/organizations/components/pages/Members.vue +50 -38
  96. package/src/modules/organizations/components/pages/Organization.vue +1 -1
  97. package/src/modules/organizations/controllers/invites.controller.js +2 -0
  98. package/src/modules/organizations/controllers/memberships.controller.js +35 -11
  99. package/src/modules/organizations/models/invite.model.js +4 -0
  100. package/src/modules/organizations/organizations.client.js +0 -2
  101. package/src/modules/organizations/router/members.router.js +1 -1
  102. package/src/modules/organizations/store/departments.js +0 -1
  103. package/src/modules/organizations/store/memberships.js +1 -8
  104. package/src/modules/products/components/pages/ProductEdit.vue +39 -33
  105. package/src/modules/products/components/sections/EditProductInfo.vue +3 -3
  106. package/src/modules/users/components/blocks/CardUser.vue +9 -5
  107. package/src/modules/users/components/pages/Profile.vue +5 -3
  108. package/src/modules/organizations/components/blocks/DepartmentMemberModify.vue +0 -126
@@ -1,19 +1,19 @@
1
- import { openBlock as r, createElementBlock as l, Fragment as d, createElementVNode as t, normalizeClass as m, toDisplayString as e, unref as o, createVNode as k, createCommentVNode as p, renderList as C, createBlock as S } from "vue";
1
+ import { openBlock as r, createElementBlock as l, Fragment as m, createElementVNode as t, normalizeClass as d, toDisplayString as e, unref as o, createVNode as k, createCommentVNode as p, renderList as C, createBlock as S } from "vue";
2
2
  import { useRoute as w, useRouter as x } from "vue-router";
3
3
  import { useI18n as I } from "vue-i18n";
4
4
  import z from "../blocks/CardOrderItem.vue.js";
5
5
  import B from "../../../icons/navigation/IconCross.vue.js";
6
6
  import { getters as h, state as i, actions as s } from "../../store/shopcart.js";
7
7
  import "./ShopCart.vue2.js";
8
- const N = { class: "flex-nowrap flex" }, P = { class: "mn-b-small w-100" }, T = { class: "mn-b-thin p-big" }, V = { class: "t-transp p-small" }, Y = { class: "mn-b-big shopcart-content" }, A = {
8
+ const N = { class: "flex-nowrap flex" }, P = { class: "mn-b-small w-100" }, T = { class: "mn-b-thin p-big" }, V = { class: "t-transp p-small" }, Y = { class: "mn-b-big shopcart-content" }, $ = {
9
9
  key: 0,
10
10
  class: "mn-t-medium"
11
- }, E = { class: "shopcart-footer pd-b-medium pd-t-medium pd-big transition-cubic bg-black t-white" }, F = {
11
+ }, A = { class: "shopcart-footer pd-b-medium pd-t-medium pd-big transition-cubic bg-black t-white" }, E = {
12
12
  key: 0,
13
13
  class: "mn-b-small total-price"
14
- }, O = { class: "t-transp t-white mn-b-micro" }, Q = { class: "t-demi t-white p-big" }, H = {
14
+ }, F = { class: "t-transp t-white mn-b-micro" }, O = { class: "t-demi t-white p-big" }, H = {
15
15
  __name: "ShopCart",
16
- setup(R) {
16
+ setup(Q) {
17
17
  w();
18
18
  const _ = x(), b = h.cartTotalPrice, g = h.cartTotalAmount, f = {
19
19
  messages: {
@@ -38,9 +38,9 @@ const N = { class: "flex-nowrap flex" }, P = { class: "mn-b-small w-100" }, T =
38
38
  function y() {
39
39
  _.push({ name: "Form Order" }), s.toggleShopcart();
40
40
  }
41
- return (v, u) => (r(), l(d, null, [
41
+ return (v, u) => (r(), l(m, null, [
42
42
  t("section", {
43
- class: m(["z-index-4 transition-cubic pd-big bg-white shop-cart", { "shop-cart-active": i.currentState === !0 }])
43
+ class: d(["z-index-4 transition-cubic pd-big bg-white shop-cart", { "shop-cart-active": i.currentState === !0 }])
44
44
  }, [
45
45
  t("div", N, [
46
46
  t("div", P, [
@@ -53,10 +53,10 @@ const N = { class: "flex-nowrap flex" }, P = { class: "mn-b-small w-100" }, T =
53
53
  }, null, 8, ["onClick"])
54
54
  ]),
55
55
  t("div", Y, [
56
- i.positions.length > 0 ? p("", !0) : (r(), l("p", A, [
56
+ i.positions.length > 0 ? p("", !0) : (r(), l("p", $, [
57
57
  t("i", null, e(o(n)("emptystate")), 1)
58
58
  ])),
59
- (r(!0), l(d, null, C(i.positions, (c) => (r(), S(z, {
59
+ (r(!0), l(m, null, C(i.positions, (c) => (r(), S(z, {
60
60
  key: c._id,
61
61
  editable: "true",
62
62
  product: c,
@@ -65,10 +65,10 @@ const N = { class: "flex-nowrap flex" }, P = { class: "mn-b-small w-100" }, T =
65
65
  remove: (a) => s.removeProduct(a._id)
66
66
  }, null, 8, ["product", "increase", "decrease", "remove"]))), 128))
67
67
  ]),
68
- t("div", E, [
69
- i.positions.length > 0 ? (r(), l("div", F, [
70
- t("p", O, e(o(n)("intotal")), 1),
71
- t("p", Q, e(o(b)) + " " + e(v.returnCurrency()), 1)
68
+ t("div", A, [
69
+ i.positions.length > 0 ? (r(), l("div", E, [
70
+ t("p", F, e(o(n)("intotal")), 1),
71
+ t("p", O, e(o(b)) + " " + e(v.returnCurrency()), 1)
72
72
  ])) : p("", !0),
73
73
  i.positions.length > 0 ? (r(), l("button", {
74
74
  key: 1,
@@ -79,7 +79,7 @@ const N = { class: "flex-nowrap flex" }, P = { class: "mn-b-small w-100" }, T =
79
79
  ], 2),
80
80
  t("div", {
81
81
  onClick: u[1] || (u[1] = (...c) => s.toggleShopcart && s.toggleShopcart(...c)),
82
- class: m([{ active: i.currentState === !0 }, "color-overlay z-index-3"])
82
+ class: d([{ active: i.currentState === !0 }, "color-overlay z-index-3"])
83
83
  }, null, 2)
84
84
  ], 64));
85
85
  }
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./customer.cjs"),t={_id:void 0,positions:[],status:null,comment:"",owner:{type:"Organization",target:null},creator:{type:"Customer",target:null},customer:{...e.default},payment:{type:"Cash",status:"Unpaid"},delivery:{type:null,address:null,status:""}};exports.default=t;
@@ -0,0 +1,28 @@
1
+ import t from "./customer.js";
2
+ const n = {
3
+ _id: void 0,
4
+ positions: [],
5
+ status: null,
6
+ comment: "",
7
+ owner: {
8
+ type: "Organization",
9
+ target: null
10
+ },
11
+ creator: {
12
+ type: "Customer",
13
+ target: null
14
+ },
15
+ customer: { ...t },
16
+ payment: {
17
+ type: "Cash",
18
+ status: "Unpaid"
19
+ },
20
+ delivery: {
21
+ type: null,
22
+ address: null,
23
+ status: ""
24
+ }
25
+ };
26
+ export {
27
+ n as default
28
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),u=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),l=require("./models/customer.cjs"),n=u.default.create({baseURL:process.env.API_URL,withCredentials:!0}),a=i.reactive({all:[],current:{_id:void 0,positions:[],status:null,comment:"",owner:{type:"Organization",target:null},creator:{type:"Customer",target:null},customer:{...l.default},payment:{type:"Cash",status:"Unpaid"},delivery:{type:null,address:null,status:""}}}),p={async create(e){try{const t=await n.post("/api/orders/create",e);return a.all.push(t.data),t.data}catch(t){s.setError(t)}},async read(e={}){try{const t=await n.get("/api/orders/read",{params:e});return e._id?c(t.data[0],"current"):c(t.data,"all"),t.data}catch(t){throw s.setError(t),t}},async update(e){try{const t=await n.post("/api/orders/update",e),r=a.all.findIndex(o=>o._id===e._id);return r!==-1&&(a.all[r]=t.data),t.data}catch(t){s.setError(t)}},async delete(e){try{await n.delete(`/api/orders/${e}`),a.all=a.all.filter(t=>t._id!==e)}catch(t){s.setError(t)}},async changePaymentStatus(e,t){try{const r=await n.post(`/api/orders/payment/${e}`,{status:t}),o=a.all.findIndex(d=>d._id===e);o!==-1&&(a.all[o]=r.data)}catch(r){s.setError(r)}}},y={resetCustomer(e){Object.assign(e,l.default)}},m={getTotal(e){return e.reduce((t,r)=>t+r.price*r.quantity,0)}};function c(e,t){a[t]=e}i.watch(a,(e,t)=>{});exports.actions=p;exports.getters=m;exports.mutations=y;exports.state=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("vue"),u=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),d=require("./models/order.cjs"),n=u.default.create({baseURL:process.env.API_URL,withCredentials:!0}),r=i.reactive({all:[],current:{...d.default}}),p={async create(e){try{const t=await n.post("/api/orders/create",e);return r.all.push(t.data),t.data}catch(t){s.setError(t)}},async read(e={}){try{const t=await n.get("/api/orders/read",{params:e});return e._id?o(t.data[0],"current"):o(t.data,"all"),t.data}catch(t){throw s.setError(t),t}},async update(e){try{const t=await n.post("/api/orders/update",e),a=r.all.findIndex(c=>c._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}),c=r.all.findIndex(l=>l._id===e);c!==-1&&(r.all[c]=a.data)}catch(a){s.setError(a)}}},y={resetCustomer(e){Object.assign(e,customerInitState)},resetOrder(e){r.current={...d.default}}},f={getTotal(e){return e.reduce((t,a)=>t+a.price*a.quantity,0)}};function o(e,t){r[t]=e}i.watch(r,(e,t)=>{});exports.actions=p;exports.getters=f;exports.mutations=y;exports.state=r;
@@ -1,38 +1,17 @@
1
1
  import { reactive as l, watch as p } from "vue";
2
2
  import u from "../../../../node_modules/axios/lib/axios.js";
3
3
  import { setError as s } from "../../globals/store/globals.js";
4
- import c from "./models/customer.js";
5
- const n = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = l({
4
+ import i from "./models/order.js";
5
+ const n = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = l({
6
6
  all: [],
7
7
  current: {
8
- _id: void 0,
9
- positions: [],
10
- status: null,
11
- comment: "",
12
- owner: {
13
- type: "Organization",
14
- target: null
15
- },
16
- creator: {
17
- type: "Customer",
18
- target: null
19
- },
20
- customer: { ...c },
21
- payment: {
22
- type: "Cash",
23
- status: "Unpaid"
24
- },
25
- delivery: {
26
- type: null,
27
- address: null,
28
- status: ""
29
- }
8
+ ...i
30
9
  }
31
10
  }), w = {
32
11
  async create(e) {
33
12
  try {
34
13
  const t = await n.post("/api/orders/create", e);
35
- return r.all.push(t.data), t.data;
14
+ return a.all.push(t.data), t.data;
36
15
  } catch (t) {
37
16
  s(t);
38
17
  }
@@ -40,51 +19,54 @@ const n = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = l
40
19
  async read(e = {}) {
41
20
  try {
42
21
  const t = await n.get("/api/orders/read", { params: e });
43
- return e._id ? i(t.data[0], "current") : i(t.data, "all"), t.data;
22
+ return e._id ? c(t.data[0], "current") : c(t.data, "all"), t.data;
44
23
  } catch (t) {
45
24
  throw s(t), t;
46
25
  }
47
26
  },
48
27
  async update(e) {
49
28
  try {
50
- const t = await n.post("/api/orders/update", e), a = r.all.findIndex((o) => o._id === e._id);
51
- return a !== -1 && (r.all[a] = t.data), t.data;
29
+ const t = await n.post("/api/orders/update", e), r = a.all.findIndex((o) => o._id === e._id);
30
+ return r !== -1 && (a.all[r] = t.data), t.data;
52
31
  } catch (t) {
53
32
  s(t);
54
33
  }
55
34
  },
56
35
  async delete(e) {
57
36
  try {
58
- await n.delete(`/api/orders/${e}`), r.all = r.all.filter((t) => t._id !== e);
37
+ await n.delete(`/api/orders/${e}`), a.all = a.all.filter((t) => t._id !== e);
59
38
  } catch (t) {
60
39
  s(t);
61
40
  }
62
41
  },
63
42
  async changePaymentStatus(e, t) {
64
43
  try {
65
- const a = await n.post(`/api/orders/payment/${e}`, { status: t }), o = r.all.findIndex((d) => d._id === e);
66
- o !== -1 && (r.all[o] = a.data);
67
- } catch (a) {
68
- s(a);
44
+ const r = await n.post(`/api/orders/payment/${e}`, { status: t }), o = a.all.findIndex((d) => d._id === e);
45
+ o !== -1 && (a.all[o] = r.data);
46
+ } catch (r) {
47
+ s(r);
69
48
  }
70
49
  }
71
- }, g = {
50
+ }, x = {
72
51
  resetCustomer(e) {
73
- Object.assign(e, c);
52
+ Object.assign(e, customerInitState);
53
+ },
54
+ resetOrder(e) {
55
+ a.current = { ...i };
74
56
  }
75
- }, x = {
57
+ }, _ = {
76
58
  getTotal(e) {
77
- return e.reduce((t, a) => t + a.price * a.quantity, 0);
59
+ return e.reduce((t, r) => t + r.price * r.quantity, 0);
78
60
  }
79
61
  };
80
- function i(e, t) {
81
- r[t] = e;
62
+ function c(e, t) {
63
+ a[t] = e;
82
64
  }
83
- p(r, (e, t) => {
65
+ p(a, (e, t) => {
84
66
  });
85
67
  export {
86
68
  w as actions,
87
- x as getters,
88
- g as mutations,
89
- r as state
69
+ _ as getters,
70
+ x as mutations,
71
+ a as state
90
72
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("../../../icons/navigation/IconEdit.vue.cjs");require("../../../../components/Spoiler/Spoiler.vue.cjs");require("./DepartmentSub.vue2.cjs");const u=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),d=require("../../../users/components/blocks/CardUser.vue.cjs");require("./CardDepartment.vue2.cjs");const c={class:"radius-semi o-hidden cols-2-1_3"},p={class:"pd-medium w-100"},m=["innerHTML"],_={key:0},h={__name:"CardDepartment",props:{department:Object,organization:Object},setup(r){const o=r;return(n,s)=>{const a=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",c,[e.createElementVNode("div",p,[e.createVNode(a,{to:{name:"Department Edit",params:{_id:o.organization,department:r.department._id}},class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"},{default:e.withCtx(()=>[e.createVNode(l.default,{class:"i-regular",classes:"fill-white"})]),_:1},8,["to"]),e.createElementVNode("h3",{onClick:s[0]||(s[0]=t=>n.$router.push(`/organizations/${o.organization}/departments/${r.department._id}`)),class:"mn-b-small w-100",innerHTML:r.department.profile.name},null,8,m),e.createElementVNode("ul",null,[r.department.members.length<1?(e.openBlock(),e.createElementBlock("li",_,"No members in department")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.department.members,(t,i)=>(e.openBlock(),e.createBlock(d.default,{class:"br-b br-solid br-grey",key:i,user:t.user,photo:t.user.profile.photo,name:t.user.profile.name||t.user.phone||t.user.email||t.user._id,position:t.position,onClick:g=>n.$router.push(`/app/profile/${t.user._id}`)},null,8,["user","photo","name","position","onClick"]))),128))])])])}}},k=u.default(h,[["__scopeId","data-v-213d8146"]]);exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../../../icons/navigation/IconEdit.vue.cjs");require("../../../../components/Spoiler/Spoiler.vue2.cjs");require("./DepartmentSub.vue2.cjs");const u=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),d=require("../../../users/components/blocks/CardUser.vue.cjs");require("./CardDepartment.vue2.cjs");const c={class:""},p={class:"pd-medium w-100"},m=["innerHTML"],k={key:0},h={__name:"CardDepartment",props:{department:Object,organization:Object},setup(r){const n=r;return(o,a)=>{const s=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",c,[e.createElementVNode("div",p,[e.createVNode(s,{to:{name:"Department Edit",params:{_id:n.organization,department:r.department._id}},class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"},{default:e.withCtx(()=>[e.createVNode(i.default,{class:"i-regular",classes:"fill-white"})]),_:1},8,["to"]),e.createElementVNode("h3",{onClick:a[0]||(a[0]=t=>o.$router.push(`/organizations/${n.organization}/departments/${r.department._id}`)),class:"mn-b-small w-100",innerHTML:r.department.profile.name},null,8,m),e.createElementVNode("ul",null,[r.department.members.length<1?(e.openBlock(),e.createElementBlock("li",k,"No members in department")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.department.members,(t,l)=>(e.openBlock(),e.createBlock(d.default,{class:"pd-small br-solid br-1px br-black-transp-5 radius-small mn-b-thin",key:l,user:t.user,photo:t.user.profile.photo,name:t.user.profile.name||t.user.phone||t.user.email||t.user._id,position:t.position,onClick:f=>o.$router.push(`/app/profile/${t.user._id}`)},null,8,["user","photo","name","position","onClick"]))),128))])])])}}},_=u.default(h,[["__scopeId","data-v-4b7b1aaf"]]);exports.default=_;
@@ -1,34 +1,34 @@
1
- import { resolveComponent as m, openBlock as r, createElementBlock as o, createElementVNode as n, createVNode as l, withCtx as u, createCommentVNode as c, Fragment as _, renderList as f, createBlock as h } from "vue";
2
- import g from "../../../icons/navigation/IconEdit.vue.js";
3
- import "../../../../components/Spoiler/Spoiler.vue.js";
1
+ import { resolveComponent as d, openBlock as r, createElementBlock as o, createElementVNode as n, createVNode as l, withCtx as u, createCommentVNode as c, Fragment as _, renderList as f, createBlock as h } from "vue";
2
+ import k from "../../../icons/navigation/IconEdit.vue.js";
3
+ import "../../../../components/Spoiler/Spoiler.vue2.js";
4
4
  import "./DepartmentSub.vue2.js";
5
- import k from "../../../../../../_virtual/_plugin-vue_export-helper.js";
5
+ import g from "../../../../../../_virtual/_plugin-vue_export-helper.js";
6
6
  import $ from "../../../users/components/blocks/CardUser.vue.js";
7
7
  import "./CardDepartment.vue2.js";
8
- const C = { class: "radius-semi o-hidden cols-2-1_3" }, v = { class: "pd-medium w-100" }, b = ["innerHTML"], w = { key: 0 }, z = {
8
+ const b = { class: "" }, C = { class: "pd-medium w-100" }, v = ["innerHTML"], w = { key: 0 }, x = {
9
9
  __name: "CardDepartment",
10
10
  props: {
11
11
  department: Object,
12
12
  organization: Object
13
13
  },
14
14
  setup(t) {
15
- const s = t;
16
- return (i, a) => {
17
- const p = m("router-link");
18
- return r(), o("div", C, [
19
- n("div", v, [
15
+ const a = t;
16
+ return (s, i) => {
17
+ const p = d("router-link");
18
+ return r(), o("div", b, [
19
+ n("div", C, [
20
20
  l(p, {
21
21
  to: {
22
22
  name: "Department Edit",
23
23
  params: {
24
- _id: s.organization,
24
+ _id: a.organization,
25
25
  department: t.department._id
26
26
  }
27
27
  },
28
28
  class: "cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"
29
29
  }, {
30
30
  default: u(() => [
31
- l(g, {
31
+ l(k, {
32
32
  class: "i-regular",
33
33
  classes: "fill-white"
34
34
  })
@@ -36,27 +36,27 @@ const C = { class: "radius-semi o-hidden cols-2-1_3" }, v = { class: "pd-medium
36
36
  _: 1
37
37
  }, 8, ["to"]),
38
38
  n("h3", {
39
- onClick: a[0] || (a[0] = (e) => i.$router.push(`/organizations/${s.organization}/departments/${t.department._id}`)),
39
+ onClick: i[0] || (i[0] = (e) => s.$router.push(`/organizations/${a.organization}/departments/${t.department._id}`)),
40
40
  class: "mn-b-small w-100",
41
41
  innerHTML: t.department.profile.name
42
- }, null, 8, b),
42
+ }, null, 8, v),
43
43
  n("ul", null, [
44
44
  t.department.members.length < 1 ? (r(), o("li", w, "No members in department")) : c("", !0),
45
- (r(!0), o(_, null, f(t.department.members, (e, d) => (r(), h($, {
46
- class: "br-b br-solid br-grey",
47
- key: d,
45
+ (r(!0), o(_, null, f(t.department.members, (e, m) => (r(), h($, {
46
+ class: "pd-small br-solid br-1px br-black-transp-5 radius-small mn-b-thin",
47
+ key: m,
48
48
  user: e.user,
49
49
  photo: e.user.profile.photo,
50
50
  name: e.user.profile.name || e.user.phone || e.user.email || e.user._id,
51
51
  position: e.position,
52
- onClick: (N) => i.$router.push(`/app/profile/${e.user._id}`)
52
+ onClick: (z) => s.$router.push(`/app/profile/${e.user._id}`)
53
53
  }, null, 8, ["user", "photo", "name", "position", "onClick"]))), 128))
54
54
  ])
55
55
  ])
56
56
  ]);
57
57
  };
58
58
  }
59
- }, j = /* @__PURE__ */ k(z, [["__scopeId", "data-v-213d8146"]]);
59
+ }, y = /* @__PURE__ */ g(x, [["__scopeId", "data-v-4b7b1aaf"]]);
60
60
  export {
61
- j as default
61
+ y as default
62
62
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),f=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue2.cjs");const v=require("../../../../components/Feed/Feed.vue.cjs"),h=require("../../../users/components/blocks/CardUser.vue.cjs"),k=require("../../store/memberships.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("./DepartmentMemberModify.vue2.cjs");const g={class:"br-grey radius-small mn-small"},y={class:"bg-grey mn-b-thin h-min-10r h-max-10r o-scroll pd-medium radius-big"},_=["disabled"],q={__name:"DepartmentMemberModify",props:{isPopupOpen:Boolean,member:Number,members:Array,users:Array},emits:["callback","remove"],setup(i,{emit:m}){const r=i,u=m,n=e.ref(null),t=e.ref(null);r.member!==null&&(n.value=r.members[r.member]),e.ref(null);async function c(){r.member!==null?(r.members[r.member]=n,r.members[r.member].role=t.value,u("callback")):(r.members.push({...n.value,role:t.value}),u("callback"))}async function d(){r.members.splice(r.member,1),u("callback")}return(s,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",g,[e.createElementVNode("div",y,[e.createVNode(v.default,{states:{empty:{title:"No Members Found",description:"Currently, there are no members available."}},store:{read:o=>k.actions.read(o),state:null},options:{target:s.$route.params._id}},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(l,b)=>(e.openBlock(),e.createBlock(h.default,{key:b,photo:l.user.profile.photo,name:l.user.profile.name||l.user.phone||l.user.email||l.user._id,user:l,position:l.position,onClick:a[0]||(a[0]=N=>s.$router.push(`/app/profile/${s.user._id}`)),class:"mn-b-thin"},null,8,["photo","name","user","position"]))),128))]),_:1},8,["store","options"])]),e.createVNode(f.default,{field:t.value,"onUpdate:field":a[1]||(a[1]=o=>t.value=o),label:"Должность",placeholder:"Название должности",class:"bg-white",validation:s.organizationName},null,8,["field","validation"])]),e.createElementVNode("button",{disabled:!n.value||!t.value,onClick:c,class:"w-100 button bg-blue t-white"},e.toDisplayString(r.member!==null?"Редактировать участника":"Добавить участника"),9,_),r.member!==null?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:d,class:"w-100 button bg-red t-white"}," Удалить участника ")):e.createCommentVNode("",!0)]))}},B=p.default(q,[["__scopeId","data-v-0d6c0d38"]]);exports.default=B;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),f=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue2.cjs");const v=require("../../../../components/Feed/Feed.vue.cjs"),h=require("../../../users/components/blocks/CardUser.vue.cjs"),k=require("../../store/memberships.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("./DepartmentMemberModify.vue2.cjs");const g={class:"br-grey radius-small mn-small"},y={class:"bg-grey mn-b-thin h-min-10r h-max-10r o-scroll pd-medium radius-big"},_=["disabled"],q={__name:"DepartmentMemberModify",props:{isPopupOpen:Boolean,member:Number,members:Array,users:Array},emits:["callback","remove"],setup(i,{emit:m}){const r=i,u=m,n=e.ref(null),t=e.ref(null);r.member!==null&&(n.value=r.members[r.member]),e.ref(null);async function c(){r.member!==null?(r.members[r.member]=n,r.members[r.member].role=t.value,u("callback")):(r.members.push({...n.value,role:t.value}),u("callback"))}async function d(){r.members.splice(r.member,1),u("callback")}return(s,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",g,[e.createElementVNode("div",y,[e.createVNode(v.default,{states:{empty:{title:"No Members Found",description:"Currently, there are no members available."}},store:{read:o=>k.actions.read(o),state:null},options:{target:s.$route.params._id}},{default:e.withCtx(({items:o})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(l,b)=>(e.openBlock(),e.createBlock(h.default,{key:b,photo:l.user.profile.photo,name:l.user.profile.name||l.user.phone||l.user.email||l.user._id,user:l,position:l.position,onClick:a[0]||(a[0]=N=>s.$router.push(`/app/profile/${s.user._id}`)),class:"mn-b-thin"},null,8,["photo","name","user","position"]))),128))]),_:1},8,["store","options"])]),e.createVNode(f.default,{field:t.value,"onUpdate:field":a[1]||(a[1]=o=>t.value=o),label:"Должность",placeholder:"Название должности",class:"bg-white",validation:s.organizationName},null,8,["field","validation"])]),e.createElementVNode("button",{disabled:!n.value||!t.value,onClick:c,class:"w-100 button bg-blue t-white"},e.toDisplayString(r.member!==null?"Редактировать участника":"Добавить участника"),9,_),r.member!==null?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:d,class:"w-100 button bg-red t-white"}," Удалить участника ")):e.createCommentVNode("",!0)]))}},B=p.default(q,[["__scopeId","data-v-0d6c0d38"]]);exports.default=B;
@@ -1,7 +1,7 @@
1
1
  import { ref as i, openBlock as n, createElementBlock as u, createElementVNode as p, createVNode as b, withCtx as _, Fragment as y, renderList as k, createBlock as g, toDisplayString as w, createCommentVNode as C } from "vue";
2
2
  import "../../../../components/SelectMulti/SelectMulti.vue2.js";
3
3
  import M from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
- import N from "../../../../components/Field/Field.vue.js";
4
+ import N from "../../../../components/Field/Field.vue2.js";
5
5
  import "../../../../components/Select/Select.vue2.js";
6
6
  import $ from "../../../../components/Feed/Feed.vue.js";
7
7
  import B from "../../../users/components/blocks/CardUser.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("vue-router");require("../../../../components/Spoiler/Spoiler.vue.cjs");const u=require("../blocks/DepartmentSub.vue.cjs"),m=require("../../../users/components/blocks/CardUser.vue.cjs"),r=require("../../store/departments.cjs"),p=require("../../../icons/navigation/IconEdit.vue.cjs"),_={class:"for-transition w-100"},h={key:0,id:"dash",class:"pd-medium bg-grey"},k={class:"mn-b-medium radius-medium pd-semi bg-white"},g={class:"flex-nowrap flex mn-b-small"},b={class:"w-100"},E=["innerHTML"],f={class:"mn-b-medium radius-medium pd-semi bg-white"},B=e.createElementVNode("h3",{class:"mn-b-regular"},"Команда",-1),N={key:0},V={class:"mn-b-medium radius-medium pd-semi bg-white"},y=e.createElementVNode("h3",{class:"mn-b-regular"},"Подотделы",-1),C={key:0},v={__name:"Department",async setup(w){let s,a;i.useRouter();const n=i.useRoute();return[s,a]=e.withAsyncContext(()=>r.actions.readOne(n.params.department)),await s,a(),(l,q)=>{const c=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",_,[r.state.department?(e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("section",k,[e.createElementVNode("div",g,[e.createElementVNode("h2",b,e.toDisplayString(r.state.department.profile.name),1),e.createVNode(c,{to:{name:"Department Edit",params:{_id:e.unref(n).params._id,department:e.unref(n).params.department}},class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"},{default:e.withCtx(()=>[e.createVNode(p.default,{class:"i-regular",classes:"fill-white"})]),_:1},8,["to"])]),e.createElementVNode("p",{class:"t-transp p-big",innerHTML:r.state.department.description},null,8,E)]),e.createElementVNode("section",f,[B,e.createElementVNode("ul",null,[r.state.department.members.length<1?(e.openBlock(),e.createElementBlock("li",N,"В отделе еще нет участников")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.state.department.members,(t,o)=>(e.openBlock(),e.createBlock(m.default,{class:"br-b br-solid br-grey",key:o,user:t.user,photo:t.user.profile.photo,name:t.user.profile.name||t.user.phone||t.user.email||t.user._id,position:t.position,onClick:d=>l.$router.push(`/app/profile/${t.user._id}`)},null,8,["user","photo","name","position","onClick"]))),128))])]),e.createElementVNode("section",V,[y,e.createElementVNode("ul",null,[r.state.department.subdepartments.length<1?(e.openBlock(),e.createElementBlock("li",C,"В отделе еще нет подотделов")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.state.department.subdepartments,(t,o)=>(e.openBlock(),e.createBlock(u.default,{onClick:d=>l.$router.push(`/app/organization/departments/${t._id}`),key:o,class:"br-b br-solid br-grey",department:t},null,8,["onClick","department"]))),128))])])])):e.createCommentVNode("",!0)])}}};exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("vue-router");require("../../../../components/Spoiler/Spoiler.vue2.cjs");const u=require("../blocks/DepartmentSub.vue.cjs"),m=require("../../../users/components/blocks/CardUser.vue.cjs"),r=require("../../store/departments.cjs"),p=require("../../../icons/navigation/IconEdit.vue.cjs"),_={class:"for-transition w-100"},h={key:0,id:"dash",class:"pd-medium bg-grey"},k={class:"mn-b-medium radius-medium pd-semi bg-white"},g={class:"flex-nowrap flex mn-b-small"},b={class:"w-100"},E=["innerHTML"],f={class:"mn-b-medium radius-medium pd-semi bg-white"},B=e.createElementVNode("h3",{class:"mn-b-regular"},"Команда",-1),N={key:0},V={class:"mn-b-medium radius-medium pd-semi bg-white"},y=e.createElementVNode("h3",{class:"mn-b-regular"},"Подотделы",-1),C={key:0},v={__name:"Department",async setup(w){let s,a;i.useRouter();const n=i.useRoute();return[s,a]=e.withAsyncContext(()=>r.actions.readOne(n.params.department)),await s,a(),(l,q)=>{const c=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",_,[r.state.department?(e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("section",k,[e.createElementVNode("div",g,[e.createElementVNode("h2",b,e.toDisplayString(r.state.department.profile.name),1),e.createVNode(c,{to:{name:"Department Edit",params:{_id:e.unref(n).params._id,department:e.unref(n).params.department}},class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"},{default:e.withCtx(()=>[e.createVNode(p.default,{class:"i-regular",classes:"fill-white"})]),_:1},8,["to"])]),e.createElementVNode("p",{class:"t-transp p-big",innerHTML:r.state.department.description},null,8,E)]),e.createElementVNode("section",f,[B,e.createElementVNode("ul",null,[r.state.department.members.length<1?(e.openBlock(),e.createElementBlock("li",N,"В отделе еще нет участников")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.state.department.members,(t,o)=>(e.openBlock(),e.createBlock(m.default,{class:"br-b br-solid br-grey",key:o,user:t.user,photo:t.user.profile.photo,name:t.user.profile.name||t.user.phone||t.user.email||t.user._id,position:t.position,onClick:d=>l.$router.push(`/app/profile/${t.user._id}`)},null,8,["user","photo","name","position","onClick"]))),128))])]),e.createElementVNode("section",V,[y,e.createElementVNode("ul",null,[r.state.department.subdepartments.length<1?(e.openBlock(),e.createElementBlock("li",C,"В отделе еще нет подотделов")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.state.department.subdepartments,(t,o)=>(e.openBlock(),e.createBlock(u.default,{onClick:d=>l.$router.push(`/app/organization/departments/${t._id}`),key:o,class:"br-b br-solid br-grey",department:t},null,8,["onClick","department"]))),128))])])])):e.createCommentVNode("",!0)])}}};exports.default=v;
@@ -1,6 +1,6 @@
1
1
  import { withAsyncContext as b, resolveComponent as k, openBlock as s, createElementBlock as o, createElementVNode as t, toDisplayString as y, createVNode as d, unref as u, withCtx as w, createCommentVNode as a, Fragment as c, renderList as _, createBlock as h } from "vue";
2
2
  import { useRouter as C, useRoute as $ } from "vue-router";
3
- import "../../../../components/Spoiler/Spoiler.vue.js";
3
+ import "../../../../components/Spoiler/Spoiler.vue2.js";
4
4
  import v from "../blocks/DepartmentSub.vue.js";
5
5
  import x from "../../../users/components/blocks/CardUser.vue.js";
6
6
  import { actions as D, state as r } from "../../store/departments.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=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 x=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const u=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue2.cjs");const o=require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs");require("../../../../components/Address/Address.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/LocationMarker/LocationMarker.vue.cjs");const f=require("../../../../components/Button/Button.vue.cjs"),B=require("../../../../components/Popup/Popup.vue.cjs"),h=require("../../../../components/Block/Block.vue.cjs"),D=require("../../../../components/Feed/Feed.vue.cjs");require("../blocks/EditArray.vue2.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../../../../components/SelectMulti/SelectMulti.vue2.cjs");const b=require("../../../users/components/blocks/CardUser.vue.cjs"),g=require("../../store/memberships.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("../blocks/DepartmentMemberModify.vue2.cjs");const w=require("../../../globals/store/globals.cjs"),t=require("../../store/departments.cjs"),P={class:"for-transition pd-thin w-100"},C={class:"mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big"},U={key:0,class:"mn-r-auto"},O={key:1,class:"mn-r-auto"},M={class:"flex-nowrap flex gap-thin pd-thin"},R={class:"cols-2-fit-content"},S={class:"w-100 flex-child-grow-1 flex-child"},T={class:"cols-2 gap-thin"},A={class:"bg-grey pd-medium o-hidden radius-big"},F=e.createElementVNode("h3",{class:"mn-b-semi"},"Department Settings",-1),z=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please settings for your department:",-1),L={class:"cols-1 gap-thin"},j=e.createElementVNode("h4",null,"Products",-1),H={class:"bg-grey pd-medium o-hidden radius-big"},I=e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1),G=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select organization accesses for user in department:",-1),J={class:"cols-1 gap-thin"},K=e.createElementVNode("h4",null,"Products",-1),Q=e.createElementVNode("h4",null,"Orders",-1),W=e.createElementVNode("h4",null,"Departments",-1),X={__name:"DepartmentEdit",setup(Y){const N=c.useRouter(),r=c.useRoute();async function _(){e.ref(g.state.memberships),r.params.department&&await t.actions.readOne(r.params.department)}_();const n=e.ref(!1),V=e.ref(null);function k(l){n.value=!0}function i(){n.value=!1,V.value=null}e.ref(!1),e.ref(null);async function q(){r.params.department&&await t.actions.update(r.params._id,t.state.department),r.params.department||await t.actions.create(r.params._id,t.state.department)}function E(){N.replace({name:"Department",params:{_id:r.params._id,department:t.state.department._id}})}async function v(){confirm("Are you sure you want to delete this department?")&&await t.actions.delete(r.params._id,t.state.department)}function y(l){confirm("Are you sure you want to remove this member?")&&w.actions.delete(t.state.department.members,{_id:l.user._id})}return(l,s)=>(e.openBlock(),e.createElementBlock("div",P,[e.createElementVNode("header",C,[e.unref(r).params.department?(e.openBlock(),e.createElementBlock("h1",U,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",O,"Create Department")),e.createElementVNode("section",M,[e.unref(r).params.department?(e.openBlock(),e.createBlock(f.default,{key:0,submit:v,callback:l.redirectToDash,class:"bg-red"},{default:e.withCtx(()=>[e.createTextVNode("Delete")]),_:1},8,["callback"])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:q,callback:E,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1})])]),t.state.department.profile?(e.openBlock(),e.createBlock(h.default,{key:0,title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",R,[e.createVNode(x.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",S,[e.createVNode(u.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:l.organizationName},null,8,["field","validation"]),e.createVNode(u.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:l.organizationName},null,8,["field","validation"])])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(h.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>k()}],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(b.default,{class:"bg-white pd-thin radius-medium w-100",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,action:{label:"x",method:()=>y(a)}},null,8,["user","photo","name","position","action"]))),128))]),_:1},8,["actions"]),e.createVNode(B.default,{title:"Add member",onClosePopup:i,isPopupOpen:n.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(D.default,{search:{placeholder:"Search customer...",class:"bg-grey mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:a=>g.actions.read(a),state:null},options:{target:e.unref(r).params._id},class:"bg-grey pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll"},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(d,Z)=>{var m,p;return e.openBlock(),e.createBlock(b.default,{key:d._id,user:d.user,photo:(m=d.user.profile)==null?void 0:m.photo,name:((p=d.user.profile)==null?void 0:p.name)||d.user.phone||d.user.email,onClick:()=>{w.actions.add(t.state.department.members,{_id:d.user._id,user:d.user,position:"Member"}),i()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"])}),128))]),_:1},8,["store","options"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",T,[e.createElementVNode("div",A,[F,z,e.createElementVNode("div",L,[j,e.createVNode(o.default,{label:"Hidden department",name:"hidden",class:"w-100 mn-r-small bg-white radius-small pd-small","onUpdate:radio":s[3]||(s[3]=a=>t.state.department.hidden=!t.state.department.hidden),radio:t.state.department.hidden},null,8,["radio"])])]),e.createElementVNode("div",H,[I,G,e.createElementVNode("div",J,[K,e.createVNode(o.default,{label:"Read products",name:"readProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.products.read,"onUpdate:radio":s[4]||(s[4]=a=>t.state.department.accesses.products.read=!t.state.department.accesses.products.read)},null,8,["radio"]),e.createVNode(o.default,{label:"Edit products",name:"editProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.products.edit,"onUpdate:radio":s[5]||(s[5]=a=>t.state.department.accesses.products.edit=!t.state.department.accesses.products.edit)},null,8,["radio"]),e.createVNode(o.default,{label:"Delete products",name:"deleteProducts",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.products.delete,"onUpdate:radio":s[6]||(s[6]=a=>t.state.department.accesses.products.delete=!t.state.department.accesses.products.delete)},null,8,["radio"]),Q,e.createVNode(o.default,{label:"Read orders",name:"readOrders",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.orders.read,"onUpdate:radio":s[7]||(s[7]=a=>t.state.department.accesses.orders.read=!t.state.department.accesses.orders.read)},null,8,["radio"]),e.createVNode(o.default,{label:"Confirm orders",name:"confirmOrders",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.orders.confirm,"onUpdate:radio":s[8]||(s[8]=a=>t.state.department.accesses.orders.confirm=!t.state.department.accesses.orders.confirm)},null,8,["radio"]),e.createVNode(o.default,{label:"Delete orders",name:"deleteOrders",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.orders.delete,"onUpdate:radio":s[9]||(s[9]=a=>t.state.department.accesses.orders.delete=!t.state.department.accesses.orders.delete)},null,8,["radio"]),W,e.createVNode(o.default,{label:"Read departments",name:"readDepartments",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.departments.read,"onUpdate:radio":s[10]||(s[10]=a=>t.state.department.accesses.departments.read=!t.state.department.accesses.departments.read)},null,8,["radio"]),e.createVNode(o.default,{label:"Edit departments",name:"editDepartments",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.departments.edit,"onUpdate:radio":s[11]||(s[11]=a=>t.state.department.accesses.departments.edit=!t.state.department.accesses.departments.edit)},null,8,["radio"]),e.createVNode(o.default,{label:"Delete departments",name:"deleteDepartments",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.departments.delete,"onUpdate:radio":s[12]||(s[12]=a=>t.state.department.accesses.departments.delete=!t.state.department.accesses.departments.delete)},null,8,["radio"])])])])]))}};exports.default=X;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=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 x=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const u=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue2.cjs");const o=require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs");require("../../../../components/Address/Address.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/LocationMarker/LocationMarker.vue.cjs");const f=require("../../../../components/Button/Button.vue.cjs"),B=require("../../../../components/Popup/Popup.vue.cjs"),h=require("../../../../components/Block/Block.vue.cjs"),D=require("../../../../components/Feed/Feed.vue.cjs"),P=require("../../../icons/navigation/IconDelete.vue.cjs");require("../blocks/EditArray.vue2.cjs");require("../blocks/DepartmentSub.vue2.cjs");const b=require("../../../users/components/blocks/CardUser.vue.cjs"),g=require("../../../globals/store/globals.cjs"),t=require("../../store/departments.cjs"),w=require("../../store/memberships.cjs"),C={class:"for-transition pd-thin w-100"},U={class:"mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big"},O={key:0,class:"mn-r-auto"},M={key:1,class:"mn-r-auto"},R={class:"flex-nowrap flex gap-thin pd-thin"},S={class:"cols-2-fit-content"},T={class:"w-100 flex-child-grow-1 flex-child"},z={class:"cols-2 gap-thin"},A={class:"bg-grey pd-medium o-hidden radius-big"},F=e.createElementVNode("h3",{class:"mn-b-semi"},"Department Settings",-1),I=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please settings for your department:",-1),L={class:"cols-1 gap-thin"},j={class:"bg-grey pd-medium o-hidden radius-big"},H=e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1),G=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select organization accesses for user in department:",-1),J={class:"cols-1 gap-thin"},K=e.createElementVNode("h4",null,"Products",-1),Q=e.createElementVNode("h4",null,"Orders",-1),W=e.createElementVNode("h4",null,"Departments",-1),X={__name:"DepartmentEdit",setup(Y){const N=c.useRouter(),r=c.useRoute();async function V(){e.ref(w.state.memberships),r.params.department&&await t.actions.readOne(r.params.department)}V();const n=e.ref(!1),_=e.ref(null);function k(l){n.value=!0}function i(){n.value=!1,_.value=null}e.ref(!1),e.ref(null);async function q(){r.params.department&&await t.actions.update(r.params._id,t.state.department),r.params.department||await t.actions.create(r.params._id,t.state.department)}function v(){N.push({name:"Organization Members",params:{_id:r.params._id}})}async function E(){confirm("Are you sure you want to delete this department?")&&await t.actions.delete(r.params._id,t.state.department)}function y(l){confirm("Are you sure you want to remove this member?")&&g.actions.delete(t.state.department.members,{_id:l.user._id})}return(l,s)=>(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("header",U,[e.unref(r).params.department?(e.openBlock(),e.createElementBlock("h1",O,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",M,"Create Department")),e.createElementVNode("section",R,[e.unref(r).params.department?(e.openBlock(),e.createBlock(f.default,{key:0,submit:E,callback:l.redirectToDash,class:"bg-red"},{default:e.withCtx(()=>[e.createTextVNode("Delete")]),_:1},8,["callback"])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:q,callback:v,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode("Save")]),_:1})])]),t.state.department.profile?(e.openBlock(),e.createBlock(h.default,{key:0,title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",S,[e.createVNode(x.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",T,[e.createVNode(u.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:l.organizationName},null,8,["field","validation"]),e.createVNode(u.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:l.organizationName},null,8,["field","validation"])])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(h.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>k()}],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(b.default,{class:"bg-white pd-thin radius-medium w-100",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,action:{label:{is:P.default,props:{class:"i-medium",fill:"rgb(var(--white)"}},method:()=>y(a)}},null,8,["user","photo","name","position","action"]))),128))]),_:1},8,["actions"]),e.createVNode(B.default,{title:"Add member",onClosePopup:i,isPopupOpen:n.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(D.default,{search:{placeholder:"Search customer...",class:"bg-grey mn-b-thin"},states:{empty:{title:"No Products Found",description:"Currently, there are no such products available."}},store:{read:a=>w.actions.read(a),state:null},options:{target:e.unref(r).params._id},class:"bg-grey pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll"},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(d,Z)=>{var m,p;return e.openBlock(),e.createBlock(b.default,{key:d._id,user:d.user,photo:(m=d.user.profile)==null?void 0:m.photo,name:((p=d.user.profile)==null?void 0:p.name)||d.user.phone||d.user.email,onClick:()=>{g.actions.add(t.state.department.members,{_id:d.user._id,user:d.user,position:"Member"}),i()},class:"bg-white pd-thin radius-medium w-100 mn-b-thin"},null,8,["user","photo","name","onClick"])}),128))]),_:1},8,["store","options"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",z,[e.createElementVNode("div",A,[F,I,e.createElementVNode("div",L,[e.createVNode(o.default,{label:"Hidden department",name:"hidden",class:"w-100 mn-r-small bg-white radius-small pd-small","onUpdate:radio":s[3]||(s[3]=a=>t.state.department.hidden=!t.state.department.hidden),radio:t.state.department.hidden},null,8,["radio"])])]),e.createElementVNode("div",j,[H,G,e.createElementVNode("div",J,[K,e.createVNode(o.default,{label:"Read products",name:"readProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.products.read,"onUpdate:radio":s[4]||(s[4]=a=>t.state.department.accesses.products.read=!t.state.department.accesses.products.read)},null,8,["radio"]),e.createVNode(o.default,{label:"Edit products",name:"editProducts",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.products.edit,"onUpdate:radio":s[5]||(s[5]=a=>t.state.department.accesses.products.edit=!t.state.department.accesses.products.edit)},null,8,["radio"]),e.createVNode(o.default,{label:"Delete products",name:"deleteProducts",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.products.delete,"onUpdate:radio":s[6]||(s[6]=a=>t.state.department.accesses.products.delete=!t.state.department.accesses.products.delete)},null,8,["radio"]),Q,e.createVNode(o.default,{label:"Read orders",name:"readOrders",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.orders.read,"onUpdate:radio":s[7]||(s[7]=a=>t.state.department.accesses.orders.read=!t.state.department.accesses.orders.read)},null,8,["radio"]),e.createVNode(o.default,{label:"Confirm orders",name:"confirmOrders",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.orders.confirm,"onUpdate:radio":s[8]||(s[8]=a=>t.state.department.accesses.orders.confirm=!t.state.department.accesses.orders.confirm)},null,8,["radio"]),e.createVNode(o.default,{label:"Delete orders",name:"deleteOrders",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.orders.delete,"onUpdate:radio":s[9]||(s[9]=a=>t.state.department.accesses.orders.delete=!t.state.department.accesses.orders.delete)},null,8,["radio"]),W,e.createVNode(o.default,{label:"Read departments",name:"readDepartments",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.departments.read,"onUpdate:radio":s[10]||(s[10]=a=>t.state.department.accesses.departments.read=!t.state.department.accesses.departments.read)},null,8,["radio"]),e.createVNode(o.default,{label:"Edit departments",name:"editDepartments",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.accesses.departments.edit,"onUpdate:radio":s[11]||(s[11]=a=>t.state.department.accesses.departments.edit=!t.state.department.accesses.departments.edit)},null,8,["radio"]),e.createVNode(o.default,{label:"Delete departments",name:"deleteDepartments",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.departments.delete,"onUpdate:radio":s[12]||(s[12]=a=>t.state.department.accesses.departments.delete=!t.state.department.accesses.departments.delete)},null,8,["radio"])])])])]))}};exports.default=X;