@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
@@ -6,7 +6,7 @@ const index = require("../../../../../../node_modules/@googlemaps/js-api-loader/
|
|
6
6
|
const Button = require("../../../../components/Button/Button.vue2.cjs");
|
7
7
|
const organizations = require("../../../organizations/store/organizations.cjs");
|
8
8
|
const globals = require("../../../globals/views/store/globals.cjs");
|
9
|
-
const marketplace = require("../../../
|
9
|
+
const marketplace = require("../../../products/store/marketplace.cjs");
|
10
10
|
;/* empty css */
|
11
11
|
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");
|
12
12
|
const _hoisted_1 = { class: "h-100 w-100 pos-relative" };
|
@@ -529,6 +529,6 @@ const _sfc_main = {
|
|
529
529
|
};
|
530
530
|
}
|
531
531
|
};
|
532
|
-
const Map = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
532
|
+
const Map = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-fd0cdc10"]]);
|
533
533
|
exports.default = Map;
|
534
534
|
//# sourceMappingURL=Map.vue.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Map.vue.cjs","sources":["../../../../../../../src/modules/spots/components/pages/Map.vue"],"sourcesContent":["<template>\n <div class=\"h-100 w-100 pos-relative\">\n <div class=\"w-100 pos-absolute z-index-2 pos-b-10 \">\n <Button \n :submit=\"searchInCurrentLocation\" \n class=\"mn-l-auto mn-r-auto bg-black t-white w-min-20 button\"\n >\n Search in This Location\n </Button>\n </div>\n\n <div id=\"map\" class=\"h-100 w-100 pos-relative o-hidden\">\n </div>\n </div>\n</template>\n\n<script setup>\nimport { onMounted, watch, ref } from 'vue';\nimport { useRoute, useRouter } from 'vue-router'\n\nimport { Loader as GMLoader } from \"@googlemaps/js-api-loader\";\n\nimport Button from '@pf/src/components/Button/Button.vue'\n\nimport { state, actions } from '@pf/src/modules/organizations/store/organizations'\n\nimport * as globals from '@pf/src/modules/globals/views/store/globals';\nimport * as marketplace from '@pf/src/modules/marketplace/store/marketplace';\n\nconst router = useRouter();\nconst route = useRoute();\n\nconst props = defineProps({\n localPosition: Object,\n location: {\n type: Object,\n default: () => ({ lat: 15.8700, lng: 100.9925 })\n },\n address: {\n type: String,\n default: null\n },\n apiKey: String,\n locale: {\n type: String,\n default: 'en'\n }\n})\n\nlet map = ref(null);\nlet markers = ref([]);\n\nlet skip = ref(0);\nlet limit = ref(50);\n\nlet currentMapCenter = ref({lat: 0, lng: 0});\nlet currentMapZoom = ref(null);\n\nasync function getCountry() {\n try {\n const response = await fetch('https://ip2c.org/s');\n const result = await response.text();\n\n if (!result || result[0] !== '1') {\n throw new Error('Unable to fetch the country');\n }\n\n // Разделение строки и извлечение кода страны\n const parts = result.split(';');\n if (parts.length < 4) {\n throw new Error('Invalid response format');\n }\n\n console.log(parts[3])\n\n return parts[3]; // Возвращает двухбуквенный код страны\n } catch (error) {\n console.error(error);\n throw error;\n }\n}\n\n\nonMounted(async () => {\n let lat = parseFloat(route.query.lat || globals.state.position?.location?.lat);\n let lng = parseFloat(route.query.lng || globals.state.position?.location?.lng);\n\n let zoomLevel;\n\n // Определите уровень зума в зависимости от доступной информации\n if (route.params.location || globals.state.position?.location) {\n zoomLevel = 15;\n } else if (route.params.country || globals.state.position?.country) {\n zoomLevel = 9;\n } else if (route.params.state || globals.state.position?.state) {\n zoomLevel = 6;\n } else if (route.params.city || globals.state.position?.city) {\n zoomLevel = 14;\n } else {\n zoomLevel = 2;\n }\n\n const loader = new GMLoader({\n apiKey: props.apiKey,\n version: \"weekly\",\n libraries: [\"places\"],\n language: 'en'\n });\n\n loader.load().then(async () => {\n\n // Если координаты не заданы, попробуйте их получить\n if (!lat || !lng) {\n let country\n\n const geocoder = new google.maps.Geocoder();\n\n try {\n country = await getCountry();\n } catch {\n country = 'Thailand' \n console.log(error)\n }\n\n try {\n const results = await geocoder.geocode({ 'address': country })\n\n console.log(results);\n\n if (results) {\n lat = results.results[0].geometry.location.lat();\n lng = results.results[0].geometry.location.lng();\n zoomLevel = 6;\n } else {\n console.error('No results found for the country code.');\n }\n } catch (error) {\n console.error('Error getting coordinates from country code:', error);\n }\n }\n \n // If there's no lat/lng in the query, try to use country/state/city to get the lat/lng\n if (!lat && !lng && (route.params.country || route.params.state || route.params.city)) {\n const geocoder = new google.maps.Geocoder();\n\n const address = [\n route.params.city,\n route.params.state,\n route.params.country\n ].filter(Boolean).join(', ');\n\n try {\n const results = await geocoder.geocode({ address });\n\n if (results[0]) {\n lat = results[0].geometry.location.lat();\n lng = results[0].geometry.location.lng();\n }\n\n } catch (error) {\n console.error('Error getting coordinates:', error);\n }\n }\n\n\n skip.value += limit.value;\n\n const params = {\n // country: route.params.country,\n // state: route.params.state,\n // city: route.params.city,\n // categories: route.query.categories,\n // prices: route.query.prices,\n // delivery: route.query.delivery,\n country: route.params.country,\n state: route.params.state,\n city: route.params.city,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n sortParam: route.query.sortParam || marketplace.state.sort.param,\n sortOrder: route.query.sortOrder || marketplace.state.sort.order,\n location: {coordinates: [lng,lat] },\n locationRadius: 1000,\n limit: 500,\n };\n\n console.log(params)\n\n const data = await actions.read(params);\n\n state.all = [...state.all, ...data];\n\n map.value = new google.maps.Map(document.getElementById('map'), {\n mapTypeControl: false,\n fullscreenControl: false,\n styles: [\n {\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#212121\"\n }\n ]\n },\n {\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#212121\"\n }\n ]\n },\n {\n \"featureType\": \"administrative\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n },\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.country\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#9e9e9e\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.land_parcel\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.locality\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#bdbdbd\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.neighborhood\",\n \"stylers\": [\n // {\n // \"visibility\": \"off\"\n // }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#181818\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#1b1b1b\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [\n {\n \"color\": \"#2c2c2c\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#8a8a8a\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#373737\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"labels\",\n \"stylers\": [\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#3c3c3c\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"labels\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway.controlled_access\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#4e4e4e\"\n }\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"stylers\": [\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#000000\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#3d3d3d\"\n }\n ]\n }\n ],\n center: { lat, lng },\n zoom: parseInt(route.query.zoom || zoomLevel || '12')\n });\n\n \n\n for (let marker of markers.value) {\n marker.setMap(null);\n }\n\n markers.value = [];\n\n // Add new markers\n markers.value = data.map(org => {\n // Get the first spot's location\n let location = org.spots[0]?.location;\n\n if (location && location.type === 'Point') {\n let [lng, lat] = location.coordinates; // Note that coordinates are in [lng, lat] format\n \n let markerIcon = '/marker_2.png'; // Default marker icon\n\n if (org.products && org.products.length === 0) {\n markerIcon = '/marker.png'; // If there are no products, set a different icon\n }\n \n const marker = new google.maps.Marker({\n position: { lng, lat },\n map: map.value,\n icon: {\n url: markerIcon, // URL to the icon\n scaledSize: new google.maps.Size(32, 48), // icon dimensions\n origin: new google.maps.Point(0,0), // coordinate origin for this icon\n anchor: new google.maps.Point(16, 48) // point on the icon that corresponds to the geographic location of the marker\n }\n });\n\n // Add click listener to the marker\n marker.addListener('click', () => {\n router.push({name: 'Organization', params: {_id: org._id}});\n });\n\n return marker;\n }\n return null;\n }).filter(marker => marker !== null); // Remove null markers\n\n google.maps.event.addListener(map.value, 'center_changed', () => {\n let center = map.value.getCenter();\n currentMapCenter.value = {\n lat: center.lat(),\n lng: center.lng()\n };\n });\n\n google.maps.event.addListener(map.value, 'zoom_changed', () => {\n currentMapZoom.value = map.value.getZoom();\n });\n\n })\n\n});\n\nconst searchInCurrentLocation = async () => {\n // Use currentMapCenter for the location\n const params = {\n country: route.params.country,\n state: route.params.state,\n city: route.params.city,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n sortParam: route.query.sortParam || marketplace.state.sort.param,\n sortOrder: route.query.sortOrder || marketplace.state.sort.order,\n locationRadius: 8000/currentMapZoom.value,\n limit: 100,\n location: {\n type: \"Point\",\n coordinates: [currentMapCenter.value.lng, currentMapCenter.value.lat]\n }\n };\n\n console.log([currentMapCenter.value.lng, currentMapCenter.value.lat])\n\n try {\n const data = await actions.read(params);\n // Remove old markers\n for (let marker of markers.value) {\n marker.setMap(null);\n }\n markers.value = [];\n\n // Add new markers\n markers.value = data.map(org => {\n let location = org.spots[0]?.location;\n if (location && location.type === 'Point') {\n let [lng, lat] = location.coordinates; // Note that coordinates are in [lng, lat] format\n let markerIcon = org.products && org.products.length > 0 ? '/marker_2.png' : '/marker.png';\n\n const marker = new google.maps.Marker({\n position: { lng, lat },\n map: map.value,\n icon: {\n url: markerIcon, // URL to the icon\n scaledSize: new google.maps.Size(32, 48), // icon dimensions\n origin: new google.maps.Point(0,0), // coordinate origin for this icon\n anchor: new google.maps.Point(16, 48) // point on the icon that corresponds to the geographic location of the marker\n }\n });\n\n // Add click listener to the marker\n marker.addListener('click', () => {\n router.push({ name: 'Organization', params: { _id: org._id } });\n });\n\n return marker;\n }\n return null;\n }).filter(marker => marker !== null); // Remove null markers\n } catch (error) {\n console.error('Error fetching organizations:', error);\n }\n};\n\n\n\n</script>\n\n<style scoped lang=\"scss\">\n #map {\n &:focus {\n outline: none;\n }\n }\n</style>\n"],"names":["useRouter","useRoute","ref","error","onMounted","globals.state","GMLoader","marketplace.state","actions","state","_a","lng","lat"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,UAAM,SAASA,UAAS,UAAA;AACxB,UAAM,QAAQC,UAAQ,SAAA;AAEtB,UAAM,QAAQ;AAiBd,QAAI,MAAMC,IAAAA,IAAI,IAAI;AAClB,QAAI,UAAUA,IAAAA,IAAI,CAAA,CAAE;AAEpB,QAAI,OAAOA,IAAAA,IAAI,CAAC;AAChB,QAAI,QAAQA,IAAAA,IAAI,EAAE;AAElB,QAAI,mBAAmBA,IAAG,IAAC,EAAC,KAAK,GAAG,KAAK,EAAC,CAAC;AAC3C,QAAI,iBAAiBA,IAAAA,IAAI,IAAI;AAE7B,mBAAe,aAAa;AAC1B,UAAI;AACF,cAAM,WAAW,MAAM,MAAM,oBAAoB;AACjD,cAAM,SAAS,MAAM,SAAS;AAE9B,YAAI,CAAC,UAAU,OAAO,CAAC,MAAM,KAAK;AAChC,gBAAM,IAAI,MAAM,6BAA6B;AAAA,QAC9C;AAGD,cAAM,QAAQ,OAAO,MAAM,GAAG;AAC9B,YAAI,MAAM,SAAS,GAAG;AACpB,gBAAM,IAAI,MAAM,yBAAyB;AAAA,QAC1C;AAED,gBAAQ,IAAI,MAAM,CAAC,CAAC;AAEpB,eAAO,MAAM,CAAC;AAAA,MACf,SAAQC,QAAO;AACd,gBAAQ,MAAMA,MAAK;AACnB,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kBAAM,SAAS,IAAI,OAAO,KAAK,OAAO;AAAA,cACpC,UAAU,EAAE,KAAK,IAAK;AAAA,cACtB,KAAK,IAAI;AAAA,cACT,MAAM;AAAA,gBACJ,KAAK;AAAA;AAAA,gBACL,YAAY,IAAI,OAAO,KAAK,KAAK,IAAI,EAAE;AAAA;AAAA,gBACvC,QAAQ,IAAI,OAAO,KAAK,MAAM,GAAE,CAAC;AAAA;AAAA,gBACjC,QAAQ,IAAI,OAAO,KAAK,MAAM,IAAI,EAAE;AAAA;AAAA,cACrC;AAAA,YACX,CAAS;AAGD,mBAAO,YAAY,SAAS,MAAM;AAChC,qBAAO,KAAK,EAAE,MAAM,gBAAgB,QAAQ,EAAE,KAAK,IAAI,IAAK,EAAA,CAAE;AAAA,YACxE,CAAS;AAED,mBAAO;AAAA,UACR;AACD,iBAAO;AAAA,QACR,CAAA,EAAE,OAAO,YAAU,WAAW,IAAI;AAAA,MACpC,SAAQL,QAAO;AACd,gBAAQ,MAAM,iCAAiCA,MAAK;AAAA,MACrD;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"Map.vue.cjs","sources":["../../../../../../../src/modules/spots/components/pages/Map.vue"],"sourcesContent":["<template>\n <div class=\"h-100 w-100 pos-relative\">\n <div class=\"w-100 pos-absolute z-index-2 pos-b-10 \">\n <Button \n :submit=\"searchInCurrentLocation\" \n class=\"mn-l-auto mn-r-auto bg-black t-white w-min-20 button\"\n >\n Search in This Location\n </Button>\n </div>\n\n <div id=\"map\" class=\"h-100 w-100 pos-relative o-hidden\">\n </div>\n </div>\n</template>\n\n<script setup>\nimport { onMounted, watch, ref } from 'vue';\nimport { useRoute, useRouter } from 'vue-router'\n\nimport { Loader as GMLoader } from \"@googlemaps/js-api-loader\";\n\nimport Button from '@pf/src/components/Button/Button.vue'\n\nimport { state, actions } from '@pf/src/modules/organizations/store/organizations'\n\nimport * as globals from '@pf/src/modules/globals/views/store/globals';\nimport * as marketplace from '@pf/src/modules/products/store/marketplace';\n\nconst router = useRouter();\nconst route = useRoute();\n\nconst props = defineProps({\n localPosition: Object,\n location: {\n type: Object,\n default: () => ({ lat: 15.8700, lng: 100.9925 })\n },\n address: {\n type: String,\n default: null\n },\n apiKey: String,\n locale: {\n type: String,\n default: 'en'\n }\n})\n\nlet map = ref(null);\nlet markers = ref([]);\n\nlet skip = ref(0);\nlet limit = ref(50);\n\nlet currentMapCenter = ref({lat: 0, lng: 0});\nlet currentMapZoom = ref(null);\n\nasync function getCountry() {\n try {\n const response = await fetch('https://ip2c.org/s');\n const result = await response.text();\n\n if (!result || result[0] !== '1') {\n throw new Error('Unable to fetch the country');\n }\n\n // Разделение строки и извлечение кода страны\n const parts = result.split(';');\n if (parts.length < 4) {\n throw new Error('Invalid response format');\n }\n\n console.log(parts[3])\n\n return parts[3]; // Возвращает двухбуквенный код страны\n } catch (error) {\n console.error(error);\n throw error;\n }\n}\n\n\nonMounted(async () => {\n let lat = parseFloat(route.query.lat || globals.state.position?.location?.lat);\n let lng = parseFloat(route.query.lng || globals.state.position?.location?.lng);\n\n let zoomLevel;\n\n // Определите уровень зума в зависимости от доступной информации\n if (route.params.location || globals.state.position?.location) {\n zoomLevel = 15;\n } else if (route.params.country || globals.state.position?.country) {\n zoomLevel = 9;\n } else if (route.params.state || globals.state.position?.state) {\n zoomLevel = 6;\n } else if (route.params.city || globals.state.position?.city) {\n zoomLevel = 14;\n } else {\n zoomLevel = 2;\n }\n\n const loader = new GMLoader({\n apiKey: props.apiKey,\n version: \"weekly\",\n libraries: [\"places\"],\n language: 'en'\n });\n\n loader.load().then(async () => {\n\n // Если координаты не заданы, попробуйте их получить\n if (!lat || !lng) {\n let country\n\n const geocoder = new google.maps.Geocoder();\n\n try {\n country = await getCountry();\n } catch {\n country = 'Thailand' \n console.log(error)\n }\n\n try {\n const results = await geocoder.geocode({ 'address': country })\n\n console.log(results);\n\n if (results) {\n lat = results.results[0].geometry.location.lat();\n lng = results.results[0].geometry.location.lng();\n zoomLevel = 6;\n } else {\n console.error('No results found for the country code.');\n }\n } catch (error) {\n console.error('Error getting coordinates from country code:', error);\n }\n }\n \n // If there's no lat/lng in the query, try to use country/state/city to get the lat/lng\n if (!lat && !lng && (route.params.country || route.params.state || route.params.city)) {\n const geocoder = new google.maps.Geocoder();\n\n const address = [\n route.params.city,\n route.params.state,\n route.params.country\n ].filter(Boolean).join(', ');\n\n try {\n const results = await geocoder.geocode({ address });\n\n if (results[0]) {\n lat = results[0].geometry.location.lat();\n lng = results[0].geometry.location.lng();\n }\n\n } catch (error) {\n console.error('Error getting coordinates:', error);\n }\n }\n\n\n skip.value += limit.value;\n\n const params = {\n // country: route.params.country,\n // state: route.params.state,\n // city: route.params.city,\n // categories: route.query.categories,\n // prices: route.query.prices,\n // delivery: route.query.delivery,\n country: route.params.country,\n state: route.params.state,\n city: route.params.city,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n sortParam: route.query.sortParam || marketplace.state.sort.param,\n sortOrder: route.query.sortOrder || marketplace.state.sort.order,\n location: {coordinates: [lng,lat] },\n locationRadius: 1000,\n limit: 500,\n };\n\n console.log(params)\n\n const data = await actions.read(params);\n\n state.all = [...state.all, ...data];\n\n map.value = new google.maps.Map(document.getElementById('map'), {\n mapTypeControl: false,\n fullscreenControl: false,\n styles: [\n {\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#212121\"\n }\n ]\n },\n {\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#212121\"\n }\n ]\n },\n {\n \"featureType\": \"administrative\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n },\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.country\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#9e9e9e\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.land_parcel\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.locality\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#bdbdbd\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.neighborhood\",\n \"stylers\": [\n // {\n // \"visibility\": \"off\"\n // }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#181818\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#1b1b1b\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [\n {\n \"color\": \"#2c2c2c\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#8a8a8a\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#373737\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"labels\",\n \"stylers\": [\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#3c3c3c\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"labels\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway.controlled_access\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#4e4e4e\"\n }\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"stylers\": [\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#000000\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#3d3d3d\"\n }\n ]\n }\n ],\n center: { lat, lng },\n zoom: parseInt(route.query.zoom || zoomLevel || '12')\n });\n\n \n\n for (let marker of markers.value) {\n marker.setMap(null);\n }\n\n markers.value = [];\n\n // Add new markers\n markers.value = data.map(org => {\n // Get the first spot's location\n let location = org.spots[0]?.location;\n\n if (location && location.type === 'Point') {\n let [lng, lat] = location.coordinates; // Note that coordinates are in [lng, lat] format\n \n let markerIcon = '/marker_2.png'; // Default marker icon\n\n if (org.products && org.products.length === 0) {\n markerIcon = '/marker.png'; // If there are no products, set a different icon\n }\n \n const marker = new google.maps.Marker({\n position: { lng, lat },\n map: map.value,\n icon: {\n url: markerIcon, // URL to the icon\n scaledSize: new google.maps.Size(32, 48), // icon dimensions\n origin: new google.maps.Point(0,0), // coordinate origin for this icon\n anchor: new google.maps.Point(16, 48) // point on the icon that corresponds to the geographic location of the marker\n }\n });\n\n // Add click listener to the marker\n marker.addListener('click', () => {\n router.push({name: 'Organization', params: {_id: org._id}});\n });\n\n return marker;\n }\n return null;\n }).filter(marker => marker !== null); // Remove null markers\n\n google.maps.event.addListener(map.value, 'center_changed', () => {\n let center = map.value.getCenter();\n currentMapCenter.value = {\n lat: center.lat(),\n lng: center.lng()\n };\n });\n\n google.maps.event.addListener(map.value, 'zoom_changed', () => {\n currentMapZoom.value = map.value.getZoom();\n });\n\n })\n\n});\n\nconst searchInCurrentLocation = async () => {\n // Use currentMapCenter for the location\n const params = {\n country: route.params.country,\n state: route.params.state,\n city: route.params.city,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n sortParam: route.query.sortParam || marketplace.state.sort.param,\n sortOrder: route.query.sortOrder || marketplace.state.sort.order,\n locationRadius: 8000/currentMapZoom.value,\n limit: 100,\n location: {\n type: \"Point\",\n coordinates: [currentMapCenter.value.lng, currentMapCenter.value.lat]\n }\n };\n\n console.log([currentMapCenter.value.lng, currentMapCenter.value.lat])\n\n try {\n const data = await actions.read(params);\n // Remove old markers\n for (let marker of markers.value) {\n marker.setMap(null);\n }\n markers.value = [];\n\n // Add new markers\n markers.value = data.map(org => {\n let location = org.spots[0]?.location;\n if (location && location.type === 'Point') {\n let [lng, lat] = location.coordinates; // Note that coordinates are in [lng, lat] format\n let markerIcon = org.products && org.products.length > 0 ? '/marker_2.png' : '/marker.png';\n\n const marker = new google.maps.Marker({\n position: { lng, lat },\n map: map.value,\n icon: {\n url: markerIcon, // URL to the icon\n scaledSize: new google.maps.Size(32, 48), // icon dimensions\n origin: new google.maps.Point(0,0), // coordinate origin for this icon\n anchor: new google.maps.Point(16, 48) // point on the icon that corresponds to the geographic location of the marker\n }\n });\n\n // Add click listener to the marker\n marker.addListener('click', () => {\n router.push({ name: 'Organization', params: { _id: org._id } });\n });\n\n return marker;\n }\n return null;\n }).filter(marker => marker !== null); // Remove null markers\n } catch (error) {\n console.error('Error fetching organizations:', error);\n }\n};\n\n\n\n</script>\n\n<style scoped lang=\"scss\">\n #map {\n &:focus {\n outline: none;\n }\n }\n</style>\n"],"names":["useRouter","useRoute","ref","error","onMounted","globals.state","GMLoader","marketplace.state","actions","state","_a","lng","lat"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,UAAM,SAASA,UAAS,UAAA;AACxB,UAAM,QAAQC,UAAQ,SAAA;AAEtB,UAAM,QAAQ;AAiBd,QAAI,MAAMC,IAAAA,IAAI,IAAI;AAClB,QAAI,UAAUA,IAAAA,IAAI,CAAA,CAAE;AAEpB,QAAI,OAAOA,IAAAA,IAAI,CAAC;AAChB,QAAI,QAAQA,IAAAA,IAAI,EAAE;AAElB,QAAI,mBAAmBA,IAAG,IAAC,EAAC,KAAK,GAAG,KAAK,EAAC,CAAC;AAC3C,QAAI,iBAAiBA,IAAAA,IAAI,IAAI;AAE7B,mBAAe,aAAa;AAC1B,UAAI;AACF,cAAM,WAAW,MAAM,MAAM,oBAAoB;AACjD,cAAM,SAAS,MAAM,SAAS;AAE9B,YAAI,CAAC,UAAU,OAAO,CAAC,MAAM,KAAK;AAChC,gBAAM,IAAI,MAAM,6BAA6B;AAAA,QAC9C;AAGD,cAAM,QAAQ,OAAO,MAAM,GAAG;AAC9B,YAAI,MAAM,SAAS,GAAG;AACpB,gBAAM,IAAI,MAAM,yBAAyB;AAAA,QAC1C;AAED,gBAAQ,IAAI,MAAM,CAAC,CAAC;AAEpB,eAAO,MAAM,CAAC;AAAA,MACf,SAAQC,QAAO;AACd,gBAAQ,MAAMA,MAAK;AACnB,cAAMA;AAAA,MACP;AAAA,IACH;AAGAC,QAAAA,UAAU,YAAY;;AACpB,UAAI,MAAM,WAA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,cACtB,KAAK,IAAI;AAAA,cACT,MAAM;AAAA,gBACJ,KAAK;AAAA;AAAA,gBACL,YAAY,IAAI,OAAO,KAAK,KAAK,IAAI,EAAE;AAAA;AAAA,gBACvC,QAAQ,IAAI,OAAO,KAAK,MAAM,GAAE,CAAC;AAAA;AAAA,gBACjC,QAAQ,IAAI,OAAO,KAAK,MAAM,IAAI,EAAE;AAAA;AAAA,cACrC;AAAA,YACX,CAAS;AAGD,mBAAO,YAAY,SAAS,MAAM;AAChC,qBAAO,KAAK,EAAE,MAAM,gBAAgB,QAAQ,EAAE,KAAK,IAAI,IAAK,EAAA,CAAE;AAAA,YACxE,CAAS;AAED,mBAAO;AAAA,UACR;AACD,iBAAO;AAAA,QACR,CAAA,EAAE,OAAO,YAAU,WAAW,IAAI;AAAA,MACpC,SAAQL,QAAO;AACd,gBAAQ,MAAM,iCAAiCA,MAAK;AAAA,MACrD;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -4,7 +4,7 @@ import { Loader } from "../../../../../../node_modules/@googlemaps/js-api-loader
|
|
4
4
|
import _sfc_main$1 from "../../../../components/Button/Button.vue2.js";
|
5
5
|
import { actions, state as state$2 } from "../../../organizations/store/organizations.js";
|
6
6
|
import { state } from "../../../globals/views/store/globals.js";
|
7
|
-
import { state as state$1 } from "../../../
|
7
|
+
import { state as state$1 } from "../../../products/store/marketplace.js";
|
8
8
|
/* empty css */
|
9
9
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
10
10
|
const _hoisted_1 = { class: "h-100 w-100 pos-relative" };
|
@@ -527,7 +527,7 @@ const _sfc_main = {
|
|
527
527
|
};
|
528
528
|
}
|
529
529
|
};
|
530
|
-
const Map = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
530
|
+
const Map = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-fd0cdc10"]]);
|
531
531
|
export {
|
532
532
|
Map as default
|
533
533
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Map.vue.js","sources":["../../../../../../../src/modules/spots/components/pages/Map.vue"],"sourcesContent":["<template>\n <div class=\"h-100 w-100 pos-relative\">\n <div class=\"w-100 pos-absolute z-index-2 pos-b-10 \">\n <Button \n :submit=\"searchInCurrentLocation\" \n class=\"mn-l-auto mn-r-auto bg-black t-white w-min-20 button\"\n >\n Search in This Location\n </Button>\n </div>\n\n <div id=\"map\" class=\"h-100 w-100 pos-relative o-hidden\">\n </div>\n </div>\n</template>\n\n<script setup>\nimport { onMounted, watch, ref } from 'vue';\nimport { useRoute, useRouter } from 'vue-router'\n\nimport { Loader as GMLoader } from \"@googlemaps/js-api-loader\";\n\nimport Button from '@pf/src/components/Button/Button.vue'\n\nimport { state, actions } from '@pf/src/modules/organizations/store/organizations'\n\nimport * as globals from '@pf/src/modules/globals/views/store/globals';\nimport * as marketplace from '@pf/src/modules/marketplace/store/marketplace';\n\nconst router = useRouter();\nconst route = useRoute();\n\nconst props = defineProps({\n localPosition: Object,\n location: {\n type: Object,\n default: () => ({ lat: 15.8700, lng: 100.9925 })\n },\n address: {\n type: String,\n default: null\n },\n apiKey: String,\n locale: {\n type: String,\n default: 'en'\n }\n})\n\nlet map = ref(null);\nlet markers = ref([]);\n\nlet skip = ref(0);\nlet limit = ref(50);\n\nlet currentMapCenter = ref({lat: 0, lng: 0});\nlet currentMapZoom = ref(null);\n\nasync function getCountry() {\n try {\n const response = await fetch('https://ip2c.org/s');\n const result = await response.text();\n\n if (!result || result[0] !== '1') {\n throw new Error('Unable to fetch the country');\n }\n\n // Разделение строки и извлечение кода страны\n const parts = result.split(';');\n if (parts.length < 4) {\n throw new Error('Invalid response format');\n }\n\n console.log(parts[3])\n\n return parts[3]; // Возвращает двухбуквенный код страны\n } catch (error) {\n console.error(error);\n throw error;\n }\n}\n\n\nonMounted(async () => {\n let lat = parseFloat(route.query.lat || globals.state.position?.location?.lat);\n let lng = parseFloat(route.query.lng || globals.state.position?.location?.lng);\n\n let zoomLevel;\n\n // Определите уровень зума в зависимости от доступной информации\n if (route.params.location || globals.state.position?.location) {\n zoomLevel = 15;\n } else if (route.params.country || globals.state.position?.country) {\n zoomLevel = 9;\n } else if (route.params.state || globals.state.position?.state) {\n zoomLevel = 6;\n } else if (route.params.city || globals.state.position?.city) {\n zoomLevel = 14;\n } else {\n zoomLevel = 2;\n }\n\n const loader = new GMLoader({\n apiKey: props.apiKey,\n version: \"weekly\",\n libraries: [\"places\"],\n language: 'en'\n });\n\n loader.load().then(async () => {\n\n // Если координаты не заданы, попробуйте их получить\n if (!lat || !lng) {\n let country\n\n const geocoder = new google.maps.Geocoder();\n\n try {\n country = await getCountry();\n } catch {\n country = 'Thailand' \n console.log(error)\n }\n\n try {\n const results = await geocoder.geocode({ 'address': country })\n\n console.log(results);\n\n if (results) {\n lat = results.results[0].geometry.location.lat();\n lng = results.results[0].geometry.location.lng();\n zoomLevel = 6;\n } else {\n console.error('No results found for the country code.');\n }\n } catch (error) {\n console.error('Error getting coordinates from country code:', error);\n }\n }\n \n // If there's no lat/lng in the query, try to use country/state/city to get the lat/lng\n if (!lat && !lng && (route.params.country || route.params.state || route.params.city)) {\n const geocoder = new google.maps.Geocoder();\n\n const address = [\n route.params.city,\n route.params.state,\n route.params.country\n ].filter(Boolean).join(', ');\n\n try {\n const results = await geocoder.geocode({ address });\n\n if (results[0]) {\n lat = results[0].geometry.location.lat();\n lng = results[0].geometry.location.lng();\n }\n\n } catch (error) {\n console.error('Error getting coordinates:', error);\n }\n }\n\n\n skip.value += limit.value;\n\n const params = {\n // country: route.params.country,\n // state: route.params.state,\n // city: route.params.city,\n // categories: route.query.categories,\n // prices: route.query.prices,\n // delivery: route.query.delivery,\n country: route.params.country,\n state: route.params.state,\n city: route.params.city,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n sortParam: route.query.sortParam || marketplace.state.sort.param,\n sortOrder: route.query.sortOrder || marketplace.state.sort.order,\n location: {coordinates: [lng,lat] },\n locationRadius: 1000,\n limit: 500,\n };\n\n console.log(params)\n\n const data = await actions.read(params);\n\n state.all = [...state.all, ...data];\n\n map.value = new google.maps.Map(document.getElementById('map'), {\n mapTypeControl: false,\n fullscreenControl: false,\n styles: [\n {\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#212121\"\n }\n ]\n },\n {\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#212121\"\n }\n ]\n },\n {\n \"featureType\": \"administrative\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n },\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.country\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#9e9e9e\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.land_parcel\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.locality\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#bdbdbd\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.neighborhood\",\n \"stylers\": [\n // {\n // \"visibility\": \"off\"\n // }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#181818\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#1b1b1b\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [\n {\n \"color\": \"#2c2c2c\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#8a8a8a\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#373737\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"labels\",\n \"stylers\": [\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#3c3c3c\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"labels\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway.controlled_access\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#4e4e4e\"\n }\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"stylers\": [\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#000000\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#3d3d3d\"\n }\n ]\n }\n ],\n center: { lat, lng },\n zoom: parseInt(route.query.zoom || zoomLevel || '12')\n });\n\n \n\n for (let marker of markers.value) {\n marker.setMap(null);\n }\n\n markers.value = [];\n\n // Add new markers\n markers.value = data.map(org => {\n // Get the first spot's location\n let location = org.spots[0]?.location;\n\n if (location && location.type === 'Point') {\n let [lng, lat] = location.coordinates; // Note that coordinates are in [lng, lat] format\n \n let markerIcon = '/marker_2.png'; // Default marker icon\n\n if (org.products && org.products.length === 0) {\n markerIcon = '/marker.png'; // If there are no products, set a different icon\n }\n \n const marker = new google.maps.Marker({\n position: { lng, lat },\n map: map.value,\n icon: {\n url: markerIcon, // URL to the icon\n scaledSize: new google.maps.Size(32, 48), // icon dimensions\n origin: new google.maps.Point(0,0), // coordinate origin for this icon\n anchor: new google.maps.Point(16, 48) // point on the icon that corresponds to the geographic location of the marker\n }\n });\n\n // Add click listener to the marker\n marker.addListener('click', () => {\n router.push({name: 'Organization', params: {_id: org._id}});\n });\n\n return marker;\n }\n return null;\n }).filter(marker => marker !== null); // Remove null markers\n\n google.maps.event.addListener(map.value, 'center_changed', () => {\n let center = map.value.getCenter();\n currentMapCenter.value = {\n lat: center.lat(),\n lng: center.lng()\n };\n });\n\n google.maps.event.addListener(map.value, 'zoom_changed', () => {\n currentMapZoom.value = map.value.getZoom();\n });\n\n })\n\n});\n\nconst searchInCurrentLocation = async () => {\n // Use currentMapCenter for the location\n const params = {\n country: route.params.country,\n state: route.params.state,\n city: route.params.city,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n sortParam: route.query.sortParam || marketplace.state.sort.param,\n sortOrder: route.query.sortOrder || marketplace.state.sort.order,\n locationRadius: 8000/currentMapZoom.value,\n limit: 100,\n location: {\n type: \"Point\",\n coordinates: [currentMapCenter.value.lng, currentMapCenter.value.lat]\n }\n };\n\n console.log([currentMapCenter.value.lng, currentMapCenter.value.lat])\n\n try {\n const data = await actions.read(params);\n // Remove old markers\n for (let marker of markers.value) {\n marker.setMap(null);\n }\n markers.value = [];\n\n // Add new markers\n markers.value = data.map(org => {\n let location = org.spots[0]?.location;\n if (location && location.type === 'Point') {\n let [lng, lat] = location.coordinates; // Note that coordinates are in [lng, lat] format\n let markerIcon = org.products && org.products.length > 0 ? '/marker_2.png' : '/marker.png';\n\n const marker = new google.maps.Marker({\n position: { lng, lat },\n map: map.value,\n icon: {\n url: markerIcon, // URL to the icon\n scaledSize: new google.maps.Size(32, 48), // icon dimensions\n origin: new google.maps.Point(0,0), // coordinate origin for this icon\n anchor: new google.maps.Point(16, 48) // point on the icon that corresponds to the geographic location of the marker\n }\n });\n\n // Add click listener to the marker\n marker.addListener('click', () => {\n router.push({ name: 'Organization', params: { _id: org._id } });\n });\n\n return marker;\n }\n return null;\n }).filter(marker => marker !== null); // Remove null markers\n } catch (error) {\n console.error('Error fetching organizations:', error);\n }\n};\n\n\n\n</script>\n\n<style scoped lang=\"scss\">\n #map {\n &:focus {\n outline: none;\n }\n }\n</style>\n"],"names":["error","globals.state","GMLoader","marketplace.state","state","_a","lng","lat"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,UAAM,SAAS,UAAS;AACxB,UAAM,QAAQ,SAAQ;AAEtB,UAAM,QAAQ;AAiBd,QAAI,MAAM,IAAI,IAAI;AAClB,QAAI,UAAU,IAAI,CAAA,CAAE;AAEpB,QAAI,OAAO,IAAI,CAAC;AAChB,QAAI,QAAQ,IAAI,EAAE;AAElB,QAAI,mBAAmB,IAAI,EAAC,KAAK,GAAG,KAAK,EAAC,CAAC;AAC3C,QAAI,iBAAiB,IAAI,IAAI;AAE7B,mBAAe,aAAa;AAC1B,U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AAChC,iBAAO,OAAO,IAAI;AAAA,QACnB;AACD,gBAAQ,QAAQ;AAGhB,gBAAQ,QAAQ,KAAK,IAAI,SAAO;;AAC9B,cAAI,YAAW,SAAI,MAAM,CAAC,MAAX,mBAAc;AAC7B,cAAI,YAAY,SAAS,SAAS,SAAS;AACzC,gBAAI,CAAC,KAAK,GAAG,IAAI,SAAS;AAC1B,gBAAI,aAAa,IAAI,YAAY,IAAI,SAAS,SAAS,IAAI,kBAAkB;AAE7E,kBAAM,SAAS,IAAI,OAAO,KAAK,OAAO;AAAA,cACpC,UAAU,EAAE,KAAK,IAAK;AAAA,cACtB,KAAK,IAAI;AAAA,cACT,MAAM;AAAA,gBACJ,KAAK;AAAA;AAAA,gBACL,YAAY,IAAI,OAAO,KAAK,KAAK,IAAI,EAAE;AAAA;AAAA,gBACvC,QAAQ,IAAI,OAAO,KAAK,MAAM,GAAE,CAAC;AAAA;AAAA,gBACjC,QAAQ,IAAI,OAAO,KAAK,MAAM,IAAI,EAAE;AAAA;AAAA,cACrC;AAAA,YACX,CAAS;AAGD,mBAAO,YAAY,SAAS,MAAM;AAChC,qBAAO,KAAK,EAAE,MAAM,gBAAgB,QAAQ,EAAE,KAAK,IAAI,IAAK,EAAA,CAAE;AAAA,YACxE,CAAS;AAED,mBAAO;AAAA,UACR;AACD,iBAAO;AAAA,QACR,CAAA,EAAE,OAAO,YAAU,WAAW,IAAI;AAAA,MACpC,SAAQH,QAAO;AACd,gBAAQ,MAAM,iCAAiCA,MAAK;AAAA,MACrD;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"Map.vue.js","sources":["../../../../../../../src/modules/spots/components/pages/Map.vue"],"sourcesContent":["<template>\n <div class=\"h-100 w-100 pos-relative\">\n <div class=\"w-100 pos-absolute z-index-2 pos-b-10 \">\n <Button \n :submit=\"searchInCurrentLocation\" \n class=\"mn-l-auto mn-r-auto bg-black t-white w-min-20 button\"\n >\n Search in This Location\n </Button>\n </div>\n\n <div id=\"map\" class=\"h-100 w-100 pos-relative o-hidden\">\n </div>\n </div>\n</template>\n\n<script setup>\nimport { onMounted, watch, ref } from 'vue';\nimport { useRoute, useRouter } from 'vue-router'\n\nimport { Loader as GMLoader } from \"@googlemaps/js-api-loader\";\n\nimport Button from '@pf/src/components/Button/Button.vue'\n\nimport { state, actions } from '@pf/src/modules/organizations/store/organizations'\n\nimport * as globals from '@pf/src/modules/globals/views/store/globals';\nimport * as marketplace from '@pf/src/modules/products/store/marketplace';\n\nconst router = useRouter();\nconst route = useRoute();\n\nconst props = defineProps({\n localPosition: Object,\n location: {\n type: Object,\n default: () => ({ lat: 15.8700, lng: 100.9925 })\n },\n address: {\n type: String,\n default: null\n },\n apiKey: String,\n locale: {\n type: String,\n default: 'en'\n }\n})\n\nlet map = ref(null);\nlet markers = ref([]);\n\nlet skip = ref(0);\nlet limit = ref(50);\n\nlet currentMapCenter = ref({lat: 0, lng: 0});\nlet currentMapZoom = ref(null);\n\nasync function getCountry() {\n try {\n const response = await fetch('https://ip2c.org/s');\n const result = await response.text();\n\n if (!result || result[0] !== '1') {\n throw new Error('Unable to fetch the country');\n }\n\n // Разделение строки и извлечение кода страны\n const parts = result.split(';');\n if (parts.length < 4) {\n throw new Error('Invalid response format');\n }\n\n console.log(parts[3])\n\n return parts[3]; // Возвращает двухбуквенный код страны\n } catch (error) {\n console.error(error);\n throw error;\n }\n}\n\n\nonMounted(async () => {\n let lat = parseFloat(route.query.lat || globals.state.position?.location?.lat);\n let lng = parseFloat(route.query.lng || globals.state.position?.location?.lng);\n\n let zoomLevel;\n\n // Определите уровень зума в зависимости от доступной информации\n if (route.params.location || globals.state.position?.location) {\n zoomLevel = 15;\n } else if (route.params.country || globals.state.position?.country) {\n zoomLevel = 9;\n } else if (route.params.state || globals.state.position?.state) {\n zoomLevel = 6;\n } else if (route.params.city || globals.state.position?.city) {\n zoomLevel = 14;\n } else {\n zoomLevel = 2;\n }\n\n const loader = new GMLoader({\n apiKey: props.apiKey,\n version: \"weekly\",\n libraries: [\"places\"],\n language: 'en'\n });\n\n loader.load().then(async () => {\n\n // Если координаты не заданы, попробуйте их получить\n if (!lat || !lng) {\n let country\n\n const geocoder = new google.maps.Geocoder();\n\n try {\n country = await getCountry();\n } catch {\n country = 'Thailand' \n console.log(error)\n }\n\n try {\n const results = await geocoder.geocode({ 'address': country })\n\n console.log(results);\n\n if (results) {\n lat = results.results[0].geometry.location.lat();\n lng = results.results[0].geometry.location.lng();\n zoomLevel = 6;\n } else {\n console.error('No results found for the country code.');\n }\n } catch (error) {\n console.error('Error getting coordinates from country code:', error);\n }\n }\n \n // If there's no lat/lng in the query, try to use country/state/city to get the lat/lng\n if (!lat && !lng && (route.params.country || route.params.state || route.params.city)) {\n const geocoder = new google.maps.Geocoder();\n\n const address = [\n route.params.city,\n route.params.state,\n route.params.country\n ].filter(Boolean).join(', ');\n\n try {\n const results = await geocoder.geocode({ address });\n\n if (results[0]) {\n lat = results[0].geometry.location.lat();\n lng = results[0].geometry.location.lng();\n }\n\n } catch (error) {\n console.error('Error getting coordinates:', error);\n }\n }\n\n\n skip.value += limit.value;\n\n const params = {\n // country: route.params.country,\n // state: route.params.state,\n // city: route.params.city,\n // categories: route.query.categories,\n // prices: route.query.prices,\n // delivery: route.query.delivery,\n country: route.params.country,\n state: route.params.state,\n city: route.params.city,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n sortParam: route.query.sortParam || marketplace.state.sort.param,\n sortOrder: route.query.sortOrder || marketplace.state.sort.order,\n location: {coordinates: [lng,lat] },\n locationRadius: 1000,\n limit: 500,\n };\n\n console.log(params)\n\n const data = await actions.read(params);\n\n state.all = [...state.all, ...data];\n\n map.value = new google.maps.Map(document.getElementById('map'), {\n mapTypeControl: false,\n fullscreenControl: false,\n styles: [\n {\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#212121\"\n }\n ]\n },\n {\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#212121\"\n }\n ]\n },\n {\n \"featureType\": \"administrative\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n },\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.country\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#9e9e9e\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.land_parcel\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.locality\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#bdbdbd\"\n }\n ]\n },\n {\n \"featureType\": \"administrative.neighborhood\",\n \"stylers\": [\n // {\n // \"visibility\": \"off\"\n // }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"poi\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#181818\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"poi.park\",\n \"elementType\": \"labels.text.stroke\",\n \"stylers\": [\n {\n \"color\": \"#1b1b1b\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"geometry.fill\",\n \"stylers\": [\n {\n \"color\": \"#2c2c2c\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels.icon\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#8a8a8a\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#373737\"\n }\n ]\n },\n {\n \"featureType\": \"road.arterial\",\n \"elementType\": \"labels\",\n \"stylers\": [\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#3c3c3c\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway\",\n \"elementType\": \"labels\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"road.highway.controlled_access\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#4e4e4e\"\n }\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"stylers\": [\n ]\n },\n {\n \"featureType\": \"road.local\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#616161\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"transit\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#757575\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"geometry\",\n \"stylers\": [\n {\n \"color\": \"#000000\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text\",\n \"stylers\": [\n {\n \"visibility\": \"off\"\n }\n ]\n },\n {\n \"featureType\": \"water\",\n \"elementType\": \"labels.text.fill\",\n \"stylers\": [\n {\n \"color\": \"#3d3d3d\"\n }\n ]\n }\n ],\n center: { lat, lng },\n zoom: parseInt(route.query.zoom || zoomLevel || '12')\n });\n\n \n\n for (let marker of markers.value) {\n marker.setMap(null);\n }\n\n markers.value = [];\n\n // Add new markers\n markers.value = data.map(org => {\n // Get the first spot's location\n let location = org.spots[0]?.location;\n\n if (location && location.type === 'Point') {\n let [lng, lat] = location.coordinates; // Note that coordinates are in [lng, lat] format\n \n let markerIcon = '/marker_2.png'; // Default marker icon\n\n if (org.products && org.products.length === 0) {\n markerIcon = '/marker.png'; // If there are no products, set a different icon\n }\n \n const marker = new google.maps.Marker({\n position: { lng, lat },\n map: map.value,\n icon: {\n url: markerIcon, // URL to the icon\n scaledSize: new google.maps.Size(32, 48), // icon dimensions\n origin: new google.maps.Point(0,0), // coordinate origin for this icon\n anchor: new google.maps.Point(16, 48) // point on the icon that corresponds to the geographic location of the marker\n }\n });\n\n // Add click listener to the marker\n marker.addListener('click', () => {\n router.push({name: 'Organization', params: {_id: org._id}});\n });\n\n return marker;\n }\n return null;\n }).filter(marker => marker !== null); // Remove null markers\n\n google.maps.event.addListener(map.value, 'center_changed', () => {\n let center = map.value.getCenter();\n currentMapCenter.value = {\n lat: center.lat(),\n lng: center.lng()\n };\n });\n\n google.maps.event.addListener(map.value, 'zoom_changed', () => {\n currentMapZoom.value = map.value.getZoom();\n });\n\n })\n\n});\n\nconst searchInCurrentLocation = async () => {\n // Use currentMapCenter for the location\n const params = {\n country: route.params.country,\n state: route.params.state,\n city: route.params.city,\n categories: route.query.categories,\n prices: route.query.prices,\n delivery: route.query.delivery,\n sortParam: route.query.sortParam || marketplace.state.sort.param,\n sortOrder: route.query.sortOrder || marketplace.state.sort.order,\n locationRadius: 8000/currentMapZoom.value,\n limit: 100,\n location: {\n type: \"Point\",\n coordinates: [currentMapCenter.value.lng, currentMapCenter.value.lat]\n }\n };\n\n console.log([currentMapCenter.value.lng, currentMapCenter.value.lat])\n\n try {\n const data = await actions.read(params);\n // Remove old markers\n for (let marker of markers.value) {\n marker.setMap(null);\n }\n markers.value = [];\n\n // Add new markers\n markers.value = data.map(org => {\n let location = org.spots[0]?.location;\n if (location && location.type === 'Point') {\n let [lng, lat] = location.coordinates; // Note that coordinates are in [lng, lat] format\n let markerIcon = org.products && org.products.length > 0 ? '/marker_2.png' : '/marker.png';\n\n const marker = new google.maps.Marker({\n position: { lng, lat },\n map: map.value,\n icon: {\n url: markerIcon, // URL to the icon\n scaledSize: new google.maps.Size(32, 48), // icon dimensions\n origin: new google.maps.Point(0,0), // coordinate origin for this icon\n anchor: new google.maps.Point(16, 48) // point on the icon that corresponds to the geographic location of the marker\n }\n });\n\n // Add click listener to the marker\n marker.addListener('click', () => {\n router.push({ name: 'Organization', params: { _id: org._id } });\n });\n\n return marker;\n }\n return null;\n }).filter(marker => marker !== null); // Remove null markers\n } catch (error) {\n console.error('Error fetching organizations:', error);\n }\n};\n\n\n\n</script>\n\n<style scoped lang=\"scss\">\n #map {\n &:focus {\n outline: none;\n }\n }\n</style>\n"],"names":["error","globals.state","GMLoader","marketplace.state","state","_a","lng","lat"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,UAAM,SAAS,UAAS;AACxB,UAAM,QAAQ,SAAQ;AAEtB,UAAM,QAAQ;AAiBd,QAAI,MAAM,IAAI,IAAI;AAClB,QAAI,UAAU,IAAI,CAAA,CAAE;AAEpB,QAAI,OAAO,IAAI,CAAC;AAChB,QAAI,QAAQ,IAAI,EAAE;AAElB,QAAI,mBAAmB,IAAI,EAAC,KAAK,GAAG,KAAK,EAAC,CAAC;AAC3C,QAAI,iBAAiB,IAAI,IAAI;AAE7B,mBAAe,aAAa;AAC1B,UAAI;AACF,cAAM,WAAW,MAAM,MAAM,oBAAoB;AACjD,cAAM,SAAS,MAAM,SAAS;AAE9B,YAAI,CAAC,UAAU,OAAO,CAAC,MAAM,KAAK;AAChC,gBAAM,IAAI,MAAM,6BAA6B;AAAA,QAC9C;AAGD,cAAM,QAAQ,OAAO,MAAM,GAAG;AAC9B,YAAI,MAAM,SAAS,GAAG;AACpB,gBAAM,IAAI,MAAM,yBAAyB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SAAS,SAAS,IAAI,kBAAkB;AAE7E,kBAAM,SAAS,IAAI,OAAO,KAAK,OAAO;AAAA,cACpC,UAAU,EAAE,KAAK,IAAK;AAAA,cACtB,KAAK,IAAI;AAAA,cACT,MAAM;AAAA,gBACJ,KAAK;AAAA;AAAA,gBACL,YAAY,IAAI,OAAO,KAAK,KAAK,IAAI,EAAE;AAAA;AAAA,gBACvC,QAAQ,IAAI,OAAO,KAAK,MAAM,GAAE,CAAC;AAAA;AAAA,gBACjC,QAAQ,IAAI,OAAO,KAAK,MAAM,IAAI,EAAE;AAAA;AAAA,cACrC;AAAA,YACX,CAAS;AAGD,mBAAO,YAAY,SAAS,MAAM;AAChC,qBAAO,KAAK,EAAE,MAAM,gBAAgB,QAAQ,EAAE,KAAK,IAAI,IAAK,EAAA,CAAE;AAAA,YACxE,CAAS;AAED,mBAAO;AAAA,UACR;AACD,iBAAO;AAAA,QACR,CAAA,EAAE,OAAO,YAAU,WAAW,IAAI;AAAA,MACpC,SAAQH,QAAO;AACd,gBAAQ,MAAM,iCAAiCA,MAAK;AAAA,MACrD;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -4,7 +4,7 @@ const vue = require("vue");
|
|
4
4
|
const Spoiler = require("../../../../components/Spoiler/Spoiler.vue2.cjs");
|
5
5
|
const Map = require("../../../../components/Map/Map.vue.cjs");
|
6
6
|
const SpotSub = require("../blocks/SpotSub.vue.cjs");
|
7
|
-
const CardUser = require("../../../
|
7
|
+
const CardUser = require("../../../auth/views/components/blocks/CardUser.vue.cjs");
|
8
8
|
;/* empty css */
|
9
9
|
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");
|
10
10
|
const _hoisted_1 = { class: "radius-big o-hidden cols-2-1_3" };
|
@@ -134,6 +134,6 @@ const _sfc_main = {
|
|
134
134
|
};
|
135
135
|
}
|
136
136
|
};
|
137
|
-
const Spot = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
137
|
+
const Spot = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-83b42a48"]]);
|
138
138
|
exports.default = Spot;
|
139
139
|
//# sourceMappingURL=Spot.vue.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Spot.vue.cjs","sources":["../../../../../../../src/modules/spots/components/pages/Spot.vue"],"sourcesContent":["<template>\n <div class=\"radius-big o-hidden cols-2-1_3\">\n <Map :location=\"{lat: spot.location.coordinates[1] ,lng: spot.location.coordinates[0]}\" class=\"\"/>\n\n <div class=\"pd-medium w-100\">\n <svg @click=\"$router.push(`/app/organization/${props.organization._id}/spots/${spot._id}/edit`)\" class=\"i-regular pos-absolute pos-r-0 pos-t-0 t-transp\" width=\"652\" height=\"652\" viewBox=\"0 0 652 652\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z\" fill=\"rgb(var(--black))\"/>\n </svg>\n \n <h3 \n @click=\"$router.push(`/app/organization/${props.organization._id}/spots/${spot._id}`)\"\n class=\"mn-b-small w-100\"\n v-html=\"spot.profile.name\"\n />\n\n <p \n @click=\"$router.push(`/app/organization/${props.organization._id}/spots/${spot._id}`)\"\n class=\"mn-b-small p-big w-100\"\n v-html=\"spot.address\"\n />\n\n \n \n <Spoiler \n class=\"\n radius-small \n o-hidden\n br-1px br-solid br-grey-transp-25 \n mn-b-thin\n \"\n >\n <template #header>\n <div class=\"pd-small flex-v-center flex-nowrap flex\">\n <h5 class=\"w-100\" >Contacts </h5>\n <p class=\"mn-r-small\">{{spot.members.length}} человек</p>\n <svg width=\"14\" height=\"9\" viewBox=\"0 0 14 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z\" fill=\"#8A8A8A\"/>\n </svg>\n\n </div>\n </template>\n <template #content>\n <ul>\n <li v-if=\"spot.members.length < 1\">В отделе еще нет участников</li>\n <User \n class=\"br-b br-solid br-grey-transp-25\" \n v-for=\"(member, index) in spot.members\" \n :key=\"index\" \n :user=\"member.user\" \n :position=\"member.position\" \n @click=\"$router.push(`/app/profile/${member.user._id}`)\" \n />\n </ul>\n </template>\n </Spoiler>\n\n <Spoiler \n class=\"\n radius-small \n o-hidden\n br-1px br-solid br-grey-transp-25 \n mn-b-thin\n \"\n >\n <template #header>\n <div class=\"pd-small flex-v-center flex-nowrap flex\">\n <h5 class=\"w-100\" >Working Hours </h5>\n <p class=\"mn-r-small\">{{spot.subspots ? spot.subspots.length : 0}} отделов</p>\n <svg width=\"14\" height=\"9\" viewBox=\"0 0 14 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z\" fill=\"#8A8A8A\"/>\n </svg>\n\n </div>\n </template>\n <template #content>\n <ul>\n <li v-if=\"spot.subspots.length < 1\">В отделе еще нет подотделов</li>\n <SpotSub v-for=\"(subspotsartment, index) in spot.subspots\" @click=\"$router.push(`/app/organization/spots/${subspotsartment._id}`)\" :key=\"index\" class=\"br-b br-solid br-grey-transp-25\" :spot=\"subspotsartment\" />\n </ul>\n </template>\n </Spoiler>\n\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref } from 'vue';\n\nimport Spoiler from '@pf/src/components/Spoiler/Spoiler.vue';\nimport Map from '@pf/src/components/Map/Map.vue';\n\n\nimport SpotSub from '@pf/src/modules/spots/components/blocks/SpotSub.vue';\nimport User from '@pf/src/modules/
|
1
|
+
{"version":3,"file":"Spot.vue.cjs","sources":["../../../../../../../src/modules/spots/components/pages/Spot.vue"],"sourcesContent":["<template>\n <div class=\"radius-big o-hidden cols-2-1_3\">\n <Map :location=\"{lat: spot.location.coordinates[1] ,lng: spot.location.coordinates[0]}\" class=\"\"/>\n\n <div class=\"pd-medium w-100\">\n <svg @click=\"$router.push(`/app/organization/${props.organization._id}/spots/${spot._id}/edit`)\" class=\"i-regular pos-absolute pos-r-0 pos-t-0 t-transp\" width=\"652\" height=\"652\" viewBox=\"0 0 652 652\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z\" fill=\"rgb(var(--black))\"/>\n </svg>\n \n <h3 \n @click=\"$router.push(`/app/organization/${props.organization._id}/spots/${spot._id}`)\"\n class=\"mn-b-small w-100\"\n v-html=\"spot.profile.name\"\n />\n\n <p \n @click=\"$router.push(`/app/organization/${props.organization._id}/spots/${spot._id}`)\"\n class=\"mn-b-small p-big w-100\"\n v-html=\"spot.address\"\n />\n\n \n \n <Spoiler \n class=\"\n radius-small \n o-hidden\n br-1px br-solid br-grey-transp-25 \n mn-b-thin\n \"\n >\n <template #header>\n <div class=\"pd-small flex-v-center flex-nowrap flex\">\n <h5 class=\"w-100\" >Contacts </h5>\n <p class=\"mn-r-small\">{{spot.members.length}} человек</p>\n <svg width=\"14\" height=\"9\" viewBox=\"0 0 14 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z\" fill=\"#8A8A8A\"/>\n </svg>\n\n </div>\n </template>\n <template #content>\n <ul>\n <li v-if=\"spot.members.length < 1\">В отделе еще нет участников</li>\n <User \n class=\"br-b br-solid br-grey-transp-25\" \n v-for=\"(member, index) in spot.members\" \n :key=\"index\" \n :user=\"member.user\" \n :position=\"member.position\" \n @click=\"$router.push(`/app/profile/${member.user._id}`)\" \n />\n </ul>\n </template>\n </Spoiler>\n\n <Spoiler \n class=\"\n radius-small \n o-hidden\n br-1px br-solid br-grey-transp-25 \n mn-b-thin\n \"\n >\n <template #header>\n <div class=\"pd-small flex-v-center flex-nowrap flex\">\n <h5 class=\"w-100\" >Working Hours </h5>\n <p class=\"mn-r-small\">{{spot.subspots ? spot.subspots.length : 0}} отделов</p>\n <svg width=\"14\" height=\"9\" viewBox=\"0 0 14 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z\" fill=\"#8A8A8A\"/>\n </svg>\n\n </div>\n </template>\n <template #content>\n <ul>\n <li v-if=\"spot.subspots.length < 1\">В отделе еще нет подотделов</li>\n <SpotSub v-for=\"(subspotsartment, index) in spot.subspots\" @click=\"$router.push(`/app/organization/spots/${subspotsartment._id}`)\" :key=\"index\" class=\"br-b br-solid br-grey-transp-25\" :spot=\"subspotsartment\" />\n </ul>\n </template>\n </Spoiler>\n\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref } from 'vue';\n\nimport Spoiler from '@pf/src/components/Spoiler/Spoiler.vue';\nimport Map from '@pf/src/components/Map/Map.vue';\n\n\nimport SpotSub from '@pf/src/modules/spots/components/blocks/SpotSub.vue';\nimport User from '@pf/src/modules/auth/views/components/blocks/CardUser.vue';\n\nconst props = defineProps({\n spot: Object,\n organization: Object\n});\n</script>\n<style scoped>\n.subspotsartment {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin-top: 1rem;\n}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAgGA,UAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -2,7 +2,7 @@ import { openBlock, createElementBlock, createVNode, createElementVNode, withCtx
|
|
2
2
|
import _sfc_main$1 from "../../../../components/Spoiler/Spoiler.vue2.js";
|
3
3
|
import Map from "../../../../components/Map/Map.vue.js";
|
4
4
|
import SpotSub from "../blocks/SpotSub.vue.js";
|
5
|
-
import _sfc_main$2 from "../../../
|
5
|
+
import _sfc_main$2 from "../../../auth/views/components/blocks/CardUser.vue.js";
|
6
6
|
/* empty css */
|
7
7
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
8
8
|
const _hoisted_1 = { class: "radius-big o-hidden cols-2-1_3" };
|
@@ -132,7 +132,7 @@ const _sfc_main = {
|
|
132
132
|
};
|
133
133
|
}
|
134
134
|
};
|
135
|
-
const Spot = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
135
|
+
const Spot = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-83b42a48"]]);
|
136
136
|
export {
|
137
137
|
Spot as default
|
138
138
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Spot.vue.js","sources":["../../../../../../../src/modules/spots/components/pages/Spot.vue"],"sourcesContent":["<template>\n <div class=\"radius-big o-hidden cols-2-1_3\">\n <Map :location=\"{lat: spot.location.coordinates[1] ,lng: spot.location.coordinates[0]}\" class=\"\"/>\n\n <div class=\"pd-medium w-100\">\n <svg @click=\"$router.push(`/app/organization/${props.organization._id}/spots/${spot._id}/edit`)\" class=\"i-regular pos-absolute pos-r-0 pos-t-0 t-transp\" width=\"652\" height=\"652\" viewBox=\"0 0 652 652\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z\" fill=\"rgb(var(--black))\"/>\n </svg>\n \n <h3 \n @click=\"$router.push(`/app/organization/${props.organization._id}/spots/${spot._id}`)\"\n class=\"mn-b-small w-100\"\n v-html=\"spot.profile.name\"\n />\n\n <p \n @click=\"$router.push(`/app/organization/${props.organization._id}/spots/${spot._id}`)\"\n class=\"mn-b-small p-big w-100\"\n v-html=\"spot.address\"\n />\n\n \n \n <Spoiler \n class=\"\n radius-small \n o-hidden\n br-1px br-solid br-grey-transp-25 \n mn-b-thin\n \"\n >\n <template #header>\n <div class=\"pd-small flex-v-center flex-nowrap flex\">\n <h5 class=\"w-100\" >Contacts </h5>\n <p class=\"mn-r-small\">{{spot.members.length}} человек</p>\n <svg width=\"14\" height=\"9\" viewBox=\"0 0 14 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z\" fill=\"#8A8A8A\"/>\n </svg>\n\n </div>\n </template>\n <template #content>\n <ul>\n <li v-if=\"spot.members.length < 1\">В отделе еще нет участников</li>\n <User \n class=\"br-b br-solid br-grey-transp-25\" \n v-for=\"(member, index) in spot.members\" \n :key=\"index\" \n :user=\"member.user\" \n :position=\"member.position\" \n @click=\"$router.push(`/app/profile/${member.user._id}`)\" \n />\n </ul>\n </template>\n </Spoiler>\n\n <Spoiler \n class=\"\n radius-small \n o-hidden\n br-1px br-solid br-grey-transp-25 \n mn-b-thin\n \"\n >\n <template #header>\n <div class=\"pd-small flex-v-center flex-nowrap flex\">\n <h5 class=\"w-100\" >Working Hours </h5>\n <p class=\"mn-r-small\">{{spot.subspots ? spot.subspots.length : 0}} отделов</p>\n <svg width=\"14\" height=\"9\" viewBox=\"0 0 14 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z\" fill=\"#8A8A8A\"/>\n </svg>\n\n </div>\n </template>\n <template #content>\n <ul>\n <li v-if=\"spot.subspots.length < 1\">В отделе еще нет подотделов</li>\n <SpotSub v-for=\"(subspotsartment, index) in spot.subspots\" @click=\"$router.push(`/app/organization/spots/${subspotsartment._id}`)\" :key=\"index\" class=\"br-b br-solid br-grey-transp-25\" :spot=\"subspotsartment\" />\n </ul>\n </template>\n </Spoiler>\n\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref } from 'vue';\n\nimport Spoiler from '@pf/src/components/Spoiler/Spoiler.vue';\nimport Map from '@pf/src/components/Map/Map.vue';\n\n\nimport SpotSub from '@pf/src/modules/spots/components/blocks/SpotSub.vue';\nimport User from '@pf/src/modules/
|
1
|
+
{"version":3,"file":"Spot.vue.js","sources":["../../../../../../../src/modules/spots/components/pages/Spot.vue"],"sourcesContent":["<template>\n <div class=\"radius-big o-hidden cols-2-1_3\">\n <Map :location=\"{lat: spot.location.coordinates[1] ,lng: spot.location.coordinates[0]}\" class=\"\"/>\n\n <div class=\"pd-medium w-100\">\n <svg @click=\"$router.push(`/app/organization/${props.organization._id}/spots/${spot._id}/edit`)\" class=\"i-regular pos-absolute pos-r-0 pos-t-0 t-transp\" width=\"652\" height=\"652\" viewBox=\"0 0 652 652\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z\" fill=\"rgb(var(--black))\"/>\n </svg>\n \n <h3 \n @click=\"$router.push(`/app/organization/${props.organization._id}/spots/${spot._id}`)\"\n class=\"mn-b-small w-100\"\n v-html=\"spot.profile.name\"\n />\n\n <p \n @click=\"$router.push(`/app/organization/${props.organization._id}/spots/${spot._id}`)\"\n class=\"mn-b-small p-big w-100\"\n v-html=\"spot.address\"\n />\n\n \n \n <Spoiler \n class=\"\n radius-small \n o-hidden\n br-1px br-solid br-grey-transp-25 \n mn-b-thin\n \"\n >\n <template #header>\n <div class=\"pd-small flex-v-center flex-nowrap flex\">\n <h5 class=\"w-100\" >Contacts </h5>\n <p class=\"mn-r-small\">{{spot.members.length}} человек</p>\n <svg width=\"14\" height=\"9\" viewBox=\"0 0 14 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z\" fill=\"#8A8A8A\"/>\n </svg>\n\n </div>\n </template>\n <template #content>\n <ul>\n <li v-if=\"spot.members.length < 1\">В отделе еще нет участников</li>\n <User \n class=\"br-b br-solid br-grey-transp-25\" \n v-for=\"(member, index) in spot.members\" \n :key=\"index\" \n :user=\"member.user\" \n :position=\"member.position\" \n @click=\"$router.push(`/app/profile/${member.user._id}`)\" \n />\n </ul>\n </template>\n </Spoiler>\n\n <Spoiler \n class=\"\n radius-small \n o-hidden\n br-1px br-solid br-grey-transp-25 \n mn-b-thin\n \"\n >\n <template #header>\n <div class=\"pd-small flex-v-center flex-nowrap flex\">\n <h5 class=\"w-100\" >Working Hours </h5>\n <p class=\"mn-r-small\">{{spot.subspots ? spot.subspots.length : 0}} отделов</p>\n <svg width=\"14\" height=\"9\" viewBox=\"0 0 14 9\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M12.4697 0.469727L13.5304 1.53039L7.00006 8.06072L0.469727 1.53039L1.53039 0.469727L7.00006 5.9394L12.4697 0.469727Z\" fill=\"#8A8A8A\"/>\n </svg>\n\n </div>\n </template>\n <template #content>\n <ul>\n <li v-if=\"spot.subspots.length < 1\">В отделе еще нет подотделов</li>\n <SpotSub v-for=\"(subspotsartment, index) in spot.subspots\" @click=\"$router.push(`/app/organization/spots/${subspotsartment._id}`)\" :key=\"index\" class=\"br-b br-solid br-grey-transp-25\" :spot=\"subspotsartment\" />\n </ul>\n </template>\n </Spoiler>\n\n </div>\n </div>\n</template>\n\n<script setup>\nimport { ref } from 'vue';\n\nimport Spoiler from '@pf/src/components/Spoiler/Spoiler.vue';\nimport Map from '@pf/src/components/Map/Map.vue';\n\n\nimport SpotSub from '@pf/src/modules/spots/components/blocks/SpotSub.vue';\nimport User from '@pf/src/modules/auth/views/components/blocks/CardUser.vue';\n\nconst props = defineProps({\n spot: Object,\n organization: Object\n});\n</script>\n<style scoped>\n.subspotsartment {\n border: 1px solid rgba(0, 0, 0, 0.1);\n margin-top: 1rem;\n}\n</style>"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAgGA,UAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/reports.server.js
CHANGED
@@ -75,8 +75,8 @@ var reports_routes = function(app, db, origins) {
|
|
75
75
|
controller.delete
|
76
76
|
);
|
77
77
|
};
|
78
|
-
var report_model = (
|
79
|
-
const ReportSchema = new mongoose.Schema({
|
78
|
+
var report_model = (db) => {
|
79
|
+
const ReportSchema = new db.mongoose.Schema({
|
80
80
|
status: {
|
81
81
|
type: String,
|
82
82
|
enum: [
|
@@ -119,7 +119,7 @@ var report_model = (mongoose) => {
|
|
119
119
|
},
|
120
120
|
target: {
|
121
121
|
// заменяем 'organization' на 'target', так как это может быть или User, или Organization
|
122
|
-
type: mongoose.Schema.Types.ObjectId,
|
122
|
+
type: db.mongoose.Schema.Types.ObjectId,
|
123
123
|
ref: function(value) {
|
124
124
|
if (this.type === "user") return "User";
|
125
125
|
if (this.type === "organization") return "Organization";
|
@@ -129,16 +129,29 @@ var report_model = (mongoose) => {
|
|
129
129
|
}, {
|
130
130
|
timestamps: { currentTime: () => Date.now() }
|
131
131
|
});
|
132
|
-
const Report = mongoose.model("Report", ReportSchema);
|
132
|
+
const Report = db.mongoose.model("Report", ReportSchema);
|
133
133
|
return Report;
|
134
134
|
};
|
135
|
-
const
|
135
|
+
const ReportsController = reports_controller;
|
136
136
|
const reportsRoutes = reports_routes;
|
137
137
|
const ReportModel = report_model;
|
138
|
+
function initializeReports(app, db, origins, publicPath) {
|
139
|
+
db.report = ReportModel(db);
|
140
|
+
if (app) {
|
141
|
+
reportsRoutes(app, db);
|
142
|
+
}
|
143
|
+
}
|
138
144
|
var reports_server = {
|
139
|
-
|
140
|
-
|
141
|
-
|
145
|
+
initialize: initializeReports,
|
146
|
+
models: {
|
147
|
+
ReportModel
|
148
|
+
},
|
149
|
+
routes: {
|
150
|
+
reportsRoutes
|
151
|
+
},
|
152
|
+
controllers: {
|
153
|
+
ReportsController
|
154
|
+
}
|
142
155
|
};
|
143
156
|
const reports_server$1 = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(reports_server);
|
144
157
|
module.exports = reports_server$1;
|
package/dist/reports.server.mjs
CHANGED
@@ -74,8 +74,8 @@ var reports_routes = function(app, db, origins) {
|
|
74
74
|
controller.delete
|
75
75
|
);
|
76
76
|
};
|
77
|
-
var report_model = (
|
78
|
-
const ReportSchema = new mongoose.Schema({
|
77
|
+
var report_model = (db) => {
|
78
|
+
const ReportSchema = new db.mongoose.Schema({
|
79
79
|
status: {
|
80
80
|
type: String,
|
81
81
|
enum: [
|
@@ -118,7 +118,7 @@ var report_model = (mongoose) => {
|
|
118
118
|
},
|
119
119
|
target: {
|
120
120
|
// заменяем 'organization' на 'target', так как это может быть или User, или Organization
|
121
|
-
type: mongoose.Schema.Types.ObjectId,
|
121
|
+
type: db.mongoose.Schema.Types.ObjectId,
|
122
122
|
ref: function(value) {
|
123
123
|
if (this.type === "user") return "User";
|
124
124
|
if (this.type === "organization") return "Organization";
|
@@ -128,16 +128,29 @@ var report_model = (mongoose) => {
|
|
128
128
|
}, {
|
129
129
|
timestamps: { currentTime: () => Date.now() }
|
130
130
|
});
|
131
|
-
const Report = mongoose.model("Report", ReportSchema);
|
131
|
+
const Report = db.mongoose.model("Report", ReportSchema);
|
132
132
|
return Report;
|
133
133
|
};
|
134
|
-
const
|
134
|
+
const ReportsController = reports_controller;
|
135
135
|
const reportsRoutes = reports_routes;
|
136
136
|
const ReportModel = report_model;
|
137
|
+
function initializeReports(app, db, origins, publicPath) {
|
138
|
+
db.report = ReportModel(db);
|
139
|
+
if (app) {
|
140
|
+
reportsRoutes(app, db);
|
141
|
+
}
|
142
|
+
}
|
137
143
|
var reports_server = {
|
138
|
-
|
139
|
-
|
140
|
-
|
144
|
+
initialize: initializeReports,
|
145
|
+
models: {
|
146
|
+
ReportModel
|
147
|
+
},
|
148
|
+
routes: {
|
149
|
+
reportsRoutes
|
150
|
+
},
|
151
|
+
controllers: {
|
152
|
+
ReportsController
|
153
|
+
}
|
141
154
|
};
|
142
155
|
const reports_server$1 = /* @__PURE__ */ getDefaultExportFromCjs(reports_server);
|
143
156
|
export {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ozdao/prometheus-framework",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.254",
|
4
4
|
"description": "Web3 Framework focused on user experience and ease of development.",
|
5
5
|
"author": "OZ DAO <hello@ozdao.dev>",
|
6
6
|
"license": "GPL-3.0-or-later",
|
@@ -124,6 +124,14 @@
|
|
124
124
|
"import": "./dist/files.server.mjs",
|
125
125
|
"require": "./dist/files.server.js"
|
126
126
|
},
|
127
|
+
"./modules/chats/client": {
|
128
|
+
"import": "./dist/prometheus-framework/src/modules/chats/chats.client.js",
|
129
|
+
"require": "./dist/prometheus-framework/src/modules/chats/chats.client.cjs"
|
130
|
+
},
|
131
|
+
"./modules/chats/server": {
|
132
|
+
"import": "./dist/chats.server.mjs",
|
133
|
+
"require": "./dist/chats.server.js"
|
134
|
+
},
|
127
135
|
"./modules/landing/client": {
|
128
136
|
"import": "./dist/prometheus-framework/src/modules/landing/landing.client.js",
|
129
137
|
"require": "./dist/prometheus-framework/src/modules/landing/landing.client.cjs"
|
@@ -19,8 +19,8 @@ module.exports = (projectRoot) => {
|
|
19
19
|
devtool: !isProd ? "inline-source-map" : "source-map",
|
20
20
|
entry: {
|
21
21
|
main: !isProd
|
22
|
-
? [path.resolve("../utils/hot-reload.js"), path.resolve(projectRoot, "src/
|
23
|
-
: path.resolve(projectRoot, "src/
|
22
|
+
? [path.resolve("../utils/hot-reload.js"), path.resolve(projectRoot, "src/client.js")]
|
23
|
+
: path.resolve(projectRoot, "src/client.js"),
|
24
24
|
},
|
25
25
|
module: {
|
26
26
|
rules: [],
|
@@ -20,7 +20,7 @@ module.exports = (projectRoot) => {
|
|
20
20
|
mode: !isProd ? "development" : "production",
|
21
21
|
devtool: "source-map",
|
22
22
|
entry: {
|
23
|
-
main: path.resolve(projectRoot, "src/
|
23
|
+
main: path.resolve(projectRoot, "src/client.js"),
|
24
24
|
},
|
25
25
|
output: {
|
26
26
|
filename: "main.js",
|
@@ -13,7 +13,7 @@ module.exports = (projectRoot) => {
|
|
13
13
|
target: "node",
|
14
14
|
mode: !isProd ? "development" : "production",
|
15
15
|
entry: {
|
16
|
-
main: path.resolve(projectRoot, "src/
|
16
|
+
main: path.resolve(projectRoot, "src/client.js"),
|
17
17
|
},
|
18
18
|
output: {
|
19
19
|
filename: "main.[fullhash].js",
|