@ozdao/prometheus-framework 0.1.11 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-cf9f6aed.js +1 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-ec801e39.mjs +1945 -0
- package/dist/ButtonFollow-d4552677.mjs +131 -0
- package/dist/ButtonFollow-daa0e9e4.js +1 -0
- package/dist/CardOrganization-79eb2b6f.js +1 -0
- package/dist/CardOrganization-d3a9d898.mjs +230 -0
- package/dist/Feed-2c92ceed.js +1 -0
- package/dist/Feed-3a187776.js +1 -0
- package/dist/Feed-406e3b66.mjs +368 -0
- package/dist/Feed-536c8a92.mjs +439 -0
- package/dist/Feed-a5229528.js +1 -0
- package/dist/Feed-bbe44c17.mjs +368 -0
- package/dist/Image-89b2a540.js +9 -0
- package/dist/Image-d42a89db.mjs +477 -0
- package/dist/Popup-f5cdd3c1.js +1 -0
- package/dist/Popup-fca78130.mjs +76 -0
- package/dist/Product-0095681c.mjs +838 -0
- package/dist/Product-9170a446.mjs +838 -0
- package/dist/Product-a9efa410.js +7 -0
- package/dist/Product-dc5024f6.js +7 -0
- package/dist/ProductEdit-70ddae4d.js +1 -0
- package/dist/ProductEdit-82658f2f.mjs +350 -0
- package/dist/ProductEdit-d74fddb1.mjs +350 -0
- package/dist/ProductEdit-e22cc4ef.js +1 -0
- package/dist/ProfileBlogposts-bf3cd8e5.mjs +64 -0
- package/dist/ProfileBlogposts-d1d3326e.js +1 -0
- package/dist/ProfileComments-1e0d72cc.mjs +44 -0
- package/dist/ProfileComments-c3290211.js +1 -0
- package/dist/ProfileEvents-314eadc3.js +1 -0
- package/dist/ProfileEvents-980b0281.mjs +56 -0
- package/dist/ProfileEvents-ba769f57.mjs +56 -0
- package/dist/ProfileEvents-bff6e071.js +1 -0
- package/dist/ProfileLikes-36373ac1.mjs +44 -0
- package/dist/ProfileLikes-a2c1b585.js +1 -0
- package/dist/ProfileOrganizations-1f9f1841.js +1 -0
- package/dist/ProfileOrganizations-974a50ca.mjs +212 -0
- package/dist/Publics-5ae33b91.mjs +123 -0
- package/dist/Publics-8bc74cc3.js +1 -0
- package/dist/UploadImage-39483aee.mjs +83 -0
- package/dist/UploadImage-802b81db.js +1 -0
- package/dist/auth-3dedf391.js +8 -0
- package/dist/auth-c3234662.mjs +1836 -0
- package/dist/auth.client.cjs +1 -1
- package/dist/auth.client.js +3 -3
- package/dist/auth.validation-892bea9b.js +1 -0
- package/dist/auth.validation-c8d5adf5.mjs +20 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +10 -10
- package/dist/components/Field/Field.vue.d.ts.map +1 -1
- package/dist/events.client.cjs +1 -1
- package/dist/events.client.js +8 -8
- package/dist/main.css +1 -1
- package/dist/organizations-e1bfd3a8.mjs +121 -0
- package/dist/organizations-e74f4f84.js +1 -0
- package/dist/organizations.client-37ec4817.js +3 -0
- package/dist/organizations.client-52d2951c.mjs +3017 -0
- package/dist/organizations.client-9e480f60.js +3 -0
- package/dist/organizations.client-bae43c7c.mjs +3017 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +10 -10
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +9 -9
- package/package.json +1 -1
- package/src/components/Field/Field.svlt +73 -0
- package/src/components/Field/Field.vue +18 -19
- package/src/modules/community/components/sections/Feed.vue +3 -3
- package/src/modules/events/components/sections/Feed.vue +3 -3
@@ -0,0 +1,350 @@
|
|
1
|
+
import { toRefs as S, openBlock as n, createElementBlock as c, createTextVNode as C, toDisplayString as w, unref as s, createVNode as d, createElementVNode as t, createCommentVNode as k, createBlock as D, withCtx as I, Fragment as N, renderList as P, ref as U, withModifiers as R, withAsyncContext as E } from "vue";
|
2
|
+
import { useRoute as B, useRouter as V } from "vue-router";
|
3
|
+
import { s as r, a as F, b as $, _ as M, c as T } from "./organizations.client-52d2951c.mjs";
|
4
|
+
import "./inputs.validation-14e8e01f.mjs";
|
5
|
+
import { F as b, _ as A, a as j } from "./auth-c3234662.mjs";
|
6
|
+
import { C as O } from "./Breadcrumbs.vue_vue_type_style_index_0_lang-ec801e39.mjs";
|
7
|
+
import "vue-i18n";
|
8
|
+
import { S as q } from "./Publics-5ae33b91.mjs";
|
9
|
+
import { u as G } from "./vuex.esm-bundler-57d8b6ba.mjs";
|
10
|
+
import { V as H } from "./vue-draggable-next.esm-bundler-ff6e3f52.mjs";
|
11
|
+
import "./globals-96ba60e4.mjs";
|
12
|
+
import "./Tab-a243605d.mjs";
|
13
|
+
import "./ButtonFollow-d4552677.mjs";
|
14
|
+
import "./_plugin-vue_export-helper-dad06003.mjs";
|
15
|
+
import "./Feed-bbe44c17.mjs";
|
16
|
+
import "./EmptyState-34d85f10.mjs";
|
17
|
+
import "./Chips-03ff0c34.mjs";
|
18
|
+
import "./IconEdit-eacf3856.mjs";
|
19
|
+
import "./Feed-536c8a92.mjs";
|
20
|
+
import "./Socials-8193477c.mjs";
|
21
|
+
import "./CardOrganization-d3a9d898.mjs";
|
22
|
+
import "./organizations-e1bfd3a8.mjs";
|
23
|
+
import "./UploadImage-39483aee.mjs";
|
24
|
+
const J = { class: "mn-big flex-column flex" }, K = {
|
25
|
+
__name: "EditProductInfo",
|
26
|
+
props: {
|
27
|
+
product: Object
|
28
|
+
},
|
29
|
+
setup(m) {
|
30
|
+
const u = m, o = G();
|
31
|
+
return S(u), (e, l) => (n(), c("div", J, [
|
32
|
+
C(w(s(o).products.current) + " ", 1),
|
33
|
+
d(q, {
|
34
|
+
options: [
|
35
|
+
"unpublished",
|
36
|
+
"published",
|
37
|
+
"archivied"
|
38
|
+
],
|
39
|
+
select: s(o).products.state.current.status,
|
40
|
+
"onUpdate:select": l[0] || (l[0] = (a) => s(o).products.state.current.status = a),
|
41
|
+
placeholder: "Display product",
|
42
|
+
class: "w-100 mn-small bg-white radius-small pd-medium"
|
43
|
+
}, null, 8, ["select"]),
|
44
|
+
d(b, {
|
45
|
+
field: s(o).products.state.current.name,
|
46
|
+
"onUpdate:field": l[1] || (l[1] = (a) => s(o).products.state.current.name = a),
|
47
|
+
placeholder: "Введите название",
|
48
|
+
class: "w-100 mn-small bg-white radius-small pd-medium"
|
49
|
+
}, null, 8, ["field"]),
|
50
|
+
d(b, {
|
51
|
+
field: s(o).products.state.current.price,
|
52
|
+
"onUpdate:field": l[2] || (l[2] = (a) => s(o).products.state.current.price = a),
|
53
|
+
placeholder: "Введите цену",
|
54
|
+
class: "w-100 mn-small bg-white radius-small pd-medium",
|
55
|
+
type: "number"
|
56
|
+
}, null, 8, ["field"]),
|
57
|
+
d(b, {
|
58
|
+
field: s(o).products.state.current.description,
|
59
|
+
"onUpdate:field": l[3] || (l[3] = (a) => s(o).products.state.current.description = a),
|
60
|
+
placeholder: "Введите описание",
|
61
|
+
class: "w-100 mn-small bg-white radius-small pd-medium",
|
62
|
+
type: "textarea"
|
63
|
+
}, null, 8, ["field"])
|
64
|
+
]));
|
65
|
+
}
|
66
|
+
}, Q = { class: "mn-big" }, W = { class: "mn-small flex-nowrap flex" }, X = { class: "mn-r-thin" }, Y = { class: "flex-column flex" }, Z = {
|
67
|
+
key: 0,
|
68
|
+
class: "w-100 mn-small"
|
69
|
+
}, ee = ["onClick"], te = /* @__PURE__ */ t("svg", {
|
70
|
+
class: "i-small",
|
71
|
+
fill: "none",
|
72
|
+
height: "20",
|
73
|
+
viewBox: "0 0 20 20",
|
74
|
+
width: "20",
|
75
|
+
xmlns: "http://www.w3.org/2000/svg"
|
76
|
+
}, [
|
77
|
+
/* @__PURE__ */ t("path", {
|
78
|
+
"clip-rule": "evenodd",
|
79
|
+
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",
|
80
|
+
fill: "#8a8a8a",
|
81
|
+
"fill-rule": "evenodd"
|
82
|
+
})
|
83
|
+
], -1), se = [
|
84
|
+
te
|
85
|
+
], L = {
|
86
|
+
__name: "EditParameters",
|
87
|
+
props: {
|
88
|
+
items: {
|
89
|
+
type: Array,
|
90
|
+
default: () => []
|
91
|
+
},
|
92
|
+
title: String,
|
93
|
+
addButtonLabel: String,
|
94
|
+
emptyMessage: String,
|
95
|
+
keyName: String,
|
96
|
+
valueName: String
|
97
|
+
},
|
98
|
+
emits: ["add-info", "delete-info"],
|
99
|
+
setup(m, { emit: u }) {
|
100
|
+
const o = m;
|
101
|
+
function e() {
|
102
|
+
u("add-info", {});
|
103
|
+
}
|
104
|
+
function l(i) {
|
105
|
+
u("delete-info", i);
|
106
|
+
}
|
107
|
+
const { items: a, title: _, emptyMessage: v, addButtonLabel: f, keyName: p, valueName: g } = S(o);
|
108
|
+
return (i, z) => (n(), c("div", Q, [
|
109
|
+
t("div", W, [
|
110
|
+
t("h5", X, w(s(_)), 1),
|
111
|
+
t("button", {
|
112
|
+
onClick: e,
|
113
|
+
class: "i-small pd-thin button-delete button"
|
114
|
+
}, "+")
|
115
|
+
]),
|
116
|
+
t("div", Y, [
|
117
|
+
s(a).length == 0 ? (n(), c("p", Z, w(s(v)), 1)) : k("", !0),
|
118
|
+
s(a).length == 0 ? (n(), D(A, {
|
119
|
+
key: 1,
|
120
|
+
onClick: e,
|
121
|
+
class: "button"
|
122
|
+
}, {
|
123
|
+
default: I(() => [
|
124
|
+
C(w(s(f)), 1)
|
125
|
+
]),
|
126
|
+
_: 1
|
127
|
+
})) : k("", !0),
|
128
|
+
(n(!0), c(N, null, P(s(a), (h, x) => (n(), c("div", {
|
129
|
+
class: "mn-medium w-100 flex-nowrap flex",
|
130
|
+
key: x
|
131
|
+
}, [
|
132
|
+
d(b, {
|
133
|
+
field: h[s(p)],
|
134
|
+
"onUpdate:field": (y) => h[s(p)] = y,
|
135
|
+
placeholder: "Название параметра",
|
136
|
+
class: "w-100 mn-r-small bg-white radius-small pd-medium"
|
137
|
+
}, null, 8, ["field", "onUpdate:field"]),
|
138
|
+
d(b, {
|
139
|
+
field: h[s(g)],
|
140
|
+
"onUpdate:field": (y) => h[s(g)] = y,
|
141
|
+
placeholder: "Значение параметра",
|
142
|
+
class: "w-100 bg-white radius-small pd-medium"
|
143
|
+
}, null, 8, ["field", "onUpdate:field"]),
|
144
|
+
t("button", {
|
145
|
+
onClick: (y) => l(x),
|
146
|
+
class: "mn-l-small button"
|
147
|
+
}, se, 8, ee)
|
148
|
+
]))), 128))
|
149
|
+
])
|
150
|
+
]));
|
151
|
+
}
|
152
|
+
}, oe = /* @__PURE__ */ t("div", { class: "flex-v-center flex-h-center flex w-100 h-100" }, " upload ", -1), ae = {
|
153
|
+
__name: "UploadImageMultiple",
|
154
|
+
props: [
|
155
|
+
"uploadPath"
|
156
|
+
],
|
157
|
+
emits: ["update:images"],
|
158
|
+
setup(m, { emit: u }) {
|
159
|
+
const o = m, e = U([]), l = U(null);
|
160
|
+
function a() {
|
161
|
+
l.value.click();
|
162
|
+
}
|
163
|
+
async function _(f) {
|
164
|
+
let p = f.target.files, g = new FormData();
|
165
|
+
for (let i = 0; i < p.length; i++)
|
166
|
+
g.append("file", p[i]);
|
167
|
+
try {
|
168
|
+
(await j.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/multiple?folderName=${encodeURIComponent(o.uploadPath)}`, g, {
|
169
|
+
headers: {
|
170
|
+
"Content-Type": "multipart/form-data"
|
171
|
+
}
|
172
|
+
})).data.forEach((h) => {
|
173
|
+
e.value.push(h.filepath);
|
174
|
+
}), u("update:images", e.value);
|
175
|
+
} catch (i) {
|
176
|
+
console.error(i);
|
177
|
+
}
|
178
|
+
}
|
179
|
+
function v(f) {
|
180
|
+
f.preventDefault(), _({
|
181
|
+
target: {
|
182
|
+
files: f.dataTransfer.files
|
183
|
+
}
|
184
|
+
});
|
185
|
+
}
|
186
|
+
return (f, p) => (n(), c("div", {
|
187
|
+
onClick: a,
|
188
|
+
onDrop: v,
|
189
|
+
onDragover: p[0] || (p[0] = R(() => {
|
190
|
+
}, ["prevent"])),
|
191
|
+
class: "flex-v-center flex-h-center flex"
|
192
|
+
}, [
|
193
|
+
oe,
|
194
|
+
t("input", {
|
195
|
+
type: "file",
|
196
|
+
ref_key: "fileInput",
|
197
|
+
ref: l,
|
198
|
+
onChange: _,
|
199
|
+
multiple: "",
|
200
|
+
style: { display: "none" }
|
201
|
+
}, null, 544)
|
202
|
+
], 32));
|
203
|
+
}
|
204
|
+
}, le = {
|
205
|
+
key: 0,
|
206
|
+
class: "mn-big"
|
207
|
+
}, ne = { class: "flex-column block" }, re = ["src"], ie = ["onClick"], de = {
|
208
|
+
__name: "EditProductImages",
|
209
|
+
props: {
|
210
|
+
product: Object
|
211
|
+
},
|
212
|
+
setup(m) {
|
213
|
+
function u(e) {
|
214
|
+
console.log(e), console.log(r.current.images), r.current.images.push(...e);
|
215
|
+
}
|
216
|
+
function o(e) {
|
217
|
+
r.current.images.splice(e, 1);
|
218
|
+
}
|
219
|
+
return (e, l) => (n(), c("div", null, [
|
220
|
+
m.product.images.length < 1 ? (n(), c("p", le, " The product doesn't have any images yet. ")) : k("", !0),
|
221
|
+
d(s(H), {
|
222
|
+
class: "cols-4 dragArea list-group w-full",
|
223
|
+
list: m.product.images,
|
224
|
+
sort: !0,
|
225
|
+
onChange: e.log
|
226
|
+
}, {
|
227
|
+
default: I(() => [
|
228
|
+
(n(!0), c(N, null, P(m.product.images, (a, _) => (n(), c("div", ne, [
|
229
|
+
t("img", {
|
230
|
+
class: "w-100 mn-small",
|
231
|
+
src: (e.FILE_SERVER_URL || "") + a
|
232
|
+
}, null, 8, re),
|
233
|
+
t("a", {
|
234
|
+
onClick: (v) => o(_),
|
235
|
+
class: "w-100 br-grey br-solid br-1px button"
|
236
|
+
}, "Удалить", 8, ie)
|
237
|
+
]))), 256))
|
238
|
+
]),
|
239
|
+
_: 1
|
240
|
+
}, 8, ["list", "onChange"]),
|
241
|
+
d(ae, {
|
242
|
+
"onUpdate:images": u,
|
243
|
+
uploadPath: "organizations/" + e.$route.params._id + "/products",
|
244
|
+
class: "mn-t-semi pd-small w-100 button bg-main"
|
245
|
+
}, null, 8, ["uploadPath"])
|
246
|
+
]));
|
247
|
+
}
|
248
|
+
};
|
249
|
+
const ce = { class: "for-transition w-100" }, ue = { class: "pd-b-zero pd-t-zero pd-thin" }, me = { class: "pd-thin" }, pe = { class: "flex-nowrap flex bg-grey pd-medium radius-big" }, fe = {
|
250
|
+
key: 0,
|
251
|
+
class: "mn-r-auto"
|
252
|
+
}, he = {
|
253
|
+
key: 1,
|
254
|
+
class: "mn-r-auto"
|
255
|
+
}, _e = { class: "flex-nowrap flex pd-thin" }, ge = { class: "pd-b-zero pd-t-zero pd-thin cols-2 gap-thin" }, ve = { class: "mn-thin bg-grey pd-medium o-hidden radius-big" }, be = /* @__PURE__ */ t("h3", { class: "mn-semi" }, "Profile", -1), ye = { class: "mn-semi" }, we = /* @__PURE__ */ t("h5", null, "Categories", -1), xe = { class: "" }, $e = { class: "mn-thin bg-grey pd-medium o-hidden radius-big" }, ke = /* @__PURE__ */ t("h3", { class: "mn-semi" }, "Images", -1), Ke = {
|
256
|
+
__name: "ProductEdit",
|
257
|
+
async setup(m) {
|
258
|
+
let u, o;
|
259
|
+
const e = B(), l = V();
|
260
|
+
[u, o] = E(() => F.fetchCategories()), await u, o(), e.params.product && ([u, o] = E(() => $.read({ _id: e.params.product })), await u, o());
|
261
|
+
function a() {
|
262
|
+
r.current.information.push({ name: "", value: "" });
|
263
|
+
}
|
264
|
+
function _(i) {
|
265
|
+
r.current.information.splice(i, 1);
|
266
|
+
}
|
267
|
+
function v() {
|
268
|
+
r.current.localization.push({ locale: "", text: "" });
|
269
|
+
}
|
270
|
+
function f(i) {
|
271
|
+
r.current.localization.splice(i, 1);
|
272
|
+
}
|
273
|
+
function p() {
|
274
|
+
e.params.product ? $.update(e.params.product, r.current) : $.create(e.params._id, r.current);
|
275
|
+
}
|
276
|
+
function g() {
|
277
|
+
l.push({ name: "ProductEdit", params: { _id: e.params._id, product: r.current._id } });
|
278
|
+
}
|
279
|
+
return (i, z) => (n(), c("div", ce, [
|
280
|
+
t("div", ue, [
|
281
|
+
d(M, { class: "pd-medium bg-grey radius-big" })
|
282
|
+
]),
|
283
|
+
t("div", me, [
|
284
|
+
t("header", pe, [
|
285
|
+
s(e).params.product ? (n(), c("h1", fe, "Edit Product")) : (n(), c("h1", he, "Create Product")),
|
286
|
+
t("section", _e, [
|
287
|
+
d(A, {
|
288
|
+
submit: p,
|
289
|
+
callback: g
|
290
|
+
}, {
|
291
|
+
default: I(() => [
|
292
|
+
C("Save Product")
|
293
|
+
]),
|
294
|
+
_: 1
|
295
|
+
})
|
296
|
+
])
|
297
|
+
])
|
298
|
+
]),
|
299
|
+
t("div", ge, [
|
300
|
+
t("div", ve, [
|
301
|
+
be,
|
302
|
+
d(K, {
|
303
|
+
product: r.current
|
304
|
+
}, null, 8, ["product"]),
|
305
|
+
t("div", ye, [
|
306
|
+
we,
|
307
|
+
(n(!0), c(N, null, P(T.all, (h, x) => (n(), D(O, {
|
308
|
+
label: h.name,
|
309
|
+
name: "categories",
|
310
|
+
value: h.url,
|
311
|
+
class: "w-100 mn-t-small bg-white radius-small pd-small",
|
312
|
+
radio: r.current.category
|
313
|
+
}, null, 8, ["label", "value", "radio"]))), 256))
|
314
|
+
]),
|
315
|
+
d(L, {
|
316
|
+
items: r.current.information,
|
317
|
+
title: "Parameters",
|
318
|
+
emptyMessage: "No parameters",
|
319
|
+
addButtonLabel: "Add parameter",
|
320
|
+
keyName: "name",
|
321
|
+
valueName: "value",
|
322
|
+
onAddInfo: a,
|
323
|
+
onDeleteInfo: _
|
324
|
+
}, null, 8, ["items"]),
|
325
|
+
d(L, {
|
326
|
+
items: r.current.localization,
|
327
|
+
title: "Localization",
|
328
|
+
emptyMessage: "No localizations",
|
329
|
+
addButtonLabel: "Add localization",
|
330
|
+
keyName: "locale",
|
331
|
+
valueName: "text",
|
332
|
+
onAddInfo: v,
|
333
|
+
onDeleteInfo: f
|
334
|
+
}, null, 8, ["items"])
|
335
|
+
]),
|
336
|
+
t("div", xe, [
|
337
|
+
t("div", $e, [
|
338
|
+
ke,
|
339
|
+
d(de, {
|
340
|
+
product: r.current
|
341
|
+
}, null, 8, ["product"])
|
342
|
+
])
|
343
|
+
])
|
344
|
+
])
|
345
|
+
]));
|
346
|
+
}
|
347
|
+
};
|
348
|
+
export {
|
349
|
+
Ke as default
|
350
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),b=require("vue-router"),n=require("./organizations.client-37ec4817.js");require("./inputs.validation-24ae76b9.js");const p=require("./auth-3dedf391.js"),k=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-cf9f6aed.js");require("vue-i18n");const y=require("./Publics-8bc74cc3.js"),E=require("./vuex.esm-bundler-e8cf3cd2.js"),V=require("./vue-draggable-next.esm-bundler-80731ae0.js");require("./globals-928eb13c.js");require("./Tab-6f0a4909.js");require("./ButtonFollow-daa0e9e4.js");require("./_plugin-vue_export-helper-f246444f.js");require("./Feed-2c92ceed.js");require("./EmptyState-7658d7d6.js");require("./Chips-4d8ac62e.js");require("./IconEdit-4cfe2115.js");require("./Feed-a5229528.js");require("./Socials-821bd677.js");require("./CardOrganization-79eb2b6f.js");require("./organizations-e74f4f84.js");require("./UploadImage-802b81db.js");const x={class:"mn-big flex-column flex"},w={__name:"EditProductInfo",props:{product:Object},setup(c){const s=c,o=E.useStore();return e.toRefs(s),(t,l)=>(e.openBlock(),e.createElementBlock("div",x,[e.createTextVNode(e.toDisplayString(e.unref(o).products.current)+" ",1),e.createVNode(y.Select,{options:["unpublished","published","archivied"],select:e.unref(o).products.state.current.status,"onUpdate:select":l[0]||(l[0]=r=>e.unref(o).products.state.current.status=r),placeholder:"Display product",class:"w-100 mn-small bg-white radius-small pd-medium"},null,8,["select"]),e.createVNode(p.Field,{field:e.unref(o).products.state.current.name,"onUpdate:field":l[1]||(l[1]=r=>e.unref(o).products.state.current.name=r),placeholder:"Введите название",class:"w-100 mn-small bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(p.Field,{field:e.unref(o).products.state.current.price,"onUpdate:field":l[2]||(l[2]=r=>e.unref(o).products.state.current.price=r),placeholder:"Введите цену",class:"w-100 mn-small bg-white radius-small pd-medium",type:"number"},null,8,["field"]),e.createVNode(p.Field,{field:e.unref(o).products.state.current.description,"onUpdate:field":l[3]||(l[3]=r=>e.unref(o).products.state.current.description=r),placeholder:"Введите описание",class:"w-100 mn-small bg-white radius-small pd-medium",type:"textarea"},null,8,["field"])]))}},B={class:"mn-big"},C={class:"mn-small flex-nowrap flex"},$={class:"mn-r-thin"},q={class:"flex-column flex"},P={key:0,class:"w-100 mn-small"},z=["onClick"],I=e.createElementVNode("svg",{class:"i-small",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),S=[I],N={__name:"EditParameters",props:{items:{type:Array,default:()=>[]},title:String,addButtonLabel:String,emptyMessage:String,keyName:String,valueName:String},emits:["add-info","delete-info"],setup(c,{emit:s}){const o=c;function t(){s("add-info",{})}function l(a){s("delete-info",a)}const{items:r,title:m,emptyMessage:_,addButtonLabel:d,keyName:i,valueName:f}=e.toRefs(o);return(a,v)=>(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("div",C,[e.createElementVNode("h5",$,e.toDisplayString(e.unref(m)),1),e.createElementVNode("button",{onClick:t,class:"i-small pd-thin button-delete button"},"+")]),e.createElementVNode("div",q,[e.unref(r).length==0?(e.openBlock(),e.createElementBlock("p",P,e.toDisplayString(e.unref(_)),1)):e.createCommentVNode("",!0),e.unref(r).length==0?(e.openBlock(),e.createBlock(p._sfc_main,{key:1,onClick:t,class:"button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)),1)]),_:1})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r),(u,g)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-medium w-100 flex-nowrap flex",key:g},[e.createVNode(p.Field,{field:u[e.unref(i)],"onUpdate:field":h=>u[e.unref(i)]=h,placeholder:"Название параметра",class:"w-100 mn-r-small bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(p.Field,{field:u[e.unref(f)],"onUpdate:field":h=>u[e.unref(f)]=h,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("button",{onClick:h=>l(g),class:"mn-l-small button"},S,8,z)]))),128))])]))}},D=e.createElementVNode("div",{class:"flex-v-center flex-h-center flex w-100 h-100"}," upload ",-1),U={__name:"UploadImageMultiple",props:["uploadPath"],emits:["update:images"],setup(c,{emit:s}){const o=c,t=e.ref([]),l=e.ref(null);function r(){l.value.click()}async function m(d){let i=d.target.files,f=new FormData;for(let a=0;a<i.length;a++)f.append("file",i[a]);try{(await p.axios.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/multiple?folderName=${encodeURIComponent(o.uploadPath)}`,f,{headers:{"Content-Type":"multipart/form-data"}})).data.forEach(u=>{t.value.push(u.filepath)}),s("update:images",t.value)}catch(a){console.error(a)}}function _(d){d.preventDefault(),m({target:{files:d.dataTransfer.files}})}return(d,i)=>(e.openBlock(),e.createElementBlock("div",{onClick:r,onDrop:_,onDragover:i[0]||(i[0]=e.withModifiers(()=>{},["prevent"])),class:"flex-v-center flex-h-center flex"},[D,e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:l,onChange:m,multiple:"",style:{display:"none"}},null,544)],32))}},L={key:0,class:"mn-big"},A={class:"flex-column block"},F=["src"],R=["onClick"],T={__name:"EditProductImages",props:{product:Object},setup(c){function s(t){console.log(t),console.log(n.state.current.images),n.state.current.images.push(...t)}function o(t){n.state.current.images.splice(t,1)}return(t,l)=>(e.openBlock(),e.createElementBlock("div",null,[c.product.images.length<1?(e.openBlock(),e.createElementBlock("p",L," The product doesn't have any images yet. ")):e.createCommentVNode("",!0),e.createVNode(e.unref(V.VueDraggableNext),{class:"cols-4 dragArea list-group w-full",list:c.product.images,sort:!0,onChange:t.log},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.product.images,(r,m)=>(e.openBlock(),e.createElementBlock("div",A,[e.createElementVNode("img",{class:"w-100 mn-small",src:(t.FILE_SERVER_URL||"")+r},null,8,F),e.createElementVNode("a",{onClick:_=>o(m),class:"w-100 br-grey br-solid br-1px button"},"Удалить",8,R)]))),256))]),_:1},8,["list","onChange"]),e.createVNode(U,{"onUpdate:images":s,uploadPath:"organizations/"+t.$route.params._id+"/products",class:"mn-t-semi pd-small w-100 button bg-main"},null,8,["uploadPath"])]))}};const M={class:"for-transition w-100"},j={class:"pd-b-zero pd-t-zero pd-thin"},O={class:"pd-thin"},G={class:"flex-nowrap flex bg-grey pd-medium radius-big"},H={key:0,class:"mn-r-auto"},J={key:1,class:"mn-r-auto"},K={class:"flex-nowrap flex pd-thin"},Q={class:"pd-b-zero pd-t-zero pd-thin cols-2 gap-thin"},W={class:"mn-thin bg-grey pd-medium o-hidden radius-big"},X=e.createElementVNode("h3",{class:"mn-semi"},"Profile",-1),Y={class:"mn-semi"},Z=e.createElementVNode("h5",null,"Categories",-1),ee={class:""},te={class:"mn-thin bg-grey pd-medium o-hidden radius-big"},ne=e.createElementVNode("h3",{class:"mn-semi"},"Images",-1),oe={__name:"ProductEdit",async setup(c){let s,o;const t=b.useRoute(),l=b.useRouter();[s,o]=e.withAsyncContext(()=>n.actions.fetchCategories()),await s,o(),t.params.product&&([s,o]=e.withAsyncContext(()=>n.actions$1.read({_id:t.params.product})),await s,o());function r(){n.state.current.information.push({name:"",value:""})}function m(a){n.state.current.information.splice(a,1)}function _(){n.state.current.localization.push({locale:"",text:""})}function d(a){n.state.current.localization.splice(a,1)}function i(){t.params.product?n.actions$1.update(t.params.product,n.state.current):n.actions$1.create(t.params._id,n.state.current)}function f(){l.push({name:"ProductEdit",params:{_id:t.params._id,product:n.state.current._id}})}return(a,v)=>(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",j,[e.createVNode(n._sfc_main,{class:"pd-medium bg-grey radius-big"})]),e.createElementVNode("div",O,[e.createElementVNode("header",G,[e.unref(t).params.product?(e.openBlock(),e.createElementBlock("h1",H,"Edit Product")):(e.openBlock(),e.createElementBlock("h1",J,"Create Product")),e.createElementVNode("section",K,[e.createVNode(p._sfc_main,{submit:i,callback:f},{default:e.withCtx(()=>[e.createTextVNode("Save Product")]),_:1})])])]),e.createElementVNode("div",Q,[e.createElementVNode("div",W,[X,e.createVNode(w,{product:n.state.current},null,8,["product"]),e.createElementVNode("div",Y,[Z,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.state$1.all,(u,g)=>(e.openBlock(),e.createBlock(k.Checkbox,{label:u.name,name:"categories",value:u.url,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:n.state.current.category},null,8,["label","value","radio"]))),256))]),e.createVNode(N,{items:n.state.current.information,title:"Parameters",emptyMessage:"No parameters",addButtonLabel:"Add parameter",keyName:"name",valueName:"value",onAddInfo:r,onDeleteInfo:m},null,8,["items"]),e.createVNode(N,{items:n.state.current.localization,title:"Localization",emptyMessage:"No localizations",addButtonLabel:"Add localization",keyName:"locale",valueName:"text",onAddInfo:_,onDeleteInfo:d},null,8,["items"])]),e.createElementVNode("div",ee,[e.createElementVNode("div",te,[ne,e.createVNode(T,{product:n.state.current},null,8,["product"])])])])]))}};exports.default=oe;
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import { ref as f, watch as g, openBlock as t, createElementBlock as p, createElementVNode as d, unref as u, createCommentVNode as s, createBlock as l } from "vue";
|
2
|
+
import { useRoute as v, useRouter as y } from "vue-router";
|
3
|
+
import { _ as b } from "./Tab-a243605d.mjs";
|
4
|
+
import { _ as n } from "./Feed-536c8a92.mjs";
|
5
|
+
import { s as o } from "./auth-c3234662.mjs";
|
6
|
+
import "./inputs.validation-14e8e01f.mjs";
|
7
|
+
import "./globals-96ba60e4.mjs";
|
8
|
+
import "vue-i18n";
|
9
|
+
import "./EmptyState-34d85f10.mjs";
|
10
|
+
import "./_plugin-vue_export-helper-dad06003.mjs";
|
11
|
+
import "./Chips-03ff0c34.mjs";
|
12
|
+
import "./IconEdit-eacf3856.mjs";
|
13
|
+
const h = { class: "pd-thin" }, k = { class: "mn-medium flex-v-center flex-nowrap flex" }, w = /* @__PURE__ */ d("h2", { class: "mn-r-medium" }, "Posts", -1), M = {
|
14
|
+
__name: "ProfileBlogposts",
|
15
|
+
setup(q) {
|
16
|
+
const e = v(), c = y();
|
17
|
+
let _ = e.query.tab ? e.query.tab : "posts";
|
18
|
+
const r = f(_);
|
19
|
+
return e.query.tab = r.value, g(r, (i) => {
|
20
|
+
c.replace({ query: { ...e.query, tab: i } });
|
21
|
+
}), (i, a) => (t(), p("div", h, [
|
22
|
+
d("header", k, [
|
23
|
+
w,
|
24
|
+
o.user._id === u(e).params._id ? (t(), p("button", {
|
25
|
+
key: 0,
|
26
|
+
onClick: a[0] || (a[0] = (m) => i.$router.push({
|
27
|
+
name: "Create BlogPost"
|
28
|
+
})),
|
29
|
+
class: "radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"
|
30
|
+
}, " + ")) : s("", !0)
|
31
|
+
]),
|
32
|
+
o.user._id === u(e).params._id ? (t(), l(b, {
|
33
|
+
key: 0,
|
34
|
+
selected: r.value,
|
35
|
+
"onUpdate:selected": a[1] || (a[1] = (m) => r.value = m),
|
36
|
+
tabs: [
|
37
|
+
{ name: "My posts", value: "posts" },
|
38
|
+
{ name: "Drafts", value: "drafts" },
|
39
|
+
{ name: "Following", value: "following" }
|
40
|
+
],
|
41
|
+
class: "mn-small o-hidden h5 radius-big bg-grey"
|
42
|
+
}, null, 8, ["selected"])) : s("", !0),
|
43
|
+
r.value === "posts" ? (t(), l(n, {
|
44
|
+
key: 1,
|
45
|
+
user: o.user._id,
|
46
|
+
creator: u(e).params._id
|
47
|
+
}, null, 8, ["user", "creator"])) : s("", !0),
|
48
|
+
r.value === "drafts" ? (t(), l(n, {
|
49
|
+
key: 2,
|
50
|
+
user: o.user._id,
|
51
|
+
creator: u(e).params._id,
|
52
|
+
status: "draft"
|
53
|
+
}, null, 8, ["user", "creator"])) : s("", !0),
|
54
|
+
r.value === "following" ? (t(), l(n, {
|
55
|
+
key: 3,
|
56
|
+
user: o.user._id,
|
57
|
+
category: "following"
|
58
|
+
}, null, 8, ["user"])) : s("", !0)
|
59
|
+
]));
|
60
|
+
}
|
61
|
+
};
|
62
|
+
export {
|
63
|
+
M as default
|
64
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("vue-router"),d=require("./Tab-6f0a4909.js"),u=require("./Feed-a5229528.js"),o=require("./auth-3dedf391.js");require("./inputs.validation-24ae76b9.js");require("./globals-928eb13c.js");require("vue-i18n");require("./EmptyState-7658d7d6.js");require("./_plugin-vue_export-helper-f246444f.js");require("./Chips-4d8ac62e.js");require("./IconEdit-4cfe2115.js");const m={class:"pd-thin"},p={class:"mn-medium flex-v-center flex-nowrap flex"},_=e.createElementVNode("h2",{class:"mn-r-medium"},"Posts",-1),f={__name:"ProfileBlogposts",setup(k){const r=l.useRoute(),c=l.useRouter();let i=r.query.tab?r.query.tab:"posts";const t=e.ref(i);return r.query.tab=t.value,e.watch(t,a=>{c.replace({query:{...r.query,tab:a}})}),(a,s)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",p,[_,o.state.user._id===e.unref(r).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:s[0]||(s[0]=n=>a.$router.push({name:"Create BlogPost"})),class:"radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),o.state.user._id===e.unref(r).params._id?(e.openBlock(),e.createBlock(d._sfc_main,{key:0,selected:t.value,"onUpdate:selected":s[1]||(s[1]=n=>t.value=n),tabs:[{name:"My posts",value:"posts"},{name:"Drafts",value:"drafts"},{name:"Following",value:"following"}],class:"mn-small o-hidden h5 radius-big bg-grey"},null,8,["selected"])):e.createCommentVNode("",!0),t.value==="posts"?(e.openBlock(),e.createBlock(u._sfc_main,{key:1,user:o.state.user._id,creator:e.unref(r).params._id},null,8,["user","creator"])):e.createCommentVNode("",!0),t.value==="drafts"?(e.openBlock(),e.createBlock(u._sfc_main,{key:2,user:o.state.user._id,creator:e.unref(r).params._id,status:"draft"},null,8,["user","creator"])):e.createCommentVNode("",!0),t.value==="following"?(e.openBlock(),e.createBlock(u._sfc_main,{key:3,user:o.state.user._id,category:"following"},null,8,["user"])):e.createCommentVNode("",!0)]))}};exports.default=f;
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { ref as l, watch as p, openBlock as s, createElementBlock as c, createVNode as d, createBlock as _, unref as a, createCommentVNode as f, createElementVNode as m } from "vue";
|
2
|
+
import { useRoute as b, useRouter as h } from "vue-router";
|
3
|
+
import { _ as v } from "./Tab-a243605d.mjs";
|
4
|
+
import { _ as y } from "./Feed-536c8a92.mjs";
|
5
|
+
import "./inputs.validation-14e8e01f.mjs";
|
6
|
+
import "./globals-96ba60e4.mjs";
|
7
|
+
import "vue-i18n";
|
8
|
+
import "./EmptyState-34d85f10.mjs";
|
9
|
+
import "./_plugin-vue_export-helper-dad06003.mjs";
|
10
|
+
import "./Chips-03ff0c34.mjs";
|
11
|
+
import "./IconEdit-eacf3856.mjs";
|
12
|
+
import "./auth-c3234662.mjs";
|
13
|
+
const g = { class: "pd-thin" }, q = /* @__PURE__ */ m("header", { class: "mn-medium flex-v-center flex-nowrap flex" }, [
|
14
|
+
/* @__PURE__ */ m("h2", { class: "mn-r-medium" }, "Comments")
|
15
|
+
], -1), O = {
|
16
|
+
__name: "ProfileComments",
|
17
|
+
setup(w) {
|
18
|
+
const e = b(), n = h();
|
19
|
+
let u = e.query.tab ? e.query.tab : "posts";
|
20
|
+
const t = l(u);
|
21
|
+
return e.query.tab = t.value, p(t, (r) => {
|
22
|
+
n.replace({ query: { ...e.query, tab: r } });
|
23
|
+
}), (r, o) => (s(), c("div", g, [
|
24
|
+
q,
|
25
|
+
d(v, {
|
26
|
+
selected: t.value,
|
27
|
+
"onUpdate:selected": o[0] || (o[0] = (i) => t.value = i),
|
28
|
+
tabs: [
|
29
|
+
{ name: "My posts", value: "posts" },
|
30
|
+
{ name: "Following", value: "hubs" }
|
31
|
+
],
|
32
|
+
class: "mn-r-medium o-hidden h5 radius-big bg-grey"
|
33
|
+
}, null, 8, ["selected"]),
|
34
|
+
t.value === "posts" ? (s(), _(y, {
|
35
|
+
key: 0,
|
36
|
+
user: a(e).params._id,
|
37
|
+
owner: a(e).params._id
|
38
|
+
}, null, 8, ["user", "owner"])) : f("", !0)
|
39
|
+
]));
|
40
|
+
}
|
41
|
+
};
|
42
|
+
export {
|
43
|
+
O as default
|
44
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("vue-router"),c=require("./Tab-6f0a4909.js"),i=require("./Feed-a5229528.js");require("./inputs.validation-24ae76b9.js");require("./globals-928eb13c.js");require("vue-i18n");require("./EmptyState-7658d7d6.js");require("./_plugin-vue_export-helper-f246444f.js");require("./Chips-4d8ac62e.js");require("./IconEdit-4cfe2115.js");require("./auth-3dedf391.js");const m={class:"pd-thin"},d=e.createElementVNode("header",{class:"mn-medium flex-v-center flex-nowrap flex"},[e.createElementVNode("h2",{class:"mn-r-medium"},"Comments")],-1),q={__name:"ProfileComments",setup(p){const r=o.useRoute(),n=o.useRouter();let a=r.query.tab?r.query.tab:"posts";const t=e.ref(a);return r.query.tab=t.value,e.watch(t,u=>{n.replace({query:{...r.query,tab:u}})}),(u,s)=>(e.openBlock(),e.createElementBlock("div",m,[d,e.createVNode(c._sfc_main,{selected:t.value,"onUpdate:selected":s[0]||(s[0]=l=>t.value=l),tabs:[{name:"My posts",value:"posts"},{name:"Following",value:"hubs"}],class:"mn-r-medium o-hidden h5 radius-big bg-grey"},null,8,["selected"]),t.value==="posts"?(e.openBlock(),e.createBlock(i._sfc_main,{key:0,user:e.unref(r).params._id,owner:e.unref(r).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]))}};exports.default=q;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("vue-router"),d=require("./Tab-6f0a4909.js"),i=require("./Feed-2c92ceed.js"),n=require("./auth-3dedf391.js");require("./inputs.validation-24ae76b9.js");require("./globals-928eb13c.js");require("vue-i18n");require("./EmptyState-7658d7d6.js");require("./Chips-4d8ac62e.js");require("./IconEdit-4cfe2115.js");require("./_plugin-vue_export-helper-f246444f.js");const m={class:"pd-thin"},p={class:"mn-medium flex-v-center flex-nowrap flex"},_=e.createElementVNode("h2",{class:"mn-r-medium"}," Events ",-1),q={__name:"ProfileEvents",setup(v){const r=c.useRoute(),s=c.useRouter();let l=r.query.tab?r.query.tab:"owner";const t=e.ref(l);return r.query.tab=t.value,e.watch(t,u=>{s.replace({query:{...r.query,tab:u}})}),(u,a)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",p,[_,n.state.user._id===e.unref(r).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=o=>e.unref(s).push({name:"Create Event"})),class:"radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),e.createVNode(d._sfc_main,{selected:t.value,"onUpdate:selected":a[1]||(a[1]=o=>t.value=o),tabs:[{name:"My",value:"owner"},{name:"Participant",value:"participant"}],class:"mn-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),t.value==="owner"?(e.openBlock(),e.createBlock(i._sfc_main,{key:0,user:n.state.user._id,creator:e.unref(r).params._id,sortOrder:"asc"},null,8,["user","creator"])):e.createCommentVNode("",!0),t.value==="participant"?(e.openBlock(),e.createBlock(i._sfc_main,{key:1,user:n.state.user._id,participant:e.unref(r).params._id,sortOrder:"desc"},null,8,["user","participant"])):e.createCommentVNode("",!0)]))}};exports.default=q;
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import { ref as f, watch as v, openBlock as a, createElementBlock as c, createElementVNode as d, unref as s, createCommentVNode as o, createVNode as b, createBlock as l } from "vue";
|
2
|
+
import { useRoute as y, useRouter as h } from "vue-router";
|
3
|
+
import { _ as k } from "./Tab-a243605d.mjs";
|
4
|
+
import { _ as p } from "./Feed-406e3b66.mjs";
|
5
|
+
import { s as i } from "./auth-c3234662.mjs";
|
6
|
+
import "./inputs.validation-14e8e01f.mjs";
|
7
|
+
import "./globals-96ba60e4.mjs";
|
8
|
+
import "vue-i18n";
|
9
|
+
import "./EmptyState-34d85f10.mjs";
|
10
|
+
import "./Chips-03ff0c34.mjs";
|
11
|
+
import "./IconEdit-eacf3856.mjs";
|
12
|
+
import "./_plugin-vue_export-helper-dad06003.mjs";
|
13
|
+
const g = { class: "pd-thin" }, w = { class: "mn-medium flex-v-center flex-nowrap flex" }, q = /* @__PURE__ */ d("h2", { class: "mn-r-medium" }, " Events ", -1), j = {
|
14
|
+
__name: "ProfileEvents",
|
15
|
+
setup(x) {
|
16
|
+
const e = y(), n = h();
|
17
|
+
let _ = e.query.tab ? e.query.tab : "owner";
|
18
|
+
const r = f(_);
|
19
|
+
return e.query.tab = r.value, v(r, (u) => {
|
20
|
+
n.replace({ query: { ...e.query, tab: u } });
|
21
|
+
}), (u, t) => (a(), c("div", g, [
|
22
|
+
d("header", w, [
|
23
|
+
q,
|
24
|
+
i.user._id === s(e).params._id ? (a(), c("button", {
|
25
|
+
key: 0,
|
26
|
+
onClick: t[0] || (t[0] = (m) => s(n).push({ name: "Create Event" })),
|
27
|
+
class: "radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"
|
28
|
+
}, " + ")) : o("", !0)
|
29
|
+
]),
|
30
|
+
b(k, {
|
31
|
+
selected: r.value,
|
32
|
+
"onUpdate:selected": t[1] || (t[1] = (m) => r.value = m),
|
33
|
+
tabs: [
|
34
|
+
{ name: "My", value: "owner" },
|
35
|
+
{ name: "Participant", value: "participant" }
|
36
|
+
],
|
37
|
+
class: "mn-small o-hidden h5 radius-big bg-grey"
|
38
|
+
}, null, 8, ["selected"]),
|
39
|
+
r.value === "owner" ? (a(), l(p, {
|
40
|
+
key: 0,
|
41
|
+
user: i.user._id,
|
42
|
+
creator: s(e).params._id,
|
43
|
+
sortOrder: "asc"
|
44
|
+
}, null, 8, ["user", "creator"])) : o("", !0),
|
45
|
+
r.value === "participant" ? (a(), l(p, {
|
46
|
+
key: 1,
|
47
|
+
user: i.user._id,
|
48
|
+
participant: s(e).params._id,
|
49
|
+
sortOrder: "desc"
|
50
|
+
}, null, 8, ["user", "participant"])) : o("", !0)
|
51
|
+
]));
|
52
|
+
}
|
53
|
+
};
|
54
|
+
export {
|
55
|
+
j as default
|
56
|
+
};
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import { ref as f, watch as v, openBlock as a, createElementBlock as c, createElementVNode as d, unref as s, createCommentVNode as o, createVNode as b, createBlock as l } from "vue";
|
2
|
+
import { useRoute as y, useRouter as h } from "vue-router";
|
3
|
+
import { _ as k } from "./Tab-a243605d.mjs";
|
4
|
+
import { _ as p } from "./Feed-bbe44c17.mjs";
|
5
|
+
import { s as i } from "./auth-c3234662.mjs";
|
6
|
+
import "./inputs.validation-14e8e01f.mjs";
|
7
|
+
import "./globals-96ba60e4.mjs";
|
8
|
+
import "vue-i18n";
|
9
|
+
import "./EmptyState-34d85f10.mjs";
|
10
|
+
import "./Chips-03ff0c34.mjs";
|
11
|
+
import "./IconEdit-eacf3856.mjs";
|
12
|
+
import "./_plugin-vue_export-helper-dad06003.mjs";
|
13
|
+
const g = { class: "pd-thin" }, w = { class: "mn-medium flex-v-center flex-nowrap flex" }, q = /* @__PURE__ */ d("h2", { class: "mn-r-medium" }, " Events ", -1), j = {
|
14
|
+
__name: "ProfileEvents",
|
15
|
+
setup(x) {
|
16
|
+
const e = y(), n = h();
|
17
|
+
let _ = e.query.tab ? e.query.tab : "owner";
|
18
|
+
const r = f(_);
|
19
|
+
return e.query.tab = r.value, v(r, (u) => {
|
20
|
+
n.replace({ query: { ...e.query, tab: u } });
|
21
|
+
}), (u, t) => (a(), c("div", g, [
|
22
|
+
d("header", w, [
|
23
|
+
q,
|
24
|
+
i.user._id === s(e).params._id ? (a(), c("button", {
|
25
|
+
key: 0,
|
26
|
+
onClick: t[0] || (t[0] = (m) => s(n).push({ name: "Create Event" })),
|
27
|
+
class: "radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"
|
28
|
+
}, " + ")) : o("", !0)
|
29
|
+
]),
|
30
|
+
b(k, {
|
31
|
+
selected: r.value,
|
32
|
+
"onUpdate:selected": t[1] || (t[1] = (m) => r.value = m),
|
33
|
+
tabs: [
|
34
|
+
{ name: "My", value: "owner" },
|
35
|
+
{ name: "Participant", value: "participant" }
|
36
|
+
],
|
37
|
+
class: "mn-small o-hidden h5 radius-big bg-grey"
|
38
|
+
}, null, 8, ["selected"]),
|
39
|
+
r.value === "owner" ? (a(), l(p, {
|
40
|
+
key: 0,
|
41
|
+
user: i.user._id,
|
42
|
+
creator: s(e).params._id,
|
43
|
+
sortOrder: "asc"
|
44
|
+
}, null, 8, ["user", "creator"])) : o("", !0),
|
45
|
+
r.value === "participant" ? (a(), l(p, {
|
46
|
+
key: 1,
|
47
|
+
user: i.user._id,
|
48
|
+
participant: s(e).params._id,
|
49
|
+
sortOrder: "desc"
|
50
|
+
}, null, 8, ["user", "participant"])) : o("", !0)
|
51
|
+
]));
|
52
|
+
}
|
53
|
+
};
|
54
|
+
export {
|
55
|
+
j as default
|
56
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("vue-router"),d=require("./Tab-6f0a4909.js"),i=require("./Feed-3a187776.js"),n=require("./auth-3dedf391.js");require("./inputs.validation-24ae76b9.js");require("./globals-928eb13c.js");require("vue-i18n");require("./EmptyState-7658d7d6.js");require("./Chips-4d8ac62e.js");require("./IconEdit-4cfe2115.js");require("./_plugin-vue_export-helper-f246444f.js");const m={class:"pd-thin"},p={class:"mn-medium flex-v-center flex-nowrap flex"},_=e.createElementVNode("h2",{class:"mn-r-medium"}," Events ",-1),q={__name:"ProfileEvents",setup(v){const r=c.useRoute(),s=c.useRouter();let l=r.query.tab?r.query.tab:"owner";const t=e.ref(l);return r.query.tab=t.value,e.watch(t,u=>{s.replace({query:{...r.query,tab:u}})}),(u,a)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",p,[_,n.state.user._id===e.unref(r).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=o=>e.unref(s).push({name:"Create Event"})),class:"radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),e.createVNode(d._sfc_main,{selected:t.value,"onUpdate:selected":a[1]||(a[1]=o=>t.value=o),tabs:[{name:"My",value:"owner"},{name:"Participant",value:"participant"}],class:"mn-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),t.value==="owner"?(e.openBlock(),e.createBlock(i._sfc_main,{key:0,user:n.state.user._id,creator:e.unref(r).params._id,sortOrder:"asc"},null,8,["user","creator"])):e.createCommentVNode("",!0),t.value==="participant"?(e.openBlock(),e.createBlock(i._sfc_main,{key:1,user:n.state.user._id,participant:e.unref(r).params._id,sortOrder:"desc"},null,8,["user","participant"])):e.createCommentVNode("",!0)]))}};exports.default=q;
|