@ozdao/prometheus-framework 0.2.20 → 0.2.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  2. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +72 -2
  3. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  4. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +2 -72
  5. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/Select/Select.vue.js +78 -2
  7. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +2 -78
  9. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +2 -44
  11. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  12. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +44 -2
  13. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +1 -1
  15. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +1 -1
  17. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +1 -1
  19. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +1 -1
  21. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +1 -1
  23. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +1 -1
  25. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  27. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.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/events/components/pages/Events.vue.cjs +1 -1
  34. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
  35. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  39. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +6 -6
  41. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
  45. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +2 -2
  47. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
  49. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  51. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  57. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  61. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.js +13 -13
  63. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  65. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.js +1 -1
  67. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  68. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  69. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  70. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
  71. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  72. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  73. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.cjs +1 -1
  74. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.js +1 -1
  75. package/dist/style.css +1 -1
  76. package/package.json +1 -1
  77. package/src/modules/organizations/components/blocks/CardOrganization.vue +4 -4
  78. package/src/modules/organizations/components/sections/Publics.vue +1 -1
@@ -1,5 +1,5 @@
1
1
  import { ref as d, resolveComponent as C, openBlock as k, createElementBlock as E, createElementVNode as o, toDisplayString as n, unref as t, createVNode as a, Transition as h, withCtx as m, withDirectives as _, vShow as f, createTextVNode as v } from "vue";
2
- import x from "../../../../components/Tab/Tab.vue.js";
2
+ import x from "../../../../components/Tab/Tab.vue2.js";
3
3
  import N from "../../../../components/Field/Field.vue2.js";
4
4
  import S from "../../../../components/FieldPhone/FieldPhone.vue.js";
5
5
  import D from "../../../../components/Button/Button.vue2.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),u=require("../../../../components/Select/Select.vue2.cjs"),a=require("../../store/blogposts.cjs"),c=require("../../../auth/store/auth.cjs"),m={class:"min-h-100vh pd-thin"},d={class:"mn-b-thin flex-v-center t-left flex-nowrap flex"},p={class:"flex-v-center flex-nowrap flex t-left"},f=e.createElementVNode("span",{class:""},"Topics for ",-1),g={class:"w-100 bg-grey pd-small radius-big mn-b-semi gap-thin flex-nowrap flex"},h={class:""},w={__name:"Community",setup(k){const l=n.useRoute(),r=n.useRouter();return(y,t)=>{const s=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",d,[e.createElementVNode("h2",p,[f,e.createVNode(u.default,{options:["today","week","month","year"],select:a.state.filter.period,"onUpdate:select":t[0]||(t[0]=o=>a.state.filter.period=o),placeholder:"Select type",class:"w-max mn-l-small bg-grey pd-thin radius-medium h2 t-center t-black"},null,8,["select"])])]),e.createElementVNode("ul",g,[e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="featured"},"t-medium pd-thin radius-small"]),onClick:t[1]||(t[1]=o=>e.unref(r).push({name:"Blog"}))},"👑 Featured",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="popular"},"t-medium pd-thin radius-small"]),onClick:t[2]||(t[2]=o=>e.unref(r).push({name:"Blog",params:{category:"popular"}}))},"🔥 Popular",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="new"},"t-medium pd-thin radius-small"]),onClick:t[3]||(t[3]=o=>e.unref(r).push({name:"Blog",params:{category:"new"}}))},"🆕 New",2),c.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="following"},"t-medium pd-thin radius-small"]),onClick:t[4]||(t[4]=o=>e.unref(r).push({name:"Blog",params:{category:"following"}}))},"👥 Following",2)):e.createCommentVNode("",!0)]),e.createElementVNode("section",h,[e.createVNode(s,null,{default:e.withCtx(({Component:o,route:i})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{ref:"page",key:i.query}))]),_:2},1024)]),_:1})])])}}};exports.default=w;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),u=require("../../../../components/Select/Select.vue.cjs"),a=require("../../store/blogposts.cjs"),c=require("../../../auth/store/auth.cjs"),m={class:"min-h-100vh pd-thin"},d={class:"mn-b-thin flex-v-center t-left flex-nowrap flex"},p={class:"flex-v-center flex-nowrap flex t-left"},f=e.createElementVNode("span",{class:""},"Topics for ",-1),g={class:"w-100 bg-grey pd-small radius-big mn-b-semi gap-thin flex-nowrap flex"},h={class:""},w={__name:"Community",setup(k){const l=n.useRoute(),r=n.useRouter();return(y,t)=>{const s=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",d,[e.createElementVNode("h2",p,[f,e.createVNode(u.default,{options:["today","week","month","year"],select:a.state.filter.period,"onUpdate:select":t[0]||(t[0]=o=>a.state.filter.period=o),placeholder:"Select type",class:"w-max mn-l-small bg-grey pd-thin radius-medium h2 t-center t-black"},null,8,["select"])])]),e.createElementVNode("ul",g,[e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="featured"},"t-medium pd-thin radius-small"]),onClick:t[1]||(t[1]=o=>e.unref(r).push({name:"Blog"}))},"👑 Featured",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="popular"},"t-medium pd-thin radius-small"]),onClick:t[2]||(t[2]=o=>e.unref(r).push({name:"Blog",params:{category:"popular"}}))},"🔥 Popular",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="new"},"t-medium pd-thin radius-small"]),onClick:t[3]||(t[3]=o=>e.unref(r).push({name:"Blog",params:{category:"new"}}))},"🆕 New",2),c.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="following"},"t-medium pd-thin radius-small"]),onClick:t[4]||(t[4]=o=>e.unref(r).push({name:"Blog",params:{category:"following"}}))},"👥 Following",2)):e.createCommentVNode("",!0)]),e.createElementVNode("section",h,[e.createVNode(s,null,{default:e.withCtx(({Component:o,route:i})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{ref:"page",key:i.query}))]),_:2},1024)]),_:1})])])}}};exports.default=w;
@@ -1,6 +1,6 @@
1
1
  import { resolveComponent as f, openBlock as n, createElementBlock as m, createElementVNode as o, createVNode as i, normalizeClass as r, unref as t, createCommentVNode as g, withCtx as p, Transition as h, createBlock as w, resolveDynamicComponent as y } from "vue";
2
2
  import { useRoute as _, useRouter as k } from "vue-router";
3
- import b from "../../../../components/Select/Select.vue2.js";
3
+ import b from "../../../../components/Select/Select.vue.js";
4
4
  import { state as c } from "../../store/blogposts.js";
5
5
  import { state as v } from "../../../auth/store/auth.js";
6
6
  const x = { class: "min-h-100vh pd-thin" }, C = { class: "mn-b-thin flex-v-center t-left flex-nowrap flex" }, B = { class: "flex-v-center flex-nowrap flex t-left" }, $ = /* @__PURE__ */ o("span", { class: "" }, "Topics for ", -1), N = { class: "w-100 bg-grey pd-small radius-big mn-b-semi gap-thin flex-nowrap flex" }, V = { class: "" }, D = {
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../../constructor/components/elements/Textarea.vue.cjs"),V=require("../../../constructor/components/sections/Constructor.vue.cjs"),y=require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/FieldTags/tag-input.vue.cjs");require("../../../../components/FieldTags/vue-tags-input.scss.cjs");const B=require("../../../../components/FieldTags/BlockTags.vue.cjs"),N=require("../../../../components/Checkbox/Checkbox.vue.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),x=require("../../../../components/Button/Button.vue2.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/store/auth.cjs"),C=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},T={class:"w-full h-full"},z={key:1,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},O={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},D=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),M=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),S={key:0,class:"mn-b-thin"},U={key:1,class:"mn-b-medium br-grey br-2px br-solid pd-small radius-big"},A={__name:"CreateBlogPost",setup(R){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{if(s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const o=await C.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});console.log(o),p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function v(){d.value=!0}function h(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",console.log(t.value),s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",E,[e.createElementVNode("div",T,[e.createVNode(w.default,{prop:e.unref(t),content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])]),e.createVNode(V.default,{content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",O,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>v()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:h,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[D,e.createVNode(B.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),M,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[5]||(a[5]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",S,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(N.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[6]||(a[6]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(x.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=A;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../../constructor/components/elements/Textarea.vue.cjs"),V=require("../../../constructor/components/sections/Constructor.vue.cjs"),y=require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/FieldTags/tag-input.vue.cjs");require("../../../../components/FieldTags/vue-tags-input.scss.cjs");const B=require("../../../../components/FieldTags/BlockTags.vue.cjs"),N=require("../../../../components/Checkbox/Checkbox.vue.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),x=require("../../../../components/Button/Button.vue2.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/store/auth.cjs"),C=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},T={class:"w-full h-full"},z={key:1,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},O={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},D=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),M=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),S={key:0,class:"mn-b-thin"},U={key:1,class:"mn-b-medium br-grey br-2px br-solid pd-small radius-big"},A={__name:"CreateBlogPost",setup(R){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{if(s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const o=await C.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});console.log(o),p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function v(){d.value=!0}function h(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",console.log(t.value),s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",E,[e.createElementVNode("div",T,[e.createVNode(w.default,{prop:e.unref(t),content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])]),e.createVNode(V.default,{content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",O,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>v()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:h,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[D,e.createVNode(B.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),M,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[5]||(a[5]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",S,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(N.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[6]||(a[6]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(x.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=A;
@@ -1,7 +1,7 @@
1
1
  import { ref as r, onMounted as V, computed as _, openBlock as u, createElementBlock as i, unref as a, createElementVNode as p, createVNode as n, createCommentVNode as m, withCtx as w, createTextVNode as z } from "vue";
2
2
  import D from "../../../constructor/components/elements/Textarea.vue.js";
3
3
  import N from "../../../constructor/components/sections/Constructor.vue.js";
4
- import O from "../../../../components/Popup/Popup.vue2.js";
4
+ import O from "../../../../components/Popup/Popup.vue.js";
5
5
  import "../../../../components/FieldTags/tag-input.vue.js";
6
6
  import "../../../../components/FieldTags/vue-tags-input.scss.js";
7
7
  import U from "../../../../components/FieldTags/BlockTags.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Select/Select.vue.cjs");const f=require("../../../../components/DatePicker/DatePicker.vue.cjs"),i=require("../../store/events.cjs"),m={class:"pd-thin min-h-100vh"},g=e.createElementVNode("div",{class:"mn-b-thin br-solid br-1px br-grey bg-grey radius-big"},null,-1),y={class:""},_={__name:"layoutEvents",setup(b){const l=c.useRoute(),d=c.useRouter(),u=p(new Date);function p(t){return`${t.getDate().toString().padStart(2,"0")}${(t.getMonth()+1).toString().padStart(2,"0")}${t.getFullYear()}`}if(l.query){const t=l.query,s={tags:t.tags?t.tags.split(","):null,date:t.date?t.date:u};i.state.filter=s}else{const t={date:u};i.state.filter=t}return e.watch(()=>i.state.filter,(t,s)=>{const a={...l.query};Object.keys(s).forEach(o=>{a[o]&&delete a[o]});const n=Object.fromEntries(Object.entries(t).filter(([o,r])=>Array.isArray(r)&&r.length>0||typeof r=="string"&&r).map(([o,r])=>[o,Array.isArray(r)?r.join(","):r]));Object.assign(a,n),d.push({query:a})},{deep:!0}),(t,s)=>{const a=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",m,[e.createVNode(f.default,{date:i.state.filter.date,"onUpdate:date":s[0]||(s[0]=n=>i.state.filter.date=n),locale:t.$i18n.locale,class:"radius-small bg-grey pd-l-zero pd-r-zero pd-medium"},null,8,["date","locale"]),g,e.createElementVNode("section",y,[e.createVNode(a,null,{default:e.withCtx(({Component:n,route:o})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n),{ref:"page",key:o.query}))]),_:2},1024)]),_:1})])])}}};exports.default=_;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Select/Select.vue2.cjs");const f=require("../../../../components/DatePicker/DatePicker.vue.cjs"),i=require("../../store/events.cjs"),m={class:"pd-thin min-h-100vh"},g=e.createElementVNode("div",{class:"mn-b-thin br-solid br-1px br-grey bg-grey radius-big"},null,-1),y={class:""},_={__name:"layoutEvents",setup(b){const l=c.useRoute(),d=c.useRouter(),u=p(new Date);function p(t){return`${t.getDate().toString().padStart(2,"0")}${(t.getMonth()+1).toString().padStart(2,"0")}${t.getFullYear()}`}if(l.query){const t=l.query,s={tags:t.tags?t.tags.split(","):null,date:t.date?t.date:u};i.state.filter=s}else{const t={date:u};i.state.filter=t}return e.watch(()=>i.state.filter,(t,s)=>{const a={...l.query};Object.keys(s).forEach(o=>{a[o]&&delete a[o]});const n=Object.fromEntries(Object.entries(t).filter(([o,r])=>Array.isArray(r)&&r.length>0||typeof r=="string"&&r).map(([o,r])=>[o,Array.isArray(r)?r.join(","):r]));Object.assign(a,n),d.push({query:a})},{deep:!0}),(t,s)=>{const a=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",m,[e.createVNode(f.default,{date:i.state.filter.date,"onUpdate:date":s[0]||(s[0]=n=>i.state.filter.date=n),locale:t.$i18n.locale,class:"radius-small bg-grey pd-l-zero pd-r-zero pd-medium"},null,8,["date","locale"]),g,e.createElementVNode("section",y,[e.createVNode(a,null,{default:e.withCtx(({Component:n,route:o})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n),{ref:"page",key:o.query}))]),_:2},1024)]),_:1})])])}}};exports.default=_;
@@ -1,6 +1,6 @@
1
1
  import { watch as y, resolveComponent as g, openBlock as u, createElementBlock as _, createVNode as l, createElementVNode as m, withCtx as d, Transition as b, createBlock as h, resolveDynamicComponent as w } from "vue";
2
2
  import { useRoute as D, useRouter as q } from "vue-router";
3
- import "../../../../components/Select/Select.vue.js";
3
+ import "../../../../components/Select/Select.vue2.js";
4
4
  import j from "../../../../components/DatePicker/DatePicker.vue.js";
5
5
  import { state as s } from "../../store/events.js";
6
6
  const k = { class: "pd-thin min-h-100vh" }, E = /* @__PURE__ */ m("div", { class: "mn-b-thin br-solid br-1px br-grey bg-grey radius-big" }, null, -1), V = { class: "" }, B = {
@@ -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.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.vue.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/FieldTags/BlockTags.vue.cjs"),P=require("../../../../components/Checkbox/Checkbox.vue.cjs"),C=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),x=require("../../../../components/UploadImage/UploadImage.vue.cjs"),B=require("../../../../components/Button/Button.vue2.cjs"),v=require("vue-router"),s=require("../../store/events.cjs"),u=require("../../../auth/store/auth.cjs"),D=require("../../../organizations/store/organizations.cjs");require("./EditEvent.vue2.cjs");const U={key:0,class:"h-100 pd-thin"},T={class:"mn-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;
@@ -3,7 +3,7 @@ import "../../../constructor/components/elements/Textarea.vue2.js";
3
3
  import z from "../../../constructor/components/sections/Constructor.vue.js";
4
4
  import N from "../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js";
5
5
  import "../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.js";
6
- import O from "../../../../components/Popup/Popup.vue2.js";
6
+ import O from "../../../../components/Popup/Popup.vue.js";
7
7
  import w from "../../../../components/Field/Field.vue2.js";
8
8
  import A from "../../../../components/FieldTags/BlockTags.vue.js";
9
9
  import B from "../../../../components/Checkbox/Checkbox.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const t=require("../sections/Feed.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../reports/store/reports.cjs");require("../../../../components/Dropdown/Dropdown.vue2.cjs");const i=require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");require("../../../community/store/reactions.cjs");const o=require("../../store/events.cjs");require("../sections/List.vue2.cjs");const s={__name:"Events",setup(c){const r=u.useRoute();return u.useRouter(),(n,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(t.default,{category:e.unref(r).params.category,user:i.state.user._id,period:e.unref(r).query.period,selectedDate:o.state.filter.date},null,8,["category","user","period","selectedDate"])]))}};exports.default=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const t=require("../sections/Feed.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Select/Select.vue2.cjs");require("../../../reports/store/reports.cjs");require("../../../../components/Dropdown/Dropdown.vue2.cjs");const i=require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");require("../../../community/store/reactions.cjs");const o=require("../../store/events.cjs");require("../sections/List.vue2.cjs");const s={__name:"Events",setup(c){const r=u.useRoute();return u.useRouter(),(n,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(t.default,{category:e.unref(r).params.category,user:i.state.user._id,period:e.unref(r).query.period,selectedDate:o.state.filter.date},null,8,["category","user","period","selectedDate"])]))}};exports.default=s;
@@ -5,9 +5,9 @@ import "../../../globals/localization/vue-i18n.js";
5
5
  import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
6
6
  import s from "../sections/Feed.vue.js";
7
7
  import "../../../../components/Loader/Loader.vue.js";
8
- import "../../../../components/Popup/Popup.vue.js";
8
+ import "../../../../components/Popup/Popup.vue2.js";
9
9
  import "../../../../components/Button/Button.vue.js";
10
- import "../../../../components/Select/Select.vue.js";
10
+ import "../../../../components/Select/Select.vue2.js";
11
11
  import "../../../reports/store/reports.js";
12
12
  import "../../../../components/Dropdown/Dropdown.vue2.js";
13
13
  import { state as a } from "../../../auth/store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),I=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/Button/Button.vue2.cjs"),M=require("../../../../components/Select/Select.vue2.cjs"),s=require("../../store/gallery.cjs"),P=require("../../../../components/EditImages/EditImages.vue.cjs");require("./BackofficeGallery.vue2.cjs");const j=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),c=i=>(e.pushScopeId("data-v-c506f5e5"),i=i(),e.popScopeId(),i),G={class:"pos-relative w-100"},D={class:"mn-b-semi flex-v-center flex-nowrap flex"},T=c(()=>e.createElementVNode("h1",{class:"mn-r-small"},"Manage Gallery",-1)),U=["data-id"],$=["src","onClick"],F={key:1,class:"radius-small bg-white"},O=["src","onClick"],L={class:"t-black p-small mn-b-thin"},A=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Size",-1)),H=c(()=>e.createElementVNode("br",null,null,-1)),R={class:"pd-2px radius-big d-inline-block bg-grey"},J={class:"t-black p-small mn-b-small uppe"},K=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Categories",-1)),Q=c(()=>e.createElementVNode("br",null,null,-1)),W={class:"pd-2px radius-big d-inline-block bg-grey t-semi"},X={class:"flex-nowrap flex"},Y=["onClick"],Z={class:"modal pd-thin"},ee={class:"modal-content radius-big"},te={class:""},le=["src"],oe={key:0,class:"flex-v-center flex m modal pd-big"},ae={class:"modal-content radius-small pd-medium bg-white"},se=["src"],ne=["src"],y=10,ce={__name:"BackofficeGallery",setup(i){const r=e.ref(!0),h=e.ref(null);let v=1,f=e.ref(null),_=e.ref(!1);const d=e.ref([]),E=o=>{d.value=o},w=e.computed(()=>k.value==="all"?s.state.gallery:s.state.gallery.filter(o=>o.categories.includes(k.value))),V=async()=>{_.value=!0,await s.actions.fetchGallery(v,y),_.value=!1},u=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),m=e.ref(null),g=o=>{console.log(r.value),r.value?N(o):(u.value="modal",t.value.image=o,b())},N=o=>{u.value="edit-modal",t.value=o||{categories:"",size:"",image:null},b()},n=()=>{t.value={categories:"",size:"",image:!1},m.value=null,B()},b=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},B=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},C=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],x=async o=>{await s.actions.deletePhoto(o)},S=async()=>{await s.actions.updatePhoto(t.value),n()},z=async o=>{if(d.length<1||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({images:d.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(a=>a.trim()):t.value.categories}),n()};let k=e.ref("all");return e.onMounted(async()=>{await s.actions.fetchGallery(v,y),typeof window<"u"&&new IntersectionObserver(a=>{a.some(l=>l.isIntersecting)&&(v+=1,V())}).observe(f.value)}),(o,a)=>(e.openBlock(),e.createElementBlock("div",G,[e.createElementVNode("div",D,[T,r.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=l=>g(null)),class:"t-white t-black bg-second i-big radius-extra"},"+")):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:h,class:"cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(l,re)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[!r.value&&h.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 h-100 o-hidden radius-medium object-fit-cover",onClick:p=>g(l.image)},null,8,$)):(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 radius-small mn-b-small h-10r object-fit-cover",onClick:p=>g(l)},null,8,O),e.createElementVNode("p",L,[A,H,e.createElementVNode("span",R,e.toDisplayString(l.size.name),1)]),e.createElementVNode("p",J,[K,Q,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.categories,p=>(e.openBlock(),e.createElementBlock("span",W,e.toDisplayString(p),1))),256))]),e.createElementVNode("div",X,[e.createElementVNode("button",{class:"button-small w-100 button",onClick:p=>x(l._id)},"Delete",8,Y)])]))]),_:2},1024)],8,U))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:f,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Z,[e.createElementVNode("div",ee,[e.createElementVNode("div",te,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,le)])])],512),[[e.vShow,t.value.image!==!1&&u.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&u.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",ae,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof m.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:m.value,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,se)):e.createCommentVNode("",!0),typeof m.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-b-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,ne)):e.createCommentVNode("",!0),e.createVNode(M.default,{options:C,label:"Size",select:t.value.size,"onUpdate:select":a[1]||(a[1]=l=>t.value.size=l),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-b-thin t-black"},null,8,["select"]),e.createVNode(I.default,{field:t.value.categories,"onUpdate:field":a[2]||(a[2]=l=>t.value.categories=l),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-b-medium t-black"},null,8,["field"]),e.createVNode(P.default,{images:d.value,"onUpdate:images":E,uploadPath:"photos",class:"mn-b-semi"},null,8,["images"]),e.createVNode(q.default,{submit:t.value._id?S:z,callback:n,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},ie=j.default(ce,[["__scopeId","data-v-c506f5e5"]]);exports.default=ie;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),I=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/Button/Button.vue2.cjs"),M=require("../../../../components/Select/Select.vue.cjs"),s=require("../../store/gallery.cjs"),P=require("../../../../components/EditImages/EditImages.vue.cjs");require("./BackofficeGallery.vue2.cjs");const j=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),c=i=>(e.pushScopeId("data-v-c506f5e5"),i=i(),e.popScopeId(),i),G={class:"pos-relative w-100"},D={class:"mn-b-semi flex-v-center flex-nowrap flex"},T=c(()=>e.createElementVNode("h1",{class:"mn-r-small"},"Manage Gallery",-1)),U=["data-id"],$=["src","onClick"],F={key:1,class:"radius-small bg-white"},O=["src","onClick"],L={class:"t-black p-small mn-b-thin"},A=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Size",-1)),H=c(()=>e.createElementVNode("br",null,null,-1)),R={class:"pd-2px radius-big d-inline-block bg-grey"},J={class:"t-black p-small mn-b-small uppe"},K=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Categories",-1)),Q=c(()=>e.createElementVNode("br",null,null,-1)),W={class:"pd-2px radius-big d-inline-block bg-grey t-semi"},X={class:"flex-nowrap flex"},Y=["onClick"],Z={class:"modal pd-thin"},ee={class:"modal-content radius-big"},te={class:""},le=["src"],oe={key:0,class:"flex-v-center flex m modal pd-big"},ae={class:"modal-content radius-small pd-medium bg-white"},se=["src"],ne=["src"],y=10,ce={__name:"BackofficeGallery",setup(i){const r=e.ref(!0),h=e.ref(null);let v=1,f=e.ref(null),_=e.ref(!1);const d=e.ref([]),E=o=>{d.value=o},w=e.computed(()=>k.value==="all"?s.state.gallery:s.state.gallery.filter(o=>o.categories.includes(k.value))),V=async()=>{_.value=!0,await s.actions.fetchGallery(v,y),_.value=!1},u=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),m=e.ref(null),g=o=>{console.log(r.value),r.value?N(o):(u.value="modal",t.value.image=o,b())},N=o=>{u.value="edit-modal",t.value=o||{categories:"",size:"",image:null},b()},n=()=>{t.value={categories:"",size:"",image:!1},m.value=null,B()},b=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},B=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},C=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],x=async o=>{await s.actions.deletePhoto(o)},S=async()=>{await s.actions.updatePhoto(t.value),n()},z=async o=>{if(d.length<1||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({images:d.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(a=>a.trim()):t.value.categories}),n()};let k=e.ref("all");return e.onMounted(async()=>{await s.actions.fetchGallery(v,y),typeof window<"u"&&new IntersectionObserver(a=>{a.some(l=>l.isIntersecting)&&(v+=1,V())}).observe(f.value)}),(o,a)=>(e.openBlock(),e.createElementBlock("div",G,[e.createElementVNode("div",D,[T,r.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=l=>g(null)),class:"t-white t-black bg-second i-big radius-extra"},"+")):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:h,class:"cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(l,re)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[!r.value&&h.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 h-100 o-hidden radius-medium object-fit-cover",onClick:p=>g(l.image)},null,8,$)):(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 radius-small mn-b-small h-10r object-fit-cover",onClick:p=>g(l)},null,8,O),e.createElementVNode("p",L,[A,H,e.createElementVNode("span",R,e.toDisplayString(l.size.name),1)]),e.createElementVNode("p",J,[K,Q,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.categories,p=>(e.openBlock(),e.createElementBlock("span",W,e.toDisplayString(p),1))),256))]),e.createElementVNode("div",X,[e.createElementVNode("button",{class:"button-small w-100 button",onClick:p=>x(l._id)},"Delete",8,Y)])]))]),_:2},1024)],8,U))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:f,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Z,[e.createElementVNode("div",ee,[e.createElementVNode("div",te,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,le)])])],512),[[e.vShow,t.value.image!==!1&&u.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&u.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",ae,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof m.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:m.value,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,se)):e.createCommentVNode("",!0),typeof m.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-b-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,ne)):e.createCommentVNode("",!0),e.createVNode(M.default,{options:C,label:"Size",select:t.value.size,"onUpdate:select":a[1]||(a[1]=l=>t.value.size=l),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-b-thin t-black"},null,8,["select"]),e.createVNode(I.default,{field:t.value.categories,"onUpdate:field":a[2]||(a[2]=l=>t.value.categories=l),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-b-medium t-black"},null,8,["field"]),e.createVNode(P.default,{images:d.value,"onUpdate:images":E,uploadPath:"photos",class:"mn-b-semi"},null,8,["images"]),e.createVNode(q.default,{submit:t.value._id?S:z,callback:n,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},ie=j.default(ce,[["__scopeId","data-v-c506f5e5"]]);exports.default=ie;
@@ -1,7 +1,7 @@
1
1
  import { ref as n, computed as q, onMounted as A, openBlock as a, createElementBlock as o, createElementVNode as t, createCommentVNode as f, Fragment as E, renderList as M, createVNode as c, Transition as w, withCtx as b, toDisplayString as x, withDirectives as L, vShow as R, createTextVNode as H, pushScopeId as J, popScopeId as K } from "vue";
2
2
  import Q from "../../../../components/Field/Field.vue2.js";
3
3
  import W from "../../../../components/Button/Button.vue2.js";
4
- import X from "../../../../components/Select/Select.vue2.js";
4
+ import X from "../../../../components/Select/Select.vue.js";
5
5
  import { state as G, actions as d } from "../../store/gallery.js";
6
6
  import Y from "../../../../components/EditImages/EditImages.vue.js";
7
7
  import "./BackofficeGallery.vue2.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),x=require("vue-router"),z=require("../../../../components/Field/Field.vue2.cjs"),S=require("../../../../components/Button/Button.vue2.cjs"),q=require("../../../../components/Select/Select.vue2.cjs"),M=require("../../../../components/Upload/Upload.vue.cjs"),s=require("../../store/gallery.cjs");require("./GalleryWithCategories.vue2.cjs");const F=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),I={class:"pd-medium flex-v-center gap-big flex-nowrap flex pd-t-thin pd-b-thin o-scroll"},P=["onClick"],j=["data-id"],G=["src","onClick"],R={class:"modal pd-thin"},T={class:"modal-content radius-big"},U={class:""},D=["src"],L={key:0,class:"flex-v-center flex m modal pd-big"},O={class:"modal-content radius-small pd-medium bg-white"},$=["src"],A=["src"],W=!1,f=10,H={__name:"GalleryWithCategories",setup(K){x.useRoute();const m=e.ref(null),h=["all","place","drinks","people","events"];let d=1,v=e.ref(null),g=e.ref(!1);const _=e.computed(()=>r.value==="all"?s.state.gallery:s.state.gallery.filter(a=>a.categories.includes(r.value))),b=async()=>{g.value=!0,await s.actions.fetchGallery(d,f),g.value=!1},c=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),i=e.ref(null),k=a=>{W.value?y(a):(c.value="modal",t.value.image=a,p())},y=a=>{c.value="edit-modal",t.value=a||{categories:"",size:"",image:null},p()},n=()=>{t.value={categories:"",size:"",image:!1},i.value=null,w()},p=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},w=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},V=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],C=async()=>{await s.actions.updatePhoto(t.value),n()},E=a=>{const o=a.files;if(t.value.image=o,o&&o.length>0){const l=new FileReader;l.onload=u=>{i.value=u.target.result},l.readAsDataURL(o[0])}},N=async a=>{if(!t.value.image||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({...t.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(o=>o.trim()):t.value.categories}),n()};let r=e.ref("all");const B=a=>{r.value=a};return e.onMounted(async()=>{await s.actions.fetchGallery(d,f),typeof window<"u"&&new IntersectionObserver(o=>{o.some(l=>l.isIntersecting)&&(d+=1,b())}).observe(v.value)}),(a,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",I,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(h,l=>e.createElementVNode("a",{key:l,onClick:u=>B(l),class:e.normalizeClass(["h3 uppercase",{"t-transp":e.unref(r)!==l,"pd-thin bg-main radius-small":e.unref(r)===l}])},e.toDisplayString(a.$t("gallery.categories."+l)),11,P)),64)),e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:m,class:"pd-medium cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(l,u)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[m.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 h-100 o-hidden radius-big object-fit-cover",onClick:Q=>k(l.image)},null,8,G)):e.createCommentVNode("",!0)]),_:2},1024)],8,j))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:v,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",R,[e.createElementVNode("div",T,[e.createElementVNode("div",U,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,D)])])],512),[[e.vShow,t.value.image!==!1&&c.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&c.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("div",O,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof i.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:i.value,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,$)):e.createCommentVNode("",!0),typeof i.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-b-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,A)):e.createCommentVNode("",!0),t.value._id?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M.default,{key:2,id:"photo",name:"photo",type:"file",class:"t-black bg-grey pd-thin radius-small mn-b-thin",onFileChange:E,multiple:"true"})),e.createVNode(q.default,{options:V,label:"Size",select:t.value.size,"onUpdate:select":o[1]||(o[1]=l=>t.value.size=l),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-b-thin t-black"},null,8,["select"]),e.createVNode(z.default,{field:t.value.categories,"onUpdate:field":o[2]||(o[2]=l=>t.value.categories=l),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-b-medium t-black"},null,8,["field"]),e.createVNode(S.default,{submit:t.value._id?C:N,callback:n,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},J=F.default(H,[["__scopeId","data-v-4c5bced8"]]);exports.default=J;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),x=require("vue-router"),z=require("../../../../components/Field/Field.vue2.cjs"),S=require("../../../../components/Button/Button.vue2.cjs"),q=require("../../../../components/Select/Select.vue.cjs"),M=require("../../../../components/Upload/Upload.vue.cjs"),s=require("../../store/gallery.cjs");require("./GalleryWithCategories.vue2.cjs");const F=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),I={class:"pd-medium flex-v-center gap-big flex-nowrap flex pd-t-thin pd-b-thin o-scroll"},P=["onClick"],j=["data-id"],G=["src","onClick"],R={class:"modal pd-thin"},T={class:"modal-content radius-big"},U={class:""},D=["src"],L={key:0,class:"flex-v-center flex m modal pd-big"},O={class:"modal-content radius-small pd-medium bg-white"},$=["src"],A=["src"],W=!1,f=10,H={__name:"GalleryWithCategories",setup(K){x.useRoute();const m=e.ref(null),h=["all","place","drinks","people","events"];let d=1,v=e.ref(null),g=e.ref(!1);const _=e.computed(()=>r.value==="all"?s.state.gallery:s.state.gallery.filter(a=>a.categories.includes(r.value))),b=async()=>{g.value=!0,await s.actions.fetchGallery(d,f),g.value=!1},c=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),i=e.ref(null),k=a=>{W.value?y(a):(c.value="modal",t.value.image=a,p())},y=a=>{c.value="edit-modal",t.value=a||{categories:"",size:"",image:null},p()},n=()=>{t.value={categories:"",size:"",image:!1},i.value=null,w()},p=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},w=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},V=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],C=async()=>{await s.actions.updatePhoto(t.value),n()},E=a=>{const o=a.files;if(t.value.image=o,o&&o.length>0){const l=new FileReader;l.onload=u=>{i.value=u.target.result},l.readAsDataURL(o[0])}},N=async a=>{if(!t.value.image||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({...t.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(o=>o.trim()):t.value.categories}),n()};let r=e.ref("all");const B=a=>{r.value=a};return e.onMounted(async()=>{await s.actions.fetchGallery(d,f),typeof window<"u"&&new IntersectionObserver(o=>{o.some(l=>l.isIntersecting)&&(d+=1,b())}).observe(v.value)}),(a,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",I,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(h,l=>e.createElementVNode("a",{key:l,onClick:u=>B(l),class:e.normalizeClass(["h3 uppercase",{"t-transp":e.unref(r)!==l,"pd-thin bg-main radius-small":e.unref(r)===l}])},e.toDisplayString(a.$t("gallery.categories."+l)),11,P)),64)),e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:m,class:"pd-medium cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(l,u)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[m.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 h-100 o-hidden radius-big object-fit-cover",onClick:Q=>k(l.image)},null,8,G)):e.createCommentVNode("",!0)]),_:2},1024)],8,j))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:v,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",R,[e.createElementVNode("div",T,[e.createElementVNode("div",U,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,D)])])],512),[[e.vShow,t.value.image!==!1&&c.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&c.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("div",O,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof i.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:i.value,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,$)):e.createCommentVNode("",!0),typeof i.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-b-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,A)):e.createCommentVNode("",!0),t.value._id?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M.default,{key:2,id:"photo",name:"photo",type:"file",class:"t-black bg-grey pd-thin radius-small mn-b-thin",onFileChange:E,multiple:"true"})),e.createVNode(q.default,{options:V,label:"Size",select:t.value.size,"onUpdate:select":o[1]||(o[1]=l=>t.value.size=l),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-b-thin t-black"},null,8,["select"]),e.createVNode(z.default,{field:t.value.categories,"onUpdate:field":o[2]||(o[2]=l=>t.value.categories=l),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-b-medium t-black"},null,8,["field"]),e.createVNode(S.default,{submit:t.value._id?C:N,callback:n,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},J=F.default(H,[["__scopeId","data-v-4c5bced8"]]);exports.default=J;
@@ -2,7 +2,7 @@ import { ref as n, computed as D, onMounted as A, openBlock as o, createElementB
2
2
  import { useRoute as H } from "vue-router";
3
3
  import J from "../../../../components/Field/Field.vue2.js";
4
4
  import K from "../../../../components/Button/Button.vue2.js";
5
- import Q from "../../../../components/Select/Select.vue2.js";
5
+ import Q from "../../../../components/Select/Select.vue.js";
6
6
  import X from "../../../../components/Upload/Upload.vue.js";
7
7
  import { state as E, actions as g } from "../../store/gallery.js";
8
8
  import "./GalleryWithCategories.vue2.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"),f=require("../../../../../../node_modules/vue-select/dist/vue-select.es.cjs");require("../../../../components/Field/Field.vue.cjs");const _=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Select/Select.vue.cjs");require("./DepartmentMemberModify.vue2.cjs");const k={class:"br-grey radius-small mn-b-small"},v={key:1,class:"pd-small br-grey br-1px br-solid"},y=["disabled"],B={__name:"DepartmentMemberModify",props:{isPopupOpen:Boolean,department:Number,departments:Array,maindepartment:Object,alldepartments:Array},emits:["callback","remove"],setup(u,{emit:m}){const t=u,a=m,n=e.ref({subdepartment:null});t.department!==null&&(n.value=t.departments[t.department]);function d(o,l,r){return o.filter(s=>!(l.some(b=>b._id===s._id)||r._id===s._id))}const c=e.computed(()=>d(t.alldepartments,t.departments,t.maindepartment));async function i(){t.departments.push(n.value.subdepartment),a("callback")}async function p(){t.departments.splice(t.department,1),a("callback")}return(o,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",k,[t.department===null?(e.openBlock(),e.createBlock(e.unref(f.default),{key:0,modelValue:n.value.subdepartment,"onUpdate:modelValue":l[0]||(l[0]=r=>n.value.subdepartment=r),options:c.value,"get-option-label":r=>r.name,class:"w-100 mn-b-small"},null,8,["modelValue","options","get-option-label"])):(e.openBlock(),e.createElementBlock("div",v,e.toDisplayString(n.value.name?n.value.name:"Безымянный"),1))]),t.department===null?(e.openBlock(),e.createElementBlock("button",{key:0,disabled:!n.value.subdepartment,onClick:i,class:"w-100 button bg-second t-white"}," Добавить отдел ",8,y)):e.createCommentVNode("",!0),t.department!==null?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:p,class:"w-100 button bg-fourth t-white"}," Удалить отдел ")):e.createCommentVNode("",!0)]))}},g=_.default(B,[["__scopeId","data-v-5e4dcced"]]);exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=require("../../../../../../node_modules/vue-select/dist/vue-select.es.cjs");require("../../../../components/Field/Field.vue.cjs");const _=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");require("../../../../components/Select/Select.vue2.cjs");require("./DepartmentMemberModify.vue2.cjs");const k={class:"br-grey radius-small mn-b-small"},v={key:1,class:"pd-small br-grey br-1px br-solid"},y=["disabled"],B={__name:"DepartmentMemberModify",props:{isPopupOpen:Boolean,department:Number,departments:Array,maindepartment:Object,alldepartments:Array},emits:["callback","remove"],setup(u,{emit:m}){const t=u,a=m,n=e.ref({subdepartment:null});t.department!==null&&(n.value=t.departments[t.department]);function d(o,l,r){return o.filter(s=>!(l.some(b=>b._id===s._id)||r._id===s._id))}const c=e.computed(()=>d(t.alldepartments,t.departments,t.maindepartment));async function i(){t.departments.push(n.value.subdepartment),a("callback")}async function p(){t.departments.splice(t.department,1),a("callback")}return(o,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",k,[t.department===null?(e.openBlock(),e.createBlock(e.unref(f.default),{key:0,modelValue:n.value.subdepartment,"onUpdate:modelValue":l[0]||(l[0]=r=>n.value.subdepartment=r),options:c.value,"get-option-label":r=>r.name,class:"w-100 mn-b-small"},null,8,["modelValue","options","get-option-label"])):(e.openBlock(),e.createElementBlock("div",v,e.toDisplayString(n.value.name?n.value.name:"Безымянный"),1))]),t.department===null?(e.openBlock(),e.createElementBlock("button",{key:0,disabled:!n.value.subdepartment,onClick:i,class:"w-100 button bg-second t-white"}," Добавить отдел ",8,y)):e.createCommentVNode("",!0),t.department!==null?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:p,class:"w-100 button bg-fourth t-white"}," Удалить отдел ")):e.createCommentVNode("",!0)]))}},g=_.default(B,[["__scopeId","data-v-5e4dcced"]]);exports.default=g;
@@ -2,7 +2,7 @@ import { ref as v, computed as y, openBlock as r, createElementBlock as l, creat
2
2
  import D from "../../../../../../node_modules/vue-select/dist/vue-select.es.js";
3
3
  import "../../../../components/Field/Field.vue.js";
4
4
  import M from "../../../../../../_virtual/_plugin-vue_export-helper.js";
5
- import "../../../../components/Select/Select.vue.js";
5
+ import "../../../../components/Select/Select.vue2.js";
6
6
  import "./DepartmentMemberModify.vue2.js";
7
7
  const V = { class: "br-grey radius-small mn-b-small" }, x = {
8
8
  key: 1,
@@ -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.vue2.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.vue2.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,16 +3,16 @@ 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
- import "../../../../components/Select/Select.vue.js";
8
+ import "../../../../components/Select/Select.vue2.js";
9
9
  import U from "../../../../../../_virtual/_plugin-vue_export-helper.js";
10
10
  import d from "../../../../components/Checkbox/Checkbox.vue.js";
11
11
  import A from "../../../../components/Address/Address.vue.js";
12
12
  import I from "../../../../components/LocationMarker/LocationMarker.vue.js";
13
13
  import b from "../../../../components/Button/Button.vue2.js";
14
14
  import "vue-i18n";
15
- import "../../../../components/Popup/Popup.vue.js";
15
+ import "../../../../components/Popup/Popup.vue2.js";
16
16
  import "../../../../../../node_modules/vue-select/dist/vue-select.es.js";
17
17
  import "../blocks/EditArray.vue2.js";
18
18
  import "../blocks/DepartmentSub.vue2.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.vue2.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";
@@ -19,7 +19,7 @@ import "../blocks/CardDepartment.vue2.js";
19
19
  import "../../store/departments.js";
20
20
  import { state as n } from "../../../auth/store/auth.js";
21
21
  import "../../../../components/Field/Field.vue.js";
22
- import "../../../../components/Select/Select.vue.js";
22
+ import "../../../../components/Select/Select.vue2.js";
23
23
  import "../../../../components/Button/Button.vue.js";
24
24
  import "../../../middlewares/client/inputs.validation.js";
25
25
  import "../../store/invites.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.vue2.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.vue2.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,13 +4,13 @@ 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
- import "../../../../components/Select/Select.vue.js";
9
+ import "../../../../components/Select/Select.vue2.js";
10
10
  import U from "../../../../components/SelectMulti/SelectMulti.vue.js";
11
11
  import k from "../../../../components/UploadImage/UploadImage.vue.js";
12
12
  import T from "../../../../components/Button/Button.vue2.js";
13
- import "../../../../components/Popup/Popup.vue.js";
13
+ import "../../../../components/Popup/Popup.vue2.js";
14
14
  import { state as z } from "../../../auth/store/auth.js";
15
15
  import { actions as s, state as e } from "../../store/organizations.js";
16
16
  import "../../store/memberships.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 = {