@ozdao/prometheus-framework 0.1.30 → 0.1.31
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/BackofficeGallery-02c9721b.mjs +304 -0
- package/dist/BackofficeGallery-1d117a40.js +1 -0
- package/dist/BackofficeReports-cb4b180d.mjs +44 -0
- package/dist/BackofficeReports-d021871f.js +1 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-505c3ca5.js +1 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-b1873cb7.mjs +1945 -0
- package/dist/Button-2ca405bd.js +1 -0
- package/dist/Button-c59d387c.mjs +283 -0
- package/dist/Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/ButtonFollow.vue_vue_type_style_index_0_scoped_0634d4a1_lang-0ea8fbf8.js +1 -0
- package/dist/ButtonFollow.vue_vue_type_style_index_0_scoped_0634d4a1_lang-4ed993c7.mjs +1 -0
- package/dist/CardOrganization-18c1e3fa.mjs +297 -0
- package/dist/CardOrganization-7d679e75.js +1 -0
- package/dist/Chips-2ada5eda.mjs +200 -0
- package/dist/Chips-8d0a1d2c.js +1 -0
- package/dist/Dashboard-239fb7a6.mjs +52 -0
- package/dist/Dashboard-94267906.js +1 -0
- package/dist/EULA-8265b0cf.mjs +4218 -0
- package/dist/EULA-cbb27503.js +1 -0
- package/dist/Feed-66095e66.js +1 -0
- package/dist/Feed-76fc4475.mjs +383 -0
- package/dist/Feed-e55bc6fa.js +1 -0
- package/dist/Feed-ef6c6ca3.mjs +371 -0
- package/dist/IconEdit-c98d3d06.mjs +339 -0
- package/dist/IconEdit-e4d0cc6e.js +1 -0
- package/dist/Image-052a3cc2.mjs +480 -0
- package/dist/Image-c90ee624.js +9 -0
- package/dist/MenuItem-0b249b94.mjs +93 -0
- package/dist/MenuItem-8b70d2cf.js +1 -0
- package/dist/Product-4b58701f.js +7 -0
- package/dist/Product-a6251018.mjs +844 -0
- package/dist/ProductEdit-3ff2af92.js +1 -0
- package/dist/ProductEdit-f901314c.mjs +306 -0
- package/dist/ProfileBlogposts-57931834.mjs +70 -0
- package/dist/ProfileBlogposts-af88ce98.js +1 -0
- package/dist/ProfileEvents-588eadf9.js +1 -0
- package/dist/ProfileEvents-ed7f9603.mjs +62 -0
- package/dist/ProfileOrganizations-7911deec.mjs +219 -0
- package/dist/ProfileOrganizations-ae258581.js +1 -0
- package/dist/Publics-50c0ff6c.js +1 -0
- package/dist/Publics-f34131bf.mjs +45 -0
- package/dist/Select-11ddabf5.mjs +79 -0
- package/dist/Select-3ca5ab39.js +1 -0
- package/dist/Socials-3fe01af1.mjs +275 -0
- package/dist/Socials-b19d0cb1.js +1 -0
- package/dist/addMembersQuantity-ea216f92.mjs +85 -0
- package/dist/addMembersQuantity-f922d82b.js +84 -0
- package/dist/auth-98fe3efb.mjs +612 -0
- package/dist/auth-acbe3ae1.js +7 -0
- package/dist/auth.client.cjs +7 -8
- package/dist/auth.client.js +435 -439
- package/dist/auth.validation-495e9d6d.js +1 -0
- package/dist/auth.validation-e265b496.mjs +23 -0
- package/dist/backoffice.client.cjs +1 -1
- package/dist/backoffice.client.js +55 -28
- package/dist/click-outside-0b0727d1.js +2 -0
- package/dist/click-outside-6101836c.mjs +19 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +121 -121
- package/dist/community.server.js +35 -5
- package/dist/community.server.mjs +35 -5
- package/dist/components/Button/Button.vue.d.ts +3 -0
- package/dist/components/Button/Button.vue.d.ts.map +1 -1
- package/dist/components/CardHeader/CardHeader.vue.d.ts +3 -0
- package/dist/components/Dropdown/Dropdown.vue.d.ts +3 -0
- package/dist/components/Dropdown/Dropdown.vue.d.ts.map +1 -1
- package/dist/components/Field/Field.vue.d.ts +1 -1
- package/dist/components/FieldPhone/FieldPhone(script-setup).vue.d.ts +3 -3
- package/dist/components/Popup/Popup.vue.d.ts +2 -1
- package/dist/components/Popup/Popup.vue.d.ts.map +1 -1
- package/dist/components/Select/Select.vue.d.ts +1 -1
- package/dist/components/Select/Select.vue.d.ts.map +1 -1
- package/dist/components/Upload/Upload.vue.d.ts +1 -1
- package/dist/events.client.cjs +2 -2
- package/dist/events.client.js +219 -217
- package/dist/events.server.js +2 -9
- package/dist/events.server.mjs +2 -9
- package/dist/legal.client.cjs +1 -1
- package/dist/legal.client.js +2565 -2545
- package/dist/main.css +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/modules/backoffice/components/pages/Dashboard.vue.d.ts +6 -0
- package/dist/modules/icons/navigation/IconCross.vue.d.ts +4 -0
- package/dist/modules/legal/components/pages/legal/EULA.vue.d.ts +2 -0
- package/dist/modules/organizations/components/elements/ButtonFollow.vue.d.ts +1 -1
- package/dist/modules/organizations/components/elements/ButtonToggleMembership.vue.d.ts +12 -0
- package/dist/modules/organizations/components/sections/DetailsTab.vue.d.ts +2 -58
- package/dist/modules/organizations/components/sections/Feed.vue.d.ts +1 -1
- package/dist/modules/reports/components/pages/BackofficeReports.vue.d.ts +2 -0
- package/dist/modules/reports/components/sections/FormReport.vue.d.ts +75 -0
- package/dist/modules/reports/store/reports.d.ts +41 -0
- package/dist/organizations-a241b21d.js +1 -0
- package/dist/organizations-ea9de495.mjs +122 -0
- package/dist/organizations.client-292e8444.js +3 -0
- package/dist/organizations.client-6fc91683.mjs +3072 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +51 -49
- package/dist/organizations.server.js +20 -28
- package/dist/organizations.server.mjs +20 -28
- package/dist/prometheus-framework.cjs.js +19 -19
- package/dist/prometheus-framework.es.js +1635 -1608
- package/dist/reports-270f69df.js +1 -0
- package/dist/reports-79cd9459.mjs +91 -0
- package/dist/reports.client.cjs +1 -0
- package/dist/reports.client.js +8 -0
- package/dist/reports.server.js +159 -0
- package/dist/reports.server.mjs +160 -0
- package/dist/states.validation-02ba0aee.js +1 -0
- package/dist/states.validation-e5f4fa3a.mjs +13 -0
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +286 -242
- package/dist/users.server.js +6 -18
- package/dist/users.server.mjs +6 -18
- package/package.json +9 -1
- package/src/components/Button/Button.vue +66 -60
- package/src/components/CardHeader/CardHeader.vue +51 -50
- package/src/components/Dropdown/Dropdown.vue +28 -12
- package/src/components/FieldPhone/click-outside.js +0 -48
- package/src/components/Popup/Popup.vue +74 -23
- package/src/components/Select/Select.vue +10 -6
- package/src/main.ts +1 -1
- package/src/modules/auth/components/pages/EnterPassword.vue +6 -0
- package/src/modules/auth/router/auth.js +1 -1
- package/src/modules/auth/store/auth.js +1 -1
- package/src/modules/backoffice/components/layouts/Backoffice.vue +3 -3
- package/src/modules/backoffice/components/pages/Dashboard.vue +62 -0
- package/src/modules/backoffice/router/backoffice.js +26 -0
- package/src/modules/community/components/blocks/CardBlogpost.vue +3 -0
- package/src/modules/community/components/layouts/Community.vue +4 -4
- package/src/modules/community/components/pages/CreateBlogPost.vue +27 -28
- package/src/modules/community/components/sections/Comments.vue +4 -2
- package/src/modules/community/components/sections/Feed.vue +1 -1
- package/src/modules/community/controllers/blog.controller.js +22 -3
- package/src/modules/community/controllers/comments.controller.js +23 -5
- package/src/modules/events/components/blocks/CardEvent.vue +4 -0
- package/src/modules/events/components/pages/EditEvent.vue +27 -28
- package/src/modules/events/components/sections/Feed.vue +1 -1
- package/src/modules/events/controllers/events.controller.js +3 -10
- package/src/modules/gallery/components/sections/BackofficeGallery.vue +7 -23
- package/src/modules/icons/navigation/IconCross.vue +22 -0
- package/src/modules/legal/components/pages/Legal.vue +3 -0
- package/src/modules/legal/components/pages/legal/EULA.vue +2148 -0
- package/src/modules/legal/router/legal.js +11 -4
- package/src/modules/middlewares/client/auth.validation.js +14 -0
- package/src/modules/mobile/components/Menu/Menu.vue +1 -1
- package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
- package/src/modules/organizations/components/elements/ButtonFollow.vue +9 -7
- package/src/modules/organizations/components/elements/ButtonToggleMembership.vue +101 -0
- package/src/modules/organizations/components/pages/Organization.vue +1 -34
- package/src/modules/organizations/components/sections/DetailsTab.vue +86 -8
- package/src/modules/organizations/controllers/memberships.controller.js +10 -7
- package/src/modules/organizations/controllers/organizations.controller.js +9 -20
- package/src/modules/organizations/controllers/utils/addMembersQuantity.js +21 -0
- package/src/modules/organizations/controllers/utils/addUserStatusFields.js +65 -0
- package/src/modules/organizations/controllers/utils/excludeBlockedMembers.js +18 -0
- package/src/modules/organizations/models/membership.model.js +5 -5
- package/src/modules/organizations/store/memberships.js +6 -6
- package/src/modules/organizations/store/organizations.js +0 -1
- package/src/modules/products/products.server.js +5 -0
- package/src/modules/reports/components/pages/BackofficeReports.vue +67 -0
- package/src/modules/reports/components/sections/FormReport.vue +114 -0
- package/src/modules/reports/controllers/reports.controller.js +67 -0
- package/src/modules/reports/models/report.model.js +58 -0
- package/src/modules/reports/reports.client.js +17 -0
- package/src/modules/reports/reports.server.js +13 -0
- package/src/modules/reports/routes/reports.routes.js +43 -0
- package/src/modules/reports/store/reports.js +118 -0
- package/src/modules/users/components/pages/Profile.vue +57 -10
- package/src/modules/users/controllers/users.controller.js +6 -19
- package/src/styles/base/all.scss +2 -0
- package/src/styles/layout.scss +39 -63
- package/src/styles/theme.scss +0 -1
- package/src/styles/components/popup.scss +0 -55
@@ -1,13 +1,17 @@
|
|
1
1
|
<template>
|
2
2
|
<!-- Input Wrapper -->
|
3
|
-
<div
|
3
|
+
<div
|
4
|
+
@click.stop="toggleMenu"
|
5
|
+
:class="$attrs.class"
|
6
|
+
class="cursor-pointer flex-nowrap flex"
|
7
|
+
>
|
4
8
|
<!-- Label -->
|
5
9
|
<div v-if="label" class="t-transp mn-r-small">
|
6
10
|
<span>{{label}}</span>
|
7
11
|
</div>
|
8
12
|
|
9
13
|
<!-- Input -->
|
10
|
-
<li
|
14
|
+
<li class="w-100">
|
11
15
|
<!-- Selected Value -->
|
12
16
|
<span>
|
13
17
|
{{ selectedOption?.name || selectedOption || placeholder }}
|
@@ -15,14 +19,14 @@
|
|
15
19
|
</li>
|
16
20
|
|
17
21
|
<!-- Dropdown menu -->
|
18
|
-
<transition mode="out-in" name="
|
22
|
+
<transition mode="out-in" name="TransitionTranslateY">
|
19
23
|
<ul
|
20
24
|
v-if="showMenu"
|
21
25
|
:class="$attrs.class"
|
22
|
-
class="pos-absolute pos-l-0 z-index-5 w-100 mn-t-
|
26
|
+
class="pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"
|
23
27
|
>
|
24
|
-
<li v-for="option in optionsListed">
|
25
|
-
<span v-if="option"
|
28
|
+
<li @click.stop="selectOption(option)" v-for="option in optionsListed">
|
29
|
+
<span v-if="option" class="w-100">
|
26
30
|
{{ option.name || option }}
|
27
31
|
</span>
|
28
32
|
</li>
|
package/src/main.ts
CHANGED
@@ -45,6 +45,12 @@
|
|
45
45
|
class="bg-grey pd-small radius-small mn-thin"
|
46
46
|
/>
|
47
47
|
</div>
|
48
|
+
<div
|
49
|
+
v-if="route.query.method !== 'reset-password'"
|
50
|
+
class="p-medium t-semi mn-semi "
|
51
|
+
>
|
52
|
+
By registering, you agree to our <a class="t-second" href="https://thecommunephuket.com/legal/eula" target="_blank" rel="noopener noreferrer">End User License Agreement (EULA)</a>
|
53
|
+
</div>
|
48
54
|
<!-- Button -->
|
49
55
|
<Button :submit="onSubmit" :callback="redirectTo" class="mn-big">
|
50
56
|
<span v-if="route.query.method === 'reset-password'">{{ t('changePasswordBtn') }}</span>
|
@@ -27,7 +27,7 @@ const auth = [
|
|
27
27
|
ru: 'Вход'
|
28
28
|
},
|
29
29
|
},
|
30
|
-
component: () => import(/* webpackChunkName: "signin" */ '../components/pages/
|
30
|
+
component: () => import(/* webpackChunkName: "signin" */ '../components/pages/EnterPassword.vue'),
|
31
31
|
},{
|
32
32
|
path: 'reset-password',
|
33
33
|
name: 'Reset Password',
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<template>
|
2
|
-
<section id="account" class="cols-
|
2
|
+
<section id="account" class="cols-1 gap-medium pd-medium">
|
3
3
|
<!-- ---------------------------------------------------------------- -->
|
4
4
|
<!-- 02. Page Tabs -->
|
5
5
|
<!-- ---------------------------------------------------------------- -->
|
6
|
-
<div class="pd-medium menu-tabs">
|
6
|
+
<!-- <div class="pd-medium menu-tabs">
|
7
7
|
<button
|
8
8
|
@click="$router.push('/account/community')"
|
9
9
|
:class="{'product-tab-active': $route.path === '/account/community'}"
|
@@ -18,7 +18,7 @@
|
|
18
18
|
>
|
19
19
|
Gallery
|
20
20
|
</button>
|
21
|
-
</div>
|
21
|
+
</div> -->
|
22
22
|
|
23
23
|
<div class="w-100">
|
24
24
|
<router-view v-slot="{ Component, route }">
|
@@ -0,0 +1,62 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="">
|
3
|
+
<h1 class="mn-small">Your Backoffice</h1>
|
4
|
+
<Menu
|
5
|
+
class="bg-grey"
|
6
|
+
>
|
7
|
+
<MenuItem
|
8
|
+
@click="router.push({
|
9
|
+
name: 'Backoffice Gallery',
|
10
|
+
params: {
|
11
|
+
_id: route.params._id
|
12
|
+
}
|
13
|
+
})"
|
14
|
+
class="cursor-pointer">
|
15
|
+
<span>
|
16
|
+
Gallery
|
17
|
+
</span>
|
18
|
+
</MenuItem>
|
19
|
+
|
20
|
+
<MenuItem
|
21
|
+
@click="router.push({
|
22
|
+
name: 'Backoffice Reports',
|
23
|
+
params: {
|
24
|
+
_id: route.params._id
|
25
|
+
}
|
26
|
+
})"
|
27
|
+
class="cursor-pointer">
|
28
|
+
<span>
|
29
|
+
Reports
|
30
|
+
</span>
|
31
|
+
</MenuItem>
|
32
|
+
</Menu>
|
33
|
+
</div>
|
34
|
+
</template>
|
35
|
+
|
36
|
+
<script setup="props">
|
37
|
+
/////////////////////////////
|
38
|
+
// COMPONENT DEPENDENCIES
|
39
|
+
/////////////////////////////
|
40
|
+
// Mobile Module
|
41
|
+
import Menu from '@pf/src/modules/mobile/components/Menu/Menu.vue'
|
42
|
+
import MenuItem from '@pf/src/modules/mobile/components/Menu/MenuItem.vue'
|
43
|
+
/////////////////////////////
|
44
|
+
// HELPERS
|
45
|
+
/////////////////////////////
|
46
|
+
import { useRoute, useRouter } from 'vue-router'
|
47
|
+
const route = useRoute()
|
48
|
+
const router = useRouter()
|
49
|
+
/////////////////////////////
|
50
|
+
// CREATED
|
51
|
+
/////////////////////////////
|
52
|
+
const props = defineProps({
|
53
|
+
favorites: Array,
|
54
|
+
});
|
55
|
+
|
56
|
+
/////////////////////////////
|
57
|
+
// MOUNTED
|
58
|
+
/////////////////////////////
|
59
|
+
</script>
|
60
|
+
|
61
|
+
<style lang="scss">
|
62
|
+
</style>
|
@@ -1,8 +1,12 @@
|
|
1
1
|
import layoutBackoffice from '../components/layouts/Backoffice.vue'
|
2
|
+
import * as validationAuth from '@pf/src/modules/middlewares/client/auth.validation.js';
|
2
3
|
|
3
4
|
const backofficeRoutes = [{
|
4
5
|
path: 'backoffice',
|
5
6
|
component: layoutBackoffice,
|
7
|
+
beforeEnter: [
|
8
|
+
validationAuth.requiresAdmin,
|
9
|
+
],
|
6
10
|
children: [{
|
7
11
|
path: ':_id',
|
8
12
|
name: 'Backoffice',
|
@@ -13,7 +17,29 @@ const backofficeRoutes = [{
|
|
13
17
|
},
|
14
18
|
authorize: []
|
15
19
|
},
|
20
|
+
component: () => import(/* webpackChunkName: 'BackofficeGallery' */ '../components/pages/Dashboard.vue'),
|
21
|
+
},{
|
22
|
+
path: ':_id/gallery',
|
23
|
+
name: 'Backoffice Gallery',
|
24
|
+
meta: {
|
25
|
+
title: {
|
26
|
+
en: 'Backoffice Gallery',
|
27
|
+
ru: 'Управление Галерей'
|
28
|
+
},
|
29
|
+
authorize: []
|
30
|
+
},
|
16
31
|
component: () => import(/* webpackChunkName: 'BackofficeGallery' */ '@pf/src/modules/gallery/components/sections/BackofficeGallery.vue'),
|
32
|
+
},{
|
33
|
+
path: ':_id/reports',
|
34
|
+
name: 'Backoffice Reports',
|
35
|
+
meta: {
|
36
|
+
title: {
|
37
|
+
en: 'Backoffice Reports',
|
38
|
+
ru: 'Управление Жалобами'
|
39
|
+
},
|
40
|
+
authorize: []
|
41
|
+
},
|
42
|
+
component: () => import(/* webpackChunkName: 'BackofficeGallery' */ '@pf/src/modules/reports/components/pages/BackofficeReports.vue'),
|
17
43
|
}]
|
18
44
|
}];
|
19
45
|
|
@@ -20,6 +20,9 @@
|
|
20
20
|
'mn-small pd-medium': type !== 'short',
|
21
21
|
'flex-child-order-last flex-child mn-l-small': type === 'short',
|
22
22
|
}"
|
23
|
+
:entity="blogpost"
|
24
|
+
:entityType="'blogpost'"
|
25
|
+
:user="user"
|
23
26
|
:owner="blogpost.owner"
|
24
27
|
:creator="blogpost.creator"
|
25
28
|
:date="blogpost.createdAt"
|
@@ -23,19 +23,19 @@
|
|
23
23
|
</h2>
|
24
24
|
</header>
|
25
25
|
|
26
|
-
<ul class="w-100 bg-grey pd-small radius-big mn-semi flex-nowrap flex">
|
26
|
+
<ul class="w-100 bg-grey pd-small radius-big mn-semi gap-thin flex-nowrap flex">
|
27
27
|
<li
|
28
28
|
:class="{'t-white bg-black': route.params.category === 'featured' }"
|
29
29
|
@click="router.push({name: 'Blog'})"
|
30
|
-
class="
|
30
|
+
class="t-medium pd-thin radius-small">👑 Featured</li>
|
31
31
|
<li
|
32
32
|
:class="{'t-white bg-black': route.params.category === 'popular' }"
|
33
33
|
@click="router.push({name: 'Blog', params: { category: 'popular' } })"
|
34
|
-
class="
|
34
|
+
class="t-medium pd-thin radius-small">🔥 Popular</li>
|
35
35
|
<li
|
36
36
|
:class="{'t-white bg-black': route.params.category === 'new'}"
|
37
37
|
@click="router.push({name: 'Blog', params: { category: 'new' } })"
|
38
|
-
class="
|
38
|
+
class="t-medium pd-thin radius-small">🆕 New</li>
|
39
39
|
<li
|
40
40
|
v-if="auth.state.user._id"
|
41
41
|
:class="{'t-white bg-black': route.params.category === 'following'}"
|
@@ -36,38 +36,37 @@
|
|
36
36
|
title="Добавить участника"
|
37
37
|
@close-popup="closePublicationPopup"
|
38
38
|
:isPopupOpen="isPublicationPopup"
|
39
|
+
class="w-m-33r t-left pd-big bg-white radius-big"
|
39
40
|
>
|
40
|
-
<
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
/>
|
41
|
+
<h3 class="mn-small">Final Touches</h3>
|
42
|
+
|
43
|
+
<BlockTags
|
44
|
+
@tags-changed="newTags => post.tags = newTags"
|
45
|
+
:tags="post.tags"
|
46
|
+
/>
|
47
47
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
48
|
+
<h5 class="mn-thin">Add to public:</h5>
|
49
|
+
<SelectMulti
|
50
|
+
v-model="selectedOrganization"
|
51
|
+
:options="publics"
|
52
|
+
:multiple="false"
|
53
|
+
:taggable="false"
|
54
|
+
placeholder="Type to search or add tag"
|
55
|
+
label="name"
|
56
|
+
track-by="_id"
|
57
|
+
class="mn-medium bg-grey radius-medium pd-small"
|
58
|
+
/>
|
59
|
+
<h5 v-if="selectedOrganization" class="mn-thin">Options:</h5>
|
60
|
+
<div v-if="selectedOrganization" class="mn-medium br-grey br-2px br-solid pd-small radius-big">
|
61
|
+
<Checkbox
|
62
|
+
:label="'Hide Author'"
|
63
|
+
:radio="post.creator.hidden"
|
64
|
+
@update:radio="event => post.creator.hidden = event"
|
65
|
+
name="prices"
|
66
|
+
class="w-100"
|
58
67
|
/>
|
59
|
-
<h5 v-if="selectedOrganization" class="mn-thin">Options:</h5>
|
60
|
-
<div v-if="selectedOrganization" class="mn-medium br-grey br-2px br-solid pd-small radius-big">
|
61
|
-
<Checkbox
|
62
|
-
:label="'Hide Author'"
|
63
|
-
:radio="post.creator.hidden"
|
64
|
-
@update:radio="event => post.creator.hidden = event"
|
65
|
-
name="prices"
|
66
|
-
class="w-100"
|
67
|
-
/>
|
68
|
-
</div>
|
69
|
-
<Button :submit="onSubmit" :callback="redirectTo" class="w-100 bg-black t-white">Publish</Button>
|
70
68
|
</div>
|
69
|
+
<Button :submit="onSubmit" :callback="redirectTo" class="w-100 bg-black t-white">Publish</Button>
|
71
70
|
</Popup>
|
72
71
|
|
73
72
|
</article>
|
@@ -19,10 +19,12 @@
|
|
19
19
|
|
20
20
|
<CardHeader
|
21
21
|
class="mn-medium"
|
22
|
+
:entity="comment"
|
23
|
+
:entityType="'comment'"
|
24
|
+
:user="owner"
|
22
25
|
:owner="{target: comment.user}"
|
23
26
|
:creator="{target: comment.user}"
|
24
27
|
:date="comment.createdAt"
|
25
|
-
|
26
28
|
/>
|
27
29
|
<div class="pd-t-zero">
|
28
30
|
<p class="p-big">{{ comment.content }}</p>
|
@@ -44,7 +46,7 @@ const comments = ref([]);
|
|
44
46
|
const commentContent = ref('');
|
45
47
|
|
46
48
|
const fetchComments = async () => {
|
47
|
-
const { data } = await $axios.get(`/comments/read?type=${props.type}&target=${props.target}`);
|
49
|
+
const { data } = await $axios.get(`/comments/read?type=${props.type}&target=${props.target}&user=${props.owner}`);
|
48
50
|
comments.value = data;
|
49
51
|
};
|
50
52
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
const { getBlockedMembers, addConditionsForBlocked } = require('@pf/src/modules/organizations/controllers/utils/excludeBlockedMembers');
|
2
|
+
|
1
3
|
const controllerFactory = (db) => {
|
2
4
|
const Blogpost = db.blogpost;
|
3
5
|
const Organization = db.organization;
|
@@ -31,6 +33,18 @@ const controllerFactory = (db) => {
|
|
31
33
|
matchStage["creator.target"] = new db.mongoose.Types.ObjectId(req.query.creator);
|
32
34
|
}
|
33
35
|
|
36
|
+
// EXCLUDE USERS AND ORGS BLOCKED BY USER
|
37
|
+
if (req.query.user) {
|
38
|
+
const blockedMembers = await getBlockedMembers(Membership, req.query.user);
|
39
|
+
|
40
|
+
console.log(blockedMembers);
|
41
|
+
|
42
|
+
if (blockedMembers.length > 0) {
|
43
|
+
addConditionsForBlocked(matchStage, "owner.target", blockedMembers);
|
44
|
+
addConditionsForBlocked(matchStage, "creator.target", blockedMembers);
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
34
48
|
if (req.query.tags) {
|
35
49
|
matchStage["tags"] = { $in: req.query.tags.split(',') };
|
36
50
|
}
|
@@ -55,6 +69,9 @@ const controllerFactory = (db) => {
|
|
55
69
|
matchStage["createdAt"] = { $gte: date };
|
56
70
|
}
|
57
71
|
|
72
|
+
|
73
|
+
|
74
|
+
// FILTER BY CATEGORY
|
58
75
|
if (req.query.category) {
|
59
76
|
switch (req.query.category) {
|
60
77
|
case 'featured':
|
@@ -67,8 +84,8 @@ const controllerFactory = (db) => {
|
|
67
84
|
query.push({ $sort: { createdAt: -1 } });
|
68
85
|
break;
|
69
86
|
case 'following':
|
70
|
-
if (req.query.user) {
|
71
|
-
|
87
|
+
if (req.query.user) {
|
88
|
+
const memberships = await Membership.find({ user: req.query.user });
|
72
89
|
const followedOrganizations = memberships.filter(membership => membership.type === 'organization').map(membership => membership.target);
|
73
90
|
const followedAuthors = memberships.filter(membership => membership.type === 'user').map(membership => membership.target);
|
74
91
|
|
@@ -81,9 +98,11 @@ const controllerFactory = (db) => {
|
|
81
98
|
}
|
82
99
|
}
|
83
100
|
|
101
|
+
|
102
|
+
|
103
|
+
|
84
104
|
query.push({ $match: matchStage });
|
85
105
|
|
86
|
-
console.log(matchStage)
|
87
106
|
|
88
107
|
query.push({
|
89
108
|
$lookup: {
|
@@ -1,12 +1,29 @@
|
|
1
1
|
const commentControllerFactory = (db) => {
|
2
2
|
const Comment = db.comment;
|
3
|
+
const Membership = db.membership;
|
3
4
|
|
4
5
|
const read = async (req, res) => {
|
5
6
|
try {
|
6
|
-
|
7
|
+
let conditions = { target: req.query.target }; // базовое условие для поиска комментариев
|
8
|
+
|
9
|
+
// Если в запросе есть пользователь, мы исключаем комментарии от заблокированных пользователей
|
10
|
+
if (req.query.user) {
|
11
|
+
const memberships = await Membership.find({ user: req.query.user });
|
12
|
+
const blockedMembers = memberships
|
13
|
+
.filter(membership => membership.role === 'blocked')
|
14
|
+
.map(membership => membership.target);
|
15
|
+
|
16
|
+
// Если есть заблокированные пользователи, добавляем условие в запрос
|
17
|
+
if (blockedMembers.length > 0) {
|
18
|
+
conditions.user = { "$nin": blockedMembers }; // добавляем условие, исключающее заблокированных пользователей
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
// Теперь мы добавили условия, исключающие комментарии от заблокированных пользователей, в наш запрос.
|
23
|
+
const comments = await Comment.find(conditions)
|
7
24
|
.populate({
|
8
25
|
path: 'user',
|
9
|
-
select: 'username profile.photo _id'
|
26
|
+
select: 'username profile.photo profile.name _id'
|
10
27
|
});
|
11
28
|
|
12
29
|
if (!comments) {
|
@@ -26,6 +43,7 @@ const commentControllerFactory = (db) => {
|
|
26
43
|
}
|
27
44
|
};
|
28
45
|
|
46
|
+
|
29
47
|
const create = async (req, res) => {
|
30
48
|
try {
|
31
49
|
const comment = new Comment({
|
@@ -38,8 +56,8 @@ const commentControllerFactory = (db) => {
|
|
38
56
|
const data = await comment.save();
|
39
57
|
const populatedComment = await Comment.findOne({ _id: data._id })
|
40
58
|
.populate({
|
41
|
-
|
42
|
-
select: 'username profile.photo _id'
|
59
|
+
path: 'user',
|
60
|
+
select: 'username profile.photo profile.name _id'
|
43
61
|
});
|
44
62
|
|
45
63
|
res.status(200).send(populatedComment);
|
@@ -56,7 +74,7 @@ const commentControllerFactory = (db) => {
|
|
56
74
|
const comment = await Comment.findByIdAndUpdate(req.params._id, req.body, { new: true })
|
57
75
|
.populate({
|
58
76
|
path: 'user',
|
59
|
-
select: 'username profile.photo _id'
|
77
|
+
select: 'username profile.photo profile.name _id'
|
60
78
|
});
|
61
79
|
|
62
80
|
if (!comment) {
|
@@ -5,11 +5,15 @@
|
|
5
5
|
}"
|
6
6
|
class="pos-relative"
|
7
7
|
>
|
8
|
+
|
8
9
|
<CardHeader
|
9
10
|
:class="{
|
10
11
|
'mn-small pd-medium': type !== 'short',
|
11
12
|
'flex-child-order-last flex-child mn-l-small': type === 'short',
|
12
13
|
}"
|
14
|
+
:entity="event"
|
15
|
+
:entityType="'event'"
|
16
|
+
:user="user"
|
13
17
|
:owner="event.owner"
|
14
18
|
:creator="event.creator"
|
15
19
|
:members="event.numberOfTickets"
|
@@ -45,38 +45,37 @@
|
|
45
45
|
title="Добавить участника"
|
46
46
|
@close-popup="closePublicationPopup"
|
47
47
|
:isPopupOpen="isPublicationPopup"
|
48
|
+
class="w-m-33r t-left pd-big bg-white radius-big"
|
48
49
|
>
|
49
|
-
<
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
/>
|
50
|
+
<h3 class="mn-small">Final Touches</h3>
|
51
|
+
|
52
|
+
<BlockTags
|
53
|
+
@tags-changed="newTags => event.tags = newTags"
|
54
|
+
:tags="event.tags"
|
55
|
+
/>
|
56
56
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
57
|
+
<h5 class="mn-thin">Add to public:</h5>
|
58
|
+
<SelectMulti
|
59
|
+
v-model="selectedOrganization"
|
60
|
+
:options="publics"
|
61
|
+
:multiple="false"
|
62
|
+
:taggable="false"
|
63
|
+
placeholder="Type to search or add tag"
|
64
|
+
label="name"
|
65
|
+
track-by="_id"
|
66
|
+
class="mn-medium bg-grey radius-medium pd-small"
|
67
|
+
/>
|
68
|
+
<h5 v-if="selectedOrganization" class="mn-thin">Options:</h5>
|
69
|
+
<div v-if="selectedOrganization" class="mn-medium br-grey br-2px br-solid pd-small radius-big">
|
70
|
+
<Checkbox
|
71
|
+
:label="'Hide Author'"
|
72
|
+
:radio="event.creator.hidden"
|
73
|
+
@update:radio="updateEvent => event.creator.hidden = updateEvent"
|
74
|
+
name="prices"
|
75
|
+
class="w-100"
|
67
76
|
/>
|
68
|
-
<h5 v-if="selectedOrganization" class="mn-thin">Options:</h5>
|
69
|
-
<div v-if="selectedOrganization" class="mn-medium br-grey br-2px br-solid pd-small radius-big">
|
70
|
-
<Checkbox
|
71
|
-
:label="'Hide Author'"
|
72
|
-
:radio="event.creator.hidden"
|
73
|
-
@update:radio="updateEvent => event.creator.hidden = updateEvent"
|
74
|
-
name="prices"
|
75
|
-
class="w-100"
|
76
|
-
/>
|
77
|
-
</div>
|
78
|
-
<Button :submit="onSubmit" :callback="redirectTo" class="w-100 bg-black t-white">Publish</Button>
|
79
77
|
</div>
|
78
|
+
<Button :submit="onSubmit" :callback="redirectTo" class="w-100 bg-black t-white">Publish</Button>
|
80
79
|
</Popup>
|
81
80
|
</article>
|
82
81
|
</template>
|
@@ -1,8 +1,11 @@
|
|
1
1
|
const ObjectId = require('mongoose').Types.ObjectId;
|
2
|
+
const { getBlockedMembers, addConditionsForBlocked } = require('@pf/src/modules/organizations/controllers/utils/excludeBlockedMembers');
|
3
|
+
|
2
4
|
|
3
5
|
const middlewareFactory = (db) => {
|
4
6
|
const Ticket = db.ticket; // замена Membership на Ticket
|
5
7
|
const Event = db.event;
|
8
|
+
const Membership = db.membership;
|
6
9
|
|
7
10
|
const read = async (req, res) => {
|
8
11
|
|
@@ -103,16 +106,6 @@ const middlewareFactory = (db) => {
|
|
103
106
|
break;
|
104
107
|
}
|
105
108
|
}
|
106
|
-
const matchConditions = [
|
107
|
-
...(dateConditions.length > 0 ? [{ $and: dateConditions }] : []),
|
108
|
-
...(req.query.url ? [{ url: req.query.url }] : []),
|
109
|
-
...(req.query.owner ? [{ "owner.target": new ObjectId(req.query.owner) }] : []),
|
110
|
-
...(req.query.creator ? [{ "creator.target": new ObjectId(req.query.creator) }] : []),
|
111
|
-
];
|
112
|
-
|
113
|
-
const matchStage = matchConditions.length > 0 ? { $match: { $and: matchConditions } } : null;
|
114
|
-
|
115
|
-
console.log(dateConditions)
|
116
109
|
|
117
110
|
const stages = [
|
118
111
|
...(matchStage != null ? [matchStage] : []),
|
@@ -1,26 +1,11 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="pos-relative w-100">
|
3
|
-
|
4
|
-
<
|
5
|
-
<
|
6
|
-
|
7
|
-
<button v-if="isEditablePath" @click="openModal(null)" class="mn-r-small t-white t-black bg-second button-small button">Add photos +</button>
|
8
|
-
<!--
|
9
|
-
<a
|
10
|
-
v-for="category in categories"
|
11
|
-
:key="category"
|
12
|
-
@click="filter(category)"
|
13
|
-
class="h3 uppercase mn-r-big"
|
14
|
-
:class="{ 't-transp': selectedCategory !== category }"
|
15
|
-
>
|
16
|
-
{{ $t('gallery.categories.' + category) }}
|
17
|
-
</a> -->
|
18
|
-
|
19
|
-
</div>
|
20
|
-
</div>
|
21
|
-
<!-- <GradientOverlay/> -->
|
3
|
+
<div class="mn-semi flex-v-center flex-nowrap flex">
|
4
|
+
<h1 class="mn-r-small">Manage Gallery</h1>
|
5
|
+
<button v-if="isEditablePath" @click="openModal(null)" class="t-white t-black bg-second i-big radius-extra">+</button>
|
6
|
+
</div>
|
22
7
|
|
23
|
-
<div ref="grid" class="
|
8
|
+
<div ref="grid" class="cols-4 gap-thin">
|
24
9
|
<!-- :class="['grid-item pd-small', item.size.value, ...item.categories]" -->
|
25
10
|
<div
|
26
11
|
v-for="(item, index) in filteredGallery"
|
@@ -35,11 +20,10 @@
|
|
35
20
|
class="w-100 h-100 o-hidden radius-medium object-fit-cover"
|
36
21
|
@click="openModal(item.image)"
|
37
22
|
/>
|
38
|
-
<div class="
|
39
|
-
{{item._id}}
|
23
|
+
<div class="radius-small bg-white" v-else>
|
40
24
|
<img :src="'https://thecommunephuket.com/photos/' + item.cover" class="w-100 radius-small mn-small h-10r object-fit-cover " @click="openModal(item)" />
|
41
25
|
|
42
|
-
<p class="t-black p-small mn-
|
26
|
+
<p class="t-black p-small mn-thin">
|
43
27
|
<span class="uppercase t-transp ">Size</span>
|
44
28
|
<br>
|
45
29
|
<span class="pd-2px radius-big d-inline-block bg-grey">{{item.size.name}}</span>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<template>
|
2
|
+
<svg
|
3
|
+
width="26"
|
4
|
+
height="26"
|
5
|
+
viewBox="0 0 26 26"
|
6
|
+
fill="none"
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
8
|
+
>
|
9
|
+
<rect
|
10
|
+
width="24"
|
11
|
+
height="24"
|
12
|
+
transform="translate(1 1)"
|
13
|
+
/>
|
14
|
+
<path
|
15
|
+
fill="rgb(var(--black))"
|
16
|
+
fill-rule="evenodd"
|
17
|
+
clip-rule="evenodd"
|
18
|
+
d="M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z"/>
|
19
|
+
</svg>
|
20
|
+
</template>
|
21
|
+
|
22
|
+
<script></script>
|