@ozdao/prometheus-framework 0.1.83 → 0.1.85

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.cjs +1 -1
  2. package/dist/prometheus-framework/node_modules/@capacitor/core/dist/index.js +22 -22
  3. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  4. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +2 -49
  5. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +49 -2
  7. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +72 -2
  9. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +2 -72
  11. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +40 -41
  13. package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
  14. package/dist/prometheus-framework/src/modules/auth/store/auth.js +84 -105
  15. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  17. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  19. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
  21. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  23. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  25. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  27. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  31. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  33. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  35. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  37. package/dist/style.css +1 -1
  38. package/package.json +1 -1
  39. package/src/modules/auth/components/pages/ResetPassword.vue +1 -1
  40. package/src/modules/auth/components/pages/SignIn.vue +0 -1
  41. package/src/modules/auth/store/auth.js +42 -42
@@ -1,4 +1,4 @@
1
- import { ref as c, onMounted as x, resolveComponent as U, openBlock as C, createElementBlock as E, createTextVNode as u, toDisplayString as d, createElementVNode as l, unref as a, createVNode as i, withCtx as m, Transition as f, withDirectives as v, vShow as g } from "vue";
1
+ import { ref as p, onMounted as U, resolveComponent as k, openBlock as C, createElementBlock as E, createElementVNode as l, createTextVNode as c, toDisplayString as d, unref as o, createVNode as i, withCtx as u, Transition as f, withDirectives as v, vShow as g } from "vue";
2
2
  import I from "../../../../components/Tab/Tab.vue2.js";
3
3
  import w from "../../../../components/Field/Field.vue2.js";
4
4
  import D from "../../../../components/FieldPhone/FieldPhone.vue.js";
@@ -6,69 +6,68 @@ import j from "../../../../components/Button/Button.vue2.js";
6
6
  import { useRoute as F, useRouter as N } from "vue-router";
7
7
  import { useI18n as O } from "vue-i18n";
8
8
  import T from "../../localization/SignIn.json.js";
9
- import { state as o, actions as q } from "../../store/auth.js";
9
+ import { state as s, actions as q } from "../../store/auth.js";
10
10
  import { validateInputs as b, validatePhone as A, validateEmail as B } from "../../../middlewares/client/inputs.validation.js";
11
11
  import "./SignIn.vue2.js";
12
12
  const R = { class: "" }, $ = ["src"], L = { class: "mn-medium" }, M = /* @__PURE__ */ l("br", null, null, -1), z = { class: "t-semi" }, G = { class: "mn-big" }, H = { class: "mn-small p-small uppercase t-semi bg-grey radius-big o-hidden" }, J = { class: "pos-relative" }, K = { class: "mn-thin radius-small" }, Q = { class: "mn-thin radius-small o-hidden" }, W = { class: "w-100 mn-big" }, de = {
13
13
  __name: "SignIn",
14
14
  setup(X) {
15
- const h = c(null), y = c(null), _ = c(null);
15
+ const h = p(null), y = p(null), _ = p(null);
16
16
  F();
17
- const V = N(), { t: s } = O(T), n = c("phone"), P = (r) => new Promise((t, p) => {
17
+ const V = N(), { t: a } = O(T), n = p("phone"), x = (r) => new Promise((t, m) => {
18
18
  const e = document.createElement("script");
19
- e.type = "text/javascript", e.src = r, e.onload = t, e.onerror = p, document.head.appendChild(e);
19
+ e.type = "text/javascript", e.src = r, e.onload = t, e.onerror = m, document.head.appendChild(e);
20
20
  });
21
- x(async () => {
22
- await P("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js");
21
+ U(async () => {
22
+ await x("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js");
23
23
  });
24
- async function S() {
24
+ async function P() {
25
25
  try {
26
26
  n.value === "phone" && await b(
27
27
  h,
28
28
  A,
29
- o.user.phone,
29
+ s.user.phone,
30
30
  "Некорректный телефон"
31
31
  ), n.value === "email" && await b(
32
32
  _,
33
33
  B,
34
- o.user.email,
34
+ s.user.email,
35
35
  "Некорректный email"
36
36
  );
37
37
  } catch {
38
38
  throw new Error();
39
39
  }
40
- const r = { ...o.user };
41
- r.phone = o.user.phone.number, await q.login(r, n.value);
40
+ const r = { ...s.user };
41
+ r.phone = s.user.phone.number, await q.login(r, n.value);
42
42
  }
43
- function k() {
43
+ function S() {
44
44
  V.push({
45
45
  name: "User Profile",
46
46
  params: {
47
- _id: o.user._id
47
+ _id: s.user._id
48
48
  },
49
49
  query: { afterAuth: "true" }
50
50
  });
51
51
  }
52
52
  return (r, t) => {
53
- const p = U("router-link");
53
+ const m = k("router-link");
54
54
  return C(), E("section", R, [
55
- u(d(r.document.cookie) + " ", 1),
56
55
  l("img", {
57
56
  src: "/logo/logo_square.svg",
58
57
  class: "i-extra radius-small mn-small"
59
58
  }, null, 8, $),
60
59
  l("h3", L, [
61
- u(d(a(s)("title")) + " ", 1),
60
+ c(d(o(a)("title")) + " ", 1),
62
61
  M,
63
- l("span", z, d(a(s)("subtitle")), 1)
62
+ l("span", z, d(o(a)("subtitle")), 1)
64
63
  ]),
65
64
  l("p", G, [
66
- i(p, {
65
+ i(m, {
67
66
  to: { name: "Sign Up" },
68
67
  class: "underline t-second"
69
68
  }, {
70
- default: m(() => [
71
- u(d(a(s)("signup")), 1)
69
+ default: u(() => [
70
+ c(d(o(a)("signup")), 1)
72
71
  ]),
73
72
  _: 1
74
73
  })
@@ -78,18 +77,18 @@ const R = { class: "" }, $ = ["src"], L = { class: "mn-medium" }, M = /* @__PURE
78
77
  selected: n.value,
79
78
  "onUpdate:selected": t[0] || (t[0] = (e) => n.value = e),
80
79
  tabs: [
81
- { name: a(s)("phone"), value: "phone" },
82
- { name: a(s)("email"), value: "email" }
80
+ { name: o(a)("phone"), value: "phone" },
81
+ { name: o(a)("email"), value: "email" }
83
82
  ]
84
83
  }, null, 8, ["selected", "tabs"])
85
84
  ]),
86
85
  l("div", J, [
87
86
  i(f, { name: "slide-fade" }, {
88
- default: m(() => [
87
+ default: u(() => [
89
88
  v(l("div", K, [
90
89
  i(D, {
91
- modelValue: o.user.phone,
92
- "onUpdate:modelValue": t[1] || (t[1] = (e) => o.user.phone = e),
90
+ modelValue: s.user.phone,
91
+ "onUpdate:modelValue": t[1] || (t[1] = (e) => s.user.phone = e),
93
92
  dropdownOptions: {
94
93
  showDialCodeInSelection: !0,
95
94
  showFlags: !0,
@@ -97,7 +96,7 @@ const R = { class: "" }, $ = ["src"], L = { class: "mn-medium" }, M = /* @__PURE
97
96
  },
98
97
  validation: h.value,
99
98
  mode: "national",
100
- inputOptions: { placeholder: a(s)("phonePlaceholder") },
99
+ inputOptions: { placeholder: o(a)("phonePlaceholder") },
101
100
  class: "bg-grey pd-small radius-small mn-thin"
102
101
  }, null, 8, ["modelValue", "validation", "inputOptions"])
103
102
  ], 512), [
@@ -107,12 +106,12 @@ const R = { class: "" }, $ = ["src"], L = { class: "mn-medium" }, M = /* @__PURE
107
106
  _: 1
108
107
  }),
109
108
  i(f, { name: "slide-fade" }, {
110
- default: m(() => [
109
+ default: u(() => [
111
110
  v(l("div", Q, [
112
111
  i(w, {
113
- field: o.user.email,
114
- "onUpdate:field": t[2] || (t[2] = (e) => o.user.email = e),
115
- placeholder: a(s)("emailPlaceholder"),
112
+ field: s.user.email,
113
+ "onUpdate:field": t[2] || (t[2] = (e) => s.user.email = e),
114
+ placeholder: o(a)("emailPlaceholder"),
116
115
  validation: _.value,
117
116
  class: "bg-grey pd-medium radius-small"
118
117
  }, null, 8, ["field", "placeholder", "validation"])
@@ -124,31 +123,31 @@ const R = { class: "" }, $ = ["src"], L = { class: "mn-medium" }, M = /* @__PURE
124
123
  })
125
124
  ]),
126
125
  i(w, {
127
- field: o.user.password,
128
- "onUpdate:field": t[3] || (t[3] = (e) => o.user.password = e),
126
+ field: s.user.password,
127
+ "onUpdate:field": t[3] || (t[3] = (e) => s.user.password = e),
129
128
  type: "password",
130
129
  validation: y.value,
131
- placeholder: a(s)("passwordPlaceholder"),
130
+ placeholder: o(a)("passwordPlaceholder"),
132
131
  class: "bg-grey pd-medium radius-small mn-semi"
133
132
  }, null, 8, ["field", "validation", "placeholder"]),
134
133
  l("div", W, [
135
- i(p, {
134
+ i(m, {
136
135
  to: "/auth/reset-password",
137
136
  class: "underline d-block t-blue"
138
137
  }, {
139
- default: m(() => [
140
- u(d(a(s)("forgotPassword")), 1)
138
+ default: u(() => [
139
+ c(d(o(a)("forgotPassword")), 1)
141
140
  ]),
142
141
  _: 1
143
142
  })
144
143
  ]),
145
144
  i(j, {
146
- submit: S,
147
- callback: k,
145
+ submit: P,
146
+ callback: S,
148
147
  class: "mn-thin"
149
148
  }, {
150
- default: m(() => [
151
- u(d(a(s)("signin")), 1)
149
+ default: u(() => [
150
+ c(d(o(a)("signin")), 1)
152
151
  ]),
153
152
  _: 1
154
153
  })
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../../../../node_modules/axios/lib/axios.cjs"),d=require("../../../../../node_modules/js-cookie/src/js.cookie.cjs"),l=require("../../../../node_modules/@capacitor/core/dist/index.cjs"),w=require("vue"),n=require("../../globals/store/globals.cjs"),f=require("./twofa.cjs"),i=k.default.create({baseURL:process.env.API_URL,withCredentials:!0}),a=w.reactive({user:{_id:void 0,username:"",email:"",phone:"",password:"",passwordRepeat:""},access:{roles:null,token:null,status:!1}});async function O(){const e=await m("user");if(e){const{_id:t,email:s,phone:c,roles:o,accessToken:r}=e;Object.assign(a.user,{_id:t,email:s,phone:c}),Object.assign(a.access,{token:r,roles:o,status:!!r}),i.interceptors.request.use(u=>(r&&(u.headers["x-access-token"]=r),u),u=>Promise.reject(u))}}O();const g={async login(e,t){try{const s=await i.post("/api/auth/signin",{...e,type:t});return p("user",s.data),Object.assign(a.user,{...s.data}),Object.assign(a.access,{token:s.data.accessToken,status:!0,roles:s.data.roles}),s.data}catch(s){return Object.assign(a.access,{token:null,status:!1,roles:null}),n.setError(s),Promise.reject(s)}},async signup(e,t,s){const{password:c,passwordRepeat:o}=a.user;if(c!==o){const r={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw n.setError(r),new Error(r.response.status)}try{e.phone=e.phone.number;const r=await i.post("/api/auth/signup",{...e,type:t,inviteCode:s});return r.data.accessToken&&p("user",r.data),Object.assign(a.user,{...r.data}),Object.assign(a.access,{token:r.data.accessToken,status:!0,roles:r.data.roles}),r.data}catch(r){throw n.setError(r),console.log("Sign up falied"),r}},logout(){P("user"),Object.assign(a.user,{email:"",phone:"",password:"",passwordRepeat:""}),Object.assign(a.access,{token:null,status:!1})},async resetPassword(e,t){try{const s=await i.post("/api/auth/reset-password",{email:e.email,phone:e.phone.number,type:t});return Object.assign(f.state.code,{...s.data,isSended:!0}),s.data}catch(s){return n.setError(s),Promise.reject(s)}},async updatePassword(e,t){const{password:s,passwordRepeat:c}=a.user;if(s!==c){const o={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw n.setError(o),new Error(o.response.status)}try{const o=await i.post("/api/auth/update-password",{email:e.email,phone:e.phone.number,password:e.password,passwordRepeat:e.passwordRepeat,type:t});return o.data.accessToken&&p("user",o.data),Object.assign(a.user,{...o.data}),Object.assign(a.access,{token:o.data.accessToken,status:!0}),o.data}catch(o){return n.setError(o),Promise.reject(o)}}},h={development:{secure:!1,expires:1},production:{expires:1,domain:process.env.API_URL,sameSite:"none",secure:!0}};function m(e){if(process.env.MOBILE_APP)return l.CapacitorCookies.getCookies();{const t=d.default.get(e);return t?JSON.parse(t):null}}function p(e,t,s=process.env.NODE_ENV){process.env.MOBILE_APP?l.CapacitorCookies.setCookie({url:process.env.API_URL,key:e,value:JSON.stringify(t)}):d.default.set(e,JSON.stringify(t),h[s])}function P(e,t=process.env.NODE_ENV){if(process.env.MOBILE_APP)l.CapacitorCookies.deleteCookie({url:process.env.API_URL,key:e});else{const s=t==="production"?{domain:process.env.API_URL}:{};d.default.remove(e,s)}}w.watch(a,(e,t)=>{});exports.actions=g;exports.state=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("../../../../node_modules/axios/lib/axios.cjs"),p=require("../../../../../node_modules/js-cookie/src/js.cookie.cjs");require("../../../../node_modules/@capacitor/core/dist/index.cjs");const l=require("vue"),n=require("../../globals/store/globals.cjs"),g=require("./twofa.cjs"),i=w.default.create({baseURL:process.env.API_URL,withCredentials:!0}),o=l.reactive({user:{_id:void 0,username:"",email:"",phone:"",password:"",passwordRepeat:""},access:{roles:null,token:null,status:!1}}),d=f("user");if(d){const{_id:s,email:r,phone:e,roles:c,accessToken:t}=d;Object.assign(o.user,{_id:s,email:r,phone:e}),Object.assign(o.access,{token:t,roles:c,status:!!t}),i.interceptors.request.use(a=>(t&&(a.headers["x-access-token"]=t),a),a=>Promise.reject(a))}const h={async login(s,r){try{const e=await i.post("/api/auth/signin",{...s,type:r});return u("user",e.data),Object.assign(o.user,{...e.data}),Object.assign(o.access,{token:e.data.accessToken,status:!0,roles:e.data.roles}),e.data}catch(e){return Object.assign(o.access,{token:null,status:!1,roles:null}),n.setError(e),Promise.reject(e)}},async signup(s,r,e){const{password:c,passwordRepeat:t}=o.user;if(c!==t){const a={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw n.setError(a),new Error(a.response.status)}try{s.phone=s.phone.number;const a=await i.post("/api/auth/signup",{...s,type:r,inviteCode:e});return a.data.accessToken&&u("user",a.data),Object.assign(o.user,{...a.data}),Object.assign(o.access,{token:a.data.accessToken,status:!0,roles:a.data.roles}),a.data}catch(a){throw n.setError(a),console.log("Sign up falied"),a}},logout(){m("user"),Object.assign(o.user,{email:"",phone:"",password:"",passwordRepeat:""}),Object.assign(o.access,{token:null,status:!1})},async resetPassword(s,r){try{const e=await i.post("/api/auth/reset-password",{email:s.email,phone:s.phone.number,type:r});return Object.assign(g.state.code,{...e.data,isSended:!0}),e.data}catch(e){return n.setError(e),Promise.reject(e)}},async updatePassword(s,r){const{password:e,passwordRepeat:c}=o.user;if(e!==c){const t={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw n.setError(t),new Error(t.response.status)}try{const t=await i.post("/api/auth/update-password",{email:s.email,phone:s.phone.number,password:s.password,passwordRepeat:s.passwordRepeat,type:r});return t.data.accessToken&&u("user",t.data),Object.assign(o.user,{...t.data}),Object.assign(o.access,{token:t.data.accessToken,status:!0}),t.data}catch(t){return n.setError(t),Promise.reject(t)}}},O={development:{secure:!1,expires:1},production:{expires:1,domain:process.env.API_URL,sameSite:"none",secure:!0}};function f(s){const r=p.default.get(s);return r?JSON.parse(r):null}function u(s,r,e=process.env.NODE_ENV){p.default.set(s,JSON.stringify(r),O[e])}function m(s,r=process.env.NODE_ENV){const e=r==="production"?{domain:process.env.API_URL}:{};p.default.remove(s,e)}l.watch(o,(s,r)=>{});exports.actions=h;exports.state=o;
@@ -1,10 +1,10 @@
1
- import m from "../../../../node_modules/axios/lib/axios.js";
2
- import d from "../../../../../node_modules/js-cookie/src/js.cookie.js";
3
- import { CapacitorCookies as l } from "../../../../node_modules/@capacitor/core/dist/index.js";
4
- import { reactive as w, watch as f } from "vue";
1
+ import l from "../../../../node_modules/axios/lib/axios.js";
2
+ import u from "../../../../../node_modules/js-cookie/src/js.cookie.js";
3
+ import "../../../../node_modules/@capacitor/core/dist/index.js";
4
+ import { reactive as m, watch as w } from "vue";
5
5
  import { setError as n } from "../../globals/store/globals.js";
6
- import { state as k } from "./twofa.js";
7
- const i = m.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = w({
6
+ import { state as h } from "./twofa.js";
7
+ const i = l.create({ baseURL: process.env.API_URL, withCredentials: !0 }), o = m({
8
8
  user: {
9
9
  _id: void 0,
10
10
  username: "",
@@ -18,154 +18,133 @@ const i = m.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = w
18
18
  token: null,
19
19
  status: !1
20
20
  }
21
- });
22
- async function O() {
23
- const e = await h("user");
24
- if (e) {
25
- const { _id: t, email: s, phone: c, roles: r, accessToken: o } = e;
26
- Object.assign(a.user, { _id: t, email: s, phone: c }), Object.assign(a.access, { token: o, roles: r, status: !!o }), i.interceptors.request.use((p) => (o && (p.headers["x-access-token"] = o), p), (p) => Promise.reject(p));
27
- }
21
+ }), d = f("user");
22
+ if (d) {
23
+ const { _id: s, email: a, phone: e, roles: c, accessToken: t } = d;
24
+ Object.assign(o.user, { _id: s, email: a, phone: e }), Object.assign(o.access, { token: t, roles: c, status: !!t }), i.interceptors.request.use((r) => (t && (r.headers["x-access-token"] = t), r), (r) => Promise.reject(r));
28
25
  }
29
- O();
30
- const S = {
31
- async login(e, t) {
26
+ const C = {
27
+ async login(s, a) {
32
28
  try {
33
- const s = await i.post("/api/auth/signin", {
34
- ...e,
35
- type: t
29
+ const e = await i.post("/api/auth/signin", {
30
+ ...s,
31
+ type: a
36
32
  });
37
- return u("user", s.data), Object.assign(a.user, {
38
- ...s.data
39
- }), Object.assign(a.access, {
40
- token: s.data.accessToken,
33
+ return p("user", e.data), Object.assign(o.user, {
34
+ ...e.data
35
+ }), Object.assign(o.access, {
36
+ token: e.data.accessToken,
41
37
  status: !0,
42
- roles: s.data.roles
43
- }), s.data;
44
- } catch (s) {
45
- return Object.assign(a.access, {
38
+ roles: e.data.roles
39
+ }), e.data;
40
+ } catch (e) {
41
+ return Object.assign(o.access, {
46
42
  token: null,
47
43
  status: !1,
48
44
  roles: null
49
- }), n(s), Promise.reject(s);
45
+ }), n(e), Promise.reject(e);
50
46
  }
51
47
  },
52
- async signup(e, t, s) {
53
- const { password: c, passwordRepeat: r } = a.user;
54
- if (c !== r) {
55
- const o = {
48
+ async signup(s, a, e) {
49
+ const { password: c, passwordRepeat: t } = o.user;
50
+ if (c !== t) {
51
+ const r = {
56
52
  response: {
57
53
  data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
58
54
  }
59
55
  };
60
- throw n(o), new Error(o.response.status);
56
+ throw n(r), new Error(r.response.status);
61
57
  }
62
58
  try {
63
- e.phone = e.phone.number;
64
- const o = await i.post("/api/auth/signup", {
65
- ...e,
66
- type: t,
67
- inviteCode: s
59
+ s.phone = s.phone.number;
60
+ const r = await i.post("/api/auth/signup", {
61
+ ...s,
62
+ type: a,
63
+ inviteCode: e
68
64
  });
69
- return o.data.accessToken && u("user", o.data), Object.assign(a.user, {
70
- ...o.data
71
- }), Object.assign(a.access, {
72
- token: o.data.accessToken,
65
+ return r.data.accessToken && p("user", r.data), Object.assign(o.user, {
66
+ ...r.data
67
+ }), Object.assign(o.access, {
68
+ token: r.data.accessToken,
73
69
  status: !0,
74
- roles: o.data.roles
75
- }), o.data;
76
- } catch (o) {
77
- throw n(o), console.log("Sign up falied"), o;
70
+ roles: r.data.roles
71
+ }), r.data;
72
+ } catch (r) {
73
+ throw n(r), console.log("Sign up falied"), r;
78
74
  }
79
75
  },
80
76
  logout() {
81
- P("user"), Object.assign(a.user, {
77
+ g("user"), Object.assign(o.user, {
82
78
  email: "",
83
79
  phone: "",
84
80
  password: "",
85
81
  passwordRepeat: ""
86
- }), Object.assign(a.access, {
82
+ }), Object.assign(o.access, {
87
83
  token: null,
88
84
  status: !1
89
85
  });
90
86
  },
91
- async resetPassword(e, t) {
87
+ async resetPassword(s, a) {
92
88
  try {
93
- const s = await i.post("/api/auth/reset-password", {
94
- email: e.email,
95
- phone: e.phone.number,
96
- type: t
89
+ const e = await i.post("/api/auth/reset-password", {
90
+ email: s.email,
91
+ phone: s.phone.number,
92
+ type: a
97
93
  });
98
- return Object.assign(k.code, {
99
- ...s.data,
94
+ return Object.assign(h.code, {
95
+ ...e.data,
100
96
  isSended: !0
101
- }), s.data;
102
- } catch (s) {
103
- return n(s), Promise.reject(s);
97
+ }), e.data;
98
+ } catch (e) {
99
+ return n(e), Promise.reject(e);
104
100
  }
105
101
  },
106
- async updatePassword(e, t) {
107
- const { password: s, passwordRepeat: c } = a.user;
108
- if (s !== c) {
109
- const r = {
102
+ async updatePassword(s, a) {
103
+ const { password: e, passwordRepeat: c } = o.user;
104
+ if (e !== c) {
105
+ const t = {
110
106
  response: {
111
107
  data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
112
108
  }
113
109
  };
114
- throw n(r), new Error(r.response.status);
110
+ throw n(t), new Error(t.response.status);
115
111
  }
116
112
  try {
117
- const r = await i.post("/api/auth/update-password", {
118
- email: e.email,
119
- phone: e.phone.number,
120
- password: e.password,
121
- passwordRepeat: e.passwordRepeat,
122
- type: t
113
+ const t = await i.post("/api/auth/update-password", {
114
+ email: s.email,
115
+ phone: s.phone.number,
116
+ password: s.password,
117
+ passwordRepeat: s.passwordRepeat,
118
+ type: a
123
119
  });
124
- return r.data.accessToken && u("user", r.data), Object.assign(a.user, {
125
- ...r.data
126
- }), Object.assign(a.access, {
127
- token: r.data.accessToken,
120
+ return t.data.accessToken && p("user", t.data), Object.assign(o.user, {
121
+ ...t.data
122
+ }), Object.assign(o.access, {
123
+ token: t.data.accessToken,
128
124
  status: !0
129
- }), r.data;
130
- } catch (r) {
131
- return n(r), Promise.reject(r);
125
+ }), t.data;
126
+ } catch (t) {
127
+ return n(t), Promise.reject(t);
132
128
  }
133
129
  }
134
- }, g = {
130
+ }, O = {
135
131
  development: { secure: !1, expires: 1 },
136
132
  production: { expires: 1, domain: process.env.API_URL, sameSite: "none", secure: !0 }
137
133
  };
138
- function h(e) {
139
- if (process.env.MOBILE_APP)
140
- return l.getCookies();
141
- {
142
- const t = d.get(e);
143
- return t ? JSON.parse(t) : null;
144
- }
134
+ function f(s) {
135
+ const a = u.get(s);
136
+ return a ? JSON.parse(a) : null;
145
137
  }
146
- function u(e, t, s = process.env.NODE_ENV) {
147
- process.env.MOBILE_APP ? l.setCookie({
148
- url: process.env.API_URL,
149
- // используйте ваш API_URL
150
- key: e,
151
- value: JSON.stringify(t)
152
- }) : d.set(e, JSON.stringify(t), g[s]);
138
+ function p(s, a, e = process.env.NODE_ENV) {
139
+ u.set(s, JSON.stringify(a), O[e]);
153
140
  }
154
- function P(e, t = process.env.NODE_ENV) {
155
- if (process.env.MOBILE_APP)
156
- l.deleteCookie({
157
- url: process.env.API_URL,
158
- // используйте ваш API_URL
159
- key: e
160
- });
161
- else {
162
- const s = t === "production" ? { domain: process.env.API_URL } : {};
163
- d.remove(e, s);
164
- }
141
+ function g(s, a = process.env.NODE_ENV) {
142
+ const e = a === "production" ? { domain: process.env.API_URL } : {};
143
+ u.remove(s, e);
165
144
  }
166
- f(a, (e, t) => {
145
+ w(o, (s, a) => {
167
146
  });
168
147
  export {
169
- S as actions,
170
- a as state
148
+ C as actions,
149
+ o as state
171
150
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../../constructor/components/elements/Textarea.vue2.cjs"),V=require("../../../constructor/components/sections/Constructor.vue.cjs"),y=require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/FieldTags/tag-input.vue.cjs");require("../../../../components/FieldTags/vue-tags-input.scss.cjs");const B=require("../../../../components/FieldTags/BlockTags.vue.cjs"),N=require("../../../../components/Checkbox/Checkbox.vue.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),x=require("../../../../components/Button/Button.vue2.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/store/auth.cjs"),C=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},T={class:"w-full h-full"},z={key:1,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},O={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},D=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),M=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),S={key:0,class:"mn-thin"},U={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},A={__name:"CreateBlogPost",setup(R){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{if(s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const o=await C.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});console.log(o),p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function v(){d.value=!0}function h(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",console.log(t.value),s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",E,[e.createElementVNode("div",T,[e.createVNode(w.default,{prop:e.unref(t),content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])]),e.createVNode(V.default,{content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",O,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>v()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:h,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[D,e.createVNode(B.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),M,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[5]||(a[5]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",S,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(N.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[6]||(a[6]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(x.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=A;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../../constructor/components/elements/Textarea.vue2.cjs"),V=require("../../../constructor/components/sections/Constructor.vue.cjs"),y=require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/FieldTags/tag-input.vue.cjs");require("../../../../components/FieldTags/vue-tags-input.scss.cjs");const B=require("../../../../components/FieldTags/BlockTags.vue.cjs"),N=require("../../../../components/Checkbox/Checkbox.vue.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),x=require("../../../../components/Button/Button.vue2.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/store/auth.cjs"),C=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},T={class:"w-full h-full"},z={key:1,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},O={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},D=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),M=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),S={key:0,class:"mn-thin"},U={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},A={__name:"CreateBlogPost",setup(R){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{if(s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const o=await C.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});console.log(o),p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function v(){d.value=!0}function h(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",console.log(t.value),s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",E,[e.createElementVNode("div",T,[e.createVNode(w.default,{prop:e.unref(t),content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])]),e.createVNode(V.default,{content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",O,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>v()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:h,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[D,e.createVNode(B.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),M,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[5]||(a[5]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",S,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(N.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[6]||(a[6]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(x.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=A;
@@ -1,7 +1,7 @@
1
1
  import { ref as r, onMounted as V, computed as _, openBlock as u, createElementBlock as i, unref as a, createElementVNode as p, createVNode as n, createCommentVNode as m, withCtx as w, createTextVNode as z } from "vue";
2
2
  import D from "../../../constructor/components/elements/Textarea.vue2.js";
3
3
  import N from "../../../constructor/components/sections/Constructor.vue.js";
4
- import O from "../../../../components/Popup/Popup.vue2.js";
4
+ import O from "../../../../components/Popup/Popup.vue.js";
5
5
  import "../../../../components/FieldTags/tag-input.vue.js";
6
6
  import "../../../../components/FieldTags/vue-tags-input.scss.js";
7
7
  import U from "../../../../components/FieldTags/BlockTags.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../constructor/components/elements/Textarea.vue.cjs");const N=require("../../../constructor/components/sections/Constructor.vue.cjs"),E=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.cjs");const y=require("../../../../components/Popup/Popup.vue2.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/FieldTags/BlockTags.vue.cjs"),P=require("../../../../components/Checkbox/Checkbox.vue.cjs"),C=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),x=require("../../../../components/UploadImage/UploadImage.vue.cjs"),B=require("../../../../components/Button/Button.vue2.cjs"),v=require("vue-router"),s=require("../../store/events.cjs"),u=require("../../../auth/store/auth.cjs"),D=require("../../../organizations/store/organizations.cjs");require("./EditEvent.vue2.cjs");const U={key:0,class:"h-100 pd-thin"},T={class:"mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},z=e.createElementVNode("h4",null,"Upload Event Cover",-1),O=e.createElementVNode("h3",{class:"mn-small"},"Date",-1),M=e.createElementVNode("h3",{class:"mn-small"},"Description",-1),S={key:0,class:"pd-b-extra w-100 bg-grey pd-big radius-big"},A={key:1,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},R={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},$=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),F=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),j={key:0,class:"mn-thin"},H={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},G={__name:"EditEvent",setup(J){const i=v.useRoute(),d=v.useRouter();let t=e.ref(null),p=e.ref(null);const m=e.ref([]),n=e.ref(null),r=e.ref(),h=()=>({top:0,left:0});e.onMounted(async()=>{if(i.params.url){const a=await s.read({user:u.state.user._id,url:i.params.url});t.value=a.pop();const l=t.value.date.start,_=t.value.date.end;r.value=[l,_]}else{s.clean(),t.value=s.state.current;const a=new Date,l=new Date;r.value=[a,l]}t.value.owner||(t.value.owner={target:u.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:u.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(n.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const o=await D.actions.read({user:u.state.user._id,postable:u.state.user._id,limit:100});p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const c=e.ref(!1);function g(){c.value=!0}function b(){c.value=!1}function k(){m.value.length>0&&m.value.map(o=>o.text),t.value.status="draft",t.value.date={start:r.value[0],end:r.value[1]},i.params.url?s.update(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.error(o)}):s.create(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.error(o)})}function V(){n.value&&(t.value.owner={target:n.value._id,type:"organization"}),n.value||(t.value.creator.hidden=!1),n.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.date={start:r.value[0],end:r.value[1]},console.log(r.value),i.params.url?s.update(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.log(o)}):s.create(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.log(o)})}function w(){confirm("Are you sure you want to delete this event?")&&s.remove(t.value._id).then(o=>{d.push({name:"User Events",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.error(o)})}return(o,a)=>e.unref(t)?(e.openBlock(),e.createElementBlock("article",U,[e.createElementVNode("div",T,[e.createVNode(x.default,{photo:e.unref(t).cover,"onUpdate:photo":a[0]||(a[0]=l=>e.unref(t).cover=l),uploadPath:"users/"+u.state.user._id+"/events",class:"h-4r w-4r aspect-1x1 o-hidden mn-thin radius-extra"},null,8,["photo","uploadPath"]),z]),e.createVNode(f.default,{field:e.unref(t).name,"onUpdate:field":a[1]||(a[1]=l=>e.unref(t).name=l),placeholder:"Event name",class:"mn-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(f.default,{field:e.unref(t).description,"onUpdate:field":a[2]||(a[2]=l=>e.unref(t).description=l),type:"textfield",placeholder:"Enter short description",class:"mn-semi w-100 bg-grey pd-medium radius-small"},null,8,["field"]),O,e.createVNode(e.unref(E.default),{modelValue:r.value,"onUpdate:modelValue":a[3]||(a[3]=l=>r.value=l),"alt-position":h,range:"",class:"mn-semi"},null,8,["modelValue"]),M,e.unref(t)?(e.openBlock(),e.createElementBlock("section",S,[e.createVNode(N.default,{content:e.unref(t).content,onUpdate:a[4]||(a[4]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",A,[e.createElementVNode("div",R,[e.unref(i).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[5]||(a[5]=l=>w()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[6]||(a[6]=l=>k()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[7]||(a[7]=l=>g()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:b,isPopupOpen:c.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[$,e.createVNode(q.default,{onTagsChanged:a[8]||(a[8]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),F,e.createVNode(C.default,{modelValue:n.value,"onUpdate:modelValue":a[9]||(a[9]=l=>n.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),n.value?(e.openBlock(),e.createElementBlock("h5",j,"Options:")):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("div",H,[e.createVNode(P.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[10]||(a[10]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(B.default,{submit:V,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])])):e.createCommentVNode("",!0)}};exports.default=G;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../constructor/components/elements/Textarea.vue.cjs");const N=require("../../../constructor/components/sections/Constructor.vue.cjs"),E=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.cjs");const y=require("../../../../components/Popup/Popup.vue.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/FieldTags/BlockTags.vue.cjs"),P=require("../../../../components/Checkbox/Checkbox.vue.cjs"),C=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),x=require("../../../../components/UploadImage/UploadImage.vue.cjs"),B=require("../../../../components/Button/Button.vue2.cjs"),v=require("vue-router"),s=require("../../store/events.cjs"),u=require("../../../auth/store/auth.cjs"),D=require("../../../organizations/store/organizations.cjs");require("./EditEvent.vue2.cjs");const U={key:0,class:"h-100 pd-thin"},T={class:"mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},z=e.createElementVNode("h4",null,"Upload Event Cover",-1),O=e.createElementVNode("h3",{class:"mn-small"},"Date",-1),M=e.createElementVNode("h3",{class:"mn-small"},"Description",-1),S={key:0,class:"pd-b-extra w-100 bg-grey pd-big radius-big"},A={key:1,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},R={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},$=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),F=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),j={key:0,class:"mn-thin"},H={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},G={__name:"EditEvent",setup(J){const i=v.useRoute(),d=v.useRouter();let t=e.ref(null),p=e.ref(null);const m=e.ref([]),n=e.ref(null),r=e.ref(),h=()=>({top:0,left:0});e.onMounted(async()=>{if(i.params.url){const a=await s.read({user:u.state.user._id,url:i.params.url});t.value=a.pop();const l=t.value.date.start,_=t.value.date.end;r.value=[l,_]}else{s.clean(),t.value=s.state.current;const a=new Date,l=new Date;r.value=[a,l]}t.value.owner||(t.value.owner={target:u.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:u.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(n.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const o=await D.actions.read({user:u.state.user._id,postable:u.state.user._id,limit:100});p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const c=e.ref(!1);function g(){c.value=!0}function b(){c.value=!1}function k(){m.value.length>0&&m.value.map(o=>o.text),t.value.status="draft",t.value.date={start:r.value[0],end:r.value[1]},i.params.url?s.update(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.error(o)}):s.create(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.error(o)})}function V(){n.value&&(t.value.owner={target:n.value._id,type:"organization"}),n.value||(t.value.creator.hidden=!1),n.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.date={start:r.value[0],end:r.value[1]},console.log(r.value),i.params.url?s.update(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.log(o)}):s.create(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.log(o)})}function w(){confirm("Are you sure you want to delete this event?")&&s.remove(t.value._id).then(o=>{d.push({name:"User Events",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.error(o)})}return(o,a)=>e.unref(t)?(e.openBlock(),e.createElementBlock("article",U,[e.createElementVNode("div",T,[e.createVNode(x.default,{photo:e.unref(t).cover,"onUpdate:photo":a[0]||(a[0]=l=>e.unref(t).cover=l),uploadPath:"users/"+u.state.user._id+"/events",class:"h-4r w-4r aspect-1x1 o-hidden mn-thin radius-extra"},null,8,["photo","uploadPath"]),z]),e.createVNode(f.default,{field:e.unref(t).name,"onUpdate:field":a[1]||(a[1]=l=>e.unref(t).name=l),placeholder:"Event name",class:"mn-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(f.default,{field:e.unref(t).description,"onUpdate:field":a[2]||(a[2]=l=>e.unref(t).description=l),type:"textfield",placeholder:"Enter short description",class:"mn-semi w-100 bg-grey pd-medium radius-small"},null,8,["field"]),O,e.createVNode(e.unref(E.default),{modelValue:r.value,"onUpdate:modelValue":a[3]||(a[3]=l=>r.value=l),"alt-position":h,range:"",class:"mn-semi"},null,8,["modelValue"]),M,e.unref(t)?(e.openBlock(),e.createElementBlock("section",S,[e.createVNode(N.default,{content:e.unref(t).content,onUpdate:a[4]||(a[4]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",A,[e.createElementVNode("div",R,[e.unref(i).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[5]||(a[5]=l=>w()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[6]||(a[6]=l=>k()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[7]||(a[7]=l=>g()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:b,isPopupOpen:c.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[$,e.createVNode(q.default,{onTagsChanged:a[8]||(a[8]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),F,e.createVNode(C.default,{modelValue:n.value,"onUpdate:modelValue":a[9]||(a[9]=l=>n.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),n.value?(e.openBlock(),e.createElementBlock("h5",j,"Options:")):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("div",H,[e.createVNode(P.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[10]||(a[10]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(B.default,{submit:V,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])])):e.createCommentVNode("",!0)}};exports.default=G;
@@ -3,7 +3,7 @@ import "../../../constructor/components/elements/Textarea.vue.js";
3
3
  import z from "../../../constructor/components/sections/Constructor.vue.js";
4
4
  import N from "../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js";
5
5
  import "../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.js";
6
- import O from "../../../../components/Popup/Popup.vue2.js";
6
+ import O from "../../../../components/Popup/Popup.vue.js";
7
7
  import w from "../../../../components/Field/Field.vue2.js";
8
8
  import A from "../../../../components/FieldTags/BlockTags.vue.js";
9
9
  import B from "../../../../components/Checkbox/Checkbox.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const t=require("../sections/Feed.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../reports/store/reports.cjs");require("../../../../components/Dropdown/Dropdown.vue2.cjs");const i=require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");require("../../../community/store/reactions.cjs");const o=require("../../store/events.cjs");require("../sections/List.vue2.cjs");const s={__name:"Events",setup(c){const r=u.useRoute();return u.useRouter(),(n,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(t.default,{category:e.unref(r).params.category,user:i.state.user._id,period:e.unref(r).query.period,selectedDate:o.state.filter.date},null,8,["category","user","period","selectedDate"])]))}};exports.default=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const t=require("../sections/Feed.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../reports/store/reports.cjs");require("../../../../components/Dropdown/Dropdown.vue.cjs");const i=require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");require("../../../community/store/reactions.cjs");const o=require("../../store/events.cjs");require("../sections/List.vue2.cjs");const s={__name:"Events",setup(c){const r=u.useRoute();return u.useRouter(),(n,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(t.default,{category:e.unref(r).params.category,user:i.state.user._id,period:e.unref(r).query.period,selectedDate:o.state.filter.date},null,8,["category","user","period","selectedDate"])]))}};exports.default=s;
@@ -5,11 +5,11 @@ import "../../../globals/localization/vue-i18n.js";
5
5
  import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
6
6
  import s from "../sections/Feed.vue.js";
7
7
  import "../../../../components/Loader/Loader.vue.js";
8
- import "../../../../components/Popup/Popup.vue.js";
8
+ import "../../../../components/Popup/Popup.vue2.js";
9
9
  import "../../../../components/Button/Button.vue.js";
10
10
  import "../../../../components/Select/Select.vue.js";
11
11
  import "../../../reports/store/reports.js";
12
- import "../../../../components/Dropdown/Dropdown.vue2.js";
12
+ import "../../../../components/Dropdown/Dropdown.vue.js";
13
13
  import { state as a } from "../../../auth/store/auth.js";
14
14
  import "../../../organizations/store/memberships.js";
15
15
  import "../../../community/store/reactions.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),h=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),f=require("../../../reports/components/sections/FormReport.vue.cjs"),g=require("../../../../components/Dropdown/Dropdown.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");const k={key:0,class:"pd-b-zero"},y={class:"w-100 flex-v-center flex-nojustify flex"},w={class:"w-100 flex-nowrap flex-v-center flex"},b=["src"],B={key:2,class:"t-semi"},E={key:1},V={key:2},p={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},x={key:0,class:"w-4r i-thin"},C={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"},N=["src"],$={class:"bg-black pd-thin radius-small"},v=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),M={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type"],setup(t){m.useRouter();function u(o){const r=new Date,i=new Date(o),s=Math.abs(r-i),a=Math.floor(s/1e3),n=Math.floor(a/60),l=Math.floor(n/60),c=Math.floor(l/24),d=Math.floor(c/7);return d>0?`${d} week${d>1?"s":""} ago`:c>0?`${c} day${c>1?"s":""} ago`:l>0?`${l} hour${l>1?"s":""} ago`:n>0?`${n} minute${n>1?"s":""} ago`:"Just now"}return(o,r)=>{var i,s;return t.owner?(e.openBlock(),e.createElementBlock("header",k,[e.createElementVNode("div",y,[e.createElementVNode("div",w,[t.owner.target.profile.photo.length>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(o.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,b)):e.createCommentVNode("",!0),!t.owner.target.profile.photo&&t.type!=="short"?(e.openBlock(),e.createBlock(h.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",B,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(t.owner.target.profile.name),1),!t.creator.hidden&&t.owner.target.profile.name!==((i=t.creator.target.profile)==null?void 0:i.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(a=>o.$router.push({name:"User Profile",params:{_id:t.creator.target._id}}),["stop"]))}," · by "+e.toDisplayString((s=t.creator.target.profile)==null?void 0:s.name),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",E," · "+e.toDisplayString(u(t.date)),1)):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",V," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",p,[t.members?(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("span",C,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(a,n)=>(e.openBlock(),e.createElementBlock("img",{key:n,src:(o.FILE_SERVER_URL||"")+a,style:e.normalizeStyle({position:"absolute",top:"0px",right:n*20+20+"%",zIndex:1-n}),class:"br-solid br-2px br-white i-thin bg-grey radius-big"},null,12,N))),128))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user&&t.user!=t.creator.target._id?(e.openBlock(),e.createBlock(g.default,{key:3,label:"...",align:"right",class:"cursor-pointer z-index-2 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",$,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(f.default,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[v]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}};exports.default=M;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),h=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),f=require("../../../reports/components/sections/FormReport.vue.cjs"),g=require("../../../../components/Dropdown/Dropdown.vue2.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");const k={key:0,class:"pd-b-zero"},y={class:"w-100 flex-v-center flex-nojustify flex"},w={class:"w-100 flex-nowrap flex-v-center flex"},b=["src"],B={key:2,class:"t-semi"},E={key:1},V={key:2},p={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},x={key:0,class:"w-4r i-thin"},C={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"},N=["src"],$={class:"bg-black pd-thin radius-small"},v=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),M={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type"],setup(t){m.useRouter();function u(o){const r=new Date,i=new Date(o),s=Math.abs(r-i),a=Math.floor(s/1e3),n=Math.floor(a/60),l=Math.floor(n/60),c=Math.floor(l/24),d=Math.floor(c/7);return d>0?`${d} week${d>1?"s":""} ago`:c>0?`${c} day${c>1?"s":""} ago`:l>0?`${l} hour${l>1?"s":""} ago`:n>0?`${n} minute${n>1?"s":""} ago`:"Just now"}return(o,r)=>{var i,s;return t.owner?(e.openBlock(),e.createElementBlock("header",k,[e.createElementVNode("div",y,[e.createElementVNode("div",w,[t.owner.target.profile.photo.length>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(o.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,b)):e.createCommentVNode("",!0),!t.owner.target.profile.photo&&t.type!=="short"?(e.openBlock(),e.createBlock(h.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",B,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(t.owner.target.profile.name),1),!t.creator.hidden&&t.owner.target.profile.name!==((i=t.creator.target.profile)==null?void 0:i.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(a=>o.$router.push({name:"User Profile",params:{_id:t.creator.target._id}}),["stop"]))}," · by "+e.toDisplayString((s=t.creator.target.profile)==null?void 0:s.name),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",E," · "+e.toDisplayString(u(t.date)),1)):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",V," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",p,[t.members?(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("span",C,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(a,n)=>(e.openBlock(),e.createElementBlock("img",{key:n,src:(o.FILE_SERVER_URL||"")+a,style:e.normalizeStyle({position:"absolute",top:"0px",right:n*20+20+"%",zIndex:1-n}),class:"br-solid br-2px br-white i-thin bg-grey radius-big"},null,12,N))),128))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user&&t.user!=t.creator.target._id?(e.openBlock(),e.createBlock(g.default,{key:3,label:"...",align:"right",class:"cursor-pointer z-index-2 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",$,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(f.default,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[v]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}};exports.default=M;
@@ -2,7 +2,7 @@ import { openBlock as t, createElementBlock as i, createElementVNode as l, withM
2
2
  import { useRouter as v } from "vue-router";
3
3
  import p from "../../../icons/placeholders/PlaceholderUserpic.vue.js";
4
4
  import E from "../../../reports/components/sections/FormReport.vue.js";
5
- import R from "../../../../components/Dropdown/Dropdown.vue.js";
5
+ import R from "../../../../components/Dropdown/Dropdown.vue2.js";
6
6
  import "../../../../components/Button/Button.vue.js";
7
7
  import "../../../auth/store/auth.js";
8
8
  import "../../../organizations/store/memberships.js";