@ozdao/prometheus-framework 0.1.39 → 0.1.40
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/ButtonToggleMembership-738720bd.js +1 -0
- package/dist/ButtonToggleMembership-e337e704.mjs +90 -0
- package/dist/CardBlogpost-c7adb0a7.mjs +246 -0
- package/dist/CardBlogpost-f308ff64.js +1 -0
- package/dist/CardOrganization-22beb83d.js +1 -0
- package/dist/CardOrganization-ae384e54.mjs +234 -0
- package/dist/Chips-edf2b573.js +1 -0
- package/dist/Chips-f06ec38f.mjs +213 -0
- package/dist/Community-04b25965.mjs +130 -0
- package/dist/Community-2f6fee0f.js +1 -0
- package/dist/Events-41d71b0e.js +1 -0
- package/dist/Events-af7170ed.mjs +134 -0
- package/dist/Feed-04fe1f7a.mjs +361 -0
- package/dist/Feed-23758089.mjs +124 -0
- package/dist/Feed-36e83be3.mjs +156 -0
- package/dist/Feed-5653cf8b.js +1 -0
- package/dist/Feed-5a359bb7.js +1 -0
- package/dist/Feed-6ca0541a.js +1 -0
- package/dist/Image-39955d9d.mjs +480 -0
- package/dist/Image-c2d190d8.js +9 -0
- package/dist/LeftoverAdd-21311275.js +1 -0
- package/dist/LeftoverAdd-ccf4595f.mjs +228 -0
- package/dist/Members-7251dd52.mjs +109 -0
- package/dist/Members-d35ab7e8.js +1 -0
- package/dist/Organizations-a964d4b6.mjs +72 -0
- package/dist/Organizations-ed6d36d6.js +1 -0
- package/dist/Product-299070ad.mjs +652 -0
- package/dist/Product-aacb05f3.js +7 -0
- package/dist/ProductEdit-70bed802.mjs +296 -0
- package/dist/ProductEdit-e5a2e0f6.js +1 -0
- package/dist/ProductsBackoffice-3c182d6a.mjs +86 -0
- package/dist/ProductsBackoffice-b684913d.js +1 -0
- package/dist/ProfileBlogposts-6bf526fb.js +1 -0
- package/dist/ProfileBlogposts-d4b17535.mjs +77 -0
- package/dist/ProfileEvents-3eeb4320.mjs +68 -0
- package/dist/ProfileEvents-90e09978.js +1 -0
- package/dist/ProfileOrganizations-e838925f.js +1 -0
- package/dist/ProfileOrganizations-edf657ca.mjs +72 -0
- package/dist/Publics-a31d7fe7.js +1 -0
- package/dist/Publics-a8f31413.mjs +45 -0
- package/dist/Wallet-2043b611.mjs +24682 -0
- package/dist/Wallet-8fa7386a.js +55 -0
- package/dist/auth-076a83d0.mjs +625 -0
- package/dist/auth-df5a20c6.js +7 -0
- package/dist/auth.client.cjs +1 -1
- package/dist/auth.client.js +4 -4
- package/dist/auth.validation-80b133df.js +1 -0
- package/dist/auth.validation-fd9ae66f.mjs +24 -0
- package/dist/backoffice.client.cjs +1 -1
- package/dist/backoffice.client.js +11 -11
- package/dist/categories-4327a81c.js +1 -0
- package/dist/categories-52a561a4.mjs +122 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +10 -10
- package/dist/events.client.cjs +2 -2
- package/dist/events.client.js +9 -9
- package/dist/legal.client.cjs +1 -1
- package/dist/legal.client.js +1 -1
- package/dist/main.css +1 -1
- package/dist/modules/gallery/components/pages/Gallery.vue.d.ts +2 -0
- package/dist/modules/gallery/components/sections/GalleryWithCategories.vue.d.ts +2 -0
- package/dist/modules/globals/components/sections/Title.vue.d.ts +6 -0
- package/dist/organizations-966e1cd2.mjs +122 -0
- package/dist/organizations-d12c42b6.js +1 -0
- package/dist/organizations.client-8f263e28.js +3 -0
- package/dist/organizations.client-9ffc023f.mjs +2996 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +15 -15
- package/dist/products-7e4253eb.js +1 -0
- package/dist/products-aabe5c02.mjs +108 -0
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +2 -2
- package/dist/states.validation-4594b33c.mjs +13 -0
- package/dist/states.validation-69003e66.js +1 -0
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +198 -166
- package/package.json +1 -1
- package/src/components/LocationMarker/LocationMarker.vue +1 -1
- package/src/components/LocationSelection/LocationSelection.vue +1 -1
- package/src/components/Navigation/Navigation.vue +12 -1
- package/src/modules/auth/store/auth.js +7 -4
- package/src/modules/files/middlewares/server/md.js +1 -0
- package/src/modules/gallery/components/pages/Gallery.vue +21 -0
- package/src/modules/gallery/components/sections/GalleryWithCategories.vue +408 -0
- package/src/modules/gallery/gallery.client.js +11 -14
- package/src/modules/gallery/router/gallery.router.js +10 -0
- package/src/modules/globals/components/sections/Title.vue +22 -0
- package/src/modules/marketplace/router/marketplace.js +4 -3
- package/src/modules/organizations/components/sections/Feed.vue +2 -2
- package/src/modules/products/components/pages/ProductRecommmendation.vue +5 -3
- package/src/modules/products/components/sections/SectionProduct.vue +17 -5
- package/src/modules/products/controllers/products.controller.js +83 -0
- package/src/modules/products/routes/products.routes.js +5 -5
- package/src/modules/spots/components/layouts/Spots.vue +16 -11
- package/src/modules/spots/components/pages/Map.vue +9 -7
- package/src/modules/users/components/pages/Profile.vue +15 -5
- package/src/modules/users/router/users.js +10 -0
- package/src/modules/wallet/components/pages/Wallet.vue +104 -23
@@ -0,0 +1,361 @@
|
|
1
|
+
import { ref as g, computed as m, openBlock as n, createElementBlock as i, normalizeClass as p, createVNode as S, unref as C, createElementVNode as f, createCommentVNode as l, createBlock as w, withModifiers as L, toDisplayString as v, renderSlot as O, reactive as R, watch as N, onMounted as j, TransitionGroup as I, withCtx as P, Fragment as M, renderList as F, Transition as V } from "vue";
|
2
|
+
import "./Loader.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
3
|
+
import { _ as B } from "./EmptyState-e404b05d.mjs";
|
4
|
+
import { _ as H, b as Y } from "./Chips-f06ec38f.mjs";
|
5
|
+
import { I as q } from "./IconEdit-9edfd74d.mjs";
|
6
|
+
import { useRouter as A } from "vue-router";
|
7
|
+
import { S as G } from "./SkeletonEvent-8690422d.mjs";
|
8
|
+
import { a as J } from "./index-a661083c.mjs";
|
9
|
+
import { s as U } from "./globals-96ba60e4.mjs";
|
10
|
+
const K = {
|
11
|
+
key: 0,
|
12
|
+
class: "o-hidden pos-relative bg-grey mn-small w-100"
|
13
|
+
}, Q = ["src"], W = ["src"], X = { class: "w-max mn-r-thin pd-thin radius-small t-semi bg-main" }, Z = {
|
14
|
+
key: 0,
|
15
|
+
class: "t-semi"
|
16
|
+
}, _ = { class: "t-semi" }, ee = {
|
17
|
+
key: 0,
|
18
|
+
class: "t-semi uppercase"
|
19
|
+
}, te = {
|
20
|
+
key: 1,
|
21
|
+
class: "cursor-pointer mn-thin flex-nowrap flex w-100"
|
22
|
+
}, ae = {
|
23
|
+
key: 0,
|
24
|
+
class: ""
|
25
|
+
}, re = {
|
26
|
+
key: 1,
|
27
|
+
class: "pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"
|
28
|
+
}, ne = {
|
29
|
+
key: 2,
|
30
|
+
class: "mn-small p-big"
|
31
|
+
}, se = {
|
32
|
+
__name: "CardEvent",
|
33
|
+
props: ["event", "user", "short", "type"],
|
34
|
+
setup(e) {
|
35
|
+
const t = e;
|
36
|
+
g(/* @__PURE__ */ new Date()), A(), m(() => t.event.content.find((a) => a.type.name === "ImageUpload")), m(() => t.event.content.find((a) => a.type.name === "Textarea"));
|
37
|
+
const s = m(() => {
|
38
|
+
const a = /* @__PURE__ */ new Date(), c = Date.UTC(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate(), a.getUTCHours(), a.getUTCMinutes(), a.getUTCSeconds()), r = new Date(t.event.date.start), o = Date.UTC(r.getUTCFullYear(), r.getUTCMonth(), r.getUTCDate(), r.getUTCHours(), r.getUTCMinutes(), r.getUTCSeconds()) - c;
|
39
|
+
if (o < 0)
|
40
|
+
return "Finished";
|
41
|
+
if (o === 0)
|
42
|
+
return "Starting Now";
|
43
|
+
{
|
44
|
+
const k = Math.floor(o / 1e3), T = Math.floor(k / 60), D = Math.floor(T / 60), z = Math.floor(D / 24);
|
45
|
+
return z > 0 ? `${z} days until event` : D > 0 ? `${D} hours until event` : T > 0 ? `${T} minutes until event` : `${k} seconds until event`;
|
46
|
+
}
|
47
|
+
}), u = m(() => {
|
48
|
+
const a = new Date(t.event.date.start), c = { day: "2-digit", month: "2-digit" };
|
49
|
+
return a.toLocaleDateString(void 0, c);
|
50
|
+
}), d = m(() => {
|
51
|
+
console.log(t.event.date.start), console.log(t.event.date.end);
|
52
|
+
const a = new Date(t.event.date.start), c = new Date(t.event.date.end), r = new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }).format(a), x = new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }).format(c);
|
53
|
+
return `${r}-${x}`;
|
54
|
+
}), y = m(() => {
|
55
|
+
const a = t.event.name;
|
56
|
+
return a.length > 26 ? `${a.substring(0, 22)}…` : a;
|
57
|
+
});
|
58
|
+
return (a, c) => (n(), i("article", {
|
59
|
+
class: p([{
|
60
|
+
"flex-nowrap flex-v-center flex": e.type === "short"
|
61
|
+
}, "pos-relative"])
|
62
|
+
}, [
|
63
|
+
S(H, {
|
64
|
+
class: p({
|
65
|
+
"mn-small pd-medium": e.type !== "short",
|
66
|
+
"flex-child-order-last flex-child mn-l-small": e.type === "short"
|
67
|
+
}),
|
68
|
+
entity: e.event,
|
69
|
+
entityType: "event",
|
70
|
+
user: e.user,
|
71
|
+
owner: e.event.owner,
|
72
|
+
creator: e.event.creator,
|
73
|
+
members: e.event.numberOfTickets,
|
74
|
+
membersPhotos: e.event.participantsPhotos,
|
75
|
+
type: e.type,
|
76
|
+
dateFormatted: C(s)
|
77
|
+
}, null, 8, ["class", "entity", "user", "owner", "creator", "members", "membersPhotos", "type", "dateFormatted"]),
|
78
|
+
e.event.cover && e.type !== "short" ? (n(), i("div", K, [
|
79
|
+
f("img", {
|
80
|
+
src: (a.FILE_SERVER_URL || "") + e.event.cover,
|
81
|
+
alt: "Event image",
|
82
|
+
class: "pos-relative z-index-1 d-block mn-auto h-20r"
|
83
|
+
}, null, 8, Q),
|
84
|
+
f("img", {
|
85
|
+
src: (a.FILE_SERVER_URL || "") + e.event.cover,
|
86
|
+
alt: "Event Background",
|
87
|
+
class: "z-index-0 pos-absolute w-100 h-100 pos-t-0 pos-r-0",
|
88
|
+
style: { transform: "scale(1.5)", filter: "blur(2rem)", "-webkit-filter": "blur(2rem)" }
|
89
|
+
}, null, 8, W)
|
90
|
+
])) : l("", !0),
|
91
|
+
f("section", {
|
92
|
+
class: p(["pos-relative w-100", { "pd-t-zero pd-medium": e.type !== "short" }])
|
93
|
+
}, [
|
94
|
+
e.user === e.event.creator.target._id ? (n(), w(q, {
|
95
|
+
key: 0,
|
96
|
+
onClick: c[0] || (c[0] = L((r) => a.$router.push({
|
97
|
+
name: "Edit Event",
|
98
|
+
params: {
|
99
|
+
url: e.event.url
|
100
|
+
}
|
101
|
+
}), ["stop"])),
|
102
|
+
class: "z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
|
103
|
+
})) : l("", !0),
|
104
|
+
f("div", {
|
105
|
+
class: p([{ "mn-small": e.type !== "short" }, "flex-v-center flex-nowrap flex"])
|
106
|
+
}, [
|
107
|
+
f("div", X, [
|
108
|
+
e.type !== "short" ? (n(), i("span", Z, v(C(u)) + " | ", 1)) : l("", !0),
|
109
|
+
f("span", _, v(C(d)), 1)
|
110
|
+
]),
|
111
|
+
e.type === "short" ? (n(), i("span", ee, v(C(y)), 1)) : l("", !0)
|
112
|
+
], 2),
|
113
|
+
e.type !== "short" ? (n(), i("div", te, [
|
114
|
+
e.type !== "short" ? (n(), i("h3", ae, v(e.event.name), 1)) : l("", !0),
|
115
|
+
e.event.status === "draft" ? (n(), i("div", re, v(e.event.status), 1)) : l("", !0)
|
116
|
+
])) : l("", !0),
|
117
|
+
e.type !== "short" ? (n(), i("p", ne, v(e.event.description), 1)) : l("", !0),
|
118
|
+
O(a.$slots, "default"),
|
119
|
+
e.type !== "short" && e.event.tags.length > 0 ? (n(), w(Y, {
|
120
|
+
key: 3,
|
121
|
+
chips: e.event.tags
|
122
|
+
}, null, 8, ["chips"])) : l("", !0)
|
123
|
+
], 2)
|
124
|
+
], 2));
|
125
|
+
}
|
126
|
+
}, E = J.create({ baseURL: process.env.API_URL, withCredentials: !0 }), h = R({
|
127
|
+
all: [],
|
128
|
+
filter: {
|
129
|
+
// query
|
130
|
+
tags: [],
|
131
|
+
period: "",
|
132
|
+
date: null
|
133
|
+
// pagination
|
134
|
+
},
|
135
|
+
pagination: {
|
136
|
+
page: 1,
|
137
|
+
perPage: 18
|
138
|
+
},
|
139
|
+
// Sort
|
140
|
+
sort: {
|
141
|
+
current: "popularity",
|
142
|
+
ascending: !1
|
143
|
+
},
|
144
|
+
current: {
|
145
|
+
_id: "",
|
146
|
+
cover: "",
|
147
|
+
url: "",
|
148
|
+
status: "",
|
149
|
+
name: "",
|
150
|
+
tags: [],
|
151
|
+
date: {
|
152
|
+
start: null,
|
153
|
+
false: null
|
154
|
+
},
|
155
|
+
views: 0,
|
156
|
+
content: []
|
157
|
+
}
|
158
|
+
});
|
159
|
+
async function $(e = {}) {
|
160
|
+
e.params = e.params || {}, e.params.skip = e.skip || 0, e.params.limit = e.limit || 9, e.params.tags = e.tags || [], e.phase && (e.params = { phase: e.phase }), e.url && (e.params = { url: e.url }), e.period && (e.params.period = e.period), e.category && (e.params.category = e.category), e.organization && (e.params.organization = e.organization), e.date && (e.params.date = e.date), e.participant && (e.params.participant = e.participant), e.owner && (e.params.owner = e.owner), e.creator && (e.params.creator = e.creator), e.user && (e.params.user = e.user), e.sortOrder && (e.params.sortOrder = e.sortOrder), e.sortParam && (e.params.sortParam = e.sortParam), e.params.skip = e.skip || 0, e.params.limit = e.limit || 10;
|
161
|
+
try {
|
162
|
+
console.log("Request params:" + e.params);
|
163
|
+
const t = await E.get("/api/events/read", { params: e.params });
|
164
|
+
return console.log(e.params), e.url ? b(t.data, "current") : b(t.data, "all"), Promise.resolve(t.data);
|
165
|
+
} catch (t) {
|
166
|
+
return U(t), Promise.reject(t);
|
167
|
+
}
|
168
|
+
}
|
169
|
+
async function le(e) {
|
170
|
+
return E.post("/api/events/create", e).then(
|
171
|
+
(t) => (b(t.data, "current"), Promise.resolve(t.data)),
|
172
|
+
(t) => (U(t), Promise.reject(t))
|
173
|
+
);
|
174
|
+
}
|
175
|
+
async function ie(e) {
|
176
|
+
return E.post("/api/events/update", e).then(
|
177
|
+
(t) => (b(t.data, "current"), Promise.resolve(t.data)),
|
178
|
+
(t) => (U(t), Promise.reject(t))
|
179
|
+
);
|
180
|
+
}
|
181
|
+
async function ue(e) {
|
182
|
+
return await E.post("/api/events/delete", { _id: e }).then(
|
183
|
+
(t) => {
|
184
|
+
const s = h.all.findIndex((u) => u._id === e);
|
185
|
+
return s !== -1 && h.all.splice(s, 1), Promise.resolve(t.data);
|
186
|
+
},
|
187
|
+
(t) => (U(t), Promise.reject(t))
|
188
|
+
);
|
189
|
+
}
|
190
|
+
function b(e, t) {
|
191
|
+
h[t] = e;
|
192
|
+
}
|
193
|
+
function ce() {
|
194
|
+
h.current = {
|
195
|
+
_id: "",
|
196
|
+
cover: "",
|
197
|
+
url: "",
|
198
|
+
phase: "",
|
199
|
+
name: "",
|
200
|
+
tags: [],
|
201
|
+
date: {
|
202
|
+
start: null,
|
203
|
+
false: null
|
204
|
+
},
|
205
|
+
views: 0,
|
206
|
+
content: []
|
207
|
+
};
|
208
|
+
}
|
209
|
+
N(h, (e, t) => {
|
210
|
+
});
|
211
|
+
const be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
212
|
+
__proto__: null,
|
213
|
+
clean: ce,
|
214
|
+
create: le,
|
215
|
+
read: $,
|
216
|
+
remove: ue,
|
217
|
+
set: b,
|
218
|
+
state: h,
|
219
|
+
update: ie
|
220
|
+
}, Symbol.toStringTag, { value: "Module" })), oe = { class: "feed" }, ke = {
|
221
|
+
__name: "Feed",
|
222
|
+
props: {
|
223
|
+
category: {
|
224
|
+
type: String,
|
225
|
+
default: null
|
226
|
+
},
|
227
|
+
selectedDate: {
|
228
|
+
type: String,
|
229
|
+
default: null
|
230
|
+
},
|
231
|
+
organization: {
|
232
|
+
type: String,
|
233
|
+
default: null
|
234
|
+
},
|
235
|
+
owner: {
|
236
|
+
type: String,
|
237
|
+
default: null
|
238
|
+
},
|
239
|
+
creator: {
|
240
|
+
type: String,
|
241
|
+
default: null
|
242
|
+
},
|
243
|
+
user: {
|
244
|
+
type: [String, Number],
|
245
|
+
default: null
|
246
|
+
},
|
247
|
+
sortOrder: {
|
248
|
+
type: String,
|
249
|
+
default: "desc"
|
250
|
+
},
|
251
|
+
participant: {
|
252
|
+
type: String,
|
253
|
+
default: null
|
254
|
+
},
|
255
|
+
period: {
|
256
|
+
type: String,
|
257
|
+
default: null
|
258
|
+
},
|
259
|
+
phase: {
|
260
|
+
type: String,
|
261
|
+
default: null
|
262
|
+
}
|
263
|
+
},
|
264
|
+
setup(e) {
|
265
|
+
const t = e, s = g([]), u = g(!1), d = g(!0), y = g(0), a = g(20), c = async () => {
|
266
|
+
if (u.value) {
|
267
|
+
y.value += a.value;
|
268
|
+
const r = await $({
|
269
|
+
skip: y.value,
|
270
|
+
limit: a.value,
|
271
|
+
category: t.category,
|
272
|
+
sortOrder: t.sortOrder,
|
273
|
+
participant: t.participant,
|
274
|
+
creator: t.creator,
|
275
|
+
user: t.user,
|
276
|
+
date: t.selectedDate,
|
277
|
+
owner: t.owner,
|
278
|
+
organization: t.organization,
|
279
|
+
period: t.period,
|
280
|
+
phase: t.phase
|
281
|
+
});
|
282
|
+
r.length === 0 ? u.value = !1 : u.value = !0, s.value = [...s.value, ...r];
|
283
|
+
}
|
284
|
+
};
|
285
|
+
return j(async () => {
|
286
|
+
d.value = !0, console.log(t.selectedDate);
|
287
|
+
const r = await $({
|
288
|
+
skip: y.value,
|
289
|
+
limit: a.value,
|
290
|
+
category: t.category,
|
291
|
+
participant: t.participant,
|
292
|
+
sortOrder: t.sortOrder,
|
293
|
+
user: t.user,
|
294
|
+
owner: t.owner,
|
295
|
+
creator: t.creator,
|
296
|
+
date: t.selectedDate,
|
297
|
+
organization: t.organization,
|
298
|
+
period: t.period,
|
299
|
+
phase: t.phase
|
300
|
+
});
|
301
|
+
r.length === 0 ? u.value = !1 : u.value = !0, s.value = r, d.value = !1;
|
302
|
+
}), (r, x) => (n(), i("section", oe, [
|
303
|
+
S(I, {
|
304
|
+
tag: "ul",
|
305
|
+
name: "scaleTransition",
|
306
|
+
class: "o-hidden bg-grey radius-big"
|
307
|
+
}, {
|
308
|
+
default: P(() => [
|
309
|
+
d.value ? (n(!0), i(M, { key: 0 }, F(a.value, (o) => (n(), w(G, { key: o }))), 128)) : l("", !0)
|
310
|
+
]),
|
311
|
+
_: 1
|
312
|
+
}),
|
313
|
+
S(V, { name: "scaleTransition" }, {
|
314
|
+
default: P(() => [
|
315
|
+
!d.value && s.value.length < 1 ? (n(), w(B, {
|
316
|
+
key: 0,
|
317
|
+
title: "No Events Found",
|
318
|
+
description: "Currently, there are no events available. Please check back later.",
|
319
|
+
class: "pd-medium mn-thin bg-grey radius-big"
|
320
|
+
})) : l("", !0)
|
321
|
+
]),
|
322
|
+
_: 1
|
323
|
+
}),
|
324
|
+
S(I, {
|
325
|
+
tag: "ul",
|
326
|
+
name: "scaleTransition",
|
327
|
+
class: "container"
|
328
|
+
}, {
|
329
|
+
default: P(() => [
|
330
|
+
!d.value && s.value.length > 0 ? (n(!0), i(M, { key: 0 }, F(s.value, (o, k) => (n(), w(se, {
|
331
|
+
onClick: (T) => r.$router.push({ name: "Event", params: { url: o.url } }),
|
332
|
+
key: o._id,
|
333
|
+
event: o,
|
334
|
+
user: e.user,
|
335
|
+
type: "normal",
|
336
|
+
class: p(["bg-grey radius-big mn-medium", {
|
337
|
+
"br-b br-solid br-black-transp-10": k !== s.value.length - 1
|
338
|
+
}])
|
339
|
+
}, null, 8, ["onClick", "event", "user", "class"]))), 128)) : l("", !0),
|
340
|
+
u.value && s.value.length > 0 ? (n(), i("button", {
|
341
|
+
key: 1,
|
342
|
+
onClick: c,
|
343
|
+
class: "w-100 bg-main button"
|
344
|
+
}, "Load more")) : l("", !0)
|
345
|
+
]),
|
346
|
+
_: 1
|
347
|
+
})
|
348
|
+
]));
|
349
|
+
}
|
350
|
+
};
|
351
|
+
export {
|
352
|
+
ke as _,
|
353
|
+
se as a,
|
354
|
+
le as b,
|
355
|
+
ce as c,
|
356
|
+
ue as d,
|
357
|
+
be as e,
|
358
|
+
$ as r,
|
359
|
+
h as s,
|
360
|
+
ie as u
|
361
|
+
};
|
@@ -0,0 +1,124 @@
|
|
1
|
+
import { ref as s, onMounted as _, openBlock as a, createElementBlock as o, Fragment as y, createVNode as c, Transition as d, withCtx as m, unref as v, createBlock as p, createCommentVNode as k, normalizeClass as h, renderList as S } from "vue";
|
2
|
+
import { L as N } from "./Loader-cd422786.mjs";
|
3
|
+
import { _ as C } from "./EmptyState-e404b05d.mjs";
|
4
|
+
import { r as b, _ as L } from "./CardBlogpost-c7adb0a7.mjs";
|
5
|
+
const M = {
|
6
|
+
__name: "Feed",
|
7
|
+
props: {
|
8
|
+
category: {
|
9
|
+
type: String,
|
10
|
+
default: null
|
11
|
+
},
|
12
|
+
limit: {
|
13
|
+
type: Number,
|
14
|
+
default: 7
|
15
|
+
},
|
16
|
+
skip: {
|
17
|
+
type: Number,
|
18
|
+
default: 0
|
19
|
+
},
|
20
|
+
owner: {
|
21
|
+
type: String,
|
22
|
+
default: null
|
23
|
+
},
|
24
|
+
creator: {
|
25
|
+
type: String,
|
26
|
+
default: null
|
27
|
+
},
|
28
|
+
following: {
|
29
|
+
type: String,
|
30
|
+
default: null
|
31
|
+
},
|
32
|
+
status: {
|
33
|
+
type: String,
|
34
|
+
default: "published"
|
35
|
+
},
|
36
|
+
user: {
|
37
|
+
type: [String, Number],
|
38
|
+
default: null
|
39
|
+
},
|
40
|
+
period: {
|
41
|
+
type: String,
|
42
|
+
default: null
|
43
|
+
}
|
44
|
+
},
|
45
|
+
setup(f) {
|
46
|
+
const e = f, l = s([]), r = s(!0);
|
47
|
+
let n = s(!0), u = s(e.skip), i = s(e.limit);
|
48
|
+
const w = async () => {
|
49
|
+
if (r.value) {
|
50
|
+
u.value += i.value;
|
51
|
+
const t = await b({
|
52
|
+
skip: u.value,
|
53
|
+
limit: i.value,
|
54
|
+
category: e.category,
|
55
|
+
user: e.user,
|
56
|
+
owner: e.owner,
|
57
|
+
following: e.following,
|
58
|
+
creator: e.creator,
|
59
|
+
status: e.status,
|
60
|
+
period: e.period
|
61
|
+
});
|
62
|
+
t.length === 0 && (r.value = !1), l.value = [...l.value, ...t];
|
63
|
+
}
|
64
|
+
};
|
65
|
+
return _(async () => {
|
66
|
+
const t = await b({
|
67
|
+
skip: u.value,
|
68
|
+
limit: i.value,
|
69
|
+
category: e.category,
|
70
|
+
user: e.user,
|
71
|
+
owner: e.owner,
|
72
|
+
following: e.following,
|
73
|
+
status: e.status,
|
74
|
+
creator: e.creator,
|
75
|
+
period: e.period
|
76
|
+
});
|
77
|
+
t.length === 0 ? r.value = !1 : r.value = !0, l.value = t, n.value = !1;
|
78
|
+
}), (t, B) => (a(), o(y, null, [
|
79
|
+
c(d, { name: "scaleTransition" }, {
|
80
|
+
default: m(() => [
|
81
|
+
v(n) ? (a(), p(N, {
|
82
|
+
key: 0,
|
83
|
+
class: "z-index-5 pos-t-50 left-t-50 pos-absolute"
|
84
|
+
})) : k("", !0)
|
85
|
+
]),
|
86
|
+
_: 1
|
87
|
+
}),
|
88
|
+
c(d, { name: "scaleTransition" }, {
|
89
|
+
default: m(() => [
|
90
|
+
!v(n) && l.value.length < 1 ? (a(), p(C, {
|
91
|
+
key: 0,
|
92
|
+
title: "No Blog Posts Found",
|
93
|
+
description: "Currently, there are no posts available in this blog. Please check back later.",
|
94
|
+
class: "pd-medium mn-thin bg-grey radius-big"
|
95
|
+
})) : (a(), o("div", {
|
96
|
+
key: 1,
|
97
|
+
class: h(t.$attrs.class)
|
98
|
+
}, [
|
99
|
+
(a(!0), o(y, null, S(l.value, (g) => (a(), p(L, {
|
100
|
+
key: g._id,
|
101
|
+
blogpost: g,
|
102
|
+
user: f.user,
|
103
|
+
class: "mn-medium"
|
104
|
+
}, null, 8, ["blogpost", "user"]))), 128)),
|
105
|
+
c(d, { name: "scaleTransition" }, {
|
106
|
+
default: m(() => [
|
107
|
+
r.value && l.value.length > 0 ? (a(), o("button", {
|
108
|
+
key: 0,
|
109
|
+
onClick: w,
|
110
|
+
class: "w-100 bg-main button"
|
111
|
+
}, " Load more ")) : k("", !0)
|
112
|
+
]),
|
113
|
+
_: 1
|
114
|
+
})
|
115
|
+
], 2))
|
116
|
+
]),
|
117
|
+
_: 1
|
118
|
+
})
|
119
|
+
], 64));
|
120
|
+
}
|
121
|
+
};
|
122
|
+
export {
|
123
|
+
M as _
|
124
|
+
};
|
@@ -0,0 +1,156 @@
|
|
1
|
+
import { openBlock as r, createElementBlock as o, createStaticVNode as w, ref as s, onMounted as x, createVNode as m, TransitionGroup as p, withCtx as f, Fragment as b, renderList as h, createBlock as y, createCommentVNode as c, Transition as z, normalizeClass as S } from "vue";
|
2
|
+
import "./Loader.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
3
|
+
import { _ as O } from "./EmptyState-e404b05d.mjs";
|
4
|
+
import { _ as C } from "./CardOrganization-ae384e54.mjs";
|
5
|
+
import { _ as N } from "./_plugin-vue_export-helper-dad06003.mjs";
|
6
|
+
import { a as v } from "./organizations-966e1cd2.mjs";
|
7
|
+
const $ = {}, D = {
|
8
|
+
width: "100%",
|
9
|
+
height: "20rem",
|
10
|
+
xmlns: "http://www.w3.org/2000/svg"
|
11
|
+
}, L = /* @__PURE__ */ w('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>', 6), M = [
|
12
|
+
L
|
13
|
+
];
|
14
|
+
function B(d, e) {
|
15
|
+
return r(), o("svg", D, M);
|
16
|
+
}
|
17
|
+
const F = /* @__PURE__ */ N($, [["render", B]]), V = { class: "pos-relative" }, I = {
|
18
|
+
__name: "Feed",
|
19
|
+
props: {
|
20
|
+
category: {
|
21
|
+
type: String,
|
22
|
+
default: null
|
23
|
+
},
|
24
|
+
selectedDate: {
|
25
|
+
type: String,
|
26
|
+
default: null
|
27
|
+
},
|
28
|
+
organization: {
|
29
|
+
type: String,
|
30
|
+
default: null
|
31
|
+
},
|
32
|
+
owner: {
|
33
|
+
type: String,
|
34
|
+
default: null
|
35
|
+
},
|
36
|
+
user: {
|
37
|
+
type: [String, Number],
|
38
|
+
default: null
|
39
|
+
},
|
40
|
+
member: {
|
41
|
+
type: [String, Number],
|
42
|
+
default: null
|
43
|
+
},
|
44
|
+
subscriber: {
|
45
|
+
type: [String, Number],
|
46
|
+
default: null
|
47
|
+
},
|
48
|
+
sortOrder: {
|
49
|
+
type: String,
|
50
|
+
default: "desc"
|
51
|
+
},
|
52
|
+
participant: {
|
53
|
+
type: String,
|
54
|
+
default: null
|
55
|
+
},
|
56
|
+
period: {
|
57
|
+
type: String,
|
58
|
+
default: null
|
59
|
+
},
|
60
|
+
status: {
|
61
|
+
type: String,
|
62
|
+
default: null
|
63
|
+
}
|
64
|
+
},
|
65
|
+
setup(d) {
|
66
|
+
const e = d, t = s([]), i = s(!1), n = s(!0), g = s(0), u = s(20), _ = async () => {
|
67
|
+
if (i.value) {
|
68
|
+
g.value += u.value;
|
69
|
+
const a = await v.read({
|
70
|
+
skip: g.value,
|
71
|
+
limit: u.value,
|
72
|
+
category: e.category,
|
73
|
+
sortOrder: e.sortOrder,
|
74
|
+
member: e.member,
|
75
|
+
subscriber: e.subscriber,
|
76
|
+
onlyuser: e.onlyuser,
|
77
|
+
user: e.user,
|
78
|
+
date: e.selectedDate,
|
79
|
+
owner: e.owner,
|
80
|
+
organization: e.organization,
|
81
|
+
period: e.period,
|
82
|
+
status: e.status
|
83
|
+
});
|
84
|
+
a.length === 0 ? i.value = !1 : i.value = !0, t.value = [...t.value, ...a];
|
85
|
+
}
|
86
|
+
};
|
87
|
+
return x(async () => {
|
88
|
+
n.value = !0, console.log(e.selectedDate);
|
89
|
+
const a = await v.read({
|
90
|
+
skip: g.value,
|
91
|
+
limit: u.value,
|
92
|
+
category: e.category,
|
93
|
+
member: e.member,
|
94
|
+
subscriber: e.subscriber,
|
95
|
+
onlyuser: e.onlyuser,
|
96
|
+
sortOrder: e.sortOrder,
|
97
|
+
user: e.user,
|
98
|
+
owner: e.owner,
|
99
|
+
date: e.selectedDate,
|
100
|
+
organization: e.organization,
|
101
|
+
period: e.period,
|
102
|
+
status: e.status
|
103
|
+
});
|
104
|
+
a.length === 0 ? i.value = !1 : i.value = !0, t.value = a, n.value = !1;
|
105
|
+
}), (a, T) => (r(), o("section", V, [
|
106
|
+
m(p, {
|
107
|
+
tag: "ul",
|
108
|
+
name: "fade",
|
109
|
+
class: "o-hidden bg-grey radius-big"
|
110
|
+
}, {
|
111
|
+
default: f(() => [
|
112
|
+
n.value ? (r(!0), o(b, { key: 0 }, h(u.value, (l) => (r(), y(F, { key: l }))), 128)) : c("", !0)
|
113
|
+
]),
|
114
|
+
_: 1
|
115
|
+
}),
|
116
|
+
m(z, { name: "fade" }, {
|
117
|
+
default: f(() => [
|
118
|
+
!n.value && t.value.length < 1 ? (r(), y(O, {
|
119
|
+
key: 0,
|
120
|
+
title: "No Organizations Found",
|
121
|
+
description: "Currently, there are no organizations available. Please check back later.",
|
122
|
+
class: "pd-medium mn-thin bg-grey radius-big"
|
123
|
+
})) : c("", !0)
|
124
|
+
]),
|
125
|
+
_: 1
|
126
|
+
}),
|
127
|
+
m(p, {
|
128
|
+
tag: "ul",
|
129
|
+
name: "fade",
|
130
|
+
class: "cols-1"
|
131
|
+
}, {
|
132
|
+
default: f(() => [
|
133
|
+
!n.value && t.value.length > 0 ? (r(!0), o(b, { key: 0 }, h(t.value, (l, k) => (r(), y(C, {
|
134
|
+
onClick: (E) => a.$router.push({ name: "Organization", params: { _id: l._id } }),
|
135
|
+
key: l._id,
|
136
|
+
organization: l,
|
137
|
+
user: d.user,
|
138
|
+
type: "normal",
|
139
|
+
class: S(["w-100 radius-big mn-medium", {
|
140
|
+
"br-b br-solid br-black-transp-10": k !== t.value.length - 1
|
141
|
+
}])
|
142
|
+
}, null, 8, ["onClick", "organization", "user", "class"]))), 128)) : c("", !0),
|
143
|
+
i.value && t.value.length > 0 ? (r(), o("button", {
|
144
|
+
key: 1,
|
145
|
+
onClick: _,
|
146
|
+
class: "w-100 bg-main button"
|
147
|
+
}, "Load more")) : c("", !0)
|
148
|
+
]),
|
149
|
+
_: 1
|
150
|
+
})
|
151
|
+
]));
|
152
|
+
}
|
153
|
+
};
|
154
|
+
export {
|
155
|
+
I as _
|
156
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue");require("./Loader.vue_vue_type_style_index_0_lang-0ea8fbf8.js");const m=require("./EmptyState-d65bab5b.js"),p=require("./CardOrganization-22beb83d.js"),f=require("./_plugin-vue_export-helper-f246444f.js"),u=require("./organizations-d12c42b6.js"),y={},b={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},h=e.createStaticVNode('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>',6),k=[h];function v(s,t){return e.openBlock(),e.createElementBlock("svg",b,k)}const _=f._export_sfc(y,[["render",v]]),w={class:"pos-relative"},x={__name:"Feed",props:{category:{type:String,default:null},selectedDate:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},user:{type:[String,Number],default:null},member:{type:[String,Number],default:null},subscriber:{type:[String,Number],default:null},sortOrder:{type:String,default:"desc"},participant:{type:String,default:null},period:{type:String,default:null},status:{type:String,default:null}},setup(s){const t=s,r=e.ref([]),n=e.ref(!1),l=e.ref(!0),c=e.ref(0),o=e.ref(20),d=async()=>{if(n.value){c.value+=o.value;const a=await u.actions.read({skip:c.value,limit:o.value,category:t.category,sortOrder:t.sortOrder,member:t.member,subscriber:t.subscriber,onlyuser:t.onlyuser,user:t.user,date:t.selectedDate,owner:t.owner,organization:t.organization,period:t.period,status:t.status});a.length===0?n.value=!1:n.value=!0,r.value=[...r.value,...a]}};return e.onMounted(async()=>{l.value=!0,console.log(t.selectedDate);const a=await u.actions.read({skip:c.value,limit:o.value,category:t.category,member:t.member,subscriber:t.subscriber,onlyuser:t.onlyuser,sortOrder:t.sortOrder,user:t.user,owner:t.owner,date:t.selectedDate,organization:t.organization,period:t.period,status:t.status});a.length===0?n.value=!1:n.value=!0,r.value=a,l.value=!1}),(a,B)=>(e.openBlock(),e.createElementBlock("section",w,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[l.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.value,i=>(e.openBlock(),e.createBlock(_,{key:i}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!l.value&&r.value.length<1?(e.openBlock(),e.createBlock(m._sfc_main,{key:0,title:"No Organizations Found",description:"Currently, there are no organizations available. Please check back later.",class:"pd-medium mn-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"cols-1"},{default:e.withCtx(()=>[!l.value&&r.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value,(i,g)=>(e.openBlock(),e.createBlock(p._sfc_main,{onClick:z=>a.$router.push({name:"Organization",params:{_id:i._id}}),key:i._id,organization:i,user:s.user,type:"normal",class:e.normalizeClass(["w-100 radius-big mn-medium",{"br-b br-solid br-black-transp-10":g!==r.value.length-1}])},null,8,["onClick","organization","user","class"]))),128)):e.createCommentVNode("",!0),n.value&&r.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:d,class:"w-100 bg-main button"},"Load more")):e.createCommentVNode("",!0)]),_:1})]))}};exports._sfc_main=x;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue"),p=require("./Loader-21f016da.js"),m=require("./EmptyState-d65bab5b.js"),i=require("./CardBlogpost-f308ff64.js"),f={__name:"Feed",props:{category:{type:String,default:null},limit:{type:Number,default:7},skip:{type:Number,default:0},owner:{type:String,default:null},creator:{type:String,default:null},following:{type:String,default:null},status:{type:String,default:"published"},user:{type:[String,Number],default:null},period:{type:String,default:null}},setup(u){const t=u,l=e.ref([]),r=e.ref(!0);let o=e.ref(!0),n=e.ref(t.skip),s=e.ref(t.limit);const d=async()=>{if(r.value){n.value+=s.value;const a=await i.read({skip:n.value,limit:s.value,category:t.category,user:t.user,owner:t.owner,following:t.following,creator:t.creator,status:t.status,period:t.period});a.length===0&&(r.value=!1),l.value=[...l.value,...a]}};return e.onMounted(async()=>{const a=await i.read({skip:n.value,limit:s.value,category:t.category,user:t.user,owner:t.owner,following:t.following,status:t.status,creator:t.creator,period:t.period});a.length===0?r.value=!1:r.value=!0,l.value=a,o.value=!1}),(a,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.Transition,{name:"scaleTransition"},{default:e.withCtx(()=>[e.unref(o)?(e.openBlock(),e.createBlock(p.Loader,{key:0,class:"z-index-5 pos-t-50 left-t-50 pos-absolute"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"scaleTransition"},{default:e.withCtx(()=>[!e.unref(o)&&l.value.length<1?(e.openBlock(),e.createBlock(m._sfc_main,{key:0,title:"No Blog Posts Found",description:"Currently, there are no posts available in this blog. Please check back later.",class:"pd-medium mn-thin bg-grey radius-big"})):(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(a.$attrs.class)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,c=>(e.openBlock(),e.createBlock(i._sfc_main,{key:c._id,blogpost:c,user:u.user,class:"mn-medium"},null,8,["blogpost","user"]))),128)),e.createVNode(e.Transition,{name:"scaleTransition"},{default:e.withCtx(()=>[r.value&&l.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:d,class:"w-100 bg-main button"}," Load more ")):e.createCommentVNode("",!0)]),_:1})],2))]),_:1})],64))}};exports._sfc_main=f;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue");require("./Loader.vue_vue_type_style_index_0_lang-0ea8fbf8.js");const N=require("./EmptyState-d65bab5b.js"),w=require("./Chips-edf2b573.js"),D=require("./IconEdit-c0469b45.js"),V=require("vue-router"),x=require("./SkeletonEvent-eb284de8.js"),U=require("./index-b41aac19.js"),h=require("./globals-928eb13c.js"),$={key:0,class:"o-hidden pos-relative bg-grey mn-small w-100"},z=["src"],P=["src"],I={class:"w-max mn-r-thin pd-thin radius-small t-semi bg-main"},M={key:0,class:"t-semi"},F={class:"t-semi"},L={key:0,class:"t-semi uppercase"},R={key:1,class:"cursor-pointer mn-thin flex-nowrap flex w-100"},q={key:0,class:""},O={key:1,class:"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"},j={key:2,class:"mn-small p-big"},E={__name:"CardEvent",props:["event","user","short","type"],setup(t){const r=t;e.ref(new Date),V.useRouter(),e.computed(()=>r.event.content.find(a=>a.type.name==="ImageUpload")),e.computed(()=>r.event.content.find(a=>a.type.name==="Textarea"));const s=e.computed(()=>{const a=new Date,o=Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds()),n=new Date(r.event.date.start),c=Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds())-o;if(c<0)return"Finished";if(c===0)return"Starting Now";{const f=Math.floor(c/1e3),g=Math.floor(f/60),k=Math.floor(g/60),C=Math.floor(k/24);return C>0?`${C} days until event`:k>0?`${k} hours until event`:g>0?`${g} minutes until event`:`${f} seconds until event`}}),l=e.computed(()=>{const a=new Date(r.event.date.start),o={day:"2-digit",month:"2-digit"};return a.toLocaleDateString(void 0,o)}),i=e.computed(()=>{console.log(r.event.date.start),console.log(r.event.date.end);const a=new Date(r.event.date.start),o=new Date(r.event.date.end),n=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(a),y=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(o);return`${n}-${y}`}),d=e.computed(()=>{const a=r.event.name;return a.length>26?`${a.substring(0,22)}…`:a});return(a,o)=>(e.openBlock(),e.createElementBlock("article",{class:e.normalizeClass([{"flex-nowrap flex-v-center flex":t.type==="short"},"pos-relative"])},[e.createVNode(w._sfc_main,{class:e.normalizeClass({"mn-small pd-medium":t.type!=="short","flex-child-order-last flex-child mn-l-small":t.type==="short"}),entity:t.event,entityType:"event",user:t.user,owner:t.event.owner,creator:t.event.creator,members:t.event.numberOfTickets,membersPhotos:t.event.participantsPhotos,type:t.type,dateFormatted:e.unref(s)},null,8,["class","entity","user","owner","creator","members","membersPhotos","type","dateFormatted"]),t.event.cover&&t.type!=="short"?(e.openBlock(),e.createElementBlock("div",$,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+t.event.cover,alt:"Event image",class:"pos-relative z-index-1 d-block mn-auto h-20r"},null,8,z),e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+t.event.cover,alt:"Event Background",class:"z-index-0 pos-absolute w-100 h-100 pos-t-0 pos-r-0",style:{transform:"scale(1.5)",filter:"blur(2rem)","-webkit-filter":"blur(2rem)"}},null,8,P)])):e.createCommentVNode("",!0),e.createElementVNode("section",{class:e.normalizeClass(["pos-relative w-100",{"pd-t-zero pd-medium":t.type!=="short"}])},[t.user===t.event.creator.target._id?(e.openBlock(),e.createBlock(D.IconEdit,{key:0,onClick:o[0]||(o[0]=e.withModifiers(n=>a.$router.push({name:"Edit Event",params:{url:t.event.url}}),["stop"])),class:"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([{"mn-small":t.type!=="short"},"flex-v-center flex-nowrap flex"])},[e.createElementVNode("div",I,[t.type!=="short"?(e.openBlock(),e.createElementBlock("span",M,e.toDisplayString(e.unref(l))+" | ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",F,e.toDisplayString(e.unref(i)),1)]),t.type==="short"?(e.openBlock(),e.createElementBlock("span",L,e.toDisplayString(e.unref(d)),1)):e.createCommentVNode("",!0)],2),t.type!=="short"?(e.openBlock(),e.createElementBlock("div",R,[t.type!=="short"?(e.openBlock(),e.createElementBlock("h3",q,e.toDisplayString(t.event.name),1)):e.createCommentVNode("",!0),t.event.status==="draft"?(e.openBlock(),e.createElementBlock("div",O,e.toDisplayString(t.event.status),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("p",j,e.toDisplayString(t.event.description),1)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"default"),t.type!=="short"&&t.event.tags.length>0?(e.openBlock(),e.createBlock(w._sfc_main$1,{key:3,chips:t.event.tags},null,8,["chips"])):e.createCommentVNode("",!0)],2)],2))}},p=U.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),u=e.reactive({all:[],filter:{tags:[],period:"",date:null},pagination:{page:1,perPage:18},sort:{current:"popularity",ascending:!1},current:{_id:"",cover:"",url:"",status:"",name:"",tags:[],date:{start:null,false:null},views:0,content:[]}});async function v(t={}){t.params=t.params||{},t.params.skip=t.skip||0,t.params.limit=t.limit||9,t.params.tags=t.tags||[],t.phase&&(t.params={phase:t.phase}),t.url&&(t.params={url:t.url}),t.period&&(t.params.period=t.period),t.category&&(t.params.category=t.category),t.organization&&(t.params.organization=t.organization),t.date&&(t.params.date=t.date),t.participant&&(t.params.participant=t.participant),t.owner&&(t.params.owner=t.owner),t.creator&&(t.params.creator=t.creator),t.user&&(t.params.user=t.user),t.sortOrder&&(t.params.sortOrder=t.sortOrder),t.sortParam&&(t.params.sortParam=t.sortParam),t.params.skip=t.skip||0,t.params.limit=t.limit||10;try{console.log("Request params:"+t.params);const r=await p.get("/api/events/read",{params:t.params});return console.log(t.params),t.url?m(r.data,"current"):m(r.data,"all"),Promise.resolve(r.data)}catch(r){return h.setError(r),Promise.reject(r)}}async function b(t){return p.post("/api/events/create",t).then(r=>(m(r.data,"current"),Promise.resolve(r.data)),r=>(h.setError(r),Promise.reject(r)))}async function B(t){return p.post("/api/events/update",t).then(r=>(m(r.data,"current"),Promise.resolve(r.data)),r=>(h.setError(r),Promise.reject(r)))}async function T(t){return await p.post("/api/events/delete",{_id:t}).then(r=>{const s=u.all.findIndex(l=>l._id===t);return s!==-1&&u.all.splice(s,1),Promise.resolve(r.data)},r=>(h.setError(r),Promise.reject(r)))}function m(t,r){u[r]=t}function S(){u.current={_id:"",cover:"",url:"",phase:"",name:"",tags:[],date:{start:null,false:null},views:0,content:[]}}e.watch(u,(t,r)=>{});const H=Object.freeze(Object.defineProperty({__proto__:null,clean:S,create:b,read:v,remove:T,set:m,state:u,update:B},Symbol.toStringTag,{value:"Module"})),G={class:"feed"},Y={__name:"Feed",props:{category:{type:String,default:null},selectedDate:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},creator:{type:String,default:null},user:{type:[String,Number],default:null},sortOrder:{type:String,default:"desc"},participant:{type:String,default:null},period:{type:String,default:null},phase:{type:String,default:null}},setup(t){const r=t,s=e.ref([]),l=e.ref(!1),i=e.ref(!0),d=e.ref(0),a=e.ref(20),o=async()=>{if(l.value){d.value+=a.value;const n=await v({skip:d.value,limit:a.value,category:r.category,sortOrder:r.sortOrder,participant:r.participant,creator:r.creator,user:r.user,date:r.selectedDate,owner:r.owner,organization:r.organization,period:r.period,phase:r.phase});n.length===0?l.value=!1:l.value=!0,s.value=[...s.value,...n]}};return e.onMounted(async()=>{i.value=!0,console.log(r.selectedDate);const n=await v({skip:d.value,limit:a.value,category:r.category,participant:r.participant,sortOrder:r.sortOrder,user:r.user,owner:r.owner,creator:r.creator,date:r.selectedDate,organization:r.organization,period:r.period,phase:r.phase});n.length===0?l.value=!1:l.value=!0,s.value=n,i.value=!1}),(n,y)=>(e.openBlock(),e.createElementBlock("section",G,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[i.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.value,c=>(e.openBlock(),e.createBlock(x.SkeletonEvent,{key:c}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"scaleTransition"},{default:e.withCtx(()=>[!i.value&&s.value.length<1?(e.openBlock(),e.createBlock(N._sfc_main,{key:0,title:"No Events Found",description:"Currently, there are no events available. Please check back later.",class:"pd-medium mn-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition",class:"container"},{default:e.withCtx(()=>[!i.value&&s.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s.value,(c,f)=>(e.openBlock(),e.createBlock(E,{onClick:g=>n.$router.push({name:"Event",params:{url:c.url}}),key:c._id,event:c,user:t.user,type:"normal",class:e.normalizeClass(["bg-grey radius-big mn-medium",{"br-b br-solid br-black-transp-10":f!==s.value.length-1}])},null,8,["onClick","event","user","class"]))),128)):e.createCommentVNode("",!0),l.value&&s.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:o,class:"w-100 bg-main button"},"Load more")):e.createCommentVNode("",!0)]),_:1})]))}};exports._sfc_main=Y;exports._sfc_main$1=E;exports.clean=S;exports.create=b;exports.events=H;exports.read=v;exports.remove=T;exports.state=u;exports.update=B;
|