@ozdao/prometheus-framework 0.2.59 → 0.2.61
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +12 -223
- package/dist/auth.server.mjs +12 -223
- package/dist/community.server.js +3 -2
- package/dist/community.server.mjs +2 -1
- package/dist/events.server.js +117 -25
- package/dist/events.server.mjs +116 -24
- package/dist/files.server.js +7 -7
- package/dist/files.server.mjs +7 -7
- package/dist/gallery.server.js +2 -2
- package/dist/gallery.server.mjs +2 -2
- package/dist/main-DsseFd2d.mjs +13753 -0
- package/dist/main-U466Gwzt.js +91 -0
- package/dist/main.css +1 -1
- package/dist/metadata.schema-CS6_9GLU.js +174 -0
- package/dist/metadata.schema-CjpDDEnW.mjs +210 -0
- package/dist/metadata.schema-D88c1Ebp.mjs +175 -0
- package/dist/metadata.schema-doiYQfuO.js +209 -0
- package/dist/organizations.server.js +212 -16
- package/dist/organizations.server.mjs +212 -16
- package/dist/ownership.schema-DN0SlQL6.js +36 -0
- package/dist/ownership.schema-oyx6eNkZ.mjs +37 -0
- package/dist/products.server.js +8 -5
- package/dist/products.server.mjs +8 -5
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +19 -14
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +26 -26
- 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/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -72
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +72 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -97
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +97 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +46 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +1 -46
- package/dist/prometheus-framework/src/modules/auth/auth.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/auth.client.js +12 -14
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.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/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/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- 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/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.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 +199 -185
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +168 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue2.js +1 -0
- 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 +43 -43
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/events/router/events.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.js +11 -2
- 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 +59 -56
- 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 +167 -124
- 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/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.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 +3 -3
- 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 +3 -3
- 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 +25 -25
- 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 +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.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 +2 -2
- 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 +3 -3
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +40 -38
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js +19 -19
- package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.js +5 -5
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.js +36 -27
- 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 +16 -16
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- 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 +11 -11
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +21 -21
- 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 +2 -2
- 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 +36 -50
- 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/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- 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/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +2 -2
- 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-D7bW32Ul.mjs +54 -0
- package/dist/web-DpE9HxA3.js +1 -0
- package/package.json +1 -1
- package/src/components/Chips/Chips.vue +2 -2
- package/src/components/Feed/Feed.vue +2 -1
- package/src/modules/auth/auth.client.js +0 -2
- package/src/modules/auth/auth.server.js +1 -7
- package/src/modules/auth/components/pages/Invite.vue +1 -1
- package/src/modules/events/components/pages/EditEvent.vue +19 -0
- package/src/modules/events/components/pages/EditEventTickets.vue +194 -0
- package/src/modules/events/controllers/tickets.controller.js +103 -28
- package/src/modules/events/models/ticket.model.js +22 -4
- package/src/modules/events/router/events.js +5 -0
- package/src/modules/events/routes/tickets.routes.js +2 -2
- package/src/modules/events/store/tickets.js +1 -0
- package/src/modules/globals/components/blocks/CardHeader.vue +6 -6
- package/src/modules/organizations/components/pages/Members.vue +1 -1
- package/src/modules/organizations/components/pages/Organization.vue +4 -4
- package/src/modules/organizations/components/sections/MembersAdd.vue +1 -1
- package/src/modules/organizations/controllers/departments.controller.js +14 -1
- package/src/modules/organizations/models/department.model.js +5 -1
- package/src/modules/organizations/organizations.client.js +2 -0
- package/src/modules/organizations/organizations.server.js +6 -2
- package/src/modules/organizations/routes/departments.routes.js +1 -1
- package/src/modules/organizations/store/departments.js +3 -2
- package/src/modules/products/components/blocks/CardLeftover.vue +19 -7
- package/src/modules/products/components/pages/EditLeftover.vue +1 -1
- package/src/modules/products/components/pages/Leftovers.vue +14 -3
- package/src/modules/products/components/pages/Products.vue +8 -8
- package/src/modules/products/models/leftover.model.js +9 -5
- package/src/modules/users/models/client.model.js +60 -0
- /package/src/modules/{auth → organizations}/controllers/invites.controller.js +0 -0
- /package/src/modules/{auth → organizations}/models/invite.model.js +0 -0
- /package/src/modules/{auth → organizations}/routes/invites.routes.js +0 -0
- /package/src/modules/{auth → organizations}/store/invites.js +0 -0
@@ -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.vue.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) => {
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),f=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),f=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue.cjs");const v=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),h=require("../../../../components/Feed/Feed.vue.cjs"),k=require("./User.vue.cjs"),g=require("../../store/memberships.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("./DepartmentMemberModify.vue2.cjs");const y=o=>(e.pushScopeId("data-v-7a0830c1"),o=o(),e.popScopeId(),o),_={class:"br-grey radius-small mn-small"},V=y(()=>e.createElementVNode("h3",{class:"mn-b-semi"},"Add to deparment",-1)),B={class:"bg-grey mn-b-thin h-min-10r h-max-10r o-scroll pd-medium radius-big"},N=["disabled"],q={__name:"DepartmentMemberModify",props:{isPopupOpen:Boolean,member:Number,members:Array,users:Array},emits:["callback","remove"],setup(o,{emit:m}){const l=o,i=m,s=e.ref(null),n=e.ref(null);l.member!==null&&(s.value=l.members[l.member]),e.ref(null);async function d(){l.member!==null?(l.members[l.member]=s,l.members[l.member].role=n.value,i("callback")):(l.members.push({...s.value,role:n.value}),i("callback"))}async function c(){l.members.splice(l.member,1),i("callback")}return(u,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",_,[V,e.createElementVNode("div",B,[e.createVNode(h.default,{states:{empty:{title:"No Members Found",description:"Currently, there are no members available."}},store:{read:r=>g.actions.read(r),state:null},options:{target:u.$route.params._id}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(t,p)=>(e.openBlock(),e.createBlock(k.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]=S=>u.$router.push(`/app/profile/${u.user._id}`)),class:"mn-b-thin"},null,8,["photo","name","user","position"]))),128))]),_:1},8,["states","store","options"])]),l.member===null?(e.openBlock(),e.createBlock(b.default,{key:0,modelValue:s.value,"onUpdate:modelValue":a[1]||(a[1]=r=>s.value=r),options:o.users,multiple:!1,taggable:!1,placeholder:"Type to search or add type of organization",class:"mn-b-semi bg-grey pd-medium radius-small"},null,8,["modelValue","options"])):e.createCommentVNode("",!0),e.createVNode(f.default,{field:n.value,"onUpdate:field":a[2]||(a[2]=r=>n.value=r),label:"Должность",placeholder:"Название должности",class:"bg-white",validation:u.organizationName},null,8,["field","validation"])]),e.createElementVNode("button",{disabled:!s.value||!n.value,onClick:d,class:"w-100 button bg-blue t-white"},e.toDisplayString(l.member!==null?"Редактировать участника":"Добавить участника"),9,N),l.member!==null?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:c,class:"w-100 button bg-red t-white"}," Удалить участника ")):e.createCommentVNode("",!0)]))}},M=v.default(q,[["__scopeId","data-v-7a0830c1"]]);exports.default=M;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ref as p, openBlock as m, createElementBlock as d, createElementVNode as i, createVNode as b, withCtx as k, Fragment as _, renderList as w, createBlock as c, createCommentVNode as f, toDisplayString as C, pushScopeId as I, popScopeId as M } from "vue";
|
2
2
|
import N from "../../../../components/SelectMulti/SelectMulti.vue.js";
|
3
3
|
import S from "../../../../components/Field/Field.vue.js";
|
4
|
-
import "../../../../components/Select/Select.
|
4
|
+
import "../../../../components/Select/Select.vue.js";
|
5
5
|
import V from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
6
6
|
import $ from "../../../../components/Feed/Feed.vue.js";
|
7
7
|
import B from "./User.vue.js";
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const C=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("vue-router");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const C=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.vue2.cjs");const v=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue.cjs");const n=require("../../../../components/Checkbox/Checkbox.vue.cjs");require("../../../../components/Address/Address.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/LocationMarker/LocationMarker.vue.cjs");const N=require("../../../../components/Button/Button.vue.cjs"),g=require("../../../../components/Popup/Popup.vue2.cjs"),V=require("../../../../components/Block/Block.vue.cjs");require("../blocks/EditArray.vue2.cjs");const P=require("../blocks/DepartmentSub.vue.cjs"),k=require("../blocks/DepartmentMemberModify.vue.cjs"),x=require("../blocks/User.vue.cjs"),t=require("../../store/departments.cjs"),p=require("../../store/memberships.cjs"),O={class:"for-transition pd-thin w-100"},M={class:"mn-b-thin flex-nowrap flex bg-grey pd-medium radius-big"},S={key:0,class:"mn-r-auto"},T={key:1,class:"mn-r-auto"},U={class:"flex-nowrap flex pd-thin"},z={class:"cols-2-fit-content"},F={class:"w-100 flex-child-grow-1 flex-child"},R={class:"cols-2 gap-thin"},$={class:"bg-grey pd-medium o-hidden radius-big"},A=e.createElementVNode("h3",{class:"mn-b-semi"},"Department Settings",-1),L=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please settings for your department:",-1),j={class:"cols-1 gap-thin"},H=e.createElementVNode("h4",null,"Products",-1),I={class:"bg-grey pd-medium o-hidden radius-big"},G=e.createElementVNode("h3",{class:"mn-b-semi"},"Acessess",-1),J=e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select organization accesses for user in department:",-1),K={class:"cols-1 gap-thin"},Q=e.createElementVNode("h4",null,"Products",-1),W=e.createElementVNode("h4",null,"Orders",-1),X={key:1,class:"flex-nowrap flex pd-thin"},Y={id:"dash",class:"pd-medium bg-white"},Z={class:"mn-b-regular flex-v-center flex-nowrap flex"},ee=e.createElementVNode("h3",{class:"mn-r-small"},"Подотделы ",-1),te={class:"mn-b-small"},ae={key:0},le={__name:"DepartmentEdit",setup(re){const w=_.useRouter(),l=_.useRoute();async function y(){l.params.department&&await p.actions.read({target:l.params._id}),e.ref(p.state.memberships),await t.actions.read(l.params._id),l.params.department&&await t.actions.readOne(l.params.department)}y();const d=e.ref(!1),i=e.ref(null);function u(r){d.value=!0,typeof r=="number"&&(i.value=r)}function f(){d.value=!1,i.value=null}const m=e.ref(!1),c=e.ref(null);function h(r){m.value=!0,typeof r=="number"&&(c.value=r)}function b(){m.value=!1,c.value=null}async function E(){l.params.department&&await t.actions.update(l.params._id,t.state.department),l.params.department||await t.actions.create(l.params._id,t.state.department)}function D(){w.replace({name:"Department",params:{_id:l.params._id,department:t.state.department._id}})}async function q(){await t.actions.delete(l.params._id,t.state.department)}return(r,s)=>(e.openBlock(),e.createElementBlock("div",O,[e.createElementVNode("header",M,[e.unref(l).params.department?(e.openBlock(),e.createElementBlock("h1",S,"Edit Department")):(e.openBlock(),e.createElementBlock("h1",T,"Create Department")),e.createElementVNode("section",U,[e.createVNode(N.default,{submit:E,callback:D,class:"bg-main"},{default:e.withCtx(()=>[e.createTextVNode("Save Department")]),_:1})])]),t.state.department.profile?(e.openBlock(),e.createBlock(V.default,{key:0,title:"Profile",class:"mn-b-thin"},{default:e.withCtx(()=>[e.createElementVNode("div",z,[e.createVNode(C.default,{photo:t.state.department.profile.photo,"onUpdate:photo":s[0]||(s[0]=a=>t.state.department.profile.photo=a),uploadPath:"organizations/"+t.state.department.name+"/avatars",class:"w-8r aspect-1x1 o-hidden mn-r-small radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",F,[e.createVNode(v.default,{field:t.state.department.profile.name,"onUpdate:field":s[1]||(s[1]=a=>t.state.department.profile.name=a),label:"Name",placeholder:"Department Name",class:"mn-b-small bg-white radius-small pd-medium",validation:r.organizationName},null,8,["field","validation"]),e.createVNode(v.default,{field:t.state.department.profile.description,"onUpdate:field":s[2]||(s[2]=a=>t.state.department.profile.description=a),label:"Description",placeholder:"Department description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:r.organizationName},null,8,["field","validation"])])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(V.default,{title:"Team",placeholder:"No members added yet",actions:[{label:"+",function:()=>u()}],class:"cols-1 gap-thin mn-b-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.members,(a,o)=>(e.openBlock(),e.createBlock(x.default,{class:"bg-grey o-hidden radius-small mn-b-thin",key:o,user:a.user,photo:a.user.profile.photo,name:a.user.profile.name||a.user.phone||a.user.email||a.user._id,position:a.position,onClick:B=>u(o)},null,8,["user","photo","name","position","onClick"]))),128))]),_:1},8,["actions"]),e.createVNode(g.default,{title:"Добавить участника",onClosePopup:f,isPopupOpen:d.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[e.createVNode(k.default,{members:t.state.department.members,member:i.value,users:p.state.memberships,onCallback:f},null,8,["members","member","users"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",R,[e.createElementVNode("div",$,[A,L,e.createElementVNode("div",j,[H,e.createVNode(n.default,{label:"Hidden department",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"])])]),e.createElementVNode("div",I,[G,J,e.createElementVNode("div",K,[Q,e.createVNode(n.default,{label:"See products",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(n.default,{label:"Edit products",name:"Delivery",value:"courier",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(n.default,{label:"Delete orders",name:"Delivery",value:"post",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),W,e.createVNode(n.default,{label:"See orders",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(n.default,{label:"Confirm orders",name:"Delivery",value:"courier",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(n.default,{label:"Delete orders",name:"Delivery",value:"post",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"])])])]),e.unref(l).params.department?(e.openBlock(),e.createElementBlock("section",X,[e.createVNode(N.default,{submit:q,callback:r.redirectToDash,class:"bg-grey"},{default:e.withCtx(()=>[e.createTextVNode("Delete Department")]),_:1},8,["callback"])])):e.createCommentVNode("",!0),e.createElementVNode("div",Y,[e.createVNode(g.default,{title:"Добавить подотдел",onClosePopup:b,isPopupOpen:m.value},{default:e.withCtx(()=>[e.createVNode(k.default,{departments:t.state.department.subdepartments,department:c.value,maindepartment:t.state.department,alldepartments:t.state.departments,onCallback:b},null,8,["departments","department","maindepartment","alldepartments"])]),_:1},8,["isPopupOpen"]),e.createElementVNode("div",Z,[ee,e.createElementVNode("div",null,[e.createElementVNode("a",{class:"t-main h5",onClick:s[3]||(s[3]=a=>h())},"+")])]),e.createElementVNode("ul",te,[t.state.department.subdepartments.length<1?(e.openBlock(),e.createElementBlock("li",ae,"В отделе еще нет подотделов")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state.department.subdepartments,(a,o)=>(e.openBlock(),e.createBlock(P.default,{key:o,class:"bg-grey o-hidden radius-small mn-b-thin",department:a,onClick:B=>h(o)},null,8,["department","onClick"]))),128))])])]))}};exports.default=le;
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js
CHANGED
@@ -5,15 +5,15 @@ import "vue-i18n";
|
|
5
5
|
import "../../../globals/localization/vue-i18n.js";
|
6
6
|
import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
|
7
7
|
import L from "../../../../components/UploadImage/UploadImage.vue.js";
|
8
|
-
import "../../../../components/Tab/Tab.
|
8
|
+
import "../../../../components/Tab/Tab.vue2.js";
|
9
9
|
import $ from "../../../../components/Field/Field.vue.js";
|
10
|
-
import "../../../../components/Select/Select.
|
10
|
+
import "../../../../components/Select/Select.vue.js";
|
11
11
|
import m from "../../../../components/Checkbox/Checkbox.vue.js";
|
12
12
|
import "../../../../components/Address/Address.vue.js";
|
13
13
|
import "../../../../components/Loader/Loader.vue.js";
|
14
14
|
import "../../../../components/LocationMarker/LocationMarker.vue.js";
|
15
15
|
import O from "../../../../components/Button/Button.vue.js";
|
16
|
-
import S from "../../../../components/Popup/Popup.
|
16
|
+
import S from "../../../../components/Popup/Popup.vue2.js";
|
17
17
|
import E from "../../../../components/Block/Block.vue.js";
|
18
18
|
import "../blocks/EditArray.vue2.js";
|
19
19
|
import j from "../blocks/DepartmentSub.vue.js";
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.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/Loader/Loader.vue.cjs");require("vue-i18n");require("../../../../components/Field/Field.vue2.cjs");const _=require("../../../../components/Tab/Tab.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Loader/Loader.vue.cjs");require("vue-i18n");require("../../../../components/Field/Field.vue2.cjs");const _=require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Tooltip/Tooltip.vue2.cjs");const b=require("../sections/MembersAdd.vue.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const v=require("../blocks/User.vue.cjs"),g=require("../../../auth/store/auth.cjs"),a=require("../../store/invites.cjs"),d=require("../../store/memberships.cjs"),h=require("../../store/organizations.cjs"),f=require("../../store/departments.cjs"),k={class:"pd-thin"},q=e.createElementVNode("section",{class:"mn-b-medium radius-medium pd-semi bg-grey"},[e.createElementVNode("h2",{class:"mn-b-regular"},"Members"),e.createElementVNode("p",{class:"t-transp p-big"},"Add new memberships to the group and configure access rights.")],-1),E={class:"mn-b-big radius-medium bg-white"},y={key:0,class:"cols-1 gap-thin"},B={key:1},N={class:"br-grey br-1px br-solid radius-small mn-b-thin flex-nowrap flex-v-center flex pd-medium"},V={class:"w-100 mn-r-small"},w={class:"t-transp"},x={class:"mn-l-medium flex-v-center flex"},M=["onClick"],C={__name:"Members",setup(S){const l=c.useRoute();c.useRouter();const o=e.ref(null),i=e.ref("members");e.onMounted(async()=>{o.value=(await h.actions.read({_id:l.params._id,user:g.state.user._id}))[0],await d.actions.read({target:l.params._id}),await a.actions.read(o.value._id)}),e.computed(()=>{const s=f.state.departments,n=s.flatMap(t=>t.subdepartments.map(r=>r._id));return s.filter(t=>!n.includes(t._id))});async function u(s){await a.actions.create(o.value._id,s)}async function m(s,n){a.state.invites.splice(s,1),await a.actions.delete(n._id)}return(s,n)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("div",k,[q,e.createVNode(b.default,{organization:o.value,onSendInvite:u},null,8,["organization"]),e.createVNode(_.default,{selected:i.value,"onUpdate:selected":n[0]||(n[0]=t=>i.value=t),class:"mn-b-medium bg-grey radius-small",tabs:[{name:"Members",value:"members"},{name:"Invites",value:"invites"}]},null,8,["selected"]),e.createElementVNode("section",E,[i.value==="members"?(e.openBlock(),e.createElementBlock("div",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.state.memberships,(t,r)=>(e.openBlock(),e.createBlock(v.default,{key:r,user:t,onClick:p=>s.$router.push(`/app/profile/${t._id}`),class:"bg-grey radius-small flex-nowrap flex pd-medium"},null,8,["user","onClick"]))),128))])):e.createCommentVNode("",!0),i.value==="invites"?(e.openBlock(),e.createElementBlock("div",B,[e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.state.invites,(t,r)=>(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("span",V,e.toDisplayString(t.invitedEmail)+" "+e.toDisplayString(t.invitedPhone),1),e.createElementVNode("span",w,e.toDisplayString(t.status),1),e.createElementVNode("div",x,[e.createElementVNode("button",{onClick:p=>m(r,t),class:"button-small button"},"×",8,M)])]))),256))])):e.createCommentVNode("",!0)])])]),_:1}))}};exports.default=C;
|
@@ -3,14 +3,14 @@ import { useRoute as M, useRouter as I } from "vue-router";
|
|
3
3
|
import "../../../../components/Loader/Loader.vue.js";
|
4
4
|
import "vue-i18n";
|
5
5
|
import "../../../../components/Field/Field.vue2.js";
|
6
|
-
import S from "../../../../components/Tab/Tab.
|
6
|
+
import S from "../../../../components/Tab/Tab.vue.js";
|
7
7
|
import "../../../../components/Tooltip/Tooltip.vue2.js";
|
8
8
|
import z from "../sections/MembersAdd.vue.js";
|
9
|
-
import "../../../mobile/components/Menu/Menu.
|
9
|
+
import "../../../mobile/components/Menu/Menu.vue.js";
|
10
10
|
import "../../../mobile/components/Menu/MenuItem.vue.js";
|
11
11
|
import B from "../blocks/User.vue.js";
|
12
12
|
import { state as E } from "../../../auth/store/auth.js";
|
13
|
-
import { actions as c, state as h } from "
|
13
|
+
import { actions as c, state as h } from "../../store/invites.js";
|
14
14
|
import { actions as N, state as V } from "../../store/memberships.js";
|
15
15
|
import { actions as D } from "../../store/organizations.js";
|
16
16
|
import { state as R } from "../../store/departments.js";
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const k=require("../../../../components/Tab/Tab.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const k=require("../../../../components/Tab/Tab.vue.cjs"),p=require("../../../../components/Block/Block.vue.cjs"),f=require("../../../../components/Feed/Feed.vue.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/User.vue2.cjs");const h=require("../blocks/CardDepartment.vue.cjs"),v=require("../../../events/components/sections/Feed.vue.cjs"),g=require("../../../community/components/sections/Feed.vue.cjs"),q=require("../../../spots/components/blocks/CardSpot.vue.cjs"),w=require("../sections/DetailsTab.vue.cjs"),C=require("../../../products/components/pages/Products.vue.cjs"),s=require("../../../auth/store/auth.cjs"),o=require("../../store/organizations.cjs"),y=require("../../store/memberships.cjs"),B=require("../../store/departments.cjs"),N=require("../../../spots/store/spots.cjs");require("./Organization.vue2.cjs");const V={key:0,class:"pd-thin for-transition w-100"},x={class:"pos-relative"},z={key:0},T={__name:"Organization",setup($){const _=m.useRouter(),t=m.useRoute();let b=t.query.tab?t.query.tab:"products";const c=e.ref(null);e.onMounted(async()=>{c.value=await o.actions.read({_id:t.params._id,user:s.state.user._id}),await y.actions.read(t.params._id)});const r=e.ref(b);return t.query.tab=r.value,e.watch(r,i=>{_.replace({query:null})}),(i,n)=>{const u=e.resolveComponent("router-link");return c.value?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(w.default,{organization:o.state.current,user:s.state.user,class:"mn-b-semi"},null,8,["organization","user"]),e.createVNode(p.default,{title:`${o.state.current.numberOfMembers} members`,actions:[{label:">",function:()=>i.$router.push(`/organizations/${e.unref(t).params._id}/departments/create`)}],class:"mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(f.default,{states:{empty:{title:"No Departments Found",description:"Currently, there are no departments available."}},store:{read:a=>B.actions.read(a),state:null},options:{organization:e.unref(t).params._id,user:s.state.user._id,hidden:!1}},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(l,d)=>(e.openBlock(),e.createBlock(h.default,{key:d,department:l,organization:e.unref(t).params._id,class:"radius-big bg-white pos-relative mn-b-thin"},null,8,["department","organization"]))),128))]),_:1},8,["states","store","options"])]),_:1},8,["title","actions"]),e.createVNode(k.default,{selected:r.value,"onUpdate:selected":n[0]||(n[0]=a=>r.value=a),tabs:[{name:"Community",value:"community"},{name:"Menu",value:"products"},{name:"Events",value:"events"},{name:"Spots",value:"spots"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("div",x,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="community"?(e.openBlock(),e.createBlock(g.default,{key:0,user:s.state.user._id,owner:e.unref(t).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="events"?(e.openBlock(),e.createBlock(v.default,{key:0,user:s.state.user._id,owner:e.unref(t).params._id,sortOrder:"desc",sortParam:"date.start"},null,8,["user","owner","sortParam"])):e.createCommentVNode("",!0)]),_:1}),r.value==="products"&&s.state.user._id===o.state.current.owner?(e.openBlock(),e.createBlock(p.default,{key:0,class:"flex-nowrap gap-thin mn-b-small flex"},{default:e.withCtx(()=>[e.createVNode(u,{class:"bg-black t-white uppercase t-semi pd-thin radius-extra",to:{name:"ProductAdd",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Add Product ")]),_:1},8,["to"]),e.createVNode(u,{class:"uppercase t-semi pd-thin radius-extra",to:{name:"Leftovers",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Change Invetory ")]),_:1},8,["to"]),e.createVNode(u,{class:"d-block mn-l-auto uppercase t-semi bg-white pd-thin radius-extra",to:{name:"Backoffice",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Go to Backoffice ")]),_:1},8,["to"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="products"?(e.openBlock(),e.createBlock(C.default,{key:0,organization:o.state.current},null,8,["organization"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="spots"?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(f.default,{states:{empty:{title:"No Spots Found",description:"Currently, there are no spots available."}},store:{read:a=>N.actions.read(e.unref(t).params._id),state:o.state},options:{user:s.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:a})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(l,d)=>(e.openBlock(),e.createBlock(q.default,{key:d,spot:l,organization:o.state.current,class:"radius-big bg-grey mn-b-thin"},null,8,["spot","organization"]))),128))]),_:1},8,["states","store","options"]),s.state.user._id===o.state.current.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[1]||(n[1]=a=>i.$router.push(`/spots/${o.state.current._id}/spots/create`)),class:"mn-b-thin button w-100"}," Add spot ")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})])])):e.createCommentVNode("",!0)}}};exports.default=T;
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
import { ref as h, onMounted as N, watch as
|
2
|
-
import { useRouter as
|
1
|
+
import { ref as h, onMounted as N, watch as B, resolveComponent as O, openBlock as r, createElementBlock as d, createVNode as t, unref as n, withCtx as a, Fragment as k, renderList as w, createBlock as l, createElementVNode as V, Transition as c, createCommentVNode as m, createTextVNode as g } from "vue";
|
2
|
+
import { useRouter as q, useRoute as M } from "vue-router";
|
3
3
|
import "vue-i18n";
|
4
4
|
import "../../../globals/localization/vue-i18n.js";
|
5
5
|
import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
|
6
|
-
import P from "../../../../components/Tab/Tab.
|
6
|
+
import P from "../../../../components/Tab/Tab.vue.js";
|
7
7
|
import $ from "../../../../components/Block/Block.vue.js";
|
8
8
|
import z from "../../../../components/Feed/Feed.vue.js";
|
9
|
-
import "../../../mobile/components/Menu/Menu.
|
9
|
+
import "../../../mobile/components/Menu/Menu.vue.js";
|
10
10
|
import "../../../mobile/components/Menu/MenuItem.vue.js";
|
11
11
|
import "../blocks/DepartmentSub.vue2.js";
|
12
12
|
import "../blocks/User.vue2.js";
|
@@ -28,7 +28,7 @@ const U = {
|
|
28
28
|
}, j = { class: "pos-relative" }, H = { key: 0 }, ge = {
|
29
29
|
__name: "Organization",
|
30
30
|
setup(J) {
|
31
|
-
const C =
|
31
|
+
const C = q(), e = M();
|
32
32
|
let x = e.query.tab ? e.query.tab : "products";
|
33
33
|
const y = h(null);
|
34
34
|
N(async () => {
|
@@ -38,10 +38,10 @@ const U = {
|
|
38
38
|
}), await T.read(e.params._id);
|
39
39
|
});
|
40
40
|
const o = h(x);
|
41
|
-
return e.query.tab = o.value,
|
41
|
+
return e.query.tab = o.value, B(o, (_) => {
|
42
42
|
C.replace({ query: null });
|
43
43
|
}), (_, p) => {
|
44
|
-
const f =
|
44
|
+
const f = O("router-link");
|
45
45
|
return y.value ? (r(), d("div", U, [
|
46
46
|
t(S, {
|
47
47
|
organization: u.current,
|
@@ -52,7 +52,7 @@ const U = {
|
|
52
52
|
title: `${u.current.numberOfMembers} members`,
|
53
53
|
actions: [{
|
54
54
|
label: ">",
|
55
|
-
function: () => _.$router.push(`/organizations/${
|
55
|
+
function: () => _.$router.push(`/organizations/${n(e).params._id}/departments/create`)
|
56
56
|
}],
|
57
57
|
class: "mn-b-semi"
|
58
58
|
}, {
|
@@ -65,22 +65,22 @@ const U = {
|
|
65
65
|
}
|
66
66
|
},
|
67
67
|
store: {
|
68
|
-
read: (
|
68
|
+
read: (s) => G.read(s),
|
69
69
|
state: null
|
70
70
|
},
|
71
71
|
options: {
|
72
|
+
organization: n(e).params._id,
|
72
73
|
user: i.user._id,
|
73
|
-
|
74
|
-
limit: 10
|
74
|
+
hidden: !1
|
75
75
|
}
|
76
76
|
}, {
|
77
77
|
default: a(({
|
78
|
-
items:
|
78
|
+
items: s
|
79
79
|
}) => [
|
80
|
-
(r(!0), d(k, null, w(
|
80
|
+
(r(!0), d(k, null, w(s, (b, v) => (r(), l(A, {
|
81
81
|
key: v,
|
82
82
|
department: b,
|
83
|
-
organization:
|
83
|
+
organization: n(e).params._id,
|
84
84
|
class: "radius-big bg-white pos-relative mn-b-thin"
|
85
85
|
}, null, 8, ["department", "organization"]))), 128))
|
86
86
|
]),
|
@@ -91,7 +91,7 @@ const U = {
|
|
91
91
|
}, 8, ["title", "actions"]),
|
92
92
|
t(P, {
|
93
93
|
selected: o.value,
|
94
|
-
"onUpdate:selected": p[0] || (p[0] = (
|
94
|
+
"onUpdate:selected": p[0] || (p[0] = (s) => o.value = s),
|
95
95
|
tabs: [
|
96
96
|
{ name: "Community", value: "community" },
|
97
97
|
{ name: "Menu", value: "products" },
|
@@ -100,13 +100,13 @@ const U = {
|
|
100
100
|
],
|
101
101
|
class: "mn-b-small o-hidden h5 radius-big bg-grey"
|
102
102
|
}, null, 8, ["selected"]),
|
103
|
-
|
103
|
+
V("div", j, [
|
104
104
|
t(c, { name: "slide-fade" }, {
|
105
105
|
default: a(() => [
|
106
106
|
o.value === "community" ? (r(), l(E, {
|
107
107
|
key: 0,
|
108
108
|
user: i.user._id,
|
109
|
-
owner:
|
109
|
+
owner: n(e).params._id
|
110
110
|
}, null, 8, ["user", "owner"])) : m("", !0)
|
111
111
|
]),
|
112
112
|
_: 1
|
@@ -116,7 +116,7 @@ const U = {
|
|
116
116
|
o.value === "events" ? (r(), l(D, {
|
117
117
|
key: 0,
|
118
118
|
user: i.user._id,
|
119
|
-
owner:
|
119
|
+
owner: n(e).params._id,
|
120
120
|
sortOrder: "desc",
|
121
121
|
sortParam: "date.start"
|
122
122
|
}, null, 8, ["user", "owner", "sortParam"])) : m("", !0)
|
@@ -133,7 +133,7 @@ const U = {
|
|
133
133
|
to: {
|
134
134
|
name: "ProductAdd",
|
135
135
|
params: {
|
136
|
-
_id:
|
136
|
+
_id: n(e).params._id
|
137
137
|
}
|
138
138
|
}
|
139
139
|
}, {
|
@@ -147,7 +147,7 @@ const U = {
|
|
147
147
|
to: {
|
148
148
|
name: "Leftovers",
|
149
149
|
params: {
|
150
|
-
_id:
|
150
|
+
_id: n(e).params._id
|
151
151
|
}
|
152
152
|
}
|
153
153
|
}, {
|
@@ -161,7 +161,7 @@ const U = {
|
|
161
161
|
to: {
|
162
162
|
name: "Backoffice",
|
163
163
|
params: {
|
164
|
-
_id:
|
164
|
+
_id: n(e).params._id
|
165
165
|
}
|
166
166
|
}
|
167
167
|
}, {
|
@@ -193,7 +193,7 @@ const U = {
|
|
193
193
|
}
|
194
194
|
},
|
195
195
|
store: {
|
196
|
-
read: (
|
196
|
+
read: (s) => I.read(n(e).params._id),
|
197
197
|
state: u
|
198
198
|
},
|
199
199
|
options: {
|
@@ -204,9 +204,9 @@ const U = {
|
|
204
204
|
}
|
205
205
|
}, {
|
206
206
|
default: a(({
|
207
|
-
items:
|
207
|
+
items: s
|
208
208
|
}) => [
|
209
|
-
(r(!0), d(k, null, w(
|
209
|
+
(r(!0), d(k, null, w(s, (b, v) => (r(), l(F, {
|
210
210
|
key: v,
|
211
211
|
spot: b,
|
212
212
|
organization: u.current,
|
@@ -217,7 +217,7 @@ const U = {
|
|
217
217
|
}, 8, ["states", "store", "options"]),
|
218
218
|
i.user._id === u.current.owner ? (r(), d("button", {
|
219
219
|
key: 0,
|
220
|
-
onClick: p[1] || (p[1] = (
|
220
|
+
onClick: p[1] || (p[1] = (s) => _.$router.push(`/spots/${u.current._id}/spots/create`)),
|
221
221
|
class: "mn-b-thin button w-100"
|
222
222
|
}, " Add spot ")) : m("", !0)
|
223
223
|
])) : m("", !0)
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),n=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const p=require("../../../../components/FieldTags/BlockTags.vue.cjs");require("../../../../components/Tab/Tab.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),n=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const p=require("../../../../components/FieldTags/BlockTags.vue.cjs");require("../../../../components/Tab/Tab.vue2.cjs");const l=require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue.cjs");const f=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),g=require("../../../../components/UploadImage/UploadImage.vue.cjs"),b=require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Popup/Popup.vue.cjs");const h=require("../../../auth/store/auth.cjs"),e=require("../../store/organizations.cjs");require("../../store/memberships.cjs");const y={class:"for-transition pd-thin"},V=t.createElementVNode("h3",{class:"mn-b-small"},"Type of group",-1),N=t.createElementVNode("p",{class:"mn-b-thin"},"Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.",-1),_=t.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),q={class:"mn-b-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},v=t.createElementVNode("h4",null,"Upload photo",-1),w=t.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),x=t.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),U={__name:"OrganizationEdit",async setup(T){let o,i;const s=n.useRoute(),d=n.useRouter();e.actions.reset(),s.params._id&&([o,i]=t.withAsyncContext(()=>e.actions.read({_id:s.params._id})),await o,i());const u=t.computed(()=>e.state.current);async function c(){s.params._id?await e.actions.update(s.params._id,u.value):await e.actions.create(e.state.current,h.state.user._id)}function m(){d.replace({name:"Organization",params:{_id:e.state.current._id}})}return(k,a)=>(t.openBlock(),t.createElementBlock("div",y,[V,N,t.createVNode(f.default,{modelValue:e.state.current.types,"onUpdate:modelValue":a[0]||(a[0]=r=>e.state.current.types=r),options:["public","exclusive","hidden"],multiple:!1,taggable:!1,placeholder:"Type to search or add type of organization",class:"mn-b-semi bg-grey pd-medium radius-small"},null,8,["modelValue"]),_,t.createElementVNode("div",q,[t.createVNode(g.default,{photo:e.state.current.profile.photo,"onUpdate:photo":a[1]||(a[1]=r=>e.state.current.profile.photo=r),uploadPath:"organizations/"+e.state.current._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo","uploadPath"]),v]),t.createVNode(l.default,{field:e.state.current.profile.name,"onUpdate:field":a[2]||(a[2]=r=>e.state.current.profile.name=r),placeholder:"Name of organization",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.profile.description,"onUpdate:field":a[3]||(a[3]=r=>e.state.current.profile.description=r),placeholder:"Brief description of your group",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(p.default,{onTagsChanged:a[4]||(a[4]=r=>e.state.current.profile.tags=r),tags:e.state.current.profile.tags},null,8,["tags"]),w,x,t.createVNode(l.default,{field:e.state.current.socials.instagram,"onUpdate:field":a[5]||(a[5]=r=>e.state.current.socials.instagram=r),label:"Instagram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.twitter,"onUpdate:field":a[6]||(a[6]=r=>e.state.current.socials.twitter=r),label:"Twitter",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.facebook,"onUpdate:field":a[7]||(a[7]=r=>e.state.current.socials.facebook=r),label:"Facebook",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.telegram,"onUpdate:field":a[8]||(a[8]=r=>e.state.current.socials.telegram=r),label:"Telegram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.youtube,"onUpdate:field":a[9]||(a[9]=r=>e.state.current.socials.youtube=r),label:"Telegram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(b.default,{submit:c,callback:m,class:"bg-main w-100 mn-b-thin"},{default:t.withCtx(()=>[t.createTextVNode("Save")]),_:1})]))}};exports.default=U;
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js
CHANGED
@@ -4,13 +4,13 @@ import "vue-i18n";
|
|
4
4
|
import "../../../globals/localization/vue-i18n.js";
|
5
5
|
import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
|
6
6
|
import v from "../../../../components/FieldTags/BlockTags.vue.js";
|
7
|
-
import "../../../../components/Tab/Tab.
|
7
|
+
import "../../../../components/Tab/Tab.vue2.js";
|
8
8
|
import i from "../../../../components/Field/Field.vue.js";
|
9
|
-
import "../../../../components/Select/Select.
|
9
|
+
import "../../../../components/Select/Select.vue.js";
|
10
10
|
import U from "../../../../components/SelectMulti/SelectMulti.vue.js";
|
11
11
|
import k from "../../../../components/UploadImage/UploadImage.vue.js";
|
12
12
|
import T from "../../../../components/Button/Button.vue.js";
|
13
|
-
import "../../../../components/Popup/Popup.
|
13
|
+
import "../../../../components/Popup/Popup.vue.js";
|
14
14
|
import { state as z } from "../../../auth/store/auth.js";
|
15
15
|
import { actions as s, state as e } from "../../store/organizations.js";
|
16
16
|
import "../../store/memberships.js";
|