@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
package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Department.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/pages/Department.vue"],"sourcesContent":["<template>\n <div class=\"for-transition w-100\">\n \n <div v-if=\"departments.state.department\" id=\"dash\" class=\"pd-medium bg-light\">\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <div class=\"flex-nowrap flex mn-b-small\">\n\n <h2 class=\"w-100\">{{ departments.state.department.profile.name }}</h2>\n\n <router-link \n :to=\"{\n name: 'Department Edit', \n params: {\n _id: route.params._id,\n department: route.params.department\n }\n }\" \n class=\"\n cursor-pointer \n pos-absolute pos-t-regular pos-r-regular\n radius-extra pd-thin bg-second\n \"\n >\n <IconEdit\n class=\"i-regular\"\n classes=\"fill-white\"\n />\n </router-link>\n\n </div>\n <p class=\"t-transp p-big\" v-html=\"departments.state.department.description\"></p>\n </section>\n\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <h3 class=\"mn-b-regular\">Команда</h3>\n <ul>\n <li v-if=\"departments.state.department.members.length < 1\">В отделе еще нет участников</li>\n <User \n class=\"br-b br-solid br-grey-transp-25\" \n v-for=\"(member, index) in departments.state.department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n @click=\"$router.push(`/app/profile/${member.user._id}`)\" \n />\n </ul>\n </section>\n\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <h3 class=\"mn-b-regular\">Подотделы</h3>\n <ul>\n <li v-if=\"departments.state.department.subdepartments.length < 1\">В отделе еще нет подотделов</li>\n <DepartmentSub v-for=\"(subdepartment, index) in departments.state.department.subdepartments\" @click=\"$router.push(`/app/organization/departments/${subdepartment._id}`)\" :key=\"index\" class=\"br-b br-solid br-grey-transp-25\" :department=\"subdepartment\" />\n </ul> \n </section>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { useRoute, useRouter } from 'vue-router';\n\nimport Spoiler from '@pf/src/components/Spoiler/Spoiler.vue';\nimport DepartmentSub from '@pf/src/modules/organizations/components/blocks/DepartmentSub.vue';\nimport User from '@pf/src/modules/
|
1
|
+
{"version":3,"file":"Department.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/pages/Department.vue"],"sourcesContent":["<template>\n <div class=\"for-transition w-100\">\n \n <div v-if=\"departments.state.department\" id=\"dash\" class=\"pd-medium bg-light\">\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <div class=\"flex-nowrap flex mn-b-small\">\n\n <h2 class=\"w-100\">{{ departments.state.department.profile.name }}</h2>\n\n <router-link \n :to=\"{\n name: 'Department Edit', \n params: {\n _id: route.params._id,\n department: route.params.department\n }\n }\" \n class=\"\n cursor-pointer \n pos-absolute pos-t-regular pos-r-regular\n radius-extra pd-thin bg-second\n \"\n >\n <IconEdit\n class=\"i-regular\"\n classes=\"fill-white\"\n />\n </router-link>\n\n </div>\n <p class=\"t-transp p-big\" v-html=\"departments.state.department.description\"></p>\n </section>\n\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <h3 class=\"mn-b-regular\">Команда</h3>\n <ul>\n <li v-if=\"departments.state.department.members.length < 1\">В отделе еще нет участников</li>\n <User \n class=\"br-b br-solid br-grey-transp-25\" \n v-for=\"(member, index) in departments.state.department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n @click=\"$router.push(`/app/profile/${member.user._id}`)\" \n />\n </ul>\n </section>\n\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <h3 class=\"mn-b-regular\">Подотделы</h3>\n <ul>\n <li v-if=\"departments.state.department.subdepartments.length < 1\">В отделе еще нет подотделов</li>\n <DepartmentSub v-for=\"(subdepartment, index) in departments.state.department.subdepartments\" @click=\"$router.push(`/app/organization/departments/${subdepartment._id}`)\" :key=\"index\" class=\"br-b br-solid br-grey-transp-25\" :department=\"subdepartment\" />\n </ul> \n </section>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { useRoute, useRouter } from 'vue-router';\n\nimport Spoiler from '@pf/src/components/Spoiler/Spoiler.vue';\nimport DepartmentSub from '@pf/src/modules/organizations/components/blocks/DepartmentSub.vue';\nimport User from '@pf/src/modules/auth/views/components/blocks/CardUser.vue';\nimport * as departments from '@pf/src/modules/organizations/store/departments';\n\nimport IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'\n\nconst router = useRouter();\nconst route = useRoute();\n\nawait departments.actions.readOne(route.params.department);\n</script>\n\n<style scoped>\n</style>\n"],"names":["useRouter","useRoute","_withAsyncContext","departments.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEeA,cAAAA,UAAY;AAC3B,UAAM,QAAQC,UAAQ,SAAA;AAEtB,IAAM,CAAA,QAAA,SAAA,IAAAC,qBAAA,MAAAC,oBAAoB,QAAQ,MAAM,OAAO,UAAU,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js
CHANGED
@@ -2,7 +2,7 @@ import { withAsyncContext, resolveComponent, openBlock, createElementBlock, crea
|
|
2
2
|
import { useRouter, useRoute } from "vue-router";
|
3
3
|
/* empty css */
|
4
4
|
import DepartmentSub from "../blocks/DepartmentSub.vue.js";
|
5
|
-
import _sfc_main$2 from "../../../
|
5
|
+
import _sfc_main$2 from "../../../auth/views/components/blocks/CardUser.vue.js";
|
6
6
|
import { actions, state } from "../../store/departments.js";
|
7
7
|
import _sfc_main$1 from "../../../icons/navigation/IconEdit.vue.js";
|
8
8
|
const _hoisted_1 = { class: "for-transition w-100" };
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Department.vue.js","sources":["../../../../../../../src/modules/organizations/components/pages/Department.vue"],"sourcesContent":["<template>\n <div class=\"for-transition w-100\">\n \n <div v-if=\"departments.state.department\" id=\"dash\" class=\"pd-medium bg-light\">\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <div class=\"flex-nowrap flex mn-b-small\">\n\n <h2 class=\"w-100\">{{ departments.state.department.profile.name }}</h2>\n\n <router-link \n :to=\"{\n name: 'Department Edit', \n params: {\n _id: route.params._id,\n department: route.params.department\n }\n }\" \n class=\"\n cursor-pointer \n pos-absolute pos-t-regular pos-r-regular\n radius-extra pd-thin bg-second\n \"\n >\n <IconEdit\n class=\"i-regular\"\n classes=\"fill-white\"\n />\n </router-link>\n\n </div>\n <p class=\"t-transp p-big\" v-html=\"departments.state.department.description\"></p>\n </section>\n\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <h3 class=\"mn-b-regular\">Команда</h3>\n <ul>\n <li v-if=\"departments.state.department.members.length < 1\">В отделе еще нет участников</li>\n <User \n class=\"br-b br-solid br-grey-transp-25\" \n v-for=\"(member, index) in departments.state.department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n @click=\"$router.push(`/app/profile/${member.user._id}`)\" \n />\n </ul>\n </section>\n\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <h3 class=\"mn-b-regular\">Подотделы</h3>\n <ul>\n <li v-if=\"departments.state.department.subdepartments.length < 1\">В отделе еще нет подотделов</li>\n <DepartmentSub v-for=\"(subdepartment, index) in departments.state.department.subdepartments\" @click=\"$router.push(`/app/organization/departments/${subdepartment._id}`)\" :key=\"index\" class=\"br-b br-solid br-grey-transp-25\" :department=\"subdepartment\" />\n </ul> \n </section>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { useRoute, useRouter } from 'vue-router';\n\nimport Spoiler from '@pf/src/components/Spoiler/Spoiler.vue';\nimport DepartmentSub from '@pf/src/modules/organizations/components/blocks/DepartmentSub.vue';\nimport User from '@pf/src/modules/
|
1
|
+
{"version":3,"file":"Department.vue.js","sources":["../../../../../../../src/modules/organizations/components/pages/Department.vue"],"sourcesContent":["<template>\n <div class=\"for-transition w-100\">\n \n <div v-if=\"departments.state.department\" id=\"dash\" class=\"pd-medium bg-light\">\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <div class=\"flex-nowrap flex mn-b-small\">\n\n <h2 class=\"w-100\">{{ departments.state.department.profile.name }}</h2>\n\n <router-link \n :to=\"{\n name: 'Department Edit', \n params: {\n _id: route.params._id,\n department: route.params.department\n }\n }\" \n class=\"\n cursor-pointer \n pos-absolute pos-t-regular pos-r-regular\n radius-extra pd-thin bg-second\n \"\n >\n <IconEdit\n class=\"i-regular\"\n classes=\"fill-white\"\n />\n </router-link>\n\n </div>\n <p class=\"t-transp p-big\" v-html=\"departments.state.department.description\"></p>\n </section>\n\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <h3 class=\"mn-b-regular\">Команда</h3>\n <ul>\n <li v-if=\"departments.state.department.members.length < 1\">В отделе еще нет участников</li>\n <User \n class=\"br-b br-solid br-grey-transp-25\" \n v-for=\"(member, index) in departments.state.department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n @click=\"$router.push(`/app/profile/${member.user._id}`)\" \n />\n </ul>\n </section>\n\n <section class=\"mn-b-medium radius-medium pd-semi bg-white\">\n <h3 class=\"mn-b-regular\">Подотделы</h3>\n <ul>\n <li v-if=\"departments.state.department.subdepartments.length < 1\">В отделе еще нет подотделов</li>\n <DepartmentSub v-for=\"(subdepartment, index) in departments.state.department.subdepartments\" @click=\"$router.push(`/app/organization/departments/${subdepartment._id}`)\" :key=\"index\" class=\"br-b br-solid br-grey-transp-25\" :department=\"subdepartment\" />\n </ul> \n </section>\n </div>\n </div>\n</template>\n\n<script setup>\nimport { useRoute, useRouter } from 'vue-router';\n\nimport Spoiler from '@pf/src/components/Spoiler/Spoiler.vue';\nimport DepartmentSub from '@pf/src/modules/organizations/components/blocks/DepartmentSub.vue';\nimport User from '@pf/src/modules/auth/views/components/blocks/CardUser.vue';\nimport * as departments from '@pf/src/modules/organizations/store/departments';\n\nimport IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'\n\nconst router = useRouter();\nconst route = useRoute();\n\nawait departments.actions.readOne(route.params.department);\n</script>\n\n<style scoped>\n</style>\n"],"names":["_withAsyncContext","departments.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAuEe,cAAY;AAC3B,UAAM,QAAQ,SAAQ;AAEtB,IAAM,CAAA,QAAA,SAAA,IAAAA,iBAAA,MAAAC,QAAoB,QAAQ,MAAM,OAAO,UAAU,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs
CHANGED
@@ -21,7 +21,7 @@ const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
|
21
21
|
const IconDelete = require("../../../icons/navigation/IconDelete.vue.cjs");
|
22
22
|
;/* empty css */
|
23
23
|
;/* empty css */
|
24
|
-
const CardUser = require("../../../
|
24
|
+
const CardUser = require("../../../auth/views/components/blocks/CardUser.vue.cjs");
|
25
25
|
const globals = require("../../../globals/views/store/globals.cjs");
|
26
26
|
const departments = require("../../store/departments.cjs");
|
27
27
|
const memberships = require("../../store/memberships.cjs");
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DepartmentEdit.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/pages/DepartmentEdit.vue"],"sourcesContent":["<template>\n <div class=\"for-transition pd-thin w-100\">\n\n <header class=\"mn-b-thin flex-nowrap flex bg-light pd-medium radius-big\">\n <h1 v-if=\"route.params.department\" class=\"mn-r-auto\">Edit Department</h1>\n <h1 v-else class=\"mn-r-auto\">Create Department</h1>\n\n <section class=\"flex-nowrap flex gap-thin pd-thin\">\n <Button v-if=\"route.params.department\" :submit=\"onDelete\" :callback=\"redirectToDash\" class=\"bg-red\">Delete</Button>\n <Button :submit=\"onSubmit\" :callback=\"redirectTo\" class=\"bg-main\">Save</Button>\n </section>\n\n </header>\n \n <Block\n title=\"Profile\"\n v-if=\"departments.state.department.profile\"\n class=\"mn-b-thin\"\n >\n <div\n class=\"cols-2-fit-content\"\n >\n <UploadImage \n v-model:photo=\"departments.state.department.profile.photo\"\n :uploadPath=\"'organizations/' + departments.state.department.name + '/avatars'\"\n class=\"w-8r aspect-1x1 o-hidden mn-r-small radius-extra\" \n />\n <div class=\"w-100 flex-child-grow-1 flex-child \">\n <Field \n v-model:field=\"departments.state.department.profile.name\" \n label=\"Name\" \n placeholder=\"Department Name\" \n class=\"mn-b-small bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n />\n <Field \n v-model:field=\"departments.state.department.profile.description\" \n label=\"Description\" \n placeholder=\"Department description (max 120 symbols)\" \n class=\"bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n /> \n </div>\n </div>\n </Block>\n\n <Block\n title=\"Team\"\n placeholder=\"No members added yet\"\n :actions=\"[{\n label: '+',\n function: () => openMemberPopup()\n }]\"\n class=\"cols-1 gap-thin mn-b-thin\"\n > \n <CardUser \n class=\"h-4r bg-white pd-thin radius-medium w-100\" \n v-for=\"(member, index) in departments.state.department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n :action=\"{\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeMember(member)\n }\"\n />\n </Block>\n\n <Popup \n title=\"Add member\" \n @close-popup=\"closeMemberPopup\" \n :isPopupOpen=\"isOpenAddMemberPopup\"\n class=\"bg-white w-max-30r radius-big pd-big\"\n >\n <Feed\n :search=\"{\n placeholder: 'Search customer...',\n class: 'bg-light 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) => memberships.actions.read(options),\n state: null\n }\"\n :options=\"{\n target: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll\"\n >\n <CardUser\n v-for=\"(user, index) in items\" \n :key=\"user._id\"\n :user=\"user.user\"\n :photo=\"user.user.profile?.photo\"\n :name=\"user.user.profile?.name || user.user.phone || user.user.email\"\n @click=\"() => { \n globals.actions.add(departments.state.department.members, { _id: user.user._id, user: user.user, position: 'Member'})\n closeMemberPopup();\n }\"\n class=\"h-4r bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </Popup>\n \n\n <div class=\"cols-2 gap-thin\">\n \n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Department Settings</h3>\n \n <p class=\"p-medium mn-b-small\">Please settings for your department:</p>\n <div class=\"cols-1 gap-thin\">\n <Checkbox \n label=\"Hidden department\"\n name=\"hidden\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n @update:radio=\"updated => departments.state.department.hidden = !departments.state.department.hidden\"\n :radio=\"departments.state.department.hidden\"\n />\n </div>\n </div>\n\n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Acessess</h3>\n \n <p class=\"p-medium mn-b-small\">Please select organization accesses for user in department:</p>\n \n <div class=\"cols-1 gap-thin\">\n <h4>Events</h4>\n <Checkbox\n label=\"Read events\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.read\"\n @update:radio=\"updated => (departments.state.department.accesses.events.read = !departments.state.department.accesses.events.read)\"\n />\n <Checkbox\n label=\"Create events\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.create\"\n @update:radio=\"updated => (departments.state.department.accesses.events.create = !departments.state.department.accesses.events.create)\"\n />\n <Checkbox\n label=\"Edit events\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.events.edit = !departments.state.department.accesses.events.edit)\"\n />\n <Checkbox\n label=\"Delete events\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.events.delete = !departments.state.department.accesses.events.delete)\"\n />\n <h4>Gallery</h4>\n <Checkbox\n label=\"Read gallery\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.read\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.read = !departments.state.department.accesses.gallery.read)\"\n />\n <Checkbox\n label=\"Create photos\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.create\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.create = !departments.state.department.accesses.gallery.create)\"\n />\n <Checkbox\n label=\"Edit gallery\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.edit = !departments.state.department.accesses.gallery.edit)\"\n />\n <Checkbox\n label=\"Delete gallery\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.delete = !departments.state.department.accesses.gallery.delete)\"\n />\n <h4>Products</h4>\n <Checkbox\n label=\"Read products\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.read\"\n @update:radio=\"updated => (departments.state.department.accesses.products.read = !departments.state.department.accesses.products.read)\"\n />\n <Checkbox\n label=\"Edit products\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.products.edit = !departments.state.department.accesses.products.edit)\"\n />\n <Checkbox\n label=\"Delete products\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.products.delete = !departments.state.department.accesses.products.delete)\"\n />\n\n <h4>Orders</h4>\n <Checkbox\n label=\"Read orders\"\n name=\"readOrders\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.read\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.read = !departments.state.department.accesses.orders.read)\"\n />\n <Checkbox\n label=\"Confirm orders\"\n name=\"confirmOrders\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.confirm\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.confirm = !departments.state.department.accesses.orders.confirm)\"\n />\n <Checkbox\n label=\"Delete orders\"\n name=\"deleteOrders\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.delete = !departments.state.department.accesses.orders.delete)\"\n />\n\n <h4>Departments</h4>\n <Checkbox\n label=\"Read departments\"\n name=\"readDepartments\" class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.read\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.read = !departments.state.department.accesses.departments.read)\"\n />\n <Checkbox\n label=\"Edit departments\"\n name=\"editDepartments\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.edit = !departments.state.department.accesses.departments.edit)\"\n />\n <Checkbox\n label=\"Delete departments\"\n name=\"deleteDepartments\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.delete = !departments.state.department.accesses.departments.delete)\"\n />\n </div>\n </div>\n\n\n </div>\n\n \n \n\n\n<!-- <div id=\"dash\" class=\"pd-medium bg-white\">\n\n <Popup title=\"Добавить подотдел\" @close-popup=\"closeDepartmentPopup\" :isPopupOpen=\"isOpenDepartmentPopup\">\n <DepartmentSubDepartmentModify \n :departments=\"departments.state.department.subdepartments\" \n :department=\"selectedDepartment\" \n :maindepartment=\"departments.state.department\"\n :alldepartments=\"departments.state.departments\"\n @callback=\"closeDepartmentPopup\"\n />\n </Popup>\n \n <div class=\"mn-b-regular flex-v-center flex-nowrap flex\">\n <h3 class=\"mn-r-small\">Подотделы </h3>\n <div>\n <a class=\"t-main h5\" @click=\"openDepartmentPopup()\">+</a>\n </div>\n </div>\n\n <ul class=\"mn-b-small\">\n <li v-if=\"departments.state.department.subdepartments.length < 1\">В отделе еще нет подотделов</li>\n <DepartmentSub \n v-for=\"(subdepartment, index) in departments.state.department.subdepartments\" \n :key=\"index\" class=\"bg-light o-hidden radius-small mn-b-thin\" \n :department=\"subdepartment\" \n @click=\"openDepartmentPopup(index)\"\n />\n </ul> \n\n \n </div> -->\n </div>\n</template>\n\n<script setup>\nimport { ref } from \"vue\";\nimport { useRoute, useRouter } from \"vue-router\";\nimport Cookies from \"js-cookie\";\nimport Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\nimport UploadImage from '@pf/src/components/UploadImage/UploadImage.vue';\n\nimport Tab from \"@pf/src/components/Tab/Tab.vue\";\nimport Field from \"@pf/src/components/Field/Field.vue\";\nimport Select from \"@pf/src/components/Select/Select.vue\";\nimport Checkbox from \"@pf/src/components/Checkbox/Checkbox.vue\";\nimport Address from \"@pf/src/components/Address/Address.vue\";\nimport LocationMarker from \"@pf/src/components/LocationMarker/LocationMarker.vue\";\nimport Button from \"@pf/src/components/Button/Button.vue\";\nimport Popup from \"@pf/src/components/Popup/Popup.vue\";\nimport Block from '@pf/src/components/Block/Block.vue';\nimport Feed from '@pf/src/components/Feed/Feed.vue'\n\nimport IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'\n\nimport EditArray from \"@pf/src/modules/organizations/components/blocks/EditArray.vue\";\nimport DepartmentSub from \"@pf/src/modules/organizations/components/blocks/DepartmentSub.vue\";\n\nimport CardUser from '@pf/src/modules/users/components/blocks/CardUser.vue'\n\nimport * as globals from \"@pf/src/modules/globals/views/store/globals\";\nimport * as departments from \"@pf/src/modules/organizations/store/departments\";\nimport * as memberships from \"@pf/src/modules/organizations/store/memberships\";\n\nconst router = useRouter();\nconst route = useRoute();\n\nasync function fetchData() {\n const users = ref(memberships.state.memberships);\n // await departments.actions.read({organization: route.params._id});\n if (route.params.department) await departments.actions.readOne(route.params.department);\n}\n\nfetchData();\n\n// const members = ref(departments.state.department.members);\n\nconst isOpenAddMemberPopup = ref(false);\nconst selectedMember = ref(null);\n\nfunction openMemberPopup(member) {\n isOpenAddMemberPopup.value = true;\n if (typeof member === \"number\") selectedMember.value = member;\n}\n\nfunction closeMemberPopup() {\n isOpenAddMemberPopup.value = false;\n selectedMember.value = null;\n}\n\nconst isOpenDepartmentPopup = ref(false);\nconst selectedDepartment = ref(null);\n\nfunction openDepartmentPopup(department) {\n isOpenDepartmentPopup.value = true;\n if (typeof department === \"number\") selectedDepartment.value = department;\n}\n\nfunction closeDepartmentPopup() {\n isOpenDepartmentPopup.value = false;\n selectedDepartment.value = null;\n}\n\nasync function onSubmit() {\n if (route.params.department) {\n await departments.actions.update(\n route.params._id,\n departments.state.department\n );\n }\n if (!route.params.department) {\n await departments.actions.create(\n route.params._id,\n departments.state.department\n );\n }\n}\n\nfunction redirectTo() {\n router.push({ name: \"Organization Members\", params: { _id: route.params._id } });\n}\n\nasync function onDelete() {\n if (confirm(\"Are you sure you want to delete this department?\")) {\n await departments.actions.delete(\n route.params._id,\n departments.state.department\n );\n }\n \n}\n\nfunction removeMember(member) {\n if (confirm(\"Are you sure you want to remove this member?\")) {\n globals.actions.delete(departments.state.department.members, { _id: member.user._id}) \n }\n}\n\nfunction redirectDash() {\n router.replace({ name: \"Organization\" });\n}\n</script>\n\n<style scoped>\n</style>"],"names":["useRouter","useRoute","ref","memberships.state","departments.actions","departments.state","globals.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmVA,UAAM,SAASA,UAAS,UAAA;AACxB,UAAM,QAAQC,UAAQ,SAAA;AAEtB,mBAAe,YAAY;AACXC,UAAG,IAACC,YAAiB,MAAC,WAAW;AAE/C,UAAI,MAAM,OAAO,WAAY,OAAMC,YAAAA,QAAoB,QAAQ,MAAM,OAAO,UAAU;AAAA,IACxF;AAEA;AAIA,UAAM,uBAAuBF,IAAAA,IAAI,KAAK;AACtC,UAAM,iBAAiBA,IAAAA,IAAI,IAAI;AAE/B,aAAS,gBAAgB,QAAQ;AAC/B,2BAAqB,QAAQ;AAAA,IAE/B;AAEA,aAAS,mBAAmB;AAC1B,2BAAqB,QAAQ;AAC7B,qBAAe,QAAQ;AAAA,IACzB;AAE8BA,QAAG,IAAC,KAAK;AACZA,QAAG,IAAC,IAAI;AAYnC,mBAAe,WAAW;AACxB,UAAI,MAAM,OAAO,YAAY;AAC3B,cAAME,YAAmB,QAAC;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,YAAAA,MAAkB;AAAA,QACxB;AAAA,MACG;AACD,UAAI,CAAC,MAAM,OAAO,YAAY;AAC5B,cAAMD,YAAmB,QAAC;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,YAAAA,MAAkB;AAAA,QACxB;AAAA,MACG;AAAA,IACH;AAEA,aAAS,aAAa;AACpB,aAAO,KAAK,EAAE,MAAM,wBAAwB,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG,EAAI,CAAA;AAAA,IACjF;AAEA,mBAAe,WAAW;AACxB,UAAI,QAAQ,kDAAkD,GAAG;AAC/D,cAAMD,YAAmB,QAAC;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,YAAAA,MAAkB;AAAA,QACxB;AAAA,MACG;AAAA,IAEH;AAEA,aAAS,aAAa,QAAQ;AAC3B,UAAI,QAAQ,8CAA8C,GAAG;AAC5DC,wBAAgB,OAAOD,YAAiB,MAAC,WAAW,SAAS,EAAE,KAAK,OAAO,KAAK,IAAG,CAAC;AAAA,MACrF;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"DepartmentEdit.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/pages/DepartmentEdit.vue"],"sourcesContent":["<template>\n <div class=\"for-transition pd-thin w-100\">\n\n <header class=\"mn-b-thin flex-nowrap flex bg-light pd-medium radius-big\">\n <h1 v-if=\"route.params.department\" class=\"mn-r-auto\">Edit Department</h1>\n <h1 v-else class=\"mn-r-auto\">Create Department</h1>\n\n <section class=\"flex-nowrap flex gap-thin pd-thin\">\n <Button v-if=\"route.params.department\" :submit=\"onDelete\" :callback=\"redirectToDash\" class=\"bg-red\">Delete</Button>\n <Button :submit=\"onSubmit\" :callback=\"redirectTo\" class=\"bg-main\">Save</Button>\n </section>\n\n </header>\n \n <Block\n title=\"Profile\"\n v-if=\"departments.state.department.profile\"\n class=\"mn-b-thin\"\n >\n <div\n class=\"cols-2-fit-content\"\n >\n <UploadImage \n v-model:photo=\"departments.state.department.profile.photo\"\n :uploadPath=\"'organizations/' + departments.state.department.name + '/avatars'\"\n class=\"w-8r aspect-1x1 o-hidden mn-r-small radius-extra\" \n />\n <div class=\"w-100 flex-child-grow-1 flex-child \">\n <Field \n v-model:field=\"departments.state.department.profile.name\" \n label=\"Name\" \n placeholder=\"Department Name\" \n class=\"mn-b-small bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n />\n <Field \n v-model:field=\"departments.state.department.profile.description\" \n label=\"Description\" \n placeholder=\"Department description (max 120 symbols)\" \n class=\"bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n /> \n </div>\n </div>\n </Block>\n\n <Block\n title=\"Team\"\n placeholder=\"No members added yet\"\n :actions=\"[{\n label: '+',\n function: () => openMemberPopup()\n }]\"\n class=\"cols-1 gap-thin mn-b-thin\"\n > \n <CardUser \n class=\"h-4r bg-white pd-thin radius-medium w-100\" \n v-for=\"(member, index) in departments.state.department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n :action=\"{\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeMember(member)\n }\"\n />\n </Block>\n\n <Popup \n title=\"Add member\" \n @close-popup=\"closeMemberPopup\" \n :isPopupOpen=\"isOpenAddMemberPopup\"\n class=\"bg-white w-max-30r radius-big pd-big\"\n >\n <Feed\n :search=\"{\n placeholder: 'Search customer...',\n class: 'bg-light 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) => memberships.actions.read(options),\n state: null\n }\"\n :options=\"{\n target: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll\"\n >\n <CardUser\n v-for=\"(user, index) in items\" \n :key=\"user._id\"\n :user=\"user.user\"\n :photo=\"user.user.profile?.photo\"\n :name=\"user.user.profile?.name || user.user.phone || user.user.email\"\n @click=\"() => { \n globals.actions.add(departments.state.department.members, { _id: user.user._id, user: user.user, position: 'Member'})\n closeMemberPopup();\n }\"\n class=\"h-4r bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </Popup>\n \n\n <div class=\"cols-2 gap-thin\">\n \n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Department Settings</h3>\n \n <p class=\"p-medium mn-b-small\">Please settings for your department:</p>\n <div class=\"cols-1 gap-thin\">\n <Checkbox \n label=\"Hidden department\"\n name=\"hidden\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n @update:radio=\"updated => departments.state.department.hidden = !departments.state.department.hidden\"\n :radio=\"departments.state.department.hidden\"\n />\n </div>\n </div>\n\n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Acessess</h3>\n \n <p class=\"p-medium mn-b-small\">Please select organization accesses for user in department:</p>\n \n <div class=\"cols-1 gap-thin\">\n <h4>Events</h4>\n <Checkbox\n label=\"Read events\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.read\"\n @update:radio=\"updated => (departments.state.department.accesses.events.read = !departments.state.department.accesses.events.read)\"\n />\n <Checkbox\n label=\"Create events\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.create\"\n @update:radio=\"updated => (departments.state.department.accesses.events.create = !departments.state.department.accesses.events.create)\"\n />\n <Checkbox\n label=\"Edit events\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.events.edit = !departments.state.department.accesses.events.edit)\"\n />\n <Checkbox\n label=\"Delete events\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.events.delete = !departments.state.department.accesses.events.delete)\"\n />\n <h4>Gallery</h4>\n <Checkbox\n label=\"Read gallery\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.read\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.read = !departments.state.department.accesses.gallery.read)\"\n />\n <Checkbox\n label=\"Create photos\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.create\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.create = !departments.state.department.accesses.gallery.create)\"\n />\n <Checkbox\n label=\"Edit gallery\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.edit = !departments.state.department.accesses.gallery.edit)\"\n />\n <Checkbox\n label=\"Delete gallery\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.delete = !departments.state.department.accesses.gallery.delete)\"\n />\n <h4>Products</h4>\n <Checkbox\n label=\"Read products\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.read\"\n @update:radio=\"updated => (departments.state.department.accesses.products.read = !departments.state.department.accesses.products.read)\"\n />\n <Checkbox\n label=\"Edit products\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.products.edit = !departments.state.department.accesses.products.edit)\"\n />\n <Checkbox\n label=\"Delete products\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.products.delete = !departments.state.department.accesses.products.delete)\"\n />\n\n <h4>Orders</h4>\n <Checkbox\n label=\"Read orders\"\n name=\"readOrders\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.read\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.read = !departments.state.department.accesses.orders.read)\"\n />\n <Checkbox\n label=\"Confirm orders\"\n name=\"confirmOrders\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.confirm\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.confirm = !departments.state.department.accesses.orders.confirm)\"\n />\n <Checkbox\n label=\"Delete orders\"\n name=\"deleteOrders\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.delete = !departments.state.department.accesses.orders.delete)\"\n />\n\n <h4>Departments</h4>\n <Checkbox\n label=\"Read departments\"\n name=\"readDepartments\" class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.read\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.read = !departments.state.department.accesses.departments.read)\"\n />\n <Checkbox\n label=\"Edit departments\"\n name=\"editDepartments\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.edit = !departments.state.department.accesses.departments.edit)\"\n />\n <Checkbox\n label=\"Delete departments\"\n name=\"deleteDepartments\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.delete = !departments.state.department.accesses.departments.delete)\"\n />\n </div>\n </div>\n\n\n </div>\n\n \n \n\n\n<!-- <div id=\"dash\" class=\"pd-medium bg-white\">\n\n <Popup title=\"Добавить подотдел\" @close-popup=\"closeDepartmentPopup\" :isPopupOpen=\"isOpenDepartmentPopup\">\n <DepartmentSubDepartmentModify \n :departments=\"departments.state.department.subdepartments\" \n :department=\"selectedDepartment\" \n :maindepartment=\"departments.state.department\"\n :alldepartments=\"departments.state.departments\"\n @callback=\"closeDepartmentPopup\"\n />\n </Popup>\n \n <div class=\"mn-b-regular flex-v-center flex-nowrap flex\">\n <h3 class=\"mn-r-small\">Подотделы </h3>\n <div>\n <a class=\"t-main h5\" @click=\"openDepartmentPopup()\">+</a>\n </div>\n </div>\n\n <ul class=\"mn-b-small\">\n <li v-if=\"departments.state.department.subdepartments.length < 1\">В отделе еще нет подотделов</li>\n <DepartmentSub \n v-for=\"(subdepartment, index) in departments.state.department.subdepartments\" \n :key=\"index\" class=\"bg-light o-hidden radius-small mn-b-thin\" \n :department=\"subdepartment\" \n @click=\"openDepartmentPopup(index)\"\n />\n </ul> \n\n \n </div> -->\n </div>\n</template>\n\n<script setup>\nimport { ref } from \"vue\";\nimport { useRoute, useRouter } from \"vue-router\";\nimport Cookies from \"js-cookie\";\nimport Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\nimport UploadImage from '@pf/src/components/UploadImage/UploadImage.vue';\n\nimport Tab from \"@pf/src/components/Tab/Tab.vue\";\nimport Field from \"@pf/src/components/Field/Field.vue\";\nimport Select from \"@pf/src/components/Select/Select.vue\";\nimport Checkbox from \"@pf/src/components/Checkbox/Checkbox.vue\";\nimport Address from \"@pf/src/components/Address/Address.vue\";\nimport LocationMarker from \"@pf/src/components/LocationMarker/LocationMarker.vue\";\nimport Button from \"@pf/src/components/Button/Button.vue\";\nimport Popup from \"@pf/src/components/Popup/Popup.vue\";\nimport Block from '@pf/src/components/Block/Block.vue';\nimport Feed from '@pf/src/components/Feed/Feed.vue'\n\nimport IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'\n\nimport EditArray from \"@pf/src/modules/organizations/components/blocks/EditArray.vue\";\nimport DepartmentSub from \"@pf/src/modules/organizations/components/blocks/DepartmentSub.vue\";\n\nimport CardUser from '@pf/src/modules/auth/views/components/blocks/CardUser.vue'\n\nimport * as globals from \"@pf/src/modules/globals/views/store/globals\";\nimport * as departments from \"@pf/src/modules/organizations/store/departments\";\nimport * as memberships from \"@pf/src/modules/organizations/store/memberships\";\n\nconst router = useRouter();\nconst route = useRoute();\n\nasync function fetchData() {\n const users = ref(memberships.state.memberships);\n // await departments.actions.read({organization: route.params._id});\n if (route.params.department) await departments.actions.readOne(route.params.department);\n}\n\nfetchData();\n\n// const members = ref(departments.state.department.members);\n\nconst isOpenAddMemberPopup = ref(false);\nconst selectedMember = ref(null);\n\nfunction openMemberPopup(member) {\n isOpenAddMemberPopup.value = true;\n if (typeof member === \"number\") selectedMember.value = member;\n}\n\nfunction closeMemberPopup() {\n isOpenAddMemberPopup.value = false;\n selectedMember.value = null;\n}\n\nconst isOpenDepartmentPopup = ref(false);\nconst selectedDepartment = ref(null);\n\nfunction openDepartmentPopup(department) {\n isOpenDepartmentPopup.value = true;\n if (typeof department === \"number\") selectedDepartment.value = department;\n}\n\nfunction closeDepartmentPopup() {\n isOpenDepartmentPopup.value = false;\n selectedDepartment.value = null;\n}\n\nasync function onSubmit() {\n if (route.params.department) {\n await departments.actions.update(\n route.params._id,\n departments.state.department\n );\n }\n if (!route.params.department) {\n await departments.actions.create(\n route.params._id,\n departments.state.department\n );\n }\n}\n\nfunction redirectTo() {\n router.push({ name: \"Organization Members\", params: { _id: route.params._id } });\n}\n\nasync function onDelete() {\n if (confirm(\"Are you sure you want to delete this department?\")) {\n await departments.actions.delete(\n route.params._id,\n departments.state.department\n );\n }\n \n}\n\nfunction removeMember(member) {\n if (confirm(\"Are you sure you want to remove this member?\")) {\n globals.actions.delete(departments.state.department.members, { _id: member.user._id}) \n }\n}\n\nfunction redirectDash() {\n router.replace({ name: \"Organization\" });\n}\n</script>\n\n<style scoped>\n</style>"],"names":["useRouter","useRoute","ref","memberships.state","departments.actions","departments.state","globals.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmVA,UAAM,SAASA,UAAS,UAAA;AACxB,UAAM,QAAQC,UAAQ,SAAA;AAEtB,mBAAe,YAAY;AACXC,UAAG,IAACC,YAAiB,MAAC,WAAW;AAE/C,UAAI,MAAM,OAAO,WAAY,OAAMC,YAAAA,QAAoB,QAAQ,MAAM,OAAO,UAAU;AAAA,IACxF;AAEA;AAIA,UAAM,uBAAuBF,IAAAA,IAAI,KAAK;AACtC,UAAM,iBAAiBA,IAAAA,IAAI,IAAI;AAE/B,aAAS,gBAAgB,QAAQ;AAC/B,2BAAqB,QAAQ;AAAA,IAE/B;AAEA,aAAS,mBAAmB;AAC1B,2BAAqB,QAAQ;AAC7B,qBAAe,QAAQ;AAAA,IACzB;AAE8BA,QAAG,IAAC,KAAK;AACZA,QAAG,IAAC,IAAI;AAYnC,mBAAe,WAAW;AACxB,UAAI,MAAM,OAAO,YAAY;AAC3B,cAAME,YAAmB,QAAC;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,YAAAA,MAAkB;AAAA,QACxB;AAAA,MACG;AACD,UAAI,CAAC,MAAM,OAAO,YAAY;AAC5B,cAAMD,YAAmB,QAAC;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,YAAAA,MAAkB;AAAA,QACxB;AAAA,MACG;AAAA,IACH;AAEA,aAAS,aAAa;AACpB,aAAO,KAAK,EAAE,MAAM,wBAAwB,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG,EAAI,CAAA;AAAA,IACjF;AAEA,mBAAe,WAAW;AACxB,UAAI,QAAQ,kDAAkD,GAAG;AAC/D,cAAMD,YAAmB,QAAC;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,YAAAA,MAAkB;AAAA,QACxB;AAAA,MACG;AAAA,IAEH;AAEA,aAAS,aAAa,QAAQ;AAC3B,UAAI,QAAQ,8CAA8C,GAAG;AAC5DC,wBAAgB,OAAOD,YAAiB,MAAC,WAAW,SAAS,EAAE,KAAK,OAAO,KAAK,IAAG,CAAC;AAAA,MACrF;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js
CHANGED
@@ -19,7 +19,7 @@ import _sfc_main$7 from "../../../../components/Feed/Feed.vue.js";
|
|
19
19
|
import _sfc_main$5 from "../../../icons/navigation/IconDelete.vue.js";
|
20
20
|
/* empty css */
|
21
21
|
/* empty css */
|
22
|
-
import _sfc_main$4 from "../../../
|
22
|
+
import _sfc_main$4 from "../../../auth/views/components/blocks/CardUser.vue.js";
|
23
23
|
import { actions as actions$1 } from "../../../globals/views/store/globals.js";
|
24
24
|
import { state, actions as actions$2 } from "../../store/departments.js";
|
25
25
|
import { actions, state as state$1 } from "../../store/memberships.js";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DepartmentEdit.vue.js","sources":["../../../../../../../src/modules/organizations/components/pages/DepartmentEdit.vue"],"sourcesContent":["<template>\n <div class=\"for-transition pd-thin w-100\">\n\n <header class=\"mn-b-thin flex-nowrap flex bg-light pd-medium radius-big\">\n <h1 v-if=\"route.params.department\" class=\"mn-r-auto\">Edit Department</h1>\n <h1 v-else class=\"mn-r-auto\">Create Department</h1>\n\n <section class=\"flex-nowrap flex gap-thin pd-thin\">\n <Button v-if=\"route.params.department\" :submit=\"onDelete\" :callback=\"redirectToDash\" class=\"bg-red\">Delete</Button>\n <Button :submit=\"onSubmit\" :callback=\"redirectTo\" class=\"bg-main\">Save</Button>\n </section>\n\n </header>\n \n <Block\n title=\"Profile\"\n v-if=\"departments.state.department.profile\"\n class=\"mn-b-thin\"\n >\n <div\n class=\"cols-2-fit-content\"\n >\n <UploadImage \n v-model:photo=\"departments.state.department.profile.photo\"\n :uploadPath=\"'organizations/' + departments.state.department.name + '/avatars'\"\n class=\"w-8r aspect-1x1 o-hidden mn-r-small radius-extra\" \n />\n <div class=\"w-100 flex-child-grow-1 flex-child \">\n <Field \n v-model:field=\"departments.state.department.profile.name\" \n label=\"Name\" \n placeholder=\"Department Name\" \n class=\"mn-b-small bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n />\n <Field \n v-model:field=\"departments.state.department.profile.description\" \n label=\"Description\" \n placeholder=\"Department description (max 120 symbols)\" \n class=\"bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n /> \n </div>\n </div>\n </Block>\n\n <Block\n title=\"Team\"\n placeholder=\"No members added yet\"\n :actions=\"[{\n label: '+',\n function: () => openMemberPopup()\n }]\"\n class=\"cols-1 gap-thin mn-b-thin\"\n > \n <CardUser \n class=\"h-4r bg-white pd-thin radius-medium w-100\" \n v-for=\"(member, index) in departments.state.department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n :action=\"{\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeMember(member)\n }\"\n />\n </Block>\n\n <Popup \n title=\"Add member\" \n @close-popup=\"closeMemberPopup\" \n :isPopupOpen=\"isOpenAddMemberPopup\"\n class=\"bg-white w-max-30r radius-big pd-big\"\n >\n <Feed\n :search=\"{\n placeholder: 'Search customer...',\n class: 'bg-light 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) => memberships.actions.read(options),\n state: null\n }\"\n :options=\"{\n target: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll\"\n >\n <CardUser\n v-for=\"(user, index) in items\" \n :key=\"user._id\"\n :user=\"user.user\"\n :photo=\"user.user.profile?.photo\"\n :name=\"user.user.profile?.name || user.user.phone || user.user.email\"\n @click=\"() => { \n globals.actions.add(departments.state.department.members, { _id: user.user._id, user: user.user, position: 'Member'})\n closeMemberPopup();\n }\"\n class=\"h-4r bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </Popup>\n \n\n <div class=\"cols-2 gap-thin\">\n \n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Department Settings</h3>\n \n <p class=\"p-medium mn-b-small\">Please settings for your department:</p>\n <div class=\"cols-1 gap-thin\">\n <Checkbox \n label=\"Hidden department\"\n name=\"hidden\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n @update:radio=\"updated => departments.state.department.hidden = !departments.state.department.hidden\"\n :radio=\"departments.state.department.hidden\"\n />\n </div>\n </div>\n\n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Acessess</h3>\n \n <p class=\"p-medium mn-b-small\">Please select organization accesses for user in department:</p>\n \n <div class=\"cols-1 gap-thin\">\n <h4>Events</h4>\n <Checkbox\n label=\"Read events\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.read\"\n @update:radio=\"updated => (departments.state.department.accesses.events.read = !departments.state.department.accesses.events.read)\"\n />\n <Checkbox\n label=\"Create events\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.create\"\n @update:radio=\"updated => (departments.state.department.accesses.events.create = !departments.state.department.accesses.events.create)\"\n />\n <Checkbox\n label=\"Edit events\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.events.edit = !departments.state.department.accesses.events.edit)\"\n />\n <Checkbox\n label=\"Delete events\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.events.delete = !departments.state.department.accesses.events.delete)\"\n />\n <h4>Gallery</h4>\n <Checkbox\n label=\"Read gallery\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.read\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.read = !departments.state.department.accesses.gallery.read)\"\n />\n <Checkbox\n label=\"Create photos\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.create\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.create = !departments.state.department.accesses.gallery.create)\"\n />\n <Checkbox\n label=\"Edit gallery\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.edit = !departments.state.department.accesses.gallery.edit)\"\n />\n <Checkbox\n label=\"Delete gallery\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.delete = !departments.state.department.accesses.gallery.delete)\"\n />\n <h4>Products</h4>\n <Checkbox\n label=\"Read products\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.read\"\n @update:radio=\"updated => (departments.state.department.accesses.products.read = !departments.state.department.accesses.products.read)\"\n />\n <Checkbox\n label=\"Edit products\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.products.edit = !departments.state.department.accesses.products.edit)\"\n />\n <Checkbox\n label=\"Delete products\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.products.delete = !departments.state.department.accesses.products.delete)\"\n />\n\n <h4>Orders</h4>\n <Checkbox\n label=\"Read orders\"\n name=\"readOrders\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.read\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.read = !departments.state.department.accesses.orders.read)\"\n />\n <Checkbox\n label=\"Confirm orders\"\n name=\"confirmOrders\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.confirm\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.confirm = !departments.state.department.accesses.orders.confirm)\"\n />\n <Checkbox\n label=\"Delete orders\"\n name=\"deleteOrders\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.delete = !departments.state.department.accesses.orders.delete)\"\n />\n\n <h4>Departments</h4>\n <Checkbox\n label=\"Read departments\"\n name=\"readDepartments\" class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.read\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.read = !departments.state.department.accesses.departments.read)\"\n />\n <Checkbox\n label=\"Edit departments\"\n name=\"editDepartments\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.edit = !departments.state.department.accesses.departments.edit)\"\n />\n <Checkbox\n label=\"Delete departments\"\n name=\"deleteDepartments\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.delete = !departments.state.department.accesses.departments.delete)\"\n />\n </div>\n </div>\n\n\n </div>\n\n \n \n\n\n<!-- <div id=\"dash\" class=\"pd-medium bg-white\">\n\n <Popup title=\"Добавить подотдел\" @close-popup=\"closeDepartmentPopup\" :isPopupOpen=\"isOpenDepartmentPopup\">\n <DepartmentSubDepartmentModify \n :departments=\"departments.state.department.subdepartments\" \n :department=\"selectedDepartment\" \n :maindepartment=\"departments.state.department\"\n :alldepartments=\"departments.state.departments\"\n @callback=\"closeDepartmentPopup\"\n />\n </Popup>\n \n <div class=\"mn-b-regular flex-v-center flex-nowrap flex\">\n <h3 class=\"mn-r-small\">Подотделы </h3>\n <div>\n <a class=\"t-main h5\" @click=\"openDepartmentPopup()\">+</a>\n </div>\n </div>\n\n <ul class=\"mn-b-small\">\n <li v-if=\"departments.state.department.subdepartments.length < 1\">В отделе еще нет подотделов</li>\n <DepartmentSub \n v-for=\"(subdepartment, index) in departments.state.department.subdepartments\" \n :key=\"index\" class=\"bg-light o-hidden radius-small mn-b-thin\" \n :department=\"subdepartment\" \n @click=\"openDepartmentPopup(index)\"\n />\n </ul> \n\n \n </div> -->\n </div>\n</template>\n\n<script setup>\nimport { ref } from \"vue\";\nimport { useRoute, useRouter } from \"vue-router\";\nimport Cookies from \"js-cookie\";\nimport Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\nimport UploadImage from '@pf/src/components/UploadImage/UploadImage.vue';\n\nimport Tab from \"@pf/src/components/Tab/Tab.vue\";\nimport Field from \"@pf/src/components/Field/Field.vue\";\nimport Select from \"@pf/src/components/Select/Select.vue\";\nimport Checkbox from \"@pf/src/components/Checkbox/Checkbox.vue\";\nimport Address from \"@pf/src/components/Address/Address.vue\";\nimport LocationMarker from \"@pf/src/components/LocationMarker/LocationMarker.vue\";\nimport Button from \"@pf/src/components/Button/Button.vue\";\nimport Popup from \"@pf/src/components/Popup/Popup.vue\";\nimport Block from '@pf/src/components/Block/Block.vue';\nimport Feed from '@pf/src/components/Feed/Feed.vue'\n\nimport IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'\n\nimport EditArray from \"@pf/src/modules/organizations/components/blocks/EditArray.vue\";\nimport DepartmentSub from \"@pf/src/modules/organizations/components/blocks/DepartmentSub.vue\";\n\nimport CardUser from '@pf/src/modules/users/components/blocks/CardUser.vue'\n\nimport * as globals from \"@pf/src/modules/globals/views/store/globals\";\nimport * as departments from \"@pf/src/modules/organizations/store/departments\";\nimport * as memberships from \"@pf/src/modules/organizations/store/memberships\";\n\nconst router = useRouter();\nconst route = useRoute();\n\nasync function fetchData() {\n const users = ref(memberships.state.memberships);\n // await departments.actions.read({organization: route.params._id});\n if (route.params.department) await departments.actions.readOne(route.params.department);\n}\n\nfetchData();\n\n// const members = ref(departments.state.department.members);\n\nconst isOpenAddMemberPopup = ref(false);\nconst selectedMember = ref(null);\n\nfunction openMemberPopup(member) {\n isOpenAddMemberPopup.value = true;\n if (typeof member === \"number\") selectedMember.value = member;\n}\n\nfunction closeMemberPopup() {\n isOpenAddMemberPopup.value = false;\n selectedMember.value = null;\n}\n\nconst isOpenDepartmentPopup = ref(false);\nconst selectedDepartment = ref(null);\n\nfunction openDepartmentPopup(department) {\n isOpenDepartmentPopup.value = true;\n if (typeof department === \"number\") selectedDepartment.value = department;\n}\n\nfunction closeDepartmentPopup() {\n isOpenDepartmentPopup.value = false;\n selectedDepartment.value = null;\n}\n\nasync function onSubmit() {\n if (route.params.department) {\n await departments.actions.update(\n route.params._id,\n departments.state.department\n );\n }\n if (!route.params.department) {\n await departments.actions.create(\n route.params._id,\n departments.state.department\n );\n }\n}\n\nfunction redirectTo() {\n router.push({ name: \"Organization Members\", params: { _id: route.params._id } });\n}\n\nasync function onDelete() {\n if (confirm(\"Are you sure you want to delete this department?\")) {\n await departments.actions.delete(\n route.params._id,\n departments.state.department\n );\n }\n \n}\n\nfunction removeMember(member) {\n if (confirm(\"Are you sure you want to remove this member?\")) {\n globals.actions.delete(departments.state.department.members, { _id: member.user._id}) \n }\n}\n\nfunction redirectDash() {\n router.replace({ name: \"Organization\" });\n}\n</script>\n\n<style scoped>\n</style>"],"names":["memberships.state","departments.actions","departments.state","globals.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmVA,UAAM,SAAS,UAAS;AACxB,UAAM,QAAQ,SAAQ;AAEtB,mBAAe,YAAY;AACX,UAAIA,QAAkB,WAAW;AAE/C,UAAI,MAAM,OAAO,WAAY,OAAMC,UAAoB,QAAQ,MAAM,OAAO,UAAU;AAAA,IACxF;AAEA;AAIA,UAAM,uBAAuB,IAAI,KAAK;AACtC,UAAM,iBAAiB,IAAI,IAAI;AAE/B,aAAS,gBAAgB,QAAQ;AAC/B,2BAAqB,QAAQ;AAAA,IAE/B;AAEA,aAAS,mBAAmB;AAC1B,2BAAqB,QAAQ;AAC7B,qBAAe,QAAQ;AAAA,IACzB;AAE8B,QAAI,KAAK;AACZ,QAAI,IAAI;AAYnC,mBAAe,WAAW;AACxB,UAAI,MAAM,OAAO,YAAY;AAC3B,cAAMA,UAAoB;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,MAAkB;AAAA,QACxB;AAAA,MACG;AACD,UAAI,CAAC,MAAM,OAAO,YAAY;AAC5B,cAAMD,UAAoB;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,MAAkB;AAAA,QACxB;AAAA,MACG;AAAA,IACH;AAEA,aAAS,aAAa;AACpB,aAAO,KAAK,EAAE,MAAM,wBAAwB,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG,EAAI,CAAA;AAAA,IACjF;AAEA,mBAAe,WAAW;AACxB,UAAI,QAAQ,kDAAkD,GAAG;AAC/D,cAAMD,UAAoB;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,MAAkB;AAAA,QACxB;AAAA,MACG;AAAA,IAEH;AAEA,aAAS,aAAa,QAAQ;AAC3B,UAAI,QAAQ,8CAA8C,GAAG;AAC5DC,kBAAgB,OAAOD,MAAkB,WAAW,SAAS,EAAE,KAAK,OAAO,KAAK,IAAG,CAAC;AAAA,MACrF;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"DepartmentEdit.vue.js","sources":["../../../../../../../src/modules/organizations/components/pages/DepartmentEdit.vue"],"sourcesContent":["<template>\n <div class=\"for-transition pd-thin w-100\">\n\n <header class=\"mn-b-thin flex-nowrap flex bg-light pd-medium radius-big\">\n <h1 v-if=\"route.params.department\" class=\"mn-r-auto\">Edit Department</h1>\n <h1 v-else class=\"mn-r-auto\">Create Department</h1>\n\n <section class=\"flex-nowrap flex gap-thin pd-thin\">\n <Button v-if=\"route.params.department\" :submit=\"onDelete\" :callback=\"redirectToDash\" class=\"bg-red\">Delete</Button>\n <Button :submit=\"onSubmit\" :callback=\"redirectTo\" class=\"bg-main\">Save</Button>\n </section>\n\n </header>\n \n <Block\n title=\"Profile\"\n v-if=\"departments.state.department.profile\"\n class=\"mn-b-thin\"\n >\n <div\n class=\"cols-2-fit-content\"\n >\n <UploadImage \n v-model:photo=\"departments.state.department.profile.photo\"\n :uploadPath=\"'organizations/' + departments.state.department.name + '/avatars'\"\n class=\"w-8r aspect-1x1 o-hidden mn-r-small radius-extra\" \n />\n <div class=\"w-100 flex-child-grow-1 flex-child \">\n <Field \n v-model:field=\"departments.state.department.profile.name\" \n label=\"Name\" \n placeholder=\"Department Name\" \n class=\"mn-b-small bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n />\n <Field \n v-model:field=\"departments.state.department.profile.description\" \n label=\"Description\" \n placeholder=\"Department description (max 120 symbols)\" \n class=\"bg-white radius-small pd-medium\"\n :validation=\"organizationName\" \n /> \n </div>\n </div>\n </Block>\n\n <Block\n title=\"Team\"\n placeholder=\"No members added yet\"\n :actions=\"[{\n label: '+',\n function: () => openMemberPopup()\n }]\"\n class=\"cols-1 gap-thin mn-b-thin\"\n > \n <CardUser \n class=\"h-4r bg-white pd-thin radius-medium w-100\" \n v-for=\"(member, index) in departments.state.department.members\" \n :key=\"index\" \n :user=\"member.user\" \n :photo=\"member.user.profile.photo\"\n :name=\"member.user.profile.name || member.user.phone || member.user.email || member.user._id\"\n :position=\"member.position\" \n :action=\"{\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeMember(member)\n }\"\n />\n </Block>\n\n <Popup \n title=\"Add member\" \n @close-popup=\"closeMemberPopup\" \n :isPopupOpen=\"isOpenAddMemberPopup\"\n class=\"bg-white w-max-30r radius-big pd-big\"\n >\n <Feed\n :search=\"{\n placeholder: 'Search customer...',\n class: 'bg-light 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) => memberships.actions.read(options),\n state: null\n }\"\n :options=\"{\n target: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"bg-light pd-medium w-min-20r w-max-40r radius-big h-max-20r o-scroll\"\n >\n <CardUser\n v-for=\"(user, index) in items\" \n :key=\"user._id\"\n :user=\"user.user\"\n :photo=\"user.user.profile?.photo\"\n :name=\"user.user.profile?.name || user.user.phone || user.user.email\"\n @click=\"() => { \n globals.actions.add(departments.state.department.members, { _id: user.user._id, user: user.user, position: 'Member'})\n closeMemberPopup();\n }\"\n class=\"h-4r bg-white pd-thin radius-medium w-100 mn-b-thin\"\n />\n </Feed>\n </Popup>\n \n\n <div class=\"cols-2 gap-thin\">\n \n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Department Settings</h3>\n \n <p class=\"p-medium mn-b-small\">Please settings for your department:</p>\n <div class=\"cols-1 gap-thin\">\n <Checkbox \n label=\"Hidden department\"\n name=\"hidden\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n @update:radio=\"updated => departments.state.department.hidden = !departments.state.department.hidden\"\n :radio=\"departments.state.department.hidden\"\n />\n </div>\n </div>\n\n <div class=\"bg-light pd-medium o-hidden radius-big\">\n <h3 class=\"mn-b-semi\">Acessess</h3>\n \n <p class=\"p-medium mn-b-small\">Please select organization accesses for user in department:</p>\n \n <div class=\"cols-1 gap-thin\">\n <h4>Events</h4>\n <Checkbox\n label=\"Read events\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.read\"\n @update:radio=\"updated => (departments.state.department.accesses.events.read = !departments.state.department.accesses.events.read)\"\n />\n <Checkbox\n label=\"Create events\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.create\"\n @update:radio=\"updated => (departments.state.department.accesses.events.create = !departments.state.department.accesses.events.create)\"\n />\n <Checkbox\n label=\"Edit events\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.events.edit = !departments.state.department.accesses.events.edit)\"\n />\n <Checkbox\n label=\"Delete events\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.events.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.events.delete = !departments.state.department.accesses.events.delete)\"\n />\n <h4>Gallery</h4>\n <Checkbox\n label=\"Read gallery\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.read\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.read = !departments.state.department.accesses.gallery.read)\"\n />\n <Checkbox\n label=\"Create photos\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.create\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.create = !departments.state.department.accesses.gallery.create)\"\n />\n <Checkbox\n label=\"Edit gallery\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.edit = !departments.state.department.accesses.gallery.edit)\"\n />\n <Checkbox\n label=\"Delete gallery\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.gallery.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.gallery.delete = !departments.state.department.accesses.gallery.delete)\"\n />\n <h4>Products</h4>\n <Checkbox\n label=\"Read products\"\n name=\"readProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.read\"\n @update:radio=\"updated => (departments.state.department.accesses.products.read = !departments.state.department.accesses.products.read)\"\n />\n <Checkbox\n label=\"Edit products\"\n name=\"editProducts\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.products.edit = !departments.state.department.accesses.products.edit)\"\n />\n <Checkbox\n label=\"Delete products\"\n name=\"deleteProducts\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.products.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.products.delete = !departments.state.department.accesses.products.delete)\"\n />\n\n <h4>Orders</h4>\n <Checkbox\n label=\"Read orders\"\n name=\"readOrders\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.read\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.read = !departments.state.department.accesses.orders.read)\"\n />\n <Checkbox\n label=\"Confirm orders\"\n name=\"confirmOrders\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.confirm\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.confirm = !departments.state.department.accesses.orders.confirm)\"\n />\n <Checkbox\n label=\"Delete orders\"\n name=\"deleteOrders\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.orders.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.orders.delete = !departments.state.department.accesses.orders.delete)\"\n />\n\n <h4>Departments</h4>\n <Checkbox\n label=\"Read departments\"\n name=\"readDepartments\" class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.read\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.read = !departments.state.department.accesses.departments.read)\"\n />\n <Checkbox\n label=\"Edit departments\"\n name=\"editDepartments\"\n class=\"w-100 mn-r-small bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.edit\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.edit = !departments.state.department.accesses.departments.edit)\"\n />\n <Checkbox\n label=\"Delete departments\"\n name=\"deleteDepartments\"\n class=\"w-100 bg-white radius-small pd-small\"\n :radio=\"departments.state.department.accesses.departments.delete\"\n @update:radio=\"updated => (departments.state.department.accesses.departments.delete = !departments.state.department.accesses.departments.delete)\"\n />\n </div>\n </div>\n\n\n </div>\n\n \n \n\n\n<!-- <div id=\"dash\" class=\"pd-medium bg-white\">\n\n <Popup title=\"Добавить подотдел\" @close-popup=\"closeDepartmentPopup\" :isPopupOpen=\"isOpenDepartmentPopup\">\n <DepartmentSubDepartmentModify \n :departments=\"departments.state.department.subdepartments\" \n :department=\"selectedDepartment\" \n :maindepartment=\"departments.state.department\"\n :alldepartments=\"departments.state.departments\"\n @callback=\"closeDepartmentPopup\"\n />\n </Popup>\n \n <div class=\"mn-b-regular flex-v-center flex-nowrap flex\">\n <h3 class=\"mn-r-small\">Подотделы </h3>\n <div>\n <a class=\"t-main h5\" @click=\"openDepartmentPopup()\">+</a>\n </div>\n </div>\n\n <ul class=\"mn-b-small\">\n <li v-if=\"departments.state.department.subdepartments.length < 1\">В отделе еще нет подотделов</li>\n <DepartmentSub \n v-for=\"(subdepartment, index) in departments.state.department.subdepartments\" \n :key=\"index\" class=\"bg-light o-hidden radius-small mn-b-thin\" \n :department=\"subdepartment\" \n @click=\"openDepartmentPopup(index)\"\n />\n </ul> \n\n \n </div> -->\n </div>\n</template>\n\n<script setup>\nimport { ref } from \"vue\";\nimport { useRoute, useRouter } from \"vue-router\";\nimport Cookies from \"js-cookie\";\nimport Breadcrumbs from '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\nimport UploadImage from '@pf/src/components/UploadImage/UploadImage.vue';\n\nimport Tab from \"@pf/src/components/Tab/Tab.vue\";\nimport Field from \"@pf/src/components/Field/Field.vue\";\nimport Select from \"@pf/src/components/Select/Select.vue\";\nimport Checkbox from \"@pf/src/components/Checkbox/Checkbox.vue\";\nimport Address from \"@pf/src/components/Address/Address.vue\";\nimport LocationMarker from \"@pf/src/components/LocationMarker/LocationMarker.vue\";\nimport Button from \"@pf/src/components/Button/Button.vue\";\nimport Popup from \"@pf/src/components/Popup/Popup.vue\";\nimport Block from '@pf/src/components/Block/Block.vue';\nimport Feed from '@pf/src/components/Feed/Feed.vue'\n\nimport IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'\n\nimport EditArray from \"@pf/src/modules/organizations/components/blocks/EditArray.vue\";\nimport DepartmentSub from \"@pf/src/modules/organizations/components/blocks/DepartmentSub.vue\";\n\nimport CardUser from '@pf/src/modules/auth/views/components/blocks/CardUser.vue'\n\nimport * as globals from \"@pf/src/modules/globals/views/store/globals\";\nimport * as departments from \"@pf/src/modules/organizations/store/departments\";\nimport * as memberships from \"@pf/src/modules/organizations/store/memberships\";\n\nconst router = useRouter();\nconst route = useRoute();\n\nasync function fetchData() {\n const users = ref(memberships.state.memberships);\n // await departments.actions.read({organization: route.params._id});\n if (route.params.department) await departments.actions.readOne(route.params.department);\n}\n\nfetchData();\n\n// const members = ref(departments.state.department.members);\n\nconst isOpenAddMemberPopup = ref(false);\nconst selectedMember = ref(null);\n\nfunction openMemberPopup(member) {\n isOpenAddMemberPopup.value = true;\n if (typeof member === \"number\") selectedMember.value = member;\n}\n\nfunction closeMemberPopup() {\n isOpenAddMemberPopup.value = false;\n selectedMember.value = null;\n}\n\nconst isOpenDepartmentPopup = ref(false);\nconst selectedDepartment = ref(null);\n\nfunction openDepartmentPopup(department) {\n isOpenDepartmentPopup.value = true;\n if (typeof department === \"number\") selectedDepartment.value = department;\n}\n\nfunction closeDepartmentPopup() {\n isOpenDepartmentPopup.value = false;\n selectedDepartment.value = null;\n}\n\nasync function onSubmit() {\n if (route.params.department) {\n await departments.actions.update(\n route.params._id,\n departments.state.department\n );\n }\n if (!route.params.department) {\n await departments.actions.create(\n route.params._id,\n departments.state.department\n );\n }\n}\n\nfunction redirectTo() {\n router.push({ name: \"Organization Members\", params: { _id: route.params._id } });\n}\n\nasync function onDelete() {\n if (confirm(\"Are you sure you want to delete this department?\")) {\n await departments.actions.delete(\n route.params._id,\n departments.state.department\n );\n }\n \n}\n\nfunction removeMember(member) {\n if (confirm(\"Are you sure you want to remove this member?\")) {\n globals.actions.delete(departments.state.department.members, { _id: member.user._id}) \n }\n}\n\nfunction redirectDash() {\n router.replace({ name: \"Organization\" });\n}\n</script>\n\n<style scoped>\n</style>"],"names":["memberships.state","departments.actions","departments.state","globals.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmVA,UAAM,SAAS,UAAS;AACxB,UAAM,QAAQ,SAAQ;AAEtB,mBAAe,YAAY;AACX,UAAIA,QAAkB,WAAW;AAE/C,UAAI,MAAM,OAAO,WAAY,OAAMC,UAAoB,QAAQ,MAAM,OAAO,UAAU;AAAA,IACxF;AAEA;AAIA,UAAM,uBAAuB,IAAI,KAAK;AACtC,UAAM,iBAAiB,IAAI,IAAI;AAE/B,aAAS,gBAAgB,QAAQ;AAC/B,2BAAqB,QAAQ;AAAA,IAE/B;AAEA,aAAS,mBAAmB;AAC1B,2BAAqB,QAAQ;AAC7B,qBAAe,QAAQ;AAAA,IACzB;AAE8B,QAAI,KAAK;AACZ,QAAI,IAAI;AAYnC,mBAAe,WAAW;AACxB,UAAI,MAAM,OAAO,YAAY;AAC3B,cAAMA,UAAoB;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,MAAkB;AAAA,QACxB;AAAA,MACG;AACD,UAAI,CAAC,MAAM,OAAO,YAAY;AAC5B,cAAMD,UAAoB;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,MAAkB;AAAA,QACxB;AAAA,MACG;AAAA,IACH;AAEA,aAAS,aAAa;AACpB,aAAO,KAAK,EAAE,MAAM,wBAAwB,QAAQ,EAAE,KAAK,MAAM,OAAO,IAAG,EAAI,CAAA;AAAA,IACjF;AAEA,mBAAe,WAAW;AACxB,UAAI,QAAQ,kDAAkD,GAAG;AAC/D,cAAMD,UAAoB;AAAA,UACxB,MAAM,OAAO;AAAA,UACbC,MAAkB;AAAA,QACxB;AAAA,MACG;AAAA,IAEH;AAEA,aAAS,aAAa,QAAQ;AAC3B,UAAI,QAAQ,8CAA8C,GAAG;AAC5DC,kBAAgB,OAAOD,MAAkB,WAAW,SAAS,EAAE,KAAK,OAAO,KAAK,IAAG,CAAC;AAAA,MACrF;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs
CHANGED
@@ -10,7 +10,7 @@ const SectionPageTitle = require("../../../globals/views/components/sections/Sec
|
|
10
10
|
const MembersAdd = require("../sections/MembersAdd.vue.cjs");
|
11
11
|
;/* empty css */
|
12
12
|
require("../../../../components/Menu/MenuItem.vue.cjs");
|
13
|
-
const CardUser = require("../../../
|
13
|
+
const CardUser = require("../../../auth/views/components/blocks/CardUser.vue.cjs");
|
14
14
|
const CardDepartment = require("../blocks/CardDepartment.vue.cjs");
|
15
15
|
const IconDelete = require("../../../icons/navigation/IconDelete.vue.cjs");
|
16
16
|
const auth = require("../../../auth/views/store/auth.cjs");
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Members.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/pages/Members.vue"],"sourcesContent":["<template>\n <div class=\"pd-thin\">\n <SectionPageTitle\n title=\"Members\"\n @update:tabs_current=\"(update) => tab = update\"\n :tabs_current=\"tab\"\n :tabs=\"[\n { name: `Members (${organization.state.current.numberOfMembers || 0})`, value: 'members' },\n { name: 'Departments', value: 'departments' },\n { name: 'Invites', value: 'invites' }\n ]\"\n :actions=\"[\n { method: openMembersAddPopup, label: 'Invite members' }\n ]\"\n class=\"mn-b-small bg-light bg-light radius-big\"\n />\n\n <Popup \n title=\"Add members\"\n @close-popup=\"closeMembersAddPopup\" \n :isPopupOpen=\"isOpenMembersAddPopup\"\n class=\"bg-white w-min-30r w-max-30r radius-big pd-medium\"\n >\n <MembersAdd \n text=\"Please enter your email or phone number to send an invitation link:\"\n :organization=\"organizationData\"\n @send-invite=\"handleSendInvite\"\n />\n </Popup> \n\n <Feed\n v-if=\"tab === 'departments'\"\n :states=\"{\n empty: {\n title: 'No Departments Found',\n description: 'Currently, there are no departments available.',\n action: 'Add department',\n callback: () => $router.push(`/organizations/${route.params._id}/departments/create`)\n }\n }\"\n :store=\"{\n read: (options) => departments.actions.read(options),\n state: null\n }\"\n :options=\"{\n organization: route.params._id,\n user: auth.state.user._id,\n }\"\n v-slot=\"{ \n items \n }\"\n >\n <CardDepartment\n v-for=\"(department, index) in items\"\n :key=\"index\"\n :department=\"department\"\n :organization=\"route.params._id\"\n class=\"radius-semi bg-light pos-relative mn-b-thin\"\n />\n\n </Feed>\n <router-link\n v-if=\"tab === 'departments' && departments.state.departments.length > 0\"\n :to=\"{\n path: `/organizations/${route.params._id}/departments/create`\n }\"\n class=\"d-block flex-center flex uppercase t-semi bg-main w-100 pd-small radius-extra\"\n >\n Add department\n </router-link>\n <!-- Members -->\n <div \n v-if=\"tab === 'members'\"\n class=\"cols-1 gap-thin\"\n >\n <Feed\n :search=\"true\"\n :states=\"{\n empty: {\n title: 'No Members Found',\n description: 'Currently, there are no members.'\n }\n }\"\n :store=\"{\n read: (options) => memberships.actions.read(options)\n }\"\n :options=\"{\n target: route.params._id,\n role: ['member','owner']\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"gap-thin cols-1\"\n >\n <CardUser \n v-for=\"(member,index) in items\" \n :key=\"index\" \n :user=\"member\"\n :_id=\"member.user._id\"\n :photo=\"member.user.profile.photo\" \n :phone=\"member.user.phone\"\n :email=\"member.user.email\"\n :name=\"member.user.profile.name || 'No name'\"\n :role=\"member.label || member.role\"\n @click=\"$router.push(`/profile/${member.user._id}`)\" \n :action=\" member.role !== 'owner' ? {\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeMember(index, member)\n } : null\"\n class=\"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium\"\n />\n </Feed>\n </div>\n <!-- Invites -->\n <div \n v-if=\"tab === 'invites'\"\n > \n <Feed\n v-model:items=\"invitesState\"\n :states=\"{\n empty: {\n title: 'No Invites Found',\n description: 'Currently, there are no members.'\n }\n }\"\n :store=\"{\n read: (options) => invites.actions.read(options)\n }\"\n :options=\"{\n owner: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"gap-thin cols-1\"\n >\n <CardUser \n v-for=\"invite in items\" \n :key=\"index\" \n :user=\"{ type: 'invite'} \"\n :name=\"invite.email || invite.phone\"\n :role=\"invite.status\"\n :action=\"{\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeInvite(index, invite)\n }\"\n class=\"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium\"\n />\n </Feed>\n </div>\n \n </div>\n</template>\n\n<script setup>\nimport { ref, computed, onMounted } from 'vue';\nimport { useRoute, useRouter } from 'vue-router'\n\nimport Feed from '@pf/src/components/Feed/Feed.vue'\nimport Tab from '@pf/src/components/Tab/Tab.vue'\nimport Block from '@pf/src/components/Block/Block.vue'\nimport Popup from '@pf/src/components/Popup/Popup.vue';\n\nimport SectionPageTitle from '@pf/src/modules/globals/views/components/sections/SectionPageTitle.vue'\nimport PlaceholderUserpic from '@pf/src/modules/icons/placeholders/PlaceholderUserpic.vue'\n\nimport MembersAdd from '@pf/src/modules/organizations/components/sections/MembersAdd.vue';\n\n// Mobile Module\nimport Menu from '@pf/src/components/Menu/Menu.vue'\nimport MenuItem from '@pf/src/components/Menu/MenuItem.vue'\n\nimport CardUser from '@pf/src/modules/users/components/blocks/CardUser.vue';\nimport CardDepartment from '@pf/src/modules/organizations/components/blocks/CardDepartment.vue';\n\nimport IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'\n\nimport * as auth from '@pf/src/modules/auth/views/store/auth'\nimport * as globals from '@pf/src/modules/globals/views/store/globals'\nimport * as invites from '@pf/src/modules/organizations/store/invites';\nimport * as memberships from '@pf/src/modules/organizations/store/memberships';\nimport * as organization from '@pf/src/modules/organizations/store/organizations'\nimport * as departments from '@pf/src/modules/organizations/store/departments';\n\nconst route = useRoute()\nconst router = useRouter()\nconst organizationData = ref(null)\n\n// Tab logic\nconst tab = ref('members')\n// States\nconst invitesState = ref([])\n// Popup\nconst isOpenMembersAddPopup = ref(false);\n\nfunction openMembersAddPopup() {\n isOpenMembersAddPopup.value = true;\n}\n\nfunction closeMembersAddPopup() {\n isOpenMembersAddPopup.value = false;\n}\n\nonMounted(async () => {\n organizationData.value = (await organization.actions.read({_id: route.params._id, user: auth.state.user._id}))[0]\n ;\n})\n\nconst FirstLevelDepartments = computed(() => {\n const departmentsState = departments.state.departments;\n\n const subdepartmentIds = departmentsState.flatMap(department =>\n department.subdepartments.map(subdepartment => subdepartment._id)\n );\n\n return departmentsState.filter(department =>\n !subdepartmentIds.includes(department._id)\n );\n});\n\nasync function handleSendInvite(list, resolve, reject) {\n try {\n const response = await invites.actions.create({\n owner: {\n type: 'Organization',\n target: organizationData.value._id\n },\n creator: {\n type: 'User',\n target: auth.state.user._id\n },\n invites: list,\n });\n for (let invite of response.createdInvites) {\n globals.actions.add(invitesState.value, invite)\n }\n closeMembersAddPopup();\n resolve(); // Вызываем resolve, когда все операции завершены успешно\n } catch (error) {\n reject(error); // Вызываем reject, если произошла ошибка\n }\n}\n\nasync function removeMember(index,member) {\n if (confirm(\"Confirm remove of member\") == true) {\n memberships.state.memberships.splice(index, 1);\n await memberships.actions.delete(member);\n } \n}\n\nasync function removeInvite(index,invite) {\n if (confirm(\"Confirm remove of member\") == true) {\n globals.actions.delete(invitesState.value, invite)\n await invites.actions.delete(invite._id);\n }\n}\n</script>\n\n<style scoped>\n</style>\n"],"names":["useRoute","useRouter","ref","onMounted","organization.actions","auth.state","computed","departments.state","invites.actions","globals.actions","memberships.state","memberships.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+LA,UAAM,QAAUA,UAAAA,SAAU;AACTC,cAAAA,UAAW;AAC5B,UAAM,mBAAmBC,IAAG,IAAC,IAAI;AAGjC,UAAM,MAAMA,IAAG,IAAC,SAAS;AAEzB,UAAM,eAAeA,IAAG,IAAC,EAAE;AAE3B,UAAM,wBAAwBA,IAAAA,IAAI,KAAK;AAEvC,aAAS,sBAAsB;AAC7B,4BAAsB,QAAQ;AAAA,IAChC;AAEA,aAAS,uBAAuB;AAC9B,4BAAsB,QAAQ;AAAA,IAChC;AAEAC,QAAAA,UAAU,YAAY;AACpB,uBAAiB,SAAS,MAAMC,cAAoB,QAAC,KAAK,EAAC,KAAK,MAAM,OAAO,KAAK,MAAMC,KAAU,MAAC,KAAK,IAAG,CAAC,GAAG,CAAC;AAAA,IAElH,CAAC;AAE6BC,QAAAA,SAAS,MAAM;AAC3C,YAAM,mBAAmBC,YAAiB,MAAC;AAE3C,YAAM,mBAAmB,iBAAiB;AAAA,QAAQ,gBAChD,WAAW,eAAe,IAAI,mBAAiB,cAAc,GAAG;AAAA,MACpE;AAEE,aAAO,iBAAiB;AAAA,QAAO,gBAC7B,CAAC,iBAAiB,SAAS,WAAW,GAAG;AAAA,MAC7C;AAAA,IACA,CAAC;AAED,mBAAe,iBAAiB,MAAM,SAAS,QAAQ;AACrD,UAAI;AACF,cAAM,WAAW,MAAMC,QAAe,QAAC,OAAO;AAAA,UAC5C,OAAO;AAAA,YACL,MAAM;AAAA,YACN,QAAQ,iBAAiB,MAAM;AAAA,UAChC;AAAA,UACD,SAAS;AAAA,YACP,MAAM;AAAA,YACN,QAAQH,KAAAA,MAAW,KAAK;AAAA,UACzB;AAAA,UACD,SAAS;AAAA,QACf,CAAK;AACD,iBAAS,UAAU,SAAS,gBAAgB;AAC1CI,kBAAAA,QAAgB,IAAI,aAAa,OAAO,MAAM;AAAA,QAC/C;AACD;AACA;MACD,SAAQ,OAAO;AACd,eAAO,KAAK;AAAA,MACb;AAAA,IACH;AAEA,mBAAe,aAAa,OAAM,QAAQ;AACxC,UAAI,QAAQ,0BAA0B,KAAK,MAAM;AAC/CC,oBAAAA,MAAkB,YAAY,OAAO,OAAO,CAAC;AAC7C,cAAMC,YAAmB,QAAC,OAAO,MAAM;AAAA,MACxC;AAAA,IACH;AAEA,mBAAe,aAAa,OAAM,QAAQ;AACxC,UAAI,QAAQ,0BAA0B,KAAK,MAAM;AAC/CF,gBAAAA,QAAgB,OAAO,aAAa,OAAO,MAAM;AACjD,cAAMD,gBAAgB,OAAO,OAAO,GAAG;AAAA,MACxC;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"Members.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/pages/Members.vue"],"sourcesContent":["<template>\n <div class=\"pd-thin\">\n <SectionPageTitle\n title=\"Members\"\n @update:tabs_current=\"(update) => tab = update\"\n :tabs_current=\"tab\"\n :tabs=\"[\n { name: `Members (${organization.state.current.numberOfMembers || 0})`, value: 'members' },\n { name: 'Departments', value: 'departments' },\n { name: 'Invites', value: 'invites' }\n ]\"\n :actions=\"[\n { method: openMembersAddPopup, label: 'Invite members' }\n ]\"\n class=\"mn-b-small bg-light bg-light radius-big\"\n />\n\n <Popup \n title=\"Add members\"\n @close-popup=\"closeMembersAddPopup\" \n :isPopupOpen=\"isOpenMembersAddPopup\"\n class=\"bg-white w-min-30r w-max-30r radius-big pd-medium\"\n >\n <MembersAdd \n text=\"Please enter your email or phone number to send an invitation link:\"\n :organization=\"organizationData\"\n @send-invite=\"handleSendInvite\"\n />\n </Popup> \n\n <Feed\n v-if=\"tab === 'departments'\"\n :states=\"{\n empty: {\n title: 'No Departments Found',\n description: 'Currently, there are no departments available.',\n action: 'Add department',\n callback: () => $router.push(`/organizations/${route.params._id}/departments/create`)\n }\n }\"\n :store=\"{\n read: (options) => departments.actions.read(options),\n state: null\n }\"\n :options=\"{\n organization: route.params._id,\n user: auth.state.user._id,\n }\"\n v-slot=\"{ \n items \n }\"\n >\n <CardDepartment\n v-for=\"(department, index) in items\"\n :key=\"index\"\n :department=\"department\"\n :organization=\"route.params._id\"\n class=\"radius-semi bg-light pos-relative mn-b-thin\"\n />\n\n </Feed>\n <router-link\n v-if=\"tab === 'departments' && departments.state.departments.length > 0\"\n :to=\"{\n path: `/organizations/${route.params._id}/departments/create`\n }\"\n class=\"d-block flex-center flex uppercase t-semi bg-main w-100 pd-small radius-extra\"\n >\n Add department\n </router-link>\n <!-- Members -->\n <div \n v-if=\"tab === 'members'\"\n class=\"cols-1 gap-thin\"\n >\n <Feed\n :search=\"true\"\n :states=\"{\n empty: {\n title: 'No Members Found',\n description: 'Currently, there are no members.'\n }\n }\"\n :store=\"{\n read: (options) => memberships.actions.read(options)\n }\"\n :options=\"{\n target: route.params._id,\n role: ['member','owner']\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"gap-thin cols-1\"\n >\n <CardUser \n v-for=\"(member,index) in items\" \n :key=\"index\" \n :user=\"member\"\n :_id=\"member.user._id\"\n :photo=\"member.user.profile.photo\" \n :phone=\"member.user.phone\"\n :email=\"member.user.email\"\n :name=\"member.user.profile.name || 'No name'\"\n :role=\"member.label || member.role\"\n @click=\"$router.push(`/profile/${member.user._id}`)\" \n :action=\" member.role !== 'owner' ? {\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeMember(index, member)\n } : null\"\n class=\"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium\"\n />\n </Feed>\n </div>\n <!-- Invites -->\n <div \n v-if=\"tab === 'invites'\"\n > \n <Feed\n v-model:items=\"invitesState\"\n :states=\"{\n empty: {\n title: 'No Invites Found',\n description: 'Currently, there are no members.'\n }\n }\"\n :store=\"{\n read: (options) => invites.actions.read(options)\n }\"\n :options=\"{\n owner: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"gap-thin cols-1\"\n >\n <CardUser \n v-for=\"invite in items\" \n :key=\"index\" \n :user=\"{ type: 'invite'} \"\n :name=\"invite.email || invite.phone\"\n :role=\"invite.status\"\n :action=\"{\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeInvite(index, invite)\n }\"\n class=\"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium\"\n />\n </Feed>\n </div>\n \n </div>\n</template>\n\n<script setup>\nimport { ref, computed, onMounted } from 'vue';\nimport { useRoute, useRouter } from 'vue-router'\n\nimport Feed from '@pf/src/components/Feed/Feed.vue'\nimport Tab from '@pf/src/components/Tab/Tab.vue'\nimport Block from '@pf/src/components/Block/Block.vue'\nimport Popup from '@pf/src/components/Popup/Popup.vue';\n\nimport SectionPageTitle from '@pf/src/modules/globals/views/components/sections/SectionPageTitle.vue'\nimport PlaceholderUserpic from '@pf/src/modules/icons/placeholders/PlaceholderUserpic.vue'\n\nimport MembersAdd from '@pf/src/modules/organizations/components/sections/MembersAdd.vue';\n\n// Mobile Module\nimport Menu from '@pf/src/components/Menu/Menu.vue'\nimport MenuItem from '@pf/src/components/Menu/MenuItem.vue'\n\nimport CardUser from '@pf/src/modules/auth/views/components/blocks/CardUser.vue';\nimport CardDepartment from '@pf/src/modules/organizations/components/blocks/CardDepartment.vue';\n\nimport IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'\n\nimport * as auth from '@pf/src/modules/auth/views/store/auth'\nimport * as globals from '@pf/src/modules/globals/views/store/globals'\nimport * as invites from '@pf/src/modules/organizations/store/invites';\nimport * as memberships from '@pf/src/modules/organizations/store/memberships';\nimport * as organization from '@pf/src/modules/organizations/store/organizations'\nimport * as departments from '@pf/src/modules/organizations/store/departments';\n\nconst route = useRoute()\nconst router = useRouter()\nconst organizationData = ref(null)\n\n// Tab logic\nconst tab = ref('members')\n// States\nconst invitesState = ref([])\n// Popup\nconst isOpenMembersAddPopup = ref(false);\n\nfunction openMembersAddPopup() {\n isOpenMembersAddPopup.value = true;\n}\n\nfunction closeMembersAddPopup() {\n isOpenMembersAddPopup.value = false;\n}\n\nonMounted(async () => {\n organizationData.value = (await organization.actions.read({_id: route.params._id, user: auth.state.user._id}))[0]\n ;\n})\n\nconst FirstLevelDepartments = computed(() => {\n const departmentsState = departments.state.departments;\n\n const subdepartmentIds = departmentsState.flatMap(department =>\n department.subdepartments.map(subdepartment => subdepartment._id)\n );\n\n return departmentsState.filter(department =>\n !subdepartmentIds.includes(department._id)\n );\n});\n\nasync function handleSendInvite(list, resolve, reject) {\n try {\n const response = await invites.actions.create({\n owner: {\n type: 'Organization',\n target: organizationData.value._id\n },\n creator: {\n type: 'User',\n target: auth.state.user._id\n },\n invites: list,\n });\n for (let invite of response.createdInvites) {\n globals.actions.add(invitesState.value, invite)\n }\n closeMembersAddPopup();\n resolve(); // Вызываем resolve, когда все операции завершены успешно\n } catch (error) {\n reject(error); // Вызываем reject, если произошла ошибка\n }\n}\n\nasync function removeMember(index,member) {\n if (confirm(\"Confirm remove of member\") == true) {\n memberships.state.memberships.splice(index, 1);\n await memberships.actions.delete(member);\n } \n}\n\nasync function removeInvite(index,invite) {\n if (confirm(\"Confirm remove of member\") == true) {\n globals.actions.delete(invitesState.value, invite)\n await invites.actions.delete(invite._id);\n }\n}\n</script>\n\n<style scoped>\n</style>\n"],"names":["useRoute","useRouter","ref","onMounted","organization.actions","auth.state","computed","departments.state","invites.actions","globals.actions","memberships.state","memberships.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+LA,UAAM,QAAUA,UAAAA,SAAU;AACTC,cAAAA,UAAW;AAC5B,UAAM,mBAAmBC,IAAG,IAAC,IAAI;AAGjC,UAAM,MAAMA,IAAG,IAAC,SAAS;AAEzB,UAAM,eAAeA,IAAG,IAAC,EAAE;AAE3B,UAAM,wBAAwBA,IAAAA,IAAI,KAAK;AAEvC,aAAS,sBAAsB;AAC7B,4BAAsB,QAAQ;AAAA,IAChC;AAEA,aAAS,uBAAuB;AAC9B,4BAAsB,QAAQ;AAAA,IAChC;AAEAC,QAAAA,UAAU,YAAY;AACpB,uBAAiB,SAAS,MAAMC,cAAoB,QAAC,KAAK,EAAC,KAAK,MAAM,OAAO,KAAK,MAAMC,KAAU,MAAC,KAAK,IAAG,CAAC,GAAG,CAAC;AAAA,IAElH,CAAC;AAE6BC,QAAAA,SAAS,MAAM;AAC3C,YAAM,mBAAmBC,YAAiB,MAAC;AAE3C,YAAM,mBAAmB,iBAAiB;AAAA,QAAQ,gBAChD,WAAW,eAAe,IAAI,mBAAiB,cAAc,GAAG;AAAA,MACpE;AAEE,aAAO,iBAAiB;AAAA,QAAO,gBAC7B,CAAC,iBAAiB,SAAS,WAAW,GAAG;AAAA,MAC7C;AAAA,IACA,CAAC;AAED,mBAAe,iBAAiB,MAAM,SAAS,QAAQ;AACrD,UAAI;AACF,cAAM,WAAW,MAAMC,QAAe,QAAC,OAAO;AAAA,UAC5C,OAAO;AAAA,YACL,MAAM;AAAA,YACN,QAAQ,iBAAiB,MAAM;AAAA,UAChC;AAAA,UACD,SAAS;AAAA,YACP,MAAM;AAAA,YACN,QAAQH,KAAAA,MAAW,KAAK;AAAA,UACzB;AAAA,UACD,SAAS;AAAA,QACf,CAAK;AACD,iBAAS,UAAU,SAAS,gBAAgB;AAC1CI,kBAAAA,QAAgB,IAAI,aAAa,OAAO,MAAM;AAAA,QAC/C;AACD;AACA;MACD,SAAQ,OAAO;AACd,eAAO,KAAK;AAAA,MACb;AAAA,IACH;AAEA,mBAAe,aAAa,OAAM,QAAQ;AACxC,UAAI,QAAQ,0BAA0B,KAAK,MAAM;AAC/CC,oBAAAA,MAAkB,YAAY,OAAO,OAAO,CAAC;AAC7C,cAAMC,YAAmB,QAAC,OAAO,MAAM;AAAA,MACxC;AAAA,IACH;AAEA,mBAAe,aAAa,OAAM,QAAQ;AACxC,UAAI,QAAQ,0BAA0B,KAAK,MAAM;AAC/CF,gBAAAA,QAAgB,OAAO,aAAa,OAAO,MAAM;AACjD,cAAMD,gBAAgB,OAAO,OAAO,GAAG;AAAA,MACxC;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -8,7 +8,7 @@ import _sfc_main$1 from "../../../globals/views/components/sections/SectionPageT
|
|
8
8
|
import _sfc_main$3 from "../sections/MembersAdd.vue.js";
|
9
9
|
/* empty css */
|
10
10
|
import "../../../../components/Menu/MenuItem.vue.js";
|
11
|
-
import _sfc_main$5 from "../../../
|
11
|
+
import _sfc_main$5 from "../../../auth/views/components/blocks/CardUser.vue.js";
|
12
12
|
import CardDepartment from "../blocks/CardDepartment.vue.js";
|
13
13
|
import _sfc_main$6 from "../../../icons/navigation/IconDelete.vue.js";
|
14
14
|
import { state } from "../../../auth/views/store/auth.js";
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Members.vue.js","sources":["../../../../../../../src/modules/organizations/components/pages/Members.vue"],"sourcesContent":["<template>\n <div class=\"pd-thin\">\n <SectionPageTitle\n title=\"Members\"\n @update:tabs_current=\"(update) => tab = update\"\n :tabs_current=\"tab\"\n :tabs=\"[\n { name: `Members (${organization.state.current.numberOfMembers || 0})`, value: 'members' },\n { name: 'Departments', value: 'departments' },\n { name: 'Invites', value: 'invites' }\n ]\"\n :actions=\"[\n { method: openMembersAddPopup, label: 'Invite members' }\n ]\"\n class=\"mn-b-small bg-light bg-light radius-big\"\n />\n\n <Popup \n title=\"Add members\"\n @close-popup=\"closeMembersAddPopup\" \n :isPopupOpen=\"isOpenMembersAddPopup\"\n class=\"bg-white w-min-30r w-max-30r radius-big pd-medium\"\n >\n <MembersAdd \n text=\"Please enter your email or phone number to send an invitation link:\"\n :organization=\"organizationData\"\n @send-invite=\"handleSendInvite\"\n />\n </Popup> \n\n <Feed\n v-if=\"tab === 'departments'\"\n :states=\"{\n empty: {\n title: 'No Departments Found',\n description: 'Currently, there are no departments available.',\n action: 'Add department',\n callback: () => $router.push(`/organizations/${route.params._id}/departments/create`)\n }\n }\"\n :store=\"{\n read: (options) => departments.actions.read(options),\n state: null\n }\"\n :options=\"{\n organization: route.params._id,\n user: auth.state.user._id,\n }\"\n v-slot=\"{ \n items \n }\"\n >\n <CardDepartment\n v-for=\"(department, index) in items\"\n :key=\"index\"\n :department=\"department\"\n :organization=\"route.params._id\"\n class=\"radius-semi bg-light pos-relative mn-b-thin\"\n />\n\n </Feed>\n <router-link\n v-if=\"tab === 'departments' && departments.state.departments.length > 0\"\n :to=\"{\n path: `/organizations/${route.params._id}/departments/create`\n }\"\n class=\"d-block flex-center flex uppercase t-semi bg-main w-100 pd-small radius-extra\"\n >\n Add department\n </router-link>\n <!-- Members -->\n <div \n v-if=\"tab === 'members'\"\n class=\"cols-1 gap-thin\"\n >\n <Feed\n :search=\"true\"\n :states=\"{\n empty: {\n title: 'No Members Found',\n description: 'Currently, there are no members.'\n }\n }\"\n :store=\"{\n read: (options) => memberships.actions.read(options)\n }\"\n :options=\"{\n target: route.params._id,\n role: ['member','owner']\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"gap-thin cols-1\"\n >\n <CardUser \n v-for=\"(member,index) in items\" \n :key=\"index\" \n :user=\"member\"\n :_id=\"member.user._id\"\n :photo=\"member.user.profile.photo\" \n :phone=\"member.user.phone\"\n :email=\"member.user.email\"\n :name=\"member.user.profile.name || 'No name'\"\n :role=\"member.label || member.role\"\n @click=\"$router.push(`/profile/${member.user._id}`)\" \n :action=\" member.role !== 'owner' ? {\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeMember(index, member)\n } : null\"\n class=\"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium\"\n />\n </Feed>\n </div>\n <!-- Invites -->\n <div \n v-if=\"tab === 'invites'\"\n > \n <Feed\n v-model:items=\"invitesState\"\n :states=\"{\n empty: {\n title: 'No Invites Found',\n description: 'Currently, there are no members.'\n }\n }\"\n :store=\"{\n read: (options) => invites.actions.read(options)\n }\"\n :options=\"{\n owner: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"gap-thin cols-1\"\n >\n <CardUser \n v-for=\"invite in items\" \n :key=\"index\" \n :user=\"{ type: 'invite'} \"\n :name=\"invite.email || invite.phone\"\n :role=\"invite.status\"\n :action=\"{\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeInvite(index, invite)\n }\"\n class=\"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium\"\n />\n </Feed>\n </div>\n \n </div>\n</template>\n\n<script setup>\nimport { ref, computed, onMounted } from 'vue';\nimport { useRoute, useRouter } from 'vue-router'\n\nimport Feed from '@pf/src/components/Feed/Feed.vue'\nimport Tab from '@pf/src/components/Tab/Tab.vue'\nimport Block from '@pf/src/components/Block/Block.vue'\nimport Popup from '@pf/src/components/Popup/Popup.vue';\n\nimport SectionPageTitle from '@pf/src/modules/globals/views/components/sections/SectionPageTitle.vue'\nimport PlaceholderUserpic from '@pf/src/modules/icons/placeholders/PlaceholderUserpic.vue'\n\nimport MembersAdd from '@pf/src/modules/organizations/components/sections/MembersAdd.vue';\n\n// Mobile Module\nimport Menu from '@pf/src/components/Menu/Menu.vue'\nimport MenuItem from '@pf/src/components/Menu/MenuItem.vue'\n\nimport CardUser from '@pf/src/modules/users/components/blocks/CardUser.vue';\nimport CardDepartment from '@pf/src/modules/organizations/components/blocks/CardDepartment.vue';\n\nimport IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'\n\nimport * as auth from '@pf/src/modules/auth/views/store/auth'\nimport * as globals from '@pf/src/modules/globals/views/store/globals'\nimport * as invites from '@pf/src/modules/organizations/store/invites';\nimport * as memberships from '@pf/src/modules/organizations/store/memberships';\nimport * as organization from '@pf/src/modules/organizations/store/organizations'\nimport * as departments from '@pf/src/modules/organizations/store/departments';\n\nconst route = useRoute()\nconst router = useRouter()\nconst organizationData = ref(null)\n\n// Tab logic\nconst tab = ref('members')\n// States\nconst invitesState = ref([])\n// Popup\nconst isOpenMembersAddPopup = ref(false);\n\nfunction openMembersAddPopup() {\n isOpenMembersAddPopup.value = true;\n}\n\nfunction closeMembersAddPopup() {\n isOpenMembersAddPopup.value = false;\n}\n\nonMounted(async () => {\n organizationData.value = (await organization.actions.read({_id: route.params._id, user: auth.state.user._id}))[0]\n ;\n})\n\nconst FirstLevelDepartments = computed(() => {\n const departmentsState = departments.state.departments;\n\n const subdepartmentIds = departmentsState.flatMap(department =>\n department.subdepartments.map(subdepartment => subdepartment._id)\n );\n\n return departmentsState.filter(department =>\n !subdepartmentIds.includes(department._id)\n );\n});\n\nasync function handleSendInvite(list, resolve, reject) {\n try {\n const response = await invites.actions.create({\n owner: {\n type: 'Organization',\n target: organizationData.value._id\n },\n creator: {\n type: 'User',\n target: auth.state.user._id\n },\n invites: list,\n });\n for (let invite of response.createdInvites) {\n globals.actions.add(invitesState.value, invite)\n }\n closeMembersAddPopup();\n resolve(); // Вызываем resolve, когда все операции завершены успешно\n } catch (error) {\n reject(error); // Вызываем reject, если произошла ошибка\n }\n}\n\nasync function removeMember(index,member) {\n if (confirm(\"Confirm remove of member\") == true) {\n memberships.state.memberships.splice(index, 1);\n await memberships.actions.delete(member);\n } \n}\n\nasync function removeInvite(index,invite) {\n if (confirm(\"Confirm remove of member\") == true) {\n globals.actions.delete(invitesState.value, invite)\n await invites.actions.delete(invite._id);\n }\n}\n</script>\n\n<style scoped>\n</style>\n"],"names":["organization.actions","auth.state","departments.state","invites.actions","globals.actions","memberships.state","memberships.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+LA,UAAM,QAAU,SAAU;AACT,cAAW;AAC5B,UAAM,mBAAmB,IAAI,IAAI;AAGjC,UAAM,MAAM,IAAI,SAAS;AAEzB,UAAM,eAAe,IAAI,EAAE;AAE3B,UAAM,wBAAwB,IAAI,KAAK;AAEvC,aAAS,sBAAsB;AAC7B,4BAAsB,QAAQ;AAAA,IAChC;AAEA,aAAS,uBAAuB;AAC9B,4BAAsB,QAAQ;AAAA,IAChC;AAEA,cAAU,YAAY;AACpB,uBAAiB,SAAS,MAAMA,QAAqB,KAAK,EAAC,KAAK,MAAM,OAAO,KAAK,MAAMC,MAAW,KAAK,IAAG,CAAC,GAAG,CAAC;AAAA,IAElH,CAAC;AAE6B,aAAS,MAAM;AAC3C,YAAM,mBAAmBC,QAAkB;AAE3C,YAAM,mBAAmB,iBAAiB;AAAA,QAAQ,gBAChD,WAAW,eAAe,IAAI,mBAAiB,cAAc,GAAG;AAAA,MACpE;AAEE,aAAO,iBAAiB;AAAA,QAAO,gBAC7B,CAAC,iBAAiB,SAAS,WAAW,GAAG;AAAA,MAC7C;AAAA,IACA,CAAC;AAED,mBAAe,iBAAiB,MAAM,SAAS,QAAQ;AACrD,UAAI;AACF,cAAM,WAAW,MAAMC,UAAgB,OAAO;AAAA,UAC5C,OAAO;AAAA,YACL,MAAM;AAAA,YACN,QAAQ,iBAAiB,MAAM;AAAA,UAChC;AAAA,UACD,SAAS;AAAA,YACP,MAAM;AAAA,YACN,QAAQF,MAAW,KAAK;AAAA,UACzB;AAAA,UACD,SAAS;AAAA,QACf,CAAK;AACD,iBAAS,UAAU,SAAS,gBAAgB;AAC1CG,oBAAgB,IAAI,aAAa,OAAO,MAAM;AAAA,QAC/C;AACD;AACA;MACD,SAAQ,OAAO;AACd,eAAO,KAAK;AAAA,MACb;AAAA,IACH;AAEA,mBAAe,aAAa,OAAM,QAAQ;AACxC,UAAI,QAAQ,0BAA0B,KAAK,MAAM;AAC/CC,gBAAkB,YAAY,OAAO,OAAO,CAAC;AAC7C,cAAMC,UAAoB,OAAO,MAAM;AAAA,MACxC;AAAA,IACH;AAEA,mBAAe,aAAa,OAAM,QAAQ;AACxC,UAAI,QAAQ,0BAA0B,KAAK,MAAM;AAC/CF,kBAAgB,OAAO,aAAa,OAAO,MAAM;AACjD,cAAMD,UAAgB,OAAO,OAAO,GAAG;AAAA,MACxC;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"Members.vue.js","sources":["../../../../../../../src/modules/organizations/components/pages/Members.vue"],"sourcesContent":["<template>\n <div class=\"pd-thin\">\n <SectionPageTitle\n title=\"Members\"\n @update:tabs_current=\"(update) => tab = update\"\n :tabs_current=\"tab\"\n :tabs=\"[\n { name: `Members (${organization.state.current.numberOfMembers || 0})`, value: 'members' },\n { name: 'Departments', value: 'departments' },\n { name: 'Invites', value: 'invites' }\n ]\"\n :actions=\"[\n { method: openMembersAddPopup, label: 'Invite members' }\n ]\"\n class=\"mn-b-small bg-light bg-light radius-big\"\n />\n\n <Popup \n title=\"Add members\"\n @close-popup=\"closeMembersAddPopup\" \n :isPopupOpen=\"isOpenMembersAddPopup\"\n class=\"bg-white w-min-30r w-max-30r radius-big pd-medium\"\n >\n <MembersAdd \n text=\"Please enter your email or phone number to send an invitation link:\"\n :organization=\"organizationData\"\n @send-invite=\"handleSendInvite\"\n />\n </Popup> \n\n <Feed\n v-if=\"tab === 'departments'\"\n :states=\"{\n empty: {\n title: 'No Departments Found',\n description: 'Currently, there are no departments available.',\n action: 'Add department',\n callback: () => $router.push(`/organizations/${route.params._id}/departments/create`)\n }\n }\"\n :store=\"{\n read: (options) => departments.actions.read(options),\n state: null\n }\"\n :options=\"{\n organization: route.params._id,\n user: auth.state.user._id,\n }\"\n v-slot=\"{ \n items \n }\"\n >\n <CardDepartment\n v-for=\"(department, index) in items\"\n :key=\"index\"\n :department=\"department\"\n :organization=\"route.params._id\"\n class=\"radius-semi bg-light pos-relative mn-b-thin\"\n />\n\n </Feed>\n <router-link\n v-if=\"tab === 'departments' && departments.state.departments.length > 0\"\n :to=\"{\n path: `/organizations/${route.params._id}/departments/create`\n }\"\n class=\"d-block flex-center flex uppercase t-semi bg-main w-100 pd-small radius-extra\"\n >\n Add department\n </router-link>\n <!-- Members -->\n <div \n v-if=\"tab === 'members'\"\n class=\"cols-1 gap-thin\"\n >\n <Feed\n :search=\"true\"\n :states=\"{\n empty: {\n title: 'No Members Found',\n description: 'Currently, there are no members.'\n }\n }\"\n :store=\"{\n read: (options) => memberships.actions.read(options)\n }\"\n :options=\"{\n target: route.params._id,\n role: ['member','owner']\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"gap-thin cols-1\"\n >\n <CardUser \n v-for=\"(member,index) in items\" \n :key=\"index\" \n :user=\"member\"\n :_id=\"member.user._id\"\n :photo=\"member.user.profile.photo\" \n :phone=\"member.user.phone\"\n :email=\"member.user.email\"\n :name=\"member.user.profile.name || 'No name'\"\n :role=\"member.label || member.role\"\n @click=\"$router.push(`/profile/${member.user._id}`)\" \n :action=\" member.role !== 'owner' ? {\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeMember(index, member)\n } : null\"\n class=\"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium\"\n />\n </Feed>\n </div>\n <!-- Invites -->\n <div \n v-if=\"tab === 'invites'\"\n > \n <Feed\n v-model:items=\"invitesState\"\n :states=\"{\n empty: {\n title: 'No Invites Found',\n description: 'Currently, there are no members.'\n }\n }\"\n :store=\"{\n read: (options) => invites.actions.read(options)\n }\"\n :options=\"{\n owner: route.params._id\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"gap-thin cols-1\"\n >\n <CardUser \n v-for=\"invite in items\" \n :key=\"index\" \n :user=\"{ type: 'invite'} \"\n :name=\"invite.email || invite.phone\"\n :role=\"invite.status\"\n :action=\"{\n label: {\n is: IconDelete,\n props: { class: 'i-medium', fill: 'rgb(var(--white)' }\n },\n method: () => removeInvite(index, invite)\n }\"\n class=\"h-4r w-100 bg-light radius-big flex-nowrap flex pd-medium\"\n />\n </Feed>\n </div>\n \n </div>\n</template>\n\n<script setup>\nimport { ref, computed, onMounted } from 'vue';\nimport { useRoute, useRouter } from 'vue-router'\n\nimport Feed from '@pf/src/components/Feed/Feed.vue'\nimport Tab from '@pf/src/components/Tab/Tab.vue'\nimport Block from '@pf/src/components/Block/Block.vue'\nimport Popup from '@pf/src/components/Popup/Popup.vue';\n\nimport SectionPageTitle from '@pf/src/modules/globals/views/components/sections/SectionPageTitle.vue'\nimport PlaceholderUserpic from '@pf/src/modules/icons/placeholders/PlaceholderUserpic.vue'\n\nimport MembersAdd from '@pf/src/modules/organizations/components/sections/MembersAdd.vue';\n\n// Mobile Module\nimport Menu from '@pf/src/components/Menu/Menu.vue'\nimport MenuItem from '@pf/src/components/Menu/MenuItem.vue'\n\nimport CardUser from '@pf/src/modules/auth/views/components/blocks/CardUser.vue';\nimport CardDepartment from '@pf/src/modules/organizations/components/blocks/CardDepartment.vue';\n\nimport IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue'\n\nimport * as auth from '@pf/src/modules/auth/views/store/auth'\nimport * as globals from '@pf/src/modules/globals/views/store/globals'\nimport * as invites from '@pf/src/modules/organizations/store/invites';\nimport * as memberships from '@pf/src/modules/organizations/store/memberships';\nimport * as organization from '@pf/src/modules/organizations/store/organizations'\nimport * as departments from '@pf/src/modules/organizations/store/departments';\n\nconst route = useRoute()\nconst router = useRouter()\nconst organizationData = ref(null)\n\n// Tab logic\nconst tab = ref('members')\n// States\nconst invitesState = ref([])\n// Popup\nconst isOpenMembersAddPopup = ref(false);\n\nfunction openMembersAddPopup() {\n isOpenMembersAddPopup.value = true;\n}\n\nfunction closeMembersAddPopup() {\n isOpenMembersAddPopup.value = false;\n}\n\nonMounted(async () => {\n organizationData.value = (await organization.actions.read({_id: route.params._id, user: auth.state.user._id}))[0]\n ;\n})\n\nconst FirstLevelDepartments = computed(() => {\n const departmentsState = departments.state.departments;\n\n const subdepartmentIds = departmentsState.flatMap(department =>\n department.subdepartments.map(subdepartment => subdepartment._id)\n );\n\n return departmentsState.filter(department =>\n !subdepartmentIds.includes(department._id)\n );\n});\n\nasync function handleSendInvite(list, resolve, reject) {\n try {\n const response = await invites.actions.create({\n owner: {\n type: 'Organization',\n target: organizationData.value._id\n },\n creator: {\n type: 'User',\n target: auth.state.user._id\n },\n invites: list,\n });\n for (let invite of response.createdInvites) {\n globals.actions.add(invitesState.value, invite)\n }\n closeMembersAddPopup();\n resolve(); // Вызываем resolve, когда все операции завершены успешно\n } catch (error) {\n reject(error); // Вызываем reject, если произошла ошибка\n }\n}\n\nasync function removeMember(index,member) {\n if (confirm(\"Confirm remove of member\") == true) {\n memberships.state.memberships.splice(index, 1);\n await memberships.actions.delete(member);\n } \n}\n\nasync function removeInvite(index,invite) {\n if (confirm(\"Confirm remove of member\") == true) {\n globals.actions.delete(invitesState.value, invite)\n await invites.actions.delete(invite._id);\n }\n}\n</script>\n\n<style scoped>\n</style>\n"],"names":["organization.actions","auth.state","departments.state","invites.actions","globals.actions","memberships.state","memberships.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+LA,UAAM,QAAU,SAAU;AACT,cAAW;AAC5B,UAAM,mBAAmB,IAAI,IAAI;AAGjC,UAAM,MAAM,IAAI,SAAS;AAEzB,UAAM,eAAe,IAAI,EAAE;AAE3B,UAAM,wBAAwB,IAAI,KAAK;AAEvC,aAAS,sBAAsB;AAC7B,4BAAsB,QAAQ;AAAA,IAChC;AAEA,aAAS,uBAAuB;AAC9B,4BAAsB,QAAQ;AAAA,IAChC;AAEA,cAAU,YAAY;AACpB,uBAAiB,SAAS,MAAMA,QAAqB,KAAK,EAAC,KAAK,MAAM,OAAO,KAAK,MAAMC,MAAW,KAAK,IAAG,CAAC,GAAG,CAAC;AAAA,IAElH,CAAC;AAE6B,aAAS,MAAM;AAC3C,YAAM,mBAAmBC,QAAkB;AAE3C,YAAM,mBAAmB,iBAAiB;AAAA,QAAQ,gBAChD,WAAW,eAAe,IAAI,mBAAiB,cAAc,GAAG;AAAA,MACpE;AAEE,aAAO,iBAAiB;AAAA,QAAO,gBAC7B,CAAC,iBAAiB,SAAS,WAAW,GAAG;AAAA,MAC7C;AAAA,IACA,CAAC;AAED,mBAAe,iBAAiB,MAAM,SAAS,QAAQ;AACrD,UAAI;AACF,cAAM,WAAW,MAAMC,UAAgB,OAAO;AAAA,UAC5C,OAAO;AAAA,YACL,MAAM;AAAA,YACN,QAAQ,iBAAiB,MAAM;AAAA,UAChC;AAAA,UACD,SAAS;AAAA,YACP,MAAM;AAAA,YACN,QAAQF,MAAW,KAAK;AAAA,UACzB;AAAA,UACD,SAAS;AAAA,QACf,CAAK;AACD,iBAAS,UAAU,SAAS,gBAAgB;AAC1CG,oBAAgB,IAAI,aAAa,OAAO,MAAM;AAAA,QAC/C;AACD;AACA;MACD,SAAQ,OAAO;AACd,eAAO,KAAK;AAAA,MACb;AAAA,IACH;AAEA,mBAAe,aAAa,OAAM,QAAQ;AACxC,UAAI,QAAQ,0BAA0B,KAAK,MAAM;AAC/CC,gBAAkB,YAAY,OAAO,OAAO,CAAC;AAC7C,cAAMC,UAAoB,OAAO,MAAM;AAAA,MACxC;AAAA,IACH;AAEA,mBAAe,aAAa,OAAM,QAAQ;AACxC,UAAI,QAAQ,0BAA0B,KAAK,MAAM;AAC/CF,kBAAgB,OAAO,aAAa,OAAO,MAAM;AACjD,cAAMD,UAAgB,OAAO,OAAO,GAAG;AAAA,MACxC;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Organization.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/pages/Organization.vue"],"sourcesContent":["<template>\n\t<div v-if=\"organizationData\" class=\"pd-thin for-transition w-100\">\n\n\t\t<!-- <Breadcrumbs class=\"mn-b-thin pd-medium bg-light radius-big\"/> -->\n\t\t<!-- <pre>{{organization.state.current}}</pre> -->\n\n\t\t<DetailsTabSection \t\n\t\t\t:organization=\"organization.state.current\" \n\t\t\t:user=\"auth.state.user\"\n\t\t\tclass=\"mn-b-thin\"\n\t\t>\n\n\t\t</DetailsTabSection>\n\n\t\t<Tab \n\t\t\tv-model:selected=\"tabOrganization\"\n\t\t\t:tabs=\"[\n\t\t\t\t{ name: 'Community', value: 'community' },\n\t\t\t\t{ name: 'Menu', value: 'products' },\t\n\t\t\t\t{ name: 'Events', value: 'events' },\n\t\t\t\t{ name: 'Spots', value: 'spots' }\t\n\t\t\t]\"\n\t\t\tclass=\"mn-b-thin o-hidden h5 radius-small bg-light\"\n\t\t/>\n\n\t\t<div class=\"pos-relative\">\n\n\t\t\t<transition name=\"slide-fade\">\n\t\t <Feed\n\t\t \tv-if=\"tabOrganization === 'community'\"\n\t\t\t :showLoadMore=\"false\"\n\t\t\t :states=\"{\n\t\t\t empty: {\n\t\t\t title: 'No Blog Posts Found',\n\t\t\t description: 'Currently, there are no posts available in this blog. Please check back later.'\n\t\t\t }\n\t\t\t }\"\n\t\t\t :store=\"{\n\t\t\t read: (options) => blog.read(options)\n\t\t\t }\"\n\t\t\t :options=\"{\n\t\t\t status: 'published',\n\t\t\t user: auth.state.user._id,\n\t\t\t owner: route.params._id,\n\t\t\t }\"\n\t\t\t v-slot=\"{ \n\t\t\t items \n\t\t\t }\"\n\t\t\t class=\"row-1 gap-thin\"\n\t\t\t >\n\t\t\t <CardBlogpost \n\t\t\t v-for=\"item in items\" \n\t\t\t :key=\"item._id\" \n\t\t\t :blogpost=\"item\" \n\t\t\t :user=\"auth.state.user._id\" \n\t\t\t class=\"h-max-40r mn-b-medium\"\n\t\t\t />\n\t\t\t </Feed>\n\t\t\t</transition>\n\n\t\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<FeedEvents \n\t\t\t\t\tv-if=\"tabOrganization === 'events'\"\n\t\t\t \t:user=\"auth.state.user._id\"\n\t\t\t\t\t:owner=\"route.params._id\"\n\t\t\t\t\t:sortOrder=\"'desc'\"\n\t\t\t\t\t:sortParam=\"'date.start'\"\n\t\t\t\t/>\n\t\t\t</transition>\n\n\t\t\t<Block\n\t\t\t\tv-if=\"tabOrganization === 'products' && auth.state.user._id === organization.state.current.owner\"\n\t\t\t\tclass=\"flex-nowrap\t gap-thin mn-b-small flex\"\n\t\t\t>\n\n\t\t\t\t<router-link \n\t\t\t\t\tclass=\"bg-black t-white uppercase t-semi pd-thin radius-extra \"\n\t\t\t\t\t:to=\"{\n\t\t\t\t\t\tname:'ProductAdd', \n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t_id: route.params._id\n\t\t\t\t\t\t}\n\t\t\t\t\t}\"\n\t\t\t\t\t>\n\t\t\t\t\tAdd Product\n\t\t\t\t</router-link>\n\n\t\t\t\t<router-link \n\t\t\t\t\tclass=\" uppercase t-semi pd-thin radius-extra \"\n\t\t\t\t\t:to=\"{\n\t\t\t\t\t\tname:'Leftovers', \n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t_id: route.params._id\n\t\t\t\t\t\t}\n\t\t\t\t\t}\"\n\t\t\t\t\t>\n\t\t\t\t\tChange Invetory\n\t\t\t\t</router-link>\n\n\t\t\t\t\n\t\t\t\t<router-link \n\t\t\t\t\tclass=\"d-block mn-l-auto uppercase t-semi bg-white pd-thin radius-extra \"\n\t\t\t\t\t:to=\"{\n\t\t\t\t\t\tname:'Backoffice', \n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t_id: route.params._id\n\t\t\t\t\t\t}\n\t\t\t\t\t}\"\n\t\t\t\t\t>\n\t\t\t\t\tGo to Backoffice\n\t\t\t\t</router-link>\n\n\t\t\t</Block>\n\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<Products \n\t\t\t\t\tv-if=\"tabOrganization === 'products'\"\n\t\t\t\t\t:organization=\"organization.state.current\"\n\t\t\t\t/>\n\n\t\t\t</transition>\n\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<div v-if=\"tabOrganization === 'spots'\">\n\t\t\t\t\t<Feed\n\t\t\t :states=\"{\n\t\t\t empty: {\n\t\t\t title: 'No Spots Found',\n\t\t\t description: 'Currently, there are no spots available.'\n\t\t\t }\n\t\t\t }\"\n\t\t\t :store=\"{\n\t\t\t read: (options) => spots.actions.read(route.params._id),\n\t\t\t state: organization.state\n\t\t\t }\"\n\t\t\t :options=\"{\n\t\t\t \tuser: auth.state.user._id,\n\t\t\t\t\t\t\t\tsort: 'numberOfMemberships',\n\t\t\t\t\t\t\t\tcontain: ['blogposts'],\n\t\t\t\t\t\t\t\tlimit: 10\n\t\t\t }\"\n\t\t\t v-slot=\"{ \n\t\t\t items \n\t\t\t }\"\n\t\t\t >\n\t\t\t \t<CardSpot\n\t\t v-for=\"(spot, index) in items\"\n\t\t :key=\"index\"\n\t\t :spot=\"spot\"\n\t\t :organization=\"organization.state.current\"\n\t\t class=\"radius-big bg-light mn-b-thin\"\n\t\t />\n\t\t\t </Feed>\n\n\t\t\t <button\n\t v-if=\"auth.state.user._id === organization.state.current.owner\"\n\t @click=\"$router.push(`/spots/${organization.state.current._id}/spots/create`)\"\n\t class=\"mn-b-thin bg-main button w-100\"\n\t >\n\t Add spot\n\t </button>\n\n\t\t\t\t</div>\n\t\t\t</transition>\n\n\t\t</div>\n\t</div>\n</template>\n\n<script setup>\n\timport { computed, reactive, ref, onMounted, watch } from 'vue'\n\timport { useRoute, useRouter } from 'vue-router'\n\t// Import components\n\timport Breadcrumbs \tfrom '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Tab \t\tfrom '@pf/src/components/Tab/Tab.vue'\n\timport Block \t\tfrom '@pf/src/components/Block/Block.vue'\n\timport Feed from '@pf/src/components/Feed/Feed.vue'\n\t// Community\n\t import CardBlogpost from '@pf/src/modules/community/components/blocks/CardBlogpost.vue';\n\t// Mobile Module\n\timport Menu from '@pf/src/components/Menu/Menu.vue'\n\timport MenuItem from '@pf/src/components/Menu/MenuItem.vue'\n\t// Organizations\n\timport DepartmentSub from '@pf/src/modules/organizations/components/blocks/DepartmentSub.vue';\n\timport DetailsTabSection from '@pf/src/modules/organizations/components/sections/DetailsTabSection.vue'\n\timport User from '@pf/src/modules/
|
1
|
+
{"version":3,"file":"Organization.vue.cjs","sources":["../../../../../../../src/modules/organizations/components/pages/Organization.vue"],"sourcesContent":["<template>\n\t<div v-if=\"organizationData\" class=\"pd-thin for-transition w-100\">\n\n\t\t<!-- <Breadcrumbs class=\"mn-b-thin pd-medium bg-light radius-big\"/> -->\n\t\t<!-- <pre>{{organization.state.current}}</pre> -->\n\n\t\t<DetailsTabSection \t\n\t\t\t:organization=\"organization.state.current\" \n\t\t\t:user=\"auth.state.user\"\n\t\t\tclass=\"mn-b-thin\"\n\t\t>\n\n\t\t</DetailsTabSection>\n\n\t\t<Tab \n\t\t\tv-model:selected=\"tabOrganization\"\n\t\t\t:tabs=\"[\n\t\t\t\t{ name: 'Community', value: 'community' },\n\t\t\t\t{ name: 'Menu', value: 'products' },\t\n\t\t\t\t{ name: 'Events', value: 'events' },\n\t\t\t\t{ name: 'Spots', value: 'spots' }\t\n\t\t\t]\"\n\t\t\tclass=\"mn-b-thin o-hidden h5 radius-small bg-light\"\n\t\t/>\n\n\t\t<div class=\"pos-relative\">\n\n\t\t\t<transition name=\"slide-fade\">\n\t\t <Feed\n\t\t \tv-if=\"tabOrganization === 'community'\"\n\t\t\t :showLoadMore=\"false\"\n\t\t\t :states=\"{\n\t\t\t empty: {\n\t\t\t title: 'No Blog Posts Found',\n\t\t\t description: 'Currently, there are no posts available in this blog. Please check back later.'\n\t\t\t }\n\t\t\t }\"\n\t\t\t :store=\"{\n\t\t\t read: (options) => blog.read(options)\n\t\t\t }\"\n\t\t\t :options=\"{\n\t\t\t status: 'published',\n\t\t\t user: auth.state.user._id,\n\t\t\t owner: route.params._id,\n\t\t\t }\"\n\t\t\t v-slot=\"{ \n\t\t\t items \n\t\t\t }\"\n\t\t\t class=\"row-1 gap-thin\"\n\t\t\t >\n\t\t\t <CardBlogpost \n\t\t\t v-for=\"item in items\" \n\t\t\t :key=\"item._id\" \n\t\t\t :blogpost=\"item\" \n\t\t\t :user=\"auth.state.user._id\" \n\t\t\t class=\"h-max-40r mn-b-medium\"\n\t\t\t />\n\t\t\t </Feed>\n\t\t\t</transition>\n\n\t\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<FeedEvents \n\t\t\t\t\tv-if=\"tabOrganization === 'events'\"\n\t\t\t \t:user=\"auth.state.user._id\"\n\t\t\t\t\t:owner=\"route.params._id\"\n\t\t\t\t\t:sortOrder=\"'desc'\"\n\t\t\t\t\t:sortParam=\"'date.start'\"\n\t\t\t\t/>\n\t\t\t</transition>\n\n\t\t\t<Block\n\t\t\t\tv-if=\"tabOrganization === 'products' && auth.state.user._id === organization.state.current.owner\"\n\t\t\t\tclass=\"flex-nowrap\t gap-thin mn-b-small flex\"\n\t\t\t>\n\n\t\t\t\t<router-link \n\t\t\t\t\tclass=\"bg-black t-white uppercase t-semi pd-thin radius-extra \"\n\t\t\t\t\t:to=\"{\n\t\t\t\t\t\tname:'ProductAdd', \n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t_id: route.params._id\n\t\t\t\t\t\t}\n\t\t\t\t\t}\"\n\t\t\t\t\t>\n\t\t\t\t\tAdd Product\n\t\t\t\t</router-link>\n\n\t\t\t\t<router-link \n\t\t\t\t\tclass=\" uppercase t-semi pd-thin radius-extra \"\n\t\t\t\t\t:to=\"{\n\t\t\t\t\t\tname:'Leftovers', \n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t_id: route.params._id\n\t\t\t\t\t\t}\n\t\t\t\t\t}\"\n\t\t\t\t\t>\n\t\t\t\t\tChange Invetory\n\t\t\t\t</router-link>\n\n\t\t\t\t\n\t\t\t\t<router-link \n\t\t\t\t\tclass=\"d-block mn-l-auto uppercase t-semi bg-white pd-thin radius-extra \"\n\t\t\t\t\t:to=\"{\n\t\t\t\t\t\tname:'Backoffice', \n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t_id: route.params._id\n\t\t\t\t\t\t}\n\t\t\t\t\t}\"\n\t\t\t\t\t>\n\t\t\t\t\tGo to Backoffice\n\t\t\t\t</router-link>\n\n\t\t\t</Block>\n\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<Products \n\t\t\t\t\tv-if=\"tabOrganization === 'products'\"\n\t\t\t\t\t:organization=\"organization.state.current\"\n\t\t\t\t/>\n\n\t\t\t</transition>\n\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<div v-if=\"tabOrganization === 'spots'\">\n\t\t\t\t\t<Feed\n\t\t\t :states=\"{\n\t\t\t empty: {\n\t\t\t title: 'No Spots Found',\n\t\t\t description: 'Currently, there are no spots available.'\n\t\t\t }\n\t\t\t }\"\n\t\t\t :store=\"{\n\t\t\t read: (options) => spots.actions.read(route.params._id),\n\t\t\t state: organization.state\n\t\t\t }\"\n\t\t\t :options=\"{\n\t\t\t \tuser: auth.state.user._id,\n\t\t\t\t\t\t\t\tsort: 'numberOfMemberships',\n\t\t\t\t\t\t\t\tcontain: ['blogposts'],\n\t\t\t\t\t\t\t\tlimit: 10\n\t\t\t }\"\n\t\t\t v-slot=\"{ \n\t\t\t items \n\t\t\t }\"\n\t\t\t >\n\t\t\t \t<CardSpot\n\t\t v-for=\"(spot, index) in items\"\n\t\t :key=\"index\"\n\t\t :spot=\"spot\"\n\t\t :organization=\"organization.state.current\"\n\t\t class=\"radius-big bg-light mn-b-thin\"\n\t\t />\n\t\t\t </Feed>\n\n\t\t\t <button\n\t v-if=\"auth.state.user._id === organization.state.current.owner\"\n\t @click=\"$router.push(`/spots/${organization.state.current._id}/spots/create`)\"\n\t class=\"mn-b-thin bg-main button w-100\"\n\t >\n\t Add spot\n\t </button>\n\n\t\t\t\t</div>\n\t\t\t</transition>\n\n\t\t</div>\n\t</div>\n</template>\n\n<script setup>\n\timport { computed, reactive, ref, onMounted, watch } from 'vue'\n\timport { useRoute, useRouter } from 'vue-router'\n\t// Import components\n\timport Breadcrumbs \tfrom '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Tab \t\tfrom '@pf/src/components/Tab/Tab.vue'\n\timport Block \t\tfrom '@pf/src/components/Block/Block.vue'\n\timport Feed from '@pf/src/components/Feed/Feed.vue'\n\t// Community\n\t import CardBlogpost from '@pf/src/modules/community/components/blocks/CardBlogpost.vue';\n\t// Mobile Module\n\timport Menu from '@pf/src/components/Menu/Menu.vue'\n\timport MenuItem from '@pf/src/components/Menu/MenuItem.vue'\n\t// Organizations\n\timport DepartmentSub from '@pf/src/modules/organizations/components/blocks/DepartmentSub.vue';\n\timport DetailsTabSection from '@pf/src/modules/organizations/components/sections/DetailsTabSection.vue'\n\timport User from '@pf/src/modules/auth/views/components/blocks/CardUser.vue';\n\t// Feeds\n\timport FeedEvents from '@pf/src/modules/events/components/sections/Feed.vue'; \n\t// Spots\n\timport CardSpot from '@pf/src/modules/spots/components/blocks/CardSpot.vue';\t\n\t// Local\n\timport Products from '@pf/src/modules/products/components/pages/Products.vue';\n\t// Import state\n\timport * as auth from '@pf/src/modules/auth/views/store/auth';\n\timport * as organization from '@pf/src/modules/organizations/store/organizations';\n\timport * as memberships from '@pf/src/modules/organizations/store/memberships';\n\timport * as departments from '@pf/src/modules/organizations/store/departments';\n\t// Community\n import * as blog from '@pf/src/modules/community/store/blogposts.js';\n\t// Spots\n\timport * as spots from '@pf/src/modules/spots/store/spots';\n\t// Init router\n\tconst router \t= useRouter()\n\tconst route \t= useRoute()\n\t// Accesing state\n\tlet tab = route.query.tab ? route.query.tab : 'products';\n\n\tconst organizationData = ref(null)\n\tconst tabOrganization = ref(tab)\n\t// route.query.tab = tabOrganization.value\n\n\tonMounted(async () => {\n\t\t\n\t\torganizationData.value = await organization.actions.read({\n\t\t\t_id: route.params._id, \n\t\t\tuser: auth.state.user._id\n\t\t})\n\n \t\tawait memberships.actions.read({target: route.params._id})\n\t})\n\n\n\n\n\t// watch(tabOrganization, (newValue) => {\n\t// router.query.tab = newValue\n\t// });\n</script>\n\n<style lang=\"scss\">\n\t.slide-fade-enter-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tmin-height: 0;\n\t\tposition: absolute;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n</style>\n"],"names":["useRouter","useRoute","ref","onMounted","organization.actions","auth.state","memberships.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2MiBA,wBAAW;AAC3B,UAAM,QAASC,UAAAA,SAAU;AAEzB,QAAI,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM;AAE9C,UAAM,mBAAmBC,IAAG,IAAC,IAAI;AACjC,UAAM,kBAAkBA,IAAG,IAAC,GAAG;AAG/BC,QAAAA,UAAU,YAAY;AAErB,uBAAiB,QAAQ,MAAMC,cAAoB,QAAC,KAAK;AAAA,QACxD,KAAK,MAAM,OAAO;AAAA,QAClB,MAAMC,KAAAA,MAAW,KAAK;AAAA,MACzB,CAAG;AAEA,YAAMC,YAAAA,QAAoB,KAAK,EAAC,QAAQ,MAAM,OAAO,IAAG,CAAC;AAAA,IAC5D,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Organization.vue.js","sources":["../../../../../../../src/modules/organizations/components/pages/Organization.vue"],"sourcesContent":["<template>\n\t<div v-if=\"organizationData\" class=\"pd-thin for-transition w-100\">\n\n\t\t<!-- <Breadcrumbs class=\"mn-b-thin pd-medium bg-light radius-big\"/> -->\n\t\t<!-- <pre>{{organization.state.current}}</pre> -->\n\n\t\t<DetailsTabSection \t\n\t\t\t:organization=\"organization.state.current\" \n\t\t\t:user=\"auth.state.user\"\n\t\t\tclass=\"mn-b-thin\"\n\t\t>\n\n\t\t</DetailsTabSection>\n\n\t\t<Tab \n\t\t\tv-model:selected=\"tabOrganization\"\n\t\t\t:tabs=\"[\n\t\t\t\t{ name: 'Community', value: 'community' },\n\t\t\t\t{ name: 'Menu', value: 'products' },\t\n\t\t\t\t{ name: 'Events', value: 'events' },\n\t\t\t\t{ name: 'Spots', value: 'spots' }\t\n\t\t\t]\"\n\t\t\tclass=\"mn-b-thin o-hidden h5 radius-small bg-light\"\n\t\t/>\n\n\t\t<div class=\"pos-relative\">\n\n\t\t\t<transition name=\"slide-fade\">\n\t\t <Feed\n\t\t \tv-if=\"tabOrganization === 'community'\"\n\t\t\t :showLoadMore=\"false\"\n\t\t\t :states=\"{\n\t\t\t empty: {\n\t\t\t title: 'No Blog Posts Found',\n\t\t\t description: 'Currently, there are no posts available in this blog. Please check back later.'\n\t\t\t }\n\t\t\t }\"\n\t\t\t :store=\"{\n\t\t\t read: (options) => blog.read(options)\n\t\t\t }\"\n\t\t\t :options=\"{\n\t\t\t status: 'published',\n\t\t\t user: auth.state.user._id,\n\t\t\t owner: route.params._id,\n\t\t\t }\"\n\t\t\t v-slot=\"{ \n\t\t\t items \n\t\t\t }\"\n\t\t\t class=\"row-1 gap-thin\"\n\t\t\t >\n\t\t\t <CardBlogpost \n\t\t\t v-for=\"item in items\" \n\t\t\t :key=\"item._id\" \n\t\t\t :blogpost=\"item\" \n\t\t\t :user=\"auth.state.user._id\" \n\t\t\t class=\"h-max-40r mn-b-medium\"\n\t\t\t />\n\t\t\t </Feed>\n\t\t\t</transition>\n\n\t\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<FeedEvents \n\t\t\t\t\tv-if=\"tabOrganization === 'events'\"\n\t\t\t \t:user=\"auth.state.user._id\"\n\t\t\t\t\t:owner=\"route.params._id\"\n\t\t\t\t\t:sortOrder=\"'desc'\"\n\t\t\t\t\t:sortParam=\"'date.start'\"\n\t\t\t\t/>\n\t\t\t</transition>\n\n\t\t\t<Block\n\t\t\t\tv-if=\"tabOrganization === 'products' && auth.state.user._id === organization.state.current.owner\"\n\t\t\t\tclass=\"flex-nowrap\t gap-thin mn-b-small flex\"\n\t\t\t>\n\n\t\t\t\t<router-link \n\t\t\t\t\tclass=\"bg-black t-white uppercase t-semi pd-thin radius-extra \"\n\t\t\t\t\t:to=\"{\n\t\t\t\t\t\tname:'ProductAdd', \n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t_id: route.params._id\n\t\t\t\t\t\t}\n\t\t\t\t\t}\"\n\t\t\t\t\t>\n\t\t\t\t\tAdd Product\n\t\t\t\t</router-link>\n\n\t\t\t\t<router-link \n\t\t\t\t\tclass=\" uppercase t-semi pd-thin radius-extra \"\n\t\t\t\t\t:to=\"{\n\t\t\t\t\t\tname:'Leftovers', \n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t_id: route.params._id\n\t\t\t\t\t\t}\n\t\t\t\t\t}\"\n\t\t\t\t\t>\n\t\t\t\t\tChange Invetory\n\t\t\t\t</router-link>\n\n\t\t\t\t\n\t\t\t\t<router-link \n\t\t\t\t\tclass=\"d-block mn-l-auto uppercase t-semi bg-white pd-thin radius-extra \"\n\t\t\t\t\t:to=\"{\n\t\t\t\t\t\tname:'Backoffice', \n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t_id: route.params._id\n\t\t\t\t\t\t}\n\t\t\t\t\t}\"\n\t\t\t\t\t>\n\t\t\t\t\tGo to Backoffice\n\t\t\t\t</router-link>\n\n\t\t\t</Block>\n\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<Products \n\t\t\t\t\tv-if=\"tabOrganization === 'products'\"\n\t\t\t\t\t:organization=\"organization.state.current\"\n\t\t\t\t/>\n\n\t\t\t</transition>\n\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<div v-if=\"tabOrganization === 'spots'\">\n\t\t\t\t\t<Feed\n\t\t\t :states=\"{\n\t\t\t empty: {\n\t\t\t title: 'No Spots Found',\n\t\t\t description: 'Currently, there are no spots available.'\n\t\t\t }\n\t\t\t }\"\n\t\t\t :store=\"{\n\t\t\t read: (options) => spots.actions.read(route.params._id),\n\t\t\t state: organization.state\n\t\t\t }\"\n\t\t\t :options=\"{\n\t\t\t \tuser: auth.state.user._id,\n\t\t\t\t\t\t\t\tsort: 'numberOfMemberships',\n\t\t\t\t\t\t\t\tcontain: ['blogposts'],\n\t\t\t\t\t\t\t\tlimit: 10\n\t\t\t }\"\n\t\t\t v-slot=\"{ \n\t\t\t items \n\t\t\t }\"\n\t\t\t >\n\t\t\t \t<CardSpot\n\t\t v-for=\"(spot, index) in items\"\n\t\t :key=\"index\"\n\t\t :spot=\"spot\"\n\t\t :organization=\"organization.state.current\"\n\t\t class=\"radius-big bg-light mn-b-thin\"\n\t\t />\n\t\t\t </Feed>\n\n\t\t\t <button\n\t v-if=\"auth.state.user._id === organization.state.current.owner\"\n\t @click=\"$router.push(`/spots/${organization.state.current._id}/spots/create`)\"\n\t class=\"mn-b-thin bg-main button w-100\"\n\t >\n\t Add spot\n\t </button>\n\n\t\t\t\t</div>\n\t\t\t</transition>\n\n\t\t</div>\n\t</div>\n</template>\n\n<script setup>\n\timport { computed, reactive, ref, onMounted, watch } from 'vue'\n\timport { useRoute, useRouter } from 'vue-router'\n\t// Import components\n\timport Breadcrumbs \tfrom '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Tab \t\tfrom '@pf/src/components/Tab/Tab.vue'\n\timport Block \t\tfrom '@pf/src/components/Block/Block.vue'\n\timport Feed from '@pf/src/components/Feed/Feed.vue'\n\t// Community\n\t import CardBlogpost from '@pf/src/modules/community/components/blocks/CardBlogpost.vue';\n\t// Mobile Module\n\timport Menu from '@pf/src/components/Menu/Menu.vue'\n\timport MenuItem from '@pf/src/components/Menu/MenuItem.vue'\n\t// Organizations\n\timport DepartmentSub from '@pf/src/modules/organizations/components/blocks/DepartmentSub.vue';\n\timport DetailsTabSection from '@pf/src/modules/organizations/components/sections/DetailsTabSection.vue'\n\timport User from '@pf/src/modules/
|
1
|
+
{"version":3,"file":"Organization.vue.js","sources":["../../../../../../../src/modules/organizations/components/pages/Organization.vue"],"sourcesContent":["<template>\n\t<div v-if=\"organizationData\" class=\"pd-thin for-transition w-100\">\n\n\t\t<!-- <Breadcrumbs class=\"mn-b-thin pd-medium bg-light radius-big\"/> -->\n\t\t<!-- <pre>{{organization.state.current}}</pre> -->\n\n\t\t<DetailsTabSection \t\n\t\t\t:organization=\"organization.state.current\" \n\t\t\t:user=\"auth.state.user\"\n\t\t\tclass=\"mn-b-thin\"\n\t\t>\n\n\t\t</DetailsTabSection>\n\n\t\t<Tab \n\t\t\tv-model:selected=\"tabOrganization\"\n\t\t\t:tabs=\"[\n\t\t\t\t{ name: 'Community', value: 'community' },\n\t\t\t\t{ name: 'Menu', value: 'products' },\t\n\t\t\t\t{ name: 'Events', value: 'events' },\n\t\t\t\t{ name: 'Spots', value: 'spots' }\t\n\t\t\t]\"\n\t\t\tclass=\"mn-b-thin o-hidden h5 radius-small bg-light\"\n\t\t/>\n\n\t\t<div class=\"pos-relative\">\n\n\t\t\t<transition name=\"slide-fade\">\n\t\t <Feed\n\t\t \tv-if=\"tabOrganization === 'community'\"\n\t\t\t :showLoadMore=\"false\"\n\t\t\t :states=\"{\n\t\t\t empty: {\n\t\t\t title: 'No Blog Posts Found',\n\t\t\t description: 'Currently, there are no posts available in this blog. Please check back later.'\n\t\t\t }\n\t\t\t }\"\n\t\t\t :store=\"{\n\t\t\t read: (options) => blog.read(options)\n\t\t\t }\"\n\t\t\t :options=\"{\n\t\t\t status: 'published',\n\t\t\t user: auth.state.user._id,\n\t\t\t owner: route.params._id,\n\t\t\t }\"\n\t\t\t v-slot=\"{ \n\t\t\t items \n\t\t\t }\"\n\t\t\t class=\"row-1 gap-thin\"\n\t\t\t >\n\t\t\t <CardBlogpost \n\t\t\t v-for=\"item in items\" \n\t\t\t :key=\"item._id\" \n\t\t\t :blogpost=\"item\" \n\t\t\t :user=\"auth.state.user._id\" \n\t\t\t class=\"h-max-40r mn-b-medium\"\n\t\t\t />\n\t\t\t </Feed>\n\t\t\t</transition>\n\n\t\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<FeedEvents \n\t\t\t\t\tv-if=\"tabOrganization === 'events'\"\n\t\t\t \t:user=\"auth.state.user._id\"\n\t\t\t\t\t:owner=\"route.params._id\"\n\t\t\t\t\t:sortOrder=\"'desc'\"\n\t\t\t\t\t:sortParam=\"'date.start'\"\n\t\t\t\t/>\n\t\t\t</transition>\n\n\t\t\t<Block\n\t\t\t\tv-if=\"tabOrganization === 'products' && auth.state.user._id === organization.state.current.owner\"\n\t\t\t\tclass=\"flex-nowrap\t gap-thin mn-b-small flex\"\n\t\t\t>\n\n\t\t\t\t<router-link \n\t\t\t\t\tclass=\"bg-black t-white uppercase t-semi pd-thin radius-extra \"\n\t\t\t\t\t:to=\"{\n\t\t\t\t\t\tname:'ProductAdd', \n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t_id: route.params._id\n\t\t\t\t\t\t}\n\t\t\t\t\t}\"\n\t\t\t\t\t>\n\t\t\t\t\tAdd Product\n\t\t\t\t</router-link>\n\n\t\t\t\t<router-link \n\t\t\t\t\tclass=\" uppercase t-semi pd-thin radius-extra \"\n\t\t\t\t\t:to=\"{\n\t\t\t\t\t\tname:'Leftovers', \n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t_id: route.params._id\n\t\t\t\t\t\t}\n\t\t\t\t\t}\"\n\t\t\t\t\t>\n\t\t\t\t\tChange Invetory\n\t\t\t\t</router-link>\n\n\t\t\t\t\n\t\t\t\t<router-link \n\t\t\t\t\tclass=\"d-block mn-l-auto uppercase t-semi bg-white pd-thin radius-extra \"\n\t\t\t\t\t:to=\"{\n\t\t\t\t\t\tname:'Backoffice', \n\t\t\t\t\t\tparams: {\n\t\t\t\t\t\t\t_id: route.params._id\n\t\t\t\t\t\t}\n\t\t\t\t\t}\"\n\t\t\t\t\t>\n\t\t\t\t\tGo to Backoffice\n\t\t\t\t</router-link>\n\n\t\t\t</Block>\n\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<Products \n\t\t\t\t\tv-if=\"tabOrganization === 'products'\"\n\t\t\t\t\t:organization=\"organization.state.current\"\n\t\t\t\t/>\n\n\t\t\t</transition>\n\n\t\t\t<transition name=\"slide-fade\">\n\t\t\t\t<div v-if=\"tabOrganization === 'spots'\">\n\t\t\t\t\t<Feed\n\t\t\t :states=\"{\n\t\t\t empty: {\n\t\t\t title: 'No Spots Found',\n\t\t\t description: 'Currently, there are no spots available.'\n\t\t\t }\n\t\t\t }\"\n\t\t\t :store=\"{\n\t\t\t read: (options) => spots.actions.read(route.params._id),\n\t\t\t state: organization.state\n\t\t\t }\"\n\t\t\t :options=\"{\n\t\t\t \tuser: auth.state.user._id,\n\t\t\t\t\t\t\t\tsort: 'numberOfMemberships',\n\t\t\t\t\t\t\t\tcontain: ['blogposts'],\n\t\t\t\t\t\t\t\tlimit: 10\n\t\t\t }\"\n\t\t\t v-slot=\"{ \n\t\t\t items \n\t\t\t }\"\n\t\t\t >\n\t\t\t \t<CardSpot\n\t\t v-for=\"(spot, index) in items\"\n\t\t :key=\"index\"\n\t\t :spot=\"spot\"\n\t\t :organization=\"organization.state.current\"\n\t\t class=\"radius-big bg-light mn-b-thin\"\n\t\t />\n\t\t\t </Feed>\n\n\t\t\t <button\n\t v-if=\"auth.state.user._id === organization.state.current.owner\"\n\t @click=\"$router.push(`/spots/${organization.state.current._id}/spots/create`)\"\n\t class=\"mn-b-thin bg-main button w-100\"\n\t >\n\t Add spot\n\t </button>\n\n\t\t\t\t</div>\n\t\t\t</transition>\n\n\t\t</div>\n\t</div>\n</template>\n\n<script setup>\n\timport { computed, reactive, ref, onMounted, watch } from 'vue'\n\timport { useRoute, useRouter } from 'vue-router'\n\t// Import components\n\timport Breadcrumbs \tfrom '@pf/src/components/Breadcrumbs/Breadcrumbs.vue'\n\timport Tab \t\tfrom '@pf/src/components/Tab/Tab.vue'\n\timport Block \t\tfrom '@pf/src/components/Block/Block.vue'\n\timport Feed from '@pf/src/components/Feed/Feed.vue'\n\t// Community\n\t import CardBlogpost from '@pf/src/modules/community/components/blocks/CardBlogpost.vue';\n\t// Mobile Module\n\timport Menu from '@pf/src/components/Menu/Menu.vue'\n\timport MenuItem from '@pf/src/components/Menu/MenuItem.vue'\n\t// Organizations\n\timport DepartmentSub from '@pf/src/modules/organizations/components/blocks/DepartmentSub.vue';\n\timport DetailsTabSection from '@pf/src/modules/organizations/components/sections/DetailsTabSection.vue'\n\timport User from '@pf/src/modules/auth/views/components/blocks/CardUser.vue';\n\t// Feeds\n\timport FeedEvents from '@pf/src/modules/events/components/sections/Feed.vue'; \n\t// Spots\n\timport CardSpot from '@pf/src/modules/spots/components/blocks/CardSpot.vue';\t\n\t// Local\n\timport Products from '@pf/src/modules/products/components/pages/Products.vue';\n\t// Import state\n\timport * as auth from '@pf/src/modules/auth/views/store/auth';\n\timport * as organization from '@pf/src/modules/organizations/store/organizations';\n\timport * as memberships from '@pf/src/modules/organizations/store/memberships';\n\timport * as departments from '@pf/src/modules/organizations/store/departments';\n\t// Community\n import * as blog from '@pf/src/modules/community/store/blogposts.js';\n\t// Spots\n\timport * as spots from '@pf/src/modules/spots/store/spots';\n\t// Init router\n\tconst router \t= useRouter()\n\tconst route \t= useRoute()\n\t// Accesing state\n\tlet tab = route.query.tab ? route.query.tab : 'products';\n\n\tconst organizationData = ref(null)\n\tconst tabOrganization = ref(tab)\n\t// route.query.tab = tabOrganization.value\n\n\tonMounted(async () => {\n\t\t\n\t\torganizationData.value = await organization.actions.read({\n\t\t\t_id: route.params._id, \n\t\t\tuser: auth.state.user._id\n\t\t})\n\n \t\tawait memberships.actions.read({target: route.params._id})\n\t})\n\n\n\n\n\t// watch(tabOrganization, (newValue) => {\n\t// router.query.tab = newValue\n\t// });\n</script>\n\n<style lang=\"scss\">\n\t.slide-fade-enter-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-leave-active {\n\t\t// min-height: 100vh;\n\t transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);\n\t}\n\n\t.slide-fade-enter-from,\n\t.slide-fade-leave-to {\n\t\tmin-height: 0;\n\t\tposition: absolute;\n\t transform: translateX(20px);\n\t opacity: 0;\n\t left: 0;\n\t top: 0;\n\t}\n\n</style>\n"],"names":["organization.actions","auth.state","memberships.actions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2MiB,cAAW;AAC3B,UAAM,QAAS,SAAU;AAEzB,QAAI,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM;AAE9C,UAAM,mBAAmB,IAAI,IAAI;AACjC,UAAM,kBAAkB,IAAI,GAAG;AAG/B,cAAU,YAAY;AAErB,uBAAiB,QAAQ,MAAMA,QAAqB,KAAK;AAAA,QACxD,KAAK,MAAM,OAAO;AAAA,QAClB,MAAMC,MAAW,KAAK;AAAA,MACzB,CAAG;AAEA,YAAMC,UAAoB,KAAK,EAAC,QAAQ,MAAM,OAAO,IAAG,CAAC;AAAA,IAC5D,CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs
CHANGED
@@ -6,10 +6,10 @@ const Field = require("../../../../components/Field/Field.vue2.cjs");
|
|
6
6
|
const Button = require("../../../../components/Button/Button.vue2.cjs");
|
7
7
|
const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
8
8
|
const BlockSearch = require("../../../globals/views/components/blocks/BlockSearch.vue.cjs");
|
9
|
-
const CardUser = require("../../../
|
9
|
+
const CardUser = require("../../../auth/views/components/blocks/CardUser.vue.cjs");
|
10
10
|
const IconDelete = require("../../../icons/navigation/IconDelete.vue.cjs");
|
11
11
|
const IconAdd = require("../../../icons/navigation/IconAdd.vue.cjs");
|
12
|
-
const users = require("../../../
|
12
|
+
const users = require("../../../auth/views/store/users.cjs");
|
13
13
|
const _hoisted_1 = { class: "mn-b-thin t-transp p-medium" };
|
14
14
|
const _hoisted_2 = { class: "mn-b-thin pos-relative" };
|
15
15
|
const _hoisted_3 = {
|