@ozdao/prometheus-framework 0.0.92 → 0.0.94
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/CardOrganization-82c5b4c6.js +1 -0
- package/dist/CardOrganization-df0a4506.mjs +229 -0
- package/dist/Feed-530e40ab.mjs +428 -0
- package/dist/Feed-c25dc839.js +1 -0
- package/dist/Product-6d05d027.js +7 -0
- package/dist/Product-a23f852f.js +7 -0
- package/dist/Product-b054c74c.mjs +838 -0
- package/dist/Product-c085f00f.mjs +838 -0
- package/dist/ProductEdit-171c9923.js +1 -0
- package/dist/ProductEdit-23d35d67.mjs +350 -0
- package/dist/ProductEdit-3aecb5bf.js +1 -0
- package/dist/ProductEdit-55b6cb06.mjs +350 -0
- package/dist/ProfileBlogposts-5382274b.mjs +64 -0
- package/dist/ProfileBlogposts-a2d04221.js +1 -0
- package/dist/ProfileComments-06985576.mjs +44 -0
- package/dist/ProfileComments-db4b6fbc.js +1 -0
- package/dist/ProfileLikes-3c5c02be.mjs +44 -0
- package/dist/ProfileLikes-553c52df.js +1 -0
- package/dist/ProfileOrganizations-6f4df3da.js +1 -0
- package/dist/ProfileOrganizations-930ca51f.mjs +212 -0
- package/dist/Publics-103da60e.js +1 -0
- package/dist/Publics-f4c3ef5b.mjs +123 -0
- package/dist/auth.client.cjs +1 -1
- package/dist/auth.client.js +86 -91
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +4 -4
- package/dist/organizations.client-21cfcf36.mjs +3038 -0
- package/dist/organizations.client-6947e530.js +3 -0
- package/dist/organizations.client-c6fd9351.js +3 -0
- package/dist/organizations.client-d0cae5f4.mjs +3017 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +4 -4
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +4 -4
- package/package.json +1 -1
- package/src/modules/auth/components/pages/SignIn.vue +3 -3
- package/src/modules/community/components/sections/Feed.vue +1 -1
- package/src/modules/organizations/components/blocks/CardOrganization.vue +2 -0
@@ -0,0 +1,3017 @@
|
|
1
|
+
import { computed as H, resolveComponent as ue, openBlock as o, createElementBlock as r, Fragment as O, renderList as L, unref as k, normalizeClass as te, createCommentVNode as g, createBlock as $, withCtx as x, createTextVNode as W, toDisplayString as f, createElementVNode as n, Transition as N, createVNode as h, renderSlot as z, ref as v, reactive as oe, watch as E, onMounted as pe, pushScopeId as me, popScopeId as he, withAsyncContext as Y, withModifiers as re, watchEffect as de, resolveDirective as Ie, normalizeProps as V, guardReactiveProps as B, resolveDynamicComponent as le, mergeProps as ve, toHandlers as Be, withDirectives as ne, vShow as ye, toRefs as je, vModelText as we } from "vue";
|
2
|
+
import { useRoute as F, useRouter as q } from "vue-router";
|
3
|
+
import { useI18n as Ue } from "vue-i18n";
|
4
|
+
import { s as C } from "./globals-96ba60e4.mjs";
|
5
|
+
import { S as Te, _ as Ee, C as J } from "./Breadcrumbs.vue_vue_type_style_index_0_lang-d9c6e4d1.mjs";
|
6
|
+
import { _ as Pe } from "./Tab-a243605d.mjs";
|
7
|
+
import { a as ge, B as Fe, m as qe, s as Ze } from "./ButtonFollow-5e19fc49.mjs";
|
8
|
+
import { _ as He } from "./Feed-986ddd21.mjs";
|
9
|
+
import { _ as Ne } from "./Feed-530e40ab.mjs";
|
10
|
+
import { I as Re, _ as Ke } from "./IconEdit-f0ad8b9a.mjs";
|
11
|
+
import { a as We, _ as Ye } from "./CardOrganization-df0a4506.mjs";
|
12
|
+
import { P as Je } from "./PlaceholderUserpic-14c6ea7e.mjs";
|
13
|
+
import { a as _e, s as S, F as D, _ as ce } from "./auth-5217f6a5.mjs";
|
14
|
+
import { v as Qe, a as Xe } from "./inputs.validation-14e8e01f.mjs";
|
15
|
+
import { a as Z, s as b } from "./organizations-2adff182.mjs";
|
16
|
+
import { _ as A } from "./_plugin-vue_export-helper-dad06003.mjs";
|
17
|
+
import { _ as ze } from "./UploadImage-a3ef4012.mjs";
|
18
|
+
import { S as Me } from "./Publics-f4c3ef5b.mjs";
|
19
|
+
const Ge = {
|
20
|
+
class: "breadcrumbs flex-row flex-nowrap flex-left flex",
|
21
|
+
"aria-label": "breadcrumbs"
|
22
|
+
}, et = {
|
23
|
+
key: 0,
|
24
|
+
class: "i-small mn-r-thin",
|
25
|
+
viewBox: "0 0 10 9",
|
26
|
+
fill: "none",
|
27
|
+
xmlns: "http://www.w3.org/2000/svg"
|
28
|
+
}, tt = /* @__PURE__ */ n("path", {
|
29
|
+
fill: "black",
|
30
|
+
d: "M0.494141 4.26391C0.494141 4.48862 0.659906 4.66912 0.928813 4.66912C1.05037 4.66912 1.16825 4.6065 1.27139 4.52177L1.64344 4.20866V7.56448C1.64344 8.13545 1.98971 8.47803 2.5791 8.47803H7.56678C8.15616 8.47803 8.50243 8.13545 8.50243 7.56448V4.19392L8.8929 4.52177C8.99604 4.6065 9.11392 4.66912 9.23916 4.66912C9.48597 4.66912 9.67015 4.5144 9.67015 4.27128C9.67015 4.1313 9.61121 4.01343 9.5007 3.92133L8.50243 3.08146V1.47538C8.50243 1.30961 8.3956 1.1991 8.22984 1.1991H7.63308C7.46732 1.1991 7.35313 1.30961 7.35313 1.47538V2.11634L5.66969 0.70181C5.31606 0.403433 4.85928 0.403433 4.50197 0.70181L0.663589 3.92133C0.553079 4.01711 0.494141 4.14235 0.494141 4.26391ZM6.13752 5.26219C6.13752 5.08906 6.02701 4.97855 5.85387 4.97855H4.31779C4.14097 4.97855 4.02678 5.08906 4.02678 5.26219V7.63447H2.83327C2.60856 7.63447 2.48332 7.50922 2.48332 7.28084V3.5014L4.90349 1.47538C5.01768 1.37592 5.15029 1.37592 5.26817 1.47538L7.66255 3.48298V7.28084C7.66255 7.50922 7.53731 7.63447 7.3126 7.63447H6.13752V5.26219Z"
|
31
|
+
}, null, -1), st = [
|
32
|
+
tt
|
33
|
+
], nt = { key: 2 }, at = {
|
34
|
+
key: 3,
|
35
|
+
class: "i-small chevron",
|
36
|
+
viewBox: "0 0 4 8",
|
37
|
+
fill: "none",
|
38
|
+
xmlns: "http://www.w3.org/2000/svg"
|
39
|
+
}, ot = /* @__PURE__ */ n("path", {
|
40
|
+
d: "M4 3.99992C4 3.83673 3.94307 3.70391 3.81025 3.57867L0.899431 0.732369C0.800759 0.629902 0.679317 0.580566 0.531309 0.580566C0.239089 0.580566 0 0.815861 0 1.10808C0 1.25229 0.0607211 1.38512 0.166983 1.49138L2.74763 3.99613L0.166983 6.50846C0.0607211 6.61093 0 6.74375 0 6.89176C0 7.18398 0.239089 7.41928 0.531309 7.41928C0.675522 7.41928 0.800759 7.36994 0.899431 7.26747L3.81025 4.42117C3.94307 4.29594 4 4.15931 4 3.99992Z",
|
41
|
+
fill: "black"
|
42
|
+
}, null, -1), it = [
|
43
|
+
ot
|
44
|
+
], lt = {
|
45
|
+
__name: "Breadcrumbs",
|
46
|
+
setup(e) {
|
47
|
+
const t = F(), { t: s, locale: a } = Ue(), d = H(() => t.matched.map((c) => {
|
48
|
+
var w, P, I;
|
49
|
+
const p = (w = c.meta) == null ? void 0 : w.title, l = a == null ? void 0 : a.value, u = p && l && p[l], i = c.path.replace(/:.+?\//g, (R) => ""), m = (I = (P = c.meta) == null ? void 0 : P.breadcrumbs) == null ? void 0 : I.hidden;
|
50
|
+
return { name: u, path: i, isHidden: m };
|
51
|
+
}).filter((c) => c.name && !c.isHidden));
|
52
|
+
return (c, p) => {
|
53
|
+
const l = ue("router-link");
|
54
|
+
return o(), r("ol", Ge, [
|
55
|
+
(o(!0), r(O, null, L(k(d), (u, i) => (o(), r("li", {
|
56
|
+
key: i,
|
57
|
+
class: te(["flex-v-center flex-nowrap flex", { "t-main": i === k(d).length - 1 }])
|
58
|
+
}, [
|
59
|
+
i === 0 ? (o(), r("svg", et, st)) : g("", !0),
|
60
|
+
i !== k(d).length - 1 ? (o(), $(l, {
|
61
|
+
key: 1,
|
62
|
+
to: i === 0 ? "/" : u.path
|
63
|
+
}, {
|
64
|
+
default: x(() => [
|
65
|
+
W(f(u.name), 1)
|
66
|
+
]),
|
67
|
+
_: 2
|
68
|
+
}, 1032, ["to"])) : (o(), r("span", nt, f(u.name), 1)),
|
69
|
+
i !== k(d).length - 1 ? (o(), r("svg", at, it)) : g("", !0)
|
70
|
+
], 2))), 128))
|
71
|
+
]);
|
72
|
+
};
|
73
|
+
}
|
74
|
+
}, rt = { class: "mn-small w-100" }, dt = ["href"], ct = /* @__PURE__ */ n("span", { class: "t-semi uppercase" }, "Website", -1), ut = [
|
75
|
+
ct
|
76
|
+
], pt = ["href"], mt = /* @__PURE__ */ n("span", { class: "t-semi uppercase" }, "Phone", -1), ht = [
|
77
|
+
mt
|
78
|
+
], _t = ["href"], ft = /* @__PURE__ */ n("span", { class: "t-semi uppercase" }, "Email", -1), gt = [
|
79
|
+
ft
|
80
|
+
], bt = ["href"], vt = /* @__PURE__ */ n("span", { class: "t-semi uppercase" }, "Address", -1), yt = [
|
81
|
+
vt
|
82
|
+
], gi = {
|
83
|
+
__name: "Contacts",
|
84
|
+
props: {
|
85
|
+
website: String,
|
86
|
+
phone: String,
|
87
|
+
email: String,
|
88
|
+
address: String
|
89
|
+
},
|
90
|
+
setup(e) {
|
91
|
+
const t = e, s = H(() => t.website ? !t.website.startsWith("http://") && !t.website.startsWith("https://") ? `http://${t.website}` : t.website : null), a = H(() => t.address ? encodeURIComponent(t.address) : null);
|
92
|
+
return (d, c) => (o(), r("div", rt, [
|
93
|
+
k(s) ? (o(), r("a", {
|
94
|
+
key: 0,
|
95
|
+
href: k(s),
|
96
|
+
target: "_blank",
|
97
|
+
class: "w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"
|
98
|
+
}, ut, 8, dt)) : g("", !0),
|
99
|
+
t.phone ? (o(), r("a", {
|
100
|
+
key: 1,
|
101
|
+
href: `tel:${t.phone}`,
|
102
|
+
class: "w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"
|
103
|
+
}, ht, 8, pt)) : g("", !0),
|
104
|
+
t.email ? (o(), r("a", {
|
105
|
+
key: 2,
|
106
|
+
href: `mailto:${t.email}`,
|
107
|
+
target: "_blank",
|
108
|
+
class: "w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"
|
109
|
+
}, gt, 8, _t)) : g("", !0),
|
110
|
+
k(a) ? (o(), r("a", {
|
111
|
+
key: 3,
|
112
|
+
href: `https://www.google.com/maps/search/?api=1&query=${k(a)}`,
|
113
|
+
target: "_blank",
|
114
|
+
class: "w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"
|
115
|
+
}, yt, 8, bt)) : g("", !0)
|
116
|
+
]));
|
117
|
+
}
|
118
|
+
}, wt = { class: "w-100 mn-small star-container flex-v-center flex" }, $t = { class: "p-big t-semi mn-r-small" }, Ct = /* @__PURE__ */ n("path", {
|
119
|
+
fill: "#00FF88",
|
120
|
+
d: "M62.2406 5.85971L75.413 32.6098L105.203 36.8654C110.472 37.676 112.498 44.3636 108.648 48.0113L87.1668 68.8844L92.2331 98.2689C93.2464 103.741 87.5721 107.591 82.9111 105.159L56.3637 91.3788L29.8163 105.159C25.1553 107.794 19.4811 103.741 20.4944 98.4716L25.5607 68.8844L4.07956 48.0113C0.22917 44.3636 2.25569 37.676 7.52464 36.8654L37.3145 32.6098L50.4868 5.85971C52.9186 0.996063 59.8088 0.996063 62.2406 5.85971Z"
|
121
|
+
}, null, -1), kt = [
|
122
|
+
Ct
|
123
|
+
], xt = { class: "" }, bi = {
|
124
|
+
__name: "Rating",
|
125
|
+
props: {
|
126
|
+
rating: {
|
127
|
+
type: Number,
|
128
|
+
required: !0
|
129
|
+
},
|
130
|
+
amount: {
|
131
|
+
type: Number,
|
132
|
+
required: !0
|
133
|
+
}
|
134
|
+
},
|
135
|
+
setup(e) {
|
136
|
+
return (t, s) => (o(), r("section", null, [
|
137
|
+
n("div", wt, [
|
138
|
+
n("span", $t, f(e.rating), 1),
|
139
|
+
(o(), r(O, null, L(5, (a) => n("svg", {
|
140
|
+
class: te(["i-semi mn-r-small", { "t-transp": a > e.rating }]),
|
141
|
+
width: "113",
|
142
|
+
height: "108",
|
143
|
+
viewBox: "0 0 113 108",
|
144
|
+
fill: "none",
|
145
|
+
xmlns: "http://www.w3.org/2000/svg"
|
146
|
+
}, kt, 2)), 64))
|
147
|
+
]),
|
148
|
+
n("p", xt, "Based on " + f(e.amount) + " reviews", 1)
|
149
|
+
]));
|
150
|
+
}
|
151
|
+
}, Ot = { class: "t-center flex-center flex-column flex pd-medium radius-big bg-grey" }, Lt = ["src"], St = { class: "mn-thin" }, Pt = { class: "mn-medium p-big" }, zt = { class: "flex-center flex-wrap gap-thin flex mn-semi" }, Mt = { class: "pd-thin radius-small t-semi uppercase t-black bg-main p-medium" }, Dt = {
|
152
|
+
key: 3,
|
153
|
+
class: "mn-t-small mn-thin"
|
154
|
+
}, At = {
|
155
|
+
__name: "DetailsTab",
|
156
|
+
props: {
|
157
|
+
organization: Object,
|
158
|
+
user: Object
|
159
|
+
},
|
160
|
+
setup(e) {
|
161
|
+
return (t, s) => (o(), $(N, { name: "slide-fade" }, {
|
162
|
+
default: x(() => [
|
163
|
+
n("section", Ot, [
|
164
|
+
e.user._id === e.organization.owner ? (o(), $(Re, {
|
165
|
+
key: 0,
|
166
|
+
onClick: s[0] || (s[0] = (a) => t.$router.push({
|
167
|
+
name: "Organization Edit",
|
168
|
+
params: {
|
169
|
+
_id: e.organization._id
|
170
|
+
}
|
171
|
+
})),
|
172
|
+
class: "pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
|
173
|
+
})) : g("", !0),
|
174
|
+
e.organization.profile.photo ? (o(), r("img", {
|
175
|
+
key: 1,
|
176
|
+
src: e.organization.profile.photo,
|
177
|
+
class: "radius-big bg-grey flex-center flex mn-small i-extra"
|
178
|
+
}, null, 8, Lt)) : (o(), $(Je, {
|
179
|
+
key: 2,
|
180
|
+
class: "radius-medium mn-small i-extra"
|
181
|
+
})),
|
182
|
+
n("h1", St, f(e.organization.profile.name), 1),
|
183
|
+
n("p", Pt, [
|
184
|
+
h(We, {
|
185
|
+
text: e.organization.profile.description ? e.organization.profile.description : "",
|
186
|
+
maxLen: 240
|
187
|
+
}, null, 8, ["text"])
|
188
|
+
]),
|
189
|
+
n("div", zt, [
|
190
|
+
(o(!0), r(O, null, L(e.organization.profile.tags, (a) => (o(), r("span", Mt, f(a), 1))), 256))
|
191
|
+
]),
|
192
|
+
z(t.$slots, "default"),
|
193
|
+
Object.values(e.organization.socials).some((a) => a) ? (o(), r("h4", Dt, " Find us in socials ")) : g("", !0),
|
194
|
+
h(Ke, {
|
195
|
+
telegram: e.organization.socials.telegram,
|
196
|
+
facebook: e.organization.socials.facebook,
|
197
|
+
instagram: e.organization.socials.instagram,
|
198
|
+
twitter: e.organization.socials.twitter
|
199
|
+
}, null, 8, ["telegram", "facebook", "instagram", "twitter"])
|
200
|
+
])
|
201
|
+
]),
|
202
|
+
_: 3
|
203
|
+
}));
|
204
|
+
}
|
205
|
+
};
|
206
|
+
const Vt = {
|
207
|
+
key: 0,
|
208
|
+
class: "spoiler"
|
209
|
+
}, $e = {
|
210
|
+
__name: "Spoiler",
|
211
|
+
props: {
|
212
|
+
status: {
|
213
|
+
type: Boolean,
|
214
|
+
default: !1
|
215
|
+
}
|
216
|
+
},
|
217
|
+
setup(e) {
|
218
|
+
const t = e, s = v(!1);
|
219
|
+
return t.status && (s.value = t.status), (a, d) => (o(), r("div", null, [
|
220
|
+
n("div", {
|
221
|
+
onClick: d[0] || (d[0] = (c) => s.value = !s.value),
|
222
|
+
class: "flex-v-center flex-nowrap flex"
|
223
|
+
}, [
|
224
|
+
z(a.$slots, "header")
|
225
|
+
]),
|
226
|
+
h(N, { name: "collapse" }, {
|
227
|
+
default: x(() => [
|
228
|
+
s.value ? (o(), r("div", Vt, [
|
229
|
+
z(a.$slots, "content")
|
230
|
+
])) : g("", !0)
|
231
|
+
]),
|
232
|
+
_: 3
|
233
|
+
})
|
234
|
+
]));
|
235
|
+
}
|
236
|
+
}, j = _e.create({ baseURL: process.env.API_URL, withCredentials: !0 }), y = oe({
|
237
|
+
all: [],
|
238
|
+
current: {
|
239
|
+
recommendation: !1,
|
240
|
+
category: [],
|
241
|
+
status: "unpublished",
|
242
|
+
information: [],
|
243
|
+
coverImage: "",
|
244
|
+
images: [],
|
245
|
+
files: [],
|
246
|
+
image3d: !1,
|
247
|
+
name: "",
|
248
|
+
sale: 0,
|
249
|
+
price: 0,
|
250
|
+
localization: [],
|
251
|
+
modifications: [],
|
252
|
+
description: ""
|
253
|
+
}
|
254
|
+
}), vi = {
|
255
|
+
async create(e, t) {
|
256
|
+
const s = {
|
257
|
+
...t,
|
258
|
+
organization: e
|
259
|
+
};
|
260
|
+
return await j.post("/products/create", s).then(
|
261
|
+
(a) => (It(a.data, "current"), Promise.resolve(a.data)),
|
262
|
+
(a) => (C(a), Promise.reject(a))
|
263
|
+
);
|
264
|
+
},
|
265
|
+
async read(e = {}) {
|
266
|
+
e._id && (e.params = { _id: e._id }), e.category && (e.params = e.params || {}, e.params.category = e.category), e.params = e.params || {}, e.params.skip = e.skip || 0, e.params.limit = e.limit || 10, e.organization && (e.params.organization = e.organization), e.params.sort = "createdAt";
|
267
|
+
try {
|
268
|
+
console.log("Request params:" + e.params);
|
269
|
+
const t = await j.get("/products/read", { params: e.params });
|
270
|
+
return e._id ? y.current = t.data[0] : y.all = t.data, Promise.resolve(t.data);
|
271
|
+
} catch (t) {
|
272
|
+
return C(t), Promise.reject(t);
|
273
|
+
}
|
274
|
+
},
|
275
|
+
async update(e, t) {
|
276
|
+
return await j.post("/products/" + e, t).then(
|
277
|
+
(s) => Promise.resolve(s.data),
|
278
|
+
(s) => (C(s), Promise.reject(s))
|
279
|
+
);
|
280
|
+
},
|
281
|
+
async deleteProduct(e) {
|
282
|
+
return await j.delete("/products/" + e).then(
|
283
|
+
(t) => Promise.resolve(t.data),
|
284
|
+
(t) => (C(t), Promise.reject(t))
|
285
|
+
);
|
286
|
+
},
|
287
|
+
async submitMood(e = null) {
|
288
|
+
return console.log(e), j.post("/product/recommended", { mood: e }).then(
|
289
|
+
(t) => (y.current = t.data.product, y.current.recommendation = t.data.recommendationText, Promise.resolve(t.data)),
|
290
|
+
(t) => (console.log(t), C(t), Promise.reject(t))
|
291
|
+
);
|
292
|
+
},
|
293
|
+
async fetchProducts() {
|
294
|
+
return await j.get("/products").then(
|
295
|
+
(e) => (y.all = e.data, y.filtered = e.data.slice(), y.filteredPrice = y.filtered, y.filteredPrice.sort(function(t, s) {
|
296
|
+
return t[y.sort.current] > s[y.sort.current] ? y.sort.ascending ? 1 : -1 : t[y.sort.current] < s[y.sort.current] ? y.sort.ascending ? -1 : 1 : 0;
|
297
|
+
}), Promise.resolve(e.data)),
|
298
|
+
(e) => (C(e), Promise.reject(e))
|
299
|
+
);
|
300
|
+
},
|
301
|
+
async fetchProductsPopular() {
|
302
|
+
return await j.get("/products/popular").then(
|
303
|
+
(e) => (y.popular = e.data, Promise.resolve(e.data)),
|
304
|
+
(e) => (C(e), Promise.reject(e))
|
305
|
+
);
|
306
|
+
},
|
307
|
+
async fetchProductsPublished() {
|
308
|
+
return await j.get("/products").then(
|
309
|
+
(e) => {
|
310
|
+
let t = e.data.filter(function(s, a) {
|
311
|
+
return s.status !== "unpublished";
|
312
|
+
});
|
313
|
+
return y.all = t, y.filtered = t.slice(), y.filteredPrice = y.filtered, y.filteredPrice.sort(function(s, a) {
|
314
|
+
return s[y.sort.current] > a[y.sort.current] ? y.sort.ascending ? 1 : -1 : s[y.sort.current] < a[y.sort.current] ? y.sort.ascending ? -1 : 1 : 0;
|
315
|
+
}), Promise.resolve(e.data);
|
316
|
+
},
|
317
|
+
(e) => (C(e), Promise.reject(e))
|
318
|
+
);
|
319
|
+
},
|
320
|
+
async fetchProduct(e) {
|
321
|
+
return await j.get("/products/" + e).then(
|
322
|
+
(t) => (t.localization || (t.localization = []), y.current = t.data, Promise.resolve(t.data)),
|
323
|
+
(t) => (C(t), Promise.reject(t))
|
324
|
+
);
|
325
|
+
},
|
326
|
+
async fetchProductPopular() {
|
327
|
+
return await j.get("/products").then(
|
328
|
+
(e) => (y.all = e.data.slice(1, 5), Promise.resolve(e.data.slice(1, 5))),
|
329
|
+
(e) => (C(e), Promise.reject(e))
|
330
|
+
);
|
331
|
+
}
|
332
|
+
};
|
333
|
+
function It(e, t) {
|
334
|
+
y[t] = e;
|
335
|
+
}
|
336
|
+
E(y, (e, t) => {
|
337
|
+
});
|
338
|
+
const Bt = process.env.API_URL, Q = _e.create({ baseURL: Bt, withCredentials: !0 }), U = oe({
|
339
|
+
all: [],
|
340
|
+
current: {
|
341
|
+
order: "1",
|
342
|
+
name: "",
|
343
|
+
url: "",
|
344
|
+
subcategories: [],
|
345
|
+
filters: [],
|
346
|
+
localization: []
|
347
|
+
}
|
348
|
+
}), yi = {
|
349
|
+
async fetchCategories() {
|
350
|
+
return await Q.get("/categories").then(
|
351
|
+
(e) => (U.all = e.data, Promise.resolve(e.data)),
|
352
|
+
(e) => (C(e), Promise.reject(e))
|
353
|
+
);
|
354
|
+
},
|
355
|
+
updateCategories(e) {
|
356
|
+
return Q.post("/categories", e).then(
|
357
|
+
(t) => (U.all = e, Promise.resolve(e)),
|
358
|
+
(t) => (C(t), Promise.reject(t))
|
359
|
+
);
|
360
|
+
},
|
361
|
+
fetchCategory(e) {
|
362
|
+
return Q.get("/categories/" + e).then(
|
363
|
+
(t) => (U.current = t.data, Promise.resolve(t.data)),
|
364
|
+
(t) => (C(t), Promise.reject(t))
|
365
|
+
);
|
366
|
+
},
|
367
|
+
addCategory() {
|
368
|
+
return Q.post("/categories/add", U.current).then(
|
369
|
+
(e) => (U.all.push(e.data), Promise.resolve(e.data)),
|
370
|
+
(e) => (C(e), Promise.reject(e))
|
371
|
+
);
|
372
|
+
},
|
373
|
+
updateCategory(e) {
|
374
|
+
return Q.post("/categories/" + e, U.current).then(
|
375
|
+
(t) => (U.current = t.data, Promise.resolve(t.data)),
|
376
|
+
(t) => (C(t), Promise.reject(t))
|
377
|
+
);
|
378
|
+
},
|
379
|
+
deleteCategory(e) {
|
380
|
+
return Q.delete("/categories/" + e).then(
|
381
|
+
(t) => {
|
382
|
+
const s = U.all.findIndex((a) => a.url === e);
|
383
|
+
U.all.splice(s, 1);
|
384
|
+
},
|
385
|
+
(t) => {
|
386
|
+
C(t);
|
387
|
+
}
|
388
|
+
);
|
389
|
+
}
|
390
|
+
};
|
391
|
+
E(U, (e) => {
|
392
|
+
});
|
393
|
+
const jt = { class: "mn-big radius-medium pd-big bg-white" }, Ut = { class: "mn-regular" }, Tt = { class: "mn-small t-transp p-medium" }, fe = {
|
394
|
+
__name: "EmptyState",
|
395
|
+
props: {
|
396
|
+
title: {
|
397
|
+
type: String,
|
398
|
+
default: "У вас еще нет организации"
|
399
|
+
},
|
400
|
+
description: {
|
401
|
+
type: String,
|
402
|
+
default: "Для использования сервиса, вам необходимо добавить вашу организацию."
|
403
|
+
},
|
404
|
+
action: {
|
405
|
+
type: String,
|
406
|
+
default: "Создать организацию"
|
407
|
+
},
|
408
|
+
callback: {
|
409
|
+
type: Function,
|
410
|
+
default: () => {
|
411
|
+
}
|
412
|
+
}
|
413
|
+
},
|
414
|
+
setup(e) {
|
415
|
+
return (t, s) => (o(), r("section", jt, [
|
416
|
+
n("h3", Ut, f(e.title), 1),
|
417
|
+
n("p", Tt, f(e.description), 1),
|
418
|
+
n("button", {
|
419
|
+
onClick: s[0] || (s[0] = (...a) => e.callback && e.callback(...a)),
|
420
|
+
class: "t-white bg-second w-100 button"
|
421
|
+
}, f(e.action), 1)
|
422
|
+
]));
|
423
|
+
}
|
424
|
+
};
|
425
|
+
const Et = {
|
426
|
+
__name: "Map",
|
427
|
+
props: {
|
428
|
+
location: Object
|
429
|
+
},
|
430
|
+
setup(e) {
|
431
|
+
const t = e;
|
432
|
+
let s = v(null), a = null, d = null;
|
433
|
+
return pe(async () => {
|
434
|
+
a = new google.maps.Map(s.value, {
|
435
|
+
zoom: 13,
|
436
|
+
center: {
|
437
|
+
lat: t.location.lat,
|
438
|
+
lng: t.location.lng
|
439
|
+
}
|
440
|
+
}), d = new google.maps.Marker({
|
441
|
+
position: {
|
442
|
+
lat: t.location.lat,
|
443
|
+
lng: t.location.lng
|
444
|
+
},
|
445
|
+
map: a
|
446
|
+
});
|
447
|
+
}), E(() => t.location, () => {
|
448
|
+
a && d && (d.setPosition(new google.maps.LatLng(t.location.lat, t.location.lng)), a.setCenter(new google.maps.LatLng(t.location.lat, t.location.lng)));
|
449
|
+
}, { deep: !0 }), (c, p) => (o(), r("div", {
|
450
|
+
ref_key: "gmap",
|
451
|
+
ref: s,
|
452
|
+
class: "gmap"
|
453
|
+
}, null, 512));
|
454
|
+
}
|
455
|
+
}, Ft = /* @__PURE__ */ A(Et, [["__scopeId", "data-v-c194b4a5"]]);
|
456
|
+
const qt = { class: "pd-small flex-nowrap flex" }, Zt = { class: "user-card__info" }, Ht = { class: "user-card__name" }, Nt = { class: "user-card__position" }, Rt = {
|
457
|
+
__name: "DepartmentSub",
|
458
|
+
props: {
|
459
|
+
department: {
|
460
|
+
type: Object,
|
461
|
+
required: !0
|
462
|
+
}
|
463
|
+
// Define other props here
|
464
|
+
},
|
465
|
+
setup(e) {
|
466
|
+
return (t, s) => (o(), r("div", qt, [
|
467
|
+
n("div", Zt, [
|
468
|
+
n("p", Ht, f(e.department.name ? e.department.name : "Безымянный"), 1),
|
469
|
+
n("p", Nt, f(e.department.members ? e.department.members.length : "0") + " человек", 1)
|
470
|
+
])
|
471
|
+
]));
|
472
|
+
}
|
473
|
+
}, De = /* @__PURE__ */ A(Rt, [["__scopeId", "data-v-3a07133c"]]);
|
474
|
+
const Kt = { class: "pd-small flex-nowrap flex" }, Wt = { class: "user-card__info" }, Yt = { class: "user-card__name" }, Jt = { class: "t-transp" }, Qt = {
|
475
|
+
__name: "User",
|
476
|
+
props: {
|
477
|
+
user: {
|
478
|
+
type: Object,
|
479
|
+
required: !0
|
480
|
+
},
|
481
|
+
position: {
|
482
|
+
type: String,
|
483
|
+
required: !0
|
484
|
+
}
|
485
|
+
// Define other props here
|
486
|
+
},
|
487
|
+
setup(e) {
|
488
|
+
return (t, s) => (o(), r("div", Kt, [
|
489
|
+
n("div", Wt, [
|
490
|
+
n("p", Yt, f(e.user.name ? e.user.name : "Безымянный"), 1),
|
491
|
+
n("p", Jt, f(e.position), 1)
|
492
|
+
])
|
493
|
+
]));
|
494
|
+
}
|
495
|
+
}, Ae = /* @__PURE__ */ A(Qt, [["__scopeId", "data-v-c0ea3801"]]);
|
496
|
+
const ie = (e) => (me("data-v-1d33cf95"), e = e(), he(), e), Xt = { class: "radius-big o-hidden cols-2-1_3" }, Gt = { class: "pd-medium w-100" }, es = /* @__PURE__ */ ie(() => /* @__PURE__ */ n("path", {
|
497
|
+
d: "M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z",
|
498
|
+
fill: "black"
|
499
|
+
}, null, -1)), ts = [
|
500
|
+
es
|
501
|
+
], ss = ["innerHTML"], ns = ["innerHTML"], as = { class: "pd-small flex-v-center flex-nowrap flex" }, os = /* @__PURE__ */ ie(() => /* @__PURE__ */ n("h5", { class: "w-100" }, "Contacts ", -1)), is = { class: "mn-r-small" }, ls = /* @__PURE__ */ ie(() => /* @__PURE__ */ n("svg", {
|
502
|
+
width: "14",
|
503
|
+
height: "9",
|
504
|
+
viewBox: "0 0 14 9",
|
505
|
+
fill: "none",
|
506
|
+
xmlns: "http://www.w3.org/2000/svg"
|
507
|
+
}, [
|
508
|
+
/* @__PURE__ */ n("path", {
|
509
|
+
"fill-rule": "evenodd",
|
510
|
+
"clip-rule": "evenodd",
|
511
|
+
d: "M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z",
|
512
|
+
fill: "#8A8A8A"
|
513
|
+
})
|
514
|
+
], -1)), rs = { key: 0 }, ds = { class: "pd-small flex-v-center flex-nowrap flex" }, cs = /* @__PURE__ */ ie(() => /* @__PURE__ */ n("h5", { class: "w-100" }, "Working Hours ", -1)), us = { class: "mn-r-small" }, ps = /* @__PURE__ */ ie(() => /* @__PURE__ */ n("svg", {
|
515
|
+
width: "14",
|
516
|
+
height: "9",
|
517
|
+
viewBox: "0 0 14 9",
|
518
|
+
fill: "none",
|
519
|
+
xmlns: "http://www.w3.org/2000/svg"
|
520
|
+
}, [
|
521
|
+
/* @__PURE__ */ n("path", {
|
522
|
+
"fill-rule": "evenodd",
|
523
|
+
"clip-rule": "evenodd",
|
524
|
+
d: "M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z",
|
525
|
+
fill: "#8A8A8A"
|
526
|
+
})
|
527
|
+
], -1)), ms = { key: 0 }, hs = {
|
528
|
+
__name: "Department",
|
529
|
+
props: {
|
530
|
+
department: Object,
|
531
|
+
organization: Object
|
532
|
+
},
|
533
|
+
setup(e) {
|
534
|
+
const t = e;
|
535
|
+
return (s, a) => (o(), r("div", Xt, [
|
536
|
+
h(Ft, {
|
537
|
+
location: { lat: e.department.location.coordinates[1], lng: e.department.location.coordinates[0] },
|
538
|
+
class: ""
|
539
|
+
}, null, 8, ["location"]),
|
540
|
+
n("div", Gt, [
|
541
|
+
(o(), r("svg", {
|
542
|
+
onClick: a[0] || (a[0] = (d) => s.$router.push(`/app/organization/${t.organization._id}/departments/${e.department._id}/edit`)),
|
543
|
+
class: "i-regular pos-absolute pos-r-0 pos-t-0 t-transp",
|
544
|
+
width: "652",
|
545
|
+
height: "652",
|
546
|
+
viewBox: "0 0 652 652",
|
547
|
+
fill: "none",
|
548
|
+
xmlns: "http://www.w3.org/2000/svg"
|
549
|
+
}, ts)),
|
550
|
+
n("h3", {
|
551
|
+
onClick: a[1] || (a[1] = (d) => s.$router.push(`/app/organization/${t.organization._id}/departments/${e.department._id}`)),
|
552
|
+
class: "mn-small w-100",
|
553
|
+
innerHTML: e.department.profile.name
|
554
|
+
}, null, 8, ss),
|
555
|
+
n("p", {
|
556
|
+
onClick: a[2] || (a[2] = (d) => s.$router.push(`/app/organization/${t.organization._id}/departments/${e.department._id}`)),
|
557
|
+
class: "mn-small p-big w-100",
|
558
|
+
innerHTML: e.department.address
|
559
|
+
}, null, 8, ns),
|
560
|
+
h($e, { class: "radius-small o-hidden br-1px br-solid br-grey mn-thin" }, {
|
561
|
+
header: x(() => [
|
562
|
+
n("div", as, [
|
563
|
+
os,
|
564
|
+
n("p", is, f(e.department.members.length) + " человек", 1),
|
565
|
+
ls
|
566
|
+
])
|
567
|
+
]),
|
568
|
+
content: x(() => [
|
569
|
+
n("ul", null, [
|
570
|
+
e.department.members.length < 1 ? (o(), r("li", rs, "В отделе еще нет участников")) : g("", !0),
|
571
|
+
(o(!0), r(O, null, L(e.department.members, (d, c) => (o(), $(Ae, {
|
572
|
+
class: "br-b br-solid br-grey",
|
573
|
+
key: c,
|
574
|
+
user: d.user,
|
575
|
+
position: d.position,
|
576
|
+
onClick: (p) => s.$router.push(`/app/profile/${d.user._id}`)
|
577
|
+
}, null, 8, ["user", "position", "onClick"]))), 128))
|
578
|
+
])
|
579
|
+
]),
|
580
|
+
_: 1
|
581
|
+
}),
|
582
|
+
h($e, { class: "radius-small o-hidden br-1px br-solid br-grey mn-thin" }, {
|
583
|
+
header: x(() => [
|
584
|
+
n("div", ds, [
|
585
|
+
cs,
|
586
|
+
n("p", us, f(e.department.subdepartments ? e.department.subdepartments.length : 0) + " отделов", 1),
|
587
|
+
ps
|
588
|
+
])
|
589
|
+
]),
|
590
|
+
content: x(() => [
|
591
|
+
n("ul", null, [
|
592
|
+
e.department.subdepartments.length < 1 ? (o(), r("li", ms, "В отделе еще нет подотделов")) : g("", !0),
|
593
|
+
(o(!0), r(O, null, L(e.department.subdepartments, (d, c) => (o(), $(De, {
|
594
|
+
onClick: (p) => s.$router.push(`/app/organization/departments/${d._id}`),
|
595
|
+
key: c,
|
596
|
+
class: "br-b br-solid br-grey",
|
597
|
+
department: d
|
598
|
+
}, null, 8, ["onClick", "department"]))), 128))
|
599
|
+
])
|
600
|
+
]),
|
601
|
+
_: 1
|
602
|
+
})
|
603
|
+
])
|
604
|
+
]));
|
605
|
+
}
|
606
|
+
}, _s = /* @__PURE__ */ A(hs, [["__scopeId", "data-v-1d33cf95"]]), G = _e.create({ baseURL: process.env.API_URL, withCredentials: !0 });
|
607
|
+
G.defaults.withCredentials = !0;
|
608
|
+
const _ = oe({
|
609
|
+
departments: [],
|
610
|
+
department: {
|
611
|
+
organization: "",
|
612
|
+
profile: {
|
613
|
+
photo: "",
|
614
|
+
name: "",
|
615
|
+
description: "",
|
616
|
+
categories: []
|
617
|
+
},
|
618
|
+
address: "",
|
619
|
+
location: {
|
620
|
+
lat: null,
|
621
|
+
lng: null
|
622
|
+
},
|
623
|
+
worktime: [],
|
624
|
+
delivery: [],
|
625
|
+
payment: [],
|
626
|
+
members: [],
|
627
|
+
subdepartments: []
|
628
|
+
},
|
629
|
+
error: null
|
630
|
+
}), K = {
|
631
|
+
async readOne(e) {
|
632
|
+
await G.get(`/api/departments/get/${e}`).then((t) => {
|
633
|
+
_.department = t.data, _.error = null;
|
634
|
+
}).catch((t) => {
|
635
|
+
C(t);
|
636
|
+
});
|
637
|
+
},
|
638
|
+
async read(e) {
|
639
|
+
await G.get(`/api/departments/${e}`).then((t) => {
|
640
|
+
console.log("Response:", t), _.departments = t.data, _.error = null;
|
641
|
+
}).catch((t) => {
|
642
|
+
C(t);
|
643
|
+
});
|
644
|
+
},
|
645
|
+
async create(e, t) {
|
646
|
+
await G.post(`/api/departments/${e}/create`, t).then((s) => {
|
647
|
+
_.error = null, _.department = s.data;
|
648
|
+
}).catch((s) => {
|
649
|
+
C(s);
|
650
|
+
});
|
651
|
+
},
|
652
|
+
async update(e, t) {
|
653
|
+
await G.post(`/api/departments/${e}/update`, t).then(() => {
|
654
|
+
_.error = null;
|
655
|
+
}).catch((s) => {
|
656
|
+
C(s);
|
657
|
+
});
|
658
|
+
},
|
659
|
+
async delete(e, t) {
|
660
|
+
await G.delete(`/api/departments/${e}/delete`, { data: { _id: t } }).then(() => {
|
661
|
+
_.error = null;
|
662
|
+
}).catch((s) => {
|
663
|
+
C(s);
|
664
|
+
});
|
665
|
+
}
|
666
|
+
};
|
667
|
+
E(_, (e, t) => {
|
668
|
+
});
|
669
|
+
const wi = {
|
670
|
+
__name: "StructureTab",
|
671
|
+
props: {
|
672
|
+
organization: Object,
|
673
|
+
units: Array,
|
674
|
+
memberships: Array
|
675
|
+
},
|
676
|
+
async setup(e) {
|
677
|
+
let t, s;
|
678
|
+
const a = e;
|
679
|
+
v("departments"), [t, s] = Y(() => K.read(a.organization._id)), await t, s();
|
680
|
+
const d = H(() => {
|
681
|
+
const c = _.departments, p = c.flatMap(
|
682
|
+
(l) => l.subdepartments.map((u) => u._id)
|
683
|
+
);
|
684
|
+
return c.filter(
|
685
|
+
(l) => !p.includes(l._id)
|
686
|
+
);
|
687
|
+
});
|
688
|
+
return (c, p) => (o(), $(N, { name: "slide-fade" }, {
|
689
|
+
default: x(() => [
|
690
|
+
n("div", null, [
|
691
|
+
k(d).length < 1 ? (o(), $(fe, {
|
692
|
+
key: 0,
|
693
|
+
title: "You don't have any spots yet.",
|
694
|
+
description: "Add spots to your hub.",
|
695
|
+
action: "Add spot",
|
696
|
+
callback: () => c.$router.push(`/app/organization/${a.organization._id}/departments/create`)
|
697
|
+
}, null, 8, ["callback"])) : g("", !0),
|
698
|
+
n("div", null, [
|
699
|
+
(o(!0), r(O, null, L(k(d), (l, u) => (o(), $(_s, {
|
700
|
+
key: u,
|
701
|
+
department: l,
|
702
|
+
organization: e.organization,
|
703
|
+
class: "radius-big bg-grey mn-thin"
|
704
|
+
}, null, 8, ["department", "organization"]))), 128)),
|
705
|
+
k(d).length > 0 && S.user._id === e.organization.owner ? (o(), r("button", {
|
706
|
+
key: 0,
|
707
|
+
onClick: p[0] || (p[0] = (l) => c.$router.push(`/app/organization/${a.organization._id}/departments/create`)),
|
708
|
+
class: "mn-thin button w-100"
|
709
|
+
}, " Add spot ")) : g("", !0)
|
710
|
+
])
|
711
|
+
])
|
712
|
+
]),
|
713
|
+
_: 1
|
714
|
+
}));
|
715
|
+
}
|
716
|
+
}, ee = _e.create({ baseURL: process.env.API_URL, withCredentials: !0 });
|
717
|
+
ee.defaults.withCredentials = !0;
|
718
|
+
const T = oe({
|
719
|
+
invites: [],
|
720
|
+
invite: null,
|
721
|
+
error: null
|
722
|
+
}), ae = {
|
723
|
+
async read(e) {
|
724
|
+
await ee.get(`/api/invites/${e}`).then((t) => {
|
725
|
+
T.invites = t.data, T.error = null;
|
726
|
+
}).catch((t) => {
|
727
|
+
C(t);
|
728
|
+
});
|
729
|
+
},
|
730
|
+
async readOne(e) {
|
731
|
+
await ee.get(`/api/invites/get/${e}`).then((t) => {
|
732
|
+
T.invite = t.data, S.user.phone = t.data.invitedPhone, S.user.email = t.data.invitedEmail;
|
733
|
+
}).catch((t) => {
|
734
|
+
C(t);
|
735
|
+
});
|
736
|
+
},
|
737
|
+
async create(e, t) {
|
738
|
+
await ee.post(`/api/invites/${e}/create`, t).then(() => {
|
739
|
+
T.error = null;
|
740
|
+
}).catch((s) => {
|
741
|
+
C(s);
|
742
|
+
});
|
743
|
+
},
|
744
|
+
async update(e, t) {
|
745
|
+
await ee.put(`/api/invites/${e}/update`, t).then(() => {
|
746
|
+
T.error = null;
|
747
|
+
}).catch((s) => {
|
748
|
+
C(s);
|
749
|
+
});
|
750
|
+
},
|
751
|
+
async delete(e) {
|
752
|
+
await ee.delete(`/api/invites/${e}/delete`).then(() => {
|
753
|
+
T.error = null;
|
754
|
+
}).catch((t) => {
|
755
|
+
C(t);
|
756
|
+
});
|
757
|
+
}
|
758
|
+
};
|
759
|
+
E(T, (e, t) => {
|
760
|
+
});
|
761
|
+
const $i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
762
|
+
__proto__: null,
|
763
|
+
actions: ae,
|
764
|
+
state: T
|
765
|
+
}, Symbol.toStringTag, { value: "Module" })), fs = { class: "mn-medium radius-medium pd-semi bg-white" }, gs = /* @__PURE__ */ n("h3", { class: "mn-medium" }, "Добавить участников", -1), bs = /* @__PURE__ */ n("p", { class: "mn-small t-transp p-medium" }, "Укажите email или телефон, чтобы отправить ссылку с приглашением:", -1), vs = { class: "w-100 flex-nowrap flex" }, ys = {
|
766
|
+
key: 0,
|
767
|
+
class: "mn-r-medium flex-v-center flex"
|
768
|
+
}, ws = ["onClick"], $s = /* @__PURE__ */ n("p", { class: "t-blue mn-r-small" }, "+ Добавить приглашение", -1), Cs = [
|
769
|
+
$s
|
770
|
+
], ks = /* @__PURE__ */ n("span", null, "Отправить приглашения ", -1), xs = {
|
771
|
+
__name: "MembersAdd",
|
772
|
+
props: {
|
773
|
+
organization: Object
|
774
|
+
},
|
775
|
+
emits: ["send-invite"],
|
776
|
+
setup(e, { emit: t }) {
|
777
|
+
const s = e, a = v(null), d = v([{ contact: "", role: "" }]);
|
778
|
+
function c() {
|
779
|
+
d.value.push({ contact: "", role: "" });
|
780
|
+
}
|
781
|
+
function p(i) {
|
782
|
+
d.value.splice(i, 1);
|
783
|
+
}
|
784
|
+
async function l(i) {
|
785
|
+
await ae.create(s.organization._id, d.value);
|
786
|
+
}
|
787
|
+
function u() {
|
788
|
+
}
|
789
|
+
return (i, m) => (o(), r("div", null, [
|
790
|
+
n("section", fs, [
|
791
|
+
gs,
|
792
|
+
bs,
|
793
|
+
(o(!0), r(O, null, L(d.value, (w, P) => (o(), r("div", {
|
794
|
+
key: P,
|
795
|
+
class: "br-1px br-solid br-grey flex radius-small mn-thin"
|
796
|
+
}, [
|
797
|
+
n("div", vs, [
|
798
|
+
h(D, {
|
799
|
+
field: w.contact,
|
800
|
+
"onUpdate:field": (I) => w.contact = I,
|
801
|
+
placeholder: "Email или телефон",
|
802
|
+
class: "w-100 bg-white",
|
803
|
+
validation: a.value
|
804
|
+
}, null, 8, ["field", "onUpdate:field", "validation"]),
|
805
|
+
P > 0 ? (o(), r("div", ys, [
|
806
|
+
n("button", {
|
807
|
+
onClick: (I) => p(P),
|
808
|
+
class: "button-small button"
|
809
|
+
}, "×", 8, ws)
|
810
|
+
])) : g("", !0)
|
811
|
+
]),
|
812
|
+
h(Me, {
|
813
|
+
options: [
|
814
|
+
{ name: "Директор", value: "director" },
|
815
|
+
{ name: "Менеджер", value: "manager" },
|
816
|
+
{ name: "Сотрудник", value: "member" }
|
817
|
+
],
|
818
|
+
prop: w,
|
819
|
+
content: "role",
|
820
|
+
placeholder: "Роль",
|
821
|
+
size: "small",
|
822
|
+
class: "w-80"
|
823
|
+
}, null, 8, ["prop"])
|
824
|
+
]))), 128)),
|
825
|
+
n("div", {
|
826
|
+
onClick: c,
|
827
|
+
class: "mn-small flex-v-center flex-nowrap flex"
|
828
|
+
}, Cs),
|
829
|
+
h(ce, {
|
830
|
+
submit: i.a = () => l(T.invites),
|
831
|
+
callback: u,
|
832
|
+
class: "mn-t-medium"
|
833
|
+
}, {
|
834
|
+
default: x(() => [
|
835
|
+
ks
|
836
|
+
]),
|
837
|
+
_: 1
|
838
|
+
}, 8, ["submit"])
|
839
|
+
])
|
840
|
+
]));
|
841
|
+
}
|
842
|
+
}, Os = { class: "mn-big radius-medium bg-white" }, Ls = {
|
843
|
+
key: 0,
|
844
|
+
class: "pd-semi"
|
845
|
+
}, Ss = { class: "br-grey br-1px br-solid radius-small flex-nowrap flex-v-center flex pd-medium" }, Ps = { class: "w-100 mn-r-small" }, zs = { class: "t-transp" }, Ms = {
|
846
|
+
key: 0,
|
847
|
+
class: "mn-l-medium flex-v-center flex"
|
848
|
+
}, Ds = ["onClick"], As = {
|
849
|
+
key: 1,
|
850
|
+
class: "pd-semi"
|
851
|
+
}, Vs = { key: 0 }, Is = { class: "br-grey br-1px br-solid radius-small mn-thin flex-nowrap flex-v-center flex pd-medium" }, Bs = { class: "w-100 mn-r-small" }, js = { class: "t-transp" }, Us = { class: "mn-l-medium flex-v-center flex" }, Ts = ["onClick"], Es = {
|
852
|
+
__name: "MembersList",
|
853
|
+
props: {
|
854
|
+
organization: Object,
|
855
|
+
memberships: Array,
|
856
|
+
invites: Array
|
857
|
+
},
|
858
|
+
emits: [["removeMember", "removeInvite"]],
|
859
|
+
setup(e, { emit: t }) {
|
860
|
+
const s = e, a = v("members");
|
861
|
+
function d(p, l) {
|
862
|
+
s.memberships.splice(p, 1), t("removeMember", l);
|
863
|
+
}
|
864
|
+
function c(p, l) {
|
865
|
+
s.invites.splice(p, 1), t("removeInvite", l);
|
866
|
+
}
|
867
|
+
return (p, l) => (o(), r("section", Os, [
|
868
|
+
h(Pe, {
|
869
|
+
selected: a.value,
|
870
|
+
"onUpdate:selected": l[0] || (l[0] = (u) => a.value = u),
|
871
|
+
class: "br-grey br-b br-solid radius-small",
|
872
|
+
tabs: [
|
873
|
+
{ name: "Участники", value: "members" },
|
874
|
+
{ name: "Приглашения", value: "invites" }
|
875
|
+
]
|
876
|
+
}, null, 8, ["selected"]),
|
877
|
+
a.value === "members" ? (o(), r("div", Ls, [
|
878
|
+
(o(!0), r(O, null, L(e.memberships, (u, i) => (o(), r("div", Ss, [
|
879
|
+
n("span", Ps, f(u.user.email) + " " + f(u.user.phone), 1),
|
880
|
+
n("span", zs, f(u.position), 1),
|
881
|
+
u.position !== "Основатель" ? (o(), r("div", Ms, [
|
882
|
+
n("button", {
|
883
|
+
onClick: (m) => d(i, u),
|
884
|
+
class: "button-small button"
|
885
|
+
}, "×", 8, Ds)
|
886
|
+
])) : g("", !0)
|
887
|
+
]))), 256))
|
888
|
+
])) : g("", !0),
|
889
|
+
a.value === "invites" ? (o(), r("div", As, [
|
890
|
+
e.invites.length < 1 ? (o(), r("span", Vs, "В организации нет приглашений")) : g("", !0),
|
891
|
+
(o(!0), r(O, null, L(e.invites, (u, i) => (o(), r("div", Is, [
|
892
|
+
n("span", Bs, f(u.invitedEmail) + " " + f(u.invitedPhone), 1),
|
893
|
+
n("span", js, f(u.status), 1),
|
894
|
+
n("div", Us, [
|
895
|
+
n("button", {
|
896
|
+
onClick: (m) => c(i, u),
|
897
|
+
class: "button-small button"
|
898
|
+
}, "×", 8, Ts)
|
899
|
+
])
|
900
|
+
]))), 256))
|
901
|
+
])) : g("", !0)
|
902
|
+
]));
|
903
|
+
}
|
904
|
+
}, Fs = /* @__PURE__ */ n("section", { class: "mn-medium radius-medium pd-semi bg-white" }, [
|
905
|
+
/* @__PURE__ */ n("h2", { class: "mn-regular" }, "Участники"),
|
906
|
+
/* @__PURE__ */ n("p", { class: "t-transp p-big" }, "Добавляйте новых участников организации и настраивайте права доступа.")
|
907
|
+
], -1), Ci = {
|
908
|
+
__name: "MembersTab",
|
909
|
+
props: {
|
910
|
+
organization: Object,
|
911
|
+
memberships: Array
|
912
|
+
},
|
913
|
+
async setup(e) {
|
914
|
+
let t, s;
|
915
|
+
const a = e;
|
916
|
+
[t, s] = Y(() => ae.read(a.organization._id)), await t, s();
|
917
|
+
async function d(l) {
|
918
|
+
await ae.create(a.organization._id, l);
|
919
|
+
}
|
920
|
+
async function c(l) {
|
921
|
+
await ge.delete(l._id);
|
922
|
+
}
|
923
|
+
async function p(l) {
|
924
|
+
await ae.delete(l._id);
|
925
|
+
}
|
926
|
+
return (l, u) => (o(), $(N, { name: "slide-fade" }, {
|
927
|
+
default: x(() => [
|
928
|
+
n("div", null, [
|
929
|
+
Fs,
|
930
|
+
h(xs, {
|
931
|
+
organization: e.organization,
|
932
|
+
onSendInvite: d
|
933
|
+
}, null, 8, ["organization"]),
|
934
|
+
h(Es, {
|
935
|
+
organization: e.organization,
|
936
|
+
memberships: e.memberships,
|
937
|
+
invites: T.invites,
|
938
|
+
onRemoveInvite: p,
|
939
|
+
onRemoveMember: c
|
940
|
+
}, null, 8, ["organization", "memberships", "invites"])
|
941
|
+
])
|
942
|
+
]),
|
943
|
+
_: 1
|
944
|
+
}));
|
945
|
+
}
|
946
|
+
};
|
947
|
+
const qs = {
|
948
|
+
key: 0,
|
949
|
+
class: "pd-thin for-transition w-100"
|
950
|
+
}, Zs = { class: "t-semi mn-small" }, Hs = {
|
951
|
+
__name: "Organization",
|
952
|
+
setup(e) {
|
953
|
+
const t = q(), s = F();
|
954
|
+
let a = s.query.tab ? s.query.tab : "events";
|
955
|
+
const d = v(null);
|
956
|
+
pe(async () => {
|
957
|
+
d.value = await Z.read({ _id: s.params._id, user: S.user._id }), await ge.read(s.params._id);
|
958
|
+
});
|
959
|
+
const c = v(a);
|
960
|
+
s.query.tab = c.value, E(c, (l) => {
|
961
|
+
t.push({ query: { ...s.query, tab: l } });
|
962
|
+
});
|
963
|
+
const p = ({ membership: l, isMember: u, targetId: i }) => {
|
964
|
+
qe.handleMembershipUpdate(b.current, l, u, i);
|
965
|
+
};
|
966
|
+
return (l, u) => d.value ? (o(), r("div", qs, [
|
967
|
+
h(At, {
|
968
|
+
organization: b.current,
|
969
|
+
user: S.user,
|
970
|
+
class: "mn-semi"
|
971
|
+
}, {
|
972
|
+
default: x(() => [
|
973
|
+
n("p", Zs, " 👨👨👧👧 " + f(b.current.numberOfMemberships) + " followers ", 1),
|
974
|
+
S.user._id && k(s).params._id && k(s).params._id !== S.user._id && b.current.owner !== S.user._id ? (o(), $(Fe, {
|
975
|
+
key: 0,
|
976
|
+
type: "organization",
|
977
|
+
isMember: b.current.isMember,
|
978
|
+
targetId: b.current._id,
|
979
|
+
userId: S.user._id,
|
980
|
+
class: "w-min mn-auto",
|
981
|
+
onUpdateMembership: p
|
982
|
+
}, null, 8, ["isMember", "targetId", "userId"])) : g("", !0)
|
983
|
+
]),
|
984
|
+
_: 1
|
985
|
+
}, 8, ["organization", "user"]),
|
986
|
+
h(Pe, {
|
987
|
+
selected: c.value,
|
988
|
+
"onUpdate:selected": u[0] || (u[0] = (i) => c.value = i),
|
989
|
+
tabs: [
|
990
|
+
{ name: "Events", value: "events" },
|
991
|
+
{ name: "Community", value: "community" }
|
992
|
+
],
|
993
|
+
class: "mn-small o-hidden h5 radius-big bg-grey"
|
994
|
+
}, null, 8, ["selected"]),
|
995
|
+
h(N, { name: "slide-fade" }, {
|
996
|
+
default: x(() => [
|
997
|
+
c.value === "events" ? (o(), $(He, {
|
998
|
+
key: 0,
|
999
|
+
user: S.user._id,
|
1000
|
+
owner: k(s).params._id,
|
1001
|
+
sortOrder: "asc"
|
1002
|
+
}, null, 8, ["user", "owner"])) : g("", !0)
|
1003
|
+
]),
|
1004
|
+
_: 1
|
1005
|
+
}),
|
1006
|
+
h(N, { name: "slide-fade" }, {
|
1007
|
+
default: x(() => [
|
1008
|
+
c.value === "community" ? (o(), $(Ne, {
|
1009
|
+
key: 0,
|
1010
|
+
user: S.user._id,
|
1011
|
+
owner: k(s).params._id
|
1012
|
+
}, null, 8, ["user", "owner"])) : g("", !0)
|
1013
|
+
]),
|
1014
|
+
_: 1
|
1015
|
+
})
|
1016
|
+
])) : g("", !0);
|
1017
|
+
}
|
1018
|
+
}, Ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
1019
|
+
__proto__: null,
|
1020
|
+
default: Hs
|
1021
|
+
}, Symbol.toStringTag, { value: "Module" })), Rs = { class: "for-transition w-100" }, Ks = {
|
1022
|
+
id: "dash",
|
1023
|
+
class: "pd-medium bg-grey"
|
1024
|
+
}, Ws = { class: "mn-medium radius-medium pd-semi bg-white" }, Ys = { class: "flex-nowrap flex mn-small" }, Js = { class: "w-100" }, Qs = /* @__PURE__ */ n("path", {
|
1025
|
+
d: "M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z",
|
1026
|
+
fill: "black"
|
1027
|
+
}, null, -1), Xs = [
|
1028
|
+
Qs
|
1029
|
+
], Gs = ["innerHTML"], en = { class: "mn-medium radius-medium pd-semi bg-white" }, tn = /* @__PURE__ */ n("h3", { class: "mn-regular" }, "Команда", -1), sn = { key: 0 }, nn = { class: "mn-medium radius-medium pd-semi bg-white" }, an = /* @__PURE__ */ n("h3", { class: "mn-regular" }, "Подотделы", -1), on = { key: 0 }, ln = {
|
1030
|
+
__name: "Department",
|
1031
|
+
async setup(e) {
|
1032
|
+
let t, s;
|
1033
|
+
q();
|
1034
|
+
const a = F();
|
1035
|
+
return [t, s] = Y(() => K.readOne(a.params._id)), await t, s(), (d, c) => (o(), r("div", Rs, [
|
1036
|
+
n("div", Ks, [
|
1037
|
+
n("section", Ws, [
|
1038
|
+
n("div", Ys, [
|
1039
|
+
n("h2", Js, f(_.department.name), 1),
|
1040
|
+
(o(), r("svg", {
|
1041
|
+
onClick: c[0] || (c[0] = (p) => d.$router.push(`/app/organization/departments/${_.department._id}/edit`)),
|
1042
|
+
class: "i-regular t-transp",
|
1043
|
+
width: "652",
|
1044
|
+
height: "652",
|
1045
|
+
viewBox: "0 0 652 652",
|
1046
|
+
fill: "none",
|
1047
|
+
xmlns: "http://www.w3.org/2000/svg"
|
1048
|
+
}, Xs))
|
1049
|
+
]),
|
1050
|
+
n("p", {
|
1051
|
+
class: "t-transp p-big",
|
1052
|
+
innerHTML: _.department.description
|
1053
|
+
}, null, 8, Gs)
|
1054
|
+
]),
|
1055
|
+
n("section", en, [
|
1056
|
+
tn,
|
1057
|
+
n("ul", null, [
|
1058
|
+
_.department.members.length < 1 ? (o(), r("li", sn, "В отделе еще нет участников")) : g("", !0),
|
1059
|
+
(o(!0), r(O, null, L(_.department.members, (p, l) => (o(), $(Ae, {
|
1060
|
+
class: "br-b br-solid br-grey",
|
1061
|
+
key: l,
|
1062
|
+
user: p.user,
|
1063
|
+
position: p.position,
|
1064
|
+
onClick: (u) => d.$router.push(`/app/profile/${p.user._id}`)
|
1065
|
+
}, null, 8, ["user", "position", "onClick"]))), 128))
|
1066
|
+
])
|
1067
|
+
]),
|
1068
|
+
n("section", nn, [
|
1069
|
+
an,
|
1070
|
+
n("ul", null, [
|
1071
|
+
_.department.subdepartments.length < 1 ? (o(), r("li", on, "В отделе еще нет подотделов")) : g("", !0),
|
1072
|
+
(o(!0), r(O, null, L(_.department.subdepartments, (p, l) => (o(), $(De, {
|
1073
|
+
onClick: (u) => d.$router.push(`/app/organization/departments/${p._id}`),
|
1074
|
+
key: l,
|
1075
|
+
class: "br-b br-solid br-grey",
|
1076
|
+
department: p
|
1077
|
+
}, null, 8, ["onClick", "department"]))), 128))
|
1078
|
+
])
|
1079
|
+
])
|
1080
|
+
])
|
1081
|
+
]));
|
1082
|
+
}
|
1083
|
+
}, rn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
1084
|
+
__proto__: null,
|
1085
|
+
default: ln
|
1086
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
1087
|
+
const dn = { class: "for-transition bg-white radius-big w-100" }, cn = { class: "flex-v-center flex-nowrap flex pd-semi" }, un = /* @__PURE__ */ n("h2", { class: "mn-r-medium" }, "Organizations", -1), pn = { class: "pd-semi" }, mn = {
|
1088
|
+
key: 1,
|
1089
|
+
class: "cols-3"
|
1090
|
+
}, hn = ["onClick"], _n = ["src"], fn = {
|
1091
|
+
key: 1,
|
1092
|
+
class: "radius-medium mn-small i-thin",
|
1093
|
+
width: "42",
|
1094
|
+
height: "42",
|
1095
|
+
viewBox: "0 0 42 42",
|
1096
|
+
fill: "none",
|
1097
|
+
xmlns: "http://www.w3.org/2000/svg"
|
1098
|
+
}, gn = /* @__PURE__ */ n("circle", {
|
1099
|
+
fill: "rgb(var(--main))",
|
1100
|
+
cx: "21",
|
1101
|
+
cy: "21",
|
1102
|
+
r: "21"
|
1103
|
+
}, null, -1), bn = /* @__PURE__ */ n("path", {
|
1104
|
+
fill: "#242424",
|
1105
|
+
"fill-opacity": "0.1",
|
1106
|
+
"fill-rule": "evenodd",
|
1107
|
+
"clip-rule": "evenodd",
|
1108
|
+
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"
|
1109
|
+
}, null, -1), vn = [
|
1110
|
+
gn,
|
1111
|
+
bn
|
1112
|
+
], yn = { class: "h4 mn-r-semi mn-small" }, wn = ["onClick"], $n = /* @__PURE__ */ n("path", {
|
1113
|
+
fill: "black",
|
1114
|
+
d: "M6.41357 11.979C9.6831 11.979 12.3901 9.26611 12.3901 6.00244C12.3901 2.73291 9.67724 0.0258789 6.40771 0.0258789C3.14404 0.0258789 0.437008 2.73291 0.437008 6.00244C0.437008 9.26611 3.1499 11.979 6.41357 11.979ZM6.41357 10.9829C3.64795 10.9829 1.43896 8.76807 1.43896 6.00244C1.43896 3.23682 3.64209 1.02197 6.40771 1.02197C9.17334 1.02197 11.3882 3.23682 11.394 6.00244C11.3999 8.76807 9.1792 10.9829 6.41357 10.9829ZM8.72802 4.36182L9.1499 3.93408C9.3374 3.74072 9.35498 3.52979 9.1792 3.34814L9.04443 3.21924C8.86865 3.0376 8.65185 3.06104 8.46435 3.24854L8.03662 3.67041L8.72802 4.36182ZM4.53271 8.53955L8.37646 4.71338L7.68505 4.02197L3.84716 7.84814L3.51318 8.62158C3.45459 8.76807 3.59521 8.89697 3.72412 8.8501L4.53271 8.53955Z"
|
1115
|
+
}, null, -1), Cn = [
|
1116
|
+
$n
|
1117
|
+
], kn = { class: "t-black p-small" }, ki = {
|
1118
|
+
__name: "OrganizationsAccount",
|
1119
|
+
async setup(e) {
|
1120
|
+
let t, s;
|
1121
|
+
S.user._id && ([t, s] = Y(() => Z.read({ owner: S.user._id })), await t, s());
|
1122
|
+
const a = q(), d = F();
|
1123
|
+
let c = d.query.tab ? d.query.tab : "details";
|
1124
|
+
const p = v(c);
|
1125
|
+
return d.query.tab = p.value, E(p, (l) => {
|
1126
|
+
a.push({ query: { ...d.query, tab: l } });
|
1127
|
+
}), (l, u) => (o(), r("div", dn, [
|
1128
|
+
n("header", cn, [
|
1129
|
+
un,
|
1130
|
+
n("button", {
|
1131
|
+
onClick: u[0] || (u[0] = (i) => l.$router.push({ name: "Create Organization" })),
|
1132
|
+
class: "radius-100p i-semi hover-scale-1 cursor-pointer t-white bg-second"
|
1133
|
+
}, "+")
|
1134
|
+
]),
|
1135
|
+
n("div", pn, [
|
1136
|
+
b.all.length < 1 ? (o(), $(fe, {
|
1137
|
+
key: 0,
|
1138
|
+
title: "You Haven't Joined Any Organization Yet",
|
1139
|
+
description: "Weeder is all about community. Join an organization or maybe you want to create your own?",
|
1140
|
+
action: "Create organization",
|
1141
|
+
callback: l.a = () => l.$router.push("/app/organization/create/details")
|
1142
|
+
}, null, 8, ["callback"])) : (o(), r("div", mn, [
|
1143
|
+
(o(!0), r(O, null, L(b.all, (i) => (o(), r("div", {
|
1144
|
+
key: i._id,
|
1145
|
+
class: "mn-small radius-medium pd-medium br-2px br-solid br-grey",
|
1146
|
+
onClick: (m) => l.$router.push({ name: "Organization", params: { _id: i._id } })
|
1147
|
+
}, [
|
1148
|
+
i.profile.photo.length > 0 ? (o(), r("img", {
|
1149
|
+
key: 0,
|
1150
|
+
src: i.profile.photo,
|
1151
|
+
class: "radius-medium mn-small i-thin"
|
1152
|
+
}, null, 8, _n)) : (o(), r("svg", fn, vn)),
|
1153
|
+
n("p", yn, f(i.profile.name), 1),
|
1154
|
+
(o(), r("svg", {
|
1155
|
+
onClick: re((m) => l.$router.push({ name: "Organization Edit", params: { _id: i._id } }), ["stop"]),
|
1156
|
+
class: "t-transp hover-scale-1 z-index-1 pos-absolute pos-t-regular pos-r-regular i-medium",
|
1157
|
+
width: "13",
|
1158
|
+
height: "12",
|
1159
|
+
viewBox: "0 0 13 12",
|
1160
|
+
xmlns: "http://www.w3.org/2000/svg"
|
1161
|
+
}, Cn, 8, wn)),
|
1162
|
+
n("p", kn, f(i.profile.description.slice(0, 120) + "..."), 1)
|
1163
|
+
], 8, hn))), 128))
|
1164
|
+
]))
|
1165
|
+
])
|
1166
|
+
]));
|
1167
|
+
}
|
1168
|
+
}, xn = { class: "for-transition pd-thin" }, On = /* @__PURE__ */ n("h3", { class: "mn-small" }, "Type of group", -1), Ln = /* @__PURE__ */ n("p", { class: "mn-thin" }, "Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.", -1), Sn = /* @__PURE__ */ n("h3", { class: "mn-small" }, "Profile", -1), Pn = { class: "mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex" }, zn = /* @__PURE__ */ n("h4", null, "Upload photo", -1), Mn = /* @__PURE__ */ n("h3", { class: "mn-small" }, "Socials", -1), Dn = /* @__PURE__ */ n("p", { class: "mn-thin" }, "Please provide only the username for social media profiles, without full links.", -1), An = {
|
1169
|
+
__name: "OrganizationEdit",
|
1170
|
+
async setup(e) {
|
1171
|
+
let t, s;
|
1172
|
+
const a = F(), d = q();
|
1173
|
+
Z.reset(), a.params._id && ([t, s] = Y(() => Z.read({ _id: a.params._id })), await t, s());
|
1174
|
+
const c = H(() => b.current);
|
1175
|
+
async function p() {
|
1176
|
+
a.params._id ? await Z.update(a.params._id, c.value) : await Z.create(b.current, S.user._id);
|
1177
|
+
}
|
1178
|
+
function l() {
|
1179
|
+
d.replace({ name: "Organization", params: { _id: b.current._id } });
|
1180
|
+
}
|
1181
|
+
return (u, i) => (o(), r("div", xn, [
|
1182
|
+
On,
|
1183
|
+
Ln,
|
1184
|
+
h(Te, {
|
1185
|
+
modelValue: b.current.types,
|
1186
|
+
"onUpdate:modelValue": i[0] || (i[0] = (m) => b.current.types = m),
|
1187
|
+
options: ["public", "exclusive", "hidden"],
|
1188
|
+
multiple: !1,
|
1189
|
+
taggable: !1,
|
1190
|
+
placeholder: "Type to search or add type of organization",
|
1191
|
+
class: "mn-semi bg-grey pd-medium radius-small"
|
1192
|
+
}, null, 8, ["modelValue"]),
|
1193
|
+
Sn,
|
1194
|
+
n("div", Pn, [
|
1195
|
+
h(ze, {
|
1196
|
+
photo: b.current.profile.photo,
|
1197
|
+
"onUpdate:photo": i[1] || (i[1] = (m) => b.current.profile.photo = m),
|
1198
|
+
uploadPath: "organizations/" + b.current._id + "/avatars",
|
1199
|
+
class: "h-4r w-4r aspect-1x1 o-hidden mn-thin radius-extra"
|
1200
|
+
}, null, 8, ["photo", "uploadPath"]),
|
1201
|
+
zn
|
1202
|
+
]),
|
1203
|
+
h(D, {
|
1204
|
+
field: b.current.profile.name,
|
1205
|
+
"onUpdate:field": i[2] || (i[2] = (m) => b.current.profile.name = m),
|
1206
|
+
placeholder: "Name of organization",
|
1207
|
+
class: "mn-thin bg-grey pd-medium radius-small"
|
1208
|
+
}, null, 8, ["field"]),
|
1209
|
+
h(D, {
|
1210
|
+
field: b.current.profile.description,
|
1211
|
+
"onUpdate:field": i[3] || (i[3] = (m) => b.current.profile.description = m),
|
1212
|
+
placeholder: "Brief description of your group",
|
1213
|
+
class: "mn-thin bg-grey pd-medium radius-small"
|
1214
|
+
}, null, 8, ["field"]),
|
1215
|
+
h(Ee, {
|
1216
|
+
onTagsChanged: i[4] || (i[4] = (m) => b.current.profile.tags = m),
|
1217
|
+
tags: b.current.profile.tags
|
1218
|
+
}, null, 8, ["tags"]),
|
1219
|
+
Mn,
|
1220
|
+
Dn,
|
1221
|
+
h(D, {
|
1222
|
+
field: b.current.socials.instagram,
|
1223
|
+
"onUpdate:field": i[5] || (i[5] = (m) => b.current.socials.instagram = m),
|
1224
|
+
label: "Instagram",
|
1225
|
+
placeholder: "",
|
1226
|
+
class: "mn-thin bg-grey pd-medium radius-small"
|
1227
|
+
}, null, 8, ["field"]),
|
1228
|
+
h(D, {
|
1229
|
+
field: b.current.socials.twitter,
|
1230
|
+
"onUpdate:field": i[6] || (i[6] = (m) => b.current.socials.twitter = m),
|
1231
|
+
label: "Twitter",
|
1232
|
+
placeholder: "",
|
1233
|
+
class: "mn-thin bg-grey pd-medium radius-small"
|
1234
|
+
}, null, 8, ["field"]),
|
1235
|
+
h(D, {
|
1236
|
+
field: b.current.socials.facebook,
|
1237
|
+
"onUpdate:field": i[7] || (i[7] = (m) => b.current.socials.facebook = m),
|
1238
|
+
label: "Facebook",
|
1239
|
+
placeholder: "",
|
1240
|
+
class: "mn-thin bg-grey pd-medium radius-small"
|
1241
|
+
}, null, 8, ["field"]),
|
1242
|
+
h(D, {
|
1243
|
+
field: b.current.socials.telegram,
|
1244
|
+
"onUpdate:field": i[8] || (i[8] = (m) => b.current.socials.telegram = m),
|
1245
|
+
label: "Telegram",
|
1246
|
+
placeholder: "",
|
1247
|
+
class: "mn-thin bg-grey pd-medium radius-small"
|
1248
|
+
}, null, 8, ["field"]),
|
1249
|
+
h(ce, {
|
1250
|
+
submit: p,
|
1251
|
+
callback: l,
|
1252
|
+
class: "mn-thin"
|
1253
|
+
}, {
|
1254
|
+
default: x(() => [
|
1255
|
+
W("Save")
|
1256
|
+
]),
|
1257
|
+
_: 1
|
1258
|
+
})
|
1259
|
+
]));
|
1260
|
+
}
|
1261
|
+
}, Ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
1262
|
+
__proto__: null,
|
1263
|
+
default: An
|
1264
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
1265
|
+
const Vn = { class: "for-transition bg-white radius-big w-100" }, In = /* @__PURE__ */ n("header", { class: "flex-v-center flex-nowrap flex pd-semi" }, [
|
1266
|
+
/* @__PURE__ */ n("h2", { class: "mn-r-medium" }, "Weed dispensaries in Thailand")
|
1267
|
+
], -1), Bn = { class: "pd-semi" }, jn = {
|
1268
|
+
key: 1,
|
1269
|
+
class: "cols-3"
|
1270
|
+
}, Un = ["onClick"], Tn = ["src"], En = {
|
1271
|
+
key: 1,
|
1272
|
+
class: "radius-medium mn-small i-thin",
|
1273
|
+
width: "42",
|
1274
|
+
height: "42",
|
1275
|
+
viewBox: "0 0 42 42",
|
1276
|
+
fill: "none",
|
1277
|
+
xmlns: "http://www.w3.org/2000/svg"
|
1278
|
+
}, Fn = /* @__PURE__ */ n("circle", {
|
1279
|
+
fill: "rgb(var(--main))",
|
1280
|
+
cx: "21",
|
1281
|
+
cy: "21",
|
1282
|
+
r: "21"
|
1283
|
+
}, null, -1), qn = /* @__PURE__ */ n("path", {
|
1284
|
+
fill: "#242424",
|
1285
|
+
"fill-opacity": "0.1",
|
1286
|
+
"fill-rule": "evenodd",
|
1287
|
+
"clip-rule": "evenodd",
|
1288
|
+
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"
|
1289
|
+
}, null, -1), Zn = [
|
1290
|
+
Fn,
|
1291
|
+
qn
|
1292
|
+
], Hn = { class: "h4 mn-r-semi mn-small" }, Nn = ["onClick"], Rn = /* @__PURE__ */ n("path", {
|
1293
|
+
fill: "black",
|
1294
|
+
d: "M6.41357 11.979C9.6831 11.979 12.3901 9.26611 12.3901 6.00244C12.3901 2.73291 9.67724 0.0258789 6.40771 0.0258789C3.14404 0.0258789 0.437008 2.73291 0.437008 6.00244C0.437008 9.26611 3.1499 11.979 6.41357 11.979ZM6.41357 10.9829C3.64795 10.9829 1.43896 8.76807 1.43896 6.00244C1.43896 3.23682 3.64209 1.02197 6.40771 1.02197C9.17334 1.02197 11.3882 3.23682 11.394 6.00244C11.3999 8.76807 9.1792 10.9829 6.41357 10.9829ZM8.72802 4.36182L9.1499 3.93408C9.3374 3.74072 9.35498 3.52979 9.1792 3.34814L9.04443 3.21924C8.86865 3.0376 8.65185 3.06104 8.46435 3.24854L8.03662 3.67041L8.72802 4.36182ZM4.53271 8.53955L8.37646 4.71338L7.68505 4.02197L3.84716 7.84814L3.51318 8.62158C3.45459 8.76807 3.59521 8.89697 3.72412 8.8501L4.53271 8.53955Z"
|
1295
|
+
}, null, -1), Kn = [
|
1296
|
+
Rn
|
1297
|
+
], Wn = { class: "t-black p-small" }, xi = {
|
1298
|
+
__name: "Organizations",
|
1299
|
+
async setup(e) {
|
1300
|
+
let t, s;
|
1301
|
+
S.user._id && ([t, s] = Y(() => Z.read({ owner: S.user._id })), await t, s());
|
1302
|
+
const a = q(), d = F();
|
1303
|
+
let c = d.query.tab ? d.query.tab : "details";
|
1304
|
+
const p = v(c);
|
1305
|
+
return d.query.tab = p.value, E(p, (l) => {
|
1306
|
+
a.push({ query: { ...d.query, tab: l } });
|
1307
|
+
}), (l, u) => (o(), r("div", Vn, [
|
1308
|
+
In,
|
1309
|
+
n("div", Bn, [
|
1310
|
+
b.all.length < 1 ? (o(), $(fe, {
|
1311
|
+
key: 0,
|
1312
|
+
title: "You Haven't Joined Any Organization Yet",
|
1313
|
+
description: "Weeder is all about community. Join an organization or maybe you want to create your own?",
|
1314
|
+
action: "Create organization",
|
1315
|
+
callback: l.a = () => l.$router.push("/app/organization/create/details")
|
1316
|
+
}, null, 8, ["callback"])) : (o(), r("div", jn, [
|
1317
|
+
(o(!0), r(O, null, L(b.all, (i) => (o(), r("div", {
|
1318
|
+
key: i._id,
|
1319
|
+
class: "mn-small radius-medium pd-medium br-2px br-solid br-grey",
|
1320
|
+
onClick: (m) => l.$router.push({ name: "Organization", params: { _id: i._id } })
|
1321
|
+
}, [
|
1322
|
+
i.profile.photo.length > 0 ? (o(), r("img", {
|
1323
|
+
key: 0,
|
1324
|
+
src: i.profile.photo,
|
1325
|
+
class: "radius-medium mn-small i-thin"
|
1326
|
+
}, null, 8, Tn)) : (o(), r("svg", En, Zn)),
|
1327
|
+
n("p", Hn, f(i.profile.name), 1),
|
1328
|
+
(o(), r("svg", {
|
1329
|
+
onClick: re((m) => l.$router.push({ name: "Organization Edit", params: { _id: i._id } }), ["stop"]),
|
1330
|
+
class: "t-transp hover-scale-1 z-index-1 pos-absolute pos-t-regular pos-r-regular i-medium",
|
1331
|
+
width: "13",
|
1332
|
+
height: "12",
|
1333
|
+
viewBox: "0 0 13 12",
|
1334
|
+
xmlns: "http://www.w3.org/2000/svg"
|
1335
|
+
}, Kn, 8, Nn)),
|
1336
|
+
n("p", Wn, f(i.profile.description.slice(0, 120) + "..."), 1)
|
1337
|
+
], 8, Un))), 128))
|
1338
|
+
]))
|
1339
|
+
])
|
1340
|
+
]));
|
1341
|
+
}
|
1342
|
+
};
|
1343
|
+
const Yn = {
|
1344
|
+
key: 0,
|
1345
|
+
class: "t-transp mn-r-small"
|
1346
|
+
}, Jn = ["placeholder", "value"], Qn = {
|
1347
|
+
key: 0,
|
1348
|
+
class: "mn-t-thin invalid-feedback"
|
1349
|
+
}, Xn = {
|
1350
|
+
__name: "Address",
|
1351
|
+
props: {
|
1352
|
+
apiKey: {
|
1353
|
+
type: String,
|
1354
|
+
required: !0
|
1355
|
+
},
|
1356
|
+
label: null,
|
1357
|
+
placeholder: "Enter something here",
|
1358
|
+
field: null,
|
1359
|
+
location: {
|
1360
|
+
type: Object,
|
1361
|
+
default: { lat: 48.6900735, lng: 41.1620239 }
|
1362
|
+
},
|
1363
|
+
address: {
|
1364
|
+
type: String,
|
1365
|
+
default: ""
|
1366
|
+
}
|
1367
|
+
},
|
1368
|
+
emits: ["update:address", "update:location", "update:country", "update:state", "update:city"],
|
1369
|
+
setup(e, { emit: t }) {
|
1370
|
+
const s = e, a = v(null);
|
1371
|
+
let d;
|
1372
|
+
const c = () => {
|
1373
|
+
d = new google.maps.places.Autocomplete(a.value), d.addListener("place_changed", l);
|
1374
|
+
}, p = () => {
|
1375
|
+
d || c();
|
1376
|
+
}, l = () => {
|
1377
|
+
const u = d.getPlace();
|
1378
|
+
if (!u.geometry || !u.address_components)
|
1379
|
+
return;
|
1380
|
+
let i = "", m = "", w = "";
|
1381
|
+
for (let R = 0; R < u.address_components.length; R++) {
|
1382
|
+
console.log(u.address_components);
|
1383
|
+
let M = u.address_components[R];
|
1384
|
+
M.types.includes("country") && (i = M.long_name), M.types.includes("administrative_area_level_1") && (m = M.long_name), M.types.includes("locality") && (w = M.long_name);
|
1385
|
+
}
|
1386
|
+
const P = u.formatted_address, I = { lat: u.geometry.location.lat(), lng: u.geometry.location.lng() };
|
1387
|
+
t("update:address", P), t("update:location", I), t("update:country", i), t("update:state", m), t("update:city", w);
|
1388
|
+
};
|
1389
|
+
return de(() => {
|
1390
|
+
s.address !== a.value && (a.value = s.address);
|
1391
|
+
}), pe(() => {
|
1392
|
+
c();
|
1393
|
+
}), (u, i) => (o(), r("div", {
|
1394
|
+
class: te([u.$attrs.class, "flex-nowrap flex"])
|
1395
|
+
}, [
|
1396
|
+
e.label ? (o(), r("div", Yn, [
|
1397
|
+
n("span", null, f(e.label), 1)
|
1398
|
+
])) : g("", !0),
|
1399
|
+
n("input", {
|
1400
|
+
ref_key: "addressInput",
|
1401
|
+
ref: a,
|
1402
|
+
class: "w-100",
|
1403
|
+
placeholder: e.placeholder,
|
1404
|
+
value: e.address,
|
1405
|
+
onInput: p
|
1406
|
+
}, null, 40, Jn),
|
1407
|
+
h(N, {
|
1408
|
+
mode: "out-in",
|
1409
|
+
name: "fade"
|
1410
|
+
}, {
|
1411
|
+
default: x(() => [
|
1412
|
+
u.validation ? (o(), r("div", Qn, " * " + f(u.validation.message), 1)) : g("", !0)
|
1413
|
+
]),
|
1414
|
+
_: 1
|
1415
|
+
})
|
1416
|
+
], 2));
|
1417
|
+
}
|
1418
|
+
}, Gn = /* @__PURE__ */ A(Xn, [["__scopeId", "data-v-faece1a6"]]);
|
1419
|
+
const ea = (e) => (me("data-v-1c7971e5"), e = e(), he(), e), ta = { class: "map-container" }, sa = /* @__PURE__ */ ea(() => /* @__PURE__ */ n("svg", {
|
1420
|
+
class: "i-medium",
|
1421
|
+
width: "98",
|
1422
|
+
height: "98",
|
1423
|
+
viewBox: "0 0 98 98",
|
1424
|
+
fill: "none",
|
1425
|
+
xmlns: "http://www.w3.org/2000/svg"
|
1426
|
+
}, [
|
1427
|
+
/* @__PURE__ */ n("path", {
|
1428
|
+
d: "M50.0004 31.4995C39.7996 31.4995 31.5 39.7991 31.5 49.9999C31.5 60.2007 39.7996 68.5003 50.0004 68.5003C60.2012 68.5003 68.5008 60.2007 68.5008 49.9999C68.5008 39.7991 60.2012 31.4995 50.0004 31.4995ZM50.0004 63.7944C42.3941 63.7944 36.2059 57.6062 36.2059 49.9999C36.2059 42.3936 42.3941 36.2054 50.0004 36.2054C57.6067 36.2054 63.7949 42.3936 63.7949 49.9999C63.7949 57.6062 57.6067 63.7944 50.0004 63.7944Z",
|
1429
|
+
fill: "white"
|
1430
|
+
}),
|
1431
|
+
/* @__PURE__ */ n("path", {
|
1432
|
+
d: "M97.6471 47.6471H84.56C83.3977 30.4141 69.5859 16.6024 52.3529 15.44V2.35294C52.3529 1.05255 51.2988 0 50 0C48.6996 0 47.6471 1.05255 47.6471 2.35294V15.44C30.4141 16.6024 16.6024 30.4141 15.44 47.6471H2.35294C1.05255 47.6471 0 48.6996 0 50C0 51.2988 1.05255 52.3529 2.35294 52.3529H15.44C16.6024 69.5859 30.4141 83.3977 47.6471 84.56V97.6471C47.6471 98.9459 48.6996 100 50 100C51.2988 100 52.3529 98.9459 52.3529 97.6471V84.56C69.5859 83.3977 83.3977 69.5859 84.56 52.3529H97.6471C98.9459 52.3529 100 51.2988 100 50C100 48.6996 98.9459 47.6471 97.6471 47.6471ZM50 79.9435C33.4886 79.9435 20.0565 66.5114 20.0565 50C20.0565 33.4886 33.4886 20.0565 50 20.0565C66.5098 20.0565 79.9435 33.4886 79.9435 50C79.9435 66.5098 66.5098 79.9435 50 79.9435Z",
|
1433
|
+
fill: "white"
|
1434
|
+
})
|
1435
|
+
], -1)), na = [
|
1436
|
+
sa
|
1437
|
+
], aa = {
|
1438
|
+
__name: "LocationMarker",
|
1439
|
+
props: {
|
1440
|
+
location: {
|
1441
|
+
type: Object,
|
1442
|
+
default: { lat: 48.6900735, lng: 41.1620239 }
|
1443
|
+
},
|
1444
|
+
address: {
|
1445
|
+
type: String,
|
1446
|
+
default: ""
|
1447
|
+
},
|
1448
|
+
apiKey: String
|
1449
|
+
},
|
1450
|
+
emits: ["update:location", "update:address", "update:country", "update:state", "update:city"],
|
1451
|
+
setup(e, { emit: t }) {
|
1452
|
+
const s = e, a = v(null);
|
1453
|
+
let d, c;
|
1454
|
+
pe(() => {
|
1455
|
+
d = new google.maps.Map(a.value, {
|
1456
|
+
center: s.location,
|
1457
|
+
zoom: 15,
|
1458
|
+
mapTypeControl: !1,
|
1459
|
+
fullscreenControl: !1
|
1460
|
+
}), c = new google.maps.Marker({
|
1461
|
+
position: s.location,
|
1462
|
+
map: d,
|
1463
|
+
draggable: !0
|
1464
|
+
}), c.addListener("dragend", (u) => {
|
1465
|
+
const i = { lat: u.latLng.lat(), lng: u.latLng.lng() };
|
1466
|
+
t("update:location", i), p(i);
|
1467
|
+
});
|
1468
|
+
}), de(() => {
|
1469
|
+
s.location && c && c.setPosition(new google.maps.LatLng(s.location.lat, s.location.lng));
|
1470
|
+
}), de(() => {
|
1471
|
+
if (s.location && d) {
|
1472
|
+
const u = new google.maps.LatLng(s.location.lat, s.location.lng);
|
1473
|
+
d.setCenter(u);
|
1474
|
+
}
|
1475
|
+
});
|
1476
|
+
function p(u) {
|
1477
|
+
new google.maps.Geocoder().geocode({ location: u }, (m, w) => {
|
1478
|
+
if (w === "OK")
|
1479
|
+
if (m[0]) {
|
1480
|
+
t("update:address", m[0].formatted_address);
|
1481
|
+
let P = "", I = "", R = "";
|
1482
|
+
m[0].address_components.forEach((M) => {
|
1483
|
+
M.types.includes("country") && (P = M.long_name), M.types.includes("administrative_area_level_1") && (I = M.long_name), M.types.includes("locality") && (R = M.long_name);
|
1484
|
+
}), t("update:country", P), t("update:state", I), t("update:city", R);
|
1485
|
+
} else
|
1486
|
+
console.error("No results found");
|
1487
|
+
else
|
1488
|
+
console.error("Geocoder failed due to: " + w);
|
1489
|
+
});
|
1490
|
+
}
|
1491
|
+
async function l() {
|
1492
|
+
navigator.geolocation ? navigator.geolocation.getCurrentPosition((u) => {
|
1493
|
+
const i = { lat: u.coords.latitude, lng: u.coords.longitude };
|
1494
|
+
t("update:location", i), p(i);
|
1495
|
+
}, () => {
|
1496
|
+
console.error("Error getting location");
|
1497
|
+
}) : console.error("Geolocation is not supported by this browser.");
|
1498
|
+
}
|
1499
|
+
return (u, i) => (o(), r("div", ta, [
|
1500
|
+
n("div", {
|
1501
|
+
ref_key: "mapContainer",
|
1502
|
+
ref: a,
|
1503
|
+
class: "w-100 h-100"
|
1504
|
+
}, null, 512),
|
1505
|
+
n("button", {
|
1506
|
+
class: "pos-absolute pos-t-regular pos-r-regular i-semi bg-second radius-extra",
|
1507
|
+
onClick: l
|
1508
|
+
}, na)
|
1509
|
+
]));
|
1510
|
+
}
|
1511
|
+
}, oa = /* @__PURE__ */ A(aa, [["__scopeId", "data-v-1c7971e5"]]);
|
1512
|
+
var ia = Object.defineProperty, la = Object.defineProperties, ra = Object.getOwnPropertyDescriptors, ke = Object.getOwnPropertySymbols, da = Object.prototype.hasOwnProperty, ca = Object.prototype.propertyIsEnumerable, xe = (e, t, s) => t in e ? ia(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s, X = (e, t) => {
|
1513
|
+
for (var s in t || (t = {}))
|
1514
|
+
da.call(t, s) && xe(e, s, t[s]);
|
1515
|
+
if (ke)
|
1516
|
+
for (var s of ke(t))
|
1517
|
+
ca.call(t, s) && xe(e, s, t[s]);
|
1518
|
+
return e;
|
1519
|
+
}, Oe = (e, t) => la(e, ra(t));
|
1520
|
+
const ua = {
|
1521
|
+
props: {
|
1522
|
+
autoscroll: {
|
1523
|
+
type: Boolean,
|
1524
|
+
default: !0
|
1525
|
+
}
|
1526
|
+
},
|
1527
|
+
watch: {
|
1528
|
+
typeAheadPointer() {
|
1529
|
+
this.autoscroll && this.maybeAdjustScroll();
|
1530
|
+
},
|
1531
|
+
open(e) {
|
1532
|
+
this.autoscroll && e && this.$nextTick(() => this.maybeAdjustScroll());
|
1533
|
+
}
|
1534
|
+
},
|
1535
|
+
methods: {
|
1536
|
+
maybeAdjustScroll() {
|
1537
|
+
var e;
|
1538
|
+
const t = ((e = this.$refs.dropdownMenu) == null ? void 0 : e.children[this.typeAheadPointer]) || !1;
|
1539
|
+
if (t) {
|
1540
|
+
const s = this.getDropdownViewport(), { top: a, bottom: d, height: c } = t.getBoundingClientRect();
|
1541
|
+
if (a < s.top)
|
1542
|
+
return this.$refs.dropdownMenu.scrollTop = t.offsetTop;
|
1543
|
+
if (d > s.bottom)
|
1544
|
+
return this.$refs.dropdownMenu.scrollTop = t.offsetTop - (s.height - c);
|
1545
|
+
}
|
1546
|
+
},
|
1547
|
+
getDropdownViewport() {
|
1548
|
+
return this.$refs.dropdownMenu ? this.$refs.dropdownMenu.getBoundingClientRect() : {
|
1549
|
+
height: 0,
|
1550
|
+
top: 0,
|
1551
|
+
bottom: 0
|
1552
|
+
};
|
1553
|
+
}
|
1554
|
+
}
|
1555
|
+
}, pa = {
|
1556
|
+
data() {
|
1557
|
+
return {
|
1558
|
+
typeAheadPointer: -1
|
1559
|
+
};
|
1560
|
+
},
|
1561
|
+
watch: {
|
1562
|
+
filteredOptions() {
|
1563
|
+
for (let e = 0; e < this.filteredOptions.length; e++)
|
1564
|
+
if (this.selectable(this.filteredOptions[e])) {
|
1565
|
+
this.typeAheadPointer = e;
|
1566
|
+
break;
|
1567
|
+
}
|
1568
|
+
},
|
1569
|
+
open(e) {
|
1570
|
+
e && this.typeAheadToLastSelected();
|
1571
|
+
},
|
1572
|
+
selectedValue() {
|
1573
|
+
this.open && this.typeAheadToLastSelected();
|
1574
|
+
}
|
1575
|
+
},
|
1576
|
+
methods: {
|
1577
|
+
typeAheadUp() {
|
1578
|
+
for (let e = this.typeAheadPointer - 1; e >= 0; e--)
|
1579
|
+
if (this.selectable(this.filteredOptions[e])) {
|
1580
|
+
this.typeAheadPointer = e;
|
1581
|
+
break;
|
1582
|
+
}
|
1583
|
+
},
|
1584
|
+
typeAheadDown() {
|
1585
|
+
for (let e = this.typeAheadPointer + 1; e < this.filteredOptions.length; e++)
|
1586
|
+
if (this.selectable(this.filteredOptions[e])) {
|
1587
|
+
this.typeAheadPointer = e;
|
1588
|
+
break;
|
1589
|
+
}
|
1590
|
+
},
|
1591
|
+
typeAheadSelect() {
|
1592
|
+
const e = this.filteredOptions[this.typeAheadPointer];
|
1593
|
+
e && this.selectable(e) && this.select(e);
|
1594
|
+
},
|
1595
|
+
typeAheadToLastSelected() {
|
1596
|
+
this.typeAheadPointer = this.selectedValue.length !== 0 ? this.filteredOptions.indexOf(this.selectedValue[this.selectedValue.length - 1]) : -1;
|
1597
|
+
}
|
1598
|
+
}
|
1599
|
+
}, ma = {
|
1600
|
+
props: {
|
1601
|
+
loading: {
|
1602
|
+
type: Boolean,
|
1603
|
+
default: !1
|
1604
|
+
}
|
1605
|
+
},
|
1606
|
+
data() {
|
1607
|
+
return {
|
1608
|
+
mutableLoading: !1
|
1609
|
+
};
|
1610
|
+
},
|
1611
|
+
watch: {
|
1612
|
+
search() {
|
1613
|
+
this.$emit("search", this.search, this.toggleLoading);
|
1614
|
+
},
|
1615
|
+
loading(e) {
|
1616
|
+
this.mutableLoading = e;
|
1617
|
+
}
|
1618
|
+
},
|
1619
|
+
methods: {
|
1620
|
+
toggleLoading(e = null) {
|
1621
|
+
return e == null ? this.mutableLoading = !this.mutableLoading : this.mutableLoading = e;
|
1622
|
+
}
|
1623
|
+
}
|
1624
|
+
}, be = (e, t) => {
|
1625
|
+
const s = e.__vccOpts || e;
|
1626
|
+
for (const [a, d] of t)
|
1627
|
+
s[a] = d;
|
1628
|
+
return s;
|
1629
|
+
}, ha = {}, _a = {
|
1630
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1631
|
+
width: "10",
|
1632
|
+
height: "10"
|
1633
|
+
}, fa = /* @__PURE__ */ n("path", { d: "M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z" }, null, -1), ga = [
|
1634
|
+
fa
|
1635
|
+
];
|
1636
|
+
function ba(e, t) {
|
1637
|
+
return o(), r("svg", _a, ga);
|
1638
|
+
}
|
1639
|
+
const va = /* @__PURE__ */ be(ha, [["render", ba]]), ya = {}, wa = {
|
1640
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1641
|
+
width: "14",
|
1642
|
+
height: "10"
|
1643
|
+
}, $a = /* @__PURE__ */ n("path", { d: "M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z" }, null, -1), Ca = [
|
1644
|
+
$a
|
1645
|
+
];
|
1646
|
+
function ka(e, t) {
|
1647
|
+
return o(), r("svg", wa, Ca);
|
1648
|
+
}
|
1649
|
+
const xa = /* @__PURE__ */ be(ya, [["render", ka]]), Le = {
|
1650
|
+
Deselect: va,
|
1651
|
+
OpenIndicator: xa
|
1652
|
+
}, Oa = {
|
1653
|
+
mounted(e, { instance: t }) {
|
1654
|
+
if (t.appendToBody) {
|
1655
|
+
const {
|
1656
|
+
height: s,
|
1657
|
+
top: a,
|
1658
|
+
left: d,
|
1659
|
+
width: c
|
1660
|
+
} = t.$refs.toggle.getBoundingClientRect();
|
1661
|
+
let p = window.scrollX || window.pageXOffset, l = window.scrollY || window.pageYOffset;
|
1662
|
+
e.unbindPosition = t.calculatePosition(e, t, {
|
1663
|
+
width: c + "px",
|
1664
|
+
left: p + d + "px",
|
1665
|
+
top: l + a + s + "px"
|
1666
|
+
}), document.body.appendChild(e);
|
1667
|
+
}
|
1668
|
+
},
|
1669
|
+
unmounted(e, { instance: t }) {
|
1670
|
+
t.appendToBody && (e.unbindPosition && typeof e.unbindPosition == "function" && e.unbindPosition(), e.parentNode && e.parentNode.removeChild(e));
|
1671
|
+
}
|
1672
|
+
};
|
1673
|
+
function La(e) {
|
1674
|
+
const t = {};
|
1675
|
+
return Object.keys(e).sort().forEach((s) => {
|
1676
|
+
t[s] = e[s];
|
1677
|
+
}), JSON.stringify(t);
|
1678
|
+
}
|
1679
|
+
let Sa = 0;
|
1680
|
+
function Pa() {
|
1681
|
+
return ++Sa;
|
1682
|
+
}
|
1683
|
+
const za = {
|
1684
|
+
components: X({}, Le),
|
1685
|
+
directives: { appendToBody: Oa },
|
1686
|
+
mixins: [ua, pa, ma],
|
1687
|
+
compatConfig: {
|
1688
|
+
MODE: 3
|
1689
|
+
},
|
1690
|
+
emits: [
|
1691
|
+
"open",
|
1692
|
+
"close",
|
1693
|
+
"update:modelValue",
|
1694
|
+
"search",
|
1695
|
+
"search:compositionstart",
|
1696
|
+
"search:compositionend",
|
1697
|
+
"search:keydown",
|
1698
|
+
"search:blur",
|
1699
|
+
"search:focus",
|
1700
|
+
"search:input",
|
1701
|
+
"option:created",
|
1702
|
+
"option:selecting",
|
1703
|
+
"option:selected",
|
1704
|
+
"option:deselecting",
|
1705
|
+
"option:deselected"
|
1706
|
+
],
|
1707
|
+
props: {
|
1708
|
+
modelValue: {},
|
1709
|
+
components: {
|
1710
|
+
type: Object,
|
1711
|
+
default: () => ({})
|
1712
|
+
},
|
1713
|
+
options: {
|
1714
|
+
type: Array,
|
1715
|
+
default() {
|
1716
|
+
return [];
|
1717
|
+
}
|
1718
|
+
},
|
1719
|
+
disabled: {
|
1720
|
+
type: Boolean,
|
1721
|
+
default: !1
|
1722
|
+
},
|
1723
|
+
clearable: {
|
1724
|
+
type: Boolean,
|
1725
|
+
default: !0
|
1726
|
+
},
|
1727
|
+
deselectFromDropdown: {
|
1728
|
+
type: Boolean,
|
1729
|
+
default: !1
|
1730
|
+
},
|
1731
|
+
searchable: {
|
1732
|
+
type: Boolean,
|
1733
|
+
default: !0
|
1734
|
+
},
|
1735
|
+
multiple: {
|
1736
|
+
type: Boolean,
|
1737
|
+
default: !1
|
1738
|
+
},
|
1739
|
+
placeholder: {
|
1740
|
+
type: String,
|
1741
|
+
default: ""
|
1742
|
+
},
|
1743
|
+
transition: {
|
1744
|
+
type: String,
|
1745
|
+
default: "vs__fade"
|
1746
|
+
},
|
1747
|
+
clearSearchOnSelect: {
|
1748
|
+
type: Boolean,
|
1749
|
+
default: !0
|
1750
|
+
},
|
1751
|
+
closeOnSelect: {
|
1752
|
+
type: Boolean,
|
1753
|
+
default: !0
|
1754
|
+
},
|
1755
|
+
label: {
|
1756
|
+
type: String,
|
1757
|
+
default: "label"
|
1758
|
+
},
|
1759
|
+
autocomplete: {
|
1760
|
+
type: String,
|
1761
|
+
default: "off"
|
1762
|
+
},
|
1763
|
+
reduce: {
|
1764
|
+
type: Function,
|
1765
|
+
default: (e) => e
|
1766
|
+
},
|
1767
|
+
selectable: {
|
1768
|
+
type: Function,
|
1769
|
+
default: (e) => !0
|
1770
|
+
},
|
1771
|
+
getOptionLabel: {
|
1772
|
+
type: Function,
|
1773
|
+
default(e) {
|
1774
|
+
return typeof e == "object" ? e.hasOwnProperty(this.label) ? e[this.label] : console.warn(`[vue-select warn]: Label key "option.${this.label}" does not exist in options object ${JSON.stringify(e)}.
|
1775
|
+
https://vue-select.org/api/props.html#getoptionlabel`) : e;
|
1776
|
+
}
|
1777
|
+
},
|
1778
|
+
getOptionKey: {
|
1779
|
+
type: Function,
|
1780
|
+
default(e) {
|
1781
|
+
if (typeof e != "object")
|
1782
|
+
return e;
|
1783
|
+
try {
|
1784
|
+
return e.hasOwnProperty("id") ? e.id : La(e);
|
1785
|
+
} catch (t) {
|
1786
|
+
return console.warn(`[vue-select warn]: Could not stringify this option to generate unique key. Please provide'getOptionKey' prop to return a unique key for each option.
|
1787
|
+
https://vue-select.org/api/props.html#getoptionkey`, e, t);
|
1788
|
+
}
|
1789
|
+
}
|
1790
|
+
},
|
1791
|
+
onTab: {
|
1792
|
+
type: Function,
|
1793
|
+
default: function() {
|
1794
|
+
this.selectOnTab && !this.isComposing && this.typeAheadSelect();
|
1795
|
+
}
|
1796
|
+
},
|
1797
|
+
taggable: {
|
1798
|
+
type: Boolean,
|
1799
|
+
default: !1
|
1800
|
+
},
|
1801
|
+
tabindex: {
|
1802
|
+
type: Number,
|
1803
|
+
default: null
|
1804
|
+
},
|
1805
|
+
pushTags: {
|
1806
|
+
type: Boolean,
|
1807
|
+
default: !1
|
1808
|
+
},
|
1809
|
+
filterable: {
|
1810
|
+
type: Boolean,
|
1811
|
+
default: !0
|
1812
|
+
},
|
1813
|
+
filterBy: {
|
1814
|
+
type: Function,
|
1815
|
+
default(e, t, s) {
|
1816
|
+
return (t || "").toLocaleLowerCase().indexOf(s.toLocaleLowerCase()) > -1;
|
1817
|
+
}
|
1818
|
+
},
|
1819
|
+
filter: {
|
1820
|
+
type: Function,
|
1821
|
+
default(e, t) {
|
1822
|
+
return e.filter((s) => {
|
1823
|
+
let a = this.getOptionLabel(s);
|
1824
|
+
return typeof a == "number" && (a = a.toString()), this.filterBy(s, a, t);
|
1825
|
+
});
|
1826
|
+
}
|
1827
|
+
},
|
1828
|
+
createOption: {
|
1829
|
+
type: Function,
|
1830
|
+
default(e) {
|
1831
|
+
return typeof this.optionList[0] == "object" ? { [this.label]: e } : e;
|
1832
|
+
}
|
1833
|
+
},
|
1834
|
+
resetOnOptionsChange: {
|
1835
|
+
default: !1,
|
1836
|
+
validator: (e) => ["function", "boolean"].includes(typeof e)
|
1837
|
+
},
|
1838
|
+
clearSearchOnBlur: {
|
1839
|
+
type: Function,
|
1840
|
+
default: function({ clearSearchOnSelect: e, multiple: t }) {
|
1841
|
+
return e && !t;
|
1842
|
+
}
|
1843
|
+
},
|
1844
|
+
noDrop: {
|
1845
|
+
type: Boolean,
|
1846
|
+
default: !1
|
1847
|
+
},
|
1848
|
+
inputId: {
|
1849
|
+
type: String
|
1850
|
+
},
|
1851
|
+
dir: {
|
1852
|
+
type: String,
|
1853
|
+
default: "auto"
|
1854
|
+
},
|
1855
|
+
selectOnTab: {
|
1856
|
+
type: Boolean,
|
1857
|
+
default: !1
|
1858
|
+
},
|
1859
|
+
selectOnKeyCodes: {
|
1860
|
+
type: Array,
|
1861
|
+
default: () => [13]
|
1862
|
+
},
|
1863
|
+
searchInputQuerySelector: {
|
1864
|
+
type: String,
|
1865
|
+
default: "[type=search]"
|
1866
|
+
},
|
1867
|
+
mapKeydown: {
|
1868
|
+
type: Function,
|
1869
|
+
default: (e, t) => e
|
1870
|
+
},
|
1871
|
+
appendToBody: {
|
1872
|
+
type: Boolean,
|
1873
|
+
default: !1
|
1874
|
+
},
|
1875
|
+
calculatePosition: {
|
1876
|
+
type: Function,
|
1877
|
+
default(e, t, { width: s, top: a, left: d }) {
|
1878
|
+
e.style.top = a, e.style.left = d, e.style.width = s;
|
1879
|
+
}
|
1880
|
+
},
|
1881
|
+
dropdownShouldOpen: {
|
1882
|
+
type: Function,
|
1883
|
+
default({ noDrop: e, open: t, mutableLoading: s }) {
|
1884
|
+
return e ? !1 : t && !s;
|
1885
|
+
}
|
1886
|
+
},
|
1887
|
+
uid: {
|
1888
|
+
type: [String, Number],
|
1889
|
+
default: () => Pa()
|
1890
|
+
}
|
1891
|
+
},
|
1892
|
+
data() {
|
1893
|
+
return {
|
1894
|
+
search: "",
|
1895
|
+
open: !1,
|
1896
|
+
isComposing: !1,
|
1897
|
+
pushedTags: [],
|
1898
|
+
_value: [],
|
1899
|
+
deselectButtons: []
|
1900
|
+
};
|
1901
|
+
},
|
1902
|
+
computed: {
|
1903
|
+
isReducingValues() {
|
1904
|
+
return this.$props.reduce !== this.$options.props.reduce.default;
|
1905
|
+
},
|
1906
|
+
isTrackingValues() {
|
1907
|
+
return typeof this.modelValue > "u" || this.isReducingValues;
|
1908
|
+
},
|
1909
|
+
selectedValue() {
|
1910
|
+
let e = this.modelValue;
|
1911
|
+
return this.isTrackingValues && (e = this.$data._value), e != null && e !== "" ? [].concat(e) : [];
|
1912
|
+
},
|
1913
|
+
optionList() {
|
1914
|
+
return this.options.concat(this.pushTags ? this.pushedTags : []);
|
1915
|
+
},
|
1916
|
+
searchEl() {
|
1917
|
+
return this.$slots.search ? this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector) : this.$refs.search;
|
1918
|
+
},
|
1919
|
+
scope() {
|
1920
|
+
const e = {
|
1921
|
+
search: this.search,
|
1922
|
+
loading: this.loading,
|
1923
|
+
searching: this.searching,
|
1924
|
+
filteredOptions: this.filteredOptions
|
1925
|
+
};
|
1926
|
+
return {
|
1927
|
+
search: {
|
1928
|
+
attributes: X({
|
1929
|
+
disabled: this.disabled,
|
1930
|
+
placeholder: this.searchPlaceholder,
|
1931
|
+
tabindex: this.tabindex,
|
1932
|
+
readonly: !this.searchable,
|
1933
|
+
id: this.inputId,
|
1934
|
+
"aria-autocomplete": "list",
|
1935
|
+
"aria-labelledby": `vs${this.uid}__combobox`,
|
1936
|
+
"aria-controls": `vs${this.uid}__listbox`,
|
1937
|
+
ref: "search",
|
1938
|
+
type: "search",
|
1939
|
+
autocomplete: this.autocomplete,
|
1940
|
+
value: this.search
|
1941
|
+
}, this.dropdownOpen && this.filteredOptions[this.typeAheadPointer] ? {
|
1942
|
+
"aria-activedescendant": `vs${this.uid}__option-${this.typeAheadPointer}`
|
1943
|
+
} : {}),
|
1944
|
+
events: {
|
1945
|
+
compositionstart: () => this.isComposing = !0,
|
1946
|
+
compositionend: () => this.isComposing = !1,
|
1947
|
+
keydown: this.onSearchKeyDown,
|
1948
|
+
blur: this.onSearchBlur,
|
1949
|
+
focus: this.onSearchFocus,
|
1950
|
+
input: (t) => this.search = t.target.value
|
1951
|
+
}
|
1952
|
+
},
|
1953
|
+
spinner: {
|
1954
|
+
loading: this.mutableLoading
|
1955
|
+
},
|
1956
|
+
noOptions: {
|
1957
|
+
search: this.search,
|
1958
|
+
loading: this.mutableLoading,
|
1959
|
+
searching: this.searching
|
1960
|
+
},
|
1961
|
+
openIndicator: {
|
1962
|
+
attributes: {
|
1963
|
+
ref: "openIndicator",
|
1964
|
+
role: "presentation",
|
1965
|
+
class: "vs__open-indicator"
|
1966
|
+
}
|
1967
|
+
},
|
1968
|
+
listHeader: e,
|
1969
|
+
listFooter: e,
|
1970
|
+
header: Oe(X({}, e), { deselect: this.deselect }),
|
1971
|
+
footer: Oe(X({}, e), { deselect: this.deselect })
|
1972
|
+
};
|
1973
|
+
},
|
1974
|
+
childComponents() {
|
1975
|
+
return X(X({}, Le), this.components);
|
1976
|
+
},
|
1977
|
+
stateClasses() {
|
1978
|
+
return {
|
1979
|
+
"vs--open": this.dropdownOpen,
|
1980
|
+
"vs--single": !this.multiple,
|
1981
|
+
"vs--multiple": this.multiple,
|
1982
|
+
"vs--searching": this.searching && !this.noDrop,
|
1983
|
+
"vs--searchable": this.searchable && !this.noDrop,
|
1984
|
+
"vs--unsearchable": !this.searchable,
|
1985
|
+
"vs--loading": this.mutableLoading,
|
1986
|
+
"vs--disabled": this.disabled
|
1987
|
+
};
|
1988
|
+
},
|
1989
|
+
searching() {
|
1990
|
+
return !!this.search;
|
1991
|
+
},
|
1992
|
+
dropdownOpen() {
|
1993
|
+
return this.dropdownShouldOpen(this);
|
1994
|
+
},
|
1995
|
+
searchPlaceholder() {
|
1996
|
+
return this.isValueEmpty && this.placeholder ? this.placeholder : void 0;
|
1997
|
+
},
|
1998
|
+
filteredOptions() {
|
1999
|
+
const e = [].concat(this.optionList);
|
2000
|
+
if (!this.filterable && !this.taggable)
|
2001
|
+
return e;
|
2002
|
+
const t = this.search.length ? this.filter(e, this.search, this) : e;
|
2003
|
+
if (this.taggable && this.search.length) {
|
2004
|
+
const s = this.createOption(this.search);
|
2005
|
+
this.optionExists(s) || t.unshift(s);
|
2006
|
+
}
|
2007
|
+
return t;
|
2008
|
+
},
|
2009
|
+
isValueEmpty() {
|
2010
|
+
return this.selectedValue.length === 0;
|
2011
|
+
},
|
2012
|
+
showClearButton() {
|
2013
|
+
return !this.multiple && this.clearable && !this.open && !this.isValueEmpty;
|
2014
|
+
}
|
2015
|
+
},
|
2016
|
+
watch: {
|
2017
|
+
options(e, t) {
|
2018
|
+
const s = () => typeof this.resetOnOptionsChange == "function" ? this.resetOnOptionsChange(e, t, this.selectedValue) : this.resetOnOptionsChange;
|
2019
|
+
!this.taggable && s() && this.clearSelection(), this.modelValue && this.isTrackingValues && this.setInternalValueFromOptions(this.modelValue);
|
2020
|
+
},
|
2021
|
+
modelValue: {
|
2022
|
+
immediate: !0,
|
2023
|
+
handler(e) {
|
2024
|
+
this.isTrackingValues && this.setInternalValueFromOptions(e);
|
2025
|
+
}
|
2026
|
+
},
|
2027
|
+
multiple() {
|
2028
|
+
this.clearSelection();
|
2029
|
+
},
|
2030
|
+
open(e) {
|
2031
|
+
this.$emit(e ? "open" : "close");
|
2032
|
+
}
|
2033
|
+
},
|
2034
|
+
created() {
|
2035
|
+
this.mutableLoading = this.loading;
|
2036
|
+
},
|
2037
|
+
methods: {
|
2038
|
+
setInternalValueFromOptions(e) {
|
2039
|
+
Array.isArray(e) ? this.$data._value = e.map((t) => this.findOptionFromReducedValue(t)) : this.$data._value = this.findOptionFromReducedValue(e);
|
2040
|
+
},
|
2041
|
+
select(e) {
|
2042
|
+
this.$emit("option:selecting", e), this.isOptionSelected(e) ? this.deselectFromDropdown && (this.clearable || this.multiple && this.selectedValue.length > 1) && this.deselect(e) : (this.taggable && !this.optionExists(e) && (this.$emit("option:created", e), this.pushTag(e)), this.multiple && (e = this.selectedValue.concat(e)), this.updateValue(e), this.$emit("option:selected", e)), this.onAfterSelect(e);
|
2043
|
+
},
|
2044
|
+
deselect(e) {
|
2045
|
+
this.$emit("option:deselecting", e), this.updateValue(this.selectedValue.filter((t) => !this.optionComparator(t, e))), this.$emit("option:deselected", e);
|
2046
|
+
},
|
2047
|
+
clearSelection() {
|
2048
|
+
this.updateValue(this.multiple ? [] : null);
|
2049
|
+
},
|
2050
|
+
onAfterSelect(e) {
|
2051
|
+
this.closeOnSelect && (this.open = !this.open, this.searchEl.blur()), this.clearSearchOnSelect && (this.search = "");
|
2052
|
+
},
|
2053
|
+
updateValue(e) {
|
2054
|
+
typeof this.modelValue > "u" && (this.$data._value = e), e !== null && (Array.isArray(e) ? e = e.map((t) => this.reduce(t)) : e = this.reduce(e)), this.$emit("update:modelValue", e);
|
2055
|
+
},
|
2056
|
+
toggleDropdown(e) {
|
2057
|
+
const t = e.target !== this.searchEl;
|
2058
|
+
t && e.preventDefault();
|
2059
|
+
const s = [
|
2060
|
+
...this.deselectButtons || [],
|
2061
|
+
this.$refs.clearButton
|
2062
|
+
];
|
2063
|
+
if (this.searchEl === void 0 || s.filter(Boolean).some((a) => a.contains(e.target) || a === e.target)) {
|
2064
|
+
e.preventDefault();
|
2065
|
+
return;
|
2066
|
+
}
|
2067
|
+
this.open && t ? this.searchEl.blur() : this.disabled || (this.open = !0, this.searchEl.focus());
|
2068
|
+
},
|
2069
|
+
isOptionSelected(e) {
|
2070
|
+
return this.selectedValue.some((t) => this.optionComparator(t, e));
|
2071
|
+
},
|
2072
|
+
isOptionDeselectable(e) {
|
2073
|
+
return this.isOptionSelected(e) && this.deselectFromDropdown;
|
2074
|
+
},
|
2075
|
+
optionComparator(e, t) {
|
2076
|
+
return this.getOptionKey(e) === this.getOptionKey(t);
|
2077
|
+
},
|
2078
|
+
findOptionFromReducedValue(e) {
|
2079
|
+
const t = (a) => JSON.stringify(this.reduce(a)) === JSON.stringify(e), s = [...this.options, ...this.pushedTags].filter(t);
|
2080
|
+
return s.length === 1 ? s[0] : s.find((a) => this.optionComparator(a, this.$data._value)) || e;
|
2081
|
+
},
|
2082
|
+
closeSearchOptions() {
|
2083
|
+
this.open = !1, this.$emit("search:blur");
|
2084
|
+
},
|
2085
|
+
maybeDeleteValue() {
|
2086
|
+
if (!this.searchEl.value.length && this.selectedValue && this.selectedValue.length && this.clearable) {
|
2087
|
+
let e = null;
|
2088
|
+
this.multiple && (e = [
|
2089
|
+
...this.selectedValue.slice(0, this.selectedValue.length - 1)
|
2090
|
+
]), this.updateValue(e);
|
2091
|
+
}
|
2092
|
+
},
|
2093
|
+
optionExists(e) {
|
2094
|
+
return this.optionList.some((t) => this.optionComparator(t, e));
|
2095
|
+
},
|
2096
|
+
normalizeOptionForSlot(e) {
|
2097
|
+
return typeof e == "object" ? e : { [this.label]: e };
|
2098
|
+
},
|
2099
|
+
pushTag(e) {
|
2100
|
+
this.pushedTags.push(e);
|
2101
|
+
},
|
2102
|
+
onEscape() {
|
2103
|
+
this.search.length ? this.search = "" : this.searchEl.blur();
|
2104
|
+
},
|
2105
|
+
onSearchBlur() {
|
2106
|
+
if (this.mousedown && !this.searching)
|
2107
|
+
this.mousedown = !1;
|
2108
|
+
else {
|
2109
|
+
const { clearSearchOnSelect: e, multiple: t } = this;
|
2110
|
+
this.clearSearchOnBlur({ clearSearchOnSelect: e, multiple: t }) && (this.search = ""), this.closeSearchOptions();
|
2111
|
+
return;
|
2112
|
+
}
|
2113
|
+
if (this.search.length === 0 && this.options.length === 0) {
|
2114
|
+
this.closeSearchOptions();
|
2115
|
+
return;
|
2116
|
+
}
|
2117
|
+
},
|
2118
|
+
onSearchFocus() {
|
2119
|
+
this.open = !0, this.$emit("search:focus");
|
2120
|
+
},
|
2121
|
+
onMousedown() {
|
2122
|
+
this.mousedown = !0;
|
2123
|
+
},
|
2124
|
+
onMouseUp() {
|
2125
|
+
this.mousedown = !1;
|
2126
|
+
},
|
2127
|
+
onSearchKeyDown(e) {
|
2128
|
+
const t = (d) => (d.preventDefault(), !this.isComposing && this.typeAheadSelect()), s = {
|
2129
|
+
8: (d) => this.maybeDeleteValue(),
|
2130
|
+
9: (d) => this.onTab(),
|
2131
|
+
27: (d) => this.onEscape(),
|
2132
|
+
38: (d) => (d.preventDefault(), this.typeAheadUp()),
|
2133
|
+
40: (d) => (d.preventDefault(), this.typeAheadDown())
|
2134
|
+
};
|
2135
|
+
this.selectOnKeyCodes.forEach((d) => s[d] = t);
|
2136
|
+
const a = this.mapKeydown(s, this);
|
2137
|
+
if (typeof a[e.keyCode] == "function")
|
2138
|
+
return a[e.keyCode](e);
|
2139
|
+
}
|
2140
|
+
}
|
2141
|
+
}, Ma = ["dir"], Da = ["id", "aria-expanded", "aria-owns"], Aa = {
|
2142
|
+
ref: "selectedOptions",
|
2143
|
+
class: "vs__selected-options"
|
2144
|
+
}, Va = ["disabled", "title", "aria-label", "onClick"], Ia = {
|
2145
|
+
ref: "actions",
|
2146
|
+
class: "vs__actions"
|
2147
|
+
}, Ba = ["disabled"], ja = { class: "vs__spinner" }, Ua = ["id"], Ta = ["id", "aria-selected", "onMouseover", "onClick"], Ea = {
|
2148
|
+
key: 0,
|
2149
|
+
class: "vs__no-options"
|
2150
|
+
}, Fa = /* @__PURE__ */ W(" Sorry, no matching options. "), qa = ["id"];
|
2151
|
+
function Za(e, t, s, a, d, c) {
|
2152
|
+
const p = Ie("append-to-body");
|
2153
|
+
return o(), r("div", {
|
2154
|
+
dir: s.dir,
|
2155
|
+
class: te(["v-select", c.stateClasses])
|
2156
|
+
}, [
|
2157
|
+
z(e.$slots, "header", V(B(c.scope.header))),
|
2158
|
+
n("div", {
|
2159
|
+
id: `vs${s.uid}__combobox`,
|
2160
|
+
ref: "toggle",
|
2161
|
+
class: "vs__dropdown-toggle",
|
2162
|
+
role: "combobox",
|
2163
|
+
"aria-expanded": c.dropdownOpen.toString(),
|
2164
|
+
"aria-owns": `vs${s.uid}__listbox`,
|
2165
|
+
"aria-label": "Search for option",
|
2166
|
+
onMousedown: t[1] || (t[1] = (l) => c.toggleDropdown(l))
|
2167
|
+
}, [
|
2168
|
+
n("div", Aa, [
|
2169
|
+
(o(!0), r(O, null, L(c.selectedValue, (l, u) => z(e.$slots, "selected-option-container", {
|
2170
|
+
option: c.normalizeOptionForSlot(l),
|
2171
|
+
deselect: c.deselect,
|
2172
|
+
multiple: s.multiple,
|
2173
|
+
disabled: s.disabled
|
2174
|
+
}, () => [
|
2175
|
+
(o(), r("span", {
|
2176
|
+
key: s.getOptionKey(l),
|
2177
|
+
class: "vs__selected"
|
2178
|
+
}, [
|
2179
|
+
z(e.$slots, "selected-option", V(B(c.normalizeOptionForSlot(l))), () => [
|
2180
|
+
W(f(s.getOptionLabel(l)), 1)
|
2181
|
+
]),
|
2182
|
+
s.multiple ? (o(), r("button", {
|
2183
|
+
key: 0,
|
2184
|
+
ref_for: !0,
|
2185
|
+
ref: (i) => d.deselectButtons[u] = i,
|
2186
|
+
disabled: s.disabled,
|
2187
|
+
type: "button",
|
2188
|
+
class: "vs__deselect",
|
2189
|
+
title: `Deselect ${s.getOptionLabel(l)}`,
|
2190
|
+
"aria-label": `Deselect ${s.getOptionLabel(l)}`,
|
2191
|
+
onClick: (i) => c.deselect(l)
|
2192
|
+
}, [
|
2193
|
+
(o(), $(le(c.childComponents.Deselect)))
|
2194
|
+
], 8, Va)) : g("", !0)
|
2195
|
+
]))
|
2196
|
+
])), 256)),
|
2197
|
+
z(e.$slots, "search", V(B(c.scope.search)), () => [
|
2198
|
+
n("input", ve({ class: "vs__search" }, c.scope.search.attributes, Be(c.scope.search.events)), null, 16)
|
2199
|
+
])
|
2200
|
+
], 512),
|
2201
|
+
n("div", Ia, [
|
2202
|
+
ne(n("button", {
|
2203
|
+
ref: "clearButton",
|
2204
|
+
disabled: s.disabled,
|
2205
|
+
type: "button",
|
2206
|
+
class: "vs__clear",
|
2207
|
+
title: "Clear Selected",
|
2208
|
+
"aria-label": "Clear Selected",
|
2209
|
+
onClick: t[0] || (t[0] = (...l) => c.clearSelection && c.clearSelection(...l))
|
2210
|
+
}, [
|
2211
|
+
(o(), $(le(c.childComponents.Deselect)))
|
2212
|
+
], 8, Ba), [
|
2213
|
+
[ye, c.showClearButton]
|
2214
|
+
]),
|
2215
|
+
z(e.$slots, "open-indicator", V(B(c.scope.openIndicator)), () => [
|
2216
|
+
s.noDrop ? g("", !0) : (o(), $(le(c.childComponents.OpenIndicator), V(ve({ key: 0 }, c.scope.openIndicator.attributes)), null, 16))
|
2217
|
+
]),
|
2218
|
+
z(e.$slots, "spinner", V(B(c.scope.spinner)), () => [
|
2219
|
+
ne(n("div", ja, "Loading...", 512), [
|
2220
|
+
[ye, e.mutableLoading]
|
2221
|
+
])
|
2222
|
+
])
|
2223
|
+
], 512)
|
2224
|
+
], 40, Da),
|
2225
|
+
h(N, { name: s.transition }, {
|
2226
|
+
default: x(() => [
|
2227
|
+
c.dropdownOpen ? ne((o(), r("ul", {
|
2228
|
+
id: `vs${s.uid}__listbox`,
|
2229
|
+
ref: "dropdownMenu",
|
2230
|
+
key: `vs${s.uid}__listbox`,
|
2231
|
+
class: "vs__dropdown-menu",
|
2232
|
+
role: "listbox",
|
2233
|
+
tabindex: "-1",
|
2234
|
+
onMousedown: t[2] || (t[2] = re((...l) => c.onMousedown && c.onMousedown(...l), ["prevent"])),
|
2235
|
+
onMouseup: t[3] || (t[3] = (...l) => c.onMouseUp && c.onMouseUp(...l))
|
2236
|
+
}, [
|
2237
|
+
z(e.$slots, "list-header", V(B(c.scope.listHeader))),
|
2238
|
+
(o(!0), r(O, null, L(c.filteredOptions, (l, u) => (o(), r("li", {
|
2239
|
+
id: `vs${s.uid}__option-${u}`,
|
2240
|
+
key: s.getOptionKey(l),
|
2241
|
+
role: "option",
|
2242
|
+
class: te(["vs__dropdown-option", {
|
2243
|
+
"vs__dropdown-option--deselect": c.isOptionDeselectable(l) && u === e.typeAheadPointer,
|
2244
|
+
"vs__dropdown-option--selected": c.isOptionSelected(l),
|
2245
|
+
"vs__dropdown-option--highlight": u === e.typeAheadPointer,
|
2246
|
+
"vs__dropdown-option--disabled": !s.selectable(l)
|
2247
|
+
}]),
|
2248
|
+
"aria-selected": u === e.typeAheadPointer ? !0 : null,
|
2249
|
+
onMouseover: (i) => s.selectable(l) ? e.typeAheadPointer = u : null,
|
2250
|
+
onClick: re((i) => s.selectable(l) ? c.select(l) : null, ["prevent", "stop"])
|
2251
|
+
}, [
|
2252
|
+
z(e.$slots, "option", V(B(c.normalizeOptionForSlot(l))), () => [
|
2253
|
+
W(f(s.getOptionLabel(l)), 1)
|
2254
|
+
])
|
2255
|
+
], 42, Ta))), 128)),
|
2256
|
+
c.filteredOptions.length === 0 ? (o(), r("li", Ea, [
|
2257
|
+
z(e.$slots, "no-options", V(B(c.scope.noOptions)), () => [
|
2258
|
+
Fa
|
2259
|
+
])
|
2260
|
+
])) : g("", !0),
|
2261
|
+
z(e.$slots, "list-footer", V(B(c.scope.listFooter)))
|
2262
|
+
], 40, Ua)), [
|
2263
|
+
[p]
|
2264
|
+
]) : (o(), r("ul", {
|
2265
|
+
key: 1,
|
2266
|
+
id: `vs${s.uid}__listbox`,
|
2267
|
+
role: "listbox",
|
2268
|
+
style: { display: "none", visibility: "hidden" }
|
2269
|
+
}, null, 8, qa))
|
2270
|
+
]),
|
2271
|
+
_: 3
|
2272
|
+
}, 8, ["name"]),
|
2273
|
+
z(e.$slots, "footer", V(B(c.scope.footer)))
|
2274
|
+
], 10, Ma);
|
2275
|
+
}
|
2276
|
+
const Ve = /* @__PURE__ */ be(za, [["render", Za]]);
|
2277
|
+
const Ha = { class: "w-100" }, Na = { class: "flex" }, Ra = { class: "mn-regular" }, Ka = { class: "flex-column flex-wrap block" }, Wa = {
|
2278
|
+
key: 0,
|
2279
|
+
class: "w-100"
|
2280
|
+
}, Ya = { class: "w-100 flex-center flex-nowrap flex" }, Ja = { class: "mn-r-regular w-100" }, Qa = ["onClick"], Xa = {
|
2281
|
+
key: 0,
|
2282
|
+
class: "mn-t-small mn-small w-100"
|
2283
|
+
}, Oi = {
|
2284
|
+
__name: "EditArray",
|
2285
|
+
props: {
|
2286
|
+
name: Object,
|
2287
|
+
items: Array
|
2288
|
+
},
|
2289
|
+
emits: ["add", "remove"],
|
2290
|
+
setup(e, { emit: t }) {
|
2291
|
+
q(), F();
|
2292
|
+
let s = oe([]);
|
2293
|
+
je(s);
|
2294
|
+
const a = v(null), d = v(null), c = v(null);
|
2295
|
+
H(() => {
|
2296
|
+
if (a.value === null || c.value === null || c.value === "")
|
2297
|
+
return !0;
|
2298
|
+
if (a.value.modifications.length > 0)
|
2299
|
+
return d.value === null;
|
2300
|
+
});
|
2301
|
+
function p(l) {
|
2302
|
+
store.commit("leftovers/deleteItemFromLeftover", l);
|
2303
|
+
}
|
2304
|
+
return (l, u) => (o(), r("div", Ha, [
|
2305
|
+
n("div", Na, [
|
2306
|
+
n("h3", Ra, f(e.name), 1)
|
2307
|
+
]),
|
2308
|
+
n("ul", Ka, [
|
2309
|
+
e.items.length < 1 ? (o(), r("span", Wa, "Вы еще не добавили позиции")) : g("", !0),
|
2310
|
+
(o(!0), r(O, null, L(e.items, (i, m) => (o(), r("li", {
|
2311
|
+
key: i._id,
|
2312
|
+
class: "w-100"
|
2313
|
+
}, [
|
2314
|
+
n("div", Ya, [
|
2315
|
+
n("span", Ja, f(i.name), 1),
|
2316
|
+
n("a", {
|
2317
|
+
class: "w-20 button",
|
2318
|
+
onClick: (w) => p(i)
|
2319
|
+
}, "Удалить", 8, Qa)
|
2320
|
+
]),
|
2321
|
+
m != e.items.length - 1 ? (o(), r("hr", Xa)) : g("", !0)
|
2322
|
+
]))), 128))
|
2323
|
+
])
|
2324
|
+
]));
|
2325
|
+
}
|
2326
|
+
};
|
2327
|
+
const Ga = { class: "br-grey radius-small mn-small" }, eo = {
|
2328
|
+
key: 1,
|
2329
|
+
class: "pd-small br-grey br-1px br-solid"
|
2330
|
+
}, to = ["disabled"], so = {
|
2331
|
+
__name: "DepartmentMemberModify",
|
2332
|
+
props: {
|
2333
|
+
isPopupOpen: Boolean,
|
2334
|
+
department: Number,
|
2335
|
+
departments: Array,
|
2336
|
+
maindepartment: Object,
|
2337
|
+
alldepartments: Array
|
2338
|
+
},
|
2339
|
+
emits: ["callback", "remove"],
|
2340
|
+
setup(e, { emit: t }) {
|
2341
|
+
const s = e, a = v({
|
2342
|
+
subdepartment: null
|
2343
|
+
});
|
2344
|
+
s.department !== null && (a.value = s.departments[s.department]);
|
2345
|
+
function d(u, i, m) {
|
2346
|
+
return u.filter((w) => !(i.some((P) => P._id === w._id) || m._id === w._id));
|
2347
|
+
}
|
2348
|
+
const c = H(() => d(s.alldepartments, s.departments, s.maindepartment));
|
2349
|
+
async function p() {
|
2350
|
+
s.departments.push(a.value.subdepartment), t("callback");
|
2351
|
+
}
|
2352
|
+
async function l() {
|
2353
|
+
s.departments.splice(s.department, 1), t("callback");
|
2354
|
+
}
|
2355
|
+
return (u, i) => (o(), r("div", null, [
|
2356
|
+
n("div", Ga, [
|
2357
|
+
s.department === null ? (o(), $(k(Ve), {
|
2358
|
+
key: 0,
|
2359
|
+
modelValue: a.value.subdepartment,
|
2360
|
+
"onUpdate:modelValue": i[0] || (i[0] = (m) => a.value.subdepartment = m),
|
2361
|
+
options: k(c),
|
2362
|
+
"get-option-label": (m) => m.name,
|
2363
|
+
class: "w-100 mn-small"
|
2364
|
+
}, null, 8, ["modelValue", "options", "get-option-label"])) : (o(), r("div", eo, f(a.value.name ? a.value.name : "Безымянный"), 1))
|
2365
|
+
]),
|
2366
|
+
s.department === null ? (o(), r("button", {
|
2367
|
+
key: 0,
|
2368
|
+
disabled: !a.value.subdepartment,
|
2369
|
+
onClick: p,
|
2370
|
+
class: "w-100 button bg-second t-white"
|
2371
|
+
}, " Добавить отдел ", 8, to)) : g("", !0),
|
2372
|
+
s.department !== null ? (o(), r("button", {
|
2373
|
+
key: 1,
|
2374
|
+
onClick: l,
|
2375
|
+
class: "w-100 button bg-fourth t-white"
|
2376
|
+
}, " Удалить отдел ")) : g("", !0)
|
2377
|
+
]));
|
2378
|
+
}
|
2379
|
+
}, Li = /* @__PURE__ */ A(so, [["__scopeId", "data-v-21f393e1"]]);
|
2380
|
+
const no = { class: "br-grey radius-small mn-small" }, ao = {
|
2381
|
+
key: 1,
|
2382
|
+
class: "pd-small br-grey br-1px br-solid"
|
2383
|
+
}, oo = ["disabled"], io = {
|
2384
|
+
__name: "DepartmentSubDepartmentModify",
|
2385
|
+
props: {
|
2386
|
+
isPopupOpen: Boolean,
|
2387
|
+
department: Number,
|
2388
|
+
departments: Array,
|
2389
|
+
maindepartment: Object,
|
2390
|
+
alldepartments: Array
|
2391
|
+
},
|
2392
|
+
emits: ["callback", "remove"],
|
2393
|
+
setup(e, { emit: t }) {
|
2394
|
+
const s = e, a = v({
|
2395
|
+
subdepartment: null
|
2396
|
+
});
|
2397
|
+
s.department !== null && (a.value = s.departments[s.department]);
|
2398
|
+
function d(u, i, m) {
|
2399
|
+
return u.filter((w) => !(i.some((P) => P._id === w._id) || m._id === w._id));
|
2400
|
+
}
|
2401
|
+
const c = H(() => d(s.alldepartments, s.departments, s.maindepartment));
|
2402
|
+
async function p() {
|
2403
|
+
s.departments.push(a.value.subdepartment), t("callback");
|
2404
|
+
}
|
2405
|
+
async function l() {
|
2406
|
+
s.departments.splice(s.department, 1), t("callback");
|
2407
|
+
}
|
2408
|
+
return (u, i) => (o(), r("div", null, [
|
2409
|
+
n("div", no, [
|
2410
|
+
s.department === null ? (o(), $(k(Ve), {
|
2411
|
+
key: 0,
|
2412
|
+
modelValue: a.value.subdepartment,
|
2413
|
+
"onUpdate:modelValue": i[0] || (i[0] = (m) => a.value.subdepartment = m),
|
2414
|
+
options: k(c),
|
2415
|
+
"get-option-label": (m) => m.name,
|
2416
|
+
class: "w-100 mn-small"
|
2417
|
+
}, null, 8, ["modelValue", "options", "get-option-label"])) : (o(), r("div", ao, f(a.value.name ? a.value.name : "Безымянный"), 1))
|
2418
|
+
]),
|
2419
|
+
s.department === null ? (o(), r("button", {
|
2420
|
+
key: 0,
|
2421
|
+
disabled: !a.value.subdepartment,
|
2422
|
+
onClick: p,
|
2423
|
+
class: "w-100 button bg-second t-white"
|
2424
|
+
}, " Добавить отдел ", 8, oo)) : g("", !0),
|
2425
|
+
s.department !== null ? (o(), r("button", {
|
2426
|
+
key: 1,
|
2427
|
+
onClick: l,
|
2428
|
+
class: "w-100 button bg-fourth t-white"
|
2429
|
+
}, " Удалить отдел ")) : g("", !0)
|
2430
|
+
]));
|
2431
|
+
}
|
2432
|
+
}, Si = /* @__PURE__ */ A(io, [["__scopeId", "data-v-d3c6f191"]]);
|
2433
|
+
const se = (e) => (me("data-v-195322bd"), e = e(), he(), e), lo = { class: "for-transition w-100" }, ro = { class: "pd-b-zero pd-t-zero pd-thin" }, co = { class: "pd-thin" }, uo = { class: "flex-nowrap flex bg-grey pd-medium radius-big" }, po = {
|
2434
|
+
key: 0,
|
2435
|
+
class: "mn-r-auto"
|
2436
|
+
}, mo = {
|
2437
|
+
key: 1,
|
2438
|
+
class: "mn-r-auto"
|
2439
|
+
}, ho = { class: "flex-nowrap flex pd-thin" }, _o = { class: "pd-b-zero pd-t-zero pd-thin cols-2 gap-thin" }, fo = { class: "flex-stretch flex-column flex" }, go = { class: "mn-thin bg-grey pd-medium o-hidden radius-big" }, bo = /* @__PURE__ */ se(() => /* @__PURE__ */ n("h3", { class: "mn-semi" }, "Profile", -1)), vo = { class: "radius-small flex-nowrap flex" }, yo = { class: "w-100 flex-child-grow-1 flex-child" }, wo = { class: "bg-grey pd-medium o-hidden radius-big" }, $o = /* @__PURE__ */ se(() => /* @__PURE__ */ n("h3", { class: "mn-semi" }, "Details", -1)), Co = /* @__PURE__ */ se(() => /* @__PURE__ */ n("p", { class: "p-medium mn-small" }, "Please the available delivery options:", -1)), ko = { class: "mn-medium flex-nowrap flex" }, xo = /* @__PURE__ */ se(() => /* @__PURE__ */ n("p", { class: "p-medium mn-small" }, "Please select the available payment methods:", -1)), Oo = { class: "flex-nowrap flex" }, Lo = { class: "bg-grey pd-medium o-hidden radius-big" }, So = /* @__PURE__ */ se(() => /* @__PURE__ */ n("h3", { class: "mn-semi" }, "Location", -1)), Po = /* @__PURE__ */ se(() => /* @__PURE__ */ n("p", { class: "mn-small p-medium" }, "Or choose on map:", -1)), zo = { class: "flex-nowrap flex pd-thin" }, Mo = {
|
2440
|
+
__name: "DepartmentEdit",
|
2441
|
+
setup(e) {
|
2442
|
+
const t = q(), s = F();
|
2443
|
+
v("details"), v(!1);
|
2444
|
+
async function a() {
|
2445
|
+
s.params.department && await ge.read(s.params.department), v(Ze.memberships), await K.read(s.params._id), s.params.department && await K.readOne(s.params.department);
|
2446
|
+
}
|
2447
|
+
a(), v(_.department.members), v(!1), v(null), v(!1), v(null);
|
2448
|
+
async function d() {
|
2449
|
+
s.params.department && await K.update(
|
2450
|
+
s.params._id,
|
2451
|
+
_.department
|
2452
|
+
), s.params.department || await K.create(
|
2453
|
+
s.params._id,
|
2454
|
+
_.department
|
2455
|
+
);
|
2456
|
+
}
|
2457
|
+
function c() {
|
2458
|
+
t.replace({ name: "Department", params: { _id: s.params._id, department: _.department._id } });
|
2459
|
+
}
|
2460
|
+
async function p() {
|
2461
|
+
await K.delete(
|
2462
|
+
s.params._id,
|
2463
|
+
_.department
|
2464
|
+
);
|
2465
|
+
}
|
2466
|
+
return (l, u) => (o(), r("div", lo, [
|
2467
|
+
n("div", ro, [
|
2468
|
+
h(lt, { class: "pd-medium bg-grey radius-big" })
|
2469
|
+
]),
|
2470
|
+
n("div", co, [
|
2471
|
+
n("header", uo, [
|
2472
|
+
k(s).params.department ? (o(), r("h1", po, "Edit Spot")) : (o(), r("h1", mo, "Create Spot")),
|
2473
|
+
n("section", ho, [
|
2474
|
+
h(ce, {
|
2475
|
+
submit: d,
|
2476
|
+
callback: c
|
2477
|
+
}, {
|
2478
|
+
default: x(() => [
|
2479
|
+
W("Save Spot")
|
2480
|
+
]),
|
2481
|
+
_: 1
|
2482
|
+
})
|
2483
|
+
])
|
2484
|
+
])
|
2485
|
+
]),
|
2486
|
+
n("div", _o, [
|
2487
|
+
n("div", fo, [
|
2488
|
+
n("div", go, [
|
2489
|
+
bo,
|
2490
|
+
n("div", vo, [
|
2491
|
+
h(ze, {
|
2492
|
+
photo: _.department.profile.photo,
|
2493
|
+
"onUpdate:photo": u[0] || (u[0] = (i) => _.department.profile.photo = i),
|
2494
|
+
uploadPath: "organizations/" + _.department.name + "/avatars",
|
2495
|
+
class: "w-8r aspect-1x1 o-hidden mn-r-small radius-extra"
|
2496
|
+
}, null, 8, ["photo", "uploadPath"]),
|
2497
|
+
n("div", yo, [
|
2498
|
+
h(D, {
|
2499
|
+
field: _.department.profile.name,
|
2500
|
+
"onUpdate:field": u[1] || (u[1] = (i) => _.department.profile.name = i),
|
2501
|
+
label: "Name",
|
2502
|
+
placeholder: "Spot Name",
|
2503
|
+
class: "mn-small bg-white radius-small pd-medium",
|
2504
|
+
validation: l.organizationName
|
2505
|
+
}, null, 8, ["field", "validation"]),
|
2506
|
+
h(D, {
|
2507
|
+
field: _.department.profile.description,
|
2508
|
+
"onUpdate:field": u[2] || (u[2] = (i) => _.department.profile.description = i),
|
2509
|
+
label: "Description",
|
2510
|
+
placeholder: "Spot description (max 120 symbols)",
|
2511
|
+
class: "bg-white radius-small pd-medium",
|
2512
|
+
validation: l.organizationName
|
2513
|
+
}, null, 8, ["field", "validation"])
|
2514
|
+
])
|
2515
|
+
])
|
2516
|
+
]),
|
2517
|
+
n("div", wo, [
|
2518
|
+
$o,
|
2519
|
+
Co,
|
2520
|
+
n("div", ko, [
|
2521
|
+
h(J, {
|
2522
|
+
label: "Pickup",
|
2523
|
+
name: "Delivery",
|
2524
|
+
value: "pickup",
|
2525
|
+
class: "w-100 mn-r-small bg-white radius-small pd-small",
|
2526
|
+
radio: _.department.delivery
|
2527
|
+
}, null, 8, ["radio"]),
|
2528
|
+
h(J, {
|
2529
|
+
label: "Delivery",
|
2530
|
+
name: "Delivery",
|
2531
|
+
value: "courier",
|
2532
|
+
class: "w-100 mn-r-small bg-white radius-small pd-small",
|
2533
|
+
radio: _.department.delivery
|
2534
|
+
}, null, 8, ["radio"]),
|
2535
|
+
h(J, {
|
2536
|
+
label: "Post",
|
2537
|
+
name: "Delivery",
|
2538
|
+
value: "post",
|
2539
|
+
class: "w-100 bg-white radius-small pd-small",
|
2540
|
+
radio: _.department.delivery
|
2541
|
+
}, null, 8, ["radio"])
|
2542
|
+
]),
|
2543
|
+
xo,
|
2544
|
+
n("div", Oo, [
|
2545
|
+
h(J, {
|
2546
|
+
label: "Cash",
|
2547
|
+
name: "Payment",
|
2548
|
+
value: "cash",
|
2549
|
+
class: "w-100 mn-r-small bg-white radius-small pd-small",
|
2550
|
+
radio: _.department.payment
|
2551
|
+
}, null, 8, ["radio"]),
|
2552
|
+
h(J, {
|
2553
|
+
label: "Bank Transfer",
|
2554
|
+
name: "Payment",
|
2555
|
+
value: "bank",
|
2556
|
+
class: "w-100 mn-r-small bg-white radius-small pd-small",
|
2557
|
+
radio: _.department.payment
|
2558
|
+
}, null, 8, ["radio"]),
|
2559
|
+
h(J, {
|
2560
|
+
label: "Crypto",
|
2561
|
+
name: "Payment",
|
2562
|
+
value: "crypto",
|
2563
|
+
class: "w-100 bg-white radius-small pd-small",
|
2564
|
+
radio: _.department.payment
|
2565
|
+
}, null, 8, ["radio"])
|
2566
|
+
])
|
2567
|
+
])
|
2568
|
+
]),
|
2569
|
+
n("div", Lo, [
|
2570
|
+
So,
|
2571
|
+
h(Gn, {
|
2572
|
+
apiKey: "AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",
|
2573
|
+
address: _.department.address,
|
2574
|
+
location: _.department.location,
|
2575
|
+
label: "Address",
|
2576
|
+
placeholder: "Enter delivery address",
|
2577
|
+
class: "bg-white radius-small pd-small mn-small",
|
2578
|
+
"onUpdate:location": u[3] || (u[3] = (i) => {
|
2579
|
+
_.department.location = i;
|
2580
|
+
}),
|
2581
|
+
"onUpdate:address": u[4] || (u[4] = (i) => {
|
2582
|
+
_.department.address = i;
|
2583
|
+
})
|
2584
|
+
}, null, 8, ["address", "location"]),
|
2585
|
+
Po,
|
2586
|
+
h(oa, {
|
2587
|
+
address: _.department.address,
|
2588
|
+
location: _.department.location,
|
2589
|
+
apiKey: "AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI",
|
2590
|
+
class: "radius-big o-hidden",
|
2591
|
+
"onUpdate:location": u[5] || (u[5] = (i) => {
|
2592
|
+
_.department.location = i;
|
2593
|
+
}),
|
2594
|
+
"onUpdate:address": u[6] || (u[6] = (i) => {
|
2595
|
+
_.department.address = i;
|
2596
|
+
})
|
2597
|
+
}, null, 8, ["address", "location"])
|
2598
|
+
])
|
2599
|
+
]),
|
2600
|
+
n("section", zo, [
|
2601
|
+
h(ce, {
|
2602
|
+
submit: p,
|
2603
|
+
callback: l.redirectToDash,
|
2604
|
+
class: "bg-grey"
|
2605
|
+
}, {
|
2606
|
+
default: x(() => [
|
2607
|
+
W("Delete Spot")
|
2608
|
+
]),
|
2609
|
+
_: 1
|
2610
|
+
}, 8, ["callback"])
|
2611
|
+
])
|
2612
|
+
]));
|
2613
|
+
}
|
2614
|
+
}, Do = /* @__PURE__ */ A(Mo, [["__scopeId", "data-v-195322bd"]]), Se = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
2615
|
+
__proto__: null,
|
2616
|
+
default: Do
|
2617
|
+
}, Symbol.toStringTag, { value: "Module" })), Ao = { class: "unit" }, Vo = { class: "unit-details" }, Io = { key: 0 }, Bo = { class: "subunits" }, Pi = {
|
2618
|
+
__name: "Unit",
|
2619
|
+
props: {
|
2620
|
+
unit: {
|
2621
|
+
type: Object,
|
2622
|
+
required: !0
|
2623
|
+
},
|
2624
|
+
editMode: {
|
2625
|
+
type: Boolean,
|
2626
|
+
required: !0
|
2627
|
+
}
|
2628
|
+
},
|
2629
|
+
setup(e) {
|
2630
|
+
const t = e, s = v({ ...t.unit });
|
2631
|
+
E(t.unit, () => {
|
2632
|
+
s.value = { ...t.unit };
|
2633
|
+
});
|
2634
|
+
async function a() {
|
2635
|
+
emit("unit-updated", s.value);
|
2636
|
+
}
|
2637
|
+
async function d() {
|
2638
|
+
emit("subunit-added", t.unit._id);
|
2639
|
+
}
|
2640
|
+
return (c, p) => {
|
2641
|
+
const l = ue("unit-component");
|
2642
|
+
return o(), r("div", Ao, [
|
2643
|
+
n("div", Vo, [
|
2644
|
+
n("h3", null, f(e.unit.name), 1),
|
2645
|
+
n("p", null, f(e.unit.description), 1),
|
2646
|
+
e.editMode ? (o(), r("div", Io, [
|
2647
|
+
ne(n("input", {
|
2648
|
+
"onUpdate:modelValue": p[0] || (p[0] = (u) => s.value.name = u),
|
2649
|
+
placeholder: "Название отдела"
|
2650
|
+
}, null, 512), [
|
2651
|
+
[we, s.value.name]
|
2652
|
+
]),
|
2653
|
+
ne(n("input", {
|
2654
|
+
"onUpdate:modelValue": p[1] || (p[1] = (u) => s.value.description = u),
|
2655
|
+
placeholder: "Описание отдела"
|
2656
|
+
}, null, 512), [
|
2657
|
+
[we, s.value.description]
|
2658
|
+
]),
|
2659
|
+
n("button", { onClick: a }, "Сохранить"),
|
2660
|
+
n("button", { onClick: d }, "Добавить подотдел")
|
2661
|
+
])) : g("", !0)
|
2662
|
+
]),
|
2663
|
+
n("div", Bo, [
|
2664
|
+
(o(!0), r(O, null, L(e.unit.subunits, (u, i) => (o(), $(l, {
|
2665
|
+
key: i,
|
2666
|
+
unit: u,
|
2667
|
+
"edit-mode": e.editMode
|
2668
|
+
}, null, 8, ["unit", "edit-mode"]))), 128))
|
2669
|
+
])
|
2670
|
+
]);
|
2671
|
+
};
|
2672
|
+
}
|
2673
|
+
};
|
2674
|
+
const jo = { class: "br-grey radius-small mn-small" }, Uo = {
|
2675
|
+
__name: "Places",
|
2676
|
+
props: {
|
2677
|
+
isPopupOpen: Boolean,
|
2678
|
+
place: Number,
|
2679
|
+
places: Array
|
2680
|
+
},
|
2681
|
+
emits: ["callback"],
|
2682
|
+
setup(e, { emit: t }) {
|
2683
|
+
const s = e, a = v({
|
2684
|
+
logo: "",
|
2685
|
+
name: "",
|
2686
|
+
address: ""
|
2687
|
+
});
|
2688
|
+
s.place !== null && (a.value = s.places[s.place]);
|
2689
|
+
const d = v(null);
|
2690
|
+
async function c() {
|
2691
|
+
try {
|
2692
|
+
await Qe(
|
2693
|
+
d,
|
2694
|
+
Xe,
|
2695
|
+
a.value.name,
|
2696
|
+
"Некорректное название"
|
2697
|
+
);
|
2698
|
+
} catch {
|
2699
|
+
throw new Error();
|
2700
|
+
}
|
2701
|
+
s.place !== null ? (s.places[s.place] = a.value, t("callback")) : (s.places.push(a.value), t("callback"));
|
2702
|
+
}
|
2703
|
+
return (p, l) => (o(), r("div", null, [
|
2704
|
+
n("div", jo, [
|
2705
|
+
h(Me, {
|
2706
|
+
options: [
|
2707
|
+
{ name: "Кафе", value: "cafe" },
|
2708
|
+
{ name: "Бар", value: "bar" },
|
2709
|
+
{ name: "Ресторан", value: "restaraunt" },
|
2710
|
+
{ name: "Пиццерия", value: "pizzeria" },
|
2711
|
+
{ name: "Ночной клуб", value: "night-club" },
|
2712
|
+
{ name: "Шаверма", value: "shaverma" },
|
2713
|
+
{ name: "Кофейня", value: "coffee" }
|
2714
|
+
],
|
2715
|
+
prop: a.value,
|
2716
|
+
content: "type",
|
2717
|
+
label: "Тип",
|
2718
|
+
placeholder: "Тип заведения",
|
2719
|
+
size: "small"
|
2720
|
+
}, null, 8, ["prop"]),
|
2721
|
+
h(D, {
|
2722
|
+
field: a.value.name,
|
2723
|
+
"onUpdate:field": l[0] || (l[0] = (u) => a.value.name = u),
|
2724
|
+
label: "Название",
|
2725
|
+
validation: d.value,
|
2726
|
+
placeholder: "Введите название места"
|
2727
|
+
}, null, 8, ["field", "validation"]),
|
2728
|
+
h(D, {
|
2729
|
+
field: a.value.address,
|
2730
|
+
"onUpdate:field": l[1] || (l[1] = (u) => a.value.address = u),
|
2731
|
+
label: "Адрес",
|
2732
|
+
validation: d.value,
|
2733
|
+
placeholder: "Введите адрес места"
|
2734
|
+
}, null, 8, ["field", "validation"]),
|
2735
|
+
h(D, {
|
2736
|
+
field: a.value.phone,
|
2737
|
+
"onUpdate:field": l[2] || (l[2] = (u) => a.value.phone = u),
|
2738
|
+
label: "Телефон",
|
2739
|
+
validation: d.value,
|
2740
|
+
placeholder: "Введите телефон места"
|
2741
|
+
}, null, 8, ["field", "validation"])
|
2742
|
+
]),
|
2743
|
+
n("button", {
|
2744
|
+
onClick: c,
|
2745
|
+
class: "w-100 button bg-second t-white"
|
2746
|
+
}, f(s.place !== null ? "Редактировать заведение" : "Добавить заведение"), 1)
|
2747
|
+
]));
|
2748
|
+
}
|
2749
|
+
}, zi = /* @__PURE__ */ A(Uo, [["__scopeId", "data-v-de5143c5"]]);
|
2750
|
+
const To = (e) => (me("data-v-20739d92"), e = e(), he(), e), Eo = { class: "documents" }, Fo = /* @__PURE__ */ To(() => /* @__PURE__ */ n("h3", { class: "mn-small" }, "Список документов", -1)), qo = { class: "mn-big cols-4" }, Zo = ["onClick"], Ho = { class: "mn-small" }, No = { class: "t-semi t-transp radius-small" }, Ro = {
|
2751
|
+
__name: "Documents",
|
2752
|
+
setup(e) {
|
2753
|
+
q(), F();
|
2754
|
+
let t = [{
|
2755
|
+
name: "Паспорт",
|
2756
|
+
status: "Не добавлен",
|
2757
|
+
inputs: [{
|
2758
|
+
type: "text",
|
2759
|
+
name: "Номер и серия"
|
2760
|
+
}, {
|
2761
|
+
type: "text",
|
2762
|
+
name: "Место выдачи"
|
2763
|
+
}, {
|
2764
|
+
type: "text",
|
2765
|
+
name: "Дата выдачи"
|
2766
|
+
}]
|
2767
|
+
}, {
|
2768
|
+
name: "ИНН",
|
2769
|
+
status: "Не добавлен",
|
2770
|
+
inputs: [{
|
2771
|
+
type: "text",
|
2772
|
+
name: "Дата регистрации"
|
2773
|
+
}]
|
2774
|
+
}, {
|
2775
|
+
name: "СНИЛС",
|
2776
|
+
status: "Не добавлен",
|
2777
|
+
inputs: [{
|
2778
|
+
type: "text",
|
2779
|
+
name: "Дата регистрации"
|
2780
|
+
}]
|
2781
|
+
}, {
|
2782
|
+
name: "Военный билет",
|
2783
|
+
status: "Не добавлен",
|
2784
|
+
inputs: [{
|
2785
|
+
type: "text",
|
2786
|
+
name: "Дата регистрации"
|
2787
|
+
}]
|
2788
|
+
}];
|
2789
|
+
const s = v(!1), a = v(null), d = (l) => {
|
2790
|
+
a.value = l, s.value = !0;
|
2791
|
+
}, c = () => {
|
2792
|
+
s.value = !1;
|
2793
|
+
}, p = () => {
|
2794
|
+
c();
|
2795
|
+
};
|
2796
|
+
return de(() => {
|
2797
|
+
}), (l, u) => {
|
2798
|
+
const i = ue("Popup");
|
2799
|
+
return o(), r("div", Eo, [
|
2800
|
+
Fo,
|
2801
|
+
n("div", qo, [
|
2802
|
+
(o(!0), r(O, null, L(k(t), (m, w) => (o(), r("div", {
|
2803
|
+
key: w,
|
2804
|
+
onClick: (P) => d(w),
|
2805
|
+
class: "h-100 pd-medium bg-white radius-small"
|
2806
|
+
}, [
|
2807
|
+
n("h3", Ho, f(m.name), 1),
|
2808
|
+
n("p", No, f(m.status), 1)
|
2809
|
+
], 8, Zo))), 128))
|
2810
|
+
]),
|
2811
|
+
h(i, {
|
2812
|
+
title: "Добавить документ",
|
2813
|
+
onClosePopup: c,
|
2814
|
+
isPopupOpen: s.value
|
2815
|
+
}, {
|
2816
|
+
default: x(() => [
|
2817
|
+
(o(!0), r(O, null, L(k(t)[a.value].inputs, (m) => (o(), r("div", {
|
2818
|
+
key: m.name
|
2819
|
+
}, [
|
2820
|
+
h(D, {
|
2821
|
+
field: m.value,
|
2822
|
+
"onUpdate:field": (w) => m.value = w,
|
2823
|
+
label: m.name,
|
2824
|
+
_id: m.name,
|
2825
|
+
placeholder: m.name,
|
2826
|
+
class: "w-100"
|
2827
|
+
}, null, 8, ["field", "onUpdate:field", "label", "_id", "placeholder"])
|
2828
|
+
]))), 128)),
|
2829
|
+
n("button", {
|
2830
|
+
onClick: p,
|
2831
|
+
class: "w-100 mn-small button"
|
2832
|
+
}, "Отправить на верификацию")
|
2833
|
+
]),
|
2834
|
+
_: 1
|
2835
|
+
}, 8, ["isPopupOpen"])
|
2836
|
+
]);
|
2837
|
+
};
|
2838
|
+
}
|
2839
|
+
}, Mi = /* @__PURE__ */ A(Ro, [["__scopeId", "data-v-20739d92"]]);
|
2840
|
+
const Ko = { class: "for-transition bg-white radius-big w-100" }, Wo = { class: "" }, Yo = {
|
2841
|
+
key: 1,
|
2842
|
+
class: "cols-1"
|
2843
|
+
}, Di = {
|
2844
|
+
__name: "Organizations",
|
2845
|
+
props: {
|
2846
|
+
owner: {
|
2847
|
+
type: String,
|
2848
|
+
default: null
|
2849
|
+
},
|
2850
|
+
user: {
|
2851
|
+
type: [String, Number],
|
2852
|
+
default: null
|
2853
|
+
},
|
2854
|
+
onlyuser: {
|
2855
|
+
type: [String, Number],
|
2856
|
+
default: null
|
2857
|
+
}
|
2858
|
+
},
|
2859
|
+
async setup(e) {
|
2860
|
+
let t, s;
|
2861
|
+
const a = e, d = v(null);
|
2862
|
+
d.value = ([t, s] = Y(() => Z.read({ owner: a.owner, user: a.user, onlyuser: a.onlyuser })), t = await t, s(), t);
|
2863
|
+
const c = q(), p = F();
|
2864
|
+
let l = p.query.tab ? p.query.tab : "details";
|
2865
|
+
const u = v(l);
|
2866
|
+
return p.query.tab = u.value, E(u, (i) => {
|
2867
|
+
c.push({ query: { ...p.query, tab: i } });
|
2868
|
+
}), (i, m) => (o(), r("div", Ko, [
|
2869
|
+
n("div", Wo, [
|
2870
|
+
d.value < 1 ? (o(), $(fe, {
|
2871
|
+
key: 0,
|
2872
|
+
title: "You Haven't Joined Any Organization Yet",
|
2873
|
+
description: "Weeder is all about community. Join an organization or maybe you want to create your own?",
|
2874
|
+
action: "Create organization",
|
2875
|
+
callback: i.a = () => i.$router.push("/app/organization/create/details")
|
2876
|
+
}, null, 8, ["callback"])) : (o(), r("div", Yo, [
|
2877
|
+
(o(!0), r(O, null, L(d.value, (w) => (o(), $(Ye, {
|
2878
|
+
key: w._id,
|
2879
|
+
organization: w,
|
2880
|
+
user: S.user,
|
2881
|
+
onUpdateMembership: i.handleMembershipUpdate,
|
2882
|
+
class: te(["w-100", { "mn-r-small": i.index !== d.value.length - 1 }])
|
2883
|
+
}, null, 8, ["organization", "user", "onUpdateMembership", "class"]))), 128))
|
2884
|
+
]))
|
2885
|
+
])
|
2886
|
+
]));
|
2887
|
+
}
|
2888
|
+
}, Jo = {};
|
2889
|
+
function Qo(e, t) {
|
2890
|
+
const s = ue("router-view");
|
2891
|
+
return o(), $(s, null, {
|
2892
|
+
default: x(({ Component: a, route: d }) => [
|
2893
|
+
(o(), $(le(a)))
|
2894
|
+
]),
|
2895
|
+
_: 1
|
2896
|
+
});
|
2897
|
+
}
|
2898
|
+
const Xo = /* @__PURE__ */ A(Jo, [["render", Qo]]), Ai = [{
|
2899
|
+
path: "organizations",
|
2900
|
+
component: Xo,
|
2901
|
+
meta: {
|
2902
|
+
title: {
|
2903
|
+
en: "Organizations",
|
2904
|
+
ru: "Организации"
|
2905
|
+
}
|
2906
|
+
},
|
2907
|
+
children: [{
|
2908
|
+
path: ":_id",
|
2909
|
+
name: "Organization",
|
2910
|
+
meta: {
|
2911
|
+
title: {
|
2912
|
+
en: "Organization",
|
2913
|
+
ru: "Организация"
|
2914
|
+
}
|
2915
|
+
},
|
2916
|
+
component: () => Promise.resolve().then(() => Ns)
|
2917
|
+
}, {
|
2918
|
+
path: "create",
|
2919
|
+
name: "Create Organization",
|
2920
|
+
title: {
|
2921
|
+
en: "Create Organization",
|
2922
|
+
ru: "Создать Организацию"
|
2923
|
+
},
|
2924
|
+
component: () => Promise.resolve().then(() => Ce)
|
2925
|
+
}, {
|
2926
|
+
path: ":_id/edit",
|
2927
|
+
name: "Organization Edit",
|
2928
|
+
meta: {
|
2929
|
+
title: {
|
2930
|
+
en: "Edit Organization",
|
2931
|
+
ru: "Редактировать Организацию"
|
2932
|
+
}
|
2933
|
+
},
|
2934
|
+
component: () => Promise.resolve().then(() => Ce)
|
2935
|
+
}, {
|
2936
|
+
path: ":_id/departments/create",
|
2937
|
+
name: "Department Creation",
|
2938
|
+
meta: {
|
2939
|
+
title: "Создание отдела"
|
2940
|
+
},
|
2941
|
+
component: () => Promise.resolve().then(() => Se)
|
2942
|
+
}, {
|
2943
|
+
path: ":_id/departments/:deparment",
|
2944
|
+
name: "Department",
|
2945
|
+
meta: {
|
2946
|
+
title: "Отдел"
|
2947
|
+
},
|
2948
|
+
component: () => Promise.resolve().then(() => rn)
|
2949
|
+
}, {
|
2950
|
+
path: ":_id/departments/:department/edit",
|
2951
|
+
name: "Department Edit",
|
2952
|
+
meta: {
|
2953
|
+
title: "Редактирование отдела"
|
2954
|
+
},
|
2955
|
+
component: () => Promise.resolve().then(() => Se)
|
2956
|
+
}, {
|
2957
|
+
path: ":_id/products/:product",
|
2958
|
+
name: "Product Organization",
|
2959
|
+
meta: {
|
2960
|
+
title: {
|
2961
|
+
en: "Product",
|
2962
|
+
ru: "Продукт"
|
2963
|
+
}
|
2964
|
+
},
|
2965
|
+
component: () => import(
|
2966
|
+
/* webpackChunkName: 'Product' */
|
2967
|
+
"./Product-b054c74c.mjs"
|
2968
|
+
)
|
2969
|
+
}, {
|
2970
|
+
path: ":_id/products/:product/edit",
|
2971
|
+
name: "ProductEdit",
|
2972
|
+
component: () => import(
|
2973
|
+
/* webpackChunkName: 'ProductPageEdit' */
|
2974
|
+
"./ProductEdit-55b6cb06.mjs"
|
2975
|
+
)
|
2976
|
+
}, {
|
2977
|
+
path: ":_id/products/add",
|
2978
|
+
name: "AddProduct",
|
2979
|
+
component: () => import(
|
2980
|
+
/* webpackChunkName: 'ProductPageEdit' */
|
2981
|
+
"./ProductEdit-55b6cb06.mjs"
|
2982
|
+
)
|
2983
|
+
}]
|
2984
|
+
}];
|
2985
|
+
export {
|
2986
|
+
Ai as A,
|
2987
|
+
Do as D,
|
2988
|
+
zi as P,
|
2989
|
+
Ae as U,
|
2990
|
+
lt as _,
|
2991
|
+
yi as a,
|
2992
|
+
vi as b,
|
2993
|
+
U as c,
|
2994
|
+
Hs as d,
|
2995
|
+
ln as e,
|
2996
|
+
ki as f,
|
2997
|
+
An as g,
|
2998
|
+
xi as h,
|
2999
|
+
Oi as i,
|
3000
|
+
Pi as j,
|
3001
|
+
De as k,
|
3002
|
+
Li as l,
|
3003
|
+
Si as m,
|
3004
|
+
fe as n,
|
3005
|
+
gi as o,
|
3006
|
+
bi as p,
|
3007
|
+
xs as q,
|
3008
|
+
wi as r,
|
3009
|
+
y as s,
|
3010
|
+
At as t,
|
3011
|
+
Ci as u,
|
3012
|
+
Mi as v,
|
3013
|
+
Es as w,
|
3014
|
+
_s as x,
|
3015
|
+
Di as y,
|
3016
|
+
$i as z
|
3017
|
+
};
|