@ozdao/prometheus-framework 0.2.18 → 0.2.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. package/dist/main.css +1 -1
  2. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
  3. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +49 -2
  4. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
  5. package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +2 -49
  6. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  7. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +2 -72
  8. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  9. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +72 -2
  10. package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
  11. package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +44 -2
  12. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
  13. package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +2 -44
  14. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
  15. package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +1 -1
  16. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
  17. package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +1 -1
  18. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
  19. package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +1 -1
  20. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
  21. package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +1 -1
  22. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
  23. package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +1 -1
  24. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
  25. package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +1 -1
  26. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  27. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  28. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +4 -1
  29. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +62 -2
  30. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -4
  31. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +2 -62
  32. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  33. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  34. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  35. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  36. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  37. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
  38. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
  39. package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +23 -25
  40. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
  41. package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
  42. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
  43. package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +2 -2
  44. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  45. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  46. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  47. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
  48. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  49. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  50. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
  51. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
  52. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
  53. package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
  54. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  55. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  56. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
  57. package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +1 -1
  58. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
  59. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +1 -1
  60. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  61. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
  62. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  63. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  64. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.cjs +1 -1
  65. package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.js +1 -1
  66. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  67. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  68. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
  69. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
  70. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
  71. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
  72. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
  73. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
  74. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.cjs +1 -1
  75. package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.js +1 -1
  76. package/dist/style.css +1 -1
  77. package/package.json +1 -1
  78. package/src/modules/events/components/sections/Feed.vue +0 -3
  79. package/src/modules/organizations/components/blocks/CardOrganization.vue +2 -2
  80. package/src/styles/base/all.scss +7 -1
@@ -1 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Textarea.vue2.cjs");const k=["placeholder"],x={__name:"Textarea",props:["prop","value","content","placeholder","index","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(l,{emit:s}){const t=l,c=s;e.ref(t);const n=e.ref(null);e.ref(0);function d(a){let o=a.target.value.split(/\n+/);if(o.length>1){t.prop[t.content]=o[0],e.nextTick(()=>{r()});let u=o.slice(1).map(f=>({__name:"Textarea",content:f}));c("addBlock","Textarea","",t.index,{blocks:u,ref:n})}else a.target.value.trim()===""&&a.target.value.includes(`
2
+
3
+ `)&&(console.log("We are adding new block:"+t.index+newBlocks+n),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:n})),r()}function p(a){(a.keyCode===8||a.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function i(){e.nextTick(()=>{n.value.focus(),c("updateBlock",t.prop,{setFocus:!1})})}function r(){n.value.style.height="1rem",n.value.style.height=n.value.scrollHeight+"px"}return e.onUpdated(()=>{t.setFocus&&e.nextTick(()=>{i()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{i()}),r()}),(a,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=u=>l.prop[l.content]=u),placeholder:l.placeholder?l.placeholder:"Enter text",onInput:d,onFocus:o[1]||(o[1]=u=>c("focus",n.value)),onKeyup:p,ref_key:"textarea",ref:n,tabindex:"-1",class:"text-area mn-b-thin"},`
4
+ `,40,k),[[e.vModelText,l.prop[l.content]]])]))}};exports.default=x;
@@ -1,4 +1,64 @@
1
- const e = "";
1
+ import { ref as d, onUpdated as x, nextTick as s, onMounted as m, openBlock as h, createElementBlock as B, withDirectives as g, createElementVNode as v, vModelText as y } from "vue";
2
+ import "./Textarea.vue2.js";
3
+ const T = ["placeholder"], F = {
4
+ __name: "Textarea",
5
+ props: ["prop", "value", "content", "placeholder", "index", "setFocus"],
6
+ emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
7
+ setup(n, { emit: u }) {
8
+ const e = n, a = u;
9
+ d(e);
10
+ const t = d(null);
11
+ d(0);
12
+ function p(l) {
13
+ let o = l.target.value.split(/\n+/);
14
+ if (o.length > 1) {
15
+ e.prop[e.content] = o[0], s(() => {
16
+ c();
17
+ });
18
+ let r = o.slice(1).map((k) => ({ __name: "Textarea", content: k }));
19
+ a("addBlock", "Textarea", "", e.index, { blocks: r, ref: t });
20
+ } else
21
+ l.target.value.trim() === "" && l.target.value.includes(`
22
+
23
+ `) && (console.log("We are adding new block:" + e.index + newBlocks + t), a("addBlock", "Textarea", "", e.index, { blocks: newBlocks, ref: t })), c();
24
+ }
25
+ function f(l) {
26
+ (l.keyCode === 8 || l.keyCode === 46) && e.prop[e.content].trim() === "" && a("deleteBlock", e.prop);
27
+ }
28
+ function i() {
29
+ s(() => {
30
+ t.value.focus(), a("updateBlock", e.prop, { setFocus: !1 });
31
+ });
32
+ }
33
+ function c() {
34
+ t.value.style.height = "1rem", t.value.style.height = t.value.scrollHeight + "px";
35
+ }
36
+ return x(() => {
37
+ e.setFocus && s(() => {
38
+ i();
39
+ }), c();
40
+ }), m(() => {
41
+ e.setFocus && s(() => {
42
+ i();
43
+ }), c();
44
+ }), (l, o) => (h(), B("div", null, [
45
+ g(v("textarea", {
46
+ "onUpdate:modelValue": o[0] || (o[0] = (r) => n.prop[n.content] = r),
47
+ placeholder: n.placeholder ? n.placeholder : "Enter text",
48
+ onInput: p,
49
+ onFocus: o[1] || (o[1] = (r) => a("focus", t.value)),
50
+ onKeyup: f,
51
+ ref_key: "textarea",
52
+ ref: t,
53
+ tabindex: "-1",
54
+ class: "text-area mn-b-thin"
55
+ }, `
56
+ `, 40, T), [
57
+ [y, n.prop[n.content]]
58
+ ])
59
+ ]));
60
+ }
61
+ };
2
62
  export {
3
- e as default
63
+ F as default
4
64
  };
@@ -1,4 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Textarea.vue.cjs");const k=["placeholder"],x={__name:"Textarea",props:["prop","value","content","placeholder","index","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(l,{emit:s}){const t=l,c=s;e.ref(t);const n=e.ref(null);e.ref(0);function d(a){let o=a.target.value.split(/\n+/);if(o.length>1){t.prop[t.content]=o[0],e.nextTick(()=>{r()});let u=o.slice(1).map(f=>({__name:"Textarea",content:f}));c("addBlock","Textarea","",t.index,{blocks:u,ref:n})}else a.target.value.trim()===""&&a.target.value.includes(`
2
-
3
- `)&&(console.log("We are adding new block:"+t.index+newBlocks+n),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:n})),r()}function p(a){(a.keyCode===8||a.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function i(){e.nextTick(()=>{n.value.focus(),c("updateBlock",t.prop,{setFocus:!1})})}function r(){n.value.style.height="1rem",n.value.style.height=n.value.scrollHeight+"px"}return e.onUpdated(()=>{t.setFocus&&e.nextTick(()=>{i()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{i()}),r()}),(a,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=u=>l.prop[l.content]=u),placeholder:l.placeholder?l.placeholder:"Enter text",onInput:d,onFocus:o[1]||(o[1]=u=>c("focus",n.value)),onKeyup:p,ref_key:"textarea",ref:n,tabindex:"-1",class:"text-area mn-b-thin"},`
4
- `,40,k),[[e.vModelText,l.prop[l.content]]])]))}};exports.default=x;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
@@ -1,64 +1,4 @@
1
- import { ref as d, onUpdated as x, nextTick as s, onMounted as m, openBlock as h, createElementBlock as B, withDirectives as g, createElementVNode as v, vModelText as y } from "vue";
2
- import "./Textarea.vue.js";
3
- const T = ["placeholder"], F = {
4
- __name: "Textarea",
5
- props: ["prop", "value", "content", "placeholder", "index", "setFocus"],
6
- emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
7
- setup(n, { emit: u }) {
8
- const e = n, a = u;
9
- d(e);
10
- const t = d(null);
11
- d(0);
12
- function p(l) {
13
- let o = l.target.value.split(/\n+/);
14
- if (o.length > 1) {
15
- e.prop[e.content] = o[0], s(() => {
16
- c();
17
- });
18
- let r = o.slice(1).map((k) => ({ __name: "Textarea", content: k }));
19
- a("addBlock", "Textarea", "", e.index, { blocks: r, ref: t });
20
- } else
21
- l.target.value.trim() === "" && l.target.value.includes(`
22
-
23
- `) && (console.log("We are adding new block:" + e.index + newBlocks + t), a("addBlock", "Textarea", "", e.index, { blocks: newBlocks, ref: t })), c();
24
- }
25
- function f(l) {
26
- (l.keyCode === 8 || l.keyCode === 46) && e.prop[e.content].trim() === "" && a("deleteBlock", e.prop);
27
- }
28
- function i() {
29
- s(() => {
30
- t.value.focus(), a("updateBlock", e.prop, { setFocus: !1 });
31
- });
32
- }
33
- function c() {
34
- t.value.style.height = "1rem", t.value.style.height = t.value.scrollHeight + "px";
35
- }
36
- return x(() => {
37
- e.setFocus && s(() => {
38
- i();
39
- }), c();
40
- }), m(() => {
41
- e.setFocus && s(() => {
42
- i();
43
- }), c();
44
- }), (l, o) => (h(), B("div", null, [
45
- g(v("textarea", {
46
- "onUpdate:modelValue": o[0] || (o[0] = (r) => n.prop[n.content] = r),
47
- placeholder: n.placeholder ? n.placeholder : "Enter text",
48
- onInput: p,
49
- onFocus: o[1] || (o[1] = (r) => a("focus", t.value)),
50
- onKeyup: f,
51
- ref_key: "textarea",
52
- ref: t,
53
- tabindex: "-1",
54
- class: "text-area mn-b-thin"
55
- }, `
56
- `, 40, T), [
57
- [y, n.prop[n.content]]
58
- ])
59
- ]));
60
- }
61
- };
1
+ const e = "";
62
2
  export {
63
- F as default
3
+ e as default
64
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),E=require("../elements/Textarea.vue2.cjs"),x=require("../elements/H2.vue.cjs"),N=require("../elements/Caption.vue.cjs"),y=require("../elements/Bullets.vue.cjs"),A=require("../elements/ImageUpload.vue.cjs"),V=require("../elements/Embed.vue.cjs"),q=require("../elements/Audio.vue.cjs"),D=require("../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs"),M=["onMouseover"],T={key:0,class:"z-index-5 radius-thin pd-thin bg-white w-max mn-b-small flex-nowrap flex-column flex"},$=["onClick"],F=["onClick"],I=["onClick"],S=["onClick"],U={__name:"Constructor",props:["content"],emits:["update"],setup(v,{emit:f}){const k=v,u=f;let t=e.ref(null);e.ref(null),t.value={content:k.content};const b={Textarea:E.default,H2:x.default,Bullets:y.default,Caption:N.default,ImageUpload:A.default,Embed:V.default,Audio:q.default};function s(c="Textarea",l="",n,o){console.log("We are adding new block (functuin HandleAddBlock):"+c+l+n+o);let a={order:t.value.content.length+1,type:c,style:"",class:"",content:l,blocks:[],setFocus:!0};if(o&&o.blocks&&Array.isArray(o.blocks)){let m=o.blocks.map(_=>({...a,content:_.content})),B=[(o.index||n)+1,0].concat(m);t.value.content.splice.apply(t.value.content,B);const C=m[m.length-1];console.log("New block is"+C)}else n!==void 0?(t.value.content.splice(n+1,0,a),console.log("Latest block is"+a)):(console.log("Another block is"+a),t.value.content.push(a));i.value=null,u("update",t.value.content)}function g(c,l){const n=t.value.content.findIndex(o=>o===c);n!==-1&&(t.value.content[n]={...t.value.content[n],...l}),u("update",t.value.content)}function p(c){let l=t.value.content.findIndex(n=>n===c);l!==-1&&t.value.content.splice(l,1),t.value.content[l-1].setFocus=!0,u("update",t.value.content)}const i=e.ref(null),d=e.ref(!1),r=e.ref(!1);function h(){d.value=!0}function w(){d.value=!1}return e.watchEffect(()=>{t.value&&t.value.content.length===0&&s("Textarea",""),u("update",t.value.content)}),(c,l)=>(e.openBlock(),e.createElementBlock("section",null,[e.unref(t).content?(e.openBlock(),e.createBlock(e.unref(D.VueDraggableNext),{key:0,class:"w-full",list:e.unref(t).content,onStart:h,onEnd:w},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).content,(n,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:"pos-relative"},[e.createElementVNode("div",{onMouseover:a=>(i.value=o,r.value=!1),class:"pos-relative w-full h-full"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b[n.type]),{index:o,component:n,prop:n,class:e.normalizeClass(n.class),setFocus:n.setFocus,content:"content",onDeleteBlock:p,onAddBlock:s,onUpdateBlock:g},null,40,["index","component","prop","class","setFocus"]))],40,M),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value===o?(e.openBlock(),e.createElementBlock("div",{key:0,class:"pos-absolute z-index-4 i-semi",style:{right:"calc(100% + 0.5rem)",top:"calc(50% - 1.125rem)"},onMousedown:l[1]||(l[1]=e.withModifiers(a=>d.value=!0,["prevent"]))},[e.createElementVNode("button",{onClick:l[0]||(l[0]=a=>r.value=!r.value),class:"mn-b-small cursor-pointer w-100 i-semi bg-white radius-thin"},e.toDisplayString(n.content?"...":"+"),1),r.value?(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("span",{onClick:a=>p(n),class:"mn-b-thin w-max t-red bg-white button-small button"}," Remove ",8,$),e.createElementVNode("span",{onClick:a=>s("ImageUpload","",o),class:"mn-b-thin w-max t-black bg-white button-small button"}," Add Image ",8,F),e.createElementVNode("span",{onClick:a=>s("H2","",o),class:"w-max button-small t-black bg-white button"}," Add Title ",8,I),e.createElementVNode("span",{onClick:a=>s("Embed","",o),class:"w-max button-small t-black bg-white button"}," Add Embed ",8,S)])):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1},8,["list"])):e.createCommentVNode("",!0)]))}};exports.default=U;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),E=require("../elements/Textarea.vue.cjs"),x=require("../elements/H2.vue.cjs"),N=require("../elements/Caption.vue.cjs"),y=require("../elements/Bullets.vue.cjs"),A=require("../elements/ImageUpload.vue.cjs"),V=require("../elements/Embed.vue.cjs"),q=require("../elements/Audio.vue.cjs"),D=require("../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs"),M=["onMouseover"],T={key:0,class:"z-index-5 radius-thin pd-thin bg-white w-max mn-b-small flex-nowrap flex-column flex"},$=["onClick"],F=["onClick"],I=["onClick"],S=["onClick"],U={__name:"Constructor",props:["content"],emits:["update"],setup(v,{emit:f}){const k=v,u=f;let t=e.ref(null);e.ref(null),t.value={content:k.content};const b={Textarea:E.default,H2:x.default,Bullets:y.default,Caption:N.default,ImageUpload:A.default,Embed:V.default,Audio:q.default};function s(c="Textarea",l="",n,o){console.log("We are adding new block (functuin HandleAddBlock):"+c+l+n+o);let a={order:t.value.content.length+1,type:c,style:"",class:"",content:l,blocks:[],setFocus:!0};if(o&&o.blocks&&Array.isArray(o.blocks)){let m=o.blocks.map(_=>({...a,content:_.content})),B=[(o.index||n)+1,0].concat(m);t.value.content.splice.apply(t.value.content,B);const C=m[m.length-1];console.log("New block is"+C)}else n!==void 0?(t.value.content.splice(n+1,0,a),console.log("Latest block is"+a)):(console.log("Another block is"+a),t.value.content.push(a));i.value=null,u("update",t.value.content)}function g(c,l){const n=t.value.content.findIndex(o=>o===c);n!==-1&&(t.value.content[n]={...t.value.content[n],...l}),u("update",t.value.content)}function p(c){let l=t.value.content.findIndex(n=>n===c);l!==-1&&t.value.content.splice(l,1),t.value.content[l-1].setFocus=!0,u("update",t.value.content)}const i=e.ref(null),d=e.ref(!1),r=e.ref(!1);function h(){d.value=!0}function w(){d.value=!1}return e.watchEffect(()=>{t.value&&t.value.content.length===0&&s("Textarea",""),u("update",t.value.content)}),(c,l)=>(e.openBlock(),e.createElementBlock("section",null,[e.unref(t).content?(e.openBlock(),e.createBlock(e.unref(D.VueDraggableNext),{key:0,class:"w-full",list:e.unref(t).content,onStart:h,onEnd:w},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).content,(n,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:"pos-relative"},[e.createElementVNode("div",{onMouseover:a=>(i.value=o,r.value=!1),class:"pos-relative w-full h-full"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(b[n.type]),{index:o,component:n,prop:n,class:e.normalizeClass(n.class),setFocus:n.setFocus,content:"content",onDeleteBlock:p,onAddBlock:s,onUpdateBlock:g},null,40,["index","component","prop","class","setFocus"]))],40,M),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value===o?(e.openBlock(),e.createElementBlock("div",{key:0,class:"pos-absolute z-index-4 i-semi",style:{right:"calc(100% + 0.5rem)",top:"calc(50% - 1.125rem)"},onMousedown:l[1]||(l[1]=e.withModifiers(a=>d.value=!0,["prevent"]))},[e.createElementVNode("button",{onClick:l[0]||(l[0]=a=>r.value=!r.value),class:"mn-b-small cursor-pointer w-100 i-semi bg-white radius-thin"},e.toDisplayString(n.content?"...":"+"),1),r.value?(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("span",{onClick:a=>p(n),class:"mn-b-thin w-max t-red bg-white button-small button"}," Remove ",8,$),e.createElementVNode("span",{onClick:a=>s("ImageUpload","",o),class:"mn-b-thin w-max t-black bg-white button-small button"}," Add Image ",8,F),e.createElementVNode("span",{onClick:a=>s("H2","",o),class:"w-max button-small t-black bg-white button"}," Add Title ",8,I),e.createElementVNode("span",{onClick:a=>s("Embed","",o),class:"w-max button-small t-black bg-white button"}," Add Embed ",8,S)])):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1},8,["list"])):e.createCommentVNode("",!0)]))}};exports.default=U;
@@ -1,5 +1,5 @@
1
1
  import { ref as u, watchEffect as M, openBlock as a, createElementBlock as r, unref as p, createBlock as _, withCtx as g, Fragment as N, renderList as I, createElementVNode as c, resolveDynamicComponent as T, normalizeClass as U, createVNode as V, Transition as z, withModifiers as H, toDisplayString as S, createCommentVNode as k } from "vue";
2
- import L from "../elements/Textarea.vue2.js";
2
+ import L from "../elements/Textarea.vue.js";
3
3
  import R from "../elements/H2.vue.js";
4
4
  import W from "../elements/Caption.vue.js";
5
5
  import j from "../elements/Bullets.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../constructor/components/elements/Textarea.vue.cjs");const N=require("../../../constructor/components/sections/Constructor.vue.cjs"),E=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.cjs");const y=require("../../../../components/Popup/Popup.vue.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/FieldTags/BlockTags.vue.cjs"),P=require("../../../../components/Checkbox/Checkbox.vue.cjs"),C=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),x=require("../../../../components/UploadImage/UploadImage.vue.cjs"),B=require("../../../../components/Button/Button.vue2.cjs"),v=require("vue-router"),s=require("../../store/events.cjs"),u=require("../../../auth/store/auth.cjs"),D=require("../../../organizations/store/organizations.cjs");require("./EditEvent.vue2.cjs");const U={key:0,class:"h-100 pd-thin"},T={class:"mn-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.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,9 +1,9 @@
1
1
  import { ref as u, onMounted as $, unref as l, openBlock as d, createElementBlock as m, createElementVNode as i, createVNode as s, createCommentVNode as p, withCtx as _, createTextVNode as T } from "vue";
2
- import "../../../constructor/components/elements/Textarea.vue.js";
2
+ 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.vue.js";
6
+ import O from "../../../../components/Popup/Popup.vue2.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.vue2.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../reports/store/reports.cjs");require("../../../../components/Dropdown/Dropdown.vue.cjs");const i=require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");require("../../../community/store/reactions.cjs");const o=require("../../store/events.cjs");require("../sections/List.vue2.cjs");const s={__name:"Events",setup(c){const r=u.useRoute();return u.useRouter(),(n,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(t.default,{category:e.unref(r).params.category,user:i.state.user._id,period:e.unref(r).query.period,selectedDate:o.state.filter.date},null,8,["category","user","period","selectedDate"])]))}};exports.default=s;
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;
@@ -5,11 +5,11 @@ import "../../../globals/localization/vue-i18n.js";
5
5
  import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
6
6
  import s from "../sections/Feed.vue.js";
7
7
  import "../../../../components/Loader/Loader.vue.js";
8
- import "../../../../components/Popup/Popup.vue2.js";
8
+ import "../../../../components/Popup/Popup.vue.js";
9
9
  import "../../../../components/Button/Button.vue.js";
10
10
  import "../../../../components/Select/Select.vue.js";
11
11
  import "../../../reports/store/reports.js";
12
- import "../../../../components/Dropdown/Dropdown.vue.js";
12
+ import "../../../../components/Dropdown/Dropdown.vue2.js";
13
13
  import { state as a } from "../../../auth/store/auth.js";
14
14
  import "../../../organizations/store/memberships.js";
15
15
  import "../../../community/store/reactions.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Loader/Loader.vue.cjs");const g=require("../../../../components/EmptyState/EmptyState.vue.cjs"),m=require("../blocks/CardEvent.vue.cjs"),v=require("../../../icons/skeletons/SkeletonEvent.vue.cjs"),c=require("../../store/events.cjs"),f={class:"feed"},y={__name:"Feed",props:{category:{type:String,default:null},selectedDate:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},creator:{type:String,default:null},user:{type:[String,Number],default:null},sortOrder:{type:String,default:"desc"},sortParam:{type:String,default:"date.start"},participant:{type:String,default:null},period:{type:String,default:null},phase:{type:String,default:null}},setup(i){const t=i,a=e.ref([]),n=e.ref(!1),l=e.ref(!0),u=e.ref(0),s=e.ref(20),d=async()=>{if(n.value){u.value+=s.value;const r=await c.read({skip:u.value,limit:s.value,category:t.category,sortOrder:t.sortOrder,sortParam:t.sortParam,participant:t.participant,creator:t.creator,user:t.user,date:t.selectedDate,owner:t.owner,organization:t.organization,period:t.period,phase:t.phase});r.length===0?n.value=!1:n.value=!0,a.value=[...a.value,...r]}};return e.onMounted(async()=>{l.value=!0,console.log(t.selectedDate);const r=await c.read({skip:u.value,limit:s.value,category:t.category,participant:t.participant,sortOrder:t.sortOrder,sortParam:t.sortParam,user:t.user,owner:t.owner,creator:t.creator,date:t.selectedDate,organization:t.organization,period:t.period,phase:t.phase});r.length===0?n.value=!1:n.value=!0,a.value=r,l.value=!1}),(r,k)=>(e.openBlock(),e.createElementBlock("section",f,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[l.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s.value,o=>(e.openBlock(),e.createBlock(v.default,{key:o}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"scaleTransition"},{default:e.withCtx(()=>[!l.value&&a.value.length<1?(e.openBlock(),e.createBlock(g.default,{key:0,title:"No Events Found",description:"Currently, there are no events available. Please check back later.",class:"pd-medium mn-b-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition",class:"container"},{default:e.withCtx(()=>[!l.value&&a.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.value,(o,p)=>(e.openBlock(),e.createBlock(m.default,{onClick:h=>r.$router.push({name:"Event",params:{url:o.url}}),key:o._id,event:o,user:i.user,type:"normal",class:e.normalizeClass(["bg-grey radius-big mn-b-medium",{"br-b br-solid br-black-transp-10":p!==a.value.length-1}])},null,8,["onClick","event","user","class"]))),128)):e.createCommentVNode("",!0),n.value&&a.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:d,class:"w-100 bg-main button"},"Load more")):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=y;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Loader/Loader.vue.cjs");const p=require("../../../../components/EmptyState/EmptyState.vue.cjs"),g=require("../blocks/CardEvent.vue.cjs"),m=require("../../../icons/skeletons/SkeletonEvent.vue.cjs"),c=require("../../store/events.cjs"),v={class:"feed"},f={__name:"Feed",props:{category:{type:String,default:null},selectedDate:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},creator:{type:String,default:null},user:{type:[String,Number],default:null},sortOrder:{type:String,default:"desc"},sortParam:{type:String,default:"date.start"},participant:{type:String,default:null},period:{type:String,default:null},phase:{type:String,default:null}},setup(i){const t=i,a=e.ref([]),n=e.ref(!1),l=e.ref(!0),s=e.ref(0),u=e.ref(20),d=async()=>{if(n.value){s.value+=u.value;const r=await c.read({skip:s.value,limit:u.value,category:t.category,sortOrder:t.sortOrder,sortParam:t.sortParam,participant:t.participant,creator:t.creator,user:t.user,date:t.selectedDate,owner:t.owner,organization:t.organization,period:t.period,phase:t.phase});r.length===0?n.value=!1:n.value=!0,a.value=[...a.value,...r]}};return e.onMounted(async()=>{l.value=!0,console.log(t.selectedDate);const r=await c.read({skip:s.value,limit:u.value,category:t.category,participant:t.participant,sortOrder:t.sortOrder,sortParam:t.sortParam,user:t.user,owner:t.owner,creator:t.creator,date:t.selectedDate,organization:t.organization,period:t.period,phase:t.phase});r.length===0?n.value=!1:n.value=!0,a.value=r,l.value=!1}),(r,y)=>(e.openBlock(),e.createElementBlock("section",v,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[l.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(u.value,o=>(e.openBlock(),e.createBlock(m.default,{key:o}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"scaleTransition"},{default:e.withCtx(()=>[!l.value&&a.value.length<1?(e.openBlock(),e.createBlock(p.default,{key:0,title:"No Events Found",description:"Currently, there are no events available. Please check back later.",class:"pd-medium mn-b-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"scaleTransition",class:"container"},{default:e.withCtx(()=>[!l.value&&a.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.value,(o,k)=>(e.openBlock(),e.createBlock(g.default,{onClick:h=>r.$router.push({name:"Event",params:{url:o.url}}),key:o._id,event:o,user:i.user,type:"normal",class:"bg-grey radius-big mn-b-medium"},null,8,["onClick","event","user"]))),128)):e.createCommentVNode("",!0),n.value&&a.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:d,class:"w-100 bg-main button"},"Load more")):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=f;
@@ -1,10 +1,10 @@
1
- import { ref as s, onMounted as S, openBlock as r, createElementBlock as u, createVNode as p, TransitionGroup as f, withCtx as m, Fragment as y, renderList as h, createBlock as g, createCommentVNode as c, Transition as w, normalizeClass as C } from "vue";
1
+ import { ref as i, onMounted as _, openBlock as r, createElementBlock as u, createVNode as p, TransitionGroup as f, withCtx as m, Fragment as y, renderList as h, createBlock as g, createCommentVNode as c, Transition as S } from "vue";
2
2
  import "../../../../components/Loader/Loader.vue.js";
3
- import z from "../../../../components/EmptyState/EmptyState.vue.js";
4
- import E from "../blocks/CardEvent.vue.js";
5
- import P from "../../../icons/skeletons/SkeletonEvent.vue.js";
6
- import { read as b } from "../../store/events.js";
7
- const O = { class: "feed" }, x = {
3
+ import w from "../../../../components/EmptyState/EmptyState.vue.js";
4
+ import C from "../blocks/CardEvent.vue.js";
5
+ import E from "../../../icons/skeletons/SkeletonEvent.vue.js";
6
+ import { read as k } from "../../store/events.js";
7
+ const P = { class: "feed" }, F = {
8
8
  __name: "Feed",
9
9
  props: {
10
10
  category: {
@@ -53,12 +53,12 @@ const O = { class: "feed" }, x = {
53
53
  }
54
54
  },
55
55
  setup(v) {
56
- const e = v, t = s([]), n = s(!1), l = s(!0), d = s(0), i = s(20), k = async () => {
56
+ const e = v, t = i([]), n = i(!1), l = i(!0), d = i(0), s = i(20), b = async () => {
57
57
  if (n.value) {
58
- d.value += i.value;
59
- const a = await b({
58
+ d.value += s.value;
59
+ const a = await k({
60
60
  skip: d.value,
61
- limit: i.value,
61
+ limit: s.value,
62
62
  category: e.category,
63
63
  sortOrder: e.sortOrder,
64
64
  sortParam: e.sortParam,
@@ -74,11 +74,11 @@ const O = { class: "feed" }, x = {
74
74
  a.length === 0 ? n.value = !1 : n.value = !0, t.value = [...t.value, ...a];
75
75
  }
76
76
  };
77
- return S(async () => {
77
+ return _(async () => {
78
78
  l.value = !0, console.log(e.selectedDate);
79
- const a = await b({
79
+ const a = await k({
80
80
  skip: d.value,
81
- limit: i.value,
81
+ limit: s.value,
82
82
  category: e.category,
83
83
  participant: e.participant,
84
84
  sortOrder: e.sortOrder,
@@ -92,20 +92,20 @@ const O = { class: "feed" }, x = {
92
92
  phase: e.phase
93
93
  });
94
94
  a.length === 0 ? n.value = !1 : n.value = !0, t.value = a, l.value = !1;
95
- }), (a, T) => (r(), u("section", O, [
95
+ }), (a, z) => (r(), u("section", P, [
96
96
  p(f, {
97
97
  tag: "ul",
98
98
  name: "scaleTransition",
99
99
  class: "o-hidden bg-grey radius-big"
100
100
  }, {
101
101
  default: m(() => [
102
- l.value ? (r(!0), u(y, { key: 0 }, h(i.value, (o) => (r(), g(P, { key: o }))), 128)) : c("", !0)
102
+ l.value ? (r(!0), u(y, { key: 0 }, h(s.value, (o) => (r(), g(E, { key: o }))), 128)) : c("", !0)
103
103
  ]),
104
104
  _: 1
105
105
  }),
106
- p(w, { name: "scaleTransition" }, {
106
+ p(S, { name: "scaleTransition" }, {
107
107
  default: m(() => [
108
- !l.value && t.value.length < 1 ? (r(), g(z, {
108
+ !l.value && t.value.length < 1 ? (r(), g(w, {
109
109
  key: 0,
110
110
  title: "No Events Found",
111
111
  description: "Currently, there are no events available. Please check back later.",
@@ -120,19 +120,17 @@ const O = { class: "feed" }, x = {
120
120
  class: "container"
121
121
  }, {
122
122
  default: m(() => [
123
- !l.value && t.value.length > 0 ? (r(!0), u(y, { key: 0 }, h(t.value, (o, _) => (r(), g(E, {
124
- onClick: (D) => a.$router.push({ name: "Event", params: { url: o.url } }),
123
+ !l.value && t.value.length > 0 ? (r(!0), u(y, { key: 0 }, h(t.value, (o, O) => (r(), g(C, {
124
+ onClick: (T) => a.$router.push({ name: "Event", params: { url: o.url } }),
125
125
  key: o._id,
126
126
  event: o,
127
127
  user: v.user,
128
128
  type: "normal",
129
- class: C(["bg-grey radius-big mn-b-medium", {
130
- "br-b br-solid br-black-transp-10": _ !== t.value.length - 1
131
- }])
132
- }, null, 8, ["onClick", "event", "user", "class"]))), 128)) : c("", !0),
129
+ class: "bg-grey radius-big mn-b-medium"
130
+ }, null, 8, ["onClick", "event", "user"]))), 128)) : c("", !0),
133
131
  n.value && t.value.length > 0 ? (r(), u("button", {
134
132
  key: 1,
135
- onClick: k,
133
+ onClick: b,
136
134
  class: "w-100 bg-main button"
137
135
  }, "Load more")) : c("", !0)
138
136
  ]),
@@ -142,5 +140,5 @@ const O = { class: "feed" }, x = {
142
140
  }
143
141
  };
144
142
  export {
145
- x as default
143
+ F as default
146
144
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),h=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),f=require("../../../reports/components/sections/FormReport.vue.cjs"),g=require("../../../../components/Dropdown/Dropdown.vue2.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");const k={key:0,class:"pd-b-zero"},y={class:"w-100 flex-v-center flex-nojustify flex"},w={class:"w-100 flex-nowrap flex-v-center flex"},b=["src"],B={key:2,class:"t-semi"},E={key:1},V={key:2},p={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},x={key:0,class:"w-4r i-thin"},C={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"},N=["src"],$={class:"bg-black pd-thin radius-small"},v=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),M={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type"],setup(t){m.useRouter();function u(o){const r=new Date,i=new Date(o),s=Math.abs(r-i),a=Math.floor(s/1e3),n=Math.floor(a/60),l=Math.floor(n/60),c=Math.floor(l/24),d=Math.floor(c/7);return d>0?`${d} week${d>1?"s":""} ago`:c>0?`${c} day${c>1?"s":""} ago`:l>0?`${l} hour${l>1?"s":""} ago`:n>0?`${n} minute${n>1?"s":""} ago`:"Just now"}return(o,r)=>{var i,s;return t.owner?(e.openBlock(),e.createElementBlock("header",k,[e.createElementVNode("div",y,[e.createElementVNode("div",w,[t.owner.target.profile.photo.length>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(o.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,b)):e.createCommentVNode("",!0),!t.owner.target.profile.photo&&t.type!=="short"?(e.openBlock(),e.createBlock(h.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",B,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(t.owner.target.profile.name),1),!t.creator.hidden&&t.owner.target.profile.name!==((i=t.creator.target.profile)==null?void 0:i.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(a=>o.$router.push({name:"User Profile",params:{_id:t.creator.target._id}}),["stop"]))}," · by "+e.toDisplayString((s=t.creator.target.profile)==null?void 0:s.name),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",E," · "+e.toDisplayString(u(t.date)),1)):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",V," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",p,[t.members?(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("span",C,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(a,n)=>(e.openBlock(),e.createElementBlock("img",{key:n,src:(o.FILE_SERVER_URL||"")+a,style:e.normalizeStyle({position:"absolute",top:"0px",right:n*20+20+"%",zIndex:1-n}),class:"br-solid br-2px br-white i-thin bg-grey radius-big"},null,12,N))),128))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user&&t.user!=t.creator.target._id?(e.openBlock(),e.createBlock(g.default,{key:3,label:"...",align:"right",class:"cursor-pointer z-index-2 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",$,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(f.default,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[v]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}};exports.default=M;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),h=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),f=require("../../../reports/components/sections/FormReport.vue.cjs"),g=require("../../../../components/Dropdown/Dropdown.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");const k={key:0,class:"pd-b-zero"},y={class:"w-100 flex-v-center flex-nojustify flex"},w={class:"w-100 flex-nowrap flex-v-center flex"},b=["src"],B={key:2,class:"t-semi"},E={key:1},V={key:2},p={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},x={key:0,class:"w-4r i-thin"},C={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"},N=["src"],$={class:"bg-black pd-thin radius-small"},v=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),M={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type"],setup(t){m.useRouter();function u(o){const r=new Date,i=new Date(o),s=Math.abs(r-i),a=Math.floor(s/1e3),n=Math.floor(a/60),l=Math.floor(n/60),c=Math.floor(l/24),d=Math.floor(c/7);return d>0?`${d} week${d>1?"s":""} ago`:c>0?`${c} day${c>1?"s":""} ago`:l>0?`${l} hour${l>1?"s":""} ago`:n>0?`${n} minute${n>1?"s":""} ago`:"Just now"}return(o,r)=>{var i,s;return t.owner?(e.openBlock(),e.createElementBlock("header",k,[e.createElementVNode("div",y,[e.createElementVNode("div",w,[t.owner.target.profile.photo.length>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(o.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,b)):e.createCommentVNode("",!0),!t.owner.target.profile.photo&&t.type!=="short"?(e.openBlock(),e.createBlock(h.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",B,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(t.owner.target.profile.name),1),!t.creator.hidden&&t.owner.target.profile.name!==((i=t.creator.target.profile)==null?void 0:i.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(a=>o.$router.push({name:"User Profile",params:{_id:t.creator.target._id}}),["stop"]))}," · by "+e.toDisplayString((s=t.creator.target.profile)==null?void 0:s.name),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",E," · "+e.toDisplayString(u(t.date)),1)):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",V," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",p,[t.members?(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("span",C,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(a,n)=>(e.openBlock(),e.createElementBlock("img",{key:n,src:(o.FILE_SERVER_URL||"")+a,style:e.normalizeStyle({position:"absolute",top:"0px",right:n*20+20+"%",zIndex:1-n}),class:"br-solid br-2px br-white i-thin bg-grey radius-big"},null,12,N))),128))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user&&t.user!=t.creator.target._id?(e.openBlock(),e.createBlock(g.default,{key:3,label:"...",align:"right",class:"cursor-pointer z-index-2 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",$,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(f.default,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[v]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}};exports.default=M;
@@ -2,7 +2,7 @@ import { openBlock as t, createElementBlock as i, createElementVNode as l, withM
2
2
  import { useRouter as v } from "vue-router";
3
3
  import p from "../../../icons/placeholders/PlaceholderUserpic.vue.js";
4
4
  import E from "../../../reports/components/sections/FormReport.vue.js";
5
- import R from "../../../../components/Dropdown/Dropdown.vue2.js";
5
+ import R from "../../../../components/Dropdown/Dropdown.vue.js";
6
6
  import "../../../../components/Button/Button.vue.js";
7
7
  import "../../../auth/store/auth.js";
8
8
  import "../../../organizations/store/memberships.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:"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>0?(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"),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;
@@ -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: "h3 mn-r-semi mn-b-thin" }, $ = {
28
+ ], y = { class: "flex-child-1 flex-child mn-l-small w-100" }, S = { class: "t-nowrap h3 mn-r-semi 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 = {
@@ -83,7 +83,7 @@ const x = { class: "pd-medium flex-v-center flex-nowrap flex" }, z = ["src"], v
83
83
  ])
84
84
  ])
85
85
  ]),
86
- i.organization.products.length > 0 ? (t(), s("div", L, [
86
+ i.organization.products.length > 1e3 ? (t(), s("div", L, [
87
87
  e("div", R, [
88
88
  e("p", U, a(i.organization.products.length) + " items: ", 1),
89
89
  F,
@@ -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.vue.cjs");const m=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue.cjs");const V=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),r=require("../../../../components/Checkbox/Checkbox.vue.cjs"),g=require("../../../../components/Address/Address.vue.cjs"),y=require("../../../../components/LocationMarker/LocationMarker.vue.cjs"),p=require("../../../../components/Button/Button.vue2.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.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;
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;
@@ -3,7 +3,7 @@ import { useRouter as S, useRoute as E } from "vue-router";
3
3
  import "../../../../../../node_modules/js-cookie/src/js.cookie.js";
4
4
  import z from "../../../../components/Breadcrumbs/Breadcrumbs.vue2.js";
5
5
  import N from "../../../../components/UploadImage/UploadImage.vue.js";
6
- import "../../../../components/Tab/Tab.vue.js";
6
+ import "../../../../components/Tab/Tab.vue2.js";
7
7
  import _ from "../../../../components/Field/Field.vue2.js";
8
8
  import "../../../../components/Select/Select.vue.js";
9
9
  import U from "../../../../../../_virtual/_plugin-vue_export-helper.js";
@@ -12,7 +12,7 @@ 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.vue2.js";
15
+ import "../../../../components/Popup/Popup.vue.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.vue2.cjs");require("../../../mobile/components/Menu/Menu.vue.cjs");require("../../../mobile/components/Menu/MenuItem.vue.cjs");const _=require("../../../events/components/sections/Feed.vue.cjs"),p=require("../../../community/components/sections/Feed.vue.cjs"),v=require("../../../spots/components/sections/Feed.vue.cjs"),f=require("../sections/DetailsTab.vue.cjs"),b=require("../../../products/components/pages/Products.vue.cjs");require("../../../../components/Spoiler/Spoiler.vue.cjs");require("../../../../components/Map/Map.vue.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/User.vue2.cjs");require("../blocks/CardDepartment.vue2.cjs");require("../../store/departments.cjs");const a=require("../../../auth/store/auth.cjs");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Select/Select.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../middlewares/client/inputs.validation.cjs");require("../../store/invites.cjs");const l=require("../../store/memberships.cjs"),o=require("../../store/organizations.cjs");require("./Organization.vue2.cjs");const y={key:0,class:"pd-thin for-transition w-100"},g={class:"pos-relative"},h={key:0},k={__name:"Organization",setup(N){const c=i.useRouter(),r=i.useRoute();let d=r.query.tab?r.query.tab:"events";const u=e.ref(null);e.onMounted(async()=>{u.value=await o.actions.read({_id:r.params._id,user:a.state.user._id}),await l.actions.read(r.params._id)});const t=e.ref(d);return r.query.tab=t.value,e.watch(t,n=>{c.replace({query:{...r.query,tab:n}})}),(n,s)=>u.value?(e.openBlock(),e.createElementBlock("div",y,[e.createVNode(f.default,{organization:o.state.current,user:a.state.user,class:"mn-b-semi"},null,8,["organization","user"]),e.createVNode(q.default,{selected:t.value,"onUpdate:selected":s[0]||(s[0]=m=>t.value=m),tabs:[{name:"Community",value:"community"},{name:"Events",value:"events"}],class:"mn-b-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createElementVNode("div",g,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[t.value==="community"?(e.openBlock(),e.createBlock(p.default,{key:0,user:a.state.user._id,owner:e.unref(r).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[t.value==="events"?(e.openBlock(),e.createBlock(_.default,{key:0,user:a.state.user._id,owner:e.unref(r).params._id,sortOrder:"desc",sortParam:"date.start"},null,8,["user","owner","sortParam"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[t.value==="products"?(e.openBlock(),e.createBlock(b.default,{key:0,organization:o.state.current},null,8,["organization"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[t.value==="spots"?(e.openBlock(),e.createElementBlock("div",h,[e.createVNode(v.default,{organization:o.state.current,memberships:l.state.memberships},null,8,["organization","memberships"])])):e.createCommentVNode("",!0)]),_:1})])])):e.createCommentVNode("",!0)}};exports.default=k;
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;
@@ -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.vue2.js";
6
+ import k from "../../../../components/Tab/Tab.vue.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";