@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.
- package/dist/events.server.js +14 -6
- package/dist/events.server.mjs +14 -6
- package/dist/main-CX2ISR43.mjs +13629 -0
- package/dist/main-cffh4bbv.js +92 -0
- package/dist/main.css +1 -1
- package/dist/orders.server.js +37 -23
- package/dist/orders.server.mjs +37 -23
- package/dist/organizations.server.js +2 -1
- package/dist/organizations.server.mjs +2 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.js +46 -48
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +25 -20
- package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Map/Map.vue.js +36 -26
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +1 -103
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue.js +36 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Spoiler/Spoiler.vue2.js +1 -36
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/VideoPlayer.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +45 -45
- package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/blocks/StatusHistory.vue.js +39 -65
- package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Order.vue.js +31 -31
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +242 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue2.js +1 -0
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +62 -62
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +28 -28
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +99 -70
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +10 -10
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.backoffice.router.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.router.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +33 -34
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +42 -42
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +28 -26
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +47 -44
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +162 -168
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +27 -26
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/memberships.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +14 -15
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +22 -20
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.js +59 -38
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +23 -22
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/blocks/CardUser.vue.js +17 -14
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/web-CQQEUA9l.js +1 -0
- package/dist/web-D2Em-p-C.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Address/Address.vue +23 -34
- package/src/components/LocationMarker/LocationMarker.vue +6 -1
- package/src/components/LocationSelection/LocationSelection.vue +4 -0
- package/src/components/Map/Map.vue +29 -15
- package/src/modules/constructor/components/elements/VideoPlayer.vue +2 -2
- package/src/modules/events/controllers/events.controller.js +4 -4
- package/src/modules/globals/components/blocks/CardHeader.vue +2 -2
- package/src/modules/integrations/stripe/controllers/services/stripe.service.js +17 -6
- package/src/modules/landing/components/pages/Farming.vue +226 -0
- package/src/modules/landing/components/pages/Governance.vue +3 -5
- package/src/modules/landing/components/pages/Home.vue +0 -3
- package/src/modules/landing/components/pages/Hotel.vue +1 -3
- package/src/modules/landing/components/pages/Page.vue +0 -3
- package/src/modules/landing/components/sections/Examples.vue +4 -56
- package/src/modules/landing/components/sections/SectionFeature.vue +41 -0
- package/src/modules/landing/components/sections/SectionFeaturesImages.vue +122 -0
- package/src/modules/landing/components/sections/SectionFocus.vue +59 -0
- package/src/modules/landing/components/sections/SectionHeroVideo.vue +164 -0
- package/src/modules/landing/router/landing.js +11 -0
- package/src/modules/marketplace/components/sections/Filters.vue +26 -23
- package/src/modules/orders/components/blocks/CardOrderItem.vue +8 -0
- package/src/modules/orders/components/blocks/StatusHistory.vue +25 -53
- package/src/modules/orders/components/pages/Order.vue +2 -6
- package/src/modules/orders/components/pages/OrderBackoffice.vue +393 -0
- package/src/modules/orders/components/pages/OrderCreate.vue +5 -4
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +2 -3
- package/src/modules/orders/components/pages/Orders.vue +60 -11
- package/src/modules/orders/components/sections/FormDelivery.vue +2 -2
- package/src/modules/orders/controllers/orders.controller.js +30 -19
- package/src/modules/orders/models/order.model.js +8 -2
- package/src/modules/orders/router/orders.backoffice.router.js +1 -1
- package/src/modules/orders/router/orders.router.js +2 -2
- package/src/modules/orders/store/orders.js +3 -7
- package/src/modules/orders/store/shopcart.js +1 -1
- package/src/modules/organizations/components/blocks/CardDepartment.vue +2 -0
- package/src/modules/organizations/components/pages/Department.vue +5 -1
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +65 -27
- package/src/modules/organizations/components/pages/Members.vue +2 -1
- package/src/modules/organizations/components/pages/Organization.vue +1 -1
- package/src/modules/organizations/controllers/memberships.controller.js +3 -1
- package/src/modules/organizations/store/memberships.js +1 -1
- package/src/modules/products/components/blocks/CardProduct.vue +2 -3
- package/src/modules/products/components/pages/ProductEdit.vue +10 -13
- package/src/modules/products/components/pages/Products.vue +2 -0
- package/src/modules/products/store/products.js +25 -2
- package/src/modules/spots/components/blocks/CardSpot.vue +2 -2
- package/src/modules/users/components/blocks/CardUser.vue +1 -0
- 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.
|
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/
|
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;
|
@@ -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/
|
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/
|
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/
|
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
|
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
|
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
|
5
|
-
const n = u.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r =
|
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:
|
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: { ...
|
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(
|
31
|
+
}), w = {
|
32
|
+
async create(e) {
|
33
33
|
try {
|
34
|
-
const t = await n.post("/api/orders/create",
|
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(
|
40
|
+
async read(e = {}) {
|
41
41
|
try {
|
42
|
-
|
43
|
-
|
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(
|
48
|
+
async update(e) {
|
50
49
|
try {
|
51
|
-
const t = await n.post(
|
52
|
-
return
|
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(
|
56
|
+
async delete(e) {
|
58
57
|
try {
|
59
|
-
await n.delete(`/api/orders/${
|
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(
|
63
|
+
async changePaymentStatus(e, t) {
|
65
64
|
try {
|
66
|
-
const
|
67
|
-
|
68
|
-
} catch (
|
69
|
-
s(
|
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
|
-
|
78
|
-
|
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
|
82
|
-
r[t] =
|
80
|
+
function i(e, t) {
|
81
|
+
r[t] = e;
|
83
82
|
}
|
84
|
-
p(r, (
|
83
|
+
p(r, (e, t) => {
|
85
84
|
});
|
86
85
|
export {
|
87
|
-
|
88
|
-
|
89
|
-
|
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(
|
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
|
4
|
+
const t = s({
|
5
5
|
organization: null,
|
6
6
|
positions: [],
|
7
7
|
currentState: !1
|
8
8
|
}), g = {
|
9
9
|
toggleShopcart() {
|
10
|
-
|
10
|
+
t.currentState = !t.currentState;
|
11
11
|
},
|
12
12
|
setShopcart() {
|
13
13
|
try {
|
14
|
-
const
|
15
|
-
if (
|
16
|
-
const i = JSON.parse(
|
17
|
-
|
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 (
|
20
|
-
throw console.error(
|
19
|
+
} catch (o) {
|
20
|
+
throw console.error(o), o;
|
21
21
|
}
|
22
22
|
},
|
23
|
-
addProductToCart(
|
24
|
-
const e =
|
25
|
-
(n) => n._id ===
|
23
|
+
addProductToCart(o, i) {
|
24
|
+
const e = t.positions.find(
|
25
|
+
(n) => n._id === o._id
|
26
26
|
);
|
27
|
-
e ? e.quantity++ :
|
28
|
-
_id:
|
29
|
-
images:
|
30
|
-
name:
|
31
|
-
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:
|
36
|
+
positions: t.positions,
|
37
37
|
organization: i
|
38
38
|
// Сохраняем _id организации в корне объекта корзины
|
39
39
|
}));
|
40
40
|
},
|
41
|
-
removeProduct(
|
42
|
-
const i =
|
43
|
-
(n) => n._id ===
|
44
|
-
), e =
|
45
|
-
e > -1 && (
|
46
|
-
positions:
|
47
|
-
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(
|
51
|
-
const i =
|
52
|
-
(n) => n._id ===
|
53
|
-
), e =
|
54
|
-
e > -1 && (i.quantity--, i.quantity < 1 &&
|
55
|
-
positions:
|
56
|
-
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(
|
60
|
-
const i =
|
61
|
-
(e) => e._id ===
|
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:
|
65
|
-
organization:
|
64
|
+
positions: t.positions,
|
65
|
+
organization: t.organization
|
66
66
|
})));
|
67
67
|
},
|
68
|
-
resetShopcart(
|
68
|
+
resetShopcart() {
|
69
69
|
t.positions = [], localStorage.removeItem("shopcart");
|
70
70
|
}
|
71
71
|
}, u = {
|
72
|
-
cartTotalPrice: r(() => Number(
|
73
|
-
cartTotalAmount: r(() => Number(
|
74
|
-
getStoreCartState: r(() => Number(
|
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(
|
76
|
+
a(t, (o, i) => {
|
77
77
|
});
|
78
78
|
export {
|
79
79
|
g as actions,
|
80
80
|
u as getters,
|
81
|
-
|
81
|
+
t as state
|
82
82
|
};
|
package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs
CHANGED
@@ -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.
|
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;
|
package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js
CHANGED
@@ -1,60 +1,62 @@
|
|
1
|
-
import { resolveComponent as
|
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.
|
3
|
+
import "../../../../components/Spoiler/Spoiler.vue2.js";
|
4
4
|
import "./DepartmentSub.vue2.js";
|
5
|
-
import
|
6
|
-
import
|
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
|
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(
|
15
|
-
const s =
|
14
|
+
setup(t) {
|
15
|
+
const s = t;
|
16
16
|
return (i, a) => {
|
17
|
-
const
|
18
|
-
return r(),
|
19
|
-
|
20
|
-
|
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:
|
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:
|
31
|
-
|
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
|
-
|
39
|
-
onClick: a[0] || (a[0] = (
|
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:
|
42
|
-
}, null, 8,
|
43
|
-
|
44
|
-
|
45
|
-
(r(!0),
|
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:
|
49
|
-
|
50
|
-
|
51
|
-
|
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__ */
|
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
|
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
|
4
|
-
import
|
5
|
-
import "../../../../components/Select/Select.
|
6
|
-
import
|
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
|
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
|
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",
|
30
|
+
p("div", D, [
|
31
31
|
p("div", I, [
|
32
|
-
b(
|
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) =>
|
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__ */
|
84
|
+
}, H = /* @__PURE__ */ M(A, [["__scopeId", "data-v-0d6c0d38"]]);
|
85
85
|
export {
|
86
86
|
H as default
|
87
87
|
};
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
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;
|