@ozdao/prometheus-framework 0.2.127 → 0.2.129
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +1 -1
- package/dist/auth.server.js +28 -37
- package/dist/auth.server.mjs +28 -37
- package/dist/community.server.js +1 -1
- package/dist/community.server.mjs +1 -1
- package/dist/events.server.js +1 -1
- package/dist/events.server.mjs +1 -1
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/gallery.server.js +6 -2
- package/dist/gallery.server.mjs +6 -2
- package/dist/{index-BCCiEK_u.js → index-BshfsiQG.js} +8 -4
- package/dist/{index-B6a1mPgp.mjs → index-DKtnWDNC.mjs} +8 -4
- package/dist/{main-CmL_j3wv.mjs → main-DvdaURTh.mjs} +3261 -3154
- package/dist/main-hLtpe4Hr.js +92 -0
- package/dist/main.css +1 -1
- package/dist/middlewares.server.js +1 -1
- package/dist/middlewares.server.mjs +1 -1
- package/dist/node_modules/zod/lib/index.cjs +1 -1
- package/dist/node_modules/zod/lib/index.js +1162 -1033
- package/dist/orders.server.js +1 -1
- package/dist/orders.server.mjs +1 -1
- package/dist/organizations.server.js +1 -1
- package/dist/organizations.server.mjs +1 -1
- package/dist/products.server.js +1 -1
- package/dist/products.server.mjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue.js +89 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue2.js +1 -89
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
- package/dist/prometheus-framework/src/components/BottomSheet/BottomSheet.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/BottomSheet/BottomSheet.vue.js +73 -0
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +23 -22
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +1 -27
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +27 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +1 -58
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +58 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +144 -112
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +5 -5
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +127 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +1 -127
- package/dist/prometheus-framework/src/components/Menu/MenuItem.vue.cjs +1 -0
- package/dist/prometheus-framework/src/{modules/mobile/components → components}/Menu/MenuItem.vue.js +1 -1
- package/dist/prometheus-framework/src/components/PhotoViewer/PhotoViewer.vue.cjs +1 -0
- package/dist/prometheus-framework/src/{modules/gallery/components/blocks → components/PhotoViewer}/PhotoViewer.vue.js +6 -6
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +77 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +1 -77
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +103 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +1 -103
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue.js +45 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tooltip/Tooltip.vue2.js +1 -45
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +7 -6
- 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 +114 -77
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/router/backoffice.js +7 -22
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +62 -70
- 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 +2 -2
- 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 +1 -1
- 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 +2 -2
- 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 +17 -16
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +66 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +0 -66
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- 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 +3 -3
- 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/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +5 -5
- 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 +9 -9
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.cjs +1 -0
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.js +18 -0
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockFilter.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/components/blocks/BlockFilter.vue.js +46 -0
- 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 +20 -16
- package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.js +2 -2
- 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 +10 -10
- 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/marketplace/store/marketplace.cjs +1 -1
- package/dist/prometheus-framework/src/modules/marketplace/store/marketplace.js +27 -4
- package/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.cjs +1 -1
- package/dist/prometheus-framework/src/modules/middlewares/client/auth.validation.js +14 -12
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +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.js +111 -93
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/AskToLogin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/AskToLogin.vue.js +13 -14
- 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/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +20 -22
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.router.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/router/orders.router.js +5 -4
- 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.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 +4 -4
- 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 +4 -4
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +154 -0
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.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 +1 -1
- 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 +4 -4
- package/dist/prometheus-framework/src/modules/organizations/router/backoffice.router.cjs +1 -0
- package/dist/prometheus-framework/src/modules/organizations/router/backoffice.router.js +27 -0
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +9 -7
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +26 -27
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.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 +2 -2
- 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 +22 -23
- 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 +1 -1
- 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 +30 -29
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +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.js +72 -51
- 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.js +5 -5
- 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.js +51 -53
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +22 -22
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.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 +62 -48
- 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 +43 -44
- 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 +5 -5
- package/dist/prometheus-framework.cjs.js +1 -1
- package/dist/prometheus-framework.es.js +24 -25
- package/dist/reports.server.js +1 -1
- package/dist/reports.server.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/wallet.server.js +1 -1
- package/dist/wallet.server.mjs +1 -1
- package/dist/{web-Bk_OtXgv.js → web-CVIepGUM.js} +1 -1
- package/dist/{web-BHzpMOmk.mjs → web-Dt2JR41o.mjs} +1 -1
- package/package.json +3 -2
- package/src/{modules/mobile/components → components}/BottomSheet/BottomSheet.vue +24 -21
- package/src/components/Button/Button.vue +20 -3
- package/src/components/Feed/Feed.vue +28 -3
- package/src/components/FieldBig/FieldBig.vue +2 -2
- package/src/components/Sidebar/Sidebar.vue +13 -5
- package/src/components/index.js +0 -1
- package/src/main.js +0 -4
- package/src/modules/auth/controllers/auth.controller.js +32 -48
- package/src/modules/auth/router/auth.js +1 -4
- package/src/modules/auth/store/auth.js +28 -24
- package/src/modules/backoffice/components/pages/Dashboard.vue +29 -56
- package/src/modules/backoffice/router/backoffice.js +4 -15
- package/src/modules/community/components/blocks/CardBlogpost.vue +28 -26
- package/src/modules/community/components/layouts/Community.vue +1 -1
- package/src/modules/events/components/pages/EditEvent.vue +1 -1
- package/src/modules/gallery/components/pages/Gallery.vue +1 -2
- package/src/modules/gallery/components/sections/BackofficeGallery.vue +2 -1
- package/src/modules/gallery/router/gallery.backoffice.router.js +14 -0
- package/src/modules/globals/components/blocks/BlockFilter.vue +44 -0
- package/src/modules/globals/components/blocks/CardHeader.vue +5 -3
- package/src/modules/globals/components/layouts/Client.vue +99 -43
- package/src/modules/globals/components/pages/401.vue +5 -0
- package/src/modules/globals/components/pages/404.vue +5 -0
- package/src/modules/globals/components/partials/Footer.vue +17 -5
- package/src/modules/globals/components/partials/Header.vue +37 -18
- package/src/modules/globals/components/partials/Navigation.vue +7 -2
- package/src/modules/landing/components/sections/MobileApp.vue +2 -2
- package/src/modules/landing/components/sections/SubscribeNewsletter.vue +1 -1
- package/src/modules/landing/router/landing.js +2 -12
- package/src/modules/legal/components/pages/Legal.vue +2 -2
- package/src/modules/marketplace/components/layouts/Marketplace.vue +30 -13
- package/src/modules/marketplace/components/pages/Catalog.vue +2 -1
- package/src/modules/marketplace/router/marketplace.js +12 -10
- package/src/modules/marketplace/store/marketplace.js +25 -1
- package/src/modules/middlewares/client/auth.validation.js +5 -2
- package/src/modules/middlewares/server/authJwt.js +12 -6
- package/src/modules/middlewares/server/verifyAccesses.js +7 -3
- package/src/modules/orders/components/pages/OrderCreate.vue +34 -22
- package/src/modules/orders/components/sections/AskToLogin.vue +8 -7
- package/src/modules/orders/components/sections/FormDelivery.vue +6 -6
- package/src/modules/orders/router/orders.router.js +6 -3
- package/src/modules/organizations/components/pages/Members.vue +2 -2
- package/src/modules/organizations/components/pages/Organization.vue +2 -2
- package/src/modules/organizations/components/pages/OrganizationBackoffice.vue +204 -0
- package/src/modules/organizations/router/backoffice.router.js +25 -0
- package/src/modules/organizations/router/organizations.js +3 -1
- package/src/modules/pages/router/pages.router.js +15 -0
- package/src/modules/products/components/blocks/ImagesThumbnails.vue +11 -12
- package/src/modules/products/components/pages/Product.vue +7 -3
- package/src/modules/products/components/pages/ProductRecommmendation.vue +6 -5
- package/src/modules/products/components/sections/FilterProducts.vue +6 -6
- package/src/modules/products/components/sections/HeroRecommendation.vue +1 -1
- package/src/modules/products/components/sections/PopularProducts.vue +1 -3
- package/src/modules/products/components/sections/SectionProduct.vue +8 -8
- package/src/modules/spots/components/layouts/Spots.vue +33 -31
- package/src/modules/spots/components/pages/Map.vue +380 -353
- package/src/modules/spots/router/spots.js +3 -1
- package/src/modules/users/components/pages/Profile.vue +4 -4
- package/src/modules/users/components/pages/ProfileEdit.vue +4 -3
- package/src/modules/wallet/controllers/routes/payments.routes.js +0 -1
- package/src/styles/base/all.scss +4 -0
- package/src/styles/config.scss +2 -1
- package/src/styles/layout.scss +0 -1
- package/dist/credentials.schema-CDZCKfEI.mjs +0 -106
- package/dist/credentials.schema-CfhPcsuI.js +0 -105
- package/dist/index-CGIn4v5E.mjs +0 -217
- package/dist/index-CL9l0HRS.js +0 -216
- package/dist/main-8APITHuW.mjs +0 -14201
- package/dist/main-8N2Jmsuk.js +0 -91
- package/dist/main-BJvlNekm.mjs +0 -13631
- package/dist/main-BQisDfLk.js +0 -92
- package/dist/main-BV1Yv9Hy.js +0 -92
- package/dist/main-Ba3zK8PO.js +0 -92
- package/dist/main-Btlny-89.mjs +0 -14207
- package/dist/main-Bw0PvTs-.mjs +0 -13616
- package/dist/main-ByCtZbHD.mjs +0 -13752
- package/dist/main-CF35oB7q.js +0 -92
- package/dist/main-CX2ISR43.mjs +0 -13629
- package/dist/main-CXObXjv-.js +0 -92
- package/dist/main-CkeuHuCY.mjs +0 -13619
- package/dist/main-CnfcBov2.mjs +0 -13740
- package/dist/main-D0va05OD.js +0 -92
- package/dist/main-D50VqYhy.js +0 -91
- package/dist/main-D8gNZLSa.js +0 -92
- package/dist/main-DL3vRQCi.js +0 -92
- package/dist/main-DPsHxX0l.mjs +0 -13633
- package/dist/main-DTlUA63C.mjs +0 -13617
- package/dist/main-DfD5hLQo.mjs +0 -13633
- package/dist/main-Dh6Zfei9.js +0 -92
- package/dist/main-DmNP-t33.mjs +0 -13625
- package/dist/main-Ds3Z5x5d.mjs +0 -14206
- package/dist/main-DwyUYWFX.js +0 -92
- package/dist/main-VcxO-jAt.js +0 -92
- package/dist/main-cffh4bbv.js +0 -92
- package/dist/main-o_2eO2tP.mjs +0 -14208
- package/dist/main-pGo7JpSP.js +0 -92
- package/dist/metadata.schema-BLGSCSmy.mjs +0 -55
- package/dist/metadata.schema-Cu_mPkjE.js +0 -77
- package/dist/metadata.schema-DWR97jhW.js +0 -54
- package/dist/metadata.schema-cbFgazeK.mjs +0 -78
- package/dist/node_modules/@noble/hashes/esm/sha512.cjs +0 -1
- package/dist/node_modules/@noble/hashes/esm/sha512.js +0 -126
- package/dist/node_modules/vue-meta/dist/vue-meta.esm-browser.min.cjs +0 -7
- package/dist/node_modules/vue-meta/dist/vue-meta.esm-browser.min.js +0 -38
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/mergeArrays.cjs +0 -2
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/mergeArrays.js +0 -43
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.js +0 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue.js +0 -373
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone2.vue2.js +0 -1
- package/dist/prometheus-framework/src/components/FieldPhone/utils.cjs +0 -1
- package/dist/prometheus-framework/src/components/FieldPhone/utils.js +0 -259
- package/dist/prometheus-framework/src/components/Magnifier/Magnifier.vue.cjs +0 -1
- package/dist/prometheus-framework/src/components/Magnifier/Magnifier.vue.js +0 -62
- package/dist/prometheus-framework/src/components/Magnifier/Magnifier.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/components/Magnifier/Magnifier.vue2.js +0 -1
- package/dist/prometheus-framework/src/modules/gallery/components/blocks/PhotoViewer.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue2.js +0 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +0 -110
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue2.js +0 -1
- package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/modules/globals/components/elements/ButtonDate.vue2.js +0 -27
- package/dist/prometheus-framework/src/modules/globals/components/sections/Title.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/globals/components/sections/Title.vue.js +0 -29
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/MenuItem.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormClientDetails.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormClientDetails.vue.js +0 -65
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +0 -87
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue2.js +0 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue.js +0 -51
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/User.vue2.js +0 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SortProducts.vue.cjs +0 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SortProducts.vue.js +0 -53
- package/dist/queryProcessor-BJdKh0Ow.mjs +0 -162
- package/dist/queryProcessor-BJoJAetd.mjs +0 -162
- package/dist/queryProcessor-BUDoM96e.js +0 -148
- package/dist/queryProcessor-Cl6sU582.mjs +0 -149
- package/dist/queryProcessor-DRMo_GWK.js +0 -161
- package/dist/queryProcessor-DWf9tsis.js +0 -161
- package/dist/web-B2xhKZNK.js +0 -1
- package/dist/web-B8tq3Fda.mjs +0 -54
- package/dist/web-BDaOF322.js +0 -1
- package/dist/web-BEJCRWop.mjs +0 -54
- package/dist/web-BNKN7kk3.mjs +0 -54
- package/dist/web-BX5um81l.js +0 -1
- package/dist/web-ByJkgGrt.js +0 -1
- package/dist/web-C0sFgeYh.mjs +0 -54
- package/dist/web-CQQEUA9l.js +0 -1
- package/dist/web-CQiHBOEN.mjs +0 -54
- package/dist/web-CXzcKdk4.mjs +0 -54
- package/dist/web-CciQvENI.js +0 -1
- package/dist/web-CkrMHYIU.js +0 -1
- package/dist/web-CtVocufd.js +0 -1
- package/dist/web-CvRd3N_J.mjs +0 -54
- package/dist/web-D0ugI6ra.js +0 -1
- package/dist/web-D2Em-p-C.mjs +0 -54
- package/dist/web-D9Cfcy5k.js +0 -1
- package/dist/web-DEysqj0n.js +0 -1
- package/dist/web-DNq1tHCE.mjs +0 -54
- package/dist/web-DTzbVshr.mjs +0 -54
- package/dist/web-Douq6xn6.js +0 -1
- package/dist/web-DtWmpLE-.mjs +0 -54
- package/dist/web-TGdVOTnw.js +0 -1
- package/dist/web-VFuzUsNl.mjs +0 -54
- package/dist/web-_W9a_nWD.mjs +0 -54
- package/dist/web-kg3KgbAF.js +0 -1
- package/dist/web-nVxTNRH4.mjs +0 -54
- package/src/components/Magnifier/Magnifier.vue +0 -89
- /package/dist/prometheus-framework/src/{modules/mobile/components → components}/Menu/Menu.vue.cjs +0 -0
- /package/dist/prometheus-framework/src/{modules/mobile/components → components}/Menu/Menu.vue.js +0 -0
- /package/dist/prometheus-framework/src/{modules/mobile/components → components}/Menu/Menu.vue2.cjs +0 -0
- /package/dist/prometheus-framework/src/{modules/mobile/components → components}/Menu/Menu.vue2.js +0 -0
- /package/dist/prometheus-framework/src/{modules/gallery/components/blocks → components/PhotoViewer}/PhotoViewer.vue2.cjs +0 -0
- /package/dist/prometheus-framework/src/{modules/gallery/components/blocks → components/PhotoViewer}/PhotoViewer.vue2.js +0 -0
- /package/src/{modules/mobile/components → components}/Menu/Menu.vue +0 -0
- /package/src/{modules/mobile/components → components}/Menu/MenuItem.vue +0 -0
- /package/src/{modules/gallery/components/blocks → components/PhotoViewer}/PhotoViewer.vue +0 -0
- /package/src/modules/{mobile/components/BottomNavigation → globals/components/partials}/BottomNavigation.vue +0 -0
- /package/src/modules/{mobile/components/NavigationBar → globals/components/partials}/NavigationBar.vue +0 -0
- /package/src/modules/{mobile/components/Walkthrough → globals/components/sections}/Walkthrough.vue +0 -0
- /package/src/modules/{landing → pages}/components/pages/Page.vue +0 -0
- /package/src/modules/{backoffice/components/admin → pages/components/pages}/PageEdit.vue +0 -0
- /package/src/modules/{backoffice/components/admin → pages/components/pages}/Pages.vue +0 -0
@@ -207,7 +207,7 @@
|
|
207
207
|
</span>
|
208
208
|
</MenuItem>
|
209
209
|
|
210
|
-
|
210
|
+
<MenuItem
|
211
211
|
@click="router.push({
|
212
212
|
name: 'Legal',
|
213
213
|
params: {
|
@@ -218,7 +218,7 @@
|
|
218
218
|
<span>
|
219
219
|
About
|
220
220
|
</span>
|
221
|
-
</MenuItem>
|
221
|
+
</MenuItem>
|
222
222
|
|
223
223
|
<MenuItem
|
224
224
|
class="cursor-pointer"
|
@@ -243,8 +243,8 @@ import Button from '@pf/src/components/Button/Button.vue'
|
|
243
243
|
import Dropdown from "@pf/src/components/Dropdown/Dropdown.vue";
|
244
244
|
import Completion from '@pf/src/components/Completion/Completion.vue'
|
245
245
|
// Mobile Module
|
246
|
-
import Menu from '@pf/src/
|
247
|
-
import MenuItem from '@pf/src/
|
246
|
+
import Menu from '@pf/src/components/Menu/Menu.vue'
|
247
|
+
import MenuItem from '@pf/src/components/Menu/MenuItem.vue'
|
248
248
|
// Org Module
|
249
249
|
import ButtonToggleMembership from '@pf/src/modules/organizations/components/elements/ButtonToggleMembership.vue'
|
250
250
|
// Report Module
|
@@ -114,7 +114,6 @@
|
|
114
114
|
</template>
|
115
115
|
|
116
116
|
<script setup>
|
117
|
-
import Cookies from 'js-cookie'
|
118
117
|
// Import components
|
119
118
|
import Tab from '@pf/src/components/Tab/Tab.vue'
|
120
119
|
import Field from '@pf/src/components/Field/Field.vue'
|
@@ -134,13 +133,15 @@
|
|
134
133
|
const route = useRoute()
|
135
134
|
const router = useRouter()
|
136
135
|
// Async requests
|
137
|
-
await users.actions.read({ _id: auth.state.user._id });
|
138
|
-
// State
|
139
136
|
const user = ref(users.state.current);
|
137
|
+
onMounted(async () => {
|
138
|
+
await users.actions.read({ _id: route.params._id });
|
139
|
+
})
|
140
140
|
// Methods
|
141
141
|
async function onSubmit() {
|
142
142
|
await users.actions.update(users.state.current)
|
143
143
|
}
|
144
|
+
|
144
145
|
async function onSubmitDelete() {
|
145
146
|
const confirmation = window.confirm("Are you sure you want to delete your account? Restoration will be possible only with the help of an administrator.");
|
146
147
|
|
@@ -18,7 +18,6 @@ module.exports = function(app, db, origins, publicPath) {
|
|
18
18
|
|
19
19
|
const { verifySignUp, verifyUser } = middlewareFactory(db);
|
20
20
|
|
21
|
-
|
22
21
|
observer.subscribe('checkout.session.completed', async (paymentIntent) => {
|
23
22
|
const event = await db.event.findOne({ _id: paymentIntent.metadata.product });
|
24
23
|
|
package/src/styles/base/all.scss
CHANGED
package/src/styles/config.scss
CHANGED
@@ -189,6 +189,7 @@ $rem: (
|
|
189
189
|
'40r': 40rem,
|
190
190
|
'35r': 35rem,
|
191
191
|
'30r': 30rem,
|
192
|
+
'25r': 20rem,
|
192
193
|
'20r': 20rem,
|
193
194
|
'15r': 15rem,
|
194
195
|
'10r': 10rem,
|
@@ -282,7 +283,7 @@ body {
|
|
282
283
|
|
283
284
|
@include generate-bg-classes('bg-black', 'black');
|
284
285
|
@include generate-bg-classes('bg-dark', 'dark');
|
285
|
-
@include generate-bg-classes('bg-
|
286
|
+
@include generate-bg-classes('bg-grey', 'grey');
|
286
287
|
@include generate-bg-classes('bg-light', 'light');
|
287
288
|
@include generate-bg-classes('bg-white', 'white');
|
288
289
|
}
|
package/src/styles/layout.scss
CHANGED
@@ -1,106 +0,0 @@
|
|
1
|
-
import require$$0 from "mongodb";
|
2
|
-
const { ObjectId } = require$$0;
|
3
|
-
const addUserStatusFields = (user) => {
|
4
|
-
return {
|
5
|
-
$addFields: {
|
6
|
-
isSubscriber: {
|
7
|
-
$cond: [
|
8
|
-
{
|
9
|
-
$anyElementTrue: {
|
10
|
-
$map: {
|
11
|
-
input: "$memberships",
|
12
|
-
as: "membership",
|
13
|
-
in: {
|
14
|
-
$and: [
|
15
|
-
{ $eq: ["$$membership.user", new ObjectId(user)] },
|
16
|
-
{ $eq: ["$$membership.role", "subscriber"] }
|
17
|
-
]
|
18
|
-
}
|
19
|
-
}
|
20
|
-
}
|
21
|
-
},
|
22
|
-
true,
|
23
|
-
false
|
24
|
-
]
|
25
|
-
},
|
26
|
-
isMember: {
|
27
|
-
$cond: [
|
28
|
-
{
|
29
|
-
$anyElementTrue: {
|
30
|
-
$map: {
|
31
|
-
input: "$memberships",
|
32
|
-
as: "membership",
|
33
|
-
in: {
|
34
|
-
$and: [
|
35
|
-
{ $eq: ["$$membership.user", new ObjectId(user)] },
|
36
|
-
{ $not: [{ $in: ["$$membership.role", ["subscriber", "blocked"]] }] }
|
37
|
-
]
|
38
|
-
}
|
39
|
-
}
|
40
|
-
}
|
41
|
-
},
|
42
|
-
true,
|
43
|
-
false
|
44
|
-
]
|
45
|
-
},
|
46
|
-
isBlocked: {
|
47
|
-
$cond: [
|
48
|
-
{
|
49
|
-
$anyElementTrue: {
|
50
|
-
$map: {
|
51
|
-
input: "$memberships",
|
52
|
-
as: "membership",
|
53
|
-
in: {
|
54
|
-
$and: [
|
55
|
-
{ $eq: ["$$membership.user", new ObjectId(user)] },
|
56
|
-
{ $eq: ["$$membership.role", "blocked"] }
|
57
|
-
]
|
58
|
-
}
|
59
|
-
}
|
60
|
-
}
|
61
|
-
},
|
62
|
-
true,
|
63
|
-
false
|
64
|
-
]
|
65
|
-
}
|
66
|
-
}
|
67
|
-
};
|
68
|
-
};
|
69
|
-
var addUserStatusFields_1 = addUserStatusFields;
|
70
|
-
const addMembersQuantity = (user) => {
|
71
|
-
return {
|
72
|
-
$addFields: {
|
73
|
-
numberOfSubscribers: {
|
74
|
-
$size: {
|
75
|
-
$filter: {
|
76
|
-
input: "$memberships",
|
77
|
-
as: "membership",
|
78
|
-
cond: { $eq: ["$$membership.role", "subscriber"] }
|
79
|
-
}
|
80
|
-
}
|
81
|
-
},
|
82
|
-
numberOfMembers: {
|
83
|
-
$size: {
|
84
|
-
$filter: {
|
85
|
-
input: "$memberships",
|
86
|
-
as: "membership",
|
87
|
-
cond: { $not: { $in: ["$$membership.role", ["blocked", "subscriber"]] } }
|
88
|
-
}
|
89
|
-
}
|
90
|
-
}
|
91
|
-
}
|
92
|
-
};
|
93
|
-
};
|
94
|
-
var addMembersQuantity_1 = addMembersQuantity;
|
95
|
-
var credentials_schema = function applyCredentialsSchema(schema, db) {
|
96
|
-
schema.add({
|
97
|
-
phone: String,
|
98
|
-
email: String,
|
99
|
-
apple_id: String
|
100
|
-
});
|
101
|
-
};
|
102
|
-
export {
|
103
|
-
addUserStatusFields_1 as a,
|
104
|
-
addMembersQuantity_1 as b,
|
105
|
-
credentials_schema as c
|
106
|
-
};
|
@@ -1,105 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
const require$$0 = require("mongodb");
|
3
|
-
const { ObjectId } = require$$0;
|
4
|
-
const addUserStatusFields = (user) => {
|
5
|
-
return {
|
6
|
-
$addFields: {
|
7
|
-
isSubscriber: {
|
8
|
-
$cond: [
|
9
|
-
{
|
10
|
-
$anyElementTrue: {
|
11
|
-
$map: {
|
12
|
-
input: "$memberships",
|
13
|
-
as: "membership",
|
14
|
-
in: {
|
15
|
-
$and: [
|
16
|
-
{ $eq: ["$$membership.user", new ObjectId(user)] },
|
17
|
-
{ $eq: ["$$membership.role", "subscriber"] }
|
18
|
-
]
|
19
|
-
}
|
20
|
-
}
|
21
|
-
}
|
22
|
-
},
|
23
|
-
true,
|
24
|
-
false
|
25
|
-
]
|
26
|
-
},
|
27
|
-
isMember: {
|
28
|
-
$cond: [
|
29
|
-
{
|
30
|
-
$anyElementTrue: {
|
31
|
-
$map: {
|
32
|
-
input: "$memberships",
|
33
|
-
as: "membership",
|
34
|
-
in: {
|
35
|
-
$and: [
|
36
|
-
{ $eq: ["$$membership.user", new ObjectId(user)] },
|
37
|
-
{ $not: [{ $in: ["$$membership.role", ["subscriber", "blocked"]] }] }
|
38
|
-
]
|
39
|
-
}
|
40
|
-
}
|
41
|
-
}
|
42
|
-
},
|
43
|
-
true,
|
44
|
-
false
|
45
|
-
]
|
46
|
-
},
|
47
|
-
isBlocked: {
|
48
|
-
$cond: [
|
49
|
-
{
|
50
|
-
$anyElementTrue: {
|
51
|
-
$map: {
|
52
|
-
input: "$memberships",
|
53
|
-
as: "membership",
|
54
|
-
in: {
|
55
|
-
$and: [
|
56
|
-
{ $eq: ["$$membership.user", new ObjectId(user)] },
|
57
|
-
{ $eq: ["$$membership.role", "blocked"] }
|
58
|
-
]
|
59
|
-
}
|
60
|
-
}
|
61
|
-
}
|
62
|
-
},
|
63
|
-
true,
|
64
|
-
false
|
65
|
-
]
|
66
|
-
}
|
67
|
-
}
|
68
|
-
};
|
69
|
-
};
|
70
|
-
var addUserStatusFields_1 = addUserStatusFields;
|
71
|
-
const addMembersQuantity = (user) => {
|
72
|
-
return {
|
73
|
-
$addFields: {
|
74
|
-
numberOfSubscribers: {
|
75
|
-
$size: {
|
76
|
-
$filter: {
|
77
|
-
input: "$memberships",
|
78
|
-
as: "membership",
|
79
|
-
cond: { $eq: ["$$membership.role", "subscriber"] }
|
80
|
-
}
|
81
|
-
}
|
82
|
-
},
|
83
|
-
numberOfMembers: {
|
84
|
-
$size: {
|
85
|
-
$filter: {
|
86
|
-
input: "$memberships",
|
87
|
-
as: "membership",
|
88
|
-
cond: { $not: { $in: ["$$membership.role", ["blocked", "subscriber"]] } }
|
89
|
-
}
|
90
|
-
}
|
91
|
-
}
|
92
|
-
}
|
93
|
-
};
|
94
|
-
};
|
95
|
-
var addMembersQuantity_1 = addMembersQuantity;
|
96
|
-
var credentials_schema = function applyCredentialsSchema(schema, db) {
|
97
|
-
schema.add({
|
98
|
-
phone: String,
|
99
|
-
email: String,
|
100
|
-
apple_id: String
|
101
|
-
});
|
102
|
-
};
|
103
|
-
exports.addMembersQuantity_1 = addMembersQuantity_1;
|
104
|
-
exports.addUserStatusFields_1 = addUserStatusFields_1;
|
105
|
-
exports.credentials_schema = credentials_schema;
|
package/dist/index-CGIn4v5E.mjs
DELETED
@@ -1,217 +0,0 @@
|
|
1
|
-
import require$$0 from "jsonwebtoken";
|
2
|
-
import require$$0$1 from "mongodb";
|
3
|
-
const jwt = require$$0;
|
4
|
-
const middlewareFactory$4 = (db) => {
|
5
|
-
const User = db.user;
|
6
|
-
const Role = db.role;
|
7
|
-
const verifyToken = async (req, res, next) => {
|
8
|
-
try {
|
9
|
-
console.log(req.cookies);
|
10
|
-
let user = JSON.parse(req.cookies.user);
|
11
|
-
let token = req.headers["x-access-token"] || user.accessToken;
|
12
|
-
if (!token) {
|
13
|
-
return res.status(403).send({ message: "No token provided!" });
|
14
|
-
}
|
15
|
-
const decoded = jwt.verify(token, process.env.SECRET_KEY);
|
16
|
-
req.userId = decoded._id;
|
17
|
-
console.log("success");
|
18
|
-
next();
|
19
|
-
} catch (err) {
|
20
|
-
console.log(err);
|
21
|
-
return res.status(401).send({ message: "Unauthorized!" });
|
22
|
-
}
|
23
|
-
};
|
24
|
-
const checkRole = (roleToCheck) => async (req, res, next) => {
|
25
|
-
try {
|
26
|
-
const user = await User.findById(req.userId).exec();
|
27
|
-
if (!user) {
|
28
|
-
return res.status(404).send({ message: "User Not found." });
|
29
|
-
}
|
30
|
-
const roles = await Role.find({ _id: { $in: user.roles } }).exec();
|
31
|
-
for (let role of roles) {
|
32
|
-
if (role.name === roleToCheck) {
|
33
|
-
next();
|
34
|
-
return;
|
35
|
-
}
|
36
|
-
}
|
37
|
-
res.status(403).send({ message: `Require ${roleToCheck} Role!` });
|
38
|
-
} catch (err) {
|
39
|
-
res.status(500).send({ message: err.message });
|
40
|
-
}
|
41
|
-
};
|
42
|
-
const isAdmin = checkRole("admin");
|
43
|
-
const isModerator = checkRole("moderator");
|
44
|
-
return {
|
45
|
-
verifyToken,
|
46
|
-
isAdmin,
|
47
|
-
isModerator
|
48
|
-
};
|
49
|
-
};
|
50
|
-
var authJwt = middlewareFactory$4;
|
51
|
-
const middlewareFactory$3 = (db) => {
|
52
|
-
const User = db.user;
|
53
|
-
db.role;
|
54
|
-
const checkDuplicateUsernameOrEmail = async (req, res, next) => {
|
55
|
-
const { type, email, phone } = req.body;
|
56
|
-
console.log(req.body);
|
57
|
-
let query;
|
58
|
-
if (type === "phone" && phone) {
|
59
|
-
query = { phone };
|
60
|
-
}
|
61
|
-
if (type === "email" && email) {
|
62
|
-
query = { email };
|
63
|
-
}
|
64
|
-
try {
|
65
|
-
const user = await User.findOne(query).exec();
|
66
|
-
if (user) {
|
67
|
-
console.log(`USER_ALREADY_REGISTERED`);
|
68
|
-
res.status(400).send({ errorCode: "USER_ALREADY_REGISTERED" });
|
69
|
-
return;
|
70
|
-
}
|
71
|
-
next();
|
72
|
-
} catch (err) {
|
73
|
-
console.log(err);
|
74
|
-
res.status(500).send({ message: err.message });
|
75
|
-
}
|
76
|
-
};
|
77
|
-
const checkRolesExisted = (req, res, next) => {
|
78
|
-
if (req.body.roles) {
|
79
|
-
for (let i = 0; i < req.body.roles.length; i++) {
|
80
|
-
if (!ROLES.includes(req.body.roles[i])) {
|
81
|
-
console.log(`Failed! Role ${req.body.roles[i]} does not exist!`);
|
82
|
-
res.status(400).send({
|
83
|
-
message: `Failed! Role ${req.body.roles[i]} does not exist!`
|
84
|
-
});
|
85
|
-
return;
|
86
|
-
}
|
87
|
-
}
|
88
|
-
}
|
89
|
-
next();
|
90
|
-
};
|
91
|
-
return {
|
92
|
-
checkDuplicateUsernameOrEmail,
|
93
|
-
checkRolesExisted
|
94
|
-
};
|
95
|
-
};
|
96
|
-
var verifySignUp = middlewareFactory$3;
|
97
|
-
const middlewareFactory$2 = (db) => {
|
98
|
-
const User = db.user;
|
99
|
-
db.role;
|
100
|
-
const checkUserExist = async (req, res, next) => {
|
101
|
-
const { type, email, phone } = req.body;
|
102
|
-
let query;
|
103
|
-
if (type === "phone" && phone) {
|
104
|
-
query = { phone };
|
105
|
-
}
|
106
|
-
if (type === "email" && email) {
|
107
|
-
query = { email };
|
108
|
-
}
|
109
|
-
try {
|
110
|
-
const user = await User.findOne(query).exec();
|
111
|
-
if (!user) {
|
112
|
-
console.log(query);
|
113
|
-
res.status(400).send({ errorCode: "USER_NOT_REGISTERED_YET" });
|
114
|
-
return;
|
115
|
-
}
|
116
|
-
next();
|
117
|
-
} catch (err) {
|
118
|
-
res.status(500).send({ message: err.message });
|
119
|
-
}
|
120
|
-
};
|
121
|
-
return {
|
122
|
-
checkUserExist
|
123
|
-
};
|
124
|
-
};
|
125
|
-
var verifyUser = middlewareFactory$2;
|
126
|
-
const { ObjectId } = require$$0$1;
|
127
|
-
const middlewareFactory$1 = (db) => {
|
128
|
-
const User = db.user;
|
129
|
-
const Invite = db.invite;
|
130
|
-
const Membership = db.membership;
|
131
|
-
const checkInviteExist = async (req, res, next) => {
|
132
|
-
for (let invite of req.body) {
|
133
|
-
let query;
|
134
|
-
if (invite.contact.includes("@")) {
|
135
|
-
query = { invitedEmail: invite.contact };
|
136
|
-
} else {
|
137
|
-
query = { invitedPhone: invite.contact };
|
138
|
-
}
|
139
|
-
query.organization = req.params._id;
|
140
|
-
const userInvite = await Invite.findOne(query).exec();
|
141
|
-
if (userInvite) {
|
142
|
-
console.log(userInvite);
|
143
|
-
res.status(400).send({ message: "Инвайт c таким email или телефоном уже создан!" });
|
144
|
-
return;
|
145
|
-
}
|
146
|
-
}
|
147
|
-
next();
|
148
|
-
};
|
149
|
-
const checkUsersExist = async (req, res, next) => {
|
150
|
-
for (let invite of req.body) {
|
151
|
-
let query;
|
152
|
-
if (invite.contact.includes("@")) {
|
153
|
-
query = { email: invite.contact };
|
154
|
-
} else {
|
155
|
-
query = { phone: invite.contact };
|
156
|
-
}
|
157
|
-
const user = await User.findOne(query).exec();
|
158
|
-
console.log(req.params);
|
159
|
-
if (user) {
|
160
|
-
const membership = await Membership.findOne({ user: new ObjectId(user._id), organization: req.params._id }).exec();
|
161
|
-
if (membership) {
|
162
|
-
console.log(membership);
|
163
|
-
res.status(400).send({ message: "Пользователь с таким email или телефоном уже добавлен в организацию!" });
|
164
|
-
return;
|
165
|
-
}
|
166
|
-
}
|
167
|
-
}
|
168
|
-
next();
|
169
|
-
};
|
170
|
-
return {
|
171
|
-
checkInviteExist,
|
172
|
-
checkUsersExist
|
173
|
-
};
|
174
|
-
};
|
175
|
-
var verifyInvites = middlewareFactory$1;
|
176
|
-
const middlewareFactory = (db) => {
|
177
|
-
const Category = db.category;
|
178
|
-
const checkCategoryExistOrNot = async (req, res, next) => {
|
179
|
-
try {
|
180
|
-
const category = await Category.findOne({ url: req.body.url });
|
181
|
-
if (category) {
|
182
|
-
res.status(400).send({ message: "Failed! Category with this URL is already in use!" });
|
183
|
-
return;
|
184
|
-
}
|
185
|
-
next();
|
186
|
-
} catch (err) {
|
187
|
-
res.status(500).send({ message: err });
|
188
|
-
}
|
189
|
-
};
|
190
|
-
return {
|
191
|
-
checkCategoryExistOrNot
|
192
|
-
};
|
193
|
-
};
|
194
|
-
var verifyCategory = middlewareFactory;
|
195
|
-
const middlewareIndexFactory = (db) => {
|
196
|
-
const authJwt$1 = authJwt(db);
|
197
|
-
const verifySignUp$1 = verifySignUp(db);
|
198
|
-
const verifyUser$1 = verifyUser(db);
|
199
|
-
const verifyInvites$1 = verifyInvites(db);
|
200
|
-
const verifyCategory$1 = verifyCategory(db);
|
201
|
-
return {
|
202
|
-
authJwt: authJwt$1,
|
203
|
-
verifySignUp: verifySignUp$1,
|
204
|
-
verifyUser: verifyUser$1,
|
205
|
-
verifyInvites: verifyInvites$1,
|
206
|
-
verifyCategory: verifyCategory$1
|
207
|
-
};
|
208
|
-
};
|
209
|
-
var server = middlewareIndexFactory;
|
210
|
-
export {
|
211
|
-
verifyInvites as a,
|
212
|
-
authJwt as b,
|
213
|
-
verifySignUp as c,
|
214
|
-
verifyCategory as d,
|
215
|
-
server as s,
|
216
|
-
verifyUser as v
|
217
|
-
};
|