@ozdao/prometheus-framework 0.1.15 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-579e2c7a.mjs +1945 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-cab2bcd2.js +1 -0
- package/dist/ButtonFollow-23c4d9fc.mjs +132 -0
- package/dist/ButtonFollow-bf5e6d42.js +1 -0
- package/dist/CardOrganization-63dcc83b.js +1 -0
- package/dist/CardOrganization-e530c9d5.mjs +230 -0
- package/dist/Chips-3dac276c.js +1 -0
- package/dist/Feed-4d9001aa.mjs +368 -0
- package/dist/Feed-51eef23f.js +1 -0
- package/dist/Feed-d78d4b91.mjs +439 -0
- package/dist/Feed-f4e9769e.js +1 -0
- package/dist/Gallery-1f82841a.mjs +357 -0
- package/dist/Gallery-dd29c7f6.js +1 -0
- package/dist/Image-a2c2ab9c.js +9 -0
- package/dist/Image-ad6d4f0f.mjs +477 -0
- package/dist/Popup-383abb2e.js +1 -0
- package/dist/Popup-f7a5e86b.mjs +76 -0
- package/dist/Product-b32fb0e1.js +7 -0
- package/dist/Product-d01e3a0d.mjs +839 -0
- package/dist/ProductEdit-2b4d1d88.js +1 -0
- package/dist/ProductEdit-5e479343.mjs +300 -0
- package/dist/ProfileBlogposts-070cb7e9.mjs +65 -0
- package/dist/ProfileBlogposts-b6bf0c42.js +1 -0
- package/dist/ProfileComments-8a0c489c.mjs +44 -0
- package/dist/ProfileComments-f0000ea6.js +1 -0
- package/dist/ProfileEvents-8b88287a.js +1 -0
- package/dist/ProfileEvents-d978617d.mjs +57 -0
- package/dist/ProfileLikes-d5f9f058.js +1 -0
- package/dist/ProfileLikes-f5ad4497.mjs +44 -0
- package/dist/ProfileOrganizations-422d1fa5.js +1 -0
- package/dist/ProfileOrganizations-6b1bc5b2.mjs +213 -0
- package/dist/Publics-640d32fc.mjs +123 -0
- package/dist/Publics-8595ab7e.js +1 -0
- package/dist/Socials-43293869.js +1 -0
- package/dist/Tab-dcd62005.js +1 -0
- package/dist/UploadImage-dfb36cdb.js +1 -0
- package/dist/UploadImage-e4418b43.mjs +83 -0
- package/dist/UploadImageMultiple-c9a7b54f.js +1 -0
- package/dist/UploadImageMultiple-d2d48f39.mjs +58 -0
- package/dist/auth-45a454f2.js +7 -0
- package/dist/auth-5cd34aae.mjs +905 -0
- package/dist/auth.client.cjs +8 -8
- package/dist/auth.client.js +42 -42
- package/dist/auth.validation-4b016fa5.js +1 -0
- package/dist/auth.validation-a52304cf.mjs +20 -0
- package/dist/backoffice.client.cjs +1 -0
- package/dist/backoffice.client.js +69 -0
- package/dist/carousel.es-cdfb392c.js +5 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +23 -22
- package/dist/components/EditImages/EditImages.vue.d.ts +7 -0
- package/dist/components/FieldPhone/FieldPhone(script-setup).vue.d.ts +3 -3
- package/dist/components/FieldPhone/FieldPhone.vue.d.ts +1 -1
- package/dist/events.client.cjs +2 -2
- package/dist/events.client.js +17 -16
- package/dist/files.server.js +149 -112
- package/dist/files.server.mjs +149 -112
- package/dist/gallery.server.js +127 -0
- package/dist/gallery.server.mjs +128 -0
- package/dist/index-2059e444.js +2 -0
- package/dist/index-4e469a71.mjs +941 -0
- package/dist/landing.client.cjs +1 -1
- package/dist/modules/gallery/components/sections/Gallery.vue.d.ts +2 -0
- package/dist/modules/icons/navigation/IconChevronRight.vue.d.ts +13 -1
- package/dist/modules/mobile/components/Menu/MenuItem.vue.d.ts +14 -2
- package/dist/organizations-81e762e7.mjs +122 -0
- package/dist/organizations-cf1ab766.js +1 -0
- package/dist/organizations.client-b692a78a.mjs +3018 -0
- package/dist/organizations.client-bdc9b044.js +3 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +44 -43
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +224 -184
- package/dist/vue-draggable-next.esm-bundler-21a209c6.js +10 -0
- package/dist/vuex.esm-bundler-685cf29f.js +5 -0
- package/package.json +10 -1
- package/src/components/EditImages/EditImages.vue +55 -0
- package/src/configurator/components/layouts/layoutConfigurator.vue +0 -40
- package/src/modules/auth/components/pages/EnterCode.vue +0 -1
- package/src/modules/backoffice/backoffice.client.js +15 -0
- package/src/modules/backoffice/components/layouts/Account.vue +48 -58
- package/src/modules/backoffice/router/backoffice.js +20 -0
- package/src/modules/files/controllers/files.controller.js +27 -131
- package/src/modules/files/middlewares/server/index.js +10 -0
- package/src/modules/files/middlewares/server/md.js +151 -0
- package/src/modules/files/middlewares/server/middlewareMulter.js +121 -0
- package/src/modules/files/routes/files.routes.js +20 -6
- package/src/modules/gallery/components/sections/Gallery.vue +414 -0
- package/src/modules/gallery/controllers/gallery.controller.js +87 -73
- package/src/modules/gallery/gallery.client.js +17 -0
- package/src/modules/gallery/gallery.server.js +13 -0
- package/src/modules/gallery/models/photo.model.js +20 -14
- package/src/modules/gallery/routes/gallery.routes.js +18 -9
- package/src/modules/gallery/store/gallery.js +25 -19
- package/src/modules/icons/navigation/IconChevronRight.vue +14 -2
- package/src/modules/mobile/components/Menu/Menu.vue +1 -1
- package/src/modules/mobile/components/Menu/MenuItem.vue +8 -2
- package/src/modules/users/components/pages/Profile.vue +22 -1
- package/src/modules/backoffice/components/pages/Profile.vue +0 -109
- package/src/modules/backoffice/components/pages/profile/ProfileEdit.vue +0 -132
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),b=require("vue-router"),t=require("./organizations.client-bdc9b044.js");require("./inputs.validation-24ae76b9.js");const d=require("./auth-45a454f2.js"),v=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-cab2bcd2.js");require("vue-i18n");const E=require("./Publics-8595ab7e.js"),V=require("./vuex.esm-bundler-685cf29f.js"),y=require("./vue-draggable-next.esm-bundler-21a209c6.js"),B=require("./UploadImageMultiple-c9a7b54f.js");require("./globals-928eb13c.js");require("./Tab-dcd62005.js");require("./ButtonFollow-bf5e6d42.js");require("./index-2059e444.js");require("./_plugin-vue_export-helper-f246444f.js");require("./Feed-f4e9769e.js");require("./EmptyState-7658d7d6.js");require("./Chips-3dac276c.js");require("./IconEdit-4cfe2115.js");require("./Feed-51eef23f.js");require("./Socials-43293869.js");require("./CardOrganization-63dcc83b.js");require("./organizations-cf1ab766.js");require("./UploadImage-dfb36cdb.js");const w={class:"mn-big flex-column flex"},x={__name:"EditProductInfo",props:{product:Object},setup(s){const a=s,n=V.useStore();return e.toRefs(a),(r,l)=>(e.openBlock(),e.createElementBlock("div",w,[e.createTextVNode(e.toDisplayString(e.unref(n).products.current)+" ",1),e.createVNode(E.Select,{options:["unpublished","published","archivied"],select:e.unref(n).products.state.current.status,"onUpdate:select":l[0]||(l[0]=o=>e.unref(n).products.state.current.status=o),placeholder:"Display product",class:"w-100 mn-small bg-white radius-small pd-medium"},null,8,["select"]),e.createVNode(d.Field,{field:e.unref(n).products.state.current.name,"onUpdate:field":l[1]||(l[1]=o=>e.unref(n).products.state.current.name=o),placeholder:"Введите название",class:"w-100 mn-small bg-white radius-small pd-medium"},null,8,["field"]),e.createVNode(d.Field,{field:e.unref(n).products.state.current.price,"onUpdate:field":l[2]||(l[2]=o=>e.unref(n).products.state.current.price=o),placeholder:"Введите цену",class:"w-100 mn-small bg-white radius-small pd-medium",type:"number"},null,8,["field"]),e.createVNode(d.Field,{field:e.unref(n).products.state.current.description,"onUpdate:field":l[3]||(l[3]=o=>e.unref(n).products.state.current.description=o),placeholder:"Введите описание",class:"w-100 mn-small bg-white radius-small pd-medium",type:"textarea"},null,8,["field"])]))}},q={class:"mn-big"},$={class:"mn-small flex-nowrap flex"},C={class:"mn-r-thin"},z={class:"flex-column flex"},S={key:0,class:"w-100 mn-small"},P=["onClick"],I=e.createElementVNode("svg",{class:"i-small",fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{"clip-rule":"evenodd",d:"m7.27124 0h5.45456c1.0041 0 1.8182.814027 1.8182 1.81818v.90899h2.7278c1.0042 0 1.8182.81402 1.8182 1.81818v1.81818c0 1.00415-.814 1.81818-1.8182 1.81818h-.0735l-.8363 10.00009c0 1.0042-.814 1.8182-1.8182 1.8182h-9.09087c-1.00416 0-1.81818-.814-1.81504-1.7427l-.83964-10.07559h-.07187c-1.00415 0-1.818177-.81403-1.818177-1.81818v-1.81818c0-1.00416.814027-1.81818 1.818177-1.81818h2.72668v-.90899c0-1.004153.81402-1.81818 1.81818-1.81818zm-1.81889 18.1819-.83047-10h10.75152l-.827 9.9245-.0031.0755zm-2.72612-11.81799v-1.81818h14.54547v1.81818zm10.00137-4.54571v.90909h-5.45456v-.90909z",fill:"#8a8a8a","fill-rule":"evenodd"})],-1),L=[I],N={__name:"EditParameters",props:{items:{type:Array,default:()=>[]},title:String,addButtonLabel:String,emptyMessage:String,keyName:String,valueName:String},emits:["add-info","delete-info"],setup(s,{emit:a}){const n=s;function r(){a("add-info",{})}function l(c){a("delete-info",c)}const{items:o,title:u,emptyMessage:m,addButtonLabel:h,keyName:p,valueName:_}=e.toRefs(n);return(c,k)=>(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("div",$,[e.createElementVNode("h5",C,e.toDisplayString(e.unref(u)),1),e.createElementVNode("button",{onClick:r,class:"i-small pd-thin button-delete button"},"+")]),e.createElementVNode("div",z,[e.unref(o).length==0?(e.openBlock(),e.createElementBlock("p",S,e.toDisplayString(e.unref(m)),1)):e.createCommentVNode("",!0),e.unref(o).length==0?(e.openBlock(),e.createBlock(d._sfc_main,{key:1,onClick:r,class:"button"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(h)),1)]),_:1})):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),(i,g)=>(e.openBlock(),e.createElementBlock("div",{class:"mn-medium w-100 flex-nowrap flex",key:g},[e.createVNode(d.Field,{field:i[e.unref(p)],"onUpdate:field":f=>i[e.unref(p)]=f,placeholder:"Название параметра",class:"w-100 mn-r-small bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createVNode(d.Field,{field:i[e.unref(_)],"onUpdate:field":f=>i[e.unref(_)]=f,placeholder:"Значение параметра",class:"w-100 bg-white radius-small pd-medium"},null,8,["field","onUpdate:field"]),e.createElementVNode("button",{onClick:f=>l(g),class:"mn-l-small button"},L,8,P)]))),128))])]))}},U={key:0,class:"mn-big"},A={class:"flex-column block"},D=["src"],F=["onClick"],R={__name:"EditProductImages",props:{product:Object},setup(s){function a(r){console.log(r),console.log(t.state.current.images),t.state.current.images.push(...r)}function n(r){t.state.current.images.splice(r,1)}return(r,l)=>(e.openBlock(),e.createElementBlock("div",null,[s.product.images.length<1?(e.openBlock(),e.createElementBlock("p",U," The product doesn't have any images yet. ")):e.createCommentVNode("",!0),e.createVNode(e.unref(y.VueDraggableNext),{class:"cols-4 dragArea list-group w-full",list:s.product.images,sort:!0,onChange:r.log},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.product.images,(o,u)=>(e.openBlock(),e.createElementBlock("div",A,[e.createElementVNode("img",{class:"w-100 mn-small",src:(r.FILE_SERVER_URL||"")+o},null,8,D),e.createElementVNode("a",{onClick:m=>n(u),class:"w-100 br-grey br-solid br-1px button"},"Удалить",8,F)]))),256))]),_:1},8,["list","onChange"]),e.createVNode(B._sfc_main,{"onUpdate:images":a,uploadPath:"organizations/"+r.$route.params._id+"/products",class:"mn-t-semi pd-small w-100 button bg-main"},null,8,["uploadPath"])]))}};const M={class:"for-transition w-100"},T={class:"pd-b-zero pd-t-zero pd-thin"},j={class:"pd-thin"},O={class:"flex-nowrap flex bg-grey pd-medium radius-big"},G={key:0,class:"mn-r-auto"},H={key:1,class:"mn-r-auto"},J={class:"flex-nowrap flex pd-thin"},K={class:"pd-b-zero pd-t-zero pd-thin cols-2 gap-thin"},Q={class:"mn-thin bg-grey pd-medium o-hidden radius-big"},W=e.createElementVNode("h3",{class:"mn-semi"},"Profile",-1),X={class:"mn-semi"},Y=e.createElementVNode("h5",null,"Categories",-1),Z={class:""},ee={class:"mn-thin bg-grey pd-medium o-hidden radius-big"},te=e.createElementVNode("h3",{class:"mn-semi"},"Images",-1),re={__name:"ProductEdit",async setup(s){let a,n;const r=b.useRoute(),l=b.useRouter();[a,n]=e.withAsyncContext(()=>t.actions.fetchCategories()),await a,n(),r.params.product&&([a,n]=e.withAsyncContext(()=>t.actions$1.read({_id:r.params.product})),await a,n());function o(){t.state.current.information.push({name:"",value:""})}function u(c){t.state.current.information.splice(c,1)}function m(){t.state.current.localization.push({locale:"",text:""})}function h(c){t.state.current.localization.splice(c,1)}function p(){r.params.product?t.actions$1.update(r.params.product,t.state.current):t.actions$1.create(r.params._id,t.state.current)}function _(){l.push({name:"ProductEdit",params:{_id:r.params._id,product:t.state.current._id}})}return(c,k)=>(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",T,[e.createVNode(t._sfc_main,{class:"pd-medium bg-grey radius-big"})]),e.createElementVNode("div",j,[e.createElementVNode("header",O,[e.unref(r).params.product?(e.openBlock(),e.createElementBlock("h1",G,"Edit Product")):(e.openBlock(),e.createElementBlock("h1",H,"Create Product")),e.createElementVNode("section",J,[e.createVNode(d._sfc_main,{submit:p,callback:_},{default:e.withCtx(()=>[e.createTextVNode("Save Product")]),_:1})])])]),e.createElementVNode("div",K,[e.createElementVNode("div",Q,[W,e.createVNode(x,{product:t.state.current},null,8,["product"]),e.createElementVNode("div",X,[Y,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.state$1.all,(i,g)=>(e.openBlock(),e.createBlock(v.Checkbox,{label:i.name,name:"categories",value:i.url,class:"w-100 mn-t-small bg-white radius-small pd-small",radio:t.state.current.category},null,8,["label","value","radio"]))),256))]),e.createVNode(N,{items:t.state.current.information,title:"Parameters",emptyMessage:"No parameters",addButtonLabel:"Add parameter",keyName:"name",valueName:"value",onAddInfo:o,onDeleteInfo:u},null,8,["items"]),e.createVNode(N,{items:t.state.current.localization,title:"Localization",emptyMessage:"No localizations",addButtonLabel:"Add localization",keyName:"locale",valueName:"text",onAddInfo:m,onDeleteInfo:h},null,8,["items"])]),e.createElementVNode("div",Z,[e.createElementVNode("div",ee,[te,e.createVNode(R,{product:t.state.current},null,8,["product"])])])])]))}};exports.default=re;
|
@@ -0,0 +1,300 @@
|
|
1
|
+
import { toRefs as I, openBlock as n, createElementBlock as d, createTextVNode as C, toDisplayString as w, unref as e, createVNode as r, createElementVNode as t, createCommentVNode as k, createBlock as U, withCtx as z, Fragment as N, renderList as P, withAsyncContext as E } from "vue";
|
2
|
+
import { useRoute as B, useRouter as V } from "vue-router";
|
3
|
+
import { s as l, a as R, b as $, _ as D, c as j } from "./organizations.client-b692a78a.mjs";
|
4
|
+
import "./inputs.validation-14e8e01f.mjs";
|
5
|
+
import { F as h, _ as L } from "./auth-5cd34aae.mjs";
|
6
|
+
import { C as F } from "./Breadcrumbs.vue_vue_type_style_index_0_lang-579e2c7a.mjs";
|
7
|
+
import "vue-i18n";
|
8
|
+
import { S as M } from "./Publics-640d32fc.mjs";
|
9
|
+
import { u as O } from "./vuex.esm-bundler-57d8b6ba.mjs";
|
10
|
+
import { V as T } from "./vue-draggable-next.esm-bundler-ff6e3f52.mjs";
|
11
|
+
import { _ as q } from "./UploadImageMultiple-d2d48f39.mjs";
|
12
|
+
import "./globals-96ba60e4.mjs";
|
13
|
+
import "./Tab-a243605d.mjs";
|
14
|
+
import "./ButtonFollow-23c4d9fc.mjs";
|
15
|
+
import "./index-4e469a71.mjs";
|
16
|
+
import "./_plugin-vue_export-helper-dad06003.mjs";
|
17
|
+
import "./Feed-4d9001aa.mjs";
|
18
|
+
import "./EmptyState-34d85f10.mjs";
|
19
|
+
import "./Chips-03ff0c34.mjs";
|
20
|
+
import "./IconEdit-eacf3856.mjs";
|
21
|
+
import "./Feed-d78d4b91.mjs";
|
22
|
+
import "./Socials-8193477c.mjs";
|
23
|
+
import "./CardOrganization-e530c9d5.mjs";
|
24
|
+
import "./organizations-81e762e7.mjs";
|
25
|
+
import "./UploadImage-e4418b43.mjs";
|
26
|
+
const G = { class: "mn-big flex-column flex" }, H = {
|
27
|
+
__name: "EditProductInfo",
|
28
|
+
props: {
|
29
|
+
product: Object
|
30
|
+
},
|
31
|
+
setup(u) {
|
32
|
+
const c = u, o = O();
|
33
|
+
return I(c), (s, i) => (n(), d("div", G, [
|
34
|
+
C(w(e(o).products.current) + " ", 1),
|
35
|
+
r(M, {
|
36
|
+
options: [
|
37
|
+
"unpublished",
|
38
|
+
"published",
|
39
|
+
"archivied"
|
40
|
+
],
|
41
|
+
select: e(o).products.state.current.status,
|
42
|
+
"onUpdate:select": i[0] || (i[0] = (a) => e(o).products.state.current.status = a),
|
43
|
+
placeholder: "Display product",
|
44
|
+
class: "w-100 mn-small bg-white radius-small pd-medium"
|
45
|
+
}, null, 8, ["select"]),
|
46
|
+
r(h, {
|
47
|
+
field: e(o).products.state.current.name,
|
48
|
+
"onUpdate:field": i[1] || (i[1] = (a) => e(o).products.state.current.name = a),
|
49
|
+
placeholder: "Введите название",
|
50
|
+
class: "w-100 mn-small bg-white radius-small pd-medium"
|
51
|
+
}, null, 8, ["field"]),
|
52
|
+
r(h, {
|
53
|
+
field: e(o).products.state.current.price,
|
54
|
+
"onUpdate:field": i[2] || (i[2] = (a) => e(o).products.state.current.price = a),
|
55
|
+
placeholder: "Введите цену",
|
56
|
+
class: "w-100 mn-small bg-white radius-small pd-medium",
|
57
|
+
type: "number"
|
58
|
+
}, null, 8, ["field"]),
|
59
|
+
r(h, {
|
60
|
+
field: e(o).products.state.current.description,
|
61
|
+
"onUpdate:field": i[3] || (i[3] = (a) => e(o).products.state.current.description = a),
|
62
|
+
placeholder: "Введите описание",
|
63
|
+
class: "w-100 mn-small bg-white radius-small pd-medium",
|
64
|
+
type: "textarea"
|
65
|
+
}, null, 8, ["field"])
|
66
|
+
]));
|
67
|
+
}
|
68
|
+
}, J = { class: "mn-big" }, K = { class: "mn-small flex-nowrap flex" }, Q = { class: "mn-r-thin" }, W = { class: "flex-column flex" }, X = {
|
69
|
+
key: 0,
|
70
|
+
class: "w-100 mn-small"
|
71
|
+
}, Y = ["onClick"], Z = /* @__PURE__ */ t("svg", {
|
72
|
+
class: "i-small",
|
73
|
+
fill: "none",
|
74
|
+
height: "20",
|
75
|
+
viewBox: "0 0 20 20",
|
76
|
+
width: "20",
|
77
|
+
xmlns: "http://www.w3.org/2000/svg"
|
78
|
+
}, [
|
79
|
+
/* @__PURE__ */ t("path", {
|
80
|
+
"clip-rule": "evenodd",
|
81
|
+
d: "m7.27124 0h5.45456c1.0041 0 1.8182.814027 1.8182 1.81818v.90899h2.7278c1.0042 0 1.8182.81402 1.8182 1.81818v1.81818c0 1.00415-.814 1.81818-1.8182 1.81818h-.0735l-.8363 10.00009c0 1.0042-.814 1.8182-1.8182 1.8182h-9.09087c-1.00416 0-1.81818-.814-1.81504-1.7427l-.83964-10.07559h-.07187c-1.00415 0-1.818177-.81403-1.818177-1.81818v-1.81818c0-1.00416.814027-1.81818 1.818177-1.81818h2.72668v-.90899c0-1.004153.81402-1.81818 1.81818-1.81818zm-1.81889 18.1819-.83047-10h10.75152l-.827 9.9245-.0031.0755zm-2.72612-11.81799v-1.81818h14.54547v1.81818zm10.00137-4.54571v.90909h-5.45456v-.90909z",
|
82
|
+
fill: "#8a8a8a",
|
83
|
+
"fill-rule": "evenodd"
|
84
|
+
})
|
85
|
+
], -1), ee = [
|
86
|
+
Z
|
87
|
+
], S = {
|
88
|
+
__name: "EditParameters",
|
89
|
+
props: {
|
90
|
+
items: {
|
91
|
+
type: Array,
|
92
|
+
default: () => []
|
93
|
+
},
|
94
|
+
title: String,
|
95
|
+
addButtonLabel: String,
|
96
|
+
emptyMessage: String,
|
97
|
+
keyName: String,
|
98
|
+
valueName: String
|
99
|
+
},
|
100
|
+
emits: ["add-info", "delete-info"],
|
101
|
+
setup(u, { emit: c }) {
|
102
|
+
const o = u;
|
103
|
+
function s() {
|
104
|
+
c("add-info", {});
|
105
|
+
}
|
106
|
+
function i(m) {
|
107
|
+
c("delete-info", m);
|
108
|
+
}
|
109
|
+
const { items: a, title: _, emptyMessage: f, addButtonLabel: y, keyName: g, valueName: b } = I(o);
|
110
|
+
return (m, A) => (n(), d("div", J, [
|
111
|
+
t("div", K, [
|
112
|
+
t("h5", Q, w(e(_)), 1),
|
113
|
+
t("button", {
|
114
|
+
onClick: s,
|
115
|
+
class: "i-small pd-thin button-delete button"
|
116
|
+
}, "+")
|
117
|
+
]),
|
118
|
+
t("div", W, [
|
119
|
+
e(a).length == 0 ? (n(), d("p", X, w(e(f)), 1)) : k("", !0),
|
120
|
+
e(a).length == 0 ? (n(), U(L, {
|
121
|
+
key: 1,
|
122
|
+
onClick: s,
|
123
|
+
class: "button"
|
124
|
+
}, {
|
125
|
+
default: z(() => [
|
126
|
+
C(w(e(y)), 1)
|
127
|
+
]),
|
128
|
+
_: 1
|
129
|
+
})) : k("", !0),
|
130
|
+
(n(!0), d(N, null, P(e(a), (p, x) => (n(), d("div", {
|
131
|
+
class: "mn-medium w-100 flex-nowrap flex",
|
132
|
+
key: x
|
133
|
+
}, [
|
134
|
+
r(h, {
|
135
|
+
field: p[e(g)],
|
136
|
+
"onUpdate:field": (v) => p[e(g)] = v,
|
137
|
+
placeholder: "Название параметра",
|
138
|
+
class: "w-100 mn-r-small bg-white radius-small pd-medium"
|
139
|
+
}, null, 8, ["field", "onUpdate:field"]),
|
140
|
+
r(h, {
|
141
|
+
field: p[e(b)],
|
142
|
+
"onUpdate:field": (v) => p[e(b)] = v,
|
143
|
+
placeholder: "Значение параметра",
|
144
|
+
class: "w-100 bg-white radius-small pd-medium"
|
145
|
+
}, null, 8, ["field", "onUpdate:field"]),
|
146
|
+
t("button", {
|
147
|
+
onClick: (v) => i(x),
|
148
|
+
class: "mn-l-small button"
|
149
|
+
}, ee, 8, Y)
|
150
|
+
]))), 128))
|
151
|
+
])
|
152
|
+
]));
|
153
|
+
}
|
154
|
+
}, te = {
|
155
|
+
key: 0,
|
156
|
+
class: "mn-big"
|
157
|
+
}, se = { class: "flex-column block" }, oe = ["src"], ae = ["onClick"], le = {
|
158
|
+
__name: "EditProductImages",
|
159
|
+
props: {
|
160
|
+
product: Object
|
161
|
+
},
|
162
|
+
setup(u) {
|
163
|
+
function c(s) {
|
164
|
+
console.log(s), console.log(l.current.images), l.current.images.push(...s);
|
165
|
+
}
|
166
|
+
function o(s) {
|
167
|
+
l.current.images.splice(s, 1);
|
168
|
+
}
|
169
|
+
return (s, i) => (n(), d("div", null, [
|
170
|
+
u.product.images.length < 1 ? (n(), d("p", te, " The product doesn't have any images yet. ")) : k("", !0),
|
171
|
+
r(e(T), {
|
172
|
+
class: "cols-4 dragArea list-group w-full",
|
173
|
+
list: u.product.images,
|
174
|
+
sort: !0,
|
175
|
+
onChange: s.log
|
176
|
+
}, {
|
177
|
+
default: z(() => [
|
178
|
+
(n(!0), d(N, null, P(u.product.images, (a, _) => (n(), d("div", se, [
|
179
|
+
t("img", {
|
180
|
+
class: "w-100 mn-small",
|
181
|
+
src: (s.FILE_SERVER_URL || "") + a
|
182
|
+
}, null, 8, oe),
|
183
|
+
t("a", {
|
184
|
+
onClick: (f) => o(_),
|
185
|
+
class: "w-100 br-grey br-solid br-1px button"
|
186
|
+
}, "Удалить", 8, ae)
|
187
|
+
]))), 256))
|
188
|
+
]),
|
189
|
+
_: 1
|
190
|
+
}, 8, ["list", "onChange"]),
|
191
|
+
r(q, {
|
192
|
+
"onUpdate:images": c,
|
193
|
+
uploadPath: "organizations/" + s.$route.params._id + "/products",
|
194
|
+
class: "mn-t-semi pd-small w-100 button bg-main"
|
195
|
+
}, null, 8, ["uploadPath"])
|
196
|
+
]));
|
197
|
+
}
|
198
|
+
};
|
199
|
+
const ne = { class: "for-transition w-100" }, re = { class: "pd-b-zero pd-t-zero pd-thin" }, ie = { class: "pd-thin" }, de = { class: "flex-nowrap flex bg-grey pd-medium radius-big" }, ce = {
|
200
|
+
key: 0,
|
201
|
+
class: "mn-r-auto"
|
202
|
+
}, ue = {
|
203
|
+
key: 1,
|
204
|
+
class: "mn-r-auto"
|
205
|
+
}, me = { class: "flex-nowrap flex pd-thin" }, pe = { class: "pd-b-zero pd-t-zero pd-thin cols-2 gap-thin" }, _e = { class: "mn-thin bg-grey pd-medium o-hidden radius-big" }, he = /* @__PURE__ */ t("h3", { class: "mn-semi" }, "Profile", -1), fe = { class: "mn-semi" }, ge = /* @__PURE__ */ t("h5", null, "Categories", -1), be = { class: "" }, ve = { class: "mn-thin bg-grey pd-medium o-hidden radius-big" }, we = /* @__PURE__ */ t("h3", { class: "mn-semi" }, "Images", -1), He = {
|
206
|
+
__name: "ProductEdit",
|
207
|
+
async setup(u) {
|
208
|
+
let c, o;
|
209
|
+
const s = B(), i = V();
|
210
|
+
[c, o] = E(() => R.fetchCategories()), await c, o(), s.params.product && ([c, o] = E(() => $.read({ _id: s.params.product })), await c, o());
|
211
|
+
function a() {
|
212
|
+
l.current.information.push({ name: "", value: "" });
|
213
|
+
}
|
214
|
+
function _(m) {
|
215
|
+
l.current.information.splice(m, 1);
|
216
|
+
}
|
217
|
+
function f() {
|
218
|
+
l.current.localization.push({ locale: "", text: "" });
|
219
|
+
}
|
220
|
+
function y(m) {
|
221
|
+
l.current.localization.splice(m, 1);
|
222
|
+
}
|
223
|
+
function g() {
|
224
|
+
s.params.product ? $.update(s.params.product, l.current) : $.create(s.params._id, l.current);
|
225
|
+
}
|
226
|
+
function b() {
|
227
|
+
i.push({ name: "ProductEdit", params: { _id: s.params._id, product: l.current._id } });
|
228
|
+
}
|
229
|
+
return (m, A) => (n(), d("div", ne, [
|
230
|
+
t("div", re, [
|
231
|
+
r(D, { class: "pd-medium bg-grey radius-big" })
|
232
|
+
]),
|
233
|
+
t("div", ie, [
|
234
|
+
t("header", de, [
|
235
|
+
e(s).params.product ? (n(), d("h1", ce, "Edit Product")) : (n(), d("h1", ue, "Create Product")),
|
236
|
+
t("section", me, [
|
237
|
+
r(L, {
|
238
|
+
submit: g,
|
239
|
+
callback: b
|
240
|
+
}, {
|
241
|
+
default: z(() => [
|
242
|
+
C("Save Product")
|
243
|
+
]),
|
244
|
+
_: 1
|
245
|
+
})
|
246
|
+
])
|
247
|
+
])
|
248
|
+
]),
|
249
|
+
t("div", pe, [
|
250
|
+
t("div", _e, [
|
251
|
+
he,
|
252
|
+
r(H, {
|
253
|
+
product: l.current
|
254
|
+
}, null, 8, ["product"]),
|
255
|
+
t("div", fe, [
|
256
|
+
ge,
|
257
|
+
(n(!0), d(N, null, P(j.all, (p, x) => (n(), U(F, {
|
258
|
+
label: p.name,
|
259
|
+
name: "categories",
|
260
|
+
value: p.url,
|
261
|
+
class: "w-100 mn-t-small bg-white radius-small pd-small",
|
262
|
+
radio: l.current.category
|
263
|
+
}, null, 8, ["label", "value", "radio"]))), 256))
|
264
|
+
]),
|
265
|
+
r(S, {
|
266
|
+
items: l.current.information,
|
267
|
+
title: "Parameters",
|
268
|
+
emptyMessage: "No parameters",
|
269
|
+
addButtonLabel: "Add parameter",
|
270
|
+
keyName: "name",
|
271
|
+
valueName: "value",
|
272
|
+
onAddInfo: a,
|
273
|
+
onDeleteInfo: _
|
274
|
+
}, null, 8, ["items"]),
|
275
|
+
r(S, {
|
276
|
+
items: l.current.localization,
|
277
|
+
title: "Localization",
|
278
|
+
emptyMessage: "No localizations",
|
279
|
+
addButtonLabel: "Add localization",
|
280
|
+
keyName: "locale",
|
281
|
+
valueName: "text",
|
282
|
+
onAddInfo: f,
|
283
|
+
onDeleteInfo: y
|
284
|
+
}, null, 8, ["items"])
|
285
|
+
]),
|
286
|
+
t("div", be, [
|
287
|
+
t("div", ve, [
|
288
|
+
we,
|
289
|
+
r(le, {
|
290
|
+
product: l.current
|
291
|
+
}, null, 8, ["product"])
|
292
|
+
])
|
293
|
+
])
|
294
|
+
])
|
295
|
+
]));
|
296
|
+
}
|
297
|
+
};
|
298
|
+
export {
|
299
|
+
He as default
|
300
|
+
};
|
@@ -0,0 +1,65 @@
|
|
1
|
+
import { ref as f, watch as g, openBlock as t, createElementBlock as p, createElementVNode as d, unref as u, createCommentVNode as s, createBlock as l } from "vue";
|
2
|
+
import { useRoute as v, useRouter as y } from "vue-router";
|
3
|
+
import { _ as b } from "./Tab-a243605d.mjs";
|
4
|
+
import { _ as n } from "./Feed-d78d4b91.mjs";
|
5
|
+
import { s as o } from "./auth-5cd34aae.mjs";
|
6
|
+
import "./inputs.validation-14e8e01f.mjs";
|
7
|
+
import "./globals-96ba60e4.mjs";
|
8
|
+
import "vue-i18n";
|
9
|
+
import "./EmptyState-34d85f10.mjs";
|
10
|
+
import "./_plugin-vue_export-helper-dad06003.mjs";
|
11
|
+
import "./Chips-03ff0c34.mjs";
|
12
|
+
import "./IconEdit-eacf3856.mjs";
|
13
|
+
import "./index-4e469a71.mjs";
|
14
|
+
const h = { class: "pd-thin" }, k = { class: "mn-medium flex-v-center flex-nowrap flex" }, w = /* @__PURE__ */ d("h2", { class: "mn-r-medium" }, "Posts", -1), O = {
|
15
|
+
__name: "ProfileBlogposts",
|
16
|
+
setup(q) {
|
17
|
+
const e = v(), c = y();
|
18
|
+
let _ = e.query.tab ? e.query.tab : "posts";
|
19
|
+
const r = f(_);
|
20
|
+
return e.query.tab = r.value, g(r, (i) => {
|
21
|
+
c.replace({ query: { ...e.query, tab: i } });
|
22
|
+
}), (i, a) => (t(), p("div", h, [
|
23
|
+
d("header", k, [
|
24
|
+
w,
|
25
|
+
o.user._id === u(e).params._id ? (t(), p("button", {
|
26
|
+
key: 0,
|
27
|
+
onClick: a[0] || (a[0] = (m) => i.$router.push({
|
28
|
+
name: "Create BlogPost"
|
29
|
+
})),
|
30
|
+
class: "radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"
|
31
|
+
}, " + ")) : s("", !0)
|
32
|
+
]),
|
33
|
+
o.user._id === u(e).params._id ? (t(), l(b, {
|
34
|
+
key: 0,
|
35
|
+
selected: r.value,
|
36
|
+
"onUpdate:selected": a[1] || (a[1] = (m) => r.value = m),
|
37
|
+
tabs: [
|
38
|
+
{ name: "My posts", value: "posts" },
|
39
|
+
{ name: "Drafts", value: "drafts" },
|
40
|
+
{ name: "Following", value: "following" }
|
41
|
+
],
|
42
|
+
class: "mn-small o-hidden h5 radius-big bg-grey"
|
43
|
+
}, null, 8, ["selected"])) : s("", !0),
|
44
|
+
r.value === "posts" ? (t(), l(n, {
|
45
|
+
key: 1,
|
46
|
+
user: o.user._id,
|
47
|
+
creator: u(e).params._id
|
48
|
+
}, null, 8, ["user", "creator"])) : s("", !0),
|
49
|
+
r.value === "drafts" ? (t(), l(n, {
|
50
|
+
key: 2,
|
51
|
+
user: o.user._id,
|
52
|
+
creator: u(e).params._id,
|
53
|
+
status: "draft"
|
54
|
+
}, null, 8, ["user", "creator"])) : s("", !0),
|
55
|
+
r.value === "following" ? (t(), l(n, {
|
56
|
+
key: 3,
|
57
|
+
user: o.user._id,
|
58
|
+
category: "following"
|
59
|
+
}, null, 8, ["user"])) : s("", !0)
|
60
|
+
]));
|
61
|
+
}
|
62
|
+
};
|
63
|
+
export {
|
64
|
+
O as default
|
65
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("vue-router"),d=require("./Tab-dcd62005.js"),u=require("./Feed-51eef23f.js"),o=require("./auth-45a454f2.js");require("./inputs.validation-24ae76b9.js");require("./globals-928eb13c.js");require("vue-i18n");require("./EmptyState-7658d7d6.js");require("./_plugin-vue_export-helper-f246444f.js");require("./Chips-3dac276c.js");require("./IconEdit-4cfe2115.js");require("./index-2059e444.js");const m={class:"pd-thin"},p={class:"mn-medium flex-v-center flex-nowrap flex"},_=e.createElementVNode("h2",{class:"mn-r-medium"},"Posts",-1),f={__name:"ProfileBlogposts",setup(q){const r=l.useRoute(),c=l.useRouter();let i=r.query.tab?r.query.tab:"posts";const t=e.ref(i);return r.query.tab=t.value,e.watch(t,a=>{c.replace({query:{...r.query,tab:a}})}),(a,s)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",p,[_,o.state.user._id===e.unref(r).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:s[0]||(s[0]=n=>a.$router.push({name:"Create BlogPost"})),class:"radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),o.state.user._id===e.unref(r).params._id?(e.openBlock(),e.createBlock(d._sfc_main,{key:0,selected:t.value,"onUpdate:selected":s[1]||(s[1]=n=>t.value=n),tabs:[{name:"My posts",value:"posts"},{name:"Drafts",value:"drafts"},{name:"Following",value:"following"}],class:"mn-small o-hidden h5 radius-big bg-grey"},null,8,["selected"])):e.createCommentVNode("",!0),t.value==="posts"?(e.openBlock(),e.createBlock(u._sfc_main,{key:1,user:o.state.user._id,creator:e.unref(r).params._id},null,8,["user","creator"])):e.createCommentVNode("",!0),t.value==="drafts"?(e.openBlock(),e.createBlock(u._sfc_main,{key:2,user:o.state.user._id,creator:e.unref(r).params._id,status:"draft"},null,8,["user","creator"])):e.createCommentVNode("",!0),t.value==="following"?(e.openBlock(),e.createBlock(u._sfc_main,{key:3,user:o.state.user._id,category:"following"},null,8,["user"])):e.createCommentVNode("",!0)]))}};exports.default=f;
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { ref as l, watch as p, openBlock as s, createElementBlock as c, createVNode as d, createBlock as _, unref as a, createCommentVNode as f, createElementVNode as m } from "vue";
|
2
|
+
import { useRoute as b, useRouter as h } from "vue-router";
|
3
|
+
import { _ as v } from "./Tab-a243605d.mjs";
|
4
|
+
import { _ as y } from "./Feed-d78d4b91.mjs";
|
5
|
+
import "./inputs.validation-14e8e01f.mjs";
|
6
|
+
import "./globals-96ba60e4.mjs";
|
7
|
+
import "vue-i18n";
|
8
|
+
import "./EmptyState-34d85f10.mjs";
|
9
|
+
import "./_plugin-vue_export-helper-dad06003.mjs";
|
10
|
+
import "./Chips-03ff0c34.mjs";
|
11
|
+
import "./IconEdit-eacf3856.mjs";
|
12
|
+
import "./index-4e469a71.mjs";
|
13
|
+
const g = { class: "pd-thin" }, q = /* @__PURE__ */ m("header", { class: "mn-medium flex-v-center flex-nowrap flex" }, [
|
14
|
+
/* @__PURE__ */ m("h2", { class: "mn-r-medium" }, "Comments")
|
15
|
+
], -1), O = {
|
16
|
+
__name: "ProfileComments",
|
17
|
+
setup(w) {
|
18
|
+
const e = b(), n = h();
|
19
|
+
let u = e.query.tab ? e.query.tab : "posts";
|
20
|
+
const t = l(u);
|
21
|
+
return e.query.tab = t.value, p(t, (r) => {
|
22
|
+
n.replace({ query: { ...e.query, tab: r } });
|
23
|
+
}), (r, o) => (s(), c("div", g, [
|
24
|
+
q,
|
25
|
+
d(v, {
|
26
|
+
selected: t.value,
|
27
|
+
"onUpdate:selected": o[0] || (o[0] = (i) => t.value = i),
|
28
|
+
tabs: [
|
29
|
+
{ name: "My posts", value: "posts" },
|
30
|
+
{ name: "Following", value: "hubs" }
|
31
|
+
],
|
32
|
+
class: "mn-r-medium o-hidden h5 radius-big bg-grey"
|
33
|
+
}, null, 8, ["selected"]),
|
34
|
+
t.value === "posts" ? (s(), _(y, {
|
35
|
+
key: 0,
|
36
|
+
user: a(e).params._id,
|
37
|
+
owner: a(e).params._id
|
38
|
+
}, null, 8, ["user", "owner"])) : f("", !0)
|
39
|
+
]));
|
40
|
+
}
|
41
|
+
};
|
42
|
+
export {
|
43
|
+
O as default
|
44
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("vue-router"),i=require("./Tab-dcd62005.js"),c=require("./Feed-51eef23f.js");require("./inputs.validation-24ae76b9.js");require("./globals-928eb13c.js");require("vue-i18n");require("./EmptyState-7658d7d6.js");require("./_plugin-vue_export-helper-f246444f.js");require("./Chips-3dac276c.js");require("./IconEdit-4cfe2115.js");require("./index-2059e444.js");const m={class:"pd-thin"},d=e.createElementVNode("header",{class:"mn-medium flex-v-center flex-nowrap flex"},[e.createElementVNode("h2",{class:"mn-r-medium"},"Comments")],-1),q={__name:"ProfileComments",setup(p){const r=o.useRoute(),n=o.useRouter();let a=r.query.tab?r.query.tab:"posts";const t=e.ref(a);return r.query.tab=t.value,e.watch(t,u=>{n.replace({query:{...r.query,tab:u}})}),(u,s)=>(e.openBlock(),e.createElementBlock("div",m,[d,e.createVNode(i._sfc_main,{selected:t.value,"onUpdate:selected":s[0]||(s[0]=l=>t.value=l),tabs:[{name:"My posts",value:"posts"},{name:"Following",value:"hubs"}],class:"mn-r-medium o-hidden h5 radius-big bg-grey"},null,8,["selected"]),t.value==="posts"?(e.openBlock(),e.createBlock(c._sfc_main,{key:0,user:e.unref(r).params._id,owner:e.unref(r).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]))}};exports.default=q;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("vue-router"),d=require("./Tab-dcd62005.js"),c=require("./Feed-f4e9769e.js"),n=require("./auth-45a454f2.js");require("./inputs.validation-24ae76b9.js");require("./globals-928eb13c.js");require("vue-i18n");require("./EmptyState-7658d7d6.js");require("./Chips-3dac276c.js");require("./IconEdit-4cfe2115.js");require("./_plugin-vue_export-helper-f246444f.js");require("./index-2059e444.js");const m={class:"pd-thin"},p={class:"mn-medium flex-v-center flex-nowrap flex"},_=e.createElementVNode("h2",{class:"mn-r-medium"}," Events ",-1),q={__name:"ProfileEvents",setup(v){const r=i.useRoute(),u=i.useRouter();let l=r.query.tab?r.query.tab:"owner";const t=e.ref(l);return r.query.tab=t.value,e.watch(t,s=>{u.replace({query:{...r.query,tab:s}})}),(s,a)=>(e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",p,[_,n.state.user._id===e.unref(r).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:a[0]||(a[0]=o=>e.unref(u).push({name:"Create Event"})),class:"radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),e.createVNode(d._sfc_main,{selected:t.value,"onUpdate:selected":a[1]||(a[1]=o=>t.value=o),tabs:[{name:"My",value:"owner"},{name:"Participant",value:"participant"}],class:"mn-small o-hidden h5 radius-big bg-grey"},null,8,["selected"]),t.value==="owner"?(e.openBlock(),e.createBlock(c._sfc_main,{key:0,user:n.state.user._id,creator:e.unref(r).params._id,sortOrder:"asc"},null,8,["user","creator"])):e.createCommentVNode("",!0),t.value==="participant"?(e.openBlock(),e.createBlock(c._sfc_main,{key:1,user:n.state.user._id,participant:e.unref(r).params._id,sortOrder:"desc"},null,8,["user","participant"])):e.createCommentVNode("",!0)]))}};exports.default=q;
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import { ref as f, watch as v, openBlock as a, createElementBlock as c, createElementVNode as d, unref as o, createCommentVNode as s, createVNode as b, createBlock as l } from "vue";
|
2
|
+
import { useRoute as y, useRouter as h } from "vue-router";
|
3
|
+
import { _ as k } from "./Tab-a243605d.mjs";
|
4
|
+
import { _ as p } from "./Feed-4d9001aa.mjs";
|
5
|
+
import { s as i } from "./auth-5cd34aae.mjs";
|
6
|
+
import "./inputs.validation-14e8e01f.mjs";
|
7
|
+
import "./globals-96ba60e4.mjs";
|
8
|
+
import "vue-i18n";
|
9
|
+
import "./EmptyState-34d85f10.mjs";
|
10
|
+
import "./Chips-03ff0c34.mjs";
|
11
|
+
import "./IconEdit-eacf3856.mjs";
|
12
|
+
import "./_plugin-vue_export-helper-dad06003.mjs";
|
13
|
+
import "./index-4e469a71.mjs";
|
14
|
+
const g = { class: "pd-thin" }, w = { class: "mn-medium flex-v-center flex-nowrap flex" }, q = /* @__PURE__ */ d("h2", { class: "mn-r-medium" }, " Events ", -1), A = {
|
15
|
+
__name: "ProfileEvents",
|
16
|
+
setup(x) {
|
17
|
+
const e = y(), n = h();
|
18
|
+
let _ = e.query.tab ? e.query.tab : "owner";
|
19
|
+
const r = f(_);
|
20
|
+
return e.query.tab = r.value, v(r, (u) => {
|
21
|
+
n.replace({ query: { ...e.query, tab: u } });
|
22
|
+
}), (u, t) => (a(), c("div", g, [
|
23
|
+
d("header", w, [
|
24
|
+
q,
|
25
|
+
i.user._id === o(e).params._id ? (a(), c("button", {
|
26
|
+
key: 0,
|
27
|
+
onClick: t[0] || (t[0] = (m) => o(n).push({ name: "Create Event" })),
|
28
|
+
class: "radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"
|
29
|
+
}, " + ")) : s("", !0)
|
30
|
+
]),
|
31
|
+
b(k, {
|
32
|
+
selected: r.value,
|
33
|
+
"onUpdate:selected": t[1] || (t[1] = (m) => r.value = m),
|
34
|
+
tabs: [
|
35
|
+
{ name: "My", value: "owner" },
|
36
|
+
{ name: "Participant", value: "participant" }
|
37
|
+
],
|
38
|
+
class: "mn-small o-hidden h5 radius-big bg-grey"
|
39
|
+
}, null, 8, ["selected"]),
|
40
|
+
r.value === "owner" ? (a(), l(p, {
|
41
|
+
key: 0,
|
42
|
+
user: i.user._id,
|
43
|
+
creator: o(e).params._id,
|
44
|
+
sortOrder: "asc"
|
45
|
+
}, null, 8, ["user", "creator"])) : s("", !0),
|
46
|
+
r.value === "participant" ? (a(), l(p, {
|
47
|
+
key: 1,
|
48
|
+
user: i.user._id,
|
49
|
+
participant: o(e).params._id,
|
50
|
+
sortOrder: "desc"
|
51
|
+
}, null, 8, ["user", "participant"])) : s("", !0)
|
52
|
+
]));
|
53
|
+
}
|
54
|
+
};
|
55
|
+
export {
|
56
|
+
A as default
|
57
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("vue-router"),l=require("./Tab-dcd62005.js"),c=require("./Feed-51eef23f.js");require("./inputs.validation-24ae76b9.js");require("./globals-928eb13c.js");require("vue-i18n");require("./EmptyState-7658d7d6.js");require("./_plugin-vue_export-helper-f246444f.js");require("./Chips-3dac276c.js");require("./IconEdit-4cfe2115.js");require("./index-2059e444.js");const d={class:"pd-thin"},m=e.createElementVNode("header",{class:"mn-medium flex-v-center flex-nowrap flex"},[e.createElementVNode("h2",{class:"mn-r-medium"},"Likes")],-1),q={__name:"ProfileLikes",setup(p){const r=o.useRoute(),a=o.useRouter();let n=r.query.tab?r.query.tab:"posts";const t=e.ref(n);return r.query.tab=t.value,e.watch(t,u=>{a.replace({query:{...r.query,tab:u}})}),(u,s)=>(e.openBlock(),e.createElementBlock("div",d,[m,e.createVNode(l._sfc_main,{selected:t.value,"onUpdate:selected":s[0]||(s[0]=i=>t.value=i),tabs:[{name:"My posts",value:"posts"},{name:"Following",value:"hubs"}],class:"mn-r-medium o-hidden h5 radius-big bg-grey"},null,8,["selected"]),t.value==="posts"?(e.openBlock(),e.createBlock(c._sfc_main,{key:0,user:e.unref(r).params._id,owner:e.unref(r).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]))}};exports.default=q;
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { ref as l, watch as p, openBlock as s, createElementBlock as c, createVNode as d, createBlock as _, unref as a, createCommentVNode as f, createElementVNode as m } from "vue";
|
2
|
+
import { useRoute as b, useRouter as h } from "vue-router";
|
3
|
+
import { _ as v } from "./Tab-a243605d.mjs";
|
4
|
+
import { _ as y } from "./Feed-d78d4b91.mjs";
|
5
|
+
import "./inputs.validation-14e8e01f.mjs";
|
6
|
+
import "./globals-96ba60e4.mjs";
|
7
|
+
import "vue-i18n";
|
8
|
+
import "./EmptyState-34d85f10.mjs";
|
9
|
+
import "./_plugin-vue_export-helper-dad06003.mjs";
|
10
|
+
import "./Chips-03ff0c34.mjs";
|
11
|
+
import "./IconEdit-eacf3856.mjs";
|
12
|
+
import "./index-4e469a71.mjs";
|
13
|
+
const k = { class: "pd-thin" }, g = /* @__PURE__ */ m("header", { class: "mn-medium flex-v-center flex-nowrap flex" }, [
|
14
|
+
/* @__PURE__ */ m("h2", { class: "mn-r-medium" }, "Likes")
|
15
|
+
], -1), M = {
|
16
|
+
__name: "ProfileLikes",
|
17
|
+
setup(q) {
|
18
|
+
const e = b(), n = h();
|
19
|
+
let i = e.query.tab ? e.query.tab : "posts";
|
20
|
+
const t = l(i);
|
21
|
+
return e.query.tab = t.value, p(t, (r) => {
|
22
|
+
n.replace({ query: { ...e.query, tab: r } });
|
23
|
+
}), (r, o) => (s(), c("div", k, [
|
24
|
+
g,
|
25
|
+
d(v, {
|
26
|
+
selected: t.value,
|
27
|
+
"onUpdate:selected": o[0] || (o[0] = (u) => t.value = u),
|
28
|
+
tabs: [
|
29
|
+
{ name: "My posts", value: "posts" },
|
30
|
+
{ name: "Following", value: "hubs" }
|
31
|
+
],
|
32
|
+
class: "mn-r-medium o-hidden h5 radius-big bg-grey"
|
33
|
+
}, null, 8, ["selected"]),
|
34
|
+
t.value === "posts" ? (s(), _(y, {
|
35
|
+
key: 0,
|
36
|
+
user: a(e).params._id,
|
37
|
+
owner: a(e).params._id
|
38
|
+
}, null, 8, ["user", "owner"])) : f("", !0)
|
39
|
+
]));
|
40
|
+
}
|
41
|
+
};
|
42
|
+
export {
|
43
|
+
M as default
|
44
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("vue-router"),f=require("./Tab-dcd62005.js"),y=require("./EmptyState-7658d7d6.js"),h=require("./CardOrganization-63dcc83b.js"),k=require("./_plugin-vue_export-helper-f246444f.js"),g=require("./organizations-cf1ab766.js"),d=require("./auth-45a454f2.js");require("./inputs.validation-24ae76b9.js");require("./globals-928eb13c.js");require("vue-i18n");require("./ButtonFollow-bf5e6d42.js");require("./index-2059e444.js");const _={},v={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},w=e.createStaticVNode('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>',6),x=[w];function B(u,t){return e.openBlock(),e.createElementBlock("svg",v,x)}const C=k._export_sfc(_,[["render",B]]),N={class:"feed"},p={__name:"Feed",props:{category:{type:String,default:null},selectedDate:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},user:{type:[String,Number],default:null},member:{type:[String,Number],default:null},subscriber:{type:[String,Number],default:null},sortOrder:{type:String,default:"desc"},participant:{type:String,default:null},period:{type:String,default:null},status:{type:String,default:null}},setup(u){const t=u,a=e.ref([]),o=e.ref(!1),r=e.ref(!0),l=e.ref(0),n=e.ref(20),c=async()=>{if(o.value){l.value+=n.value;const i=await g.actions.read({skip:l.value,limit:n.value,category:t.category,sortOrder:t.sortOrder,member:t.member,subscriber:t.subscriber,onlyuser:t.onlyuser,user:t.user,date:t.selectedDate,owner:t.owner,organization:t.organization,period:t.period,status:t.status});i.length===0?o.value=!1:o.value=!0,a.value=[...a.value,...i]}};return e.onMounted(async()=>{r.value=!0,console.log(t.selectedDate);const i=await g.actions.read({skip:l.value,limit:n.value,category:t.category,member:t.member,subscriber:t.subscriber,onlyuser:t.onlyuser,sortOrder:t.sortOrder,user:t.user,owner:t.owner,date:t.selectedDate,organization:t.organization,period:t.period,status:t.status});i.length===0?o.value=!1:o.value=!0,a.value=i,r.value=!1}),(i,O)=>(e.openBlock(),e.createElementBlock("section",N,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[r.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.value,s=>(e.openBlock(),e.createBlock(C,{key:s}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!r.value&&a.value.length<1?(e.openBlock(),e.createBlock(y._sfc_main,{key:0,title:"No Organizations Found",description:"Currently, there are no organizations available. Please check back later.",class:"pd-medium mn-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"container"},{default:e.withCtx(()=>[!r.value&&a.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.value,(s,b)=>(e.openBlock(),e.createBlock(h._sfc_main,{onClick:$=>i.$router.push({name:"Organization",params:{_id:s._id}}),key:s._id,organization:s,user:u.user,type:"normal",class:e.normalizeClass(["w-100 radius-big mn-medium",{"br-b br-solid br-black-transp-10":b!==a.value.length-1}])},null,8,["onClick","organization","user","class"]))),128)):e.createCommentVNode("",!0),o.value&&a.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:c,class:"w-100 bg-main button"},"Load more")):e.createCommentVNode("",!0)]),_:1})]))}},q={class:"pd-thin"},z={class:"mn-medium flex-v-center flex-nowrap flex"},V=e.createElementVNode("h2",{class:"mn-r-medium"},"Groups",-1),S={__name:"ProfileOrganizations",setup(u){const t=m.useRoute(),a=m.useRouter();let o=t.query.tab?t.query.tab:"member";const r=e.ref(o);return t.query.tab=r.value,e.watch(r,l=>{a.replace({query:{...t.query,tab:l}})}),(l,n)=>(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("header",z,[V,d.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[0]||(n[0]=c=>l.$router.push({name:"Create Organization"})),class:"radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),e.createVNode(f._sfc_main,{selected:r.value,"onUpdate:selected":n[1]||(n[1]=c=>r.value=c),tabs:[{name:"Member",value:"member"},{name:"Follower",value:"follower"}],class:"mn-medium mn-r-medium o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="member"?(e.openBlock(),e.createBlock(p,{key:0,user:d.state.user._id,owner:e.unref(t).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="follower"?(e.openBlock(),e.createBlock(p,{key:0,user:d.state.user._id,subscriber:e.unref(t).params._id},null,8,["user","subscriber"])):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=S;
|