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