@ozdao/prometheus-framework 0.0.87 → 0.0.88
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Feed-51e4e232.js +1 -0
- package/dist/Feed-dc8b66bf.mjs +367 -0
- package/dist/Image-6c7584f5.mjs +477 -0
- package/dist/Image-9a870c88.js +9 -0
- package/dist/Product-1724d88d.mjs +837 -0
- package/dist/Product-a94d8b65.js +7 -0
- package/dist/ProductEdit-57484f1e.mjs +349 -0
- package/dist/ProductEdit-ef301baa.js +1 -0
- package/dist/ProfileEvents-1cfe6858.mjs +55 -0
- package/dist/ProfileEvents-d8e16509.js +1 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +197 -214
- package/dist/events.client.cjs +1 -1
- package/dist/events.client.js +328 -309
- package/dist/events.server.js +77 -0
- package/dist/events.server.mjs +77 -0
- package/dist/organizations.client-686845be.mjs +3179 -0
- package/dist/organizations.client-99bfc474.js +3 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +2 -2
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +1 -1
- package/package.json +1 -1
- package/src/modules/events/components/blocks/CardEvent.vue +1 -1
- package/src/modules/events/components/pages/EditEvent.vue +7 -2
- package/src/modules/events/components/pages/Event.vue +43 -4
- package/src/modules/events/middlewares/server/index.js +10 -0
- package/src/modules/events/middlewares/server/verifyEvent.js +60 -0
- package/src/modules/events/routes/events.routes.js +14 -1
package/dist/events.client.js
CHANGED
@@ -1,31 +1,31 @@
|
|
1
|
-
import { r as F, a as J, s as D, c as
|
2
|
-
import { e as
|
3
|
-
import { openBlock as
|
4
|
-
import { _ as
|
5
|
-
import { _ as
|
6
|
-
import { useRoute as
|
7
|
-
import { _ as
|
8
|
-
import { _ as
|
9
|
-
import { _ as
|
10
|
-
import { _ as
|
11
|
-
import { a as
|
12
|
-
import { s as
|
1
|
+
import { r as F, a as J, s as D, c as X, u as V, b as A, S as Z, _ as ee } from "./Feed-dc8b66bf.mjs";
|
2
|
+
import { e as vt } from "./Feed-dc8b66bf.mjs";
|
3
|
+
import { openBlock as d, createElementBlock as _, createStaticVNode as te, ref as w, onMounted as j, createVNode as v, TransitionGroup as U, withCtx as x, Fragment as P, renderList as T, createBlock as $, createCommentVNode as b, Transition as q, normalizeClass as N, createElementVNode as h, unref as m, toDisplayString as L, watch as W, resolveComponent as ae, resolveDynamicComponent as Y, createTextVNode as B, reactive as re, mergeProps as ne } from "vue";
|
4
|
+
import { _ as G } from "./EmptyState-34d85f10.mjs";
|
5
|
+
import { _ as Q, s as k, F as C, b as K, a as se } from "./auth-35ef1791.mjs";
|
6
|
+
import { useRoute as z, useRouter as M } from "vue-router";
|
7
|
+
import { _ as oe, S as le, C as ie } from "./Breadcrumbs.vue_vue_type_style_index_0_lang-cdbafd07.mjs";
|
8
|
+
import { _ as ue, a as ce, b as de } from "./Image-6c7584f5.mjs";
|
9
|
+
import { _ as pe } from "./Popup-82fb2c8a.mjs";
|
10
|
+
import { _ as me } from "./UploadImage-ff8f9a0c.mjs";
|
11
|
+
import { a as fe } from "./organizations-1b4c84ee.mjs";
|
12
|
+
import { s as I } from "./globals-96ba60e4.mjs";
|
13
13
|
import "vue-i18n";
|
14
14
|
import "./CardHeader-ce5a1a75.mjs";
|
15
15
|
import "./PlaceholderUserpic-995da0fc.mjs";
|
16
16
|
import "./vue-draggable-next.esm-bundler-ff6e3f52.mjs";
|
17
|
-
const
|
17
|
+
const ge = {}, ve = {
|
18
18
|
width: "100%",
|
19
19
|
height: "50",
|
20
20
|
xmlns: "http://www.w3.org/2000/svg"
|
21
|
-
},
|
22
|
-
|
21
|
+
}, _e = /* @__PURE__ */ te('<rect x="0" y="0" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="3" ry="3" width="40" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="65" y="15" rx="3" ry="3" width="150" height="20" fill="rgba(var(--black),0.05)"></rect><circle cx="250" cy="25" r="10" fill="rgba(var(--black),0.1)"></circle><circle cx="265" cy="25" r="10" fill="rgba(var(--black),0.05)"></circle><circle cx="280" cy="25" r="10" fill="rgba(var(--black),0.025)"></circle><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>', 7), he = [
|
22
|
+
_e
|
23
23
|
];
|
24
|
-
function
|
25
|
-
return
|
24
|
+
function ye(p, t) {
|
25
|
+
return d(), _("svg", ve, he);
|
26
26
|
}
|
27
|
-
const
|
28
|
-
const
|
27
|
+
const be = /* @__PURE__ */ Q(ge, [["render", ye]]);
|
28
|
+
const we = { class: "today-events" }, pt = {
|
29
29
|
__name: "List",
|
30
30
|
props: {
|
31
31
|
category: {
|
@@ -53,12 +53,12 @@ const ye = { class: "today-events" }, ct = {
|
|
53
53
|
default: null
|
54
54
|
}
|
55
55
|
},
|
56
|
-
setup(
|
57
|
-
const t =
|
58
|
-
return
|
56
|
+
setup(p) {
|
57
|
+
const t = p, r = w([]), e = w(!0), l = w(0), i = w(5);
|
58
|
+
return j(async () => {
|
59
59
|
const a = await F({
|
60
|
-
skip:
|
61
|
-
limit:
|
60
|
+
skip: l.value,
|
61
|
+
limit: i.value,
|
62
62
|
sortOrder: "desc",
|
63
63
|
category: t.category,
|
64
64
|
user: t.user,
|
@@ -68,160 +68,160 @@ const ye = { class: "today-events" }, ct = {
|
|
68
68
|
status: t.status
|
69
69
|
});
|
70
70
|
r.value = a, e.value = !1;
|
71
|
-
}), (a,
|
72
|
-
|
71
|
+
}), (a, n) => (d(), _("section", we, [
|
72
|
+
v(U, {
|
73
73
|
tag: "ul",
|
74
74
|
name: "fade",
|
75
75
|
class: "o-hidden bg-grey radius-big"
|
76
76
|
}, {
|
77
|
-
default:
|
78
|
-
e.value ? (
|
77
|
+
default: x(() => [
|
78
|
+
e.value ? (d(!0), _(P, { key: 0 }, T(i.value, (c) => (d(), $(be, { key: c }))), 128)) : b("", !0)
|
79
79
|
]),
|
80
80
|
_: 1
|
81
81
|
}),
|
82
|
-
|
83
|
-
default:
|
84
|
-
!e.value && r.value.length < 1 ? (
|
82
|
+
v(q, { name: "fade" }, {
|
83
|
+
default: x(() => [
|
84
|
+
!e.value && r.value.length < 1 ? (d(), $(G, {
|
85
85
|
key: 0,
|
86
86
|
title: "No Events Today",
|
87
87
|
description: "Today, are no events available. Please check back later.",
|
88
88
|
class: "pd-medium mn-thin bg-grey radius-big"
|
89
|
-
})) :
|
89
|
+
})) : b("", !0)
|
90
90
|
]),
|
91
91
|
_: 1
|
92
92
|
}),
|
93
|
-
|
93
|
+
v(U, {
|
94
94
|
tag: "ul",
|
95
95
|
name: "fade",
|
96
96
|
class: "container"
|
97
97
|
}, {
|
98
|
-
default:
|
99
|
-
!e.value && r.value.length > 0 ? (
|
100
|
-
onClick: (
|
101
|
-
key:
|
102
|
-
event:
|
103
|
-
owner:
|
98
|
+
default: x(() => [
|
99
|
+
!e.value && r.value.length > 0 ? (d(!0), _(P, { key: 0 }, T(r.value, (c, g) => (d(), $(J, {
|
100
|
+
onClick: (y) => a.$router.push({ name: "Event", params: { url: c.url } }),
|
101
|
+
key: c._id,
|
102
|
+
event: c,
|
103
|
+
owner: p.user,
|
104
104
|
type: "short",
|
105
|
-
class:
|
106
|
-
"br-b br-solid br-black-transp-10":
|
105
|
+
class: N(["pd-medium", {
|
106
|
+
"br-b br-solid br-black-transp-10": g !== r.value.length - 1
|
107
107
|
}])
|
108
|
-
}, null, 8, ["onClick", "event", "owner", "class"]))), 128)) :
|
108
|
+
}, null, 8, ["onClick", "event", "owner", "class"]))), 128)) : b("", !0)
|
109
109
|
]),
|
110
110
|
_: 1
|
111
111
|
})
|
112
112
|
]));
|
113
113
|
}
|
114
|
-
},
|
114
|
+
}, ke = ["onClick"], xe = { class: "t-transp" }, $e = {
|
115
115
|
__name: "DatePicker",
|
116
116
|
props: ["date", "locale"],
|
117
|
-
setup(
|
118
|
-
const r =
|
119
|
-
let
|
117
|
+
setup(p, { emit: t }) {
|
118
|
+
const r = p, e = w(null);
|
119
|
+
let l;
|
120
120
|
if (r.date) {
|
121
|
-
const
|
122
|
-
|
121
|
+
const u = parseInt(r.date.substring(0, 2)), E = parseInt(r.date.substring(2, 4)) - 1, s = parseInt(r.date.substring(4));
|
122
|
+
l = new Date(s, E, u), console.log("Data" + l);
|
123
123
|
} else
|
124
|
-
|
125
|
-
|
126
|
-
const
|
127
|
-
|
124
|
+
l = /* @__PURE__ */ new Date(), console.log("No data" + l);
|
125
|
+
l.setHours(0, 0, 0, 0);
|
126
|
+
const i = w(new Date(l)), a = y(l, 30);
|
127
|
+
j(() => {
|
128
128
|
if (e.value) {
|
129
|
-
const
|
130
|
-
|
129
|
+
const u = e.value.getElementsByClassName("selected")[0] || e.value.getElementsByClassName("bg-main")[0];
|
130
|
+
u && (e.value.scrollLeft = u.offsetLeft - e.value.offsetWidth / 2 + u.offsetWidth / 2);
|
131
131
|
}
|
132
132
|
});
|
133
|
-
function u
|
134
|
-
|
135
|
-
const E =
|
133
|
+
function n(u) {
|
134
|
+
i.value = u;
|
135
|
+
const E = c(u);
|
136
136
|
t("update:date", E);
|
137
137
|
}
|
138
|
-
function
|
139
|
-
return `${
|
138
|
+
function c(u) {
|
139
|
+
return `${u.getDate().toString().padStart(2, "0")}${(u.getMonth() + 1).toString().padStart(2, "0")}${u.getFullYear()}`;
|
140
140
|
}
|
141
|
-
function
|
142
|
-
return
|
141
|
+
function g(u) {
|
142
|
+
return u.toLocaleDateString(r.locale ? r.locale : "en", { weekday: "narrow" }).toUpperCase();
|
143
143
|
}
|
144
|
-
function
|
145
|
-
const
|
144
|
+
function y(u, E) {
|
145
|
+
const s = [];
|
146
146
|
for (let o = -15; o < E - 15; o++) {
|
147
|
-
const
|
148
|
-
|
147
|
+
const f = new Date(u);
|
148
|
+
f.setDate(u.getDate() + o), f.setHours(0, 0, 0, 0), s.push(f);
|
149
149
|
}
|
150
|
-
return
|
150
|
+
return s;
|
151
151
|
}
|
152
|
-
return (
|
153
|
-
|
152
|
+
return (u, E) => (d(), _("div", null, [
|
153
|
+
h("div", {
|
154
154
|
class: "w-100 o-scroll flex-nowrap flex",
|
155
155
|
ref_key: "scrollContainer",
|
156
156
|
ref: e,
|
157
157
|
style: { "scroll-snap-type": "x mandatory" }
|
158
158
|
}, [
|
159
|
-
(
|
160
|
-
key:
|
161
|
-
onClick: (o) =>
|
162
|
-
class:
|
163
|
-
selected:
|
159
|
+
(d(!0), _(P, null, T(m(a), (s) => (d(), _("div", {
|
160
|
+
key: s.toString(),
|
161
|
+
onClick: (o) => n(s),
|
162
|
+
class: N([{
|
163
|
+
selected: i.value.toDateString() === s.toDateString()
|
164
164
|
}, "cursor-pointer mn-r-small mn-l-small flex-column flex-center flex"])
|
165
165
|
}, [
|
166
|
-
|
167
|
-
|
168
|
-
class:
|
169
|
-
"bg-main":
|
166
|
+
h("span", xe, L(g(s)), 1),
|
167
|
+
h("span", {
|
168
|
+
class: N([{
|
169
|
+
"bg-main": i.value.toDateString() === s.toDateString()
|
170
170
|
}, "transition-ease-in-out t-semi flex-center flex radius-big i-semi day-number"])
|
171
|
-
},
|
172
|
-
], 10,
|
171
|
+
}, L(s.getDate()), 3)
|
172
|
+
], 10, ke))), 128))
|
173
173
|
], 512)
|
174
174
|
]));
|
175
175
|
}
|
176
|
-
},
|
176
|
+
}, Ee = { class: "pd-thin min-h-100vh" }, De = /* @__PURE__ */ h("div", { class: "mn-thin br-solid br-1px br-grey bg-grey radius-big" }, null, -1), Se = { class: "" }, Pe = {
|
177
177
|
__name: "layoutEvents",
|
178
|
-
setup(
|
179
|
-
const t =
|
180
|
-
function
|
178
|
+
setup(p) {
|
179
|
+
const t = z(), r = M(), l = i(/* @__PURE__ */ new Date());
|
180
|
+
function i(a) {
|
181
181
|
return `${a.getDate().toString().padStart(2, "0")}${(a.getMonth() + 1).toString().padStart(2, "0")}${a.getFullYear()}`;
|
182
182
|
}
|
183
183
|
if (t.query) {
|
184
|
-
const a = t.query,
|
184
|
+
const a = t.query, n = {
|
185
185
|
tags: a.tags ? a.tags.split(",") : null,
|
186
|
-
date: a.date ? a.date :
|
186
|
+
date: a.date ? a.date : l
|
187
187
|
};
|
188
|
-
D.filter =
|
188
|
+
D.filter = n;
|
189
189
|
} else {
|
190
190
|
const a = {
|
191
|
-
date:
|
191
|
+
date: l
|
192
192
|
};
|
193
193
|
D.filter = a;
|
194
194
|
}
|
195
|
-
return
|
196
|
-
const
|
197
|
-
Object.keys(
|
198
|
-
|
195
|
+
return W(() => D.filter, (a, n) => {
|
196
|
+
const c = { ...t.query };
|
197
|
+
Object.keys(n).forEach((y) => {
|
198
|
+
c[y] && delete c[y];
|
199
199
|
});
|
200
|
-
const
|
201
|
-
Object.entries(a).filter(([
|
200
|
+
const g = Object.fromEntries(
|
201
|
+
Object.entries(a).filter(([y, u]) => Array.isArray(u) && u.length > 0 || typeof u == "string" && u).map(([y, u]) => [y, Array.isArray(u) ? u.join(",") : u])
|
202
202
|
);
|
203
|
-
Object.assign(
|
204
|
-
}, { deep: !0 }), (a,
|
205
|
-
const
|
206
|
-
return
|
207
|
-
|
203
|
+
Object.assign(c, g), r.push({ query: c });
|
204
|
+
}, { deep: !0 }), (a, n) => {
|
205
|
+
const c = ae("router-view");
|
206
|
+
return d(), _("div", Ee, [
|
207
|
+
v($e, {
|
208
208
|
date: D.filter.date,
|
209
|
-
"onUpdate:date":
|
209
|
+
"onUpdate:date": n[0] || (n[0] = (g) => D.filter.date = g),
|
210
210
|
locale: a.$i18n.locale,
|
211
211
|
class: "radius-small bg-grey pd-l-zero pd-r-zero pd-medium"
|
212
212
|
}, null, 8, ["date", "locale"]),
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
default:
|
217
|
-
|
213
|
+
De,
|
214
|
+
h("section", Se, [
|
215
|
+
v(c, null, {
|
216
|
+
default: x(({ Component: g, route: y }) => [
|
217
|
+
v(q, {
|
218
218
|
name: "scaleIn",
|
219
219
|
mode: "out-in"
|
220
220
|
}, {
|
221
|
-
default:
|
222
|
-
(
|
221
|
+
default: x(() => [
|
222
|
+
(d(), $(Y(g), {
|
223
223
|
ref: "page",
|
224
|
-
key:
|
224
|
+
key: y.query
|
225
225
|
}))
|
226
226
|
]),
|
227
227
|
_: 2
|
@@ -233,33 +233,33 @@ const ye = { class: "today-events" }, ct = {
|
|
233
233
|
]);
|
234
234
|
};
|
235
235
|
}
|
236
|
-
},
|
236
|
+
}, Te = {
|
237
237
|
key: 0,
|
238
238
|
class: "pd-thin"
|
239
|
-
},
|
239
|
+
}, Ce = { class: "mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex" }, Ie = /* @__PURE__ */ h("h4", null, "Upload Event Cover", -1), Oe = /* @__PURE__ */ h("h3", { class: "mn-small" }, "Date", -1), Ue = /* @__PURE__ */ h("h3", { class: "mn-small" }, "Description", -1), Le = {
|
240
240
|
key: 0,
|
241
|
-
class: "w-100 bg-grey pd-big radius-big"
|
241
|
+
class: "pd-b-extra w-100 bg-grey pd-big radius-big"
|
242
242
|
}, je = {
|
243
243
|
key: 1,
|
244
244
|
class: "pd-thin pos-fixed pos-l-0 pos-b-0 w-100"
|
245
|
-
},
|
245
|
+
}, ze = { class: "pd-thin radius-big bg-main w-100 flex-nowrap flex" }, Ne = { class: "w-m-66r t-left pd-big bg-white radius-big" }, Be = /* @__PURE__ */ h("h3", { class: "mn-small" }, "Final Touches", -1), Fe = /* @__PURE__ */ h("h5", { class: "mn-thin" }, "Add to public:", -1), qe = {
|
246
246
|
key: 0,
|
247
247
|
class: "mn-thin"
|
248
|
-
},
|
248
|
+
}, Me = {
|
249
249
|
key: 1,
|
250
250
|
class: "mn-medium br-grey br-2px br-solid pd-small radius-big"
|
251
|
-
},
|
251
|
+
}, Ve = {
|
252
252
|
__name: "EditEvent",
|
253
|
-
setup(
|
254
|
-
const t =
|
255
|
-
let e =
|
256
|
-
const
|
257
|
-
|
253
|
+
setup(p) {
|
254
|
+
const t = z(), r = M();
|
255
|
+
let e = w(null), l = w(null);
|
256
|
+
const i = w([]), a = w(null);
|
257
|
+
j(async () => {
|
258
258
|
if (t.params.url) {
|
259
259
|
const o = await F({ user: k.user._id, url: t.params.url });
|
260
|
-
e.value = o.pop();
|
260
|
+
e.value = o.pop(), e.value.date.start = e.value.date.start.slice(0, 16), e.value.date.end = e.value.date.end.slice(0, 16);
|
261
261
|
} else
|
262
|
-
|
262
|
+
X(), e.value = D.current;
|
263
263
|
e.value.owner || (e.value.owner = {
|
264
264
|
target: k.user._id,
|
265
265
|
type: "user"
|
@@ -272,136 +272,137 @@ const ye = { class: "today-events" }, ct = {
|
|
272
272
|
name: e.value.owner.target.profile.name,
|
273
273
|
photo: e.value.owner.target.profile.photo
|
274
274
|
});
|
275
|
-
const
|
275
|
+
const s = await fe.read({
|
276
276
|
user: k.user._id,
|
277
277
|
postable: k.user._id
|
278
278
|
});
|
279
|
-
|
279
|
+
l.value = s.map((o) => ({
|
280
280
|
name: o.profile.name,
|
281
281
|
_id: o._id,
|
282
282
|
photo: o.profile.photo
|
283
283
|
}));
|
284
284
|
});
|
285
|
-
const
|
286
|
-
function
|
287
|
-
|
285
|
+
const n = w(!1);
|
286
|
+
function c() {
|
287
|
+
n.value = !0;
|
288
288
|
}
|
289
|
-
function
|
290
|
-
|
289
|
+
function g() {
|
290
|
+
n.value = !1;
|
291
291
|
}
|
292
|
-
function
|
293
|
-
|
294
|
-
r.push({ name: "Event", params: { url:
|
295
|
-
}).catch((
|
296
|
-
console.error(
|
297
|
-
}) : A(e.value).then((
|
298
|
-
r.push({ name: "Event", params: { url:
|
299
|
-
}).catch((
|
300
|
-
console.error(
|
292
|
+
function y() {
|
293
|
+
i.value.length > 0 && i.value.map((s) => s.text), e.value.status = "draft", t.params.url ? V(e.value).then((s) => {
|
294
|
+
r.push({ name: "Event", params: { url: s.url } });
|
295
|
+
}).catch((s) => {
|
296
|
+
console.error(s);
|
297
|
+
}) : A(e.value).then((s) => {
|
298
|
+
r.push({ name: "Event", params: { url: s.url } });
|
299
|
+
}).catch((s) => {
|
300
|
+
console.error(s);
|
301
301
|
});
|
302
302
|
}
|
303
|
-
function
|
304
|
-
confirm("Are you sure you want to delete this event?") && (void 0)(e.value._id).then((
|
303
|
+
function u() {
|
304
|
+
confirm("Are you sure you want to delete this event?") && (void 0)(e.value._id).then((s) => {
|
305
305
|
r.push({ name: "Drafts" });
|
306
|
-
}).catch((
|
307
|
-
console.error(
|
306
|
+
}).catch((s) => {
|
307
|
+
console.error(s);
|
308
308
|
});
|
309
309
|
}
|
310
310
|
function E() {
|
311
311
|
a.value && (e.value.owner = {
|
312
312
|
target: a.value._id,
|
313
313
|
type: "organization"
|
314
|
-
}), a.value || (e.value.creator.hidden = !1), a.value || (e.value.organization = e.value.creator), e.value.status = "published", console.log(e.value), t.params.url ? V(e.value).then((
|
315
|
-
r.push({ name: "Blogevent", params: { url:
|
316
|
-
}).catch((
|
317
|
-
console.log(
|
318
|
-
}) : A(e.value).then((
|
319
|
-
r.push({ name: "
|
320
|
-
}).catch((
|
321
|
-
console.log(
|
314
|
+
}), a.value || (e.value.creator.hidden = !1), a.value || (e.value.organization = e.value.creator), e.value.status = "published", console.log(e.value), t.params.url ? V(e.value).then((s) => {
|
315
|
+
r.push({ name: "Blogevent", params: { url: s.url } });
|
316
|
+
}).catch((s) => {
|
317
|
+
console.log(s);
|
318
|
+
}) : A(e.value).then((s) => {
|
319
|
+
r.push({ name: "Event", params: { url: s.url } });
|
320
|
+
}).catch((s) => {
|
321
|
+
console.log(s);
|
322
322
|
});
|
323
323
|
}
|
324
|
-
return (
|
325
|
-
|
326
|
-
|
327
|
-
photo:
|
328
|
-
"onUpdate:photo": o[0] || (o[0] = (
|
324
|
+
return (s, o) => m(e) ? (d(), _("article", Te, [
|
325
|
+
h("div", Ce, [
|
326
|
+
v(me, {
|
327
|
+
photo: m(e).cover,
|
328
|
+
"onUpdate:photo": o[0] || (o[0] = (f) => m(e).cover = f),
|
329
329
|
uploadPath: "users/" + k.user._id + "/events",
|
330
330
|
class: "h-4r w-4r aspect-1x1 o-hidden mn-thin radius-extra"
|
331
331
|
}, null, 8, ["photo", "uploadPath"]),
|
332
|
-
|
332
|
+
Ie
|
333
333
|
]),
|
334
|
-
|
335
|
-
field:
|
336
|
-
"onUpdate:field": o[1] || (o[1] = (
|
334
|
+
v(C, {
|
335
|
+
field: m(e).name,
|
336
|
+
"onUpdate:field": o[1] || (o[1] = (f) => m(e).name = f),
|
337
337
|
placeholder: "Event name",
|
338
338
|
class: "mn-thin w-100 bg-grey pd-medium radius-small"
|
339
339
|
}, null, 8, ["field"]),
|
340
|
-
|
341
|
-
field:
|
342
|
-
"onUpdate:field": o[2] || (o[2] = (
|
340
|
+
v(C, {
|
341
|
+
field: m(e).description,
|
342
|
+
"onUpdate:field": o[2] || (o[2] = (f) => m(e).description = f),
|
343
343
|
type: "textfield",
|
344
344
|
placeholder: "Enter short description",
|
345
345
|
class: "mn-thin w-100 bg-grey pd-medium radius-small"
|
346
346
|
}, null, 8, ["field"]),
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
347
|
+
Oe,
|
348
|
+
B(" " + L(m(e).date.start) + " ", 1),
|
349
|
+
v(C, {
|
350
|
+
field: m(e).date.start,
|
351
|
+
"onUpdate:field": o[3] || (o[3] = (f) => m(e).date.start = f),
|
351
352
|
label: "Start",
|
352
353
|
type: "datetime-local",
|
353
354
|
placeholder: "Not specified",
|
354
355
|
class: "mn-thin w-100 bg-grey pd-medium radius-small"
|
355
356
|
}, null, 8, ["field"]),
|
356
|
-
|
357
|
-
field:
|
358
|
-
"onUpdate:field": o[4] || (o[4] = (
|
357
|
+
v(C, {
|
358
|
+
field: m(e).date.end,
|
359
|
+
"onUpdate:field": o[4] || (o[4] = (f) => m(e).date.end = f),
|
359
360
|
label: "End",
|
360
361
|
type: "datetime-local",
|
361
362
|
placeholder: "Not specified",
|
362
363
|
class: "mn-thin w-100 bg-grey pd-medium radius-small"
|
363
364
|
}, null, 8, ["field"]),
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
content:
|
368
|
-
onUpdate: o[5] || (o[5] = (
|
365
|
+
Ue,
|
366
|
+
m(e) ? (d(), _("section", Le, [
|
367
|
+
v(ue, {
|
368
|
+
content: m(e).content,
|
369
|
+
onUpdate: o[5] || (o[5] = (f) => m(e).content = f)
|
369
370
|
}, null, 8, ["content"])
|
370
|
-
])) :
|
371
|
-
|
372
|
-
|
373
|
-
|
371
|
+
])) : b("", !0),
|
372
|
+
m(e) ? (d(), _("section", je, [
|
373
|
+
h("div", ze, [
|
374
|
+
m(t).params.url ? (d(), _("a", {
|
374
375
|
key: 0,
|
375
|
-
onClick: o[6] || (o[6] = (
|
376
|
+
onClick: o[6] || (o[6] = (f) => u()),
|
376
377
|
class: "mn-r-auto bg-red t-white t-black button"
|
377
|
-
}, "Delete")) :
|
378
|
-
|
379
|
-
onClick: o[7] || (o[7] = (
|
378
|
+
}, "Delete")) : b("", !0),
|
379
|
+
h("a", {
|
380
|
+
onClick: o[7] || (o[7] = (f) => y()),
|
380
381
|
class: "mn-l-auto bg-white t-black button"
|
381
382
|
}, "To Drafts"),
|
382
|
-
|
383
|
-
onClick: o[8] || (o[8] = (
|
383
|
+
h("a", {
|
384
|
+
onClick: o[8] || (o[8] = (f) => c()),
|
384
385
|
class: "mn-l-thin bg-black t-white button"
|
385
386
|
}, "Publish")
|
386
387
|
])
|
387
|
-
])) :
|
388
|
-
|
388
|
+
])) : b("", !0),
|
389
|
+
v(pe, {
|
389
390
|
title: "Добавить участника",
|
390
|
-
onClosePopup:
|
391
|
-
isPopupOpen:
|
391
|
+
onClosePopup: g,
|
392
|
+
isPopupOpen: n.value
|
392
393
|
}, {
|
393
|
-
default:
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
onTagsChanged: o[9] || (o[9] = (
|
398
|
-
tags:
|
394
|
+
default: x(() => [
|
395
|
+
h("div", Ne, [
|
396
|
+
Be,
|
397
|
+
v(oe, {
|
398
|
+
onTagsChanged: o[9] || (o[9] = (f) => m(e).tags = f),
|
399
|
+
tags: m(e).tags
|
399
400
|
}, null, 8, ["tags"]),
|
400
|
-
|
401
|
-
|
401
|
+
Fe,
|
402
|
+
v(le, {
|
402
403
|
modelValue: a.value,
|
403
|
-
"onUpdate:modelValue": o[10] || (o[10] = (
|
404
|
-
options:
|
404
|
+
"onUpdate:modelValue": o[10] || (o[10] = (f) => a.value = f),
|
405
|
+
options: m(l),
|
405
406
|
multiple: !1,
|
406
407
|
taggable: !1,
|
407
408
|
placeholder: "Type to search or add tag",
|
@@ -409,23 +410,23 @@ const ye = { class: "today-events" }, ct = {
|
|
409
410
|
"track-by": "_id",
|
410
411
|
class: "mn-medium bg-grey radius-medium pd-small"
|
411
412
|
}, null, 8, ["modelValue", "options"]),
|
412
|
-
a.value ? (
|
413
|
-
a.value ? (
|
414
|
-
|
413
|
+
a.value ? (d(), _("h5", qe, "Options:")) : b("", !0),
|
414
|
+
a.value ? (d(), _("div", Me, [
|
415
|
+
v(ie, {
|
415
416
|
label: "Hide Author",
|
416
|
-
radio:
|
417
|
-
"onUpdate:radio": o[11] || (o[11] = (
|
417
|
+
radio: m(e).creator.hidden,
|
418
|
+
"onUpdate:radio": o[11] || (o[11] = (f) => m(e).creator.hidden = f),
|
418
419
|
name: "prices",
|
419
420
|
class: "w-100"
|
420
421
|
}, null, 8, ["radio"])
|
421
|
-
])) :
|
422
|
-
|
422
|
+
])) : b("", !0),
|
423
|
+
v(K, {
|
423
424
|
submit: E,
|
424
|
-
callback:
|
425
|
+
callback: s.redirectTo,
|
425
426
|
class: "w-100 bg-black t-white"
|
426
427
|
}, {
|
427
|
-
default:
|
428
|
-
|
428
|
+
default: x(() => [
|
429
|
+
B("Publish")
|
429
430
|
]),
|
430
431
|
_: 1
|
431
432
|
}, 8, ["callback"])
|
@@ -433,65 +434,65 @@ const ye = { class: "today-events" }, ct = {
|
|
433
434
|
]),
|
434
435
|
_: 1
|
435
436
|
}, 8, ["isPopupOpen"])
|
436
|
-
])) :
|
437
|
+
])) : b("", !0);
|
437
438
|
}
|
438
|
-
},
|
439
|
+
}, H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
439
440
|
__proto__: null,
|
440
|
-
default:
|
441
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
441
|
+
default: Ve
|
442
|
+
}, Symbol.toStringTag, { value: "Module" })), O = se.create({
|
442
443
|
baseURL: process.env.API_URL,
|
443
444
|
withCredentials: !0
|
444
445
|
}), S = re({
|
445
446
|
tickets: [],
|
446
447
|
error: null
|
447
448
|
}), R = {
|
448
|
-
async read({ user:
|
449
|
+
async read({ user: p, type: t, target: r, role: e }) {
|
449
450
|
try {
|
450
|
-
const
|
451
|
-
return S.error = null, S.tickets =
|
452
|
-
} catch (
|
453
|
-
return
|
451
|
+
const l = await O.get("/api/tickets", { params: { user: p, type: t, target: r, role: e } });
|
452
|
+
return S.error = null, S.tickets = l.data, Promise.resolve(l.data);
|
453
|
+
} catch (l) {
|
454
|
+
return I(l), Promise.reject(l);
|
454
455
|
}
|
455
456
|
},
|
456
|
-
async create(
|
457
|
+
async create(p) {
|
457
458
|
try {
|
458
|
-
const t = await
|
459
|
+
const t = await O.post("/api/tickets/create", p);
|
459
460
|
return S.error = null, Promise.resolve(t.data);
|
460
461
|
} catch (t) {
|
461
|
-
return
|
462
|
+
return I(t), Promise.reject(t);
|
462
463
|
}
|
463
464
|
},
|
464
|
-
async update(
|
465
|
+
async update(p) {
|
465
466
|
try {
|
466
|
-
const t = await
|
467
|
+
const t = await O.post("/api/tickets/update", p);
|
467
468
|
return S.error = null, Promise.resolve(t.data);
|
468
469
|
} catch (t) {
|
469
|
-
return
|
470
|
+
return I(t), Promise.reject(t);
|
470
471
|
}
|
471
472
|
},
|
472
|
-
async delete(
|
473
|
+
async delete(p) {
|
473
474
|
try {
|
474
|
-
const t = await
|
475
|
+
const t = await O.post("/api/tickets/delete", p);
|
475
476
|
return S.error = null, Promise.resolve(t.data);
|
476
477
|
} catch (t) {
|
477
|
-
return
|
478
|
+
return I(t), Promise.reject(t);
|
478
479
|
}
|
479
480
|
}
|
480
|
-
},
|
481
|
-
handleTicketUpdate(
|
481
|
+
}, Ae = {
|
482
|
+
handleTicketUpdate(p, t, r) {
|
482
483
|
let e;
|
483
|
-
if (Array.isArray(
|
484
|
+
if (Array.isArray(p) ? e = p.find((l) => l._id === t.target) : typeof p == "object" && p._id === t.target && (e = p), e)
|
484
485
|
if (e.hasTicket = r, r)
|
485
486
|
e.tickets.push(t), e.numberOfTickets += 1;
|
486
487
|
else {
|
487
|
-
const
|
488
|
-
|
488
|
+
const l = e.tickets.findIndex((i) => i._id === t._id);
|
489
|
+
l !== -1 && (e.tickets.splice(l, 1), e.numberOfTickets -= 1);
|
489
490
|
}
|
490
491
|
}
|
491
492
|
};
|
492
|
-
|
493
|
+
W(S, (p) => {
|
493
494
|
});
|
494
|
-
const
|
495
|
+
const He = {
|
495
496
|
__name: "ButtonJoin",
|
496
497
|
props: {
|
497
498
|
type: {
|
@@ -513,143 +514,161 @@ const Ae = {
|
|
513
514
|
}
|
514
515
|
},
|
515
516
|
emits: ["updateTicket"],
|
516
|
-
setup(
|
517
|
-
const r =
|
518
|
-
r.hasTicket ? await
|
517
|
+
setup(p, { emit: t }) {
|
518
|
+
const r = p, e = async () => {
|
519
|
+
r.hasTicket ? await i(r.targetId) : await l(r.targetId);
|
519
520
|
};
|
520
|
-
async function
|
521
|
+
async function l(a) {
|
521
522
|
try {
|
522
|
-
const
|
523
|
+
const n = {
|
523
524
|
// Renamed membershipData to ticketData
|
524
525
|
type: r.type,
|
525
526
|
target: a,
|
526
527
|
user: r.userId
|
527
|
-
},
|
528
|
-
t("updateTicket", { ticket:
|
529
|
-
} catch (
|
530
|
-
throw console.log(
|
528
|
+
}, c = await R.create(n);
|
529
|
+
t("updateTicket", { ticket: c, hasTicket: !0, targetId: r.targetId });
|
530
|
+
} catch (n) {
|
531
|
+
throw console.log(n), n;
|
531
532
|
}
|
532
533
|
}
|
533
|
-
async function
|
534
|
-
const
|
534
|
+
async function i(a) {
|
535
|
+
const n = {
|
535
536
|
// Renamed membershipData to ticketData
|
536
537
|
type: r.type,
|
537
538
|
target: a,
|
538
539
|
user: r.userId
|
539
540
|
};
|
540
541
|
try {
|
541
|
-
const
|
542
|
-
t("updateTicket", { ticket:
|
543
|
-
} catch (
|
544
|
-
throw console.log(
|
542
|
+
const c = await R.delete(n);
|
543
|
+
t("updateTicket", { ticket: c, hasTicket: !1, targetId: r.targetId });
|
544
|
+
} catch (c) {
|
545
|
+
throw console.log(c), c;
|
545
546
|
}
|
546
547
|
}
|
547
|
-
return (a,
|
548
|
+
return (a, n) => (d(), $(K, {
|
548
549
|
submit: e,
|
549
550
|
class: "bg-main button-small button"
|
550
551
|
}, {
|
551
|
-
default:
|
552
|
-
|
552
|
+
default: x(() => [
|
553
|
+
B(L(p.hasTicket ? "Leave" : "Join"), 1)
|
553
554
|
]),
|
554
555
|
_: 1
|
555
556
|
}));
|
556
557
|
}
|
557
|
-
},
|
558
|
+
}, Re = /* @__PURE__ */ Q(He, [["__scopeId", "data-v-d5c351bb"]]), Je = { class: "pd-thin" }, We = {
|
558
559
|
__name: "Event",
|
559
|
-
setup(
|
560
|
-
const t =
|
561
|
-
|
562
|
-
}, e =
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
560
|
+
setup(p) {
|
561
|
+
const t = z(), r = ({ ticket: n, hasTicket: c, targetId: g }) => {
|
562
|
+
Ae.handleTicketUpdate(i.value, n, c, g);
|
563
|
+
}, e = {
|
564
|
+
Textarea: "p",
|
565
|
+
H2: "h2",
|
566
|
+
Bullets: "p",
|
567
|
+
Caption: "p",
|
568
|
+
ImageUpload: de
|
569
|
+
};
|
570
|
+
function l(n) {
|
571
|
+
return n.type === "Textarea" ? { innerHTML: n.content, class: "p-medium" } : n.type === "H2" ? { innerHTML: n.content, class: "h3" } : n.type === "Caption" ? { innerHTML: n.content } : n.type === "ImageUpload" ? { src: n.content } : {};
|
572
|
+
}
|
573
|
+
const i = w(null), a = w(!0);
|
574
|
+
return j(async () => {
|
575
|
+
a.value = !0;
|
576
|
+
const n = await F({ user: k.user._id, url: t.params.url });
|
577
|
+
i.value = n[0], a.value = !1;
|
578
|
+
}), (n, c) => (d(), _("section", Je, [
|
579
|
+
v(U, {
|
569
580
|
tag: "ul",
|
570
581
|
name: "fade",
|
571
582
|
class: "o-hidden bg-grey radius-big"
|
572
583
|
}, {
|
573
|
-
default:
|
574
|
-
|
584
|
+
default: x(() => [
|
585
|
+
a.value ? (d(), _(P, { key: 0 }, T(3, (g) => v(Z, { key: g })), 64)) : b("", !0)
|
575
586
|
]),
|
576
587
|
_: 1
|
577
588
|
}),
|
578
|
-
|
579
|
-
default:
|
580
|
-
!
|
589
|
+
v(q, { name: "fade" }, {
|
590
|
+
default: x(() => [
|
591
|
+
!a.value && !i.value ? (d(), $(G, {
|
581
592
|
key: 0,
|
582
593
|
title: "No Event Found",
|
583
594
|
description: "Currently, there are no events available. Please check back later.",
|
584
595
|
class: "pd-medium mn-thin bg-grey radius-big"
|
585
|
-
})) :
|
596
|
+
})) : b("", !0)
|
586
597
|
]),
|
587
598
|
_: 1
|
588
599
|
}),
|
589
|
-
|
600
|
+
v(U, {
|
590
601
|
tag: "ul",
|
591
602
|
name: "fade",
|
592
603
|
class: "container"
|
593
604
|
}, {
|
594
|
-
default:
|
595
|
-
!
|
605
|
+
default: x(() => [
|
606
|
+
!a.value && i.value ? (d(), $(J, {
|
596
607
|
key: 0,
|
597
|
-
onClick:
|
598
|
-
event:
|
599
|
-
owner:
|
608
|
+
onClick: c[0] || (c[0] = (g) => n.$router.push({ name: "Event", params: { url: i.value.url } })),
|
609
|
+
event: i.value,
|
610
|
+
owner: i.value.owner,
|
600
611
|
user: k.user._id,
|
601
612
|
type: "normal",
|
602
|
-
class:
|
603
|
-
"br-b br-solid br-black-transp-10": f.index !== e.value.length - 1
|
604
|
-
}])
|
613
|
+
class: "mn-medium bg-grey radius-big"
|
605
614
|
}, {
|
606
|
-
default:
|
607
|
-
k.user._id ? (
|
615
|
+
default: x(() => [
|
616
|
+
k.user._id ? (d(), $(Re, {
|
608
617
|
key: 0,
|
609
618
|
type: "event",
|
610
|
-
hasTicket:
|
611
|
-
targetId:
|
619
|
+
hasTicket: i.value.hasTicket,
|
620
|
+
targetId: i.value._id,
|
612
621
|
userId: k.user._id,
|
613
622
|
class: "mn-small w-100 pd-medium mn-auto",
|
614
623
|
onUpdateTicket: r
|
615
|
-
}, null, 8, ["hasTicket", "targetId", "userId"])) :
|
624
|
+
}, null, 8, ["hasTicket", "targetId", "userId"])) : b("", !0),
|
625
|
+
h("section", null, [
|
626
|
+
i.value && i.value.content ? (d(!0), _(P, { key: 0 }, T(i.value.content, (g, y) => (d(), $(Y(e[g.type]), ne({
|
627
|
+
key: y,
|
628
|
+
index: y,
|
629
|
+
component: g,
|
630
|
+
prop: g,
|
631
|
+
class: g.class,
|
632
|
+
content: "content"
|
633
|
+
}, l(g), { class: "mn-regular" }), null, 16, ["index", "component", "prop", "class"]))), 128)) : b("", !0)
|
634
|
+
])
|
616
635
|
]),
|
617
636
|
_: 1
|
618
|
-
}, 8, ["event", "owner", "user"
|
619
|
-
!
|
637
|
+
}, 8, ["event", "owner", "user"])) : b("", !0),
|
638
|
+
!a.value && i.value ? (d(), $(ce, {
|
620
639
|
key: 1,
|
621
640
|
type: "event",
|
622
|
-
target:
|
641
|
+
target: i.value._id,
|
623
642
|
owner: k.user._id
|
624
|
-
}, null, 8, ["target", "owner"])) :
|
643
|
+
}, null, 8, ["target", "owner"])) : b("", !0)
|
625
644
|
]),
|
626
645
|
_: 1
|
627
646
|
})
|
628
647
|
]));
|
629
648
|
}
|
630
|
-
},
|
649
|
+
}, Ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
631
650
|
__proto__: null,
|
632
|
-
default:
|
633
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
651
|
+
default: We
|
652
|
+
}, Symbol.toStringTag, { value: "Module" })), Ge = {
|
634
653
|
__name: "Events",
|
635
|
-
setup(
|
636
|
-
const t =
|
637
|
-
return
|
638
|
-
|
639
|
-
category:
|
654
|
+
setup(p) {
|
655
|
+
const t = z();
|
656
|
+
return M(), (r, e) => (d(), _("section", null, [
|
657
|
+
v(ee, {
|
658
|
+
category: m(t).params.category,
|
640
659
|
user: k.user._id,
|
641
|
-
period:
|
660
|
+
period: m(t).query.period,
|
642
661
|
selectedDate: D.filter.date
|
643
662
|
}, null, 8, ["category", "user", "period", "selectedDate"])
|
644
663
|
]));
|
645
664
|
}
|
646
|
-
},
|
665
|
+
}, Qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
647
666
|
__proto__: null,
|
648
|
-
default:
|
649
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
667
|
+
default: Ge
|
668
|
+
}, Symbol.toStringTag, { value: "Module" })), mt = [
|
650
669
|
{
|
651
670
|
path: "events",
|
652
|
-
component:
|
671
|
+
component: Pe,
|
653
672
|
meta: {
|
654
673
|
title: {
|
655
674
|
en: "Events",
|
@@ -659,7 +678,7 @@ const Ae = {
|
|
659
678
|
children: [{
|
660
679
|
path: ":category?",
|
661
680
|
name: "Events",
|
662
|
-
component: () => Promise.resolve().then(() =>
|
681
|
+
component: () => Promise.resolve().then(() => Qe)
|
663
682
|
}]
|
664
683
|
},
|
665
684
|
{
|
@@ -672,7 +691,7 @@ const Ae = {
|
|
672
691
|
},
|
673
692
|
authorize: []
|
674
693
|
},
|
675
|
-
component: () => Promise.resolve().then(() =>
|
694
|
+
component: () => Promise.resolve().then(() => H)
|
676
695
|
},
|
677
696
|
{
|
678
697
|
path: "events/:url",
|
@@ -683,23 +702,23 @@ const Ae = {
|
|
683
702
|
ru: "Событие"
|
684
703
|
}
|
685
704
|
},
|
686
|
-
component: () => Promise.resolve().then(() =>
|
705
|
+
component: () => Promise.resolve().then(() => Ye)
|
687
706
|
},
|
688
707
|
{
|
689
708
|
path: "events/:url/edit",
|
690
709
|
name: "Edit Event",
|
691
710
|
meta: { authorize: [] },
|
692
|
-
component: () => Promise.resolve().then(() =>
|
711
|
+
component: () => Promise.resolve().then(() => H)
|
693
712
|
}
|
694
713
|
];
|
695
714
|
export {
|
696
715
|
J as CardEvent,
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
716
|
+
Ve as EditEvent,
|
717
|
+
We as EventPage,
|
718
|
+
Pe as EventsLayout,
|
719
|
+
Ge as EventsPage,
|
720
|
+
ee as Feed,
|
721
|
+
pt as List,
|
722
|
+
mt as eventsRoutes,
|
723
|
+
vt as eventsStore
|
705
724
|
};
|