@ozdao/prometheus-framework 0.2.137 → 0.2.139
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +29 -14
- package/dist/auth.server.mjs +29 -14
- package/dist/community.server.js +3 -3
- package/dist/community.server.mjs +3 -3
- package/dist/events.server.js +3 -3
- package/dist/events.server.mjs +3 -3
- package/dist/files.server.js +3 -3
- package/dist/files.server.mjs +3 -3
- package/dist/gallery.server.js +4 -4
- package/dist/gallery.server.mjs +4 -4
- package/dist/index-DNI4aUP2.js +259 -0
- package/dist/index-Tcyehi73.mjs +260 -0
- package/dist/main-DTHFR7H_.mjs +14510 -0
- package/dist/main-wXdocsbd.js +92 -0
- package/dist/main.css +1 -1
- package/dist/orders.server.js +9 -8
- package/dist/orders.server.mjs +9 -8
- package/dist/organizations.server.js +32 -17
- package/dist/organizations.server.mjs +32 -17
- package/dist/products.server.js +37 -5
- package/dist/products.server.mjs +37 -5
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Completion/Completion.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Completion/Completion.vue.js +19 -19
- 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/Map/Map.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Map/Map.vue.js +3 -2
- 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 +32 -31
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +50 -47
- 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/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/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +2 -2
- 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/marketplace/store/marketplace.cjs +1 -1
- package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +12 -12
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +41 -38
- 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 +123 -114
- 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 +51 -52
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +16 -15
- 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 +120 -60
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.js +25 -24
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +65 -66
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +81 -76
- package/dist/prometheus-framework/src/modules/spots/router/spots.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/router/spots.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 +2 -2
- 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 +78 -74
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/reports.server.js +0 -3
- package/dist/reports.server.mjs +0 -3
- package/dist/spots.server.js +3 -3
- package/dist/spots.server.mjs +3 -3
- package/dist/style.css +1 -1
- package/dist/wallet.server.js +5 -5
- package/dist/wallet.server.mjs +8 -8
- package/dist/web-Dh669DqQ.mjs +54 -0
- package/dist/web-Dt2RCU54.js +1 -0
- package/package.json +1 -1
- package/src/components/Completion/Completion.vue +29 -30
- package/src/components/Map/Map.vue +2 -2
- package/src/modules/auth/components/pages/Invite.vue +4 -2
- package/src/modules/auth/controllers/auth.controller.js +30 -12
- package/src/modules/auth/middlewares/authJwt.js +80 -0
- package/src/modules/{middlewares/server → auth/middlewares}/index.js +1 -3
- package/src/modules/{middlewares/server → auth/middlewares}/verifyAccesses.js +1 -1
- package/src/modules/auth/routes/auth.routes.js +2 -2
- package/src/modules/auth/routes/twofa.routes.js +1 -1
- package/src/modules/auth/store/auth.js +9 -0
- package/src/modules/chats/routes/chats.routes.js +1 -1
- package/src/modules/community/routes/blog.routes.js +2 -2
- package/src/modules/events/routes/events.routes.js +2 -2
- package/src/modules/files/routes/files.routes.js +2 -2
- package/src/modules/gallery/routes/gallery.routes.js +4 -5
- package/src/modules/globals/services/globals.crud.js +2 -2
- package/src/modules/marketplace/store/marketplace.js +1 -1
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +2 -2
- package/src/modules/orders/components/sections/FormAddCustomer.vue +2 -2
- package/src/modules/orders/controllers/orders.controller.js +1 -0
- package/src/modules/orders/routes/applications.routes.js +2 -2
- package/src/modules/orders/routes/orders.routes.js +2 -2
- package/src/modules/organizations/components/blocks/CardOrganization.vue +9 -7
- package/src/modules/organizations/components/pages/Members.vue +26 -15
- package/src/modules/organizations/components/pages/Organization.vue +3 -3
- package/src/modules/organizations/components/sections/DetailsTab.vue +1 -1
- package/src/modules/organizations/components/sections/MembersAdd.vue +101 -43
- package/src/modules/organizations/controllers/invites.controller.js +18 -13
- package/src/modules/organizations/controllers/memberships.controller.js +18 -11
- package/src/modules/organizations/controllers/organizations.controller.js +3 -4
- package/src/modules/organizations/models/membership.model.js +2 -0
- package/src/modules/organizations/models/organization.model.js +4 -0
- package/src/modules/organizations/routes/invites.routes.js +2 -2
- package/src/modules/organizations/store/invites.js +2 -1
- package/src/modules/products/controllers/leftovers.controller.js +1 -1
- package/src/modules/products/middlewares/index.js +11 -0
- package/src/modules/products/routes/categories.routes.js +2 -2
- package/src/modules/reports/routes/reports.routes.js +2 -2
- package/src/modules/spots/components/blocks/CardSpot.vue +0 -1
- package/src/modules/spots/components/layouts/Spots.vue +2 -2
- package/src/modules/spots/components/pages/Map.vue +79 -78
- package/src/modules/spots/components/pages/SpotEdit.vue +8 -5
- package/src/modules/spots/controllers/spots.controller.js +1 -5
- package/src/modules/spots/router/spots.js +1 -1
- package/src/modules/users/components/pages/ProfileEdit.vue +37 -22
- package/src/modules/wallet/controllers/routes/payments.routes.js +2 -2
- package/src/modules/wallet/controllers/routes/rewards.routes.js +2 -2
- package/src/modules/middlewares/server/authJwt.js +0 -68
- /package/src/modules/{middlewares/server → auth/middlewares}/authSecret.js +0 -0
- /package/src/modules/{middlewares/server → auth/middlewares}/verifyInvites.js +0 -0
- /package/src/modules/{middlewares/server → auth/middlewares}/verifySignUp.js +0 -0
- /package/src/modules/{middlewares/server → auth/middlewares}/verifyUser.js +0 -0
- /package/src/modules/globals/services/{globals.cashe.js → globals.cache.js} +0 -0
- /package/src/modules/{middlewares/server → products/middlewares}/verifyCategory.js +0 -0
@@ -1,142 +1,150 @@
|
|
1
|
-
import { ref as
|
2
|
-
import { useRoute as
|
3
|
-
import
|
1
|
+
import { ref as _, onMounted as F, computed as S, resolveComponent as B, openBlock as o, createElementBlock as l, createVNode as u, withCtx as p, createBlock as d, unref as m, Fragment as g, renderList as y, createCommentVNode as b, createTextVNode as U } from "vue";
|
2
|
+
import { useRoute as V, useRouter as R } from "vue-router";
|
3
|
+
import $ from "../../../../components/Feed/Feed.vue.js";
|
4
4
|
/* empty css */
|
5
|
-
/* empty css
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
/* empty css
|
5
|
+
/* empty css */
|
6
|
+
import E from "../../../../components/Popup/Popup.vue.js";
|
7
|
+
import L from "../../../globals/components/sections/SectionPageTitle.vue.js";
|
8
|
+
import T from "../sections/MembersAdd.vue.js";
|
9
|
+
/* empty css */
|
10
10
|
import "../../../../components/Menu/MenuItem.vue.js";
|
11
|
-
import
|
12
|
-
import
|
11
|
+
import x from "../../../users/components/blocks/CardUser.vue.js";
|
12
|
+
import j from "../blocks/CardDepartment.vue.js";
|
13
13
|
import M from "../../../icons/navigation/IconDelete.vue.js";
|
14
|
-
import { state as
|
15
|
-
import { actions as
|
16
|
-
import { actions as
|
17
|
-
import { actions as
|
18
|
-
import {
|
19
|
-
|
14
|
+
import { state as w } from "../../../auth/store/auth.js";
|
15
|
+
import { actions as z } from "../../../globals/store/globals.js";
|
16
|
+
import { actions as k } from "../../store/invites.js";
|
17
|
+
import { actions as I, state as q } from "../../store/memberships.js";
|
18
|
+
import { actions as G, state as H } from "../../store/organizations.js";
|
19
|
+
import { state as N, actions as J } from "../../store/departments.js";
|
20
|
+
const K = { class: "pd-thin" }, Q = {
|
20
21
|
key: 2,
|
21
22
|
class: "cols-1 gap-thin"
|
22
|
-
},
|
23
|
+
}, W = { key: 3 }, he = {
|
23
24
|
__name: "Members",
|
24
|
-
setup(
|
25
|
-
const
|
26
|
-
|
27
|
-
const
|
28
|
-
function
|
29
|
-
|
25
|
+
setup(X) {
|
26
|
+
const s = V();
|
27
|
+
R();
|
28
|
+
const v = _(null), i = _("members"), c = _([]), h = _(!1);
|
29
|
+
function P() {
|
30
|
+
h.value = !0;
|
30
31
|
}
|
31
|
-
function
|
32
|
-
|
32
|
+
function C() {
|
33
|
+
h.value = !1;
|
33
34
|
}
|
34
|
-
|
35
|
-
|
36
|
-
}),
|
37
|
-
const
|
38
|
-
(
|
35
|
+
F(async () => {
|
36
|
+
v.value = (await G.read({ _id: s.params._id, user: w.user._id }))[0];
|
37
|
+
}), S(() => {
|
38
|
+
const a = N.departments, r = a.flatMap(
|
39
|
+
(n) => n.subdepartments.map((e) => e._id)
|
39
40
|
);
|
40
|
-
return
|
41
|
-
(
|
41
|
+
return a.filter(
|
42
|
+
(n) => !r.includes(n._id)
|
42
43
|
);
|
43
44
|
});
|
44
|
-
async function
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
45
|
+
async function A(a, r, n) {
|
46
|
+
try {
|
47
|
+
const e = await k.create({
|
48
|
+
owner: {
|
49
|
+
type: "Organization",
|
50
|
+
target: v.value._id
|
51
|
+
},
|
52
|
+
creator: {
|
53
|
+
type: "User",
|
54
|
+
target: w.user._id
|
55
|
+
},
|
56
|
+
invites: a
|
57
|
+
});
|
58
|
+
for (let t of e.createdInvites)
|
59
|
+
z.add(c.value, t);
|
60
|
+
C(), r();
|
61
|
+
} catch (e) {
|
62
|
+
n(e);
|
63
|
+
}
|
56
64
|
}
|
57
|
-
async function
|
58
|
-
confirm("Confirm remove of member") == !0 && (
|
65
|
+
async function O(a, r) {
|
66
|
+
confirm("Confirm remove of member") == !0 && (q.memberships.splice(a, 1), await I.delete(r));
|
59
67
|
}
|
60
|
-
async function
|
61
|
-
confirm("Confirm remove of member") == !0 && (
|
68
|
+
async function D(a, r) {
|
69
|
+
confirm("Confirm remove of member") == !0 && (z.delete(c.value, r), await k.delete(r._id));
|
62
70
|
}
|
63
|
-
return (
|
64
|
-
const
|
65
|
-
return
|
66
|
-
|
71
|
+
return (a, r) => {
|
72
|
+
const n = B("router-link");
|
73
|
+
return o(), l("div", K, [
|
74
|
+
u(L, {
|
67
75
|
title: "Members",
|
68
|
-
"onUpdate:tabs_current":
|
69
|
-
tabs_current:
|
76
|
+
"onUpdate:tabs_current": r[0] || (r[0] = (e) => i.value = e),
|
77
|
+
tabs_current: i.value,
|
70
78
|
tabs: [
|
71
|
-
{ name: `Members (${
|
79
|
+
{ name: `Members (${H.current.numberOfMembers || 0})`, value: "members" },
|
72
80
|
{ name: "Departments", value: "departments" },
|
73
81
|
{ name: "Invites", value: "invites" }
|
74
82
|
],
|
75
83
|
actions: [
|
76
|
-
{ method:
|
84
|
+
{ method: P, label: "Invite members" }
|
77
85
|
],
|
78
86
|
class: "mn-b-small bg-light bg-light radius-big"
|
79
87
|
}, null, 8, ["tabs_current", "tabs", "actions"]),
|
80
|
-
|
88
|
+
u(E, {
|
81
89
|
title: "Add members",
|
82
|
-
onClosePopup:
|
83
|
-
isPopupOpen:
|
90
|
+
onClosePopup: C,
|
91
|
+
isPopupOpen: h.value,
|
84
92
|
class: "bg-white w-min-30r w-max-30r radius-big pd-medium"
|
85
93
|
}, {
|
86
|
-
default:
|
87
|
-
|
94
|
+
default: p(() => [
|
95
|
+
u(T, {
|
88
96
|
text: "Please enter your email or phone number to send an invitation link:",
|
89
|
-
organization:
|
90
|
-
onSendInvite:
|
97
|
+
organization: v.value,
|
98
|
+
onSendInvite: A
|
91
99
|
}, null, 8, ["organization"])
|
92
100
|
]),
|
93
101
|
_: 1
|
94
102
|
}, 8, ["isPopupOpen"]),
|
95
|
-
|
103
|
+
i.value === "departments" ? (o(), d($, {
|
96
104
|
key: 0,
|
97
105
|
states: {
|
98
106
|
empty: {
|
99
107
|
title: "No Departments Found",
|
100
108
|
description: "Currently, there are no departments available.",
|
101
109
|
action: "Add department",
|
102
|
-
callback: () =>
|
110
|
+
callback: () => a.$router.push(`/organizations/${m(s).params._id}/departments/create`)
|
103
111
|
}
|
104
112
|
},
|
105
113
|
store: {
|
106
|
-
read: (
|
114
|
+
read: (e) => J.read(e),
|
107
115
|
state: null
|
108
116
|
},
|
109
117
|
options: {
|
110
|
-
organization:
|
111
|
-
user:
|
118
|
+
organization: m(s).params._id,
|
119
|
+
user: w.user._id
|
112
120
|
}
|
113
121
|
}, {
|
114
|
-
default:
|
115
|
-
items:
|
122
|
+
default: p(({
|
123
|
+
items: e
|
116
124
|
}) => [
|
117
|
-
(
|
118
|
-
key:
|
119
|
-
department:
|
120
|
-
organization:
|
125
|
+
(o(!0), l(g, null, y(e, (t, f) => (o(), d(j, {
|
126
|
+
key: f,
|
127
|
+
department: t,
|
128
|
+
organization: m(s).params._id,
|
121
129
|
class: "radius-semi bg-light pos-relative mn-b-thin"
|
122
130
|
}, null, 8, ["department", "organization"]))), 128))
|
123
131
|
]),
|
124
132
|
_: 1
|
125
|
-
}, 8, ["states", "store", "options"])) :
|
126
|
-
|
133
|
+
}, 8, ["states", "store", "options"])) : b("", !0),
|
134
|
+
i.value === "departments" && N.departments.length > 0 ? (o(), d(n, {
|
127
135
|
key: 1,
|
128
136
|
to: {
|
129
|
-
path: `/organizations/${
|
137
|
+
path: `/organizations/${m(s).params._id}/departments/create`
|
130
138
|
},
|
131
139
|
class: "d-block flex-center flex uppercase t-semi bg-main w-100 pd-small radius-extra"
|
132
140
|
}, {
|
133
|
-
default:
|
134
|
-
|
141
|
+
default: p(() => [
|
142
|
+
U(" Add department ")
|
135
143
|
]),
|
136
144
|
_: 1
|
137
|
-
}, 8, ["to"])) :
|
138
|
-
|
139
|
-
|
145
|
+
}, 8, ["to"])) : b("", !0),
|
146
|
+
i.value === "members" ? (o(), l("div", Q, [
|
147
|
+
u($, {
|
140
148
|
search: !0,
|
141
149
|
states: {
|
142
150
|
empty: {
|
@@ -145,43 +153,44 @@ const J = { class: "pd-thin" }, K = {
|
|
145
153
|
}
|
146
154
|
},
|
147
155
|
store: {
|
148
|
-
read: (
|
156
|
+
read: (e) => I.read(e)
|
149
157
|
},
|
150
158
|
options: {
|
151
|
-
target:
|
159
|
+
target: m(s).params._id,
|
152
160
|
role: ["member", "owner"]
|
153
161
|
},
|
154
162
|
class: "gap-thin cols-1"
|
155
163
|
}, {
|
156
|
-
default:
|
157
|
-
items:
|
164
|
+
default: p(({
|
165
|
+
items: e
|
158
166
|
}) => [
|
159
|
-
(
|
160
|
-
key:
|
161
|
-
user:
|
162
|
-
_id:
|
163
|
-
photo:
|
164
|
-
phone:
|
165
|
-
email:
|
166
|
-
name:
|
167
|
-
role:
|
168
|
-
onClick: (
|
169
|
-
action:
|
167
|
+
(o(!0), l(g, null, y(e, (t, f) => (o(), d(x, {
|
168
|
+
key: f,
|
169
|
+
user: t,
|
170
|
+
_id: t.user._id,
|
171
|
+
photo: t.user.profile.photo,
|
172
|
+
phone: t.user.phone,
|
173
|
+
email: t.user.email,
|
174
|
+
name: t.user.profile.name || "No name",
|
175
|
+
role: t.label || t.role,
|
176
|
+
onClick: (Y) => a.$router.push(`/profile/${t.user._id}`),
|
177
|
+
action: t.role !== "owner" ? {
|
170
178
|
label: {
|
171
179
|
is: M,
|
172
180
|
props: { class: "i-medium", fill: "rgb(var(--white)" }
|
173
181
|
},
|
174
|
-
method: () =>
|
182
|
+
method: () => O(f, t)
|
175
183
|
} : null,
|
176
184
|
class: "h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium"
|
177
185
|
}, null, 8, ["user", "_id", "photo", "phone", "email", "name", "role", "onClick", "action"]))), 128))
|
178
186
|
]),
|
179
187
|
_: 1
|
180
188
|
}, 8, ["store", "options"])
|
181
|
-
])) :
|
182
|
-
|
183
|
-
|
184
|
-
|
189
|
+
])) : b("", !0),
|
190
|
+
i.value === "invites" ? (o(), l("div", W, [
|
191
|
+
u($, {
|
192
|
+
items: c.value,
|
193
|
+
"onUpdate:items": r[1] || (r[1] = (e) => c.value = e),
|
185
194
|
states: {
|
186
195
|
empty: {
|
187
196
|
title: "No Invites Found",
|
@@ -189,38 +198,38 @@ const J = { class: "pd-thin" }, K = {
|
|
189
198
|
}
|
190
199
|
},
|
191
200
|
store: {
|
192
|
-
read: (
|
201
|
+
read: (e) => k.read(e)
|
193
202
|
},
|
194
203
|
options: {
|
195
|
-
owner:
|
204
|
+
owner: m(s).params._id
|
196
205
|
},
|
197
206
|
class: "gap-thin cols-1"
|
198
207
|
}, {
|
199
|
-
default:
|
200
|
-
items:
|
208
|
+
default: p(({
|
209
|
+
items: e
|
201
210
|
}) => [
|
202
|
-
(
|
203
|
-
key:
|
211
|
+
(o(!0), l(g, null, y(e, (t) => (o(), d(x, {
|
212
|
+
key: a.index,
|
204
213
|
user: { type: "invite" },
|
205
|
-
name:
|
206
|
-
role:
|
214
|
+
name: t.email || t.phone,
|
215
|
+
role: t.status,
|
207
216
|
action: {
|
208
217
|
label: {
|
209
218
|
is: M,
|
210
219
|
props: { class: "i-medium", fill: "rgb(var(--white)" }
|
211
220
|
},
|
212
|
-
method: () =>
|
221
|
+
method: () => D(a.index, t)
|
213
222
|
},
|
214
223
|
class: "h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium"
|
215
224
|
}, null, 8, ["name", "role", "action"]))), 128))
|
216
225
|
]),
|
217
226
|
_: 1
|
218
|
-
}, 8, ["store", "options"])
|
219
|
-
])) :
|
227
|
+
}, 8, ["items", "store", "options"])
|
228
|
+
])) : b("", !0)
|
220
229
|
]);
|
221
230
|
};
|
222
231
|
}
|
223
232
|
};
|
224
233
|
export {
|
225
|
-
|
234
|
+
he as default
|
226
235
|
};
|
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"),d=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");;/* empty css */const
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");;/* empty css */const f=require("../../../../components/Tab/Tab.vue2.cjs"),k=require("../../../../components/Block/Block.vue.cjs"),c=require("../../../../components/Feed/Feed.vue.cjs"),b=require("../../../community/components/blocks/CardBlogpost.vue.cjs");;/* empty css */require("../../../../components/Menu/MenuItem.vue.cjs");;/* empty css */const h=require("../../../events/components/sections/Feed.vue.cjs"),g=require("../../../spots/components/blocks/CardSpot.vue.cjs"),v=,/* empty css */B=require("../../../products/components/pages/Products.vue.cjs"),o=require("../../../auth/store/auth.cjs"),s=require("../../store/organizations.cjs"),q=require("../../store/memberships.cjs");require("../../store/departments.cjs");const C=require("../../../community/store/blogposts.cjs"),w=require("../../../spots/store/spots.cjs");;/* empty css */const N={key:0,class:"pd-thin for-transition w-100"},y={class:"pos-relative"},V={key:0},x={__name:"Organization",setup(z){d.useRouter();const t=d.useRoute();let m=t.query.tab?t.query.tab:"products";const l=e.ref(null);e.onMounted(async()=>{l.value=await s.actions.read({_id:t.params._id,user:o.state.user._id}),await q.actions.read({target:t.params._id})});const a=e.ref(m);return t.query.tab=a.value,(p,n)=>{const u=e.resolveComponent("router-link");return l.value?(e.openBlock(),e.createElementBlock("div",N,[e.createVNode(v.default,{organization:s.state.current,user:o.state.user,class:"mn-b-semi"},null,8,["organization","user"]),e.createVNode(f.default,{selected:a.value,"onUpdate:selected":n[0]||(n[0]=r=>a.value=r),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-light"},null,8,["selected"]),e.createElementVNode("div",y,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="community"?(e.openBlock(),e.createBlock(c.default,{key:0,showLoadMore:!1,states:{empty:{title:"No Blog Posts Found",description:"Currently, there are no posts available in this blog. Please check back later."}},store:{read:r=>C.read(r)},options:{status:"published",user:o.state.user._id,owner:e.unref(t).params._id},class:"row-1 gap-thin"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,i=>(e.openBlock(),e.createBlock(b.default,{key:i._id,blogpost:i,user:o.state.user._id,class:"h-max-40r mn-b-medium"},null,8,["blogpost","user"]))),128))]),_:1},8,["store","options"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="events"?(e.openBlock(),e.createBlock(h.default,{key:0,user:o.state.user._id,owner:e.unref(t).params._id,sortOrder:"desc",sortParam:"date.start"},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),a.value==="products"&&o.state.user._id===s.state.current.owner?(e.openBlock(),e.createBlock(k.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(()=>[a.value==="products"?(e.openBlock(),e.createBlock(B.default,{key:0,organization:s.state.current},null,8,["organization"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="spots"?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(c.default,{states:{empty:{title:"No Spots Found",description:"Currently, there are no spots available."}},store:{read:r=>w.actions.read(e.unref(t).params._id),state:s.state},options:{user:o.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(i,_)=>(e.openBlock(),e.createBlock(g.default,{key:_,spot:i,organization:s.state.current,class:"radius-big bg-light mn-b-thin"},null,8,["spot","organization"]))),128))]),_:1},8,["store","options"]),o.state.user._id===s.state.current.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[1]||(n[1]=r=>p.$router.push(`/spots/${s.state.current._id}/spots/create`)),class:"mn-b-thin bg-main button w-100"}," Add spot ")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})])])):e.createCommentVNode("",!0)}}};exports.default=x;
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js
CHANGED
@@ -1,55 +1,54 @@
|
|
1
|
-
import { ref as
|
2
|
-
import { useRouter as
|
1
|
+
import { ref as v, onMounted as z, resolveComponent as C, openBlock as t, createElementBlock as d, createVNode as r, createElementVNode as B, Transition as _, withCtx as a, createBlock as m, unref as l, Fragment as h, renderList as k, createCommentVNode as n, createTextVNode as b } from "vue";
|
2
|
+
import { useRouter as N, useRoute as P } from "vue-router";
|
3
3
|
import "vue-i18n";
|
4
4
|
import "../../../globals/localization/vue-i18n.js";
|
5
5
|
/* empty css */
|
6
6
|
import M from "../../../../components/Tab/Tab.vue2.js";
|
7
7
|
import O from "../../../../components/Block/Block.vue.js";
|
8
|
-
import
|
9
|
-
import
|
10
|
-
/* empty css
|
8
|
+
import y from "../../../../components/Feed/Feed.vue.js";
|
9
|
+
import V from "../../../community/components/blocks/CardBlogpost.vue.js";
|
10
|
+
/* empty css */
|
11
11
|
import "../../../../components/Menu/MenuItem.vue.js";
|
12
12
|
/* empty css */
|
13
|
-
import
|
14
|
-
import
|
15
|
-
import
|
16
|
-
import
|
13
|
+
import q from "../../../events/components/sections/Feed.vue.js";
|
14
|
+
import A from "../../../spots/components/blocks/CardSpot.vue.js";
|
15
|
+
import E from "../sections/DetailsTab.vue.js";
|
16
|
+
import F from "../../../products/components/pages/Products.vue.js";
|
17
17
|
import { state as i } from "../../../auth/store/auth.js";
|
18
|
-
import { actions as
|
19
|
-
import { actions as
|
18
|
+
import { actions as L, state as u } from "../../store/organizations.js";
|
19
|
+
import { actions as S } from "../../store/memberships.js";
|
20
20
|
import "../../store/departments.js";
|
21
|
-
import { read as
|
22
|
-
import { actions as
|
21
|
+
import { read as R } from "../../../community/store/blogposts.js";
|
22
|
+
import { actions as T } from "../../../spots/store/spots.js";
|
23
23
|
/* empty css */
|
24
|
-
const
|
24
|
+
const D = {
|
25
25
|
key: 0,
|
26
26
|
class: "pd-thin for-transition w-100"
|
27
|
-
},
|
27
|
+
}, G = { class: "pos-relative" }, I = { key: 0 }, _e = {
|
28
28
|
__name: "Organization",
|
29
|
-
setup(
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
29
|
+
setup(U) {
|
30
|
+
N();
|
31
|
+
const e = P();
|
32
|
+
let w = e.query.tab ? e.query.tab : "products";
|
33
|
+
const g = v(null);
|
34
|
+
z(async () => {
|
35
|
+
g.value = await L.read({
|
35
36
|
_id: e.params._id,
|
36
37
|
user: i.user._id
|
37
|
-
}), await
|
38
|
+
}), await S.read({ target: e.params._id });
|
38
39
|
});
|
39
|
-
const
|
40
|
-
return e.query.tab =
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
return g.value ? (t(), d("div", I, [
|
45
|
-
r(L, {
|
40
|
+
const s = v(w);
|
41
|
+
return e.query.tab = s.value, ($, p) => {
|
42
|
+
const f = C("router-link");
|
43
|
+
return g.value ? (t(), d("div", D, [
|
44
|
+
r(E, {
|
46
45
|
organization: u.current,
|
47
46
|
user: i.user,
|
48
47
|
class: "mn-b-semi"
|
49
48
|
}, null, 8, ["organization", "user"]),
|
50
49
|
r(M, {
|
51
|
-
selected:
|
52
|
-
"onUpdate:selected": p[0] || (p[0] = (
|
50
|
+
selected: s.value,
|
51
|
+
"onUpdate:selected": p[0] || (p[0] = (o) => s.value = o),
|
53
52
|
tabs: [
|
54
53
|
{ name: "Community", value: "community" },
|
55
54
|
{ name: "Menu", value: "products" },
|
@@ -58,10 +57,10 @@ const I = {
|
|
58
57
|
],
|
59
58
|
class: "mn-b-small o-hidden h5 radius-big bg-light"
|
60
59
|
}, null, 8, ["selected"]),
|
61
|
-
|
60
|
+
B("div", G, [
|
62
61
|
r(_, { name: "slide-fade" }, {
|
63
62
|
default: a(() => [
|
64
|
-
|
63
|
+
s.value === "community" ? (t(), m(y, {
|
65
64
|
key: 0,
|
66
65
|
showLoadMore: !1,
|
67
66
|
states: {
|
@@ -71,19 +70,19 @@ const I = {
|
|
71
70
|
}
|
72
71
|
},
|
73
72
|
store: {
|
74
|
-
read: (
|
73
|
+
read: (o) => R(o)
|
75
74
|
},
|
76
75
|
options: {
|
77
76
|
status: "published",
|
78
77
|
user: i.user._id,
|
79
|
-
owner:
|
78
|
+
owner: l(e).params._id
|
80
79
|
},
|
81
80
|
class: "row-1 gap-thin"
|
82
81
|
}, {
|
83
82
|
default: a(({
|
84
|
-
items:
|
83
|
+
items: o
|
85
84
|
}) => [
|
86
|
-
(t(!0), d(
|
85
|
+
(t(!0), d(h, null, k(o, (c) => (t(), m(V, {
|
87
86
|
key: c._id,
|
88
87
|
blogpost: c,
|
89
88
|
user: i.user._id,
|
@@ -97,17 +96,17 @@ const I = {
|
|
97
96
|
}),
|
98
97
|
r(_, { name: "slide-fade" }, {
|
99
98
|
default: a(() => [
|
100
|
-
|
99
|
+
s.value === "events" ? (t(), m(q, {
|
101
100
|
key: 0,
|
102
101
|
user: i.user._id,
|
103
|
-
owner:
|
102
|
+
owner: l(e).params._id,
|
104
103
|
sortOrder: "desc",
|
105
104
|
sortParam: "date.start"
|
106
105
|
}, null, 8, ["user", "owner"])) : n("", !0)
|
107
106
|
]),
|
108
107
|
_: 1
|
109
108
|
}),
|
110
|
-
|
109
|
+
s.value === "products" && i.user._id === u.current.owner ? (t(), m(O, {
|
111
110
|
key: 0,
|
112
111
|
class: "flex-nowrap gap-thin mn-b-small flex"
|
113
112
|
}, {
|
@@ -117,7 +116,7 @@ const I = {
|
|
117
116
|
to: {
|
118
117
|
name: "ProductAdd",
|
119
118
|
params: {
|
120
|
-
_id:
|
119
|
+
_id: l(e).params._id
|
121
120
|
}
|
122
121
|
}
|
123
122
|
}, {
|
@@ -131,7 +130,7 @@ const I = {
|
|
131
130
|
to: {
|
132
131
|
name: "Leftovers",
|
133
132
|
params: {
|
134
|
-
_id:
|
133
|
+
_id: l(e).params._id
|
135
134
|
}
|
136
135
|
}
|
137
136
|
}, {
|
@@ -145,7 +144,7 @@ const I = {
|
|
145
144
|
to: {
|
146
145
|
name: "Backoffice",
|
147
146
|
params: {
|
148
|
-
_id:
|
147
|
+
_id: l(e).params._id
|
149
148
|
}
|
150
149
|
}
|
151
150
|
}, {
|
@@ -159,7 +158,7 @@ const I = {
|
|
159
158
|
})) : n("", !0),
|
160
159
|
r(_, { name: "slide-fade" }, {
|
161
160
|
default: a(() => [
|
162
|
-
|
161
|
+
s.value === "products" ? (t(), m(F, {
|
163
162
|
key: 0,
|
164
163
|
organization: u.current
|
165
164
|
}, null, 8, ["organization"])) : n("", !0)
|
@@ -168,8 +167,8 @@ const I = {
|
|
168
167
|
}),
|
169
168
|
r(_, { name: "slide-fade" }, {
|
170
169
|
default: a(() => [
|
171
|
-
|
172
|
-
r(
|
170
|
+
s.value === "spots" ? (t(), d("div", I, [
|
171
|
+
r(y, {
|
173
172
|
states: {
|
174
173
|
empty: {
|
175
174
|
title: "No Spots Found",
|
@@ -177,7 +176,7 @@ const I = {
|
|
177
176
|
}
|
178
177
|
},
|
179
178
|
store: {
|
180
|
-
read: (
|
179
|
+
read: (o) => T.read(l(e).params._id),
|
181
180
|
state: u
|
182
181
|
},
|
183
182
|
options: {
|
@@ -188,10 +187,10 @@ const I = {
|
|
188
187
|
}
|
189
188
|
}, {
|
190
189
|
default: a(({
|
191
|
-
items:
|
190
|
+
items: o
|
192
191
|
}) => [
|
193
|
-
(t(!0), d(
|
194
|
-
key:
|
192
|
+
(t(!0), d(h, null, k(o, (c, x) => (t(), m(A, {
|
193
|
+
key: x,
|
195
194
|
spot: c,
|
196
195
|
organization: u.current,
|
197
196
|
class: "radius-big bg-light mn-b-thin"
|
@@ -201,7 +200,7 @@ const I = {
|
|
201
200
|
}, 8, ["store", "options"]),
|
202
201
|
i.user._id === u.current.owner ? (t(), d("button", {
|
203
202
|
key: 0,
|
204
|
-
onClick: p[1] || (p[1] = (
|
203
|
+
onClick: p[1] || (p[1] = (o) => $.$router.push(`/spots/${u.current._id}/spots/create`)),
|
205
204
|
class: "mn-b-thin bg-main button w-100"
|
206
205
|
}, " Add spot ")) : n("", !0)
|
207
206
|
])) : n("", !0)
|
@@ -214,5 +213,5 @@ const I = {
|
|
214
213
|
}
|
215
214
|
};
|
216
215
|
export {
|
217
|
-
|
216
|
+
_e as default
|
218
217
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../../../../components/Menu/Menu.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../../../../components/Menu/Menu.vue2.cjs"),o=require("../../../../components/Menu/MenuItem.vue.cjs");;/* empty css */const l=require("../../../icons/entities/IconProducts.vue.cjs"),d=require("../../../icons/entities/IconEvents.vue.cjs"),m=require("../../../icons/entities/IconGroups.vue.cjs"),f=require("../../../icons/entities/IconGallery.vue.cjs"),p=require("../../../icons/entities/IconOrders.vue.cjs"),_=require("../../../icons/entities/IconLeftovers.vue.cjs"),u=require("vue-router"),n=require("../../../auth/store/auth.cjs");require("../../store/organizations.cjs");const k={class:""},h=e.createElementVNode("h1",{class:"pd-medium radius-medium bg-light mn-b-small"},"Welcome to Backoffice",-1),v=e.createElementVNode("span",null," Members ",-1),N=e.createElementVNode("span",null," Products ",-1),V=e.createElementVNode("span",null," Leftovers ",-1),B=e.createElementVNode("span",null," Orders ",-1),C=e.createElementVNode("span",null," Gallery ",-1),b=e.createElementVNode("span",null," Events ",-1),g={__name:"OrganizationBackoffice",props:{favorites:Array},setup(q){const r=u.useRoute(),t=u.useRouter();return e.ref(null),e.ref([]),e.onMounted(async()=>{}),(a,s)=>(e.openBlock(),e.createElementBlock("div",k,[h,e.createVNode(i.default,{class:"bg-light mn-b-semi"},{default:e.withCtx(()=>[a.hasAccess(e.unref(r).params._id,"members","read",n.state.accesses)?(e.openBlock(),e.createBlock(o.default,{key:0,onClick:s[0]||(s[0]=c=>e.unref(t).push({name:"Organization Members",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(m.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),v]),_:1})):e.createCommentVNode("",!0),a.hasAccess(e.unref(r).params._id,"products","read",n.state.accesses)?(e.openBlock(),e.createBlock(o.default,{key:1,onClick:s[1]||(s[1]=c=>e.unref(t).push({name:"Products",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(l.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),N]),_:1})):e.createCommentVNode("",!0),a.hasAccess(e.unref(r).params._id,"leftovers","read",n.state.accesses)?(e.openBlock(),e.createBlock(o.default,{key:2,onClick:s[2]||(s[2]=c=>e.unref(t).push({name:"Leftovers",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(_.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),V]),_:1})):e.createCommentVNode("",!0),a.hasAccess(e.unref(r).params._id,"orders","read",n.state.accesses)?(e.openBlock(),e.createBlock(o.default,{key:3,onClick:s[3]||(s[3]=c=>e.unref(t).push({name:"Backoffice Orders",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(p.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),B]),_:1})):e.createCommentVNode("",!0),a.hasAccess(e.unref(r).params._id,"gallery","read",n.state.accesses)?(e.openBlock(),e.createBlock(o.default,{key:4,onClick:s[4]||(s[4]=c=>e.unref(t).push({name:"Backoffice Gallery",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),C]),_:1})):e.createCommentVNode("",!0),a.hasAccess(e.unref(r).params._id,"events","read",n.state.accesses)?(e.openBlock(),e.createBlock(o.default,{key:5,onClick:s[5]||(s[5]=c=>e.unref(t).push({name:"Backoffice Events",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(d.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),b]),_:1})):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=g;
|