@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,6 +1,6 @@
1
1
  import { openBlock as r, createBlock as l, withCtx as o, createElementVNode as n, createVNode as m } from "vue";
2
2
  import s from "../../../../components/Block/Block.vue.js";
3
- import p from "../../../../components/Select/Select.vue2.js";
3
+ import p from "../../../../components/Select/Select.vue.js";
4
4
  const c = { class: "mn-b-small flex-nowrap flex" }, f = {
5
5
  __name: "FormPayment",
6
6
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../globals/components/layouts/Empty.vue.cjs"),r=[{path:"orders",meta:{title:{en:"Backoffice Orders",ru:"Управление Заказами"}},component:e.default,children:[{path:"",name:"Backoffice Orders",meta:{title:{en:"Backoffice Orders",ru:"Управление Заказами"}},component:()=>Promise.resolve().then(()=>require("../components/pages/Orders.vue.cjs"))},{path:"add",name:"AdminOrderAdd",component:()=>Promise.resolve().then(()=>require("../components/pages/OrderCreateBackoffice.vue.cjs"))},{path:":order",name:"AdminOrderEdit",component:()=>Promise.resolve().then(()=>require("../components/pages/OrderCreateBackoffice.vue.cjs"))}]}];exports.default=r;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../globals/components/layouts/Empty.vue.cjs"),r=[{path:"orders",meta:{title:{en:"Backoffice Orders",ru:"Управление Заказами"}},component:e.default,children:[{path:"",name:"Backoffice Orders",meta:{title:{en:"Backoffice Orders",ru:"Управление Заказами"}},component:()=>Promise.resolve().then(()=>require("../components/pages/Orders.vue.cjs"))},{path:"add",name:"AdminOrderAdd",component:()=>Promise.resolve().then(()=>require("../components/pages/OrderCreateBackoffice.vue.cjs"))},{path:":order",name:"AdminOrderEdit",component:()=>Promise.resolve().then(()=>require("../components/pages/OrderBackoffice.vue.cjs"))}]}];exports.default=r;
@@ -34,7 +34,7 @@ const t = [
34
34
  name: "AdminOrderEdit",
35
35
  component: () => import(
36
36
  /* webpackChunkName: 'BackofficeOrders' */
37
- "../components/pages/OrderCreateBackoffice.vue.js"
37
+ "../components/pages/OrderBackoffice.vue.js"
38
38
  )
39
39
  }]
40
40
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../globals/components/layouts/Empty.vue.cjs"),r={path:"orders",component:e.default,meta:{title:{en:"Marketplace",ru:"Маркетплейс"}},children:[{path:"form",name:"Form Order",meta:{title:{en:"Order",ru:"Заказ"}},component:()=>Promise.resolve().then(()=>require("../components/pages/OrderCreate.vue.cjs"))},{path:":order",name:"Order Status",meta:{title:{en:"Order",ru:"Заказ"}},component:()=>Promise.resolve().then(()=>require("../components/pages/Order.vue.cjs"))},{path:":order/edit",name:"Order Edit",meta:{title:{en:"Order",ru:"Заказ"}},component:()=>Promise.resolve().then(()=>require("../components/pages/Order.vue.cjs"))}]};exports.default=r;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../globals/components/layouts/Empty.vue.cjs"),r={path:"orders",component:e.default,meta:{title:{en:"Marketplace",ru:"Маркетплейс"}},children:[{path:"form",name:"Form Order",meta:{title:{en:"Order",ru:"Заказ"}},component:()=>Promise.resolve().then(()=>require("../components/pages/OrderCreate.vue.cjs"))},{path:":order",name:"Order Status",meta:{title:{en:"Order",ru:"Заказ"}},component:()=>Promise.resolve().then(()=>require("../components/pages/OrderBackoffice.vue.cjs"))},{path:":order/edit",name:"Order Edit",meta:{title:{en:"Order",ru:"Заказ"}},component:()=>Promise.resolve().then(()=>require("../components/pages/OrderBackoffice.vue.cjs"))}]};exports.default=r;
@@ -34,7 +34,7 @@ const t = {
34
34
  },
35
35
  component: () => import(
36
36
  /* webpackChunkName: 'Order' */
37
- "../components/pages/Order.vue.js"
37
+ "../components/pages/OrderBackoffice.vue.js"
38
38
  )
39
39
  },
40
40
  {
@@ -48,7 +48,7 @@ const t = {
48
48
  },
49
49
  component: () => import(
50
50
  /* webpackChunkName: 'Order' */
51
- "../components/pages/Order.vue.js"
51
+ "../components/pages/OrderBackoffice.vue.js"
52
52
  )
53
53
  }
54
54
  ]
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=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=o.reactive({all:[],current:{_id:null,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{e._id&&(e.params={_id:e._id});const t=await n.get("/api/orders/read",{params:e.params});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/${e._id}`,e),r=a.all.findIndex(i=>i._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}),i=a.all.findIndex(d=>d._id===e);i!==-1&&(a.all[i]=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}o.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"),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,11 +1,11 @@
1
- import { reactive as d, watch as p } from "vue";
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 o from "./models/customer.js";
5
- const n = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = d({
4
+ import c from "./models/customer.js";
5
+ const n = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = l({
6
6
  all: [],
7
7
  current: {
8
- _id: null,
8
+ _id: void 0,
9
9
  positions: [],
10
10
  status: null,
11
11
  comment: "",
@@ -17,7 +17,7 @@ const n = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = d
17
17
  type: "Customer",
18
18
  target: null
19
19
  },
20
- customer: { ...o },
20
+ customer: { ...c },
21
21
  payment: {
22
22
  type: "Cash",
23
23
  status: "Unpaid"
@@ -28,64 +28,63 @@ const n = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = d
28
28
  status: ""
29
29
  }
30
30
  }
31
- }), _ = {
32
- async create(a) {
31
+ }), w = {
32
+ async create(e) {
33
33
  try {
34
- const t = await n.post("/api/orders/create", a);
34
+ const t = await n.post("/api/orders/create", e);
35
35
  return r.all.push(t.data), t.data;
36
36
  } catch (t) {
37
37
  s(t);
38
38
  }
39
39
  },
40
- async read(a = {}) {
40
+ async read(e = {}) {
41
41
  try {
42
- a._id && (a.params = { _id: a._id });
43
- const t = await n.get("/api/orders/read", { params: a.params });
44
- return a._id ? c(t.data[0], "current") : c(t.data, "all"), t.data;
42
+ 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;
45
44
  } catch (t) {
46
45
  throw s(t), t;
47
46
  }
48
47
  },
49
- async update(a) {
48
+ async update(e) {
50
49
  try {
51
- const t = await n.post(`/api/orders/${a._id}`, a), e = r.all.findIndex((i) => i._id === a._id);
52
- return e !== -1 && (r.all[e] = t.data), t.data;
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;
53
52
  } catch (t) {
54
53
  s(t);
55
54
  }
56
55
  },
57
- async delete(a) {
56
+ async delete(e) {
58
57
  try {
59
- await n.delete(`/api/orders/${a}`), r.all = r.all.filter((t) => t._id !== a);
58
+ await n.delete(`/api/orders/${e}`), r.all = r.all.filter((t) => t._id !== e);
60
59
  } catch (t) {
61
60
  s(t);
62
61
  }
63
62
  },
64
- async changePaymentStatus(a, t) {
63
+ async changePaymentStatus(e, t) {
65
64
  try {
66
- const e = await n.post(`/api/orders/payment/${a}`, { status: t }), i = r.all.findIndex((l) => l._id === a);
67
- i !== -1 && (r.all[i] = e.data);
68
- } catch (e) {
69
- s(e);
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);
70
69
  }
71
70
  }
72
- }, w = {
73
- resetCustomer(a) {
74
- Object.assign(a, o);
75
- }
76
71
  }, g = {
77
- getTotal(a) {
78
- return a.reduce((t, e) => t + e.price * e.quantity, 0);
72
+ resetCustomer(e) {
73
+ Object.assign(e, c);
74
+ }
75
+ }, x = {
76
+ getTotal(e) {
77
+ return e.reduce((t, a) => t + a.price * a.quantity, 0);
79
78
  }
80
79
  };
81
- function c(a, t) {
82
- r[t] = a;
80
+ function i(e, t) {
81
+ r[t] = e;
83
82
  }
84
- p(r, (a, t) => {
83
+ p(r, (e, t) => {
85
84
  });
86
85
  export {
87
- _ as actions,
88
- g as getters,
89
- w as mutations,
86
+ w as actions,
87
+ x as getters,
88
+ g as mutations,
90
89
  r as state
91
90
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue");require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../globals/store/globals.cjs");const t=r.reactive({organization:null,positions:[],currentState:!1}),s={toggleShopcart(){t.currentState=!t.currentState},setShopcart(){try{const o=localStorage.getItem("shopcart");if(o){const i=JSON.parse(o);t.positions=i.positions,t.organization=i.organization}}catch(o){throw console.error(o),o}},addProductToCart(o,i){const e=t.positions.find(n=>n._id===o._id);e?e.quantity++:t.positions.push({_id:o._id,images:o.images,name:o.name,price:o.price,quantity:1,org_id:i}),localStorage.setItem("shopcart",JSON.stringify({positions:t.positions,organization:i}))},removeProduct(o){const i=t.positions.find(n=>n._id===o),e=t.positions.indexOf(i);e>-1&&(t.positions.splice(e,1),localStorage.setItem("shopcart",JSON.stringify({positions:t.positions,organization:t.organization})))},decrementItemQuantity(o){const i=t.positions.find(n=>n._id===o),e=t.positions.indexOf(i);e>-1&&(i.quantity--,i.quantity<1&&t.positions.splice(e,1),localStorage.setItem("shopcart",JSON.stringify({positions:t.positions,organization:t.organization})))},incrementItemQuantity(o){const i=t.positions.find(e=>e._id===o);i&&(i.quantity++,localStorage.setItem("shopcart",JSON.stringify({positions:t.positions,organization:t.organization})))},resetShopcart({state:o}){o.positions=[],localStorage.removeItem("shopcart")}},a={cartTotalPrice:r.computed(()=>Number(t.positions.reduce((o,i)=>o+i.price*i.quantity,0))),cartTotalAmount:r.computed(()=>Number(t.positions.reduce((o,i)=>o+i.quantity,0))),getStoreCartState:r.computed(()=>Number(t.currentState))};r.watch(t,(o,i)=>{});exports.actions=s;exports.getters=a;exports.state=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue");require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("../../globals/store/globals.cjs");const t=r.reactive({organization:null,positions:[],currentState:!1}),s={toggleShopcart(){t.currentState=!t.currentState},setShopcart(){try{const o=localStorage.getItem("shopcart");if(o){const i=JSON.parse(o);t.positions=i.positions,t.organization=i.organization}}catch(o){throw console.error(o),o}},addProductToCart(o,i){const e=t.positions.find(n=>n._id===o._id);e?e.quantity++:t.positions.push({_id:o._id,images:o.images,name:o.name,price:o.price,quantity:1,org_id:i}),localStorage.setItem("shopcart",JSON.stringify({positions:t.positions,organization:i}))},removeProduct(o){const i=t.positions.find(n=>n._id===o),e=t.positions.indexOf(i);e>-1&&(t.positions.splice(e,1),localStorage.setItem("shopcart",JSON.stringify({positions:t.positions,organization:t.organization})))},decrementItemQuantity(o){const i=t.positions.find(n=>n._id===o),e=t.positions.indexOf(i);e>-1&&(i.quantity--,i.quantity<1&&t.positions.splice(e,1),localStorage.setItem("shopcart",JSON.stringify({positions:t.positions,organization:t.organization})))},incrementItemQuantity(o){const i=t.positions.find(e=>e._id===o);i&&(i.quantity++,localStorage.setItem("shopcart",JSON.stringify({positions:t.positions,organization:t.organization})))},resetShopcart(){t.positions=[],localStorage.removeItem("shopcart")}},a={cartTotalPrice:r.computed(()=>Number(t.positions.reduce((o,i)=>o+i.price*i.quantity,0))),cartTotalAmount:r.computed(()=>Number(t.positions.reduce((o,i)=>o+i.quantity,0))),getStoreCartState:r.computed(()=>Number(t.currentState))};r.watch(t,(o,i)=>{});exports.actions=s;exports.getters=a;exports.state=t;
@@ -1,82 +1,82 @@
1
1
  import { reactive as s, computed as r, watch as a } from "vue";
2
2
  import "../../../../../node_modules/js-cookie/dist/js.cookie.js";
3
3
  import "../../globals/store/globals.js";
4
- const o = s({
4
+ const t = s({
5
5
  organization: null,
6
6
  positions: [],
7
7
  currentState: !1
8
8
  }), g = {
9
9
  toggleShopcart() {
10
- o.currentState = !o.currentState;
10
+ t.currentState = !t.currentState;
11
11
  },
12
12
  setShopcart() {
13
13
  try {
14
- const t = localStorage.getItem("shopcart");
15
- if (t) {
16
- const i = JSON.parse(t);
17
- o.positions = i.positions, o.organization = i.organization;
14
+ const o = localStorage.getItem("shopcart");
15
+ if (o) {
16
+ const i = JSON.parse(o);
17
+ t.positions = i.positions, t.organization = i.organization;
18
18
  }
19
- } catch (t) {
20
- throw console.error(t), t;
19
+ } catch (o) {
20
+ throw console.error(o), o;
21
21
  }
22
22
  },
23
- addProductToCart(t, i) {
24
- const e = o.positions.find(
25
- (n) => n._id === t._id
23
+ addProductToCart(o, i) {
24
+ const e = t.positions.find(
25
+ (n) => n._id === o._id
26
26
  );
27
- e ? e.quantity++ : o.positions.push({
28
- _id: t._id,
29
- images: t.images,
30
- name: t.name,
31
- price: t.price,
27
+ e ? e.quantity++ : t.positions.push({
28
+ _id: o._id,
29
+ images: o.images,
30
+ name: o.name,
31
+ price: o.price,
32
32
  quantity: 1,
33
33
  org_id: i
34
34
  // Добавляем _id организации к каждому продукту
35
35
  }), localStorage.setItem("shopcart", JSON.stringify({
36
- positions: o.positions,
36
+ positions: t.positions,
37
37
  organization: i
38
38
  // Сохраняем _id организации в корне объекта корзины
39
39
  }));
40
40
  },
41
- removeProduct(t) {
42
- const i = o.positions.find(
43
- (n) => n._id === t
44
- ), e = o.positions.indexOf(i);
45
- e > -1 && (o.positions.splice(e, 1), localStorage.setItem("shopcart", JSON.stringify({
46
- positions: o.positions,
47
- organization: o.organization
41
+ removeProduct(o) {
42
+ const i = t.positions.find(
43
+ (n) => n._id === o
44
+ ), e = t.positions.indexOf(i);
45
+ e > -1 && (t.positions.splice(e, 1), localStorage.setItem("shopcart", JSON.stringify({
46
+ positions: t.positions,
47
+ organization: t.organization
48
48
  })));
49
49
  },
50
- decrementItemQuantity(t) {
51
- const i = o.positions.find(
52
- (n) => n._id === t
53
- ), e = o.positions.indexOf(i);
54
- e > -1 && (i.quantity--, i.quantity < 1 && o.positions.splice(e, 1), localStorage.setItem("shopcart", JSON.stringify({
55
- positions: o.positions,
56
- organization: o.organization
50
+ decrementItemQuantity(o) {
51
+ const i = t.positions.find(
52
+ (n) => n._id === o
53
+ ), e = t.positions.indexOf(i);
54
+ e > -1 && (i.quantity--, i.quantity < 1 && t.positions.splice(e, 1), localStorage.setItem("shopcart", JSON.stringify({
55
+ positions: t.positions,
56
+ organization: t.organization
57
57
  })));
58
58
  },
59
- incrementItemQuantity(t) {
60
- const i = o.positions.find(
61
- (e) => e._id === t
59
+ incrementItemQuantity(o) {
60
+ const i = t.positions.find(
61
+ (e) => e._id === o
62
62
  );
63
63
  i && (i.quantity++, localStorage.setItem("shopcart", JSON.stringify({
64
- positions: o.positions,
65
- organization: o.organization
64
+ positions: t.positions,
65
+ organization: t.organization
66
66
  })));
67
67
  },
68
- resetShopcart({ state: t }) {
68
+ resetShopcart() {
69
69
  t.positions = [], localStorage.removeItem("shopcart");
70
70
  }
71
71
  }, u = {
72
- cartTotalPrice: r(() => Number(o.positions.reduce((t, i) => t + i.price * i.quantity, 0))),
73
- cartTotalAmount: r(() => Number(o.positions.reduce((t, i) => t + i.quantity, 0))),
74
- getStoreCartState: r(() => Number(o.currentState))
72
+ cartTotalPrice: r(() => Number(t.positions.reduce((o, i) => o + i.price * i.quantity, 0))),
73
+ cartTotalAmount: r(() => Number(t.positions.reduce((o, i) => o + i.quantity, 0))),
74
+ getStoreCartState: r(() => Number(t.currentState))
75
75
  };
76
- a(o, (t, i) => {
76
+ a(t, (o, i) => {
77
77
  });
78
78
  export {
79
79
  g as actions,
80
80
  u as getters,
81
- o as state
81
+ t as state
82
82
  };
@@ -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 d=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),u=require("../../../users/components/blocks/CardUser.vue.cjs");require("./CardDepartment.vue2.cjs");const c={class:"radius-semi o-hidden cols-2-1_3"},m={class:"pd-medium w-100"},p=["innerHTML"],k={key:0},_={__name:"CardDepartment",props:{department:Object,organization:Object},setup(t){const n=t;return(o,a)=>{const s=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",c,[e.createElementVNode("div",m,[e.createVNode(s,{to:{name:"Department Edit",params:{_id:n.organization,department:t.department._id}},class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"},{default:e.withCtx(()=>[e.createVNode(l.default,{class:"i-regular",classes:"fill-white"})]),_:1},8,["to"]),e.createElementVNode("h3",{onClick:a[0]||(a[0]=r=>o.$router.push(`/organizations/${n.organization}/departments/${t.department._id}`)),class:"mn-b-small w-100",innerHTML:t.department.profile.name},null,8,p),e.createElementVNode("ul",null,[t.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(t.department.members,(r,i)=>(e.openBlock(),e.createBlock(u.default,{class:"br-b br-solid br-grey",key:i,user:r.user,position:r.position,onClick:g=>o.$router.push(`/app/profile/${r.user._id}`)},null,8,["user","position","onClick"]))),128))])])])}}},b=d.default(_,[["__scopeId","data-v-5cb387b9"]]);exports.default=b;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("../../../icons/navigation/IconEdit.vue.cjs");require("../../../../components/Spoiler/Spoiler.vue2.cjs");require("./DepartmentSub.vue2.cjs");const u=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),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,60 +1,62 @@
1
- import { resolveComponent as p, openBlock as r, createElementBlock as n, createElementVNode as o, createVNode as m, withCtx as c, createCommentVNode as u, Fragment as _, renderList as f, createBlock as b } from "vue";
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
2
  import g from "../../../icons/navigation/IconEdit.vue.js";
3
- import "../../../../components/Spoiler/Spoiler.vue.js";
3
+ import "../../../../components/Spoiler/Spoiler.vue2.js";
4
4
  import "./DepartmentSub.vue2.js";
5
- import h from "../../../../../../_virtual/_plugin-vue_export-helper.js";
6
- import k from "../../../users/components/blocks/CardUser.vue.js";
5
+ import k from "../../../../../../_virtual/_plugin-vue_export-helper.js";
6
+ import $ from "../../../users/components/blocks/CardUser.vue.js";
7
7
  import "./CardDepartment.vue2.js";
8
- const $ = { class: "radius-semi o-hidden cols-2-1_3" }, C = { class: "pd-medium w-100" }, v = ["innerHTML"], w = { key: 0 }, z = {
8
+ const C = { class: "radius-semi o-hidden cols-2-1_3" }, v = { class: "pd-medium w-100" }, b = ["innerHTML"], w = { key: 0 }, z = {
9
9
  __name: "CardDepartment",
10
10
  props: {
11
11
  department: Object,
12
12
  organization: Object
13
13
  },
14
- setup(e) {
15
- const s = e;
14
+ setup(t) {
15
+ const s = t;
16
16
  return (i, a) => {
17
- const l = p("router-link");
18
- return r(), n("div", $, [
19
- o("div", C, [
20
- m(l, {
17
+ const p = m("router-link");
18
+ return r(), o("div", C, [
19
+ n("div", v, [
20
+ l(p, {
21
21
  to: {
22
22
  name: "Department Edit",
23
23
  params: {
24
24
  _id: s.organization,
25
- department: e.department._id
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
- default: c(() => [
31
- m(g, {
30
+ default: u(() => [
31
+ l(g, {
32
32
  class: "i-regular",
33
33
  classes: "fill-white"
34
34
  })
35
35
  ]),
36
36
  _: 1
37
37
  }, 8, ["to"]),
38
- o("h3", {
39
- onClick: a[0] || (a[0] = (t) => i.$router.push(`/organizations/${s.organization}/departments/${e.department._id}`)),
38
+ n("h3", {
39
+ onClick: a[0] || (a[0] = (e) => i.$router.push(`/organizations/${s.organization}/departments/${t.department._id}`)),
40
40
  class: "mn-b-small w-100",
41
- innerHTML: e.department.profile.name
42
- }, null, 8, v),
43
- o("ul", null, [
44
- e.department.members.length < 1 ? (r(), n("li", w, "No members in department")) : u("", !0),
45
- (r(!0), n(_, null, f(e.department.members, (t, d) => (r(), b(k, {
41
+ innerHTML: t.department.profile.name
42
+ }, null, 8, b),
43
+ n("ul", null, [
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
46
  class: "br-b br-solid br-grey",
47
47
  key: d,
48
- user: t.user,
49
- position: t.position,
50
- onClick: (N) => i.$router.push(`/app/profile/${t.user._id}`)
51
- }, null, 8, ["user", "position", "onClick"]))), 128))
48
+ user: e.user,
49
+ photo: e.user.profile.photo,
50
+ name: e.user.profile.name || e.user.phone || e.user.email || e.user._id,
51
+ position: e.position,
52
+ onClick: (N) => i.$router.push(`/app/profile/${e.user._id}`)
53
+ }, null, 8, ["user", "photo", "name", "position", "onClick"]))), 128))
52
54
  ])
53
55
  ])
54
56
  ]);
55
57
  };
56
58
  }
57
- }, j = /* @__PURE__ */ h(z, [["__scopeId", "data-v-5cb387b9"]]);
59
+ }, j = /* @__PURE__ */ k(z, [["__scopeId", "data-v-213d8146"]]);
58
60
  export {
59
61
  j as default
60
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 b=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),f=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.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),l=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=l.value,u("callback")):(r.members.push({...n.value,role:l.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,(t,p)=>(e.openBlock(),e.createBlock(h.default,{key:p,photo:t.user.profile.photo,name:t.user.profile.name||t.user.phone||t.user.email||t.user._id,user:t,position:t.position,onClick:a[0]||(a[0]=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:l.value,"onUpdate:field":a[1]||(a[1]=o=>l.value=o),label:"Должность",placeholder:"Название должности",class:"bg-white",validation:s.organizationName},null,8,["field","validation"])]),e.createElementVNode("button",{disabled:!n.value||!l.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=b.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,14 +1,14 @@
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
- import N from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
- import $ from "../../../../components/Field/Field.vue2.js";
5
- import "../../../../components/Select/Select.vue.js";
6
- import M from "../../../../components/Feed/Feed.vue.js";
3
+ import M from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
+ import N from "../../../../components/Field/Field.vue2.js";
5
+ import "../../../../components/Select/Select.vue2.js";
6
+ import $ from "../../../../components/Feed/Feed.vue.js";
7
7
  import B from "../../../users/components/blocks/CardUser.vue.js";
8
- import { actions as D } from "../../store/memberships.js";
8
+ import { actions as F } from "../../store/memberships.js";
9
9
  import "../../../middlewares/client/inputs.validation.js";
10
10
  import "./DepartmentMemberModify.vue2.js";
11
- const F = { class: "br-grey radius-small mn-small" }, I = { class: "bg-grey mn-b-thin h-min-10r h-max-10r o-scroll pd-medium radius-big" }, V = ["disabled"], A = {
11
+ const D = { class: "br-grey radius-small mn-small" }, I = { class: "bg-grey mn-b-thin h-min-10r h-max-10r o-scroll pd-medium radius-big" }, V = ["disabled"], A = {
12
12
  __name: "DepartmentMemberModify",
13
13
  props: {
14
14
  isPopupOpen: Boolean,
@@ -27,9 +27,9 @@ const F = { class: "br-grey radius-small mn-small" }, I = { class: "bg-grey mn-b
27
27
  e.members.splice(e.member, 1), a("callback");
28
28
  }
29
29
  return (s, m) => (n(), u("div", null, [
30
- p("div", F, [
30
+ p("div", D, [
31
31
  p("div", I, [
32
- b(M, {
32
+ b($, {
33
33
  states: {
34
34
  empty: {
35
35
  title: "No Members Found",
@@ -37,7 +37,7 @@ const F = { class: "br-grey radius-small mn-small" }, I = { class: "bg-grey mn-b
37
37
  }
38
38
  },
39
39
  store: {
40
- read: (t) => D.read(t),
40
+ read: (t) => F.read(t),
41
41
  state: null
42
42
  },
43
43
  options: {
@@ -60,7 +60,7 @@ const F = { class: "br-grey radius-small mn-small" }, I = { class: "bg-grey mn-b
60
60
  _: 1
61
61
  }, 8, ["store", "options"])
62
62
  ]),
63
- b($, {
63
+ b(N, {
64
64
  field: o.value,
65
65
  "onUpdate:field": m[1] || (m[1] = (t) => o.value = t),
66
66
  label: "Должность",
@@ -81,7 +81,7 @@ const F = { class: "br-grey radius-small mn-small" }, I = { class: "bg-grey mn-b
81
81
  }, " Удалить участника ")) : C("", !0)
82
82
  ]));
83
83
  }
84
- }, H = /* @__PURE__ */ N(A, [["__scopeId", "data-v-0d6c0d38"]]);
84
+ }, H = /* @__PURE__ */ M(A, [["__scopeId", "data-v-0d6c0d38"]]);
85
85
  export {
86
86
  H as default
87
87
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Spoiler/Spoiler.vue.cjs");const u=require("../blocks/DepartmentSub.vue.cjs"),p=require("../../../users/components/blocks/CardUser.vue.cjs"),t=require("../../store/departments.cjs"),_={class:"for-transition w-100"},h={key:0,id:"dash",class:"pd-medium bg-grey"},k={class:"mn-b-medium radius-medium pd-semi bg-white"},b={class:"flex-nowrap flex mn-b-small"},g={class:"w-100"},E=["innerHTML"],B={class:"mn-b-medium radius-medium pd-semi bg-white"},N=e.createElementVNode("h3",{class:"mn-b-regular"},"Команда",-1),V={key:0},f={class:"mn-b-medium radius-medium pd-semi bg-white"},y=e.createElementVNode("h3",{class:"mn-b-regular"},"Подотделы",-1),C={key:0},v={__name:"Department",async setup(w){let s,a;c.useRouter();const n=c.useRoute();return[s,a]=e.withAsyncContext(()=>t.actions.readOne(n.params.department)),await s,a(),(l,q)=>{const i=e.resolveComponent("IconEdit"),d=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("div",_,[t.state.department?(e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("section",k,[e.createElementVNode("div",b,[e.createElementVNode("h2",g,e.toDisplayString(t.state.department.profile.name),1),e.createVNode(d,{to:{name:"Department Edit",params:{_id:e.unref(n).params._id,department:e.unref(n).params.department}},class:"cursor-pointer pos-absolute pos-t-regular pos-r-regular radius-extra pd-thin bg-second"},{default:e.withCtx(()=>[e.createVNode(i,{class:"i-regular",classes:"fill-white"})]),_:1},8,["to"])]),e.createElementVNode("p",{class:"t-transp p-big",innerHTML:t.state.department.description},null,8,E)]),e.createElementVNode("section",B,[N,e.createElementVNode("ul",null,[t.state.department.members.length<1?(e.openBlock(),e.createElementBlock("li",V,"В отделе еще нет участников")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(r,o)=>(e.openBlock(),e.createBlock(p.default,{class:"br-b br-solid br-grey",key:o,user:r,position:r.position,onClick:m=>l.$router.push(`/app/profile/${r.user._id}`)},null,8,["user","position","onClick"]))),128))])]),e.createElementVNode("section",f,[y,e.createElementVNode("ul",null,[t.state.department.subdepartments.length<1?(e.openBlock(),e.createElementBlock("li",C,"В отделе еще нет подотделов")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.subdepartments,(r,o)=>(e.openBlock(),e.createBlock(u.default,{onClick:m=>l.$router.push(`/app/organization/departments/${r._id}`),key:o,class:"br-b br-solid br-grey",department:r},null,8,["onClick","department"]))),128))])])])):e.createCommentVNode("",!0)])}}};exports.default=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;