@ozdao/prometheus-framework 0.1.78 → 0.1.80
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.css +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +2 -224
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +224 -2
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +33 -30
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +41 -43
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +33 -35
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +44 -46
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +83 -81
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +44 -46
- package/dist/prometheus-framework/src/modules/auth/localization/SignIn.json.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/localization/SignIn.json.js +38 -0
- package/dist/prometheus-framework/src/modules/auth/router/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/router/auth.js +114 -111
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +93 -75
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js +4 -3
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.js +12 -11
- package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.js +12 -11
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +5 -4
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +20 -19
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +15 -13
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
- package/dist/prometheus-framework.cjs.js +10 -10
- package/dist/prometheus-framework.es.js +8 -5
- package/dist/style.css +1 -1
- package/package.json +1 -2
- package/src/components/Field/Field.vue +4 -1
- package/src/modules/auth/components/layouts/Auth.vue +45 -36
- package/src/modules/auth/components/pages/EnterCode.vue +0 -17
- package/src/modules/auth/components/pages/EnterPassword.vue +0 -23
- package/src/modules/auth/components/pages/ResetPassword.vue +0 -27
- package/src/modules/auth/components/pages/SignIn.vue +26 -54
- package/src/modules/auth/components/pages/SignUp.vue +0 -29
- package/src/modules/auth/localization/EnterCode.json +14 -0
- package/src/modules/auth/localization/EnterPassword.json +20 -0
- package/src/modules/auth/localization/ResetPassword.json +24 -0
- package/src/modules/auth/localization/SignIn.json +34 -0
- package/src/modules/auth/localization/SignUp.json +26 -0
- package/src/modules/auth/router/auth.js +95 -86
- package/src/modules/auth/store/auth.js +20 -20
- package/src/modules/constructor/components/elements/Bullets.vue +1 -0
- package/src/modules/constructor/components/elements/Caption.vue +1 -0
- package/src/modules/constructor/components/elements/H2.vue +1 -0
- package/src/modules/constructor/components/elements/ImageUpload.vue +1 -1
- package/src/modules/constructor/components/elements/Textarea.vue +1 -0
- package/src/modules/globals/localization/methods/get-app-locales.js +13 -0
- package/src/modules/globals/localization/vue-i18n.js +20 -14
- package/src/modules/globals/localization/vue-i18n.singleton.js +1 -1
- package/src/modules/middlewares/client/inputs.validation.js +1 -0
- package/src/modules/globals/localization/vue-i18n-new.js +0 -70
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./H2.vue2.cjs");const f=["placeholder"],k={__name:"H2",props:["obj","label","prop","value","content","textarea","placeholder","index","ref","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(a,{emit:c}){const t=a;e.ref(t);const o=e.ref(null);e.ref(0);function d(
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./H2.vue2.cjs");const f=["placeholder"],k={__name:"H2",props:["obj","label","prop","value","content","textarea","placeholder","index","ref","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(a,{emit:c}){const t=a;e.ref(t);const o=e.ref(null);e.ref(0);function d(n){let l=n.target.value.split(/\n+/);if(l.length>1){t.prop[t.content]=l[0],e.nextTick(()=>{r()});let u=l.slice(1).map(p=>({type:"Textarea",content:p}));c("addBlock","Textarea","",t.index,{blocks:u,ref:o})}else n.target.value.trim()===""&&n.target.value.includes(`
|
2
2
|
|
3
|
-
`)&&(console.log("We are adding new block:"+t.index+newBlocks+o),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:o})),r()}function i(
|
3
|
+
`)&&(console.log("We are adding new block:"+t.index+newBlocks+o),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:o})),r()}function i(n){(n.keyCode===8||n.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function s(){e.nextTick(()=>{o.value.focus(),c("updateBlock",t.prop,{setFocus:!1})})}function r(){o.value.style.height="1rem",o.value.style.height=o.value.scrollHeight+"px"}return e.onUpdated(()=>{t.setFocus&&e.nextTick(()=>{s()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{s()}),r()}),e.watch(()=>t.prop[t.content],n=>{}),(n,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":l[0]||(l[0]=u=>a.prop[a.content]=u),placeholder:a.placeholder?a.placeholder:"Enter text",onInput:d,onFocus:l[1]||(l[1]=u=>c("focus",o.value)),onKeyup:i,ref_key:"textarea",ref:o,tabindex:"-1",class:"h3 text-area mn-thin"},`
|
4
4
|
`,40,f),[[e.vModelText,a.prop[a.content]]])]))}};exports.default=k;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ref as
|
1
|
+
import { ref as s, onUpdated as k, nextTick as d, onMounted as x, watch as h, openBlock as B, createElementBlock as g, withDirectives as m, createElementVNode as v, vModelText as y } from "vue";
|
2
2
|
import "./H2.vue2.js";
|
3
3
|
const w = ["placeholder"], T = {
|
4
4
|
__name: "H2",
|
@@ -6,13 +6,13 @@ const w = ["placeholder"], T = {
|
|
6
6
|
emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
|
7
7
|
setup(n, { emit: a }) {
|
8
8
|
const e = n;
|
9
|
-
|
10
|
-
const t =
|
11
|
-
|
9
|
+
s(e);
|
10
|
+
const t = s(null);
|
11
|
+
s(0);
|
12
12
|
function p(o) {
|
13
13
|
let l = o.target.value.split(/\n+/);
|
14
14
|
if (l.length > 1) {
|
15
|
-
e.prop[e.content] = l[0],
|
15
|
+
e.prop[e.content] = l[0], d(() => {
|
16
16
|
c();
|
17
17
|
});
|
18
18
|
let r = l.slice(1).map((f) => ({ type: "Textarea", content: f }));
|
@@ -25,8 +25,8 @@ const w = ["placeholder"], T = {
|
|
25
25
|
function i(o) {
|
26
26
|
(o.keyCode === 8 || o.keyCode === 46) && e.prop[e.content].trim() === "" && a("deleteBlock", e.prop);
|
27
27
|
}
|
28
|
-
function
|
29
|
-
|
28
|
+
function u() {
|
29
|
+
d(() => {
|
30
30
|
t.value.focus(), a("updateBlock", e.prop, { setFocus: !1 });
|
31
31
|
});
|
32
32
|
}
|
@@ -34,12 +34,12 @@ const w = ["placeholder"], T = {
|
|
34
34
|
t.value.style.height = "1rem", t.value.style.height = t.value.scrollHeight + "px";
|
35
35
|
}
|
36
36
|
return k(() => {
|
37
|
-
e.setFocus &&
|
38
|
-
|
37
|
+
e.setFocus && d(() => {
|
38
|
+
u();
|
39
39
|
}), c();
|
40
40
|
}), x(() => {
|
41
|
-
e.setFocus &&
|
42
|
-
|
41
|
+
e.setFocus && d(() => {
|
42
|
+
u();
|
43
43
|
}), c();
|
44
44
|
}), h(() => e.prop[e.content], (o) => {
|
45
45
|
}), (o, l) => (B(), g("div", null, [
|
@@ -51,6 +51,7 @@ const w = ["placeholder"], T = {
|
|
51
51
|
onKeyup: i,
|
52
52
|
ref_key: "textarea",
|
53
53
|
ref: t,
|
54
|
+
tabindex: "-1",
|
54
55
|
class: "h3 text-area mn-thin"
|
55
56
|
}, `
|
56
57
|
`, 40, w), [
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../../node_modules/axios/lib/axios.cjs"),k=["src"],v={key:1,class:"t-transp pd-extra"},h={__name:"ImageUpload",props:["label","value","prop"],emits:["input","updateBlock"],setup(n,{emit:r}){const p=n,l=e.ref(null),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../../node_modules/axios/lib/axios.cjs"),k=["src"],v={key:1,class:"t-transp pd-extra"},h={__name:"ImageUpload",props:["label","value","prop"],emits:["input","updateBlock"],setup(n,{emit:r}){const p=n,l=e.ref(null),i=e.ref(null);function u(){i.value.click()}async function s(t){let o=t.target.files[0];console.log(o);let a=new FormData,f="unsorted";a.append("file",o),console.log(a.has("file"));try{let m=await g.default.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/file?folderName=${encodeURIComponent(f)}`,a,{headers:{"Content-Type":"multipart/form-data"}});l.value=m.data.filepath,console.log(l.value),r("input",l.value),r("updateBlock",p.prop,{content:l.value})}catch(c){console.error(c)}}function d(t){t.preventDefault(),s({target:{files:t.dataTransfer.files}})}return(t,o)=>(e.openBlock(),e.createElementBlock("div",{onClick:u,onDrop:d,onDragover:o[0]||(o[0]=e.withModifiers(()=>{},["prevent"])),class:"w-100 radius-big bg-white image-upload-area flex-v-center flex-h-center flex t-black mn-small"},[n.prop.content?(e.openBlock(),e.createElementBlock("img",{key:0,src:(t.FILE_SERVER_URL||"")+n.prop.content,alt:"Uploaded image",class:"w-100 h-30r object-fit-contain"},null,8,k)):(e.openBlock(),e.createElementBlock("span",v,"Click or drag-and-drop your image")),e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:i,tabindex:"-1",onChange:s,style:{display:"none"}},null,544)],32))}};exports.default=h;
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import { ref as u, openBlock as l, createElementBlock as r, withModifiers as k, createElementVNode as v } from "vue";
|
2
2
|
import y from "../../../../../node_modules/axios/lib/axios.js";
|
3
|
-
const
|
3
|
+
const x = ["src"], C = {
|
4
4
|
key: 1,
|
5
5
|
class: "t-transp pd-extra"
|
6
|
-
},
|
6
|
+
}, U = {
|
7
7
|
__name: "ImageUpload",
|
8
8
|
props: [
|
9
9
|
"label",
|
@@ -51,11 +51,12 @@ const C = ["src"], x = {
|
|
51
51
|
src: (e.FILE_SERVER_URL || "") + a.prop.content,
|
52
52
|
alt: "Uploaded image",
|
53
53
|
class: "w-100 h-30r object-fit-contain"
|
54
|
-
}, null, 8,
|
54
|
+
}, null, 8, x)) : (l(), r("span", C, "Click or drag-and-drop your image")),
|
55
55
|
v("input", {
|
56
56
|
type: "file",
|
57
57
|
ref_key: "fileInput",
|
58
58
|
ref: s,
|
59
|
+
tabindex: "-1",
|
59
60
|
onChange: p,
|
60
61
|
style: { display: "none" }
|
61
62
|
}, null, 544)
|
@@ -63,5 +64,5 @@ const C = ["src"], x = {
|
|
63
64
|
}
|
64
65
|
};
|
65
66
|
export {
|
66
|
-
|
67
|
+
U as default
|
67
68
|
};
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Textarea.vue2.cjs");const f=["placeholder"],k={__name:"Textarea",props:["prop","value","content","placeholder","index","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(l,{emit:c}){const t=l;e.ref(t);const
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Textarea.vue2.cjs");const f=["placeholder"],k={__name:"Textarea",props:["prop","value","content","placeholder","index","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(l,{emit:c}){const t=l;e.ref(t);const n=e.ref(null);e.ref(0);function d(a){let o=a.target.value.split(/\n+/);if(o.length>1){t.prop[t.content]=o[0],e.nextTick(()=>{r()});let u=o.slice(1).map(p=>({__name:"Textarea",content:p}));c("addBlock","Textarea","",t.index,{blocks:u,ref:n})}else a.target.value.trim()===""&&a.target.value.includes(`
|
2
2
|
|
3
|
-
`)&&(console.log("We are adding new block:"+t.index+newBlocks+
|
3
|
+
`)&&(console.log("We are adding new block:"+t.index+newBlocks+n),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:n})),r()}function i(a){(a.keyCode===8||a.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function s(){e.nextTick(()=>{n.value.focus(),c("updateBlock",t.prop,{setFocus:!1})})}function r(){n.value.style.height="1rem",n.value.style.height=n.value.scrollHeight+"px"}return e.onUpdated(()=>{t.setFocus&&e.nextTick(()=>{s()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{s()}),r()}),(a,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=u=>l.prop[l.content]=u),placeholder:l.placeholder?l.placeholder:"Enter text",onInput:d,onFocus:o[1]||(o[1]=u=>c("focus",n.value)),onKeyup:i,ref_key:"textarea",ref:n,tabindex:"-1",class:"text-area mn-thin"},`
|
4
4
|
`,40,f),[[e.vModelText,l.prop[l.content]]])]))}};exports.default=k;
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js
CHANGED
@@ -1,32 +1,32 @@
|
|
1
|
-
import { ref as
|
1
|
+
import { ref as s, onUpdated as k, nextTick as d, onMounted as x, openBlock as h, createElementBlock as B, withDirectives as m, createElementVNode as g, vModelText as v } from "vue";
|
2
2
|
import "./Textarea.vue2.js";
|
3
3
|
const y = ["placeholder"], F = {
|
4
4
|
__name: "Textarea",
|
5
5
|
props: ["prop", "value", "content", "placeholder", "index", "setFocus"],
|
6
6
|
emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
|
7
|
-
setup(
|
8
|
-
const e =
|
9
|
-
|
10
|
-
const t =
|
11
|
-
|
12
|
-
function i(
|
13
|
-
let o =
|
7
|
+
setup(n, { emit: a }) {
|
8
|
+
const e = n;
|
9
|
+
s(e);
|
10
|
+
const t = s(null);
|
11
|
+
s(0);
|
12
|
+
function i(l) {
|
13
|
+
let o = l.target.value.split(/\n+/);
|
14
14
|
if (o.length > 1) {
|
15
|
-
e.prop[e.content] = o[0],
|
15
|
+
e.prop[e.content] = o[0], d(() => {
|
16
16
|
c();
|
17
17
|
});
|
18
18
|
let r = o.slice(1).map((f) => ({ __name: "Textarea", content: f }));
|
19
19
|
a("addBlock", "Textarea", "", e.index, { blocks: r, ref: t });
|
20
20
|
} else
|
21
|
-
|
21
|
+
l.target.value.trim() === "" && l.target.value.includes(`
|
22
22
|
|
23
23
|
`) && (console.log("We are adding new block:" + e.index + newBlocks + t), a("addBlock", "Textarea", "", e.index, { blocks: newBlocks, ref: t })), c();
|
24
24
|
}
|
25
|
-
function p(
|
26
|
-
(
|
25
|
+
function p(l) {
|
26
|
+
(l.keyCode === 8 || l.keyCode === 46) && e.prop[e.content].trim() === "" && a("deleteBlock", e.prop);
|
27
27
|
}
|
28
28
|
function u() {
|
29
|
-
|
29
|
+
d(() => {
|
30
30
|
t.value.focus(), a("updateBlock", e.prop, { setFocus: !1 });
|
31
31
|
});
|
32
32
|
}
|
@@ -34,26 +34,27 @@ const y = ["placeholder"], F = {
|
|
34
34
|
t.value.style.height = "1rem", t.value.style.height = t.value.scrollHeight + "px";
|
35
35
|
}
|
36
36
|
return k(() => {
|
37
|
-
e.setFocus &&
|
37
|
+
e.setFocus && d(() => {
|
38
38
|
u();
|
39
39
|
}), c();
|
40
40
|
}), x(() => {
|
41
|
-
e.setFocus &&
|
41
|
+
e.setFocus && d(() => {
|
42
42
|
u();
|
43
43
|
}), c();
|
44
|
-
}), (
|
44
|
+
}), (l, o) => (h(), B("div", null, [
|
45
45
|
m(g("textarea", {
|
46
|
-
"onUpdate:modelValue": o[0] || (o[0] = (r) =>
|
47
|
-
placeholder:
|
46
|
+
"onUpdate:modelValue": o[0] || (o[0] = (r) => n.prop[n.content] = r),
|
47
|
+
placeholder: n.placeholder ? n.placeholder : "Enter text",
|
48
48
|
onInput: i,
|
49
49
|
onFocus: o[1] || (o[1] = (r) => a("focus", t.value)),
|
50
50
|
onKeyup: p,
|
51
51
|
ref_key: "textarea",
|
52
52
|
ref: t,
|
53
|
+
tabindex: "-1",
|
53
54
|
class: "text-area mn-thin"
|
54
55
|
}, `
|
55
56
|
`, 40, y), [
|
56
|
-
[v,
|
57
|
+
[v, n.prop[n.content]]
|
57
58
|
])
|
58
59
|
]));
|
59
60
|
}
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),l=require("../../../../components/Button/Button.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),l=require("../../../../components/Button/Button.vue2.cjs");require("../../../auth/store/auth.cjs");const c=require("../../store/tickets.cjs");require("./ButtonJoin.vue2.cjs");const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),g={__name:"ButtonJoin",props:{type:{type:String,required:!0},userId:{type:String,required:!0},hasTicket:{type:Boolean,required:!0},targetId:{type:String,required:!0}},emits:["updateTicket"],setup(o,{emit:n}){const t=o,s=async()=>{t.hasTicket?await d(t.targetId):await u(t.targetId)};async function u(i){try{const e={type:t.type,target:i,user:t.userId},r=await c.actions.create(e);n("updateTicket",{ticket:r,hasTicket:!0,targetId:t.targetId})}catch(e){throw console.log(e),e}}async function d(i){const e={type:t.type,target:i,user:t.userId};try{const r=await c.actions.delete(e);n("updateTicket",{ticket:r,hasTicket:!1,targetId:t.targetId})}catch(r){throw console.log(r),r}}return(i,e)=>(a.openBlock(),a.createBlock(l.default,{submit:s,class:"bg-main button-small radius-extra button"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(o.hasTicket?"Leave":"Join"),1)]),_:1}))}},k=p.default(g,[["__scopeId","data-v-872ff798"]]);exports.default=k;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { openBlock as p, createBlock as d, withCtx as g, createTextVNode as l, toDisplayString as m } from "vue";
|
2
|
-
import k from "../../../../components/Button/Button.
|
2
|
+
import k from "../../../../components/Button/Button.vue2.js";
|
3
3
|
import "../../../auth/store/auth.js";
|
4
4
|
import { actions as c } from "../../store/tickets.js";
|
5
5
|
import "./ButtonJoin.vue2.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../constructor/components/elements/Textarea.vue2.cjs");const N=require("../../../constructor/components/sections/Constructor.vue.cjs"),E=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.cjs");const y=require("../../../../components/Popup/Popup.vue.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/FieldTags/BlockTags.vue.cjs"),P=require("../../../../components/Checkbox/Checkbox.vue.cjs"),C=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),x=require("../../../../components/UploadImage/UploadImage.vue.cjs"),B=require("../../../../components/Button/Button.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../constructor/components/elements/Textarea.vue2.cjs");const N=require("../../../constructor/components/sections/Constructor.vue.cjs"),E=require("../../../../../node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs");require("../../../../../node_modules/@vuepic/vue-datepicker/dist/main.css.cjs");const y=require("../../../../components/Popup/Popup.vue.cjs"),f=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/FieldTags/BlockTags.vue.cjs"),P=require("../../../../components/Checkbox/Checkbox.vue.cjs"),C=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),x=require("../../../../components/UploadImage/UploadImage.vue.cjs"),B=require("../../../../components/Button/Button.vue2.cjs"),v=require("vue-router"),s=require("../../store/events.cjs"),u=require("../../../auth/store/auth.cjs"),D=require("../../../organizations/store/organizations.cjs");require("./EditEvent.vue2.cjs");const U={key:0,class:"h-100 pd-thin"},T={class:"mn-thin radius-small w-100 h-10r bg-grey flex-center flex-column flex"},z=e.createElementVNode("h4",null,"Upload Event Cover",-1),O=e.createElementVNode("h3",{class:"mn-small"},"Date",-1),M=e.createElementVNode("h3",{class:"mn-small"},"Description",-1),S={key:0,class:"pd-b-extra w-100 bg-grey pd-big radius-big"},A={key:1,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},R={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},$=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),F=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),j={key:0,class:"mn-thin"},H={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},G={__name:"EditEvent",setup(J){const i=v.useRoute(),d=v.useRouter();let t=e.ref(null),p=e.ref(null);const m=e.ref([]),n=e.ref(null),r=e.ref(),h=()=>({top:0,left:0});e.onMounted(async()=>{if(i.params.url){const a=await s.read({user:u.state.user._id,url:i.params.url});t.value=a.pop();const l=t.value.date.start,_=t.value.date.end;r.value=[l,_]}else{s.clean(),t.value=s.state.current;const a=new Date,l=new Date;r.value=[a,l]}t.value.owner||(t.value.owner={target:u.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:u.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(n.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const o=await D.actions.read({user:u.state.user._id,postable:u.state.user._id,limit:100});p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const c=e.ref(!1);function g(){c.value=!0}function b(){c.value=!1}function k(){m.value.length>0&&m.value.map(o=>o.text),t.value.status="draft",t.value.date={start:r.value[0],end:r.value[1]},i.params.url?s.update(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.error(o)}):s.create(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.error(o)})}function V(){n.value&&(t.value.owner={target:n.value._id,type:"organization"}),n.value||(t.value.creator.hidden=!1),n.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.date={start:r.value[0],end:r.value[1]},console.log(r.value),i.params.url?s.update(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.log(o)}):s.create(t.value).then(o=>{d.push({name:"Event",params:{url:o.url}})}).catch(o=>{console.log(o)})}function w(){confirm("Are you sure you want to delete this event?")&&s.remove(t.value._id).then(o=>{d.push({name:"User Events",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.error(o)})}return(o,a)=>e.unref(t)?(e.openBlock(),e.createElementBlock("article",U,[e.createElementVNode("div",T,[e.createVNode(x.default,{photo:e.unref(t).cover,"onUpdate:photo":a[0]||(a[0]=l=>e.unref(t).cover=l),uploadPath:"users/"+u.state.user._id+"/events",class:"h-4r w-4r aspect-1x1 o-hidden mn-thin radius-extra"},null,8,["photo","uploadPath"]),z]),e.createVNode(f.default,{field:e.unref(t).name,"onUpdate:field":a[1]||(a[1]=l=>e.unref(t).name=l),placeholder:"Event name",class:"mn-thin w-100 bg-grey pd-medium radius-small"},null,8,["field"]),e.createVNode(f.default,{field:e.unref(t).description,"onUpdate:field":a[2]||(a[2]=l=>e.unref(t).description=l),type:"textfield",placeholder:"Enter short description",class:"mn-semi w-100 bg-grey pd-medium radius-small"},null,8,["field"]),O,e.createVNode(e.unref(E.default),{modelValue:r.value,"onUpdate:modelValue":a[3]||(a[3]=l=>r.value=l),"alt-position":h,range:"",class:"mn-semi"},null,8,["modelValue"]),M,e.unref(t)?(e.openBlock(),e.createElementBlock("section",S,[e.createVNode(N.default,{content:e.unref(t).content,onUpdate:a[4]||(a[4]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",A,[e.createElementVNode("div",R,[e.unref(i).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[5]||(a[5]=l=>w()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[6]||(a[6]=l=>k()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[7]||(a[7]=l=>g()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:b,isPopupOpen:c.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[$,e.createVNode(q.default,{onTagsChanged:a[8]||(a[8]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),F,e.createVNode(C.default,{modelValue:n.value,"onUpdate:modelValue":a[9]||(a[9]=l=>n.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),n.value?(e.openBlock(),e.createElementBlock("h5",j,"Options:")):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("div",H,[e.createVNode(P.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[10]||(a[10]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(B.default,{submit:V,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])])):e.createCommentVNode("",!0)}};exports.default=G;
|
@@ -9,7 +9,7 @@ import A from "../../../../components/FieldTags/BlockTags.vue.js";
|
|
9
9
|
import B from "../../../../components/Checkbox/Checkbox.vue.js";
|
10
10
|
import F from "../../../../components/SelectMulti/SelectMulti.vue.js";
|
11
11
|
import M from "../../../../components/UploadImage/UploadImage.vue.js";
|
12
|
-
import R from "../../../../components/Button/Button.
|
12
|
+
import R from "../../../../components/Button/Button.vue2.js";
|
13
13
|
import { useRoute as S, useRouter as H } from "vue-router";
|
14
14
|
import { read as L, clean as j, state as q, update as y, create as k, remove as G } from "../../store/events.js";
|
15
15
|
import { state as c } from "../../../auth/store/auth.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const t=require("../sections/Feed.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/Button/Button.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");require("../../../../components/Breadcrumbs/Breadcrumbs.vue.cjs");const t=require("../sections/Feed.vue.cjs");require("../../../../components/Loader/Loader.vue.cjs");require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../../components/Select/Select.vue2.cjs");require("../../../reports/store/reports.cjs");require("../../../../components/Dropdown/Dropdown.vue2.cjs");const i=require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");require("../../../community/store/reactions.cjs");const o=require("../../store/events.cjs");require("../sections/List.vue2.cjs");const s={__name:"Events",setup(c){const r=u.useRoute();return u.useRouter(),(n,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(t.default,{category:e.unref(r).params.category,user:i.state.user._id,period:e.unref(r).query.period,selectedDate:o.state.filter.date},null,8,["category","user","period","selectedDate"])]))}};exports.default=s;
|
@@ -6,7 +6,7 @@ import "../../../../components/Breadcrumbs/Breadcrumbs.vue.js";
|
|
6
6
|
import s from "../sections/Feed.vue.js";
|
7
7
|
import "../../../../components/Loader/Loader.vue.js";
|
8
8
|
import "../../../../components/Popup/Popup.vue2.js";
|
9
|
-
import "../../../../components/Button/Button.
|
9
|
+
import "../../../../components/Button/Button.vue.js";
|
10
10
|
import "../../../../components/Select/Select.vue2.js";
|
11
11
|
import "../../../reports/store/reports.js";
|
12
12
|
import "../../../../components/Dropdown/Dropdown.vue2.js";
|
package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),I=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/Button/Button.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),I=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/Button/Button.vue2.cjs"),M=require("../../../../components/Select/Select.vue.cjs"),s=require("../../store/gallery.cjs"),P=require("../../../../components/EditImages/EditImages.vue.cjs");require("./BackofficeGallery.vue2.cjs");const j=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),c=i=>(e.pushScopeId("data-v-d6a1c805"),i=i(),e.popScopeId(),i),G={class:"pos-relative w-100"},D={class:"mn-semi flex-v-center flex-nowrap flex"},T=c(()=>e.createElementVNode("h1",{class:"mn-r-small"},"Manage Gallery",-1)),U=["data-id"],$=["src","onClick"],F={key:1,class:"radius-small bg-white"},O=["src","onClick"],L={class:"t-black p-small mn-thin"},A=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Size",-1)),H=c(()=>e.createElementVNode("br",null,null,-1)),R={class:"pd-2px radius-big d-inline-block bg-grey"},J={class:"t-black p-small mn-small uppe"},K=c(()=>e.createElementVNode("span",{class:"uppercase t-transp"},"Categories",-1)),Q=c(()=>e.createElementVNode("br",null,null,-1)),W={class:"pd-2px radius-big d-inline-block bg-grey t-semi"},X={class:"flex-nowrap flex"},Y=["onClick"],Z={class:"modal pd-thin"},ee={class:"modal-content radius-big"},te={class:""},le=["src"],oe={key:0,class:"flex-v-center flex m modal pd-big"},ae={class:"modal-content radius-small pd-medium bg-white"},se=["src"],ne=["src"],ce={__name:"BackofficeGallery",setup(i){const r=e.ref(!0),h=e.ref(null);let g=1;const f=10;let _=e.ref(null),k=e.ref(!1);const d=e.ref([]),E=o=>{d.value=o},w=e.computed(()=>y.value==="all"?s.state.gallery:s.state.gallery.filter(o=>o.categories.includes(y.value))),V=async()=>{k.value=!0,await s.actions.fetchGallery(g,f),k.value=!1},u=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),m=e.ref(null),v=o=>{console.log(r.value),r.value?N(o):(u.value="modal",t.value.image=o,b())},N=o=>{u.value="edit-modal",t.value=o||{categories:"",size:"",image:null},b()},n=()=>{t.value={categories:"",size:"",image:!1},m.value=null,B()},b=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},B=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},C=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],x=async o=>{await s.actions.deletePhoto(o)},S=async()=>{await s.actions.updatePhoto(t.value),n()},z=async o=>{if(d.length<1||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({images:d.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(a=>a.trim()):t.value.categories}),n()};let y=e.ref("all");return e.onMounted(async()=>{await s.actions.fetchGallery(g,f),typeof window<"u"&&new IntersectionObserver(a=>{a.some(l=>l.isIntersecting)&&(g+=1,V())}).observe(_.value)}),(o,a)=>(e.openBlock(),e.createElementBlock("div",G,[e.createElementVNode("div",D,[T,r.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=l=>v(null)),class:"t-white t-black bg-second i-big radius-extra"},"+")):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:h,class:"cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w),(l,re)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[!r.value&&h.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 h-100 o-hidden radius-medium object-fit-cover",onClick:p=>v(l.image)},null,8,$)):(e.openBlock(),e.createElementBlock("div",F,[e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 radius-small mn-small h-10r object-fit-cover",onClick:p=>v(l)},null,8,O),e.createElementVNode("p",L,[A,H,e.createElementVNode("span",R,e.toDisplayString(l.size.name),1)]),e.createElementVNode("p",J,[K,Q,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.categories,p=>(e.openBlock(),e.createElementBlock("span",W,e.toDisplayString(p),1))),256))]),e.createElementVNode("div",X,[e.createElementVNode("button",{class:"button-small w-100 button",onClick:p=>x(l._id)},"Delete",8,Y)])]))]),_:2},1024)],8,U))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:_,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Z,[e.createElementVNode("div",ee,[e.createElementVNode("div",te,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,le)])])],512),[[e.vShow,t.value.image!==!1&&u.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&u.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",oe,[e.createElementVNode("div",ae,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof m.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:m.value,class:"radius-small w-100 mn-small h-20r object-fit-cover"},null,8,se)):e.createCommentVNode("",!0),typeof m.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,ne)):e.createCommentVNode("",!0),e.createVNode(M.default,{options:C,label:"Size",select:t.value.size,"onUpdate:select":a[1]||(a[1]=l=>t.value.size=l),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-thin t-black"},null,8,["select"]),e.createVNode(I.default,{field:t.value.categories,"onUpdate:field":a[2]||(a[2]=l=>t.value.categories=l),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-medium t-black"},null,8,["field"]),e.createVNode(P.default,{images:d.value,"onUpdate:images":E,uploadPath:"photos",class:"mn-semi"},null,8,["images"]),e.createVNode(q.default,{submit:t.value._id?S:z,callback:n,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},ie=j.default(ce,[["__scopeId","data-v-d6a1c805"]]);exports.default=ie;
|
package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref as n, computed as q, onMounted as A, openBlock as a, createElementBlock as o, createElementVNode as t, createCommentVNode as f, Fragment as M, renderList as G, unref as L, createVNode as c, Transition as w, withCtx as b, toDisplayString as x, withDirectives as R, vShow as H, createTextVNode as J, pushScopeId as K, popScopeId as Q } from "vue";
|
2
2
|
import W from "../../../../components/Field/Field.vue2.js";
|
3
|
-
import X from "../../../../components/Button/Button.
|
3
|
+
import X from "../../../../components/Button/Button.vue2.js";
|
4
4
|
import Y from "../../../../components/Select/Select.vue.js";
|
5
5
|
import { state as $, actions as d } from "../../store/gallery.js";
|
6
6
|
import Z from "../../../../components/EditImages/EditImages.vue.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),z=require("vue-router"),S=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/Button/Button.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),z=require("vue-router"),S=require("../../../../components/Field/Field.vue2.cjs"),q=require("../../../../components/Button/Button.vue2.cjs"),M=require("../../../../components/Select/Select.vue.cjs"),F=require("../../../../components/Upload/Upload.vue.cjs"),s=require("../../store/gallery.cjs");require("./GalleryWithCategories.vue2.cjs");const I=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),P={class:"pd-medium flex-nowrap flex pd-t-thin pd-b-thin o-scroll"},j=["onClick"],G=["data-id"],R=["src","onClick"],T={class:"modal pd-thin"},U={class:"modal-content radius-big"},D={class:""},L=["src"],O={key:0,class:"flex-v-center flex m modal pd-big"},$={class:"modal-content radius-small pd-medium bg-white"},A=["src"],W=["src"],H={__name:"GalleryWithCategories",setup(K){z.useRoute();const h=!1,m=e.ref(null),_=["all","place","drinks","people","events"];let d=1;const v=10;let g=e.ref(null),p=e.ref(!1);const k=e.computed(()=>c.value==="all"?s.state.gallery:s.state.gallery.filter(a=>a.categories.includes(c.value))),y=async()=>{p.value=!0,await s.actions.fetchGallery(d,v),p.value=!1},r=e.ref(null),t=e.ref({categories:"",size:"",image:!1}),i=e.ref(null),b=a=>{h.value?w(a):(r.value="modal",t.value.image=a,f())},w=a=>{r.value="edit-modal",t.value=a||{categories:"",size:"",image:null},f()},n=()=>{t.value={categories:"",size:"",image:!1},i.value=null,V()},f=()=>{document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"},V=()=>{document.body.style.overflow="",document.documentElement.style.overflow=""},C=[{name:"Small",value:""},{name:"Regular",value:"grid-item--width1 grid-item--height1"},{name:"Medium",value:"grid-item--width2 grid-item--height2"},{name:"Big",value:"grid-item--width3 grid-item--height3"}],E=async()=>{await s.actions.updatePhoto(t.value),n()},N=a=>{const o=a.files;if(t.value.image=o,o&&o.length>0){const l=new FileReader;l.onload=u=>{i.value=u.target.result},l.readAsDataURL(o[0])}},B=async a=>{if(!t.value.image||!t.value.categories||!t.value.size){console.error("All fields are required.");return}await s.actions.createPhoto({...t.value,size:t.value.size,categories:typeof t.value.categories=="string"?t.value.categories.split(",").map(o=>o.trim()):t.value.categories}),n()};let c=e.ref("all");const x=a=>{c.value=a};return e.onMounted(async()=>{await s.actions.fetchGallery(d,v),typeof window<"u"&&new IntersectionObserver(o=>{o.some(l=>l.isIntersecting)&&(d+=1,y())}).observe(g.value)}),(a,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",P,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(_,l=>e.createElementVNode("a",{key:l,onClick:u=>x(l),class:e.normalizeClass(["h3 uppercase mn-r-big",{"t-transp":e.unref(c)!==l}])},e.toDisplayString(a.$t("gallery.categories."+l)),11,j)),64)),e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"grid",ref:m,class:"pd-medium cols-4 gap-thin"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(k),(l,u)=>(e.openBlock(),e.createElementBlock("div",{key:l.id,"data-id":l.id},[e.createVNode(e.Transition,{name:"scaleIn",mode:"in-out"},{default:e.withCtx(()=>[m.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:"https://thecommunephuket.com/photos/"+l.cover,class:"w-100 h-100 o-hidden radius-medium object-fit-cover",onClick:Q=>b(l.image)},null,8,R)):e.createCommentVNode("",!0)]),_:2},1024)],8,G))),128)),e.createElementVNode("div",{ref_key:"sentinel",ref:g,class:"sentinel"},null,512),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",T,[e.createElementVNode("div",U,[e.createElementVNode("div",D,[e.createElementVNode("span",{class:"close",onClick:n},"×"),e.createElementVNode("img",{src:"https://thecommunephuket.com/photos/"+t.value.image},null,8,L)])])],512),[[e.vShow,t.value.image!==!1&&r.value==="modal"]])]),_:1}),e.createVNode(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.value.image!==!1&&r.value==="edit-modal"?(e.openBlock(),e.createElementBlock("div",O,[e.createElementVNode("div",$,[e.createElementVNode("span",{class:"close",onClick:n},"×"),typeof i.value=="string"?(e.openBlock(),e.createElementBlock("img",{key:0,src:i.value,class:"radius-small w-100 mn-small h-20r object-fit-cover"},null,8,A)):e.createCommentVNode("",!0),typeof i.value=="object"&&t.value.image!==null?(e.openBlock(),e.createElementBlock("img",{key:1,class:"radius-small w-100 mn-small h-20r object-fit-cover",src:"/photos/"+t.value.cover},null,8,W)):e.createCommentVNode("",!0),t.value._id?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(F.default,{key:2,id:"photo",name:"photo",type:"file",class:"t-black bg-grey pd-thin radius-small mn-thin",onFileChange:N,multiple:"true"})),e.createVNode(M.default,{options:C,label:"Size",select:t.value.size,"onUpdate:select":o[1]||(o[1]=l=>t.value.size=l),placeholder:"Select Size",class:"bg-grey pd-thin radius-small mn-thin t-black"},null,8,["select"]),e.createVNode(S.default,{field:t.value.categories,"onUpdate:field":o[2]||(o[2]=l=>t.value.categories=l),type:"text",label:"Categories",placeholder:"Enter categories for image (comma separated)",class:"bg-grey pd-thin radius-small mn-medium t-black"},null,8,["field"]),e.createVNode(q.default,{submit:t.value._id?E:B,callback:n,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.value._id?"Update":"Create"),1)]),_:1},8,["submit"])])])):e.createCommentVNode("",!0)]),_:1})],512)]))}},J=I.default(H,[["__scopeId","data-v-34379ac8"]]);exports.default=J;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ref as n, computed as A, onMounted as L, openBlock as o, createElementBlock as i, createElementVNode as s, Fragment as z, renderList as x, normalizeClass as O, unref as S, toDisplayString as E, createCommentVNode as r, createVNode as c, Transition as _, withCtx as p, withDirectives as T, vShow as W, createBlock as q, createTextVNode as H } from "vue";
|
2
2
|
import { useRoute as J } from "vue-router";
|
3
3
|
import K from "../../../../components/Field/Field.vue2.js";
|
4
|
-
import Q from "../../../../components/Button/Button.
|
4
|
+
import Q from "../../../../components/Button/Button.vue2.js";
|
5
5
|
import X from "../../../../components/Select/Select.vue.js";
|
6
6
|
import Y from "../../../../components/Upload/Upload.vue.js";
|
7
7
|
import { state as I, actions as g } from "../../store/gallery.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),h=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),f=require("../../../reports/components/sections/FormReport.vue.cjs"),g=require("../../../../components/Dropdown/Dropdown.vue.cjs");require("../../../../components/Button/Button.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),h=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),f=require("../../../reports/components/sections/FormReport.vue.cjs"),g=require("../../../../components/Dropdown/Dropdown.vue.cjs");require("../../../../components/Button/Button.vue.cjs");require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");const k={key:0,class:"pd-b-zero"},y={class:"w-100 flex-v-center flex-nojustify flex"},w={class:"w-100 flex-nowrap flex-v-center flex"},b=["src"],B={key:2,class:"t-semi"},E={key:1},V={key:2},p={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},x={key:0,class:"w-4r i-thin"},C={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"},N=["src"],$={class:"bg-black pd-thin radius-small"},v=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),M={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type"],setup(t){m.useRouter();function u(o){const r=new Date,i=new Date(o),s=Math.abs(r-i),a=Math.floor(s/1e3),n=Math.floor(a/60),l=Math.floor(n/60),c=Math.floor(l/24),d=Math.floor(c/7);return d>0?`${d} week${d>1?"s":""} ago`:c>0?`${c} day${c>1?"s":""} ago`:l>0?`${l} hour${l>1?"s":""} ago`:n>0?`${n} minute${n>1?"s":""} ago`:"Just now"}return(o,r)=>{var i,s;return t.owner?(e.openBlock(),e.createElementBlock("header",k,[e.createElementVNode("div",y,[e.createElementVNode("div",w,[t.owner.target.profile.photo.length>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(o.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,b)):e.createCommentVNode("",!0),!t.owner.target.profile.photo&&t.type!=="short"?(e.openBlock(),e.createBlock(h.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",B,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(a=>o.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(t.owner.target.profile.name),1),!t.creator.hidden&&t.owner.target.profile.name!==((i=t.creator.target.profile)==null?void 0:i.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(a=>o.$router.push({name:"User Profile",params:{_id:t.creator.target._id}}),["stop"]))}," · by "+e.toDisplayString((s=t.creator.target.profile)==null?void 0:s.name),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",E," · "+e.toDisplayString(u(t.date)),1)):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",V," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",p,[t.members?(e.openBlock(),e.createElementBlock("div",x,[e.createElementVNode("span",C,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(a,n)=>(e.openBlock(),e.createElementBlock("img",{key:n,src:(o.FILE_SERVER_URL||"")+a,style:e.normalizeStyle({position:"absolute",top:"0px",right:n*20+20+"%",zIndex:1-n}),class:"br-solid br-2px br-white i-thin bg-grey radius-big"},null,12,N))),128))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user&&t.user!=t.creator.target._id?(e.openBlock(),e.createBlock(g.default,{key:3,label:"...",align:"right",class:"cursor-pointer z-index-2 pd-thin radius-extra"},{default:e.withCtx(()=>[e.createElementVNode("section",$,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(f.default,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[v]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}};exports.default=M;
|
@@ -3,7 +3,7 @@ import { useRouter as v } from "vue-router";
|
|
3
3
|
import p from "../../../icons/placeholders/PlaceholderUserpic.vue.js";
|
4
4
|
import E from "../../../reports/components/sections/FormReport.vue.js";
|
5
5
|
import R from "../../../../components/Dropdown/Dropdown.vue.js";
|
6
|
-
import "../../../../components/Button/Button.
|
6
|
+
import "../../../../components/Button/Button.vue.js";
|
7
7
|
import "../../../auth/store/auth.js";
|
8
8
|
import "../../../organizations/store/memberships.js";
|
9
9
|
const z = {
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue-i18n"),e={en:"🌎 EN",ru:"🇷🇺 RU",zh:"🇨🇳 ZH",fr:"🇫🇷 FR",de:"🇩🇪 DE",it:"🇮🇹 IT"},l={};for(const s of Object.keys(e))l[s]={};const o=a.createI18n({locale:"en",fallbackLocale:"en",legacy:!1,globalInjection:!0,messages:l,availableLocales:Object.keys(e)});exports.default=o;
|
@@ -1,20 +1,22 @@
|
|
1
|
-
import "vue";
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
import { createI18n as s } from "vue-i18n";
|
2
|
+
const e = {
|
3
|
+
en: "🌎 EN",
|
4
|
+
ru: "🇷🇺 RU",
|
5
|
+
zh: "🇨🇳 ZH",
|
6
|
+
fr: "🇫🇷 FR",
|
7
|
+
de: "🇩🇪 DE",
|
8
|
+
it: "🇮🇹 IT"
|
9
|
+
}, a = {};
|
10
|
+
for (const o of Object.keys(e))
|
11
|
+
a[o] = {};
|
12
|
+
const c = s({
|
12
13
|
locale: "en",
|
13
14
|
fallbackLocale: "en",
|
14
15
|
legacy: !1,
|
15
16
|
globalInjection: !0,
|
16
|
-
messages: a
|
17
|
+
messages: a,
|
18
|
+
availableLocales: Object.keys(e)
|
17
19
|
});
|
18
20
|
export {
|
19
|
-
|
21
|
+
c as default
|
20
22
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Button/Button.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Field/Field.vue.cjs");require("../../../../components/Button/Button.vue.cjs");const a=require("../../../mobile/components/Menu/Menu.vue2.cjs"),r=require("../../../mobile/components/Menu/MenuItem.vue.cjs"),n=require("vue-router");require("../../../auth/store/auth.cjs");require("./Legal.vue2.cjs");const u={class:"for-transition w-100 pd-medium"},l=e.createStaticVNode('<div class="bg-grey radius-medium pd-medium mn-small"><h2 class="mn-small">About No More Snow CO., LTD.</h2><p class="mn-small"> Welcome to NO MORE SNOW CO., LTD.! We are dedicated to providing top-notch services and creating a trustworthy environment for our users. Your trust and safety are our priority, and we are committed to being transparent about our policies and practices. </p><p class="mn-small"> If you have any questions, concerns, or feedback, please do not hesitate to contact us through the following details. Our team is always here to assist you! </p><p class="mn-small"> Address: 10/3 Laemsai Rd, Karon, Mueang Phuket District, Phuket 83100<br> Telephone: +660803202142<br> Email: <a href="mailto:hello@thecommunephuket.com">hello@thecommunephuket.com</a><br> Website: <a href="https://thecommunephuket.com" target="_blank">https://thecommunephuket.com</a></p></div>',1),i=e.createElementVNode("span",null,"Terms of Use",-1),c=e.createElementVNode("span",null,"Privacy Policy",-1),d=e.createElementVNode("span",null,"Cookie Policy",-1),m=e.createElementVNode("span",null,"EULA",-1),p={__name:"Legal",setup(h){n.useRoute();const o=n.useRouter();return e.ref(!1),(f,t)=>(e.openBlock(),e.createElementBlock("div",u,[l,e.createVNode(a.default,{class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(r.default,{onClick:t[0]||(t[0]=s=>e.unref(o).push({name:"Terms of Use"})),class:"cursor-pointer"},{default:e.withCtx(()=>[i]),_:1}),e.createVNode(r.default,{onClick:t[1]||(t[1]=s=>e.unref(o).push({name:"Privacy Policy"})),class:"cursor-pointer"},{default:e.withCtx(()=>[c]),_:1}),e.createVNode(r.default,{onClick:t[2]||(t[2]=s=>e.unref(o).push({name:"Cookie Policy"})),class:"cursor-pointer"},{default:e.withCtx(()=>[d]),_:1}),e.createVNode(r.default,{onClick:t[3]||(t[3]=s=>e.unref(o).push({name:"EULA"})),class:"cursor-pointer"},{default:e.withCtx(()=>[m]),_:1})]),_:1})]))}};exports.default=p;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref as l, openBlock as m, createElementBlock as u, createVNode as t, withCtx as o, unref as r, createStaticVNode as c, createElementVNode as a } from "vue";
|
2
2
|
import "../../../../components/Field/Field.vue.js";
|
3
|
-
import "../../../../components/Button/Button.
|
3
|
+
import "../../../../components/Button/Button.vue.js";
|
4
4
|
import p from "../../../mobile/components/Menu/Menu.vue2.js";
|
5
5
|
import n from "../../../mobile/components/Menu/MenuItem.vue.js";
|
6
6
|
import { useRoute as d, useRouter as h } from "vue-router";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),l=require("../../../../components/Button/Button.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),l=require("../../../../components/Button/Button.vue2.cjs");require("../../../auth/store/auth.cjs");const i=require("../../store/memberships.cjs"),m={__name:"ButtonToggleMembership",props:{user:{type:String,required:!0},type:{type:String,required:!0},role:{type:String,required:!1},target:{type:String,required:!0},text:{type:Object,default:{create:"join",remove:"leave"}},status:{type:Boolean,required:!0}},emits:["updateMembership"],setup(o,{emit:u}){const e=o,c=async()=>{e.status?await p():await n()};async function n(){try{const t={user:e.user,type:e.type,role:e.role,target:e.target},s=await i.actions.create(t);u("updateMembership",{membership:s,target:e.target,status:!0})}catch(t){throw console.log(t),t}}async function p(t){const s={user:e.user,type:e.type,role:e.role,target:e.target};try{const a=await i.actions.delete(s);u("updateMembership",{membership:a,target:e.target,status:!1})}catch(a){throw console.log(a),a}}return(t,s)=>(r.openBlock(),r.createBlock(l.default,{submit:c,showSucces:!1,class:"button-small button"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.status?e.text.remove:e.text.create),1)]),_:1}))}};exports.default=m;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { openBlock as n, createBlock as m, withCtx as l, createTextVNode as g, toDisplayString as h } from "vue";
|
2
|
-
import y from "../../../../components/Button/Button.
|
2
|
+
import y from "../../../../components/Button/Button.vue2.js";
|
3
3
|
import "../../../auth/store/auth.js";
|
4
4
|
import { actions as i } from "../../store/memberships.js";
|
5
5
|
const x = {
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router");require("../../../../../../node_modules/js-cookie/src/js.cookie.cjs");const v=require("../../../../components/Breadcrumbs/Breadcrumbs.vue2.cjs"),N=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const m=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue2.cjs");const V=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),r=require("../../../../components/Checkbox/Checkbox.vue.cjs"),g=require("../../../../components/Address/Address.vue.cjs"),y=require("../../../../components/LocationMarker/LocationMarker.vue.cjs"),c=require("../../../../components/Button/Button.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router");require("../../../../../../node_modules/js-cookie/src/js.cookie.cjs");const v=require("../../../../components/Breadcrumbs/Breadcrumbs.vue2.cjs"),N=require("../../../../components/UploadImage/UploadImage.vue.cjs");require("../../../../components/Tab/Tab.vue.cjs");const m=require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Select/Select.vue2.cjs");const V=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),r=require("../../../../components/Checkbox/Checkbox.vue.cjs"),g=require("../../../../components/Address/Address.vue.cjs"),y=require("../../../../components/LocationMarker/LocationMarker.vue.cjs"),c=require("../../../../components/Button/Button.vue2.cjs");require("vue-i18n");require("../../../../components/Popup/Popup.vue2.cjs");require("../../../../../../node_modules/vue-select/dist/vue-select.es.cjs");require("../blocks/EditArray.vue2.cjs");require("../blocks/DepartmentSub.vue2.cjs");require("../blocks/DepartmentMemberModify.vue2.cjs");require("../blocks/User.vue2.cjs");const t=require("../../../spots/store/spots.cjs"),p=require("../../store/memberships.cjs");require("./DepartmentEdit.vue2.cjs");const l=i=>(e.pushScopeId("data-v-6a9ce43d"),i=i(),e.popScopeId(),i),w={class:"for-transition w-100"},E={class:"pd-b-zero pd-t-zero pd-thin"},q={class:"pd-thin"},x={class:"flex-nowrap flex bg-grey pd-medium radius-big"},k={key:0,class:"mn-r-auto"},P={key:1,class:"mn-r-auto"},S={class:"flex-nowrap flex pd-thin"},D={class:"pd-b-zero pd-t-zero pd-thin cols-2 gap-thin"},B={class:"flex-stretch flex-column flex"},U={class:"mn-thin bg-grey pd-medium o-hidden radius-big"},z=l(()=>e.createElementVNode("h3",{class:"mn-semi"},"Profile",-1)),I={class:"radius-small flex-nowrap flex"},O={class:"w-100 flex-child-grow-1 flex-child"},A={class:"bg-grey pd-medium o-hidden radius-big"},C=l(()=>e.createElementVNode("h3",{class:"mn-semi"},"Details",-1)),K=l(()=>e.createElementVNode("p",{class:"p-medium mn-small"},"Please the available delivery options:",-1)),T={class:"mn-medium flex-nowrap flex"},M=l(()=>e.createElementVNode("p",{class:"p-medium mn-small"},"Please select the available payment methods:",-1)),G={class:"flex-nowrap flex"},L={class:"bg-grey pd-medium o-hidden radius-big"},R=l(()=>e.createElementVNode("h3",{class:"mn-semi"},"Location",-1)),Y=l(()=>e.createElementVNode("p",{class:"mn-small p-medium"},"Or choose on map:",-1)),j={class:"flex-nowrap flex pd-thin"},F={__name:"DepartmentEdit",setup(i){const u=n.useRouter(),d=n.useRoute();e.ref("details"),e.ref(!1);async function f(){d.params.department&&await p.actions.read(d.params.department),e.ref(p.state.memberships),await t.actions.read(d.params._id),d.params.department&&await t.actions.readOne(d.params.department)}f(),e.ref(t.state.department.members),e.ref(!1),e.ref(null),e.ref(!1),e.ref(null);async function h(){d.params.department&&await t.actions.update(d.params._id,t.state.department),d.params.department||await t.actions.create(d.params._id,t.state.department)}function _(){u.replace({name:"Department",params:{_id:d.params._id,department:t.state.department._id}})}async function b(){await t.actions.delete(d.params._id,t.state.department)}return(o,a)=>(e.openBlock(),e.createElementBlock("div",w,[e.createElementVNode("div",E,[e.createVNode(v.default,{class:"pd-medium bg-grey radius-big"})]),e.createElementVNode("div",q,[e.createElementVNode("header",x,[e.unref(d).params.department?(e.openBlock(),e.createElementBlock("h1",k,"Edit Spot")):(e.openBlock(),e.createElementBlock("h1",P,"Create Spot")),e.createElementVNode("section",S,[e.createVNode(c.default,{submit:h,callback:_},{default:e.withCtx(()=>[e.createTextVNode("Save Spot")]),_:1})])])]),e.createElementVNode("div",D,[e.createElementVNode("div",B,[e.createElementVNode("div",U,[z,e.createElementVNode("div",I,[e.createVNode(N.default,{photo:t.state.department.profile.photo,"onUpdate:photo":a[0]||(a[0]=s=>t.state.department.profile.photo=s),uploadPath:"organizations/"+t.state.department.name+"/avatars",class:"w-8r aspect-1x1 o-hidden mn-r-small radius-extra"},null,8,["photo","uploadPath"]),e.createElementVNode("div",O,[e.createVNode(m.default,{field:t.state.department.profile.name,"onUpdate:field":a[1]||(a[1]=s=>t.state.department.profile.name=s),label:"Name",placeholder:"Spot Name",class:"mn-small bg-white radius-small pd-medium",validation:o.organizationName},null,8,["field","validation"]),e.createVNode(m.default,{field:t.state.department.profile.description,"onUpdate:field":a[2]||(a[2]=s=>t.state.department.profile.description=s),label:"Description",placeholder:"Spot description (max 120 symbols)",class:"bg-white radius-small pd-medium",validation:o.organizationName},null,8,["field","validation"])])])]),e.createElementVNode("div",A,[C,K,e.createElementVNode("div",T,[e.createVNode(r.default,{label:"Pickup",name:"Delivery",value:"pickup",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(r.default,{label:"Delivery",name:"Delivery",value:"courier",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"]),e.createVNode(r.default,{label:"Post",name:"Delivery",value:"post",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.delivery},null,8,["radio"])]),M,e.createElementVNode("div",G,[e.createVNode(r.default,{label:"Cash",name:"Payment",value:"cash",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.payment},null,8,["radio"]),e.createVNode(r.default,{label:"Bank Transfer",name:"Payment",value:"bank",class:"w-100 mn-r-small bg-white radius-small pd-small",radio:t.state.department.payment},null,8,["radio"]),e.createVNode(r.default,{label:"Crypto",name:"Payment",value:"crypto",class:"w-100 bg-white radius-small pd-small",radio:t.state.department.payment},null,8,["radio"])])])]),e.createElementVNode("div",L,[R,e.createVNode(g.default,{apiKey:o.GOOGLE_MAPS_API_KEY,address:t.state.department.address,location:t.state.department.location,label:"Address",placeholder:"Enter delivery address",class:"bg-white radius-small pd-small mn-small","onUpdate:location":a[3]||(a[3]=s=>{t.state.department.location=s}),"onUpdate:address":a[4]||(a[4]=s=>{t.state.department.address=s})},null,8,["apiKey","address","location"]),Y,e.createVNode(y.default,{address:t.state.department.address,location:t.state.department.location,apiKey:o.GOOGLE_MAPS_API_KEY,class:"radius-big o-hidden","onUpdate:location":a[5]||(a[5]=s=>{t.state.department.location=s}),"onUpdate:address":a[6]||(a[6]=s=>{t.state.department.address=s})},null,8,["address","location","apiKey"])])]),e.createElementVNode("section",j,[e.createVNode(c.default,{submit:b,callback:o.redirectToDash,class:"bg-grey"},{default:e.withCtx(()=>[e.createTextVNode("Delete Spot")]),_:1},8,["callback"])])]))}},H=V.default(F,[["__scopeId","data-v-6a9ce43d"]]);exports.default=H;
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js
CHANGED
@@ -10,7 +10,7 @@ import U from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
10
10
|
import d from "../../../../components/Checkbox/Checkbox.vue.js";
|
11
11
|
import A from "../../../../components/Address/Address.vue.js";
|
12
12
|
import I from "../../../../components/LocationMarker/LocationMarker.vue.js";
|
13
|
-
import b from "../../../../components/Button/Button.
|
13
|
+
import b from "../../../../components/Button/Button.vue2.js";
|
14
14
|
import "vue-i18n";
|
15
15
|
import "../../../../components/Popup/Popup.vue2.js";
|
16
16
|
import "../../../../../../node_modules/vue-select/dist/vue-select.es.js";
|