@ozdao/prometheus-framework 0.1.19 → 0.1.21
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/BackofficeGallery-3bb55ea2.mjs +357 -0
- package/dist/BackofficeGallery-7ae8fbba.mjs +307 -0
- package/dist/BackofficeGallery-e54a33a3.js +1 -0
- package/dist/BackofficeGallery-fe39cff3.js +1 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-8660f9cb.js +1 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-bd3889ee.mjs +1945 -0
- package/dist/ButtonFollow-81508d85.mjs +132 -0
- package/dist/ButtonFollow-df6317f0.js +1 -0
- package/dist/CardOrganization-d8f209ee.js +1 -0
- package/dist/CardOrganization-de8ec36e.mjs +230 -0
- package/dist/Feed-a75d053e.js +1 -0
- package/dist/Feed-c4084664.mjs +368 -0
- package/dist/Feed-fea84ce7.mjs +439 -0
- package/dist/Feed-ff3b96b2.js +1 -0
- package/dist/Image-1281bc48.mjs +477 -0
- package/dist/Image-8e67dd2d.js +9 -0
- package/dist/Popup-b7609baa.js +1 -0
- package/dist/Popup-d5c4cb46.mjs +76 -0
- package/dist/Product-3c7b2921.mjs +841 -0
- package/dist/Product-6df77924.js +7 -0
- package/dist/ProductEdit-737e2a5a.mjs +302 -0
- package/dist/ProductEdit-c99ab559.js +1 -0
- package/dist/ProfileBlogposts-4293a1e3.js +1 -0
- package/dist/ProfileBlogposts-4c326fed.mjs +65 -0
- package/dist/ProfileComments-03f88b54.mjs +44 -0
- package/dist/ProfileComments-761ce00e.js +1 -0
- package/dist/ProfileEvents-0bdd36e4.mjs +57 -0
- package/dist/ProfileEvents-a9b96fec.js +1 -0
- package/dist/ProfileLikes-3edf6fb8.mjs +44 -0
- package/dist/ProfileLikes-51729962.js +1 -0
- package/dist/ProfileOrganizations-8961aaee.mjs +213 -0
- package/dist/ProfileOrganizations-f52e62e1.js +1 -0
- package/dist/Publics-70a0ca9c.mjs +45 -0
- package/dist/Publics-bbab7a79.js +1 -0
- package/dist/Select-90d4b7c8.mjs +81 -0
- package/dist/Select-b9299fb6.js +1 -0
- package/dist/Select.vue_vue_type_style_index_0_scoped_a78dbba1_lang-0ea8fbf8.js +1 -0
- package/dist/Select.vue_vue_type_style_index_0_scoped_a78dbba1_lang-4ed993c7.mjs +1 -0
- package/dist/UploadImage-c9711af2.js +1 -0
- package/dist/UploadImage-ec3714e8.mjs +83 -0
- package/dist/UploadImageMultiple-b4c8d627.js +1 -0
- package/dist/UploadImageMultiple-ebcc51e6.mjs +58 -0
- package/dist/auth-78d9392a.mjs +612 -0
- package/dist/auth-96449d96.js +7 -0
- package/dist/auth.client.cjs +8 -8
- package/dist/auth.client.js +8 -8
- package/dist/auth.validation-9e493d2f.mjs +20 -0
- package/dist/auth.validation-d4795c25.js +1 -0
- package/dist/backoffice.client.cjs +1 -1
- package/dist/backoffice.client.js +44 -49
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +44 -42
- package/dist/events.client.cjs +2 -2
- package/dist/events.client.js +25 -24
- package/dist/index-2a0269fc.js +2 -0
- package/dist/index-9128ade5.mjs +1228 -0
- package/dist/landing.client.cjs +1 -1
- package/dist/modules/backoffice/components/layouts/Backoffice.vue.d.ts +2 -0
- package/dist/modules/gallery/components/sections/BackofficeGallery.vue.d.ts +2 -0
- package/dist/organizations-0fb56927.mjs +122 -0
- package/dist/organizations-195ec134.js +1 -0
- package/dist/organizations.client-b39db194.js +3 -0
- package/dist/organizations.client-df5e8a6f.mjs +3020 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +46 -44
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +23 -23
- package/package.json +1 -1
- package/src/modules/backoffice/components/layouts/{Account.vue → Backoffice.vue} +0 -11
- package/src/modules/backoffice/router/account.js +64 -43
- package/src/modules/backoffice/router/admin.js +105 -84
- package/src/modules/backoffice/router/backoffice.js +3 -3
- package/src/modules/gallery/components/sections/{Gallery.vue → BackofficeGallery.vue} +3 -1
@@ -0,0 +1,132 @@
|
|
1
|
+
import { reactive as d, watch as b, openBlock as h, createBlock as y, withCtx as _, createTextVNode as f, toDisplayString as g } from "vue";
|
2
|
+
import { a as w, _ as I } from "./index-9128ade5.mjs";
|
3
|
+
import "./auth-78d9392a.mjs";
|
4
|
+
import { s as p } from "./globals-96ba60e4.mjs";
|
5
|
+
import { _ as M } from "./_plugin-vue_export-helper-dad06003.mjs";
|
6
|
+
const l = w.create({
|
7
|
+
baseURL: process.env.API_URL,
|
8
|
+
withCredentials: !0
|
9
|
+
}), i = d({
|
10
|
+
memberships: [],
|
11
|
+
error: null
|
12
|
+
}), u = {
|
13
|
+
async read({ user: r, type: e, target: t, role: s }) {
|
14
|
+
try {
|
15
|
+
const o = await l.get("/api/memberships", { params: { user: r, type: e, target: t, role: s } });
|
16
|
+
return i.error = null, i.memberships = o.data, Promise.resolve(o.data);
|
17
|
+
} catch (o) {
|
18
|
+
return p(o), Promise.reject(o);
|
19
|
+
}
|
20
|
+
},
|
21
|
+
async create(r) {
|
22
|
+
try {
|
23
|
+
const e = await l.post("/api/memberships/create", r);
|
24
|
+
return i.error = null, Promise.resolve(e.data);
|
25
|
+
} catch (e) {
|
26
|
+
return p(e), Promise.reject(e);
|
27
|
+
}
|
28
|
+
},
|
29
|
+
async update(r) {
|
30
|
+
try {
|
31
|
+
const e = await l.post("/api/memberships/update", r);
|
32
|
+
return i.error = null, Promise.resolve(e.data);
|
33
|
+
} catch (e) {
|
34
|
+
return p(e), Promise.reject(e);
|
35
|
+
}
|
36
|
+
},
|
37
|
+
async delete(r) {
|
38
|
+
try {
|
39
|
+
const e = await l.post("/api/memberships/delete", r);
|
40
|
+
return i.error = null, Promise.resolve(e.data);
|
41
|
+
} catch (e) {
|
42
|
+
return p(e), Promise.reject(e);
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}, P = {
|
46
|
+
handleMembershipUpdate(r, e, t) {
|
47
|
+
let s;
|
48
|
+
if (Array.isArray(r) ? s = r.find((o) => o._id === e.target) : typeof r == "object" && r._id === e.target && (s = r), s)
|
49
|
+
if (s.isMember = t, t)
|
50
|
+
s.memberships.push(e), s.numberOfMemberships += 1;
|
51
|
+
else {
|
52
|
+
const o = s.memberships.findIndex((m) => m._id === e._id);
|
53
|
+
o !== -1 && (s.memberships.splice(o, 1), s.numberOfMemberships -= 1);
|
54
|
+
}
|
55
|
+
}
|
56
|
+
};
|
57
|
+
b(i, (r) => {
|
58
|
+
});
|
59
|
+
const q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
60
|
+
__proto__: null,
|
61
|
+
actions: u,
|
62
|
+
mutations: P,
|
63
|
+
state: i
|
64
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
65
|
+
const v = {
|
66
|
+
__name: "ButtonFollow",
|
67
|
+
props: {
|
68
|
+
type: {
|
69
|
+
type: String,
|
70
|
+
required: !0
|
71
|
+
},
|
72
|
+
userId: {
|
73
|
+
type: String,
|
74
|
+
required: !0
|
75
|
+
},
|
76
|
+
isMember: {
|
77
|
+
type: Boolean,
|
78
|
+
required: !0
|
79
|
+
},
|
80
|
+
targetId: {
|
81
|
+
type: String,
|
82
|
+
required: !0
|
83
|
+
}
|
84
|
+
},
|
85
|
+
emits: ["updateMembership"],
|
86
|
+
setup(r, { emit: e }) {
|
87
|
+
const t = r, s = async () => {
|
88
|
+
t.isMember ? await m(t.targetId) : await o(t.targetId);
|
89
|
+
};
|
90
|
+
async function o(c) {
|
91
|
+
try {
|
92
|
+
const a = {
|
93
|
+
type: t.type,
|
94
|
+
target: c,
|
95
|
+
user: t.userId
|
96
|
+
}, n = await u.create(a);
|
97
|
+
e("updateMembership", { membership: n, isMember: !0, targetId: t.targetId });
|
98
|
+
} catch (a) {
|
99
|
+
throw console.log(a), a;
|
100
|
+
}
|
101
|
+
}
|
102
|
+
async function m(c) {
|
103
|
+
const a = {
|
104
|
+
type: t.type,
|
105
|
+
target: c,
|
106
|
+
user: t.userId
|
107
|
+
};
|
108
|
+
try {
|
109
|
+
const n = await u.delete(a);
|
110
|
+
e("updateMembership", { membership: n, isMember: !1, targetId: t.targetId });
|
111
|
+
} catch (n) {
|
112
|
+
throw console.log(n), n;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
return (c, a) => (h(), y(I, {
|
116
|
+
submit: s,
|
117
|
+
class: "bg-main button-small button"
|
118
|
+
}, {
|
119
|
+
default: _(() => [
|
120
|
+
f(g(r.isMember ? "Unfollow" : "Follow"), 1)
|
121
|
+
]),
|
122
|
+
_: 1
|
123
|
+
}));
|
124
|
+
}
|
125
|
+
}, O = /* @__PURE__ */ M(v, [["__scopeId", "data-v-c50e046c"]]);
|
126
|
+
export {
|
127
|
+
O as B,
|
128
|
+
u as a,
|
129
|
+
q as b,
|
130
|
+
P as m,
|
131
|
+
i as s
|
132
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const n=require("vue"),b=require("./index-2a0269fc.js");require("./auth-96449d96.js");const u=require("./globals-928eb13c.js"),y=require("./_plugin-vue_export-helper-f246444f.js"),p=b.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),a=n.reactive({memberships:[],error:null}),m={async read({user:r,type:e,target:t,role:s}){try{const o=await p.get("/api/memberships",{params:{user:r,type:e,target:t,role:s}});return a.error=null,a.memberships=o.data,Promise.resolve(o.data)}catch(o){return u.setError(o),Promise.reject(o)}},async create(r){try{const e=await p.post("/api/memberships/create",r);return a.error=null,Promise.resolve(e.data)}catch(e){return u.setError(e),Promise.reject(e)}},async update(r){try{const e=await p.post("/api/memberships/update",r);return a.error=null,Promise.resolve(e.data)}catch(e){return u.setError(e),Promise.reject(e)}},async delete(r){try{const e=await p.post("/api/memberships/delete",r);return a.error=null,Promise.resolve(e.data)}catch(e){return u.setError(e),Promise.reject(e)}}},h={handleMembershipUpdate(r,e,t){let s;if(Array.isArray(r)?s=r.find(o=>o._id===e.target):typeof r=="object"&&r._id===e.target&&(s=r),s)if(s.isMember=t,t)s.memberships.push(e),s.numberOfMemberships+=1;else{const o=s.memberships.findIndex(d=>d._id===e._id);o!==-1&&(s.memberships.splice(o,1),s.numberOfMemberships-=1)}}};n.watch(a,r=>{});const _=Object.freeze(Object.defineProperty({__proto__:null,actions:m,mutations:h,state:a},Symbol.toStringTag,{value:"Module"}));const g={__name:"ButtonFollow",props:{type:{type:String,required:!0},userId:{type:String,required:!0},isMember:{type:Boolean,required:!0},targetId:{type:String,required:!0}},emits:["updateMembership"],setup(r,{emit:e}){const t=r,s=async()=>{t.isMember?await d(t.targetId):await o(t.targetId)};async function o(l){try{const i={type:t.type,target:l,user:t.userId},c=await m.create(i);e("updateMembership",{membership:c,isMember:!0,targetId:t.targetId})}catch(i){throw console.log(i),i}}async function d(l){const i={type:t.type,target:l,user:t.userId};try{const c=await m.delete(i);e("updateMembership",{membership:c,isMember:!1,targetId:t.targetId})}catch(c){throw console.log(c),c}}return(l,i)=>(n.openBlock(),n.createBlock(b._sfc_main,{submit:s,class:"bg-main button-small button"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(r.isMember?"Unfollow":"Follow"),1)]),_:1}))}},f=y._export_sfc(g,[["__scopeId","data-v-c50e046c"]]);exports.ButtonFollow=f;exports.actions=m;exports.memberships=_;exports.mutations=h;exports.state=a;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue"),a=require("vue-router"),u=require("./ButtonFollow-df6317f0.js");const h={class:"flex-stretch flex-nojustify flex-nowrap flex shop-cart-item"},g=["src"],p={key:1,width:"524",height:"345",viewBox:"0 0 524 345",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"aspect-1x1",style:{"object-fit":"cover"}},f=e.createElementVNode("rect",{width:"524",height:"345",fill:"white"},null,-1),k=e.createElementVNode("rect",{width:"524",height:"345",fill:"white"},null,-1),x=e.createElementVNode("circle",{cx:"262",cy:"172",r:"56",fill:"#00ff88","fill-opacity":"0.1"},null,-1),v=e.createElementVNode("path",{fill:"#00ff88",d:"M229.348 186.819C230.243 191.884 233.393 194.231 238.458 193.273V193.644C238.458 198.832 241.206 201.581 246.364 201.581H291.545C296.733 201.581 299.481 198.74 299.481 193.644V162.576C299.481 157.481 296.733 154.64 291.545 154.64H285.677L284.071 145.653C283.175 140.619 279.995 138.303 274.899 139.198L230.398 147.043C225.302 147.969 223.048 151.15 223.943 156.246L229.348 186.819ZM230.83 186.479L225.456 156.06C224.715 151.86 226.537 149.266 230.737 148.525L275.084 140.712C279.13 140.001 281.848 141.762 282.62 145.993L284.102 154.64H246.364C241.206 154.64 238.458 157.419 238.458 162.576V191.729L238.365 191.76C234.165 192.532 231.571 190.679 230.83 186.479ZM239.971 162.669C239.971 158.376 242.164 156.153 246.456 156.153H291.483C295.59 156.153 297.968 158.376 297.968 162.669V190.093L284.565 177.894C283.145 176.597 281.662 175.856 279.809 175.856C277.987 175.856 276.628 176.566 275.146 177.863L262.052 189.073L257.142 184.565C255.875 183.36 254.764 182.743 253.158 182.743C251.675 182.743 250.656 183.36 249.39 184.503L239.971 193.212V162.669ZM257.636 178.419C261.373 178.419 264.43 175.3 264.43 171.471C264.43 167.734 261.373 164.584 257.636 164.584C253.806 164.584 250.718 167.734 250.718 171.471C250.718 175.3 253.806 178.419 257.636 178.419Z"},null,-1),E=[f,k,x,v],V={class:"text-left"},C={class:"name"},w={key:0,class:"t-transp"},y={key:1,class:"t-transp"},b={key:2,class:"t-transp"},N={class:"t-main t-demi price mn-small"},B={key:0},_={key:0,class:"flex-nojustify flex"},$={class:"flex-nowrap flex"},z=e.createElementVNode("svg",{fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"clip-rule":"evenodd",d:"m7.27124 0h5.45456c1.0041 0 1.8182.814027 1.8182 1.81818v.90899h2.7278c1.0042 0 1.8182.81402 1.8182 1.81818v1.81818c0 1.00415-.814 1.81818-1.8182 1.81818h-.0735l-.8363 10.00009c0 1.0042-.814 1.8182-1.8182 1.8182h-9.09087c-1.00416 0-1.81818-.814-1.81504-1.7427l-.83964-10.07559h-.07187c-1.00415 0-1.818177-.81403-1.818177-1.81818v-1.81818c0-1.00416.814027-1.81818 1.818177-1.81818h2.72668v-.90899c0-1.004153.81402-1.81818 1.81818-1.81818zm-1.81889 18.1819-.83047-10h10.75152l-.827 9.9245-.0031.0755zm-2.72612-11.81799v-1.81818h14.54547v1.81818zm10.00137-4.54571v.90909h-5.45456v-.90909z",fill:"#8a8a8a","fill-rule":"evenodd"})],-1),L=[z],S={__name:"CardOrderItem",props:{product:Object,editable:String,increase:Function,decrease:Function,remove:Function},setup(t){return a.useRouter(),(o,n)=>(e.openBlock(),e.createElementBlock("div",h,[t.product.images[0]?(e.openBlock(),e.createElementBlock("img",{key:0,class:"bg-grey aspect-1x1",src:(o.FILE_SERVER_URL||"")+t.product.images[0]},null,8,g)):e.createCommentVNode("",!0),t.product.images[0]?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("svg",p,E)),e.createElementVNode("div",V,[e.createElementVNode("p",C,[e.createTextVNode(e.toDisplayString(t.product.name)+" ",1),t.product.size?(e.openBlock(),e.createElementBlock("span",w,", "+e.toDisplayString(t.product.size),1)):e.createCommentVNode("",!0),typeof t.product.color=="string"&&t.product.size?(e.openBlock(),e.createElementBlock("span",y,", ")):e.createCommentVNode("",!0),typeof t.product.color=="string"?(e.openBlock(),e.createElementBlock("span",b,e.toDisplayString(t.product.color),1)):e.createCommentVNode("",!0)]),e.createElementVNode("p",N,[t.editable?(e.openBlock(),e.createElementBlock("span",B,e.toDisplayString(t.product.quantity)+" x ",1)):e.createCommentVNode("",!0),e.createTextVNode(e.toDisplayString(t.product.price)+" "+e.toDisplayString(o.returnCurrency()),1)]),t.editable?(e.openBlock(),e.createElementBlock("div",_,[e.createElementVNode("div",$,[e.createElementVNode("button",{onClick:n[0]||(n[0]=i=>t.decrease(t.product)),class:"mn-r-thin bg-grey button-square button"},"-"),e.createElementVNode("button",{onClick:n[1]||(n[1]=i=>t.increase(t.product)),class:"mn-r-thin bg-grey button-square button"},"+")]),e.createElementVNode("button",{onClick:n[2]||(n[2]=i=>t.remove(t.product)),class:"hover_br-transp hover_br-l-dark bg-transp button-square button"},L)])):e.createCommentVNode("",!0)])]))}},M={key:0,class:"cursor-pointer t-second"},s={__name:"Text",props:{maxLen:{type:Number,required:!0},text:{type:String,required:!0},showToggleText:{type:Boolean,default:!1}},setup(t){const o=t,n=e.ref(!1),i=e.computed(()=>o.text.length>o.maxLen?o.text.slice(0,o.maxLen)+"...":o.text),l=e.computed(()=>o.text),r=()=>{n.value=!n.value},c=e.computed(()=>n.value?l.value:i.value),d=e.computed(()=>o.text.length>o.maxLen),m=e.computed(()=>n.value?"Hide":"Show more");return(ne,oe)=>(e.openBlock(),e.createElementBlock("span",{onClick:r,class:""},[e.createTextVNode(e.toDisplayString(e.unref(c))+" ",1),e.unref(d)&&t.showToggleText?(e.openBlock(),e.createElementBlock("span",M,e.toDisplayString(e.unref(m)),1)):e.createCommentVNode("",!0)]))}},D={class:"pd-medium flex-v-center flex-nowrap flex"},T=["src"],F={key:1,class:"h-4r w-4r radius-extra",width:"42",height:"42",viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},q=e.createElementVNode("circle",{fill:"rgb(var(--main))",cx:"21",cy:"21",r:"21"},null,-1),R=e.createElementVNode("path",{fill:"#242424","fill-opacity":"0.1","fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00233 37.4954C8.00078 37.4458 8 37.3961 8 37.3462C8 32.9066 11.5673 29.3077 15.9677 29.3077H26.0323C30.4328 29.3077 34 32.9066 34 37.3462C34 37.3961 33.9992 37.4458 33.9977 37.4954C30.4223 40.3165 25.9078 42 21 42C16.0922 42 11.5777 40.3164 8.00233 37.4954ZM21 9C16.5995 9 13.0323 12.5989 13.0323 17.0385C13.0323 21.478 16.5995 25.0769 21 25.0769C25.4005 25.0769 28.9677 21.478 28.9677 17.0385C28.9677 12.5989 25.4005 9 21 9Z"},null,-1),I=[q,R],O={class:"flex-child-1 flex-child mn-l-small w-100"},H={class:"h3 mn-r-semi mn-thin"},Z={key:0,class:"w-max star-container flex-v-center flex"},j={class:"mn-r-thin pd-r-thin pd-l-thin pd-micro radius-small t-semi uppercase bg-main p-small"},U=["src"],P={class:"p-small t-semi mn-r-thin"},A={class:"p-small"},G={class:"mn-thin"},J={key:0,class:"pd-medium"},K={class:"mn-small w-100 flex-nowrap flex flex-v-center pd-small bg-white radius-medium"},Q={class:"t-black p-medium t-semi"},W=e.createElementVNode("span",{class:"mn-r-small"},"30-60min",-1),X=e.createElementVNode("span",{class:"mn-r-auto"},"$50 min",-1),Y={class:"d-block o-scroll flex-nowrap flex"},ee=e.createElementVNode("button",{class:"flex-center flex-nowrap flex shop-cart-item pd-thin radius-medium w-15r bg-main button"},"View menu",-1),te={__name:"CardOrganization",props:{user:String,organization:Object},emits:["updateMembership"],setup(t,{emit:o}){return a.useRouter(),(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:"bg-grey radius-big o-hidden",onClick:i[1]||(i[1]=l=>n.$router.push({name:"Organization",params:{_id:t.organization._id}}))},[e.createElementVNode("div",D,[t.organization.profile.photo&&t.organization.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:0,src:(n.FILE_SERVER_URL||"")+t.organization.profile.photo,class:"h-4r w-4r radius-extra bg-white"},null,8,T)):(e.openBlock(),e.createElementBlock("svg",F,I)),e.createElementVNode("div",O,[e.createElementVNode("p",H,[e.createVNode(s,{text:t.organization.profile.name?t.organization.profile.name:"",maxLen:16},null,8,["text"])]),t.organization.ratingS?(e.openBlock(),e.createElementBlock("div",Z,[e.createElementVNode("span",j,e.toDisplayString(t.organization.types[0]),1),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,l=>e.createElementVNode("img",{class:"i-small mn-r-thin",src:l<=t.organization.rating.median?"/icons/star.svg":"/icons/star-stroke.svg"},null,8,U)),64)),e.createElementVNode("span",P,e.toDisplayString(t.organization.rating.median),1),e.createElementVNode("span",A,"("+e.toDisplayString(t.organization.rating.amount)+")",1)])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("p",G,e.toDisplayString(t.organization.numberOfMemberships)+" followers",1),t.user._id?(e.openBlock(),e.createBlock(u.ButtonFollow,{key:0,type:"organization",isMember:t.organization.isMember,targetId:t.organization._id,userId:t.user,class:"radius-big w-100",onUpdateMembership:i[0]||(i[0]=l=>o("updateMembership",l))},null,8,["isMember","targetId","userId"])):e.createCommentVNode("",!0)])])]),t.organization.products.length>0?(e.openBlock(),e.createElementBlock("div",J,[e.createElementVNode("div",K,[e.createElementVNode("p",Q,e.toDisplayString(t.organization.products.length)+" items: ",1),W,X]),e.createElementVNode("div",Y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.organization.products,l=>(e.openBlock(),e.createBlock(S,{onClick:e.withModifiers(r=>n.$router.push({name:"Product Organization",params:{_id:t.organization._id,product:l._id}}),["stop"]),key:l._id,editable:!1,product:l,class:"pd-thin radius-medium w-15r br-solid br-grey br-1px bg-white mn-r-thin"},null,8,["onClick","product"]))),128)),ee])])):e.createCommentVNode("",!0)]))}};exports._sfc_main=te;exports._sfc_main$1=s;
|
@@ -0,0 +1,230 @@
|
|
1
|
+
import { openBlock as n, createElementBlock as i, createCommentVNode as a, createElementVNode as e, createTextVNode as m, toDisplayString as r, ref as C, computed as d, unref as u, createVNode as y, Fragment as g, renderList as f, createBlock as x, withModifiers as z } from "vue";
|
2
|
+
import { useRouter as v } from "vue-router";
|
3
|
+
import { B as $ } from "./ButtonFollow-81508d85.mjs";
|
4
|
+
const _ = { class: "flex-stretch flex-nojustify flex-nowrap flex shop-cart-item" }, k = ["src"], L = {
|
5
|
+
key: 1,
|
6
|
+
width: "524",
|
7
|
+
height: "345",
|
8
|
+
viewBox: "0 0 524 345",
|
9
|
+
fill: "none",
|
10
|
+
xmlns: "http://www.w3.org/2000/svg",
|
11
|
+
class: "aspect-1x1",
|
12
|
+
style: { "object-fit": "cover" }
|
13
|
+
}, M = /* @__PURE__ */ e("rect", {
|
14
|
+
width: "524",
|
15
|
+
height: "345",
|
16
|
+
fill: "white"
|
17
|
+
}, null, -1), V = /* @__PURE__ */ e("rect", {
|
18
|
+
width: "524",
|
19
|
+
height: "345",
|
20
|
+
fill: "white"
|
21
|
+
}, null, -1), T = /* @__PURE__ */ e("circle", {
|
22
|
+
cx: "262",
|
23
|
+
cy: "172",
|
24
|
+
r: "56",
|
25
|
+
fill: "#00ff88",
|
26
|
+
"fill-opacity": "0.1"
|
27
|
+
}, null, -1), B = /* @__PURE__ */ e("path", {
|
28
|
+
fill: "#00ff88",
|
29
|
+
d: "M229.348 186.819C230.243 191.884 233.393 194.231 238.458 193.273V193.644C238.458 198.832 241.206 201.581 246.364 201.581H291.545C296.733 201.581 299.481 198.74 299.481 193.644V162.576C299.481 157.481 296.733 154.64 291.545 154.64H285.677L284.071 145.653C283.175 140.619 279.995 138.303 274.899 139.198L230.398 147.043C225.302 147.969 223.048 151.15 223.943 156.246L229.348 186.819ZM230.83 186.479L225.456 156.06C224.715 151.86 226.537 149.266 230.737 148.525L275.084 140.712C279.13 140.001 281.848 141.762 282.62 145.993L284.102 154.64H246.364C241.206 154.64 238.458 157.419 238.458 162.576V191.729L238.365 191.76C234.165 192.532 231.571 190.679 230.83 186.479ZM239.971 162.669C239.971 158.376 242.164 156.153 246.456 156.153H291.483C295.59 156.153 297.968 158.376 297.968 162.669V190.093L284.565 177.894C283.145 176.597 281.662 175.856 279.809 175.856C277.987 175.856 276.628 176.566 275.146 177.863L262.052 189.073L257.142 184.565C255.875 183.36 254.764 182.743 253.158 182.743C251.675 182.743 250.656 183.36 249.39 184.503L239.971 193.212V162.669ZM257.636 178.419C261.373 178.419 264.43 175.3 264.43 171.471C264.43 167.734 261.373 164.584 257.636 164.584C253.806 164.584 250.718 167.734 250.718 171.471C250.718 175.3 253.806 178.419 257.636 178.419Z"
|
30
|
+
}, null, -1), S = [
|
31
|
+
M,
|
32
|
+
V,
|
33
|
+
T,
|
34
|
+
B
|
35
|
+
], E = { class: "text-left" }, F = { class: "name" }, I = {
|
36
|
+
key: 0,
|
37
|
+
class: "t-transp"
|
38
|
+
}, O = {
|
39
|
+
key: 1,
|
40
|
+
class: "t-transp"
|
41
|
+
}, R = {
|
42
|
+
key: 2,
|
43
|
+
class: "t-transp"
|
44
|
+
}, q = { class: "t-main t-demi price mn-small" }, H = { key: 0 }, Z = {
|
45
|
+
key: 0,
|
46
|
+
class: "flex-nojustify flex"
|
47
|
+
}, j = { class: "flex-nowrap flex" }, N = /* @__PURE__ */ e("svg", {
|
48
|
+
fill: "none",
|
49
|
+
height: "20",
|
50
|
+
viewBox: "0 0 20 20",
|
51
|
+
width: "20",
|
52
|
+
xmlns: "http://www.w3.org/2000/svg"
|
53
|
+
}, [
|
54
|
+
/* @__PURE__ */ e("path", {
|
55
|
+
"clip-rule": "evenodd",
|
56
|
+
d: "m7.27124 0h5.45456c1.0041 0 1.8182.814027 1.8182 1.81818v.90899h2.7278c1.0042 0 1.8182.81402 1.8182 1.81818v1.81818c0 1.00415-.814 1.81818-1.8182 1.81818h-.0735l-.8363 10.00009c0 1.0042-.814 1.8182-1.8182 1.8182h-9.09087c-1.00416 0-1.81818-.814-1.81504-1.7427l-.83964-10.07559h-.07187c-1.00415 0-1.818177-.81403-1.818177-1.81818v-1.81818c0-1.00416.814027-1.81818 1.818177-1.81818h2.72668v-.90899c0-1.004153.81402-1.81818 1.81818-1.81818zm-1.81889 18.1819-.83047-10h10.75152l-.827 9.9245-.0031.0755zm-2.72612-11.81799v-1.81818h14.54547v1.81818zm10.00137-4.54571v.90909h-5.45456v-.90909z",
|
57
|
+
fill: "#8a8a8a",
|
58
|
+
"fill-rule": "evenodd"
|
59
|
+
})
|
60
|
+
], -1), U = [
|
61
|
+
N
|
62
|
+
], D = {
|
63
|
+
__name: "CardOrderItem",
|
64
|
+
props: {
|
65
|
+
product: Object,
|
66
|
+
editable: String,
|
67
|
+
increase: Function,
|
68
|
+
decrease: Function,
|
69
|
+
remove: Function
|
70
|
+
},
|
71
|
+
setup(t) {
|
72
|
+
return v(), (o, s) => (n(), i("div", _, [
|
73
|
+
t.product.images[0] ? (n(), i("img", {
|
74
|
+
key: 0,
|
75
|
+
class: "bg-grey aspect-1x1",
|
76
|
+
src: (o.FILE_SERVER_URL || "") + t.product.images[0]
|
77
|
+
}, null, 8, k)) : a("", !0),
|
78
|
+
t.product.images[0] ? a("", !0) : (n(), i("svg", L, S)),
|
79
|
+
e("div", E, [
|
80
|
+
e("p", F, [
|
81
|
+
m(r(t.product.name) + " ", 1),
|
82
|
+
t.product.size ? (n(), i("span", I, ", " + r(t.product.size), 1)) : a("", !0),
|
83
|
+
typeof t.product.color == "string" && t.product.size ? (n(), i("span", O, ", ")) : a("", !0),
|
84
|
+
typeof t.product.color == "string" ? (n(), i("span", R, r(t.product.color), 1)) : a("", !0)
|
85
|
+
]),
|
86
|
+
e("p", q, [
|
87
|
+
t.editable ? (n(), i("span", H, r(t.product.quantity) + " x ", 1)) : a("", !0),
|
88
|
+
m(r(t.product.price) + " " + r(o.returnCurrency()), 1)
|
89
|
+
]),
|
90
|
+
t.editable ? (n(), i("div", Z, [
|
91
|
+
e("div", j, [
|
92
|
+
e("button", {
|
93
|
+
onClick: s[0] || (s[0] = (c) => t.decrease(t.product)),
|
94
|
+
class: "mn-r-thin bg-grey button-square button"
|
95
|
+
}, "-"),
|
96
|
+
e("button", {
|
97
|
+
onClick: s[1] || (s[1] = (c) => t.increase(t.product)),
|
98
|
+
class: "mn-r-thin bg-grey button-square button"
|
99
|
+
}, "+")
|
100
|
+
]),
|
101
|
+
e("button", {
|
102
|
+
onClick: s[2] || (s[2] = (c) => t.remove(t.product)),
|
103
|
+
class: "hover_br-transp hover_br-l-dark bg-transp button-square button"
|
104
|
+
}, U)
|
105
|
+
])) : a("", !0)
|
106
|
+
])
|
107
|
+
]));
|
108
|
+
}
|
109
|
+
}, P = {
|
110
|
+
key: 0,
|
111
|
+
class: "cursor-pointer t-second"
|
112
|
+
}, A = {
|
113
|
+
__name: "Text",
|
114
|
+
props: {
|
115
|
+
maxLen: { type: Number, required: !0 },
|
116
|
+
text: { type: String, required: !0 },
|
117
|
+
showToggleText: { type: Boolean, default: !1 }
|
118
|
+
},
|
119
|
+
setup(t) {
|
120
|
+
const o = t, s = C(!1), c = d(() => o.text.length > o.maxLen ? o.text.slice(0, o.maxLen) + "..." : o.text), l = d(() => o.text), h = () => {
|
121
|
+
s.value = !s.value;
|
122
|
+
}, w = d(() => s.value ? l.value : c.value), b = d(() => o.text.length > o.maxLen), p = d(() => s.value ? "Hide" : "Show more");
|
123
|
+
return (gt, ft) => (n(), i("span", {
|
124
|
+
onClick: h,
|
125
|
+
class: ""
|
126
|
+
}, [
|
127
|
+
m(r(u(w)) + " ", 1),
|
128
|
+
u(b) && t.showToggleText ? (n(), i("span", P, r(u(p)), 1)) : a("", !0)
|
129
|
+
]));
|
130
|
+
}
|
131
|
+
}, G = { class: "pd-medium flex-v-center flex-nowrap flex" }, J = ["src"], K = {
|
132
|
+
key: 1,
|
133
|
+
class: "h-4r w-4r radius-extra",
|
134
|
+
width: "42",
|
135
|
+
height: "42",
|
136
|
+
viewBox: "0 0 42 42",
|
137
|
+
fill: "none",
|
138
|
+
xmlns: "http://www.w3.org/2000/svg"
|
139
|
+
}, Q = /* @__PURE__ */ e("circle", {
|
140
|
+
fill: "rgb(var(--main))",
|
141
|
+
cx: "21",
|
142
|
+
cy: "21",
|
143
|
+
r: "21"
|
144
|
+
}, null, -1), W = /* @__PURE__ */ e("path", {
|
145
|
+
fill: "#242424",
|
146
|
+
"fill-opacity": "0.1",
|
147
|
+
"fill-rule": "evenodd",
|
148
|
+
"clip-rule": "evenodd",
|
149
|
+
d: "M8.00233 37.4954C8.00078 37.4458 8 37.3961 8 37.3462C8 32.9066 11.5673 29.3077 15.9677 29.3077H26.0323C30.4328 29.3077 34 32.9066 34 37.3462C34 37.3961 33.9992 37.4458 33.9977 37.4954C30.4223 40.3165 25.9078 42 21 42C16.0922 42 11.5777 40.3164 8.00233 37.4954ZM21 9C16.5995 9 13.0323 12.5989 13.0323 17.0385C13.0323 21.478 16.5995 25.0769 21 25.0769C25.4005 25.0769 28.9677 21.478 28.9677 17.0385C28.9677 12.5989 25.4005 9 21 9Z"
|
150
|
+
}, null, -1), X = [
|
151
|
+
Q,
|
152
|
+
W
|
153
|
+
], Y = { class: "flex-child-1 flex-child mn-l-small w-100" }, tt = { class: "h3 mn-r-semi mn-thin" }, et = {
|
154
|
+
key: 0,
|
155
|
+
class: "w-max star-container flex-v-center flex"
|
156
|
+
}, nt = { class: "mn-r-thin pd-r-thin pd-l-thin pd-micro radius-small t-semi uppercase bg-main p-small" }, it = ["src"], st = { class: "p-small t-semi mn-r-thin" }, ot = { class: "p-small" }, rt = { class: "mn-thin" }, at = {
|
157
|
+
key: 0,
|
158
|
+
class: "pd-medium"
|
159
|
+
}, lt = { class: "mn-small w-100 flex-nowrap flex flex-v-center pd-small bg-white radius-medium" }, ct = { class: "t-black p-medium t-semi" }, dt = /* @__PURE__ */ e("span", { class: "mn-r-small" }, "30-60min", -1), ut = /* @__PURE__ */ e("span", { class: "mn-r-auto" }, "$50 min", -1), mt = { class: "d-block o-scroll flex-nowrap flex" }, ht = /* @__PURE__ */ e("button", { class: "flex-center flex-nowrap flex shop-cart-item pd-thin radius-medium w-15r bg-main button" }, "View menu", -1), bt = {
|
160
|
+
__name: "CardOrganization",
|
161
|
+
props: {
|
162
|
+
user: String,
|
163
|
+
organization: Object
|
164
|
+
},
|
165
|
+
emits: ["updateMembership"],
|
166
|
+
setup(t, { emit: o }) {
|
167
|
+
return v(), (s, c) => (n(), i("div", {
|
168
|
+
class: "bg-grey radius-big o-hidden",
|
169
|
+
onClick: c[1] || (c[1] = (l) => s.$router.push({ name: "Organization", params: { _id: t.organization._id } }))
|
170
|
+
}, [
|
171
|
+
e("div", G, [
|
172
|
+
t.organization.profile.photo && t.organization.profile.photo.length > 0 ? (n(), i("img", {
|
173
|
+
key: 0,
|
174
|
+
src: (s.FILE_SERVER_URL || "") + t.organization.profile.photo,
|
175
|
+
class: "h-4r w-4r radius-extra bg-white"
|
176
|
+
}, null, 8, J)) : (n(), i("svg", K, X)),
|
177
|
+
e("div", Y, [
|
178
|
+
e("p", tt, [
|
179
|
+
y(A, {
|
180
|
+
text: t.organization.profile.name ? t.organization.profile.name : "",
|
181
|
+
maxLen: 16
|
182
|
+
}, null, 8, ["text"])
|
183
|
+
]),
|
184
|
+
t.organization.ratingS ? (n(), i("div", et, [
|
185
|
+
e("span", nt, r(t.organization.types[0]), 1),
|
186
|
+
(n(), i(g, null, f(5, (l) => e("img", {
|
187
|
+
class: "i-small mn-r-thin",
|
188
|
+
src: l <= t.organization.rating.median ? "/icons/star.svg" : "/icons/star-stroke.svg"
|
189
|
+
}, null, 8, it)), 64)),
|
190
|
+
e("span", st, r(t.organization.rating.median), 1),
|
191
|
+
e("span", ot, "(" + r(t.organization.rating.amount) + ")", 1)
|
192
|
+
])) : a("", !0),
|
193
|
+
e("div", null, [
|
194
|
+
e("p", rt, r(t.organization.numberOfMemberships) + " followers", 1),
|
195
|
+
t.user._id ? (n(), x($, {
|
196
|
+
key: 0,
|
197
|
+
type: "organization",
|
198
|
+
isMember: t.organization.isMember,
|
199
|
+
targetId: t.organization._id,
|
200
|
+
userId: t.user,
|
201
|
+
class: "radius-big w-100",
|
202
|
+
onUpdateMembership: c[0] || (c[0] = (l) => o("updateMembership", l))
|
203
|
+
}, null, 8, ["isMember", "targetId", "userId"])) : a("", !0)
|
204
|
+
])
|
205
|
+
])
|
206
|
+
]),
|
207
|
+
t.organization.products.length > 0 ? (n(), i("div", at, [
|
208
|
+
e("div", lt, [
|
209
|
+
e("p", ct, r(t.organization.products.length) + " items: ", 1),
|
210
|
+
dt,
|
211
|
+
ut
|
212
|
+
]),
|
213
|
+
e("div", mt, [
|
214
|
+
(n(!0), i(g, null, f(t.organization.products, (l) => (n(), x(D, {
|
215
|
+
onClick: z((h) => s.$router.push({ name: "Product Organization", params: { _id: t.organization._id, product: l._id } }), ["stop"]),
|
216
|
+
key: l._id,
|
217
|
+
editable: !1,
|
218
|
+
product: l,
|
219
|
+
class: "pd-thin radius-medium w-15r br-solid br-grey br-1px bg-white mn-r-thin"
|
220
|
+
}, null, 8, ["onClick", "product"]))), 128)),
|
221
|
+
ht
|
222
|
+
])
|
223
|
+
])) : a("", !0)
|
224
|
+
]));
|
225
|
+
}
|
226
|
+
};
|
227
|
+
export {
|
228
|
+
bt as _,
|
229
|
+
A as a
|
230
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue"),N=require("./EmptyState-7658d7d6.js"),C=require("./Chips-4d8ac62e.js"),V=require("./IconEdit-4cfe2115.js"),D=require("./index-2a0269fc.js"),U=require("vue-router"),$=require("./_plugin-vue_export-helper-f246444f.js"),h=require("./globals-928eb13c.js"),z={key:0,class:"o-hidden pos-relative bg-grey mn-small w-100"},P=["src"],M=["src"],I={class:"w-max mn-r-thin pd-thin radius-small t-semi bg-main"},F={key:0,class:"t-semi"},L={class:"t-semi"},R={key:0,class:"t-semi uppercase"},_={key:1,class:"cursor-pointer mn-thin flex-nowrap flex w-100"},O={key:0,class:""},q={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"},b={__name:"CardEvent",props:["event","user","short","type"],setup(t){const r=t;e.ref(new Date),U.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,c=Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds()),n=new Date(r.event.date.start),o=Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds())-c;if(o<0)return"Finished";if(o===0)return"Starting Now";{const f=Math.floor(o/1e3),g=Math.floor(f/60),k=Math.floor(g/60),w=Math.floor(k/24);return w>0?`${w} 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),c={day:"2-digit",month:"2-digit"};return a.toLocaleDateString(void 0,c)}),i=e.computed(()=>{console.log(r.event.date.start),console.log(r.event.date.end);const a=new Date(r.event.date.start),c=new Date(r.event.date.end),n=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(a),p=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(c);return`${n}-${p}`}),d=e.computed(()=>{const a=r.event.name;return a.length>26?`${a.substring(0,22)}…`:a});return(a,c)=>(e.openBlock(),e.createElementBlock("article",{class:e.normalizeClass([{"flex-nowrap flex-v-center flex":t.type==="short"},"pos-relative"])},[e.createVNode(C._sfc_main,{class:e.normalizeClass({"mn-small pd-medium":t.type!=="short","flex-child-order-last flex-child mn-l-small":t.type==="short"}),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","owner","creator","members","membersPhotos","type","dateFormatted"]),t.event.cover&&t.type!=="short"?(e.openBlock(),e.createElementBlock("div",z,[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,P),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,M)])):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(V.IconEdit,{key:0,onClick:c[0]||(c[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",F,e.toDisplayString(e.unref(l))+" | ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",L,e.toDisplayString(e.unref(i)),1)]),t.type==="short"?(e.openBlock(),e.createElementBlock("span",R,e.toDisplayString(e.unref(d)),1)):e.createCommentVNode("",!0)],2),t.type!=="short"?(e.openBlock(),e.createElementBlock("div",_,[t.type!=="short"?(e.openBlock(),e.createElementBlock("h3",O,e.toDisplayString(t.event.name),1)):e.createCommentVNode("",!0),t.event.status==="draft"?(e.openBlock(),e.createElementBlock("div",q,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(C._sfc_main$1,{key:3,chips:t.event.tags},null,8,["chips"])):e.createCommentVNode("",!0)],2)],2))}},H={},G={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},Y=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),A=[Y];function J(t,r){return e.openBlock(),e.createElementBlock("svg",G,A)}const E=$._export_sfc(H,[["render",J]]),y=D.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.status&&(t.params={status:t.status}),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 y.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 x(t){return y.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 y.post("/api/events/update",t).then(r=>(m(r.data,"current"),Promise.resolve(r.data)),r=>(h.setError(r),Promise.reject(r)))}async function S(t){return await y.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 T(){u.current={_id:"",cover:"",url:"",status:"",name:"",tags:[],date:{start:null,false:null},views:0,content:[]}}e.watch(u,(t,r)=>{});const K=Object.freeze(Object.defineProperty({__proto__:null,clean:T,create:x,read:v,remove:S,set:m,state:u,update:B},Symbol.toStringTag,{value:"Module"})),Q={class:"feed"},W={__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},status:{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),c=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,status:r.status});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,status:r.status});n.length===0?l.value=!1:l.value=!0,s.value=n,i.value=!1}),(n,p)=>(e.openBlock(),e.createElementBlock("section",Q,[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,o=>(e.openBlock(),e.createBlock(E,{key:o}))),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,(o,f)=>(e.openBlock(),e.createBlock(b,{onClick:g=>n.$router.push({name:"Event",params:{url:o.url}}),key:o._id,event:o,owner: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","owner","class"]))),128)):e.createCommentVNode("",!0),l.value&&s.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:c,class:"w-100 bg-main button"},"Load more")):e.createCommentVNode("",!0)]),_:1})]))}};exports.SkeletonEvent=E;exports._sfc_main=W;exports._sfc_main$1=b;exports.clean=T;exports.create=x;exports.events=K;exports.read=v;exports.remove=S;exports.state=u;exports.update=B;
|