@ozdao/prometheus-framework 0.1.68 → 0.1.70

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. package/dist/BackofficeGallery-59a591ab.js +1 -0
  2. package/dist/BackofficeGallery-be6f69a9.mjs +307 -0
  3. package/dist/BackofficeReports-06166952.js +1 -0
  4. package/dist/BackofficeReports-50fd799c.mjs +44 -0
  5. package/dist/BlockTags-00325fa0.mjs +853 -0
  6. package/dist/BlockTags-58f95c8a.js +1 -0
  7. package/dist/ButtonToggleMembership-84d0e018.mjs +90 -0
  8. package/dist/ButtonToggleMembership-b905812f.js +1 -0
  9. package/dist/CardBlogpost-1b81b54e.mjs +246 -0
  10. package/dist/CardBlogpost-7107e04a.js +1 -0
  11. package/dist/CardOrganization-49ab5190.mjs +234 -0
  12. package/dist/CardOrganization-e6ac27f1.js +1 -0
  13. package/dist/CardProduct-4c0cb9a1.js +1 -0
  14. package/dist/CardProduct-ea0e1f84.mjs +192 -0
  15. package/dist/Chips-817cf959.js +1 -0
  16. package/dist/Chips-8c836ba6.mjs +213 -0
  17. package/dist/Community-8c4e011b.js +1 -0
  18. package/dist/Community-bd6f0cbb.mjs +131 -0
  19. package/dist/Dashboard-73b50724.js +1 -0
  20. package/dist/Dashboard-bc81b5f6.mjs +151 -0
  21. package/dist/Dropdown-60e3dc6c.js +1 -0
  22. package/dist/Dropdown-d1c81d45.mjs +169 -0
  23. package/dist/EditOrder-2b746caf.mjs +221 -0
  24. package/dist/EditOrder-e632f0cc.js +1 -0
  25. package/dist/Events-999cc8ed.js +1 -0
  26. package/dist/Events-ad8bbf27.mjs +134 -0
  27. package/dist/Feed-35e13c22.mjs +156 -0
  28. package/dist/Feed-53d96b18.mjs +361 -0
  29. package/dist/Feed-694a2fad.js +1 -0
  30. package/dist/Feed-ac4bb6ea.js +1 -0
  31. package/dist/Feed-d1d01771.js +1 -0
  32. package/dist/Feed-f7c04014.mjs +124 -0
  33. package/dist/Image-61cfd52d.js +9 -0
  34. package/dist/Image-e8be4acc.mjs +480 -0
  35. package/dist/LeftoverAdd-a268a95c.js +1 -0
  36. package/dist/LeftoverAdd-e4d93760.mjs +229 -0
  37. package/dist/Leftovers-6976802d.mjs +135 -0
  38. package/dist/Leftovers-d8f1d152.js +1 -0
  39. package/dist/Members-aeb2bca1.mjs +109 -0
  40. package/dist/Members-b9664e83.js +1 -0
  41. package/dist/Menu-93d34d9f.js +1 -0
  42. package/dist/Menu-eaf6b44c.mjs +13 -0
  43. package/dist/MenuItem-4a5881bd.mjs +85 -0
  44. package/dist/MenuItem-f35cad93.js +1 -0
  45. package/dist/Orders-8bc8963c.js +1 -0
  46. package/dist/Orders-eb262d8c.mjs +75 -0
  47. package/dist/Organizations-9926aa51.mjs +72 -0
  48. package/dist/Organizations-c653d814.js +1 -0
  49. package/dist/Payments-98328000.js +1 -0
  50. package/dist/Payments-a9066cdf.mjs +11 -0
  51. package/dist/Popup-0d8e1392.mjs +96 -0
  52. package/dist/Popup-eb11fa82.js +1 -0
  53. package/dist/Product-15043af7.mjs +651 -0
  54. package/dist/Product-82c022a4.js +7 -0
  55. package/dist/ProductEdit-05da9866.mjs +258 -0
  56. package/dist/ProductEdit-2f075296.js +1 -0
  57. package/dist/ProductsBackoffice-8462f626.js +1 -0
  58. package/dist/ProductsBackoffice-8d0f0ee8.mjs +85 -0
  59. package/dist/ProfileBlogposts-43855cb9.js +1 -0
  60. package/dist/ProfileBlogposts-f32170a3.mjs +78 -0
  61. package/dist/ProfileEvents-54be2d43.mjs +69 -0
  62. package/dist/ProfileEvents-ab69e27e.js +1 -0
  63. package/dist/ProfileOrganizations-0787cf34.mjs +72 -0
  64. package/dist/ProfileOrganizations-eb62dde4.js +1 -0
  65. package/dist/Publics-8e726d20.mjs +45 -0
  66. package/dist/Publics-ae589bf1.js +1 -0
  67. package/dist/Select-95f4701a.js +1 -0
  68. package/dist/Select-dab17282.mjs +80 -0
  69. package/dist/Select.vue_vue_type_style_index_0_scoped_dfe03dc2_lang-0ea8fbf8.js +1 -0
  70. package/dist/Select.vue_vue_type_style_index_0_scoped_dfe03dc2_lang-4ed993c7.mjs +1 -0
  71. package/dist/Socials-43293869.js +1 -0
  72. package/dist/Socials-8193477c.mjs +189 -0
  73. package/dist/UploadImage-0e8e4278.mjs +83 -0
  74. package/dist/UploadImage-8c71bda6.js +1 -0
  75. package/dist/UploadImageMultiple-c34a6c6f.mjs +58 -0
  76. package/dist/UploadImageMultiple-d1316df5.js +1 -0
  77. package/dist/Wallet-727195d9.mjs +21700 -0
  78. package/dist/Wallet-f4dda407.js +10 -0
  79. package/dist/auth-04684a60.js +7 -0
  80. package/dist/auth-7e39361f.mjs +633 -0
  81. package/dist/auth.client.cjs +1 -1
  82. package/dist/auth.client.js +5 -5
  83. package/dist/auth.validation-d614130d.js +1 -0
  84. package/dist/auth.validation-f4bf1deb.mjs +24 -0
  85. package/dist/axios-33aeb810.mjs +1435 -0
  86. package/dist/axios-ceccf20e.js +5 -0
  87. package/dist/backoffice.client.cjs +1 -1
  88. package/dist/backoffice.client.js +20 -20
  89. package/dist/categories-7e17a7eb.js +1 -0
  90. package/dist/categories-b7f9e8c0.mjs +122 -0
  91. package/dist/community.client.cjs +1 -1
  92. package/dist/community.client.js +209 -202
  93. package/dist/events.client.cjs +2 -2
  94. package/dist/events.client.js +24 -27
  95. package/dist/landing.client.cjs +1 -1
  96. package/dist/landing.client.js +64 -40
  97. package/dist/leftovers-86e7d438.mjs +67 -0
  98. package/dist/leftovers-c9f70579.js +1 -0
  99. package/dist/legal.client.cjs +1 -1
  100. package/dist/legal.client.js +6 -7
  101. package/dist/memberships-559590ad.mjs +68 -0
  102. package/dist/memberships-58af22e0.js +1 -0
  103. package/dist/modules/events/components/sections/Feed.vue.d.ts +1 -1
  104. package/dist/orders-1325c51b.js +1 -0
  105. package/dist/orders-c7cbe706.mjs +85 -0
  106. package/dist/organizations-71777b32.js +1 -0
  107. package/dist/organizations-93f7b610.mjs +122 -0
  108. package/dist/organizations.client-6ca27fb3.js +3 -0
  109. package/dist/organizations.client-bd63a7b2.mjs +2997 -0
  110. package/dist/organizations.client.cjs +1 -1
  111. package/dist/organizations.client.js +56 -61
  112. package/dist/products-61d83d74.js +1 -0
  113. package/dist/products-7f1e5a75.mjs +108 -0
  114. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  115. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +72 -2
  116. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  117. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +2 -72
  118. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  119. package/dist/prometheus-framework/src/components/Select/Select.vue.js +78 -2
  120. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  121. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +2 -78
  122. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  123. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  124. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  125. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  126. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +4 -1
  127. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +61 -2
  128. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -4
  129. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +2 -61
  130. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  131. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  132. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  133. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  134. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  135. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  136. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  137. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +24 -21
  138. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  139. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  140. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  141. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  142. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  143. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  144. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  145. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  146. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  147. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  148. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  149. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  150. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  151. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  152. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  153. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  154. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  155. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  156. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
  157. package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
  158. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  159. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  160. package/dist/prometheus-framework/src/modules/products/components/pages/LeftoverAdd.vue.cjs +1 -1
  161. package/dist/prometheus-framework/src/modules/products/components/pages/LeftoverAdd.vue.js +1 -1
  162. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  163. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
  164. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
  165. package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
  166. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  167. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  168. package/dist/reports-a67b4fb4.js +1 -0
  169. package/dist/reports-c579b02a.mjs +91 -0
  170. package/dist/reports.client.cjs +1 -1
  171. package/dist/reports.client.js +2 -2
  172. package/dist/states.validation-3b4604bc.mjs +13 -0
  173. package/dist/states.validation-9b43a097.js +1 -0
  174. package/dist/style.css +1 -1
  175. package/dist/users.client.cjs +1 -1
  176. package/dist/users.client.js +279 -208
  177. package/package.json +1 -1
  178. package/src/components/Search/Search.vue +1 -1
  179. package/src/components/Status/Status.vue +1 -1
  180. package/src/modules/backoffice/components/admin/Backcalls.vue +1 -1
  181. package/src/modules/backoffice/components/admin/Categories.vue +1 -1
  182. package/src/modules/backoffice/components/admin/CategoryEdit.vue +1 -1
  183. package/src/modules/backoffice/components/admin/Dashboard.vue +1 -1
  184. package/src/modules/backoffice/components/admin/FastOrders.vue +1 -1
  185. package/src/modules/backoffice/components/admin/PageEdit.vue +1 -1
  186. package/src/modules/backoffice/components/admin/Pages.vue +1 -1
  187. package/src/modules/backoffice/components/admin/User.vue +1 -1
  188. package/src/modules/backoffice/components/admin/Users.vue +1 -1
  189. package/src/modules/events/components/pages/Events.vue +2 -2
  190. package/src/modules/orders/components/blocks/Positions.vue +1 -1
  191. package/src/modules/orders/components/pages/ViewOrder.vue +1 -1
  192. package/src/modules/products/components/sections/ProductInformationSection.vue +2 -5
@@ -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;