@ozdao/prometheus-framework 0.1.81 → 0.1.83
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs +4 -4
- package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js +3 -3
- package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs +1 -1
- package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +2981 -2804
- package/dist/prometheus-framework/node_modules/date-fns/esm/getQuarter/index.cjs +1 -0
- package/dist/prometheus-framework/node_modules/date-fns/esm/getQuarter/index.js +10 -0
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.cjs +2 -2
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +26 -26
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/isObject.cjs +1 -0
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/isObject.js +7 -0
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.cjs +1 -1
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.js +28 -29
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/normalizeArguments.cjs +2 -2
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/normalizeArguments.js +55 -65
- package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.cjs +1 -1
- package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.js +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue.js +23 -23
- package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue2.js +31 -31
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +22 -22
- package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.js +18 -18
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +24 -24
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +32 -32
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +31 -30
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +20 -20
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +32 -32
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +21 -21
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +8 -8
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +12 -12
- package/dist/prometheus-framework/src/components/Text/Text.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Text/Text.vue.js +11 -11
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +27 -27
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +18 -18
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +17 -17
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +41 -40
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +17 -18
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +24 -24
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.js +19 -19
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.js +30 -30
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +22 -22
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +3 -3
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +25 -25
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +56 -56
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +44 -43
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +15 -15
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +10 -10
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +51 -53
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +59 -61
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.js +22 -22
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +23 -23
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.js +23 -23
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +18 -18
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +30 -30
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +24 -24
- package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.js +20 -20
- package/dist/prometheus-framework.cjs.js +27 -27
- package/dist/prometheus-framework.es.js +1949 -1937
- package/dist/style.css +1 -1
- package/package.json +2 -4
- package/src/modules/auth/components/pages/SignIn.vue +1 -0
- package/src/modules/auth/store/auth.js +2 -7
@@ -1,55 +1,53 @@
|
|
1
|
-
import { ref as n, computed as
|
2
|
-
import { useRoute as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import { state as
|
1
|
+
import { ref as n, computed as $, onMounted as D, openBlock as o, createElementBlock as i, createElementVNode as s, Fragment as C, renderList as z, normalizeClass as A, unref as L, toDisplayString as x, createCommentVNode as r, createVNode as c, Transition as _, withCtx as p, withDirectives as O, vShow as T, createBlock as W, createTextVNode as q } from "vue";
|
2
|
+
import { useRoute as H } from "vue-router";
|
3
|
+
import J from "../../../../components/Field/Field.vue2.js";
|
4
|
+
import K from "../../../../components/Button/Button.vue2.js";
|
5
|
+
import Q from "../../../../components/Select/Select.vue2.js";
|
6
|
+
import X from "../../../../components/Upload/Upload.vue.js";
|
7
|
+
import { state as S, actions as g } from "../../store/gallery.js";
|
8
8
|
import "./GalleryWithCategories.vue2.js";
|
9
|
-
import
|
10
|
-
const
|
9
|
+
import Y from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
10
|
+
const Z = { class: "pd-medium flex-nowrap flex pd-t-thin pd-b-thin o-scroll" }, ee = ["onClick"], le = ["data-id"], te = ["src", "onClick"], ae = { class: "modal pd-thin" }, se = { class: "modal-content radius-big" }, oe = { class: "" }, ie = ["src"], ne = {
|
11
11
|
key: 0,
|
12
12
|
class: "flex-v-center flex m modal pd-big"
|
13
|
-
},
|
13
|
+
}, re = { class: "modal-content radius-small pd-medium bg-white" }, ce = ["src"], de = ["src"], ue = !1, E = 10, me = {
|
14
14
|
__name: "GalleryWithCategories",
|
15
15
|
setup(ve) {
|
16
|
-
|
17
|
-
const
|
18
|
-
let f = 1;
|
19
|
-
const
|
20
|
-
|
21
|
-
const G = A(() => v.value === "all" ? I.gallery : I.gallery.filter((t) => t.categories.includes(v.value))), P = async () => {
|
22
|
-
w.value = !0, await g.fetchGallery(f, b), w.value = !1;
|
16
|
+
H();
|
17
|
+
const y = n(null), I = ["all", "place", "drinks", "people", "events"];
|
18
|
+
let f = 1, b = n(null), k = n(!1);
|
19
|
+
const M = $(() => v.value === "all" ? S.gallery : S.gallery.filter((t) => t.categories.includes(v.value))), F = async () => {
|
20
|
+
k.value = !0, await g.fetchGallery(f, E), k.value = !1;
|
23
21
|
}, m = n(null), e = n({
|
24
22
|
categories: "",
|
25
23
|
size: "",
|
26
24
|
image: !1
|
27
|
-
}), d = n(null),
|
28
|
-
|
29
|
-
},
|
25
|
+
}), d = n(null), G = (t) => {
|
26
|
+
ue.value ? P(t) : (m.value = "modal", e.value.image = t, w());
|
27
|
+
}, P = (t) => {
|
30
28
|
m.value = "edit-modal", e.value = t || {
|
31
29
|
categories: "",
|
32
30
|
size: "",
|
33
31
|
image: null
|
34
|
-
},
|
32
|
+
}, w();
|
35
33
|
}, u = () => {
|
36
34
|
e.value = {
|
37
35
|
categories: "",
|
38
36
|
size: "",
|
39
37
|
image: !1
|
40
|
-
}, d.value = null,
|
41
|
-
},
|
38
|
+
}, d.value = null, U();
|
39
|
+
}, w = () => {
|
42
40
|
document.body.style.overflow = "hidden", document.documentElement.style.overflow = "hidden";
|
43
|
-
},
|
41
|
+
}, U = () => {
|
44
42
|
document.body.style.overflow = "", document.documentElement.style.overflow = "";
|
45
|
-
},
|
43
|
+
}, j = [
|
46
44
|
{ name: "Small", value: "" },
|
47
45
|
{ name: "Regular", value: "grid-item--width1 grid-item--height1" },
|
48
46
|
{ name: "Medium", value: "grid-item--width2 grid-item--height2" },
|
49
47
|
{ name: "Big", value: "grid-item--width3 grid-item--height3" }
|
50
|
-
],
|
48
|
+
], B = async () => {
|
51
49
|
await g.updatePhoto(e.value), u();
|
52
|
-
},
|
50
|
+
}, N = (t) => {
|
53
51
|
const a = t.files;
|
54
52
|
if (e.value.image = a, a && a.length > 0) {
|
55
53
|
const l = new FileReader();
|
@@ -57,7 +55,7 @@ const ee = { class: "pd-medium flex-nowrap flex pd-t-thin pd-b-thin o-scroll" },
|
|
57
55
|
d.value = h.target.result;
|
58
56
|
}, l.readAsDataURL(a[0]);
|
59
57
|
}
|
60
|
-
},
|
58
|
+
}, R = async (t) => {
|
61
59
|
if (!e.value.image || !e.value.categories || !e.value.size) {
|
62
60
|
console.error("All fields are required.");
|
63
61
|
return;
|
@@ -69,20 +67,20 @@ const ee = { class: "pd-medium flex-nowrap flex pd-t-thin pd-b-thin o-scroll" },
|
|
69
67
|
}), u();
|
70
68
|
};
|
71
69
|
let v = n("all");
|
72
|
-
const
|
70
|
+
const V = (t) => {
|
73
71
|
v.value = t;
|
74
72
|
};
|
75
|
-
return
|
76
|
-
await g.fetchGallery(f,
|
77
|
-
a.some((l) => l.isIntersecting) && (f += 1,
|
78
|
-
}).observe(
|
73
|
+
return D(async () => {
|
74
|
+
await g.fetchGallery(f, E), typeof window < "u" && new IntersectionObserver((a) => {
|
75
|
+
a.some((l) => l.isIntersecting) && (f += 1, F());
|
76
|
+
}).observe(b.value);
|
79
77
|
}), (t, a) => (o(), i("div", null, [
|
80
|
-
s("div",
|
81
|
-
(o(), i(
|
78
|
+
s("div", Z, [
|
79
|
+
(o(), i(C, null, z(I, (l) => s("a", {
|
82
80
|
key: l,
|
83
|
-
onClick: (h) =>
|
84
|
-
class:
|
85
|
-
},
|
81
|
+
onClick: (h) => V(l),
|
82
|
+
class: A(["h3 uppercase mn-r-big", { "t-transp": L(v) !== l }])
|
83
|
+
}, x(t.$t("gallery.categories." + l)), 11, ee)), 64)),
|
86
84
|
r("", !0)
|
87
85
|
]),
|
88
86
|
s("div", {
|
@@ -90,7 +88,7 @@ const ee = { class: "pd-medium flex-nowrap flex pd-t-thin pd-b-thin o-scroll" },
|
|
90
88
|
ref: y,
|
91
89
|
class: "pd-medium cols-4 gap-thin"
|
92
90
|
}, [
|
93
|
-
(o(!0), i(
|
91
|
+
(o(!0), i(C, null, z(M.value, (l, h) => (o(), i("div", {
|
94
92
|
key: l.id,
|
95
93
|
"data-id": l.id
|
96
94
|
}, [
|
@@ -103,41 +101,41 @@ const ee = { class: "pd-medium flex-nowrap flex pd-t-thin pd-b-thin o-scroll" },
|
|
103
101
|
key: 0,
|
104
102
|
src: "https://thecommunephuket.com/photos/" + l.cover,
|
105
103
|
class: "w-100 h-100 o-hidden radius-medium object-fit-cover",
|
106
|
-
onClick: (pe) =>
|
107
|
-
}, null, 8,
|
104
|
+
onClick: (pe) => G(l.image)
|
105
|
+
}, null, 8, te)) : r("", !0)
|
108
106
|
]),
|
109
107
|
_: 2
|
110
108
|
}, 1024)
|
111
|
-
], 8,
|
109
|
+
], 8, le))), 128)),
|
112
110
|
s("div", {
|
113
111
|
ref_key: "sentinel",
|
114
|
-
ref:
|
112
|
+
ref: b,
|
115
113
|
class: "sentinel"
|
116
114
|
}, null, 512),
|
117
115
|
c(_, { name: "modal" }, {
|
118
116
|
default: p(() => [
|
119
|
-
|
120
|
-
s("div",
|
121
|
-
s("div",
|
117
|
+
O(s("div", ae, [
|
118
|
+
s("div", se, [
|
119
|
+
s("div", oe, [
|
122
120
|
s("span", {
|
123
121
|
class: "close",
|
124
122
|
onClick: u
|
125
123
|
}, "×"),
|
126
124
|
s("img", {
|
127
125
|
src: "https://thecommunephuket.com/photos/" + e.value.image
|
128
|
-
}, null, 8,
|
126
|
+
}, null, 8, ie)
|
129
127
|
])
|
130
128
|
])
|
131
129
|
], 512), [
|
132
|
-
[
|
130
|
+
[T, e.value.image !== !1 && m.value === "modal"]
|
133
131
|
])
|
134
132
|
]),
|
135
133
|
_: 1
|
136
134
|
}),
|
137
135
|
c(_, { name: "modal" }, {
|
138
136
|
default: p(() => [
|
139
|
-
e.value.image !== !1 && m.value === "edit-modal" ? (o(), i("div",
|
140
|
-
s("div",
|
137
|
+
e.value.image !== !1 && m.value === "edit-modal" ? (o(), i("div", ne, [
|
138
|
+
s("div", re, [
|
141
139
|
s("span", {
|
142
140
|
class: "close",
|
143
141
|
onClick: u
|
@@ -146,30 +144,30 @@ const ee = { class: "pd-medium flex-nowrap flex pd-t-thin pd-b-thin o-scroll" },
|
|
146
144
|
key: 0,
|
147
145
|
src: d.value,
|
148
146
|
class: "radius-small w-100 mn-small h-20r object-fit-cover"
|
149
|
-
}, null, 8,
|
147
|
+
}, null, 8, ce)) : r("", !0),
|
150
148
|
typeof d.value == "object" && e.value.image !== null ? (o(), i("img", {
|
151
149
|
key: 1,
|
152
150
|
class: "radius-small w-100 mn-small h-20r object-fit-cover",
|
153
151
|
src: "/photos/" + e.value.cover
|
154
|
-
}, null, 8,
|
155
|
-
e.value._id ? r("", !0) : (o(),
|
152
|
+
}, null, 8, de)) : r("", !0),
|
153
|
+
e.value._id ? r("", !0) : (o(), W(X, {
|
156
154
|
key: 2,
|
157
155
|
id: "photo",
|
158
156
|
name: "photo",
|
159
157
|
type: "file",
|
160
158
|
class: "t-black bg-grey pd-thin radius-small mn-thin",
|
161
|
-
onFileChange:
|
159
|
+
onFileChange: N,
|
162
160
|
multiple: "true"
|
163
161
|
})),
|
164
|
-
c(
|
165
|
-
options:
|
162
|
+
c(Q, {
|
163
|
+
options: j,
|
166
164
|
label: "Size",
|
167
165
|
select: e.value.size,
|
168
166
|
"onUpdate:select": a[1] || (a[1] = (l) => e.value.size = l),
|
169
167
|
placeholder: "Select Size",
|
170
168
|
class: "bg-grey pd-thin radius-small mn-thin t-black"
|
171
169
|
}, null, 8, ["select"]),
|
172
|
-
c(
|
170
|
+
c(J, {
|
173
171
|
field: e.value.categories,
|
174
172
|
"onUpdate:field": a[2] || (a[2] = (l) => e.value.categories = l),
|
175
173
|
type: "text",
|
@@ -177,13 +175,13 @@ const ee = { class: "pd-medium flex-nowrap flex pd-t-thin pd-b-thin o-scroll" },
|
|
177
175
|
placeholder: "Enter categories for image (comma separated)",
|
178
176
|
class: "bg-grey pd-thin radius-small mn-medium t-black"
|
179
177
|
}, null, 8, ["field"]),
|
180
|
-
c(
|
181
|
-
submit: e.value._id ?
|
178
|
+
c(K, {
|
179
|
+
submit: e.value._id ? B : R,
|
182
180
|
callback: u,
|
183
181
|
class: "mn-thin"
|
184
182
|
}, {
|
185
183
|
default: p(() => [
|
186
|
-
|
184
|
+
q(x(e.value._id ? "Update" : "Create"), 1)
|
187
185
|
]),
|
188
186
|
_: 1
|
189
187
|
}, 8, ["submit"])
|
@@ -195,7 +193,7 @@ const ee = { class: "pd-medium flex-nowrap flex pd-t-thin pd-b-thin o-scroll" },
|
|
195
193
|
], 512)
|
196
194
|
]));
|
197
195
|
}
|
198
|
-
}, ze = /* @__PURE__ */
|
196
|
+
}, ze = /* @__PURE__ */ Y(me, [["__scopeId", "data-v-34379ac8"]]);
|
199
197
|
export {
|
200
198
|
ze as default
|
201
199
|
};
|
package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l={class:"mn-small w-100"},
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l={class:"mn-small w-100"},a=["href"],n=e.createElementVNode("span",{class:"t-semi uppercase"},"Website",-1),c=[n],i=["href"],d=e.createElementVNode("span",{class:"t-semi uppercase"},"Phone",-1),p=[d],m=["href"],u=e.createElementVNode("span",{class:"t-semi uppercase"},"Email",-1),_=[u],h=["href"],f=e.createElementVNode("span",{class:"t-semi uppercase"},"Address",-1),b=[f],w={__name:"Contacts",props:{website:String,phone:String,email:String,address:String},setup(o){const t=o,s=e.computed(()=>t.website?!t.website.startsWith("http://")&&!t.website.startsWith("https://")?`http://${t.website}`:t.website:null),r=e.computed(()=>t.address?encodeURIComponent(t.address):null);return(k,x)=>(e.openBlock(),e.createElementBlock("div",l,[s.value?(e.openBlock(),e.createElementBlock("a",{key:0,href:s.value,target:"_blank",class:"w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"},c,8,a)):e.createCommentVNode("",!0),t.phone?(e.openBlock(),e.createElementBlock("a",{key:1,href:`tel:${t.phone}`,class:"w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"},p,8,i)):e.createCommentVNode("",!0),t.email?(e.openBlock(),e.createElementBlock("a",{key:2,href:`mailto:${t.email}`,target:"_blank",class:"w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"},_,8,m)):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("a",{key:3,href:`https://www.google.com/maps/search/?api=1&query=${r.value}`,target:"_blank",class:"w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"},b,8,h)):e.createCommentVNode("",!0)]))}};exports.default=w;
|
package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
import { computed as
|
2
|
-
const
|
3
|
-
|
4
|
-
],
|
5
|
-
|
6
|
-
],
|
7
|
-
|
8
|
-
],
|
9
|
-
|
10
|
-
],
|
1
|
+
import { computed as n, openBlock as s, createElementBlock as t, createCommentVNode as r, createElementVNode as a } from "vue";
|
2
|
+
const c = { class: "mn-small w-100" }, d = ["href"], p = /* @__PURE__ */ a("span", { class: "t-semi uppercase" }, "Website", -1), _ = [
|
3
|
+
p
|
4
|
+
], h = ["href"], m = /* @__PURE__ */ a("span", { class: "t-semi uppercase" }, "Phone", -1), u = [
|
5
|
+
m
|
6
|
+
], f = ["href"], b = /* @__PURE__ */ a("span", { class: "t-semi uppercase" }, "Email", -1), w = [
|
7
|
+
b
|
8
|
+
], x = ["href"], g = /* @__PURE__ */ a("span", { class: "t-semi uppercase" }, "Address", -1), k = [
|
9
|
+
g
|
10
|
+
], W = {
|
11
11
|
__name: "Contacts",
|
12
12
|
props: {
|
13
13
|
website: String,
|
@@ -15,35 +15,35 @@ const d = { class: "mn-small w-100" }, p = ["href"], _ = /* @__PURE__ */ o("span
|
|
15
15
|
email: String,
|
16
16
|
address: String
|
17
17
|
},
|
18
|
-
setup(
|
19
|
-
const e =
|
20
|
-
return (v,
|
21
|
-
|
18
|
+
setup(i) {
|
19
|
+
const e = i, l = n(() => e.website ? !e.website.startsWith("http://") && !e.website.startsWith("https://") ? `http://${e.website}` : e.website : null), o = n(() => e.address ? encodeURIComponent(e.address) : null);
|
20
|
+
return (v, y) => (s(), t("div", c, [
|
21
|
+
l.value ? (s(), t("a", {
|
22
22
|
key: 0,
|
23
|
-
href:
|
23
|
+
href: l.value,
|
24
24
|
target: "_blank",
|
25
25
|
class: "w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"
|
26
|
-
},
|
26
|
+
}, _, 8, d)) : r("", !0),
|
27
27
|
e.phone ? (s(), t("a", {
|
28
28
|
key: 1,
|
29
29
|
href: `tel:${e.phone}`,
|
30
30
|
class: "w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"
|
31
|
-
}, u, 8,
|
31
|
+
}, u, 8, h)) : r("", !0),
|
32
32
|
e.email ? (s(), t("a", {
|
33
33
|
key: 2,
|
34
34
|
href: `mailto:${e.email}`,
|
35
35
|
target: "_blank",
|
36
36
|
class: "w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"
|
37
|
-
},
|
38
|
-
|
37
|
+
}, w, 8, f)) : r("", !0),
|
38
|
+
o.value ? (s(), t("a", {
|
39
39
|
key: 3,
|
40
|
-
href: `https://www.google.com/maps/search/?api=1&query=${
|
40
|
+
href: `https://www.google.com/maps/search/?api=1&query=${o.value}`,
|
41
41
|
target: "_blank",
|
42
42
|
class: "w-100 br-2px br-solid br-grey radius-small pd-small flex-v-center flex-nowrap flex"
|
43
|
-
},
|
43
|
+
}, k, 8, x)) : r("", !0)
|
44
44
|
]));
|
45
45
|
}
|
46
46
|
};
|
47
47
|
export {
|
48
|
-
|
48
|
+
W as default
|
49
49
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("../../../../../../node_modules/vue-select/dist/vue-select.es.cjs");require("../../../../components/Field/Field.vue.cjs");const _=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Select/Select.vue.cjs");require("./DepartmentMemberModify.vue2.cjs");const k={class:"br-grey radius-small mn-small"},v={key:1,class:"pd-small br-grey br-1px br-solid"},y=["disabled"],B={__name:"DepartmentMemberModify",props:{isPopupOpen:Boolean,department:Number,departments:Array,maindepartment:Object,alldepartments:Array},emits:["callback","remove"],setup(u,{emit:m}){const t=u,a=m,n=e.ref({subdepartment:null});t.department!==null&&(n.value=t.departments[t.department]);function d(o,l,r){return o.filter(s=>!(l.some(b=>b._id===s._id)||r._id===s._id))}const c=e.computed(()=>d(t.alldepartments,t.departments,t.maindepartment));async function i(){t.departments.push(n.value.subdepartment),a("callback")}async function p(){t.departments.splice(t.department,1),a("callback")}return(o,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",k,[t.department===null?(e.openBlock(),e.createBlock(e.unref(f.default),{key:0,modelValue:n.value.subdepartment,"onUpdate:modelValue":l[0]||(l[0]=r=>n.value.subdepartment=r),options:c.value,"get-option-label":r=>r.name,class:"w-100 mn-small"},null,8,["modelValue","options","get-option-label"])):(e.openBlock(),e.createElementBlock("div",v,e.toDisplayString(n.value.name?n.value.name:"Безымянный"),1))]),t.department===null?(e.openBlock(),e.createElementBlock("button",{key:0,disabled:!n.value.subdepartment,onClick:i,class:"w-100 button bg-second t-white"}," Добавить отдел ",8,y)):e.createCommentVNode("",!0),t.department!==null?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:p,class:"w-100 button bg-fourth t-white"}," Удалить отдел ")):e.createCommentVNode("",!0)]))}},g=_.default(B,[["__scopeId","data-v-21f393e1"]]);exports.default=g;
|
@@ -1,13 +1,13 @@
|
|
1
|
-
import { ref as v, computed as y, openBlock as
|
2
|
-
import
|
1
|
+
import { ref as v, computed as y, openBlock as r, createElementBlock as l, createElementVNode as k, createBlock as g, unref as h, toDisplayString as w, createCommentVNode as p } from "vue";
|
2
|
+
import D from "../../../../../../node_modules/vue-select/dist/vue-select.es.js";
|
3
3
|
import "../../../../components/Field/Field.vue.js";
|
4
|
-
import
|
4
|
+
import M from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
5
5
|
import "../../../../components/Select/Select.vue.js";
|
6
6
|
import "./DepartmentMemberModify.vue2.js";
|
7
|
-
const
|
7
|
+
const V = { class: "br-grey radius-small mn-small" }, x = {
|
8
8
|
key: 1,
|
9
9
|
class: "pd-small br-grey br-1px br-solid"
|
10
|
-
},
|
10
|
+
}, B = ["disabled"], C = {
|
11
11
|
__name: "DepartmentMemberModify",
|
12
12
|
props: {
|
13
13
|
isPopupOpen: Boolean,
|
@@ -17,46 +17,46 @@ const M = { class: "br-grey radius-small mn-small" }, V = {
|
|
17
17
|
alldepartments: Array
|
18
18
|
},
|
19
19
|
emits: ["callback", "remove"],
|
20
|
-
setup(
|
21
|
-
const e =
|
20
|
+
setup(d, { emit: i }) {
|
21
|
+
const e = d, o = i, t = v({
|
22
22
|
subdepartment: null
|
23
23
|
});
|
24
24
|
e.department !== null && (t.value = e.departments[e.department]);
|
25
|
-
function
|
26
|
-
return m.filter((s) => !(a.some((_) => _._id === s._id) ||
|
25
|
+
function u(m, a, n) {
|
26
|
+
return m.filter((s) => !(a.some((_) => _._id === s._id) || n._id === s._id));
|
27
27
|
}
|
28
|
-
const c = y(() =>
|
28
|
+
const c = y(() => u(e.alldepartments, e.departments, e.maindepartment));
|
29
29
|
async function b() {
|
30
30
|
e.departments.push(t.value.subdepartment), o("callback");
|
31
31
|
}
|
32
32
|
async function f() {
|
33
33
|
e.departments.splice(e.department, 1), o("callback");
|
34
34
|
}
|
35
|
-
return (m, a) => (
|
36
|
-
k("div",
|
37
|
-
e.department === null ? (
|
35
|
+
return (m, a) => (r(), l("div", null, [
|
36
|
+
k("div", V, [
|
37
|
+
e.department === null ? (r(), g(h(D), {
|
38
38
|
key: 0,
|
39
39
|
modelValue: t.value.subdepartment,
|
40
|
-
"onUpdate:modelValue": a[0] || (a[0] = (
|
41
|
-
options:
|
42
|
-
"get-option-label": (
|
40
|
+
"onUpdate:modelValue": a[0] || (a[0] = (n) => t.value.subdepartment = n),
|
41
|
+
options: c.value,
|
42
|
+
"get-option-label": (n) => n.name,
|
43
43
|
class: "w-100 mn-small"
|
44
|
-
}, null, 8, ["modelValue", "options", "get-option-label"])) : (
|
44
|
+
}, null, 8, ["modelValue", "options", "get-option-label"])) : (r(), l("div", x, w(t.value.name ? t.value.name : "Безымянный"), 1))
|
45
45
|
]),
|
46
|
-
e.department === null ? (
|
46
|
+
e.department === null ? (r(), l("button", {
|
47
47
|
key: 0,
|
48
48
|
disabled: !t.value.subdepartment,
|
49
49
|
onClick: b,
|
50
50
|
class: "w-100 button bg-second t-white"
|
51
|
-
}, " Добавить отдел ", 8,
|
52
|
-
e.department !== null ? (
|
51
|
+
}, " Добавить отдел ", 8, B)) : p("", !0),
|
52
|
+
e.department !== null ? (r(), l("button", {
|
53
53
|
key: 1,
|
54
54
|
onClick: f,
|
55
55
|
class: "w-100 button bg-fourth t-white"
|
56
|
-
}, " Удалить отдел ")) :
|
56
|
+
}, " Удалить отдел ")) : p("", !0)
|
57
57
|
]));
|
58
58
|
}
|
59
|
-
},
|
59
|
+
}, I = /* @__PURE__ */ M(C, [["__scopeId", "data-v-21f393e1"]]);
|
60
60
|
export {
|
61
|
-
|
61
|
+
I as default
|
62
62
|
};
|
package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../../../node_modules/vue-select/dist/vue-select.es.cjs");const r=require("vue-router");require("./EditArray.vue2.cjs");const m={class:"w-100"},d={class:"flex"},
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../../../node_modules/vue-select/dist/vue-select.es.cjs");const r=require("vue-router");require("./EditArray.vue2.cjs");const m={class:"w-100"},d={class:"flex"},_={class:"mn-regular"},f={class:"flex-column flex-wrap block"},k={key:0,class:"w-100"},h={class:"w-100 flex-center flex-nowrap flex"},v={class:"mn-r-regular w-100"},E=["onClick"],g={key:0,class:"mn-t-small mn-small w-100"},p={__name:"EditArray",props:{name:Object,items:Array},emits:["add","remove"],setup(t,{emit:B}){r.useRouter(),r.useRoute();let s=e.reactive([]);e.toRefs(s);const n=e.ref(null),a=e.ref(null),o=e.ref(null);e.computed(()=>{if(n.value===null||o.value===null||o.value==="")return!0;if(n.value.modifications.length>0)return a.value===null});function u(c){store.commit("leftovers/deleteItemFromLeftover",c)}return(c,w)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("div",d,[e.createElementVNode("h3",_,e.toDisplayString(t.name),1)]),e.createElementVNode("ul",f,[t.items.length<1?(e.openBlock(),e.createElementBlock("span",k,"Вы еще не добавили позиции")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(l,i)=>(e.openBlock(),e.createElementBlock("li",{key:l._id,class:"w-100"},[e.createElementVNode("div",h,[e.createElementVNode("span",v,e.toDisplayString(l.name),1),e.createElementVNode("a",{class:"w-20 button",onClick:y=>u(l)},"Удалить",8,E)]),i!=t.items.length-1?(e.openBlock(),e.createElementBlock("hr",g)):e.createCommentVNode("",!0)]))),128))])]))}};exports.default=p;
|
package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { reactive as h, toRefs as v, ref as o, computed as k, openBlock as t, createElementBlock as
|
1
|
+
import { reactive as h, toRefs as v, ref as o, computed as k, openBlock as t, createElementBlock as l, createElementVNode as e, toDisplayString as i, createCommentVNode as m, Fragment as p, renderList as w } from "vue";
|
2
2
|
import "../../../../../../node_modules/vue-select/dist/vue-select.es.js";
|
3
3
|
import { useRouter as x, useRoute as g } from "vue-router";
|
4
4
|
import "./EditArray.vue2.js";
|
@@ -15,7 +15,7 @@ const y = { class: "w-100" }, S = { class: "flex" }, b = { class: "mn-regular" }
|
|
15
15
|
items: Array
|
16
16
|
},
|
17
17
|
emits: ["add", "remove"],
|
18
|
-
setup(
|
18
|
+
setup(s, { emit: I }) {
|
19
19
|
x(), g();
|
20
20
|
let u = h([]);
|
21
21
|
v(u);
|
@@ -26,16 +26,16 @@ const y = { class: "w-100" }, S = { class: "flex" }, b = { class: "mn-regular" }
|
|
26
26
|
if (r.value.modifications.length > 0)
|
27
27
|
return d.value === null;
|
28
28
|
});
|
29
|
-
function
|
29
|
+
function _(a) {
|
30
30
|
store.commit("leftovers/deleteItemFromLeftover", a);
|
31
31
|
}
|
32
|
-
return (a, L) => (t(),
|
32
|
+
return (a, L) => (t(), l("div", y, [
|
33
33
|
e("div", S, [
|
34
|
-
e("h3", b, i(
|
34
|
+
e("h3", b, i(s.name), 1)
|
35
35
|
]),
|
36
36
|
e("ul", C, [
|
37
|
-
|
38
|
-
(t(!0),
|
37
|
+
s.items.length < 1 ? (t(), l("span", E, "Вы еще не добавили позиции")) : m("", !0),
|
38
|
+
(t(!0), l(p, null, w(s.items, (n, f) => (t(), l("li", {
|
39
39
|
key: n._id,
|
40
40
|
class: "w-100"
|
41
41
|
}, [
|
@@ -43,10 +43,10 @@ const y = { class: "w-100" }, S = { class: "flex" }, b = { class: "mn-regular" }
|
|
43
43
|
e("span", A, i(n.name), 1),
|
44
44
|
e("a", {
|
45
45
|
class: "w-20 button",
|
46
|
-
onClick: (N) =>
|
46
|
+
onClick: (N) => _(n)
|
47
47
|
}, "Удалить", 8, B)
|
48
48
|
]),
|
49
|
-
|
49
|
+
f != s.items.length - 1 ? (t(), l("hr", F)) : m("", !0)
|
50
50
|
]))), 128))
|
51
51
|
])
|
52
52
|
]));
|
package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../../../icons/socials/telegram.vue.cjs"),c=require("../../../icons/socials/facebook.vue.cjs"),u=require("../../../icons/socials/instagram.vue.cjs"),m=require("../../../icons/socials/twitter.vue.cjs"),d=require("../../../icons/socials/reddit.vue.cjs"),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("../../../icons/socials/telegram.vue.cjs"),c=require("../../../icons/socials/facebook.vue.cjs"),u=require("../../../icons/socials/instagram.vue.cjs"),m=require("../../../icons/socials/twitter.vue.cjs"),d=require("../../../icons/socials/reddit.vue.cjs"),b=require("../../../icons/socials/line.vue.cjs"),f=require("../../../icons/socials/dribbble.vue.cjs"),p={class:"gap-small flex-nowrap flex"},g=["href"],w={__name:"Socials",props:{telegram:{type:String,default:""},facebook:{type:String,default:""},instagram:{type:String,default:""},twitter:{type:String,default:""},reddit:{type:String,default:""},line:{type:String,default:""},dribbble:{type:String,default:""}},setup(l){const n=l,o=e.computed(()=>[{name:"telegram",base:"https://t.me/"},{name:"facebook",base:"https://www.facebook.com/"},{name:"instagram",base:"https://www.instagram.com/"},{name:"twitter",base:"https://twitter.com/"},{name:"reddit",base:"https://www.reddit.com/user/"},{name:"line",base:""},{name:"dribbble",base:"https://dribbble.com/"}].filter(t=>n[t.name]).map(t=>({name:t.name,href:t.base+n[t.name]})));function s(r){return{telegram:i.default,facebook:c.default,instagram:u.default,twitter:m.default,reddit:d.default,line:b.default,dribbble:f.default}[r]||null}return(r,t)=>(e.openBlock(),e.createElementBlock("div",p,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,a=>(e.openBlock(),e.createElementBlock("a",{key:a.name,href:a.href,target:"_blank",class:"i-big bg-second t-white flex-nowrap flex-center flex radius-extra"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(s(a.name)),{class:"i-medium"}))],8,g))),128))]))}};exports.default=w;
|
package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
import { computed as c, openBlock as t, createElementBlock as
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
const
|
1
|
+
import { computed as c, openBlock as t, createElementBlock as n, Fragment as l, renderList as p, createBlock as f, resolveDynamicComponent as b } from "vue";
|
2
|
+
import d from "../../../icons/socials/telegram.vue.js";
|
3
|
+
import u from "../../../icons/socials/facebook.vue.js";
|
4
|
+
import g from "../../../icons/socials/instagram.vue.js";
|
5
|
+
import w from "../../../icons/socials/twitter.vue.js";
|
6
|
+
import h from "../../../icons/socials/reddit.vue.js";
|
7
|
+
import k from "../../../icons/socials/line.vue.js";
|
8
|
+
import _ from "../../../icons/socials/dribbble.vue.js";
|
9
|
+
const y = { class: "gap-small flex-nowrap flex" }, I = ["href"], C = {
|
10
10
|
__name: "Socials",
|
11
11
|
props: {
|
12
12
|
telegram: {
|
@@ -54,27 +54,27 @@ const I = { class: "gap-small flex-nowrap flex" }, S = ["href"], E = {
|
|
54
54
|
})));
|
55
55
|
function s(r) {
|
56
56
|
return {
|
57
|
-
telegram:
|
58
|
-
facebook:
|
59
|
-
instagram:
|
60
|
-
twitter:
|
61
|
-
reddit:
|
62
|
-
line:
|
63
|
-
dribbble:
|
57
|
+
telegram: d,
|
58
|
+
facebook: u,
|
59
|
+
instagram: g,
|
60
|
+
twitter: w,
|
61
|
+
reddit: h,
|
62
|
+
line: k,
|
63
|
+
dribbble: _
|
64
64
|
}[r] || null;
|
65
65
|
}
|
66
|
-
return (r, e) => (t(),
|
67
|
-
(t(!0),
|
68
|
-
key:
|
69
|
-
href:
|
66
|
+
return (r, e) => (t(), n("div", y, [
|
67
|
+
(t(!0), n(l, null, p(m.value, (a) => (t(), n("a", {
|
68
|
+
key: a.name,
|
69
|
+
href: a.href,
|
70
70
|
target: "_blank",
|
71
71
|
class: "i-big bg-second t-white flex-nowrap flex-center flex radius-extra"
|
72
72
|
}, [
|
73
|
-
(t(), b(
|
74
|
-
], 8,
|
73
|
+
(t(), f(b(s(a.name)), { class: "i-medium" }))
|
74
|
+
], 8, I))), 128))
|
75
75
|
]));
|
76
76
|
}
|
77
77
|
};
|
78
78
|
export {
|
79
|
-
|
79
|
+
C as default
|
80
80
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),m=require("../../../../components/Button/Button.vue2.cjs");require("../../../auth/store/auth.cjs");const i=require("../../store/memberships.cjs"),g={__name:"ButtonToggleMembership",props:{user:{type:String,required:!0},type:{type:String,required:!0},role:{type:String,required:!1},target:{type:String,required:!0},text:{type:Object,default:{create:"join",remove:"leave"}},status:{type:Boolean,required:!0}},emits:["updateMembership"],setup(o,{emit:c}){const u=c,e=o,n=async()=>{e.status?await l():await p()};async function p(){try{const t={user:e.user,type:e.type,role:e.role,target:e.target},s=await i.actions.create(t);u("updateMembership",{membership:s,target:e.target,status:!0})}catch(t){throw console.log(t),t}}async function l(t){const s={user:e.user,type:e.type,role:e.role,target:e.target};try{const a=await i.actions.delete(s);u("updateMembership",{membership:a,target:e.target,status:!1})}catch(a){throw console.log(a),a}}return(t,s)=>(r.openBlock(),r.createBlock(m.default,{submit:n,showSucces:!1,class:"button-small button"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.status?e.text.remove:e.text.create),1)]),_:1}))}};exports.default=g;
|