@ozdao/prometheus-framework 0.2.36 → 0.2.38
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.css +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +42 -52
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +39 -242
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +373 -0
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.js +4 -0
- package/dist/prometheus-framework/src/components/FieldPhone/click-outside.cjs +1 -2
- package/dist/prometheus-framework/src/components/FieldPhone/click-outside.js +13 -13
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +111 -2
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +49 -47
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +43 -42
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +61 -56
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionMainGuest.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/store/events.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/store/events.js +59 -39
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +31 -31
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +85 -55
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +30 -38
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/shopcart.js +31 -21
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +95 -92
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +54 -74
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +58 -48
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.js +26 -26
- package/dist/prometheus-framework.cjs.js +18 -18
- package/dist/prometheus-framework.es.js +507 -493
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/modules/globals/store/globals.js +0 -1
@@ -1,17 +1,17 @@
|
|
1
|
-
import { ref as
|
2
|
-
import
|
1
|
+
import { ref as y, watch as M, computed as N, openBlock as s, createElementBlock as n, Fragment as k, withDirectives as b, withModifiers as w, normalizeClass as _, createElementVNode as u, toDisplayString as d, createCommentVNode as m, createVNode as g, Transition as S, withCtx as x, renderList as T, vShow as $, unref as z } from "vue";
|
2
|
+
import D from "../FieldPhone/click-outside.js";
|
3
3
|
import "./Select.vue.js";
|
4
|
-
import
|
5
|
-
const
|
4
|
+
import E from "../../../../_virtual/_plugin-vue_export-helper.js";
|
5
|
+
const L = {
|
6
6
|
key: 0,
|
7
7
|
class: "t-transp mn-r-small"
|
8
|
-
},
|
8
|
+
}, A = { class: "w-100" }, F = ["onClick"], I = {
|
9
9
|
key: 0,
|
10
10
|
class: "w-100"
|
11
|
-
},
|
11
|
+
}, P = {
|
12
12
|
key: 0,
|
13
13
|
class: "mn-t-thin invalid-feedback"
|
14
|
-
},
|
14
|
+
}, Y = {
|
15
15
|
__name: "Select",
|
16
16
|
props: {
|
17
17
|
label: String,
|
@@ -24,72 +24,74 @@ const E = {
|
|
24
24
|
emits: ["update:select", "focus", "blur"],
|
25
25
|
setup(o, { emit: C }) {
|
26
26
|
const p = C;
|
27
|
-
let O =
|
28
|
-
const e = o,
|
29
|
-
function
|
30
|
-
|
27
|
+
let O = D;
|
28
|
+
const e = o, l = y(e.property ? f(e.select, e.property, e.options) : e.select), i = y(!1);
|
29
|
+
function B() {
|
30
|
+
i.value = !1;
|
31
31
|
}
|
32
|
-
function f(t,
|
33
|
-
for (const a of
|
34
|
-
if (a[
|
32
|
+
function f(t, h, c) {
|
33
|
+
for (const a of c)
|
34
|
+
if (a[h] === t || a === t)
|
35
35
|
return a;
|
36
36
|
return null;
|
37
37
|
}
|
38
|
-
|
39
|
-
|
38
|
+
M(() => e.select, (t) => {
|
39
|
+
l.value = e.property ? f(e.select, e.property, e.options) : e.select;
|
40
40
|
});
|
41
|
-
const
|
42
|
-
|
43
|
-
},
|
44
|
-
|
41
|
+
const V = N(() => e.select ? e.options.filter((t) => t !== e.select) : e.options), v = () => {
|
42
|
+
i.value = !i.value, p(i.value ? "focus" : "blur");
|
43
|
+
}, j = (t) => {
|
44
|
+
l.value = t, v(), e.property ? p("update:select", l.value[e.property]) : p("update:select", l.value);
|
45
45
|
};
|
46
|
-
return (t,
|
47
|
-
var
|
48
|
-
return
|
49
|
-
|
50
|
-
onClick:
|
51
|
-
class:
|
46
|
+
return (t, h) => {
|
47
|
+
var c, a;
|
48
|
+
return s(), n(k, null, [
|
49
|
+
b((s(), n("div", {
|
50
|
+
onClick: w(v, ["stop"]),
|
51
|
+
class: _([t.$attrs.class, "cursor-pointer flex-v-center flex-nowrap flex pos-relative"])
|
52
52
|
}, [
|
53
|
-
o.label ? (
|
54
|
-
|
55
|
-
])) :
|
56
|
-
|
57
|
-
|
53
|
+
o.label ? (s(), n("div", L, [
|
54
|
+
u("span", null, d(o.label), 1)
|
55
|
+
])) : m("", !0),
|
56
|
+
u("li", A, [
|
57
|
+
u("span", null, d((c = l.value) != null && c.name ? (a = l.value) == null ? void 0 : a.name : l.value || o.placeholder), 1)
|
58
58
|
]),
|
59
|
-
|
59
|
+
g(S, {
|
60
60
|
mode: "out-in",
|
61
61
|
name: "TransitionTranslateY"
|
62
62
|
}, {
|
63
|
-
default:
|
64
|
-
|
65
|
-
|
66
|
-
|
63
|
+
default: x(() => [
|
64
|
+
b(u("ul", {
|
65
|
+
class: _([t.$attrs.class, "bs-black pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"]),
|
66
|
+
style: { "min-width": "max-content" }
|
67
67
|
}, [
|
68
|
-
(
|
69
|
-
onClick:
|
68
|
+
(s(!0), n(k, null, T(V.value, (r) => (s(), n("li", {
|
69
|
+
onClick: w((q) => j(r), ["stop"])
|
70
70
|
}, [
|
71
|
-
|
72
|
-
], 8,
|
73
|
-
], 2)
|
71
|
+
r ? (s(), n("span", I, d(r.name || r), 1)) : m("", !0)
|
72
|
+
], 8, F))), 256))
|
73
|
+
], 2), [
|
74
|
+
[$, i.value]
|
75
|
+
])
|
74
76
|
]),
|
75
77
|
_: 1
|
76
78
|
})
|
77
79
|
], 2)), [
|
78
|
-
[
|
80
|
+
[z(O), B]
|
79
81
|
]),
|
80
|
-
|
82
|
+
g(S, {
|
81
83
|
mode: "out-in",
|
82
84
|
name: "fade"
|
83
85
|
}, {
|
84
|
-
default:
|
85
|
-
o.validation ? (
|
86
|
+
default: x(() => [
|
87
|
+
o.validation ? (s(), n("div", P, " * " + d(o.validation.message), 1)) : m("", !0)
|
86
88
|
]),
|
87
89
|
_: 1
|
88
90
|
})
|
89
91
|
], 64);
|
90
92
|
};
|
91
93
|
}
|
92
|
-
},
|
94
|
+
}, Q = /* @__PURE__ */ E(Y, [["__scopeId", "data-v-67f55841"]]);
|
93
95
|
export {
|
94
|
-
|
96
|
+
Q as default
|
95
97
|
};
|
@@ -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 C=require("../../../constructor/components/sections/Constructor.vue.cjs"),P=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.cjs");const k=require("../../../../components/Block/Block.vue.cjs"),_=require("../../../../components/Popup/Popup.vue2.cjs"),n=require("../../../../components/Field/Field.vue2.cjs"),T=require("../../../../components/FieldTags/BlockTags.vue.cjs"),V=require("../../../../components/Checkbox/Checkbox.vue2.cjs"),q=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),f=require("../../../../components/Upload/Upload.vue.cjs"),b=require("../../../../components/UploadImage/UploadImage.vue.cjs"),S=require("../../../../components/EditImages/EditImages.vue.cjs"),M=require("../../../../components/Button/Button.vue2.cjs"),N=require("../../../icons/navigation/IconDelete.vue.cjs"),D=require("vue-router"),u=require("../../store/events.cjs"),o=require("../../../auth/store/auth.cjs"),G=require("../../../organizations/store/organizations.cjs");require("./EditEvent.vue2.cjs");const L={key:0,class:"h-100 pd-thin"},F={class:"mn-b-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},O=e.createElementVNode("h4",null,"Upload Event Cover",-1),R={key:0,class:"mn-b-small"},I={key:2,class:"mn-b-semi"},A=e.createElementVNode("h4",{class:"mn-b-thin"}," Hero Section ",-1),z=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Hero Section ",-1),H=e.createElementVNode("h5",{class:"mn-b-thin"}," Ticket ",-1),$={class:"mn-b-small gap-small cols-2-fit-content"},j={class:"gap-thin flex-nowrap flex w-100"},J=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),Y=e.createElementVNode("h4",{class:"mn-b-thin"}," Guest Section ",-1),K={class:"gap-thin cols-3"},Q=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Guests Section ",-1),W={class:"gap-thin flex-nowrap flex w-100"},X={class:"w-100"},Z={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},ee=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),te=e.createElementVNode("h4",{class:"mn-b-thin"}," Lineup Section ",-1),le={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},ae=e.createElementVNode("h5",{class:"mn-b-thin"}," Background in Lineup Section ",-1),se=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Previous Partys Section ",-1),ne=e.createElementVNode("h3",{class:"mn-b-small"},"Date",-1),oe=e.createElementVNode("h3",{class:"mn-b-small"},"Description",-1),ie={key:3,class:"pd-b-extra w-100 bg-grey pd-big radius-big"},re={key:4,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},de={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},ue=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),ce=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),pe={key:0,class:"mn-b-thin"},me={key:1,class:"mn-b-medium br-grey br-2px br-solid pd-small radius-big"},fe={__name:"EditEvent",setup(ge){const p=D.useRoute(),m=D.useRouter();let t=e.ref(null),h=e.ref(null);const v=e.ref([]),i=e.ref(null),r=e.ref(),w=()=>({top:0,left:0});e.onMounted(async()=>{if(p.params.url){const a=await u.read({user:o.state.user._id,url:p.params.url});t.value=a.pop(),console.log(t.value);const l=t.value.date.start,c=t.value.date.end;r.value=[l,c]}else{u.clean(),t.value=u.state.current;const a=new Date,l=new Date;r.value=[a,l]}t.value.owner||(t.value.owner={target:o.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:o.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(i.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const s=await G.actions.read({user:o.state.user._id,postable:o.state.user._id,limit:100});h.value=s.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(!1);function y(){g.value=!0}function E(){g.value=!1}function U(){v.value.length>0&&v.value.map(s=>s.text),t.value.status="draft",t.value.date={start:r.value[0],end:r.value[1]},p.params.url?u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)}):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)})}function x(){i.value&&(t.value.owner={target:i.value._id,type:"organization"}),i.value||(t.value.creator.hidden=!1),i.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),p.params.url?(console.log(t.value),u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})}function B(){confirm("Are you sure you want to delete this event?")&&u.remove(t.value._id).then(s=>{m.push({name:"User Events",params:{_id:t.value.creator.target._id}})}).catch(s=>{console.error(s)})}return(s,a)=>e.unref(t)?(e.openBlock(),e.createElementBlock("article",L,[e.createElementVNode("div",F,[e.createVNode(b.default,{photo:e.unref(t).cover,"onUpdate:photo":a[0]||(a[0]=l=>e.unref(t).cover=l),uploadPath:"specials",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo"]),O]),e.createVNode(n.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(n.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.state.access.roles&&(o.state.access.roles.includes("ROLE_MODERATOR")||o.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",R," Special Details ")):e.createCommentVNode("",!0),o.state.access.roles&&(o.state.access.roles.includes("ROLE_MODERATOR")||o.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createBlock(V.default,{key:1,label:"Special",radio:e.unref(t).special,"onUpdate:radio":a[3]||(a[3]=l=>e.unref(t).special=!e.unref(t).special),class:"mn-b-semi w-100 bg-black t-white pd-medium radius-small"},null,8,["radio"])):e.createCommentVNode("",!0),e.unref(t).special?(e.openBlock(),e.createElementBlock("div",I,[A,e.createVNode(n.default,{field:e.unref(t).specialData.subtitle,"onUpdate:field":a[4]||(a[4]=l=>e.unref(t).specialData.subtitle=l),placeholder:"Event subtitle",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(S.default,{images:e.unref(t).specialData.logos,uploadPath:"/specials",text:{title:"Drag & Drop Your Logos Here",subtitle:"Files supported: JPG, PNG, GIF"},options:{showTitle:!0,showText:!1},"onUpdate:images":a[5]||(a[5]=l=>e.unref(t).specialData.logos=l),class:"mn-b-thin bg-grey radius-small"},null,8,["images"]),z,e.createVNode(f.default,{field:e.unref(t).specialData.video,"onUpdate:field":a[6]||(a[6]=l=>e.unref(t).specialData.video=l),placeholder:"Upload video",onFileChange:a[7]||(a[7]=l=>e.unref(t).specialData.video=l),uploadPath:"specials",type:"file",class:"mn-b-thin w-100 bg-grey pd-medium radius-small t-black"},null,8,["field"]),H,e.createElementVNode("div",$,[e.createVNode(b.default,{photo:e.unref(t).specialData.ticketImage,"onUpdate:photo":a[8]||(a[8]=l=>e.unref(t).specialData.ticketImage=l),uploadPath:"/specials",class:"aspect-1x1 w-4r o-hidden radius-extra"},null,8,["photo"]),e.createElementVNode("div",j,[e.createVNode(n.default,{field:e.unref(t).specialData.ticketLinkStripe,"onUpdate:field":a[9]||(a[9]=l=>e.unref(t).specialData.ticketLinkStripe=l),placeholder:"Link to ticket stripe payment page",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.ticketPrice,"onUpdate:field":a[10]||(a[10]=l=>e.unref(t).specialData.ticketPrice=l),type:"number",placeholder:"Ticket price in baht",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"])])]),J,Y,e.createVNode(n.default,{field:e.unref(t).specialData.titleMainGuest,"onUpdate:field":a[11]||(a[11]=l=>e.unref(t).specialData.titleMainGuest=l),placeholder:"Title for Main Guest section",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestDescription,"onUpdate:field":a[12]||(a[12]=l=>e.unref(t).specialData.guestDescription=l),placeholder:"Description for Main Guest section",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createElementVNode("div",K,[e.createVNode(n.default,{field:e.unref(t).specialData.guestFacebook,"onUpdate:field":a[13]||(a[13]=l=>e.unref(t).specialData.guestFacebook=l),placeholder:"Facebook of Main Guest",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestInstagram,"onUpdate:field":a[14]||(a[14]=l=>e.unref(t).specialData.guestInstagram=l),placeholder:"Instagram of Main Guest",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestTwitter,"onUpdate:field":a[15]||(a[15]=l=>e.unref(t).specialData.guestTwitter=l),placeholder:"Twitter of Main Guest",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestTelegram,"onUpdate:field":a[16]||(a[16]=l=>e.unref(t).specialData.guestTelegram=l),placeholder:"Telegram of Main Guest",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestSoundcloud,"onUpdate:field":a[17]||(a[17]=l=>e.unref(t).specialData.guestSoundcloud=l),placeholder:"Link to Main Guest soundcloud track",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestSpotify,"onUpdate:field":a[18]||(a[18]=l=>e.unref(t).specialData.guestSpotify=l),placeholder:"Link to Main guest spotify track",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"])]),Q,e.createVNode(f.default,{field:e.unref(t).specialData.guestVideo,"onUpdate:field":a[19]||(a[19]=l=>e.unref(t).specialData.guestVideo=l),placeholder:"Upload video",onFileChange:a[20]||(a[20]=l=>e.unref(t).specialData.guestVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-grey pd-medium radius-small t-black"},null,8,["field"]),e.createVNode(k.default,{title:"Guests",placeholder:"No guests added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.guests.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 mn-b-thin t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.guests,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-small gap-small cols-2-fit-content",key:c},[e.createVNode(b.default,{photo:l.photo,"onUpdate:photo":d=>l.photo=d,uploadPath:"/specials",class:"aspect-1x1 w-8r o-hidden radius-extra"},null,8,["photo","onUpdate:photo"]),e.createElementVNode("div",W,[e.createElementVNode("div",X,[e.createVNode(n.default,{field:l.name,"onUpdate:field":d=>l.name=d,placeholder:"Name",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(n.default,{field:l.description,"onUpdate:field":d=>l.description=d,placeholder:"Description",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"])]),e.createElementVNode("div",Z,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.guests.splice(c,1),class:"i-medium"},null,8,["onClick"])])])]))),128))]),_:1},8,["actions"]),ee,te,e.createVNode(k.default,{title:"Line Up",placeholder:"No line ups added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.lineup.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.lineup,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-thin gap-small flex-nowrap flex",key:c},[e.createVNode(n.default,{field:l.name,"onUpdate:field":d=>l.name=d,placeholder:"Name",class:"w-100 bg-grey radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(n.default,{field:l.time,"onUpdate:field":d=>l.time=d,placeholder:"Time",class:"w-100 bg-grey radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",le,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.lineup.splice(c,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),ae,e.createVNode(f.default,{field:e.unref(t).specialData.lineupBackground,"onUpdate:field":a[21]||(a[21]=l=>e.unref(t).specialData.lineupBackground=l),placeholder:"Upload image",onFileChange:a[22]||(a[22]=l=>e.unref(t).specialData.lineupBackground=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-grey pd-medium radius-small t-black"},null,8,["field"]),se,e.createVNode(f.default,{field:e.unref(t).specialData.previousVideo,"onUpdate:field":a[23]||(a[23]=l=>e.unref(t).specialData.previousVideo=l),placeholder:"Upload image",onFileChange:a[24]||(a[24]=l=>e.unref(t).specialData.previousVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-grey pd-medium radius-small t-black"},null,8,["field"])])):e.createCommentVNode("",!0),ne,e.createVNode(e.unref(P.default),{modelValue:r.value,"onUpdate:modelValue":a[25]||(a[25]=l=>r.value=l),"alt-position":w,range:"",class:"mn-b-semi"},null,8,["modelValue"]),oe,e.unref(t)?(e.openBlock(),e.createElementBlock("section",ie,[e.createVNode(C.default,{content:e.unref(t).content,onUpdate:a[26]||(a[26]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",re,[e.createElementVNode("div",de,[e.unref(p).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[27]||(a[27]=l=>B()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[28]||(a[28]=l=>U()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[29]||(a[29]=l=>y()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(_.default,{title:"Добавить участника",onClosePopup:E,isPopupOpen:g.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[ue,e.createVNode(T.default,{onTagsChanged:a[30]||(a[30]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),ce,e.createVNode(q.default,{modelValue:i.value,"onUpdate:modelValue":a[31]||(a[31]=l=>i.value=l),options:e.unref(h),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"]),i.value?(e.openBlock(),e.createElementBlock("h5",pe,"Options:")):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("div",me,[e.createVNode(V.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[32]||(a[32]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(M.default,{submit:x,callback:s.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=fe;
|
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 C=require("../../../constructor/components/sections/Constructor.vue.cjs"),P=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.cjs");const k=require("../../../../components/Block/Block.vue.cjs"),_=require("../../../../components/Popup/Popup.vue2.cjs"),n=require("../../../../components/Field/Field.vue2.cjs"),T=require("../../../../components/FieldTags/BlockTags.vue.cjs"),V=require("../../../../components/Checkbox/Checkbox.vue2.cjs"),q=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),f=require("../../../../components/Upload/Upload.vue.cjs"),b=require("../../../../components/UploadImage/UploadImage.vue.cjs"),S=require("../../../../components/EditImages/EditImages.vue.cjs"),M=require("../../../../components/Button/Button.vue2.cjs"),N=require("../../../icons/navigation/IconDelete.vue.cjs"),w=require("vue-router"),u=require("../../store/events.cjs"),o=require("../../../auth/store/auth.cjs"),L=require("../../../organizations/store/organizations.cjs");require("./EditEvent.vue2.cjs");const F={key:0,class:"h-100 pd-thin"},G={class:"mn-b-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},O=e.createElementVNode("h4",null,"Upload Event Cover",-1),R={key:0,class:"mn-b-small"},I={key:2,class:"mn-b-semi"},A=e.createElementVNode("h4",{class:"mn-b-thin"}," Hero Section ",-1),z=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Hero Section ",-1),H=e.createElementVNode("p",null,"Need to upload in webm format because of needs of optimization",-1),$=e.createElementVNode("h5",{class:"mn-b-thin"}," Ticket ",-1),j={class:"mn-b-small gap-small cols-2-fit-content"},J={class:"gap-thin flex-nowrap flex w-100"},Y=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),K=e.createElementVNode("h4",{class:"mn-b-thin"}," Guest Section ",-1),Q={class:"gap-thin cols-3"},W=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Guests Section ",-1),X={class:"gap-thin flex-nowrap flex w-100"},Z={class:"w-100"},ee={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},te=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),le=e.createElementVNode("h4",{class:"mn-b-thin"}," Lineup Section ",-1),ae={class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},se=e.createElementVNode("h5",{class:"mn-b-thin"}," Background in Lineup Section ",-1),ne=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Previous Partys Section ",-1),oe=e.createElementVNode("h3",{class:"mn-b-small"},"Date",-1),ie=e.createElementVNode("h3",{class:"mn-b-small"},"Description",-1),re={key:3,class:"pd-b-extra w-100 bg-grey pd-big radius-big"},de={key:4,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},ue={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},ce=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),pe=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),me={key:0,class:"mn-b-thin"},fe={key:1,class:"mn-b-medium br-grey br-2px br-solid pd-small radius-big"},ge={__name:"EditEvent",setup(be){const p=w.useRoute(),m=w.useRouter();let t=e.ref(null),h=e.ref(null);const v=e.ref([]),i=e.ref(null),r=e.ref(),D=()=>({top:0,left:0});e.onMounted(async()=>{if(p.params.url){const a=await u.read({user:o.state.user._id,url:p.params.url});t.value=a.pop(),console.log(t.value);const l=t.value.date.start,c=t.value.date.end;r.value=[l,c]}else{u.clean(),t.value=u.state.current;const a=new Date,l=new Date;r.value=[a,l]}t.value.owner||(t.value.owner={target:o.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:o.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(i.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const s=await L.actions.read({user:o.state.user._id,postable:o.state.user._id,limit:100});h.value=s.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(!1);function y(){g.value=!0}function E(){g.value=!1}function U(){v.value.length>0&&v.value.map(s=>s.text),t.value.status="draft",t.value.date={start:r.value[0],end:r.value[1]},p.params.url?u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)}):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.error(s)})}function x(){i.value&&(t.value.owner={target:i.value._id,type:"organization"}),i.value||(t.value.creator.hidden=!1),i.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),p.params.url?(console.log(t.value),u.update(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})):u.create(t.value).then(s=>{m.push({name:"Event",params:{url:s.url}})}).catch(s=>{console.log(s)})}function B(){confirm("Are you sure you want to delete this event?")&&u.remove(t.value._id).then(s=>{m.push({name:"User Events",params:{_id:t.value.creator.target._id}})}).catch(s=>{console.error(s)})}return(s,a)=>e.unref(t)?(e.openBlock(),e.createElementBlock("article",F,[e.createElementVNode("div",G,[e.createVNode(b.default,{photo:e.unref(t).cover,"onUpdate:photo":a[0]||(a[0]=l=>e.unref(t).cover=l),uploadPath:"specials",class:"h-4r w-4r aspect-1x1 o-hidden mn-b-thin radius-extra"},null,8,["photo"]),O]),e.createVNode(n.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(n.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.state.access.roles&&(o.state.access.roles.includes("ROLE_MODERATOR")||o.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",R," Special Details ")):e.createCommentVNode("",!0),o.state.access.roles&&(o.state.access.roles.includes("ROLE_MODERATOR")||o.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createBlock(V.default,{key:1,label:"Special",radio:e.unref(t).special,"onUpdate:radio":a[3]||(a[3]=l=>e.unref(t).special=!e.unref(t).special),class:"mn-b-semi w-100 bg-black t-white pd-medium radius-small"},null,8,["radio"])):e.createCommentVNode("",!0),e.unref(t).special?(e.openBlock(),e.createElementBlock("div",I,[A,e.createVNode(n.default,{field:e.unref(t).specialData.subtitle,"onUpdate:field":a[4]||(a[4]=l=>e.unref(t).specialData.subtitle=l),placeholder:"Event subtitle",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(S.default,{images:e.unref(t).specialData.logos,uploadPath:"/specials",text:{title:"Drag & Drop Your Logos Here",subtitle:"Files supported: JPG, PNG, GIF"},options:{showTitle:!0,showText:!1},"onUpdate:images":a[5]||(a[5]=l=>e.unref(t).specialData.logos=l),class:"mn-b-thin bg-grey radius-small"},null,8,["images"]),z,H,e.createVNode(f.default,{field:e.unref(t).specialData.video,"onUpdate:field":a[6]||(a[6]=l=>e.unref(t).specialData.video=l),placeholder:"Upload video",onFileChange:a[7]||(a[7]=l=>e.unref(t).specialData.video=l),uploadPath:"specials",type:"file",class:"mn-b-thin w-100 bg-grey pd-medium radius-small t-black"},null,8,["field"]),$,e.createElementVNode("div",j,[e.createVNode(b.default,{photo:e.unref(t).specialData.ticketImage,"onUpdate:photo":a[8]||(a[8]=l=>e.unref(t).specialData.ticketImage=l),uploadPath:"/specials",class:"aspect-1x1 w-4r o-hidden radius-extra"},null,8,["photo"]),e.createElementVNode("div",J,[e.createVNode(n.default,{field:e.unref(t).specialData.ticketLinkStripe,"onUpdate:field":a[9]||(a[9]=l=>e.unref(t).specialData.ticketLinkStripe=l),placeholder:"Link to ticket stripe payment page",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.ticketPrice,"onUpdate:field":a[10]||(a[10]=l=>e.unref(t).specialData.ticketPrice=l),type:"number",placeholder:"Ticket price in baht",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"])])]),Y,K,e.createVNode(n.default,{field:e.unref(t).specialData.guestTitle,"onUpdate:field":a[11]||(a[11]=l=>e.unref(t).specialData.guestTitle=l),placeholder:"Title for Main Guest section",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestDescription,"onUpdate:field":a[12]||(a[12]=l=>e.unref(t).specialData.guestDescription=l),placeholder:"Description for Main Guest section",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createElementVNode("div",Q,[e.createVNode(n.default,{field:e.unref(t).specialData.guestFacebook,"onUpdate:field":a[13]||(a[13]=l=>e.unref(t).specialData.guestFacebook=l),placeholder:"Facebook of Main Guest",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestInstagram,"onUpdate:field":a[14]||(a[14]=l=>e.unref(t).specialData.guestInstagram=l),placeholder:"Instagram of Main Guest",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestTwitter,"onUpdate:field":a[15]||(a[15]=l=>e.unref(t).specialData.guestTwitter=l),placeholder:"Twitter of Main Guest",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestTelegram,"onUpdate:field":a[16]||(a[16]=l=>e.unref(t).specialData.guestTelegram=l),placeholder:"Telegram of Main Guest",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestSoundcloud,"onUpdate:field":a[17]||(a[17]=l=>e.unref(t).specialData.guestSoundcloud=l),placeholder:"Link to Main Guest soundcloud track",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(n.default,{field:e.unref(t).specialData.guestSpotify,"onUpdate:field":a[18]||(a[18]=l=>e.unref(t).specialData.guestSpotify=l),placeholder:"Link to Main guest spotify track",class:"mn-b-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"])]),W,e.createVNode(f.default,{field:e.unref(t).specialData.guestVideo,"onUpdate:field":a[19]||(a[19]=l=>e.unref(t).specialData.guestVideo=l),placeholder:"Upload video",onFileChange:a[20]||(a[20]=l=>e.unref(t).specialData.guestVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-grey pd-medium radius-small t-black"},null,8,["field"]),e.createVNode(k.default,{title:"Guests",placeholder:"No guests added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.guests.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 mn-b-thin t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.guests,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-small gap-small cols-2-fit-content",key:c},[e.createVNode(b.default,{photo:l.photo,"onUpdate:photo":d=>l.photo=d,uploadPath:"/specials",class:"aspect-1x1 w-8r o-hidden radius-extra"},null,8,["photo","onUpdate:photo"]),e.createElementVNode("div",X,[e.createElementVNode("div",Z,[e.createVNode(n.default,{field:l.name,"onUpdate:field":d=>l.name=d,placeholder:"Name",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(n.default,{field:l.description,"onUpdate:field":d=>l.description=d,placeholder:"Description",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"])]),e.createElementVNode("div",ee,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.guests.splice(c,1),class:"i-medium"},null,8,["onClick"])])])]))),128))]),_:1},8,["actions"]),te,le,e.createVNode(k.default,{title:"Line Up",placeholder:"No line ups added yet",actions:[{label:"+",function:()=>e.unref(t).specialData.lineup.push({name:null,description:null,photo:null,main:!1})}],class:"cols-1 t-black gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).specialData.lineup,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-b-thin gap-small flex-nowrap flex",key:c},[e.createVNode(n.default,{field:l.name,"onUpdate:field":d=>l.name=d,placeholder:"Name",class:"w-100 bg-grey radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(n.default,{field:l.time,"onUpdate:field":d=>l.time=d,placeholder:"Time",class:"w-100 bg-grey radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("div",ae,[e.createVNode(N.default,{onClick:()=>e.unref(t).specialData.lineup.splice(c,1),class:"i-medium"},null,8,["onClick"])])]))),128))]),_:1},8,["actions"]),se,e.createVNode(f.default,{field:e.unref(t).specialData.lineupBackground,"onUpdate:field":a[21]||(a[21]=l=>e.unref(t).specialData.lineupBackground=l),placeholder:"Upload image",onFileChange:a[22]||(a[22]=l=>e.unref(t).specialData.lineupBackground=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-grey pd-medium radius-small t-black"},null,8,["field"]),ne,e.createVNode(f.default,{field:e.unref(t).specialData.previousVideo,"onUpdate:field":a[23]||(a[23]=l=>e.unref(t).specialData.previousVideo=l),placeholder:"Upload image",onFileChange:a[24]||(a[24]=l=>e.unref(t).specialData.previousVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-grey pd-medium radius-small t-black"},null,8,["field"])])):e.createCommentVNode("",!0),oe,e.createVNode(e.unref(P.default),{modelValue:r.value,"onUpdate:modelValue":a[25]||(a[25]=l=>r.value=l),"alt-position":D,range:"",class:"mn-b-semi"},null,8,["modelValue"]),ie,e.unref(t)?(e.openBlock(),e.createElementBlock("section",re,[e.createVNode(C.default,{content:e.unref(t).content,onUpdate:a[26]||(a[26]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",de,[e.createElementVNode("div",ue,[e.unref(p).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[27]||(a[27]=l=>B()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[28]||(a[28]=l=>U()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[29]||(a[29]=l=>y()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(_.default,{title:"Добавить участника",onClosePopup:E,isPopupOpen:g.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[ce,e.createVNode(T.default,{onTagsChanged:a[30]||(a[30]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),pe,e.createVNode(q.default,{modelValue:i.value,"onUpdate:modelValue":a[31]||(a[31]=l=>i.value=l),options:e.unref(h),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"]),i.value?(e.openBlock(),e.createElementBlock("h5",me,"Options:")):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("div",fe,[e.createVNode(V.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[32]||(a[32]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(M.default,{submit:x,callback:s.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=ge;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ref as b, onMounted as
|
1
|
+
import { ref as b, onMounted as $, unref as t, openBlock as d, createElementBlock as r, createElementVNode as i, createVNode as s, createCommentVNode as f, createBlock as R, withCtx as D, Fragment as x, renderList as P, createTextVNode as A } from "vue";
|
2
2
|
import "../../../constructor/components/elements/Textarea.vue.js";
|
3
3
|
import B from "../../../constructor/components/sections/Constructor.vue.js";
|
4
4
|
import I from "../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js";
|
@@ -28,25 +28,25 @@ const le = {
|
|
28
28
|
}, ie = {
|
29
29
|
key: 2,
|
30
30
|
class: "mn-b-semi"
|
31
|
-
}, oe = /* @__PURE__ */ i("h4", { class: "mn-b-thin" }, " Hero Section ", -1), ne = /* @__PURE__ */ i("h5", { class: "mn-b-thin" }, " Video in Hero Section ", -1), de = /* @__PURE__ */ i("h5", { class: "mn-b-thin" }, " Ticket ", -1),
|
31
|
+
}, oe = /* @__PURE__ */ i("h4", { class: "mn-b-thin" }, " Hero Section ", -1), ne = /* @__PURE__ */ i("h5", { class: "mn-b-thin" }, " Video in Hero Section ", -1), de = /* @__PURE__ */ i("p", null, "Need to upload in webm format because of needs of optimization", -1), re = /* @__PURE__ */ i("h5", { class: "mn-b-thin" }, " Ticket ", -1), ue = { class: "mn-b-small gap-small cols-2-fit-content" }, pe = { class: "gap-thin flex-nowrap flex w-100" }, me = /* @__PURE__ */ i("hr", { class: "bg-black-transp-10 mn-b-semi mn-t-semi d-block" }, null, -1), ce = /* @__PURE__ */ i("h4", { class: "mn-b-thin" }, " Guest Section ", -1), fe = { class: "gap-thin cols-3" }, ge = /* @__PURE__ */ i("h5", { class: "mn-b-thin" }, " Video in Guests Section ", -1), be = { class: "gap-thin flex-nowrap flex w-100" }, he = { class: "w-100" }, ve = { class: "radius-small h-100 i-big flex-center flex aspect-1x1 bg-red" }, De = /* @__PURE__ */ i("hr", { class: "bg-black-transp-10 mn-b-semi mn-t-semi d-block" }, null, -1), we = /* @__PURE__ */ i("h4", { class: "mn-b-thin" }, " Lineup Section ", -1), ke = { class: "radius-small h-100 i-big flex-center flex aspect-1x1 bg-red" }, ye = /* @__PURE__ */ i("h5", { class: "mn-b-thin" }, " Background in Lineup Section ", -1), Ue = /* @__PURE__ */ i("h5", { class: "mn-b-thin" }, " Video in Previous Partys Section ", -1), _e = /* @__PURE__ */ i("h3", { class: "mn-b-small" }, "Date", -1), xe = /* @__PURE__ */ i("h3", { class: "mn-b-small" }, "Description", -1), Pe = {
|
32
32
|
key: 3,
|
33
33
|
class: "pd-b-extra w-100 bg-grey pd-big radius-big"
|
34
|
-
},
|
34
|
+
}, Te = {
|
35
35
|
key: 4,
|
36
36
|
class: "pd-thin pos-sticky pos-l-0 pos-b-0 w-100"
|
37
|
-
},
|
37
|
+
}, Ee = { class: "pd-thin radius-big bg-main w-100 flex-nowrap flex" }, Ve = /* @__PURE__ */ i("h3", { class: "mn-b-small" }, "Final Touches", -1), Ce = /* @__PURE__ */ i("h5", { class: "mn-b-thin" }, "Add to public:", -1), Se = {
|
38
38
|
key: 0,
|
39
39
|
class: "mn-b-thin"
|
40
|
-
},
|
40
|
+
}, Le = {
|
41
41
|
key: 1,
|
42
42
|
class: "mn-b-medium br-grey br-2px br-solid pd-small radius-big"
|
43
|
-
},
|
43
|
+
}, ll = {
|
44
44
|
__name: "EditEvent",
|
45
45
|
setup(Me) {
|
46
46
|
const h = j(), v = q();
|
47
47
|
let e = b(null), U = b(null);
|
48
|
-
const _ = b([]), p = b(null), m = b(),
|
49
|
-
|
48
|
+
const _ = b([]), p = b(null), m = b(), L = () => ({ top: 0, left: 0 });
|
49
|
+
$(async () => {
|
50
50
|
if (h.params.url) {
|
51
51
|
const a = await Q({ user: u.user._id, url: h.params.url });
|
52
52
|
e.value = a.pop(), console.log(e.value);
|
@@ -81,10 +81,10 @@ const le = {
|
|
81
81
|
}));
|
82
82
|
});
|
83
83
|
const k = b(!1);
|
84
|
-
function
|
84
|
+
function M() {
|
85
85
|
k.value = !0;
|
86
86
|
}
|
87
|
-
function
|
87
|
+
function G() {
|
88
88
|
k.value = !1;
|
89
89
|
}
|
90
90
|
function F() {
|
@@ -101,7 +101,7 @@ const le = {
|
|
101
101
|
console.error(o);
|
102
102
|
});
|
103
103
|
}
|
104
|
-
function
|
104
|
+
function N() {
|
105
105
|
p.value && (e.value.owner = {
|
106
106
|
target: p.value._id,
|
107
107
|
type: "organization"
|
@@ -118,7 +118,7 @@ const le = {
|
|
118
118
|
console.log(o);
|
119
119
|
});
|
120
120
|
}
|
121
|
-
function
|
121
|
+
function O() {
|
122
122
|
confirm("Are you sure you want to delete this event?") && Z(e.value._id).then((o) => {
|
123
123
|
v.push({ name: "User Events", params: { _id: e.value.creator.target._id } });
|
124
124
|
}).catch((o) => {
|
@@ -179,6 +179,7 @@ const le = {
|
|
179
179
|
class: "mn-b-thin bg-grey radius-small"
|
180
180
|
}, null, 8, ["images"]),
|
181
181
|
ne,
|
182
|
+
de,
|
182
183
|
s(w, {
|
183
184
|
field: t(e).specialData.video,
|
184
185
|
"onUpdate:field": a[6] || (a[6] = (l) => t(e).specialData.video = l),
|
@@ -188,15 +189,15 @@ const le = {
|
|
188
189
|
type: "file",
|
189
190
|
class: "mn-b-thin w-100 bg-grey pd-medium radius-small t-black"
|
190
191
|
}, null, 8, ["field"]),
|
191
|
-
|
192
|
-
i("div",
|
192
|
+
re,
|
193
|
+
i("div", ue, [
|
193
194
|
s(y, {
|
194
195
|
photo: t(e).specialData.ticketImage,
|
195
196
|
"onUpdate:photo": a[8] || (a[8] = (l) => t(e).specialData.ticketImage = l),
|
196
197
|
uploadPath: "/specials",
|
197
198
|
class: "aspect-1x1 w-4r o-hidden radius-extra"
|
198
199
|
}, null, 8, ["photo"]),
|
199
|
-
i("div",
|
200
|
+
i("div", pe, [
|
200
201
|
s(n, {
|
201
202
|
field: t(e).specialData.ticketLinkStripe,
|
202
203
|
"onUpdate:field": a[9] || (a[9] = (l) => t(e).specialData.ticketLinkStripe = l),
|
@@ -212,11 +213,11 @@ const le = {
|
|
212
213
|
}, null, 8, ["field"])
|
213
214
|
])
|
214
215
|
]),
|
215
|
-
pe,
|
216
216
|
me,
|
217
|
+
ce,
|
217
218
|
s(n, {
|
218
|
-
field: t(e).specialData.
|
219
|
-
"onUpdate:field": a[11] || (a[11] = (l) => t(e).specialData.
|
219
|
+
field: t(e).specialData.guestTitle,
|
220
|
+
"onUpdate:field": a[11] || (a[11] = (l) => t(e).specialData.guestTitle = l),
|
220
221
|
placeholder: "Title for Main Guest section",
|
221
222
|
class: "mn-b-thin w-100 bg-grey pd-medium radius-small"
|
222
223
|
}, null, 8, ["field"]),
|
@@ -226,7 +227,7 @@ const le = {
|
|
226
227
|
placeholder: "Description for Main Guest section",
|
227
228
|
class: "mn-b-thin w-100 bg-grey pd-medium radius-small"
|
228
229
|
}, null, 8, ["field"]),
|
229
|
-
i("div",
|
230
|
+
i("div", fe, [
|
230
231
|
s(n, {
|
231
232
|
field: t(e).specialData.guestFacebook,
|
232
233
|
"onUpdate:field": a[13] || (a[13] = (l) => t(e).specialData.guestFacebook = l),
|
@@ -264,7 +265,7 @@ const le = {
|
|
264
265
|
class: "mn-b-thin w-100 bg-grey pd-medium radius-small"
|
265
266
|
}, null, 8, ["field"])
|
266
267
|
]),
|
267
|
-
|
268
|
+
ge,
|
268
269
|
s(w, {
|
269
270
|
field: t(e).specialData.guestVideo,
|
270
271
|
"onUpdate:field": a[19] || (a[19] = (l) => t(e).specialData.guestVideo = l),
|
@@ -294,8 +295,8 @@ const le = {
|
|
294
295
|
uploadPath: "/specials",
|
295
296
|
class: "aspect-1x1 w-8r o-hidden radius-extra"
|
296
297
|
}, null, 8, ["photo", "onUpdate:photo"]),
|
297
|
-
i("div",
|
298
|
-
i("div",
|
298
|
+
i("div", be, [
|
299
|
+
i("div", he, [
|
299
300
|
s(n, {
|
300
301
|
field: l.name,
|
301
302
|
"onUpdate:field": (c) => l.name = c,
|
@@ -309,7 +310,7 @@ const le = {
|
|
309
310
|
class: "w-100 mn-b-thin bg-white radius-small pd-medium"
|
310
311
|
}, null, 8, ["field", "onUpdate:field"])
|
311
312
|
]),
|
312
|
-
i("div",
|
313
|
+
i("div", ve, [
|
313
314
|
s(V, {
|
314
315
|
onClick: () => t(e).specialData.guests.splice(g, 1),
|
315
316
|
class: "i-medium"
|
@@ -320,8 +321,8 @@ const le = {
|
|
320
321
|
]),
|
321
322
|
_: 1
|
322
323
|
}, 8, ["actions"]),
|
323
|
-
ve,
|
324
324
|
De,
|
325
|
+
we,
|
325
326
|
s(T, {
|
326
327
|
title: "Line Up",
|
327
328
|
placeholder: "No line ups added yet",
|
@@ -348,7 +349,7 @@ const le = {
|
|
348
349
|
placeholder: "Time",
|
349
350
|
class: "w-100 bg-grey radius-small pd-medium"
|
350
351
|
}, null, 8, ["field", "onUpdate:field"]),
|
351
|
-
i("div",
|
352
|
+
i("div", ke, [
|
352
353
|
s(V, {
|
353
354
|
onClick: () => t(e).specialData.lineup.splice(g, 1),
|
354
355
|
class: "i-medium"
|
@@ -358,7 +359,7 @@ const le = {
|
|
358
359
|
]),
|
359
360
|
_: 1
|
360
361
|
}, 8, ["actions"]),
|
361
|
-
|
362
|
+
ye,
|
362
363
|
s(w, {
|
363
364
|
field: t(e).specialData.lineupBackground,
|
364
365
|
"onUpdate:field": a[21] || (a[21] = (l) => t(e).specialData.lineupBackground = l),
|
@@ -368,7 +369,7 @@ const le = {
|
|
368
369
|
type: "file",
|
369
370
|
class: "mn-b-thin w-100 bg-grey pd-medium radius-small t-black"
|
370
371
|
}, null, 8, ["field"]),
|
371
|
-
|
372
|
+
Ue,
|
372
373
|
s(w, {
|
373
374
|
field: t(e).specialData.previousVideo,
|
374
375
|
"onUpdate:field": a[23] || (a[23] = (l) => t(e).specialData.previousVideo = l),
|
@@ -379,26 +380,26 @@ const le = {
|
|
379
380
|
class: "mn-b-thin w-100 bg-grey pd-medium radius-small t-black"
|
380
381
|
}, null, 8, ["field"])
|
381
382
|
])) : f("", !0),
|
382
|
-
|
383
|
+
_e,
|
383
384
|
s(t(I), {
|
384
385
|
modelValue: m.value,
|
385
386
|
"onUpdate:modelValue": a[25] || (a[25] = (l) => m.value = l),
|
386
|
-
"alt-position":
|
387
|
+
"alt-position": L,
|
387
388
|
range: "",
|
388
389
|
class: "mn-b-semi"
|
389
390
|
}, null, 8, ["modelValue"]),
|
390
|
-
|
391
|
-
t(e) ? (d(), r("section",
|
391
|
+
xe,
|
392
|
+
t(e) ? (d(), r("section", Pe, [
|
392
393
|
s(B, {
|
393
394
|
content: t(e).content,
|
394
395
|
onUpdate: a[26] || (a[26] = (l) => t(e).content = l)
|
395
396
|
}, null, 8, ["content"])
|
396
397
|
])) : f("", !0),
|
397
|
-
t(e) ? (d(), r("section",
|
398
|
-
i("div",
|
398
|
+
t(e) ? (d(), r("section", Te, [
|
399
|
+
i("div", Ee, [
|
399
400
|
t(h).params.url ? (d(), r("a", {
|
400
401
|
key: 0,
|
401
|
-
onClick: a[27] || (a[27] = (l) =>
|
402
|
+
onClick: a[27] || (a[27] = (l) => O()),
|
402
403
|
class: "mn-r-auto bg-red t-white t-black button"
|
403
404
|
}, "Delete")) : f("", !0),
|
404
405
|
i("a", {
|
@@ -406,24 +407,24 @@ const le = {
|
|
406
407
|
class: "mn-l-auto bg-white t-black button"
|
407
408
|
}, "To Drafts"),
|
408
409
|
i("a", {
|
409
|
-
onClick: a[29] || (a[29] = (l) =>
|
410
|
+
onClick: a[29] || (a[29] = (l) => M()),
|
410
411
|
class: "mn-l-thin bg-black t-white button"
|
411
412
|
}, "Publish")
|
412
413
|
])
|
413
414
|
])) : f("", !0),
|
414
415
|
s(z, {
|
415
416
|
title: "Добавить участника",
|
416
|
-
onClosePopup:
|
417
|
+
onClosePopup: G,
|
417
418
|
isPopupOpen: k.value,
|
418
419
|
class: "w-m-33r t-left pd-big bg-white radius-big"
|
419
420
|
}, {
|
420
421
|
default: D(() => [
|
421
|
-
|
422
|
+
Ve,
|
422
423
|
s(H, {
|
423
424
|
onTagsChanged: a[30] || (a[30] = (l) => t(e).tags = l),
|
424
425
|
tags: t(e).tags
|
425
426
|
}, null, 8, ["tags"]),
|
426
|
-
|
427
|
+
Ce,
|
427
428
|
s(J, {
|
428
429
|
modelValue: p.value,
|
429
430
|
"onUpdate:modelValue": a[31] || (a[31] = (l) => p.value = l),
|
@@ -435,8 +436,8 @@ const le = {
|
|
435
436
|
"track-by": "_id",
|
436
437
|
class: "mn-b-medium bg-grey radius-medium pd-small"
|
437
438
|
}, null, 8, ["modelValue", "options"]),
|
438
|
-
p.value ? (d(), r("h5",
|
439
|
-
p.value ? (d(), r("div",
|
439
|
+
p.value ? (d(), r("h5", Se, "Options:")) : f("", !0),
|
440
|
+
p.value ? (d(), r("div", Le, [
|
440
441
|
s(E, {
|
441
442
|
label: "Hide Author",
|
442
443
|
radio: t(e).creator.hidden,
|
@@ -446,7 +447,7 @@ const le = {
|
|
446
447
|
}, null, 8, ["radio"])
|
447
448
|
])) : f("", !0),
|
448
449
|
s(Y, {
|
449
|
-
submit:
|
450
|
+
submit: N,
|
450
451
|
callback: o.redirectTo,
|
451
452
|
class: "w-100 bg-black t-white"
|
452
453
|
}, {
|
@@ -462,5 +463,5 @@ const le = {
|
|
462
463
|
}
|
463
464
|
};
|
464
465
|
export {
|
465
|
-
|
466
|
+
ll as default
|
466
467
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Loader/Loader.vue.cjs");const
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Loader/Loader.vue.cjs");const d=require("../../../../components/EmptyState/EmptyState.vue.cjs"),v=require("../sections/HeroEvent.vue.cjs"),m=require("../sections/SectionMainGuest.vue.cjs"),g=require("../sections/SectionSpecialGuests.vue.cjs"),k=require("../sections/SectionLineup.vue.cjs"),y=require("../sections/SectionPreviousEvents.vue.cjs"),f=require("../blocks/CardEvent.vue.cjs"),h=require("../../../icons/skeletons/SkeletonEvent.vue.cjs"),B=require("../elements/ButtonJoin.vue.cjs"),b=require("../../../community/components/sections/Comments.vue.cjs"),D=require("../../../constructor/components/elements/Image.vue.cjs"),C=require("../../store/events.cjs"),_=require("../../store/tickets.cjs"),o=require("../../../auth/store/auth.cjs"),V=require("vue-router"),N={class:"pd-thin"},T=e.createElementVNode("h2",{class:"mn-b-big w-100 t-center"},"Event Details",-1),q={__name:"Event",setup(w){const s=V.useRoute(),i=({ticket:a,hasTicket:u,targetId:n})=>{_.mutations.handleTicketUpdate(t.value,a,u,n)},c={Textarea:"p",H2:"h2",Bullets:"p",Caption:"p",ImageUpload:D.default};function p(a){return a.type==="Textarea"?{innerHTML:a.content,class:"p-medium"}:a.type==="H2"?{innerHTML:a.content,class:"h3"}:a.type==="Caption"?{innerHTML:a.content}:a.type==="ImageUpload"?{src:a.content}:{}}const t=e.ref(null),l=e.ref(!0);return e.onMounted(async()=>{l.value=!0;const a=await C.read({user:o.state.user._id,url:s.params.url});t.value=a[0],l.value=!1}),(a,u)=>(e.openBlock(),e.createElementBlock("section",N,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(3,n=>e.createVNode(h.default,{key:n})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!l.value&&!t.value?(e.openBlock(),e.createBlock(d.default,{key:0,title:"No Event 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:"fade",class:"container"},{default:e.withCtx(()=>[!l.value&&t.value&&t.value.special?(e.openBlock(),e.createBlock(v.default,{key:0,content:{title:t.value.name,description:t.value.description,ticketLinkStripe:t.value.specialData.ticketLinkStripe,subtitle:t.value.specialData.subtitle,logos:t.value.specialData.logos,video:t.value.specialData.video,buyticket:"Buy ticket",booktable:"Book table"},options:{date:t.value.date.start,price:t.value.specialData.ticketPrice},class:"mn-b-thin"},null,8,["content","options"])):e.createCommentVNode("",!0),!l.value&&t.value&&t.value.special?(e.openBlock(),e.createBlock(m.default,{key:1,content:{title:t.value.specialData.guestTitle,description:t.value.specialData.guestDescription,socials:{twitter:t.value.specialData.guestTwitter,telegram:t.value.specialData.guestTelegram,instagram:t.value.specialData.guestInstagram,facebook:t.value.specialData.guestFacebook},video:t.value.specialData.guestVideo,spotify:t.value.specialData.guestSpotify,soundcloud:t.value.specialData.guestSoundcloud},class:"mn-b-thin"},null,8,["content"])):e.createCommentVNode("",!0),!l.value&&t.value&&t.value.special?(e.openBlock(),e.createElementBlock("section",{key:2,style:e.normalizeStyle(`
|
2
2
|
background-image: url(${t.value.specialData.lineupBackground});
|
3
3
|
background-size: 100%; background-repeat: no-repeat;
|
4
|
-
`),class:"mn-b-thin t-white gap-big w-100 h-max o-hidden radius-big pd-big pos-relative bg-black"},[T,e.createElementVNode("div",
|
4
|
+
`),class:"mn-b-thin t-white gap-big w-100 h-max o-hidden radius-big pd-big pos-relative bg-black"},[T,e.createElementVNode("div",{class:e.normalizeClass(["gap-big mn-b-thin",{"cols-2":t.value.specialData.guests.lenght>0,"cols-1":t.value.specialData.guests.lenght>1}])},[t.value.specialData.guests.lenght>0?(e.openBlock(),e.createBlock(g.default,{key:0,content:{title:"Special Guests",guests:t.value.specialData.guests}},null,8,["content"])):e.createCommentVNode("",!0),e.createVNode(k.default,{content:{title:"Lineup",lineup:t.value.specialData.lineup}},null,8,["content"])],2),e.createVNode(y.default,{content:{ticket:t.value.specialData.ticketImage},options:{link:t.value.specialData.ticketLinkStripe,video:t.value.specialData.previousVideo}},null,8,["content","options"])],4)):e.createCommentVNode("",!0),!l.value&&t.value&&!t.value.special?(e.openBlock(),e.createBlock(f.default,{key:3,onClick:u[0]||(u[0]=n=>a.$router.push({name:"Event",params:{url:t.value.url}})),event:t.value,owner:t.value.owner,user:o.state.user._id,type:"normal",class:"mn-b-medium bg-grey radius-big"},{default:e.withCtx(()=>[o.state.user._id?(e.openBlock(),e.createBlock(B.default,{key:0,type:"event",hasTicket:t.value.hasTicket,targetId:t.value._id,userId:o.state.user._id,class:"mn-b-small w-100 pd-medium mn-auto",onUpdateTicket:i},null,8,["hasTicket","targetId","userId"])):e.createCommentVNode("",!0),e.createElementVNode("section",null,[t.value&&t.value.content?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.value.content,(n,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c[n.type]),e.mergeProps({key:r,index:r,component:n,prop:n,class:n.class,content:"content"},p(n),{class:"mn-b-regular"}),null,16,["index","component","prop","class"]))),128)):e.createCommentVNode("",!0)])]),_:1},8,["event","owner","user"])):e.createCommentVNode("",!0),!l.value&&t.value&&!t.value.special?(e.openBlock(),e.createBlock(b.default,{key:4,type:"event",target:t.value._id,owner:o.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=q;
|