@ozdao/prometheus-framework 0.2.220 → 0.2.222
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/builder.js +7 -4
- package/dist/builder.mjs +7 -4
- package/dist/community.server.js +1 -1
- package/dist/community.server.mjs +1 -1
- package/dist/main.css +1 -1
- package/dist/organizations.server.js +39 -2
- package/dist/organizations.server.mjs +39 -2
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +1 -1
- 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/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs +33 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js +33 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js.map +1 -0
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +3 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +3 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +9 -8
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +10 -9
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +11 -13
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +11 -13
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +11 -4
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js +11 -4
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js.map +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs +4 -5
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js +4 -5
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +5 -5
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +6 -6
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +5 -5
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +5 -5
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +713 -713
- package/dist/prometheus-framework/src/modules/pages/pages.client.js +713 -713
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +2 -2
- 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 +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +5 -5
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
- package/package.json +1 -1
- package/src/builder/webpack/webpack.config.client.js +7 -4
- package/src/modules/auth/views/middlewares/ownership.validation.js +45 -0
- package/src/modules/community/components/blocks/CardBlogpost.vue +3 -1
- package/src/modules/community/components/layouts/Community.vue +5 -7
- package/src/modules/community/components/pages/BlogPost.vue +7 -10
- package/src/modules/community/models/blogpost.model.js +1 -1
- package/src/modules/community/router/blogposts.js +10 -2
- package/src/modules/globals/views/components/layouts/App.vue +7 -7
- package/src/modules/organizations/controllers/organizations.controller.js +26 -34
- package/src/modules/organizations/models/department.model.js +14 -0
- package/src/styles/base/all.scss +0 -2
- package/src/styles/config.scss +6 -0
@@ -2,15 +2,15 @@ import { ref, onMounted, openBlock, createElementBlock, createVNode, withCtx, cr
|
|
2
2
|
import { useRouter, useRoute } from "vue-router";
|
3
3
|
import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
|
4
4
|
import _sfc_main$3 from "../../../../components/UploadImage/UploadImage.vue.js";
|
5
|
-
/* empty css
|
6
|
-
import Field from "../../../../components/Field/Field.
|
7
|
-
import Select from "../../../../components/Select/Select.
|
5
|
+
/* empty css */
|
6
|
+
import Field from "../../../../components/Field/Field.vue.js";
|
7
|
+
import Select from "../../../../components/Select/Select.vue.js";
|
8
8
|
import _sfc_main$4 from "../../../../components/Checkbox/Checkbox.vue.js";
|
9
9
|
import _sfc_main$5 from "../../../../components/Address/Address.vue2.js";
|
10
10
|
import _sfc_main$6 from "../../../../components/LocationMarker/LocationMarker.vue2.js";
|
11
|
-
import _sfc_main$2 from "../../../../components/Button/Button.
|
11
|
+
import _sfc_main$2 from "../../../../components/Button/Button.vue.js";
|
12
12
|
import "vue-i18n";
|
13
|
-
/* empty css
|
13
|
+
/* empty css */
|
14
14
|
import { actions, state } from "../../store/spots.js";
|
15
15
|
const _hoisted_1 = { class: "for-transition w-100 cols-1 pd-thin gap-thin" };
|
16
16
|
const _hoisted_2 = { class: "mn-r-auto" };
|
@@ -1,9 +1,9 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
|
-
;/* empty css
|
5
|
-
;/* empty css
|
6
|
-
;/* empty css
|
4
|
+
;/* empty css */
|
5
|
+
;/* empty css */
|
6
|
+
;/* empty css */
|
7
7
|
const Dropdown = require("../../../../components/Dropdown/Dropdown.vue.cjs");
|
8
8
|
const Completion = require("../../../../components/Completion/Completion.vue.cjs");
|
9
9
|
const Menu = require("../../../../components/Menu/Menu.vue.cjs");
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ref, onMounted, openBlock, createElementBlock, unref, createBlock, createCommentVNode, createElementVNode, withCtx, createVNode, toDisplayString, Fragment, renderList, normalizeClass } from "vue";
|
2
|
-
/* empty css
|
3
|
-
/* empty css
|
4
|
-
/* empty css
|
2
|
+
/* empty css */
|
3
|
+
/* empty css */
|
4
|
+
/* empty css */
|
5
5
|
import _sfc_main$2 from "../../../../components/Dropdown/Dropdown.vue.js";
|
6
6
|
import _sfc_main$1 from "../../../../components/Completion/Completion.vue.js";
|
7
7
|
import _sfc_main$7 from "../../../../components/Menu/Menu.vue.js";
|
package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
4
|
const vueRouter = require("vue-router");
|
5
|
-
const Tab = require("../../../../components/Tab/Tab.
|
5
|
+
const Tab = require("../../../../components/Tab/Tab.vue.cjs");
|
6
6
|
const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
7
7
|
const CardBlogpost = require("../../../community/components/blocks/CardBlogpost.vue.cjs");
|
8
8
|
const auth = require("../../../auth/views/store/auth.cjs");
|
package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref, watch, openBlock, createElementBlock, createElementVNode, unref, createCommentVNode, createBlock, createVNode, withCtx, Fragment, renderList } from "vue";
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
3
|
-
import _sfc_main$1 from "../../../../components/Tab/Tab.
|
3
|
+
import _sfc_main$1 from "../../../../components/Tab/Tab.vue.js";
|
4
4
|
import _sfc_main$2 from "../../../../components/Feed/Feed.vue.js";
|
5
5
|
import _sfc_main$3 from "../../../community/components/blocks/CardBlogpost.vue.js";
|
6
6
|
import { state } from "../../../auth/views/store/auth.js";
|
@@ -1,10 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
|
-
;/* empty css
|
5
|
-
const Field = require("../../../../components/Field/Field.
|
4
|
+
;/* empty css */
|
5
|
+
const Field = require("../../../../components/Field/Field.vue.cjs");
|
6
6
|
const Checkbox = require("../../../../components/Checkbox/Checkbox.vue.cjs");
|
7
|
-
const Button = require("../../../../components/Button/Button.
|
7
|
+
const Button = require("../../../../components/Button/Button.vue.cjs");
|
8
8
|
const UploadImage = require("../../../../components/UploadImage/UploadImage.vue.cjs");
|
9
9
|
const ProfileCompletion = require("../sections/ProfileCompletion.vue.cjs");
|
10
10
|
const vueRouter = require("vue-router");
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ref, onMounted, openBlock, createElementBlock, unref, createBlock, createCommentVNode, createVNode, createElementVNode, toDisplayString, withCtx, createTextVNode } from "vue";
|
2
|
-
/* empty css
|
3
|
-
import Field from "../../../../components/Field/Field.
|
2
|
+
/* empty css */
|
3
|
+
import Field from "../../../../components/Field/Field.vue.js";
|
4
4
|
import _sfc_main$3 from "../../../../components/Checkbox/Checkbox.vue.js";
|
5
|
-
import _sfc_main$4 from "../../../../components/Button/Button.
|
5
|
+
import _sfc_main$4 from "../../../../components/Button/Button.vue.js";
|
6
6
|
import _sfc_main$2 from "../../../../components/UploadImage/UploadImage.vue.js";
|
7
7
|
import _sfc_main$1 from "../sections/ProfileCompletion.vue.js";
|
8
8
|
import { useRoute, useRouter } from "vue-router";
|
@@ -2,7 +2,7 @@
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
4
|
const vueRouter = require("vue-router");
|
5
|
-
const Tab = require("../../../../components/Tab/Tab.
|
5
|
+
const Tab = require("../../../../components/Tab/Tab.vue.cjs");
|
6
6
|
const Feed = require("../../../events/components/sections/Feed.vue.cjs");
|
7
7
|
const auth = require("../../../auth/views/store/auth.cjs");
|
8
8
|
const _hoisted_1 = { class: "pd-thin" };
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref, watch, openBlock, createElementBlock, createElementVNode, unref, createCommentVNode, createVNode, createBlock } from "vue";
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
3
|
-
import _sfc_main$1 from "../../../../components/Tab/Tab.
|
3
|
+
import _sfc_main$1 from "../../../../components/Tab/Tab.vue.js";
|
4
4
|
import _sfc_main$2 from "../../../events/components/sections/Feed.vue.js";
|
5
5
|
import { state } from "../../../auth/views/store/auth.js";
|
6
6
|
const _hoisted_1 = { class: "pd-thin" };
|
package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
4
|
const wallet = require("../../localization/wallet.json.cjs");
|
5
|
-
const Field = require("../../../../../components/Field/Field.
|
5
|
+
const Field = require("../../../../../components/Field/Field.vue.cjs");
|
6
6
|
const vueI18n = require("vue-i18n");
|
7
7
|
const _hoisted_1 = /* @__PURE__ */ vue.createElementVNode("h2", { class: "mn-b-small t-center t-bold" }, "Deposit with card", -1);
|
8
8
|
const _hoisted_2 = { class: "bg-grey radius-big mn-t-semi mn-b-semi flex flex-justify-between" };
|
package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { openBlock, createElementBlock, Fragment, createElementVNode, createVNode, unref, toDisplayString } from "vue";
|
2
2
|
import text from "../../localization/wallet.json.js";
|
3
|
-
import Field from "../../../../../components/Field/Field.
|
3
|
+
import Field from "../../../../../components/Field/Field.vue.js";
|
4
4
|
import { useI18n } from "vue-i18n";
|
5
5
|
const _hoisted_1 = /* @__PURE__ */ createElementVNode("h2", { class: "mn-b-small t-center t-bold" }, "Deposit with card", -1);
|
6
6
|
const _hoisted_2 = { class: "bg-grey radius-big mn-t-semi mn-b-semi flex flex-justify-between" };
|
package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs
CHANGED
@@ -5,8 +5,8 @@ const vueI18n = require("vue-i18n");
|
|
5
5
|
const bignumber = require("../../../../../../node_modules/bignumber.js/bignumber.cjs");
|
6
6
|
const wallet_store = require("../../store/wallet.store.cjs");
|
7
7
|
const wallet = require("../../localization/wallet.json.cjs");
|
8
|
-
const Field = require("../../../../../components/Field/Field.
|
9
|
-
const Select = require("../../../../../components/Select/Select.
|
8
|
+
const Field = require("../../../../../components/Field/Field.vue.cjs");
|
9
|
+
const Select = require("../../../../../components/Select/Select.vue.cjs");
|
10
10
|
const _hoisted_1 = { class: "mn-b-small t-center t-bold" };
|
11
11
|
const _hoisted_2 = { class: "t-semi" };
|
12
12
|
const _hoisted_3 = ["disabled"];
|
package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js
CHANGED
@@ -3,8 +3,8 @@ import { useI18n } from "vue-i18n";
|
|
3
3
|
import { BigNumber } from "../../../../../../node_modules/bignumber.js/bignumber.js";
|
4
4
|
import { state, actions } from "../../store/wallet.store.js";
|
5
5
|
import text from "../../localization/wallet.json.js";
|
6
|
-
import Field from "../../../../../components/Field/Field.
|
7
|
-
import Select from "../../../../../components/Select/Select.
|
6
|
+
import Field from "../../../../../components/Field/Field.vue.js";
|
7
|
+
import Select from "../../../../../components/Select/Select.vue.js";
|
8
8
|
const _hoisted_1 = { class: "mn-b-small t-center t-bold" };
|
9
9
|
const _hoisted_2 = { class: "t-semi" };
|
10
10
|
const _hoisted_3 = ["disabled"];
|
@@ -5,10 +5,10 @@ const vueI18n = require("vue-i18n");
|
|
5
5
|
const Web3 = require("web3");
|
6
6
|
const wallet_store = require("../../store/wallet.store.cjs");
|
7
7
|
const wallet = require("../../localization/wallet.json.cjs");
|
8
|
-
const Popup = require("../../../../../components/Popup/Popup.
|
9
|
-
const Button = require("../../../../../components/Button/Button.
|
8
|
+
const Popup = require("../../../../../components/Popup/Popup.vue.cjs");
|
9
|
+
const Button = require("../../../../../components/Button/Button.vue.cjs");
|
10
10
|
require("vue-router");
|
11
|
-
;/* empty css
|
11
|
+
;/* empty css */
|
12
12
|
require("../../../../reports/store/reports.cjs");
|
13
13
|
;/* empty css */
|
14
14
|
;/* empty css */
|
@@ -3,10 +3,10 @@ import { useI18n } from "vue-i18n";
|
|
3
3
|
import Web3 from "web3";
|
4
4
|
import { state, actions } from "../../store/wallet.store.js";
|
5
5
|
import text from "../../localization/wallet.json.js";
|
6
|
-
import _sfc_main$3 from "../../../../../components/Popup/Popup.
|
7
|
-
import _sfc_main$1 from "../../../../../components/Button/Button.
|
6
|
+
import _sfc_main$3 from "../../../../../components/Popup/Popup.vue.js";
|
7
|
+
import _sfc_main$1 from "../../../../../components/Button/Button.vue.js";
|
8
8
|
import "vue-router";
|
9
|
-
/* empty css
|
9
|
+
/* empty css */
|
10
10
|
import "../../../../reports/store/reports.js";
|
11
11
|
/* empty css */
|
12
12
|
/* empty css */
|
package/package.json
CHANGED
@@ -35,10 +35,13 @@ module.exports = (projectRoot) => {
|
|
35
35
|
plugins: [
|
36
36
|
// ...(!isProd ? [new webpack.HotModuleReplacementPlugin()] : []),
|
37
37
|
new StatsWriterPlugin(),
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
...(!isProd ? [
|
39
|
+
new WorkboxPlugin.GenerateSW({
|
40
|
+
clientsClaim: true,
|
41
|
+
skipWaiting: true,
|
42
|
+
disableDevLogs: true
|
43
|
+
}),
|
44
|
+
] : []),
|
42
45
|
new PurgeCSSPlugin({
|
43
46
|
paths: glob.sync([
|
44
47
|
path.join(projectRoot, 'src/**/*.vue'),
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import * as auth from '@pf/src/modules/auth/views/store/auth'
|
2
|
+
import * as blog from '@pf/src/modules/community/store/blogposts.js';
|
3
|
+
|
4
|
+
import { useGlobalMixins } from "@pf/src/modules/globals/views/mixins/mixins.js"
|
5
|
+
|
6
|
+
const { hasAccess } = useGlobalMixins()
|
7
|
+
|
8
|
+
async function requiresEditAccess(to, from, next) {
|
9
|
+
const postId = to.params.url; // Предполагается, что `url` является идентификатором поста
|
10
|
+
const userId = auth.state.user._id; // Получаем текущего пользователя
|
11
|
+
|
12
|
+
try {
|
13
|
+
// Получаем данные поста, чтобы проверить его принадлежность к организации или авторство
|
14
|
+
const post = (await blog.read({ url: to.params.url }))[0];
|
15
|
+
|
16
|
+
console.log('post is', post)
|
17
|
+
|
18
|
+
if (!post) {
|
19
|
+
return next('/404'); // Если пост не найден, перенаправляем на страницу 404
|
20
|
+
}
|
21
|
+
|
22
|
+
if (post.owner.type === 'organization') {
|
23
|
+
// Если пост принадлежит организации, проверяем права на редактирование через `hasAccess`
|
24
|
+
const isAccess = hasAccess(post.owner.target._id, 'posts', 'edit', auth.state.accesses);
|
25
|
+
|
26
|
+
if (!isAccess) {
|
27
|
+
return next('/401'); // Если у пользователя нет прав на редактирование в организации, перенаправляем на 403
|
28
|
+
}
|
29
|
+
} else {
|
30
|
+
// Если пост не принадлежит организации, проверяем авторство
|
31
|
+
if (post.creator.target._id !== userId) {
|
32
|
+
return next('/401'); // Если пользователь не является автором, перенаправляем на 403
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
next(); // Если все проверки прошли, продолжаем
|
37
|
+
} catch (error) {
|
38
|
+
console.error("Error during post access check:", error);
|
39
|
+
return next('/500'); // Если произошла ошибка, перенаправляем на страницу 500
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
export {
|
44
|
+
requiresEditAccess
|
45
|
+
}
|
@@ -150,7 +150,9 @@
|
|
150
150
|
});
|
151
151
|
|
152
152
|
const firstText = computed(() => {
|
153
|
-
return props.blogpost.content.find(block =>
|
153
|
+
return props.blogpost.content.find(block =>
|
154
|
+
block.type === 'Textarea' && block.class !== 'h2'
|
155
|
+
);
|
154
156
|
});
|
155
157
|
|
156
158
|
</script>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<template>
|
2
|
-
<div style="grid-template-columns: 2fr 4fr 2fr;" class="cols-3 gap-thin pd-thin">
|
2
|
+
<div style="grid-template-columns: 2fr 4fr 2fr;" class="cols-3 gap-thin pd-t-zero pd-thin">
|
3
3
|
|
4
|
-
<ul class="align-self-start pos-sticky pos-t-0 w-100 bg-light radius-big pd-medium p-medium gap-thin flex-column flex-nowrap flex">
|
4
|
+
<ul class="align-self-start pos-sticky pos-t-0 w-100 bg-light radius-big pd-medium p-medium gap-thin flex-column mobile:flex-row flex-nowrap flex z-index-2 o-scroll t-nowrap scroll-hide">
|
5
5
|
<li
|
6
6
|
:class="{'t-black bg-white': route.params.category === 'featured' }"
|
7
7
|
@click="() => { blog.state.sort.param = 'createdAt'; router.push({name: 'Blog', params: { category: 'featured' } })}"
|
@@ -37,10 +37,11 @@
|
|
37
37
|
</li>
|
38
38
|
|
39
39
|
<router-link
|
40
|
+
v-if="auth.state.user._id"
|
40
41
|
:to="{
|
41
42
|
name: 'Create BlogPost'
|
42
43
|
}"
|
43
|
-
class="button t-medium
|
44
|
+
class="button t-medium bg-main w-100"
|
44
45
|
>
|
45
46
|
Create Post
|
46
47
|
</router-link>
|
@@ -48,7 +49,7 @@
|
|
48
49
|
|
49
50
|
<section class="pos-relative">
|
50
51
|
|
51
|
-
<header class="bg-
|
52
|
+
<header class="bg-light t-black radius-big pd-medium pos-relative mn-b-thin flex-v-center t-left flex-nowrap flex">
|
52
53
|
<h3 class="pos-relative flex-v-center flex-nowrap flex">
|
53
54
|
<span class="mn-r-thin">Topics for </span>
|
54
55
|
|
@@ -65,9 +66,6 @@
|
|
65
66
|
radius-medium
|
66
67
|
h3
|
67
68
|
t-center
|
68
|
-
br-solid
|
69
|
-
br-2px
|
70
|
-
br-black-transp-10
|
71
69
|
"
|
72
70
|
/>
|
73
71
|
</h3>
|
@@ -6,7 +6,6 @@
|
|
6
6
|
v-for="i in 3" :key="i"
|
7
7
|
/>
|
8
8
|
</TransitionGroup>
|
9
|
-
|
10
9
|
<transition
|
11
10
|
name="fade"
|
12
11
|
>
|
@@ -125,12 +124,10 @@
|
|
125
124
|
return blogpost.value?.content.find(block => block.type === 'ImageUpload');
|
126
125
|
});
|
127
126
|
|
128
|
-
const firstVideo = computed(() => {
|
129
|
-
return blogpost.value?.content.find(block => block.type === 'Video');
|
130
|
-
});
|
131
|
-
|
132
127
|
const firstText = computed(() => {
|
133
|
-
return blogpost.value?.content
|
128
|
+
return blogpost.value?.content.find(block =>
|
129
|
+
block.type === 'Textarea' && block.class !== 'h2'
|
130
|
+
);
|
134
131
|
});
|
135
132
|
|
136
133
|
const metadata = computed(() => {return {
|
@@ -141,12 +138,12 @@
|
|
141
138
|
// { hid: 'keywords', name: 'keywords', content: t('meta.keywords') },
|
142
139
|
{ hid: 'og:title', property: 'og:title', content: blogpost.value?.name },
|
143
140
|
{ hid: 'og:description', property: 'og:description', content: firstText.value?.content.slice(0,120) },
|
144
|
-
|
141
|
+
{ hid: 'og:image', property: 'og:image', content: firstImage.value?.content ? process.env.FILE_SERVER_URL + firstImage.value?.content : process.env.FILE_SERVER_URL + '/favicon/cover.jpg' },
|
145
142
|
// { hid: 'og:url', property: 'og:url', content: current_url.value },
|
146
143
|
{ hid: 'twitter:title', name: 'twitter:title', content: blogpost.value?.name },
|
147
|
-
{ hid: 'twitter:description', name: 'twitter:description', content: firstText.value },
|
148
|
-
|
149
|
-
|
144
|
+
{ hid: 'twitter:description', name: 'twitter:description', content: firstText.value?.content.slice(0,120) },
|
145
|
+
{ hid: 'twitter:image', name: 'twitter:image', content: firstImage.value?.content ? process.env.FILE_SERVER_URL + firstImage.value?.content : process.env.FILE_SERVER_URL + '/favicon/cover.jpg' },
|
146
|
+
{ hid: 'twitter:card', name: 'twitter:card', content: process.env.FILE_SERVER_URL + '/favicon/cover.jpg' },
|
150
147
|
],
|
151
148
|
}});
|
152
149
|
useHead(metadata.value)
|
@@ -1,4 +1,7 @@
|
|
1
1
|
import layoutCommunity from '../components/layouts/Community.vue'
|
2
|
+
import * as validationAuth from '@pf/src/modules/auth/views/middlewares/auth.validation';
|
3
|
+
import * as validationOwnership from '@pf/src/modules/auth/views/middlewares/ownership.validation';
|
4
|
+
|
2
5
|
|
3
6
|
const community = [
|
4
7
|
{
|
@@ -35,8 +38,10 @@ const community = [
|
|
35
38
|
en: 'Create Post',
|
36
39
|
ru: 'Создать Пост'
|
37
40
|
},
|
38
|
-
authorize: []
|
39
41
|
},
|
42
|
+
beforeEnter: [
|
43
|
+
validationAuth.requiresAuth,
|
44
|
+
],
|
40
45
|
component: () => import(/* webpackChunkName: 'CreateBlogPost' */ '../components/pages/CreateBlogPost.vue')
|
41
46
|
},{
|
42
47
|
path: 'community/posts/:url',
|
@@ -56,8 +61,11 @@ const community = [
|
|
56
61
|
en: 'Edit Post',
|
57
62
|
ru: 'Редактировать пост'
|
58
63
|
},
|
59
|
-
authorize: []
|
60
64
|
},
|
65
|
+
beforeEnter: [
|
66
|
+
validationAuth.requiresAuth,
|
67
|
+
validationOwnership.requiresEditAccess
|
68
|
+
],
|
61
69
|
component: () => import(/* webpackChunkName: 'CreateBlogPost' */ '../components/pages/CreateBlogPost.vue')
|
62
70
|
}
|
63
71
|
|
@@ -18,6 +18,7 @@
|
|
18
18
|
</section>
|
19
19
|
</transition>
|
20
20
|
|
21
|
+
<!-- {{current_url}} -->
|
21
22
|
<transition name="moveFromTop" mode="out-in" appear>
|
22
23
|
<component
|
23
24
|
v-if="route.meta.sidebar && globals.state.isOpenSidebar"
|
@@ -87,12 +88,11 @@
|
|
87
88
|
messages: props.messages
|
88
89
|
})
|
89
90
|
|
90
|
-
const current_url = computed(() => removeTrailingSlash(`${base_url}${route.path}`));
|
91
91
|
|
92
92
|
const route = useRoute();
|
93
93
|
|
94
94
|
const languages = ['en', 'ru'];
|
95
|
-
const base_url =
|
95
|
+
const base_url = process.env.FILE_SERVER_URL;
|
96
96
|
|
97
97
|
function removeTrailingSlash(url) {
|
98
98
|
return url.endsWith('/') ? url.slice(0, -1) : url;
|
@@ -109,17 +109,17 @@
|
|
109
109
|
{ hid: 'og:title', property: 'og:title', content: t('meta.og.title') },
|
110
110
|
{ hid: 'og:description', property: 'og:description', content: t('meta.og.description') },
|
111
111
|
{ hid: 'og:image', property: 'og:image', content: base_url + '/favicon/cover.jpg' },
|
112
|
-
{ hid: 'og:url', property: 'og:url', content:
|
112
|
+
{ hid: 'og:url', property: 'og:url', content: removeTrailingSlash(`${base_url}${route.path}`) },
|
113
113
|
{ hid: 'twitter:title', name: 'twitter:title', content: t('meta.twitter.title') },
|
114
114
|
{ hid: 'twitter:description', name: 'twitter:description', content: t('meta.twitter.description') },
|
115
115
|
{ hid: 'twitter:image', name: 'twitter:image', content: base_url + '/favicon/cover.jpg' },
|
116
116
|
{ hid: 'twitter:card', name: 'twitter:card', content: t('meta.twitter.card') },
|
117
117
|
],
|
118
118
|
link: [
|
119
|
-
|
120
|
-
|
119
|
+
{ hid: 'canonical', rel: 'canonical', href: removeTrailingSlash(`${base_url}${route.path}`) },
|
120
|
+
...generateAlternateLinks.value,
|
121
121
|
],
|
122
|
-
htmlAttrs: { lang: t('meta.htmlAttrs.lang')}
|
122
|
+
htmlAttrs: { lang: t('meta.htmlAttrs.lang') }
|
123
123
|
}});
|
124
124
|
|
125
125
|
const generateAlternateLinks = computed(() => {
|
@@ -141,7 +141,7 @@
|
|
141
141
|
});
|
142
142
|
});
|
143
143
|
|
144
|
-
useHead(metadata
|
144
|
+
useHead(metadata)
|
145
145
|
/////////////////////////////
|
146
146
|
// FIRST USE
|
147
147
|
/////////////////////////////
|
@@ -29,7 +29,6 @@ const controllerFactory = (db) => {
|
|
29
29
|
[sortParam]: sortOrder === 'desc' ? -1 : 1,
|
30
30
|
"_id": 1
|
31
31
|
};
|
32
|
-
console.log(sort)
|
33
32
|
// if (sortParam === 'distance') sort.numberOfSpots = -1
|
34
33
|
//////////////////////////////////////
|
35
34
|
// 2. Pagination Condition
|
@@ -66,7 +65,32 @@ const controllerFactory = (db) => {
|
|
66
65
|
...(req.query.owner ? [{ owner: new ObjectId(req.query.owner) }] : []),
|
67
66
|
...(req.query.member ? [{"memberships.user": new ObjectId(req.query.member), "memberships.role": 'member' } ] : [] ),
|
68
67
|
...(req.query.subscriber ? [{"memberships.user": new ObjectId(req.query.subscriber), "memberships.role": 'subscriber'} ] : [] ),
|
69
|
-
...(
|
68
|
+
...(
|
69
|
+
req.query.postable ? [{
|
70
|
+
$or: [{
|
71
|
+
$and: [{
|
72
|
+
types: {
|
73
|
+
$elemMatch: { $eq: 'public' }
|
74
|
+
}
|
75
|
+
}, {
|
76
|
+
"memberships.user": new ObjectId(req.query.postable)
|
77
|
+
}]
|
78
|
+
}, {
|
79
|
+
$and: [{
|
80
|
+
types: {
|
81
|
+
$elemMatch: {
|
82
|
+
$in: ['exclusive', 'hidden']
|
83
|
+
} }
|
84
|
+
}, {
|
85
|
+
"memberships.user": new ObjectId(req.query.postable)
|
86
|
+
}, {
|
87
|
+
"memberships.role": {
|
88
|
+
$ne: 'subscriber'
|
89
|
+
}
|
90
|
+
}]
|
91
|
+
}]
|
92
|
+
}] : []
|
93
|
+
),
|
70
94
|
...(req.query.types ? [{ types: { $in: req.query.types } }] : []), // Если req.query.types - строка
|
71
95
|
// to remove
|
72
96
|
...(req.query.onlyuser ? [{ "memberships.user": new ObjectId(req.query.onlyuser) }] : []),
|
@@ -456,36 +480,4 @@ const controllerFactory = (db) => {
|
|
456
480
|
};
|
457
481
|
};
|
458
482
|
|
459
|
-
async function getGeoLocation(req, res) {
|
460
|
-
let { location, address, city, state, country } = req.query;
|
461
|
-
|
462
|
-
if (!location && (address || city || state || country)) {
|
463
|
-
let geoLocation;
|
464
|
-
|
465
|
-
try {
|
466
|
-
const geoResponse = await client.geocode({
|
467
|
-
params: {
|
468
|
-
address: `${state}, ${country}`,
|
469
|
-
key: 'AIzaSyDDR6WgYB7XMt7yTDDzQNEdF_gTdUiq8dI',
|
470
|
-
},
|
471
|
-
});
|
472
|
-
|
473
|
-
if (geoResponse.data.results && geoResponse.data.results.length > 0) {
|
474
|
-
return geoResponse.data.results[0].geometry.location;
|
475
|
-
} else {
|
476
|
-
return res.status(400).send({ message: 'Unable to geocode the provided location.' });
|
477
|
-
}
|
478
|
-
} catch (err) {
|
479
|
-
console.log(err)
|
480
|
-
return res.status(500).send({ message: 'Error occurred while geocoding.' });
|
481
|
-
}
|
482
|
-
} else if (location) {
|
483
|
-
if (typeof location === 'string') {
|
484
|
-
location = JSON.parse(location);
|
485
|
-
}
|
486
|
-
|
487
|
-
return { lat: location.coordinates[1], lng: location.coordinates[0] };
|
488
|
-
}
|
489
|
-
}
|
490
|
-
|
491
483
|
module.exports = controllerFactory;
|
@@ -42,6 +42,20 @@ module.exports = (mongoose) => {
|
|
42
42
|
default: false,
|
43
43
|
},
|
44
44
|
},
|
45
|
+
posts: {
|
46
|
+
read: {
|
47
|
+
type: Boolean,
|
48
|
+
default: false,
|
49
|
+
},
|
50
|
+
edit: {
|
51
|
+
type: Boolean,
|
52
|
+
default: false,
|
53
|
+
},
|
54
|
+
delete: {
|
55
|
+
type: Boolean,
|
56
|
+
default: false,
|
57
|
+
},
|
58
|
+
},
|
45
59
|
gallery: {
|
46
60
|
read: {
|
47
61
|
type: Boolean,
|
package/src/styles/base/all.scss
CHANGED
@@ -172,8 +172,6 @@ body {
|
|
172
172
|
// Flex
|
173
173
|
.flex {
|
174
174
|
display: flex;
|
175
|
-
&-row { flex-direction: row; }
|
176
|
-
&-column { flex-direction: column; }
|
177
175
|
&-nowrap { flex-wrap: nowrap; }
|
178
176
|
&-wrap { flex-wrap: wrap; }
|
179
177
|
&-center { align-items: center; justify-content: center; }
|
package/src/styles/config.scss
CHANGED
@@ -283,6 +283,11 @@ $align-items: (
|
|
283
283
|
'align-baseline': baseline,
|
284
284
|
);
|
285
285
|
|
286
|
+
$flex-direction: (
|
287
|
+
'row': row,
|
288
|
+
'column': column
|
289
|
+
);
|
290
|
+
|
286
291
|
body {
|
287
292
|
@include generate-utility-classes('pd', 'padding', $modifiers, $combined, $breakpoints);
|
288
293
|
@include generate-utility-classes('mn', 'margin', $modifiers, $combined, $breakpoints);
|
@@ -311,6 +316,7 @@ body {
|
|
311
316
|
@include generate-utility-classes('gap', 'gap', null, $combined, $breakpoints);
|
312
317
|
@include generate-utility-classes('flex', 'justify-content', null, $justify-content, $breakpoints);
|
313
318
|
@include generate-utility-classes('flex', 'align-items', null, $align-items, $breakpoints);
|
319
|
+
@include generate-utility-classes('flex', 'flex-direction', null, $flex-direction, $breakpoints);
|
314
320
|
|
315
321
|
@include generate-bg-classes('bg-main', 'main');
|
316
322
|
@include generate-bg-classes('bg-second', 'second');
|