@ozdao/prometheus-framework 0.2.59 → 0.2.60
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/community.server.js +1 -1
- package/dist/community.server.mjs +1 -1
- package/dist/events.server.js +23 -3
- package/dist/events.server.mjs +23 -3
- package/dist/metadata.schema-CjpDDEnW.mjs +210 -0
- package/dist/metadata.schema-doiYQfuO.js +209 -0
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +1 -373
- package/dist/prometheus-framework/src/components/Loader/Loader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Loader/Loader.vue.js +51 -1
- package/dist/prometheus-framework/src/components/Loader/Loader.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Loader/Loader.vue2.js +1 -51
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +1 -1
- 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/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +44 -44
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.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 +31 -31
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +166 -123
- 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 +56 -45
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +19 -24
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +2 -2
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.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 +15 -15
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.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 +8 -8
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.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/components/sections/PopularProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
@@ -1,138 +1,181 @@
|
|
1
|
-
import { ref as
|
2
|
-
import { useRoute as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import "../../../../components/
|
1
|
+
import { computed as E, ref as b, onMounted as B, openBlock as i, createElementBlock as l, createVNode as r, withCtx as s, createElementVNode as o, createTextVNode as R, unref as h, Fragment as g, renderList as y, createBlock as w, createCommentVNode as V, toDisplayString as P } from "vue";
|
2
|
+
import { useRoute as D, useRouter as F } from "vue-router";
|
3
|
+
import I from "../../../../components/Feed/Feed.vue.js";
|
4
|
+
import k from "../../../../components/Field/Field.vue.js";
|
5
|
+
import T from "../../../../components/Button/Button.vue.js";
|
6
|
+
import q from "../../../../components/Popup/Popup.vue.js";
|
7
|
+
import c from "../../../../components/Block/Block.vue.js";
|
8
|
+
import x from "../blocks/CardOrderItem.vue.js";
|
8
9
|
import "../../../../components/Select/Select.vue2.js";
|
9
10
|
import "../../../../components/SelectMulti/SelectMulti.vue2.js";
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import {
|
11
|
+
import "../../../../components/FieldPhone/all-countries.js";
|
12
|
+
import "../../../../components/FieldPhone/FieldPhone2.vue.js";
|
13
|
+
import { state as z } from "../../../auth/store/auth.js";
|
14
|
+
import { actions as m } from "../../../globals/store/globals.js";
|
15
|
+
import { state as e, actions as A } from "../../store/orders.js";
|
16
|
+
import { actions as S } from "../../../products/store/products.js";
|
13
17
|
import "./EditOrder.vue2.js";
|
14
|
-
const
|
15
|
-
/* @__PURE__ */ r("h2", { class: "mn-r-medium" }, "Create Order")
|
16
|
-
], -1), G = /* @__PURE__ */ r("h3", { class: "mn-b-small" }, "Add to order", -1), H = { class: "bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big" }, J = {
|
18
|
+
const U = { class: "flex-v-center flex-nowrap flex" }, L = /* @__PURE__ */ o("h2", { class: "mn-r-auto" }, "Create Order", -1), M = /* @__PURE__ */ o("h3", { class: "mn-b-small" }, "Add to order", -1), j = { class: "bg-grey mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big" }, G = {
|
17
19
|
key: 0,
|
18
20
|
class: "w-100"
|
19
|
-
},
|
20
|
-
key: 0,
|
21
|
-
class: "p-big t-semi"
|
22
|
-
}, W = {
|
23
|
-
key: 1,
|
24
|
-
class: "p-big t-semi"
|
25
|
-
}, X = {
|
26
|
-
key: 2,
|
27
|
-
class: "p-big t-semi"
|
28
|
-
}, Y = { key: 3 }, Z = { key: 4 }, ee = { key: 5 }, te = /* @__PURE__ */ r("button", { class: "mn-l-auto button" }, "Запросить онлайн", -1), ye = {
|
21
|
+
}, H = { class: "h3 flex" }, J = /* @__PURE__ */ o("span", { class: "mn-r-auto t-transp" }, "In total", -1), pe = {
|
29
22
|
__name: "EditOrder",
|
30
|
-
setup(
|
31
|
-
const
|
32
|
-
|
33
|
-
|
23
|
+
setup(K) {
|
24
|
+
const u = D(), C = F();
|
25
|
+
let v = E(() => Number(e.current.positions.reduce((p, n) => p + n.price * n.quantity, 0)));
|
26
|
+
const d = b(!1);
|
27
|
+
function $() {
|
28
|
+
d.value = !0;
|
29
|
+
}
|
30
|
+
function f() {
|
31
|
+
d.value = !1;
|
32
|
+
}
|
33
|
+
b(null);
|
34
|
+
function N() {
|
35
|
+
e.current.creator = {
|
36
|
+
type: "user",
|
37
|
+
target: z.user._id
|
38
|
+
}, e.current.owner = {
|
39
|
+
type: "organization",
|
40
|
+
target: u.params._id
|
41
|
+
}, A.create(e.current);
|
34
42
|
}
|
35
|
-
function
|
36
|
-
|
43
|
+
function O() {
|
44
|
+
C.push({
|
45
|
+
name: "Backoffice Orders",
|
46
|
+
params: {
|
47
|
+
_id: u.params._id
|
48
|
+
}
|
49
|
+
});
|
37
50
|
}
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
key: c._id,
|
75
|
-
editable: !1,
|
76
|
-
product: c,
|
77
|
-
onClick: () => {
|
78
|
-
let $ = { ...c };
|
79
|
-
$.quantity = 1, u.add(a.current.positions, $), h();
|
80
|
-
},
|
81
|
-
class: "bg-white pd-thin radius-medium w-100 mn-b-thin"
|
82
|
-
}, null, 8, ["product", "onClick"]))), 128))
|
83
|
-
]),
|
84
|
-
_: 1
|
85
|
-
}, 8, ["states", "store", "options"])
|
86
|
-
])
|
87
|
-
]),
|
88
|
-
_: 1
|
89
|
-
}, 8, ["isPopupOpen"]),
|
90
|
-
p(L, {
|
91
|
-
title: "Invetory Sheet",
|
92
|
-
actions: [{
|
93
|
-
label: "+",
|
94
|
-
function: () => F()
|
95
|
-
}],
|
96
|
-
class: "mn-b-semi"
|
97
|
-
}, {
|
98
|
-
default: _(() => [
|
99
|
-
a.current.positions.length === 0 ? (e(), t("span", J, " No positions added yet ")) : n("", !0),
|
100
|
-
(e(!0), t(B, null, D(a.current.positions, (o, c) => (e(), E(I, {
|
101
|
-
key: o._id,
|
102
|
-
editable: !0,
|
103
|
-
product: o,
|
104
|
-
onIncrease: () => {
|
105
|
-
u.increment(a.current.positions, o);
|
51
|
+
return B(async () => {
|
52
|
+
}), (p, n) => (i(), l("div", null, [
|
53
|
+
r(c, { class: "mn-b-thin" }, {
|
54
|
+
default: s(() => [
|
55
|
+
o("header", U, [
|
56
|
+
L,
|
57
|
+
r(T, {
|
58
|
+
submit: N,
|
59
|
+
callback: O,
|
60
|
+
class: "pd-small radius-big bg-main t-black uppercase t-medium"
|
61
|
+
}, {
|
62
|
+
default: s(() => [
|
63
|
+
R(" Add Order ")
|
64
|
+
]),
|
65
|
+
_: 1
|
66
|
+
})
|
67
|
+
])
|
68
|
+
]),
|
69
|
+
_: 1
|
70
|
+
}),
|
71
|
+
r(q, {
|
72
|
+
title: "Добавить участника",
|
73
|
+
onClosePopup: f,
|
74
|
+
isPopupOpen: d.value,
|
75
|
+
class: "bg-white w-min-30r w-max-30r radius-big pd-medium"
|
76
|
+
}, {
|
77
|
+
default: s(() => [
|
78
|
+
M,
|
79
|
+
o("div", j, [
|
80
|
+
r(I, {
|
81
|
+
search: !0,
|
82
|
+
states: {
|
83
|
+
empty: {
|
84
|
+
title: "No Products Found",
|
85
|
+
description: "Currently, there are no such products available."
|
86
|
+
}
|
106
87
|
},
|
107
|
-
|
108
|
-
|
88
|
+
store: {
|
89
|
+
read: (t) => S.read(t),
|
90
|
+
state: null
|
109
91
|
},
|
110
|
-
|
111
|
-
u.
|
92
|
+
options: {
|
93
|
+
organization: h(u).params._id
|
112
94
|
},
|
113
|
-
class: "
|
114
|
-
},
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
95
|
+
class: ""
|
96
|
+
}, {
|
97
|
+
default: s(({
|
98
|
+
items: t
|
99
|
+
}) => [
|
100
|
+
(i(!0), l(g, null, y(t, (a, Q) => (i(), w(x, {
|
101
|
+
key: a._id,
|
102
|
+
editable: !1,
|
103
|
+
product: a,
|
104
|
+
onClick: () => {
|
105
|
+
let _ = { ...a };
|
106
|
+
_.quantity = 1, m.add(e.current.positions, _), f();
|
107
|
+
},
|
108
|
+
class: "bg-white pd-thin radius-medium w-100 mn-b-thin"
|
109
|
+
}, null, 8, ["product", "onClick"]))), 128))
|
110
|
+
]),
|
111
|
+
_: 1
|
112
|
+
}, 8, ["states", "store", "options"])
|
113
|
+
])
|
114
|
+
]),
|
115
|
+
_: 1
|
116
|
+
}, 8, ["isPopupOpen"]),
|
117
|
+
r(c, {
|
118
|
+
title: "Positions",
|
119
|
+
actions: [{
|
120
|
+
label: "+",
|
121
|
+
function: () => $()
|
122
|
+
}],
|
123
|
+
class: "mn-b-semi"
|
124
|
+
}, {
|
125
|
+
default: s(() => [
|
126
|
+
e.current.positions.length === 0 ? (i(), l("span", G, " No positions added yet ")) : V("", !0),
|
127
|
+
(i(!0), l(g, null, y(e.current.positions, (t, a) => (i(), w(x, {
|
128
|
+
key: t._id,
|
129
|
+
editable: !0,
|
130
|
+
product: t,
|
131
|
+
onIncrease: () => {
|
132
|
+
m.increment(e.current.positions, t);
|
133
|
+
},
|
134
|
+
onDecrease: () => {
|
135
|
+
m.decrement(e.current.positions, t);
|
136
|
+
},
|
137
|
+
onRemove: () => {
|
138
|
+
m.delete(e.current.positions, t);
|
139
|
+
},
|
140
|
+
class: "mn-b-thin pd-thin radius-medium bg-white"
|
141
|
+
}, null, 8, ["product", "onIncrease", "onDecrease", "onRemove"]))), 128))
|
142
|
+
]),
|
143
|
+
_: 1
|
144
|
+
}, 8, ["actions"]),
|
145
|
+
r(c, {
|
146
|
+
title: "Client",
|
147
|
+
class: "mn-b-semi"
|
148
|
+
}, {
|
149
|
+
default: s(() => [
|
150
|
+
r(k, {
|
151
|
+
field: e.current.client.name,
|
152
|
+
"onUpdate:field": n[0] || (n[0] = (t) => e.current.client.name = t),
|
153
|
+
label: "Client",
|
154
|
+
placeholder: "Enter client name",
|
155
|
+
class: "bg-white pd-medium radius-small mn-b-thin"
|
156
|
+
}, null, 8, ["field"]),
|
157
|
+
r(k, {
|
158
|
+
field: e.current.comment,
|
159
|
+
"onUpdate:field": n[1] || (n[1] = (t) => e.current.comment = t),
|
160
|
+
label: "Comment",
|
161
|
+
placeholder: "Enter comment",
|
162
|
+
class: "bg-white pd-medium radius-small mn-b-thin"
|
163
|
+
}, null, 8, ["field"])
|
164
|
+
]),
|
165
|
+
_: 1
|
166
|
+
}),
|
167
|
+
r(c, { class: "mn-b-semi" }, {
|
168
|
+
default: s(() => [
|
169
|
+
o("div", H, [
|
170
|
+
J,
|
171
|
+
o("span", null, P(h(v)) + " " + P(p.returnCurrency()), 1)
|
172
|
+
])
|
173
|
+
]),
|
174
|
+
_: 1
|
175
|
+
})
|
176
|
+
]));
|
134
177
|
}
|
135
178
|
};
|
136
179
|
export {
|
137
|
-
|
180
|
+
pe as default
|
138
181
|
};
|
@@ -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"),l=require("vue-router"),i=require("../../../../components/Tab/Tab.vue2.cjs"),o=require("../../store/orders.cjs"),c=require("../../../auth/store/auth.cjs");require("../blocks/CardOrder.vue.cjs");const u=require("../../../globals/components/blocks/CardHeader.vue.cjs"),m={class:"mn-b-medium flex-v-center flex-nowrap flex"},p=e.createElementVNode("h2",{class:"mn-r-medium"},"Orders",-1),b={class:"cols-3 gap-thin"},h={class:"pd-small"},_={class:"w-100 mn-b-thin p-big"},g={class:"mn-b-thin pd-r-thin pd-l-thin pd-b-nano pd-t-nano bg-second radius-extra t-white t-medium d-block w-max uppercase"},f=e.createElementVNode("p",{class:"mn-b-small t-transp w-100"},null,-1),v={__name:"Orders",setup(y){const r=l.useRoute();l.useRouter();const a=e.ref(r.query.tab?r.query.tab:"posts");return e.onMounted(async()=>{await o.actions.read()}),(n,s)=>{const d=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("header",m,[p,e.createElementVNode("button",{onClick:s[0]||(s[0]=t=>n.$router.push({name:"AdminOrderAdd"})),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createVNode(i.default,{selected:a.value,"onUpdate:selected":s[1]||(s[1]=t=>a.value=t),tabs:[{name:"All",value:"all"},{name:"New",value:"new"},{name:"Confirmed",value:"confirmed"},{name:"Finished",value:"finished"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("section",b,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.state.all,t=>(e.openBlock(),e.createBlock(d,{to:{name:"Order Edit",params:{order:t._id}},class:"bg-grey radius-big"},{default:e.withCtx(()=>[e.createVNode(u.default,{class:e.normalizeClass({"mn-b-small pd-medium":n.type!=="short","flex-child-order-last flex-child mn-l-small":n.type==="short"}),entity:t,entityType:"order",user:c.state.user,owner:t.creator,creator:t.creator,date:t.createdAt},null,8,["class","entity","user","owner","creator","date"]),e.createElementVNode("div",h,[e.createElementVNode("p",_," Order No.: #"+e.toDisplayString(t._id),1),e.createElementVNode("span",g,e.toDisplayString(t.status),1),f,e.createElementVNode("p",{class:e.normalizeClass([{new:t.status==="Создан"},"mn-b-small"])},null,2)])]),_:2},1032,["to"]))),256))])],64)}}};exports.default=v;
|
@@ -1,31 +1,33 @@
|
|
1
|
-
import { ref as p, onMounted as _, resolveComponent as
|
2
|
-
import { useRoute as
|
3
|
-
import
|
4
|
-
import { actions as
|
1
|
+
import { ref as p, onMounted as _, resolveComponent as h, openBlock as a, createElementBlock as l, Fragment as i, createElementVNode as t, createVNode as m, renderList as b, createBlock as f, withCtx as g, normalizeClass as d, toDisplayString as c } from "vue";
|
2
|
+
import { useRoute as w, useRouter as y } from "vue-router";
|
3
|
+
import v from "../../../../components/Tab/Tab.vue2.js";
|
4
|
+
import { actions as k, state as x } from "../../store/orders.js";
|
5
|
+
import { state as C } from "../../../auth/store/auth.js";
|
5
6
|
import "../blocks/CardOrder.vue.js";
|
6
|
-
|
7
|
+
import O from "../../../globals/components/blocks/CardHeader.vue.js";
|
8
|
+
const $ = { class: "mn-b-medium flex-v-center flex-nowrap flex" }, A = /* @__PURE__ */ t("h2", { class: "mn-r-medium" }, "Orders", -1), N = { class: "cols-3 gap-thin" }, B = { class: "pd-small" }, E = { class: "w-100 mn-b-thin p-big" }, q = { class: "mn-b-thin pd-r-thin pd-l-thin pd-b-nano pd-t-nano bg-second radius-extra t-white t-medium d-block w-max uppercase" }, F = /* @__PURE__ */ t("p", { class: "mn-b-small t-transp w-100" }, null, -1), U = {
|
7
9
|
__name: "Orders",
|
8
|
-
setup(
|
9
|
-
const
|
10
|
-
|
11
|
-
const
|
10
|
+
setup(R) {
|
11
|
+
const r = w();
|
12
|
+
y();
|
13
|
+
const o = p(r.query.tab ? r.query.tab : "posts");
|
12
14
|
return _(async () => {
|
13
|
-
await
|
14
|
-
}), (
|
15
|
-
const
|
16
|
-
return
|
17
|
-
t("header",
|
18
|
-
|
15
|
+
await k.read();
|
16
|
+
}), (n, s) => {
|
17
|
+
const u = h("router-link");
|
18
|
+
return a(), l(i, null, [
|
19
|
+
t("header", $, [
|
20
|
+
A,
|
19
21
|
t("button", {
|
20
|
-
onClick: s[0] || (s[0] = (e) =>
|
22
|
+
onClick: s[0] || (s[0] = (e) => n.$router.push({
|
21
23
|
name: "AdminOrderAdd"
|
22
24
|
})),
|
23
25
|
class: "radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"
|
24
26
|
}, " + ")
|
25
27
|
]),
|
26
|
-
|
27
|
-
selected:
|
28
|
-
"onUpdate:selected": s[1] || (s[1] = (e) =>
|
28
|
+
m(v, {
|
29
|
+
selected: o.value,
|
30
|
+
"onUpdate:selected": s[1] || (s[1] = (e) => o.value = e),
|
29
31
|
tabs: [
|
30
32
|
{ name: "All", value: "all" },
|
31
33
|
{ name: "New", value: "new" },
|
@@ -34,36 +36,45 @@ const k = { class: "mn-b-medium flex-v-center flex-nowrap flex" }, x = /* @__PUR
|
|
34
36
|
],
|
35
37
|
class: "mn-b-small o-hidden h5 radius-big bg-grey"
|
36
38
|
}, null, 8, ["selected"]),
|
37
|
-
t("section",
|
38
|
-
(
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
},
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
},
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
},
|
60
|
-
|
61
|
-
|
39
|
+
t("section", N, [
|
40
|
+
(a(!0), l(i, null, b(x.all, (e) => (a(), f(u, {
|
41
|
+
to: {
|
42
|
+
name: "Order Edit",
|
43
|
+
params: {
|
44
|
+
order: e._id
|
45
|
+
}
|
46
|
+
},
|
47
|
+
class: "bg-grey radius-big"
|
48
|
+
}, {
|
49
|
+
default: g(() => [
|
50
|
+
m(O, {
|
51
|
+
class: d({
|
52
|
+
"mn-b-small pd-medium": n.type !== "short",
|
53
|
+
"flex-child-order-last flex-child mn-l-small": n.type === "short"
|
54
|
+
}),
|
55
|
+
entity: e,
|
56
|
+
entityType: "order",
|
57
|
+
user: C.user,
|
58
|
+
owner: e.creator,
|
59
|
+
creator: e.creator,
|
60
|
+
date: e.createdAt
|
61
|
+
}, null, 8, ["class", "entity", "user", "owner", "creator", "date"]),
|
62
|
+
t("div", B, [
|
63
|
+
t("p", E, " Order No.: #" + c(e._id), 1),
|
64
|
+
t("span", q, c(e.status), 1),
|
65
|
+
F,
|
66
|
+
t("p", {
|
67
|
+
class: d([{ new: e.status === "Создан" }, "mn-b-small"])
|
68
|
+
}, null, 2)
|
69
|
+
])
|
70
|
+
]),
|
71
|
+
_: 2
|
72
|
+
}, 1032, ["to"]))), 256))
|
62
73
|
])
|
63
74
|
], 64);
|
64
75
|
};
|
65
76
|
}
|
66
77
|
};
|
67
78
|
export {
|
68
|
-
|
79
|
+
U as default
|
69
80
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),d=require("../../../../node_modules/axios/lib/axios.cjs"),
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue"),d=require("../../../../node_modules/axios/lib/axios.cjs"),s=require("../../globals/store/globals.cjs"),n=d.default.create({baseURL:process.env.API_URL,withCredentials:!0}),a=c.reactive({all:[],current:{_id:null,positions:[],status:null,comment:"",owner:{type:"organization",target:null},creator:{type:"client",target:null},client:{name:null,phone:null,messenger:{type:null,value:null}},payment:{type:"",status:""},delivery:{type:null,address:"",status:""}}}),u={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?i(t.data[0],"current"):i(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(l=>l._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}),l=a.all.findIndex(o=>o._id===e);l!==-1&&(a.all[l]=r.data)}catch(r){s.setError(r)}}};function i(e,t){a[t]=e}c.watch(a,(e,t)=>{});exports.actions=u;exports.state=a;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { reactive as
|
1
|
+
import { reactive as o, watch as d } from "vue";
|
2
2
|
import p from "../../../../node_modules/axios/lib/axios.js";
|
3
|
-
import { setError as
|
4
|
-
const
|
3
|
+
import { setError as n } from "../../globals/store/globals.js";
|
4
|
+
const s = p.create({ baseURL: process.env.API_URL, withCredentials: !0 }), e = o({
|
5
5
|
all: [],
|
6
6
|
current: {
|
7
7
|
_id: null,
|
@@ -35,53 +35,48 @@ const l = p.create({ baseURL: process.env.API_URL, withCredentials: !0 }), e = c
|
|
35
35
|
}
|
36
36
|
}
|
37
37
|
}), f = {
|
38
|
-
async create(a
|
38
|
+
async create(a) {
|
39
39
|
try {
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
};
|
45
|
-
const i = await l.post("/api/orders/create", n);
|
46
|
-
return e.all.push(i.data), i.data;
|
47
|
-
} catch (n) {
|
48
|
-
s(n);
|
40
|
+
const t = await s.post("/api/orders/create", a);
|
41
|
+
return e.all.push(t.data), t.data;
|
42
|
+
} catch (t) {
|
43
|
+
n(t);
|
49
44
|
}
|
50
45
|
},
|
51
46
|
async read(a = {}) {
|
52
47
|
try {
|
53
48
|
a._id && (a.params = { _id: a._id });
|
54
|
-
const t = await
|
55
|
-
return a._id ?
|
49
|
+
const t = await s.get("/api/orders/read", { params: a.params });
|
50
|
+
return a._id ? i(t.data[0], "current") : i(t.data, "all"), t.data;
|
56
51
|
} catch (t) {
|
57
|
-
throw
|
52
|
+
throw n(t), t;
|
58
53
|
}
|
59
54
|
},
|
60
55
|
async update(a) {
|
61
56
|
try {
|
62
|
-
const t = await
|
57
|
+
const t = await s.post(`/api/orders/${a._id}`, a), r = e.all.findIndex((l) => l._id === a._id);
|
63
58
|
return r !== -1 && (e.all[r] = t.data), t.data;
|
64
59
|
} catch (t) {
|
65
|
-
|
60
|
+
n(t);
|
66
61
|
}
|
67
62
|
},
|
68
63
|
async delete(a) {
|
69
64
|
try {
|
70
|
-
await
|
65
|
+
await s.delete(`/api/orders/${a}`), e.all = e.all.filter((t) => t._id !== a);
|
71
66
|
} catch (t) {
|
72
|
-
|
67
|
+
n(t);
|
73
68
|
}
|
74
69
|
},
|
75
70
|
async changePaymentStatus(a, t) {
|
76
71
|
try {
|
77
|
-
const r = await
|
78
|
-
|
72
|
+
const r = await s.post(`/api/orders/payment/${a}`, { status: t }), l = e.all.findIndex((c) => c._id === a);
|
73
|
+
l !== -1 && (e.all[l] = r.data);
|
79
74
|
} catch (r) {
|
80
|
-
|
75
|
+
n(r);
|
81
76
|
}
|
82
77
|
}
|
83
78
|
};
|
84
|
-
function
|
79
|
+
function i(a, t) {
|
85
80
|
e[t] = a;
|
86
81
|
}
|
87
82
|
d(e, (a, t) => {
|
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"),c=require("./User.vue.cjs");require("./CardDepartment.vue2.cjs");const d={class:"radius-big o-hidden cols-2-1_3"},p={class:"pd-medium w-100"},m=["innerHTML"],g={key:0},k={__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",d,[e.createElementVNode("div",p,[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,m),e.createElementVNode("ul",null,[t.department.members.length<1?(e.openBlock(),e.createElementBlock("li",g,"В отделе еще нет участников")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.department.members,(r,i)=>(e.openBlock(),e.createBlock(c.default,{class:"br-b br-solid br-grey",key:i,user:r.user,position:r.position,onClick:b=>o.$router.push(`/app/profile/${r.user._id}`)},null,8,["user","position","onClick"]))),128))])])])}}},_=u.default(k,[["__scopeId","data-v-745afcf2"]]);exports.default=_;
|
package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { resolveComponent as p, openBlock as r, createElementBlock as o, createElementVNode as n, createVNode as l, withCtx as c, createCommentVNode as u, Fragment as _, renderList as f, createBlock as g } from "vue";
|
2
2
|
import h 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
5
|
import b from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
6
6
|
import k from "./User.vue.js";
|
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"),c=require("vue-router");require("../../../../components/Spoiler/Spoiler.
|
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.vue2.cjs");const u=require("../blocks/DepartmentSub.vue.cjs"),p=require("../blocks/User.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),v={key:0},C={__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",v,"В отделе еще нет подотделов")):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=C;
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { withAsyncContext as y, resolveComponent as p, openBlock as t, createElementBlock as n, createElementVNode as e, toDisplayString as w, createVNode as c, unref as u, withCtx as C, createCommentVNode as a, Fragment as _, renderList as h, createBlock as b } from "vue";
|
2
2
|
import { useRouter as v, useRoute as $ } from "vue-router";
|
3
|
-
import "../../../../components/Spoiler/Spoiler.
|
3
|
+
import "../../../../components/Spoiler/Spoiler.vue2.js";
|
4
4
|
import x from "../blocks/DepartmentSub.vue.js";
|
5
5
|
import E from "../blocks/User.vue.js";
|
6
6
|
import { actions as D, state as s } from "../../store/departments.js";
|