@ozdao/prometheus-framework 0.2.59 → 0.2.61
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +12 -223
- package/dist/auth.server.mjs +12 -223
- package/dist/community.server.js +3 -2
- package/dist/community.server.mjs +2 -1
- package/dist/events.server.js +117 -25
- package/dist/events.server.mjs +116 -24
- package/dist/files.server.js +7 -7
- package/dist/files.server.mjs +7 -7
- package/dist/gallery.server.js +2 -2
- package/dist/gallery.server.mjs +2 -2
- package/dist/main-DsseFd2d.mjs +13753 -0
- package/dist/main-U466Gwzt.js +91 -0
- package/dist/main.css +1 -1
- package/dist/metadata.schema-CS6_9GLU.js +174 -0
- package/dist/metadata.schema-CjpDDEnW.mjs +210 -0
- package/dist/metadata.schema-D88c1Ebp.mjs +175 -0
- package/dist/metadata.schema-doiYQfuO.js +209 -0
- package/dist/organizations.server.js +212 -16
- package/dist/organizations.server.mjs +212 -16
- package/dist/ownership.schema-DN0SlQL6.js +36 -0
- package/dist/ownership.schema-oyx6eNkZ.mjs +37 -0
- package/dist/products.server.js +8 -5
- package/dist/products.server.mjs +8 -5
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +19 -14
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +26 -26
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +1 -373
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +1 -72
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +72 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +1 -97
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +97 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +46 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +1 -46
- package/dist/prometheus-framework/src/modules/auth/auth.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/auth.client.js +12 -14
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +0 -66
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +5 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +66 -0
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
- 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 +199 -185
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +168 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue2.js +1 -0
- 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 +43 -43
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/router/events.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.js +11 -2
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +59 -56
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +1 -13
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +13 -1
- 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 +167 -124
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +56 -45
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +19 -24
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +25 -25
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +40 -38
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js +19 -19
- package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.js +5 -5
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.js +36 -27
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +11 -11
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +21 -21
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +36 -50
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +2 -2
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/web-D7bW32Ul.mjs +54 -0
- package/dist/web-DpE9HxA3.js +1 -0
- package/package.json +1 -1
- package/src/components/Chips/Chips.vue +2 -2
- package/src/components/Feed/Feed.vue +2 -1
- package/src/modules/auth/auth.client.js +0 -2
- package/src/modules/auth/auth.server.js +1 -7
- package/src/modules/auth/components/pages/Invite.vue +1 -1
- package/src/modules/events/components/pages/EditEvent.vue +19 -0
- package/src/modules/events/components/pages/EditEventTickets.vue +194 -0
- package/src/modules/events/controllers/tickets.controller.js +103 -28
- package/src/modules/events/models/ticket.model.js +22 -4
- package/src/modules/events/router/events.js +5 -0
- package/src/modules/events/routes/tickets.routes.js +2 -2
- package/src/modules/events/store/tickets.js +1 -0
- package/src/modules/globals/components/blocks/CardHeader.vue +6 -6
- package/src/modules/organizations/components/pages/Members.vue +1 -1
- package/src/modules/organizations/components/pages/Organization.vue +4 -4
- package/src/modules/organizations/components/sections/MembersAdd.vue +1 -1
- package/src/modules/organizations/controllers/departments.controller.js +14 -1
- package/src/modules/organizations/models/department.model.js +5 -1
- package/src/modules/organizations/organizations.client.js +2 -0
- package/src/modules/organizations/organizations.server.js +6 -2
- package/src/modules/organizations/routes/departments.routes.js +1 -1
- package/src/modules/organizations/store/departments.js +3 -2
- package/src/modules/products/components/blocks/CardLeftover.vue +19 -7
- package/src/modules/products/components/pages/EditLeftover.vue +1 -1
- package/src/modules/products/components/pages/Leftovers.vue +14 -3
- package/src/modules/products/components/pages/Products.vue +8 -8
- package/src/modules/products/models/leftover.model.js +9 -5
- package/src/modules/users/models/client.model.js +60 -0
- /package/src/modules/{auth → organizations}/controllers/invites.controller.js +0 -0
- /package/src/modules/{auth → organizations}/models/invite.model.js +0 -0
- /package/src/modules/{auth → organizations}/routes/invites.routes.js +0 -0
- /package/src/modules/{auth → organizations}/store/invites.js +0 -0
package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),b=require("../../../../components/Feed/Feed.vue.cjs"),N=require("../../../../components/Block/Block.vue.cjs"),w=require("../../../../components/Popup/Popup.vue2.cjs"),f=require("../../../../components/Field/Field.vue.cjs"),h=require("../../../../components/Button/Button.vue.cjs"),V=require("../../../icons/navigation/IconDelete.vue.cjs"),_=require("vue-router"),x=require("../../store/events.cjs"),y=require("../../../auth/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const k=require("../../store/tickets.cjs");require("./EditEventTickets.vue2.cjs");const E={key:0,class:"h-100 pd-thin"},B={class:"mn-b-medium flex-v-center flex-nowrap flex"},q=e.createElementVNode("h2",{class:"mn-r-medium"},"Tickets",-1),C=["onClick"],T={class:"radius-big bg-grey gap-small pd-small flex-nowrap flex pos-relative mn-b-thin"},P=["src"],S={class:""},D={class:"h4"},F={class:"h5 t-transp mn-b-thin"},O={class:"pd-r-thin pd-l-thin pd-b-nano pd-t-nano bg-second radius-extra t-white t-medium d-block w-max uppercase"},U={__name:"EditEventTickets",setup(M){var u;const v=_.useRoute();_.useRouter();let o=e.ref(null);const s=e.ref([{name:"",email:"",target:(u=o.value)==null?void 0:u._id,type:"event"}]),c=e.ref(!1);function g(l){var n;c.value=!0,s.value=[{name:"",email:"",target:(n=o.value)==null?void 0:n._id,type:"event"}]}function i(){c.value=!1}e.onMounted(async()=>{const l=await x.read({user:y.state.user._id,url:v.params.url});o.value=l.pop()});async function d(){try{const l=await k.actions.create(s.value)}catch(l){console.log(l)}}return(l,n)=>e.unref(o)?(e.openBlock(),e.createElementBlock("article",E,[e.createElementVNode("header",B,[q,e.createElementVNode("button",{onClick:n[0]||(n[0]=t=>g()),class:"radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")]),e.createVNode(w.default,{title:"Добавить участника",onClosePopup:i,isPopupOpen:c.value,class:"w-max-40r"},{default:e.withCtx(()=>[e.createVNode(N.default,{title:"Add tickets",placeholder:"No parameters added yet",actions:[{label:"+",function:()=>s.value.push({name:"",value:"",target:e.unref(o)._id,type:"event"})}],class:"cols-1 mn-b-thin gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:a},[e.createVNode(f.default,{field:t.name,"onUpdate:field":r=>t.name=r,placeholder:"Name",class:"w-30 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(f.default,{field:t.email,"onUpdate:field":r=>t.email=r,placeholder:"Email",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),a>0?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:()=>s.value.splice(a,1),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},[e.createVNode(V.default,{class:"i-medium"})],8,C)):e.createCommentVNode("",!0)]))),128)),e.createVNode(h.default,{submit:d,callback:i,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Create Tickets ")]),_:1})]),_:1},8,["actions"])]),_:1},8,["isPopupOpen"]),e.createVNode(b.default,{states:{empty:{title:"No Tickets Found",description:"Currently, there are no tickets."}},store:{read:t=>k.actions.read(t),state:null},options:{target:e.unref(o)._id}},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,(a,r)=>{var p,m;return e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("img",{src:a.image,class:"radius-small h-5r w-5r"},null,8,P),e.createElementVNode("div",S,[e.createElementVNode("p",D,e.toDisplayString(((p=a.client_refactor)==null?void 0:p.name)||"No name")+", "+e.toDisplayString(a.role),1),e.createElementVNode("p",F,e.toDisplayString(((m=a.client_refactor)==null?void 0:m.email)||"No email"),1),e.createElementVNode("span",O,e.toDisplayString(a.status),1)]),e.createVNode(h.default,{submit:d,callback:l.redirectTo,class:"w-min h-min mn-l-auto bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Deactivate ")]),_:1},8,["callback"])])}),256))]),_:1},8,["states","store","options"])])):e.createCommentVNode("",!0)}};exports.default=U;
|
@@ -0,0 +1,168 @@
|
|
1
|
+
import { ref as f, onMounted as U, unref as _, openBlock as i, createElementBlock as n, createElementVNode as s, createVNode as a, withCtx as d, Fragment as w, renderList as x, createCommentVNode as y, createTextVNode as T, toDisplayString as p } from "vue";
|
2
|
+
import V from "../../../../components/Feed/Feed.vue.js";
|
3
|
+
import F from "../../../../components/Block/Block.vue.js";
|
4
|
+
import O from "../../../../components/Popup/Popup.vue2.js";
|
5
|
+
import N from "../../../../components/Field/Field.vue.js";
|
6
|
+
import C from "../../../../components/Button/Button.vue.js";
|
7
|
+
import B from "../../../icons/navigation/IconDelete.vue.js";
|
8
|
+
import { useRoute as D, useRouter as R } from "vue-router";
|
9
|
+
import { read as S } from "../../store/events.js";
|
10
|
+
import { state as A } from "../../../auth/store/auth.js";
|
11
|
+
import "../../../organizations/store/organizations.js";
|
12
|
+
import { actions as P } from "../../store/tickets.js";
|
13
|
+
import "./EditEventTickets.vue2.js";
|
14
|
+
const L = {
|
15
|
+
key: 0,
|
16
|
+
class: "h-100 pd-thin"
|
17
|
+
}, M = { class: "mn-b-medium flex-v-center flex-nowrap flex" }, j = /* @__PURE__ */ s("h2", { class: "mn-r-medium" }, "Tickets", -1), q = ["onClick"], z = { class: "radius-big bg-grey gap-small pd-small flex-nowrap flex pos-relative mn-b-thin" }, G = ["src"], H = { class: "" }, I = { class: "h4" }, J = { class: "h5 t-transp mn-b-thin" }, K = { class: "pd-r-thin pd-l-thin pd-b-nano pd-t-nano bg-second radius-extra t-white t-medium d-block w-max uppercase" }, ce = {
|
18
|
+
__name: "EditEventTickets",
|
19
|
+
setup(Q) {
|
20
|
+
var v;
|
21
|
+
const $ = D();
|
22
|
+
R();
|
23
|
+
let o = f(null);
|
24
|
+
const r = f([{
|
25
|
+
name: "",
|
26
|
+
email: "",
|
27
|
+
target: (v = o.value) == null ? void 0 : v._id,
|
28
|
+
type: "event"
|
29
|
+
}]), u = f(!1);
|
30
|
+
function E(l) {
|
31
|
+
var c;
|
32
|
+
u.value = !0, r.value = [{
|
33
|
+
name: "",
|
34
|
+
email: "",
|
35
|
+
target: (c = o.value) == null ? void 0 : c._id,
|
36
|
+
type: "event"
|
37
|
+
}];
|
38
|
+
}
|
39
|
+
function h() {
|
40
|
+
u.value = !1;
|
41
|
+
}
|
42
|
+
U(async () => {
|
43
|
+
const l = await S({ user: A.user._id, url: $.params.url });
|
44
|
+
o.value = l.pop();
|
45
|
+
});
|
46
|
+
async function b() {
|
47
|
+
try {
|
48
|
+
const l = await P.create(r.value);
|
49
|
+
} catch (l) {
|
50
|
+
console.log(l);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
return (l, c) => _(o) ? (i(), n("article", L, [
|
54
|
+
s("header", M, [
|
55
|
+
j,
|
56
|
+
s("button", {
|
57
|
+
onClick: c[0] || (c[0] = (e) => E()),
|
58
|
+
class: "radius-100 i-big hover-scale-1 cursor-pointer t-white bg-second"
|
59
|
+
}, " + ")
|
60
|
+
]),
|
61
|
+
a(O, {
|
62
|
+
title: "Добавить участника",
|
63
|
+
onClosePopup: h,
|
64
|
+
isPopupOpen: u.value,
|
65
|
+
class: "w-max-40r"
|
66
|
+
}, {
|
67
|
+
default: d(() => [
|
68
|
+
a(F, {
|
69
|
+
title: "Add tickets",
|
70
|
+
placeholder: "No parameters added yet",
|
71
|
+
actions: [{
|
72
|
+
label: "+",
|
73
|
+
function: () => r.value.push({ name: "", value: "", target: _(o)._id, type: "event" })
|
74
|
+
}],
|
75
|
+
class: "cols-1 mn-b-thin gap-thin"
|
76
|
+
}, {
|
77
|
+
default: d(() => [
|
78
|
+
(i(!0), n(w, null, x(r.value, (e, t) => (i(), n("div", {
|
79
|
+
class: "gap-thin flex-nowrap flex",
|
80
|
+
key: t
|
81
|
+
}, [
|
82
|
+
a(N, {
|
83
|
+
field: e.name,
|
84
|
+
"onUpdate:field": (m) => e.name = m,
|
85
|
+
placeholder: "Name",
|
86
|
+
class: "w-30 bg-white radius-small pd-medium"
|
87
|
+
}, null, 8, ["field", "onUpdate:field"]),
|
88
|
+
a(N, {
|
89
|
+
field: e.email,
|
90
|
+
"onUpdate:field": (m) => e.email = m,
|
91
|
+
placeholder: "Email",
|
92
|
+
class: "w-100 bg-white radius-small pd-medium"
|
93
|
+
}, null, 8, ["field", "onUpdate:field"]),
|
94
|
+
t > 0 ? (i(), n("div", {
|
95
|
+
key: 0,
|
96
|
+
onClick: () => r.value.splice(t, 1),
|
97
|
+
class: "radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"
|
98
|
+
}, [
|
99
|
+
a(B, { class: "i-medium" })
|
100
|
+
], 8, q)) : y("", !0)
|
101
|
+
]))), 128)),
|
102
|
+
a(C, {
|
103
|
+
submit: b,
|
104
|
+
callback: h,
|
105
|
+
class: "w-100 bg-black t-white"
|
106
|
+
}, {
|
107
|
+
default: d(() => [
|
108
|
+
T(" Create Tickets ")
|
109
|
+
]),
|
110
|
+
_: 1
|
111
|
+
})
|
112
|
+
]),
|
113
|
+
_: 1
|
114
|
+
}, 8, ["actions"])
|
115
|
+
]),
|
116
|
+
_: 1
|
117
|
+
}, 8, ["isPopupOpen"]),
|
118
|
+
a(V, {
|
119
|
+
states: {
|
120
|
+
empty: {
|
121
|
+
title: "No Tickets Found",
|
122
|
+
description: "Currently, there are no tickets."
|
123
|
+
}
|
124
|
+
},
|
125
|
+
store: {
|
126
|
+
read: (e) => P.read(e),
|
127
|
+
state: null
|
128
|
+
},
|
129
|
+
options: {
|
130
|
+
target: _(o)._id
|
131
|
+
}
|
132
|
+
}, {
|
133
|
+
default: d(({
|
134
|
+
items: e
|
135
|
+
}) => [
|
136
|
+
(i(!0), n(w, null, x(e, (t, m) => {
|
137
|
+
var g, k;
|
138
|
+
return i(), n("div", z, [
|
139
|
+
s("img", {
|
140
|
+
src: t.image,
|
141
|
+
class: "radius-small h-5r w-5r"
|
142
|
+
}, null, 8, G),
|
143
|
+
s("div", H, [
|
144
|
+
s("p", I, p(((g = t.client_refactor) == null ? void 0 : g.name) || "No name") + ", " + p(t.role), 1),
|
145
|
+
s("p", J, p(((k = t.client_refactor) == null ? void 0 : k.email) || "No email"), 1),
|
146
|
+
s("span", K, p(t.status), 1)
|
147
|
+
]),
|
148
|
+
a(C, {
|
149
|
+
submit: b,
|
150
|
+
callback: l.redirectTo,
|
151
|
+
class: "w-min h-min mn-l-auto bg-black t-white"
|
152
|
+
}, {
|
153
|
+
default: d(() => [
|
154
|
+
T(" Deactivate ")
|
155
|
+
]),
|
156
|
+
_: 1
|
157
|
+
}, 8, ["callback"])
|
158
|
+
]);
|
159
|
+
}), 256))
|
160
|
+
]),
|
161
|
+
_: 1
|
162
|
+
}, 8, ["states", "store", "options"])
|
163
|
+
])) : y("", !0);
|
164
|
+
}
|
165
|
+
};
|
166
|
+
export {
|
167
|
+
ce as default
|
168
|
+
};
|
package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue2.cjs
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";
|
package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue2.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -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"),m=require("../sections/HeroEvent.vue.cjs"),g=require("../sections/SectionMainGuest.vue.cjs"),k=require("../sections/SectionSpecialGuests.vue.cjs"),D=require("../sections/SectionLineup.vue.cjs"),y=require("../sections/SectionPreviousEvents.vue.cjs"),f=require("../blocks/CardEvent.vue.cjs"),T=require("../../../icons/skeletons/SkeletonEvent.vue.cjs"),B=require("../elements/ButtonJoin.vue.cjs"),h=require("../../../community/components/sections/Comments.vue.cjs"),C=require("../../../constructor/components/elements/Image.vue.cjs"),b=require("../../store/events.cjs"),_=require("../../store/tickets.cjs"),u=require("../../../auth/store/auth.cjs"),N=require("vue-router"),V={class:"pd-thin"},q=e.createElementVNode("h2",{class:"mn-b-big w-100 t-center"},"Event Details",-1),E={__name:"Event",setup(x){const s=N.useRoute(),r=e.ref(null),c=({ticket:a,hasTicket:o,targetId:n})=>{_.mutations.handleTicketUpdate(t.value,a,o,n),console.log("HANDLE TICKET UPDATE",a,t.value),r.value=a.qrcode},p={Textarea:"p",H2:"h2",Bullets:"p",Caption:"p",ImageUpload:C.default};function v(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 b.read({user:u.state.user._id,url:s.params.url});t.value=a[0],l.value=!1}),(a,o)=>(e.openBlock(),e.createElementBlock("section",V,[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(T.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(m.default,{key:0,content:{title:t.value.name,description:t.value.description,ticketLinkStripe:t.value.specialData.ticketLinkStripe,ticketText:t.value.specialData.ticketText,cover:t.value.cover,subtitle:t.value.specialData.subtitle,logos:t.value.specialData.logos,video:t.value.specialData.video,ticketTextButton:t.value.specialData.ticketTextButton},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(g.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,youtube:t.value.specialData.guestYoutube},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-size: 100%; background-repeat: no-repeat;
|
3
3
|
background-image: url(${t.value.specialData.lineupBackground});
|
4
|
-
`),class:"mn-b-thin t-white gap-big w-100 h-max o-hidden radius-big pd-big pos-relative bg-black"},[
|
4
|
+
`),class:"mn-b-thin t-white gap-big w-100 h-max o-hidden radius-big pd-big pos-relative bg-black"},[q,e.createElementVNode("div",{class:e.normalizeClass(["gap-big mn-b-thin",{"cols-2":t.value.specialData.guests.length>0,"cols-1":t.value.specialData.guests.length>1}])},[t.value.specialData.guests.length>0?(e.openBlock(),e.createBlock(k.default,{key:0,content:{title:"Special Guests",guests:t.value.specialData.guests}},null,8,["content"])):e.createCommentVNode("",!0),e.createVNode(D.default,{content:{title:"Lineup",lineup:t.value.specialData.lineup}},null,8,["content"])],2),e.createVNode(y.default,{content:{ticket:t.value.specialData.ticketImage,ticketTextButton:t.value.specialData.ticketTextButton,paymentText:t.value.specialData.paymentText,paymentContact:t.value.specialData.paymentContact,previousTitle:t.value.specialData.previousTitle,previousDescription:t.value.specialData.previousDescription,previousLink:t.value.specialData.previousLink,previousLinkText:t.value.specialData.previousLinkText},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:o[0]||(o[0]=n=>a.$router.push({name:"Event",params:{url:t.value.url}})),event:t.value,owner:t.value.owner,user:u.state.user._id,type:"normal",class:"mn-b-medium bg-grey radius-big"},{default:e.withCtx(()=>[u.state.user._id?(e.openBlock(),e.createBlock(B.default,{key:0,type:"event",hasTicket:t.value.hasTicket,targetId:t.value._id,userId:u.state.user._id,class:"mn-b-small w-100 pd-medium mn-auto",onUpdateTicket:c},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,i)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p[n.type]),e.mergeProps({key:i,index:i,component:n,prop:n,class:n.class,content:"content"},v(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(h.default,{key:4,type:"event",target:t.value._id,owner:u.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=E;
|
@@ -1,54 +1,54 @@
|
|
1
|
-
import { ref as
|
1
|
+
import { ref as v, onMounted as b, openBlock as a, createElementBlock as c, createVNode as u, TransitionGroup as g, withCtx as p, Fragment as f, renderList as k, createCommentVNode as n, Transition as x, createBlock as s, normalizeStyle as L, createElementVNode as m, normalizeClass as w, resolveDynamicComponent as C, mergeProps as B } from "vue";
|
2
2
|
import "../../../../components/Loader/Loader.vue.js";
|
3
|
-
import
|
3
|
+
import E from "../../../../components/EmptyState/EmptyState.vue.js";
|
4
4
|
import $ from "../sections/HeroEvent.vue.js";
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
5
|
+
import I from "../sections/SectionMainGuest.vue.js";
|
6
|
+
import S from "../sections/SectionSpecialGuests.vue.js";
|
7
|
+
import H from "../sections/SectionLineup.vue.js";
|
8
|
+
import U from "../sections/SectionPreviousEvents.vue.js";
|
9
9
|
import M from "../blocks/CardEvent.vue.js";
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import
|
13
|
-
import
|
14
|
-
import { read as
|
15
|
-
import { mutations as
|
10
|
+
import N from "../../../icons/skeletons/SkeletonEvent.vue.js";
|
11
|
+
import P from "../elements/ButtonJoin.vue.js";
|
12
|
+
import V from "../../../community/components/sections/Comments.vue.js";
|
13
|
+
import z from "../../../constructor/components/elements/Image.vue.js";
|
14
|
+
import { read as F } from "../../store/events.js";
|
15
|
+
import { mutations as q } from "../../store/tickets.js";
|
16
16
|
import { state as o } from "../../../auth/store/auth.js";
|
17
|
-
import { useRoute as
|
18
|
-
const
|
17
|
+
import { useRoute as A } from "vue-router";
|
18
|
+
const G = { class: "pd-thin" }, J = /* @__PURE__ */ m("h2", { class: "mn-b-big w-100 t-center" }, "Event Details", -1), re = {
|
19
19
|
__name: "Event",
|
20
|
-
setup(
|
21
|
-
const D =
|
22
|
-
|
23
|
-
},
|
20
|
+
setup(K) {
|
21
|
+
const D = A(), _ = v(null), y = ({ ticket: t, hasTicket: r, targetId: i }) => {
|
22
|
+
q.handleTicketUpdate(e.value, t, r, i), console.log("HANDLE TICKET UPDATE", t, e.value), _.value = t.qrcode;
|
23
|
+
}, T = {
|
24
24
|
Textarea: "p",
|
25
25
|
H2: "h2",
|
26
26
|
Bullets: "p",
|
27
27
|
Caption: "p",
|
28
|
-
ImageUpload:
|
28
|
+
ImageUpload: z
|
29
29
|
};
|
30
|
-
function
|
30
|
+
function h(t) {
|
31
31
|
return t.type === "Textarea" ? { innerHTML: t.content, class: "p-medium" } : t.type === "H2" ? { innerHTML: t.content, class: "h3" } : t.type === "Caption" ? { innerHTML: t.content } : t.type === "ImageUpload" ? { src: t.content } : {};
|
32
32
|
}
|
33
|
-
const e =
|
34
|
-
return
|
33
|
+
const e = v(null), l = v(!0);
|
34
|
+
return b(async () => {
|
35
35
|
l.value = !0;
|
36
|
-
const t = await
|
36
|
+
const t = await F({ user: o.user._id, url: D.params.url });
|
37
37
|
e.value = t[0], l.value = !1;
|
38
|
-
}), (t, r) => (a(), c("section",
|
38
|
+
}), (t, r) => (a(), c("section", G, [
|
39
39
|
u(g, {
|
40
40
|
tag: "ul",
|
41
41
|
name: "fade",
|
42
42
|
class: "o-hidden bg-grey radius-big"
|
43
43
|
}, {
|
44
44
|
default: p(() => [
|
45
|
-
l.value ? (a(), c(f, { key: 0 }, k(3, (i) => u(
|
45
|
+
l.value ? (a(), c(f, { key: 0 }, k(3, (i) => u(N, { key: i })), 64)) : n("", !0)
|
46
46
|
]),
|
47
47
|
_: 1
|
48
48
|
}),
|
49
|
-
u(
|
49
|
+
u(x, { name: "fade" }, {
|
50
50
|
default: p(() => [
|
51
|
-
!l.value && !e.value ? (a(), s(
|
51
|
+
!l.value && !e.value ? (a(), s(E, {
|
52
52
|
key: 0,
|
53
53
|
title: "No Event Found",
|
54
54
|
description: "Currently, there are no events available. Please check back later.",
|
@@ -82,7 +82,7 @@ const J = { class: "pd-thin" }, R = /* @__PURE__ */ v("h2", { class: "mn-b-big w
|
|
82
82
|
},
|
83
83
|
class: "mn-b-thin"
|
84
84
|
}, null, 8, ["content", "options"])) : n("", !0),
|
85
|
-
!l.value && e.value && e.value.special ? (a(), s(
|
85
|
+
!l.value && e.value && e.value.special ? (a(), s(I, {
|
86
86
|
key: 1,
|
87
87
|
content: {
|
88
88
|
title: e.value.specialData.guestTitle,
|
@@ -102,34 +102,34 @@ const J = { class: "pd-thin" }, R = /* @__PURE__ */ v("h2", { class: "mn-b-big w
|
|
102
102
|
}, null, 8, ["content"])) : n("", !0),
|
103
103
|
!l.value && e.value && e.value.special ? (a(), c("section", {
|
104
104
|
key: 2,
|
105
|
-
style:
|
105
|
+
style: L(`
|
106
106
|
background-size: 100%; background-repeat: no-repeat;
|
107
107
|
background-image: url(${e.value.specialData.lineupBackground});
|
108
108
|
`),
|
109
109
|
class: "mn-b-thin t-white gap-big w-100 h-max o-hidden radius-big pd-big pos-relative bg-black"
|
110
110
|
}, [
|
111
|
-
|
112
|
-
|
111
|
+
J,
|
112
|
+
m("div", {
|
113
113
|
class: w(["gap-big mn-b-thin", {
|
114
114
|
"cols-2": e.value.specialData.guests.length > 0,
|
115
115
|
"cols-1": e.value.specialData.guests.length > 1
|
116
116
|
}])
|
117
117
|
}, [
|
118
|
-
e.value.specialData.guests.length > 0 ? (a(), s(
|
118
|
+
e.value.specialData.guests.length > 0 ? (a(), s(S, {
|
119
119
|
key: 0,
|
120
120
|
content: {
|
121
121
|
title: "Special Guests",
|
122
122
|
guests: e.value.specialData.guests
|
123
123
|
}
|
124
124
|
}, null, 8, ["content"])) : n("", !0),
|
125
|
-
u(
|
125
|
+
u(H, {
|
126
126
|
content: {
|
127
127
|
title: "Lineup",
|
128
128
|
lineup: e.value.specialData.lineup
|
129
129
|
}
|
130
130
|
}, null, 8, ["content"])
|
131
131
|
], 2),
|
132
|
-
u(
|
132
|
+
u(U, {
|
133
133
|
content: {
|
134
134
|
ticket: e.value.specialData.ticketImage,
|
135
135
|
ticketTextButton: e.value.specialData.ticketTextButton,
|
@@ -156,29 +156,29 @@ const J = { class: "pd-thin" }, R = /* @__PURE__ */ v("h2", { class: "mn-b-big w
|
|
156
156
|
class: "mn-b-medium bg-grey radius-big"
|
157
157
|
}, {
|
158
158
|
default: p(() => [
|
159
|
-
o.user._id ? (a(), s(
|
159
|
+
o.user._id ? (a(), s(P, {
|
160
160
|
key: 0,
|
161
161
|
type: "event",
|
162
162
|
hasTicket: e.value.hasTicket,
|
163
163
|
targetId: e.value._id,
|
164
164
|
userId: o.user._id,
|
165
165
|
class: "mn-b-small w-100 pd-medium mn-auto",
|
166
|
-
onUpdateTicket:
|
166
|
+
onUpdateTicket: y
|
167
167
|
}, null, 8, ["hasTicket", "targetId", "userId"])) : n("", !0),
|
168
|
-
|
169
|
-
e.value && e.value.content ? (a(!0), c(f, { key: 0 }, k(e.value.content, (i,
|
170
|
-
key:
|
171
|
-
index:
|
168
|
+
m("section", null, [
|
169
|
+
e.value && e.value.content ? (a(!0), c(f, { key: 0 }, k(e.value.content, (i, d) => (a(), s(C(T[i.type]), B({
|
170
|
+
key: d,
|
171
|
+
index: d,
|
172
172
|
component: i,
|
173
173
|
prop: i,
|
174
174
|
class: i.class,
|
175
175
|
content: "content"
|
176
|
-
},
|
176
|
+
}, h(i), { class: "mn-b-regular" }), null, 16, ["index", "component", "prop", "class"]))), 128)) : n("", !0)
|
177
177
|
])
|
178
178
|
]),
|
179
179
|
_: 1
|
180
180
|
}, 8, ["event", "owner", "user"])) : n("", !0),
|
181
|
-
!l.value && e.value && !e.value.special ? (a(), s(
|
181
|
+
!l.value && e.value && !e.value.special ? (a(), s(V, {
|
182
182
|
key: 4,
|
183
183
|
type: "event",
|
184
184
|
target: e.value._id,
|
@@ -191,5 +191,5 @@ const J = { class: "pd-thin" }, R = /* @__PURE__ */ v("h2", { class: "mn-b-big w
|
|
191
191
|
}
|
192
192
|
};
|
193
193
|
export {
|
194
|
-
|
194
|
+
re as default
|
195
195
|
};
|
@@ -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/Chips/Chips.vue2.cjs");require("../../../../components/Popup/Popup.
|
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/Chips/Chips.vue2.cjs");require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/Button/Button.vue2.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;
|
@@ -6,9 +6,9 @@ import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
|
|
6
6
|
import s from "../sections/Feed.vue.js";
|
7
7
|
import "../../../../components/Loader/Loader.vue.js";
|
8
8
|
import "../../../../components/Chips/Chips.vue2.js";
|
9
|
-
import "../../../../components/Popup/Popup.
|
9
|
+
import "../../../../components/Popup/Popup.vue.js";
|
10
10
|
import "../../../../components/Button/Button.vue2.js";
|
11
|
-
import "../../../../components/Select/Select.
|
11
|
+
import "../../../../components/Select/Select.vue.js";
|
12
12
|
import "../../../reports/store/reports.js";
|
13
13
|
import "../../../../components/Dropdown/Dropdown.vue2.js";
|
14
14
|
import { state as a } from "../../../auth/store/auth.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../components/layouts/layoutEvents.vue.cjs");require("../../auth/store/auth.cjs");const t=[{path:"events",component:e.default,meta:{title:{en:"Events",ru:"События"},title_hide:!0},children:[{path:":category?",name:"Events",meta:{title:{en:"Events",ru:"События"},title_hide:!0},component:()=>Promise.resolve().then(()=>require("../components/pages/Events.vue.cjs"))}]},{path:"events/create",name:"Create Event",meta:{title:{en:"Create Event",ru:"Создать Событие"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../components/pages/EditEvent.vue.cjs"))},{path:"events/:url",name:"Event",meta:{title:{en:"Event",ru:"Событие"}},component:()=>Promise.resolve().then(()=>require("../components/pages/Event.vue.cjs"))},{path:"events/:url/edit",name:"Edit Event",meta:{authorize:[]},component:()=>Promise.resolve().then(()=>require("../components/pages/EditEvent.vue.cjs"))}];exports.default=t;
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../components/layouts/layoutEvents.vue.cjs");require("../../auth/store/auth.cjs");const t=[{path:"events",component:e.default,meta:{title:{en:"Events",ru:"События"},title_hide:!0},children:[{path:":category?",name:"Events",meta:{title:{en:"Events",ru:"События"},title_hide:!0},component:()=>Promise.resolve().then(()=>require("../components/pages/Events.vue.cjs"))}]},{path:"events/create",name:"Create Event",meta:{title:{en:"Create Event",ru:"Создать Событие"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../components/pages/EditEvent.vue.cjs"))},{path:"events/:url",name:"Event",meta:{title:{en:"Event",ru:"Событие"}},component:()=>Promise.resolve().then(()=>require("../components/pages/Event.vue.cjs"))},{path:"events/:url/edit",name:"Edit Event",meta:{authorize:[]},component:()=>Promise.resolve().then(()=>require("../components/pages/EditEvent.vue.cjs"))},{path:"events/:url/edit/tickets",name:"Edit Event Tickets",meta:{authorize:[]},component:()=>Promise.resolve().then(()=>require("../components/pages/EditEventTickets.vue.cjs"))}];exports.default=t;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import
|
1
|
+
import t from "../components/layouts/layoutEvents.vue.js";
|
2
2
|
import "../../auth/store/auth.js";
|
3
3
|
const a = [
|
4
4
|
{
|
5
5
|
path: "events",
|
6
|
-
component:
|
6
|
+
component: t,
|
7
7
|
meta: {
|
8
8
|
title: {
|
9
9
|
en: "Events",
|
@@ -64,6 +64,15 @@ const a = [
|
|
64
64
|
/* webpackChunkName: 'EditEvent' */
|
65
65
|
"../components/pages/EditEvent.vue.js"
|
66
66
|
)
|
67
|
+
},
|
68
|
+
{
|
69
|
+
path: "events/:url/edit/tickets",
|
70
|
+
name: "Edit Event Tickets",
|
71
|
+
meta: { authorize: [] },
|
72
|
+
component: () => import(
|
73
|
+
/* webpackChunkName: 'EditEvent' */
|
74
|
+
"../components/pages/EditEventTickets.vue.js"
|
75
|
+
)
|
67
76
|
}
|
68
77
|
];
|
69
78
|
export {
|
package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),I=require("../../../../components/Field/Field.vue.cjs"),q=require("../../../../components/Button/Button.vue.cjs"),M=require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),I=require("../../../../components/Field/Field.vue.cjs"),q=require("../../../../components/Button/Button.vue.cjs"),M=require("../../../../components/Select/Select.vue2.cjs"),s=require("../../store/gallery.cjs"),P=require("../../../../components/EditImages/EditImages.vue.cjs");require("./BackofficeGallery.vue2.cjs");const j=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),c=i=>(e.pushScopeId("data-v-c506f5e5"),i=i(),e.popScopeId(),i),G={class:"pos-relative w-100"},D={class:"mn-b-semi flex-v-center flex-nowrap flex"},T=c(()=>e.createElementVNode("h1",{class:"mn-r-small"},"Manage Gallery",-1)),U=["data-id"],$=["src","onClick"],F={key:1,class:"radius-small bg-white"},O=["src","onClick"],L={class:"t-black p-small mn-b-thin"},A=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Size",-1)),H=c(()=>e.createElementVNode("br",null,null,-1)),R={class:"pd-2px radius-big d-inline-block bg-grey"},J={class:"t-black p-small mn-b-small uppe"},K=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Categories",-1)),Q=c(()=>e.createElementVNode("br",null,null,-1)),W={class:"pd-2px radius-big d-inline-block bg-grey t-semi"},X={class:"flex-nowrap flex"},Y=["onClick"],Z={class:"modal pd-thin"},ee={class:"modal-content radius-big"},te={class:""},le=["src"],oe={key:0,class:"flex-v-center flex m modal pd-big"},ae={class:"modal-content radius-small pd-medium bg-white"},se=["src"],ne=["src"],y=10,ce={__name:"BackofficeGallery",setup(i){const r=e.ref(!0),h=e.ref(null);let v=1,f=e.ref(null),_=e.ref(!1);const d=e.ref([]),E=o=>{d.value=o},w=e.computed(()=>k.value==="all"?s.state.gallery:s.state.gallery.filter(o=>o.categories.includes(k.value))),V=async()=>{_.value=!0,await s.actions.fetchGallery(v,y),_.value=!1},u=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),m=e.ref(null),g=o=>{console.log(r.value),r.value?N(o):(u.value="modal",t.value.image=o,b())},N=o=>{u.value="edit-modal",t.value=o||{categories:"",size:"",image:null},b()},n=()=>{t.value={categories:"",size:"",image:!1},m.value=null,B()},b=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},B=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},C=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],x=async o=>{await s.actions.deletePhoto(o)},S=async()=>{await s.actions.updatePhoto(t.value),n()},z=async o=>{if(d.length<1||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({images:d.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(a=>a.trim()):t.value.categories}),n()};let k=e.ref("all");return e.onMounted(async()=>{await s.actions.fetchGallery(v,y),typeof window<"u"&&new IntersectionObserver(a=>{a.some(l=>l.isIntersecting)&&(v+=1,V())}).observe(f.value)}),(o,a)=>(e.openBlock(),e.createElementBlock("div",G,[e.createElementVNode("div",D,[T,r.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=l=>g(null)),class:"t-white t-black bg-second i-big radius-extra"},"+")):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:h,class:"cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.value,(l,re)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[!r.value&&h.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 h-100 o-hidden radius-medium object-fit-cover",onClick:p=>g(l.image)},null,8,$)):(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 radius-small mn-b-small h-10r object-fit-cover",onClick:p=>g(l)},null,8,O),e.createElementVNode("p",L,[A,H,e.createElementVNode("span",R,e.toDisplayString(l.size.name),1)]),e.createElementVNode("p",J,[K,Q,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.categories,p=>(e.openBlock(),e.createElementBlock("span",W,e.toDisplayString(p),1))),256))]),e.createElementVNode("div",X,[e.createElementVNode("button",{class:"button-small w-100 button",onClick:p=>x(l._id)},"Delete",8,Y)])]))]),_:2},1024)],8,U))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:f,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Z,[e.createElementVNode("div",ee,[e.createElementVNode("div",te,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,le)])])],512),[[e.vShow,t.value.image!==!1&&u.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&u.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",ae,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof m.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:m.value,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,se)):e.createCommentVNode("",!0),typeof m.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-b-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,ne)):e.createCommentVNode("",!0),e.createVNode(M.default,{options:C,label:"Size",select:t.value.size,"onUpdate:select":a[1]||(a[1]=l=>t.value.size=l),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-b-thin t-black"},null,8,["select"]),e.createVNode(I.default,{field:t.value.categories,"onUpdate:field":a[2]||(a[2]=l=>t.value.categories=l),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-b-medium t-black"},null,8,["field"]),e.createVNode(P.default,{images:d.value,"onUpdate:images":E,uploadPath:"photos",class:"mn-b-semi"},null,8,["images"]),e.createVNode(q.default,{submit:t.value._id?S:z,callback:n,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},ie=j.default(ce,[["__scopeId","data-v-c506f5e5"]]);exports.default=ie;
|
package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ref as n, computed as q, onMounted as A, openBlock as a, createElementBlock as o, createElementVNode as t, createCommentVNode as f, Fragment as E, renderList as M, createVNode as c, Transition as w, withCtx as b, toDisplayString as x, withDirectives as L, vShow as R, createTextVNode as H, pushScopeId as J, popScopeId as K } from "vue";
|
2
2
|
import Q from "../../../../components/Field/Field.vue.js";
|
3
3
|
import W from "../../../../components/Button/Button.vue.js";
|
4
|
-
import X from "../../../../components/Select/Select.
|
4
|
+
import X from "../../../../components/Select/Select.vue2.js";
|
5
5
|
import { state as G, actions as d } from "../../store/gallery.js";
|
6
6
|
import Y from "../../../../components/EditImages/EditImages.vue.js";
|
7
7
|
import "./BackofficeGallery.vue2.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),x=require("vue-router"),z=require("../../../../components/Field/Field.vue.cjs"),S=require("../../../../components/Button/Button.vue.cjs"),q=require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),x=require("vue-router"),z=require("../../../../components/Field/Field.vue.cjs"),S=require("../../../../components/Button/Button.vue.cjs"),q=require("../../../../components/Select/Select.vue2.cjs"),M=require("../../../../components/Upload/Upload.vue.cjs"),s=require("../../store/gallery.cjs");require("./GalleryWithCategories.vue2.cjs");const F=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),I={class:"pd-medium flex-v-center gap-big flex-nowrap flex pd-t-thin pd-b-thin o-scroll"},P=["onClick"],j=["data-id"],G=["src","onClick"],R={class:"modal pd-thin"},T={class:"modal-content radius-big"},U={class:""},D=["src"],L={key:0,class:"flex-v-center flex m modal pd-big"},O={class:"modal-content radius-small pd-medium bg-white"},$=["src"],A=["src"],W=!1,f=10,H={__name:"GalleryWithCategories",setup(K){x.useRoute();const m=e.ref(null),h=["all","place","drinks","people","events"];let d=1,v=e.ref(null),g=e.ref(!1);const _=e.computed(()=>r.value==="all"?s.state.gallery:s.state.gallery.filter(a=>a.categories.includes(r.value))),b=async()=>{g.value=!0,await s.actions.fetchGallery(d,f),g.value=!1},c=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),i=e.ref(null),k=a=>{W.value?y(a):(c.value="modal",t.value.image=a,p())},y=a=>{c.value="edit-modal",t.value=a||{categories:"",size:"",image:null},p()},n=()=>{t.value={categories:"",size:"",image:!1},i.value=null,w()},p=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},w=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},V=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],C=async()=>{await s.actions.updatePhoto(t.value),n()},E=a=>{const o=a.files;if(t.value.image=o,o&&o.length>0){const l=new FileReader;l.onload=u=>{i.value=u.target.result},l.readAsDataURL(o[0])}},N=async a=>{if(!t.value.image||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({...t.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(o=>o.trim()):t.value.categories}),n()};let r=e.ref("all");const B=a=>{r.value=a};return e.onMounted(async()=>{await s.actions.fetchGallery(d,f),typeof window<"u"&&new IntersectionObserver(o=>{o.some(l=>l.isIntersecting)&&(d+=1,b())}).observe(v.value)}),(a,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",I,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(h,l=>e.createElementVNode("a",{key:l,onClick:u=>B(l),class:e.normalizeClass(["h3 uppercase",{"t-transp":e.unref(r)!==l,"pd-thin bg-main radius-small":e.unref(r)===l}])},e.toDisplayString(a.$t("gallery.categories."+l)),11,P)),64)),e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:m,class:"pd-medium cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(l,u)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[m.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 h-100 o-hidden radius-big object-fit-cover",onClick:Q=>k(l.image)},null,8,G)):e.createCommentVNode("",!0)]),_:2},1024)],8,j))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:v,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",R,[e.createElementVNode("div",T,[e.createElementVNode("div",U,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,D)])])],512),[[e.vShow,t.value.image!==!1&&c.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&c.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("div",O,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof i.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:i.value,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,$)):e.createCommentVNode("",!0),typeof i.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-b-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,A)):e.createCommentVNode("",!0),t.value._id?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(M.default,{key:2,id:"photo",name:"photo",type:"file",class:"t-black bg-grey pd-thin radius-small mn-b-thin",onFileChange:E,multiple:"true"})),e.createVNode(q.default,{options:V,label:"Size",select:t.value.size,"onUpdate:select":o[1]||(o[1]=l=>t.value.size=l),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-b-thin t-black"},null,8,["select"]),e.createVNode(z.default,{field:t.value.categories,"onUpdate:field":o[2]||(o[2]=l=>t.value.categories=l),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-b-medium t-black"},null,8,["field"]),e.createVNode(S.default,{submit:t.value._id?C:N,callback:n,class:"mn-b-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},J=F.default(H,[["__scopeId","data-v-4c5bced8"]]);exports.default=J;
|
@@ -2,7 +2,7 @@ import { ref as n, computed as D, onMounted as A, openBlock as o, createElementB
|
|
2
2
|
import { useRoute as H } from "vue-router";
|
3
3
|
import J from "../../../../components/Field/Field.vue.js";
|
4
4
|
import K from "../../../../components/Button/Button.vue.js";
|
5
|
-
import Q from "../../../../components/Select/Select.
|
5
|
+
import Q from "../../../../components/Select/Select.vue2.js";
|
6
6
|
import X from "../../../../components/Upload/Upload.vue.js";
|
7
7
|
import { state as E, actions as g } from "../../store/gallery.js";
|
8
8
|
import "./GalleryWithCategories.vue2.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),B=require("vue-router"),E=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),p=require("../../../reports/components/sections/FormReport.vue.cjs"),V=require("../../../../components/Dropdown/Dropdown.vue.cjs");require("../../../../components/Button/Button.vue2.cjs");require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");const C=require("../../../icons/navigation/IconEllipsis.vue.cjs"),N={key:0,class:"pd-b-zero"},v={class:"w-100 flex-v-center flex-nojustify flex"},x={class:"w-100 flex-nowrap flex-v-center flex"},$=["src"],M={key:2,class:"t-semi"},R={key:1},S={key:2},q={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},D={key:0,class:"w-4r i-thin"},z={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"},P=["src"],F={class:"bg-black pd-thin radius-small"},U=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),L={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type"],setup(t){B.useRouter();function b(o){const r=new Date,d=new Date(o),u=Math.abs(r-d),m=Math.floor(u/1e3),n=Math.floor(m/60),a=Math.floor(n/60),i=Math.floor(a/24),s=Math.floor(i/7);return s>0?`${s} week${s>1?"s":""} ago`:i>0?`${i} day${i>1?"s":""} ago`:a>0?`${a} hour${a>1?"s":""} ago`:n>0?`${n} minute${n>1?"s":""} ago`:"Just now"}return(o,r)=>{var d,u,m,n,a,i,s,h,f,g,k,y,w;return t.owner?(e.openBlock(),e.createElementBlock("header",N,[e.createElementVNode("div",v,[e.createElementVNode("div",x,[((m=(u=(d=t.owner.target)==null?void 0:d.profile)==null?void 0:u.photo)==null?void 0:m.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 object-fit-cover mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(c=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,$)):e.createCommentVNode("",!0),!((a=(n=t.owner.target)==null?void 0:n.profile)!=null&&a.photo)&&t.type!=="short"?(e.openBlock(),e.createBlock(E.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(c=>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",M,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(c=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString((s=(i=t.owner.target)==null?void 0:i.profile)==null?void 0:s.name),1),!t.creator.hidden&&((f=(h=t.owner.target)==null?void 0:h.profile)==null?void 0:f.name)!==((k=(g=t.creator.target)==null?void 0:g.profile)==null?void 0:k.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(c=>{var l;return o.$router.push({name:"User Profile",params:{_id:(l=t.creator.target)==null?void 0:l._id}})},["stop"]))}," · by "+e.toDisplayString((w=(y=t.creator.target)==null?void 0:y.profile)==null?void 0:w.name),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",R," · "+e.toDisplayString(b(t.date)),1)):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",S," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",q,[t.members?(e.openBlock(),e.createElementBlock("div",D,[e.createElementVNode("span",z,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(c,l)=>(e.openBlock(),e.createElementBlock("img",{key:l,src:(o.FILE_SERVER_URL||"")+c,style:e.normalizeStyle({position:"absolute",top:"0px",right:l*20+20+"%",zIndex:1-l}),class:"br-solid br-2px br-white i-thin bg-grey radius-big"},null,12,P))),128))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user&&t.user!=t.creator.target._id?(e.openBlock(),e.createBlock(V.default,{key:3,label:{component:C.default,class:"t-transp i-regular"},align:"right",class:"cursor-pointer z-index-2"},{default:e.withCtx(()=>[e.createElementVNode("section",F,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(p.default,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[U]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}};exports.default=L;
|