@ozdao/prometheus-framework 0.2.20 → 0.2.22

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. package/dist/auth.server.js +1 -1
  2. package/dist/auth.server.mjs +1 -1
  3. package/dist/globals.server.js +1 -1
  4. package/dist/globals.server.mjs +1 -1
  5. package/dist/mailing-327fd6c6.js +49 -0
  6. package/dist/mailing-8bad09c4.mjs +50 -0
  7. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +2 -44
  9. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +44 -2
  11. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +1 -1
  13. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +1 -1
  15. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +1 -1
  17. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +1 -1
  19. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +1 -1
  21. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +1 -1
  23. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  25. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -4
  26. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -62
  27. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +4 -1
  28. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +62 -2
  29. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  31. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  33. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +6 -6
  35. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  39. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  41. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  49. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.js +13 -13
  51. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
  57. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.js +1 -1
  61. package/dist/style.css +1 -1
  62. package/package.json +1 -1
  63. package/src/modules/globals/utils/mailing.js +1 -1
  64. package/src/modules/organizations/components/blocks/CardOrganization.vue +4 -4
  65. package/src/modules/organizations/components/sections/Publics.vue +1 -1
@@ -1,4 +1,64 @@
1
- const e = "";
1
+ import { ref as d, onUpdated as x, nextTick as s, onMounted as m, openBlock as h, createElementBlock as B, withDirectives as g, createElementVNode as v, vModelText as y } from "vue";
2
+ import "./Textarea.vue.js";
3
+ const T = ["placeholder"], F = {
4
+ __name: "Textarea",
5
+ props: ["prop", "value", "content", "placeholder", "index", "setFocus"],
6
+ emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
7
+ setup(n, { emit: u }) {
8
+ const e = n, a = u;
9
+ d(e);
10
+ const t = d(null);
11
+ d(0);
12
+ function p(l) {
13
+ let o = l.target.value.split(/\n+/);
14
+ if (o.length > 1) {
15
+ e.prop[e.content] = o[0], s(() => {
16
+ c();
17
+ });
18
+ let r = o.slice(1).map((k) => ({ __name: "Textarea", content: k }));
19
+ a("addBlock", "Textarea", "", e.index, { blocks: r, ref: t });
20
+ } else
21
+ l.target.value.trim() === "" && l.target.value.includes(`
22
+
23
+ `) && (console.log("We are adding new block:" + e.index + newBlocks + t), a("addBlock", "Textarea", "", e.index, { blocks: newBlocks, ref: t })), c();
24
+ }
25
+ function f(l) {
26
+ (l.keyCode === 8 || l.keyCode === 46) && e.prop[e.content].trim() === "" && a("deleteBlock", e.prop);
27
+ }
28
+ function i() {
29
+ s(() => {
30
+ t.value.focus(), a("updateBlock", e.prop, { setFocus: !1 });
31
+ });
32
+ }
33
+ function c() {
34
+ t.value.style.height = "1rem", t.value.style.height = t.value.scrollHeight + "px";
35
+ }
36
+ return x(() => {
37
+ e.setFocus && s(() => {
38
+ i();
39
+ }), c();
40
+ }), m(() => {
41
+ e.setFocus && s(() => {
42
+ i();
43
+ }), c();
44
+ }), (l, o) => (h(), B("div", null, [
45
+ g(v("textarea", {
46
+ "onUpdate:modelValue": o[0] || (o[0] = (r) => n.prop[n.content] = r),
47
+ placeholder: n.placeholder ? n.placeholder : "Enter text",
48
+ onInput: p,
49
+ onFocus: o[1] || (o[1] = (r) => a("focus", t.value)),
50
+ onKeyup: f,
51
+ ref_key: "textarea",
52
+ ref: t,
53
+ tabindex: "-1",
54
+ class: "text-area mn-b-thin"
55
+ }, `
56
+ `, 40, T), [
57
+ [y, n.prop[n.content]]
58
+ ])
59
+ ]));
60
+ }
61
+ };
2
62
  export {
3
- e as default
63
+ F as default
4
64
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),E=require("../elements/Textarea.vue.cjs"),x=require("../elements/H2.vue.cjs"),N=require("../elements/Caption.vue.cjs"),y=require("../elements/Bullets.vue.cjs"),A=require("../elements/ImageUpload.vue.cjs"),V=require("../elements/Embed.vue.cjs"),q=require("../elements/Audio.vue.cjs"),D=require("../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs"),M=["onMouseover"],T={key:0,class:"z-index-5 radius-thin pd-thin bg-white w-max mn-b-small flex-nowrap flex-column flex"},$=["onClick"],F=["onClick"],I=["onClick"],S=["onClick"],U={__name:"Constructor",props:["content"],emits:["update"],setup(v,{emit:f}){const k=v,u=f;let t=e.ref(null);e.ref(null),t.value={content:k.content};const b={Textarea:E.default,H2:x.default,Bullets:y.default,Caption:N.default,ImageUpload:A.default,Embed:V.default,Audio:q.default};function s(c="Textarea",l="",n,o){console.log("We are adding new block (functuin HandleAddBlock):"+c+l+n+o);let a={order:t.value.content.length+1,type:c,style:"",class:"",content:l,blocks:[],setFocus:!0};if(o&&o.blocks&&Array.isArray(o.blocks)){let m=o.blocks.map(_=>({...a,content:_.content})),B=[(o.index||n)+1,0].concat(m);t.value.content.splice.apply(t.value.content,B);const C=m[m.length-1];console.log("New block is"+C)}else n!==void 0?(t.value.content.splice(n+1,0,a),console.log("Latest block is"+a)):(console.log("Another block is"+a),t.value.content.push(a));i.value=null,u("update",t.value.content)}function g(c,l){const n=t.value.content.findIndex(o=>o===c);n!==-1&&(t.value.content[n]={...t.value.content[n],...l}),u("update",t.value.content)}function p(c){let l=t.value.content.findIndex(n=>n===c);l!==-1&&t.value.content.splice(l,1),t.value.content[l-1].setFocus=!0,u("update",t.value.content)}const i=e.ref(null),d=e.ref(!1),r=e.ref(!1);function h(){d.value=!0}function w(){d.value=!1}return e.watchEffect(()=>{t.value&&t.value.content.length===0&&s("Textarea",""),u("update",t.value.content)}),(c,l)=>(e.openBlock(),e.createElementBlock("section",null,[e.unref(t).content?(e.openBlock(),e.createBlock(e.unref(D.VueDraggableNext),{key:0,class:"w-full",list:e.unref(t).content,onStart:h,onEnd:w},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).content,(n,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:"pos-relative"},[e.createElementVNode("div",{onMouseover:a=>(i.value=o,r.value=!1),class:"pos-relative w-full h-full"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b[n.type]),{index:o,component:n,prop:n,class:e.normalizeClass(n.class),setFocus:n.setFocus,content:"content",onDeleteBlock:p,onAddBlock:s,onUpdateBlock:g},null,40,["index","component","prop","class","setFocus"]))],40,M),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value===o?(e.openBlock(),e.createElementBlock("div",{key:0,class:"pos-absolute z-index-4 i-semi",style:{right:"calc(100% + 0.5rem)",top:"calc(50% - 1.125rem)"},onMousedown:l[1]||(l[1]=e.withModifiers(a=>d.value=!0,["prevent"]))},[e.createElementVNode("button",{onClick:l[0]||(l[0]=a=>r.value=!r.value),class:"mn-b-small cursor-pointer w-100 i-semi bg-white radius-thin"},e.toDisplayString(n.content?"...":"+"),1),r.value?(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("span",{onClick:a=>p(n),class:"mn-b-thin w-max t-red bg-white button-small button"}," Remove ",8,$),e.createElementVNode("span",{onClick:a=>s("ImageUpload","",o),class:"mn-b-thin w-max t-black bg-white button-small button"}," Add Image ",8,F),e.createElementVNode("span",{onClick:a=>s("H2","",o),class:"w-max button-small t-black bg-white button"}," Add Title ",8,I),e.createElementVNode("span",{onClick:a=>s("Embed","",o),class:"w-max button-small t-black bg-white button"}," Add Embed ",8,S)])):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1},8,["list"])):e.createCommentVNode("",!0)]))}};exports.default=U;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),E=require("../elements/Textarea.vue2.cjs"),x=require("../elements/H2.vue.cjs"),N=require("../elements/Caption.vue.cjs"),y=require("../elements/Bullets.vue.cjs"),A=require("../elements/ImageUpload.vue.cjs"),V=require("../elements/Embed.vue.cjs"),q=require("../elements/Audio.vue.cjs"),D=require("../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs"),M=["onMouseover"],T={key:0,class:"z-index-5 radius-thin pd-thin bg-white w-max mn-b-small flex-nowrap flex-column flex"},$=["onClick"],F=["onClick"],I=["onClick"],S=["onClick"],U={__name:"Constructor",props:["content"],emits:["update"],setup(v,{emit:f}){const k=v,u=f;let t=e.ref(null);e.ref(null),t.value={content:k.content};const b={Textarea:E.default,H2:x.default,Bullets:y.default,Caption:N.default,ImageUpload:A.default,Embed:V.default,Audio:q.default};function s(c="Textarea",l="",n,o){console.log("We are adding new block (functuin HandleAddBlock):"+c+l+n+o);let a={order:t.value.content.length+1,type:c,style:"",class:"",content:l,blocks:[],setFocus:!0};if(o&&o.blocks&&Array.isArray(o.blocks)){let m=o.blocks.map(_=>({...a,content:_.content})),B=[(o.index||n)+1,0].concat(m);t.value.content.splice.apply(t.value.content,B);const C=m[m.length-1];console.log("New block is"+C)}else n!==void 0?(t.value.content.splice(n+1,0,a),console.log("Latest block is"+a)):(console.log("Another block is"+a),t.value.content.push(a));i.value=null,u("update",t.value.content)}function g(c,l){const n=t.value.content.findIndex(o=>o===c);n!==-1&&(t.value.content[n]={...t.value.content[n],...l}),u("update",t.value.content)}function p(c){let l=t.value.content.findIndex(n=>n===c);l!==-1&&t.value.content.splice(l,1),t.value.content[l-1].setFocus=!0,u("update",t.value.content)}const i=e.ref(null),d=e.ref(!1),r=e.ref(!1);function h(){d.value=!0}function w(){d.value=!1}return e.watchEffect(()=>{t.value&&t.value.content.length===0&&s("Textarea",""),u("update",t.value.content)}),(c,l)=>(e.openBlock(),e.createElementBlock("section",null,[e.unref(t).content?(e.openBlock(),e.createBlock(e.unref(D.VueDraggableNext),{key:0,class:"w-full",list:e.unref(t).content,onStart:h,onEnd:w},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).content,(n,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:"pos-relative"},[e.createElementVNode("div",{onMouseover:a=>(i.value=o,r.value=!1),class:"pos-relative w-full h-full"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b[n.type]),{index:o,component:n,prop:n,class:e.normalizeClass(n.class),setFocus:n.setFocus,content:"content",onDeleteBlock:p,onAddBlock:s,onUpdateBlock:g},null,40,["index","component","prop","class","setFocus"]))],40,M),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value===o?(e.openBlock(),e.createElementBlock("div",{key:0,class:"pos-absolute z-index-4 i-semi",style:{right:"calc(100% + 0.5rem)",top:"calc(50% - 1.125rem)"},onMousedown:l[1]||(l[1]=e.withModifiers(a=>d.value=!0,["prevent"]))},[e.createElementVNode("button",{onClick:l[0]||(l[0]=a=>r.value=!r.value),class:"mn-b-small cursor-pointer w-100 i-semi bg-white radius-thin"},e.toDisplayString(n.content?"...":"+"),1),r.value?(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("span",{onClick:a=>p(n),class:"mn-b-thin w-max t-red bg-white button-small button"}," Remove ",8,$),e.createElementVNode("span",{onClick:a=>s("ImageUpload","",o),class:"mn-b-thin w-max t-black bg-white button-small button"}," Add Image ",8,F),e.createElementVNode("span",{onClick:a=>s("H2","",o),class:"w-max button-small t-black bg-white button"}," Add Title ",8,I),e.createElementVNode("span",{onClick:a=>s("Embed","",o),class:"w-max button-small t-black bg-white button"}," Add Embed ",8,S)])):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1},8,["list"])):e.createCommentVNode("",!0)]))}};exports.default=U;
@@ -1,5 +1,5 @@
1
1
  import { ref as u, watchEffect as M, openBlock as a, createElementBlock as r, unref as p, createBlock as _, withCtx as g, Fragment as N, renderList as I, createElementVNode as c, resolveDynamicComponent as T, normalizeClass as U, createVNode as V, Transition as z, withModifiers as H, toDisplayString as S, createCommentVNode as k } from "vue";
2
- import L from "../elements/Textarea.vue.js";
2
+ import L from "../elements/Textarea.vue2.js";
3
3
  import R from "../elements/H2.vue.js";
4
4
  import W from "../elements/Caption.vue.js";
5
5
  import j from "../elements/Bullets.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.vue2.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-b-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-b-small"},"Date",-1),M=e.createElementVNode("h3",{class:"mn-b-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-b-small"},"Final Touches",-1),F=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),j={key:0,class:"mn-b-thin"},H={key:1,class:"mn-b-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(),b=()=>({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 h(){c.value=!0}function g(){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-b-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-b-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-b-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":b,range:"",class:"mn-b-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=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:g,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-b-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.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-b-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-b-small"},"Date",-1),M=e.createElementVNode("h3",{class:"mn-b-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-b-small"},"Final Touches",-1),F=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),j={key:0,class:"mn-b-thin"},H={key:1,class:"mn-b-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(),b=()=>({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 h(){c.value=!0}function g(){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-b-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-b-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-b-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":b,range:"",class:"mn-b-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=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:g,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-b-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,5 +1,5 @@
1
1
  import { ref as u, onMounted as $, unref as l, openBlock as d, createElementBlock as m, createElementVNode as i, createVNode as s, createCommentVNode as p, withCtx as _, createTextVNode as T } from "vue";
2
- import "../../../constructor/components/elements/Textarea.vue2.js";
2
+ 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";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),a=require("vue-router"),l=require("../../../orders/components/blocks/CardOrderItem.vue.cjs"),s=require("../../../../components/Text/Text.vue.cjs"),c=require("../elements/ButtonToggleMembership.vue.cjs"),d={class:"pd-medium flex-v-center flex-nowrap flex"},m=["src"],u={key:1,class:"h-4r w-4r radius-extra",width:"42",height:"42",viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g=e.createElementVNode("circle",{fill:"rgb(var(--main))",cx:"21",cy:"21",r:"21"},null,-1),h=e.createElementVNode("path",{fill:"#242424","fill-opacity":"0.1","fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00233 37.4954C8.00078 37.4458 8 37.3961 8 37.3462C8 32.9066 11.5673 29.3077 15.9677 29.3077H26.0323C30.4328 29.3077 34 32.9066 34 37.3462C34 37.3961 33.9992 37.4458 33.9977 37.4954C30.4223 40.3165 25.9078 42 21 42C16.0922 42 11.5777 40.3164 8.00233 37.4954ZM21 9C16.5995 9 13.0323 12.5989 13.0323 17.0385C13.0323 21.478 16.5995 25.0769 21 25.0769C25.4005 25.0769 28.9677 21.478 28.9677 17.0385C28.9677 12.5989 25.4005 9 21 9Z"},null,-1),b=[g,h],f={class:"flex-child-1 flex-child mn-l-small w-100"},p={class:"t-nowrap h3 mn-r-semi mn-b-thin"},k={key:0,class:"w-max star-container flex-v-center flex"},w={class:"mn-r-thin pd-r-thin pd-l-thin pd-micro radius-small t-semi uppercase bg-main p-small"},E=["src"],v={class:"p-small t-semi mn-r-thin"},x={class:"p-small"},z={class:"mn-b-thin"},V={key:0,class:"pd-medium"},N={class:"mn-b-small w-100 flex-nowrap flex flex-v-center pd-small bg-white radius-medium"},B={class:"t-black p-medium t-semi"},y=e.createElementVNode("span",{class:"mn-r-small"},"30-60min",-1),C=e.createElementVNode("span",{class:"mn-r-auto"},"$50 min",-1),S={class:"d-block o-scroll flex-nowrap flex"},_=e.createElementVNode("button",{class:"flex-center flex-nowrap flex shop-cart-item pd-thin radius-medium w-15r bg-main button"},"View menu",-1),M={__name:"CardOrganization",props:{user:String,organization:Object},emits:["updateMembership"],setup(t,{emit:O}){return a.useRouter(),(i,o)=>{var r;return e.openBlock(),e.createElementBlock("div",{class:"bg-grey radius-big o-hidden",onClick:o[1]||(o[1]=n=>i.$router.push({name:"Organization",params:{_id:t.organization._id}}))},[e.createElementVNode("div",d,[t.organization.profile.photo&&t.organization.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:0,src:(i.FILE_SERVER_URL||"")+t.organization.profile.photo,class:"h-4r w-4r radius-extra bg-white"},null,8,m)):(e.openBlock(),e.createElementBlock("svg",u,b)),e.createElementVNode("div",f,[e.createElementVNode("p",p,[e.createVNode(s.default,{text:t.organization.profile.name?t.organization.profile.name:"",maxLen:16},null,8,["text"])]),t.organization.ratingS?(e.openBlock(),e.createElementBlock("div",k,[e.createElementVNode("span",w,e.toDisplayString(t.organization.types[0]),1),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,n=>e.createElementVNode("img",{class:"i-small mn-r-thin",src:n<=t.organization.rating.median?"/icons/star.svg":"/icons/star-stroke.svg"},null,8,E)),64)),e.createElementVNode("span",v,e.toDisplayString(t.organization.rating.median),1),e.createElementVNode("span",x,"("+e.toDisplayString(t.organization.rating.amount)+")",1)])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("p",z,e.toDisplayString(t.organization.numberOfSubscribers)+" followers",1),(r=t.user)!=null&&r._id&&t.organization.owner!==t.user._id?(e.openBlock(),e.createBlock(c.default,{key:0,user:t.user._id,type:"organization",role:"subscriber",target:t.organization._id,status:t.organization.isSubscriber,text:{create:"Follow",remove:"Unfollow"},onUpdateMembership:o[0]||(o[0]=n=>i.handleMembershipUpdate(n,"isSubscriber","numberOfSubscribers")),class:"w-min"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])])]),t.organization.products.length>1e3?(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("div",N,[e.createElementVNode("p",B,e.toDisplayString(t.organization.products.length)+" items: ",1),y,C]),e.createElementVNode("div",S,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.organization.products,n=>(e.openBlock(),e.createBlock(l.default,{onClick:e.withModifiers(q=>i.$router.push({name:"Product Organization",params:{_id:t.organization._id,product:n._id}}),["stop"]),key:n._id,editable:!1,product:n,class:"pd-thin radius-medium w-15r br-solid br-grey br-1px bg-white mn-r-thin"},null,8,["onClick","product"]))),128)),_])])):e.createCommentVNode("",!0)])}}};exports.default=M;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),l=require("../../../orders/components/blocks/CardOrderItem.vue.cjs"),s=require("../../../../components/Text/Text.vue.cjs"),c=require("../elements/ButtonToggleMembership.vue.cjs"),d={class:"w-max pd-medium flex-v-center flex-nowrap flex"},m=["src"],u={key:1,class:"h-4r w-4r radius-extra",width:"42",height:"42",viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},g=e.createElementVNode("circle",{fill:"rgb(var(--main))",cx:"21",cy:"21",r:"21"},null,-1),h=e.createElementVNode("path",{fill:"#242424","fill-opacity":"0.1","fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00233 37.4954C8.00078 37.4458 8 37.3961 8 37.3462C8 32.9066 11.5673 29.3077 15.9677 29.3077H26.0323C30.4328 29.3077 34 32.9066 34 37.3462C34 37.3961 33.9992 37.4458 33.9977 37.4954C30.4223 40.3165 25.9078 42 21 42C16.0922 42 11.5777 40.3164 8.00233 37.4954ZM21 9C16.5995 9 13.0323 12.5989 13.0323 17.0385C13.0323 21.478 16.5995 25.0769 21 25.0769C25.4005 25.0769 28.9677 21.478 28.9677 17.0385C28.9677 12.5989 25.4005 9 21 9Z"},null,-1),b=[g,h],f={class:"w-max flex-child-1 flex-child mn-l-small w-100"},p={class:"w-max h3 mn-b-thin"},k={key:0,class:"w-max star-container flex-v-center flex"},w={class:"mn-r-thin pd-r-thin pd-l-thin pd-micro radius-small t-semi uppercase bg-main p-small"},x=["src"],E={class:"p-small t-semi mn-r-thin"},v={class:"p-small"},z={class:"mn-b-thin"},V={key:0,class:"pd-medium"},N={class:"mn-b-small w-100 flex-nowrap flex flex-v-center pd-small bg-white radius-medium"},B={class:"t-black p-medium t-semi"},y=e.createElementVNode("span",{class:"mn-r-small"},"30-60min",-1),C=e.createElementVNode("span",{class:"mn-r-auto"},"$50 min",-1),S={class:"d-block o-scroll flex-nowrap flex"},_=e.createElementVNode("button",{class:"flex-center flex-nowrap flex shop-cart-item pd-thin radius-medium w-15r bg-main button"},"View menu",-1),M={__name:"CardOrganization",props:{user:String,organization:Object},emits:["updateMembership"],setup(t,{emit:O}){return r.useRouter(),(i,o)=>{var a;return e.openBlock(),e.createElementBlock("div",{class:"bg-grey radius-big o-hidden",onClick:o[1]||(o[1]=n=>i.$router.push({name:"Organization",params:{_id:t.organization._id}}))},[e.createElementVNode("div",d,[t.organization.profile.photo&&t.organization.profile.photo.length>0?(e.openBlock(),e.createElementBlock("img",{key:0,src:(i.FILE_SERVER_URL||"")+t.organization.profile.photo,class:"h-4r w-4r radius-extra bg-white"},null,8,m)):(e.openBlock(),e.createElementBlock("svg",u,b)),e.createElementVNode("div",f,[e.createElementVNode("p",p,[e.createVNode(s.default,{text:t.organization.profile.name?t.organization.profile.name:"",maxLen:12},null,8,["text"])]),t.organization.ratingS?(e.openBlock(),e.createElementBlock("div",k,[e.createElementVNode("span",w,e.toDisplayString(t.organization.types[0]),1),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(5,n=>e.createElementVNode("img",{class:"i-small mn-r-thin",src:n<=t.organization.rating.median?"/icons/star.svg":"/icons/star-stroke.svg"},null,8,x)),64)),e.createElementVNode("span",E,e.toDisplayString(t.organization.rating.median),1),e.createElementVNode("span",v,"("+e.toDisplayString(t.organization.rating.amount)+")",1)])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createElementVNode("p",z,e.toDisplayString(t.organization.numberOfSubscribers)+" followers",1),(a=t.user)!=null&&a._id&&t.organization.owner!==t.user._id?(e.openBlock(),e.createBlock(c.default,{key:0,user:t.user._id,type:"organization",role:"subscriber",target:t.organization._id,status:t.organization.isSubscriber,text:{create:"Follow",remove:"Unfollow"},onUpdateMembership:o[0]||(o[0]=n=>i.handleMembershipUpdate(n,"isSubscriber","numberOfSubscribers")),class:"w-min"},null,8,["user","target","status"])):e.createCommentVNode("",!0)])])]),t.organization.products.length>1e3?(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("div",N,[e.createElementVNode("p",B,e.toDisplayString(t.organization.products.length)+" items: ",1),y,C]),e.createElementVNode("div",S,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.organization.products,n=>(e.openBlock(),e.createBlock(l.default,{onClick:e.withModifiers(q=>i.$router.push({name:"Product Organization",params:{_id:t.organization._id,product:n._id}}),["stop"]),key:n._id,editable:!1,product:n,class:"pd-thin radius-medium w-15r br-solid br-grey br-1px bg-white mn-r-thin"},null,8,["onClick","product"]))),128)),_])])):e.createCommentVNode("",!0)])}}};exports.default=M;
@@ -2,8 +2,8 @@ import { openBlock as t, createElementBlock as s, createElementVNode as e, creat
2
2
  import { useRouter as f } from "vue-router";
3
3
  import b from "../../../orders/components/blocks/CardOrderItem.vue.js";
4
4
  import w from "../../../../components/Text/Text.vue.js";
5
- import p from "../elements/ButtonToggleMembership.vue.js";
6
- const x = { class: "pd-medium flex-v-center flex-nowrap flex" }, z = ["src"], v = {
5
+ import x from "../elements/ButtonToggleMembership.vue.js";
6
+ const p = { class: "w-max pd-medium flex-v-center flex-nowrap flex" }, z = ["src"], v = {
7
7
  key: 1,
8
8
  class: "h-4r w-4r radius-extra",
9
9
  width: "42",
@@ -25,7 +25,7 @@ const x = { class: "pd-medium flex-v-center flex-nowrap flex" }, z = ["src"], v
25
25
  }, null, -1), C = [
26
26
  _,
27
27
  k
28
- ], y = { class: "flex-child-1 flex-child mn-l-small w-100" }, S = { class: "t-nowrap h3 mn-r-semi mn-b-thin" }, $ = {
28
+ ], y = { class: "w-max flex-child-1 flex-child mn-l-small w-100" }, S = { class: "w-max h3 mn-b-thin" }, $ = {
29
29
  key: 0,
30
30
  class: "w-max star-container flex-v-center flex"
31
31
  }, M = { class: "mn-r-thin pd-r-thin pd-l-thin pd-micro radius-small t-semi uppercase bg-main p-small" }, O = ["src"], E = { class: "p-small t-semi mn-r-thin" }, V = { class: "p-small" }, B = { class: "mn-b-thin" }, L = {
@@ -45,7 +45,7 @@ const x = { class: "pd-medium flex-v-center flex-nowrap flex" }, z = ["src"], v
45
45
  class: "bg-grey radius-big o-hidden",
46
46
  onClick: r[1] || (r[1] = (n) => o.$router.push({ name: "Organization", params: { _id: i.organization._id } }))
47
47
  }, [
48
- e("div", x, [
48
+ e("div", p, [
49
49
  i.organization.profile.photo && i.organization.profile.photo.length > 0 ? (t(), s("img", {
50
50
  key: 0,
51
51
  src: (o.FILE_SERVER_URL || "") + i.organization.profile.photo,
@@ -55,7 +55,7 @@ const x = { class: "pd-medium flex-v-center flex-nowrap flex" }, z = ["src"], v
55
55
  e("p", S, [
56
56
  h(w, {
57
57
  text: i.organization.profile.name ? i.organization.profile.name : "",
58
- maxLen: 16
58
+ maxLen: 12
59
59
  }, null, 8, ["text"])
60
60
  ]),
61
61
  i.organization.ratingS ? (t(), s("div", $, [
@@ -69,7 +69,7 @@ const x = { class: "pd-medium flex-v-center flex-nowrap flex" }, z = ["src"], v
69
69
  ])) : l("", !0),
70
70
  e("div", null, [
71
71
  e("p", B, a(i.organization.numberOfSubscribers) + " followers", 1),
72
- (d = i.user) != null && d._id && i.organization.owner !== i.user._id ? (t(), u(p, {
72
+ (d = i.user) != null && d._id && i.organization.owner !== i.user._id ? (t(), u(x, {
73
73
  key: 0,
74
74
  user: i.user._id,
75
75
  type: "organization",
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router");require("../../../../../../node_modules/js-cookie/src/js.cookie.cjs");const v=require("../../../../components/Breadcrumbs/Breadcrumbs.vue2.cjs"),N=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.vue2.cjs");const m=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");const V=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),r=require("../../../../components/Checkbox/Checkbox.vue.cjs"),g=require("../../../../components/Address/Address.vue.cjs"),y=require("../../../../components/LocationMarker/LocationMarker.vue.cjs"),p=require("../../../../components/Button/Button.vue2.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.vue.cjs");require("../../../../../../node_modules/vue-select/dist/vue-select.es.cjs");require("../blocks/EditArray.vue2.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/DepartmentMemberModify.vue2.cjs");require("../blocks/User.vue2.cjs");const t=require("../../../spots/store/spots.cjs"),c=require("../../store/memberships.cjs");require("./DepartmentEdit.vue2.cjs");const l=i=>(e.pushScopeId("data-v-d4f32aeb"),i=i(),e.popScopeId(),i),w={class:"for-transition w-100"},E={class:"pd-b-zero pd-t-zero pd-thin"},q={class:"pd-thin"},x={class:"flex-nowrap flex bg-grey pd-medium radius-big"},k={key:0,class:"mn-r-auto"},P={key:1,class:"mn-r-auto"},S={class:"flex-nowrap flex pd-thin"},D={class:"pd-b-zero pd-t-zero pd-thin cols-2 gap-thin"},B={class:"flex-stretch flex-column flex"},U={class:"mn-b-thin bg-grey pd-medium o-hidden radius-big"},z=l(()=>e.createElementVNode("h3",{class:"mn-b-semi"},"Profile",-1)),I={class:"radius-small flex-nowrap flex"},O={class:"w-100 flex-child-grow-1 flex-child"},A={class:"bg-grey pd-medium o-hidden radius-big"},C=l(()=>e.createElementVNode("h3",{class:"mn-b-semi"},"Details",-1)),K=l(()=>e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please the available delivery options:",-1)),T={class:"mn-b-medium flex-nowrap flex"},M=l(()=>e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select the available payment methods:",-1)),G={class:"flex-nowrap flex"},L={class:"bg-grey pd-medium o-hidden radius-big"},R=l(()=>e.createElementVNode("h3",{class:"mn-b-semi"},"Location",-1)),Y=l(()=>e.createElementVNode("p",{class:"mn-b-small p-medium"},"Or choose on map:",-1)),j={class:"flex-nowrap flex pd-thin"},F={__name:"DepartmentEdit",setup(i){const u=n.useRouter(),d=n.useRoute();e.ref("details"),e.ref(!1);async function f(){d.params.department&&await c.actions.read(d.params.department),e.ref(c.state.memberships),await t.actions.read(d.params._id),d.params.department&&await t.actions.readOne(d.params.department)}f(),e.ref(t.state.department.members),e.ref(!1),e.ref(null),e.ref(!1),e.ref(null);async function h(){d.params.department&&await t.actions.update(d.params._id,t.state.department),d.params.department||await t.actions.create(d.params._id,t.state.department)}function b(){u.replace({name:"Department",params:{_id:d.params._id,department:t.state.department._id}})}async function _(){await t.actions.delete(d.params._id,t.state.department)}return(o,a)=>(e.openBlock(),e.createElementBlock("div",w,[e.createElementVNode("div",E,[e.createVNode(v.default,{class:"pd-medium bg-grey radius-big"})]),e.createElementVNode("div",q,[e.createElementVNode("header",x,[e.unref(d).params.department?(e.openBlock(),e.createElementBlock("h1",k,"Edit Spot")):(e.openBlock(),e.createElementBlock("h1",P,"Create Spot")),e.createElementVNode("section",S,[e.createVNode(p.default,{submit:h,callback:b},{default:e.withCtx(()=>[e.createTextVNode("Save Spot")]),_:1})])])]),e.createElementVNode("div",D,[e.createElementVNode("div",B,[e.createElementVNode("div",U,[z,e.createElementVNode("div",I,[e.createVNode(N.default,{photo:t.state.department.profile.photo,"onUpdate:photo":a[0]||(a[0]=s=>t.state.department.profile.photo=s),uploadPath:"organizations/"+t.state.department.name+"/avatars",class:"w-8r aspect-1x1 o-hidden mn-r-small radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",O,[e.createVNode(m.default,{field:t.state.department.profile.name,"onUpdate:field":a[1]||(a[1]=s=>t.state.department.profile.name=s),label:"Name",placeholder:"Spot Name",class:"mn-b-small bg-white radius-small pd-medium",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(m.default,{field:t.state.department.profile.description,"onUpdate:field":a[2]||(a[2]=s=>t.state.department.profile.description=s),label:"Description",placeholder:"Spot description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:o.organizationName},null,8,["field","validation"])])])]),e.createElementVNode("div",A,[C,K,e.createElementVNode("div",T,[e.createVNode(r.default,{label:"Pickup",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(r.default,{label:"Delivery",name:"Delivery",value:"courier",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(r.default,{label:"Post",name:"Delivery",value:"post",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"])]),M,e.createElementVNode("div",G,[e.createVNode(r.default,{label:"Cash",name:"Payment",value:"cash",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.payment},null,8,["radio"]),e.createVNode(r.default,{label:"Bank Transfer",name:"Payment",value:"bank",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.payment},null,8,["radio"]),e.createVNode(r.default,{label:"Crypto",name:"Payment",value:"crypto",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.payment},null,8,["radio"])])])]),e.createElementVNode("div",L,[R,e.createVNode(g.default,{apiKey:o.GOOGLE_MAPS_API_KEY,address:t.state.department.address,location:t.state.department.location,label:"Address",placeholder:"Enter delivery address",class:"bg-white radius-small pd-small mn-b-small","onUpdate:location":a[3]||(a[3]=s=>{t.state.department.location=s}),"onUpdate:address":a[4]||(a[4]=s=>{t.state.department.address=s})},null,8,["apiKey","address","location"]),Y,e.createVNode(y.default,{address:t.state.department.address,location:t.state.department.location,apiKey:o.GOOGLE_MAPS_API_KEY,class:"radius-big o-hidden","onUpdate:location":a[5]||(a[5]=s=>{t.state.department.location=s}),"onUpdate:address":a[6]||(a[6]=s=>{t.state.department.address=s})},null,8,["address","location","apiKey"])])]),e.createElementVNode("section",j,[e.createVNode(p.default,{submit:_,callback:o.redirectToDash,class:"bg-grey"},{default:e.withCtx(()=>[e.createTextVNode("Delete Spot")]),_:1},8,["callback"])])]))}},H=V.default(F,[["__scopeId","data-v-d4f32aeb"]]);exports.default=H;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router");require("../../../../../../node_modules/js-cookie/src/js.cookie.cjs");const v=require("../../../../components/Breadcrumbs/Breadcrumbs.vue2.cjs"),N=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const m=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");const V=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),r=require("../../../../components/Checkbox/Checkbox.vue.cjs"),g=require("../../../../components/Address/Address.vue.cjs"),y=require("../../../../components/LocationMarker/LocationMarker.vue.cjs"),p=require("../../../../components/Button/Button.vue2.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.vue.cjs");require("../../../../../../node_modules/vue-select/dist/vue-select.es.cjs");require("../blocks/EditArray.vue2.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/DepartmentMemberModify.vue2.cjs");require("../blocks/User.vue2.cjs");const t=require("../../../spots/store/spots.cjs"),c=require("../../store/memberships.cjs");require("./DepartmentEdit.vue2.cjs");const l=i=>(e.pushScopeId("data-v-d4f32aeb"),i=i(),e.popScopeId(),i),w={class:"for-transition w-100"},E={class:"pd-b-zero pd-t-zero pd-thin"},q={class:"pd-thin"},x={class:"flex-nowrap flex bg-grey pd-medium radius-big"},k={key:0,class:"mn-r-auto"},P={key:1,class:"mn-r-auto"},S={class:"flex-nowrap flex pd-thin"},D={class:"pd-b-zero pd-t-zero pd-thin cols-2 gap-thin"},B={class:"flex-stretch flex-column flex"},U={class:"mn-b-thin bg-grey pd-medium o-hidden radius-big"},z=l(()=>e.createElementVNode("h3",{class:"mn-b-semi"},"Profile",-1)),I={class:"radius-small flex-nowrap flex"},O={class:"w-100 flex-child-grow-1 flex-child"},A={class:"bg-grey pd-medium o-hidden radius-big"},C=l(()=>e.createElementVNode("h3",{class:"mn-b-semi"},"Details",-1)),K=l(()=>e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please the available delivery options:",-1)),T={class:"mn-b-medium flex-nowrap flex"},M=l(()=>e.createElementVNode("p",{class:"p-medium mn-b-small"},"Please select the available payment methods:",-1)),G={class:"flex-nowrap flex"},L={class:"bg-grey pd-medium o-hidden radius-big"},R=l(()=>e.createElementVNode("h3",{class:"mn-b-semi"},"Location",-1)),Y=l(()=>e.createElementVNode("p",{class:"mn-b-small p-medium"},"Or choose on map:",-1)),j={class:"flex-nowrap flex pd-thin"},F={__name:"DepartmentEdit",setup(i){const u=n.useRouter(),d=n.useRoute();e.ref("details"),e.ref(!1);async function f(){d.params.department&&await c.actions.read(d.params.department),e.ref(c.state.memberships),await t.actions.read(d.params._id),d.params.department&&await t.actions.readOne(d.params.department)}f(),e.ref(t.state.department.members),e.ref(!1),e.ref(null),e.ref(!1),e.ref(null);async function h(){d.params.department&&await t.actions.update(d.params._id,t.state.department),d.params.department||await t.actions.create(d.params._id,t.state.department)}function b(){u.replace({name:"Department",params:{_id:d.params._id,department:t.state.department._id}})}async function _(){await t.actions.delete(d.params._id,t.state.department)}return(o,a)=>(e.openBlock(),e.createElementBlock("div",w,[e.createElementVNode("div",E,[e.createVNode(v.default,{class:"pd-medium bg-grey radius-big"})]),e.createElementVNode("div",q,[e.createElementVNode("header",x,[e.unref(d).params.department?(e.openBlock(),e.createElementBlock("h1",k,"Edit Spot")):(e.openBlock(),e.createElementBlock("h1",P,"Create Spot")),e.createElementVNode("section",S,[e.createVNode(p.default,{submit:h,callback:b},{default:e.withCtx(()=>[e.createTextVNode("Save Spot")]),_:1})])])]),e.createElementVNode("div",D,[e.createElementVNode("div",B,[e.createElementVNode("div",U,[z,e.createElementVNode("div",I,[e.createVNode(N.default,{photo:t.state.department.profile.photo,"onUpdate:photo":a[0]||(a[0]=s=>t.state.department.profile.photo=s),uploadPath:"organizations/"+t.state.department.name+"/avatars",class:"w-8r aspect-1x1 o-hidden mn-r-small radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",O,[e.createVNode(m.default,{field:t.state.department.profile.name,"onUpdate:field":a[1]||(a[1]=s=>t.state.department.profile.name=s),label:"Name",placeholder:"Spot Name",class:"mn-b-small bg-white radius-small pd-medium",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(m.default,{field:t.state.department.profile.description,"onUpdate:field":a[2]||(a[2]=s=>t.state.department.profile.description=s),label:"Description",placeholder:"Spot description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:o.organizationName},null,8,["field","validation"])])])]),e.createElementVNode("div",A,[C,K,e.createElementVNode("div",T,[e.createVNode(r.default,{label:"Pickup",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(r.default,{label:"Delivery",name:"Delivery",value:"courier",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(r.default,{label:"Post",name:"Delivery",value:"post",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"])]),M,e.createElementVNode("div",G,[e.createVNode(r.default,{label:"Cash",name:"Payment",value:"cash",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.payment},null,8,["radio"]),e.createVNode(r.default,{label:"Bank Transfer",name:"Payment",value:"bank",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.payment},null,8,["radio"]),e.createVNode(r.default,{label:"Crypto",name:"Payment",value:"crypto",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.payment},null,8,["radio"])])])]),e.createElementVNode("div",L,[R,e.createVNode(g.default,{apiKey:o.GOOGLE_MAPS_API_KEY,address:t.state.department.address,location:t.state.department.location,label:"Address",placeholder:"Enter delivery address",class:"bg-white radius-small pd-small mn-b-small","onUpdate:location":a[3]||(a[3]=s=>{t.state.department.location=s}),"onUpdate:address":a[4]||(a[4]=s=>{t.state.department.address=s})},null,8,["apiKey","address","location"]),Y,e.createVNode(y.default,{address:t.state.department.address,location:t.state.department.location,apiKey:o.GOOGLE_MAPS_API_KEY,class:"radius-big o-hidden","onUpdate:location":a[5]||(a[5]=s=>{t.state.department.location=s}),"onUpdate:address":a[6]||(a[6]=s=>{t.state.department.address=s})},null,8,["address","location","apiKey"])])]),e.createElementVNode("section",j,[e.createVNode(p.default,{submit:_,callback:o.redirectToDash,class:"bg-grey"},{default:e.withCtx(()=>[e.createTextVNode("Delete Spot")]),_:1},8,["callback"])])]))}},H=V.default(F,[["__scopeId","data-v-d4f32aeb"]]);exports.default=H;
@@ -3,7 +3,7 @@ import { useRouter as S, useRoute as E } from "vue-router";
3
3
  import "../../../../../../node_modules/js-cookie/src/js.cookie.js";
4
4
  import z from "../../../../components/Breadcrumbs/Breadcrumbs.vue2.js";
5
5
  import N from "../../../../components/UploadImage/UploadImage.vue.js";
6
- import "../../../../components/Tab/Tab.vue2.js";
6
+ import "../../../../components/Tab/Tab.vue.js";
7
7
  import _ from "../../../../components/Field/Field.vue2.js";
8
8
  import "../../../../components/Select/Select.vue.js";
9
9
  import U from "../../../../../../_virtual/_plugin-vue_export-helper.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const q=require("../../../../components/Tab/Tab.vue.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const _=require("../../../events/components/sections/Feed.vue.cjs"),p=require("../../../community/components/sections/Feed.vue.cjs"),v=require("../../../spots/components/sections/Feed.vue.cjs"),f=require("../sections/DetailsTab.vue.cjs"),b=require("../../../products/components/pages/Products.vue.cjs");require("../../../../components/Spoiler/Spoiler.vue.cjs");require("../../../../components/Map/Map.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/User.vue2.cjs");require("../blocks/CardDepartment.vue2.cjs");require("../../store/departments.cjs");const a=require("../../../auth/store/auth.cjs");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("../../store/invites.cjs");const l=require("../../store/memberships.cjs"),o=require("../../store/organizations.cjs");require("./Organization.vue2.cjs");const y={key:0,class:"pd-thin for-transition w-100"},g={class:"pos-relative"},h={key:0},k={__name:"Organization",setup(N){const c=i.useRouter(),r=i.useRoute();let d=r.query.tab?r.query.tab:"events";const u=e.ref(null);e.onMounted(async()=>{u.value=await o.actions.read({_id:r.params._id,user:a.state.user._id}),await l.actions.read(r.params._id)});const t=e.ref(d);return r.query.tab=t.value,e.watch(t,n=>{c.replace({query:{...r.query,tab:n}})}),(n,s)=>u.value?(e.openBlock(),e.createElementBlock("div",y,[e.createVNode(f.default,{organization:o.state.current,user:a.state.user,class:"mn-b-semi"},null,8,["organization","user"]),e.createVNode(q.default,{selected:t.value,"onUpdate:selected":s[0]||(s[0]=m=>t.value=m),tabs:[{name:"Community",value:"community"},{name:"Events",value:"events"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("div",g,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[t.value==="community"?(e.openBlock(),e.createBlock(p.default,{key:0,user:a.state.user._id,owner:e.unref(r).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[t.value==="events"?(e.openBlock(),e.createBlock(_.default,{key:0,user:a.state.user._id,owner:e.unref(r).params._id,sortOrder:"desc",sortParam:"date.start"},null,8,["user","owner","sortParam"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[t.value==="products"?(e.openBlock(),e.createBlock(b.default,{key:0,organization:o.state.current},null,8,["organization"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[t.value==="spots"?(e.openBlock(),e.createElementBlock("div",h,[e.createVNode(v.default,{organization:o.state.current,memberships:l.state.memberships},null,8,["organization","memberships"])])):e.createCommentVNode("",!0)]),_:1})])])):e.createCommentVNode("",!0)}};exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),i=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const q=require("../../../../components/Tab/Tab.vue2.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const _=require("../../../events/components/sections/Feed.vue.cjs"),p=require("../../../community/components/sections/Feed.vue.cjs"),v=require("../../../spots/components/sections/Feed.vue.cjs"),f=require("../sections/DetailsTab.vue.cjs"),b=require("../../../products/components/pages/Products.vue.cjs");require("../../../../components/Spoiler/Spoiler.vue.cjs");require("../../../../components/Map/Map.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/User.vue2.cjs");require("../blocks/CardDepartment.vue2.cjs");require("../../store/departments.cjs");const a=require("../../../auth/store/auth.cjs");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("../../store/invites.cjs");const l=require("../../store/memberships.cjs"),o=require("../../store/organizations.cjs");require("./Organization.vue2.cjs");const y={key:0,class:"pd-thin for-transition w-100"},g={class:"pos-relative"},h={key:0},k={__name:"Organization",setup(N){const c=i.useRouter(),r=i.useRoute();let d=r.query.tab?r.query.tab:"events";const u=e.ref(null);e.onMounted(async()=>{u.value=await o.actions.read({_id:r.params._id,user:a.state.user._id}),await l.actions.read(r.params._id)});const t=e.ref(d);return r.query.tab=t.value,e.watch(t,n=>{c.replace({query:{...r.query,tab:n}})}),(n,s)=>u.value?(e.openBlock(),e.createElementBlock("div",y,[e.createVNode(f.default,{organization:o.state.current,user:a.state.user,class:"mn-b-semi"},null,8,["organization","user"]),e.createVNode(q.default,{selected:t.value,"onUpdate:selected":s[0]||(s[0]=m=>t.value=m),tabs:[{name:"Community",value:"community"},{name:"Events",value:"events"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("div",g,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[t.value==="community"?(e.openBlock(),e.createBlock(p.default,{key:0,user:a.state.user._id,owner:e.unref(r).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[t.value==="events"?(e.openBlock(),e.createBlock(_.default,{key:0,user:a.state.user._id,owner:e.unref(r).params._id,sortOrder:"desc",sortParam:"date.start"},null,8,["user","owner","sortParam"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[t.value==="products"?(e.openBlock(),e.createBlock(b.default,{key:0,organization:o.state.current},null,8,["organization"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[t.value==="spots"?(e.openBlock(),e.createElementBlock("div",h,[e.createVNode(v.default,{organization:o.state.current,memberships:l.state.memberships},null,8,["organization","memberships"])])):e.createCommentVNode("",!0)]),_:1})])])):e.createCommentVNode("",!0)}};exports.default=k;
@@ -3,7 +3,7 @@ import { useRouter as z, useRoute as $ } from "vue-router";
3
3
  import "vue-i18n";
4
4
  import "../../../globals/localization/vue-i18n.js";
5
5
  import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
6
- import k from "../../../../components/Tab/Tab.vue.js";
6
+ import k from "../../../../components/Tab/Tab.vue2.js";
7
7
  import "../../../mobile/components/Menu/Menu.vue.js";
8
8
  import "../../../mobile/components/Menu/MenuItem.vue.js";
9
9
  import q from "../../../events/components/sections/Feed.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),n=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const p=require("../../../../components/FieldTags/BlockTags.vue.cjs");require("../../../../components/Tab/Tab.vue2.cjs");const l=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");const f=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),g=require("../../../../components/UploadImage/UploadImage.vue.cjs"),b=require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Popup/Popup.vue.cjs");const h=require("../../../auth/store/auth.cjs"),e=require("../../store/organizations.cjs");require("../../store/memberships.cjs");const y={class:"for-transition pd-thin"},_=t.createElementVNode("h3",{class:"mn-b-small"},"Type of group",-1),V=t.createElementVNode("p",{class:"mn-b-thin"},"Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.",-1),N=t.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),q={class:"mn-b-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},v=t.createElementVNode("h4",null,"Upload photo",-1),w=t.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),x=t.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),U={__name:"OrganizationEdit",async setup(k){let o,i;const s=n.useRoute(),d=n.useRouter();e.actions.reset(),s.params._id&&([o,i]=t.withAsyncContext(()=>e.actions.read({_id:s.params._id})),await o,i());const u=t.computed(()=>e.state.current);async function c(){s.params._id?await e.actions.update(s.params._id,u.value):await e.actions.create(e.state.current,h.state.user._id)}function m(){d.replace({name:"Organization",params:{_id:e.state.current._id}})}return(E,a)=>(t.openBlock(),t.createElementBlock("div",y,[_,V,t.createVNode(f.default,{modelValue:e.state.current.types,"onUpdate:modelValue":a[0]||(a[0]=r=>e.state.current.types=r),options:["public","exclusive","hidden"],multiple:!1,taggable:!1,placeholder:"Type to search or add type of organization",class:"mn-b-semi bg-grey pd-medium radius-small"},null,8,["modelValue"]),N,t.createElementVNode("div",q,[t.createVNode(g.default,{photo:e.state.current.profile.photo,"onUpdate:photo":a[1]||(a[1]=r=>e.state.current.profile.photo=r),uploadPath:"organizations/"+e.state.current._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo","uploadPath"]),v]),t.createVNode(l.default,{field:e.state.current.profile.name,"onUpdate:field":a[2]||(a[2]=r=>e.state.current.profile.name=r),placeholder:"Name of organization",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.profile.description,"onUpdate:field":a[3]||(a[3]=r=>e.state.current.profile.description=r),placeholder:"Brief description of your group",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(p.default,{onTagsChanged:a[4]||(a[4]=r=>e.state.current.profile.tags=r),tags:e.state.current.profile.tags},null,8,["tags"]),w,x,t.createVNode(l.default,{field:e.state.current.socials.instagram,"onUpdate:field":a[5]||(a[5]=r=>e.state.current.socials.instagram=r),label:"Instagram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.twitter,"onUpdate:field":a[6]||(a[6]=r=>e.state.current.socials.twitter=r),label:"Twitter",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.facebook,"onUpdate:field":a[7]||(a[7]=r=>e.state.current.socials.facebook=r),label:"Facebook",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.telegram,"onUpdate:field":a[8]||(a[8]=r=>e.state.current.socials.telegram=r),label:"Telegram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(b.default,{submit:c,callback:m,class:"mn-b-thin"},{default:t.withCtx(()=>[t.createTextVNode("Save")]),_:1})]))}};exports.default=U;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),n=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const p=require("../../../../components/FieldTags/BlockTags.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");const f=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),g=require("../../../../components/UploadImage/UploadImage.vue.cjs"),b=require("../../../../components/Button/Button.vue2.cjs");require("../../../../components/Popup/Popup.vue.cjs");const h=require("../../../auth/store/auth.cjs"),e=require("../../store/organizations.cjs");require("../../store/memberships.cjs");const y={class:"for-transition pd-thin"},_=t.createElementVNode("h3",{class:"mn-b-small"},"Type of group",-1),V=t.createElementVNode("p",{class:"mn-b-thin"},"Public groups are open to everyone, whereas in exclusive groups only members can post. If you wish to make a group private, select 'hidden'.",-1),N=t.createElementVNode("h3",{class:"mn-b-small"},"Profile",-1),q={class:"mn-b-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},v=t.createElementVNode("h4",null,"Upload photo",-1),w=t.createElementVNode("h3",{class:"mn-b-small"},"Socials",-1),x=t.createElementVNode("p",{class:"mn-b-thin"},"Please provide only the username for social media profiles, without full links.",-1),U={__name:"OrganizationEdit",async setup(k){let o,i;const s=n.useRoute(),d=n.useRouter();e.actions.reset(),s.params._id&&([o,i]=t.withAsyncContext(()=>e.actions.read({_id:s.params._id})),await o,i());const u=t.computed(()=>e.state.current);async function c(){s.params._id?await e.actions.update(s.params._id,u.value):await e.actions.create(e.state.current,h.state.user._id)}function m(){d.replace({name:"Organization",params:{_id:e.state.current._id}})}return(E,a)=>(t.openBlock(),t.createElementBlock("div",y,[_,V,t.createVNode(f.default,{modelValue:e.state.current.types,"onUpdate:modelValue":a[0]||(a[0]=r=>e.state.current.types=r),options:["public","exclusive","hidden"],multiple:!1,taggable:!1,placeholder:"Type to search or add type of organization",class:"mn-b-semi bg-grey pd-medium radius-small"},null,8,["modelValue"]),N,t.createElementVNode("div",q,[t.createVNode(g.default,{photo:e.state.current.profile.photo,"onUpdate:photo":a[1]||(a[1]=r=>e.state.current.profile.photo=r),uploadPath:"organizations/"+e.state.current._id+"/avatars",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo","uploadPath"]),v]),t.createVNode(l.default,{field:e.state.current.profile.name,"onUpdate:field":a[2]||(a[2]=r=>e.state.current.profile.name=r),placeholder:"Name of organization",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.profile.description,"onUpdate:field":a[3]||(a[3]=r=>e.state.current.profile.description=r),placeholder:"Brief description of your group",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(p.default,{onTagsChanged:a[4]||(a[4]=r=>e.state.current.profile.tags=r),tags:e.state.current.profile.tags},null,8,["tags"]),w,x,t.createVNode(l.default,{field:e.state.current.socials.instagram,"onUpdate:field":a[5]||(a[5]=r=>e.state.current.socials.instagram=r),label:"Instagram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.twitter,"onUpdate:field":a[6]||(a[6]=r=>e.state.current.socials.twitter=r),label:"Twitter",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.facebook,"onUpdate:field":a[7]||(a[7]=r=>e.state.current.socials.facebook=r),label:"Facebook",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(l.default,{field:e.state.current.socials.telegram,"onUpdate:field":a[8]||(a[8]=r=>e.state.current.socials.telegram=r),label:"Telegram",placeholder:"",class:"mn-b-thin bg-grey pd-medium radius-small"},null,8,["field"]),t.createVNode(b.default,{submit:c,callback:m,class:"mn-b-thin"},{default:t.withCtx(()=>[t.createTextVNode("Save")]),_:1})]))}};exports.default=U;
@@ -4,7 +4,7 @@ import "vue-i18n";
4
4
  import "../../../globals/localization/vue-i18n.js";
5
5
  import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
6
6
  import v from "../../../../components/FieldTags/BlockTags.vue.js";
7
- import "../../../../components/Tab/Tab.vue2.js";
7
+ import "../../../../components/Tab/Tab.vue.js";
8
8
  import i from "../../../../components/Field/Field.vue2.js";
9
9
  import "../../../../components/Select/Select.vue.js";
10
10
  import U from "../../../../components/SelectMulti/SelectMulti.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),c=require("../../../../components/Tab/Tab.vue.cjs"),l=require("../sections/Feed.vue.cjs"),u=require("../../../auth/store/auth.cjs"),m={class:"pd-thin"},b={class:"mn-b-medium flex-v-center flex-nowrap flex"},f=e.createElementVNode("h2",{class:"mn-r-medium"},"Groups",-1),p={__name:"Organizations",setup(_){const t=n.useRoute(),i=n.useRouter();let d=t.query.tab?t.query.tab:"member";const r=e.ref(d);return t.query.tab=r.value,e.watch(r,o=>{i.replace({query:{...t.query,tab:o}})}),(o,a)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",b,[f,u.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=s=>o.$router.push({name:"Create Organization"})),class:"radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),e.createVNode(c.default,{selected:r.value,"onUpdate:selected":a[1]||(a[1]=s=>r.value=s),tabs:[{name:"Member",value:"member"},{name:"Follower",value:"follower"}],class:"mn-b-medium mn-r-medium o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="member"?(e.openBlock(),e.createBlock(l.default,{key:0,user:u.state.user._id,owner:e.unref(t).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="follower"?(e.openBlock(),e.createBlock(l.default,{key:0,user:u.state.user._id,subscriber:e.unref(t).params._id},null,8,["user","subscriber"])):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=p;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),c=require("../../../../components/Tab/Tab.vue2.cjs"),l=require("../sections/Feed.vue.cjs"),u=require("../../../auth/store/auth.cjs"),m={class:"pd-thin"},b={class:"mn-b-medium flex-v-center flex-nowrap flex"},f=e.createElementVNode("h2",{class:"mn-r-medium"},"Groups",-1),p={__name:"Organizations",setup(_){const t=n.useRoute(),i=n.useRouter();let d=t.query.tab?t.query.tab:"member";const r=e.ref(d);return t.query.tab=r.value,e.watch(r,o=>{i.replace({query:{...t.query,tab:o}})}),(o,a)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",b,[f,u.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=s=>o.$router.push({name:"Create Organization"})),class:"radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),e.createVNode(c.default,{selected:r.value,"onUpdate:selected":a[1]||(a[1]=s=>r.value=s),tabs:[{name:"Member",value:"member"},{name:"Follower",value:"follower"}],class:"mn-b-medium mn-r-medium o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="member"?(e.openBlock(),e.createBlock(l.default,{key:0,user:u.state.user._id,owner:e.unref(t).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="follower"?(e.openBlock(),e.createBlock(l.default,{key:0,user:u.state.user._id,subscriber:e.unref(t).params._id},null,8,["user","subscriber"])):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=p;
@@ -1,6 +1,6 @@
1
1
  import { ref as h, watch as w, openBlock as a, createElementBlock as l, createElementVNode as _, unref as o, createCommentVNode as u, createVNode as n, Transition as d, withCtx as c, createBlock as b } from "vue";
2
2
  import { useRoute as y, useRouter as g } from "vue-router";
3
- import k from "../../../../components/Tab/Tab.vue.js";
3
+ import k from "../../../../components/Tab/Tab.vue2.js";
4
4
  import p from "../sections/Feed.vue.js";
5
5
  import { state as i } from "../../../auth/store/auth.js";
6
6
  const q = { class: "pd-thin" }, x = { class: "mn-b-medium flex-v-center flex-nowrap flex" }, C = /* @__PURE__ */ _("h2", { class: "mn-r-medium" }, "Groups", -1), E = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue2.cjs");const c=require("../blocks/EmptyState.vue.cjs"),m=require("../blocks/CardDepartment.vue.cjs"),d=require("../../store/departments.cjs"),p=require("../../../auth/store/auth.cjs"),g={__name:"FeedDepartments",props:{organization:Object,units:Array,memberships:Array},async setup(a){let l,u;const o=a;e.ref("departments"),[l,u]=e.withAsyncContext(()=>d.actions.read(o.organization._id)),await l,u();const i=e.computed(()=>{const n=d.state.departments,r=n.flatMap(t=>t.subdepartments.map(s=>s._id));return n.filter(t=>!r.includes(t._id))});return(n,r)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("div",null,[i.value.length<1?(e.openBlock(),e.createBlock(c.default,{key:0,title:"You don't have any spots yet.",description:"Add spots to your hub.",action:"Add spot",callback:()=>n.$router.push(`/organization/${o.organization._id}/departments/create`)},null,8,["callback"])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(t,s)=>(e.openBlock(),e.createBlock(m.default,{key:s,department:t,organization:a.organization,class:"radius-big bg-grey mn-b-thin"},null,8,["department","organization"]))),128)),i.value.length>0&&p.state.user._id===a.organization.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:r[0]||(r[0]=t=>n.$router.push(`/organization/${o.organization._id}/departments/create`)),class:"mn-b-thin button w-100"}," Add spot ")):e.createCommentVNode("",!0)])])]),_:1}))}};exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const c=require("../blocks/EmptyState.vue.cjs"),m=require("../blocks/CardDepartment.vue.cjs"),d=require("../../store/departments.cjs"),p=require("../../../auth/store/auth.cjs"),g={__name:"FeedDepartments",props:{organization:Object,units:Array,memberships:Array},async setup(a){let l,u;const o=a;e.ref("departments"),[l,u]=e.withAsyncContext(()=>d.actions.read(o.organization._id)),await l,u();const i=e.computed(()=>{const n=d.state.departments,r=n.flatMap(t=>t.subdepartments.map(s=>s._id));return n.filter(t=>!r.includes(t._id))});return(n,r)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("div",null,[i.value.length<1?(e.openBlock(),e.createBlock(c.default,{key:0,title:"You don't have any spots yet.",description:"Add spots to your hub.",action:"Add spot",callback:()=>n.$router.push(`/organization/${o.organization._id}/departments/create`)},null,8,["callback"])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(t,s)=>(e.openBlock(),e.createBlock(m.default,{key:s,department:t,organization:a.organization,class:"radius-big bg-grey mn-b-thin"},null,8,["department","organization"]))),128)),i.value.length>0&&p.state.user._id===a.organization.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:r[0]||(r[0]=t=>n.$router.push(`/organization/${o.organization._id}/departments/create`)),class:"mn-b-thin button w-100"}," Add spot ")):e.createCommentVNode("",!0)])])]),_:1}))}};exports.default=g;
@@ -1,5 +1,5 @@
1
1
  import { ref as g, withAsyncContext as b, computed as f, openBlock as n, createBlock as d, Transition as y, withCtx as _, createElementVNode as u, createCommentVNode as p, createElementBlock as c, Fragment as h, renderList as z } from "vue";
2
- import "../../../../components/Tab/Tab.vue2.js";
2
+ import "../../../../components/Tab/Tab.vue.js";
3
3
  import k from "../blocks/EmptyState.vue.js";
4
4
  import v from "../blocks/CardDepartment.vue.js";
5
5
  import { actions as $, state as A } from "../../store/departments.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("../../../../components/Tab/Tab.vue.cjs"),v={class:"mn-b-big radius-medium bg-white"},b={key:0,class:"pd-semi"},_={class:"br-grey br-1px br-solid radius-small flex-nowrap flex-v-center flex pd-medium"},k={class:"w-100 mn-r-small"},h={class:"t-transp"},B={key:0,class:"mn-l-medium flex-v-center flex"},f=["onClick"],g={key:1,class:"pd-semi"},E={key:0},y={class:"br-grey br-1px br-solid radius-small mn-b-thin flex-nowrap flex-v-center flex pd-medium"},x={class:"w-100 mn-r-small"},N={class:"t-transp"},V={class:"mn-l-medium flex-v-center flex"},C=["onClick"],S={__name:"MembersList",props:{organization:Object,memberships:Array,invites:Array},emits:[["removeMember","removeInvite"]],setup(n,{emit:a}){const i=n,c=a,o=e.ref("members");function m(l,s){i.memberships.splice(l,1),c("removeMember",s)}function d(l,s){i.invites.splice(l,1),c("removeInvite",s)}return(l,s)=>(e.openBlock(),e.createElementBlock("section",v,[e.createVNode(p.default,{selected:o.value,"onUpdate:selected":s[0]||(s[0]=t=>o.value=t),class:"br-grey br-b br-solid radius-small",tabs:[{name:"Участники",value:"members"},{name:"Приглашения",value:"invites"}]},null,8,["selected"]),o.value==="members"?(e.openBlock(),e.createElementBlock("div",b,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.memberships,(t,r)=>(e.openBlock(),e.createElementBlock("div",_,[e.createElementVNode("span",k,e.toDisplayString(t.user.email)+" "+e.toDisplayString(t.user.phone),1),e.createElementVNode("span",h,e.toDisplayString(t.position),1),t.position!=="Основатель"?(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("button",{onClick:u=>m(r,t),class:"button-small button"},"×",8,f)])):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),o.value==="invites"?(e.openBlock(),e.createElementBlock("div",g,[n.invites.length<1?(e.openBlock(),e.createElementBlock("span",E,"В организации нет приглашений")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.invites,(t,r)=>(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("span",x,e.toDisplayString(t.invitedEmail)+" "+e.toDisplayString(t.invitedPhone),1),e.createElementVNode("span",N,e.toDisplayString(t.status),1),e.createElementVNode("div",V,[e.createElementVNode("button",{onClick:u=>d(r,t),class:"button-small button"},"×",8,C)])]))),256))])):e.createCommentVNode("",!0)]))}};exports.default=S;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("../../../../components/Tab/Tab.vue2.cjs"),v={class:"mn-b-big radius-medium bg-white"},b={key:0,class:"pd-semi"},_={class:"br-grey br-1px br-solid radius-small flex-nowrap flex-v-center flex pd-medium"},k={class:"w-100 mn-r-small"},h={class:"t-transp"},B={key:0,class:"mn-l-medium flex-v-center flex"},f=["onClick"],g={key:1,class:"pd-semi"},E={key:0},y={class:"br-grey br-1px br-solid radius-small mn-b-thin flex-nowrap flex-v-center flex pd-medium"},x={class:"w-100 mn-r-small"},N={class:"t-transp"},V={class:"mn-l-medium flex-v-center flex"},C=["onClick"],S={__name:"MembersList",props:{organization:Object,memberships:Array,invites:Array},emits:[["removeMember","removeInvite"]],setup(n,{emit:a}){const i=n,c=a,o=e.ref("members");function m(l,s){i.memberships.splice(l,1),c("removeMember",s)}function d(l,s){i.invites.splice(l,1),c("removeInvite",s)}return(l,s)=>(e.openBlock(),e.createElementBlock("section",v,[e.createVNode(p.default,{selected:o.value,"onUpdate:selected":s[0]||(s[0]=t=>o.value=t),class:"br-grey br-b br-solid radius-small",tabs:[{name:"Участники",value:"members"},{name:"Приглашения",value:"invites"}]},null,8,["selected"]),o.value==="members"?(e.openBlock(),e.createElementBlock("div",b,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.memberships,(t,r)=>(e.openBlock(),e.createElementBlock("div",_,[e.createElementVNode("span",k,e.toDisplayString(t.user.email)+" "+e.toDisplayString(t.user.phone),1),e.createElementVNode("span",h,e.toDisplayString(t.position),1),t.position!=="Основатель"?(e.openBlock(),e.createElementBlock("div",B,[e.createElementVNode("button",{onClick:u=>m(r,t),class:"button-small button"},"×",8,f)])):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),o.value==="invites"?(e.openBlock(),e.createElementBlock("div",g,[n.invites.length<1?(e.openBlock(),e.createElementBlock("span",E,"В организации нет приглашений")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.invites,(t,r)=>(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("span",x,e.toDisplayString(t.invitedEmail)+" "+e.toDisplayString(t.invitedPhone),1),e.createElementVNode("span",N,e.toDisplayString(t.status),1),e.createElementVNode("div",V,[e.createElementVNode("button",{onClick:u=>d(r,t),class:"button-small button"},"×",8,C)])]))),256))])):e.createCommentVNode("",!0)]))}};exports.default=S;
@@ -1,5 +1,5 @@
1
1
  import { ref as x, openBlock as s, createElementBlock as t, createVNode as k, Fragment as v, renderList as b, createElementVNode as n, toDisplayString as o, createCommentVNode as m } from "vue";
2
- import y from "../../../../components/Tab/Tab.vue.js";
2
+ import y from "../../../../components/Tab/Tab.vue2.js";
3
3
  const g = { class: "mn-b-big radius-medium bg-white" }, w = {
4
4
  key: 0,
5
5
  class: "pd-semi"
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router");require("../../../../../../node_modules/js-cookie/src/js.cookie.cjs");require("../../../../components/Tab/Tab.vue2.cjs");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Dropdown/Dropdown.vue2.cjs");const p=require("../../../auth/store/auth.cjs");require("../../store/memberships.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.vue.cjs");require("../../../reports/store/reports.cjs");const y=require("../../store/organizations.cjs"),m=require("../blocks/EmptyState.vue.cjs");require("../../../../components/Spoiler/Spoiler.vue.cjs");require("../../../../components/Map/Map.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/User.vue2.cjs");require("../blocks/CardDepartment.vue2.cjs");require("../../store/departments.cjs");const b=require("../blocks/CardOrganization.vue.cjs");require("./Unit.vue.cjs");require("./Organizations.vue2.cjs");const g={class:"for-transition bg-white radius-big w-100"},k={class:""},_={key:1,class:"cols-1"},h={__name:"Organizations",props:{owner:{type:String,default:null},user:{type:[String,Number],default:null},onlyuser:{type:[String,Number],default:null}},async setup(c){let t,u;const o=c,a=e.ref(null);a.value=([t,u]=e.withAsyncContext(()=>y.actions.read({owner:o.owner,user:o.user,onlyuser:o.onlyuser})),t=await t,u(),t);const d=s.useRouter(),n=s.useRoute();let q=n.query.tab?n.query.tab:"details";const i=e.ref(q);return n.query.tab=i.value,e.watch(i,r=>{d.replace({query:{...n.query,tab:r}})}),(r,v)=>(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",k,[a.value<1?(e.openBlock(),e.createBlock(m.default,{key:0,title:"You Haven't Joined Any Organization Yet",description:"Weeder is all about community. Join an organization or maybe you want to create your own?",action:"Create organization",callback:r.a=()=>r.$router.push("/app/organization/create/details")},null,8,["callback"])):(e.openBlock(),e.createElementBlock("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,l=>(e.openBlock(),e.createBlock(b.default,{key:l._id,organization:l,user:p.state.user,onUpdateMembership:r.handleMembershipUpdate,class:e.normalizeClass(["w-100",{"mn-r-small":r.index!==a.value.length-1}])},null,8,["organization","user","onUpdateMembership","class"]))),128))]))])]))}};exports.default=h;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("vue-router");require("../../../../../../node_modules/js-cookie/src/js.cookie.cjs");require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Dropdown/Dropdown.vue2.cjs");const p=require("../../../auth/store/auth.cjs");require("../../store/memberships.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.vue.cjs");require("../../../reports/store/reports.cjs");const y=require("../../store/organizations.cjs"),m=require("../blocks/EmptyState.vue.cjs");require("../../../../components/Spoiler/Spoiler.vue.cjs");require("../../../../components/Map/Map.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/User.vue2.cjs");require("../blocks/CardDepartment.vue2.cjs");require("../../store/departments.cjs");const b=require("../blocks/CardOrganization.vue.cjs");require("./Unit.vue.cjs");require("./Organizations.vue2.cjs");const g={class:"for-transition bg-white radius-big w-100"},k={class:""},_={key:1,class:"cols-1"},h={__name:"Organizations",props:{owner:{type:String,default:null},user:{type:[String,Number],default:null},onlyuser:{type:[String,Number],default:null}},async setup(c){let t,u;const o=c,a=e.ref(null);a.value=([t,u]=e.withAsyncContext(()=>y.actions.read({owner:o.owner,user:o.user,onlyuser:o.onlyuser})),t=await t,u(),t);const d=s.useRouter(),n=s.useRoute();let q=n.query.tab?n.query.tab:"details";const i=e.ref(q);return n.query.tab=i.value,e.watch(i,r=>{d.replace({query:{...n.query,tab:r}})}),(r,v)=>(e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",k,[a.value<1?(e.openBlock(),e.createBlock(m.default,{key:0,title:"You Haven't Joined Any Organization Yet",description:"Weeder is all about community. Join an organization or maybe you want to create your own?",action:"Create organization",callback:r.a=()=>r.$router.push("/app/organization/create/details")},null,8,["callback"])):(e.openBlock(),e.createElementBlock("div",_,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,l=>(e.openBlock(),e.createBlock(b.default,{key:l._id,organization:l,user:p.state.user,onUpdateMembership:r.handleMembershipUpdate,class:e.normalizeClass(["w-100",{"mn-r-small":r.index!==a.value.length-1}])},null,8,["organization","user","onUpdateMembership","class"]))),128))]))])]))}};exports.default=h;
@@ -1,7 +1,7 @@
1
1
  import { ref as m, withAsyncContext as b, watch as _, openBlock as t, createElementBlock as n, createElementVNode as f, createBlock as p, Fragment as g, renderList as h, normalizeClass as w } from "vue";
2
2
  import { useRouter as v, useRoute as z } from "vue-router";
3
3
  import "../../../../../../node_modules/js-cookie/src/js.cookie.js";
4
- import "../../../../components/Tab/Tab.vue2.js";
4
+ import "../../../../components/Tab/Tab.vue.js";
5
5
  import "../../../../components/Field/Field.vue.js";
6
6
  import "../../../../components/Select/Select.vue.js";
7
7
  import "../../../../components/Button/Button.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),l=require("../blocks/CardOrganization.vue.cjs"),c=require("../../../../components/EmptyState/EmptyState.vue.cjs"),a=require("../../../auth/store/auth.cjs"),d=require("../../store/organizations.cjs"),m=require("../../store/memberships.cjs");require("./Publics.vue2.cjs");const p={class:"w-100 o-scroll"},f={key:1,class:"w-max gap-thin flex-nowrap flex"},h={__name:"Publics",setup(_){let t=e.ref(null);e.onMounted(async()=>{t.value=await d.actions.read({user:a.state.user._id,sort:"numberOfMemberships",limit:10,types:["public"]})});const i=({membership:n,status:o,target:r},s,u)=>{m.mutations.handleMembershipUpdate(organizations.state.current,n,o,r,s,u)};return(n,o)=>(e.openBlock(),e.createElementBlock("div",p,[!e.unref(t)||e.unref(t).length<1?(e.openBlock(),e.createBlock(c.default,{key:0,title:"Unfortunately, we couldn't find any recommendations for you",description:"Explore and find a community or organization that suits your interests.",class:"radius-big bg-grey pd-medium"})):(e.openBlock(),e.createElementBlock("div",f,[e.unref(t)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(t),(r,s)=>(e.openBlock(),e.createBlock(l.default,{key:r._id,organization:r,user:a.state.user,onUpdateMembership:i,class:"flex-child-1 flex-child w-25r"},null,8,["organization","user"]))),128)):e.createCommentVNode("",!0)]))]))}};exports.default=h;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("../blocks/CardOrganization.vue.cjs"),l=require("../../../../components/EmptyState/EmptyState.vue.cjs"),a=require("../../../auth/store/auth.cjs"),d=require("../../store/organizations.cjs"),m=require("../../store/memberships.cjs");require("./Publics.vue2.cjs");const p={class:"w-100 o-scroll"},f={key:1,class:"w-max gap-thin flex-nowrap flex"},_={__name:"Publics",setup(h){let t=e.ref(null);e.onMounted(async()=>{t.value=await d.actions.read({user:a.state.user._id,sort:"numberOfMemberships",limit:10,types:["public"]})});const i=({membership:n,status:o,target:r},s,u)=>{m.mutations.handleMembershipUpdate(organizations.state.current,n,o,r,s,u)};return(n,o)=>(e.openBlock(),e.createElementBlock("div",p,[!e.unref(t)||e.unref(t).length<1?(e.openBlock(),e.createBlock(l.default,{key:0,title:"Unfortunately, we couldn't find any recommendations for you",description:"Explore and find a community or organization that suits your interests.",class:"radius-big bg-grey pd-medium"})):(e.openBlock(),e.createElementBlock("div",f,[e.unref(t)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(t),(r,s)=>(e.openBlock(),e.createBlock(c.default,{key:r._id,organization:r,user:a.state.user,onUpdateMembership:i,class:"w-max"},null,8,["organization","user"]))),128)):e.createCommentVNode("",!0)]))]))}};exports.default=_;
@@ -1,7 +1,7 @@
1
- import { ref as d, onMounted as p, openBlock as t, createElementBlock as i, unref as o, createBlock as m, Fragment as f, renderList as _, createCommentVNode as h } from "vue";
1
+ import { ref as p, onMounted as d, openBlock as t, createElementBlock as n, unref as o, createBlock as m, Fragment as f, renderList as _, createCommentVNode as h } from "vue";
2
2
  import y from "../blocks/CardOrganization.vue.js";
3
3
  import b from "../../../../components/EmptyState/EmptyState.vue.js";
4
- import { state as l } from "../../../auth/store/auth.js";
4
+ import { state as c } from "../../../auth/store/auth.js";
5
5
  import { actions as g } from "../../store/organizations.js";
6
6
  import { mutations as x } from "../../store/memberships.js";
7
7
  import "./Publics.vue2.js";
@@ -11,31 +11,31 @@ const k = { class: "w-100 o-scroll" }, w = {
11
11
  }, F = {
12
12
  __name: "Publics",
13
13
  setup(M) {
14
- let e = d(null);
15
- p(async () => {
14
+ let e = p(null);
15
+ d(async () => {
16
16
  e.value = await g.read({
17
- user: l.user._id,
17
+ user: c.user._id,
18
18
  sort: "numberOfMemberships",
19
19
  limit: 10,
20
20
  types: ["public"]
21
21
  });
22
22
  });
23
- const c = ({ membership: n, status: s, target: r }, a, u) => {
24
- x.handleMembershipUpdate(organizations.state.current, n, s, r, a, u);
23
+ const u = ({ membership: i, status: s, target: r }, a, l) => {
24
+ x.handleMembershipUpdate(organizations.state.current, i, s, r, a, l);
25
25
  };
26
- return (n, s) => (t(), i("div", k, [
26
+ return (i, s) => (t(), n("div", k, [
27
27
  !o(e) || o(e).length < 1 ? (t(), m(b, {
28
28
  key: 0,
29
29
  title: "Unfortunately, we couldn't find any recommendations for you",
30
30
  description: "Explore and find a community or organization that suits your interests.",
31
31
  class: "radius-big bg-grey pd-medium"
32
- })) : (t(), i("div", w, [
33
- o(e) ? (t(!0), i(f, { key: 0 }, _(o(e), (r, a) => (t(), m(y, {
32
+ })) : (t(), n("div", w, [
33
+ o(e) ? (t(!0), n(f, { key: 0 }, _(o(e), (r, a) => (t(), m(y, {
34
34
  key: r._id,
35
35
  organization: r,
36
- user: l.user,
37
- onUpdateMembership: c,
38
- class: "flex-child-1 flex-child w-25r"
36
+ user: c.user,
37
+ onUpdateMembership: u,
38
+ class: "w-max"
39
39
  }, null, 8, ["organization", "user"]))), 128)) : h("", !0)
40
40
  ]))
41
41
  ]));
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue2.cjs");const d=require("../../../organizations/components/blocks/EmptyState.vue.cjs"),p=require("../blocks/CardSpot.vue.cjs"),c=require("../../store/spots.cjs"),m=require("../../../auth/store/auth.cjs"),g={__name:"Feed",props:{organization:Object,units:Array,memberships:Array},async setup(r){let l,u;const s=r;e.ref("spots"),[l,u]=e.withAsyncContext(()=>c.actions.read(s.organization._id)),await l,u();const a=e.computed(()=>{const o=c.state.spots,n=o.flatMap(t=>t.subspots.map(i=>i._id));return o.filter(t=>!n.includes(t._id))});return(o,n)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("div",null,[a.value.length<1?(e.openBlock(),e.createBlock(d.default,{key:0,title:"You don't have any spots yet.",description:"Add spots to your hub.",action:"Add spot",callback:()=>o.$router.push(`/spots/${s.organization._id}/spots/create`)},null,8,["callback"])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(t,i)=>(e.openBlock(),e.createBlock(p.default,{key:i,spot:t,organization:r.organization,class:"radius-big bg-grey mn-b-thin"},null,8,["spot","organization"]))),128)),a.value.length>0&&m.state.user._id===r.organization.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[0]||(n[0]=t=>o.$router.push(`/spots/${s.organization._id}/spots/create`)),class:"mn-b-thin button w-100"}," Add spot ")):e.createCommentVNode("",!0)])])]),_:1}))}};exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const d=require("../../../organizations/components/blocks/EmptyState.vue.cjs"),p=require("../blocks/CardSpot.vue.cjs"),c=require("../../store/spots.cjs"),m=require("../../../auth/store/auth.cjs"),g={__name:"Feed",props:{organization:Object,units:Array,memberships:Array},async setup(r){let l,u;const s=r;e.ref("spots"),[l,u]=e.withAsyncContext(()=>c.actions.read(s.organization._id)),await l,u();const a=e.computed(()=>{const o=c.state.spots,n=o.flatMap(t=>t.subspots.map(i=>i._id));return o.filter(t=>!n.includes(t._id))});return(o,n)=>(e.openBlock(),e.createBlock(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createElementVNode("div",null,[a.value.length<1?(e.openBlock(),e.createBlock(d.default,{key:0,title:"You don't have any spots yet.",description:"Add spots to your hub.",action:"Add spot",callback:()=>o.$router.push(`/spots/${s.organization._id}/spots/create`)},null,8,["callback"])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(t,i)=>(e.openBlock(),e.createBlock(p.default,{key:i,spot:t,organization:r.organization,class:"radius-big bg-grey mn-b-thin"},null,8,["spot","organization"]))),128)),a.value.length>0&&m.state.user._id===r.organization.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[0]||(n[0]=t=>o.$router.push(`/spots/${s.organization._id}/spots/create`)),class:"mn-b-thin button w-100"}," Add spot ")):e.createCommentVNode("",!0)])])]),_:1}))}};exports.default=g;
@@ -1,5 +1,5 @@
1
1
  import { ref as g, withAsyncContext as b, computed as f, openBlock as o, createBlock as l, Transition as y, withCtx as _, createElementVNode as d, createCommentVNode as c, createElementBlock as m, Fragment as h, renderList as k } from "vue";
2
- import "../../../../components/Tab/Tab.vue2.js";
2
+ import "../../../../components/Tab/Tab.vue.js";
3
3
  import v from "../../../organizations/components/blocks/EmptyState.vue.js";
4
4
  import z from "../blocks/CardSpot.vue.js";
5
5
  import { actions as $, state as A } from "../../store/spots.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),i=require("../../../../components/Tab/Tab.vue.cjs"),u=require("../../../community/components/sections/Feed.vue.cjs"),o=require("../../../auth/store/auth.cjs"),m={class:"pd-thin"},p={class:"mn-b-medium flex-v-center flex-nowrap flex"},f=e.createElementVNode("h2",{class:"mn-r-medium"},"Posts",-1),_={__name:"ProfileBlogposts",setup(k){const t=n.useRoute(),c=n.useRouter();let d=t.query.tab?t.query.tab:"posts";const r=e.ref(d);return t.query.tab=r.value,e.watch(r,a=>{c.replace({query:{...t.query,tab:a}})}),(a,s)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",p,[f,o.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:s[0]||(s[0]=l=>a.$router.push({name:"Create BlogPost"})),class:"radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),o.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createBlock(i.default,{key:0,selected:r.value,"onUpdate:selected":s[1]||(s[1]=l=>r.value=l),tabs:[{name:"My posts",value:"posts"},{name:"Drafts",value:"drafts"},{name:"Following",value:"following"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"])):e.createCommentVNode("",!0),r.value==="posts"?(e.openBlock(),e.createBlock(u.default,{key:1,user:o.state.user._id,creator:e.unref(t).params._id},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="drafts"?(e.openBlock(),e.createBlock(u.default,{key:2,user:o.state.user._id,creator:e.unref(t).params._id,status:"draft"},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="following"?(e.openBlock(),e.createBlock(u.default,{key:3,user:o.state.user._id,following:e.unref(t).params._id},null,8,["user","following"])):e.createCommentVNode("",!0)]))}};exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),i=require("../../../../components/Tab/Tab.vue2.cjs"),u=require("../../../community/components/sections/Feed.vue.cjs"),o=require("../../../auth/store/auth.cjs"),m={class:"pd-thin"},p={class:"mn-b-medium flex-v-center flex-nowrap flex"},f=e.createElementVNode("h2",{class:"mn-r-medium"},"Posts",-1),_={__name:"ProfileBlogposts",setup(k){const t=n.useRoute(),c=n.useRouter();let d=t.query.tab?t.query.tab:"posts";const r=e.ref(d);return t.query.tab=r.value,e.watch(r,a=>{c.replace({query:{...t.query,tab:a}})}),(a,s)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",p,[f,o.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:s[0]||(s[0]=l=>a.$router.push({name:"Create BlogPost"})),class:"radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),o.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createBlock(i.default,{key:0,selected:r.value,"onUpdate:selected":s[1]||(s[1]=l=>r.value=l),tabs:[{name:"My posts",value:"posts"},{name:"Drafts",value:"drafts"},{name:"Following",value:"following"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"])):e.createCommentVNode("",!0),r.value==="posts"?(e.openBlock(),e.createBlock(u.default,{key:1,user:o.state.user._id,creator:e.unref(t).params._id},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="drafts"?(e.openBlock(),e.createBlock(u.default,{key:2,user:o.state.user._id,creator:e.unref(t).params._id,status:"draft"},null,8,["user","creator"])):e.createCommentVNode("",!0),r.value==="following"?(e.openBlock(),e.createBlock(u.default,{key:3,user:o.state.user._id,following:e.unref(t).params._id},null,8,["user","following"])):e.createCommentVNode("",!0)]))}};exports.default=_;
@@ -1,6 +1,6 @@
1
1
  import { ref as _, watch as b, openBlock as t, createElementBlock as d, createElementVNode as c, unref as s, createCommentVNode as o, createBlock as l } from "vue";
2
2
  import { useRoute as g, useRouter as v } from "vue-router";
3
- import y from "../../../../components/Tab/Tab.vue.js";
3
+ import y from "../../../../components/Tab/Tab.vue2.js";
4
4
  import i from "../../../community/components/sections/Feed.vue.js";
5
5
  import { state as a } from "../../../auth/store/auth.js";
6
6
  const h = { class: "pd-thin" }, k = { class: "mn-b-medium flex-v-center flex-nowrap flex" }, w = /* @__PURE__ */ c("h2", { class: "mn-r-medium" }, "Posts", -1), E = {