@ozdao/prometheus-framework 0.2.222 → 0.2.224
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +4 -4
- package/dist/auth.server.mjs +4 -4
- package/dist/builder.js +53 -53
- package/dist/builder.mjs +53 -53
- package/dist/community.server.js +8 -3
- package/dist/community.server.mjs +8 -3
- package/dist/events.server.js +14 -24
- package/dist/events.server.mjs +14 -24
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/gallery.server.js +42 -76
- package/dist/gallery.server.mjs +41 -75
- package/dist/index-CsS7qx1d.js +243 -0
- package/dist/index-UIHE6Rk3.mjs +244 -0
- package/dist/node_modules/@capacitor/core/dist/index.cjs +529 -0
- package/dist/node_modules/@capacitor/core/dist/index.cjs.map +1 -0
- package/dist/node_modules/@capacitor/core/dist/index.js +530 -0
- package/dist/node_modules/@capacitor/core/dist/index.js.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.cjs +51 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.cjs.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js +55 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/definitions.js.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.cjs +25 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.cjs.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js +13 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/index.js.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.cjs +67 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.cjs.map +1 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js +67 -0
- package/dist/node_modules/@capacitor-mlkit/barcode-scanning/dist/esm/web.js.map +1 -0
- package/dist/node_modules/@unhead/shared/dist/index.cjs +7 -0
- package/dist/node_modules/@unhead/shared/dist/index.cjs.map +1 -0
- package/dist/node_modules/@unhead/shared/dist/index.js +7 -0
- package/dist/node_modules/@unhead/shared/dist/index.js.map +1 -0
- package/dist/node_modules/@unhead/ssr/dist/index.cjs +87 -0
- package/dist/node_modules/@unhead/ssr/dist/index.cjs.map +1 -0
- package/dist/node_modules/@unhead/ssr/dist/index.js +87 -0
- package/dist/node_modules/@unhead/ssr/dist/index.js.map +1 -0
- package/dist/orders.server.js +2 -2
- package/dist/orders.server.mjs +2 -2
- package/dist/organizations.server.js +149 -107
- package/dist/organizations.server.mjs +149 -107
- package/dist/pages.server.js +1 -1
- package/dist/pages.server.mjs +1 -1
- package/dist/products.server.js +119 -266
- package/dist/products.server.mjs +119 -266
- package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs +814 -0
- package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.cjs.map +1 -0
- package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js +814 -0
- package/dist/prometheus-framework/node_modules/@vue/server-renderer/dist/server-renderer.esm-bundler.js.map +1 -0
- package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.cjs +210 -0
- package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.cjs.map +1 -0
- package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.js +210 -0
- package/dist/prometheus-framework/node_modules/@vue/shared/dist/shared.esm-bundler.js.map +1 -0
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -2
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +1 -2
- package/dist/prometheus-framework/src/components/Button/Button.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +0 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +0 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js.map +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +25 -40
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +26 -41
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +6 -8
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +6 -8
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue2.js +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +1 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +2 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +2 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +4 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +4 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs +5 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js +5 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs +11 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js +11 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs +37 -35
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.js +33 -31
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs +3 -5
- package/dist/prometheus-framework/src/modules/auth/views/store/twofa.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js +2 -4
- package/dist/prometheus-framework/src/modules/auth/views/store/twofa.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.cjs +8 -5
- package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.js +8 -5
- package/dist/prometheus-framework/src/modules/auth/views/validations/inputs.validation.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +6 -3
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +6 -3
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +50 -35
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +55 -40
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +16 -15
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js +16 -15
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +46 -49
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js +46 -49
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +13 -20
- package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/store/blogposts.js +9 -16
- package/dist/prometheus-framework/src/modules/community/store/blogposts.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/store/reactions.cjs +5 -9
- package/dist/prometheus-framework/src/modules/community/store/reactions.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/store/reactions.js +1 -5
- package/dist/prometheus-framework/src/modules/community/store/reactions.js.map +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs +30 -55
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +31 -56
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js.map +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 +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +164 -135
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +165 -136
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +124 -135
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +133 -144
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.cjs +96 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.js +96 -0
- package/dist/prometheus-framework/src/modules/events/components/pages/EventsBackoffice.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs +39 -25
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js +40 -26
- package/dist/prometheus-framework/src/modules/events/components/sections/HeroEvent.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/List.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs +4 -3
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js +4 -3
- package/dist/prometheus-framework/src/modules/events/components/sections/SectionPreviousEvents.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.cjs +16 -5
- package/dist/prometheus-framework/src/modules/events/router/events.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/router/events.js +16 -5
- package/dist/prometheus-framework/src/modules/events/router/events.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/store/events.cjs +5 -6
- package/dist/prometheus-framework/src/modules/events/store/events.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/events/store/events.js +1 -2
- package/dist/prometheus-framework/src/modules/events/store/events.js.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +20 -11
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +20 -11
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.cjs +5 -2
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.js +5 -2
- package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +2 -0
- package/dist/prometheus-framework/src/modules/globals/globals.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/globals.client.js +2 -0
- package/dist/prometheus-framework/src/modules/globals/globals.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.cjs +4 -3
- package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.js +4 -3
- package/dist/prometheus-framework/src/modules/globals/views/classes/globals.store.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockSearch.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.cjs +64 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.js +64 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/Card.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/App.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -19
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +1 -19
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/sections/SectionPageTitle.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs +3 -2
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.js +3 -2
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.cjs +17 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.js +17 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/axios-instance.js.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.cjs +57 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.js +57 -0
- package/dist/prometheus-framework/src/modules/globals/views/utils/vue-app-renderer.js.map +1 -0
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
- 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/OrderCreateBackoffice.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -3
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs +6 -7
- package/dist/prometheus-framework/src/modules/orders/store/orders.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/store/orders.js +1 -2
- package/dist/prometheus-framework/src/modules/orders/store/orders.js.map +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 +60 -23
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +60 -23
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +2 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +3 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
- 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/Documents.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs +2 -0
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js +2 -0
- package/dist/prometheus-framework/src/modules/organizations/router/organizations.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs +11 -9
- package/dist/prometheus-framework/src/modules/organizations/store/departments.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js +6 -4
- package/dist/prometheus-framework/src/modules/organizations/store/departments.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs +5 -11
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.js +1 -7
- package/dist/prometheus-framework/src/modules/organizations/store/organizations.js.map +1 -1
- package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +637 -631
- package/dist/prometheus-framework/src/modules/pages/pages.client.js +637 -631
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
- 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/pages/views/router/pages.backoffice.router.cjs +5 -10
- package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.js +5 -10
- package/dist/prometheus-framework/src/modules/pages/views/router/pages.backoffice.router.js.map +1 -1
- 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/CardProduct.vue.cjs +12 -7
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js +12 -7
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/Images360.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +2 -2
- 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/Leftovers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.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.cjs.map +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/Product.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +3 -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 +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditModifications.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
- 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 +1 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/products/store/categories.cjs +7 -8
- package/dist/prometheus-framework/src/modules/products/store/categories.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/categories.js +1 -2
- package/dist/prometheus-framework/src/modules/products/store/categories.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs +6 -7
- package/dist/prometheus-framework/src/modules/products/store/leftovers.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/leftovers.js +1 -2
- package/dist/prometheus-framework/src/modules/products/store/leftovers.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +10 -21
- package/dist/prometheus-framework/src/modules/products/store/products.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.js +1 -12
- package/dist/prometheus-framework/src/modules/products/store/products.js.map +1 -1
- 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.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.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 +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/spots/store/spots.cjs +6 -9
- package/dist/prometheus-framework/src/modules/spots/store/spots.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/store/spots.js +1 -4
- package/dist/prometheus-framework/src/modules/spots/store/spots.js.map +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js.map +1 -1
- 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 +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/users/router/users.cjs +2 -2
- package/dist/prometheus-framework/src/modules/users/router/users.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/users/router/users.js +2 -2
- package/dist/prometheus-framework/src/modules/users/router/users.js.map +1 -1
- package/dist/prometheus-framework/src/modules/users/store/users.cjs +5 -6
- package/dist/prometheus-framework/src/modules/users/store/users.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/users/store/users.js +1 -2
- package/dist/prometheus-framework/src/modules/users/store/users.js.map +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CardDeposit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
- 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.cjs.js +17 -17
- package/dist/prometheus-framework.es.js +1790 -1790
- package/dist/queryProcessor-CU4A6Y4N.mjs +197 -0
- package/dist/queryProcessor-CcsJEUBr.js +196 -0
- package/dist/spots.server.js +1 -1
- package/dist/spots.server.mjs +1 -1
- package/dist/verifyAccesses-BsrJOct8.mjs +90 -0
- package/dist/verifyAccesses-BvLnOtBN.js +89 -0
- package/dist/wallet.server.js +2 -2
- package/dist/wallet.server.mjs +2 -2
- package/package.json +1 -1
- package/src/builder/modes/ssr.dev.js +2 -2
- package/src/builder/modes/ssr.prod.js +4 -4
- package/src/builder/ssr/ssr-render-html.js +10 -14
- package/src/builder/templates/page.html +37 -0
- package/src/builder/templates/page.js +4 -0
- package/src/builder/webpack/webpack.config.client.js +2 -2
- package/src/builder/webpack/webpack.config.ssr.js +1 -1
- package/src/components/Button/Button.vue +0 -1
- package/src/components/Feed/Feed.vue +34 -55
- package/src/components/FieldTags/BlockTags.vue +0 -1
- package/src/components/UploadImage/UploadImage.vue +2 -1
- package/src/modules/auth/controllers/middlewares/authJwt.js +1 -1
- package/src/modules/auth/controllers/middlewares/verifySignUp.js +11 -11
- package/src/modules/auth/controllers/routes/auth.routes.js +2 -2
- package/src/modules/auth/controllers/services/auth.service.js +1 -0
- package/src/modules/auth/views/components/pages/SignIn.vue +1 -0
- package/src/modules/auth/views/middlewares/auth.validation.js +17 -1
- package/src/modules/auth/views/middlewares/ownership.validation.js +16 -1
- package/src/modules/auth/views/store/auth.js +43 -39
- package/src/modules/auth/views/store/twofa.js +2 -5
- package/src/modules/auth/views/validations/inputs.validation.js +12 -6
- package/src/modules/community/components/layouts/Community.vue +3 -3
- package/src/modules/community/components/pages/BlogPost.vue +122 -120
- package/src/modules/community/components/pages/CreateBlogPost.vue +1 -1
- package/src/modules/community/components/sections/Comments.vue +5 -5
- package/src/modules/community/controllers/blog.controller.js +1 -1
- package/src/modules/community/router/blogposts.js +37 -38
- package/src/modules/community/routes/blog.routes.js +4 -0
- package/src/modules/community/store/blogposts.js +11 -19
- package/src/modules/community/store/reactions.js +1 -7
- package/src/modules/events/components/elements/ButtonCheck.vue +36 -66
- package/src/modules/events/components/pages/EditEvent.vue +76 -59
- package/src/modules/events/components/pages/Event.vue +2 -15
- package/src/modules/events/components/pages/Events.vue +2 -1
- package/src/modules/events/components/pages/EventsBackoffice.vue +122 -0
- package/src/modules/events/components/sections/HeroEvent.vue +15 -17
- package/src/modules/events/components/sections/SectionPreviousEvents.vue +4 -13
- package/src/modules/events/router/events.js +11 -4
- package/src/modules/events/store/events.js +2 -4
- package/src/modules/gallery/components/sections/BackofficeGallery.vue +24 -13
- package/src/modules/gallery/controllers/gallery.controller.js +30 -31
- package/src/modules/gallery/router/gallery.backoffice.router.js +5 -1
- package/src/modules/gallery/routes/gallery.routes.js +22 -4
- package/src/modules/globals/controllers/utils/queryProcessor.js +24 -4
- package/src/modules/globals/globals.client.js +2 -0
- package/src/modules/globals/views/classes/globals.store.js +4 -3
- package/src/modules/globals/views/components/blocks/Card.vue +56 -0
- package/src/modules/globals/views/components/blocks/CardHeader.vue +1 -3
- package/src/modules/globals/views/components/layouts/App.vue +1 -0
- package/src/modules/globals/views/components/layouts/Client.vue +0 -30
- package/src/modules/globals/views/store/globals.js +4 -2
- package/src/modules/globals/views/utils/axios-instance.js +18 -0
- package/src/modules/globals/views/utils/vue-app-renderer.js +87 -0
- package/src/modules/integrations/stripe/controllers/services/stripe.service.js +15 -30
- package/src/modules/landing/components/pages/Governance.vue +4 -2
- package/src/modules/landing/components/sections/SectionHeroToken.vue +12 -10
- package/src/modules/landing/components/sections/SectionsSection.vue +5 -8
- package/src/modules/landing/router/landing.js +2 -1
- package/src/modules/orders/store/orders.js +1 -3
- package/src/modules/organizations/components/pages/DepartmentEdit.vue +36 -0
- package/src/modules/organizations/components/pages/OrganizationBackoffice.vue +3 -1
- package/src/modules/organizations/controllers/organizations.controller.js +2 -1
- package/src/modules/organizations/middlewares/verifyAccesses.js +117 -0
- package/src/modules/organizations/models/department.model.js +3 -100
- package/src/modules/organizations/models/organization.model.js +6 -4
- package/src/modules/organizations/models/schemas/accesses.schema.js +142 -0
- package/src/modules/organizations/router/organizations.js +2 -0
- package/src/modules/organizations/store/departments.js +6 -6
- package/src/modules/organizations/store/organizations.js +2 -16
- package/src/modules/pages/views/router/pages.backoffice.router.js +5 -7
- package/src/modules/products/components/blocks/CardProduct.vue +2 -0
- package/src/modules/products/components/pages/Product.vue +1 -1
- package/src/modules/products/components/sections/MenuSection.vue +2 -2
- package/src/modules/products/controllers/products.controller.js +201 -367
- package/src/modules/products/routes/products.routes.js +0 -5
- package/src/modules/products/store/categories.js +1 -2
- package/src/modules/products/store/leftovers.js +1 -2
- package/src/modules/products/store/products.js +1 -13
- package/src/modules/reports/components/sections/FormReport.vue +20 -20
- package/src/modules/spots/store/spots.js +1 -6
- package/src/modules/users/components/pages/Profile.vue +1 -1
- package/src/modules/users/router/users.js +2 -2
- package/src/modules/users/store/users.js +1 -3
- package/src/modules/auth/controllers/middlewares/verifyAccesses.js +0 -114
- package/src/modules/users/components/pages/ProfileEvents.vue +0 -69
package/dist/products.server.mjs
CHANGED
@@ -4,7 +4,7 @@ import "uuid";
|
|
4
4
|
import require$$0 from "mongoose";
|
5
5
|
import "path";
|
6
6
|
import require$$3 from "openai";
|
7
|
-
import { q as queryProcessor } from "./queryProcessor-
|
7
|
+
import { q as queryProcessor } from "./queryProcessor-CU4A6Y4N.mjs";
|
8
8
|
var product_model = (mongoose) => {
|
9
9
|
const ProductSchema = new mongoose.Schema({
|
10
10
|
status: { type: String },
|
@@ -237,20 +237,19 @@ const controllerFactory$5 = (db) => {
|
|
237
237
|
};
|
238
238
|
const Read = async (req, res) => {
|
239
239
|
try {
|
240
|
-
|
241
|
-
let options = {};
|
240
|
+
const query = {};
|
242
241
|
if (req.query.organization) {
|
243
242
|
query.organization = new ObjectId(req.query.organization);
|
244
243
|
}
|
245
244
|
if (req.query._id) {
|
246
|
-
query._id = req.query._id;
|
245
|
+
query._id = new ObjectId(req.query._id);
|
247
246
|
}
|
248
247
|
if (req.query.status) {
|
249
248
|
query.status = req.query.status;
|
250
249
|
}
|
251
250
|
const categories = req.query.categories?.split(",") || [];
|
252
251
|
if (categories.length) {
|
253
|
-
query.category = { $in: categories };
|
252
|
+
query.category = { $in: categories.map((cat) => new ObjectId(cat)) };
|
254
253
|
}
|
255
254
|
const deliveryOptions = req.query.delivery?.split(",") || [];
|
256
255
|
if (deliveryOptions.length) {
|
@@ -268,7 +267,6 @@ const controllerFactory$5 = (db) => {
|
|
268
267
|
query.name = { $regex: regexPattern, $options: "i" };
|
269
268
|
}
|
270
269
|
const prices = req.query.prices?.split(",") || [];
|
271
|
-
console.log(prices);
|
272
270
|
if (prices.length) {
|
273
271
|
const priceConditions = prices.map((priceRange) => {
|
274
272
|
if (priceRange.startsWith("<")) {
|
@@ -280,29 +278,125 @@ const controllerFactory$5 = (db) => {
|
|
280
278
|
const [min, max] = priceRange.split("-").map(Number);
|
281
279
|
return { price: { $gte: min, $lte: max } };
|
282
280
|
});
|
283
|
-
console.log(priceConditions);
|
284
281
|
if (priceConditions.length) {
|
285
|
-
query =
|
286
|
-
...query,
|
287
|
-
...{ $or: priceConditions }
|
288
|
-
};
|
282
|
+
query.$or = priceConditions;
|
289
283
|
}
|
290
284
|
}
|
291
|
-
options
|
292
|
-
|
293
|
-
|
285
|
+
const options = {
|
286
|
+
skip: parseInt(req.query.skip) || 0,
|
287
|
+
limit: parseInt(req.query.limit) || 10,
|
288
|
+
sort: { createdAt: -1 }
|
289
|
+
};
|
290
|
+
const aggregationPipeline = [
|
291
|
+
{ $match: query },
|
292
|
+
{ $sort: options.sort },
|
293
|
+
{ $skip: options.skip },
|
294
|
+
{ $limit: options.limit },
|
295
|
+
{
|
296
|
+
$lookup: {
|
297
|
+
from: "leftovers",
|
298
|
+
let: { productId: "$_id", ingredientsIds: "$ingredients._id" },
|
299
|
+
pipeline: [
|
300
|
+
{ $unwind: "$positions" },
|
301
|
+
{
|
302
|
+
$match: {
|
303
|
+
$expr: {
|
304
|
+
$or: [
|
305
|
+
{ $eq: ["$positions._id", "$$productId"] },
|
306
|
+
{ $in: ["$positions._id", { $ifNull: ["$$ingredientsIds", []] }] }
|
307
|
+
]
|
308
|
+
}
|
309
|
+
}
|
310
|
+
},
|
311
|
+
{
|
312
|
+
"$addFields": {
|
313
|
+
"positions.quantity": {
|
314
|
+
$cond: {
|
315
|
+
if: { $eq: ["$type", "stock-in"] },
|
316
|
+
then: "$positions.quantity",
|
317
|
+
else: { $multiply: ["$positions.quantity", -1] }
|
318
|
+
}
|
319
|
+
}
|
320
|
+
}
|
321
|
+
},
|
322
|
+
{
|
323
|
+
"$project": {
|
324
|
+
_id: "$positions._id",
|
325
|
+
quantity: "$positions.quantity",
|
326
|
+
name: "$positions.name"
|
327
|
+
}
|
328
|
+
}
|
329
|
+
],
|
330
|
+
as: "leftovers"
|
331
|
+
}
|
332
|
+
},
|
333
|
+
{
|
334
|
+
$addFields: {
|
335
|
+
ingredientsQuantities: {
|
336
|
+
$cond: {
|
337
|
+
if: { $isArray: "$ingredients" },
|
338
|
+
then: {
|
339
|
+
$map: {
|
340
|
+
input: "$ingredients",
|
341
|
+
as: "ingredient",
|
342
|
+
in: {
|
343
|
+
$let: {
|
344
|
+
vars: {
|
345
|
+
ingredientId: "$$ingredient._id",
|
346
|
+
ingredientQuantity: { $ifNull: ["$$ingredient.quantity", 0] }
|
347
|
+
},
|
348
|
+
in: {
|
349
|
+
$divide: [
|
350
|
+
{
|
351
|
+
$sum: {
|
352
|
+
$map: {
|
353
|
+
input: "$leftovers",
|
354
|
+
as: "leftover",
|
355
|
+
in: {
|
356
|
+
$cond: {
|
357
|
+
if: { $eq: ["$$leftover._id", "$$ingredientId"] },
|
358
|
+
then: "$$leftover.quantity",
|
359
|
+
else: 0
|
360
|
+
}
|
361
|
+
}
|
362
|
+
}
|
363
|
+
}
|
364
|
+
},
|
365
|
+
{
|
366
|
+
$cond: {
|
367
|
+
if: { $eq: ["$$ingredientQuantity", 0] },
|
368
|
+
then: 1,
|
369
|
+
else: "$$ingredientQuantity"
|
370
|
+
}
|
371
|
+
}
|
372
|
+
]
|
373
|
+
}
|
374
|
+
}
|
375
|
+
}
|
376
|
+
}
|
377
|
+
},
|
378
|
+
else: []
|
379
|
+
}
|
380
|
+
}
|
381
|
+
}
|
382
|
+
},
|
383
|
+
{
|
384
|
+
$set: {
|
385
|
+
quantity: {
|
386
|
+
$cond: {
|
387
|
+
if: { $gt: [{ $size: { $ifNull: ["$ingredients", []] } }, 0] },
|
388
|
+
then: { $floor: { $min: "$ingredientsQuantities" } },
|
389
|
+
else: { $sum: "$leftovers.quantity" }
|
390
|
+
}
|
391
|
+
}
|
392
|
+
}
|
393
|
+
},
|
394
|
+
{ $unset: ["leftovers", "ingredientsQuantities"] }
|
395
|
+
];
|
396
|
+
const products = await Product.aggregate(aggregationPipeline);
|
294
397
|
if (req.query.count) {
|
295
|
-
|
296
|
-
|
297
|
-
return res.status(200).json({ count });
|
298
|
-
} catch (err) {
|
299
|
-
return res.status(500).json({ message: err.message });
|
300
|
-
}
|
301
|
-
}
|
302
|
-
console.log(query);
|
303
|
-
const products = await Product.find(query, null, options).populate("ingredients._id");
|
304
|
-
if (!products.length) {
|
305
|
-
return res.status(200).json([]);
|
398
|
+
const count = products.length;
|
399
|
+
return res.status(200).json({ count });
|
306
400
|
}
|
307
401
|
res.status(200).json(products);
|
308
402
|
} catch (err) {
|
@@ -351,114 +445,6 @@ const controllerFactory$5 = (db) => {
|
|
351
445
|
res.status(500).send({ message: err.message });
|
352
446
|
}
|
353
447
|
};
|
354
|
-
const getProducts = (req, res) => {
|
355
|
-
Product.aggregate([
|
356
|
-
{
|
357
|
-
$facet: {
|
358
|
-
"withIngredients": [
|
359
|
-
{
|
360
|
-
$match: {
|
361
|
-
ingredients: { $exists: true, $not: { $size: 0 } }
|
362
|
-
// Продукты с ингредиентами
|
363
|
-
}
|
364
|
-
},
|
365
|
-
{
|
366
|
-
$lookup: {
|
367
|
-
from: "products",
|
368
|
-
localField: "ingredients",
|
369
|
-
foreignField: "_id",
|
370
|
-
as: "ingredientDetails"
|
371
|
-
}
|
372
|
-
},
|
373
|
-
// { $unwind: "$ingredientDetails" },
|
374
|
-
{
|
375
|
-
$lookup: {
|
376
|
-
from: "leftovers",
|
377
|
-
let: { "ingredientId": "$ingredientDetails._id" },
|
378
|
-
pipeline: [
|
379
|
-
{ $unwind: "$positions" },
|
380
|
-
{
|
381
|
-
$match: {
|
382
|
-
$expr: {
|
383
|
-
$eq: ["$positions._id", "$$ingredientId"]
|
384
|
-
}
|
385
|
-
}
|
386
|
-
},
|
387
|
-
{
|
388
|
-
$project: {
|
389
|
-
quantity: "$positions.quantity"
|
390
|
-
}
|
391
|
-
}
|
392
|
-
],
|
393
|
-
as: "ingredientLeftovers"
|
394
|
-
}
|
395
|
-
},
|
396
|
-
{
|
397
|
-
$group: {
|
398
|
-
_id: "$_id",
|
399
|
-
name: { $first: "$name" },
|
400
|
-
minQuantity: { $min: "$ingredientLeftovers.quantity" }
|
401
|
-
}
|
402
|
-
}
|
403
|
-
],
|
404
|
-
"withoutIngredients": [
|
405
|
-
{
|
406
|
-
$match: {
|
407
|
-
$or: [
|
408
|
-
{ ingredients: { $exists: false } },
|
409
|
-
// Продукты без ингредиентов
|
410
|
-
{ ingredients: { $size: 0 } }
|
411
|
-
]
|
412
|
-
}
|
413
|
-
},
|
414
|
-
{
|
415
|
-
$lookup: {
|
416
|
-
from: "leftovers",
|
417
|
-
let: { "productId": "$_id" },
|
418
|
-
pipeline: [
|
419
|
-
{ $unwind: "$positions" },
|
420
|
-
{
|
421
|
-
$match: {
|
422
|
-
$expr: {
|
423
|
-
$eq: ["$positions._id", "$$productId"]
|
424
|
-
}
|
425
|
-
}
|
426
|
-
},
|
427
|
-
{
|
428
|
-
$project: {
|
429
|
-
quantity: "$positions.quantity"
|
430
|
-
}
|
431
|
-
}
|
432
|
-
],
|
433
|
-
as: "productLeftovers"
|
434
|
-
}
|
435
|
-
},
|
436
|
-
{
|
437
|
-
$set: {
|
438
|
-
minQuantity: { $sum: "$productLeftovers.quantity" }
|
439
|
-
}
|
440
|
-
}
|
441
|
-
]
|
442
|
-
}
|
443
|
-
},
|
444
|
-
{
|
445
|
-
$project: {
|
446
|
-
products: { $setUnion: ["$withIngredients", "$withoutIngredients"] }
|
447
|
-
}
|
448
|
-
},
|
449
|
-
{ $unwind: "$products" },
|
450
|
-
{ $replaceRoot: { newRoot: "$products" } }
|
451
|
-
]).exec((err, products) => {
|
452
|
-
if (err) {
|
453
|
-
return res.status(500).send({ message: err });
|
454
|
-
}
|
455
|
-
if (!products) {
|
456
|
-
return res.status(404).send({ message: "Products not found." });
|
457
|
-
}
|
458
|
-
res.status(200).send(products);
|
459
|
-
console.log(products);
|
460
|
-
});
|
461
|
-
};
|
462
448
|
const getProductRecommendation = async (req, res) => {
|
463
449
|
const { mood } = req.body;
|
464
450
|
try {
|
@@ -532,141 +518,12 @@ const controllerFactory$5 = (db) => {
|
|
532
518
|
res.status(200).send(products);
|
533
519
|
});
|
534
520
|
};
|
535
|
-
const getProduct = async (req, res) => {
|
536
|
-
try {
|
537
|
-
const product = await Product.aggregate([
|
538
|
-
{
|
539
|
-
$match: { "_id": new ObjectId(req.params._id) }
|
540
|
-
},
|
541
|
-
{
|
542
|
-
$lookup: {
|
543
|
-
from: "leftovers",
|
544
|
-
let: { productId: "$_id", ingredientsIds: "$ingredients._id" },
|
545
|
-
pipeline: [
|
546
|
-
{
|
547
|
-
$unwind: "$positions"
|
548
|
-
},
|
549
|
-
{
|
550
|
-
$match: {
|
551
|
-
$expr: {
|
552
|
-
$or: [
|
553
|
-
{ $eq: ["$positions._id", "$$productId"] },
|
554
|
-
{ $in: ["$positions._id", { $ifNull: ["$$ingredientsIds", []] }] }
|
555
|
-
// Исправлено
|
556
|
-
]
|
557
|
-
}
|
558
|
-
}
|
559
|
-
},
|
560
|
-
{
|
561
|
-
"$addFields": {
|
562
|
-
"positions.quantity": {
|
563
|
-
$cond: {
|
564
|
-
if: { $eq: ["$type", "stock-in"] },
|
565
|
-
then: "$positions.quantity",
|
566
|
-
else: { $multiply: ["$positions.quantity", -1] }
|
567
|
-
}
|
568
|
-
}
|
569
|
-
}
|
570
|
-
},
|
571
|
-
{
|
572
|
-
"$project": {
|
573
|
-
_id: "$positions._id",
|
574
|
-
quantity: "$positions.quantity",
|
575
|
-
name: "$positions.name"
|
576
|
-
}
|
577
|
-
}
|
578
|
-
],
|
579
|
-
as: "leftovers"
|
580
|
-
}
|
581
|
-
},
|
582
|
-
{
|
583
|
-
$addFields: {
|
584
|
-
ingredientsQuantities: {
|
585
|
-
$cond: {
|
586
|
-
if: { $isArray: "$ingredients" },
|
587
|
-
then: {
|
588
|
-
$map: {
|
589
|
-
input: "$ingredients",
|
590
|
-
as: "ingredient",
|
591
|
-
in: {
|
592
|
-
$let: {
|
593
|
-
vars: {
|
594
|
-
ingredientId: "$$ingredient._id",
|
595
|
-
ingredientQuantity: { $ifNull: ["$$ingredient.quantity", 0] }
|
596
|
-
},
|
597
|
-
in: {
|
598
|
-
$divide: [
|
599
|
-
{
|
600
|
-
$sum: {
|
601
|
-
$map: {
|
602
|
-
input: "$leftovers",
|
603
|
-
as: "leftover",
|
604
|
-
in: {
|
605
|
-
$cond: {
|
606
|
-
if: { $eq: ["$$leftover._id", "$$ingredientId"] },
|
607
|
-
then: "$$leftover.quantity",
|
608
|
-
else: 0
|
609
|
-
}
|
610
|
-
}
|
611
|
-
}
|
612
|
-
}
|
613
|
-
},
|
614
|
-
{
|
615
|
-
$cond: {
|
616
|
-
if: { $eq: ["$$ingredientQuantity", 0] },
|
617
|
-
then: 1,
|
618
|
-
else: "$$ingredientQuantity"
|
619
|
-
}
|
620
|
-
}
|
621
|
-
]
|
622
|
-
}
|
623
|
-
}
|
624
|
-
}
|
625
|
-
}
|
626
|
-
},
|
627
|
-
else: []
|
628
|
-
}
|
629
|
-
}
|
630
|
-
}
|
631
|
-
},
|
632
|
-
{
|
633
|
-
$set: {
|
634
|
-
quantity: {
|
635
|
-
$cond: {
|
636
|
-
if: { $gt: [{ $size: { $ifNull: ["$ingredients", []] } }, 0] },
|
637
|
-
// Снова проверяем, не пустой ли массив ингредиентов
|
638
|
-
then: { $floor: { $min: "$ingredientsQuantities" } },
|
639
|
-
else: { $sum: "$leftovers.quantity" }
|
640
|
-
// Просто суммируем quantity из leftovers, если ингредиентов нет
|
641
|
-
}
|
642
|
-
}
|
643
|
-
}
|
644
|
-
},
|
645
|
-
{ $unset: ["leftovers", "ingredientsQuantities"] }
|
646
|
-
]);
|
647
|
-
console.log(product);
|
648
|
-
if (!product || product.length < 1) {
|
649
|
-
return res.status(404).send({ message: "Product not found." });
|
650
|
-
}
|
651
|
-
const updatedProduct = await Product.findOneAndUpdate(
|
652
|
-
{ _id: req.params._id },
|
653
|
-
{ $inc: { popularity: 1 } },
|
654
|
-
{ new: true }
|
655
|
-
);
|
656
|
-
res.status(200).send(product);
|
657
|
-
} catch (err) {
|
658
|
-
console.error("Error:", err);
|
659
|
-
res.status(500).send({ message: err });
|
660
|
-
}
|
661
|
-
};
|
662
521
|
return {
|
663
522
|
Create,
|
664
523
|
Read,
|
665
524
|
Update,
|
666
525
|
Delete,
|
667
|
-
getProducts,
|
668
526
|
getProductsPopular,
|
669
|
-
getProduct,
|
670
527
|
getProductRecommendation
|
671
528
|
};
|
672
529
|
};
|
@@ -694,10 +551,6 @@ var products_routes = function(app, db, allowedOrigins) {
|
|
694
551
|
"/api/product/recommended",
|
695
552
|
controller.getProductRecommendation
|
696
553
|
);
|
697
|
-
app.get(
|
698
|
-
"/api/products/:_id",
|
699
|
-
controller.getProduct
|
700
|
-
);
|
701
554
|
};
|
702
555
|
const products_routes$1 = /* @__PURE__ */ getDefaultExportFromCjs(products_routes);
|
703
556
|
const controllerFactory$3 = (db) => {
|