@ozdao/prometheus-framework 0.2.189 → 0.2.191

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. package/dist/builder.js +1 -1
  2. package/dist/builder.mjs +1 -1
  3. package/dist/prometheus-framework/src/components/LocationSelection/LocationSelection.vue.cjs +1 -0
  4. package/dist/prometheus-framework/src/components/LocationSelection/LocationSelection.vue.js +96 -0
  5. package/dist/prometheus-framework/src/components/Sidebar/Sidebar.vue.cjs +1 -0
  6. package/dist/prometheus-framework/src/components/Sidebar/Sidebar.vue.js +74 -0
  7. package/dist/prometheus-framework/src/components/Status/Status.vue.cjs +1 -0
  8. package/dist/prometheus-framework/src/components/Status/Status.vue.js +29 -0
  9. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  11. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
  13. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
  15. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
  16. package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
  17. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
  18. package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
  19. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  21. package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/globals/globals.client.js +21 -18
  23. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js +85 -28
  25. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -0
  26. package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +166 -0
  27. package/dist/prometheus-framework/src/modules/globals/views/components/pages/401.vue.cjs +1 -0
  28. package/dist/prometheus-framework/src/modules/globals/views/components/pages/401.vue.js +10 -0
  29. package/dist/prometheus-framework/src/modules/globals/views/components/pages/404.vue.cjs +1 -0
  30. package/dist/prometheus-framework/src/modules/globals/views/components/pages/404.vue.js +10 -0
  31. package/dist/prometheus-framework/src/modules/globals/views/components/partials/BottomNavigation.vue.cjs +1 -0
  32. package/dist/prometheus-framework/src/modules/globals/views/components/partials/BottomNavigation.vue.js +157 -0
  33. package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.cjs +1 -0
  34. package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.js +96 -0
  35. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Navigation.vue.cjs +1 -0
  36. package/dist/prometheus-framework/src/modules/globals/views/components/partials/Navigation.vue.js +95 -0
  37. package/dist/prometheus-framework/src/modules/globals/views/components/sections/Walkthrough.vue.cjs +1 -0
  38. package/dist/prometheus-framework/src/modules/globals/views/components/sections/Walkthrough.vue.js +126 -0
  39. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
  41. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
  45. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
  47. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
  49. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  51. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
  55. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
  57. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
  59. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
  60. package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
  61. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  62. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
  63. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
  64. package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +1 -1
  65. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
  66. package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
  67. package/dist/style.css +1 -1
  68. package/package.json +1 -1
  69. package/src/builder/webpack/webpack.config.base.js +1 -1
  70. package/src/components/index.js +0 -1
  71. package/src/main.js +0 -3
  72. package/src/modules/globals/globals.client.js +9 -4
  73. package/src/modules/globals/views/components/layouts/App.vue +65 -6
  74. package/src/modules/globals/views/components/layouts/Client.vue +26 -93
  75. package/src/modules/globals/views/components/partials/BottomNavigation.vue +0 -2
  76. package/src/modules/globals/views/components/partials/Header.vue +14 -10
  77. package/src/{components/LocationSelection → modules/globals/views/components/partials}/LocationSelection.vue +5 -6
  78. package/src/modules/globals/views/components/partials/Navigation.vue +4 -4
  79. package/src/modules/globals/views/components/sections/Walkthrough.vue +6 -6
package/dist/builder.js CHANGED
@@ -558,7 +558,7 @@ var webpack_config_base = (projectRoot) => {
558
558
  __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: true,
559
559
  __VUE_I18N_FULL_INSTALL__: true,
560
560
  __INTLIFY_PROD_DEVTOOLS__: false,
561
- __MOBILE_APP__: false
561
+ __MOBILE_APP__: true
562
562
  })
563
563
  ],
564
564
  infrastructureLogging: {
package/dist/builder.mjs CHANGED
@@ -535,7 +535,7 @@ var webpack_config_base = (projectRoot) => {
535
535
  __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: true,
536
536
  __VUE_I18N_FULL_INSTALL__: true,
537
537
  __INTLIFY_PROD_DEVTOOLS__: false,
538
- __MOBILE_APP__: false
538
+ __MOBILE_APP__: true
539
539
  })
540
540
  ],
541
541
  infrastructureLogging: {
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("vue"),d=require("../Address/Address.vue.cjs"),p=require("../LocationMarker/LocationMarker.vue.cjs"),i=require("vue-router"),c=require("vue-i18n"),l=require("../../modules/globals/views/store/globals.cjs"),m={class:"t-center flex-center"},v=s.createElementVNode("p",{class:"h1 mn-b-medium"},"🌍",-1),y={class:"mn-b-semi"},b={class:"mn-b-small t-transp p-medium"},f={__name:"LocationSelection",setup(g){i.useRoute(),i.useRouter();const o=s.ref({country:null,state:null,city:null,address:null,location:null});function r(){l.state.position={...o.value},l.state.isOpenLocationPopup=!1,localStorage.setItem("position",JSON.stringify(l.state.position))}s.onMounted(()=>{o.value={...l.state.position}});const u={messages:{en:{title:"Choose Your Location",description:"Enter your address or select it on the map to see the nearest offers to you."},ru:{title:"Выбор Локации",description:"Пожалуйста, выберите вашу страну из списка ниже, чтобы увидеть варианты доставки и другую актуальную информацию:"}}},{t:a}=c.useI18n(u);return(n,e)=>(s.openBlock(),s.createElementBlock("div",m,[v,s.createElementVNode("h3",y,s.toDisplayString(s.unref(a)("title")),1),s.createElementVNode("p",b,s.toDisplayString(s.unref(a)("description")),1),(s.openBlock(),s.createBlock(d.default,{key:n.$i18n.locale,apiKey:n.GOOGLE_MAPS_API_KEY,locale:n.$i18n.locale,address:o.value.address,location:o.value.location,placeholder:"Enter your address",class:"bg-white radius-tl-medium radius-tr-medium t-black br-grey-transp-25 br-solid br-2px pd-medium","onUpdate:country":e[0]||(e[0]=t=>{o.value.country=t}),"onUpdate:state":e[1]||(e[1]=t=>{o.value.state=t}),"onUpdate:city":e[2]||(e[2]=t=>{o.value.city=t}),"onUpdate:location":e[3]||(e[3]=t=>{o.value.location=t}),"onUpdate:address":e[4]||(e[4]=t=>{o.value.address=t})},null,8,["apiKey","locale","address","location"])),(s.openBlock(),s.createBlock(p.default,{key:n.$i18n.locale,apiKey:n.GOOGLE_MAPS_API_KEY,locale:n.$i18n.locale,address:o.value.address,location:o.value.location,class:"bg-light radius-bl-medium radius-br-medium h-15r o-hidden","onUpdate:country":e[5]||(e[5]=t=>{o.value.country=t}),"onUpdate:state":e[6]||(e[6]=t=>{o.value.state=t}),"onUpdate:city":e[7]||(e[7]=t=>{o.value.city=t}),"onUpdate:location":e[8]||(e[8]=t=>{o.value.location=t}),"onUpdate:address":e[9]||(e[9]=t=>{o.value.address=t})},null,8,["apiKey","locale","address","location"])),s.createElementVNode("button",{onClick:e[10]||(e[10]=t=>r()),class:"w-100 mn-t-medium bg-main radius-extra button"},"Save Position")]))}};exports.default=f;
@@ -0,0 +1,96 @@
1
+ import { ref as y, onMounted as c, openBlock as l, createElementBlock as v, createElementVNode as i, toDisplayString as r, unref as d, createBlock as u } from "vue";
2
+ import f from "../Address/Address.vue.js";
3
+ import b from "../LocationMarker/LocationMarker.vue.js";
4
+ import { useRoute as U, useRouter as g } from "vue-router";
5
+ import { useI18n as E } from "vue-i18n";
6
+ import { state as n } from "../../modules/globals/views/store/globals.js";
7
+ const k = { class: "t-center flex-center" }, P = /* @__PURE__ */ i("p", { class: "h1 mn-b-medium" }, "🌍", -1), S = { class: "mn-b-semi" }, $ = { class: "mn-b-small t-transp p-medium" }, M = {
8
+ __name: "LocationSelection",
9
+ setup(K) {
10
+ U(), g();
11
+ const e = y({
12
+ country: null,
13
+ state: null,
14
+ city: null,
15
+ address: null,
16
+ location: null
17
+ });
18
+ function p() {
19
+ n.position = { ...e.value }, n.isOpenLocationPopup = !1, localStorage.setItem("position", JSON.stringify(n.position));
20
+ }
21
+ c(() => {
22
+ e.value = { ...n.position };
23
+ });
24
+ const m = {
25
+ messages: {
26
+ en: {
27
+ title: "Choose Your Location",
28
+ description: "Enter your address or select it on the map to see the nearest offers to you."
29
+ },
30
+ ru: {
31
+ title: "Выбор Локации",
32
+ description: "Пожалуйста, выберите вашу страну из списка ниже, чтобы увидеть варианты доставки и другую актуальную информацию:"
33
+ }
34
+ }
35
+ }, { t: a } = E(m);
36
+ return (s, o) => (l(), v("div", k, [
37
+ P,
38
+ i("h3", S, r(d(a)("title")), 1),
39
+ i("p", $, r(d(a)("description")), 1),
40
+ (l(), u(f, {
41
+ key: s.$i18n.locale,
42
+ apiKey: s.GOOGLE_MAPS_API_KEY,
43
+ locale: s.$i18n.locale,
44
+ address: e.value.address,
45
+ location: e.value.location,
46
+ placeholder: "Enter your address",
47
+ class: "bg-white radius-tl-medium radius-tr-medium t-black br-grey-transp-25 br-solid br-2px pd-medium",
48
+ "onUpdate:country": o[0] || (o[0] = (t) => {
49
+ e.value.country = t;
50
+ }),
51
+ "onUpdate:state": o[1] || (o[1] = (t) => {
52
+ e.value.state = t;
53
+ }),
54
+ "onUpdate:city": o[2] || (o[2] = (t) => {
55
+ e.value.city = t;
56
+ }),
57
+ "onUpdate:location": o[3] || (o[3] = (t) => {
58
+ e.value.location = t;
59
+ }),
60
+ "onUpdate:address": o[4] || (o[4] = (t) => {
61
+ e.value.address = t;
62
+ })
63
+ }, null, 8, ["apiKey", "locale", "address", "location"])),
64
+ (l(), u(b, {
65
+ key: s.$i18n.locale,
66
+ apiKey: s.GOOGLE_MAPS_API_KEY,
67
+ locale: s.$i18n.locale,
68
+ address: e.value.address,
69
+ location: e.value.location,
70
+ class: "bg-light radius-bl-medium radius-br-medium h-15r o-hidden",
71
+ "onUpdate:country": o[5] || (o[5] = (t) => {
72
+ e.value.country = t;
73
+ }),
74
+ "onUpdate:state": o[6] || (o[6] = (t) => {
75
+ e.value.state = t;
76
+ }),
77
+ "onUpdate:city": o[7] || (o[7] = (t) => {
78
+ e.value.city = t;
79
+ }),
80
+ "onUpdate:location": o[8] || (o[8] = (t) => {
81
+ e.value.location = t;
82
+ }),
83
+ "onUpdate:address": o[9] || (o[9] = (t) => {
84
+ e.value.address = t;
85
+ })
86
+ }, null, 8, ["apiKey", "locale", "address", "location"])),
87
+ i("button", {
88
+ onClick: o[10] || (o[10] = (t) => p()),
89
+ class: "w-100 mn-t-medium bg-main radius-extra button"
90
+ }, "Save Position")
91
+ ]));
92
+ }
93
+ };
94
+ export {
95
+ M as default
96
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("../Menu/Menu.vue.cjs"),k=require("../Menu/MenuItem.vue.cjs"),h=require("../FieldPhone/click-outside.cjs"),l=require("vue-router"),r=require("../../modules/auth/views/store/auth.cjs"),n=require("../../modules/globals/views/store/globals.cjs"),_=require("../Checkbox/Checkbox.vue.cjs");;/* empty css */const g={id:"sidebar",class:"o-hidden"},v={class:"pd-medium pos-sticky pos-t-0 h-100vh flex-column flex flex-justify-content"},S=e.createElementVNode("span",null," Backoffice ",-1),q={__name:"Sidebar",props:["stateSidebar"],emits:["closeSidebar"],setup(c,{emit:u}){const d=l.useRouter(),o=l.useRoute();e.ref(!1);const a=c,i=u;e.watch(()=>o.path,()=>{a.stateSidebar===!0&&i("closeSidebar")});let m=h.default;function f(s){const t=s.target.classList.contains("menu-btn");if(console.log(s.target.classList.contains("menu-btn")),t)return null;a.stateSidebar===!0&&i("closeSidebar")}return(s,t)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",g,[e.createElementVNode("div",v,[e.createElementVNode("div",null,[e.renderSlot(s.$slots,"default")]),e.createVNode(_.default,{label:"Darkmode",radio:n.state.theme.darkmode,"onUpdate:radio":t[0]||(t[0]=b=>n.actions.toggleTheme()),name:"prices",class:"t-semi pd-small p-big mn-b-small br-2px br-solid radius-extra br-black-transp-5"},null,8,["radio"]),r.state.access.roles&&(r.state.access.roles.includes("ROLE_MODERATOR")||r.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createBlock(p.default,{key:0,class:"mn-b-regular bg-black t-white"},{default:e.withCtx(()=>[e.createVNode(k.default,{onClick:t[1]||(t[1]=b=>e.unref(d).push({name:"Backoffice",params:{_id:e.unref(o).params._id}})),class:"cursor-pointer",theme:"white"},{default:e.withCtx(()=>[S]),_:1})]),_:1})):e.createCommentVNode("",!0)])])),[[e.unref(m),f]])}};exports.default=q;
@@ -0,0 +1,74 @@
1
+ import { ref as k, watch as h, withDirectives as g, openBlock as c, createElementBlock as S, createElementVNode as r, renderSlot as v, createVNode as n, createBlock as x, withCtx as m, unref as s, createCommentVNode as O } from "vue";
2
+ import B from "../Menu/Menu.vue.js";
3
+ import R from "../Menu/MenuItem.vue.js";
4
+ import $ from "../FieldPhone/click-outside.js";
5
+ import { useRouter as w, useRoute as E } from "vue-router";
6
+ import { state as o } from "../../modules/auth/views/store/auth.js";
7
+ import { state as C, actions as D } from "../../modules/globals/views/store/globals.js";
8
+ import L from "../Checkbox/Checkbox.vue.js";
9
+ /* empty css */
10
+ const N = {
11
+ id: "sidebar",
12
+ class: "o-hidden"
13
+ }, y = { class: "pd-medium pos-sticky pos-t-0 h-100vh flex-column flex flex-justify-content" }, M = /* @__PURE__ */ r("span", null, " Backoffice ", -1), G = {
14
+ __name: "Sidebar",
15
+ props: ["stateSidebar"],
16
+ emits: ["closeSidebar"],
17
+ setup(d, { emit: u }) {
18
+ const f = w(), i = E();
19
+ k(!1);
20
+ const a = d, l = u;
21
+ h(() => i.path, () => {
22
+ a.stateSidebar === !0 && l("closeSidebar");
23
+ });
24
+ let p = $;
25
+ function b(t) {
26
+ const e = t.target.classList.contains("menu-btn");
27
+ if (console.log(t.target.classList.contains("menu-btn")), e)
28
+ return null;
29
+ a.stateSidebar === !0 && l("closeSidebar");
30
+ }
31
+ return (t, e) => g((c(), S("div", N, [
32
+ r("div", y, [
33
+ r("div", null, [
34
+ v(t.$slots, "default")
35
+ ]),
36
+ n(L, {
37
+ label: "Darkmode",
38
+ radio: C.theme.darkmode,
39
+ "onUpdate:radio": e[0] || (e[0] = (_) => D.toggleTheme()),
40
+ name: "prices",
41
+ class: "t-semi pd-small p-big mn-b-small br-2px br-solid radius-extra br-black-transp-5"
42
+ }, null, 8, ["radio"]),
43
+ o.access.roles && (o.access.roles.includes("ROLE_MODERATOR") || o.access.roles.includes("ROLE_ADMIN")) ? (c(), x(B, {
44
+ key: 0,
45
+ class: "mn-b-regular bg-black t-white"
46
+ }, {
47
+ default: m(() => [
48
+ n(R, {
49
+ onClick: e[1] || (e[1] = (_) => s(f).push({
50
+ name: "Backoffice",
51
+ params: {
52
+ _id: s(i).params._id
53
+ }
54
+ })),
55
+ class: "cursor-pointer",
56
+ theme: "white"
57
+ }, {
58
+ default: m(() => [
59
+ M
60
+ ]),
61
+ _: 1
62
+ })
63
+ ]),
64
+ _: 1
65
+ })) : O("", !0)
66
+ ])
67
+ ])), [
68
+ [s(p), b]
69
+ ]);
70
+ }
71
+ };
72
+ export {
73
+ G as default
74
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("../../modules/icons/navigation/IconCross.vue.cjs");;/* empty css */const l={class:"pd-small error-wrapper"},a={class:"flex-nowrap flex radius-small pd-small t-white bg-fourth"},n={class:"w-100"},c=e.createElementVNode("br",null,null,-1),i={__name:"Status",props:{status:String,message:String,show:Boolean,data:Object},setup(s){return(r,t)=>(e.openBlock(),e.createElementBlock("div",l,[e.createElementVNode("div",a,[e.createElementVNode("p",n,[e.createTextVNode(e.toDisplayString(s.data.message)+" ",1),c]),e.createVNode(o.default,{onClick:t[0]||(t[0]=u=>r.closePopup()),class:"cursor-pointer hover-scale-1 i-regular z-index-5"})])]))}};exports.default=i;
@@ -0,0 +1,29 @@
1
+ import { openBlock as r, createElementBlock as a, createElementVNode as e, createTextVNode as l, toDisplayString as n, createVNode as i } from "vue";
2
+ import c from "../../modules/icons/navigation/IconCross.vue.js";
3
+ /* empty css */
4
+ const p = { class: "pd-small error-wrapper" }, d = { class: "flex-nowrap flex radius-small pd-small t-white bg-fourth" }, m = { class: "w-100" }, u = /* @__PURE__ */ e("br", null, null, -1), w = {
5
+ __name: "Status",
6
+ props: {
7
+ status: String,
8
+ message: String,
9
+ show: Boolean,
10
+ data: Object
11
+ },
12
+ setup(s) {
13
+ return (o, t) => (r(), a("div", p, [
14
+ e("div", d, [
15
+ e("p", m, [
16
+ l(n(s.data.message) + " ", 1),
17
+ u
18
+ ]),
19
+ i(c, {
20
+ onClick: t[0] || (t[0] = (_) => o.closePopup()),
21
+ class: "cursor-pointer hover-scale-1 i-regular z-index-5"
22
+ })
23
+ ])
24
+ ]));
25
+ }
26
+ };
27
+ export {
28
+ w as default
29
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("isomorphic-dompurify");;/* empty css */const w=require("../../../constructor/components/sections/Constructor.vue.cjs"),V=require("../../../../components/Popup/Popup.vue2.cjs");;/* empty css */;/* empty css */const N=require("../../../../components/FieldTags/BlockTags.vue.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),y=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),C=require("../../../../components/Button/Button.vue2.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/views/store/auth.cjs"),x=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={style:{"min-height":"100%"},class:"w-100 bg-light pd-big radius-big"},T=e.createElementVNode("div",{class:"w-full h-full"},null,-1),z={key:0,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},A={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},O=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),U=e.createElementVNode("h5",{class:"mn-b-thin"},"Add source:",-1),D=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),M={key:0,class:"mn-b-thin"},S={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},R={__name:"CreateBlogPost",setup($){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{const o=await x.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});if(p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo})),s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo})});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function h(){d.value=!0}function v(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{console.log(t.value),u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.createElementVNode("section",E,[T,e.unref(t)?(e.openBlock(),e.createBlock(w.default,{key:0,content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"scaleIn"},{default:e.withCtx(()=>[e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",A,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(V.default,{onClosePopup:v,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[O,e.createVNode(N.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags,class:"mn-b-small"},null,8,["tags"]),U,e.createVNode(y.default,{field:e.unref(t).source,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).source=l),placeholder:"Add full link to the source",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["field"]),D,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[6]||(a[6]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",M,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(B.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[7]||(a[7]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(C.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=R;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("isomorphic-dompurify");;/* empty css */const w=require("../../../constructor/components/sections/Constructor.vue.cjs"),V=require("../../../../components/Popup/Popup.vue.cjs");;/* empty css */;/* empty css */const N=require("../../../../components/FieldTags/BlockTags.vue.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),y=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),C=require("../../../../components/Button/Button.vue2.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/views/store/auth.cjs"),x=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={style:{"min-height":"100%"},class:"w-100 bg-light pd-big radius-big"},T=e.createElementVNode("div",{class:"w-full h-full"},null,-1),z={key:0,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},A={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},O=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),U=e.createElementVNode("h5",{class:"mn-b-thin"},"Add source:",-1),D=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),M={key:0,class:"mn-b-thin"},S={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},R={__name:"CreateBlogPost",setup($){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{const o=await x.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});if(p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo})),s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo})});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function h(){d.value=!0}function v(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{console.log(t.value),u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.createElementVNode("section",E,[T,e.unref(t)?(e.openBlock(),e.createBlock(w.default,{key:0,content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"scaleIn"},{default:e.withCtx(()=>[e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",A,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(V.default,{onClosePopup:v,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[O,e.createVNode(N.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags,class:"mn-b-small"},null,8,["tags"]),U,e.createVNode(y.default,{field:e.unref(t).source,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).source=l),placeholder:"Add full link to the source",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["field"]),D,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[6]||(a[6]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",M,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(B.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[7]||(a[7]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(C.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=R;
@@ -2,7 +2,7 @@ import { ref as n, onMounted as V, computed as w, openBlock as u, createElementB
2
2
  import "isomorphic-dompurify";
3
3
  /* empty css */
4
4
  import D from "../../../constructor/components/sections/Constructor.vue.js";
5
- import N from "../../../../components/Popup/Popup.vue2.js";
5
+ import N from "../../../../components/Popup/Popup.vue.js";
6
6
  /* empty css */
7
7
  /* empty css */
8
8
  import O from "../../../../components/FieldTags/BlockTags.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../../../../../../node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.cjs"),P=require("../../../../components/Popup/Popup.vue2.cjs"),g=require("../../../../components/Button/Button.vue2.cjs"),S=require("../../store/tickets.cjs");;/* empty css */const w=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),x=r=>(e.pushScopeId("data-v-20750f79"),r=r(),e.popScopeId(),r),E=x(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Scan QR Code",-1)),q={class:"h-max"},T={__name:"ButtonCheck",emits:"qrcodecheck",setup(r,{emit:i}){const u=i,n=e.ref(!1),a=e.ref("");function l(){n.value=!0}function d(){n.value=!1}const s=e.ref(null);async function p(t){s.value=t.map(o=>o.rawValue);try{const o=s.value[0]||"";if(!o)throw new Error("Troubles with qrcode reading");const c=await S.actions.update({_id:o,status:"used",check:!0});alert("Ticket checked. And it's all right!")}catch{alert("Ticket is not found, already used or deactivated!")}u("qrcodecheck")}function m(t){a.value=`[${t.name}]: `,t.name==="NotAllowedError"?a.value+="you need to grant camera access permission":t.name==="NotFoundError"?a.value+="no camera on this device":t.name==="NotSupportedError"?a.value+="secure context required (HTTPS, localhost)":t.name==="NotReadableError"?a.value+="is the camera already in use?":t.name==="OverconstrainedError"?a.value+="installed cameras are not suitable":t.name==="StreamApiNotSupportedError"?a.value+="Stream API is not supported in this browser":t.name==="InsecureContextError"?a.value+="Camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.":a.value+=t.message}function f(t,o){for(const c of t){const{boundingBox:{x:h,y:v,width:_,height:b}}=c;o.lineWidth=2,o.strokeStyle="#007bff",o.strokeRect(h,v,_,b)}}return(t,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(g.default,{submit:l,class:"bg-main button-small radius-extra button"},{default:e.withCtx(()=>[e.createTextVNode(" Check Tickets ")]),_:1}),e.createVNode(P.default,{title:"Добавить участника",onClosePopup:d,isPopupOpen:n.value,class:"w-max-30r h-max-30r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[E,e.createElementVNode("div",q,[e.createVNode(e.unref(k.QrcodeStream),{track:f,onDetect:p,onError:m})])]),_:1},8,["isPopupOpen"])]))}},N=w.default(T,[["__scopeId","data-v-20750f79"]]);exports.default=N;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),k=require("../../../../../../node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.cjs"),P=require("../../../../components/Popup/Popup.vue.cjs"),g=require("../../../../components/Button/Button.vue2.cjs"),S=require("../../store/tickets.cjs");;/* empty css */const w=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),x=r=>(e.pushScopeId("data-v-20750f79"),r=r(),e.popScopeId(),r),E=x(()=>e.createElementVNode("h3",{class:"mn-b-small"},"Scan QR Code",-1)),q={class:"h-max"},T={__name:"ButtonCheck",emits:"qrcodecheck",setup(r,{emit:i}){const u=i,n=e.ref(!1),a=e.ref("");function l(){n.value=!0}function d(){n.value=!1}const s=e.ref(null);async function p(t){s.value=t.map(o=>o.rawValue);try{const o=s.value[0]||"";if(!o)throw new Error("Troubles with qrcode reading");const c=await S.actions.update({_id:o,status:"used",check:!0});alert("Ticket checked. And it's all right!")}catch{alert("Ticket is not found, already used or deactivated!")}u("qrcodecheck")}function m(t){a.value=`[${t.name}]: `,t.name==="NotAllowedError"?a.value+="you need to grant camera access permission":t.name==="NotFoundError"?a.value+="no camera on this device":t.name==="NotSupportedError"?a.value+="secure context required (HTTPS, localhost)":t.name==="NotReadableError"?a.value+="is the camera already in use?":t.name==="OverconstrainedError"?a.value+="installed cameras are not suitable":t.name==="StreamApiNotSupportedError"?a.value+="Stream API is not supported in this browser":t.name==="InsecureContextError"?a.value+="Camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.":a.value+=t.message}function f(t,o){for(const c of t){const{boundingBox:{x:h,y:v,width:_,height:b}}=c;o.lineWidth=2,o.strokeStyle="#007bff",o.strokeRect(h,v,_,b)}}return(t,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(g.default,{submit:l,class:"bg-main button-small radius-extra button"},{default:e.withCtx(()=>[e.createTextVNode(" Check Tickets ")]),_:1}),e.createVNode(P.default,{title:"Добавить участника",onClosePopup:d,isPopupOpen:n.value,class:"w-max-30r h-max-30r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[E,e.createElementVNode("div",q,[e.createVNode(e.unref(k.QrcodeStream),{track:f,onDetect:p,onError:m})])]),_:1},8,["isPopupOpen"])]))}},N=w.default(T,[["__scopeId","data-v-20750f79"]]);exports.default=N;
@@ -1,6 +1,6 @@
1
1
  import { ref as s, openBlock as w, createElementBlock as E, createVNode as n, withCtx as l, createTextVNode as S, createElementVNode as u, unref as g, pushScopeId as T, popScopeId as C } from "vue";
2
2
  import { QrcodeStream as y } from "../../../../../../node_modules/vue-qrcode-reader/dist/vue-qrcode-reader.js";
3
- import N from "../../../../components/Popup/Popup.vue2.js";
3
+ import N from "../../../../components/Popup/Popup.vue.js";
4
4
  import B from "../../../../components/Button/Button.vue2.js";
5
5
  import { actions as I } from "../../store/tickets.js";
6
6
  /* empty css */
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("isomorphic-dompurify");;/* empty css */const B=require("../../../constructor/components/sections/Constructor.vue.cjs"),T=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");;/* empty css */const k=require("../../../../components/Block/Block.vue.cjs"),C=require("../../../../components/Popup/Popup.vue2.cjs"),i=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/FieldTags/BlockTags.vue.cjs"),V=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),f=require("../../../../components/Upload/Upload.vue.cjs"),h=require("../../../../components/UploadImage/UploadImage.vue.cjs"),q=require("../../../../components/EditImages/EditImages.vue.cjs"),L=require("../../../../components/Button/Button.vue2.cjs"),N=require("../../../icons/navigation/IconDelete.vue.cjs"),D=require("vue-router"),u=require("../../store/events.cjs"),n=require("../../../auth/views/store/auth.cjs"),M=require("../../../organizations/store/organizations.cjs");;/* empty css */const O={key:0,class:"h-min-100 pd-thin"},R={class:"mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex"},S=e.createElementVNode("h4",null,"Upload Event Cover",-1),F={key:0,class:"mn-b-small"},G={key:2,class:"mn-b-small"},I={key:4,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),Y={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),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),ie=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),ne=e.createElementVNode("h4",{class:"mn-b-thin"}," Previous Party Section ",-1),oe=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Previous Partys Section ",-1),de=e.createElementVNode("h3",{class:"mn-b-small"},"Date",-1),re=e.createElementVNode("h3",{class:"mn-b-small"},"Description",-1),ue={key:5,class:"pd-b-extra w-100 bg-light pd-big radius-big"},ce={key:6,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},pe={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},me=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),fe=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),ge={key:0,class:"mn-b-thin"},he={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},be={__name:"EditEvent",setup(ve){const p=D.useRoute(),m=D.useRouter();let t=e.ref(null),b=e.ref(null);const v=e.ref([]),o=e.ref(null),d=e.ref(new Date);e.onMounted(async()=>{if(p.params.url){const a=await u.read({user:n.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;d.value=[l,c]}else{u.clean(),t.value=u.state.current;const a=new Date,l=new Date;d.value=[a,l]}t.value.owner||(t.value.owner={target:n.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:n.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(o.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const s=await M.actions.read({user:n.state.user._id,postable:n.state.user._id,limit:100});b.value=s.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(!1);function w(){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:d.value[0],end:d.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(){o.value&&(t.value.owner={target:o.value._id,type:"organization"}),o.value||(t.value.creator.hidden=!1),o.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.date={start:d.value[0],end:d.value[1]},console.log(d.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 y(){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",O,[e.createElementVNode("div",R,[e.createVNode(h.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"]),S]),e.createVNode(i.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-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.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-light pd-medium radius-small"},null,8,["field"]),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",F," Tickets ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mn-b-semi w-100 bg-light pd-medium radius-small",onClick:a[3]||(a[3]=l=>e.unref(m).push({name:"Edit Event Tickets",params:{url:e.unref(p).params.url}}))}," Edit tickets ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",G," Special Details ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createBlock(V.default,{key:3,label:"Special",radio:e.unref(t).special,"onUpdate:radio":a[4]||(a[4]=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(i.default,{field:e.unref(t).specialData.subtitle,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).specialData.subtitle=l),placeholder:"Event subtitle",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(q.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[6]||(a[6]=l=>e.unref(t).specialData.logos=l),class:"mn-b-thin bg-light radius-small"},null,8,["images"]),z,H,e.createVNode(f.default,{field:e.unref(t).specialData.video,"onUpdate:field":a[7]||(a[7]=l=>e.unref(t).specialData.video=l),placeholder:"Upload video",onFileChange:a[8]||(a[8]=l=>e.unref(t).specialData.video=l),uploadPath:"specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),$,e.createElementVNode("div",Y,[e.createVNode(h.default,{photo:e.unref(t).specialData.ticketImage,"onUpdate:photo":a[9]||(a[9]=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(i.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-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.ticketText,"onUpdate:field":a[11]||(a[11]=l=>e.unref(t).specialData.ticketText=l),placeholder:"Promotion text for ticket in hero ",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.ticketTextButton,"onUpdate:field":a[12]||(a[12]=l=>e.unref(t).specialData.ticketTextButton=l),placeholder:"Text on 'Buy Ticket' button ",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"])])]),J,K,e.createVNode(i.default,{field:e.unref(t).specialData.guestTitle,"onUpdate:field":a[13]||(a[13]=l=>e.unref(t).specialData.guestTitle=l),placeholder:"Title for Main Guest section",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestDescription,"onUpdate:field":a[14]||(a[14]=l=>e.unref(t).specialData.guestDescription=l),placeholder:"Description for Main Guest section",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createElementVNode("div",Q,[e.createVNode(i.default,{field:e.unref(t).specialData.guestFacebook,"onUpdate:field":a[15]||(a[15]=l=>e.unref(t).specialData.guestFacebook=l),placeholder:"Facebook of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestInstagram,"onUpdate:field":a[16]||(a[16]=l=>e.unref(t).specialData.guestInstagram=l),placeholder:"Instagram of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestTwitter,"onUpdate:field":a[17]||(a[17]=l=>e.unref(t).specialData.guestTwitter=l),placeholder:"Twitter of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestTelegram,"onUpdate:field":a[18]||(a[18]=l=>e.unref(t).specialData.guestTelegram=l),placeholder:"Telegram of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestSoundcloud,"onUpdate:field":a[19]||(a[19]=l=>e.unref(t).specialData.guestSoundcloud=l),placeholder:"Link to Main Guest soundcloud track",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestSpotify,"onUpdate:field":a[20]||(a[20]=l=>e.unref(t).specialData.guestSpotify=l),placeholder:"Link to Main guest spotify track",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestYoutube,"onUpdate:field":a[21]||(a[21]=l=>e.unref(t).specialData.guestYoutube=l),placeholder:"Link to Main guest youtube video",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"])]),W,e.createVNode(f.default,{field:e.unref(t).specialData.guestVideo,"onUpdate:field":a[22]||(a[22]=l=>e.unref(t).specialData.guestVideo=l),placeholder:"Upload video",onFileChange:a[23]||(a[23]=l=>e.unref(t).specialData.guestVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light 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(h.default,{photo:l.photo,"onUpdate:photo":r=>l.photo=r,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(i.default,{field:l.name,"onUpdate:field":r=>l.name=r,placeholder:"Name",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:l.description,"onUpdate:field":r=>l.description=r,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(i.default,{field:l.name,"onUpdate:field":r=>l.name=r,placeholder:"Name",class:"w-100 bg-light radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:l.time,"onUpdate:field":r=>l.time=r,placeholder:"Time",class:"w-100 bg-light 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[24]||(a[24]=l=>e.unref(t).specialData.lineupBackground=l),placeholder:"Upload image",onFileChange:a[25]||(a[25]=l=>e.unref(t).specialData.lineupBackground=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),ie,ne,oe,e.createVNode(i.default,{field:e.unref(t).specialData.previousTitle,"onUpdate:field":a[26]||(a[26]=l=>e.unref(t).specialData.previousTitle=l),placeholder:"Title",value:"Explore our exclusive party archive",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousDescription,"onUpdate:field":a[27]||(a[27]=l=>e.unref(t).specialData.previousDescription=l),label:"Description",value:"Experience the ultimate party vibe at The Commune! Elevate your evening with distinctive and exhilarating activities, ensuring an unforgettable time. Dive into the excitement and make every moment special.",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousLinkText,"onUpdate:field":a[28]||(a[28]=l=>e.unref(t).specialData.previousLinkText=l),label:"Button",value:"Check In Instagram",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousLink,"onUpdate:field":a[29]||(a[29]=l=>e.unref(t).specialData.previousLink=l),label:"Link",value:"https://www.instagram.com/thecommune.phuket/",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(f.default,{field:e.unref(t).specialData.previousVideo,"onUpdate:field":a[30]||(a[30]=l=>e.unref(t).specialData.previousVideo=l),placeholder:"Upload image",onFileChange:a[31]||(a[31]=l=>e.unref(t).specialData.previousVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"])])):e.createCommentVNode("",!0),de,e.createVNode(e.unref(T.default),{modelValue:d.value,"onUpdate:modelValue":a[32]||(a[32]=l=>d.value=l),range:"",class:"z-index-3 mn-b-semi"},null,8,["modelValue"]),re,e.unref(t)?(e.openBlock(),e.createElementBlock("section",ue,[e.createVNode(B.default,{content:e.unref(t).content,onUpdate:a[33]||(a[33]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",ce,[e.createElementVNode("div",pe,[e.unref(p).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[34]||(a[34]=l=>y()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[35]||(a[35]=l=>U()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[36]||(a[36]=l=>w()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(C.default,{title:"Publish",onClosePopup:E,isPopupOpen:g.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[me,e.createVNode(P.default,{onTagsChanged:a[37]||(a[37]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),fe,e.createVNode(_.default,{modelValue:o.value,"onUpdate:modelValue":a[38]||(a[38]=l=>o.value=l),options:e.unref(b),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),o.value?(e.openBlock(),e.createElementBlock("h5",ge,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",he,[e.createVNode(V.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[39]||(a[39]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(L.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=be;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("isomorphic-dompurify");;/* empty css */const B=require("../../../constructor/components/sections/Constructor.vue.cjs"),T=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");;/* empty css */const k=require("../../../../components/Block/Block.vue.cjs"),C=require("../../../../components/Popup/Popup.vue.cjs"),i=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/FieldTags/BlockTags.vue.cjs"),V=require("../../../../components/Checkbox/Checkbox.vue.cjs"),_=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),f=require("../../../../components/Upload/Upload.vue.cjs"),h=require("../../../../components/UploadImage/UploadImage.vue.cjs"),q=require("../../../../components/EditImages/EditImages.vue.cjs"),L=require("../../../../components/Button/Button.vue2.cjs"),N=require("../../../icons/navigation/IconDelete.vue.cjs"),D=require("vue-router"),u=require("../../store/events.cjs"),n=require("../../../auth/views/store/auth.cjs"),M=require("../../../organizations/store/organizations.cjs");;/* empty css */const O={key:0,class:"h-min-100 pd-thin"},R={class:"mn-b-thin radius-small w-100 h-10r bg-light flex-center flex-column flex"},S=e.createElementVNode("h4",null,"Upload Event Cover",-1),F={key:0,class:"mn-b-small"},G={key:2,class:"mn-b-small"},I={key:4,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),Y={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),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),ie=e.createElementVNode("hr",{class:"bg-black-transp-10 mn-b-semi mn-t-semi d-block"},null,-1),ne=e.createElementVNode("h4",{class:"mn-b-thin"}," Previous Party Section ",-1),oe=e.createElementVNode("h5",{class:"mn-b-thin"}," Video in Previous Partys Section ",-1),de=e.createElementVNode("h3",{class:"mn-b-small"},"Date",-1),re=e.createElementVNode("h3",{class:"mn-b-small"},"Description",-1),ue={key:5,class:"pd-b-extra w-100 bg-light pd-big radius-big"},ce={key:6,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},pe={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},me=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),fe=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),ge={key:0,class:"mn-b-thin"},he={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},be={__name:"EditEvent",setup(ve){const p=D.useRoute(),m=D.useRouter();let t=e.ref(null),b=e.ref(null);const v=e.ref([]),o=e.ref(null),d=e.ref(new Date);e.onMounted(async()=>{if(p.params.url){const a=await u.read({user:n.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;d.value=[l,c]}else{u.clean(),t.value=u.state.current;const a=new Date,l=new Date;d.value=[a,l]}t.value.owner||(t.value.owner={target:n.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:n.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(o.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const s=await M.actions.read({user:n.state.user._id,postable:n.state.user._id,limit:100});b.value=s.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(!1);function w(){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:d.value[0],end:d.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(){o.value&&(t.value.owner={target:o.value._id,type:"organization"}),o.value||(t.value.creator.hidden=!1),o.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.date={start:d.value[0],end:d.value[1]},console.log(d.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 y(){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",O,[e.createElementVNode("div",R,[e.createVNode(h.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"]),S]),e.createVNode(i.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-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.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-light pd-medium radius-small"},null,8,["field"]),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",F," Tickets ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("div",{key:1,class:"mn-b-semi w-100 bg-light pd-medium radius-small",onClick:a[3]||(a[3]=l=>e.unref(m).push({name:"Edit Event Tickets",params:{url:e.unref(p).params.url}}))}," Edit tickets ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createElementBlock("h3",G," Special Details ")):e.createCommentVNode("",!0),n.state.access.roles&&(n.state.access.roles.includes("ROLE_MODERATOR")||n.state.access.roles.includes("ROLE_ADMIN"))?(e.openBlock(),e.createBlock(V.default,{key:3,label:"Special",radio:e.unref(t).special,"onUpdate:radio":a[4]||(a[4]=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(i.default,{field:e.unref(t).specialData.subtitle,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).specialData.subtitle=l),placeholder:"Event subtitle",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(q.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[6]||(a[6]=l=>e.unref(t).specialData.logos=l),class:"mn-b-thin bg-light radius-small"},null,8,["images"]),z,H,e.createVNode(f.default,{field:e.unref(t).specialData.video,"onUpdate:field":a[7]||(a[7]=l=>e.unref(t).specialData.video=l),placeholder:"Upload video",onFileChange:a[8]||(a[8]=l=>e.unref(t).specialData.video=l),uploadPath:"specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),$,e.createElementVNode("div",Y,[e.createVNode(h.default,{photo:e.unref(t).specialData.ticketImage,"onUpdate:photo":a[9]||(a[9]=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(i.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-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.ticketText,"onUpdate:field":a[11]||(a[11]=l=>e.unref(t).specialData.ticketText=l),placeholder:"Promotion text for ticket in hero ",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.ticketTextButton,"onUpdate:field":a[12]||(a[12]=l=>e.unref(t).specialData.ticketTextButton=l),placeholder:"Text on 'Buy Ticket' button ",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"])])]),J,K,e.createVNode(i.default,{field:e.unref(t).specialData.guestTitle,"onUpdate:field":a[13]||(a[13]=l=>e.unref(t).specialData.guestTitle=l),placeholder:"Title for Main Guest section",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestDescription,"onUpdate:field":a[14]||(a[14]=l=>e.unref(t).specialData.guestDescription=l),placeholder:"Description for Main Guest section",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createElementVNode("div",Q,[e.createVNode(i.default,{field:e.unref(t).specialData.guestFacebook,"onUpdate:field":a[15]||(a[15]=l=>e.unref(t).specialData.guestFacebook=l),placeholder:"Facebook of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestInstagram,"onUpdate:field":a[16]||(a[16]=l=>e.unref(t).specialData.guestInstagram=l),placeholder:"Instagram of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestTwitter,"onUpdate:field":a[17]||(a[17]=l=>e.unref(t).specialData.guestTwitter=l),placeholder:"Twitter of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestTelegram,"onUpdate:field":a[18]||(a[18]=l=>e.unref(t).specialData.guestTelegram=l),placeholder:"Telegram of Main Guest",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestSoundcloud,"onUpdate:field":a[19]||(a[19]=l=>e.unref(t).specialData.guestSoundcloud=l),placeholder:"Link to Main Guest soundcloud track",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestSpotify,"onUpdate:field":a[20]||(a[20]=l=>e.unref(t).specialData.guestSpotify=l),placeholder:"Link to Main guest spotify track",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.guestYoutube,"onUpdate:field":a[21]||(a[21]=l=>e.unref(t).specialData.guestYoutube=l),placeholder:"Link to Main guest youtube video",class:"mn-b-thin w-100 bg-light pd-medium radius-small"},null,8,["field"])]),W,e.createVNode(f.default,{field:e.unref(t).specialData.guestVideo,"onUpdate:field":a[22]||(a[22]=l=>e.unref(t).specialData.guestVideo=l),placeholder:"Upload video",onFileChange:a[23]||(a[23]=l=>e.unref(t).specialData.guestVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light 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(h.default,{photo:l.photo,"onUpdate:photo":r=>l.photo=r,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(i.default,{field:l.name,"onUpdate:field":r=>l.name=r,placeholder:"Name",class:"w-100 mn-b-thin bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:l.description,"onUpdate:field":r=>l.description=r,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(i.default,{field:l.name,"onUpdate:field":r=>l.name=r,placeholder:"Name",class:"w-100 bg-light radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(i.default,{field:l.time,"onUpdate:field":r=>l.time=r,placeholder:"Time",class:"w-100 bg-light 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[24]||(a[24]=l=>e.unref(t).specialData.lineupBackground=l),placeholder:"Upload image",onFileChange:a[25]||(a[25]=l=>e.unref(t).specialData.lineupBackground=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"]),ie,ne,oe,e.createVNode(i.default,{field:e.unref(t).specialData.previousTitle,"onUpdate:field":a[26]||(a[26]=l=>e.unref(t).specialData.previousTitle=l),placeholder:"Title",value:"Explore our exclusive party archive",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousDescription,"onUpdate:field":a[27]||(a[27]=l=>e.unref(t).specialData.previousDescription=l),label:"Description",value:"Experience the ultimate party vibe at The Commune! Elevate your evening with distinctive and exhilarating activities, ensuring an unforgettable time. Dive into the excitement and make every moment special.",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousLinkText,"onUpdate:field":a[28]||(a[28]=l=>e.unref(t).specialData.previousLinkText=l),label:"Button",value:"Check In Instagram",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(i.default,{field:e.unref(t).specialData.previousLink,"onUpdate:field":a[29]||(a[29]=l=>e.unref(t).specialData.previousLink=l),label:"Link",value:"https://www.instagram.com/thecommune.phuket/",class:"w-100 bg-light radius-small pd-medium"},null,8,["field"]),e.createVNode(f.default,{field:e.unref(t).specialData.previousVideo,"onUpdate:field":a[30]||(a[30]=l=>e.unref(t).specialData.previousVideo=l),placeholder:"Upload image",onFileChange:a[31]||(a[31]=l=>e.unref(t).specialData.previousVideo=l),uploadPath:"/specials",type:"file",class:"mn-b-thin w-100 bg-light pd-medium radius-small t-black"},null,8,["field"])])):e.createCommentVNode("",!0),de,e.createVNode(e.unref(T.default),{modelValue:d.value,"onUpdate:modelValue":a[32]||(a[32]=l=>d.value=l),range:"",class:"z-index-3 mn-b-semi"},null,8,["modelValue"]),re,e.unref(t)?(e.openBlock(),e.createElementBlock("section",ue,[e.createVNode(B.default,{content:e.unref(t).content,onUpdate:a[33]||(a[33]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",ce,[e.createElementVNode("div",pe,[e.unref(p).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[34]||(a[34]=l=>y()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[35]||(a[35]=l=>U()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[36]||(a[36]=l=>w()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(C.default,{title:"Publish",onClosePopup:E,isPopupOpen:g.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[me,e.createVNode(P.default,{onTagsChanged:a[37]||(a[37]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),fe,e.createVNode(_.default,{modelValue:o.value,"onUpdate:modelValue":a[38]||(a[38]=l=>o.value=l),options:e.unref(b),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),o.value?(e.openBlock(),e.createElementBlock("h5",ge,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",he,[e.createVNode(V.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[39]||(a[39]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(L.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=be;
@@ -5,7 +5,7 @@ import A from "../../../constructor/components/sections/Constructor.vue.js";
5
5
  import B from "../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js";
6
6
  /* empty css */
7
7
  import E from "../../../../components/Block/Block.vue.js";
8
- import I from "../../../../components/Popup/Popup.vue2.js";
8
+ import I from "../../../../components/Popup/Popup.vue.js";
9
9
  import n from "../../../../components/Field/Field.vue2.js";
10
10
  import z from "../../../../components/FieldTags/BlockTags.vue.js";
11
11
  import P from "../../../../components/Checkbox/Checkbox.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("../../../../components/Feed/Feed.vue.cjs"),N=require("../../../../components/Block/Block.vue.cjs"),x=require("../../../../components/Popup/Popup.vue2.cjs"),u=require("../../../../components/Field/Field.vue2.cjs"),d=require("../../../../components/Button/Button.vue2.cjs"),V=require("../elements/ButtonCheck.vue.cjs"),q=require("../../../icons/navigation/IconDelete.vue.cjs"),B=require("../../../icons/navigation/IconAdd.vue.cjs"),b=require("vue-router"),E=require("../../store/events.cjs"),C=require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const m=require("../../store/tickets.cjs");;/* empty css */const T={key:0,class:"h-100 pd-thin"},P={class:"mn-b-medium flex-v-center flex-nowrap flex"},S=e.createElementVNode("h2",{class:"mn-r-medium"},"Tickets",-1),D=["onClick"],U={class:"radius-big bg-light gap-small pd-medium flex-v-center flex-nowrap flex pos-relative mn-b-thin"},A=["href"],F=["src"],O={class:"mn-r-auto"},M={class:"h4"},R={class:"h5 t-transp mn-b-thin"},I={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"},L={__name:"EditEventTickets",setup(Q){var h;const g=b.useRoute();b.useRouter();let n=e.ref(null);const c=e.ref([{name:"",email:"",target:(h=n.value)==null?void 0:h._id,type:"event",quantity:1}]),i=e.ref(!1);function _(r){var l;i.value=!0,c.value=[{name:"",email:"",target:(l=n.value)==null?void 0:l._id,type:"event",quantity:1}]}function p(){i.value=!1}const s=e.ref(!1);e.onMounted(async()=>{const r=await E.read({user:C.state.user._id,url:g.params.url});n.value=r.pop()});async function w(){try{const r=await m.actions.create(c.value);s.value=!s.value}catch(r){console.log(r)}}async function f(r,l){if(confirm("Are you sure you want to deactivate this event?"))try{const t=await m.actions.update({...r,status:l});s.value=!s.value}catch(t){console.error(t)}}return(r,l)=>e.unref(n)?(e.openBlock(),e.createElementBlock("article",T,[e.createElementVNode("header",P,[S,e.createElementVNode("button",{onClick:l[0]||(l[0]=t=>_()),class:"radius-extra uppercase button-small flex-child flex-child-shrink-0 hover-scale-1 cursor-pointer t-white bg-second"}," Add Tickets "),e.createVNode(V.default,{onQrcodecheck:l[1]||(l[1]=t=>s.value=!s.value),class:"w-100 pd-medium mn-auto"})]),e.createVNode(x.default,{title:"Добавить участника",onClosePopup:p,isPopupOpen:i.value,class:"w-max-40r"},{default:e.withCtx(()=>[e.createVNode(N.default,{title:"Add tickets",placeholder:"No parameters added yet",class:"cols-1 mn-b-thin gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:a},[e.createVNode(u.default,{field:t.name,"onUpdate:field":o=>t.name=o,placeholder:"Name",class:"w-50 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.email,"onUpdate:field":o=>t.email=o,placeholder:"Email",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.quantity,"onUpdate:field":o=>t.quantity=o,placeholder:"Quantity",type:"number",class:"w-25 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),a<1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l[2]||(l[2]=()=>c.value.push({name:"",value:"",target:e.unref(n)._id,type:"event",quantity:1})),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"},[e.createVNode(B.default,{class:"i-medium",fill:"rgb(var(--white)"})])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:()=>c.value.splice(a,1),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},[e.createVNode(q.default,{class:"i-medium",fill:"rgb(var(--white)"})],8,D))]))),128)),e.createVNode(d.default,{submit:w,callback:p,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Create Tickets ")]),_:1})]),_:1})]),_:1},8,["isPopupOpen"]),e.createVNode(y.default,{search:!0,states:{empty:{title:"No Tickets Found",description:"Currently, there are no tickets."}},store:{read:t=>m.actions.read(t),state:null},options:{target:e.unref(n)._id},external:s.value},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,(a,o)=>{var v,k;return e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("a",{href:a.image,target:"_blank"},[e.createElementVNode("img",{src:a.qrcode,class:"radius-small h-5r w-5r"},null,8,F)],8,A),e.createElementVNode("div",O,[e.createElementVNode("p",M,e.toDisplayString(((v=a.client_refactor)==null?void 0:v.name)||"No name")+", "+e.toDisplayString(a.role),1),e.createElementVNode("p",R,e.toDisplayString(((k=a.client_refactor)==null?void 0:k.email)||"No email"),1),e.createElementVNode("span",I,e.toDisplayString(a.status),1)]),a.status!=="deactivated"?(e.openBlock(),e.createBlock(d.default,{key:0,submit:()=>f(a,"deactivated"),callback:r.redirectTo,class:"w-min h-min pd-small bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Deactivate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0),a.status==="deactivated"||a.status==="used"?(e.openBlock(),e.createBlock(d.default,{key:1,submit:()=>f(a,"unused"),callback:r.redirectTo,class:"w-min h-min pd-small bg-green t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Activate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0)])}),256))]),_:1},8,["store","options","external"])])):e.createCommentVNode("",!0)}};exports.default=L;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),y=require("../../../../components/Feed/Feed.vue.cjs"),N=require("../../../../components/Block/Block.vue.cjs"),x=require("../../../../components/Popup/Popup.vue.cjs"),u=require("../../../../components/Field/Field.vue2.cjs"),d=require("../../../../components/Button/Button.vue2.cjs"),V=require("../elements/ButtonCheck.vue.cjs"),q=require("../../../icons/navigation/IconDelete.vue.cjs"),B=require("../../../icons/navigation/IconAdd.vue.cjs"),b=require("vue-router"),E=require("../../store/events.cjs"),C=require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const m=require("../../store/tickets.cjs");;/* empty css */const T={key:0,class:"h-100 pd-thin"},P={class:"mn-b-medium flex-v-center flex-nowrap flex"},S=e.createElementVNode("h2",{class:"mn-r-medium"},"Tickets",-1),D=["onClick"],U={class:"radius-big bg-light gap-small pd-medium flex-v-center flex-nowrap flex pos-relative mn-b-thin"},A=["href"],F=["src"],O={class:"mn-r-auto"},M={class:"h4"},R={class:"h5 t-transp mn-b-thin"},I={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"},L={__name:"EditEventTickets",setup(Q){var h;const g=b.useRoute();b.useRouter();let n=e.ref(null);const c=e.ref([{name:"",email:"",target:(h=n.value)==null?void 0:h._id,type:"event",quantity:1}]),i=e.ref(!1);function _(r){var l;i.value=!0,c.value=[{name:"",email:"",target:(l=n.value)==null?void 0:l._id,type:"event",quantity:1}]}function p(){i.value=!1}const s=e.ref(!1);e.onMounted(async()=>{const r=await E.read({user:C.state.user._id,url:g.params.url});n.value=r.pop()});async function w(){try{const r=await m.actions.create(c.value);s.value=!s.value}catch(r){console.log(r)}}async function f(r,l){if(confirm("Are you sure you want to deactivate this event?"))try{const t=await m.actions.update({...r,status:l});s.value=!s.value}catch(t){console.error(t)}}return(r,l)=>e.unref(n)?(e.openBlock(),e.createElementBlock("article",T,[e.createElementVNode("header",P,[S,e.createElementVNode("button",{onClick:l[0]||(l[0]=t=>_()),class:"radius-extra uppercase button-small flex-child flex-child-shrink-0 hover-scale-1 cursor-pointer t-white bg-second"}," Add Tickets "),e.createVNode(V.default,{onQrcodecheck:l[1]||(l[1]=t=>s.value=!s.value),class:"w-100 pd-medium mn-auto"})]),e.createVNode(x.default,{title:"Добавить участника",onClosePopup:p,isPopupOpen:i.value,class:"w-max-40r"},{default:e.withCtx(()=>[e.createVNode(N.default,{title:"Add tickets",placeholder:"No parameters added yet",class:"cols-1 mn-b-thin gap-thin"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(t,a)=>(e.openBlock(),e.createElementBlock("div",{class:"gap-thin flex-nowrap flex",key:a},[e.createVNode(u.default,{field:t.name,"onUpdate:field":o=>t.name=o,placeholder:"Name",class:"w-50 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.email,"onUpdate:field":o=>t.email=o,placeholder:"Email",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(u.default,{field:t.quantity,"onUpdate:field":o=>t.quantity=o,placeholder:"Quantity",type:"number",class:"w-25 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),a<1?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:l[2]||(l[2]=()=>c.value.push({name:"",value:"",target:e.unref(n)._id,type:"event",quantity:1})),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-green"},[e.createVNode(B.default,{class:"i-medium",fill:"rgb(var(--white)"})])):(e.openBlock(),e.createElementBlock("div",{key:1,onClick:()=>c.value.splice(a,1),class:"radius-small h-100 i-big flex-center flex aspect-1x1 bg-red"},[e.createVNode(q.default,{class:"i-medium",fill:"rgb(var(--white)"})],8,D))]))),128)),e.createVNode(d.default,{submit:w,callback:p,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Create Tickets ")]),_:1})]),_:1})]),_:1},8,["isPopupOpen"]),e.createVNode(y.default,{search:!0,states:{empty:{title:"No Tickets Found",description:"Currently, there are no tickets."}},store:{read:t=>m.actions.read(t),state:null},options:{target:e.unref(n)._id},external:s.value},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,(a,o)=>{var v,k;return e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("a",{href:a.image,target:"_blank"},[e.createElementVNode("img",{src:a.qrcode,class:"radius-small h-5r w-5r"},null,8,F)],8,A),e.createElementVNode("div",O,[e.createElementVNode("p",M,e.toDisplayString(((v=a.client_refactor)==null?void 0:v.name)||"No name")+", "+e.toDisplayString(a.role),1),e.createElementVNode("p",R,e.toDisplayString(((k=a.client_refactor)==null?void 0:k.email)||"No email"),1),e.createElementVNode("span",I,e.toDisplayString(a.status),1)]),a.status!=="deactivated"?(e.openBlock(),e.createBlock(d.default,{key:0,submit:()=>f(a,"deactivated"),callback:r.redirectTo,class:"w-min h-min pd-small bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Deactivate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0),a.status==="deactivated"||a.status==="used"?(e.openBlock(),e.createBlock(d.default,{key:1,submit:()=>f(a,"unused"),callback:r.redirectTo,class:"w-min h-min pd-small bg-green t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Activate ")]),_:2},1032,["submit","callback"])):e.createCommentVNode("",!0)])}),256))]),_:1},8,["store","options","external"])])):e.createCommentVNode("",!0)}};exports.default=L;
@@ -1,7 +1,7 @@
1
1
  import { ref as p, onMounted as B, unref as _, openBlock as i, createElementBlock as o, createElementVNode as r, createVNode as l, withCtx as u, Fragment as $, renderList as q, createTextVNode as v, toDisplayString as f, createBlock as P, createCommentVNode as b } from "vue";
2
2
  import V from "../../../../components/Feed/Feed.vue.js";
3
3
  import F from "../../../../components/Block/Block.vue.js";
4
- import O from "../../../../components/Popup/Popup.vue2.js";
4
+ import O from "../../../../components/Popup/Popup.vue.js";
5
5
  import g from "../../../../components/Field/Field.vue2.js";
6
6
  import w from "../../../../components/Button/Button.vue2.js";
7
7
  import S from "../elements/ButtonCheck.vue.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Feed/Feed.vue.cjs"),f=require("../../../../components/Popup/Popup.vue2.cjs"),m=require("../../../../components/PhotoViewer/PhotoViewer.vue.cjs"),b=require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs"),g=require("../../store/gallery.cjs"),h={class:"cols-1 gap-thin pd-thin"},P={class:"w-100 h-100 h-min-10r pos-relative"},_=["src","onClick"],k={__name:"Gallery",setup(w){const d=e.ref([]),o=e.ref("all");let r=e.ref({param:"createdAt",order:"desc",options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]}),s=e.ref({start:null,end:null});const n=e.ref(null),u=e.ref(!1);function p(a){u.value=!0,n.value=a}function c(){u.value=!1,n.value=null}return(a,l)=>(e.openBlock(),e.createElementBlock("div",h,[e.createVNode(b.default,{title:a.$t("gallery.title"),"onUpdate:tabs_current":l[0]||(l[0]=t=>o.value=t),tabs_current:o.value,tabs:[{name:"All",value:"all"},{name:"Place",value:"place"},{name:"Drinks",value:"drinks"},{name:"People",value:"people"},{name:"Events",value:"events"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["title","tabs_current"]),e.createVNode(f.default,{onClosePopup:c,isPopupOpen:u.value,class:"bg-black o-hidden w-100 h-100 radius-big"},{default:e.withCtx(()=>[e.createVNode(m.default,{photoUrl:(a.FILE_SERVER_URL||"")+n.value.image},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"]),e.createVNode(v.default,{items:d.value,"onUpdate:items":l[1]||(l[1]=t=>d.value=t),sort:e.unref(r),"onUpdate:sort":l[2]||(l[2]=t=>e.isRef(r)?r.value=t:r=t),date:e.unref(s),"onUpdate:date":l[3]||(l[3]=t=>e.isRef(s)?s.value=t:s=t),showLoadMore:!1,states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:t=>e.unref(g.default).read(t)},options:{limit:15,status:"published",...o.value!=="all"&&{tags:o.value}},class:"cols-4 gap-thin"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,i=>(e.openBlock(),e.createElementBlock("div",{key:i._id,class:"bg-light radius-medium o-hidden flex-column pos-relative flex-wrap"},[e.createElementVNode("div",P,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+i.cover,class:"w-100 h-100 object-fit-cover bg-black",onClick:E=>p(i)},null,8,_)])]))),128))]),_:1},8,["items","sort","date","store","options"])]))}};exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Feed/Feed.vue.cjs"),f=require("../../../../components/Popup/Popup.vue.cjs"),m=require("../../../../components/PhotoViewer/PhotoViewer.vue.cjs"),b=require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs"),g=require("../../store/gallery.cjs"),h={class:"cols-1 gap-thin pd-thin"},P={class:"w-100 h-100 h-min-10r pos-relative"},_=["src","onClick"],k={__name:"Gallery",setup(w){const d=e.ref([]),o=e.ref("all");let r=e.ref({param:"createdAt",order:"desc",options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]}),s=e.ref({start:null,end:null});const n=e.ref(null),u=e.ref(!1);function p(a){u.value=!0,n.value=a}function c(){u.value=!1,n.value=null}return(a,l)=>(e.openBlock(),e.createElementBlock("div",h,[e.createVNode(b.default,{title:a.$t("gallery.title"),"onUpdate:tabs_current":l[0]||(l[0]=t=>o.value=t),tabs_current:o.value,tabs:[{name:"All",value:"all"},{name:"Place",value:"place"},{name:"Drinks",value:"drinks"},{name:"People",value:"people"},{name:"Events",value:"events"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["title","tabs_current"]),e.createVNode(f.default,{onClosePopup:c,isPopupOpen:u.value,class:"bg-black o-hidden w-100 h-100 radius-big"},{default:e.withCtx(()=>[e.createVNode(m.default,{photoUrl:(a.FILE_SERVER_URL||"")+n.value.image},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"]),e.createVNode(v.default,{items:d.value,"onUpdate:items":l[1]||(l[1]=t=>d.value=t),sort:e.unref(r),"onUpdate:sort":l[2]||(l[2]=t=>e.isRef(r)?r.value=t:r=t),date:e.unref(s),"onUpdate:date":l[3]||(l[3]=t=>e.isRef(s)?s.value=t:s=t),showLoadMore:!1,states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:t=>e.unref(g.default).read(t)},options:{limit:15,status:"published",...o.value!=="all"&&{tags:o.value}},class:"cols-4 gap-thin"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,i=>(e.openBlock(),e.createElementBlock("div",{key:i._id,class:"bg-light radius-medium o-hidden flex-column pos-relative flex-wrap"},[e.createElementVNode("div",P,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+i.cover,class:"w-100 h-100 object-fit-cover bg-black",onClick:E=>p(i)},null,8,_)])]))),128))]),_:1},8,["items","sort","date","store","options"])]))}};exports.default=k;
@@ -1,6 +1,6 @@
1
1
  import { ref as t, openBlock as d, createElementBlock as m, createVNode as n, withCtx as f, unref as c, isRef as _, Fragment as P, renderList as w, createElementVNode as b } from "vue";
2
2
  import k from "../../../../components/Feed/Feed.vue.js";
3
- import E from "../../../../components/Popup/Popup.vue2.js";
3
+ import E from "../../../../components/Popup/Popup.vue.js";
4
4
  import y from "../../../../components/PhotoViewer/PhotoViewer.vue.js";
5
5
  import U from "../../../globals/views/components/sections/SectionPageTitle.vue.js";
6
6
  import R from "../../store/gallery.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("vue-router");;/* empty css */const w=require("../../../../components/Button/Button.vue2.cjs");;/* empty css */const B=require("../../../../components/Chips/Chips.vue.cjs");;/* empty css */const _=require("../../../../components/Popup/Popup.vue2.cjs"),E=require("../../../../components/Feed/Feed.vue.cjs"),U=require("../../../../components/PhotoViewer/PhotoViewer.vue.cjs"),k=require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const o=require("../../store/gallery.cjs"),A=require("../../../globals/views/components/blocks/CardHeader.vue.cjs"),I=require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs"),O=require("../../../../components/EditImages/EditImages.vue.cjs"),T=require("../../../../components/FieldTags/BlockTags.vue.cjs"),R={class:"cols-1 gap-thin pd-thin"},S={class:"pos-relative"},D=["src","onClick"],F={class:"pos-absolute pos-t-0 pos-r-0 pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-r-small mn-t-small w-min bg-second radius-extra"},j={class:"pd-small"},L=["src"],G={class:"flex-nowrap flex gap-thin"},M={__name:"BackofficeGallery",setup(z){const h=C.useRoute(),i=e.ref("all");let c=e.ref({param:"createdAt",order:"desc",options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]}),p=e.ref({start:null,end:null});const f=e.ref(!1);function x(a){f.value=!0,u.value=a}function y(){f.value=!1,u.value=null}const m=e.ref(!1);function V(a){m.value=!0,u.value=a}function v(){m.value=!1,u.value=null,n.value=[],r.value={tags:null,image:null}}const u=e.ref(null);e.ref("all");const r=e.ref({tags:null,image:null}),n=e.ref([]),N=a=>{n.value=a},d=e.ref([]),q=async a=>{await o.default.delete(a._id),o.default.removeItem(a,d.value)},g=async(a,s)=>{a.status=s,await o.default.update(a),o.default.updateItem(a,d.value)},b=async a=>{if(n.length<1){alert("Upload at least 1 image");return}let s=await o.default.create({images:n.value,tags:r.value.tags,status:a,owner:{type:"Organization",target:h.params._id},creator:{type:"User",target:k.state.user._id}});for(let t of s)o.default.addItem(t,d.value)};return(a,s)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(I.default,{title:"Gallery","onUpdate:tabs_current":s[0]||(s[0]=t=>i.value=t),tabs_current:i.value,tabs:[{name:"All",value:"all"},{name:"Featured",value:"featured"},{name:"Published",value:"published"},{name:"Draft",value:"draft"},{name:"Archived",value:"archived"}],actions:[{method:()=>V(null),label:"Add Photo"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current","actions"]),e.createVNode(E.default,{items:d.value,"onUpdate:items":s[1]||(s[1]=t=>d.value=t),sort:e.unref(c),"onUpdate:sort":s[2]||(s[2]=t=>e.isRef(c)?c.value=t:c=t),date:e.unref(p),"onUpdate:date":s[3]||(s[3]=t=>e.isRef(p)?p.value=t:p=t),states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:t=>e.unref(o.default).read(t)},options:{limit:15,owner:e.unref(h).params._id,...i.value!=="all"&&{status:i.value}},class:"cols-3 gap-thin"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,l=>{var P;return e.openBlock(),e.createElementBlock("div",{key:l._id,class:"bg-light radius-small flex-column pos-relative flex-wrap"},[e.createVNode(A.default,{entity:l,entityType:"photo",user:k.state.user._id,owner:l.creator,creator:l.creator,date:l.createdAt,actions:[{method:()=>q(l),label:"Delete"},{method:()=>g(l,"archived"),label:"Archive"},l.status==="draft"?{method:()=>g(l,"published"),label:"Publish"}:{method:()=>g(l,"draft"),label:"Draft"}],class:"pd-small mn-b-small"},null,8,["entity","user","owner","creator","date","actions"]),e.createElementVNode("div",S,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+l.cover,class:"w-100 h-20r object-fit-contain bg-black",onClick:H=>x(l)},null,8,D),e.createElementVNode("div",F,e.toDisplayString(l.status),1)]),e.createElementVNode("div",j,[((P=l.tags)==null?void 0:P.length)>0?(e.openBlock(),e.createBlock(B.default,{key:0,chips:l.tags},null,8,["chips"])):e.createCommentVNode("",!0)])])}),128))]),_:1},8,["items","sort","date","store","options"]),e.createVNode(_.default,{onClosePopup:y,isPopupOpen:f.value,class:"bg-black o-hidden w-100 h-100 radius-big"},{default:e.withCtx(()=>[e.createVNode(U.default,{photoUrl:u.value.image},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"]),e.createVNode(_.default,{title:"Add Photo",onClosePopup:v,isPopupOpen:m.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[r.value.cover?(e.openBlock(),e.createElementBlock("img",{key:0,src:r.value.cover,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,L)):e.createCommentVNode("",!0),e.createVNode(O.default,{images:n.value,uploadPath:"/photos","onUpdate:images":N,class:"mn-b-semi bg-light radius-medium"},null,8,["images"]),e.createVNode(T.default,{onTagsChanged:s[4]||(s[4]=t=>r.value.tags=t),tags:r.value.tags,tagsSuggested:[{text:"people"},{text:"events"},{text:"place"},{text:"food"},{text:"drinks"},{text:"special"}],class:"mn-b-semi"},null,8,["tags"]),e.createElementVNode("div",G,[e.createVNode(w.default,{submit:()=>b("draft"),callback:v,class:"t-nowrap bg-second w-100"},{default:e.withCtx(()=>[e.createTextVNode(" To drafts ")]),_:1},8,["submit"]),e.createVNode(w.default,{submit:()=>b("published"),callback:v,class:"bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Publish ")]),_:1},8,["submit"])])]),_:1},8,["isPopupOpen"])]))}};exports.default=M;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("vue-router");;/* empty css */const w=require("../../../../components/Button/Button.vue2.cjs");;/* empty css */const B=require("../../../../components/Chips/Chips.vue.cjs");;/* empty css */const _=require("../../../../components/Popup/Popup.vue.cjs"),E=require("../../../../components/Feed/Feed.vue.cjs"),U=require("../../../../components/PhotoViewer/PhotoViewer.vue.cjs"),k=require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const o=require("../../store/gallery.cjs"),A=require("../../../globals/views/components/blocks/CardHeader.vue.cjs"),I=require("../../../globals/views/components/sections/SectionPageTitle.vue.cjs"),O=require("../../../../components/EditImages/EditImages.vue.cjs"),T=require("../../../../components/FieldTags/BlockTags.vue.cjs"),R={class:"cols-1 gap-thin pd-thin"},S={class:"pos-relative"},D=["src","onClick"],F={class:"pos-absolute pos-t-0 pos-r-0 pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-r-small mn-t-small w-min bg-second radius-extra"},j={class:"pd-small"},L=["src"],G={class:"flex-nowrap flex gap-thin"},M={__name:"BackofficeGallery",setup(z){const h=C.useRoute(),i=e.ref("all");let c=e.ref({param:"createdAt",order:"desc",options:[{label:"Date",value:"createdAt"},{label:"Popularity",value:"views"},{label:"Creator",value:"creator"}]}),p=e.ref({start:null,end:null});const f=e.ref(!1);function x(a){f.value=!0,u.value=a}function y(){f.value=!1,u.value=null}const m=e.ref(!1);function V(a){m.value=!0,u.value=a}function v(){m.value=!1,u.value=null,n.value=[],r.value={tags:null,image:null}}const u=e.ref(null);e.ref("all");const r=e.ref({tags:null,image:null}),n=e.ref([]),N=a=>{n.value=a},d=e.ref([]),q=async a=>{await o.default.delete(a._id),o.default.removeItem(a,d.value)},g=async(a,s)=>{a.status=s,await o.default.update(a),o.default.updateItem(a,d.value)},b=async a=>{if(n.length<1){alert("Upload at least 1 image");return}let s=await o.default.create({images:n.value,tags:r.value.tags,status:a,owner:{type:"Organization",target:h.params._id},creator:{type:"User",target:k.state.user._id}});for(let t of s)o.default.addItem(t,d.value)};return(a,s)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(I.default,{title:"Gallery","onUpdate:tabs_current":s[0]||(s[0]=t=>i.value=t),tabs_current:i.value,tabs:[{name:"All",value:"all"},{name:"Featured",value:"featured"},{name:"Published",value:"published"},{name:"Draft",value:"draft"},{name:"Archived",value:"archived"}],actions:[{method:()=>V(null),label:"Add Photo"}],class:"mn-b-small bg-light bg-light radius-big"},null,8,["tabs_current","actions"]),e.createVNode(E.default,{items:d.value,"onUpdate:items":s[1]||(s[1]=t=>d.value=t),sort:e.unref(c),"onUpdate:sort":s[2]||(s[2]=t=>e.isRef(c)?c.value=t:c=t),date:e.unref(p),"onUpdate:date":s[3]||(s[3]=t=>e.isRef(p)?p.value=t:p=t),states:{empty:{title:"No Photos Found",description:"Currently, there are no photos in gallery."}},store:{read:t=>e.unref(o.default).read(t)},options:{limit:15,owner:e.unref(h).params._id,...i.value!=="all"&&{status:i.value}},class:"cols-3 gap-thin"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,l=>{var P;return e.openBlock(),e.createElementBlock("div",{key:l._id,class:"bg-light radius-small flex-column pos-relative flex-wrap"},[e.createVNode(A.default,{entity:l,entityType:"photo",user:k.state.user._id,owner:l.creator,creator:l.creator,date:l.createdAt,actions:[{method:()=>q(l),label:"Delete"},{method:()=>g(l,"archived"),label:"Archive"},l.status==="draft"?{method:()=>g(l,"published"),label:"Publish"}:{method:()=>g(l,"draft"),label:"Draft"}],class:"pd-small mn-b-small"},null,8,["entity","user","owner","creator","date","actions"]),e.createElementVNode("div",S,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+l.cover,class:"w-100 h-20r object-fit-contain bg-black",onClick:H=>x(l)},null,8,D),e.createElementVNode("div",F,e.toDisplayString(l.status),1)]),e.createElementVNode("div",j,[((P=l.tags)==null?void 0:P.length)>0?(e.openBlock(),e.createBlock(B.default,{key:0,chips:l.tags},null,8,["chips"])):e.createCommentVNode("",!0)])])}),128))]),_:1},8,["items","sort","date","store","options"]),e.createVNode(_.default,{onClosePopup:y,isPopupOpen:f.value,class:"bg-black o-hidden w-100 h-100 radius-big"},{default:e.withCtx(()=>[e.createVNode(U.default,{photoUrl:u.value.image},null,8,["photoUrl"])]),_:1},8,["isPopupOpen"]),e.createVNode(_.default,{title:"Add Photo",onClosePopup:v,isPopupOpen:m.value,class:"bg-white w-max-30r radius-big pd-big"},{default:e.withCtx(()=>[r.value.cover?(e.openBlock(),e.createElementBlock("img",{key:0,src:r.value.cover,class:"radius-small w-100 mn-b-small h-20r object-fit-cover"},null,8,L)):e.createCommentVNode("",!0),e.createVNode(O.default,{images:n.value,uploadPath:"/photos","onUpdate:images":N,class:"mn-b-semi bg-light radius-medium"},null,8,["images"]),e.createVNode(T.default,{onTagsChanged:s[4]||(s[4]=t=>r.value.tags=t),tags:r.value.tags,tagsSuggested:[{text:"people"},{text:"events"},{text:"place"},{text:"food"},{text:"drinks"},{text:"special"}],class:"mn-b-semi"},null,8,["tags"]),e.createElementVNode("div",G,[e.createVNode(w.default,{submit:()=>b("draft"),callback:v,class:"t-nowrap bg-second w-100"},{default:e.withCtx(()=>[e.createTextVNode(" To drafts ")]),_:1},8,["submit"]),e.createVNode(w.default,{submit:()=>b("published"),callback:v,class:"bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Publish ")]),_:1},8,["submit"])])]),_:1},8,["isPopupOpen"])]))}};exports.default=M;
@@ -5,7 +5,7 @@ import I from "../../../../components/Button/Button.vue2.js";
5
5
  /* empty css */
6
6
  import G from "../../../../components/Chips/Chips.vue.js";
7
7
  /* empty css */
8
- import O from "../../../../components/Popup/Popup.vue2.js";
8
+ import O from "../../../../components/Popup/Popup.vue.js";
9
9
  import z from "../../../../components/Feed/Feed.vue.js";
10
10
  import q from "../../../../components/PhotoViewer/PhotoViewer.vue.js";
11
11
  import { state as D } from "../../../auth/views/store/auth.js";
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("./views/localization/get-browser-locale.cjs"),g=require("./views/router/scrollBehavior.cjs"),s=require("./views/components/layouts/App.vue.cjs"),i=require("./views/mixins/mixins.cjs"),r=require("./views/store/globals.cjs");function b(e,t,a,n={}){n.route,e.config.globalProperties.DOMAIN_URL=process.env.DOMAIN_URL,e.config.globalProperties.API_URL=process.env.API_URL,e.config.globalProperties.MOBILE_APP=process.env.MOBILE_APP,e.config.globalProperties.FILE_SERVER_URL=process.env.FILE_SERVER_URL,e.config.globalProperties.GOOGLE_MAPS_API_KEY=process.env.GOOGLE_MAPS_API_KEY,e.mixin(i.globalMixins),a.beforeEach((c,P,o)=>{const l=c.params.locale;return l?e.config.globalProperties.$i18n.availableLocales.includes(l)?(e.config.globalProperties.$i18n.locale=l,o()):o({path:"/404"}):o()}),t.addStore("globals",r)}const f={initialize:b,views:{store:{storeGlobals:r},router:{},components:{layoutApp:s.default}}};exports.getBrowserLocale=u.default;exports.scrollBehavior=g.default;exports.layoutApp=s.default;exports.mixins=i;exports.storeGlobals=r;exports.default=f;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("./views/localization/get-browser-locale.cjs"),g=require("./views/router/scrollBehavior.cjs"),n=require("./views/components/layouts/App.vue.cjs"),s=require("./views/components/layouts/Client.vue.cjs"),a=require("./views/mixins/mixins.cjs"),i=require("./views/store/globals.cjs");function P(e,c,o,u={}){const l=u.route||"Home";e.config.globalProperties.DOMAIN_URL=process.env.DOMAIN_URL,e.config.globalProperties.API_URL=process.env.API_URL,e.config.globalProperties.MOBILE_APP=process.env.MOBILE_APP,e.config.globalProperties.FILE_SERVER_URL=process.env.FILE_SERVER_URL,e.config.globalProperties.GOOGLE_MAPS_API_KEY=process.env.GOOGLE_MAPS_API_KEY,e.mixin(a.globalMixins),o.beforeEach((d,_,r)=>{const t=d.params.locale;return t?e.config.globalProperties.$i18n.availableLocales.includes(t)?(e.config.globalProperties.$i18n.locale=t,r()):r({path:"/404"}):r()}),c.addStore("globals",i),o.addRoute(l,{path:"404",name:"notfound",component:()=>Promise.resolve().then(()=>require("./views/components/pages/404.vue.cjs"))}),o.addRoute(l,{path:"401",name:"unauthorized",component:()=>Promise.resolve().then(()=>require("./views/components/pages/401.vue.cjs"))}),o.addRoute(l,{path:":pathMatch(.*)*",name:"NotFound",redirect:{name:"notfound"}})}const b={initialize:P,views:{store:{storeGlobals:i},router:{},components:{layoutClient:s.default,layoutApp:n.default}}};exports.getBrowserLocale=f.default;exports.scrollBehavior=g.default;exports.layoutApp=n.default;exports.layoutClient=s.default;exports.mixins=a;exports.storeGlobals=i;exports.default=b;