@ozdao/prometheus-framework 0.2.252 → 0.2.254
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +298 -14
- package/dist/auth.server.mjs +298 -14
- package/dist/builder.js +4 -4
- package/dist/builder.mjs +4 -4
- package/dist/chats.server.js +110 -0
- package/dist/chats.server.mjs +111 -0
- package/dist/community.server.js +38 -21
- package/dist/community.server.mjs +38 -21
- package/dist/events.server.js +38 -18
- package/dist/events.server.mjs +38 -17
- package/dist/files.server.js +12 -3
- package/dist/files.server.mjs +12 -3
- package/dist/gallery.server.js +17 -4
- package/dist/gallery.server.mjs +17 -4
- package/dist/organizations.server.js +43 -26
- package/dist/organizations.server.mjs +43 -26
- package/dist/products.server.js +49 -23
- package/dist/products.server.mjs +49 -22
- package/dist/prometheus-framework/src/modules/auth/auth.client.cjs +15 -3
- package/dist/prometheus-framework/src/modules/auth/auth.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/auth.client.js +16 -4
- package/dist/prometheus-framework/src/modules/auth/auth.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/blocks/CardUser.vue.cjs +95 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/blocks/CardUser.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/blocks/CardUser.vue.js +95 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/blocks/CardUser.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.cjs +284 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.js +284 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue2.cjs +2 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue2.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue2.js +2 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue2.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileBlogposts.vue.cjs +85 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileBlogposts.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js +85 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileBlogposts.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +176 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.js +176 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue2.cjs +2 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue2.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue2.js +2 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue2.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/FeaturedUsers.vue.cjs +114 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/FeaturedUsers.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/FeaturedUsers.vue.js +114 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/FeaturedUsers.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/ProfileCompletion.vue.cjs +72 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/ProfileCompletion.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/ProfileCompletion.vue.js +72 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/ProfileCompletion.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/router/users.cjs +97 -0
- package/dist/prometheus-framework/src/modules/auth/views/router/users.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/router/users.js +97 -0
- package/dist/prometheus-framework/src/modules/auth/views/router/users.js.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/store/users.cjs +95 -0
- package/dist/prometheus-framework/src/modules/auth/views/store/users.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/store/users.js +95 -0
- package/dist/prometheus-framework/src/modules/auth/views/store/users.js.map +1 -0
- package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.cjs +32 -2
- package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.js +32 -2
- package/dist/prometheus-framework/src/modules/backoffice/backoffice.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +2 -2
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +2 -2
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js.map +1 -1
- package/dist/prometheus-framework/src/modules/chats/chats.client.cjs +31 -0
- package/dist/prometheus-framework/src/modules/chats/chats.client.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/chats/chats.client.js +31 -0
- package/dist/prometheus-framework/src/modules/chats/chats.client.js.map +1 -0
- package/dist/prometheus-framework/src/modules/community/community.client.cjs +42 -7
- package/dist/prometheus-framework/src/modules/community/community.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/community.client.js +59 -24
- package/dist/prometheus-framework/src/modules/community/community.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +68 -70
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js +68 -70
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/gallery.client.cjs +26 -3
- package/dist/prometheus-framework/src/modules/gallery/gallery.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/gallery.client.js +27 -4
- package/dist/prometheus-framework/src/modules/gallery/gallery.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.router.cjs +2 -2
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.router.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.router.js +2 -2
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.router.js.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/orders.client.cjs +4 -1
- package/dist/prometheus-framework/src/modules/orders/orders.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/orders.client.js +4 -1
- package/dist/prometheus-framework/src/modules/orders/orders.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/testimonials.cjs +63 -0
- package/dist/prometheus-framework/src/modules/orders/store/testimonials.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/orders/store/testimonials.js +63 -0
- package/dist/prometheus-framework/src/modules/orders/store/testimonials.js.map +1 -0
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs +60 -11
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.js +95 -46
- package/dist/prometheus-framework/src/modules/organizations/organizations.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +6 -10
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +8 -12
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js.map +1 -1
- package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +500 -500
- package/dist/prometheus-framework/src/modules/pages/pages.client.js +500 -500
- package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.cjs +179 -0
- package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.js +179 -0
- package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.cjs +64 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.js +64 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.cjs +156 -0
- package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.js +157 -0
- package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/HeroRecommendation.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/products.client.cjs +72 -7
- package/dist/prometheus-framework/src/modules/products/products.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/products.client.js +114 -49
- package/dist/prometheus-framework/src/modules/products/products.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/router/marketplace.router.cjs +46 -0
- package/dist/prometheus-framework/src/modules/products/router/marketplace.router.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/products/router/marketplace.router.js +46 -0
- package/dist/prometheus-framework/src/modules/products/router/marketplace.router.js.map +1 -0
- package/dist/prometheus-framework/src/modules/products/router/products.router.cjs +79 -36
- package/dist/prometheus-framework/src/modules/products/router/products.router.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/router/products.router.js +78 -35
- package/dist/prometheus-framework/src/modules/products/router/products.router.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/marketplace.cjs +57 -0
- package/dist/prometheus-framework/src/modules/products/store/marketplace.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/products/store/marketplace.js +57 -0
- package/dist/prometheus-framework/src/modules/products/store/marketplace.js.map +1 -0
- package/dist/prometheus-framework/src/modules/reports/reports.client.cjs +21 -2
- package/dist/prometheus-framework/src/modules/reports/reports.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/reports/reports.client.js +20 -1
- package/dist/prometheus-framework/src/modules/reports/reports.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.js.map +1 -1
- package/dist/reports.server.js +21 -8
- package/dist/reports.server.mjs +21 -8
- package/package.json +9 -1
- package/src/builder/webpack/webpack.config.client.js +2 -2
- package/src/builder/webpack/webpack.config.server.js +1 -1
- package/src/builder/webpack/webpack.config.spa.js +1 -1
- package/src/builder/webpack/webpack.config.ssr.js +1 -1
- package/src/modules/auth/auth.client.js +16 -3
- package/src/modules/auth/auth.server.js +22 -1
- package/src/modules/{users → auth/controllers}/routes/users.routes.js +1 -1
- package/src/modules/auth/controllers/services/auth.service.js +0 -1
- package/src/modules/{users → auth/views}/components/pages/Profile.vue +1 -1
- package/src/modules/{users → auth/views}/components/pages/ProfileEdit.vue +2 -2
- package/src/modules/{users → auth/views}/components/sections/FeaturedUsers.vue +2 -2
- package/src/modules/auth/views/router/users.js +79 -0
- package/src/modules/backoffice/backoffice.client.js +53 -11
- package/src/modules/backoffice/router/backoffice.js +29 -2
- package/src/modules/chats/chats.client.js +48 -0
- package/src/modules/chats/chats.server.js +32 -0
- package/src/modules/community/community.client.js +56 -10
- package/src/modules/community/community.server.js +35 -14
- package/src/modules/community/models/comment.model.js +7 -7
- package/src/modules/community/models/reaction.model.js +5 -5
- package/src/modules/community/router/blogposts.js +55 -57
- package/src/modules/events/events.server.js +37 -16
- package/src/modules/events/models/ticket.model.js +6 -6
- package/src/modules/files/files.server.js +17 -7
- package/src/modules/gallery/gallery.client.js +44 -8
- package/src/modules/gallery/gallery.server.js +28 -9
- package/src/modules/gallery/router/gallery.router.js +2 -2
- package/src/modules/orders/components/pages/OrderCreate.vue +1 -1
- package/src/modules/orders/components/pages/OrderCreateBackoffice.vue +1 -1
- package/src/modules/orders/components/sections/FormAddCustomer.vue +2 -2
- package/src/modules/orders/orders.client.js +4 -1
- package/src/modules/orders/orders.server.js +1 -0
- package/src/modules/organizations/components/blocks/CardDepartment.vue +1 -1
- package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
- package/src/modules/organizations/components/pages/Department.vue +1 -1
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +1 -1
- package/src/modules/organizations/components/pages/Members.vue +1 -1
- package/src/modules/organizations/components/pages/Organization.vue +1 -1
- package/src/modules/organizations/components/sections/MembersAdd.vue +2 -2
- package/src/modules/organizations/controllers/organizations.controller.js +0 -2
- package/src/modules/organizations/models/department.model.js +7 -7
- package/src/modules/organizations/models/membership.model.js +5 -5
- package/src/modules/organizations/organizations.client.js +71 -16
- package/src/modules/organizations/organizations.server.js +43 -18
- package/src/modules/organizations/router/organizations.js +6 -13
- package/src/modules/{marketplace → products}/components/layouts/Marketplace.vue +20 -19
- package/src/modules/{marketplace → products}/components/pages/Catalog.vue +5 -5
- package/src/modules/products/components/pages/Products.vue +2 -2
- package/src/modules/products/components/sections/FilterProducts.vue +1 -1
- package/src/modules/{marketplace → products}/components/sections/Filters.vue +12 -15
- package/src/modules/products/components/sections/HeroRecommendation.vue +1 -1
- package/src/modules/products/components/sections/PopularProducts.vue +1 -1
- package/src/modules/products/models/category.model.js +3 -3
- package/src/modules/products/models/product.model.js +7 -7
- package/src/modules/products/products.client.js +93 -25
- package/src/modules/products/products.server.js +47 -16
- package/src/modules/products/router/marketplace.router.js +38 -0
- package/src/modules/products/router/products.router.js +72 -32
- package/src/modules/reports/models/report.model.js +4 -4
- package/src/modules/reports/reports.client.js +35 -14
- package/src/modules/reports/reports.server.js +27 -8
- package/src/modules/spots/components/layouts/Spots.vue +1 -1
- package/src/modules/spots/components/pages/Map.vue +1 -1
- package/src/modules/spots/components/pages/Spot.vue +1 -1
- package/src/modules/backoffice/router/admin.js +0 -51
- package/src/modules/landing/components/pages/404.vue +0 -3
- package/src/modules/landing/components/pages/Farming.vue +0 -226
- package/src/modules/landing/components/pages/Governance.vue +0 -144
- package/src/modules/landing/components/pages/Home.vue +0 -51
- package/src/modules/landing/components/pages/Hotel.vue +0 -43
- package/src/modules/landing/router/landing.js +0 -39
- package/src/modules/legal/components/pages/Legal.vue +0 -62
- package/src/modules/legal/components/pages/legal/Cookies.vue +0 -370
- package/src/modules/legal/components/pages/legal/EULA.vue +0 -2145
- package/src/modules/legal/components/pages/legal/Privacy.vue +0 -4284
- package/src/modules/legal/components/pages/legal/Terms.vue +0 -1283
- package/src/modules/legal/legal.client.js +0 -18
- package/src/modules/legal/router/legal.js +0 -59
- package/src/modules/marketplace/router/marketplace.js +0 -54
- package/src/modules/users/router/users.js +0 -90
- package/src/modules/users/users.client.js +0 -22
- package/src/modules/users/users.server.js +0 -13
- /package/src/modules/{users → auth/controllers}/middlewares/visitor.logger.js +0 -0
- /package/src/modules/{users/controllers/users.controller.js → auth/controllers/services/users.service.js} +0 -0
- /package/src/modules/{users → auth}/models/request.model.js +0 -0
- /package/src/modules/{users → auth}/models/user.model.js +0 -0
- /package/src/modules/{users → auth}/models/visitor.model.js +0 -0
- /package/src/modules/{users → auth/views}/components/blocks/CardUser.vue +0 -0
- /package/src/modules/{users → auth/views}/components/pages/ProfileBlogposts.vue +0 -0
- /package/src/modules/{users → auth/views}/components/pages/ProfileComments.vue +0 -0
- /package/src/modules/{users → auth/views}/components/pages/ProfileLikes.vue +0 -0
- /package/src/modules/{users → auth/views}/components/sections/ProfileCompletion.vue +0 -0
- /package/src/modules/{users → auth/views}/router/account.js +0 -0
- /package/src/modules/{users → auth/views}/store/users.js +0 -0
- /package/src/modules/{projects/controller → governance/controllers/factories}/projects.controller.js +0 -0
- /package/src/modules/{projects → governance/controllers}/routes/projects.routes.js +0 -0
- /package/src/modules/{projects → governance}/models/project.model.js +0 -0
- /package/src/modules/{projects → governance/views}/store/projects.js +0 -0
- /package/src/modules/{marketplace → products}/store/marketplace.js +0 -0
@@ -1,83 +1,81 @@
|
|
1
1
|
import _sfc_main from "../components/layouts/Community.vue.js";
|
2
2
|
import { requiresAuth } from "../../auth/views/middlewares/auth.validation.js";
|
3
3
|
import { requiresEditAccess } from "../../auth/views/middlewares/ownership.validation.js";
|
4
|
-
const community =
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
const community = {
|
5
|
+
path: "community",
|
6
|
+
component: _sfc_main,
|
7
|
+
meta: {
|
8
|
+
title: {
|
9
|
+
en: "Community",
|
10
|
+
ru: "Коммьюнити"
|
11
|
+
},
|
12
|
+
breadcrumbs: {
|
13
|
+
hidden: true
|
14
|
+
},
|
15
|
+
title_hide: true
|
16
|
+
},
|
17
|
+
children: [{
|
18
|
+
path: ":category?",
|
19
|
+
name: "Blog",
|
8
20
|
meta: {
|
9
21
|
title: {
|
10
22
|
en: "Community",
|
11
23
|
ru: "Коммьюнити"
|
12
24
|
},
|
13
|
-
breadcrumbs: {
|
14
|
-
hidden: true
|
15
|
-
},
|
16
25
|
title_hide: true
|
17
26
|
},
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
beforeEnter: [
|
71
|
-
requiresAuth,
|
72
|
-
requiresEditAccess
|
73
|
-
],
|
74
|
-
component: () => import(
|
75
|
-
/* webpackChunkName: 'CreateBlogPost' */
|
76
|
-
"../components/pages/CreateBlogPost.vue.js"
|
77
|
-
)
|
78
|
-
}]
|
79
|
-
}
|
80
|
-
];
|
27
|
+
component: () => import(
|
28
|
+
/* webpackChunkName: 'Blog' */
|
29
|
+
"../components/pages/Blog.vue.js"
|
30
|
+
)
|
31
|
+
}, {
|
32
|
+
path: "posts/create",
|
33
|
+
name: "Create BlogPost",
|
34
|
+
meta: {
|
35
|
+
title: {
|
36
|
+
en: "Create Post",
|
37
|
+
ru: "Создать Пост"
|
38
|
+
}
|
39
|
+
},
|
40
|
+
// beforeEnter: [
|
41
|
+
// validationAuth.requiresAuth,
|
42
|
+
// ],
|
43
|
+
component: () => import(
|
44
|
+
/* webpackChunkName: 'CreateBlogPost' */
|
45
|
+
"../components/pages/CreateBlogPost.vue.js"
|
46
|
+
)
|
47
|
+
}, {
|
48
|
+
path: "posts/:url",
|
49
|
+
name: "BlogPost",
|
50
|
+
meta: {
|
51
|
+
title: {
|
52
|
+
en: "Post",
|
53
|
+
ru: "Пост"
|
54
|
+
}
|
55
|
+
},
|
56
|
+
component: () => import(
|
57
|
+
/* webpackChunkName: 'BlogPost' */
|
58
|
+
"../components/pages/BlogPost.vue.js"
|
59
|
+
)
|
60
|
+
}, {
|
61
|
+
path: "posts/:url/edit",
|
62
|
+
name: "Edit BlogPost",
|
63
|
+
meta: {
|
64
|
+
title: {
|
65
|
+
en: "Edit Post",
|
66
|
+
ru: "Редактировать пост"
|
67
|
+
}
|
68
|
+
},
|
69
|
+
beforeEnter: [
|
70
|
+
requiresAuth,
|
71
|
+
requiresEditAccess
|
72
|
+
],
|
73
|
+
component: () => import(
|
74
|
+
/* webpackChunkName: 'CreateBlogPost' */
|
75
|
+
"../components/pages/CreateBlogPost.vue.js"
|
76
|
+
)
|
77
|
+
}]
|
78
|
+
};
|
81
79
|
export {
|
82
80
|
community as default
|
83
81
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"blogposts.js","sources":["../../../../../../src/modules/community/router/blogposts.js"],"sourcesContent":["import layoutCommunity from '../components/layouts/Community.vue'\nimport * as validationAuth from '@pf/src/modules/auth/views/middlewares/auth.validation';\nimport * as validationOwnership from '@pf/src/modules/auth/views/middlewares/ownership.validation';\n\
|
1
|
+
{"version":3,"file":"blogposts.js","sources":["../../../../../../src/modules/community/router/blogposts.js"],"sourcesContent":["import layoutCommunity from '../components/layouts/Community.vue'\n\nimport * as validationAuth from '@pf/src/modules/auth/views/middlewares/auth.validation';\nimport * as validationOwnership from '@pf/src/modules/auth/views/middlewares/ownership.validation';\n\nconst community = {\n path: 'community',\n component: layoutCommunity,\n meta: {\n title: {\n en: 'Community',\n ru: 'Коммьюнити'\n },\n breadcrumbs: {\n hidden: true\n },\n title_hide: true\n\n },\n children: [{\n path: ':category?',\n name: 'Blog',\n meta: {\n title: {\n en: 'Community',\n ru: 'Коммьюнити'\n },\n title_hide: true\n },\n component: () => import(/* webpackChunkName: 'Blog' */ '../components/pages/Blog.vue')\n },{\n path: 'posts/create',\n name: 'Create BlogPost',\n meta: {\n title: {\n en: 'Create Post',\n ru: 'Создать Пост'\n },\n },\n // beforeEnter: [\n // validationAuth.requiresAuth,\n // ],\n component: () => import(/* webpackChunkName: 'CreateBlogPost' */ '../components/pages/CreateBlogPost.vue')\n },{\n path: 'posts/:url',\n name: 'BlogPost',\n meta: {\n title: {\n en: 'Post',\n ru: 'Пост'\n }\n },\n component: () => import(/* webpackChunkName: 'BlogPost' */ '../components/pages/BlogPost.vue')\n },{\n path: 'posts/:url/edit',\n name: 'Edit BlogPost',\n meta: {\n title: {\n en: 'Edit Post',\n ru: 'Редактировать пост'\n },\n },\n beforeEnter: [\n validationAuth.requiresAuth,\n validationOwnership.requiresEditAccess\n ],\n component: () => import(/* webpackChunkName: 'CreateBlogPost' */ '../components/pages/CreateBlogPost.vue')\n }]\n}\n\nexport default community;"],"names":["layoutCommunity","validationAuth.requiresAuth","validationOwnership.requiresEditAccess"],"mappings":";;;AAKK,MAAC,YAAY;AAAA,EAChB,MAAM;AAAA,EACN,WAAWA;AAAAA,EACX,MAAM;AAAA,IACJ,OAAO;AAAA,MACL,IAAI;AAAA,MACJ,IAAI;AAAA,IACL;AAAA,IACD,aAAa;AAAA,MACX,QAAQ;AAAA,IACT;AAAA,IACD,YAAY;AAAA,EAEb;AAAA,EACD,UAAU,CAAC;AAAA,IACT,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,MACJ,OAAO;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,MACL;AAAA,MACD,YAAY;AAAA,IACb;AAAA,IACD,WAAW,MAAM;AAAA;AAAA,MAAsC;AAAA,IAA8B;AAAA,EACzF,GAAI;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,MACJ,OAAO;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,MACL;AAAA,IACF;AAAA;AAAA;AAAA;AAAA,IAID,WAAW,MAAM;AAAA;AAAA,MAAgD;AAAA,IAAwC;AAAA,EAC7G,GAAI;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,MACJ,OAAO;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,MACL;AAAA,IACF;AAAA,IACD,WAAW,MAAM;AAAA;AAAA,MAA0C;AAAA,IAAkC;AAAA,EACjG,GAAI;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,IACL,MAAM;AAAA,MACL,OAAO;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,MACL;AAAA,IACF;AAAA,IACD,aAAa;AAAA,MACXC;AAAAA,MACAC;AAAAA,IACD;AAAA,IACD,WAAW,MAAM;AAAA;AAAA,MAAgD;AAAA,IAAwC;AAAA,EAC7G,CAAG;AACH;"}
|
@@ -1,7 +1,30 @@
|
|
1
1
|
"use strict";
|
2
|
-
Object.
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const gallery = require("./store/gallery.cjs");
|
4
4
|
const gallery_router = require("./router/gallery.router.cjs");
|
5
|
-
|
6
|
-
|
5
|
+
const Gallery = require("./components/pages/Gallery.vue.cjs");
|
6
|
+
const BackofficeGallery = require("./components/sections/BackofficeGallery.vue.cjs");
|
7
|
+
function initializeGallery(app, store, router, options = {}) {
|
8
|
+
const route = options.route || "Home";
|
9
|
+
router.addRoute(route, gallery_router.default);
|
10
|
+
store.addStore("gallery", gallery);
|
11
|
+
}
|
12
|
+
const ModuleGallery = {
|
13
|
+
initialize: initializeGallery,
|
14
|
+
views: {
|
15
|
+
store: {
|
16
|
+
storeGallery: gallery
|
17
|
+
},
|
18
|
+
router: {
|
19
|
+
routerGallery: gallery_router.default
|
20
|
+
},
|
21
|
+
components: {
|
22
|
+
// Pages
|
23
|
+
Gallery: Gallery.default,
|
24
|
+
// Sections
|
25
|
+
BackofficeGallery: BackofficeGallery.default
|
26
|
+
}
|
27
|
+
}
|
28
|
+
};
|
29
|
+
exports.default = ModuleGallery;
|
7
30
|
//# sourceMappingURL=gallery.client.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"gallery.client.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
1
|
+
{"version":3,"file":"gallery.client.cjs","sources":["../../../../../src/modules/gallery/gallery.client.js"],"sourcesContent":["// Store\nimport * as storeGallery from './store/gallery.js';\n\n// Router\nimport routerGallery from './router/gallery.router';\n// import { createGalleryBackofficeRoutes } from './router/gallery.backoffice.router';\n\n// Views\n// Pages\nimport Gallery from './components/pages/Gallery.vue';\n\n// Sections\nimport BackofficeGallery from './components/sections/BackofficeGallery.vue';\n\n// Пример функции инициализации для модуля галереи\nfunction initializeGallery(app, store, router, options = {}) {\n const route = options.route || 'Home';\n\n // const routesGallery = createGalleryRoutes();\n // const routesGalleryBackoffice = createGalleryBackofficeRoutes();\n \n router.addRoute(route, routerGallery);\n // router.addRoute('Backoffice', routesGalleryBackoffice);\n \n store.addStore('gallery', storeGallery);\n}\n\nconst ModuleGallery = {\n initialize: initializeGallery,\n views: {\n store: {\n storeGallery\n },\n router: {\n routerGallery\n },\n components: {\n // Pages\n Gallery,\n // Sections\n BackofficeGallery\n }\n }\n}\n\nexport default ModuleGallery;"],"names":["routerGallery","storeGallery","Gallery","BackofficeGallery"],"mappings":";;;;;;AAeA,SAAS,kBAAkB,KAAK,OAAO,QAAQ,UAAU,CAAA,GAAI;AAC3D,QAAM,QAAQ,QAAQ,SAAS;AAK/B,SAAO,SAAS,OAAOA,eAAAA,OAAa;AAGpC,QAAM,SAAS,WAAWC,OAAY;AACxC;AAEK,MAAC,gBAAgB;AAAA,EACpB,YAAY;AAAA,EACZ,OAAO;AAAA,IACL,OAAO;AAAA,MACX,cAAMA;AAAAA,IACD;AAAA,IACD,QAAQ;AAAA,MACZ,eAAMD,eAAa;AAAA,IACd;AAAA,IACD,YAAY;AAAA;AAAA,MAEhB,SAAME,QAAO;AAAA;AAAA,MAEb,mBAAMC,kBAAiB;AAAA,IAClB;AAAA,EACF;AACH;;"}
|
@@ -1,7 +1,30 @@
|
|
1
|
-
import
|
2
|
-
import
|
1
|
+
import * as gallery from "./store/gallery.js";
|
2
|
+
import gallery$1 from "./router/gallery.router.js";
|
3
|
+
import _sfc_main from "./components/pages/Gallery.vue.js";
|
4
|
+
import _sfc_main$1 from "./components/sections/BackofficeGallery.vue.js";
|
5
|
+
function initializeGallery(app, store, router, options = {}) {
|
6
|
+
const route = options.route || "Home";
|
7
|
+
router.addRoute(route, gallery$1);
|
8
|
+
store.addStore("gallery", gallery);
|
9
|
+
}
|
10
|
+
const ModuleGallery = {
|
11
|
+
initialize: initializeGallery,
|
12
|
+
views: {
|
13
|
+
store: {
|
14
|
+
storeGallery: gallery
|
15
|
+
},
|
16
|
+
router: {
|
17
|
+
routerGallery: gallery$1
|
18
|
+
},
|
19
|
+
components: {
|
20
|
+
// Pages
|
21
|
+
Gallery: _sfc_main,
|
22
|
+
// Sections
|
23
|
+
BackofficeGallery: _sfc_main$1
|
24
|
+
}
|
25
|
+
}
|
26
|
+
};
|
3
27
|
export {
|
4
|
-
|
5
|
-
default2 as galleryStore
|
28
|
+
ModuleGallery as default
|
6
29
|
};
|
7
30
|
//# sourceMappingURL=gallery.client.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"gallery.client.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"gallery.client.js","sources":["../../../../../src/modules/gallery/gallery.client.js"],"sourcesContent":["// Store\nimport * as storeGallery from './store/gallery.js';\n\n// Router\nimport routerGallery from './router/gallery.router';\n// import { createGalleryBackofficeRoutes } from './router/gallery.backoffice.router';\n\n// Views\n// Pages\nimport Gallery from './components/pages/Gallery.vue';\n\n// Sections\nimport BackofficeGallery from './components/sections/BackofficeGallery.vue';\n\n// Пример функции инициализации для модуля галереи\nfunction initializeGallery(app, store, router, options = {}) {\n const route = options.route || 'Home';\n\n // const routesGallery = createGalleryRoutes();\n // const routesGalleryBackoffice = createGalleryBackofficeRoutes();\n \n router.addRoute(route, routerGallery);\n // router.addRoute('Backoffice', routesGalleryBackoffice);\n \n store.addStore('gallery', storeGallery);\n}\n\nconst ModuleGallery = {\n initialize: initializeGallery,\n views: {\n store: {\n storeGallery\n },\n router: {\n routerGallery\n },\n components: {\n // Pages\n Gallery,\n // Sections\n BackofficeGallery\n }\n }\n}\n\nexport default ModuleGallery;"],"names":["routerGallery","storeGallery","Gallery","BackofficeGallery"],"mappings":";;;;AAeA,SAAS,kBAAkB,KAAK,OAAO,QAAQ,UAAU,CAAA,GAAI;AAC3D,QAAM,QAAQ,QAAQ,SAAS;AAK/B,SAAO,SAAS,OAAOA,SAAa;AAGpC,QAAM,SAAS,WAAWC,OAAY;AACxC;AAEK,MAAC,gBAAgB;AAAA,EACpB,YAAY;AAAA,EACZ,OAAO;AAAA,IACL,OAAO;AAAA,MACX,cAAMA;AAAAA,IACD;AAAA,IACD,QAAQ;AAAA,MACZ,eAAMD;AAAAA,IACD;AAAA,IACD,YAAY;AAAA;AAAA,MAEhB,SAAME;AAAAA;AAAAA,MAEN,mBAAMC;AAAAA,IACD;AAAA,EACF;AACH;"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
|
-
const gallery =
|
3
|
+
const gallery = {
|
4
4
|
name: "Gallery",
|
5
5
|
path: "gallery",
|
6
6
|
meta: {
|
@@ -10,6 +10,6 @@ const gallery = [{
|
|
10
10
|
/* webpackChunkName: 'Gallery' */
|
11
11
|
"../components/pages/Gallery.vue.cjs"
|
12
12
|
))
|
13
|
-
}
|
13
|
+
};
|
14
14
|
exports.default = gallery;
|
15
15
|
//# sourceMappingURL=gallery.router.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"gallery.router.cjs","sources":["../../../../../../src/modules/gallery/router/gallery.router.js"],"sourcesContent":["const gallery =
|
1
|
+
{"version":3,"file":"gallery.router.cjs","sources":["../../../../../../src/modules/gallery/router/gallery.router.js"],"sourcesContent":["const gallery = {\n name: 'Gallery',\n path: 'gallery',\n meta: {\n title_hide: true\n },\n component: () => import(/* webpackChunkName: 'Gallery' */ '@pf/src/modules/gallery/components/pages/Gallery.vue'),\n};\n\nexport default gallery;"],"names":[],"mappings":";;AAAK,MAAC,UAAU;AAAA,EACd,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,IACJ,YAAY;AAAA,EACb;AAAA,EACD,WAAW,MAAM,QAAO,QAAA,EAAA,KAAA,MAAA;AAAA;AAAA,IAAkC;AAAA,EAAsD,CAAC;AACnH;;"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
const gallery =
|
1
|
+
const gallery = {
|
2
2
|
name: "Gallery",
|
3
3
|
path: "gallery",
|
4
4
|
meta: {
|
@@ -8,7 +8,7 @@ const gallery = [{
|
|
8
8
|
/* webpackChunkName: 'Gallery' */
|
9
9
|
"../components/pages/Gallery.vue.js"
|
10
10
|
)
|
11
|
-
}
|
11
|
+
};
|
12
12
|
export {
|
13
13
|
gallery as default
|
14
14
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"gallery.router.js","sources":["../../../../../../src/modules/gallery/router/gallery.router.js"],"sourcesContent":["const gallery =
|
1
|
+
{"version":3,"file":"gallery.router.js","sources":["../../../../../../src/modules/gallery/router/gallery.router.js"],"sourcesContent":["const gallery = {\n name: 'Gallery',\n path: 'gallery',\n meta: {\n title_hide: true\n },\n component: () => import(/* webpackChunkName: 'Gallery' */ '@pf/src/modules/gallery/components/pages/Gallery.vue'),\n};\n\nexport default gallery;"],"names":[],"mappings":"AAAK,MAAC,UAAU;AAAA,EACd,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,IACJ,YAAY;AAAA,EACb;AAAA,EACD,WAAW,MAAM;AAAA;AAAA,IAAyC;AAAA,EAAsD;AAClH;"}
|
@@ -14,7 +14,7 @@ const auth = require("../../../auth/views/store/auth.cjs");
|
|
14
14
|
const shopcart = require("../../store/shopcart.cjs");
|
15
15
|
const organizations = require("../../../organizations/store/organizations.cjs");
|
16
16
|
const orders = require("../../store/orders.cjs");
|
17
|
-
const users = require("../../../
|
17
|
+
const users = require("../../../auth/views/store/users.cjs");
|
18
18
|
;/* empty css */
|
19
19
|
const _hoisted_1 = { class: "pd-thin" };
|
20
20
|
const _hoisted_2 = { class: "gap-small mn-b-thin cols-2" };
|
package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"OrderCreate.vue.cjs","sources":["../../../../../../../src/modules/orders/components/pages/OrderCreate.vue"],"sourcesContent":["<template>\n\n<section class=\"pd-thin\">\n\n\t<!-- Ask to login -->\n\t<AskToLogin class=\"mn-b-thin\" v-if=\"auth.state.access.status === false\" /> \n\n\t<!-- Order form -->\n\t<div class=\"gap-small mn-b-thin cols-2\">\n\t\t<!-- Empty State -->\n\t\t<EmptyState \n\t\t\tv-if=\"shopcart.state.positions < 1\" \n\t\t/>\t\n\n\t\t<Succes \n\t\t\tv-if=\"order.status === true && shopcart.state.positions.length > 0\" \n\t\t\t:order=\"order\" \n\t\t/>\n\t\t<!-- Order Form -->\n\t\t<div\n\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\" \n\t\t\tclass=\"order-form col\"\n\t\t>\n\t\t\t<FormCustomerDetails\n\t\t\t\t:customer=\"orders.state.current.customer\"\n\t\t\t/>\n\t\t\t<FormDelivery \t\n\t\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t\t\t:order=\"orders.state.current\" \n\t\t\t/>\n\t\t\t<FormPayment \t\n\t\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t\t\t:order=\"orders.state.current\" \n\t\t\t/>\n\t\t</div>\n\n\t\t<!-- Order positions -->\n\t\t<div \n\t\t\tv-if=\"shopcart.state.positions.length > 0\" \n\t\t\tclass=\"bg-light pd-medium radius-big\"\n\t\t>\n\t\t\t<h4 class=\"font-second mn-b-thin\">Your Order</h4>\n\n\t\t\t<ul class=\"flex gap-thin flex-wrap mn-b-thin\">\n\t\t\t\t<CardOrderItem \n\t\t\t\t\tv-for=\"product in shopcart.state.positions\" \n\t\t\t\t\t:key=\"product._id\" \n\t\t\t\t\t:editable=\"true\" \n\t\t\t\t\t:product=\"product\" \n\t :increase=\"product => shopcart.actions.incrementItemQuantity(product._id)\"\n\t :decrease=\"product => shopcart.actions.decrementItemQuantity(product._id)\"\n\t :remove=\"product => shopcart.actions.removeProduct(product._id)\"\n\t class=\"w-100 bg-white pd-small radius-medium\"\n\t />\n\t\t\t</ul>\n\n\t\t\t<div \n\t\t\t\tclass=\"bg-main pd-thin radius-medium mn-b-thin\"\n\t\t\t>\t\n\t\t\t\t<p class=\"pd-small br-b br-solid br-black-transp-10\">\n\t\t\t\t\tSubtotal: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ cartTotalPrice }}\n\t\t\t\t</p>\n\t\t\t\t<p class=\"pd-small br-b br-solid br-black-transp-10\">\n\t\t\t\t\tDelivery: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ deliveryCost }}\n\t\t\t\t</p>\n\t\t\t\t<p class=\"pd-small h3\">\n\t\t\t\t\tTotal: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ deliveryCost + cartTotalPrice.value }}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<!-- Send order -->\n\t\t <button \n\t\t \tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t \t:disabled=\"\n\t\t errorName \n\t\t || errorPhoneOrMessenger \n\t\t || errorCity \n\t\t || errorAddress \n\t\t || errorDelivery \n\t\t || errorPayment\n\t\t \"\n\t\t @click=\"handleCreate()\" \n\t\t class=\"bg-main mn-b-small pd-small radius-big w-100 button\"\n\t\t >\n\t\t Place an Order\n\t\t </button>\n\n\t\t <p class='mn-b-thin'>\n\t\t\t\tI agree that placing the order places me under an obligation to make a payment in accordance with <a class=\"t-semi font-second t-second\" href=\"/legal/terms-of-use\" target=\"_blank\">Terms of Use.</a>\n\t\t\t</p>\n\t\t\t<p >\n\t\t\t\t\n\t\t\t</p>\n\t\t</div>\n\n\t</div>\n\n\t\n\t\n</section>\n\n</template>\n\n\n<script setup>\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Import components\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Block\nimport CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue'\n// Sections\nimport AskToLogin from '@pf/src/modules/orders/components/sections/AskToLogin.vue'\nimport Succes from '@pf/src/modules/orders/components/sections/Succes.vue'\nimport EmptyState from '@pf/src/modules/orders/components/sections/EmptyState.vue'\n\nimport FormCustomerDetails from '@pf/src/modules/orders/components/sections/FormCustomerDetails.vue'\nimport FormDelivery from '@pf/src/modules/orders/components/sections/FormDelivery.vue'\nimport FormPayment from '@pf/src/modules/orders/components/sections/FormPayment.vue'\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Import libs\n///////////////////////////////////////////////////////////////////////////////////////////////////\nimport { ref, computed, onMounted, watch } from 'vue'\nimport { useRoute,useRouter } from 'vue-router'\n// Store\nimport * as globals from '@pf/src/modules/globals/views/store/globals';\nimport * as auth from '@pf/src/modules/auth/views/store/auth';\nimport * as shopcart from '@pf/src/modules/orders/store/shopcart';\nimport * as organizations from '@pf/src/modules/organizations/store/organizations';\nimport * as orders from '@pf/src/modules/orders/store/orders';\nimport * as users from '@pf/src/modules/users/store/users';\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Variables and computed\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Accessing router and store\nconst route = useRoute()\nconst router = useRouter()\n// COMPUTED\nconst order = computed(() => orders.state.current)\nconst user = computed(() => users.state.current)\nconst cartTotalPrice = computed(() => shopcart.getters.cartTotalPrice)\nconst deliveryCost = computed(() => {\n if (orders.state.current.delivery.type === 'pickup') return 0;\n if (orders.state.current.delivery.type === 'mail') return 350;\n if (orders.state.current.delivery.type === 'courier') {\n const distance = orderOrganization.value[0]?.distance || 0;\n return Math.trunc(100 + 20 * distance - 7.5 * (distance / 10));\n }\n return 0;\n});\n\n// Computed property for total cost\nconst totalCost = computed(() => {\n return deliveryCost.value + cartTotalPrice.value.value;\n});\n// Organization\nconst orderOrganization = ref({})\n\n\nonMounted(async()=> {\n\torderOrganization.value = await organizations.actions.read({\n\t _id: shopcart.state.organization,\n\t location: globals.state.position?.location,\n\t})\n})\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// WATCHERS\n///////////////////////////////////////////////////////////////////////////////////////////////////\nwatch(() => orders.state.current.delivery.address, async (newFilterValue, oldFilterValue) => {\n\torderOrganization.value = await organizations.actions.read({\n\t _id: shopcart.state.organization,\n\t location: orders.state.current.delivery.location,\n\t})\n}, { deep: true })\n/////////////////////////////\n// Store Verification\n/////////////////////////////\nconst errorName = computed(() => {\n if (orders.state.current.customer.name?.length < 2) { return true } else { return false }\n});\n\nconst errorPhoneOrMessenger = computed(() => {\n const hasMessengerType = orders.state.current.customer.messenger?.type;\n const hasMessengerValue = orders.state.current.customer.messenger?.value?.length >\t 2;\n const hasPhone = orders.state.current.customer.number?.length > 0;\n // Ошибка, если нет ни номера телефона, ни корректного типа и значения мессенджера\n return !hasPhone && !(hasMessengerType && hasMessengerValue);\n});\n\nconst errorAddress = computed(() => {\n\tlet error = orders.state.current.delivery.type !== \"Pickup\" && orders.state.current.delivery.address < 2\n \n if (error) { return true } else { return false }\n});\n\nconst errorDelivery = computed(() => {\n if (orders.state.current.delivery.type) {return false } else {return true } \n})\n\nconst errorPayment = computed(() => {\n if (orders.state.current.payment.type) { return false } else {return true } \n})\n/////////////////////////////\n// Methods\n/////////////////////////////\nasync function handleCreate() {\n\n\torders.state.current.status = 'created';\n\n\torders.state.current.owner = {\n\t\ttarget: shopcart.state.organization,\n\t\ttype: 'organization'\n\t}\n\n\tif (auth.state.user._id) {\n\t\torders.state.current.creator = {\n\t\t\ttarget: auth.state.user._id,\n\t\t\ttype: 'User'\n\t\t}\n\t}\n\n\torders.state.current.positions = shopcart.state.positions\n\n \tconst referralCode = localStorage.getItem('referalCode');\n \n if (referralCode) {\n orders.state.current.referralCode = referralCode;\n }\n\n let order = await orders.actions.create(orders.state.current);\n\n if (order) {\n \tshopcart.actions.resetShopcart()\n\n \trouter.push({\n \t\tname: 'Order Status',\n \t\tparams: {\n \t\t\torder: order._id\n \t\t}\n \t})\n } else {\n \talert('something wrong')\n }\n}\n</script>\n\n<style lang=\"scss\">\n\n.round-wrapper {\n\tposition: relative;\n\n\t.round {\n\t\tmargin: 0;\n\t\tmargin-right: 1rem;\n\t}\n\n\tinput:checked {\n\t\tbackground: #00ff88;\n\t}\n\n\t.round-checkmark {\n\t\tposition: absolute;\n\t\twidth: 0.5rem;\n\t\theight: 0.5rem;\n\t\tbackground: white;\n\n\t\tleft: 0.5rem;\n\t\ttop: 0.5rem;\n\n\t\topacity: 1;\n\t}\n}\n</style>"],"names":["useRoute","useRouter","computed","orders.state","users.state","shopcart.getters","ref","onMounted","organizations.actions","shopcart.state","globals.state","watch","auth.state","order","orders.actions","shopcart.actions"],"mappings":"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"}
|
1
|
+
{"version":3,"file":"OrderCreate.vue.cjs","sources":["../../../../../../../src/modules/orders/components/pages/OrderCreate.vue"],"sourcesContent":["<template>\n\n<section class=\"pd-thin\">\n\n\t<!-- Ask to login -->\n\t<AskToLogin class=\"mn-b-thin\" v-if=\"auth.state.access.status === false\" /> \n\n\t<!-- Order form -->\n\t<div class=\"gap-small mn-b-thin cols-2\">\n\t\t<!-- Empty State -->\n\t\t<EmptyState \n\t\t\tv-if=\"shopcart.state.positions < 1\" \n\t\t/>\t\n\n\t\t<Succes \n\t\t\tv-if=\"order.status === true && shopcart.state.positions.length > 0\" \n\t\t\t:order=\"order\" \n\t\t/>\n\t\t<!-- Order Form -->\n\t\t<div\n\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\" \n\t\t\tclass=\"order-form col\"\n\t\t>\n\t\t\t<FormCustomerDetails\n\t\t\t\t:customer=\"orders.state.current.customer\"\n\t\t\t/>\n\t\t\t<FormDelivery \t\n\t\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t\t\t:order=\"orders.state.current\" \n\t\t\t/>\n\t\t\t<FormPayment \t\n\t\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t\t\t:order=\"orders.state.current\" \n\t\t\t/>\n\t\t</div>\n\n\t\t<!-- Order positions -->\n\t\t<div \n\t\t\tv-if=\"shopcart.state.positions.length > 0\" \n\t\t\tclass=\"bg-light pd-medium radius-big\"\n\t\t>\n\t\t\t<h4 class=\"font-second mn-b-thin\">Your Order</h4>\n\n\t\t\t<ul class=\"flex gap-thin flex-wrap mn-b-thin\">\n\t\t\t\t<CardOrderItem \n\t\t\t\t\tv-for=\"product in shopcart.state.positions\" \n\t\t\t\t\t:key=\"product._id\" \n\t\t\t\t\t:editable=\"true\" \n\t\t\t\t\t:product=\"product\" \n\t :increase=\"product => shopcart.actions.incrementItemQuantity(product._id)\"\n\t :decrease=\"product => shopcart.actions.decrementItemQuantity(product._id)\"\n\t :remove=\"product => shopcart.actions.removeProduct(product._id)\"\n\t class=\"w-100 bg-white pd-small radius-medium\"\n\t />\n\t\t\t</ul>\n\n\t\t\t<div \n\t\t\t\tclass=\"bg-main pd-thin radius-medium mn-b-thin\"\n\t\t\t>\t\n\t\t\t\t<p class=\"pd-small br-b br-solid br-black-transp-10\">\n\t\t\t\t\tSubtotal: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ cartTotalPrice }}\n\t\t\t\t</p>\n\t\t\t\t<p class=\"pd-small br-b br-solid br-black-transp-10\">\n\t\t\t\t\tDelivery: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ deliveryCost }}\n\t\t\t\t</p>\n\t\t\t\t<p class=\"pd-small h3\">\n\t\t\t\t\tTotal: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ deliveryCost + cartTotalPrice.value }}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<!-- Send order -->\n\t\t <button \n\t\t \tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t \t:disabled=\"\n\t\t errorName \n\t\t || errorPhoneOrMessenger \n\t\t || errorCity \n\t\t || errorAddress \n\t\t || errorDelivery \n\t\t || errorPayment\n\t\t \"\n\t\t @click=\"handleCreate()\" \n\t\t class=\"bg-main mn-b-small pd-small radius-big w-100 button\"\n\t\t >\n\t\t Place an Order\n\t\t </button>\n\n\t\t <p class='mn-b-thin'>\n\t\t\t\tI agree that placing the order places me under an obligation to make a payment in accordance with <a class=\"t-semi font-second t-second\" href=\"/legal/terms-of-use\" target=\"_blank\">Terms of Use.</a>\n\t\t\t</p>\n\t\t\t<p >\n\t\t\t\t\n\t\t\t</p>\n\t\t</div>\n\n\t</div>\n\n\t\n\t\n</section>\n\n</template>\n\n\n<script setup>\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Import components\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Block\nimport CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue'\n// Sections\nimport AskToLogin from '@pf/src/modules/orders/components/sections/AskToLogin.vue'\nimport Succes from '@pf/src/modules/orders/components/sections/Succes.vue'\nimport EmptyState from '@pf/src/modules/orders/components/sections/EmptyState.vue'\n\nimport FormCustomerDetails from '@pf/src/modules/orders/components/sections/FormCustomerDetails.vue'\nimport FormDelivery from '@pf/src/modules/orders/components/sections/FormDelivery.vue'\nimport FormPayment from '@pf/src/modules/orders/components/sections/FormPayment.vue'\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Import libs\n///////////////////////////////////////////////////////////////////////////////////////////////////\nimport { ref, computed, onMounted, watch } from 'vue'\nimport { useRoute,useRouter } from 'vue-router'\n// Store\nimport * as globals from '@pf/src/modules/globals/views/store/globals';\nimport * as auth from '@pf/src/modules/auth/views/store/auth';\nimport * as shopcart from '@pf/src/modules/orders/store/shopcart';\nimport * as organizations from '@pf/src/modules/organizations/store/organizations';\nimport * as orders from '@pf/src/modules/orders/store/orders';\nimport * as users from '@pf/src/modules/auth/views/store/users';\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Variables and computed\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Accessing router and store\nconst route = useRoute()\nconst router = useRouter()\n// COMPUTED\nconst order = computed(() => orders.state.current)\nconst user = computed(() => users.state.current)\nconst cartTotalPrice = computed(() => shopcart.getters.cartTotalPrice)\nconst deliveryCost = computed(() => {\n if (orders.state.current.delivery.type === 'pickup') return 0;\n if (orders.state.current.delivery.type === 'mail') return 350;\n if (orders.state.current.delivery.type === 'courier') {\n const distance = orderOrganization.value[0]?.distance || 0;\n return Math.trunc(100 + 20 * distance - 7.5 * (distance / 10));\n }\n return 0;\n});\n\n// Computed property for total cost\nconst totalCost = computed(() => {\n return deliveryCost.value + cartTotalPrice.value.value;\n});\n// Organization\nconst orderOrganization = ref({})\n\n\nonMounted(async()=> {\n\torderOrganization.value = await organizations.actions.read({\n\t _id: shopcart.state.organization,\n\t location: globals.state.position?.location,\n\t})\n})\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// WATCHERS\n///////////////////////////////////////////////////////////////////////////////////////////////////\nwatch(() => orders.state.current.delivery.address, async (newFilterValue, oldFilterValue) => {\n\torderOrganization.value = await organizations.actions.read({\n\t _id: shopcart.state.organization,\n\t location: orders.state.current.delivery.location,\n\t})\n}, { deep: true })\n/////////////////////////////\n// Store Verification\n/////////////////////////////\nconst errorName = computed(() => {\n if (orders.state.current.customer.name?.length < 2) { return true } else { return false }\n});\n\nconst errorPhoneOrMessenger = computed(() => {\n const hasMessengerType = orders.state.current.customer.messenger?.type;\n const hasMessengerValue = orders.state.current.customer.messenger?.value?.length >\t 2;\n const hasPhone = orders.state.current.customer.number?.length > 0;\n // Ошибка, если нет ни номера телефона, ни корректного типа и значения мессенджера\n return !hasPhone && !(hasMessengerType && hasMessengerValue);\n});\n\nconst errorAddress = computed(() => {\n\tlet error = orders.state.current.delivery.type !== \"Pickup\" && orders.state.current.delivery.address < 2\n \n if (error) { return true } else { return false }\n});\n\nconst errorDelivery = computed(() => {\n if (orders.state.current.delivery.type) {return false } else {return true } \n})\n\nconst errorPayment = computed(() => {\n if (orders.state.current.payment.type) { return false } else {return true } \n})\n/////////////////////////////\n// Methods\n/////////////////////////////\nasync function handleCreate() {\n\n\torders.state.current.status = 'created';\n\n\torders.state.current.owner = {\n\t\ttarget: shopcart.state.organization,\n\t\ttype: 'organization'\n\t}\n\n\tif (auth.state.user._id) {\n\t\torders.state.current.creator = {\n\t\t\ttarget: auth.state.user._id,\n\t\t\ttype: 'User'\n\t\t}\n\t}\n\n\torders.state.current.positions = shopcart.state.positions\n\n \tconst referralCode = localStorage.getItem('referalCode');\n \n if (referralCode) {\n orders.state.current.referralCode = referralCode;\n }\n\n let order = await orders.actions.create(orders.state.current);\n\n if (order) {\n \tshopcart.actions.resetShopcart()\n\n \trouter.push({\n \t\tname: 'Order Status',\n \t\tparams: {\n \t\t\torder: order._id\n \t\t}\n \t})\n } else {\n \talert('something wrong')\n }\n}\n</script>\n\n<style lang=\"scss\">\n\n.round-wrapper {\n\tposition: relative;\n\n\t.round {\n\t\tmargin: 0;\n\t\tmargin-right: 1rem;\n\t}\n\n\tinput:checked {\n\t\tbackground: #00ff88;\n\t}\n\n\t.round-checkmark {\n\t\tposition: absolute;\n\t\twidth: 0.5rem;\n\t\theight: 0.5rem;\n\t\tbackground: white;\n\n\t\tleft: 0.5rem;\n\t\ttop: 0.5rem;\n\n\t\topacity: 1;\n\t}\n}\n</style>"],"names":["useRoute","useRouter","computed","orders.state","users.state","shopcart.getters","ref","onMounted","organizations.actions","shopcart.state","globals.state","watch","auth.state","order","orders.actions","shopcart.actions"],"mappings":"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"}
|
@@ -12,7 +12,7 @@ import { state as state$4 } from "../../../auth/views/store/auth.js";
|
|
12
12
|
import { getters, state as state$2, actions as actions$1 } from "../../store/shopcart.js";
|
13
13
|
import { actions } from "../../../organizations/store/organizations.js";
|
14
14
|
import { state, actions as actions$2 } from "../../store/orders.js";
|
15
|
-
import { state as state$1 } from "../../../
|
15
|
+
import { state as state$1 } from "../../../auth/views/store/users.js";
|
16
16
|
/* empty css */
|
17
17
|
const _hoisted_1 = { class: "pd-thin" };
|
18
18
|
const _hoisted_2 = { class: "gap-small mn-b-thin cols-2" };
|
package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreate.vue.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"OrderCreate.vue.js","sources":["../../../../../../../src/modules/orders/components/pages/OrderCreate.vue"],"sourcesContent":["<template>\n\n<section class=\"pd-thin\">\n\n\t<!-- Ask to login -->\n\t<AskToLogin class=\"mn-b-thin\" v-if=\"auth.state.access.status === false\" /> \n\n\t<!-- Order form -->\n\t<div class=\"gap-small mn-b-thin cols-2\">\n\t\t<!-- Empty State -->\n\t\t<EmptyState \n\t\t\tv-if=\"shopcart.state.positions < 1\" \n\t\t/>\t\n\n\t\t<Succes \n\t\t\tv-if=\"order.status === true && shopcart.state.positions.length > 0\" \n\t\t\t:order=\"order\" \n\t\t/>\n\t\t<!-- Order Form -->\n\t\t<div\n\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\" \n\t\t\tclass=\"order-form col\"\n\t\t>\n\t\t\t<FormCustomerDetails\n\t\t\t\t:customer=\"orders.state.current.customer\"\n\t\t\t/>\n\t\t\t<FormDelivery \t\n\t\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t\t\t:order=\"orders.state.current\" \n\t\t\t/>\n\t\t\t<FormPayment \t\n\t\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t\t\t:order=\"orders.state.current\" \n\t\t\t/>\n\t\t</div>\n\n\t\t<!-- Order positions -->\n\t\t<div \n\t\t\tv-if=\"shopcart.state.positions.length > 0\" \n\t\t\tclass=\"bg-light pd-medium radius-big\"\n\t\t>\n\t\t\t<h4 class=\"font-second mn-b-thin\">Your Order</h4>\n\n\t\t\t<ul class=\"flex gap-thin flex-wrap mn-b-thin\">\n\t\t\t\t<CardOrderItem \n\t\t\t\t\tv-for=\"product in shopcart.state.positions\" \n\t\t\t\t\t:key=\"product._id\" \n\t\t\t\t\t:editable=\"true\" \n\t\t\t\t\t:product=\"product\" \n\t :increase=\"product => shopcart.actions.incrementItemQuantity(product._id)\"\n\t :decrease=\"product => shopcart.actions.decrementItemQuantity(product._id)\"\n\t :remove=\"product => shopcart.actions.removeProduct(product._id)\"\n\t class=\"w-100 bg-white pd-small radius-medium\"\n\t />\n\t\t\t</ul>\n\n\t\t\t<div \n\t\t\t\tclass=\"bg-main pd-thin radius-medium mn-b-thin\"\n\t\t\t>\t\n\t\t\t\t<p class=\"pd-small br-b br-solid br-black-transp-10\">\n\t\t\t\t\tSubtotal: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ cartTotalPrice }}\n\t\t\t\t</p>\n\t\t\t\t<p class=\"pd-small br-b br-solid br-black-transp-10\">\n\t\t\t\t\tDelivery: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ deliveryCost }}\n\t\t\t\t</p>\n\t\t\t\t<p class=\"pd-small h3\">\n\t\t\t\t\tTotal: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ deliveryCost + cartTotalPrice.value }}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<!-- Send order -->\n\t\t <button \n\t\t \tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t \t:disabled=\"\n\t\t errorName \n\t\t || errorPhoneOrMessenger \n\t\t || errorCity \n\t\t || errorAddress \n\t\t || errorDelivery \n\t\t || errorPayment\n\t\t \"\n\t\t @click=\"handleCreate()\" \n\t\t class=\"bg-main mn-b-small pd-small radius-big w-100 button\"\n\t\t >\n\t\t Place an Order\n\t\t </button>\n\n\t\t <p class='mn-b-thin'>\n\t\t\t\tI agree that placing the order places me under an obligation to make a payment in accordance with <a class=\"t-semi font-second t-second\" href=\"/legal/terms-of-use\" target=\"_blank\">Terms of Use.</a>\n\t\t\t</p>\n\t\t\t<p >\n\t\t\t\t\n\t\t\t</p>\n\t\t</div>\n\n\t</div>\n\n\t\n\t\n</section>\n\n</template>\n\n\n<script setup>\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Import components\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Block\nimport CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue'\n// Sections\nimport AskToLogin from '@pf/src/modules/orders/components/sections/AskToLogin.vue'\nimport Succes from '@pf/src/modules/orders/components/sections/Succes.vue'\nimport EmptyState from '@pf/src/modules/orders/components/sections/EmptyState.vue'\n\nimport FormCustomerDetails from '@pf/src/modules/orders/components/sections/FormCustomerDetails.vue'\nimport FormDelivery from '@pf/src/modules/orders/components/sections/FormDelivery.vue'\nimport FormPayment from '@pf/src/modules/orders/components/sections/FormPayment.vue'\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Import libs\n///////////////////////////////////////////////////////////////////////////////////////////////////\nimport { ref, computed, onMounted, watch } from 'vue'\nimport { useRoute,useRouter } from 'vue-router'\n// Store\nimport * as globals from '@pf/src/modules/globals/views/store/globals';\nimport * as auth from '@pf/src/modules/auth/views/store/auth';\nimport * as shopcart from '@pf/src/modules/orders/store/shopcart';\nimport * as organizations from '@pf/src/modules/organizations/store/organizations';\nimport * as orders from '@pf/src/modules/orders/store/orders';\nimport * as users from '@pf/src/modules/users/store/users';\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Variables and computed\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Accessing router and store\nconst route = useRoute()\nconst router = useRouter()\n// COMPUTED\nconst order = computed(() => orders.state.current)\nconst user = computed(() => users.state.current)\nconst cartTotalPrice = computed(() => shopcart.getters.cartTotalPrice)\nconst deliveryCost = computed(() => {\n if (orders.state.current.delivery.type === 'pickup') return 0;\n if (orders.state.current.delivery.type === 'mail') return 350;\n if (orders.state.current.delivery.type === 'courier') {\n const distance = orderOrganization.value[0]?.distance || 0;\n return Math.trunc(100 + 20 * distance - 7.5 * (distance / 10));\n }\n return 0;\n});\n\n// Computed property for total cost\nconst totalCost = computed(() => {\n return deliveryCost.value + cartTotalPrice.value.value;\n});\n// Organization\nconst orderOrganization = ref({})\n\n\nonMounted(async()=> {\n\torderOrganization.value = await organizations.actions.read({\n\t _id: shopcart.state.organization,\n\t location: globals.state.position?.location,\n\t})\n})\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// WATCHERS\n///////////////////////////////////////////////////////////////////////////////////////////////////\nwatch(() => orders.state.current.delivery.address, async (newFilterValue, oldFilterValue) => {\n\torderOrganization.value = await organizations.actions.read({\n\t _id: shopcart.state.organization,\n\t location: orders.state.current.delivery.location,\n\t})\n}, { deep: true })\n/////////////////////////////\n// Store Verification\n/////////////////////////////\nconst errorName = computed(() => {\n if (orders.state.current.customer.name?.length < 2) { return true } else { return false }\n});\n\nconst errorPhoneOrMessenger = computed(() => {\n const hasMessengerType = orders.state.current.customer.messenger?.type;\n const hasMessengerValue = orders.state.current.customer.messenger?.value?.length >\t 2;\n const hasPhone = orders.state.current.customer.number?.length > 0;\n // Ошибка, если нет ни номера телефона, ни корректного типа и значения мессенджера\n return !hasPhone && !(hasMessengerType && hasMessengerValue);\n});\n\nconst errorAddress = computed(() => {\n\tlet error = orders.state.current.delivery.type !== \"Pickup\" && orders.state.current.delivery.address < 2\n \n if (error) { return true } else { return false }\n});\n\nconst errorDelivery = computed(() => {\n if (orders.state.current.delivery.type) {return false } else {return true } \n})\n\nconst errorPayment = computed(() => {\n if (orders.state.current.payment.type) { return false } else {return true } \n})\n/////////////////////////////\n// Methods\n/////////////////////////////\nasync function handleCreate() {\n\n\torders.state.current.status = 'created';\n\n\torders.state.current.owner = {\n\t\ttarget: shopcart.state.organization,\n\t\ttype: 'organization'\n\t}\n\n\tif (auth.state.user._id) {\n\t\torders.state.current.creator = {\n\t\t\ttarget: auth.state.user._id,\n\t\t\ttype: 'User'\n\t\t}\n\t}\n\n\torders.state.current.positions = shopcart.state.positions\n\n \tconst referralCode = localStorage.getItem('referalCode');\n \n if (referralCode) {\n orders.state.current.referralCode = referralCode;\n }\n\n let order = await orders.actions.create(orders.state.current);\n\n if (order) {\n \tshopcart.actions.resetShopcart()\n\n \trouter.push({\n \t\tname: 'Order Status',\n \t\tparams: {\n \t\t\torder: order._id\n \t\t}\n \t})\n } else {\n \talert('something wrong')\n }\n}\n</script>\n\n<style lang=\"scss\">\n\n.round-wrapper {\n\tposition: relative;\n\n\t.round {\n\t\tmargin: 0;\n\t\tmargin-right: 1rem;\n\t}\n\n\tinput:checked {\n\t\tbackground: #00ff88;\n\t}\n\n\t.round-checkmark {\n\t\tposition: absolute;\n\t\twidth: 0.5rem;\n\t\theight: 0.5rem;\n\t\tbackground: white;\n\n\t\tleft: 0.5rem;\n\t\ttop: 0.5rem;\n\n\t\topacity: 1;\n\t}\n}\n</style>"],"names":["orders.state","users.state","shopcart.getters","organizations.actions","shopcart.state","globals.state","auth.state","order","orders.actions","shopcart.actions"],"mappings":"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"}
|
1
|
+
{"version":3,"file":"OrderCreate.vue.js","sources":["../../../../../../../src/modules/orders/components/pages/OrderCreate.vue"],"sourcesContent":["<template>\n\n<section class=\"pd-thin\">\n\n\t<!-- Ask to login -->\n\t<AskToLogin class=\"mn-b-thin\" v-if=\"auth.state.access.status === false\" /> \n\n\t<!-- Order form -->\n\t<div class=\"gap-small mn-b-thin cols-2\">\n\t\t<!-- Empty State -->\n\t\t<EmptyState \n\t\t\tv-if=\"shopcart.state.positions < 1\" \n\t\t/>\t\n\n\t\t<Succes \n\t\t\tv-if=\"order.status === true && shopcart.state.positions.length > 0\" \n\t\t\t:order=\"order\" \n\t\t/>\n\t\t<!-- Order Form -->\n\t\t<div\n\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\" \n\t\t\tclass=\"order-form col\"\n\t\t>\n\t\t\t<FormCustomerDetails\n\t\t\t\t:customer=\"orders.state.current.customer\"\n\t\t\t/>\n\t\t\t<FormDelivery \t\n\t\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t\t\t:order=\"orders.state.current\" \n\t\t\t/>\n\t\t\t<FormPayment \t\n\t\t\t\tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t\t\t:order=\"orders.state.current\" \n\t\t\t/>\n\t\t</div>\n\n\t\t<!-- Order positions -->\n\t\t<div \n\t\t\tv-if=\"shopcart.state.positions.length > 0\" \n\t\t\tclass=\"bg-light pd-medium radius-big\"\n\t\t>\n\t\t\t<h4 class=\"font-second mn-b-thin\">Your Order</h4>\n\n\t\t\t<ul class=\"flex gap-thin flex-wrap mn-b-thin\">\n\t\t\t\t<CardOrderItem \n\t\t\t\t\tv-for=\"product in shopcart.state.positions\" \n\t\t\t\t\t:key=\"product._id\" \n\t\t\t\t\t:editable=\"true\" \n\t\t\t\t\t:product=\"product\" \n\t :increase=\"product => shopcart.actions.incrementItemQuantity(product._id)\"\n\t :decrease=\"product => shopcart.actions.decrementItemQuantity(product._id)\"\n\t :remove=\"product => shopcart.actions.removeProduct(product._id)\"\n\t class=\"w-100 bg-white pd-small radius-medium\"\n\t />\n\t\t\t</ul>\n\n\t\t\t<div \n\t\t\t\tclass=\"bg-main pd-thin radius-medium mn-b-thin\"\n\t\t\t>\t\n\t\t\t\t<p class=\"pd-small br-b br-solid br-black-transp-10\">\n\t\t\t\t\tSubtotal: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ cartTotalPrice }}\n\t\t\t\t</p>\n\t\t\t\t<p class=\"pd-small br-b br-solid br-black-transp-10\">\n\t\t\t\t\tDelivery: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ deliveryCost }}\n\t\t\t\t</p>\n\t\t\t\t<p class=\"pd-small h3\">\n\t\t\t\t\tTotal: \n\t\t\t\t\t{{ returnCurrency() }} \n\t\t\t\t\t{{ deliveryCost + cartTotalPrice.value }}\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<!-- Send order -->\n\t\t <button \n\t\t \tv-if=\"orders.state.current.status !== true && shopcart.state.positions.length > 0\"\n\t\t \t:disabled=\"\n\t\t errorName \n\t\t || errorPhoneOrMessenger \n\t\t || errorCity \n\t\t || errorAddress \n\t\t || errorDelivery \n\t\t || errorPayment\n\t\t \"\n\t\t @click=\"handleCreate()\" \n\t\t class=\"bg-main mn-b-small pd-small radius-big w-100 button\"\n\t\t >\n\t\t Place an Order\n\t\t </button>\n\n\t\t <p class='mn-b-thin'>\n\t\t\t\tI agree that placing the order places me under an obligation to make a payment in accordance with <a class=\"t-semi font-second t-second\" href=\"/legal/terms-of-use\" target=\"_blank\">Terms of Use.</a>\n\t\t\t</p>\n\t\t\t<p >\n\t\t\t\t\n\t\t\t</p>\n\t\t</div>\n\n\t</div>\n\n\t\n\t\n</section>\n\n</template>\n\n\n<script setup>\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Import components\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Block\nimport CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue'\n// Sections\nimport AskToLogin from '@pf/src/modules/orders/components/sections/AskToLogin.vue'\nimport Succes from '@pf/src/modules/orders/components/sections/Succes.vue'\nimport EmptyState from '@pf/src/modules/orders/components/sections/EmptyState.vue'\n\nimport FormCustomerDetails from '@pf/src/modules/orders/components/sections/FormCustomerDetails.vue'\nimport FormDelivery from '@pf/src/modules/orders/components/sections/FormDelivery.vue'\nimport FormPayment from '@pf/src/modules/orders/components/sections/FormPayment.vue'\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Import libs\n///////////////////////////////////////////////////////////////////////////////////////////////////\nimport { ref, computed, onMounted, watch } from 'vue'\nimport { useRoute,useRouter } from 'vue-router'\n// Store\nimport * as globals from '@pf/src/modules/globals/views/store/globals';\nimport * as auth from '@pf/src/modules/auth/views/store/auth';\nimport * as shopcart from '@pf/src/modules/orders/store/shopcart';\nimport * as organizations from '@pf/src/modules/organizations/store/organizations';\nimport * as orders from '@pf/src/modules/orders/store/orders';\nimport * as users from '@pf/src/modules/auth/views/store/users';\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Variables and computed\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// Accessing router and store\nconst route = useRoute()\nconst router = useRouter()\n// COMPUTED\nconst order = computed(() => orders.state.current)\nconst user = computed(() => users.state.current)\nconst cartTotalPrice = computed(() => shopcart.getters.cartTotalPrice)\nconst deliveryCost = computed(() => {\n if (orders.state.current.delivery.type === 'pickup') return 0;\n if (orders.state.current.delivery.type === 'mail') return 350;\n if (orders.state.current.delivery.type === 'courier') {\n const distance = orderOrganization.value[0]?.distance || 0;\n return Math.trunc(100 + 20 * distance - 7.5 * (distance / 10));\n }\n return 0;\n});\n\n// Computed property for total cost\nconst totalCost = computed(() => {\n return deliveryCost.value + cartTotalPrice.value.value;\n});\n// Organization\nconst orderOrganization = ref({})\n\n\nonMounted(async()=> {\n\torderOrganization.value = await organizations.actions.read({\n\t _id: shopcart.state.organization,\n\t location: globals.state.position?.location,\n\t})\n})\n///////////////////////////////////////////////////////////////////////////////////////////////////\n// WATCHERS\n///////////////////////////////////////////////////////////////////////////////////////////////////\nwatch(() => orders.state.current.delivery.address, async (newFilterValue, oldFilterValue) => {\n\torderOrganization.value = await organizations.actions.read({\n\t _id: shopcart.state.organization,\n\t location: orders.state.current.delivery.location,\n\t})\n}, { deep: true })\n/////////////////////////////\n// Store Verification\n/////////////////////////////\nconst errorName = computed(() => {\n if (orders.state.current.customer.name?.length < 2) { return true } else { return false }\n});\n\nconst errorPhoneOrMessenger = computed(() => {\n const hasMessengerType = orders.state.current.customer.messenger?.type;\n const hasMessengerValue = orders.state.current.customer.messenger?.value?.length >\t 2;\n const hasPhone = orders.state.current.customer.number?.length > 0;\n // Ошибка, если нет ни номера телефона, ни корректного типа и значения мессенджера\n return !hasPhone && !(hasMessengerType && hasMessengerValue);\n});\n\nconst errorAddress = computed(() => {\n\tlet error = orders.state.current.delivery.type !== \"Pickup\" && orders.state.current.delivery.address < 2\n \n if (error) { return true } else { return false }\n});\n\nconst errorDelivery = computed(() => {\n if (orders.state.current.delivery.type) {return false } else {return true } \n})\n\nconst errorPayment = computed(() => {\n if (orders.state.current.payment.type) { return false } else {return true } \n})\n/////////////////////////////\n// Methods\n/////////////////////////////\nasync function handleCreate() {\n\n\torders.state.current.status = 'created';\n\n\torders.state.current.owner = {\n\t\ttarget: shopcart.state.organization,\n\t\ttype: 'organization'\n\t}\n\n\tif (auth.state.user._id) {\n\t\torders.state.current.creator = {\n\t\t\ttarget: auth.state.user._id,\n\t\t\ttype: 'User'\n\t\t}\n\t}\n\n\torders.state.current.positions = shopcart.state.positions\n\n \tconst referralCode = localStorage.getItem('referalCode');\n \n if (referralCode) {\n orders.state.current.referralCode = referralCode;\n }\n\n let order = await orders.actions.create(orders.state.current);\n\n if (order) {\n \tshopcart.actions.resetShopcart()\n\n \trouter.push({\n \t\tname: 'Order Status',\n \t\tparams: {\n \t\t\torder: order._id\n \t\t}\n \t})\n } else {\n \talert('something wrong')\n }\n}\n</script>\n\n<style lang=\"scss\">\n\n.round-wrapper {\n\tposition: relative;\n\n\t.round {\n\t\tmargin: 0;\n\t\tmargin-right: 1rem;\n\t}\n\n\tinput:checked {\n\t\tbackground: #00ff88;\n\t}\n\n\t.round-checkmark {\n\t\tposition: absolute;\n\t\twidth: 0.5rem;\n\t\theight: 0.5rem;\n\t\tbackground: white;\n\n\t\tleft: 0.5rem;\n\t\ttop: 0.5rem;\n\n\t\topacity: 1;\n\t}\n}\n</style>"],"names":["orders.state","users.state","shopcart.getters","organizations.actions","shopcart.state","globals.state","auth.state","order","orders.actions","shopcart.actions"],"mappings":"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"}
|
package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs
CHANGED
@@ -11,7 +11,7 @@ const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
|
11
11
|
const CardOrderItem = require("../blocks/CardOrderItem.vue.cjs");
|
12
12
|
;/* empty css */
|
13
13
|
;/* empty css */
|
14
|
-
const CardUser = require("../../../
|
14
|
+
const CardUser = require("../../../auth/views/components/blocks/CardUser.vue.cjs");
|
15
15
|
const FormAddCustomer = require("../sections/FormAddCustomer.vue.cjs");
|
16
16
|
const FormDelivery = require("../sections/FormDelivery.vue.cjs");
|
17
17
|
const FormPayment = require("../sections/FormPayment.vue.cjs");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"OrderCreateBackoffice.vue.cjs","sources":["../../../../../../../src/modules/orders/components/pages/OrderCreateBackoffice.vue"],"sourcesContent":["<template>\n <div class=\"h-100 flex flex-column pd-thin\">\n <Block class=\"mn-b-thin\">\n <header class=\"flex-v-center flex-nowrap flex\">\n <h2 class=\"mn-r-auto\">Create Order</h2>\n <Button \n :submit=\"onSubmit\"\n :callback=\"redirectTo\"\n class=\"pd-small radius-big bg-main t-black uppercase t-medium\"\n >\n Add Order \n </Button>\n </header>\n </Block>\n\n <Tab \n v-model:selected=\"tabOrderCreate\"\n :tabs=\"[\n {name: 'Positions', value: 'positions'},\n {name: 'Customer', value: 'customer'},\n {name: 'Delivery', value: 'delivery'},\n {name: 'Payment', value: 'payment'}\n ]\"\n class=\"t-medium radius-medium bg-light mn-b-small\"\n />\n\n <Popup \n @close-popup=\"closeProductsPopup\" \n :isPopupOpen=\"isOpenProductsPopup\"\n class=\"bg-white w-min-30r w-max-30r h-max-100 flex flex-column radius-big pd-medium pos-relative\"\n >\n\n <h3 class=\"mn-b-small\">Add to order</h3>\n\n <div class=\"bg-light h-max-100 mn-b-thin o-scroll pd-medium radius-big\">\n <Feed\n :search=\"{\n placeholder: 'Search products...',\n class: 'bg-white mn-b-thin'\n }\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no such products available.'\n }\n }\"\n :store=\"{\n read: (options) => products.actions.read(options),\n state: null\n }\"\n :options=\"{\n organization: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"\"\n >\n <CardOrderItem\n v-for=\"(product, index) in items\" :key=\"product._id\"\n :editable=\"false\" \n :product=\"product\" \n @click=\"() => { \n let p = { ...product };\n p.quantity = 1;\n globals.actions.add(orders.state.current.positions, p) \n closeProductsPopup();\n }\"\n class=\"bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </div>\n </Popup>\n\n <Block\n v-if=\"tabOrderCreate === 'positions'\"\n title=\"Positions\"\n :actions=\"[{\n label: '+',\n function: () => openProductsPopup()\n }]\"\n class=\"mn-b-small\"\n >\n <span \n v-if=\"orders.state.current.positions.length === 0\" \n class=\"w-100\"\n >\n No positions added yet\n </span> \n\n <CardOrderItem\n v-for=\"(product, index) in orders.state.current.positions\" \n :key=\"product._id\"\n :editable=\"true\" \n :product=\"product\" \n @increase=\"() => { globals.actions.increment(orders.state.current.positions, product) }\"\n @decrease=\"() => { globals.actions.decrement(orders.state.current.positions, product) }\"\n @remove=\"() => { globals.actions.delete(orders.state.current.positions, product) }\"\n class=\"mn-b-thin pd-thin radius-medium bg-white\"\n /> \n </Block>\n\n <Block\n v-if=\"tabOrderCreate === 'customer'\"\n title=\"Customer\"\n class=\"mn-b-semi\"\n :actions=\"[{\n label: '+',\n function: () => openCustomerPopup()\n }]\"\n >\n <CardUser\n v-if=\"orders.state.current.customer._id\"\n :user=\"orders.state.current.customer\"\n :photo=\"orders.state.current.customer.profile.photo\"\n :name=\"orders.state.current.customer.profile.name || orders.state.current.customer.phone || orders.state.current.customer.email\"\n @click=\"() => { \n orders.mutations.resetCustomer(orders.state.current.customer)\n }\"\n class=\"bg-white pd-thin h-4r radius-medium w-100 mn-b-thin\"\n />\n <Feed\n v-else\n :search=\"{\n placeholder: 'Search customer...',\n class: 'bg-white mn-b-thin'\n }\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no such products available.'\n }\n }\"\n :store=\"{\n read: (options) => customers.read(options),\n state: null\n }\"\n :options=\"{\n owner: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"bg-light h-max-20r o-scroll\"\n >\n <CardUser\n v-for=\"(user, index) in items\" \n :key=\"user._id\"\n :user=\"user\"\n :photo=\"user.profile.photo\"\n :name=\"user.profile.name || user.phone || user.email\"\n @click=\"() => { \n orders.state.current.customer = user\n }\"\n class=\"bg-white pd-thin h-4r radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n \n </Block>\n\n <FormDelivery \n v-if=\"tabOrderCreate === 'delivery'\" \n :order=\"orders.state.current\" \n />\n\n <FormPayment \n v-if=\"tabOrderCreate === 'payment'\"\n :order=\"orders.state.current\" \n />\n\n <Popup \n title=\"Add customer\" \n @close-popup=\"closeCustomerPopup\" \n :isPopupOpen=\"isOpenCustomerPopup\"\n :class=\"'bg-white w-min-30r w-max-30r radius-big pd-medium'\"\n >\n <FormAddCustomer \n @callbackCustomer=\"closeCustomerPopup\"\n />\n </Popup>\n\n <Block\n class=\"mn-b-semi\"\n >\n <div class=\"h3 flex\">\n <span class=\"mn-r-auto t-transp\">In total</span>\n <span>{{ cartTotalPrice }} {{returnCurrency()}} </span >\n </div>\n </Block>\n</div>\n\n\n</template>\n\n<script setup=\"props\">\n import { computed, ref, defineProps, onMounted, reactive, toRefs, watch } from 'vue'\n import { useRoute, useRouter } from 'vue-router'\n\n\n import Field from '@pf/src/components/Field/Field.vue'\n import Button from \"@pf/src/components/Button/Button.vue\"; \n import Tab from '@pf/src/components/Tab/Tab.vue'\n import Popup from '@pf/src/components/Popup/Popup.vue';\n\timport Block from '@pf/src/components/Block/Block.vue';\n import Feed from '@pf/src/components/Feed/Feed.vue'\n\n import CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue'\n import CardPosition from '@pf/src/modules/products/components/blocks/CardPosition.vue';\n import CardUser from '@pf/src/modules/users/components/blocks/CardUser.vue'\n\n import BlockSearch from '@pf/src/modules/globals/views/components/blocks/BlockSearch.vue'\n\n import FormAddCustomer from '@pf/src/modules/orders/components/sections/FormAddCustomer.vue'\n import FormDelivery from '@pf/src/modules/orders/components/sections/FormDelivery.vue'\n import FormPayment from '@pf/src/modules/orders/components/sections/FormPayment.vue'\n\n // Import your store\n import * as globals from '@pf/src/modules/globals/views/store/globals';\n import * as auth from '@pf/src/modules/auth/views/store/auth';\n import * as orders from '@pf/src/modules/orders/store/orders';\n import * as products from '@pf/src/modules/products/store/products';\n\n import customers from '@pf/src/modules/orders/store/customers.store';\n\t\n // Accessing router\n const route = useRoute()\n const router = useRouter()\n\n orders.mutations.resetOrder(orders.state.current)\n\n let cartTotalPrice = computed(() => {\n return Number(orders.state.current.positions.reduce((total, product) => {\n return total + product.price * product.quantity;\n }, 0));\n })\n\n // Tab\n const tabOrderCreate = ref('positions')\n\n // Popup\n const isOpenProductsPopup = ref(false);\n\n function openProductsPopup() {\n isOpenProductsPopup.value = true;\n }\n\n function closeProductsPopup() {\n isOpenProductsPopup.value = false;\n }\n\n const isOpenCustomerPopup = ref(false);\n\n function openCustomerPopup() {\n isOpenCustomerPopup.value = true;\n }\n\n function closeCustomerPopup() {\n isOpenCustomerPopup.value = false;\n }\n\n // Data\n let order = ref(null)\n\n function onSubmit() {\n\n orders.state.current.creator = {\n type: 'User',\n target: auth.state.user._id\n }\n\n orders.state.current.owner = {\n type: 'Organization',\n target: route.params._id,\n }\n\n orders.state.current.customer = {\n type: 'Customer',\n target: orders.state.current.customer._id || null,\n }\n\n orders.actions.create(orders.state.current)\n }\n\n function redirectTo () {\n router.push({\n name: 'Backoffice Orders', \n params: { \n _id: route.params._id\n } \n })\n }\n\n onMounted(() => {\n\n // await orders.actions.fetchOrder(route.params.id) // Implement this action in your store\n\n // order.value = orders.state.current\n })\n\n</script>\n\n\n<style lang=\"scss\">\n\n.vue-select {\n width: inherit;\n\n margin-right: 1rem;\n}\n.vue-select-header {\n height: 3rem;\n}\n</style>\n"],"names":["useRoute","useRouter","orders.mutations","orders.state","computed","ref","auth.state","orders.actions","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiOE,UAAM,QAAQA,UAAAA,SAAU;AACxB,UAAM,SAASC,UAAAA,UAAW;AAEzBC,qBAAiB,WAAWC,OAAY,MAAC,OAAO;AAEjD,QAAI,iBAAiBC,IAAAA,SAAS,MAAM;AAClC,aAAO,OAAOD,OAAAA,MAAa,QAAQ,UAAU,OAAO,CAAC,OAAO,YAAY;AACtE,eAAO,QAAQ,QAAQ,QAAQ,QAAQ;AAAA,MAC7C,GAAO,CAAC,CAAC;AAAA,IACT,CAAG;AAGD,UAAM,iBAAiBE,IAAG,IAAC,WAAW;AAGtC,UAAM,sBAAsBA,QAAI,KAAK;AAErC,aAAS,oBAAoB;AAC3B,0BAAoB,QAAQ;AAAA,IAC7B;AAED,aAAS,qBAAqB;AAC5B,0BAAoB,QAAQ;AAAA,IAC7B;AAED,UAAM,sBAAsBA,QAAI,KAAK;AAErC,aAAS,oBAAoB;AAC3B,0BAAoB,QAAQ;AAAA,IAC7B;AAED,aAAS,qBAAqB;AAC5B,0BAAoB,QAAQ;AAAA,IAC7B;AAGWA,QAAAA,IAAI,IAAI;AAEpB,aAAS,WAAW;AAElBF,aAAY,MAAC,QAAQ,UAAU;AAAA,QAC7B,MAAM;AAAA,QACN,QAAQG,KAAAA,MAAW,KAAK;AAAA,MACzB;AAEDH,aAAY,MAAC,QAAQ,QAAQ;AAAA,QAC3B,MAAM;AAAA,QACN,QAAQ,MAAM,OAAO;AAAA,MACtB;AAEDA,aAAY,MAAC,QAAQ,WAAW;AAAA,QAC9B,MAAM;AAAA,QACN,QAAQA,OAAAA,MAAa,QAAQ,SAAS,OAAO;AAAA,MAC9C;AAEDI,qBAAe,OAAOJ,OAAY,MAAC,OAAO;AAAA,IAC3C;AAED,aAAS,aAAc;AACrB,aAAO,KAAK;AAAA,QACV,MAAM;AAAA,QACN,QAAQ;AAAA,UACN,KAAK,MAAM,OAAO;AAAA,QACnB;AAAA,MACP,CAAK;AAAA,IACF;AAEDK,QAAAA,UAAU,MAAM;AAAA,IAKlB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"OrderCreateBackoffice.vue.cjs","sources":["../../../../../../../src/modules/orders/components/pages/OrderCreateBackoffice.vue"],"sourcesContent":["<template>\n <div class=\"h-100 flex flex-column pd-thin\">\n <Block class=\"mn-b-thin\">\n <header class=\"flex-v-center flex-nowrap flex\">\n <h2 class=\"mn-r-auto\">Create Order</h2>\n <Button \n :submit=\"onSubmit\"\n :callback=\"redirectTo\"\n class=\"pd-small radius-big bg-main t-black uppercase t-medium\"\n >\n Add Order \n </Button>\n </header>\n </Block>\n\n <Tab \n v-model:selected=\"tabOrderCreate\"\n :tabs=\"[\n {name: 'Positions', value: 'positions'},\n {name: 'Customer', value: 'customer'},\n {name: 'Delivery', value: 'delivery'},\n {name: 'Payment', value: 'payment'}\n ]\"\n class=\"t-medium radius-medium bg-light mn-b-small\"\n />\n\n <Popup \n @close-popup=\"closeProductsPopup\" \n :isPopupOpen=\"isOpenProductsPopup\"\n class=\"bg-white w-min-30r w-max-30r h-max-100 flex flex-column radius-big pd-medium pos-relative\"\n >\n\n <h3 class=\"mn-b-small\">Add to order</h3>\n\n <div class=\"bg-light h-max-100 mn-b-thin o-scroll pd-medium radius-big\">\n <Feed\n :search=\"{\n placeholder: 'Search products...',\n class: 'bg-white mn-b-thin'\n }\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no such products available.'\n }\n }\"\n :store=\"{\n read: (options) => products.actions.read(options),\n state: null\n }\"\n :options=\"{\n organization: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"\"\n >\n <CardOrderItem\n v-for=\"(product, index) in items\" :key=\"product._id\"\n :editable=\"false\" \n :product=\"product\" \n @click=\"() => { \n let p = { ...product };\n p.quantity = 1;\n globals.actions.add(orders.state.current.positions, p) \n closeProductsPopup();\n }\"\n class=\"bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </div>\n </Popup>\n\n <Block\n v-if=\"tabOrderCreate === 'positions'\"\n title=\"Positions\"\n :actions=\"[{\n label: '+',\n function: () => openProductsPopup()\n }]\"\n class=\"mn-b-small\"\n >\n <span \n v-if=\"orders.state.current.positions.length === 0\" \n class=\"w-100\"\n >\n No positions added yet\n </span> \n\n <CardOrderItem\n v-for=\"(product, index) in orders.state.current.positions\" \n :key=\"product._id\"\n :editable=\"true\" \n :product=\"product\" \n @increase=\"() => { globals.actions.increment(orders.state.current.positions, product) }\"\n @decrease=\"() => { globals.actions.decrement(orders.state.current.positions, product) }\"\n @remove=\"() => { globals.actions.delete(orders.state.current.positions, product) }\"\n class=\"mn-b-thin pd-thin radius-medium bg-white\"\n /> \n </Block>\n\n <Block\n v-if=\"tabOrderCreate === 'customer'\"\n title=\"Customer\"\n class=\"mn-b-semi\"\n :actions=\"[{\n label: '+',\n function: () => openCustomerPopup()\n }]\"\n >\n <CardUser\n v-if=\"orders.state.current.customer._id\"\n :user=\"orders.state.current.customer\"\n :photo=\"orders.state.current.customer.profile.photo\"\n :name=\"orders.state.current.customer.profile.name || orders.state.current.customer.phone || orders.state.current.customer.email\"\n @click=\"() => { \n orders.mutations.resetCustomer(orders.state.current.customer)\n }\"\n class=\"bg-white pd-thin h-4r radius-medium w-100 mn-b-thin\"\n />\n <Feed\n v-else\n :search=\"{\n placeholder: 'Search customer...',\n class: 'bg-white mn-b-thin'\n }\"\n :states=\"{\n empty: {\n title: 'No Products Found',\n description: 'Currently, there are no such products available.'\n }\n }\"\n :store=\"{\n read: (options) => customers.read(options),\n state: null\n }\"\n :options=\"{\n owner: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"bg-light h-max-20r o-scroll\"\n >\n <CardUser\n v-for=\"(user, index) in items\" \n :key=\"user._id\"\n :user=\"user\"\n :photo=\"user.profile.photo\"\n :name=\"user.profile.name || user.phone || user.email\"\n @click=\"() => { \n orders.state.current.customer = user\n }\"\n class=\"bg-white pd-thin h-4r radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n \n </Block>\n\n <FormDelivery \n v-if=\"tabOrderCreate === 'delivery'\" \n :order=\"orders.state.current\" \n />\n\n <FormPayment \n v-if=\"tabOrderCreate === 'payment'\"\n :order=\"orders.state.current\" \n />\n\n <Popup \n title=\"Add customer\" \n @close-popup=\"closeCustomerPopup\" \n :isPopupOpen=\"isOpenCustomerPopup\"\n :class=\"'bg-white w-min-30r w-max-30r radius-big pd-medium'\"\n >\n <FormAddCustomer \n @callbackCustomer=\"closeCustomerPopup\"\n />\n </Popup>\n\n <Block\n class=\"mn-b-semi\"\n >\n <div class=\"h3 flex\">\n <span class=\"mn-r-auto t-transp\">In total</span>\n <span>{{ cartTotalPrice }} {{returnCurrency()}} </span >\n </div>\n </Block>\n</div>\n\n\n</template>\n\n<script setup=\"props\">\n import { computed, ref, defineProps, onMounted, reactive, toRefs, watch } from 'vue'\n import { useRoute, useRouter } from 'vue-router'\n\n\n import Field from '@pf/src/components/Field/Field.vue'\n import Button from \"@pf/src/components/Button/Button.vue\"; \n import Tab from '@pf/src/components/Tab/Tab.vue'\n import Popup from '@pf/src/components/Popup/Popup.vue';\n\timport Block from '@pf/src/components/Block/Block.vue';\n import Feed from '@pf/src/components/Feed/Feed.vue'\n\n import CardOrderItem from '@pf/src/modules/orders/components/blocks/CardOrderItem.vue'\n import CardPosition from '@pf/src/modules/products/components/blocks/CardPosition.vue';\n import CardUser from '@pf/src/modules/auth/views/components/blocks/CardUser.vue'\n\n import BlockSearch from '@pf/src/modules/globals/views/components/blocks/BlockSearch.vue'\n\n import FormAddCustomer from '@pf/src/modules/orders/components/sections/FormAddCustomer.vue'\n import FormDelivery from '@pf/src/modules/orders/components/sections/FormDelivery.vue'\n import FormPayment from '@pf/src/modules/orders/components/sections/FormPayment.vue'\n\n // Import your store\n import * as globals from '@pf/src/modules/globals/views/store/globals';\n import * as auth from '@pf/src/modules/auth/views/store/auth';\n import * as orders from '@pf/src/modules/orders/store/orders';\n import * as products from '@pf/src/modules/products/store/products';\n\n import customers from '@pf/src/modules/orders/store/customers.store';\n\t\n // Accessing router\n const route = useRoute()\n const router = useRouter()\n\n orders.mutations.resetOrder(orders.state.current)\n\n let cartTotalPrice = computed(() => {\n return Number(orders.state.current.positions.reduce((total, product) => {\n return total + product.price * product.quantity;\n }, 0));\n })\n\n // Tab\n const tabOrderCreate = ref('positions')\n\n // Popup\n const isOpenProductsPopup = ref(false);\n\n function openProductsPopup() {\n isOpenProductsPopup.value = true;\n }\n\n function closeProductsPopup() {\n isOpenProductsPopup.value = false;\n }\n\n const isOpenCustomerPopup = ref(false);\n\n function openCustomerPopup() {\n isOpenCustomerPopup.value = true;\n }\n\n function closeCustomerPopup() {\n isOpenCustomerPopup.value = false;\n }\n\n // Data\n let order = ref(null)\n\n function onSubmit() {\n\n orders.state.current.creator = {\n type: 'User',\n target: auth.state.user._id\n }\n\n orders.state.current.owner = {\n type: 'Organization',\n target: route.params._id,\n }\n\n orders.state.current.customer = {\n type: 'Customer',\n target: orders.state.current.customer._id || null,\n }\n\n orders.actions.create(orders.state.current)\n }\n\n function redirectTo () {\n router.push({\n name: 'Backoffice Orders', \n params: { \n _id: route.params._id\n } \n })\n }\n\n onMounted(() => {\n\n // await orders.actions.fetchOrder(route.params.id) // Implement this action in your store\n\n // order.value = orders.state.current\n })\n\n</script>\n\n\n<style lang=\"scss\">\n\n.vue-select {\n width: inherit;\n\n margin-right: 1rem;\n}\n.vue-select-header {\n height: 3rem;\n}\n</style>\n"],"names":["useRoute","useRouter","orders.mutations","orders.state","computed","ref","auth.state","orders.actions","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiOE,UAAM,QAAQA,UAAAA,SAAU;AACxB,UAAM,SAASC,UAAAA,UAAW;AAEzBC,qBAAiB,WAAWC,OAAY,MAAC,OAAO;AAEjD,QAAI,iBAAiBC,IAAAA,SAAS,MAAM;AAClC,aAAO,OAAOD,OAAAA,MAAa,QAAQ,UAAU,OAAO,CAAC,OAAO,YAAY;AACtE,eAAO,QAAQ,QAAQ,QAAQ,QAAQ;AAAA,MAC7C,GAAO,CAAC,CAAC;AAAA,IACT,CAAG;AAGD,UAAM,iBAAiBE,IAAG,IAAC,WAAW;AAGtC,UAAM,sBAAsBA,QAAI,KAAK;AAErC,aAAS,oBAAoB;AAC3B,0BAAoB,QAAQ;AAAA,IAC7B;AAED,aAAS,qBAAqB;AAC5B,0BAAoB,QAAQ;AAAA,IAC7B;AAED,UAAM,sBAAsBA,QAAI,KAAK;AAErC,aAAS,oBAAoB;AAC3B,0BAAoB,QAAQ;AAAA,IAC7B;AAED,aAAS,qBAAqB;AAC5B,0BAAoB,QAAQ;AAAA,IAC7B;AAGWA,QAAAA,IAAI,IAAI;AAEpB,aAAS,WAAW;AAElBF,aAAY,MAAC,QAAQ,UAAU;AAAA,QAC7B,MAAM;AAAA,QACN,QAAQG,KAAAA,MAAW,KAAK;AAAA,MACzB;AAEDH,aAAY,MAAC,QAAQ,QAAQ;AAAA,QAC3B,MAAM;AAAA,QACN,QAAQ,MAAM,OAAO;AAAA,MACtB;AAEDA,aAAY,MAAC,QAAQ,WAAW;AAAA,QAC9B,MAAM;AAAA,QACN,QAAQA,OAAAA,MAAa,QAAQ,SAAS,OAAO;AAAA,MAC9C;AAEDI,qBAAe,OAAOJ,OAAY,MAAC,OAAO;AAAA,IAC3C;AAED,aAAS,aAAc;AACrB,aAAO,KAAK;AAAA,QACV,MAAM;AAAA,QACN,QAAQ;AAAA,UACN,KAAK,MAAM,OAAO;AAAA,QACnB;AAAA,MACP,CAAK;AAAA,IACF;AAEDK,QAAAA,UAAU,MAAM;AAAA,IAKlB,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js
CHANGED
@@ -9,7 +9,7 @@ import _sfc_main$5 from "../../../../components/Feed/Feed.vue.js";
|
|
9
9
|
import _sfc_main$6 from "../blocks/CardOrderItem.vue.js";
|
10
10
|
/* empty css */
|
11
11
|
/* empty css */
|
12
|
-
import _sfc_main$7 from "../../../
|
12
|
+
import _sfc_main$7 from "../../../auth/views/components/blocks/CardUser.vue.js";
|
13
13
|
import _sfc_main$a from "../sections/FormAddCustomer.vue.js";
|
14
14
|
import _sfc_main$8 from "../sections/FormDelivery.vue.js";
|
15
15
|
import _sfc_main$9 from "../sections/FormPayment.vue.js";
|