@ozdao/prometheus-framework 0.2.252 → 0.2.254
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +298 -14
- package/dist/auth.server.mjs +298 -14
- package/dist/builder.js +4 -4
- package/dist/builder.mjs +4 -4
- package/dist/chats.server.js +110 -0
- package/dist/chats.server.mjs +111 -0
- package/dist/community.server.js +38 -21
- package/dist/community.server.mjs +38 -21
- package/dist/events.server.js +38 -18
- package/dist/events.server.mjs +38 -17
- package/dist/files.server.js +12 -3
- package/dist/files.server.mjs +12 -3
- package/dist/gallery.server.js +17 -4
- package/dist/gallery.server.mjs +17 -4
- package/dist/organizations.server.js +43 -26
- package/dist/organizations.server.mjs +43 -26
- package/dist/products.server.js +49 -23
- package/dist/products.server.mjs +49 -22
- package/dist/prometheus-framework/src/modules/auth/auth.client.cjs +15 -3
- package/dist/prometheus-framework/src/modules/auth/auth.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/auth.client.js +16 -4
- package/dist/prometheus-framework/src/modules/auth/auth.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/blocks/CardUser.vue.cjs +95 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/blocks/CardUser.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/blocks/CardUser.vue.js +95 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/blocks/CardUser.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.cjs +284 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.js +284 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue2.cjs +2 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue2.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue2.js +2 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue2.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileBlogposts.vue.cjs +85 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileBlogposts.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js +85 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +176 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.js +176 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue2.cjs +2 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue2.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue2.js +2 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue2.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/FeaturedUsers.vue.cjs +114 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/FeaturedUsers.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/FeaturedUsers.vue.js +114 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/FeaturedUsers.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/ProfileCompletion.vue.cjs +72 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/ProfileCompletion.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/ProfileCompletion.vue.js +72 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/ProfileCompletion.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/router/users.cjs +97 -0
- package/dist/prometheus-framework/src/modules/auth/views/router/users.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/router/users.js +97 -0
- package/dist/prometheus-framework/src/modules/auth/views/router/users.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/store/users.cjs +95 -0
- package/dist/prometheus-framework/src/modules/auth/views/store/users.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/store/users.js +95 -0
- package/dist/prometheus-framework/src/modules/auth/views/store/users.js.map +1 -0
- package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.cjs +32 -2
- package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.js +32 -2
- package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +2 -2
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +2 -2
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js.map +1 -1
- package/dist/prometheus-framework/src/modules/chats/chats.client.cjs +31 -0
- package/dist/prometheus-framework/src/modules/chats/chats.client.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/chats/chats.client.js +31 -0
- package/dist/prometheus-framework/src/modules/chats/chats.client.js.map +1 -0
- package/dist/prometheus-framework/src/modules/community/community.client.cjs +42 -7
- package/dist/prometheus-framework/src/modules/community/community.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/community.client.js +59 -24
- package/dist/prometheus-framework/src/modules/community/community.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +68 -70
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js +68 -70
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/gallery.client.cjs +26 -3
- package/dist/prometheus-framework/src/modules/gallery/gallery.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/gallery.client.js +27 -4
- package/dist/prometheus-framework/src/modules/gallery/gallery.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.router.cjs +2 -2
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.router.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.router.js +2 -2
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.router.js.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/orders.client.cjs +4 -1
- package/dist/prometheus-framework/src/modules/orders/orders.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/orders.client.js +4 -1
- package/dist/prometheus-framework/src/modules/orders/orders.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/testimonials.cjs +63 -0
- package/dist/prometheus-framework/src/modules/orders/store/testimonials.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/orders/store/testimonials.js +63 -0
- package/dist/prometheus-framework/src/modules/orders/store/testimonials.js.map +1 -0
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +60 -11
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +95 -46
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +6 -10
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +8 -12
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js.map +1 -1
- package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +500 -500
- package/dist/prometheus-framework/src/modules/pages/pages.client.js +500 -500
- package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.cjs +179 -0
- package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.js +179 -0
- package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.cjs +64 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.js +64 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +2 -2
- 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.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.cjs +156 -0
- package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.js +157 -0
- package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.js.map +1 -1
- 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.cjs.map +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/PopularProducts.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/products.client.cjs +72 -7
- package/dist/prometheus-framework/src/modules/products/products.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/products.client.js +114 -49
- package/dist/prometheus-framework/src/modules/products/products.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/router/marketplace.router.cjs +46 -0
- package/dist/prometheus-framework/src/modules/products/router/marketplace.router.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/products/router/marketplace.router.js +46 -0
- package/dist/prometheus-framework/src/modules/products/router/marketplace.router.js.map +1 -0
- package/dist/prometheus-framework/src/modules/products/router/products.router.cjs +79 -36
- package/dist/prometheus-framework/src/modules/products/router/products.router.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/router/products.router.js +78 -35
- package/dist/prometheus-framework/src/modules/products/router/products.router.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/marketplace.cjs +57 -0
- package/dist/prometheus-framework/src/modules/products/store/marketplace.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/products/store/marketplace.js +57 -0
- package/dist/prometheus-framework/src/modules/products/store/marketplace.js.map +1 -0
- package/dist/prometheus-framework/src/modules/reports/reports.client.cjs +21 -2
- package/dist/prometheus-framework/src/modules/reports/reports.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/reports/reports.client.js +20 -1
- package/dist/prometheus-framework/src/modules/reports/reports.client.js.map +1 -1
- 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.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.js.map +1 -1
- package/dist/reports.server.js +21 -8
- package/dist/reports.server.mjs +21 -8
- package/package.json +9 -1
- package/src/builder/webpack/webpack.config.client.js +2 -2
- package/src/builder/webpack/webpack.config.server.js +1 -1
- package/src/builder/webpack/webpack.config.spa.js +1 -1
- package/src/builder/webpack/webpack.config.ssr.js +1 -1
- package/src/modules/auth/auth.client.js +16 -3
- package/src/modules/auth/auth.server.js +22 -1
- package/src/modules/{users → auth/controllers}/routes/users.routes.js +1 -1
- package/src/modules/auth/controllers/services/auth.service.js +0 -1
- package/src/modules/{users → auth/views}/components/pages/Profile.vue +1 -1
- package/src/modules/{users → auth/views}/components/pages/ProfileEdit.vue +2 -2
- package/src/modules/{users → auth/views}/components/sections/FeaturedUsers.vue +2 -2
- package/src/modules/auth/views/router/users.js +79 -0
- package/src/modules/backoffice/backoffice.client.js +53 -11
- package/src/modules/backoffice/router/backoffice.js +29 -2
- package/src/modules/chats/chats.client.js +48 -0
- package/src/modules/chats/chats.server.js +32 -0
- package/src/modules/community/community.client.js +56 -10
- package/src/modules/community/community.server.js +35 -14
- package/src/modules/community/models/comment.model.js +7 -7
- package/src/modules/community/models/reaction.model.js +5 -5
- package/src/modules/community/router/blogposts.js +55 -57
- package/src/modules/events/events.server.js +37 -16
- package/src/modules/events/models/ticket.model.js +6 -6
- package/src/modules/files/files.server.js +17 -7
- package/src/modules/gallery/gallery.client.js +44 -8
- package/src/modules/gallery/gallery.server.js +28 -9
- package/src/modules/gallery/router/gallery.router.js +2 -2
- package/src/modules/orders/components/pages/OrderCreate.vue +1 -1
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +1 -1
- package/src/modules/orders/components/sections/FormAddCustomer.vue +2 -2
- package/src/modules/orders/orders.client.js +4 -1
- package/src/modules/orders/orders.server.js +1 -0
- package/src/modules/organizations/components/blocks/CardDepartment.vue +1 -1
- package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
- package/src/modules/organizations/components/pages/Department.vue +1 -1
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +1 -1
- package/src/modules/organizations/components/pages/Members.vue +1 -1
- package/src/modules/organizations/components/pages/Organization.vue +1 -1
- package/src/modules/organizations/components/sections/MembersAdd.vue +2 -2
- package/src/modules/organizations/controllers/organizations.controller.js +0 -2
- package/src/modules/organizations/models/department.model.js +7 -7
- package/src/modules/organizations/models/membership.model.js +5 -5
- package/src/modules/organizations/organizations.client.js +71 -16
- package/src/modules/organizations/organizations.server.js +43 -18
- package/src/modules/organizations/router/organizations.js +6 -13
- package/src/modules/{marketplace → products}/components/layouts/Marketplace.vue +20 -19
- package/src/modules/{marketplace → products}/components/pages/Catalog.vue +5 -5
- package/src/modules/products/components/pages/Products.vue +2 -2
- package/src/modules/products/components/sections/FilterProducts.vue +1 -1
- package/src/modules/{marketplace → products}/components/sections/Filters.vue +12 -15
- package/src/modules/products/components/sections/HeroRecommendation.vue +1 -1
- package/src/modules/products/components/sections/PopularProducts.vue +1 -1
- package/src/modules/products/models/category.model.js +3 -3
- package/src/modules/products/models/product.model.js +7 -7
- package/src/modules/products/products.client.js +93 -25
- package/src/modules/products/products.server.js +47 -16
- package/src/modules/products/router/marketplace.router.js +38 -0
- package/src/modules/products/router/products.router.js +72 -32
- package/src/modules/reports/models/report.model.js +4 -4
- package/src/modules/reports/reports.client.js +35 -14
- package/src/modules/reports/reports.server.js +27 -8
- package/src/modules/spots/components/layouts/Spots.vue +1 -1
- package/src/modules/spots/components/pages/Map.vue +1 -1
- package/src/modules/spots/components/pages/Spot.vue +1 -1
- package/src/modules/backoffice/router/admin.js +0 -51
- package/src/modules/landing/components/pages/404.vue +0 -3
- package/src/modules/landing/components/pages/Farming.vue +0 -226
- package/src/modules/landing/components/pages/Governance.vue +0 -144
- package/src/modules/landing/components/pages/Home.vue +0 -51
- package/src/modules/landing/components/pages/Hotel.vue +0 -43
- package/src/modules/landing/router/landing.js +0 -39
- package/src/modules/legal/components/pages/Legal.vue +0 -62
- package/src/modules/legal/components/pages/legal/Cookies.vue +0 -370
- package/src/modules/legal/components/pages/legal/EULA.vue +0 -2145
- package/src/modules/legal/components/pages/legal/Privacy.vue +0 -4284
- package/src/modules/legal/components/pages/legal/Terms.vue +0 -1283
- package/src/modules/legal/legal.client.js +0 -18
- package/src/modules/legal/router/legal.js +0 -59
- package/src/modules/marketplace/router/marketplace.js +0 -54
- package/src/modules/users/router/users.js +0 -90
- package/src/modules/users/users.client.js +0 -22
- package/src/modules/users/users.server.js +0 -13
- /package/src/modules/{users → auth/controllers}/middlewares/visitor.logger.js +0 -0
- /package/src/modules/{users/controllers/users.controller.js → auth/controllers/services/users.service.js} +0 -0
- /package/src/modules/{users → auth}/models/request.model.js +0 -0
- /package/src/modules/{users → auth}/models/user.model.js +0 -0
- /package/src/modules/{users → auth}/models/visitor.model.js +0 -0
- /package/src/modules/{users → auth/views}/components/blocks/CardUser.vue +0 -0
- /package/src/modules/{users → auth/views}/components/pages/ProfileBlogposts.vue +0 -0
- /package/src/modules/{users → auth/views}/components/pages/ProfileComments.vue +0 -0
- /package/src/modules/{users → auth/views}/components/pages/ProfileLikes.vue +0 -0
- /package/src/modules/{users → auth/views}/components/sections/ProfileCompletion.vue +0 -0
- /package/src/modules/{users → auth/views}/router/account.js +0 -0
- /package/src/modules/{users → auth/views}/store/users.js +0 -0
- /package/src/modules/{projects/controller → governance/controllers/factories}/projects.controller.js +0 -0
- /package/src/modules/{projects → governance/controllers}/routes/projects.routes.js +0 -0
- /package/src/modules/{projects → governance}/models/project.model.js +0 -0
- /package/src/modules/{projects → governance/views}/store/projects.js +0 -0
- /package/src/modules/{marketplace → products}/store/marketplace.js +0 -0
@@ -1,9 +1,11 @@
|
|
1
1
|
// Store
|
2
2
|
import * as storeAuth from './views/store/auth.js';
|
3
3
|
import * as storeTwofa from './views/store/twofa.js';
|
4
|
+
import * as storeUsers from './views/store/users.js';
|
4
5
|
|
5
6
|
// Router
|
6
7
|
import routerAuth from './views/router/auth.js';
|
8
|
+
import routerUsers from './views/router/users.js';
|
7
9
|
|
8
10
|
// Middlewares
|
9
11
|
import * as validationAuth from '@pf/src/modules/auth/views/middlewares/auth.validation';
|
@@ -16,18 +18,24 @@ import EnterPassword from './views/components/pages/EnterPassword.vue';
|
|
16
18
|
import ResetPassword from './views/components/pages/ResetPassword.vue';
|
17
19
|
import SignUp from './views/components/pages/SignUp.vue';
|
18
20
|
import SignIn from './views/components/pages/SignIn.vue';
|
21
|
+
import Profile from './views/components/pages/Profile.vue';
|
22
|
+
import ProfileEdit from './views/components/pages/ProfileEdit.vue'
|
19
23
|
|
20
24
|
// Importing sections components
|
21
25
|
import SliderFeatures from './views/components/sections/SliderFeatures.vue';
|
26
|
+
import FeaturedUsers from './views/components/sections/FeaturedUsers.vue';
|
22
27
|
|
23
28
|
// Пример функции инициализации для модуля аутентификации
|
24
29
|
function initializeAuth(app, store, router, options = {}) {
|
25
30
|
const route = options.route || 'Home';
|
26
31
|
|
27
32
|
router.addRoute(route, routerAuth);
|
33
|
+
router.addRoute(route, routerUsers);
|
28
34
|
|
29
35
|
store.addStore('auth', storeAuth);
|
30
36
|
store.addStore('twofa', storeTwofa);
|
37
|
+
store.addStore('users', storeUsers);
|
38
|
+
|
31
39
|
}
|
32
40
|
|
33
41
|
const ModuleAuth = {
|
@@ -35,10 +43,12 @@ const ModuleAuth = {
|
|
35
43
|
views: {
|
36
44
|
store: {
|
37
45
|
storeAuth,
|
38
|
-
storeTwofa
|
46
|
+
storeTwofa,
|
47
|
+
storeUsers
|
39
48
|
},
|
40
49
|
router: {
|
41
|
-
routerAuth
|
50
|
+
routerAuth,
|
51
|
+
routerUsers
|
42
52
|
},
|
43
53
|
middlewares: {
|
44
54
|
validationAuth
|
@@ -53,8 +63,11 @@ const ModuleAuth = {
|
|
53
63
|
ResetPassword,
|
54
64
|
SignUp,
|
55
65
|
SignIn,
|
66
|
+
Profile,
|
67
|
+
ProfileEdit,
|
56
68
|
// Sections
|
57
|
-
SliderFeatures
|
69
|
+
SliderFeatures,
|
70
|
+
FeaturedUsers
|
58
71
|
}
|
59
72
|
}
|
60
73
|
}
|
@@ -1,22 +1,39 @@
|
|
1
1
|
// Импортируем модели
|
2
|
+
const UserModel = require('./models/user.model.js');
|
2
3
|
const RoleModel = require('./models/role.model.js');
|
4
|
+
const VisitorModel = require("./models/visitor.model")
|
5
|
+
const RequestModel = require("./models/request.model");
|
3
6
|
|
4
7
|
// Импортируем роуты
|
5
8
|
const authRoutes = require('./controllers/routes/auth.routes.js');
|
6
9
|
const twofaRoutes = require('./controllers/routes/twofa.routes.js');
|
10
|
+
const usersRoutes = require('./controllers/routes/users.routes.js');
|
7
11
|
|
8
12
|
// Импортируем контроллеры
|
9
13
|
const AuthController = require('./controllers/services/auth.service.js');
|
10
14
|
const TwoFaController = require('./controllers/services/twofa.service.js');
|
15
|
+
const UsersController = require('./controllers/services/users.service.js');
|
16
|
+
|
17
|
+
// Middlewares
|
18
|
+
const visitors = require('@pf/src/modules/auth/controllers/middlewares/visitor.logger');
|
19
|
+
|
11
20
|
|
12
21
|
function initializeAuth(app, db, origins, publicPath) {
|
13
22
|
// Настраиваем модели в объекте базы данных
|
14
23
|
db.role = RoleModel(db);
|
24
|
+
db.user = UserModel(db);
|
25
|
+
db.visitor = VisitorModel(db);
|
26
|
+
db.request = RequestModel(db);
|
15
27
|
|
16
28
|
// Настраиваем маршруты, если объект приложения передан
|
17
29
|
if (app) {
|
18
30
|
authRoutes(app, db, origins, publicPath);
|
19
31
|
twofaRoutes(app, db, origins, publicPath);
|
32
|
+
usersRoutes(app, db, origins, publicPath);
|
33
|
+
|
34
|
+
const visitorModule = visitors(db);
|
35
|
+
|
36
|
+
app.use(visitorModule.visitorLogger);
|
20
37
|
}
|
21
38
|
}
|
22
39
|
|
@@ -25,13 +42,17 @@ module.exports = {
|
|
25
42
|
initialize: initializeAuth,
|
26
43
|
models: {
|
27
44
|
RoleModel,
|
45
|
+
UserModel,
|
46
|
+
VisitorModel
|
28
47
|
},
|
29
48
|
routes: {
|
30
49
|
authRoutes,
|
31
50
|
twofaRoutes,
|
51
|
+
usersRoutes
|
32
52
|
},
|
33
53
|
controllers: {
|
34
54
|
AuthController,
|
35
55
|
TwoFaController,
|
56
|
+
UsersController,
|
36
57
|
}
|
37
|
-
};
|
58
|
+
};
|
@@ -222,7 +222,6 @@ const controllerFactory = (db) => {
|
|
222
222
|
|
223
223
|
const checkAccesses = async (req, res) => {
|
224
224
|
try {
|
225
|
-
// console.log('x-access-token:', req.headers['x-access-token']);
|
226
225
|
const uid = new db.mongoose.Types.ObjectId(req.userId);
|
227
226
|
const depts = await Department.find({ 'members.user': uid });
|
228
227
|
const ownedOrgs = await Organization.find({ owner: uid });
|
@@ -265,7 +265,7 @@ import { computed, watch, onMounted, ref, onBeforeMount } from 'vue'
|
|
265
265
|
import { useRoute, useRouter } from 'vue-router'
|
266
266
|
// Import state
|
267
267
|
import * as auth from '@pf/src/modules/auth/views/store/auth'
|
268
|
-
import * as users from '@pf/src/modules/
|
268
|
+
import * as users from '@pf/src/modules/auth/views/store/users'
|
269
269
|
import * as memberships from '@pf/src/modules/organizations/store/memberships'
|
270
270
|
// Accessing router
|
271
271
|
const route = useRoute()
|
@@ -140,13 +140,13 @@
|
|
140
140
|
import Button from '@pf/src/components/Button/Button.vue'
|
141
141
|
import UploadImage from '@pf/src/components/UploadImage/UploadImage.vue';
|
142
142
|
|
143
|
-
import ProfileCompletion from '@pf/src/modules/
|
143
|
+
import ProfileCompletion from '@pf/src/modules/auth/views/components/sections/ProfileCompletion.vue'
|
144
144
|
// Import libs
|
145
145
|
import { computed, onMounted, ref, onBeforeMount } from 'vue'
|
146
146
|
import { useRoute, useRouter } from 'vue-router'
|
147
147
|
// Import state
|
148
148
|
import * as auth from '@pf/src/modules/auth/views/store/auth'
|
149
|
-
import * as users from '@pf/src/modules/
|
149
|
+
import * as users from '@pf/src/modules/auth/views/store/users'
|
150
150
|
import * as globals from '@pf/src/modules/globals/views/store/globals'
|
151
151
|
// Import validation
|
152
152
|
import * as inputsValidation from '@pf/src/modules/auth/views/validations/inputs.validation'
|
@@ -80,11 +80,11 @@
|
|
80
80
|
<script setup>
|
81
81
|
import { ref, onMounted } from 'vue';
|
82
82
|
|
83
|
-
import * as users from '@pf/src/modules/
|
83
|
+
import * as users from '@pf/src/modules/auth/views/store/users'
|
84
84
|
|
85
85
|
import Marquee from '@pf/src/components/Marquee/Marquee.vue'
|
86
86
|
|
87
|
-
import CardUser from '@pf/src/modules/
|
87
|
+
import CardUser from '@pf/src/modules/auth/views/components/blocks/CardUser.vue'
|
88
88
|
|
89
89
|
const usersList = ref([])
|
90
90
|
|
@@ -0,0 +1,79 @@
|
|
1
|
+
import * as validationAuth from '@pf/src/modules/auth/views/middlewares/auth.validation';
|
2
|
+
|
3
|
+
const users = {
|
4
|
+
path: 'users',
|
5
|
+
name: 'Users',
|
6
|
+
meta: {
|
7
|
+
title: {
|
8
|
+
en: 'Users',
|
9
|
+
ru: 'Пользователи'
|
10
|
+
},
|
11
|
+
},
|
12
|
+
children: [{
|
13
|
+
path: ':_id',
|
14
|
+
name: 'User Profile',
|
15
|
+
meta: {
|
16
|
+
title: {
|
17
|
+
en: 'Profile',
|
18
|
+
ru: 'Профиль'
|
19
|
+
}
|
20
|
+
},
|
21
|
+
component: () => import(/* webpackChunkName: "profile" */ '../components/pages/Profile.vue'),
|
22
|
+
},{
|
23
|
+
path: ':_id/edit',
|
24
|
+
name: 'User Edit Profile',
|
25
|
+
beforeEnter: [
|
26
|
+
validationAuth.requiresAuth,
|
27
|
+
],
|
28
|
+
meta: {
|
29
|
+
title: {
|
30
|
+
en: 'Edit Profile',
|
31
|
+
ru: 'Редактировать Профиль'
|
32
|
+
}
|
33
|
+
},
|
34
|
+
component: () => import(/* webpackChunkName: "profile" */ '../components/pages/ProfileEdit.vue'),
|
35
|
+
},{
|
36
|
+
path: ':_id/blogposts',
|
37
|
+
name: 'User Blogposts',
|
38
|
+
meta: {
|
39
|
+
title: {
|
40
|
+
en: 'Posts',
|
41
|
+
ru: 'Посты'
|
42
|
+
}
|
43
|
+
},
|
44
|
+
component: () => import(/* webpackChunkName: "profile" */ '../components/pages/ProfileBlogposts.vue'),
|
45
|
+
},{
|
46
|
+
path: ':user/events',
|
47
|
+
name: 'User Events',
|
48
|
+
meta: {
|
49
|
+
title: {
|
50
|
+
en: 'Events',
|
51
|
+
ru: 'События'
|
52
|
+
}
|
53
|
+
},
|
54
|
+
component: () => import(/* webpackChunkName: "profile" */ '@pf/src/modules/events/components/pages/EventsBackoffice.vue'),
|
55
|
+
},{
|
56
|
+
path: ':_id/organizations',
|
57
|
+
name: 'User Organizations',
|
58
|
+
meta: {
|
59
|
+
title: {
|
60
|
+
en: 'Groups',
|
61
|
+
ru: 'Группы'
|
62
|
+
}
|
63
|
+
},
|
64
|
+
component: () => import(/* webpackChunkName: "profile" */ '@pf/src/modules/organizations/components/pages/Organizations.vue'),
|
65
|
+
},{
|
66
|
+
path: ':_id/wallet',
|
67
|
+
name: 'User Wallet',
|
68
|
+
meta: {
|
69
|
+
title: {
|
70
|
+
en: 'Wallet',
|
71
|
+
ru: 'Кошелек'
|
72
|
+
}
|
73
|
+
},
|
74
|
+
component: () => import(/* webpackChunkName: "profile" */ '@pf/src/modules/wallet/views/components/pages/Wallet.vue'),
|
75
|
+
}]
|
76
|
+
}
|
77
|
+
|
78
|
+
|
79
|
+
export default users;
|
@@ -1,15 +1,57 @@
|
|
1
|
+
// Router
|
2
|
+
import routerBackoffice from './router/backoffice';
|
1
3
|
|
2
|
-
//
|
3
|
-
//
|
4
|
-
|
4
|
+
// Views
|
5
|
+
// Layouts
|
6
|
+
import BackofficeLayout from './components/layouts/Backoffice.vue';
|
5
7
|
|
6
|
-
//
|
7
|
-
|
8
|
+
// Pages
|
9
|
+
import Dashboard from './components/pages/Dashboard.vue';
|
8
10
|
|
9
|
-
//
|
10
|
-
import
|
11
|
+
// Admin components
|
12
|
+
// import AdminDashboard from './components/admin/Dashboard.vue';
|
13
|
+
// import FastOrders from './components/admin/FastOrders.vue';
|
14
|
+
// import UserEdit from './components/admin/UserEdit.vue';
|
15
|
+
// import Users from './components/admin/Users.vue';
|
16
|
+
// import ProductEdit from './components/admin/ProductEdit.vue';
|
17
|
+
// import Backcalls from './components/admin/Backcalls.vue';
|
11
18
|
|
12
|
-
//
|
13
|
-
|
14
|
-
|
15
|
-
|
19
|
+
// Partials
|
20
|
+
import Sidebar from './components/partials/Sidebar.vue';
|
21
|
+
|
22
|
+
// Пример функции инициализации для модуля бэкофиса
|
23
|
+
function initializeBackoffice(app, store, router, options = {}) {
|
24
|
+
const route = options.route || 'Home';
|
25
|
+
|
26
|
+
// const routesBackoffice = createBackofficeRoutes();
|
27
|
+
// const routesAdmin = createAdminRoutes();
|
28
|
+
|
29
|
+
router.addRoute(route, routerBackoffice);
|
30
|
+
// router.addRoute(`${route}.admin`, routerBackoffice);
|
31
|
+
}
|
32
|
+
|
33
|
+
const ModuleBackoffice = {
|
34
|
+
initialize: initializeBackoffice,
|
35
|
+
views: {
|
36
|
+
router: {
|
37
|
+
routerBackoffice
|
38
|
+
},
|
39
|
+
components: {
|
40
|
+
// Layouts
|
41
|
+
BackofficeLayout,
|
42
|
+
// Pages
|
43
|
+
Dashboard,
|
44
|
+
// Admin components
|
45
|
+
// AdminDashboard,
|
46
|
+
// FastOrders,
|
47
|
+
// UserEdit,
|
48
|
+
// Users,
|
49
|
+
// ProductEdit,
|
50
|
+
// Backcalls,
|
51
|
+
// Partials
|
52
|
+
Sidebar
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
export default ModuleBackoffice;
|
@@ -5,7 +5,34 @@ import layoutEmpty from '@pf/src/modules/globals/views/components/layouts/Empty.
|
|
5
5
|
|
6
6
|
import * as validationAuth from '@pf/src/modules/auth/views/middlewares/auth.validation';
|
7
7
|
|
8
|
-
const
|
8
|
+
// const admin = [
|
9
|
+
// {
|
10
|
+
// path: 'admin',
|
11
|
+
// component: layoutAdmin,
|
12
|
+
// meta: { authorize: ["ROLE_MODERATOR"] },
|
13
|
+
// children: [{
|
14
|
+
// path: 'backcalls',
|
15
|
+
// name: 'Backcalls',
|
16
|
+
// // meta: { authorize: ["ROLE_MODERATOR"] },
|
17
|
+
// component: () => import(/* webpackChunkName: 'Backcalls' */ '@/components/pages/admin/Backcalls.vue')
|
18
|
+
// },{
|
19
|
+
// path: 'fastorder',
|
20
|
+
// name: 'FastOrders',
|
21
|
+
// // meta: { authorize: ["ROLE_MODERATOR"] },
|
22
|
+
// component: () => import(/* webpackChunkName: 'FastOrders' */ '@/components/pages/admin/FastOrders.vue')
|
23
|
+
// },{
|
24
|
+
// path: 'users',
|
25
|
+
// name: 'Users',
|
26
|
+
// component: () => import(/* webpackChunkName: 'Users' */ '@/components/pages/admin/Users.vue')
|
27
|
+
// },{
|
28
|
+
// path: 'users/:phone',
|
29
|
+
// name: 'User',
|
30
|
+
// component: () => import(/* webpackChunkName: 'User' */ '@/components/pages/admin/User.vue')
|
31
|
+
// }]
|
32
|
+
// }
|
33
|
+
// ];
|
34
|
+
|
35
|
+
const backofficeRoutes = {
|
9
36
|
path: 'backoffice',
|
10
37
|
name: 'Backoffice Root',
|
11
38
|
|
@@ -77,6 +104,6 @@ const backofficeRoutes = [{
|
|
77
104
|
},
|
78
105
|
component: () => import(/* webpackChunkName: 'BackofficeCommunity' */ '@pf/src/modules/community/components/pages/Community.vue'),
|
79
106
|
}]
|
80
|
-
}
|
107
|
+
};
|
81
108
|
|
82
109
|
export default backofficeRoutes;
|
@@ -0,0 +1,48 @@
|
|
1
|
+
// Store
|
2
|
+
import * as storeChatModule from './store/chat.store.js';
|
3
|
+
|
4
|
+
// Router
|
5
|
+
// import { createChatRoutes } from './router/chat.router';
|
6
|
+
|
7
|
+
// Views
|
8
|
+
// Pages
|
9
|
+
import ChatPage from './components/pages/ChatPage.vue';
|
10
|
+
|
11
|
+
// Sections
|
12
|
+
import ChatWindow from './components/sections/ChatWindow.vue';
|
13
|
+
|
14
|
+
// Blocks
|
15
|
+
import ChatMessage from './components/blocks/ChatMessage.vue';
|
16
|
+
|
17
|
+
// Пример функции инициализации для модуля чатов
|
18
|
+
function initializeChats(app, store, router, options = {}) {
|
19
|
+
const route = options.route || 'Home';
|
20
|
+
|
21
|
+
// const routesChat = createChatRoutes();
|
22
|
+
|
23
|
+
// router.addRoute(route, routesChat);
|
24
|
+
|
25
|
+
store.addStore('chat', storeChatModule);
|
26
|
+
}
|
27
|
+
|
28
|
+
const ModuleChats = {
|
29
|
+
initialize: initializeChats,
|
30
|
+
views: {
|
31
|
+
store: {
|
32
|
+
storeChatModule
|
33
|
+
},
|
34
|
+
router: {
|
35
|
+
// createChatRoutes
|
36
|
+
},
|
37
|
+
components: {
|
38
|
+
// Pages
|
39
|
+
ChatPage,
|
40
|
+
// Sections
|
41
|
+
ChatWindow,
|
42
|
+
// Blocks
|
43
|
+
ChatMessage
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
export default ModuleChats;
|
@@ -0,0 +1,32 @@
|
|
1
|
+
// Импортируем контроллеры
|
2
|
+
const ChatsController = require('./controllers/chats.controller.js');
|
3
|
+
|
4
|
+
// Импортируем роуты
|
5
|
+
const chatsRoutes = require('./routes/chats.routes.js');
|
6
|
+
|
7
|
+
// Импортируем модели
|
8
|
+
const ChatModel = require('./models/chat.model.js');
|
9
|
+
|
10
|
+
function initializeChats(app, db, wss, origins, publicPath) {
|
11
|
+
// Настраиваем модели в объекте базы данных
|
12
|
+
db.chat = ChatModel(db);
|
13
|
+
|
14
|
+
// Настраиваем маршруты, если объект приложения передан
|
15
|
+
if (app) {
|
16
|
+
chatsRoutes(app, db, wss, origins, publicPath);
|
17
|
+
}
|
18
|
+
}
|
19
|
+
|
20
|
+
// Экспортируем функцию инициализации, контроллеры, роуты и модели
|
21
|
+
module.exports = {
|
22
|
+
initialize: initializeChats,
|
23
|
+
models: {
|
24
|
+
ChatModel,
|
25
|
+
},
|
26
|
+
routes: {
|
27
|
+
chatsRoutes,
|
28
|
+
},
|
29
|
+
controllers: {
|
30
|
+
ChatsController,
|
31
|
+
}
|
32
|
+
}
|
@@ -1,24 +1,68 @@
|
|
1
|
-
//
|
1
|
+
// Store
|
2
|
+
import * as storeBlogposts from './store/blogposts.js';
|
3
|
+
import * as storeReactions from './store/reactions.js';
|
4
|
+
|
5
|
+
// Router
|
6
|
+
import routerCommunity from './router/blogposts';
|
7
|
+
|
8
|
+
// Views
|
9
|
+
// Layouts
|
2
10
|
import Community from './components/layouts/Community.vue';
|
11
|
+
|
12
|
+
// Pages
|
3
13
|
import CreateBlogPost from './components/pages/CreateBlogPost.vue';
|
4
14
|
import BlogPost from './components/pages/BlogPost.vue';
|
5
15
|
import Blog from './components/pages/Blog.vue';
|
16
|
+
|
17
|
+
// Blocks
|
6
18
|
import FooterBlogpost from './components/blocks/FooterBlogpost.vue';
|
7
19
|
import Activity from './components/blocks/Activity.vue';
|
8
20
|
import CardBlogpost from './components/blocks/CardBlogpost.vue';
|
21
|
+
|
22
|
+
// Sections
|
9
23
|
import JoinUs from './components/sections/JoinUs.vue';
|
10
24
|
import Comments from './components/sections/Comments.vue';
|
11
25
|
import HotPosts from './components/sections/HotPosts.vue';
|
12
26
|
|
27
|
+
// Пример функции инициализации для модуля сообщества
|
28
|
+
function initializeCommunity(app, store, router, options = {}) {
|
29
|
+
const route = options.route || 'Home';
|
13
30
|
|
14
|
-
|
15
|
-
|
16
|
-
|
31
|
+
router.addRoute(route, routerCommunity);
|
32
|
+
|
33
|
+
store.addStore('blogposts', storeBlogposts);
|
34
|
+
store.addStore('reactions', storeReactions);
|
35
|
+
}
|
17
36
|
|
18
|
-
|
19
|
-
|
37
|
+
const ModuleCommunity = {
|
38
|
+
initialize: initializeCommunity,
|
39
|
+
views: {
|
40
|
+
store: {
|
41
|
+
storeBlogposts,
|
42
|
+
storeReactions
|
43
|
+
},
|
44
|
+
router: {
|
45
|
+
routerCommunity
|
46
|
+
},
|
47
|
+
components: {
|
48
|
+
// Layouts
|
49
|
+
Community,
|
50
|
+
// Pages
|
51
|
+
CreateBlogPost,
|
52
|
+
BlogPost,
|
53
|
+
Blog,
|
54
|
+
// Blocks
|
55
|
+
FooterBlogpost,
|
56
|
+
Activity,
|
57
|
+
CardBlogpost,
|
58
|
+
// Sections
|
59
|
+
JoinUs,
|
60
|
+
Comments,
|
61
|
+
HotPosts
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
20
65
|
|
21
|
-
// Exporting components, store modules, and routes
|
22
66
|
export {
|
23
67
|
Community,
|
24
68
|
CreateBlogPost,
|
@@ -30,7 +74,9 @@ export {
|
|
30
74
|
JoinUs,
|
31
75
|
Comments,
|
32
76
|
HotPosts,
|
33
|
-
|
34
|
-
|
35
|
-
|
77
|
+
storeBlogposts,
|
78
|
+
storeReactions,
|
79
|
+
routerCommunity
|
36
80
|
};
|
81
|
+
|
82
|
+
export default ModuleCommunity;
|
@@ -1,27 +1,48 @@
|
|
1
|
-
//
|
1
|
+
// Импортируем контроллеры
|
2
2
|
const BlogController = require('./controllers/blog.controller.js');
|
3
3
|
const CommentsController = require('./controllers/comments.controller.js');
|
4
4
|
const ReactionsController = require('./controllers/reactions.controller.js');
|
5
5
|
|
6
|
-
//
|
6
|
+
// Импортируем роуты
|
7
7
|
const blogRoutes = require('./routes/blog.routes.js');
|
8
8
|
const commentsRoutes = require('./routes/comments.routes.js');
|
9
9
|
const reactionsRoutes = require('./routes/reactions.routes.js');
|
10
10
|
|
11
|
-
//
|
11
|
+
// Импортируем модели
|
12
12
|
const BlogpostModel = require('./models/blogpost.model.js');
|
13
13
|
const CommentModel = require('./models/comment.model.js');
|
14
14
|
const ReactionModel = require('./models/reaction.model.js');
|
15
15
|
|
16
|
-
|
16
|
+
function initializeCommunity(app, db, origins, publicPath) {
|
17
|
+
// Настраиваем модели в объекте базы данных
|
18
|
+
db.blogpost = BlogpostModel(db);
|
19
|
+
db.comment = CommentModel(db);
|
20
|
+
db.reaction = ReactionModel(db);
|
21
|
+
|
22
|
+
// Настраиваем маршруты, если объект приложения передан
|
23
|
+
if (app) {
|
24
|
+
blogRoutes(app, db, origins, publicPath);
|
25
|
+
commentsRoutes(app, db, origins, publicPath);
|
26
|
+
reactionsRoutes(app, db, origins, publicPath);
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
// Экспортируем функцию инициализации, контроллеры, роуты и модели
|
17
31
|
module.exports = {
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
32
|
+
initialize: initializeCommunity,
|
33
|
+
models: {
|
34
|
+
BlogpostModel,
|
35
|
+
CommentModel,
|
36
|
+
ReactionModel,
|
37
|
+
},
|
38
|
+
routes: {
|
39
|
+
blogRoutes,
|
40
|
+
commentsRoutes,
|
41
|
+
reactionsRoutes,
|
42
|
+
},
|
43
|
+
controllers: {
|
44
|
+
BlogController,
|
45
|
+
CommentsController,
|
46
|
+
ReactionsController,
|
47
|
+
}
|
48
|
+
};
|
@@ -1,7 +1,7 @@
|
|
1
|
-
module.exports = (
|
2
|
-
const CommentSchema = new mongoose.Schema({
|
1
|
+
module.exports = (db) => {
|
2
|
+
const CommentSchema = new db.mongoose.Schema({
|
3
3
|
user: {
|
4
|
-
type: mongoose.Schema.Types.ObjectId,
|
4
|
+
type: db.mongoose.Schema.Types.ObjectId,
|
5
5
|
ref: 'User',
|
6
6
|
required: true,
|
7
7
|
},
|
@@ -12,7 +12,7 @@ module.exports = (mongoose) => {
|
|
12
12
|
required: true,
|
13
13
|
},
|
14
14
|
target: { // заменяем 'organization' на 'target', так как это может быть или User, или Organization
|
15
|
-
type: mongoose.Schema.Types.ObjectId,
|
15
|
+
type: db.mongoose.Schema.Types.ObjectId,
|
16
16
|
ref: function (value) {
|
17
17
|
if (this.type === 'blogpost') return 'Blogpost';
|
18
18
|
if (this.type === 'comment') return 'Comment';
|
@@ -22,12 +22,12 @@ module.exports = (mongoose) => {
|
|
22
22
|
required: true,
|
23
23
|
},
|
24
24
|
parent: {
|
25
|
-
type: mongoose.Schema.Types.ObjectId,
|
25
|
+
type: db.mongoose.Schema.Types.ObjectId,
|
26
26
|
ref: 'Comment',
|
27
27
|
default: null
|
28
28
|
},
|
29
29
|
children:[{
|
30
|
-
type: mongoose.Schema.Types.ObjectId,
|
30
|
+
type: db.mongoose.Schema.Types.ObjectId,
|
31
31
|
ref: "Comment"
|
32
32
|
}],
|
33
33
|
depth: {
|
@@ -45,7 +45,7 @@ module.exports = (mongoose) => {
|
|
45
45
|
|
46
46
|
CommentSchema.index({ target: 1, parent: 1, depth: 1 });
|
47
47
|
|
48
|
-
const Comment = mongoose.model("Comment", CommentSchema);
|
48
|
+
const Comment = db.mongoose.model("Comment", CommentSchema);
|
49
49
|
|
50
50
|
return Comment;
|
51
51
|
}
|