@ozdao/prometheus-framework 0.2.137 → 0.2.139
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +29 -14
- package/dist/auth.server.mjs +29 -14
- package/dist/community.server.js +3 -3
- package/dist/community.server.mjs +3 -3
- package/dist/events.server.js +3 -3
- package/dist/events.server.mjs +3 -3
- package/dist/files.server.js +3 -3
- package/dist/files.server.mjs +3 -3
- package/dist/gallery.server.js +4 -4
- package/dist/gallery.server.mjs +4 -4
- package/dist/index-DNI4aUP2.js +259 -0
- package/dist/index-Tcyehi73.mjs +260 -0
- package/dist/main-DTHFR7H_.mjs +14510 -0
- package/dist/main-wXdocsbd.js +92 -0
- package/dist/main.css +1 -1
- package/dist/orders.server.js +9 -8
- package/dist/orders.server.mjs +9 -8
- package/dist/organizations.server.js +32 -17
- package/dist/organizations.server.mjs +32 -17
- package/dist/products.server.js +37 -5
- package/dist/products.server.mjs +37 -5
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Completion/Completion.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Completion/Completion.vue.js +19 -19
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Map/Map.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Map/Map.vue.js +3 -2
- 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 +32 -31
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +50 -47
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.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 +2 -2
- 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/marketplace/store/marketplace.cjs +1 -1
- package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +12 -12
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +41 -38
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +123 -114
- 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 +51 -52
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +16 -15
- 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 +120 -60
- 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/organizations/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.js +25 -24
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +65 -66
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +81 -76
- package/dist/prometheus-framework/src/modules/spots/router/spots.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/router/spots.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 +2 -2
- 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 +78 -74
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/reports.server.js +0 -3
- package/dist/reports.server.mjs +0 -3
- package/dist/spots.server.js +3 -3
- package/dist/spots.server.mjs +3 -3
- package/dist/style.css +1 -1
- package/dist/wallet.server.js +5 -5
- package/dist/wallet.server.mjs +8 -8
- package/dist/web-Dh669DqQ.mjs +54 -0
- package/dist/web-Dt2RCU54.js +1 -0
- package/package.json +1 -1
- package/src/components/Completion/Completion.vue +29 -30
- package/src/components/Map/Map.vue +2 -2
- package/src/modules/auth/components/pages/Invite.vue +4 -2
- package/src/modules/auth/controllers/auth.controller.js +30 -12
- package/src/modules/auth/middlewares/authJwt.js +80 -0
- package/src/modules/{middlewares/server → auth/middlewares}/index.js +1 -3
- package/src/modules/{middlewares/server → auth/middlewares}/verifyAccesses.js +1 -1
- package/src/modules/auth/routes/auth.routes.js +2 -2
- package/src/modules/auth/routes/twofa.routes.js +1 -1
- package/src/modules/auth/store/auth.js +9 -0
- package/src/modules/chats/routes/chats.routes.js +1 -1
- package/src/modules/community/routes/blog.routes.js +2 -2
- package/src/modules/events/routes/events.routes.js +2 -2
- package/src/modules/files/routes/files.routes.js +2 -2
- package/src/modules/gallery/routes/gallery.routes.js +4 -5
- package/src/modules/globals/services/globals.crud.js +2 -2
- package/src/modules/marketplace/store/marketplace.js +1 -1
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +2 -2
- package/src/modules/orders/components/sections/FormAddCustomer.vue +2 -2
- package/src/modules/orders/controllers/orders.controller.js +1 -0
- package/src/modules/orders/routes/applications.routes.js +2 -2
- package/src/modules/orders/routes/orders.routes.js +2 -2
- package/src/modules/organizations/components/blocks/CardOrganization.vue +9 -7
- package/src/modules/organizations/components/pages/Members.vue +26 -15
- package/src/modules/organizations/components/pages/Organization.vue +3 -3
- package/src/modules/organizations/components/sections/DetailsTab.vue +1 -1
- package/src/modules/organizations/components/sections/MembersAdd.vue +101 -43
- package/src/modules/organizations/controllers/invites.controller.js +18 -13
- package/src/modules/organizations/controllers/memberships.controller.js +18 -11
- package/src/modules/organizations/controllers/organizations.controller.js +3 -4
- package/src/modules/organizations/models/membership.model.js +2 -0
- package/src/modules/organizations/models/organization.model.js +4 -0
- package/src/modules/organizations/routes/invites.routes.js +2 -2
- package/src/modules/organizations/store/invites.js +2 -1
- package/src/modules/products/controllers/leftovers.controller.js +1 -1
- package/src/modules/products/middlewares/index.js +11 -0
- package/src/modules/products/routes/categories.routes.js +2 -2
- package/src/modules/reports/routes/reports.routes.js +2 -2
- package/src/modules/spots/components/blocks/CardSpot.vue +0 -1
- package/src/modules/spots/components/layouts/Spots.vue +2 -2
- package/src/modules/spots/components/pages/Map.vue +79 -78
- package/src/modules/spots/components/pages/SpotEdit.vue +8 -5
- package/src/modules/spots/controllers/spots.controller.js +1 -5
- package/src/modules/spots/router/spots.js +1 -1
- package/src/modules/users/components/pages/ProfileEdit.vue +37 -22
- package/src/modules/wallet/controllers/routes/payments.routes.js +2 -2
- package/src/modules/wallet/controllers/routes/rewards.routes.js +2 -2
- package/src/modules/middlewares/server/authJwt.js +0 -68
- /package/src/modules/{middlewares/server → auth/middlewares}/authSecret.js +0 -0
- /package/src/modules/{middlewares/server → auth/middlewares}/verifyInvites.js +0 -0
- /package/src/modules/{middlewares/server → auth/middlewares}/verifySignUp.js +0 -0
- /package/src/modules/{middlewares/server → auth/middlewares}/verifyUser.js +0 -0
- /package/src/modules/globals/services/{globals.cashe.js → globals.cache.js} +0 -0
- /package/src/modules/{middlewares/server → products/middlewares}/verifyCategory.js +0 -0
@@ -1,5 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
const w = { class: "w-100 radius-big pd-medium bg-second t-black" },
|
1
|
+
import { computed as h, resolveComponent as p, openBlock as d, createElementBlock as g, createElementVNode as a, toDisplayString as c, createBlock as f, withCtx as b, createTextVNode as x, createCommentVNode as k, normalizeStyle as _ } from "vue";
|
2
|
+
const w = { class: "w-100 radius-big pd-medium bg-second t-black" }, y = { class: "mn-b-thin flex-v-center flex-nowrap flex" }, v = { class: "mn-l-thin uppercase radius-big t-semi t-medium t-white bg-black w-max pd-thin" }, C = { class: "w-100 h-2r pos-relative pd-nano bg-black radius-big" }, S = {
|
3
3
|
__name: "Completion",
|
4
4
|
props: {
|
5
5
|
user: Object,
|
@@ -9,38 +9,38 @@ const w = { class: "w-100 radius-big pd-medium bg-second t-black" }, v = { class
|
|
9
9
|
text: String,
|
10
10
|
text_cta: String
|
11
11
|
},
|
12
|
-
setup(
|
13
|
-
const { user: P, cta: B, target:
|
14
|
-
let
|
12
|
+
setup(n) {
|
13
|
+
const { user: P, cta: B, target: l } = n, m = (o) => {
|
14
|
+
let r = 0, i = 0;
|
15
15
|
function u(e) {
|
16
16
|
for (let t in e)
|
17
|
-
e.hasOwnProperty(t) && (e[t] && typeof e[t] == "object" && !Array.isArray(e[t]) ? u(e[t]) : (
|
17
|
+
e.hasOwnProperty(t) && (e[t] && typeof e[t] == "object" && !Array.isArray(e[t]) ? u(e[t]) : (r++, e[t] != null && e[t] !== "" && i++));
|
18
18
|
}
|
19
|
-
return u(o),
|
20
|
-
};
|
21
|
-
return
|
22
|
-
const
|
19
|
+
return u(o), r === 0 ? 0 : Math.round(i / r * 100);
|
20
|
+
}, s = h(() => l ? m(l) : 0);
|
21
|
+
return (o, r) => {
|
22
|
+
const i = p("router-link");
|
23
23
|
return d(), g("section", w, [
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
a("div", y, [
|
25
|
+
a("h3", null, c(n.text), 1),
|
26
|
+
a("h4", v, c(n.percentage || s.value) + "% ", 1),
|
27
|
+
n.cta ? (d(), f(i, {
|
28
28
|
key: 0,
|
29
29
|
to: {
|
30
30
|
name: "User Edit Profile",
|
31
|
-
params: { _id:
|
31
|
+
params: { _id: n.user }
|
32
32
|
},
|
33
33
|
class: "mn-l-auto uppercase radius-big t-semi t-medium t-white bg-black w-max pd-thin"
|
34
34
|
}, {
|
35
35
|
default: b(() => [
|
36
|
-
x(
|
36
|
+
x(c(n.text_cta), 1)
|
37
37
|
]),
|
38
38
|
_: 1
|
39
39
|
}, 8, ["to"])) : k("", !0)
|
40
40
|
]),
|
41
|
-
|
42
|
-
|
43
|
-
style: _(`width: ${
|
41
|
+
a("div", C, [
|
42
|
+
a("div", {
|
43
|
+
style: _(`width: ${s.value}%`),
|
44
44
|
class: "h-100 bg-second mn-b-thin radius-big"
|
45
45
|
}, null, 4)
|
46
46
|
])
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../modules/icons/skeletons/SkeletonEvent.vue.cjs");;/* empty css */const M=require("../EmptyState/EmptyState.vue.cjs"),B=require("../Dropdown/Dropdown.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../modules/icons/skeletons/SkeletonEvent.vue.cjs");;/* empty css */const M=require("../EmptyState/EmptyState.vue.cjs"),B=require("../Dropdown/Dropdown.vue2.cjs"),N=require("../DatePicker/Calendar.vue2.cjs"),x=require("../BottomSheet/BottomSheet.vue.cjs"),S=require("../../modules/globals/components/blocks/BlockSearch.vue.cjs"),q=require("../../modules/globals/components/blocks/BlockSorting.vue.cjs"),E=require("../../modules/globals/components/blocks/BlockFilter.vue.cjs"),z=require("../../modules/globals/components/elements/ButtonSort.vue.cjs"),O=require("../../modules/globals/components/elements/ButtonDate.vue.cjs"),L=require("../../modules/icons/navigation/IconFilter.vue.cjs");;/* empty css */const F={key:0,class:"flex-nowrap flex gap-thin"},j={__name:"Feed",props:e.mergeModels({showLoadMore:{type:Boolean,default:!0},search:{type:[Boolean,Object],default:!1},states:{type:Object,default:()=>({empty:{title:String,description:String}})},store:{type:Object,default:()=>({read:Function,state:Object})},external:{type:Boolean,default:!1},options:{type:Object,default:()=>({category:null,limit:20,skip:0,owner:null,creator:null,user:null,status:null,period:null,contain:null})}},{search:{},searchModifiers:{},sort:{},sortModifiers:{},filter:{},filterModifiers:{},date:{},dateModifiers:{},items:{},itemsModifiers:{}}),emits:["update:search","update:sort","update:filter","update:date","update:items"],setup(s){const m=e.useModel(s,"search"),a=e.useModel(s,"sort"),o=e.useModel(s,"filter"),r=e.useModel(s,"date"),h=e.useModel(s,"items"),u=s,n=e.ref(h.value||[]),d=e.ref(!1);let p=e.ref(!0),b=e.ref(null),i=e.ref(u.options.skip?u.options.skip:0),v=e.ref(u.options.limit?u.options.limit:10),k=e.ref("");function C(t){k.value=t,i.value=0,v.value=10,f()}const y=async()=>{if(d.value){i.value+=v.value;const t=await u.store.read({skip:i.value,limit:v.value,search:k.value,dateStart:r.value?r.value.start:null,dateEnd:r.value?r.value.end:null,sortParam:a.value?a.value.param:null,sortOrder:a.value?a.value.order:null,...u.options});t.length===0||t.length<v.value?d.value=!1:d.value=!0,n.value=[...n.value,...t],h.value&&(h.value=n.value)}},f=async()=>{const t=await u.store.read({skip:i.value,limit:v.value,dateStart:r.value?r.value.start:null,dateEnd:r.value?r.value.end:null,sortParam:a.value?a.value.param:null,sortOrder:a.value?a.value.order:null,search:k.value,...u.options});t.length===0||t.length<v.value?d.value=!1:d.value=!0,n.value=t,h.value&&(h.value=n.value),p.value=!1};e.watch(()=>u.external,(t,l)=>{t!==l&&(i.value=0,f())},{deep:!0}),e.watch(()=>r.value,(t,l)=>{t!==l&&(i.value=0,f())},{deep:!0}),e.watch(()=>{var t;return(t=a.value)==null?void 0:t.order},(t,l)=>{t!==l&&(i.value=0,f())}),e.watch(()=>{var t;return(t=a.value)==null?void 0:t.param},(t,l)=>{t!==l&&(i.value=0,f())}),e.watch(()=>u.options,(t,l)=>{(t.organization!==l.organization||t.categories!==l.categories||t.prices!==l.prices||t.delivery!==l.delivery||t.search!==l.search||t.status!==l.status||t.hidden!==l.hidden||t.type!==l.type||t.tags!==l.tags||t.following!==l.following)&&(i.value=0,f())},{deep:!0});let g=null;return e.onMounted(async()=>{await f(),typeof window<"u"&&!u.showLoadMore&&(g=new IntersectionObserver(t=>{t.some(l=>l.isIntersecting)&&y()}),g.observe(b.value))}),e.onUnmounted(()=>{g&&g.disconnect()}),(t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[m.value||r.value||a.value&&!a.value.hideButton?(e.openBlock(),e.createElementBlock("div",F,[m.value?(e.openBlock(),e.createBlock(S.default,{key:0,placeholder:m.value.placeholder||"Search...",class:e.normalizeClass(m.value.class||"bg-light"),onSearch:C},null,8,["placeholder","class"])):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:e.normalizeClass([o.value.class||"bg-light","flex-center flex pd-thin bg-light radius-extra aspect-1x1 h-100"])},[e.createVNode(L.default,{onClick:l[0]||(l[0]=()=>o.value.active=!o.value.active),class:"w-1r h-auto"})],2),o.value.active?(e.openBlock(),e.createBlock(x.default,{key:0,show:o.value.active,onToggle:l[2]||(l[2]=()=>o.value.active=!1),class:e.normalizeClass(["z-index-10 pos-fixed pos-t-0 pos-r-0",{"pos-t-0":o.value.active,"pos-t-100":!o.value.active}])},{default:e.withCtx(()=>[e.createVNode(E.default,{filter:o.value,"onUpdate:filter":l[1]||(l[1]=c=>o.value=c),options:o.value.options,class:"h-100 w-100 pd-small bg-light"},null,8,["filter","options"])]),_:1},8,["show","class"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createBlock(B.default,{key:2,label:{component:O.default,props:{date:r.value}},class:e.normalizeClass([r.value.class||"bg-light","flex-child flex-child-shrink-0 pd-r-small pd-l-small pd-thin bg-light radius-big"]),align:m.value?"right":"left"},{default:e.withCtx(()=>[e.createVNode(N.default,{date:r.value,"onUpdate:date":l[3]||(l[3]=c=>r.value=c),locale:t.$i18n.locale,allowRange:!0,class:"radius-semi w-100 o-hidden bg-light"},null,8,["date","locale"])]),_:1},8,["label","class","align"])):e.createCommentVNode("",!0),a.value&&!a.value.hideButton?(e.openBlock(),e.createBlock(B.default,{key:3,label:{component:z.default,props:{order:a.value.order},class:"w-1r"},class:e.normalizeClass([a.value.class||"bg-light","radius-extra aspect-1x1 h-100"]),align:m.value?"right":"left"},{default:e.withCtx(()=>[e.createVNode(q.default,{param:a.value.param,"onUpdate:param":l[4]||(l[4]=c=>a.value.param=c),order:a.value.order,"onUpdate:order":l[5]||(l[5]=c=>a.value.order=c),options:a.value.options,class:"h-100 pd-small radius-semi t-white bg-black"},null,8,["param","order","options"])]),_:1},8,["label","class","align"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:1,tag:"ul",name:"scaleTransition"},{default:e.withCtx(()=>[e.unref(p)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(v),c=>(e.openBlock(),e.createBlock(w.default,{key:"skeleton-"+c,class:"mn-b-small radius-big o-hidden d-block"}))),128)):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),!e.unref(p)&&n.value.length<1?(e.openBlock(),e.createBlock(e.TransitionGroup,{key:2,tag:"ul",name:"feed"},{default:e.withCtx(()=>[!e.unref(p)&&n.value.length<1?(e.openBlock(),e.createBlock(M.default,{key:0,title:s.states.empty.title,description:s.states.empty.description,action:s.states.empty.action,callback:s.states.empty.callback,class:"pd-medium mn-b-thin bg-light radius-big"},null,8,["title","description","action","callback"])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.TransitionGroup,{tag:"ul",name:"feed",class:e.normalizeClass(t.$attrs.class)},{default:e.withCtx(()=>[!e.unref(p)&&n.value.length>0?e.renderSlot(t.$slots,"default",{key:0,items:n.value}):e.createCommentVNode("",!0),s.showLoadMore&&d.value&&n.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:y,class:"col-w-100 w-100 bg-main button"}," Load More ")):e.createCommentVNode("",!0),e.createElementVNode("div",{key:"sentinel",ref_key:"sentinel",ref:b,class:"sentinel"},null,512)]),_:3},8,["class"])],64))}};exports.default=j;
|
@@ -2,7 +2,7 @@ import { mergeModels as N, useModel as M, ref as g, watch as $, onMounted as T,
|
|
2
2
|
import q from "../../modules/icons/skeletons/SkeletonEvent.vue.js";
|
3
3
|
/* empty css */
|
4
4
|
import A from "../EmptyState/EmptyState.vue.js";
|
5
|
-
import z from "../Dropdown/Dropdown.
|
5
|
+
import z from "../Dropdown/Dropdown.vue2.js";
|
6
6
|
import D from "../DatePicker/Calendar.vue2.js";
|
7
7
|
import H from "../BottomSheet/BottomSheet.vue.js";
|
8
8
|
import J from "../../modules/globals/components/blocks/BlockSearch.vue.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),i=require("../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs");;/* empty css */const s=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),p={__name:"Map",props:{location:Object,apiKey:String},setup(r){const e=r;let t=o.ref(null),l=null,a=null;return o.onMounted(async()=>{new i.Loader({apiKey:e.apiKey,version:"weekly",libraries:["places"],language:e.locale}).load().then(()=>{l=new google.maps.Map(t.value,{zoom:13,center:{lat:e.location.lat,lng:e.location.lng}}),a=new google.maps.Marker({position:{lat:e.location.lat,lng:e.location.lng},map:l})}).catch(n=>{console.error(n)})}),o.watch(()=>e.location,()=>{l&&a&&(a.setPosition(new google.maps.LatLng(e.location.lat,e.location.lng)),l.setCenter(new google.maps.LatLng(e.location.lat,e.location.lng)))},{deep:!0}),(c,n)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"gmap",ref:t,class:"gmap"},null,512))}},
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("vue"),i=require("../../../../node_modules/@googlemaps/js-api-loader/dist/index.cjs");;/* empty css */const s=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),p={__name:"Map",props:{location:Object,apiKey:String,locale:String},setup(r){const e=r;let t=o.ref(null),l=null,a=null;return o.onMounted(async()=>{new i.Loader({apiKey:e.apiKey,version:"weekly",libraries:["places"],language:e.locale}).load().then(()=>{l=new google.maps.Map(t.value,{zoom:13,center:{lat:e.location.lat,lng:e.location.lng}}),a=new google.maps.Marker({position:{lat:e.location.lat,lng:e.location.lng},map:l})}).catch(n=>{console.error(n)})}),o.watch(()=>e.location,()=>{l&&a&&(a.setPosition(new google.maps.LatLng(e.location.lat,e.location.lng)),l.setCenter(new google.maps.LatLng(e.location.lat,e.location.lng)))},{deep:!0}),(c,n)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"gmap",ref:t,class:"gmap"},null,512))}},g=s.default(p,[["__scopeId","data-v-786189a4"]]);exports.default=g;
|
@@ -6,7 +6,8 @@ const _ = {
|
|
6
6
|
__name: "Map",
|
7
7
|
props: {
|
8
8
|
location: Object,
|
9
|
-
apiKey: String
|
9
|
+
apiKey: String,
|
10
|
+
locale: String
|
10
11
|
},
|
11
12
|
setup(n) {
|
12
13
|
const o = n;
|
@@ -42,7 +43,7 @@ const _ = {
|
|
42
43
|
class: "gmap"
|
43
44
|
}, null, 512));
|
44
45
|
}
|
45
|
-
}, y = /* @__PURE__ */ u(_, [["__scopeId", "data-v-
|
46
|
+
}, y = /* @__PURE__ */ u(_, [["__scopeId", "data-v-786189a4"]]);
|
46
47
|
export {
|
47
48
|
y as default
|
48
49
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const n=require("../../../../components/Field/Field.vue2.cjs"),m=require("../../../../components/Button/Button.vue2.cjs"),l=require("vue-router"),t=require("../../store/auth.cjs"),_=require("../../../organizations/store/invites.cjs"),d=require("../../../middlewares/client/inputs.validation.cjs");;/* empty css */const f={class:"t-left pd-medium"},h=e.createElementVNode("h3",{class:"mn-b-small"},"You have been invited to the organization",-1),w=e.createElementVNode("p",{class:"mn-b-semi t-transp"},"Please provide a password to complete the registration.",-1),v={class:"mn-b-semi radius-small o-hidden"},b=e.createElementVNode("span",null,"Join",-1),q={__name:"Invite",setup(g){const i=e.ref(null),a=l.useRoute(),u=l.useRouter();e.onMounted(async()=>{await _.actions.readOne(a.query.inviteCode)});async function c(){try{await d.validateInputs(i,d.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}try{await t.actions.signup(t.state.user,a.query.type,a.query.inviteCode)}catch(r){console.log(r)}}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(r,s)=>(e.openBlock(),e.createElementBlock("section",f,[h,w,e.createElementVNode("div",v,[e.createVNode(n.default,{field:t.state.user.password,"onUpdate:field":s[0]||(s[0]=o=>t.state.user.password=o),type:"password",validation:i.value,label:"Password",placeholder:"******",class:"mn-b-thin bg-light pd-medium radius-small"},null,8,["field","validation"]),e.createVNode(n.default,{field:t.state.user.passwordRepeat,"onUpdate:field":s[1]||(s[1]=o=>t.state.user.passwordRepeat=o),type:"password",label:"Repeat Password",placeholder:"******",class:"bg-light pd-medium radius-small"},null,8,["field"])]),e.createVNode(m.default,{submit:c,callback:p,class:"w-100 bg-main mn-b-big"},{default:e.withCtx(()=>[b]),_:1})]))}};exports.default=q;
|
@@ -1,23 +1,24 @@
|
|
1
|
-
import { ref as
|
1
|
+
import { ref as u, onMounted as c, openBlock as f, createElementBlock as _, createElementVNode as s, createVNode as i, withCtx as w } from "vue";
|
2
2
|
/* empty css */
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import { useRoute as
|
6
|
-
import { state as e, actions as
|
7
|
-
import { actions as
|
8
|
-
import { validateInputs as
|
3
|
+
import l from "../../../../components/Field/Field.vue2.js";
|
4
|
+
import h from "../../../../components/Button/Button.vue2.js";
|
5
|
+
import { useRoute as b, useRouter as v } from "vue-router";
|
6
|
+
import { state as e, actions as y } from "../../store/auth.js";
|
7
|
+
import { actions as g } from "../../../organizations/store/invites.js";
|
8
|
+
import { validateInputs as P, validatePassword as R } from "../../../middlewares/client/inputs.validation.js";
|
9
9
|
/* empty css */
|
10
|
-
const
|
10
|
+
const q = { class: "t-left pd-medium" }, k = /* @__PURE__ */ s("h3", { class: "mn-b-small" }, "You have been invited to the organization", -1), x = /* @__PURE__ */ s("p", { class: "mn-b-semi t-transp" }, "Please provide a password to complete the registration.", -1), C = { class: "mn-b-semi radius-small o-hidden" }, E = /* @__PURE__ */ s("span", null, "Join", -1), O = {
|
11
11
|
__name: "Invite",
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
setup(U) {
|
13
|
+
const n = u(null), o = b(), d = v();
|
14
|
+
c(async () => {
|
15
|
+
await g.readOne(o.query.inviteCode);
|
16
|
+
});
|
17
|
+
async function m() {
|
17
18
|
try {
|
18
|
-
await
|
19
|
-
|
20
|
-
|
19
|
+
await P(
|
20
|
+
n,
|
21
|
+
R,
|
21
22
|
e.user.password,
|
22
23
|
"Некорректный пароль"
|
23
24
|
);
|
@@ -25,13 +26,13 @@ const C = { class: "t-left pd-medium" }, k = /* @__PURE__ */ s("h3", { class: "m
|
|
25
26
|
throw new Error();
|
26
27
|
}
|
27
28
|
try {
|
28
|
-
await
|
29
|
+
await y.signup(e.user, o.query.type, o.query.inviteCode);
|
29
30
|
} catch (a) {
|
30
31
|
console.log(a);
|
31
32
|
}
|
32
33
|
}
|
33
|
-
function
|
34
|
-
|
34
|
+
function p() {
|
35
|
+
d.push({
|
35
36
|
name: "User Profile",
|
36
37
|
params: {
|
37
38
|
_id: e.user._id
|
@@ -41,20 +42,20 @@ const C = { class: "t-left pd-medium" }, k = /* @__PURE__ */ s("h3", { class: "m
|
|
41
42
|
}
|
42
43
|
});
|
43
44
|
}
|
44
|
-
return (a, t) => (
|
45
|
+
return (a, t) => (f(), _("section", q, [
|
45
46
|
k,
|
46
|
-
|
47
|
-
s("div",
|
48
|
-
i(
|
47
|
+
x,
|
48
|
+
s("div", C, [
|
49
|
+
i(l, {
|
49
50
|
field: e.user.password,
|
50
51
|
"onUpdate:field": t[0] || (t[0] = (r) => e.user.password = r),
|
51
52
|
type: "password",
|
52
|
-
validation:
|
53
|
+
validation: n.value,
|
53
54
|
label: "Password",
|
54
55
|
placeholder: "******",
|
55
56
|
class: "mn-b-thin bg-light pd-medium radius-small"
|
56
57
|
}, null, 8, ["field", "validation"]),
|
57
|
-
i(
|
58
|
+
i(l, {
|
58
59
|
field: e.user.passwordRepeat,
|
59
60
|
"onUpdate:field": t[1] || (t[1] = (r) => e.user.passwordRepeat = r),
|
60
61
|
type: "password",
|
@@ -63,13 +64,13 @@ const C = { class: "t-left pd-medium" }, k = /* @__PURE__ */ s("h3", { class: "m
|
|
63
64
|
class: "bg-light pd-medium radius-small"
|
64
65
|
}, null, 8, ["field"])
|
65
66
|
]),
|
66
|
-
i(
|
67
|
-
submit:
|
68
|
-
callback:
|
67
|
+
i(h, {
|
68
|
+
submit: m,
|
69
|
+
callback: p,
|
69
70
|
class: "w-100 bg-main mn-b-big"
|
70
71
|
}, {
|
71
|
-
default:
|
72
|
-
|
72
|
+
default: w(() => [
|
73
|
+
E
|
73
74
|
]),
|
74
75
|
_: 1
|
75
76
|
})
|
@@ -77,5 +78,5 @@ const C = { class: "t-left pd-medium" }, k = /* @__PURE__ */ s("h3", { class: "m
|
|
77
78
|
}
|
78
79
|
};
|
79
80
|
export {
|
80
|
-
|
81
|
+
O as default
|
81
82
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("axios"),w=require("../../../../../node_modules/js-cookie/dist/js.cookie.cjs"),g=require("../../../../node_modules/@capacitor/preferences/dist/esm/index.cjs"),O=require("vue"),c=require("../../globals/store/globals.cjs"),k=require("./twofa.cjs"),u=d.create({baseURL:process.env.API_URL,withCredentials:!0}),r=O.reactive({user:{_id:void 0,username:"",email:"",phone:"",password:"",passwordRepeat:""},access:{roles:null,token:null,status:!1},accesses:[]});async function p(){try{const e=await j("user");if(e){const{_id:t,email:s,phone:n,roles:o,accessToken:a}=e;d.interceptors.request.use(i=>(i.headers["x-access-token"]=a,i),i=>Promise.reject(i));const h=(await d.get("/api/auth/check-accesses")).data;Object.assign(r.user,{_id:t,email:s,phone:n}),Object.assign(r.access,{token:a,roles:o,status:!!a}),r.accesses=h}}catch(e){console.error("Error initializing app:",e),f("user"),r.accesses=[]}}p();const m={async login(e,t){try{const s=await u.post("/api/auth/signin",{...e,type:t});return l("user",s.data),Object.assign(r.user,{...s.data}),Object.assign(r.access,{token:s.data.accessToken,status:!0,roles:s.data.roles}),await p(),s.data}catch(s){return Object.assign(r.access,{token:null,status:!1,roles:null}),console.log(s),c.setError(s),Promise.reject(s)}},async signup(e,t,s){const{password:n,passwordRepeat:o}=r.user;if(console.log(n),console.log(o),n!==o){const a={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw c.setError(a),new Error(a.response.status)}try{const a=await u.post("/api/auth/signup",{...e,type:t,inviteCode:s});return console.log(a),a.data.accessToken&&l("user",a.data),Object.assign(r.user,{...a.data}),Object.assign(r.access,{token:a.data.accessToken,status:!0,roles:a.data.roles}),await p(),a.data}catch(a){throw c.setError(a),console.log("Sign up falied"),a}},logout(){f("user"),Object.assign(r.user,{_id:void 0,username:"",email:"",phone:"",password:"",passwordRepeat:""}),Object.assign(r.access,{roles:null,token:null,status:!1}),r.accesses=[]},async resetPassword(e,t){try{const s=await u.post("/api/auth/reset-password",{email:e.email,phone:e.phone,type:t});return Object.assign(k.state.code,{...s.data,isSended:!0}),s.data}catch(s){return c.setError(s),Promise.reject(s)}},async updatePassword(e,t){const{password:s,passwordRepeat:n}=r.user;if(s!==n){const o={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw c.setError(o),new Error(o.response.status)}try{const o=await u.post("/api/auth/update-password",{email:e.email,phone:e.phone,password:e.password,passwordRepeat:e.passwordRepeat,type:t});return o.data.accessToken&&l("user",o.data),Object.assign(r.user,{...o.data}),Object.assign(r.access,{token:o.data.accessToken,status:!0}),o.data}catch(o){return c.setError(o),Promise.reject(o)}}},P={development:{secure:!1,expires:7,sameSite:"Lax"},production:{expires:7,path:"/",domain:process.env.DOMAIN_URL,sameSite:"none",secure:!0}};async function j(e){if(process.env.MOBILE_APP){const{value:t}=await g.Preferences.get({key:e});return t?JSON.parse(t):null}else{const t=w.default.get(e);return t?JSON.parse(t):null}}function l(e,t,s=process.env.DOMAIN_URL){process.env.MOBILE_APP?g.Preferences.set({key:e,value:JSON.stringify(t)}):w.default.set(e,JSON.stringify(t),P[s])}function f(e,t=process.env.NODE_ENV){if(process.env.MOBILE_APP)g.Preferences.remove({key:e});else{const s=t==="production"?{domain:process.env.DOMAIN_URL}:{};w.default.remove(e,s)}}O.watch(r,(e,t)=>{});exports.actions=m;exports.initialize=p;exports.state=r;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import d from "axios";
|
2
|
-
import
|
3
|
-
import { Preferences as
|
4
|
-
import { reactive as
|
2
|
+
import w from "../../../../../node_modules/js-cookie/dist/js.cookie.js";
|
3
|
+
import { Preferences as m } from "../../../../node_modules/@capacitor/preferences/dist/esm/index.js";
|
4
|
+
import { reactive as f, watch as h } from "vue";
|
5
5
|
import { setError as c } from "../../globals/store/globals.js";
|
6
|
-
import { state as
|
7
|
-
const p = d.create({ baseURL: process.env.API_URL, withCredentials: !0 }),
|
6
|
+
import { state as k } from "./twofa.js";
|
7
|
+
const p = d.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = f({
|
8
8
|
user: {
|
9
9
|
_id: void 0,
|
10
10
|
username: "",
|
@@ -20,20 +20,20 @@ const p = d.create({ baseURL: process.env.API_URL, withCredentials: !0 }), o = O
|
|
20
20
|
},
|
21
21
|
accesses: []
|
22
22
|
});
|
23
|
-
async function
|
23
|
+
async function l() {
|
24
24
|
try {
|
25
|
-
const e = await
|
25
|
+
const e = await j("user");
|
26
26
|
if (e) {
|
27
|
-
const { _id: t, email: s, phone: n, roles:
|
27
|
+
const { _id: t, email: s, phone: n, roles: o, accessToken: a } = e;
|
28
28
|
d.interceptors.request.use((i) => (i.headers["x-access-token"] = a, i), (i) => Promise.reject(i));
|
29
|
-
const
|
30
|
-
Object.assign(
|
29
|
+
const O = (await d.get("/api/auth/check-accesses")).data;
|
30
|
+
Object.assign(r.user, { _id: t, email: s, phone: n }), Object.assign(r.access, { token: a, roles: o, status: !!a }), r.accesses = O;
|
31
31
|
}
|
32
32
|
} catch (e) {
|
33
|
-
console.error("Error initializing app:", e), g("user"),
|
33
|
+
console.error("Error initializing app:", e), g("user"), r.accesses = [];
|
34
34
|
}
|
35
35
|
}
|
36
|
-
|
36
|
+
l();
|
37
37
|
const N = {
|
38
38
|
async login(e, t) {
|
39
39
|
try {
|
@@ -41,15 +41,15 @@ const N = {
|
|
41
41
|
...e,
|
42
42
|
type: t
|
43
43
|
});
|
44
|
-
return u("user", s.data), Object.assign(
|
44
|
+
return u("user", s.data), Object.assign(r.user, {
|
45
45
|
...s.data
|
46
|
-
}), Object.assign(
|
46
|
+
}), Object.assign(r.access, {
|
47
47
|
token: s.data.accessToken,
|
48
48
|
status: !0,
|
49
49
|
roles: s.data.roles
|
50
|
-
}), s.data;
|
50
|
+
}), await l(), s.data;
|
51
51
|
} catch (s) {
|
52
|
-
return Object.assign(
|
52
|
+
return Object.assign(r.access, {
|
53
53
|
token: null,
|
54
54
|
status: !1,
|
55
55
|
roles: null
|
@@ -57,8 +57,8 @@ const N = {
|
|
57
57
|
}
|
58
58
|
},
|
59
59
|
async signup(e, t, s) {
|
60
|
-
const { password: n, passwordRepeat:
|
61
|
-
if (console.log(n), console.log(
|
60
|
+
const { password: n, passwordRepeat: o } = r.user;
|
61
|
+
if (console.log(n), console.log(o), n !== o) {
|
62
62
|
const a = {
|
63
63
|
response: {
|
64
64
|
data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
|
@@ -72,27 +72,30 @@ const N = {
|
|
72
72
|
type: t,
|
73
73
|
inviteCode: s
|
74
74
|
});
|
75
|
-
return console.log(a), a.data.accessToken && u("user", a.data), Object.assign(
|
75
|
+
return console.log(a), a.data.accessToken && u("user", a.data), Object.assign(r.user, {
|
76
76
|
...a.data
|
77
|
-
}), Object.assign(
|
77
|
+
}), Object.assign(r.access, {
|
78
78
|
token: a.data.accessToken,
|
79
79
|
status: !0,
|
80
80
|
roles: a.data.roles
|
81
|
-
}), a.data;
|
81
|
+
}), await l(), a.data;
|
82
82
|
} catch (a) {
|
83
83
|
throw c(a), console.log("Sign up falied"), a;
|
84
84
|
}
|
85
85
|
},
|
86
86
|
logout() {
|
87
|
-
g("user"), Object.assign(
|
87
|
+
g("user"), Object.assign(r.user, {
|
88
|
+
_id: void 0,
|
89
|
+
username: "",
|
88
90
|
email: "",
|
89
91
|
phone: "",
|
90
92
|
password: "",
|
91
93
|
passwordRepeat: ""
|
92
|
-
}), Object.assign(
|
94
|
+
}), Object.assign(r.access, {
|
95
|
+
roles: null,
|
93
96
|
token: null,
|
94
97
|
status: !1
|
95
|
-
});
|
98
|
+
}), r.accesses = [];
|
96
99
|
},
|
97
100
|
async resetPassword(e, t) {
|
98
101
|
try {
|
@@ -101,7 +104,7 @@ const N = {
|
|
101
104
|
phone: e.phone,
|
102
105
|
type: t
|
103
106
|
});
|
104
|
-
return Object.assign(
|
107
|
+
return Object.assign(k.code, {
|
105
108
|
...s.data,
|
106
109
|
isSended: !0
|
107
110
|
}), s.data;
|
@@ -110,64 +113,64 @@ const N = {
|
|
110
113
|
}
|
111
114
|
},
|
112
115
|
async updatePassword(e, t) {
|
113
|
-
const { password: s, passwordRepeat: n } =
|
116
|
+
const { password: s, passwordRepeat: n } = r.user;
|
114
117
|
if (s !== n) {
|
115
|
-
const
|
118
|
+
const o = {
|
116
119
|
response: {
|
117
120
|
data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
|
118
121
|
}
|
119
122
|
};
|
120
|
-
throw c(
|
123
|
+
throw c(o), new Error(o.response.status);
|
121
124
|
}
|
122
125
|
try {
|
123
|
-
const
|
126
|
+
const o = await p.post("/api/auth/update-password", {
|
124
127
|
email: e.email,
|
125
128
|
phone: e.phone,
|
126
129
|
password: e.password,
|
127
130
|
passwordRepeat: e.passwordRepeat,
|
128
131
|
type: t
|
129
132
|
});
|
130
|
-
return
|
131
|
-
...
|
132
|
-
}), Object.assign(
|
133
|
-
token:
|
133
|
+
return o.data.accessToken && u("user", o.data), Object.assign(r.user, {
|
134
|
+
...o.data
|
135
|
+
}), Object.assign(r.access, {
|
136
|
+
token: o.data.accessToken,
|
134
137
|
status: !0
|
135
|
-
}),
|
136
|
-
} catch (
|
137
|
-
return c(
|
138
|
+
}), o.data;
|
139
|
+
} catch (o) {
|
140
|
+
return c(o), Promise.reject(o);
|
138
141
|
}
|
139
142
|
}
|
140
|
-
},
|
143
|
+
}, _ = {
|
141
144
|
development: { secure: !1, expires: 7, sameSite: "Lax" },
|
142
145
|
production: { expires: 7, path: "/", domain: process.env.DOMAIN_URL, sameSite: "none", secure: !0 }
|
143
146
|
};
|
144
|
-
async function
|
147
|
+
async function j(e) {
|
145
148
|
if (process.env.MOBILE_APP) {
|
146
|
-
const { value: t } = await
|
149
|
+
const { value: t } = await m.get({ key: e });
|
147
150
|
return t ? JSON.parse(t) : null;
|
148
151
|
} else {
|
149
|
-
const t =
|
152
|
+
const t = w.get(e);
|
150
153
|
return t ? JSON.parse(t) : null;
|
151
154
|
}
|
152
155
|
}
|
153
156
|
function u(e, t, s = process.env.DOMAIN_URL) {
|
154
|
-
process.env.MOBILE_APP ?
|
157
|
+
process.env.MOBILE_APP ? m.set({
|
155
158
|
key: e,
|
156
159
|
value: JSON.stringify(t)
|
157
|
-
}) :
|
160
|
+
}) : w.set(e, JSON.stringify(t), _[s]);
|
158
161
|
}
|
159
162
|
function g(e, t = process.env.NODE_ENV) {
|
160
163
|
if (process.env.MOBILE_APP)
|
161
|
-
|
164
|
+
m.remove({ key: e });
|
162
165
|
else {
|
163
166
|
const s = t === "production" ? { domain: process.env.DOMAIN_URL } : {};
|
164
|
-
|
167
|
+
w.remove(e, s);
|
165
168
|
}
|
166
169
|
}
|
167
|
-
|
170
|
+
h(r, (e, t) => {
|
168
171
|
});
|
169
172
|
export {
|
170
173
|
N as actions,
|
171
|
-
|
172
|
-
|
174
|
+
l as initialize,
|
175
|
+
r as state
|
173
176
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("../../../../components/Menu/Menu.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("../../../../components/Menu/Menu.vue2.cjs"),s=require("../../../../components/Menu/MenuItem.vue.cjs");;/* empty css */const a=require("../../../icons/entities/IconProducts.vue.cjs"),u=require("../../../icons/entities/IconEvents.vue.cjs"),i=require("../../../icons/entities/IconGroups.vue.cjs"),c=require("../../../icons/entities/IconGallery.vue.cjs"),d=require("../../../icons/entities/IconOrders.vue.cjs"),f=require("../../../icons/entities/IconLeftovers.vue.cjs"),l=require("vue-router");require("../../../auth/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const m={class:""},p=e.createElementVNode("h1",{class:"pd-medium radius-medium bg-light mn-b-small"},"Welcome to Backoffice2",-1),N=e.createElementVNode("span",null," Members ",-1),V=e.createElementVNode("span",null," Community ",-1),v=e.createElementVNode("span",null," Products ",-1),h=e.createElementVNode("span",null," Leftovers ",-1),_=e.createElementVNode("span",null," Orders ",-1),C=e.createElementVNode("span",null," Gallery ",-1),k=e.createElementVNode("span",null," Events ",-1),g=e.createElementVNode("span",null," Payments ",-1),w=e.createElementVNode("span",null," Organizations ",-1),b=e.createElementVNode("span",null," Pages ",-1),E=e.createElementVNode("span",null," Reports ",-1),x={__name:"Dashboard",props:{favorites:Array},setup(q){l.useRoute();const r=l.useRouter();return e.ref(null),e.ref([]),e.onMounted(async()=>{}),($,t)=>(e.openBlock(),e.createElementBlock("div",m,[p,e.createVNode(n.default,{class:"bg-light mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(s.default,{onClick:t[0]||(t[0]=o=>e.unref(r).push({name:"Organization Members"})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(i.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),N]),_:1}),e.createVNode(s.default,{onClick:t[1]||(t[1]=o=>e.unref(r).push({name:"Backoffice Community"})),class:"cursor-pointer"},{default:e.withCtx(()=>[V]),_:1}),e.createVNode(s.default,{onClick:t[2]||(t[2]=o=>e.unref(r).push({name:"Products"})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(a.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),v]),_:1}),e.createVNode(s.default,{onClick:t[3]||(t[3]=o=>e.unref(r).push({name:"Leftovers"})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),h]),_:1}),e.createVNode(s.default,{onClick:t[4]||(t[4]=o=>e.unref(r).push({name:"Backoffice Orders"})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(d.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),_]),_:1}),e.createVNode(s.default,{onClick:t[5]||(t[5]=o=>e.unref(r).push({name:"Backoffice Gallery"})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(c.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),C]),_:1}),e.createVNode(s.default,{onClick:t[6]||(t[6]=o=>e.unref(r).push({name:"Backoffice Events"})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(u.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),k]),_:1}),e.createVNode(s.default,{onClick:t[7]||(t[7]=o=>e.unref(r).push({name:"Payments"})),class:"cursor-pointer"},{default:e.withCtx(()=>[g]),_:1})]),_:1}),e.createVNode(n.default,{class:"bg-light"},{default:e.withCtx(()=>[e.createVNode(s.default,{onClick:t[8]||(t[8]=o=>e.unref(r).push({name:"Backoffice Organizations"})),class:"cursor-pointer"},{default:e.withCtx(()=>[w]),_:1}),e.createVNode(s.default,{onClick:t[9]||(t[9]=o=>e.unref(r).push({name:"Backoffice Pages"})),class:"cursor-pointer"},{default:e.withCtx(()=>[b]),_:1}),e.createVNode(s.default,{onClick:t[10]||(t[10]=o=>e.unref(r).push({name:"Backoffice Reports"})),class:"cursor-pointer"},{default:e.withCtx(()=>[E]),_:1})]),_:1})]))}};exports.default=x;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as a, onMounted as m, openBlock as f, createElementBlock as c, createVNode as e, withCtx as o, unref as i, createElementVNode as t } from "vue";
|
2
|
-
import u from "../../../../components/Menu/Menu.
|
2
|
+
import u from "../../../../components/Menu/Menu.vue2.js";
|
3
3
|
import r from "../../../../components/Menu/MenuItem.vue.js";
|
4
4
|
/* empty css */
|
5
5
|
import p from "../../../icons/entities/IconProducts.vue.js";
|
package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const s=require("../../../../components/Slider/Slider.vue.cjs"),i=require("../blocks/CardBlogpost.vue.cjs"),l=require("../../store/blogposts.cjs"),r=require("../../../auth/store/auth.cjs");;/* empty css */const n={class:"pd-thin"},a={class:"bg-light radius-big pd-t-big pd-b-big"},c={class:"w-100 pd-b-small t-center flex-center flex"},u=e.createElementVNode("b",null,"Community",-1),d={__name:"HotPosts",setup(p){return(_,h)=>{const o=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",n,[e.createElementVNode("div",a,[e.createElementVNode("h2",c,[e.createTextVNode(" Discover Our "),e.createVNode(o,{to:{name:"Blog"},class:"transition-ease-in hover-bg-black hover-t-white transition-timing-1 hover-scale-0 bg-main cursor-pointer pd-thin pd-r-small pd-l-small mn-l-thin radius-extra flex flex-v-center"},{default:e.withCtx(()=>[u]),_:1})]),e.createVNode(s.default,{store:{read:t=>l.read(t)},options:{skip:0,limit:8,user:r.state.user._id,period:"year",category:"featured"},text:{messages:{en:{title:"No Blogposts Found",description:"Currently, there are no blogposts available."}}},class:"slider-hotpost"},{default:e.withCtx(({item:t})=>[(e.openBlock(),e.createBlock(i.default,{key:t._id,blogpost:t,user:r.state.user._id,hideDescription:!0,class:"bg-white flex flex-column h-35r"},null,8,["blogpost","user"]))]),_:1},8,["store","options"])])])}}};exports.default=d;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { resolveComponent as n, openBlock as o, createElementBlock as a, createElementVNode as t, createTextVNode as c, createVNode as r, withCtx as s, createBlock as p } from "vue";
|
2
2
|
/* empty css */
|
3
|
-
/* empty css
|
3
|
+
/* empty css */
|
4
4
|
/* empty css */
|
5
5
|
/* empty css */
|
6
6
|
/* empty css */
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),x=require("vue-router"),C=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),V=require("../../../reports/components/sections/FormReport.vue.cjs"),N=require("../../../../components/Tooltip/Tooltip.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),x=require("vue-router"),C=require("../../../icons/placeholders/PlaceholderUserpic.vue.cjs"),V=require("../../../reports/components/sections/FormReport.vue.cjs"),N=require("../../../../components/Tooltip/Tooltip.vue.cjs"),v=require("../../../../components/Dropdown/Dropdown.vue2.cjs");;/* empty css */;/* empty css */require("../../../auth/store/auth.cjs");require("../../../organizations/store/memberships.cjs");const $=require("../../../icons/navigation/IconEllipsis.vue.cjs"),S={key:0,class:"pd-b-zero"},z={class:"w-100 flex-v-center flex-nojustify flex"},D={class:"w-100 flex-nowrap flex-v-center flex"},M=["src"],q={key:2,class:"t-semi"},R={key:1,class:"mn-l-micro mn-r-micro"},F={key:2,class:"pos-relative"},P={key:3},T={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},U={key:0,class:"w-4r pos-relative i-thin"},L={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"},I=["src"],O={class:"bg-black flex-column flex gap-thin pd-thin radius-small"},j=e.createElementVNode("button",{class:"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button"}," Report ",-1),A=["onClick"],H={__name:"CardHeader",props:["user","entity","entityType","date","dateFormatted","owner","creator","members","membersPhotos","type","actions"],setup(t){x.useRouter();function E(n){const r=new Date,d=new Date(n),m=Math.abs(r-d),u=Math.floor(m/1e3),a=Math.floor(u/60),s=Math.floor(a/60),i=Math.floor(s/24),c=Math.floor(i/7);return c>0?`${c} week${c>1?"s":""} ago`:i>0?`${i} day${i>1?"s":""} ago`:s>0?`${s} hour${s>1?"s":""} ago`:a>0?`${a} minute${a>1?"s":""} ago`:"Just now"}return(n,r)=>{var m,u,a,s,i,c,k,h,g,b,f,y,w,B,p;const d=e.resolveComponent("router-link");return t.owner?(e.openBlock(),e.createElementBlock("header",S,[e.createElementVNode("div",z,[e.createElementVNode("div",D,[((a=(u=(m=t.owner.target)==null?void 0:m.profile)==null?void 0:u.photo)==null?void 0:a.length)>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(n.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium object-fit-cover mn-r-thin i-thin",onClick:r[0]||(r[0]=e.withModifiers(o=>n.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,M)):e.createCommentVNode("",!0),!((i=(s=t.owner.target)==null?void 0:s.profile)!=null&&i.photo)&&t.type!=="short"?(e.openBlock(),e.createBlock(C.default,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:r[1]||(r[1]=e.withModifiers(o=>n.$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",q,[e.createElementVNode("span",{onClick:r[2]||(r[2]=e.withModifiers(o=>n.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(((k=(c=t.owner.target)==null?void 0:c.profile)==null?void 0:k.name)||((h=t.creator.target)==null?void 0:h.username)||"Anonymous"),1),!t.creator.hidden&&((b=(g=t.owner.target)==null?void 0:g.profile)==null?void 0:b.name)!==((y=(f=t.creator.target)==null?void 0:f.profile)==null?void 0:y.name)?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:r[3]||(r[3]=e.withModifiers(o=>{var l;return n.$router.push({name:"User Profile",params:{_id:(l=t.creator.target)==null?void 0:l._id}})},["stop"]))}," · by "+e.toDisplayString(((B=(w=t.creator.target)==null?void 0:w.profile)==null?void 0:B.name)||((p=t.creator.target)==null?void 0:p.username)||"Anonymous"),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",R,"·")):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",F,[t.date?(e.openBlock(),e.createBlock(N.default,{key:0,text:n.formatDate(t.date)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E(t.date)),1)]),_:1},8,["text"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",P," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",T,[t.members?(e.openBlock(),e.createElementBlock("div",U,[e.createElementVNode("span",L,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(o,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o?(e.openBlock(),e.createElementBlock("img",{key:l,src:(n.FILE_SERVER_URL||"")+o,style:e.normalizeStyle({position:"absolute",top:"0px",right:l*20+20+"%",zIndex:1-l}),class:"br-solid br-2px br-white i-thin bg-light radius-big"},null,12,I)):(e.openBlock(),e.createBlock(C.default,{key:1,style:e.normalizeStyle({position:"absolute",top:"0px",right:l*20+20+"%",zIndex:1-l}),class:"br-solid br-2px br-white i-thin bg-light radius-big"},null,8,["style"]))],64))),256))])):e.createCommentVNode("",!0)]),t.type!=="short"&&t.user?(e.openBlock(),e.createBlock(v.default,{key:3,label:{component:$.default,class:"t-transp i-regular"},align:"right",class:"cursor-pointer z-index-2"},{default:e.withCtx(()=>[e.createElementVNode("section",O,[t.user!==t.creator.target._id?(e.openBlock(),e.createBlock(V.default,{key:0,user:t.user,type:t.entityType,target:t.entity._id,text:"Report",class:"w-100"},{default:e.withCtx(()=>[j]),_:1},8,["user","type","target"])):e.createCommentVNode("",!0),t.actions&&t.actions.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(t.actions,o=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o.to?(e.openBlock(),e.createBlock(d,{key:o.to,to:o.to,class:e.normalizeClass(o.class||"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button")},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]),_:2},1032,["to","class"])):e.createCommentVNode("",!0),o.method?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:o.method,class:e.normalizeClass(o.class||"w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button")},e.toDisplayString(o.label),11,A)):e.createCommentVNode("",!0)],64))),256)):e.createCommentVNode("",!0)])]),_:1},8,["label"])):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0)}}};exports.default=H;
|
@@ -2,8 +2,8 @@ import { resolveComponent as S, openBlock as t, createElementBlock as s, createE
|
|
2
2
|
import { useRouter as T } from "vue-router";
|
3
3
|
import V from "../../../icons/placeholders/PlaceholderUserpic.vue.js";
|
4
4
|
import A from "../../../reports/components/sections/FormReport.vue.js";
|
5
|
-
import B from "../../../../components/Tooltip/Tooltip.
|
6
|
-
import N from "../../../../components/Dropdown/Dropdown.
|
5
|
+
import B from "../../../../components/Tooltip/Tooltip.vue.js";
|
6
|
+
import N from "../../../../components/Dropdown/Dropdown.vue2.js";
|
7
7
|
/* empty css */
|
8
8
|
/* empty css */
|
9
9
|
import "../../../auth/store/auth.js";
|