@ozdao/prometheus-framework 0.2.177 → 0.2.178
Sign up to get free protection for your applications and to get access to all the features.
- 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 +75 -69
- package/package.json +1 -1
- package/src/modules/organizations/components/pages/Organization.vue +3 -3
- package/src/modules/organizations/components/sections/DetailsTab.vue +4 -1
package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");;/* empty css */const f=require("../../../../components/Tab/Tab.vue.cjs"),k=require("../../../../components/Block/Block.vue.cjs"),c=require("../../../../components/Feed/Feed.vue.cjs"),b=require("../../../community/components/blocks/CardBlogpost.vue.cjs");;/* empty css */require("../../../../components/Menu/MenuItem.vue.cjs");;/* empty css */const h=require("../../../events/components/sections/Feed.vue.cjs"),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("vue-router");require("vue-i18n");require("../../../globals/localization/vue-i18n.cjs");;/* empty css */const f=require("../../../../components/Tab/Tab.vue.cjs"),k=require("../../../../components/Block/Block.vue.cjs"),c=require("../../../../components/Feed/Feed.vue.cjs"),b=require("../../../community/components/blocks/CardBlogpost.vue.cjs");;/* empty css */require("../../../../components/Menu/MenuItem.vue.cjs");;/* empty css */const h=require("../sections/DetailsTab.vue.cjs"),g=require("../../../events/components/sections/Feed.vue.cjs"),v=require("../../../spots/components/blocks/CardSpot.vue.cjs"),B=require("../../../products/components/pages/Products.vue.cjs"),o=require("../../../auth/store/auth.cjs"),s=require("../../store/organizations.cjs"),q=require("../../store/memberships.cjs");require("../../store/departments.cjs");const C=require("../../../community/store/blogposts.cjs"),w=require("../../../spots/store/spots.cjs");;/* empty css */const N={key:0,class:"pd-thin for-transition w-100"},y={class:"pos-relative"},V={key:0},x={__name:"Organization",setup(z){d.useRouter();const t=d.useRoute();let m=t.query.tab?t.query.tab:"products";const l=e.ref(null);e.onMounted(async()=>{l.value=await s.actions.read({_id:t.params._id,user:o.state.user._id}),await q.actions.read({target:t.params._id})});const a=e.ref(m);return t.query.tab=a.value,(p,n)=>{const u=e.resolveComponent("router-link");return l.value?(e.openBlock(),e.createElementBlock("div",N,[e.createVNode(h.default,{organization:s.state.current,user:o.state.user,class:"mn-b-semi"},null,8,["organization","user"]),e.createVNode(f.default,{selected:a.value,"onUpdate:selected":n[0]||(n[0]=r=>a.value=r),tabs:[{name:"Community",value:"community"},{name:"Menu",value:"products"},{name:"Events",value:"events"},{name:"Spots",value:"spots"}],class:"mn-b-small o-hidden h5 radius-big bg-light"},null,8,["selected"]),e.createElementVNode("div",y,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="community"?(e.openBlock(),e.createBlock(c.default,{key:0,showLoadMore:!1,states:{empty:{title:"No Blog Posts Found",description:"Currently, there are no posts available in this blog. Please check back later."}},store:{read:r=>C.read(r)},options:{status:"published",user:o.state.user._id,owner:e.unref(t).params._id},class:"row-1 gap-thin"},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,i=>(e.openBlock(),e.createBlock(b.default,{key:i._id,blogpost:i,user:o.state.user._id,class:"h-max-40r mn-b-medium"},null,8,["blogpost","user"]))),128))]),_:1},8,["store","options"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="events"?(e.openBlock(),e.createBlock(g.default,{key:0,user:o.state.user._id,owner:e.unref(t).params._id,sortOrder:"desc",sortParam:"date.start"},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),a.value==="products"&&o.state.user._id===s.state.current.owner?(e.openBlock(),e.createBlock(k.default,{key:0,class:"flex-nowrap gap-thin mn-b-small flex"},{default:e.withCtx(()=>[e.createVNode(u,{class:"bg-black t-white uppercase t-semi pd-thin radius-extra",to:{name:"ProductAdd",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Add Product ")]),_:1},8,["to"]),e.createVNode(u,{class:"uppercase t-semi pd-thin radius-extra",to:{name:"Leftovers",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Change Invetory ")]),_:1},8,["to"]),e.createVNode(u,{class:"d-block mn-l-auto uppercase t-semi bg-white pd-thin radius-extra",to:{name:"Backoffice",params:{_id:e.unref(t).params._id}}},{default:e.withCtx(()=>[e.createTextVNode(" Go to Backoffice ")]),_:1},8,["to"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="products"?(e.openBlock(),e.createBlock(B.default,{key:0,organization:s.state.current},null,8,["organization"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="spots"?(e.openBlock(),e.createElementBlock("div",V,[e.createVNode(c.default,{states:{empty:{title:"No Spots Found",description:"Currently, there are no spots available."}},store:{read:r=>w.actions.read(e.unref(t).params._id),state:s.state},options:{user:o.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,(i,_)=>(e.openBlock(),e.createBlock(v.default,{key:_,spot:i,organization:s.state.current,class:"radius-big bg-light mn-b-thin"},null,8,["spot","organization"]))),128))]),_:1},8,["store","options"]),o.state.user._id===s.state.current.owner?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[1]||(n[1]=r=>p.$router.push(`/spots/${s.state.current._id}/spots/create`)),class:"mn-b-thin bg-main button w-100"}," Add spot ")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})])])):e.createCommentVNode("",!0)}}};exports.default=x;
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ref as
|
1
|
+
import { ref as v, onMounted as z, resolveComponent as C, openBlock as t, createElementBlock as d, createVNode as r, createElementVNode as B, Transition as _, withCtx as a, createBlock as m, unref as l, Fragment as h, renderList as k, createCommentVNode as n, createTextVNode as b } from "vue";
|
2
2
|
import { useRouter as N, useRoute as P } from "vue-router";
|
3
3
|
import "vue-i18n";
|
4
4
|
import "../../../globals/localization/vue-i18n.js";
|
@@ -10,39 +10,45 @@ import V from "../../../community/components/blocks/CardBlogpost.vue.js";
|
|
10
10
|
/* empty css */
|
11
11
|
import "../../../../components/Menu/MenuItem.vue.js";
|
12
12
|
/* empty css */
|
13
|
-
import q from "
|
14
|
-
import A from "../../../
|
15
|
-
import E from "../../../
|
16
|
-
import
|
17
|
-
import {
|
18
|
-
import { actions as L } from "../../store/
|
13
|
+
import q from "../sections/DetailsTab.vue.js";
|
14
|
+
import A from "../../../events/components/sections/Feed.vue.js";
|
15
|
+
import E from "../../../spots/components/blocks/CardSpot.vue.js";
|
16
|
+
import F from "../../../products/components/pages/Products.vue.js";
|
17
|
+
import { state as i } from "../../../auth/store/auth.js";
|
18
|
+
import { actions as L, state as u } from "../../store/organizations.js";
|
19
|
+
import { actions as S } from "../../store/memberships.js";
|
19
20
|
import "../../store/departments.js";
|
20
|
-
import { read as
|
21
|
-
import { actions as
|
21
|
+
import { read as R } from "../../../community/store/blogposts.js";
|
22
|
+
import { actions as T } from "../../../spots/store/spots.js";
|
22
23
|
/* empty css */
|
23
|
-
const
|
24
|
+
const D = {
|
24
25
|
key: 0,
|
25
26
|
class: "pd-thin for-transition w-100"
|
26
|
-
},
|
27
|
+
}, G = { class: "pos-relative" }, I = { key: 0 }, _e = {
|
27
28
|
__name: "Organization",
|
28
|
-
setup(
|
29
|
+
setup(U) {
|
29
30
|
N();
|
30
31
|
const e = P();
|
31
32
|
let w = e.query.tab ? e.query.tab : "products";
|
32
|
-
const
|
33
|
-
|
34
|
-
|
33
|
+
const g = v(null);
|
34
|
+
z(async () => {
|
35
|
+
g.value = await L.read({
|
35
36
|
_id: e.params._id,
|
36
|
-
user:
|
37
|
-
}), await
|
37
|
+
user: i.user._id
|
38
|
+
}), await S.read({ target: e.params._id });
|
38
39
|
});
|
39
|
-
const s =
|
40
|
+
const s = v(w);
|
40
41
|
return e.query.tab = s.value, ($, p) => {
|
41
|
-
const f =
|
42
|
-
return
|
43
|
-
|
42
|
+
const f = C("router-link");
|
43
|
+
return g.value ? (t(), d("div", D, [
|
44
|
+
r(q, {
|
45
|
+
organization: u.current,
|
46
|
+
user: i.user,
|
47
|
+
class: "mn-b-semi"
|
48
|
+
}, null, 8, ["organization", "user"]),
|
49
|
+
r(M, {
|
44
50
|
selected: s.value,
|
45
|
-
"onUpdate:selected": p[0] || (p[0] = (
|
51
|
+
"onUpdate:selected": p[0] || (p[0] = (o) => s.value = o),
|
46
52
|
tabs: [
|
47
53
|
{ name: "Community", value: "community" },
|
48
54
|
{ name: "Menu", value: "products" },
|
@@ -51,10 +57,10 @@ const T = {
|
|
51
57
|
],
|
52
58
|
class: "mn-b-small o-hidden h5 radius-big bg-light"
|
53
59
|
}, null, 8, ["selected"]),
|
54
|
-
B("div",
|
55
|
-
|
56
|
-
default:
|
57
|
-
s.value === "community" ? (t(),
|
60
|
+
B("div", G, [
|
61
|
+
r(_, { name: "slide-fade" }, {
|
62
|
+
default: a(() => [
|
63
|
+
s.value === "community" ? (t(), m(y, {
|
58
64
|
key: 0,
|
59
65
|
showLoadMore: !1,
|
60
66
|
states: {
|
@@ -64,48 +70,48 @@ const T = {
|
|
64
70
|
}
|
65
71
|
},
|
66
72
|
store: {
|
67
|
-
read: (
|
73
|
+
read: (o) => R(o)
|
68
74
|
},
|
69
75
|
options: {
|
70
76
|
status: "published",
|
71
|
-
user:
|
77
|
+
user: i.user._id,
|
72
78
|
owner: l(e).params._id
|
73
79
|
},
|
74
80
|
class: "row-1 gap-thin"
|
75
81
|
}, {
|
76
|
-
default:
|
77
|
-
items:
|
82
|
+
default: a(({
|
83
|
+
items: o
|
78
84
|
}) => [
|
79
|
-
(t(!0), d(h, null, k(
|
85
|
+
(t(!0), d(h, null, k(o, (c) => (t(), m(V, {
|
80
86
|
key: c._id,
|
81
87
|
blogpost: c,
|
82
|
-
user:
|
88
|
+
user: i.user._id,
|
83
89
|
class: "h-max-40r mn-b-medium"
|
84
90
|
}, null, 8, ["blogpost", "user"]))), 128))
|
85
91
|
]),
|
86
92
|
_: 1
|
87
|
-
}, 8, ["store", "options"])) :
|
93
|
+
}, 8, ["store", "options"])) : n("", !0)
|
88
94
|
]),
|
89
95
|
_: 1
|
90
96
|
}),
|
91
|
-
|
92
|
-
default:
|
93
|
-
s.value === "events" ? (t(),
|
97
|
+
r(_, { name: "slide-fade" }, {
|
98
|
+
default: a(() => [
|
99
|
+
s.value === "events" ? (t(), m(A, {
|
94
100
|
key: 0,
|
95
|
-
user:
|
101
|
+
user: i.user._id,
|
96
102
|
owner: l(e).params._id,
|
97
103
|
sortOrder: "desc",
|
98
104
|
sortParam: "date.start"
|
99
|
-
}, null, 8, ["user", "owner"])) :
|
105
|
+
}, null, 8, ["user", "owner"])) : n("", !0)
|
100
106
|
]),
|
101
107
|
_: 1
|
102
108
|
}),
|
103
|
-
s.value === "products" &&
|
109
|
+
s.value === "products" && i.user._id === u.current.owner ? (t(), m(O, {
|
104
110
|
key: 0,
|
105
111
|
class: "flex-nowrap gap-thin mn-b-small flex"
|
106
112
|
}, {
|
107
|
-
default:
|
108
|
-
|
113
|
+
default: a(() => [
|
114
|
+
r(f, {
|
109
115
|
class: "bg-black t-white uppercase t-semi pd-thin radius-extra",
|
110
116
|
to: {
|
111
117
|
name: "ProductAdd",
|
@@ -114,12 +120,12 @@ const T = {
|
|
114
120
|
}
|
115
121
|
}
|
116
122
|
}, {
|
117
|
-
default:
|
123
|
+
default: a(() => [
|
118
124
|
b(" Add Product ")
|
119
125
|
]),
|
120
126
|
_: 1
|
121
127
|
}, 8, ["to"]),
|
122
|
-
|
128
|
+
r(f, {
|
123
129
|
class: "uppercase t-semi pd-thin radius-extra",
|
124
130
|
to: {
|
125
131
|
name: "Leftovers",
|
@@ -128,12 +134,12 @@ const T = {
|
|
128
134
|
}
|
129
135
|
}
|
130
136
|
}, {
|
131
|
-
default:
|
137
|
+
default: a(() => [
|
132
138
|
b(" Change Invetory ")
|
133
139
|
]),
|
134
140
|
_: 1
|
135
141
|
}, 8, ["to"]),
|
136
|
-
|
142
|
+
r(f, {
|
137
143
|
class: "d-block mn-l-auto uppercase t-semi bg-white pd-thin radius-extra",
|
138
144
|
to: {
|
139
145
|
name: "Backoffice",
|
@@ -142,27 +148,27 @@ const T = {
|
|
142
148
|
}
|
143
149
|
}
|
144
150
|
}, {
|
145
|
-
default:
|
151
|
+
default: a(() => [
|
146
152
|
b(" Go to Backoffice ")
|
147
153
|
]),
|
148
154
|
_: 1
|
149
155
|
}, 8, ["to"])
|
150
156
|
]),
|
151
157
|
_: 1
|
152
|
-
})) :
|
153
|
-
|
154
|
-
default:
|
155
|
-
s.value === "products" ? (t(),
|
158
|
+
})) : n("", !0),
|
159
|
+
r(_, { name: "slide-fade" }, {
|
160
|
+
default: a(() => [
|
161
|
+
s.value === "products" ? (t(), m(F, {
|
156
162
|
key: 0,
|
157
|
-
organization:
|
158
|
-
}, null, 8, ["organization"])) :
|
163
|
+
organization: u.current
|
164
|
+
}, null, 8, ["organization"])) : n("", !0)
|
159
165
|
]),
|
160
166
|
_: 1
|
161
167
|
}),
|
162
|
-
|
163
|
-
default:
|
164
|
-
s.value === "spots" ? (t(), d("div",
|
165
|
-
|
168
|
+
r(_, { name: "slide-fade" }, {
|
169
|
+
default: a(() => [
|
170
|
+
s.value === "spots" ? (t(), d("div", I, [
|
171
|
+
r(y, {
|
166
172
|
states: {
|
167
173
|
empty: {
|
168
174
|
title: "No Spots Found",
|
@@ -170,42 +176,42 @@ const T = {
|
|
170
176
|
}
|
171
177
|
},
|
172
178
|
store: {
|
173
|
-
read: (
|
174
|
-
state:
|
179
|
+
read: (o) => T.read(l(e).params._id),
|
180
|
+
state: u
|
175
181
|
},
|
176
182
|
options: {
|
177
|
-
user:
|
183
|
+
user: i.user._id,
|
178
184
|
sort: "numberOfMemberships",
|
179
185
|
contain: ["blogposts"],
|
180
186
|
limit: 10
|
181
187
|
}
|
182
188
|
}, {
|
183
|
-
default:
|
184
|
-
items:
|
189
|
+
default: a(({
|
190
|
+
items: o
|
185
191
|
}) => [
|
186
|
-
(t(!0), d(h, null, k(
|
192
|
+
(t(!0), d(h, null, k(o, (c, x) => (t(), m(E, {
|
187
193
|
key: x,
|
188
194
|
spot: c,
|
189
|
-
organization:
|
195
|
+
organization: u.current,
|
190
196
|
class: "radius-big bg-light mn-b-thin"
|
191
197
|
}, null, 8, ["spot", "organization"]))), 128))
|
192
198
|
]),
|
193
199
|
_: 1
|
194
200
|
}, 8, ["store", "options"]),
|
195
|
-
|
201
|
+
i.user._id === u.current.owner ? (t(), d("button", {
|
196
202
|
key: 0,
|
197
|
-
onClick: p[1] || (p[1] = (
|
203
|
+
onClick: p[1] || (p[1] = (o) => $.$router.push(`/spots/${u.current._id}/spots/create`)),
|
198
204
|
class: "mn-b-thin bg-main button w-100"
|
199
|
-
}, " Add spot ")) :
|
200
|
-
])) :
|
205
|
+
}, " Add spot ")) : n("", !0)
|
206
|
+
])) : n("", !0)
|
201
207
|
]),
|
202
208
|
_: 1
|
203
209
|
})
|
204
210
|
])
|
205
|
-
])) :
|
211
|
+
])) : n("", !0);
|
206
212
|
};
|
207
213
|
}
|
208
214
|
};
|
209
215
|
export {
|
210
|
-
|
216
|
+
_e as default
|
211
217
|
};
|
package/package.json
CHANGED
@@ -4,11 +4,11 @@
|
|
4
4
|
<!-- <Breadcrumbs class="mn-b-thin pd-medium bg-light radius-big"/> -->
|
5
5
|
<!-- <pre>{{organization.state.current}}</pre> -->
|
6
6
|
|
7
|
-
|
7
|
+
<DetailsTab
|
8
8
|
:organization="organization.state.current"
|
9
9
|
:user="auth.state.user"
|
10
10
|
class="mn-b-semi"
|
11
|
-
/>
|
11
|
+
/>
|
12
12
|
|
13
13
|
<Tab
|
14
14
|
v-model:selected="tabOrganization"
|
@@ -181,7 +181,7 @@
|
|
181
181
|
import MenuItem from '@pf/src/components/Menu/MenuItem.vue'
|
182
182
|
// Organizations
|
183
183
|
import DepartmentSub from '@pf/src/modules/organizations/components/blocks/DepartmentSub.vue';
|
184
|
-
|
184
|
+
import DetailsTab from '@pf/src/modules/organizations/components/sections/DetailsTab.vue';
|
185
185
|
import User from '@pf/src/modules/users/components/blocks/CardUser.vue';
|
186
186
|
// Feeds
|
187
187
|
import FeedEvents from '@pf/src/modules/events/components/sections/Feed.vue';
|
@@ -173,5 +173,8 @@
|
|
173
173
|
const handleMembershipUpdate = ({ membership, status, target }, statusName, statusNumber) => {
|
174
174
|
memberships.mutations.handleMembershipUpdate(organizations.state.current, membership, status, target, statusName, statusNumber)
|
175
175
|
};
|
176
|
+
</script>
|
176
177
|
|
177
|
-
|
178
|
+
<style lang="scss">
|
179
|
+
|
180
|
+
</style>
|