@ozdao/prometheus-framework 0.1.68 → 0.1.69
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/BackofficeGallery-59a591ab.js +1 -0
- package/dist/BackofficeGallery-be6f69a9.mjs +307 -0
- package/dist/BackofficeReports-06166952.js +1 -0
- package/dist/BackofficeReports-50fd799c.mjs +44 -0
- package/dist/BlockTags-00325fa0.mjs +853 -0
- package/dist/BlockTags-58f95c8a.js +1 -0
- package/dist/ButtonToggleMembership-84d0e018.mjs +90 -0
- package/dist/ButtonToggleMembership-b905812f.js +1 -0
- package/dist/CardBlogpost-1b81b54e.mjs +246 -0
- package/dist/CardBlogpost-7107e04a.js +1 -0
- package/dist/CardOrganization-49ab5190.mjs +234 -0
- package/dist/CardOrganization-e6ac27f1.js +1 -0
- package/dist/CardProduct-4c0cb9a1.js +1 -0
- package/dist/CardProduct-ea0e1f84.mjs +192 -0
- package/dist/Chips-817cf959.js +1 -0
- package/dist/Chips-8c836ba6.mjs +213 -0
- package/dist/Community-8c4e011b.js +1 -0
- package/dist/Community-bd6f0cbb.mjs +131 -0
- package/dist/Dashboard-73b50724.js +1 -0
- package/dist/Dashboard-bc81b5f6.mjs +151 -0
- package/dist/Dropdown-60e3dc6c.js +1 -0
- package/dist/Dropdown-d1c81d45.mjs +169 -0
- package/dist/EditOrder-2b746caf.mjs +221 -0
- package/dist/EditOrder-e632f0cc.js +1 -0
- package/dist/Events-999cc8ed.js +1 -0
- package/dist/Events-ad8bbf27.mjs +134 -0
- package/dist/Feed-35e13c22.mjs +156 -0
- package/dist/Feed-53d96b18.mjs +361 -0
- package/dist/Feed-694a2fad.js +1 -0
- package/dist/Feed-ac4bb6ea.js +1 -0
- package/dist/Feed-d1d01771.js +1 -0
- package/dist/Feed-f7c04014.mjs +124 -0
- package/dist/Image-61cfd52d.js +9 -0
- package/dist/Image-e8be4acc.mjs +480 -0
- package/dist/LeftoverAdd-a268a95c.js +1 -0
- package/dist/LeftoverAdd-e4d93760.mjs +229 -0
- package/dist/Leftovers-6976802d.mjs +135 -0
- package/dist/Leftovers-d8f1d152.js +1 -0
- package/dist/Members-aeb2bca1.mjs +109 -0
- package/dist/Members-b9664e83.js +1 -0
- package/dist/Menu-93d34d9f.js +1 -0
- package/dist/Menu-eaf6b44c.mjs +13 -0
- package/dist/MenuItem-4a5881bd.mjs +85 -0
- package/dist/MenuItem-f35cad93.js +1 -0
- package/dist/Orders-8bc8963c.js +1 -0
- package/dist/Orders-eb262d8c.mjs +75 -0
- package/dist/Organizations-9926aa51.mjs +72 -0
- package/dist/Organizations-c653d814.js +1 -0
- package/dist/Payments-98328000.js +1 -0
- package/dist/Payments-a9066cdf.mjs +11 -0
- package/dist/Popup-0d8e1392.mjs +96 -0
- package/dist/Popup-eb11fa82.js +1 -0
- package/dist/Product-15043af7.mjs +651 -0
- package/dist/Product-82c022a4.js +7 -0
- package/dist/ProductEdit-05da9866.mjs +258 -0
- package/dist/ProductEdit-2f075296.js +1 -0
- package/dist/ProductsBackoffice-8462f626.js +1 -0
- package/dist/ProductsBackoffice-8d0f0ee8.mjs +85 -0
- package/dist/ProfileBlogposts-43855cb9.js +1 -0
- package/dist/ProfileBlogposts-f32170a3.mjs +78 -0
- package/dist/ProfileEvents-54be2d43.mjs +69 -0
- package/dist/ProfileEvents-ab69e27e.js +1 -0
- package/dist/ProfileOrganizations-0787cf34.mjs +72 -0
- package/dist/ProfileOrganizations-eb62dde4.js +1 -0
- package/dist/Publics-8e726d20.mjs +45 -0
- package/dist/Publics-ae589bf1.js +1 -0
- package/dist/Select-95f4701a.js +1 -0
- package/dist/Select-dab17282.mjs +80 -0
- package/dist/Select.vue_vue_type_style_index_0_scoped_dfe03dc2_lang-0ea8fbf8.js +1 -0
- package/dist/Select.vue_vue_type_style_index_0_scoped_dfe03dc2_lang-4ed993c7.mjs +1 -0
- package/dist/Socials-43293869.js +1 -0
- package/dist/Socials-8193477c.mjs +189 -0
- package/dist/UploadImage-0e8e4278.mjs +83 -0
- package/dist/UploadImage-8c71bda6.js +1 -0
- package/dist/UploadImageMultiple-c34a6c6f.mjs +58 -0
- package/dist/UploadImageMultiple-d1316df5.js +1 -0
- package/dist/Wallet-727195d9.mjs +21700 -0
- package/dist/Wallet-f4dda407.js +10 -0
- package/dist/auth-04684a60.js +7 -0
- package/dist/auth-7e39361f.mjs +633 -0
- package/dist/auth.client.cjs +1 -1
- package/dist/auth.client.js +5 -5
- package/dist/auth.server.js +1 -1
- package/dist/auth.server.mjs +1 -1
- package/dist/auth.validation-d614130d.js +1 -0
- package/dist/auth.validation-f4bf1deb.mjs +24 -0
- package/dist/axios-33aeb810.mjs +1435 -0
- package/dist/axios-ceccf20e.js +5 -0
- package/dist/backoffice.client.cjs +1 -1
- package/dist/backoffice.client.js +20 -20
- package/dist/categories-7e17a7eb.js +1 -0
- package/dist/categories-b7f9e8c0.mjs +122 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +209 -202
- package/dist/components/Upload/Upload.vue.d.ts.map +1 -1
- package/dist/events.client.cjs +2 -2
- package/dist/events.client.js +24 -27
- package/dist/landing.client.cjs +1 -1
- package/dist/landing.client.js +64 -40
- package/dist/leftovers-86e7d438.mjs +67 -0
- package/dist/leftovers-c9f70579.js +1 -0
- package/dist/legal.client.cjs +1 -1
- package/dist/legal.client.js +6 -7
- package/dist/main.css +1 -1
- package/dist/memberships-559590ad.mjs +68 -0
- package/dist/memberships-58af22e0.js +1 -0
- package/dist/modules/constructor/components/elements/H2.vue.d.ts +1 -1
- package/dist/modules/constructor/components/elements/Textarea.vue.d.ts +1 -1
- package/dist/modules/products/components/sections/EditProductInfo.vue.d.ts +1 -5
- package/dist/orders-1325c51b.js +1 -0
- package/dist/orders-c7cbe706.mjs +85 -0
- package/dist/organizations-71777b32.js +1 -0
- package/dist/organizations-93f7b610.mjs +122 -0
- package/dist/organizations.client-6ca27fb3.js +3 -0
- package/dist/organizations.client-bd63a7b2.mjs +2997 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +56 -61
- package/dist/products-61d83d74.js +1 -0
- package/dist/products-7f1e5a75.mjs +108 -0
- package/dist/prometheus-framework.cjs.js +21 -21
- package/dist/prometheus-framework.es.js +682 -690
- package/dist/reports-a67b4fb4.js +1 -0
- package/dist/reports-c579b02a.mjs +91 -0
- package/dist/reports.client.cjs +1 -1
- package/dist/reports.client.js +2 -2
- package/dist/states.validation-3b4604bc.mjs +13 -0
- package/dist/states.validation-9b43a097.js +1 -0
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +279 -208
- package/package.json +30 -35
- package/src/components/Button/Button.vue +1 -1
- package/src/components/Sidebar/Sidebar.vue +10 -8
- package/src/components/Upload/Upload.vue +8 -28
- package/src/modules/auth/controllers/auth.controller.js +1 -1
- package/src/modules/auth/store/auth.js +21 -24
- package/src/modules/backoffice/components/admin/ProductEdit.vue +2 -0
- package/src/modules/constructor/components/sections/Constructor.vue +7 -54
- package/src/modules/gallery/components/pages/Gallery.vue +7 -1
- package/src/modules/gallery/components/sections/GalleryWithCategories.vue +24 -8
- package/src/modules/gallery/gallery.client.js +5 -1
- package/src/modules/marketplace/components/layouts/Marketplace.vue +1 -0
- package/src/modules/organizations/components/pages/Organization.vue +2 -2
- package/src/modules/payments/components/pages/Payments.vue +4 -3
- package/src/modules/products/components/blocks/CardLeftover.vue +0 -1
- package/src/modules/products/components/blocks/CardProduct.vue +15 -1
- package/src/modules/products/components/sections/EditProductInfo.vue +16 -14
- package/src/modules/products/components/sections/FilterProducts.vue +0 -2
- package/src/modules/products/components/sections/SectionProduct.vue +1 -0
- package/src/modules/products/components/sections/SortProducts.vue +2 -0
- package/src/modules/products/store/categories.js +9 -9
- package/src/modules/products/store/leftovers.js +6 -9
- package/src/modules/products/store/products.js +2 -0
- package/src/modules/users/components/pages/Profile.vue +3 -5
- package/src/modules/wallet/components/pages/Wallet.vue +1 -1
- package/src/styles/components/button.scss +253 -0
- package/src/styles/theme.scss +1 -0
- package/src/modules/constructor/components/elements/Audio.vue +0 -82
- package/src/modules/constructor/components/elements/Embed.vue +0 -85
- package/src/modules/globals/mixins/mixins.js +0 -52
- package/src/modules/globals/router/routerGuards.js +0 -28
@@ -0,0 +1,134 @@
|
|
1
|
+
import { openBlock as t, createElementBlock as s, createStaticVNode as k, ref as l, onMounted as w, createVNode as i, TransitionGroup as m, withCtx as u, Fragment as g, renderList as f, createBlock as d, createCommentVNode as _, Transition as x, normalizeClass as S, unref as y } from "vue";
|
2
|
+
import { useRoute as $, useRouter as E } from "vue-router";
|
3
|
+
import "vue-i18n";
|
4
|
+
import "./globals-96ba60e4.mjs";
|
5
|
+
import "./Breadcrumbs.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
6
|
+
import { r as C, a as N, _ as z, s as L } from "./Feed-53d96b18.mjs";
|
7
|
+
import "./Loader.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
8
|
+
import { _ as T } from "./EmptyState-e404b05d.mjs";
|
9
|
+
import { _ as B } from "./_plugin-vue_export-helper-dad06003.mjs";
|
10
|
+
import { s as h } from "./auth-7e39361f.mjs";
|
11
|
+
const O = {}, V = {
|
12
|
+
width: "100%",
|
13
|
+
height: "50",
|
14
|
+
xmlns: "http://www.w3.org/2000/svg"
|
15
|
+
}, j = /* @__PURE__ */ k('<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), D = [
|
16
|
+
j
|
17
|
+
];
|
18
|
+
function M(o, e) {
|
19
|
+
return t(), s("svg", V, D);
|
20
|
+
}
|
21
|
+
const P = /* @__PURE__ */ B(O, [["render", M]]);
|
22
|
+
const R = { class: "today-events" }, q = {
|
23
|
+
__name: "List",
|
24
|
+
props: {
|
25
|
+
category: {
|
26
|
+
type: String,
|
27
|
+
default: null
|
28
|
+
},
|
29
|
+
organization: {
|
30
|
+
type: String,
|
31
|
+
default: null
|
32
|
+
},
|
33
|
+
owner: {
|
34
|
+
type: String,
|
35
|
+
default: null
|
36
|
+
},
|
37
|
+
user: {
|
38
|
+
type: [String, Number],
|
39
|
+
default: null
|
40
|
+
},
|
41
|
+
period: {
|
42
|
+
type: String,
|
43
|
+
default: null
|
44
|
+
},
|
45
|
+
phase: {
|
46
|
+
type: String,
|
47
|
+
default: null
|
48
|
+
}
|
49
|
+
},
|
50
|
+
setup(o) {
|
51
|
+
const e = o, r = l([]), a = l(!0), v = l(0), p = l(5);
|
52
|
+
return w(async () => {
|
53
|
+
const c = await C({
|
54
|
+
skip: v.value,
|
55
|
+
limit: p.value,
|
56
|
+
sortOrder: "desc",
|
57
|
+
category: e.category,
|
58
|
+
user: e.user,
|
59
|
+
owner: e.owner,
|
60
|
+
organization: e.organization,
|
61
|
+
period: e.period,
|
62
|
+
phase: e.phase
|
63
|
+
});
|
64
|
+
r.value = c, a.value = !1;
|
65
|
+
}), (c, G) => (t(), s("section", R, [
|
66
|
+
i(m, {
|
67
|
+
tag: "ul",
|
68
|
+
name: "fade",
|
69
|
+
class: "o-hidden bg-grey radius-big"
|
70
|
+
}, {
|
71
|
+
default: u(() => [
|
72
|
+
a.value ? (t(!0), s(g, { key: 0 }, f(p.value, (n) => (t(), d(P, { key: n }))), 128)) : _("", !0)
|
73
|
+
]),
|
74
|
+
_: 1
|
75
|
+
}),
|
76
|
+
i(x, { name: "fade" }, {
|
77
|
+
default: u(() => [
|
78
|
+
!a.value && r.value.length < 1 ? (t(), d(T, {
|
79
|
+
key: 0,
|
80
|
+
title: "No Events Today",
|
81
|
+
description: "Today, are no events available. Please check back later.",
|
82
|
+
class: "pd-medium mn-thin bg-grey radius-big"
|
83
|
+
})) : _("", !0)
|
84
|
+
]),
|
85
|
+
_: 1
|
86
|
+
}),
|
87
|
+
i(m, {
|
88
|
+
tag: "ul",
|
89
|
+
name: "fade",
|
90
|
+
class: "container"
|
91
|
+
}, {
|
92
|
+
default: u(() => [
|
93
|
+
!a.value && r.value.length > 0 ? (t(!0), s(g, { key: 0 }, f(r.value, (n, b) => (t(), d(N, {
|
94
|
+
onClick: (A) => c.$router.push({ name: "Event", params: { url: n.url } }),
|
95
|
+
key: n._id,
|
96
|
+
event: n,
|
97
|
+
owner: o.user,
|
98
|
+
type: "short",
|
99
|
+
class: S(["pd-medium", {
|
100
|
+
"br-b br-solid br-black-transp-10": b !== r.value.length - 1
|
101
|
+
}])
|
102
|
+
}, null, 8, ["onClick", "event", "owner", "class"]))), 128)) : _("", !0)
|
103
|
+
]),
|
104
|
+
_: 1
|
105
|
+
})
|
106
|
+
]));
|
107
|
+
}
|
108
|
+
}, F = {
|
109
|
+
__name: "Events",
|
110
|
+
setup(o) {
|
111
|
+
const e = $();
|
112
|
+
return E(), (r, a) => (t(), s("section", null, [
|
113
|
+
i(q, {
|
114
|
+
user: h.user._id,
|
115
|
+
class: "bg-grey mn-thin radius-big",
|
116
|
+
phase: "week"
|
117
|
+
}, null, 8, ["user"]),
|
118
|
+
i(z, {
|
119
|
+
category: y(e).params.category,
|
120
|
+
user: h.user._id,
|
121
|
+
period: y(e).query.period,
|
122
|
+
selectedDate: L.filter.date
|
123
|
+
}, null, 8, ["category", "user", "period", "selectedDate"])
|
124
|
+
]));
|
125
|
+
}
|
126
|
+
}, ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
127
|
+
__proto__: null,
|
128
|
+
default: F
|
129
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
130
|
+
export {
|
131
|
+
ee as E,
|
132
|
+
q as _,
|
133
|
+
F as a
|
134
|
+
};
|
@@ -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-49ab5190.mjs";
|
5
|
+
import { _ as N } from "./_plugin-vue_export-helper-dad06003.mjs";
|
6
|
+
import { a as v } from "./organizations-93f7b610.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,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-8c836ba6.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 "./axios-33aeb810.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 @@
|
|
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-817cf959.js"),D=require("./IconEdit-c0469b45.js"),V=require("vue-router"),x=require("./SkeletonEvent-eb284de8.js"),U=require("./axios-ceccf20e.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;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue"),p=require("./Loader-21f016da.js"),m=require("./EmptyState-d65bab5b.js"),i=require("./CardBlogpost-7107e04a.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;
|