@ozdao/prometheus-framework 0.1.38 → 0.1.40
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/ButtonToggleMembership-738720bd.js +1 -0
- package/dist/ButtonToggleMembership-e337e704.mjs +90 -0
- package/dist/CardBlogpost-ae3b4d23.js +1 -0
- package/dist/CardBlogpost-c7adb0a7.mjs +246 -0
- package/dist/CardBlogpost-d6f49156.mjs +246 -0
- package/dist/CardBlogpost-f308ff64.js +1 -0
- package/dist/CardOrganization-22beb83d.js +1 -0
- package/dist/CardOrganization-ae384e54.mjs +234 -0
- package/dist/Chips-3a07f374.js +1 -0
- package/dist/Chips-a8681edd.mjs +213 -0
- package/dist/Chips-edf2b573.js +1 -0
- package/dist/Chips-f06ec38f.mjs +213 -0
- package/dist/Community-04b25965.mjs +130 -0
- package/dist/Community-2f6fee0f.js +1 -0
- package/dist/Community-72dbb933.js +1 -0
- package/dist/Community-b4d10da6.mjs +130 -0
- package/dist/Dashboard-73b50724.js +1 -0
- package/dist/Dashboard-bc81b5f6.mjs +151 -0
- package/dist/Dropdown-ef2df9a9.mjs +169 -0
- package/dist/Dropdown-f2564c92.js +1 -0
- package/dist/Events-0c6e3ef4.mjs +134 -0
- package/dist/Events-41d71b0e.js +1 -0
- package/dist/Events-4742f070.js +1 -0
- package/dist/Events-af7170ed.mjs +134 -0
- package/dist/Feed-04fe1f7a.mjs +361 -0
- package/dist/Feed-09b0790d.js +1 -0
- package/dist/Feed-12b12380.js +1 -0
- package/dist/Feed-23758089.mjs +124 -0
- package/dist/Feed-36e83be3.mjs +156 -0
- package/dist/Feed-5653cf8b.js +1 -0
- package/dist/Feed-585d5821.mjs +124 -0
- package/dist/Feed-5a359bb7.js +1 -0
- package/dist/Feed-6ca0541a.js +1 -0
- package/dist/Feed-807d265b.mjs +156 -0
- package/dist/Feed-90f74d6c.mjs +361 -0
- package/dist/Feed-a47977d3.js +1 -0
- package/dist/Image-268e2a1b.js +9 -0
- package/dist/Image-39955d9d.mjs +480 -0
- package/dist/Image-5423e8ce.mjs +480 -0
- package/dist/Image-c2d190d8.js +9 -0
- package/dist/LeftoverAdd-21311275.js +1 -0
- package/dist/LeftoverAdd-ccf4595f.mjs +228 -0
- package/dist/Members-7251dd52.mjs +109 -0
- package/dist/Members-9b013515.js +1 -0
- package/dist/Members-d35ab7e8.js +1 -0
- package/dist/Members-d64149f3.mjs +109 -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/Organizations-0fd5bc8b.mjs +72 -0
- package/dist/Organizations-a964d4b6.mjs +72 -0
- package/dist/Organizations-d360c360.js +1 -0
- package/dist/Organizations-ed6d36d6.js +1 -0
- package/dist/Popup-0d8e1392.mjs +96 -0
- package/dist/Popup-eb11fa82.js +1 -0
- package/dist/Product-299070ad.mjs +652 -0
- package/dist/Product-aacb05f3.js +7 -0
- package/dist/Product-e43dd2f1.js +7 -0
- package/dist/Product-e4e583f0.mjs +652 -0
- package/dist/ProductEdit-70bed802.mjs +296 -0
- package/dist/ProductEdit-e5a2e0f6.js +1 -0
- package/dist/ProductsBackoffice-3c182d6a.mjs +86 -0
- package/dist/ProductsBackoffice-b684913d.js +1 -0
- package/dist/ProfileBlogposts-6bf526fb.js +1 -0
- package/dist/ProfileBlogposts-8f6191d6.js +1 -0
- package/dist/ProfileBlogposts-aa839fcb.mjs +77 -0
- package/dist/ProfileBlogposts-d4b17535.mjs +77 -0
- package/dist/ProfileEvents-3eeb4320.mjs +68 -0
- package/dist/ProfileEvents-6b3fb52e.mjs +68 -0
- package/dist/ProfileEvents-893285bb.js +1 -0
- package/dist/ProfileEvents-90e09978.js +1 -0
- package/dist/ProfileOrganizations-738f444a.js +1 -0
- package/dist/ProfileOrganizations-c4fb03a1.mjs +72 -0
- package/dist/ProfileOrganizations-e838925f.js +1 -0
- package/dist/ProfileOrganizations-edf657ca.mjs +72 -0
- package/dist/Publics-a31d7fe7.js +1 -0
- package/dist/Publics-a8f31413.mjs +45 -0
- package/dist/Wallet-2043b611.mjs +24682 -0
- package/dist/Wallet-8fa7386a.js +55 -0
- package/dist/auth-076a83d0.mjs +625 -0
- package/dist/auth-df5a20c6.js +7 -0
- package/dist/auth.client.cjs +1 -1
- package/dist/auth.client.js +4 -4
- package/dist/auth.validation-80b133df.js +1 -0
- package/dist/auth.validation-fd9ae66f.mjs +24 -0
- package/dist/backoffice.client.cjs +1 -1
- package/dist/backoffice.client.js +12 -12
- package/dist/categories-4327a81c.js +1 -0
- package/dist/categories-52a561a4.mjs +122 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +205 -198
- package/dist/events.client.cjs +2 -2
- package/dist/events.client.js +17 -20
- package/dist/landing.client.cjs +1 -1
- package/dist/landing.client.js +64 -40
- package/dist/legal.client.cjs +1 -1
- package/dist/legal.client.js +5 -6
- package/dist/main.css +1 -1
- package/dist/modules/gallery/components/pages/Gallery.vue.d.ts +2 -0
- package/dist/modules/gallery/components/sections/GalleryWithCategories.vue.d.ts +2 -0
- package/dist/modules/globals/components/sections/Title.vue.d.ts +6 -0
- package/dist/organizations-966e1cd2.mjs +122 -0
- package/dist/organizations-d12c42b6.js +1 -0
- package/dist/organizations.client-63b476ff.mjs +2996 -0
- package/dist/organizations.client-696eacbb.js +3 -0
- package/dist/organizations.client-8f263e28.js +3 -0
- package/dist/organizations.client-9ffc023f.mjs +2996 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +49 -54
- package/dist/products-7e4253eb.js +1 -0
- package/dist/products-aabe5c02.mjs +108 -0
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +2 -2
- package/dist/states.validation-4594b33c.mjs +13 -0
- package/dist/states.validation-69003e66.js +1 -0
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +286 -202
- package/package.json +1 -5
- package/src/components/LocationMarker/LocationMarker.vue +1 -1
- package/src/components/LocationSelection/LocationSelection.vue +1 -1
- package/src/components/Navigation/Navigation.vue +12 -1
- package/src/modules/auth/store/auth.js +7 -4
- package/src/modules/files/middlewares/server/md.js +1 -0
- package/src/modules/gallery/components/pages/Gallery.vue +21 -0
- package/src/modules/gallery/components/sections/GalleryWithCategories.vue +408 -0
- package/src/modules/gallery/gallery.client.js +11 -14
- package/src/modules/gallery/router/gallery.router.js +10 -0
- package/src/modules/globals/components/sections/Title.vue +22 -0
- package/src/modules/marketplace/router/marketplace.js +4 -3
- package/src/modules/organizations/components/sections/Feed.vue +2 -2
- package/src/modules/products/components/pages/ProductRecommmendation.vue +5 -3
- package/src/modules/products/components/sections/SectionProduct.vue +17 -5
- package/src/modules/products/controllers/products.controller.js +83 -0
- package/src/modules/products/routes/products.routes.js +5 -5
- package/src/modules/spots/components/layouts/Spots.vue +16 -11
- package/src/modules/spots/components/pages/Map.vue +9 -7
- package/src/modules/users/components/pages/Profile.vue +15 -5
- package/src/modules/users/router/users.js +10 -0
- package/src/modules/wallet/components/pages/Wallet.vue +104 -23
@@ -0,0 +1,234 @@
|
|
1
|
+
import { openBlock as n, createElementBlock as i, createCommentVNode as a, createElementVNode as e, createTextVNode as h, toDisplayString as o, ref as p, computed as d, unref as m, createVNode as y, Fragment as f, renderList as x, createBlock as v, withModifiers as z } from "vue";
|
2
|
+
import { useRouter as b } from "vue-router";
|
3
|
+
import { _ as $ } from "./ButtonToggleMembership-e337e704.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: "i-extra"
|
12
|
+
}, S = /* @__PURE__ */ e("rect", {
|
13
|
+
width: "524",
|
14
|
+
height: "345",
|
15
|
+
fill: "white"
|
16
|
+
}, null, -1), V = /* @__PURE__ */ e("rect", {
|
17
|
+
width: "524",
|
18
|
+
height: "345",
|
19
|
+
fill: "white"
|
20
|
+
}, null, -1), M = /* @__PURE__ */ e("circle", {
|
21
|
+
cx: "262",
|
22
|
+
cy: "172",
|
23
|
+
r: "56",
|
24
|
+
fill: "#00ff88",
|
25
|
+
"fill-opacity": "0.1"
|
26
|
+
}, null, -1), T = /* @__PURE__ */ e("path", {
|
27
|
+
fill: "#00ff88",
|
28
|
+
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"
|
29
|
+
}, null, -1), O = [
|
30
|
+
S,
|
31
|
+
V,
|
32
|
+
M,
|
33
|
+
T
|
34
|
+
], E = { class: "text-left" }, F = { class: "name" }, B = {
|
35
|
+
key: 0,
|
36
|
+
class: "t-transp"
|
37
|
+
}, R = {
|
38
|
+
key: 1,
|
39
|
+
class: "t-transp"
|
40
|
+
}, q = {
|
41
|
+
key: 2,
|
42
|
+
class: "t-transp"
|
43
|
+
}, H = { class: "t-main t-demi price mn-small" }, Z = { key: 0 }, N = {
|
44
|
+
key: 0,
|
45
|
+
class: "flex-nojustify flex"
|
46
|
+
}, U = { class: "flex-nowrap flex" }, j = /* @__PURE__ */ e("svg", {
|
47
|
+
fill: "none",
|
48
|
+
height: "20",
|
49
|
+
viewBox: "0 0 20 20",
|
50
|
+
width: "20",
|
51
|
+
xmlns: "http://www.w3.org/2000/svg"
|
52
|
+
}, [
|
53
|
+
/* @__PURE__ */ e("path", {
|
54
|
+
"clip-rule": "evenodd",
|
55
|
+
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",
|
56
|
+
fill: "#8a8a8a",
|
57
|
+
"fill-rule": "evenodd"
|
58
|
+
})
|
59
|
+
], -1), I = [
|
60
|
+
j
|
61
|
+
], D = {
|
62
|
+
__name: "CardOrderItem",
|
63
|
+
props: {
|
64
|
+
product: Object,
|
65
|
+
editable: String,
|
66
|
+
increase: Function,
|
67
|
+
decrease: Function,
|
68
|
+
remove: Function
|
69
|
+
},
|
70
|
+
setup(t) {
|
71
|
+
return b(), (r, s) => (n(), i("div", _, [
|
72
|
+
t.product.images[0] ? (n(), i("img", {
|
73
|
+
key: 0,
|
74
|
+
class: "bg-grey aspect-1x1",
|
75
|
+
src: (r.FILE_SERVER_URL || "") + t.product.images[0]
|
76
|
+
}, null, 8, k)) : a("", !0),
|
77
|
+
t.product.images[0] ? a("", !0) : (n(), i("svg", L, O)),
|
78
|
+
e("div", E, [
|
79
|
+
e("p", F, [
|
80
|
+
h(o(t.product.name) + " ", 1),
|
81
|
+
t.product.size ? (n(), i("span", B, ", " + o(t.product.size), 1)) : a("", !0),
|
82
|
+
typeof t.product.color == "string" && t.product.size ? (n(), i("span", R, ", ")) : a("", !0),
|
83
|
+
typeof t.product.color == "string" ? (n(), i("span", q, o(t.product.color), 1)) : a("", !0)
|
84
|
+
]),
|
85
|
+
e("p", H, [
|
86
|
+
t.editable ? (n(), i("span", Z, o(t.product.quantity) + " x ", 1)) : a("", !0),
|
87
|
+
h(o(t.product.price) + " " + o(r.returnCurrency()), 1)
|
88
|
+
]),
|
89
|
+
t.editable ? (n(), i("div", N, [
|
90
|
+
e("div", U, [
|
91
|
+
e("button", {
|
92
|
+
onClick: s[0] || (s[0] = (c) => t.decrease(t.product)),
|
93
|
+
class: "mn-r-thin bg-grey button-square button"
|
94
|
+
}, "-"),
|
95
|
+
e("button", {
|
96
|
+
onClick: s[1] || (s[1] = (c) => t.increase(t.product)),
|
97
|
+
class: "mn-r-thin bg-grey button-square button"
|
98
|
+
}, "+")
|
99
|
+
]),
|
100
|
+
e("button", {
|
101
|
+
onClick: s[2] || (s[2] = (c) => t.remove(t.product)),
|
102
|
+
class: "hover_br-transp hover_br-l-dark bg-transp button-square button"
|
103
|
+
}, I)
|
104
|
+
])) : a("", !0)
|
105
|
+
])
|
106
|
+
]));
|
107
|
+
}
|
108
|
+
}, P = {
|
109
|
+
key: 0,
|
110
|
+
class: "cursor-pointer t-second"
|
111
|
+
}, A = {
|
112
|
+
__name: "Text",
|
113
|
+
props: {
|
114
|
+
maxLen: { type: Number, required: !0 },
|
115
|
+
text: { type: String, required: !0 },
|
116
|
+
showToggleText: { type: Boolean, default: !1 }
|
117
|
+
},
|
118
|
+
setup(t) {
|
119
|
+
const r = t, s = p(!1), c = d(() => r.text.length > r.maxLen ? r.text.slice(0, r.maxLen) + "..." : r.text), u = d(() => r.text), l = () => {
|
120
|
+
s.value = !s.value;
|
121
|
+
}, g = d(() => s.value ? u.value : c.value), w = d(() => r.text.length > r.maxLen), C = d(() => s.value ? "Hide" : "Show more");
|
122
|
+
return (gt, ft) => (n(), i("span", {
|
123
|
+
onClick: l,
|
124
|
+
class: ""
|
125
|
+
}, [
|
126
|
+
h(o(m(g)) + " ", 1),
|
127
|
+
m(w) && t.showToggleText ? (n(), i("span", P, o(m(C)), 1)) : a("", !0)
|
128
|
+
]));
|
129
|
+
}
|
130
|
+
}, G = { class: "pd-medium flex-v-center flex-nowrap flex" }, J = ["src"], K = {
|
131
|
+
key: 1,
|
132
|
+
class: "h-4r w-4r radius-extra",
|
133
|
+
width: "42",
|
134
|
+
height: "42",
|
135
|
+
viewBox: "0 0 42 42",
|
136
|
+
fill: "none",
|
137
|
+
xmlns: "http://www.w3.org/2000/svg"
|
138
|
+
}, Q = /* @__PURE__ */ e("circle", {
|
139
|
+
fill: "rgb(var(--main))",
|
140
|
+
cx: "21",
|
141
|
+
cy: "21",
|
142
|
+
r: "21"
|
143
|
+
}, null, -1), W = /* @__PURE__ */ e("path", {
|
144
|
+
fill: "#242424",
|
145
|
+
"fill-opacity": "0.1",
|
146
|
+
"fill-rule": "evenodd",
|
147
|
+
"clip-rule": "evenodd",
|
148
|
+
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"
|
149
|
+
}, null, -1), X = [
|
150
|
+
Q,
|
151
|
+
W
|
152
|
+
], Y = { class: "flex-child-1 flex-child mn-l-small w-100" }, tt = { class: "h3 mn-r-semi mn-thin" }, et = {
|
153
|
+
key: 0,
|
154
|
+
class: "w-max star-container flex-v-center flex"
|
155
|
+
}, 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 = {
|
156
|
+
key: 0,
|
157
|
+
class: "pd-medium"
|
158
|
+
}, 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), wt = {
|
159
|
+
__name: "CardOrganization",
|
160
|
+
props: {
|
161
|
+
user: String,
|
162
|
+
organization: Object
|
163
|
+
},
|
164
|
+
emits: ["updateMembership"],
|
165
|
+
setup(t, { emit: r }) {
|
166
|
+
return b(), (s, c) => {
|
167
|
+
var u;
|
168
|
+
return n(), i("div", {
|
169
|
+
class: "bg-grey radius-big o-hidden",
|
170
|
+
onClick: c[1] || (c[1] = (l) => s.$router.push({ name: "Organization", params: { _id: t.organization._id } }))
|
171
|
+
}, [
|
172
|
+
e("div", G, [
|
173
|
+
t.organization.profile.photo && t.organization.profile.photo.length > 0 ? (n(), i("img", {
|
174
|
+
key: 0,
|
175
|
+
src: (s.FILE_SERVER_URL || "") + t.organization.profile.photo,
|
176
|
+
class: "h-4r w-4r radius-extra bg-white"
|
177
|
+
}, null, 8, J)) : (n(), i("svg", K, X)),
|
178
|
+
e("div", Y, [
|
179
|
+
e("p", tt, [
|
180
|
+
y(A, {
|
181
|
+
text: t.organization.profile.name ? t.organization.profile.name : "",
|
182
|
+
maxLen: 16
|
183
|
+
}, null, 8, ["text"])
|
184
|
+
]),
|
185
|
+
t.organization.ratingS ? (n(), i("div", et, [
|
186
|
+
e("span", nt, o(t.organization.types[0]), 1),
|
187
|
+
(n(), i(f, null, x(5, (l) => e("img", {
|
188
|
+
class: "i-small mn-r-thin",
|
189
|
+
src: l <= t.organization.rating.median ? "/icons/star.svg" : "/icons/star-stroke.svg"
|
190
|
+
}, null, 8, it)), 64)),
|
191
|
+
e("span", st, o(t.organization.rating.median), 1),
|
192
|
+
e("span", ot, "(" + o(t.organization.rating.amount) + ")", 1)
|
193
|
+
])) : a("", !0),
|
194
|
+
e("div", null, [
|
195
|
+
e("p", rt, o(t.organization.numberOfSubscribers) + " followers", 1),
|
196
|
+
(u = t.user) != null && u._id && t.organization.owner !== t.user._id ? (n(), v($, {
|
197
|
+
key: 0,
|
198
|
+
user: t.user._id,
|
199
|
+
type: "organization",
|
200
|
+
role: "subscriber",
|
201
|
+
target: t.organization._id,
|
202
|
+
status: t.organization.isSubscriber,
|
203
|
+
text: { create: "Follow", remove: "Unfollow" },
|
204
|
+
onUpdateMembership: c[0] || (c[0] = (l) => s.handleMembershipUpdate(l, "isSubscriber", "numberOfSubscribers")),
|
205
|
+
class: "w-min"
|
206
|
+
}, null, 8, ["user", "target", "status"])) : a("", !0)
|
207
|
+
])
|
208
|
+
])
|
209
|
+
]),
|
210
|
+
t.organization.products.length > 0 ? (n(), i("div", at, [
|
211
|
+
e("div", lt, [
|
212
|
+
e("p", ct, o(t.organization.products.length) + " items: ", 1),
|
213
|
+
dt,
|
214
|
+
ut
|
215
|
+
]),
|
216
|
+
e("div", mt, [
|
217
|
+
(n(!0), i(f, null, x(t.organization.products, (l) => (n(), v(D, {
|
218
|
+
onClick: z((g) => s.$router.push({ name: "Product Organization", params: { _id: t.organization._id, product: l._id } }), ["stop"]),
|
219
|
+
key: l._id,
|
220
|
+
editable: !1,
|
221
|
+
product: l,
|
222
|
+
class: "pd-thin radius-medium w-15r br-solid br-grey br-1px bg-white mn-r-thin"
|
223
|
+
}, null, 8, ["onClick", "product"]))), 128)),
|
224
|
+
ht
|
225
|
+
])
|
226
|
+
])) : a("", !0)
|
227
|
+
]);
|
228
|
+
};
|
229
|
+
}
|
230
|
+
};
|
231
|
+
export {
|
232
|
+
wt as _,
|
233
|
+
A as a
|
234
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue"),k=require("vue-router"),y=require("./Dropdown-f2564c92.js");require("./Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./auth-06d35b82.js");require("./memberships-393765d8.js");const p=require("./index-b41aac19.js"),u=require("./globals-928eb13c.js"),w={key:0,class:"pd-b-zero"},b={class:"w-100 flex-v-center flex-nojustify flex"},B={class:"w-100 flex-nowrap flex-v-center flex"},E=["src"],x={key:2,class:"t-semi"},$={key:1},v={key:2},C={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},V={key:0,class:"w-4r i-thin"},N={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"},P=["src"],R={class:"bg-black pd-thin radius-small"},S=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),D={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type"],setup(t){k.useRouter();function o(s){const r=new Date,n=new Date(s),l=Math.abs(r-n),i=Math.floor(l/1e3),a=Math.floor(i/60),d=Math.floor(a/60),m=Math.floor(d/24),f=Math.floor(m/7);return f>0?`${f} week${f>1?"s":""} ago`:m>0?`${m} day${m>1?"s":""} ago`:d>0?`${d} hour${d>1?"s":""} ago`:a>0?`${a} minute${a>1?"s":""} ago`:"Just now"}return(s,r)=>{var n,l;return t.owner?(e.openBlock(),e.createElementBlock("header",w,[e.createElementVNode("div",b,[e.createElementVNode("div",B,[t.owner.target.profile.photo.length>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(s.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(i=>s.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,E)):e.createCommentVNode("",!0),!t.owner.target.profile.photo&&t.type!=="short"?(e.openBlock(),e.createBlock(y.PlaceholderUserpic,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(i=>s.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",x,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(i=>s.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(t.owner.target.profile.name),1),!t.creator.hidden&&t.owner.target.profile.name!==((n=t.creator.target.profile)==null?void 0:n.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(i=>s.$router.push({name:"User Profile",params:{_id:t.creator.target._id}}),["stop"]))}," · by "+e.toDisplayString((l=t.creator.target.profile)==null?void 0:l.name),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",$," · "+e.toDisplayString(o(t.date)),1)):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",v," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",C,[t.members?(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("span",N,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(i,a)=>(e.openBlock(),e.createElementBlock("img",{key:a,src:(s.FILE_SERVER_URL||"")+i,style:e.normalizeStyle({position:"absolute",top:"0px",right:a*20+20+"%",zIndex:1-a}),class:"br-solid br-2px br-white i-thin bg-grey radius-big"},null,12,P))),128))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user&&t.user!=t.creator.target._id?(e.openBlock(),e.createBlock(y.Dropdown,{key:3,label:"...",align:"right",class:"cursor-pointer z-index-2 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",R,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(y._sfc_main,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[S]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}},h=p.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),c=e.reactive({reactions:[],error:null}),g={async read({user:t,type:o,target:s,role:r}){try{const n=await h.get("/api/reactions",{params:{user:t,type:o,target:s,role:r}});return c.error=null,c.reactions=n.data,Promise.resolve(n.data)}catch(n){return u.setError(n),Promise.reject(n)}},async create(t){try{const o=await h.post("/api/reactions/create",t);return c.error=null,Promise.resolve(o.data)}catch(o){return console.log(o),u.setError(o),Promise.reject(o)}},async update(t){try{const o=await h.post("/api/reactions/update",t);return c.error=null,Promise.resolve(o.data)}catch(o){return u.setError(o),Promise.reject(o)}},async delete(t){try{const o=await h.post("/api/reactions/delete",t);return c.error=null,Promise.resolve(o.data)}catch(o){return u.setError(o),Promise.reject(o)}}},M={handleReactionUpdate(t,o,s){let r;if(Array.isArray(t)?r=t.find(n=>n._id===o.target):typeof t=="object"&&t._id===o.target&&(r=t),r)if(r.hasReaction=s,s)r.reactions.push(o),r.numberOfReactions+=1;else{const n=r.reactions.findIndex(l=>l._id===o._id);n!==-1&&(r.reactions.splice(n,1),r.numberOfReactions-=1)}}};e.watch(c,t=>{});const U=Object.freeze(Object.defineProperty({__proto__:null,actions:g,mutations:M,state:c},Symbol.toStringTag,{value:"Module"})),q={class:"flex-v-center gap-thin flex"},z={class:"pd-thin radius-small t-semi bg-main"},j={key:1,class:"pd-thin radius-small t-semi bg-white"},L={__name:"Chips",props:["chips"],setup(t){return(o,s)=>(e.openBlock(),e.createElementBlock("div",q,[t.chips.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.chips,(r,n)=>(e.openBlock(),e.createElementBlock("div",z,e.toDisplayString(r.text?r.text:r),1))),256)):(e.openBlock(),e.createElementBlock("div",j,e.toDisplayString(t.chips),1))]))}};exports._sfc_main=D;exports._sfc_main$1=L;exports.actions=g;exports.reactions=U;
|
@@ -0,0 +1,213 @@
|
|
1
|
+
import { openBlock as o, createElementBlock as a, createElementVNode as d, withModifiers as g, createCommentVNode as i, createBlock as x, toDisplayString as u, Fragment as v, renderList as $, normalizeStyle as P, withCtx as k, reactive as R, watch as E } from "vue";
|
2
|
+
import { useRouter as U } from "vue-router";
|
3
|
+
import { P as z, D as C, _ as j } from "./Dropdown-ef2df9a9.mjs";
|
4
|
+
import "./Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
5
|
+
import "./auth-ec618cb3.mjs";
|
6
|
+
import "./memberships-12210953.mjs";
|
7
|
+
import { a as M } from "./index-a661083c.mjs";
|
8
|
+
import { s as b } from "./globals-96ba60e4.mjs";
|
9
|
+
const L = {
|
10
|
+
key: 0,
|
11
|
+
class: "pd-b-zero"
|
12
|
+
}, O = { class: "w-100 flex-v-center flex-nojustify flex" }, S = { class: "w-100 flex-nowrap flex-v-center flex" }, D = ["src"], F = {
|
13
|
+
key: 2,
|
14
|
+
class: "t-semi"
|
15
|
+
}, I = { key: 1 }, A = { key: 2 }, T = { class: "d-block mn-l-auto flex-nowrap flex flex-v-center" }, V = {
|
16
|
+
key: 0,
|
17
|
+
class: "w-4r i-thin"
|
18
|
+
}, B = {
|
19
|
+
style: {
|
20
|
+
position: "absolute",
|
21
|
+
top: "0px",
|
22
|
+
right: "0px"
|
23
|
+
},
|
24
|
+
class: "br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"
|
25
|
+
}, N = ["src"], H = { class: "bg-black pd-thin radius-small" }, J = /* @__PURE__ */ d("button", { class: "w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button" }, " Report ", -1), oe = {
|
26
|
+
__name: "CardHeader",
|
27
|
+
props: [
|
28
|
+
"user",
|
29
|
+
"entity",
|
30
|
+
"entityType",
|
31
|
+
"date",
|
32
|
+
"dateFormatted",
|
33
|
+
"owner",
|
34
|
+
"creator",
|
35
|
+
"members",
|
36
|
+
"membersPhotos",
|
37
|
+
"type"
|
38
|
+
],
|
39
|
+
setup(e) {
|
40
|
+
U();
|
41
|
+
function r(n) {
|
42
|
+
const t = /* @__PURE__ */ new Date(), s = new Date(n), h = Math.abs(t - s), c = Math.floor(h / 1e3), l = Math.floor(c / 60), f = Math.floor(l / 60), y = Math.floor(f / 24), p = Math.floor(y / 7);
|
43
|
+
return p > 0 ? `${p} week${p > 1 ? "s" : ""} ago` : y > 0 ? `${y} day${y > 1 ? "s" : ""} ago` : f > 0 ? `${f} hour${f > 1 ? "s" : ""} ago` : l > 0 ? `${l} minute${l > 1 ? "s" : ""} ago` : "Just now";
|
44
|
+
}
|
45
|
+
return (n, t) => {
|
46
|
+
var s, h;
|
47
|
+
return e.owner ? (o(), a("header", L, [
|
48
|
+
d("div", O, [
|
49
|
+
d("div", S, [
|
50
|
+
e.owner.target.profile.photo.length > 0 && e.type !== "short" ? (o(), a("img", {
|
51
|
+
key: 0,
|
52
|
+
src: (n.FILE_SERVER_URL || "") + e.owner.target.profile.photo,
|
53
|
+
class: "radius-medium mn-r-thin i-thin",
|
54
|
+
onClick: t[0] || (t[0] = g((c) => n.$router.push({
|
55
|
+
name: e.owner.type === "user" ? "User Profile" : "Organization",
|
56
|
+
params: {
|
57
|
+
_id: e.owner.target._id
|
58
|
+
}
|
59
|
+
}), ["stop"]))
|
60
|
+
}, null, 8, D)) : i("", !0),
|
61
|
+
!e.owner.target.profile.photo && e.type !== "short" ? (o(), x(z, {
|
62
|
+
key: 1,
|
63
|
+
class: "radius-medium mn-r-thin i-thin",
|
64
|
+
onClick: t[1] || (t[1] = g((c) => n.$router.push({
|
65
|
+
name: e.owner.type === "user" ? "User Profile" : "Organization",
|
66
|
+
params: {
|
67
|
+
_id: e.owner.target._id
|
68
|
+
}
|
69
|
+
}), ["stop"]))
|
70
|
+
})) : i("", !0),
|
71
|
+
e.type !== "short" ? (o(), a("span", F, [
|
72
|
+
d("span", {
|
73
|
+
onClick: t[2] || (t[2] = g((c) => n.$router.push({
|
74
|
+
name: e.owner.type === "user" ? "User Profile" : "Organization",
|
75
|
+
params: {
|
76
|
+
_id: e.owner.target._id
|
77
|
+
}
|
78
|
+
}), ["stop"]))
|
79
|
+
}, u(e.owner.target.profile.name), 1),
|
80
|
+
!e.creator.hidden && e.owner.target.profile.name !== ((s = e.creator.target.profile) == null ? void 0 : s.name) ? (o(), a("span", {
|
81
|
+
key: 0,
|
82
|
+
onClick: t[3] || (t[3] = g((c) => n.$router.push({
|
83
|
+
name: "User Profile",
|
84
|
+
params: {
|
85
|
+
_id: e.creator.target._id
|
86
|
+
}
|
87
|
+
}), ["stop"]))
|
88
|
+
}, " · by " + u((h = e.creator.target.profile) == null ? void 0 : h.name), 1)) : i("", !0),
|
89
|
+
e.date ? (o(), a("span", I, " · " + u(r(e.date)), 1)) : i("", !0),
|
90
|
+
e.dateFormatted ? (o(), a("span", A, " · " + u(e.dateFormatted), 1)) : i("", !0)
|
91
|
+
])) : i("", !0),
|
92
|
+
d("div", T, [
|
93
|
+
e.members ? (o(), a("div", V, [
|
94
|
+
d("span", B, u(e.members), 1),
|
95
|
+
(o(!0), a(v, null, $(e.membersPhotos.slice(0, 2), (c, l) => (o(), a("img", {
|
96
|
+
key: l,
|
97
|
+
src: (n.FILE_SERVER_URL || "") + c,
|
98
|
+
style: P({
|
99
|
+
position: "absolute",
|
100
|
+
top: "0px",
|
101
|
+
right: l * 20 + 20 + "%",
|
102
|
+
zIndex: 1 - l
|
103
|
+
}),
|
104
|
+
class: "br-solid br-2px br-white i-thin bg-grey radius-big"
|
105
|
+
}, null, 12, N))), 128))
|
106
|
+
])) : i("", !0)
|
107
|
+
]),
|
108
|
+
e.type !== "short" && e.user && e.user != e.creator.target._id ? (o(), x(C, {
|
109
|
+
key: 3,
|
110
|
+
label: "...",
|
111
|
+
align: "right",
|
112
|
+
class: "cursor-pointer z-index-2 pd-thin radius-extra"
|
113
|
+
}, {
|
114
|
+
default: k(() => [
|
115
|
+
d("section", H, [
|
116
|
+
e.user !== e.creator.target._id ? (o(), x(j, {
|
117
|
+
key: 0,
|
118
|
+
user: e.user,
|
119
|
+
type: e.entityType,
|
120
|
+
target: e.entity._id,
|
121
|
+
text: "Report",
|
122
|
+
class: "w-100"
|
123
|
+
}, {
|
124
|
+
default: k(() => [
|
125
|
+
J
|
126
|
+
]),
|
127
|
+
_: 1
|
128
|
+
}, 8, ["user", "type", "target"])) : i("", !0)
|
129
|
+
])
|
130
|
+
]),
|
131
|
+
_: 1
|
132
|
+
}, 8, ["label"])) : i("", !0)
|
133
|
+
])
|
134
|
+
])
|
135
|
+
])) : i("", !0);
|
136
|
+
};
|
137
|
+
}
|
138
|
+
}, w = M.create({
|
139
|
+
baseURL: process.env.API_URL,
|
140
|
+
withCredentials: !0
|
141
|
+
}), m = R({
|
142
|
+
reactions: [],
|
143
|
+
error: null
|
144
|
+
}), q = {
|
145
|
+
async read({ user: e, type: r, target: n, role: t }) {
|
146
|
+
try {
|
147
|
+
const s = await w.get("/api/reactions", { params: { user: e, type: r, target: n, role: t } });
|
148
|
+
return m.error = null, m.reactions = s.data, Promise.resolve(s.data);
|
149
|
+
} catch (s) {
|
150
|
+
return b(s), Promise.reject(s);
|
151
|
+
}
|
152
|
+
},
|
153
|
+
async create(e) {
|
154
|
+
try {
|
155
|
+
const r = await w.post("/api/reactions/create", e);
|
156
|
+
return m.error = null, Promise.resolve(r.data);
|
157
|
+
} catch (r) {
|
158
|
+
return console.log(r), b(r), Promise.reject(r);
|
159
|
+
}
|
160
|
+
},
|
161
|
+
async update(e) {
|
162
|
+
try {
|
163
|
+
const r = await w.post("/api/reactions/update", e);
|
164
|
+
return m.error = null, Promise.resolve(r.data);
|
165
|
+
} catch (r) {
|
166
|
+
return b(r), Promise.reject(r);
|
167
|
+
}
|
168
|
+
},
|
169
|
+
async delete(e) {
|
170
|
+
try {
|
171
|
+
const r = await w.post("/api/reactions/delete", e);
|
172
|
+
return m.error = null, Promise.resolve(r.data);
|
173
|
+
} catch (r) {
|
174
|
+
return b(r), Promise.reject(r);
|
175
|
+
}
|
176
|
+
}
|
177
|
+
}, G = {
|
178
|
+
handleReactionUpdate(e, r, n) {
|
179
|
+
let t;
|
180
|
+
if (Array.isArray(e) ? t = e.find((s) => s._id === r.target) : typeof e == "object" && e._id === r.target && (t = e), t)
|
181
|
+
if (t.hasReaction = n, n)
|
182
|
+
t.reactions.push(r), t.numberOfReactions += 1;
|
183
|
+
else {
|
184
|
+
const s = t.reactions.findIndex((h) => h._id === r._id);
|
185
|
+
s !== -1 && (t.reactions.splice(s, 1), t.numberOfReactions -= 1);
|
186
|
+
}
|
187
|
+
}
|
188
|
+
};
|
189
|
+
E(m, (e) => {
|
190
|
+
});
|
191
|
+
const ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
192
|
+
__proto__: null,
|
193
|
+
actions: q,
|
194
|
+
mutations: G,
|
195
|
+
state: m
|
196
|
+
}, Symbol.toStringTag, { value: "Module" })), K = { class: "flex-v-center gap-thin flex" }, Q = { class: "pd-thin radius-small t-semi bg-main" }, W = {
|
197
|
+
key: 1,
|
198
|
+
class: "pd-thin radius-small t-semi bg-white"
|
199
|
+
}, ae = {
|
200
|
+
__name: "Chips",
|
201
|
+
props: ["chips"],
|
202
|
+
setup(e) {
|
203
|
+
return (r, n) => (o(), a("div", K, [
|
204
|
+
e.chips.length ? (o(!0), a(v, { key: 0 }, $(e.chips, (t, s) => (o(), a("div", Q, u(t.text ? t.text : t), 1))), 256)) : (o(), a("div", W, u(e.chips), 1))
|
205
|
+
]));
|
206
|
+
}
|
207
|
+
};
|
208
|
+
export {
|
209
|
+
oe as _,
|
210
|
+
q as a,
|
211
|
+
ae as b,
|
212
|
+
ne as r
|
213
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue"),k=require("vue-router"),y=require("./Dropdown-f2564c92.js");require("./Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./auth-df5a20c6.js");require("./memberships-393765d8.js");const p=require("./index-b41aac19.js"),u=require("./globals-928eb13c.js"),w={key:0,class:"pd-b-zero"},b={class:"w-100 flex-v-center flex-nojustify flex"},B={class:"w-100 flex-nowrap flex-v-center flex"},E=["src"],x={key:2,class:"t-semi"},$={key:1},v={key:2},C={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},V={key:0,class:"w-4r i-thin"},N={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"},P=["src"],R={class:"bg-black pd-thin radius-small"},S=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),D={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type"],setup(t){k.useRouter();function o(s){const r=new Date,n=new Date(s),l=Math.abs(r-n),i=Math.floor(l/1e3),a=Math.floor(i/60),d=Math.floor(a/60),m=Math.floor(d/24),f=Math.floor(m/7);return f>0?`${f} week${f>1?"s":""} ago`:m>0?`${m} day${m>1?"s":""} ago`:d>0?`${d} hour${d>1?"s":""} ago`:a>0?`${a} minute${a>1?"s":""} ago`:"Just now"}return(s,r)=>{var n,l;return t.owner?(e.openBlock(),e.createElementBlock("header",w,[e.createElementVNode("div",b,[e.createElementVNode("div",B,[t.owner.target.profile.photo.length>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(s.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(i=>s.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,E)):e.createCommentVNode("",!0),!t.owner.target.profile.photo&&t.type!=="short"?(e.openBlock(),e.createBlock(y.PlaceholderUserpic,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(i=>s.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",x,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(i=>s.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(t.owner.target.profile.name),1),!t.creator.hidden&&t.owner.target.profile.name!==((n=t.creator.target.profile)==null?void 0:n.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(i=>s.$router.push({name:"User Profile",params:{_id:t.creator.target._id}}),["stop"]))}," · by "+e.toDisplayString((l=t.creator.target.profile)==null?void 0:l.name),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",$," · "+e.toDisplayString(o(t.date)),1)):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",v," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",C,[t.members?(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("span",N,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(i,a)=>(e.openBlock(),e.createElementBlock("img",{key:a,src:(s.FILE_SERVER_URL||"")+i,style:e.normalizeStyle({position:"absolute",top:"0px",right:a*20+20+"%",zIndex:1-a}),class:"br-solid br-2px br-white i-thin bg-grey radius-big"},null,12,P))),128))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user&&t.user!=t.creator.target._id?(e.openBlock(),e.createBlock(y.Dropdown,{key:3,label:"...",align:"right",class:"cursor-pointer z-index-2 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",R,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(y._sfc_main,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[S]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}},h=p.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),c=e.reactive({reactions:[],error:null}),g={async read({user:t,type:o,target:s,role:r}){try{const n=await h.get("/api/reactions",{params:{user:t,type:o,target:s,role:r}});return c.error=null,c.reactions=n.data,Promise.resolve(n.data)}catch(n){return u.setError(n),Promise.reject(n)}},async create(t){try{const o=await h.post("/api/reactions/create",t);return c.error=null,Promise.resolve(o.data)}catch(o){return console.log(o),u.setError(o),Promise.reject(o)}},async update(t){try{const o=await h.post("/api/reactions/update",t);return c.error=null,Promise.resolve(o.data)}catch(o){return u.setError(o),Promise.reject(o)}},async delete(t){try{const o=await h.post("/api/reactions/delete",t);return c.error=null,Promise.resolve(o.data)}catch(o){return u.setError(o),Promise.reject(o)}}},M={handleReactionUpdate(t,o,s){let r;if(Array.isArray(t)?r=t.find(n=>n._id===o.target):typeof t=="object"&&t._id===o.target&&(r=t),r)if(r.hasReaction=s,s)r.reactions.push(o),r.numberOfReactions+=1;else{const n=r.reactions.findIndex(l=>l._id===o._id);n!==-1&&(r.reactions.splice(n,1),r.numberOfReactions-=1)}}};e.watch(c,t=>{});const U=Object.freeze(Object.defineProperty({__proto__:null,actions:g,mutations:M,state:c},Symbol.toStringTag,{value:"Module"})),q={class:"flex-v-center gap-thin flex"},z={class:"pd-thin radius-small t-semi bg-main"},j={key:1,class:"pd-thin radius-small t-semi bg-white"},L={__name:"Chips",props:["chips"],setup(t){return(o,s)=>(e.openBlock(),e.createElementBlock("div",q,[t.chips.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.chips,(r,n)=>(e.openBlock(),e.createElementBlock("div",z,e.toDisplayString(r.text?r.text:r),1))),256)):(e.openBlock(),e.createElementBlock("div",j,e.toDisplayString(t.chips),1))]))}};exports._sfc_main=D;exports._sfc_main$1=L;exports.actions=g;exports.reactions=U;
|