@ozdao/prometheus-framework 0.2.186 → 0.2.188
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +35 -23
- package/dist/auth.server.mjs +35 -23
- package/dist/events.server.js +1 -1
- package/dist/events.server.mjs +1 -1
- package/dist/globals.server.js +1 -1
- package/dist/globals.server.mjs +1 -1
- package/dist/mailing-BQKyTI-q.js +77 -0
- package/dist/mailing-C3VD4l0h.mjs +78 -0
- package/dist/main-BVZtf9OG.js +92 -0
- package/dist/main-CbTw08vO.mjs +13584 -0
- package/dist/orders.server.js +162 -12
- package/dist/orders.server.mjs +162 -12
- package/dist/organizations.server.js +1 -1
- package/dist/organizations.server.mjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/auth.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/auth.client.js +41 -22
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +41 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +124 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +94 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +82 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +118 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +168 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +129 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/SliderFeatures.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/SliderFeatures.vue.js +88 -0
- package/dist/prometheus-framework/src/modules/auth/views/localization/EnterCode.json.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/localization/EnterCode.json.js +20 -0
- package/dist/prometheus-framework/src/modules/auth/views/localization/EnterPassword.json.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/localization/EnterPassword.json.js +26 -0
- package/dist/prometheus-framework/src/modules/auth/views/localization/ResetPassword.json.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/localization/ResetPassword.json.js +30 -0
- package/dist/prometheus-framework/src/modules/auth/views/localization/SignIn.json.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/localization/SignIn.json.js +38 -0
- package/dist/prometheus-framework/src/modules/auth/views/localization/SignUp.json.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/localization/SignUp.json.js +32 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js +30 -0
- package/dist/prometheus-framework/src/modules/auth/views/router/auth.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/router/auth.js +119 -0
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.js +176 -0
- package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js +31 -0
- package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.js +45 -0
- package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +3 -4
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +10 -10
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +12 -13
- package/dist/prometheus-framework/src/modules/events/components/sections/FeaturedEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/FeaturedEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/globals.client.js +10 -6
- package/dist/prometheus-framework/src/modules/globals/localization/get-browser-locale.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/localization/get-browser-locale.js +7 -0
- package/dist/prometheus-framework/src/modules/globals/mixins/mixins.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/mixins/mixins.js +20 -16
- package/dist/prometheus-framework/src/modules/globals/router/routerGuards.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/router/routerGuards.js +18 -0
- package/dist/prometheus-framework/src/modules/globals/router/scrollBehavior.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/router/scrollBehavior.js +18 -0
- package/dist/prometheus-framework/src/modules/globals/store/globals.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/store/globals.js +38 -76
- package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/SubscribeNewsletter.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
- 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.js +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.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -3
- 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.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +4 -5
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -4
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/backoffice.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/backoffice.router.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/departments.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/departments.router.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/members.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/members.router.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/invites.js +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/Page.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/Page.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/Pages.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/Pages.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Product.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +2 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductRecommmendation.vue.js +2 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/router/categories.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/router/categories.router.js +1 -1
- package/dist/prometheus-framework/src/modules/products/router/leftovers.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/router/leftovers.router.js +1 -1
- package/dist/prometheus-framework/src/modules/products/router/products.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/router/products.router.js +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.js +2 -3
- package/dist/prometheus-framework/src/modules/spots/router/spots.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/router/spots.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -4
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/router/users.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/router/users.js +3 -4
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/router/payments.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/router/payments.router.js +1 -1
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/tickets.controller-BWVUA-GR.js +401 -0
- package/dist/tickets.controller-ChVmHHnj.mjs +402 -0
- package/dist/wallet.server.js +1 -1
- package/dist/wallet.server.mjs +1 -1
- package/dist/web-CK9TrlwB.js +1 -0
- package/dist/web-aOWHNbX1.mjs +54 -0
- package/package.json +1 -1
- package/src/components/Breadcrumbs/Breadcrumbs.vue +0 -1
- package/src/components/Sidebar/Sidebar.vue +1 -1
- package/src/modules/auth/auth.client.js +53 -28
- package/src/modules/auth/auth.server.js +32 -14
- package/src/modules/auth/{routes → controllers/routes}/auth.routes.js +3 -3
- package/src/modules/auth/{routes → controllers/routes}/twofa.routes.js +2 -2
- package/src/modules/auth/controllers/{auth.controller.js → services/auth.service.js} +2 -3
- package/src/modules/auth/models/role.model.js +9 -8
- package/src/modules/auth/{components → views/components}/layouts/Auth.vue +3 -3
- package/src/modules/auth/{components → views/components}/pages/EnterCode.vue +3 -3
- package/src/modules/auth/{components → views/components}/pages/EnterPassword.vue +3 -3
- package/src/modules/auth/{components → views/components}/pages/Invite.vue +2 -2
- package/src/modules/auth/{components → views/components}/pages/ResetPassword.vue +4 -4
- package/src/modules/auth/{components → views/components}/pages/SignIn.vue +3 -3
- package/src/modules/auth/{components → views/components}/pages/SignUp.vue +4 -4
- package/src/modules/{middlewares/client → auth/views/middlewares}/auth.validation.js +20 -1
- package/src/modules/auth/views/router/auth.js +102 -0
- package/src/modules/{middlewares/client → auth/views/validations}/inputs.validation.js +3 -6
- package/src/modules/backoffice/components/layouts/Backoffice.vue +1 -1
- package/src/modules/backoffice/components/pages/Dashboard.vue +1 -1
- package/src/modules/backoffice/components/partials/Sidebar.vue +1 -1
- package/src/modules/backoffice/router/backoffice.js +1 -1
- package/src/modules/chats/routes/chats.routes.js +1 -1
- package/src/modules/community/components/layouts/Community.vue +1 -1
- package/src/modules/community/components/pages/Blog.vue +1 -1
- package/src/modules/community/components/pages/BlogPost.vue +1 -1
- package/src/modules/community/components/pages/Community.vue +1 -1
- package/src/modules/community/components/pages/CreateBlogPost.vue +1 -1
- package/src/modules/community/components/sections/HotPosts.vue +1 -1
- package/src/modules/community/routes/blog.routes.js +1 -1
- package/src/modules/events/components/elements/ButtonJoin.vue +1 -1
- package/src/modules/events/components/pages/EditEvent.vue +1 -1
- package/src/modules/events/components/pages/EditEventTickets.vue +1 -1
- package/src/modules/events/components/pages/Event.vue +1 -1
- package/src/modules/events/components/pages/Events.vue +1 -1
- package/src/modules/events/components/sections/FeaturedEvents.vue +1 -1
- package/src/modules/events/router/events.js +1 -1
- package/src/modules/events/routes/events.routes.js +1 -1
- package/src/modules/files/routes/files.routes.js +1 -1
- package/src/modules/gallery/components/sections/BackofficeGallery.vue +1 -1
- package/src/modules/gallery/routes/gallery.routes.js +2 -2
- package/src/modules/globals/globals.client.js +6 -3
- package/src/modules/globals/router/routerGuards.js +1 -1
- package/src/modules/globals/router/scrollBehavior.js +30 -0
- package/src/modules/globals/store/globals.js +3 -3
- package/src/modules/landing/components/sections/SubscribeNewsletter.vue +1 -1
- package/src/modules/legal/components/pages/Legal.vue +1 -1
- 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/pages/Orders.vue +1 -1
- package/src/modules/orders/components/sections/FormAddCustomer.vue +1 -1
- package/src/modules/orders/models/order.model.js +0 -1
- package/src/modules/orders/orders.server.js +3 -1
- package/src/modules/orders/routes/applications.routes.js +2 -1
- package/src/modules/orders/routes/orders.routes.js +1 -1
- package/src/modules/organizations/components/elements/ButtonToggleMembership.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/pages/OrganizationBackoffice.vue +1 -1
- package/src/modules/organizations/components/pages/OrganizationCreate.vue +1 -1
- package/src/modules/organizations/components/pages/OrganizationDetails.vue +2 -2
- package/src/modules/organizations/components/pages/OrganizationEdit.vue +1 -1
- package/src/modules/organizations/components/pages/Organizations.vue +1 -1
- package/src/modules/organizations/components/sections/MembersAdd.vue +1 -1
- package/src/modules/organizations/components/sections/Organizations.vue +1 -1
- package/src/modules/organizations/components/sections/Publics.vue +1 -1
- package/src/modules/organizations/router/backoffice.router.js +1 -1
- package/src/modules/organizations/router/departments.router.js +1 -1
- package/src/modules/organizations/router/members.router.js +1 -1
- package/src/modules/organizations/router/organizations.js +1 -1
- package/src/modules/organizations/routes/invites.routes.js +1 -1
- package/src/modules/organizations/store/invites.js +1 -1
- package/src/modules/pages/views/components/pages/Page.vue +1 -1
- package/src/modules/pages/views/components/pages/Pages.vue +1 -1
- package/src/modules/pages/views/components/partials/SidebarPages.vue +1 -1
- package/src/modules/products/components/pages/EditLeftover.vue +1 -1
- package/src/modules/products/components/pages/Product.vue +1 -1
- package/src/modules/products/components/pages/Products.vue +1 -1
- package/src/modules/products/router/categories.router.js +1 -1
- package/src/modules/products/router/leftovers.router.js +1 -1
- package/src/modules/products/router/products.router.js +1 -1
- package/src/modules/spots/router/spots.js +1 -1
- package/src/modules/users/components/pages/Profile.vue +1 -1
- package/src/modules/users/components/pages/ProfileBlogposts.vue +1 -1
- package/src/modules/users/components/pages/ProfileEdit.vue +2 -2
- package/src/modules/users/components/pages/ProfileEvents.vue +1 -1
- package/src/modules/users/router/users.js +1 -2
- package/src/modules/wallet/controllers/routes/payments.routes.js +1 -1
- package/src/modules/wallet/controllers/routes/rewards.routes.js +1 -1
- package/src/modules/wallet/views/router/payments.router.js +1 -2
- package/src/modules/auth/router/auth.js +0 -111
- package/src/modules/globals/localization/methods/get-app-locales.js +0 -13
- package/src/modules/globals/localization/vue-i18n.js +0 -38
- package/src/modules/globals/localization/vue-i18n.singleton.js +0 -11
- package/src/modules/middlewares/client/states.validation.js +0 -23
- package/src/modules/middlewares/middlewares.client.js +0 -11
- package/src/modules/middlewares/middlewares.server.js +0 -18
- package/src/modules/orders/routes/backcalls.routes.js +0 -36
- package/src/modules/orders/routes/fastorders.routes.js +0 -32
- /package/src/modules/auth/{middlewares → controllers/middlewares}/authJwt.js +0 -0
- /package/src/modules/auth/{middlewares → controllers/middlewares}/authSecret.js +0 -0
- /package/src/modules/auth/{middlewares → controllers/middlewares}/index.js +0 -0
- /package/src/modules/auth/{middlewares → controllers/middlewares}/verifyAccesses.js +0 -0
- /package/src/modules/auth/{middlewares → controllers/middlewares}/verifyInvites.js +0 -0
- /package/src/modules/auth/{middlewares → controllers/middlewares}/verifySignUp.js +0 -0
- /package/src/modules/auth/{middlewares → controllers/middlewares}/verifyUser.js +0 -0
- /package/src/modules/auth/controllers/{twofa.controller.js → services/twofa.service.js} +0 -0
- /package/src/modules/auth/{utils/server → controllers/utils}/verifyAppleIdToken.js +0 -0
- /package/src/modules/auth/{components → views/components}/sections/SliderFeatures.vue +0 -0
- /package/src/modules/auth/{localization → views/localization}/EnterCode.json +0 -0
- /package/src/modules/auth/{localization → views/localization}/EnterPassword.json +0 -0
- /package/src/modules/auth/{localization → views/localization}/ResetPassword.json +0 -0
- /package/src/modules/auth/{localization → views/localization}/SignIn.json +0 -0
- /package/src/modules/auth/{localization → views/localization}/SignUp.json +0 -0
- /package/src/modules/auth/{store → views/store}/auth.js +0 -0
- /package/src/modules/auth/{store → views/store}/twofa.js +0 -0
- /package/src/modules/globals/localization/{methods/get-browser-locale.js → get-browser-locale.js} +0 -0
@@ -0,0 +1,176 @@
|
|
1
|
+
import O from "axios";
|
2
|
+
import d from "../../../../../../node_modules/js-cookie/dist/js.cookie.js";
|
3
|
+
import { Preferences as w } from "../../../../../node_modules/@capacitor/preferences/dist/esm/index.js";
|
4
|
+
import { reactive as f, watch as h } from "vue";
|
5
|
+
import { setError as c } from "../../../globals/store/globals.js";
|
6
|
+
import { state as k } from "./twofa.js";
|
7
|
+
const i = O.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = f({
|
8
|
+
user: {
|
9
|
+
_id: void 0,
|
10
|
+
username: "",
|
11
|
+
email: "",
|
12
|
+
phone: "",
|
13
|
+
password: "",
|
14
|
+
passwordRepeat: ""
|
15
|
+
},
|
16
|
+
access: {
|
17
|
+
roles: null,
|
18
|
+
token: null,
|
19
|
+
status: !1
|
20
|
+
},
|
21
|
+
accesses: []
|
22
|
+
});
|
23
|
+
async function l() {
|
24
|
+
try {
|
25
|
+
const e = await j("user");
|
26
|
+
if (console.log("cookie is", e), e) {
|
27
|
+
const { _id: t, email: s, phone: n, roles: r, accessToken: o } = e;
|
28
|
+
console.log("accessToken is", o), i.interceptors.request.use((p) => (p.headers["x-access-token"] = o, p), (p) => Promise.reject(p));
|
29
|
+
const m = (await i.get("/api/auth/check-accesses")).data;
|
30
|
+
Object.assign(a.user, { _id: t, email: s, phone: n }), Object.assign(a.access, { token: o, roles: r, status: !!o }), a.accesses = m;
|
31
|
+
}
|
32
|
+
} catch (e) {
|
33
|
+
console.error("Error initializing app:", e), g("user"), a.accesses = [];
|
34
|
+
}
|
35
|
+
}
|
36
|
+
l();
|
37
|
+
const N = {
|
38
|
+
async login(e, t) {
|
39
|
+
try {
|
40
|
+
const s = await i.post("/api/auth/signin", {
|
41
|
+
...e,
|
42
|
+
type: t
|
43
|
+
});
|
44
|
+
return u("user", s.data), Object.assign(a.user, {
|
45
|
+
...s.data
|
46
|
+
}), Object.assign(a.access, {
|
47
|
+
token: s.data.accessToken,
|
48
|
+
status: !0,
|
49
|
+
roles: s.data.roles
|
50
|
+
}), await l(), s.data;
|
51
|
+
} catch (s) {
|
52
|
+
return Object.assign(a.access, {
|
53
|
+
token: null,
|
54
|
+
status: !1,
|
55
|
+
roles: null
|
56
|
+
}), console.log(s), c(s), Promise.reject(s);
|
57
|
+
}
|
58
|
+
},
|
59
|
+
async signup(e, t, s) {
|
60
|
+
const { password: n, passwordRepeat: r } = a.user;
|
61
|
+
if (console.log(n), console.log(r), n !== r) {
|
62
|
+
const o = {
|
63
|
+
response: {
|
64
|
+
data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
|
65
|
+
}
|
66
|
+
};
|
67
|
+
throw c(o), new Error(o.response.status);
|
68
|
+
}
|
69
|
+
try {
|
70
|
+
const o = await i.post("/api/auth/signup", {
|
71
|
+
...e,
|
72
|
+
type: t,
|
73
|
+
inviteCode: s
|
74
|
+
});
|
75
|
+
return console.log(o), o.data.accessToken && u("user", o.data), Object.assign(a.user, {
|
76
|
+
...o.data
|
77
|
+
}), Object.assign(a.access, {
|
78
|
+
token: o.data.accessToken,
|
79
|
+
status: !0,
|
80
|
+
roles: o.data.roles
|
81
|
+
}), await l(), o.data;
|
82
|
+
} catch (o) {
|
83
|
+
throw c(o), console.log("Sign up falied"), o;
|
84
|
+
}
|
85
|
+
},
|
86
|
+
logout() {
|
87
|
+
g("user"), Object.assign(a.user, {
|
88
|
+
_id: void 0,
|
89
|
+
username: "",
|
90
|
+
email: "",
|
91
|
+
phone: "",
|
92
|
+
password: "",
|
93
|
+
passwordRepeat: ""
|
94
|
+
}), Object.assign(a.access, {
|
95
|
+
roles: null,
|
96
|
+
token: null,
|
97
|
+
status: !1
|
98
|
+
}), a.accesses = [];
|
99
|
+
},
|
100
|
+
async resetPassword(e, t) {
|
101
|
+
try {
|
102
|
+
const s = await i.post("/api/auth/reset-password", {
|
103
|
+
email: e.email,
|
104
|
+
phone: e.phone,
|
105
|
+
type: t
|
106
|
+
});
|
107
|
+
return Object.assign(k.code, {
|
108
|
+
...s.data,
|
109
|
+
isSended: !0
|
110
|
+
}), s.data;
|
111
|
+
} catch (s) {
|
112
|
+
return c(s), Promise.reject(s);
|
113
|
+
}
|
114
|
+
},
|
115
|
+
async updatePassword(e, t) {
|
116
|
+
const { password: s, passwordRepeat: n } = a.user;
|
117
|
+
if (s !== n) {
|
118
|
+
const r = {
|
119
|
+
response: {
|
120
|
+
data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
|
121
|
+
}
|
122
|
+
};
|
123
|
+
throw c(r), new Error(r.response.status);
|
124
|
+
}
|
125
|
+
try {
|
126
|
+
const r = await i.post("/api/auth/update-password", {
|
127
|
+
email: e.email,
|
128
|
+
phone: e.phone,
|
129
|
+
password: e.password,
|
130
|
+
passwordRepeat: e.passwordRepeat,
|
131
|
+
type: t
|
132
|
+
});
|
133
|
+
return r.data.accessToken && u("user", r.data), Object.assign(a.user, {
|
134
|
+
...r.data
|
135
|
+
}), Object.assign(a.access, {
|
136
|
+
token: r.data.accessToken,
|
137
|
+
status: !0
|
138
|
+
}), r.data;
|
139
|
+
} catch (r) {
|
140
|
+
return c(r), Promise.reject(r);
|
141
|
+
}
|
142
|
+
}
|
143
|
+
}, _ = {
|
144
|
+
development: { secure: !1, expires: 7, sameSite: "Lax" },
|
145
|
+
production: { expires: 7, path: "/", domain: process.env.DOMAIN_URL, sameSite: "none", secure: !0 }
|
146
|
+
};
|
147
|
+
async function j(e) {
|
148
|
+
if (process.env.MOBILE_APP) {
|
149
|
+
const { value: t } = await w.get({ key: e });
|
150
|
+
return t ? JSON.parse(t) : null;
|
151
|
+
} else {
|
152
|
+
const t = d.get(e);
|
153
|
+
return t ? JSON.parse(t) : null;
|
154
|
+
}
|
155
|
+
}
|
156
|
+
function u(e, t, s = process.env.DOMAIN_URL) {
|
157
|
+
process.env.MOBILE_APP ? w.set({
|
158
|
+
key: e,
|
159
|
+
value: JSON.stringify(t)
|
160
|
+
}) : d.set(e, JSON.stringify(t), _[s]);
|
161
|
+
}
|
162
|
+
function g(e, t = process.env.NODE_ENV) {
|
163
|
+
if (process.env.MOBILE_APP)
|
164
|
+
w.remove({ key: e });
|
165
|
+
else {
|
166
|
+
const s = t === "production" ? { domain: process.env.DOMAIN_URL } : {};
|
167
|
+
d.remove(e, s);
|
168
|
+
}
|
169
|
+
}
|
170
|
+
h(a, (e, t) => {
|
171
|
+
});
|
172
|
+
export {
|
173
|
+
N as actions,
|
174
|
+
l as initialize,
|
175
|
+
a as state
|
176
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("axios");require("../../../../../../node_modules/js-cookie/dist/js.cookie.cjs");const i=require("vue"),d=require("../../../globals/store/globals.cjs"),c=n.create({baseURL:process.env.API_URL,withCredentials:!0}),t=i.reactive({code:{value:"",type:"",method:"",isSended:!1,isValid:!1}});async function l(a,o,r){let s="/api/twofa/sendcode";return o==="reset-password"&&(s="/api/twofa/sendcodereset"),await c.post(s,{phone:a.phone,email:a.email,method:o,type:r}).then(e=>(t.code=e.data,t.code.isSended=!0,Promise.resolve(e.data)),e=>(console.log(e),d.setError(e),Promise.reject(e)))}i.watch(t,(a,o)=>{});exports.sendCode=l;exports.state=t;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import r from "axios";
|
2
|
+
import "../../../../../../node_modules/js-cookie/dist/js.cookie.js";
|
3
|
+
import { reactive as d, watch as n } from "vue";
|
4
|
+
import { setError as c } from "../../../globals/store/globals.js";
|
5
|
+
const p = r.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = d({
|
6
|
+
code: {
|
7
|
+
value: "",
|
8
|
+
type: "",
|
9
|
+
method: "",
|
10
|
+
isSended: !1,
|
11
|
+
isValid: !1
|
12
|
+
}
|
13
|
+
});
|
14
|
+
async function h(t, o, i) {
|
15
|
+
let s = "/api/twofa/sendcode";
|
16
|
+
return o === "reset-password" && (s = "/api/twofa/sendcodereset"), await p.post(s, {
|
17
|
+
phone: t.phone,
|
18
|
+
email: t.email,
|
19
|
+
method: o,
|
20
|
+
type: i
|
21
|
+
}).then(
|
22
|
+
(e) => (a.code = e.data, a.code.isSended = !0, Promise.resolve(e.data)),
|
23
|
+
(e) => (console.log(e), c(e), Promise.reject(e))
|
24
|
+
);
|
25
|
+
}
|
26
|
+
n(a, (t, o) => {
|
27
|
+
});
|
28
|
+
export {
|
29
|
+
h as sendCode,
|
30
|
+
a as state
|
31
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function n(e){return{status:!0,message:null}}function i(e){return/^[\w-\.]+@([\w-]+\.)+[\w-]{2,12}$/.test(e)?{status:!0,message:null}:{status:!1,message:i18n.global.t("validation.email")}}function u(e){return e.length<8?{status:!1,message:i18n.global.t("validation.password.minLength")}:{status:!0,message:null}}async function o(e,t,a,s){if(a){const l=t(a);if(!l.status)throw e.value=l,setTimeout(()=>{e.value=null},3e3),new Error(s)}else throw e.value={status:!1,message:i18n.global.t("validation.length")},setTimeout(()=>{e.value=null},3e3),new Error(i18n.global.t("validation.length"))}exports.validateEmail=i;exports.validateInputs=o;exports.validatePassword=u;exports.validatePhone=n;
|
@@ -0,0 +1,45 @@
|
|
1
|
+
function n(e) {
|
2
|
+
return {
|
3
|
+
status: !0,
|
4
|
+
message: null
|
5
|
+
};
|
6
|
+
}
|
7
|
+
function u(e) {
|
8
|
+
return /^[\w-\.]+@([\w-]+\.)+[\w-]{2,12}$/.test(e) ? {
|
9
|
+
status: !0,
|
10
|
+
message: null
|
11
|
+
} : {
|
12
|
+
status: !1,
|
13
|
+
message: i18n.global.t("validation.email")
|
14
|
+
};
|
15
|
+
}
|
16
|
+
function i(e) {
|
17
|
+
return e.length < 8 ? {
|
18
|
+
status: !1,
|
19
|
+
message: i18n.global.t("validation.password.minLength")
|
20
|
+
} : {
|
21
|
+
status: !0,
|
22
|
+
message: null
|
23
|
+
};
|
24
|
+
}
|
25
|
+
async function o(e, t, a, l) {
|
26
|
+
if (a) {
|
27
|
+
const s = t(a);
|
28
|
+
if (!s.status)
|
29
|
+
throw e.value = s, setTimeout(() => {
|
30
|
+
e.value = null;
|
31
|
+
}, 3e3), new Error(l);
|
32
|
+
} else
|
33
|
+
throw e.value = {
|
34
|
+
status: !1,
|
35
|
+
message: i18n.global.t("validation.length")
|
36
|
+
}, setTimeout(() => {
|
37
|
+
e.value = null;
|
38
|
+
}, 3e3), new Error(i18n.global.t("validation.length"));
|
39
|
+
}
|
40
|
+
export {
|
41
|
+
u as validateEmail,
|
42
|
+
o as validateInputs,
|
43
|
+
i as validatePassword,
|
44
|
+
n as validatePhone
|
45
|
+
};
|
package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("vue-router");require("../../../auth/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const a={id:"account",class:"gap-thin pd-thin cols-2-1_3"},s={key:0,class:"w-100"},u={class:"w-100"},i={__name:"Backoffice",props:{favorites:Array},setup(l){const t=o.useRoute();return o.useRouter(),e.ref(null),e.ref([]),e.onMounted(async()=>{}),(d,_)=>{const n=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("section",a,[e.unref(t).meta.sidebar?(e.openBlock(),e.createElementBlock("div",s,[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t).meta.sidebar)))]),_:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",u,[e.createVNode(n,null,{default:e.withCtx(({Component:r,route:c})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r),{ref:"page",key:c.path}))]),_:2},1024)]),_:1})])])}}};exports.default=i;
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("vue-router");require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const a={id:"account",class:"gap-thin pd-thin cols-2-1_3"},s={key:0,class:"w-100"},u={class:"w-100"},i={__name:"Backoffice",props:{favorites:Array},setup(l){const t=o.useRoute();return o.useRouter(),e.ref(null),e.ref([]),e.onMounted(async()=>{}),(d,_)=>{const n=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("section",a,[e.unref(t).meta.sidebar?(e.openBlock(),e.createElementBlock("div",s,[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t).meta.sidebar)))]),_:1})])):e.createCommentVNode("",!0),e.createElementVNode("div",u,[e.createVNode(n,null,{default:e.withCtx(({Component:r,route:c})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r),{ref:"page",key:c.path}))]),_:2},1024)]),_:1})])])}}};exports.default=i;
|
package/dist/prometheus-framework/src/modules/backoffice/components/layouts/Backoffice.vue.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ref as r, onMounted as d, resolveComponent as p, openBlock as e, createElementBlock as a, unref as s, createVNode as t, Transition as c, withCtx as o, createBlock as i, resolveDynamicComponent as m, createCommentVNode as f, createElementVNode as h } from "vue";
|
2
2
|
import { useRoute as v, useRouter as k } from "vue-router";
|
3
|
-
import "../../../auth/store/auth.js";
|
3
|
+
import "../../../auth/views/store/auth.js";
|
4
4
|
import "../../../organizations/store/organizations.js";
|
5
5
|
const w = {
|
6
6
|
id: "account",
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */require("../../../../components/Menu/MenuItem.vue.cjs");;/* empty css */const r=require("vue-router");require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const t={class:""},o=e.createElementVNode("h1",{class:"pd-medium radius-medium bg-light mn-b-small"},"Welcome to Backoffice",-1),u=[o],s={__name:"Dashboard",props:{favorites:Array},setup(c){return r.useRoute(),r.useRouter(),e.ref(null),e.ref([]),e.onMounted(async()=>{}),(i,n)=>(e.openBlock(),e.createElementBlock("div",t,u))}};exports.default=s;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { ref as e, onMounted as o, openBlock as t, createElementBlock as r, createElementVNode as s } from "vue";
|
2
|
-
/* empty css
|
2
|
+
/* empty css */
|
3
3
|
import "../../../../components/Menu/MenuItem.vue.js";
|
4
4
|
/* empty css */
|
5
5
|
import { useRoute as m, useRouter as c } from "vue-router";
|
6
|
-
import "../../../auth/store/auth.js";
|
6
|
+
import "../../../auth/views/store/auth.js";
|
7
7
|
import "../../../organizations/store/organizations.js";
|
8
8
|
const i = { class: "" }, a = /* @__PURE__ */ s("h1", { class: "pd-medium radius-medium bg-light mn-b-small" }, "Welcome to Backoffice", -1), n = [
|
9
9
|
a
|
package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("../../../../components/Menu/Menu.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("../../../../components/Menu/Menu.vue.cjs"),n=require("../../../../components/Menu/MenuItem.vue.cjs");;/* empty css */const u=require("../../../icons/entities/IconProducts.vue.cjs"),a=require("../../../icons/entities/IconEvents.vue.cjs"),i=require("../../../icons/entities/IconGroups.vue.cjs"),c=require("../../../icons/entities/IconGallery.vue.cjs"),d=require("../../../icons/entities/IconOrders.vue.cjs"),f=require("../../../icons/entities/IconLeftovers.vue.cjs"),l=require("vue-router");require("../../../auth/views/store/auth.cjs");require("../../../organizations/store/organizations.cjs");const m={class:""},p=e.createElementVNode("span",null," Members ",-1),N=e.createElementVNode("span",null," Community ",-1),V=e.createElementVNode("span",null," Products ",-1),v=e.createElementVNode("span",null," Leftovers ",-1),C=e.createElementVNode("span",null," Orders ",-1),_=e.createElementVNode("span",null," Gallery ",-1),h=e.createElementVNode("span",null," Events ",-1),k=e.createElementVNode("span",null," Payments ",-1),w=e.createElementVNode("span",null," Organizations ",-1),g=e.createElementVNode("span",null," Pages ",-1),E=e.createElementVNode("span",null," Reports ",-1),b={__name:"Sidebar",props:{favorites:Array},setup(x){l.useRoute();const r=l.useRouter();return e.ref(null),e.ref([]),e.onMounted(async()=>{}),(q,t)=>(e.openBlock(),e.createElementBlock("div",m,[e.createVNode(o.default,{class:"bg-light mn-b-semi"},{default:e.withCtx(()=>[e.createVNode(n.default,{onClick:t[0]||(t[0]=s=>e.unref(r).push({name:"Organization Members"})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(i.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),p]),_:1}),e.createVNode(n.default,{onClick:t[1]||(t[1]=s=>e.unref(r).push({name:"Backoffice Community"})),class:"cursor-pointer"},{default:e.withCtx(()=>[N]),_:1}),e.createVNode(n.default,{onClick:t[2]||(t[2]=s=>e.unref(r).push({name:"Products"})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(u.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),V]),_:1}),e.createVNode(n.default,{onClick:t[3]||(t[3]=s=>e.unref(r).push({name:"Leftovers"})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(f.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),v]),_:1}),e.createVNode(n.default,{onClick:t[4]||(t[4]=s=>e.unref(r).push({name:"Backoffice Orders"})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(d.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),C]),_:1}),e.createVNode(n.default,{onClick:t[5]||(t[5]=s=>e.unref(r).push({name:"Backoffice Gallery"})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(c.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),_]),_:1}),e.createVNode(n.default,{onClick:t[6]||(t[6]=s=>e.unref(r).push({name:"Backoffice Events"})),class:"cursor-pointer"},{default:e.withCtx(()=>[e.createVNode(a.default,{class:"i-semi",icon:!0,fill:"rgb(var(--white))"}),h]),_:1}),e.createVNode(n.default,{onClick:t[7]||(t[7]=s=>e.unref(r).push({name:"Payments"})),class:"cursor-pointer"},{default:e.withCtx(()=>[k]),_:1})]),_:1}),e.createVNode(o.default,{class:"bg-light"},{default:e.withCtx(()=>[e.createVNode(n.default,{onClick:t[8]||(t[8]=s=>e.unref(r).push({name:"Backoffice Organizations"})),class:"cursor-pointer"},{default:e.withCtx(()=>[w]),_:1}),e.createVNode(n.default,{onClick:t[9]||(t[9]=s=>e.unref(r).push({name:"Backoffice Pages"})),class:"cursor-pointer"},{default:e.withCtx(()=>[g]),_:1}),e.createVNode(n.default,{onClick:t[10]||(t[10]=s=>e.unref(r).push({name:"Backoffice Reports"})),class:"cursor-pointer"},{default:e.withCtx(()=>[E]),_:1})]),_:1})]))}};exports.default=b;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as a, onMounted as m, openBlock as f, createElementBlock as p, createVNode as e, withCtx as o, unref as n, createElementVNode as i } from "vue";
|
2
|
-
import u from "../../../../components/Menu/Menu.
|
2
|
+
import u from "../../../../components/Menu/Menu.vue.js";
|
3
3
|
import r from "../../../../components/Menu/MenuItem.vue.js";
|
4
4
|
/* empty css */
|
5
5
|
import c from "../../../icons/entities/IconProducts.vue.js";
|
@@ -9,7 +9,7 @@ import v from "../../../icons/entities/IconGallery.vue.js";
|
|
9
9
|
import k from "../../../icons/entities/IconOrders.vue.js";
|
10
10
|
import $ from "../../../icons/entities/IconLeftovers.vue.js";
|
11
11
|
import { useRoute as g, useRouter as C } from "vue-router";
|
12
|
-
import "../../../auth/store/auth.js";
|
12
|
+
import "../../../auth/views/store/auth.js";
|
13
13
|
import "../../../organizations/store/organizations.js";
|
14
14
|
const b = { class: "" }, h = /* @__PURE__ */ i("span", null, " Members ", -1), B = /* @__PURE__ */ i("span", null, " Community ", -1), y = /* @__PURE__ */ i("span", null, " Products ", -1), w = /* @__PURE__ */ i("span", null, " Leftovers ", -1), P = /* @__PURE__ */ i("span", null, " Orders ", -1), O = /* @__PURE__ */ i("span", null, " Gallery ", -1), E = /* @__PURE__ */ i("span", null, " Events ", -1), R = /* @__PURE__ */ i("span", null, " Payments ", -1), x = /* @__PURE__ */ i("span", null, " Organizations ", -1), z = /* @__PURE__ */ i("span", null, " Pages ", -1), G = /* @__PURE__ */ i("span", null, " Reports ", -1), T = {
|
15
15
|
__name: "Sidebar",
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../components/layouts/Backoffice.vue.cjs"),t=require("../components/partials/Sidebar.vue.cjs");require("vue");const o=require("../../middlewares/
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../components/layouts/Backoffice.vue.cjs"),t=require("../components/partials/Sidebar.vue.cjs");require("vue");const o=require("../../auth/views/middlewares/auth.validation.cjs"),i=[{path:"backoffice",name:"Backoffice Root",component:e.default,beforeEnter:[o.requiresAdmin],children:[{path:"",name:"Backoffice Admin",meta:{title:{en:"Backoffice",ru:"Управление"},sidebar:t.default,authorize:[]},component:()=>Promise.resolve().then(()=>require("../components/pages/Dashboard.vue.cjs"))},{path:"reports",name:"Backoffice Reports",meta:{title:{en:"Backoffice Reports",ru:"Управление Жалобами"}},component:()=>Promise.resolve().then(()=>require("../../reports/components/pages/BackofficeReports.vue.cjs"))},{path:"organizations",name:"Backoffice Organizations",meta:{title:{en:"Backoffice Organizations",ru:"Управление Организациями"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../organizations/components/pages/Organizations.vue.cjs"))},{path:"events",name:"Backoffice Events",meta:{title:{en:"Backoffice Events",ru:"Управление Событиями"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../events/components/pages/Events.vue.cjs"))},{path:"community",name:"Backoffice Community",meta:{title:{en:"Backoffice Community",ru:"Управление Сообществом"},authorize:[]},component:()=>Promise.resolve().then(()=>require("../../community/components/pages/Community.vue.cjs"))}]}];exports.default=i;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import e from "../components/layouts/Backoffice.vue.js";
|
2
2
|
import t from "../components/partials/Sidebar.vue.js";
|
3
3
|
import "vue";
|
4
|
-
import { requiresAdmin as o } from "../../middlewares/
|
4
|
+
import { requiresAdmin as o } from "../../auth/views/middlewares/auth.validation.js";
|
5
5
|
const c = [{
|
6
6
|
path: "backoffice",
|
7
7
|
name: "Backoffice Root",
|
package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),f=require("../../../../components/Select/Select.vue2.cjs"),g=require("../../../../components/Feed/Feed.vue.cjs"),h=require("../../../organizations/components/blocks/CardOrganization.vue.cjs"),x=require("../../../icons/entities/IconFeatured.vue.cjs"),b=require("../../../icons/entities/IconPopular.vue.cjs"),w=require("../../../icons/entities/IconRecent.vue.cjs"),_=require("../../../icons/entities/IconFollowing.vue.cjs"),a=require("../../store/blogposts.cjs"),i=require("../../../auth/store/auth.cjs"),d=require("../../../organizations/store/organizations.cjs"),k=require("../../../organizations/store/memberships.cjs"),N={style:{"grid-template-columns":"2fr 4fr 2fr"},class:"cols-3 gap-thin pd-thin"},V={class:"align-self-start pos-sticky pos-t-0 w-100 bg-light radius-big pd-medium p-medium gap-thin flex-column flex-nowrap flex"},v={class:"pos-relative"},C={class:"bg-main t-black radius-big pd-medium pos-relative mn-b-thin flex-v-center t-left flex-nowrap flex"},y={class:"pos-relative flex-v-center flex-nowrap flex"},B=e.createElementVNode("span",{class:"mn-r-thin"},"Topics for ",-1),q={class:"align-self-start bg-light radius-big pd-medium"},E={class:"gap-thin flex-nowrap flex"},z=e.createElementVNode("p",{class:"t-medium mn-b-small"},"Popular Communities",-1),T={__name:"Community",setup(F){const o=m.useRoute(),s=m.useRouter();o.params.category==="popular"&&(a.state.sort.param="views"),o.params.category==="new"&&(a.state.sort.param="createdAt");const p=({membership:u,status:t,target:n},c,r)=>{k.mutations.handleMembershipUpdate(d.state.current,u,t,n,c,r)};return(u,t)=>{const n=e.resolveComponent("router-link"),c=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("ul",V,[e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="featured"},"cursor-pointer flex-v-center flex t-medium pd-thin radius-extra"]),onClick:t[0]||(t[0]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"featured"}})})},[e.createVNode(x.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Featured ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="popular"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[1]||(t[1]=()=>{a.state.sort.param="views",e.unref(s).push({name:"Blog",params:{category:"popular"}})})},[e.createVNode(b.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Popular ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="new"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[2]||(t[2]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"new"}})})},[e.createVNode(w.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Recent ")],2),i.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="following"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[3]||(t[3]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"following"}})})},[e.createVNode(_.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Following ")],2)):e.createCommentVNode("",!0),e.createVNode(n,{to:{name:"Create BlogPost"},class:"button t-medium mn-t-small bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Create Post ")]),_:1})]),e.createElementVNode("section",v,[e.createElementVNode("header",C,[e.createElementVNode("h3",y,[B,e.createVNode(f.default,{options:["today","week","month","year","all time"],select:a.state.filter.period,"onUpdate:select":t[4]||(t[4]=r=>a.state.filter.period=r),placeholder:"all time",class:"t-semi pos-relative w-max bg-main t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10"},null,8,["select"])])]),e.createVNode(c,null,{default:e.withCtx(({Component:r,route:l})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r),{ref:"page",key:l.query}))]),_:2},1024)]),_:1})]),e.createElementVNode("div",q,[e.createElementVNode("div",E,[z,i.state.user._id?(e.openBlock(),e.createBlock(n,{key:0,to:{name:"Create Organization"},class:"t-medium cursor-pointer hover-scale-1 radius-extra flex-center flex i-medium bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" + ")]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createVNode(g.default,{states:{empty:{title:"No Organization Found",description:"Currently, there are no organization available."}},store:{read:r=>d.actions.read(r),state:d.state},options:{user:i.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,l=>(e.openBlock(),e.createBlock(h.default,{key:l._id,organization:l,user:i.state.user,showProducts:!1,showRating:!1,showFeatured:!1,showFollowers:!1,onUpdateMembership:p,class:"mn-b-thin w-100 pd-0 bg-white radius-big o-hidden"},null,8,["organization","user"]))),128))]),_:1},8,["store","options"])]),_:1})])])}}};exports.default=T;
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("vue-router"),f=require("../../../../components/Select/Select.vue2.cjs"),g=require("../../../../components/Feed/Feed.vue.cjs"),h=require("../../../organizations/components/blocks/CardOrganization.vue.cjs"),x=require("../../../icons/entities/IconFeatured.vue.cjs"),b=require("../../../icons/entities/IconPopular.vue.cjs"),w=require("../../../icons/entities/IconRecent.vue.cjs"),_=require("../../../icons/entities/IconFollowing.vue.cjs"),a=require("../../store/blogposts.cjs"),i=require("../../../auth/views/store/auth.cjs"),d=require("../../../organizations/store/organizations.cjs"),k=require("../../../organizations/store/memberships.cjs"),N={style:{"grid-template-columns":"2fr 4fr 2fr"},class:"cols-3 gap-thin pd-thin"},V={class:"align-self-start pos-sticky pos-t-0 w-100 bg-light radius-big pd-medium p-medium gap-thin flex-column flex-nowrap flex"},v={class:"pos-relative"},C={class:"bg-main t-black radius-big pd-medium pos-relative mn-b-thin flex-v-center t-left flex-nowrap flex"},y={class:"pos-relative flex-v-center flex-nowrap flex"},B=e.createElementVNode("span",{class:"mn-r-thin"},"Topics for ",-1),q={class:"align-self-start bg-light radius-big pd-medium"},E={class:"gap-thin flex-nowrap flex"},z=e.createElementVNode("p",{class:"t-medium mn-b-small"},"Popular Communities",-1),T={__name:"Community",setup(F){const o=m.useRoute(),s=m.useRouter();o.params.category==="popular"&&(a.state.sort.param="views"),o.params.category==="new"&&(a.state.sort.param="createdAt");const p=({membership:u,status:t,target:n},c,r)=>{k.mutations.handleMembershipUpdate(d.state.current,u,t,n,c,r)};return(u,t)=>{const n=e.resolveComponent("router-link"),c=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("ul",V,[e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="featured"},"cursor-pointer flex-v-center flex t-medium pd-thin radius-extra"]),onClick:t[0]||(t[0]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"featured"}})})},[e.createVNode(x.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Featured ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="popular"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[1]||(t[1]=()=>{a.state.sort.param="views",e.unref(s).push({name:"Blog",params:{category:"popular"}})})},[e.createVNode(b.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Popular ")],2),e.createElementVNode("li",{class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="new"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[2]||(t[2]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"new"}})})},[e.createVNode(w.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Recent ")],2),i.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-black bg-white":e.unref(o).params.category==="following"},"cursor-pointer t-medium flex-v-center flex pd-thin radius-extra"]),onClick:t[3]||(t[3]=()=>{a.state.sort.param="createdAt",e.unref(s).push({name:"Blog",params:{category:"following"}})})},[e.createVNode(_.default,{class:"i-medium mn-r-thin t-transp"}),e.createTextVNode(" Following ")],2)):e.createCommentVNode("",!0),e.createVNode(n,{to:{name:"Create BlogPost"},class:"button t-medium mn-t-small bg-main w-100"},{default:e.withCtx(()=>[e.createTextVNode(" Create Post ")]),_:1})]),e.createElementVNode("section",v,[e.createElementVNode("header",C,[e.createElementVNode("h3",y,[B,e.createVNode(f.default,{options:["today","week","month","year","all time"],select:a.state.filter.period,"onUpdate:select":t[4]||(t[4]=r=>a.state.filter.period=r),placeholder:"all time",class:"t-semi pos-relative w-max bg-main t-black pd-thin radius-medium h3 t-center br-solid br-2px br-black-transp-10"},null,8,["select"])])]),e.createVNode(c,null,{default:e.withCtx(({Component:r,route:l})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r),{ref:"page",key:l.query}))]),_:2},1024)]),_:1})]),e.createElementVNode("div",q,[e.createElementVNode("div",E,[z,i.state.user._id?(e.openBlock(),e.createBlock(n,{key:0,to:{name:"Create Organization"},class:"t-medium cursor-pointer hover-scale-1 radius-extra flex-center flex i-medium bg-main"},{default:e.withCtx(()=>[e.createTextVNode(" + ")]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.createVNode(g.default,{states:{empty:{title:"No Organization Found",description:"Currently, there are no organization available."}},store:{read:r=>d.actions.read(r),state:d.state},options:{user:i.state.user._id,sort:"numberOfMemberships",contain:["blogposts"],limit:10}},{default:e.withCtx(({items:r})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r,l=>(e.openBlock(),e.createBlock(h.default,{key:l._id,organization:l,user:i.state.user,showProducts:!1,showRating:!1,showFeatured:!1,showFollowers:!1,onUpdateMembership:p,class:"mn-b-thin w-100 pd-0 bg-white radius-big o-hidden"},null,8,["organization","user"]))),128))]),_:1},8,["store","options"])]),_:1})])])}}};exports.default=T;
|
@@ -8,7 +8,7 @@ import R from "../../../icons/entities/IconPopular.vue.js";
|
|
8
8
|
import U from "../../../icons/entities/IconRecent.vue.js";
|
9
9
|
import V from "../../../icons/entities/IconFollowing.vue.js";
|
10
10
|
import { state as o } from "../../store/blogposts.js";
|
11
|
-
import { state as f } from "../../../auth/store/auth.js";
|
11
|
+
import { state as f } from "../../../auth/views/store/auth.js";
|
12
12
|
import { actions as O, state as k } from "../../../organizations/store/organizations.js";
|
13
13
|
import { mutations as T } from "../../../organizations/store/memberships.js";
|
14
14
|
const E = {
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("vue-i18n")
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("vue-i18n");;/* empty css */const p=require("../../../../components/Feed/Feed.vue.cjs"),g=require("../blocks/CardBlogpost.vue.cjs"),u=require("../../store/blogposts.cjs"),l=require("../../../auth/views/store/auth.cjs"),f={class:"bg-white"},y={__name:"Blog",setup(b){const s=c.useRoute(),d=c.useRouter();return e.onMounted(()=>{if(s.query){const o=s.query,n={tags:o.tags?o.tags.split(","):[],period:o.period?o.period:null};u.state.filter=n}}),e.watch(()=>u.state.filter,(o,n)=>{const t={...s.query};Object.keys(n).forEach(a=>{t[a]&&delete t[a]});const i=Object.fromEntries(Object.entries(o).filter(([a,r])=>Array.isArray(r)&&r.length>0||typeof r=="string"&&r).map(([a,r])=>[a,Array.isArray(r)?r.join(","):r]));Object.assign(t,i),d.replace({query:t})},{deep:!0}),(o,n)=>(e.openBlock(),e.createElementBlock("section",f,[e.createVNode(p.default,{sort:u.state.sort,"onUpdate:sort":n[0]||(n[0]=t=>u.state.sort=t),showLoadMore:!1,states:{empty:{title:"No Blog Posts Found",description:"Currently, there are no posts available in this blog. Please check back later."}},store:{read:t=>u.read(t)},options:{limit:15,category:e.unref(s).params.category,period:e.unref(s).query.period,status:"published",user:l.state.user._id,following:e.unref(s).params.category==="following"?l.state.user._id:null},class:"row-1 gap-thin"},{default:e.withCtx(({items:t})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t,i=>(e.openBlock(),e.createBlock(g.default,{key:i._id,blogpost:i,user:l.state.user._id,class:"h-max-40r mn-b-medium"},null,8,["blogpost","user"]))),128))]),_:1},8,["sort","store","options"])]))}};exports.default=y;
|
@@ -1,13 +1,12 @@
|
|
1
1
|
import { onMounted as d, watch as f, openBlock as l, createElementBlock as c, createVNode as g, unref as p, withCtx as y, Fragment as _, renderList as b, createBlock as h } from "vue";
|
2
2
|
import { useRoute as w, useRouter as k } from "vue-router";
|
3
3
|
import "vue-i18n";
|
4
|
-
import "../../../globals/localization/vue-i18n.js";
|
5
4
|
/* empty css */
|
6
5
|
import q from "../../../../components/Feed/Feed.vue.js";
|
7
6
|
import j from "../blocks/CardBlogpost.vue.js";
|
8
7
|
import { state as n, read as B } from "../../store/blogposts.js";
|
9
|
-
import { state as u } from "../../../auth/store/auth.js";
|
10
|
-
const x = { class: "bg-white" },
|
8
|
+
import { state as u } from "../../../auth/views/store/auth.js";
|
9
|
+
const x = { class: "bg-white" }, N = {
|
11
10
|
__name: "Blog",
|
12
11
|
setup(A) {
|
13
12
|
const o = w(), m = k();
|
@@ -68,5 +67,5 @@ const x = { class: "bg-white" }, P = {
|
|
68
67
|
}
|
69
68
|
};
|
70
69
|
export {
|
71
|
-
|
70
|
+
N as default
|
72
71
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const s=require("../../../../components/EmptyState/EmptyState.vue.cjs"),c=require("../blocks/CardBlogpost.vue.cjs"),i=require("../../../icons/skeletons/SkeletonBlogpost.vue.cjs"),d=require("../../../organizations/components/sections/Publics.vue.cjs"),m=require("../sections/Comments.vue.cjs"),p=require("../../../constructor/components/sections/Viewer.vue.cjs"),g=require("../../store/blogposts.cjs"),r=require("../../../auth/store/auth.cjs"),k=require("vue-router"),b={class:"pd-thin"},v=["href"],h=e.createElementVNode("h3",{class:"mn-b-small"},"Recommended Communities",-1),_={__name:"BlogPost",setup(f){const n=k.useRoute(),t=e.ref(null),o=e.ref(!0);return e.onMounted(async()=>{o.value=!0;const a=await g.read({user:r.state.user._id,url:n.params.url});t.value=a[0],o.value=!1}),(a,l)=>(e.openBlock(),e.createElementBlock("section",b,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-light radius-big"},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(3,u=>e.createVNode(i.default,{key:u})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!o.value&&!t.value?(e.openBlock(),e.createBlock(s.default,{key:0,title:"No Blogpost Found",description:"Currently, there are no blogposts available. Please check back later.",class:"pd-medium mn-b-thin bg-light radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"container"},{default:e.withCtx(()=>[!o.value&&t.value?(e.openBlock(),e.createBlock(c.default,{key:0,onClick:l[0]||(l[0]=u=>a.$router.push({name:"Blogpost",params:{url:t.value.url}})),blogpost:t.value,user:r.state.user._id,type:"blogpostPage",hideTitle:!0,class:"mn-b-medium"},{default:e.withCtx(()=>[t.value&&t.value.content?(e.openBlock(),e.createBlock(p.default,{key:0,content:t.value.content},null,8,["content"])):e.createCommentVNode("",!0),t.value.source?(e.openBlock(),e.createElementBlock("a",{key:1,href:t.value.source,target:"_blank",class:"mn-b-semi d-block w-max radius-big pd-thin bg-black t-white"}," Check Source 🔗 ",8,v)):e.createCommentVNode("",!0)]),_:1},8,["blogpost","user"])):e.createCommentVNode("",!0),h,e.createVNode(d.default,{class:"mn-b-small"}),!o.value&&t.value?(e.openBlock(),e.createBlock(m.default,{key:1,type:"blogpost",target:t.value._id,owner:r.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=_;
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const s=require("../../../../components/EmptyState/EmptyState.vue.cjs"),c=require("../blocks/CardBlogpost.vue.cjs"),i=require("../../../icons/skeletons/SkeletonBlogpost.vue.cjs"),d=require("../../../organizations/components/sections/Publics.vue.cjs"),m=require("../sections/Comments.vue.cjs"),p=require("../../../constructor/components/sections/Viewer.vue.cjs"),g=require("../../store/blogposts.cjs"),r=require("../../../auth/views/store/auth.cjs"),k=require("vue-router"),b={class:"pd-thin"},v=["href"],h=e.createElementVNode("h3",{class:"mn-b-small"},"Recommended Communities",-1),_={__name:"BlogPost",setup(f){const n=k.useRoute(),t=e.ref(null),o=e.ref(!0);return e.onMounted(async()=>{o.value=!0;const a=await g.read({user:r.state.user._id,url:n.params.url});t.value=a[0],o.value=!1}),(a,l)=>(e.openBlock(),e.createElementBlock("section",b,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-light radius-big"},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(3,u=>e.createVNode(i.default,{key:u})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!o.value&&!t.value?(e.openBlock(),e.createBlock(s.default,{key:0,title:"No Blogpost Found",description:"Currently, there are no blogposts available. Please check back later.",class:"pd-medium mn-b-thin bg-light radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"container"},{default:e.withCtx(()=>[!o.value&&t.value?(e.openBlock(),e.createBlock(c.default,{key:0,onClick:l[0]||(l[0]=u=>a.$router.push({name:"Blogpost",params:{url:t.value.url}})),blogpost:t.value,user:r.state.user._id,type:"blogpostPage",hideTitle:!0,class:"mn-b-medium"},{default:e.withCtx(()=>[t.value&&t.value.content?(e.openBlock(),e.createBlock(p.default,{key:0,content:t.value.content},null,8,["content"])):e.createCommentVNode("",!0),t.value.source?(e.openBlock(),e.createElementBlock("a",{key:1,href:t.value.source,target:"_blank",class:"mn-b-semi d-block w-max radius-big pd-thin bg-black t-white"}," Check Source 🔗 ",8,v)):e.createCommentVNode("",!0)]),_:1},8,["blogpost","user"])):e.createCommentVNode("",!0),h,e.createVNode(d.default,{class:"mn-b-small"}),!o.value&&t.value?(e.openBlock(),e.createBlock(m.default,{key:1,type:"blogpost",target:t.value._id,owner:r.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=_;
|
@@ -7,7 +7,7 @@ import $ from "../../../organizations/components/sections/Publics.vue.js";
|
|
7
7
|
import w from "../sections/Comments.vue.js";
|
8
8
|
import C from "../../../constructor/components/sections/Viewer.vue.js";
|
9
9
|
import { read as N } from "../../store/blogposts.js";
|
10
|
-
import { state as i } from "../../../auth/store/auth.js";
|
10
|
+
import { state as i } from "../../../auth/views/store/auth.js";
|
11
11
|
import { useRoute as x } from "vue-router";
|
12
12
|
const P = { class: "pd-thin" }, T = ["href"], V = /* @__PURE__ */ h("h3", { class: "mn-b-small" }, "Recommended Communities", -1), H = {
|
13
13
|
__name: "BlogPost",
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");;/* empty css */;/* empty css */;/* empty css */require("axios");;/* empty css */const _=require("../blocks/CardBlogpost.vue.cjs"),n=require("../../store/blogposts.cjs"),f=require("../../../auth/store/auth.cjs"),b=require("vue-router");;/* empty css */const v=l=>(e.pushScopeId("data-v-
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs");;/* empty css */;/* empty css */;/* empty css */require("axios");;/* empty css */const _=require("../blocks/CardBlogpost.vue.cjs"),n=require("../../store/blogposts.cjs"),f=require("../../../auth/views/store/auth.cjs"),b=require("vue-router");;/* empty css */const v=l=>(e.pushScopeId("data-v-2fc13a78"),l=l(),e.popScopeId(),l),g={class:"flex-v-center flex-nowrap flex mn-b-medium"},h=v(()=>e.createElementVNode("h3",{class:"mn-r-medium"},"Blog",-1)),k={class:""},w={class:"flex-nowrap flex pd-t-zero pd-b-zero pd-big"},q=["onClick"],y=["onClick"],C={__name:"Community",async setup(l){let s,c;const i=b.useRouter();[s,c]=e.withAsyncContext(()=>n.read()),await s,c(),console.log(n.state),e.ref({title:"",content:"",categories:[]});const d=async t=>{window.confirm("Are you sure you want to delete this post?")&&(console.log(t),await n.remove(t))};let u=e.ref("all");const a=e.computed(()=>u.value==="all"?n.state.all:n.state.all.filter(t=>t.categories.includes(u.value)));return e.computed(()=>{for(let t of a.value)if(t.blocks&&t.blocks.length>0){const r=t.blocks.find(o=>o.type.name==="ImageUpload");if(r)return r.content}return null}),(t,r)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",g,[h,e.createElementVNode("button",{onClick:r[0]||(r[0]=o=>e.unref(i).push({name:"Create BlogPost"})),class:"t-white bg-second button-small button"},"+")]),e.createElementVNode("div",k,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,o=>(e.openBlock(),e.createBlock(_.default,{key:o._id,blogpost:o,owner:f.state.user._id,class:"mn-b-medium"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createElementVNode("button",{class:"mn-r-thin button-small w-100 button",onClick:m=>t.$router.push({path:"/community/posts/"+o.url+"/edit"})},"Edit",8,q),e.createElementVNode("button",{class:"button-small w-100 button",onClick:m=>d(o._id)},"Delete",8,y)])]),_:2},1032,["blogpost","owner"]))),128))])]))}},B=p.default(C,[["__scopeId","data-v-2fc13a78"]]);exports.default=B;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { withAsyncContext as
|
1
|
+
import { withAsyncContext as b, ref as u, computed as d, openBlock as r, createElementBlock as p, createElementVNode as o, unref as v, Fragment as w, renderList as g, createBlock as k, withCtx as y, pushScopeId as C, popScopeId as x } from "vue";
|
2
2
|
/* empty css */
|
3
3
|
import B from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
4
4
|
/* empty css */
|
@@ -8,15 +8,15 @@ import "axios";
|
|
8
8
|
/* empty css */
|
9
9
|
import $ from "../blocks/CardBlogpost.vue.js";
|
10
10
|
import { read as I, state as l, remove as E } from "../../store/blogposts.js";
|
11
|
-
import { state as P } from "../../../auth/store/auth.js";
|
11
|
+
import { state as P } from "../../../auth/views/store/auth.js";
|
12
12
|
import { useRouter as S } from "vue-router";
|
13
13
|
/* empty css */
|
14
|
-
const z = (s) => (C("data-v-
|
14
|
+
const z = (s) => (C("data-v-2fc13a78"), s = s(), x(), s), A = { class: "flex-v-center flex-nowrap flex mn-b-medium" }, D = /* @__PURE__ */ z(() => /* @__PURE__ */ o("h3", { class: "mn-r-medium" }, "Blog", -1)), F = { class: "" }, L = { class: "flex-nowrap flex pd-t-zero pd-b-zero pd-big" }, N = ["onClick"], R = ["onClick"], U = {
|
15
15
|
__name: "Community",
|
16
16
|
async setup(s) {
|
17
|
-
let i,
|
17
|
+
let i, c;
|
18
18
|
const _ = S();
|
19
|
-
[i,
|
19
|
+
[i, c] = b(() => I()), await i, c(), console.log(l), u({
|
20
20
|
title: "",
|
21
21
|
content: "",
|
22
22
|
categories: []
|
@@ -24,8 +24,8 @@ const z = (s) => (C("data-v-bdf0e48a"), s = s(), x(), s), A = { class: "flex-v-c
|
|
24
24
|
const f = async (t) => {
|
25
25
|
window.confirm("Are you sure you want to delete this post?") && (console.log(t), await E(t));
|
26
26
|
};
|
27
|
-
let
|
28
|
-
const m = d(() =>
|
27
|
+
let a = u("all");
|
28
|
+
const m = d(() => a.value === "all" ? l.all : l.all.filter((t) => t.categories.includes(a.value)));
|
29
29
|
return d(() => {
|
30
30
|
for (let t of m.value)
|
31
31
|
if (t.blocks && t.blocks.length > 0) {
|
@@ -52,11 +52,11 @@ const z = (s) => (C("data-v-bdf0e48a"), s = s(), x(), s), A = { class: "flex-v-c
|
|
52
52
|
o("div", L, [
|
53
53
|
o("button", {
|
54
54
|
class: "mn-r-thin button-small w-100 button",
|
55
|
-
onClick: (
|
55
|
+
onClick: (h) => t.$router.push({ path: "/community/posts/" + e.url + "/edit" })
|
56
56
|
}, "Edit", 8, N),
|
57
57
|
o("button", {
|
58
58
|
class: "button-small w-100 button",
|
59
|
-
onClick: (
|
59
|
+
onClick: (h) => f(e._id)
|
60
60
|
}, "Delete", 8, R)
|
61
61
|
])
|
62
62
|
]),
|
@@ -65,7 +65,7 @@ const z = (s) => (C("data-v-bdf0e48a"), s = s(), x(), s), A = { class: "flex-v-c
|
|
65
65
|
])
|
66
66
|
]));
|
67
67
|
}
|
68
|
-
}, Y = /* @__PURE__ */ B(U, [["__scopeId", "data-v-
|
68
|
+
}, Y = /* @__PURE__ */ B(U, [["__scopeId", "data-v-2fc13a78"]]);
|
69
69
|
export {
|
70
70
|
Y as default
|
71
71
|
};
|
package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("isomorphic-dompurify");;/* empty css */const w=require("../../../constructor/components/sections/Constructor.vue.cjs"),V=require("../../../../components/Popup/Popup.vue2.cjs");;/* empty css */;/* empty css */const N=require("../../../../components/FieldTags/BlockTags.vue.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),y=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),C=require("../../../../components/Button/Button.vue2.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/store/auth.cjs"),x=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={style:{"min-height":"100%"},class:"w-100 bg-light pd-big radius-big"},T=e.createElementVNode("div",{class:"w-full h-full"},null,-1),z={key:0,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},A={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},O=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),U=e.createElementVNode("h5",{class:"mn-b-thin"},"Add source:",-1),D=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),M={key:0,class:"mn-b-thin"},S={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},R={__name:"CreateBlogPost",setup($){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{const o=await x.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});if(p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo})),s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo})});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function h(){d.value=!0}function v(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{console.log(t.value),u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.createElementVNode("section",E,[T,e.unref(t)?(e.openBlock(),e.createBlock(w.default,{key:0,content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"scaleIn"},{default:e.withCtx(()=>[e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",A,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(V.default,{onClosePopup:v,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[O,e.createVNode(N.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags,class:"mn-b-small"},null,8,["tags"]),U,e.createVNode(y.default,{field:e.unref(t).source,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).source=l),placeholder:"Add full link to the source",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["field"]),D,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[6]||(a[6]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",M,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(B.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[7]||(a[7]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(C.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=R;
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("isomorphic-dompurify");;/* empty css */const w=require("../../../constructor/components/sections/Constructor.vue.cjs"),V=require("../../../../components/Popup/Popup.vue2.cjs");;/* empty css */;/* empty css */const N=require("../../../../components/FieldTags/BlockTags.vue.cjs"),B=require("../../../../components/Checkbox/Checkbox.vue.cjs"),y=require("../../../../components/Field/Field.vue2.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),C=require("../../../../components/Button/Button.vue2.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/views/store/auth.cjs"),x=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={style:{"min-height":"100%"},class:"w-100 bg-light pd-big radius-big"},T=e.createElementVNode("div",{class:"w-full h-full"},null,-1),z={key:0,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},A={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},O=e.createElementVNode("h3",{class:"mn-b-small"},"Final Touches",-1),U=e.createElementVNode("h5",{class:"mn-b-thin"},"Add source:",-1),D=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),M={key:0,class:"mn-b-thin"},S={key:1,class:"mn-b-medium br-grey-transp-25 br-2px br-solid pd-small radius-big"},R={__name:"CreateBlogPost",setup($){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{const o=await x.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});if(p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo})),s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo})});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function h(){d.value=!0}function v(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",t.value.name=t.value.content[0].content,s.params.url?n.update(t.value).then(o=>{console.log(t.value),u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.createElementVNode("section",E,[T,e.unref(t)?(e.openBlock(),e.createBlock(w.default,{key:0,content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"scaleIn"},{default:e.withCtx(()=>[e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",A,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(V.default,{onClosePopup:v,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[O,e.createVNode(N.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags,class:"mn-b-small"},null,8,["tags"]),U,e.createVNode(y.default,{field:e.unref(t).source,"onUpdate:field":a[5]||(a[5]=l=>e.unref(t).source=l),placeholder:"Add full link to the source",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["field"]),D,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[6]||(a[6]=l=>r.value=l),options:e.unref(p),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-b-medium bg-light radius-medium pd-small"},null,8,["modelValue","options"]),r.value?(e.openBlock(),e.createElementBlock("h5",M,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",S,[e.createVNode(B.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[7]||(a[7]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(C.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=R;
|
package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js
CHANGED
@@ -12,7 +12,7 @@ import L from "../../../../components/SelectMulti/SelectMulti.vue.js";
|
|
12
12
|
import M from "../../../../components/Button/Button.vue2.js";
|
13
13
|
import { useRoute as R, useRouter as S } from "vue-router";
|
14
14
|
import { read as H, clean as j, state as q, update as k, create as y, remove as G } from "../../store/blogposts.js";
|
15
|
-
import { state as f } from "../../../auth/store/auth.js";
|
15
|
+
import { state as f } from "../../../auth/views/store/auth.js";
|
16
16
|
import { actions as I } from "../../../organizations/store/organizations.js";
|
17
17
|
const J = { class: "pd-thin" }, K = {
|
18
18
|
style: { "min-height": "100%" },
|
package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const s=require("../../../../components/Slider/Slider.vue.cjs"),i=require("../blocks/CardBlogpost.vue.cjs"),l=require("../../store/blogposts.cjs"),r=require("../../../auth/store/auth.cjs");;/* empty css */const n={class:"pd-thin"},a={class:"bg-light radius-big pd-t-big pd-b-big"},c={class:"w-100 pd-b-small t-center flex-center flex"},u=e.createElementVNode("b",null,"Community",-1),d={__name:"HotPosts",setup(p){return(_,h)=>{const o=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",n,[e.createElementVNode("div",a,[e.createElementVNode("h2",c,[e.createTextVNode(" Discover Our "),e.createVNode(o,{to:{name:"Blog"},class:"transition-ease-in hover-bg-black hover-t-white transition-timing-1 hover-scale-0 bg-main cursor-pointer pd-thin pd-r-small pd-l-small mn-l-thin radius-extra flex flex-v-center"},{default:e.withCtx(()=>[u]),_:1})]),e.createVNode(s.default,{store:{read:t=>l.read(t)},options:{skip:0,limit:8,user:r.state.user._id,period:"year",category:"featured"},text:{messages:{en:{title:"No Blogposts Found",description:"Currently, there are no blogposts available."}}},class:"slider-hotpost"},{default:e.withCtx(({item:t})=>[(e.openBlock(),e.createBlock(i.default,{key:t._id,blogpost:t,user:r.state.user._id,hideDescription:!0,class:"bg-white flex flex-column h-35r"},null,8,["blogpost","user"]))]),_:1},8,["store","options"])])])}}};exports.default=d;
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */;/* empty css */const s=require("../../../../components/Slider/Slider.vue.cjs"),i=require("../blocks/CardBlogpost.vue.cjs"),l=require("../../store/blogposts.cjs"),r=require("../../../auth/views/store/auth.cjs");;/* empty css */const n={class:"pd-thin"},a={class:"bg-light radius-big pd-t-big pd-b-big"},c={class:"w-100 pd-b-small t-center flex-center flex"},u=e.createElementVNode("b",null,"Community",-1),d={__name:"HotPosts",setup(p){return(_,h)=>{const o=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",n,[e.createElementVNode("div",a,[e.createElementVNode("h2",c,[e.createTextVNode(" Discover Our "),e.createVNode(o,{to:{name:"Blog"},class:"transition-ease-in hover-bg-black hover-t-white transition-timing-1 hover-scale-0 bg-main cursor-pointer pd-thin pd-r-small pd-l-small mn-l-thin radius-extra flex flex-v-center"},{default:e.withCtx(()=>[u]),_:1})]),e.createVNode(s.default,{store:{read:t=>l.read(t)},options:{skip:0,limit:8,user:r.state.user._id,period:"year",category:"featured"},text:{messages:{en:{title:"No Blogposts Found",description:"Currently, there are no blogposts available."}}},class:"slider-hotpost"},{default:e.withCtx(({item:t})=>[(e.openBlock(),e.createBlock(i.default,{key:t._id,blogpost:t,user:r.state.user._id,hideDescription:!0,class:"bg-white flex flex-column h-35r"},null,8,["blogpost","user"]))]),_:1},8,["store","options"])])])}}};exports.default=d;
|