@ozdao/prometheus-framework 0.2.92 → 0.2.94

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) hide show
  1. package/dist/events.server.js +14 -6
  2. package/dist/events.server.mjs +14 -6
  3. package/dist/main-CX2ISR43.mjs +13629 -0
  4. package/dist/main-cffh4bbv.js +92 -0
  5. package/dist/main.css +1 -1
  6. package/dist/orders.server.js +37 -23
  7. package/dist/orders.server.mjs +37 -23
  8. package/dist/organizations.server.js +2 -1
  9. package/dist/organizations.server.mjs +2 -1
  10. package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
  11. package/dist/prometheus-framework/src/components/Address/Address.vue2.js +46 -48
  12. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
  13. package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +25 -20
  14. package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
  15. package/dist/prometheus-framework/src/components/Map/Map.vue.js +36 -26
  16. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -1
  18. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  19. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +1 -103
  20. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +1 -1
  21. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +36 -1
  22. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
  23. package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +1 -36
  24. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  26. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
  28. package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.cjs +1 -1
  29. package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.js +11 -11
  30. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  31. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  32. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  34. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +45 -45
  36. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.cjs +2 -2
  37. package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.js +39 -65
  38. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +31 -31
  40. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -0
  41. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +242 -0
  42. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.cjs +1 -0
  43. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.js +1 -0
  44. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +62 -62
  46. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +28 -28
  48. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +99 -70
  50. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
  54. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +10 -10
  56. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.js +1 -1
  60. package/dist/prometheus-framework/src/modules/orders/router/orders.router.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/orders/router/orders.router.js +2 -2
  62. package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/orders/store/orders.js +33 -34
  64. package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +42 -42
  66. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +28 -26
  68. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +11 -11
  70. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +47 -44
  72. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +162 -168
  74. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +27 -26
  76. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  77. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +7 -7
  78. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  79. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  80. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  81. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  82. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  83. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  84. package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
  85. package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +1 -1
  86. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  87. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  88. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
  89. package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +13 -13
  90. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
  91. package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
  92. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  93. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  94. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  95. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +14 -15
  96. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
  97. package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +22 -20
  98. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  99. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  100. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
  101. package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
  102. package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
  103. package/dist/prometheus-framework/src/modules/products/store/products.js +59 -38
  104. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  105. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  106. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
  107. package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +23 -22
  108. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
  109. package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +17 -14
  110. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  111. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
  112. package/dist/prometheus-framework.cjs.js +1 -1
  113. package/dist/prometheus-framework.es.js +1 -1
  114. package/dist/style.css +1 -1
  115. package/dist/web-CQQEUA9l.js +1 -0
  116. package/dist/web-D2Em-p-C.mjs +54 -0
  117. package/package.json +1 -1
  118. package/src/components/Address/Address.vue +23 -34
  119. package/src/components/LocationMarker/LocationMarker.vue +6 -1
  120. package/src/components/LocationSelection/LocationSelection.vue +4 -0
  121. package/src/components/Map/Map.vue +29 -15
  122. package/src/modules/constructor/components/elements/VideoPlayer.vue +2 -2
  123. package/src/modules/events/controllers/events.controller.js +4 -4
  124. package/src/modules/globals/components/blocks/CardHeader.vue +2 -2
  125. package/src/modules/integrations/stripe/controllers/services/stripe.service.js +17 -6
  126. package/src/modules/landing/components/pages/Farming.vue +226 -0
  127. package/src/modules/landing/components/pages/Governance.vue +3 -5
  128. package/src/modules/landing/components/pages/Home.vue +0 -3
  129. package/src/modules/landing/components/pages/Hotel.vue +1 -3
  130. package/src/modules/landing/components/pages/Page.vue +0 -3
  131. package/src/modules/landing/components/sections/Examples.vue +4 -56
  132. package/src/modules/landing/components/sections/SectionFeature.vue +41 -0
  133. package/src/modules/landing/components/sections/SectionFeaturesImages.vue +122 -0
  134. package/src/modules/landing/components/sections/SectionFocus.vue +59 -0
  135. package/src/modules/landing/components/sections/SectionHeroVideo.vue +164 -0
  136. package/src/modules/landing/router/landing.js +11 -0
  137. package/src/modules/marketplace/components/sections/Filters.vue +26 -23
  138. package/src/modules/orders/components/blocks/CardOrderItem.vue +8 -0
  139. package/src/modules/orders/components/blocks/StatusHistory.vue +25 -53
  140. package/src/modules/orders/components/pages/Order.vue +2 -6
  141. package/src/modules/orders/components/pages/OrderBackoffice.vue +393 -0
  142. package/src/modules/orders/components/pages/OrderCreate.vue +5 -4
  143. package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +2 -3
  144. package/src/modules/orders/components/pages/Orders.vue +60 -11
  145. package/src/modules/orders/components/sections/FormDelivery.vue +2 -2
  146. package/src/modules/orders/controllers/orders.controller.js +30 -19
  147. package/src/modules/orders/models/order.model.js +8 -2
  148. package/src/modules/orders/router/orders.backoffice.router.js +1 -1
  149. package/src/modules/orders/router/orders.router.js +2 -2
  150. package/src/modules/orders/store/orders.js +3 -7
  151. package/src/modules/orders/store/shopcart.js +1 -1
  152. package/src/modules/organizations/components/blocks/CardDepartment.vue +2 -0
  153. package/src/modules/organizations/components/pages/Department.vue +5 -1
  154. package/src/modules/organizations/components/pages/DepartmentEdit.vue +65 -27
  155. package/src/modules/organizations/components/pages/Members.vue +2 -1
  156. package/src/modules/organizations/components/pages/Organization.vue +1 -1
  157. package/src/modules/organizations/controllers/memberships.controller.js +3 -1
  158. package/src/modules/organizations/store/memberships.js +1 -1
  159. package/src/modules/products/components/blocks/CardProduct.vue +2 -3
  160. package/src/modules/products/components/pages/ProductEdit.vue +10 -13
  161. package/src/modules/products/components/pages/Products.vue +2 -0
  162. package/src/modules/products/store/products.js +25 -2
  163. package/src/modules/spots/components/blocks/CardSpot.vue +2 -2
  164. package/src/modules/users/components/blocks/CardUser.vue +1 -0
  165. package/src/modules/landing/components/sections/AboutSection.vue +0 -69
@@ -1,38 +1,39 @@
1
- import { withAsyncContext as y, resolveComponent as p, openBlock as t, createElementBlock as n, createElementVNode as e, toDisplayString as w, createVNode as c, unref as u, withCtx as C, createCommentVNode as a, Fragment as _, renderList as h, createBlock as b } from "vue";
2
- import { useRouter as $, useRoute as v } from "vue-router";
3
- import "../../../../components/Spoiler/Spoiler.vue.js";
4
- import x from "../blocks/DepartmentSub.vue.js";
5
- import E from "../../../users/components/blocks/CardUser.vue.js";
6
- import { actions as D, state as s } from "../../store/departments.js";
7
- const B = { class: "for-transition w-100" }, L = {
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
+ import { useRouter as C, useRoute as $ } from "vue-router";
3
+ import "../../../../components/Spoiler/Spoiler.vue2.js";
4
+ import v from "../blocks/DepartmentSub.vue.js";
5
+ import x from "../../../users/components/blocks/CardUser.vue.js";
6
+ import { actions as D, state as r } from "../../store/departments.js";
7
+ import B from "../../../icons/navigation/IconEdit.vue.js";
8
+ const E = { class: "for-transition w-100" }, L = {
8
9
  key: 0,
9
10
  id: "dash",
10
11
  class: "pd-medium bg-grey"
11
- }, N = { class: "mn-b-medium radius-medium pd-semi bg-white" }, V = { class: "flex-nowrap flex mn-b-small" }, H = { class: "w-100" }, I = ["innerHTML"], M = { class: "mn-b-medium radius-medium pd-semi bg-white" }, R = /* @__PURE__ */ e("h3", { class: "mn-b-regular" }, "Команда", -1), S = { key: 0 }, T = { class: "mn-b-medium radius-medium pd-semi bg-white" }, z = /* @__PURE__ */ e("h3", { class: "mn-b-regular" }, "Подотделы", -1), A = { key: 0 }, Q = {
12
+ }, N = { class: "mn-b-medium radius-medium pd-semi bg-white" }, V = { class: "flex-nowrap flex mn-b-small" }, H = { class: "w-100" }, M = ["innerHTML"], R = { class: "mn-b-medium radius-medium pd-semi bg-white" }, S = /* @__PURE__ */ t("h3", { class: "mn-b-regular" }, "Команда", -1), T = { key: 0 }, z = { class: "mn-b-medium radius-medium pd-semi bg-white" }, A = /* @__PURE__ */ t("h3", { class: "mn-b-regular" }, "Подотделы", -1), F = { key: 0 }, U = {
12
13
  __name: "Department",
13
- async setup(F) {
14
- let m, l;
15
- $();
16
- const o = v();
17
- return [m, l] = y(() => D.readOne(o.params.department)), await m, l(), (d, O) => {
18
- const g = p("IconEdit"), f = p("router-link");
19
- return t(), n("div", B, [
20
- s.department ? (t(), n("div", L, [
21
- e("section", N, [
22
- e("div", V, [
23
- e("h2", H, w(s.department.profile.name), 1),
24
- c(f, {
14
+ async setup(O) {
15
+ let l, p;
16
+ C();
17
+ const n = $();
18
+ return [l, p] = b(() => D.readOne(n.params.department)), await l, p(), (m, j) => {
19
+ const f = k("router-link");
20
+ return s(), o("div", E, [
21
+ r.department ? (s(), o("div", L, [
22
+ t("section", N, [
23
+ t("div", V, [
24
+ t("h2", H, y(r.department.profile.name), 1),
25
+ d(f, {
25
26
  to: {
26
27
  name: "Department Edit",
27
28
  params: {
28
- _id: u(o).params._id,
29
- department: u(o).params.department
29
+ _id: u(n).params._id,
30
+ department: u(n).params.department
30
31
  }
31
32
  },
32
33
  class: "cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"
33
34
  }, {
34
- default: C(() => [
35
- c(g, {
35
+ default: w(() => [
36
+ d(B, {
36
37
  class: "i-regular",
37
38
  classes: "fill-white"
38
39
  })
@@ -40,33 +41,35 @@ const B = { class: "for-transition w-100" }, L = {
40
41
  _: 1
41
42
  }, 8, ["to"])
42
43
  ]),
43
- e("p", {
44
+ t("p", {
44
45
  class: "t-transp p-big",
45
- innerHTML: s.department.description
46
- }, null, 8, I)
46
+ innerHTML: r.department.description
47
+ }, null, 8, M)
47
48
  ]),
48
- e("section", M, [
49
- R,
50
- e("ul", null, [
51
- s.department.members.length < 1 ? (t(), n("li", S, "В отделе еще нет участников")) : a("", !0),
52
- (t(!0), n(_, null, h(s.department.members, (r, i) => (t(), b(E, {
49
+ t("section", R, [
50
+ S,
51
+ t("ul", null, [
52
+ r.department.members.length < 1 ? (s(), o("li", T, "В отделе еще нет участников")) : a("", !0),
53
+ (s(!0), o(c, null, _(r.department.members, (e, i) => (s(), h(x, {
53
54
  class: "br-b br-solid br-grey",
54
55
  key: i,
55
- user: r,
56
- position: r.position,
57
- onClick: (k) => d.$router.push(`/app/profile/${r.user._id}`)
58
- }, null, 8, ["user", "position", "onClick"]))), 128))
56
+ user: e.user,
57
+ photo: e.user.profile.photo,
58
+ name: e.user.profile.name || e.user.phone || e.user.email || e.user._id,
59
+ position: e.position,
60
+ onClick: (g) => m.$router.push(`/app/profile/${e.user._id}`)
61
+ }, null, 8, ["user", "photo", "name", "position", "onClick"]))), 128))
59
62
  ])
60
63
  ]),
61
- e("section", T, [
62
- z,
63
- e("ul", null, [
64
- s.department.subdepartments.length < 1 ? (t(), n("li", A, "В отделе еще нет подотделов")) : a("", !0),
65
- (t(!0), n(_, null, h(s.department.subdepartments, (r, i) => (t(), b(x, {
66
- onClick: (k) => d.$router.push(`/app/organization/departments/${r._id}`),
64
+ t("section", z, [
65
+ A,
66
+ t("ul", null, [
67
+ r.department.subdepartments.length < 1 ? (s(), o("li", F, "В отделе еще нет подотделов")) : a("", !0),
68
+ (s(!0), o(c, null, _(r.department.subdepartments, (e, i) => (s(), h(v, {
69
+ onClick: (g) => m.$router.push(`/app/organization/departments/${e._id}`),
67
70
  key: i,
68
71
  class: "br-b br-solid br-grey",
69
- department: r
72
+ department: e
70
73
  }, null, 8, ["onClick", "department"]))), 128))
71
74
  ])
72
75
  ])
@@ -76,5 +79,5 @@ const B = { class: "for-transition w-100" }, L = {
76
79
  }
77
80
  };
78
81
  export {
79
- Q as default
82
+ U as default
80
83
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),N=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 B=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const g=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");const d=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 V=require("../../../../components/Button/Button.vue2.cjs"),_=require("../../../../components/Popup/Popup.vue.cjs"),w=require("../../../../components/Block/Block.vue.cjs");require("../blocks/EditArray.vue2.cjs");const C=require("../blocks/DepartmentSub.vue.cjs"),k=require("../blocks/DepartmentMemberModify.vue.cjs"),x=require("../../../users/components/blocks/CardUser.vue.cjs"),t=require("../../store/departments.cjs"),c=require("../../store/memberships.cjs"),U={class:"for-transition pd-thin w-100"},O={class:"mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big"},M={key:0,class:"mn-r-auto"},R={key:1,class:"mn-r-auto"},S={class:"flex-nowrap flex pd-thin"},T={class:"cols-2-fit-content"},z={class:"w-100 flex-child-grow-1 flex-child"},A={class:"cols-2 gap-thin"},F={class:"bg-grey pd-medium o-hidden radius-big"},$=e.createElementVNode("h3",{class:"mn-b-semi"},"Department Settings",-1),L=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please settings for your department:",-1),j={class:"cols-1 gap-thin"},H=e.createElementVNode("h4",null,"Products",-1),I={class:"bg-grey pd-medium o-hidden radius-big"},G=e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1),J=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select organization accesses for user in department:",-1),K={class:"cols-1 gap-thin"},Q=e.createElementVNode("h4",null,"Products",-1),W=e.createElementVNode("h4",null,"Orders",-1),X=e.createElementVNode("h4",null,"Departments",-1),Y={key:1,class:"flex-nowrap flex pd-thin"},Z={id:"dash",class:"pd-medium bg-white"},ee={class:"mn-b-regular flex-v-center flex-nowrap flex"},te=e.createElementVNode("h3",{class:"mn-r-small"},"Подотделы ",-1),ae={class:"mn-b-small"},se={key:0},re={__name:"DepartmentEdit",setup(de){const v=N.useRouter(),r=N.useRoute();async function E(){r.params.department&&await c.actions.read({target:r.params._id}),e.ref(c.state.memberships),r.params.department&&await t.actions.readOne(r.params.department)}E();const o=e.ref(!1),i=e.ref(null);function u(n){o.value=!0,typeof n=="number"&&(i.value=n)}function f(){o.value=!1,i.value=null}const m=e.ref(!1),p=e.ref(null);function b(n){m.value=!0,typeof n=="number"&&(p.value=n)}function h(){m.value=!1,p.value=null}async function D(){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 q(){v.replace({name:"Department",params:{_id:r.params._id,department:t.state.department._id}})}async function P(){await t.actions.delete(r.params._id,t.state.department)}return(n,a)=>(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("header",O,[e.unref(r).params.department?(e.openBlock(),e.createElementBlock("h1",M,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",R,"Create Department")),e.createElementVNode("section",S,[e.createVNode(V.default,{submit:D,callback:q,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",T,[e.createVNode(B.default,{photo:t.state.department.profile.photo,"onUpdate:photo":a[0]||(a[0]=s=>t.state.department.profile.photo=s),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",z,[e.createVNode(g.default,{field:t.state.department.profile.name,"onUpdate:field":a[1]||(a[1]=s=>t.state.department.profile.name=s),label:"Name",placeholder:"Department Name",class:"mn-b-small bg-white radius-small pd-medium",validation:n.organizationName},null,8,["field","validation"]),e.createVNode(g.default,{field:t.state.department.profile.description,"onUpdate:field":a[2]||(a[2]=s=>t.state.department.profile.description=s),label:"Description",placeholder:"Department description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:n.organizationName},null,8,["field","validation"])])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(w.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>u()}],class:"cols-1 gap-thin mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(s,l)=>(e.openBlock(),e.createBlock(x.default,{class:"bg-grey o-hidden radius-small mn-b-thin",key:l,user:s.user,photo:s.user.profile.photo,name:s.user.profile.name||s.user.phone||s.user.email||s.user._id,position:s.position,onClick:y=>u(l)},null,8,["user","photo","name","position","onClick"]))),128))]),_:1},8,["actions"]),e.createVNode(_.default,{title:"Add member",onClosePopup:f,isPopupOpen:o.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(k.default,{members:t.state.department.members,member:i.value,users:c.state.memberships,onCallback:f},null,8,["members","member","users"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",A,[e.createElementVNode("div",F,[$,L,e.createElementVNode("div",j,[H,e.createVNode(d.default,{label:"Hidden department",name:"hidden",class:"w-100 mn-r-small bg-white radius-small pd-small","onUpdate:radio":a[3]||(a[3]=s=>t.state.department.hidden=!t.state.department.hidden),radio:t.state.department.hidden},null,8,["radio"])])]),e.createElementVNode("div",I,[G,J,e.createElementVNode("div",K,[Q,e.createVNode(d.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":a[4]||(a[4]=s=>t.state.department.accesses.products.read=!t.state.department.accesses.products.read)},null,8,["radio"]),e.createVNode(d.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":a[5]||(a[5]=s=>t.state.department.accesses.products.edit=!t.state.department.accesses.products.edit)},null,8,["radio"]),e.createVNode(d.default,{label:"Delete products",name:"deleteProducts",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.products.delete,"onUpdate:radio":a[6]||(a[6]=s=>t.state.department.accesses.products.delete=!t.state.department.accesses.products.delete)},null,8,["radio"]),W,e.createVNode(d.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":a[7]||(a[7]=s=>t.state.department.accesses.orders.read=!t.state.department.accesses.orders.read)},null,8,["radio"]),e.createVNode(d.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":a[8]||(a[8]=s=>t.state.department.accesses.orders.confirm=!t.state.department.accesses.orders.confirm)},null,8,["radio"]),e.createVNode(d.default,{label:"Delete orders",name:"deleteOrders",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.orders.delete,"onUpdate:radio":a[9]||(a[9]=s=>t.state.department.accesses.orders.delete=!t.state.department.accesses.orders.delete)},null,8,["radio"]),X,e.createVNode(d.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":a[10]||(a[10]=s=>t.state.department.accesses.departments.read=!t.state.department.accesses.departments.read)},null,8,["radio"]),e.createVNode(d.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":a[11]||(a[11]=s=>t.state.department.accesses.departments.edit=!t.state.department.accesses.departments.edit)},null,8,["radio"]),e.createVNode(d.default,{label:"Delete departments",name:"deleteDepartments",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.accesses.departments.delete,"onUpdate:radio":a[12]||(a[12]=s=>t.state.department.accesses.departments.delete=!t.state.department.accesses.departments.delete)},null,8,["radio"])])])]),e.unref(r).params.department?(e.openBlock(),e.createElementBlock("section",Y,[e.createVNode(V.default,{submit:P,callback:n.redirectToDash,class:"bg-grey"},{default:e.withCtx(()=>[e.createTextVNode("Delete Department")]),_:1},8,["callback"])])):e.createCommentVNode("",!0),e.createElementVNode("div",Z,[e.createVNode(_.default,{title:"Добавить подотдел",onClosePopup:h,isPopupOpen:m.value},{default:e.withCtx(()=>[e.createVNode(k.default,{departments:t.state.department.subdepartments,department:p.value,maindepartment:t.state.department,alldepartments:t.state.departments,onCallback:h},null,8,["departments","department","maindepartment","alldepartments"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",ee,[te,e.createElementVNode("div",null,[e.createElementVNode("a",{class:"t-main h5",onClick:a[13]||(a[13]=s=>b())},"+")])]),e.createElementVNode("ul",ae,[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,(s,l)=>(e.openBlock(),e.createBlock(C.default,{key:l,class:"bg-grey o-hidden radius-small mn-b-thin",department:s,onClick:y=>b(l)},null,8,["department","onClick"]))),128))])])]))}};exports.default=re;
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.vue2.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.vue2.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;