@ozdao/prometheus-framework 0.2.221 → 0.2.223
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 +72 -60
- package/dist/builder.mjs +72 -60
- package/dist/community.server.js +9 -4
- package/dist/community.server.mjs +9 -4
- 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/main.css +1 -1
- 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 +174 -95
- package/dist/organizations.server.mjs +174 -95
- 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/Feed/Feed.vue.cjs +26 -41
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +27 -42
- 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/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 +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/layouts/Auth.vue.js +2 -2
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -1
- 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 +2 -1
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +1 -1
- 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 +44 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js +44 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/ownership.validation.js.map +1 -0
- 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/blocks/CardBlogpost.vue.cjs +4 -2
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +4 -2
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +13 -9
- 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 +14 -10
- 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 +53 -40
- 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 +58 -45
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +2 -2
- 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.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- 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 +4 -4
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +47 -43
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js +47 -43
- 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/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 +29 -54
- 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 +30 -55
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +163 -134
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +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/BlockFilter.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.js +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/LocationSelection.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/LocationSelection.vue.js +2 -2
- 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/landing/components/sections/SectionGuide.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/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 +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +3 -3
- 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/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardOrganization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.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/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 +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTabSection.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
- 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 +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 +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- 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 +807 -801
- package/dist/prometheus-framework/src/modules/pages/pages.client.js +807 -801
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/blocks/CardPage.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.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/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 +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 +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 +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 +2 -2
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +2 -2
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.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.map +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/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/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 +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.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/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/router/users.cjs +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 +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
- 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 +11 -13
- package/src/builder/templates/page.html +37 -0
- package/src/builder/templates/page.js +4 -0
- package/src/builder/webpack/webpack.config.client.js +9 -6
- 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 +60 -0
- 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/blocks/CardBlogpost.vue +3 -1
- package/src/modules/community/components/layouts/Community.vue +7 -9
- package/src/modules/community/components/pages/BlogPost.vue +122 -123
- 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/models/blogpost.model.js +1 -1
- package/src/modules/community/router/blogposts.js +40 -33
- 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 +28 -35
- package/src/modules/organizations/middlewares/verifyAccesses.js +117 -0
- package/src/modules/organizations/models/department.model.js +3 -86
- 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/styles/base/all.scss +0 -2
- package/src/styles/config.scss +6 -0
- package/src/modules/auth/controllers/middlewares/verifyAccesses.js +0 -114
- package/src/modules/users/components/pages/ProfileEvents.vue +0 -69
@@ -1,5 +1,5 @@
|
|
1
1
|
import _sfc_main from "../components/layouts/layoutEvents.vue.js";
|
2
|
-
import
|
2
|
+
import "../../auth/views/store/auth.js";
|
3
3
|
const eventsRoutes = [
|
4
4
|
{
|
5
5
|
path: "events",
|
@@ -27,6 +27,21 @@ const eventsRoutes = [
|
|
27
27
|
)
|
28
28
|
}]
|
29
29
|
},
|
30
|
+
{
|
31
|
+
path: "events/backoffice",
|
32
|
+
name: "Events Backoffice",
|
33
|
+
meta: {
|
34
|
+
title: {
|
35
|
+
en: "Manage Events",
|
36
|
+
ru: "Управление Событиями"
|
37
|
+
},
|
38
|
+
authorize: []
|
39
|
+
},
|
40
|
+
component: () => import(
|
41
|
+
/* webpackChunkName: 'CreateEvent' */
|
42
|
+
"../components/pages/EventsBackoffice.vue.js"
|
43
|
+
)
|
44
|
+
},
|
30
45
|
{
|
31
46
|
path: "events/create",
|
32
47
|
name: "Create Event",
|
@@ -68,10 +83,6 @@ const eventsRoutes = [
|
|
68
83
|
{
|
69
84
|
path: "events/:url/edit/tickets",
|
70
85
|
name: "Edit Event Tickets",
|
71
|
-
meta: { authorize: [] },
|
72
|
-
beforeEnter: [
|
73
|
-
requiresAdmin
|
74
|
-
],
|
75
86
|
component: () => import(
|
76
87
|
/* webpackChunkName: 'EditEvent' */
|
77
88
|
"../components/pages/EditEventTickets.vue.js"
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"events.js","sources":["../../../../../../src/modules/events/router/events.js"],"sourcesContent":["import layoutEvents from '../components/layouts/layoutEvents.vue'\nimport * as validationAuth from '@pf/src/modules/auth/views/middlewares/auth.validation';\n\nconst eventsRoutes = [\n {\n path: 'events',\n component: layoutEvents,\n meta: {\n title: {\n en: 'Events',\n ru: 'События'\n },\n title_hide: true\n },\n children: [{\n path: ':category?',\n name: 'Events',\n meta: {\n title: {\n en: 'Events',\n ru: 'События'\n },\n title_hide: true\n },\n component: () => import(/* webpackChunkName: 'EventList' */ '../components/pages/Events.vue')\n }]\n },{\n path: 'events/create',\n name: 'Create Event',\n meta: {\n title: {\n en: 'Create Event',\n ru: 'Создать Событие'\n },\n authorize: []\n },\n component: () => import(/* webpackChunkName: 'CreateEvent' */ '../components/pages/EditEvent.vue')\n },{\n path: 'events/:url',\n name: 'Event',\n meta: {\n title: {\n en: 'Event',\n ru: 'Событие'\n }\n },\n component: () => import(/* webpackChunkName: 'EventDetail' */ '../components/pages/Event.vue')\n },{\n path: 'events/:url/edit',\n name: 'Edit Event',\n meta: { authorize: [] },\n component: () => import(/* webpackChunkName: 'EditEvent' */ '../components/pages/EditEvent.vue')\n },{\n path: 'events/:url/edit/tickets',\n name: 'Edit Event Tickets',\n
|
1
|
+
{"version":3,"file":"events.js","sources":["../../../../../../src/modules/events/router/events.js"],"sourcesContent":["import layoutEvents from '../components/layouts/layoutEvents.vue'\nimport * as validationAuth from '@pf/src/modules/auth/views/middlewares/auth.validation';\n\nconst eventsRoutes = [\n {\n path: 'events',\n component: layoutEvents,\n meta: {\n title: {\n en: 'Events',\n ru: 'События'\n },\n title_hide: true\n },\n children: [{\n path: ':category?',\n name: 'Events',\n meta: {\n title: {\n en: 'Events',\n ru: 'События'\n },\n title_hide: true\n },\n component: () => import(/* webpackChunkName: 'EventList' */ '../components/pages/Events.vue')\n }]\n },{\n path: 'events/backoffice',\n name: 'Events Backoffice',\n meta: {\n title: {\n en: 'Manage Events',\n ru: 'Управление Событиями'\n },\n authorize: []\n },\n component: () => import(/* webpackChunkName: 'CreateEvent' */ '../components/pages/EventsBackoffice.vue')\n },{\n path: 'events/create',\n name: 'Create Event',\n meta: {\n title: {\n en: 'Create Event',\n ru: 'Создать Событие'\n },\n authorize: []\n },\n component: () => import(/* webpackChunkName: 'CreateEvent' */ '../components/pages/EditEvent.vue')\n },{\n path: 'events/:url',\n name: 'Event',\n meta: {\n title: {\n en: 'Event',\n ru: 'Событие'\n }\n },\n component: () => import(/* webpackChunkName: 'EventDetail' */ '../components/pages/Event.vue')\n },{\n path: 'events/:url/edit',\n name: 'Edit Event',\n meta: { authorize: [] },\n component: () => import(/* webpackChunkName: 'EditEvent' */ '../components/pages/EditEvent.vue')\n },{\n path: 'events/:url/edit/tickets',\n name: 'Edit Event Tickets',\n component: () => import(/* webpackChunkName: 'EditEvent' */ '../components/pages/EditEventTickets.vue')\n }\n];\n\nexport default eventsRoutes;\n"],"names":["layoutEvents"],"mappings":";;AAGK,MAAC,eAAe;AAAA,EACnB;AAAA,IACE,MAAM;AAAA,IACN,WAAWA;AAAAA,IACX,MAAM;AAAA,MACJ,OAAO;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,MACL;AAAA,MACD,YAAY;AAAA,IACb;AAAA,IACD,UAAU,CAAC;AAAA,MACT,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,QACJ,OAAO;AAAA,UACL,IAAI;AAAA,UACJ,IAAI;AAAA,QACL;AAAA,QACD,YAAY;AAAA,MACb;AAAA,MACD,WAAW,MAAM;AAAA;AAAA,QAA2C;AAAA,MAAgC;AAAA,IAClG,CAAK;AAAA,EACL;AAAA,EAAI;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,MACJ,OAAO;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,MACL;AAAA,MACD,WAAW,CAAE;AAAA,IACd;AAAA,IACD,WAAW,MAAM;AAAA;AAAA,MAA6C;AAAA,IAA0C;AAAA,EAC5G;AAAA,EAAI;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,MACJ,OAAO;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,MACL;AAAA,MACD,WAAW,CAAE;AAAA,IACd;AAAA,IACD,WAAW,MAAM;AAAA;AAAA,MAA6C;AAAA,IAAmC;AAAA,EACrG;AAAA,EAAI;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,MACJ,OAAO;AAAA,QACL,IAAI;AAAA,QACJ,IAAI;AAAA,MACL;AAAA,IACF;AAAA,IACD,WAAW,MAAM;AAAA;AAAA,MAA6C;AAAA,IAA+B;AAAA,EACjG;AAAA,EAAI;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM,EAAE,WAAW,GAAI;AAAA,IACvB,WAAW,MAAM;AAAA;AAAA,MAA2C;AAAA,IAAmC;AAAA,EACnG;AAAA,EAAI;AAAA,IACA,MAAM;AAAA,IACN,MAAM;AAAA,IACN,WAAW,MAAM;AAAA;AAAA,MAA2C;AAAA,IAA0C;AAAA,EACvG;AACH;"}
|
@@ -1,9 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
-
const axios = require("axios");
|
4
3
|
const vue = require("vue");
|
4
|
+
const axiosInstance = require("../../globals/views/utils/axios-instance.cjs");
|
5
5
|
const globals = require("../../globals/views/store/globals.cjs");
|
6
|
-
const $axios = axios.create({ baseURL: process.env.API_URL, withCredentials: true });
|
7
6
|
const state = vue.reactive({
|
8
7
|
all: [],
|
9
8
|
filter: {
|
@@ -41,7 +40,7 @@ const state = vue.reactive({
|
|
41
40
|
});
|
42
41
|
async function read(options = {}) {
|
43
42
|
try {
|
44
|
-
const response = await
|
43
|
+
const response = await axiosInstance.default.get("/api/events/read", { params: options });
|
45
44
|
if (options.url) {
|
46
45
|
set(response.data, "current");
|
47
46
|
} else {
|
@@ -54,7 +53,7 @@ async function read(options = {}) {
|
|
54
53
|
}
|
55
54
|
}
|
56
55
|
async function create(eventData) {
|
57
|
-
return
|
56
|
+
return axiosInstance.default.post("/api/events/create", eventData).then(
|
58
57
|
(response) => {
|
59
58
|
set(response.data, "current");
|
60
59
|
return Promise.resolve(response.data);
|
@@ -66,7 +65,7 @@ async function create(eventData) {
|
|
66
65
|
);
|
67
66
|
}
|
68
67
|
async function update(eventData) {
|
69
|
-
return
|
68
|
+
return axiosInstance.default.post("/api/events/update", eventData).then(
|
70
69
|
(response) => {
|
71
70
|
set(response.data, "current");
|
72
71
|
return Promise.resolve(response.data);
|
@@ -78,7 +77,7 @@ async function update(eventData) {
|
|
78
77
|
);
|
79
78
|
}
|
80
79
|
async function remove(_id) {
|
81
|
-
return await
|
80
|
+
return await axiosInstance.default.post(`/api/events/delete`, { _id }).then(
|
82
81
|
(response) => {
|
83
82
|
const index = state.all.findIndex((p) => p._id === _id);
|
84
83
|
if (index !== -1) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"events.cjs","sources":["../../../../../../src/modules/events/store/events.js"],"sourcesContent":["//
|
1
|
+
{"version":3,"file":"events.cjs","sources":["../../../../../../src/modules/events/store/events.js"],"sourcesContent":["// Vue modules\nimport { reactive, ref, computed, toRefs, watch } from \"vue\";\n// Setup Axios\nimport $axios from '@pf/src/modules/globals/views/utils/axios-instance.js';\n// Globals\nimport { setError } from '@pf/src/modules/globals/views/store/globals'\n// State\nconst state = reactive({\n all: [],\n filter: {\n // query\n tags: [],\n period: '',\n date: null,\n // pagination\n },\n pagination: {\n page: 1,\n perPage: 18,\n },\n // Sort\n sort: {\n current: 'popularity',\n ascending: false\n },\n current: {\n _id: \"\",\n special: false,\n specialData: {},\n cover: \"\",\n url: \"\",\n status: \"\",\n name: \"\",\n tags: [],\n date: {\n start: null,\n false: null\n },\n views: 0,\n content: [],\n }\n});\n\nasync function read(options = {}) {\n\n try {\n const response = await $axios.get('/api/events/read', { params: options });\n \n if (options.url) {\n set(response.data, 'current')\n } else {\n set(response.data, 'all')\n }\n return Promise.resolve(response.data);\n } catch (err) {\n setError(err)\n return Promise.reject(err);\n }\n}\nasync function create(eventData) {\n return $axios.post('/api/events/create', eventData).then(\n response => {\n set(response.data, 'current')\n return Promise.resolve(response.data);\n },\n error => {\n setError(error)\n return Promise.reject(error);\n }\n );\n}\n\nasync function update(eventData) {\n return $axios.post('/api/events/update', eventData).then(\n response => {\n set(response.data, 'current')\n return Promise.resolve(response.data);\n },\n error => {\n setError(error)\n return Promise.reject(error);\n }\n );\n}\n\nasync function remove(_id) {\n return await $axios.post(`/api/events/delete`, {_id: _id}).then(\n response => {\n const index = state.all.findIndex(p => p._id === _id);\n if (index !== -1) {\n state.all.splice(index, 1);\n }\n return Promise.resolve(response.data);\n },\n error => {\n setError(error)\n return Promise.reject(error);\n }\n );\n}\n\nfunction set(eventData, property) { \n state[property] = eventData\n}\n\nfunction clean () {\n state.current = {\n _id: \"\",\n cover: \"\",\n url: \"\",\n phase: \"\",\n name: \"\",\n special: false,\n specialData: {\n subtitle: '',\n logos: [],\n video: '',\n ticketImage: '',\n ticketLinkStripe: '',\n ticketPrice: '',\n guestTitle: '',\n guestDescription: '',\n guestFacebook: '',\n guestInstagram: '',\n guestTwitter: '',\n guestTelegram: '',\n guestSoundcloud: '',\n guestSpotify: '',\n guestVideo: '',\n guests: [],\n lineup: [],\n lineupBackground: '',\n previousVideo: ''\n },\n tags: [],\n date: {\n start: null,\n false: null\n },\n views: 0,\n content: []\n }\n}\n\nconst history = []\nhistory.push(state) // push initial state\n\nwatch(state, (newState, oldState) => {\n history.push(newState)\n})\n\nexport {\n state,\n read,\n create,\n update,\n remove,\n set,\n clean,\n}\n"],"names":["reactive","$axios","setError","watch"],"mappings":"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"}
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import axios from "axios";
|
2
1
|
import { reactive, watch } from "vue";
|
2
|
+
import $axios from "../../globals/views/utils/axios-instance.js";
|
3
3
|
import { setError } from "../../globals/views/store/globals.js";
|
4
|
-
const $axios = axios.create({ baseURL: process.env.API_URL, withCredentials: true });
|
5
4
|
const state = reactive({
|
6
5
|
all: [],
|
7
6
|
filter: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"events.js","sources":["../../../../../../src/modules/events/store/events.js"],"sourcesContent":["//
|
1
|
+
{"version":3,"file":"events.js","sources":["../../../../../../src/modules/events/store/events.js"],"sourcesContent":["// Vue modules\nimport { reactive, ref, computed, toRefs, watch } from \"vue\";\n// Setup Axios\nimport $axios from '@pf/src/modules/globals/views/utils/axios-instance.js';\n// Globals\nimport { setError } from '@pf/src/modules/globals/views/store/globals'\n// State\nconst state = reactive({\n all: [],\n filter: {\n // query\n tags: [],\n period: '',\n date: null,\n // pagination\n },\n pagination: {\n page: 1,\n perPage: 18,\n },\n // Sort\n sort: {\n current: 'popularity',\n ascending: false\n },\n current: {\n _id: \"\",\n special: false,\n specialData: {},\n cover: \"\",\n url: \"\",\n status: \"\",\n name: \"\",\n tags: [],\n date: {\n start: null,\n false: null\n },\n views: 0,\n content: [],\n }\n});\n\nasync function read(options = {}) {\n\n try {\n const response = await $axios.get('/api/events/read', { params: options });\n \n if (options.url) {\n set(response.data, 'current')\n } else {\n set(response.data, 'all')\n }\n return Promise.resolve(response.data);\n } catch (err) {\n setError(err)\n return Promise.reject(err);\n }\n}\nasync function create(eventData) {\n return $axios.post('/api/events/create', eventData).then(\n response => {\n set(response.data, 'current')\n return Promise.resolve(response.data);\n },\n error => {\n setError(error)\n return Promise.reject(error);\n }\n );\n}\n\nasync function update(eventData) {\n return $axios.post('/api/events/update', eventData).then(\n response => {\n set(response.data, 'current')\n return Promise.resolve(response.data);\n },\n error => {\n setError(error)\n return Promise.reject(error);\n }\n );\n}\n\nasync function remove(_id) {\n return await $axios.post(`/api/events/delete`, {_id: _id}).then(\n response => {\n const index = state.all.findIndex(p => p._id === _id);\n if (index !== -1) {\n state.all.splice(index, 1);\n }\n return Promise.resolve(response.data);\n },\n error => {\n setError(error)\n return Promise.reject(error);\n }\n );\n}\n\nfunction set(eventData, property) { \n state[property] = eventData\n}\n\nfunction clean () {\n state.current = {\n _id: \"\",\n cover: \"\",\n url: \"\",\n phase: \"\",\n name: \"\",\n special: false,\n specialData: {\n subtitle: '',\n logos: [],\n video: '',\n ticketImage: '',\n ticketLinkStripe: '',\n ticketPrice: '',\n guestTitle: '',\n guestDescription: '',\n guestFacebook: '',\n guestInstagram: '',\n guestTwitter: '',\n guestTelegram: '',\n guestSoundcloud: '',\n guestSpotify: '',\n guestVideo: '',\n guests: [],\n lineup: [],\n lineupBackground: '',\n previousVideo: ''\n },\n tags: [],\n date: {\n start: null,\n false: null\n },\n views: 0,\n content: []\n }\n}\n\nconst history = []\nhistory.push(state) // push initial state\n\nwatch(state, (newState, oldState) => {\n history.push(newState)\n})\n\nexport {\n state,\n read,\n create,\n update,\n remove,\n set,\n clean,\n}\n"],"names":[],"mappings":"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"}
|
package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs
CHANGED
@@ -2,10 +2,10 @@
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
4
|
const vueRouter = require("vue-router");
|
5
|
-
;/* empty css
|
5
|
+
;/* empty css */
|
6
6
|
const Button = require("../../../../components/Button/Button.vue.cjs");
|
7
7
|
;/* empty css */
|
8
|
-
const Chips = require("../../../../components/Chips/Chips.
|
8
|
+
const Chips = require("../../../../components/Chips/Chips.vue2.cjs");
|
9
9
|
;/* empty css */
|
10
10
|
const Popup = require("../../../../components/Popup/Popup.vue.cjs");
|
11
11
|
const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
@@ -79,13 +79,19 @@ const _sfc_main = {
|
|
79
79
|
};
|
80
80
|
const photos = vue.ref([]);
|
81
81
|
const deletePhoto = async (item) => {
|
82
|
-
|
83
|
-
|
82
|
+
let deletedPhoto = JSON.parse(JSON.stringify(item));
|
83
|
+
deletedPhoto.owner.target = deletedPhoto.owner.target._id;
|
84
|
+
deletedPhoto.creator.target = deletedPhoto.creator.target._id;
|
85
|
+
await gallery.default.delete(deletedPhoto);
|
86
|
+
gallery.default.removeItem(deletedPhoto, photos.value);
|
84
87
|
};
|
85
88
|
const changeStatus = async (item, status) => {
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
+
let updatedPhoto = JSON.parse(JSON.stringify(item));
|
90
|
+
updatedPhoto.status = status;
|
91
|
+
updatedPhoto.owner.target = updatedPhoto.owner.target._id;
|
92
|
+
updatedPhoto.creator.target = updatedPhoto.creator.target._id;
|
93
|
+
updatedPhoto = await gallery.default.update(updatedPhoto);
|
94
|
+
gallery.default.updateItem(updatedPhoto, photos.value);
|
89
95
|
};
|
90
96
|
const createPhoto = async (status) => {
|
91
97
|
if (uploadedImages.length < 1) {
|
@@ -123,7 +129,7 @@ const _sfc_main = {
|
|
123
129
|
{ name: "Archived", value: "archived" }
|
124
130
|
],
|
125
131
|
actions: [
|
126
|
-
{ method: () => openPhotoPopup(null), label: "Add Photo" }
|
132
|
+
..._ctx.hasAccess(vue.unref(route).params._id, "gallery", "create", auth.state.accesses) ? [{ method: () => openPhotoPopup(null), label: "Add Photo" }] : []
|
127
133
|
],
|
128
134
|
class: "mn-b-small bg-light bg-light radius-big"
|
129
135
|
}, null, 8, ["tabs_current", "actions"]),
|
@@ -167,9 +173,12 @@ const _sfc_main = {
|
|
167
173
|
creator: item.creator,
|
168
174
|
date: item.createdAt,
|
169
175
|
actions: [
|
170
|
-
{ method: () => deletePhoto(item), label: "Delete" },
|
171
|
-
|
172
|
-
|
176
|
+
..._ctx.hasAccess(vue.unref(route).params._id, "gallery", "delete", auth.state.accesses) ? [{ method: () => deletePhoto(item), label: "Delete" }] : [],
|
177
|
+
..._ctx.hasAccess(vue.unref(route).params._id, "gallery", "edit", auth.state.accesses) ? [
|
178
|
+
...item.status !== "archived" ? [{ method: () => changeStatus(item, "archived"), label: "Archive" }] : [],
|
179
|
+
...item.status !== "published" ? [{ method: () => changeStatus(item, "published"), label: "Publish" }] : [],
|
180
|
+
...item.status !== "draft" ? [{ method: () => changeStatus(item, "draft"), label: "Draft" }] : []
|
181
|
+
] : []
|
173
182
|
],
|
174
183
|
class: "pd-small mn-b-small"
|
175
184
|
}, null, 8, ["entity", "user", "owner", "creator", "date", "actions"]),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BackofficeGallery.vue.cjs","sources":["../../../../../../../src/modules/gallery/components/sections/BackofficeGallery.vue"],"sourcesContent":["<template>\n <div class=\"cols-1 gap-thin pd-thin\">\n <SectionPageTitle\n title=\"Gallery\"\n @update:tabs_current=\"(update) => tab = update\"\n :tabs_current=\"tab\"\n :tabs=\"[\n { name: 'All', value: 'all' },\n { name: 'Featured', value: 'featured' },\n { name: 'Published', value: 'published' },\n { name: 'Draft', value: 'draft' },\n { name: 'Archived', value: 'archived' }\n ]\"\n :actions=\"[\n { method: () => openPhotoPopup(null), label: 'Add Photo' }\n ]\"\n class=\"mn-b-small bg-light bg-light radius-big\"\n />\n\n <Feed\n v-model:items=\"photos\"\n v-model:sort=\"sort\"\n v-model:date=\"date\"\n :states=\"{\n empty: {\n title: 'No Photos Found',\n description: 'Currently, there are no photos in gallery.'\n },\n }\"\n :store=\"{\n read: (options) => gallery.read(options)\n }\"\n :options=\"{\n limit: 15,\n owner: route.params._id,\n ...(tab !== 'all' && { status: tab })\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"cols-3 gap-thin\"\n >\n <div v-for=\"item in items\" :key=\"item._id\" class=\"bg-light radius-small flex-column pos-relative flex-wrap\">\n\n <CardHeader \n :entity=\"item\"\n :entityType=\"'photo'\"\n :user=\"auth.state.user._id\"\n :owner=\"item.creator\" \n :creator=\"item.creator\"\n :date=\"item.createdAt\"\n :actions=\"[\n { method: () => deletePhoto(item), label: 'Delete' },\n { method: () => changeStatus(item,'archived'), label: 'Archive' },\n item.status === 'draft' ? \n { method: () => changeStatus(item,'published'), label: 'Publish' } : \n { method: () => changeStatus(item,'draft'), label: 'Draft' }\n ]\"\n class=\"pd-small mn-b-small\"\n />\n\n <div class=\"pos-relative\">\n <img loading=\"lazy\" \n :src=\"(FILE_SERVER_URL || '') + item.cover\" \n class=\"w-100 h-20r object-fit-contain bg-black \" @click=\"openPreviewPopup(item)\" \n />\n <div \n class=\"pos-absolute pos-t-0 pos-r-0 pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-r-small mn-t-small w-min bg-second radius-extra\"\n >\n {{item.status}}\n </div>\n </div>\n \n <div class=\"pd-small\">\n <Chips \n v-if=\"item.tags?.length > 0\" \n :chips=\"item.tags\"\n />\n </div>\n </div>\n </Feed>\n\n <Popup \n @close-popup=\"closePreviewPopup\" \n :isPopupOpen=\"isOpenPreviewPopup\"\n class=\"bg-black o-hidden w-100 h-100 radius-big\"\n >\n <PhotoViewer\n :photoUrl=\"selectedPhoto.image\"\n />\n </Popup>\n\n <Popup \n title=\"Add Photo\" \n @close-popup=\"closePhotoPopup\" \n :isPopupOpen=\"isOpenPhotoPopup\"\n class=\"bg-white w-max-30r radius-big pd-big\"\n >\n <img loading=\"lazy\" \n v-if=\"selectedImage.cover\" \n :src=\"selectedImage.cover\" \n class=\"radius-small w-100 mn-b-small h-20r object-fit-cover \" \n />\n\n <EditImages \n :images=\"uploadedImages\" \n :uploadPath=\"'/photos'\" \n @update:images=\"onUpdatedImages\" \n class=\"mn-b-semi bg-light radius-medium\"\n />\n\n <BlockTags\n @tags-changed=\"newTags => selectedImage.tags = newTags\"\n :tags=\"selectedImage.tags\"\n :tagsSuggested=\"[\n {text: 'people' },\n {text: 'events' },\n {text: 'place' },\n {text: 'food' },\n {text: 'drinks' },\n {text: 'special' },\n ]\"\n class=\"mn-b-semi\"\n />\n\n <div class=\"flex-nowrap flex gap-thin\">\n <Button \n :submit=\"() => createPhoto('draft')\" \n :callback=\"closePhotoPopup\" \n class=\"t-nowrap bg-second w-100\"\n >\n To drafts\n </Button>\n <Button \n :submit=\"() => createPhoto('published')\" \n :callback=\"closePhotoPopup\" \n class=\"bg-main w-100\"\n >\n Publish\n </Button>\n </div>\n </Popup>\n </div>\n</template>\n\n<script setup>\nimport { ref, onMounted, reactive, computed } from 'vue'\nimport { useRoute } from 'vue-router'\n\nimport Field from '@pf/src/components/Field/Field.vue'\nimport Button from '@pf/src/components/Button/Button.vue'\nimport Select from '@pf/src/components/Select/Select.vue'\nimport Chips from '@pf/src/components/Chips/Chips.vue'\nimport Checkbox from '@pf/src/components/Checkbox/Checkbox.vue';\nimport SelectMulti from '@pf/src/components/SelectMulti/SelectMulti.vue';\nimport Popup from '@pf/src/components/Popup/Popup.vue'\nimport Feed from '@pf/src/components/Feed/Feed.vue'\nimport PhotoViewer from '@pf/src/components/PhotoViewer/PhotoViewer.vue'\n\nimport * as auth from '@pf/src/modules/auth/views/store/auth';\nimport * as organizations from '@pf/src/modules/organizations/store/organizations';\n \nimport gallery from '@pf/src/modules/gallery/store/gallery';\n\nimport CardHeader from '@pf/src/modules/globals/views/components/blocks/CardHeader.vue'\nimport SectionPageTitle from '@pf/src/modules/globals/views/components/sections/SectionPageTitle.vue'\n\n\n\nimport EditImages from '@pf/src/components/EditImages/EditImages.vue';\nimport BlockTags from '@pf/src/components/FieldTags/BlockTags.vue';\n\nconst route = useRoute();\n\n// Tabs\nconst tab = ref('all')\n// Sort\nlet sort = ref({\n param: 'createdAt',\n order: 'desc',\n options: [{\n label: 'Date',\n value: 'createdAt'\n },{\n label: 'Popularity',\n value: 'views'\n },{\n label: 'Creator',\n value: 'creator'\n }]\n})\n// Date\nlet date = ref({\n start: null,\n end: null\n})\n// Popup\n// Preview Photo\nconst isOpenPreviewPopup = ref(false);\nfunction openPreviewPopup(photo) {\n isOpenPreviewPopup.value = true;\n selectedPhoto.value = photo;\n}\nfunction closePreviewPopup() {\n isOpenPreviewPopup.value = false;\n selectedPhoto.value = null;\n}\n// Add Photo\nconst isOpenPhotoPopup = ref(false);\nfunction openPhotoPopup(photo) {\n isOpenPhotoPopup.value = true;\n selectedPhoto.value = photo;\n}\nfunction closePhotoPopup() {\n isOpenPhotoPopup.value = false;\n selectedPhoto.value = null;\n uploadedImages.value = [];\n selectedImage.value = { tags: null, image: null };\n}\n// Selected Photo\nconst selectedPhoto = ref(null);\nconst selectedCategory = ref('all')\nconst selectedImage = ref({\n tags: null,\n image: null\n})\nconst uploadedImages = ref([])\nconst onUpdatedImages = (newImages) => {\n uploadedImages.value = newImages\n}\n// Gallery Grid\nconst photos = ref([])\n\nconst deletePhoto = async (item) => {\n await gallery.delete(item._id);\n gallery.removeItem(item, photos.value)\n};\n\nconst changeStatus = async (item, status) => {\n item.status = status\n await gallery.update(item)\n gallery.updateItem(item, photos.value)\n}\n\nconst createPhoto = async (status) => {\n if (uploadedImages.length < 1) {\n alert('Upload at least 1 image')\n return\n }\n\n let createdPhotos = await gallery.create({\n images: uploadedImages.value,\n tags: selectedImage.value.tags,\n status: status,\n owner: {\n type: 'Organization',\n target: route.params._id\n },\n creator: {\n type: 'User',\n target: auth.state.user._id\n }\n })\n\n for (let createdPhoto of createdPhotos) {\n gallery.addItem(createdPhoto, photos.value)\n }\n}\n</script>\n\n<style scoped>\n</style>"],"names":["useRoute","ref","gallery","auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4KA,UAAM,QAAQA,UAAQ,SAAA;AAGtB,UAAM,MAAMC,IAAG,IAAC,KAAK;AAErB,QAAI,OAAOA,IAAAA,IAAI;AAAA,MACb,OAAO;AAAA,MACP,OAAO;AAAA,MACP,SAAS,CAAC;AAAA,QACR,OAAO;AAAA,QACP,OAAO;AAAA,MACX,GAAI;AAAA,QACA,OAAO;AAAA,QACP,OAAO;AAAA,MACX,GAAI;AAAA,QACA,OAAO;AAAA,QACP,OAAO;AAAA,MACX,CAAG;AAAA,IACH,CAAC;AAED,QAAI,OAAOA,IAAAA,IAAI;AAAA,MACb,OAAO;AAAA,MACP,KAAK;AAAA,IACP,CAAC;AAGD,UAAM,qBAAqBA,IAAAA,IAAI,KAAK;AACpC,aAAS,iBAAiB,OAAO;AAC/B,yBAAmB,QAAQ;AAC3B,oBAAc,QAAQ;AAAA,IACxB;AACA,aAAS,oBAAoB;AAC3B,yBAAmB,QAAQ;AAC3B,oBAAc,QAAQ;AAAA,IACxB;AAEA,UAAM,mBAAmBA,IAAAA,IAAI,KAAK;AAClC,aAAS,eAAe,OAAO;AAC7B,uBAAiB,QAAQ;AACzB,oBAAc,QAAQ;AAAA,IACxB;AACA,aAAS,kBAAkB;AACzB,uBAAiB,QAAQ;AACzB,oBAAc,QAAQ;AACtB,qBAAe,QAAQ;AACvB,oBAAc,QAAQ,EAAE,MAAM,MAAM,OAAO;IAC7C;AAEA,UAAM,gBAAgBA,IAAAA,IAAI,IAAI;AACLA,QAAG,IAAC,KAAK;AAClC,UAAM,gBAAgBA,IAAAA,IAAI;AAAA,MACxB,MAAM;AAAA,MACN,OAAO;AAAA,IACT,CAAC;AACD,UAAM,iBAAiBA,IAAG,IAAC,EAAE;AAC7B,UAAM,kBAAkB,CAAC,cAAc;AACrC,qBAAe,QAAQ;AAAA,IACzB;AAEA,UAAM,SAASA,IAAG,IAAC,EAAE;AAErB,UAAM,cAAc,OAAO,SAAS;AAClC,YAAMC,gBAAQ,OAAO,KAAK,GAAG;AAC7BA,cAAAA,QAAQ,WAAW,MAAM,OAAO,KAAK;AAAA,IACvC;AAEA,UAAM,eAAe,OAAO,MAAM,WAAW;AAC3C,WAAK,SAAS;AACd,YAAMA,QAAO,QAAC,OAAO,IAAI;AACzBA,cAAAA,QAAQ,WAAW,MAAM,OAAO,KAAK;AAAA,IACvC;AAEA,UAAM,cAAc,OAAO,WAAW;AACpC,UAAI,eAAe,SAAS,GAAG;AAC7B,cAAM,yBAAyB;AAC/B;AAAA,MACD;AAED,UAAI,gBAAgB,MAAMA,QAAO,QAAC,OAAO;AAAA,QACvC,QAAQ,eAAe;AAAA,QACvB,MAAM,cAAc,MAAM;AAAA,QAC1B;AAAA,QACA,OAAO;AAAA,UACL,MAAM;AAAA,UACN,QAAQ,MAAM,OAAO;AAAA,QACtB;AAAA,QACD,SAAS;AAAA,UACP,MAAM;AAAA,UACN,QAAQC,KAAAA,MAAW,KAAK;AAAA,QACzB;AAAA,MACL,CAAG;AAED,eAAS,gBAAgB,eAAe;AACtCD,gBAAAA,QAAQ,QAAQ,cAAc,OAAO,KAAK;AAAA,MAC3C;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"BackofficeGallery.vue.cjs","sources":["../../../../../../../src/modules/gallery/components/sections/BackofficeGallery.vue"],"sourcesContent":["<template>\n <div class=\"cols-1 gap-thin pd-thin\">\n <SectionPageTitle\n title=\"Gallery\"\n @update:tabs_current=\"(update) => tab = update\"\n :tabs_current=\"tab\"\n :tabs=\"[\n { name: 'All', value: 'all' },\n { name: 'Featured', value: 'featured' },\n { name: 'Published', value: 'published' },\n { name: 'Draft', value: 'draft' },\n { name: 'Archived', value: 'archived' }\n ]\"\n :actions=\"[\n ...(hasAccess(route.params._id, 'gallery', 'create', auth.state.accesses) ? [{ method: () => openPhotoPopup(null), label: 'Add Photo' }] : [])\n ]\"\n class=\"mn-b-small bg-light bg-light radius-big\"\n />\n\n <Feed\n v-model:items=\"photos\"\n v-model:sort=\"sort\"\n v-model:date=\"date\"\n :states=\"{\n empty: {\n title: 'No Photos Found',\n description: 'Currently, there are no photos in gallery.'\n },\n }\"\n :store=\"{\n read: (options) => gallery.read(options)\n }\"\n :options=\"{\n limit: 15,\n owner: route.params._id,\n ...(tab !== 'all' && { status: tab })\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"cols-3 gap-thin\"\n >\n <div v-for=\"item in items\" :key=\"item._id\" class=\"bg-light radius-small flex-column pos-relative flex-wrap\">\n\n <CardHeader \n :entity=\"item\"\n :entityType=\"'photo'\"\n :user=\"auth.state.user._id\"\n :owner=\"item.creator\" \n :creator=\"item.creator\"\n :date=\"item.createdAt\"\n :actions=\"[\n ...(hasAccess(route.params._id, 'gallery', 'delete', auth.state.accesses) ? [{ method: () => deletePhoto(item), label: 'Delete' }] : []),\n ...(hasAccess(route.params._id, 'gallery', 'edit', auth.state.accesses) ? [\n ...(item.status !== 'archived' ? [{ method: () => changeStatus(item, 'archived'), label: 'Archive' }] : []),\n ...(item.status !== 'published' ? [{ method: () => changeStatus(item, 'published'), label: 'Publish' }] : []),\n ...(item.status !== 'draft' ? [{ method: () => changeStatus(item, 'draft'), label: 'Draft' }] : [])\n ] : [])\n ]\"\n class=\"pd-small mn-b-small\"\n />\n\n <div class=\"pos-relative\">\n <img loading=\"lazy\" \n :src=\"(FILE_SERVER_URL || '') + item.cover\" \n class=\"w-100 h-20r object-fit-contain bg-black \" @click=\"openPreviewPopup(item)\" \n />\n <div \n class=\"pos-absolute pos-t-0 pos-r-0 pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-r-small mn-t-small w-min bg-second radius-extra\"\n >\n {{item.status}}\n </div>\n </div>\n \n <div class=\"pd-small\">\n <Chips \n v-if=\"item.tags?.length > 0\" \n :chips=\"item.tags\"\n />\n </div>\n </div>\n </Feed>\n\n <Popup \n @close-popup=\"closePreviewPopup\" \n :isPopupOpen=\"isOpenPreviewPopup\"\n class=\"bg-black o-hidden w-100 h-100 radius-big\"\n >\n <PhotoViewer\n :photoUrl=\"selectedPhoto.image\"\n />\n </Popup>\n\n <Popup \n title=\"Add Photo\" \n @close-popup=\"closePhotoPopup\" \n :isPopupOpen=\"isOpenPhotoPopup\"\n class=\"bg-white w-max-30r radius-big pd-big\"\n >\n <img loading=\"lazy\" \n v-if=\"selectedImage.cover\" \n :src=\"selectedImage.cover\" \n class=\"radius-small w-100 mn-b-small h-20r object-fit-cover \" \n />\n\n <EditImages \n :images=\"uploadedImages\" \n :uploadPath=\"'/photos'\" \n @update:images=\"onUpdatedImages\" \n class=\"mn-b-semi bg-light radius-medium\"\n />\n\n <BlockTags\n @tags-changed=\"newTags => selectedImage.tags = newTags\"\n :tags=\"selectedImage.tags\"\n :tagsSuggested=\"[\n {text: 'people' },\n {text: 'events' },\n {text: 'place' },\n {text: 'food' },\n {text: 'drinks' },\n {text: 'special' },\n ]\"\n class=\"mn-b-semi\"\n />\n\n <div class=\"flex-nowrap flex gap-thin\">\n <Button \n :submit=\"() => createPhoto('draft')\" \n :callback=\"closePhotoPopup\" \n class=\"t-nowrap bg-second w-100\"\n >\n To drafts\n </Button>\n <Button \n :submit=\"() => createPhoto('published')\" \n :callback=\"closePhotoPopup\" \n class=\"bg-main w-100\"\n >\n Publish\n </Button>\n </div>\n </Popup>\n </div>\n</template>\n\n<script setup>\nimport { ref, onMounted, reactive, computed } from 'vue'\nimport { useRoute } from 'vue-router'\n\nimport Field from '@pf/src/components/Field/Field.vue'\nimport Button from '@pf/src/components/Button/Button.vue'\nimport Select from '@pf/src/components/Select/Select.vue'\nimport Chips from '@pf/src/components/Chips/Chips.vue'\nimport Checkbox from '@pf/src/components/Checkbox/Checkbox.vue';\nimport SelectMulti from '@pf/src/components/SelectMulti/SelectMulti.vue';\nimport Popup from '@pf/src/components/Popup/Popup.vue'\nimport Feed from '@pf/src/components/Feed/Feed.vue'\nimport PhotoViewer from '@pf/src/components/PhotoViewer/PhotoViewer.vue'\n\nimport * as auth from '@pf/src/modules/auth/views/store/auth';\nimport * as organizations from '@pf/src/modules/organizations/store/organizations';\n \nimport gallery from '@pf/src/modules/gallery/store/gallery';\n\nimport CardHeader from '@pf/src/modules/globals/views/components/blocks/CardHeader.vue'\nimport SectionPageTitle from '@pf/src/modules/globals/views/components/sections/SectionPageTitle.vue'\n\nimport EditImages from '@pf/src/components/EditImages/EditImages.vue';\nimport BlockTags from '@pf/src/components/FieldTags/BlockTags.vue';\n\nconst route = useRoute();\n\n// Tabs\nconst tab = ref('all')\n// Sort\nlet sort = ref({\n param: 'createdAt',\n order: 'desc',\n options: [{\n label: 'Date',\n value: 'createdAt'\n },{\n label: 'Popularity',\n value: 'views'\n },{\n label: 'Creator',\n value: 'creator'\n }]\n})\n// Date\nlet date = ref({\n start: null,\n end: null\n})\n// Popup\n// Preview Photo\nconst isOpenPreviewPopup = ref(false);\nfunction openPreviewPopup(photo) {\n isOpenPreviewPopup.value = true;\n selectedPhoto.value = photo;\n}\nfunction closePreviewPopup() {\n isOpenPreviewPopup.value = false;\n selectedPhoto.value = null;\n}\n// Add Photo\nconst isOpenPhotoPopup = ref(false);\nfunction openPhotoPopup(photo) {\n isOpenPhotoPopup.value = true;\n selectedPhoto.value = photo;\n}\nfunction closePhotoPopup() {\n isOpenPhotoPopup.value = false;\n selectedPhoto.value = null;\n uploadedImages.value = [];\n selectedImage.value = { tags: null, image: null };\n}\n// Selected Photo\nconst selectedPhoto = ref(null);\nconst selectedCategory = ref('all')\nconst selectedImage = ref({\n tags: null,\n image: null\n})\nconst uploadedImages = ref([])\nconst onUpdatedImages = (newImages) => {\n uploadedImages.value = newImages\n}\n// Gallery Grid\nconst photos = ref([])\n\nconst deletePhoto = async (item) => {\n let deletedPhoto = JSON.parse(JSON.stringify(item));\n\n deletedPhoto.owner.target = deletedPhoto.owner.target._id\n deletedPhoto.creator.target = deletedPhoto.creator.target._id\n\n await gallery.delete(deletedPhoto);\n\n gallery.removeItem(deletedPhoto, photos.value)\n};\n\nconst changeStatus = async (item, status) => {\n let updatedPhoto = JSON.parse(JSON.stringify(item));\n\n updatedPhoto.status = status\n\n updatedPhoto.owner.target = updatedPhoto.owner.target._id\n updatedPhoto.creator.target = updatedPhoto.creator.target._id\n\n updatedPhoto = await gallery.update(updatedPhoto)\n gallery.updateItem(updatedPhoto, photos.value)\n}\n\nconst createPhoto = async (status) => {\n if (uploadedImages.length < 1) {\n alert('Upload at least 1 image')\n return\n }\n\n let createdPhotos = await gallery.create({\n images: uploadedImages.value,\n tags: selectedImage.value.tags,\n status: status,\n owner: {\n type: 'Organization',\n target: route.params._id\n },\n creator: {\n type: 'User',\n target: auth.state.user._id\n }\n })\n\n for (let createdPhoto of createdPhotos) {\n gallery.addItem(createdPhoto, photos.value)\n }\n}\n</script>\n\n<style scoped>\n</style>"],"names":["useRoute","ref","gallery","auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2KA,UAAM,QAAQA,UAAQ,SAAA;AAGtB,UAAM,MAAMC,IAAG,IAAC,KAAK;AAErB,QAAI,OAAOA,IAAAA,IAAI;AAAA,MACb,OAAO;AAAA,MACP,OAAO;AAAA,MACP,SAAS,CAAC;AAAA,QACR,OAAO;AAAA,QACP,OAAO;AAAA,MACX,GAAI;AAAA,QACA,OAAO;AAAA,QACP,OAAO;AAAA,MACX,GAAI;AAAA,QACA,OAAO;AAAA,QACP,OAAO;AAAA,MACX,CAAG;AAAA,IACH,CAAC;AAED,QAAI,OAAOA,IAAAA,IAAI;AAAA,MACb,OAAO;AAAA,MACP,KAAK;AAAA,IACP,CAAC;AAGD,UAAM,qBAAqBA,IAAAA,IAAI,KAAK;AACpC,aAAS,iBAAiB,OAAO;AAC/B,yBAAmB,QAAQ;AAC3B,oBAAc,QAAQ;AAAA,IACxB;AACA,aAAS,oBAAoB;AAC3B,yBAAmB,QAAQ;AAC3B,oBAAc,QAAQ;AAAA,IACxB;AAEA,UAAM,mBAAmBA,IAAAA,IAAI,KAAK;AAClC,aAAS,eAAe,OAAO;AAC7B,uBAAiB,QAAQ;AACzB,oBAAc,QAAQ;AAAA,IACxB;AACA,aAAS,kBAAkB;AACzB,uBAAiB,QAAQ;AACzB,oBAAc,QAAQ;AACtB,qBAAe,QAAQ;AACvB,oBAAc,QAAQ,EAAE,MAAM,MAAM,OAAO;IAC7C;AAEA,UAAM,gBAAgBA,IAAAA,IAAI,IAAI;AACLA,QAAG,IAAC,KAAK;AAClC,UAAM,gBAAgBA,IAAAA,IAAI;AAAA,MACxB,MAAM;AAAA,MACN,OAAO;AAAA,IACT,CAAC;AACD,UAAM,iBAAiBA,IAAG,IAAC,EAAE;AAC7B,UAAM,kBAAkB,CAAC,cAAc;AACrC,qBAAe,QAAQ;AAAA,IACzB;AAEA,UAAM,SAASA,IAAG,IAAC,EAAE;AAErB,UAAM,cAAc,OAAO,SAAS;AAClC,UAAI,eAAe,KAAK,MAAM,KAAK,UAAU,IAAI,CAAC;AAElD,mBAAa,MAAM,SAAS,aAAa,MAAM,OAAO;AACtD,mBAAa,QAAQ,SAAS,aAAa,QAAQ,OAAO;AAE1D,YAAMC,QAAO,QAAC,OAAO,YAAY;AAEjCA,cAAAA,QAAQ,WAAW,cAAc,OAAO,KAAK;AAAA,IAC/C;AAEA,UAAM,eAAe,OAAO,MAAM,WAAW;AAC3C,UAAI,eAAe,KAAK,MAAM,KAAK,UAAU,IAAI,CAAC;AAElD,mBAAa,SAAS;AAEtB,mBAAa,MAAM,SAAS,aAAa,MAAM,OAAO;AACtD,mBAAa,QAAQ,SAAS,aAAa,QAAQ,OAAO;AAE1D,qBAAe,MAAMA,QAAAA,QAAQ,OAAO,YAAY;AAChDA,cAAAA,QAAQ,WAAW,cAAc,OAAO,KAAK;AAAA,IAC/C;AAEA,UAAM,cAAc,OAAO,WAAW;AACpC,UAAI,eAAe,SAAS,GAAG;AAC7B,cAAM,yBAAyB;AAC/B;AAAA,MACD;AAED,UAAI,gBAAgB,MAAMA,QAAO,QAAC,OAAO;AAAA,QACvC,QAAQ,eAAe;AAAA,QACvB,MAAM,cAAc,MAAM;AAAA,QAC1B;AAAA,QACA,OAAO;AAAA,UACL,MAAM;AAAA,UACN,QAAQ,MAAM,OAAO;AAAA,QACtB;AAAA,QACD,SAAS;AAAA,UACP,MAAM;AAAA,UACN,QAAQC,KAAAA,MAAW,KAAK;AAAA,QACzB;AAAA,MACL,CAAG;AAED,eAAS,gBAAgB,eAAe;AACtCD,gBAAAA,QAAQ,QAAQ,cAAc,OAAO,KAAK;AAAA,MAC3C;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import { ref, openBlock, createElementBlock, createVNode, unref, isRef, withCtx, Fragment, renderList, createElementVNode, toDisplayString, createBlock, createCommentVNode, createTextVNode } from "vue";
|
2
2
|
import { useRoute } from "vue-router";
|
3
|
-
/* empty css
|
3
|
+
/* empty css */
|
4
4
|
import _sfc_main$9 from "../../../../components/Button/Button.vue.js";
|
5
5
|
/* empty css */
|
6
|
-
import _sfc_main$4 from "../../../../components/Chips/Chips.
|
6
|
+
import _sfc_main$4 from "../../../../components/Chips/Chips.vue2.js";
|
7
7
|
/* empty css */
|
8
8
|
import _sfc_main$5 from "../../../../components/Popup/Popup.vue.js";
|
9
9
|
import _sfc_main$2 from "../../../../components/Feed/Feed.vue.js";
|
@@ -77,13 +77,19 @@ const _sfc_main = {
|
|
77
77
|
};
|
78
78
|
const photos = ref([]);
|
79
79
|
const deletePhoto = async (item) => {
|
80
|
-
|
81
|
-
|
80
|
+
let deletedPhoto = JSON.parse(JSON.stringify(item));
|
81
|
+
deletedPhoto.owner.target = deletedPhoto.owner.target._id;
|
82
|
+
deletedPhoto.creator.target = deletedPhoto.creator.target._id;
|
83
|
+
await gallery.delete(deletedPhoto);
|
84
|
+
gallery.removeItem(deletedPhoto, photos.value);
|
82
85
|
};
|
83
86
|
const changeStatus = async (item, status) => {
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
+
let updatedPhoto = JSON.parse(JSON.stringify(item));
|
88
|
+
updatedPhoto.status = status;
|
89
|
+
updatedPhoto.owner.target = updatedPhoto.owner.target._id;
|
90
|
+
updatedPhoto.creator.target = updatedPhoto.creator.target._id;
|
91
|
+
updatedPhoto = await gallery.update(updatedPhoto);
|
92
|
+
gallery.updateItem(updatedPhoto, photos.value);
|
87
93
|
};
|
88
94
|
const createPhoto = async (status) => {
|
89
95
|
if (uploadedImages.length < 1) {
|
@@ -121,7 +127,7 @@ const _sfc_main = {
|
|
121
127
|
{ name: "Archived", value: "archived" }
|
122
128
|
],
|
123
129
|
actions: [
|
124
|
-
{ method: () => openPhotoPopup(null), label: "Add Photo" }
|
130
|
+
..._ctx.hasAccess(unref(route).params._id, "gallery", "create", state.accesses) ? [{ method: () => openPhotoPopup(null), label: "Add Photo" }] : []
|
125
131
|
],
|
126
132
|
class: "mn-b-small bg-light bg-light radius-big"
|
127
133
|
}, null, 8, ["tabs_current", "actions"]),
|
@@ -165,9 +171,12 @@ const _sfc_main = {
|
|
165
171
|
creator: item.creator,
|
166
172
|
date: item.createdAt,
|
167
173
|
actions: [
|
168
|
-
{ method: () => deletePhoto(item), label: "Delete" },
|
169
|
-
|
170
|
-
|
174
|
+
..._ctx.hasAccess(unref(route).params._id, "gallery", "delete", state.accesses) ? [{ method: () => deletePhoto(item), label: "Delete" }] : [],
|
175
|
+
..._ctx.hasAccess(unref(route).params._id, "gallery", "edit", state.accesses) ? [
|
176
|
+
...item.status !== "archived" ? [{ method: () => changeStatus(item, "archived"), label: "Archive" }] : [],
|
177
|
+
...item.status !== "published" ? [{ method: () => changeStatus(item, "published"), label: "Publish" }] : [],
|
178
|
+
...item.status !== "draft" ? [{ method: () => changeStatus(item, "draft"), label: "Draft" }] : []
|
179
|
+
] : []
|
171
180
|
],
|
172
181
|
class: "pd-small mn-b-small"
|
173
182
|
}, null, 8, ["entity", "user", "owner", "creator", "date", "actions"]),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BackofficeGallery.vue.js","sources":["../../../../../../../src/modules/gallery/components/sections/BackofficeGallery.vue"],"sourcesContent":["<template>\n <div class=\"cols-1 gap-thin pd-thin\">\n <SectionPageTitle\n title=\"Gallery\"\n @update:tabs_current=\"(update) => tab = update\"\n :tabs_current=\"tab\"\n :tabs=\"[\n { name: 'All', value: 'all' },\n { name: 'Featured', value: 'featured' },\n { name: 'Published', value: 'published' },\n { name: 'Draft', value: 'draft' },\n { name: 'Archived', value: 'archived' }\n ]\"\n :actions=\"[\n { method: () => openPhotoPopup(null), label: 'Add Photo' }\n ]\"\n class=\"mn-b-small bg-light bg-light radius-big\"\n />\n\n <Feed\n v-model:items=\"photos\"\n v-model:sort=\"sort\"\n v-model:date=\"date\"\n :states=\"{\n empty: {\n title: 'No Photos Found',\n description: 'Currently, there are no photos in gallery.'\n },\n }\"\n :store=\"{\n read: (options) => gallery.read(options)\n }\"\n :options=\"{\n limit: 15,\n owner: route.params._id,\n ...(tab !== 'all' && { status: tab })\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"cols-3 gap-thin\"\n >\n <div v-for=\"item in items\" :key=\"item._id\" class=\"bg-light radius-small flex-column pos-relative flex-wrap\">\n\n <CardHeader \n :entity=\"item\"\n :entityType=\"'photo'\"\n :user=\"auth.state.user._id\"\n :owner=\"item.creator\" \n :creator=\"item.creator\"\n :date=\"item.createdAt\"\n :actions=\"[\n { method: () => deletePhoto(item), label: 'Delete' },\n { method: () => changeStatus(item,'archived'), label: 'Archive' },\n item.status === 'draft' ? \n { method: () => changeStatus(item,'published'), label: 'Publish' } : \n { method: () => changeStatus(item,'draft'), label: 'Draft' }\n ]\"\n class=\"pd-small mn-b-small\"\n />\n\n <div class=\"pos-relative\">\n <img loading=\"lazy\" \n :src=\"(FILE_SERVER_URL || '') + item.cover\" \n class=\"w-100 h-20r object-fit-contain bg-black \" @click=\"openPreviewPopup(item)\" \n />\n <div \n class=\"pos-absolute pos-t-0 pos-r-0 pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-r-small mn-t-small w-min bg-second radius-extra\"\n >\n {{item.status}}\n </div>\n </div>\n \n <div class=\"pd-small\">\n <Chips \n v-if=\"item.tags?.length > 0\" \n :chips=\"item.tags\"\n />\n </div>\n </div>\n </Feed>\n\n <Popup \n @close-popup=\"closePreviewPopup\" \n :isPopupOpen=\"isOpenPreviewPopup\"\n class=\"bg-black o-hidden w-100 h-100 radius-big\"\n >\n <PhotoViewer\n :photoUrl=\"selectedPhoto.image\"\n />\n </Popup>\n\n <Popup \n title=\"Add Photo\" \n @close-popup=\"closePhotoPopup\" \n :isPopupOpen=\"isOpenPhotoPopup\"\n class=\"bg-white w-max-30r radius-big pd-big\"\n >\n <img loading=\"lazy\" \n v-if=\"selectedImage.cover\" \n :src=\"selectedImage.cover\" \n class=\"radius-small w-100 mn-b-small h-20r object-fit-cover \" \n />\n\n <EditImages \n :images=\"uploadedImages\" \n :uploadPath=\"'/photos'\" \n @update:images=\"onUpdatedImages\" \n class=\"mn-b-semi bg-light radius-medium\"\n />\n\n <BlockTags\n @tags-changed=\"newTags => selectedImage.tags = newTags\"\n :tags=\"selectedImage.tags\"\n :tagsSuggested=\"[\n {text: 'people' },\n {text: 'events' },\n {text: 'place' },\n {text: 'food' },\n {text: 'drinks' },\n {text: 'special' },\n ]\"\n class=\"mn-b-semi\"\n />\n\n <div class=\"flex-nowrap flex gap-thin\">\n <Button \n :submit=\"() => createPhoto('draft')\" \n :callback=\"closePhotoPopup\" \n class=\"t-nowrap bg-second w-100\"\n >\n To drafts\n </Button>\n <Button \n :submit=\"() => createPhoto('published')\" \n :callback=\"closePhotoPopup\" \n class=\"bg-main w-100\"\n >\n Publish\n </Button>\n </div>\n </Popup>\n </div>\n</template>\n\n<script setup>\nimport { ref, onMounted, reactive, computed } from 'vue'\nimport { useRoute } from 'vue-router'\n\nimport Field from '@pf/src/components/Field/Field.vue'\nimport Button from '@pf/src/components/Button/Button.vue'\nimport Select from '@pf/src/components/Select/Select.vue'\nimport Chips from '@pf/src/components/Chips/Chips.vue'\nimport Checkbox from '@pf/src/components/Checkbox/Checkbox.vue';\nimport SelectMulti from '@pf/src/components/SelectMulti/SelectMulti.vue';\nimport Popup from '@pf/src/components/Popup/Popup.vue'\nimport Feed from '@pf/src/components/Feed/Feed.vue'\nimport PhotoViewer from '@pf/src/components/PhotoViewer/PhotoViewer.vue'\n\nimport * as auth from '@pf/src/modules/auth/views/store/auth';\nimport * as organizations from '@pf/src/modules/organizations/store/organizations';\n \nimport gallery from '@pf/src/modules/gallery/store/gallery';\n\nimport CardHeader from '@pf/src/modules/globals/views/components/blocks/CardHeader.vue'\nimport SectionPageTitle from '@pf/src/modules/globals/views/components/sections/SectionPageTitle.vue'\n\n\n\nimport EditImages from '@pf/src/components/EditImages/EditImages.vue';\nimport BlockTags from '@pf/src/components/FieldTags/BlockTags.vue';\n\nconst route = useRoute();\n\n// Tabs\nconst tab = ref('all')\n// Sort\nlet sort = ref({\n param: 'createdAt',\n order: 'desc',\n options: [{\n label: 'Date',\n value: 'createdAt'\n },{\n label: 'Popularity',\n value: 'views'\n },{\n label: 'Creator',\n value: 'creator'\n }]\n})\n// Date\nlet date = ref({\n start: null,\n end: null\n})\n// Popup\n// Preview Photo\nconst isOpenPreviewPopup = ref(false);\nfunction openPreviewPopup(photo) {\n isOpenPreviewPopup.value = true;\n selectedPhoto.value = photo;\n}\nfunction closePreviewPopup() {\n isOpenPreviewPopup.value = false;\n selectedPhoto.value = null;\n}\n// Add Photo\nconst isOpenPhotoPopup = ref(false);\nfunction openPhotoPopup(photo) {\n isOpenPhotoPopup.value = true;\n selectedPhoto.value = photo;\n}\nfunction closePhotoPopup() {\n isOpenPhotoPopup.value = false;\n selectedPhoto.value = null;\n uploadedImages.value = [];\n selectedImage.value = { tags: null, image: null };\n}\n// Selected Photo\nconst selectedPhoto = ref(null);\nconst selectedCategory = ref('all')\nconst selectedImage = ref({\n tags: null,\n image: null\n})\nconst uploadedImages = ref([])\nconst onUpdatedImages = (newImages) => {\n uploadedImages.value = newImages\n}\n// Gallery Grid\nconst photos = ref([])\n\nconst deletePhoto = async (item) => {\n await gallery.delete(item._id);\n gallery.removeItem(item, photos.value)\n};\n\nconst changeStatus = async (item, status) => {\n item.status = status\n await gallery.update(item)\n gallery.updateItem(item, photos.value)\n}\n\nconst createPhoto = async (status) => {\n if (uploadedImages.length < 1) {\n alert('Upload at least 1 image')\n return\n }\n\n let createdPhotos = await gallery.create({\n images: uploadedImages.value,\n tags: selectedImage.value.tags,\n status: status,\n owner: {\n type: 'Organization',\n target: route.params._id\n },\n creator: {\n type: 'User',\n target: auth.state.user._id\n }\n })\n\n for (let createdPhoto of createdPhotos) {\n gallery.addItem(createdPhoto, photos.value)\n }\n}\n</script>\n\n<style scoped>\n</style>"],"names":["auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA4KA,UAAM,QAAQ,SAAQ;AAGtB,UAAM,MAAM,IAAI,KAAK;AAErB,QAAI,OAAO,IAAI;AAAA,MACb,OAAO;AAAA,MACP,OAAO;AAAA,MACP,SAAS,CAAC;AAAA,QACR,OAAO;AAAA,QACP,OAAO;AAAA,MACX,GAAI;AAAA,QACA,OAAO;AAAA,QACP,OAAO;AAAA,MACX,GAAI;AAAA,QACA,OAAO;AAAA,QACP,OAAO;AAAA,MACX,CAAG;AAAA,IACH,CAAC;AAED,QAAI,OAAO,IAAI;AAAA,MACb,OAAO;AAAA,MACP,KAAK;AAAA,IACP,CAAC;AAGD,UAAM,qBAAqB,IAAI,KAAK;AACpC,aAAS,iBAAiB,OAAO;AAC/B,yBAAmB,QAAQ;AAC3B,oBAAc,QAAQ;AAAA,IACxB;AACA,aAAS,oBAAoB;AAC3B,yBAAmB,QAAQ;AAC3B,oBAAc,QAAQ;AAAA,IACxB;AAEA,UAAM,mBAAmB,IAAI,KAAK;AAClC,aAAS,eAAe,OAAO;AAC7B,uBAAiB,QAAQ;AACzB,oBAAc,QAAQ;AAAA,IACxB;AACA,aAAS,kBAAkB;AACzB,uBAAiB,QAAQ;AACzB,oBAAc,QAAQ;AACtB,qBAAe,QAAQ;AACvB,oBAAc,QAAQ,EAAE,MAAM,MAAM,OAAO;IAC7C;AAEA,UAAM,gBAAgB,IAAI,IAAI;AACL,QAAI,KAAK;AAClC,UAAM,gBAAgB,IAAI;AAAA,MACxB,MAAM;AAAA,MACN,OAAO;AAAA,IACT,CAAC;AACD,UAAM,iBAAiB,IAAI,EAAE;AAC7B,UAAM,kBAAkB,CAAC,cAAc;AACrC,qBAAe,QAAQ;AAAA,IACzB;AAEA,UAAM,SAAS,IAAI,EAAE;AAErB,UAAM,cAAc,OAAO,SAAS;AAClC,YAAM,QAAQ,OAAO,KAAK,GAAG;AAC7B,cAAQ,WAAW,MAAM,OAAO,KAAK;AAAA,IACvC;AAEA,UAAM,eAAe,OAAO,MAAM,WAAW;AAC3C,WAAK,SAAS;AACd,YAAM,QAAQ,OAAO,IAAI;AACzB,cAAQ,WAAW,MAAM,OAAO,KAAK;AAAA,IACvC;AAEA,UAAM,cAAc,OAAO,WAAW;AACpC,UAAI,eAAe,SAAS,GAAG;AAC7B,cAAM,yBAAyB;AAC/B;AAAA,MACD;AAED,UAAI,gBAAgB,MAAM,QAAQ,OAAO;AAAA,QACvC,QAAQ,eAAe;AAAA,QACvB,MAAM,cAAc,MAAM;AAAA,QAC1B;AAAA,QACA,OAAO;AAAA,UACL,MAAM;AAAA,UACN,QAAQ,MAAM,OAAO;AAAA,QACtB;AAAA,QACD,SAAS;AAAA,UACP,MAAM;AAAA,UACN,QAAQA,MAAW,KAAK;AAAA,QACzB;AAAA,MACL,CAAG;AAED,eAAS,gBAAgB,eAAe;AACtC,gBAAQ,QAAQ,cAAc,OAAO,KAAK;AAAA,MAC3C;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"BackofficeGallery.vue.js","sources":["../../../../../../../src/modules/gallery/components/sections/BackofficeGallery.vue"],"sourcesContent":["<template>\n <div class=\"cols-1 gap-thin pd-thin\">\n <SectionPageTitle\n title=\"Gallery\"\n @update:tabs_current=\"(update) => tab = update\"\n :tabs_current=\"tab\"\n :tabs=\"[\n { name: 'All', value: 'all' },\n { name: 'Featured', value: 'featured' },\n { name: 'Published', value: 'published' },\n { name: 'Draft', value: 'draft' },\n { name: 'Archived', value: 'archived' }\n ]\"\n :actions=\"[\n ...(hasAccess(route.params._id, 'gallery', 'create', auth.state.accesses) ? [{ method: () => openPhotoPopup(null), label: 'Add Photo' }] : [])\n ]\"\n class=\"mn-b-small bg-light bg-light radius-big\"\n />\n\n <Feed\n v-model:items=\"photos\"\n v-model:sort=\"sort\"\n v-model:date=\"date\"\n :states=\"{\n empty: {\n title: 'No Photos Found',\n description: 'Currently, there are no photos in gallery.'\n },\n }\"\n :store=\"{\n read: (options) => gallery.read(options)\n }\"\n :options=\"{\n limit: 15,\n owner: route.params._id,\n ...(tab !== 'all' && { status: tab })\n }\"\n v-slot=\"{ \n items \n }\"\n class=\"cols-3 gap-thin\"\n >\n <div v-for=\"item in items\" :key=\"item._id\" class=\"bg-light radius-small flex-column pos-relative flex-wrap\">\n\n <CardHeader \n :entity=\"item\"\n :entityType=\"'photo'\"\n :user=\"auth.state.user._id\"\n :owner=\"item.creator\" \n :creator=\"item.creator\"\n :date=\"item.createdAt\"\n :actions=\"[\n ...(hasAccess(route.params._id, 'gallery', 'delete', auth.state.accesses) ? [{ method: () => deletePhoto(item), label: 'Delete' }] : []),\n ...(hasAccess(route.params._id, 'gallery', 'edit', auth.state.accesses) ? [\n ...(item.status !== 'archived' ? [{ method: () => changeStatus(item, 'archived'), label: 'Archive' }] : []),\n ...(item.status !== 'published' ? [{ method: () => changeStatus(item, 'published'), label: 'Publish' }] : []),\n ...(item.status !== 'draft' ? [{ method: () => changeStatus(item, 'draft'), label: 'Draft' }] : [])\n ] : [])\n ]\"\n class=\"pd-small mn-b-small\"\n />\n\n <div class=\"pos-relative\">\n <img loading=\"lazy\" \n :src=\"(FILE_SERVER_URL || '') + item.cover\" \n class=\"w-100 h-20r object-fit-contain bg-black \" @click=\"openPreviewPopup(item)\" \n />\n <div \n class=\"pos-absolute pos-t-0 pos-r-0 pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-r-small mn-t-small w-min bg-second radius-extra\"\n >\n {{item.status}}\n </div>\n </div>\n \n <div class=\"pd-small\">\n <Chips \n v-if=\"item.tags?.length > 0\" \n :chips=\"item.tags\"\n />\n </div>\n </div>\n </Feed>\n\n <Popup \n @close-popup=\"closePreviewPopup\" \n :isPopupOpen=\"isOpenPreviewPopup\"\n class=\"bg-black o-hidden w-100 h-100 radius-big\"\n >\n <PhotoViewer\n :photoUrl=\"selectedPhoto.image\"\n />\n </Popup>\n\n <Popup \n title=\"Add Photo\" \n @close-popup=\"closePhotoPopup\" \n :isPopupOpen=\"isOpenPhotoPopup\"\n class=\"bg-white w-max-30r radius-big pd-big\"\n >\n <img loading=\"lazy\" \n v-if=\"selectedImage.cover\" \n :src=\"selectedImage.cover\" \n class=\"radius-small w-100 mn-b-small h-20r object-fit-cover \" \n />\n\n <EditImages \n :images=\"uploadedImages\" \n :uploadPath=\"'/photos'\" \n @update:images=\"onUpdatedImages\" \n class=\"mn-b-semi bg-light radius-medium\"\n />\n\n <BlockTags\n @tags-changed=\"newTags => selectedImage.tags = newTags\"\n :tags=\"selectedImage.tags\"\n :tagsSuggested=\"[\n {text: 'people' },\n {text: 'events' },\n {text: 'place' },\n {text: 'food' },\n {text: 'drinks' },\n {text: 'special' },\n ]\"\n class=\"mn-b-semi\"\n />\n\n <div class=\"flex-nowrap flex gap-thin\">\n <Button \n :submit=\"() => createPhoto('draft')\" \n :callback=\"closePhotoPopup\" \n class=\"t-nowrap bg-second w-100\"\n >\n To drafts\n </Button>\n <Button \n :submit=\"() => createPhoto('published')\" \n :callback=\"closePhotoPopup\" \n class=\"bg-main w-100\"\n >\n Publish\n </Button>\n </div>\n </Popup>\n </div>\n</template>\n\n<script setup>\nimport { ref, onMounted, reactive, computed } from 'vue'\nimport { useRoute } from 'vue-router'\n\nimport Field from '@pf/src/components/Field/Field.vue'\nimport Button from '@pf/src/components/Button/Button.vue'\nimport Select from '@pf/src/components/Select/Select.vue'\nimport Chips from '@pf/src/components/Chips/Chips.vue'\nimport Checkbox from '@pf/src/components/Checkbox/Checkbox.vue';\nimport SelectMulti from '@pf/src/components/SelectMulti/SelectMulti.vue';\nimport Popup from '@pf/src/components/Popup/Popup.vue'\nimport Feed from '@pf/src/components/Feed/Feed.vue'\nimport PhotoViewer from '@pf/src/components/PhotoViewer/PhotoViewer.vue'\n\nimport * as auth from '@pf/src/modules/auth/views/store/auth';\nimport * as organizations from '@pf/src/modules/organizations/store/organizations';\n \nimport gallery from '@pf/src/modules/gallery/store/gallery';\n\nimport CardHeader from '@pf/src/modules/globals/views/components/blocks/CardHeader.vue'\nimport SectionPageTitle from '@pf/src/modules/globals/views/components/sections/SectionPageTitle.vue'\n\nimport EditImages from '@pf/src/components/EditImages/EditImages.vue';\nimport BlockTags from '@pf/src/components/FieldTags/BlockTags.vue';\n\nconst route = useRoute();\n\n// Tabs\nconst tab = ref('all')\n// Sort\nlet sort = ref({\n param: 'createdAt',\n order: 'desc',\n options: [{\n label: 'Date',\n value: 'createdAt'\n },{\n label: 'Popularity',\n value: 'views'\n },{\n label: 'Creator',\n value: 'creator'\n }]\n})\n// Date\nlet date = ref({\n start: null,\n end: null\n})\n// Popup\n// Preview Photo\nconst isOpenPreviewPopup = ref(false);\nfunction openPreviewPopup(photo) {\n isOpenPreviewPopup.value = true;\n selectedPhoto.value = photo;\n}\nfunction closePreviewPopup() {\n isOpenPreviewPopup.value = false;\n selectedPhoto.value = null;\n}\n// Add Photo\nconst isOpenPhotoPopup = ref(false);\nfunction openPhotoPopup(photo) {\n isOpenPhotoPopup.value = true;\n selectedPhoto.value = photo;\n}\nfunction closePhotoPopup() {\n isOpenPhotoPopup.value = false;\n selectedPhoto.value = null;\n uploadedImages.value = [];\n selectedImage.value = { tags: null, image: null };\n}\n// Selected Photo\nconst selectedPhoto = ref(null);\nconst selectedCategory = ref('all')\nconst selectedImage = ref({\n tags: null,\n image: null\n})\nconst uploadedImages = ref([])\nconst onUpdatedImages = (newImages) => {\n uploadedImages.value = newImages\n}\n// Gallery Grid\nconst photos = ref([])\n\nconst deletePhoto = async (item) => {\n let deletedPhoto = JSON.parse(JSON.stringify(item));\n\n deletedPhoto.owner.target = deletedPhoto.owner.target._id\n deletedPhoto.creator.target = deletedPhoto.creator.target._id\n\n await gallery.delete(deletedPhoto);\n\n gallery.removeItem(deletedPhoto, photos.value)\n};\n\nconst changeStatus = async (item, status) => {\n let updatedPhoto = JSON.parse(JSON.stringify(item));\n\n updatedPhoto.status = status\n\n updatedPhoto.owner.target = updatedPhoto.owner.target._id\n updatedPhoto.creator.target = updatedPhoto.creator.target._id\n\n updatedPhoto = await gallery.update(updatedPhoto)\n gallery.updateItem(updatedPhoto, photos.value)\n}\n\nconst createPhoto = async (status) => {\n if (uploadedImages.length < 1) {\n alert('Upload at least 1 image')\n return\n }\n\n let createdPhotos = await gallery.create({\n images: uploadedImages.value,\n tags: selectedImage.value.tags,\n status: status,\n owner: {\n type: 'Organization',\n target: route.params._id\n },\n creator: {\n type: 'User',\n target: auth.state.user._id\n }\n })\n\n for (let createdPhoto of createdPhotos) {\n gallery.addItem(createdPhoto, photos.value)\n }\n}\n</script>\n\n<style scoped>\n</style>"],"names":["auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA2KA,UAAM,QAAQ,SAAQ;AAGtB,UAAM,MAAM,IAAI,KAAK;AAErB,QAAI,OAAO,IAAI;AAAA,MACb,OAAO;AAAA,MACP,OAAO;AAAA,MACP,SAAS,CAAC;AAAA,QACR,OAAO;AAAA,QACP,OAAO;AAAA,MACX,GAAI;AAAA,QACA,OAAO;AAAA,QACP,OAAO;AAAA,MACX,GAAI;AAAA,QACA,OAAO;AAAA,QACP,OAAO;AAAA,MACX,CAAG;AAAA,IACH,CAAC;AAED,QAAI,OAAO,IAAI;AAAA,MACb,OAAO;AAAA,MACP,KAAK;AAAA,IACP,CAAC;AAGD,UAAM,qBAAqB,IAAI,KAAK;AACpC,aAAS,iBAAiB,OAAO;AAC/B,yBAAmB,QAAQ;AAC3B,oBAAc,QAAQ;AAAA,IACxB;AACA,aAAS,oBAAoB;AAC3B,yBAAmB,QAAQ;AAC3B,oBAAc,QAAQ;AAAA,IACxB;AAEA,UAAM,mBAAmB,IAAI,KAAK;AAClC,aAAS,eAAe,OAAO;AAC7B,uBAAiB,QAAQ;AACzB,oBAAc,QAAQ;AAAA,IACxB;AACA,aAAS,kBAAkB;AACzB,uBAAiB,QAAQ;AACzB,oBAAc,QAAQ;AACtB,qBAAe,QAAQ;AACvB,oBAAc,QAAQ,EAAE,MAAM,MAAM,OAAO;IAC7C;AAEA,UAAM,gBAAgB,IAAI,IAAI;AACL,QAAI,KAAK;AAClC,UAAM,gBAAgB,IAAI;AAAA,MACxB,MAAM;AAAA,MACN,OAAO;AAAA,IACT,CAAC;AACD,UAAM,iBAAiB,IAAI,EAAE;AAC7B,UAAM,kBAAkB,CAAC,cAAc;AACrC,qBAAe,QAAQ;AAAA,IACzB;AAEA,UAAM,SAAS,IAAI,EAAE;AAErB,UAAM,cAAc,OAAO,SAAS;AAClC,UAAI,eAAe,KAAK,MAAM,KAAK,UAAU,IAAI,CAAC;AAElD,mBAAa,MAAM,SAAS,aAAa,MAAM,OAAO;AACtD,mBAAa,QAAQ,SAAS,aAAa,QAAQ,OAAO;AAE1D,YAAM,QAAQ,OAAO,YAAY;AAEjC,cAAQ,WAAW,cAAc,OAAO,KAAK;AAAA,IAC/C;AAEA,UAAM,eAAe,OAAO,MAAM,WAAW;AAC3C,UAAI,eAAe,KAAK,MAAM,KAAK,UAAU,IAAI,CAAC;AAElD,mBAAa,SAAS;AAEtB,mBAAa,MAAM,SAAS,aAAa,MAAM,OAAO;AACtD,mBAAa,QAAQ,SAAS,aAAa,QAAQ,OAAO;AAE1D,qBAAe,MAAM,QAAQ,OAAO,YAAY;AAChD,cAAQ,WAAW,cAAc,OAAO,KAAK;AAAA,IAC/C;AAEA,UAAM,cAAc,OAAO,WAAW;AACpC,UAAI,eAAe,SAAS,GAAG;AAC7B,cAAM,yBAAyB;AAC/B;AAAA,MACD;AAED,UAAI,gBAAgB,MAAM,QAAQ,OAAO;AAAA,QACvC,QAAQ,eAAe;AAAA,QACvB,MAAM,cAAc,MAAM;AAAA,QAC1B;AAAA,QACA,OAAO;AAAA,UACL,MAAM;AAAA,UACN,QAAQ,MAAM,OAAO;AAAA,QACtB;AAAA,QACD,SAAS;AAAA,UACP,MAAM;AAAA,UACN,QAAQA,MAAW,KAAK;AAAA,QACzB;AAAA,MACL,CAAG;AAED,eAAS,gBAAgB,eAAe;AACtC,gBAAQ,QAAQ,cAAc,OAAO,KAAK;AAAA,MAC3C;AAAA,IACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
|
+
const ownership_validation = require("../../auth/views/middlewares/ownership.validation.cjs");
|
3
4
|
const gallery = [{
|
4
5
|
path: "gallery",
|
5
6
|
name: "Backoffice Gallery",
|
@@ -7,9 +8,11 @@ const gallery = [{
|
|
7
8
|
title: {
|
8
9
|
en: "Backoffice Gallery",
|
9
10
|
ru: "Управление Галерей"
|
10
|
-
}
|
11
|
-
authorize: []
|
11
|
+
}
|
12
12
|
},
|
13
|
+
beforeEnter: [
|
14
|
+
ownership_validation.requiresAccess("gallery", "read")
|
15
|
+
],
|
13
16
|
component: () => Promise.resolve().then(() => require(
|
14
17
|
/* webpackChunkName: 'BackofficeGallery' */
|
15
18
|
"../components/sections/BackofficeGallery.vue.cjs"
|
package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"gallery.backoffice.router.cjs","sources":["../../../../../../src/modules/gallery/router/gallery.backoffice.router.js"],"sourcesContent":["
|
1
|
+
{"version":3,"file":"gallery.backoffice.router.cjs","sources":["../../../../../../src/modules/gallery/router/gallery.backoffice.router.js"],"sourcesContent":["import * as validationOwnership from '@pf/src/modules/auth/views/middlewares/ownership.validation';\n\nconst gallery = [{\n path: 'gallery',\n name: 'Backoffice Gallery',\n meta: {\n title: {\n en: 'Backoffice Gallery',\n ru: 'Управление Галерей'\n },\n },\n beforeEnter: [\n validationOwnership.requiresAccess('gallery', 'read')\n ],\n component: () => import(/* webpackChunkName: 'BackofficeGallery' */ '@pf/src/modules/gallery/components/sections/BackofficeGallery.vue'),\n}];\n\nexport default gallery;"],"names":["validationOwnership.requiresAccess"],"mappings":";;;AAEK,MAAC,UAAU,CAAC;AAAA,EACf,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,IACJ,OAAO;AAAA,MACL,IAAI;AAAA,MACJ,IAAI;AAAA,IACL;AAAA,EACF;AAAA,EACD,aAAa;AAAA,IACXA,qBAAkC,eAAC,WAAW,MAAM;AAAA,EACrD;AAAA,EACD,WAAW,MAAM,QAAO,QAAA,EAAA,KAAA,MAAA;AAAA;AAAA,IAA4C;AAAA,EAAmE,CAAC;AAC1I,CAAC;;"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { requiresAccess } from "../../auth/views/middlewares/ownership.validation.js";
|
1
2
|
const gallery = [{
|
2
3
|
path: "gallery",
|
3
4
|
name: "Backoffice Gallery",
|
@@ -5,9 +6,11 @@ const gallery = [{
|
|
5
6
|
title: {
|
6
7
|
en: "Backoffice Gallery",
|
7
8
|
ru: "Управление Галерей"
|
8
|
-
}
|
9
|
-
authorize: []
|
9
|
+
}
|
10
10
|
},
|
11
|
+
beforeEnter: [
|
12
|
+
requiresAccess("gallery", "read")
|
13
|
+
],
|
11
14
|
component: () => import(
|
12
15
|
/* webpackChunkName: 'BackofficeGallery' */
|
13
16
|
"../components/sections/BackofficeGallery.vue.js"
|
package/dist/prometheus-framework/src/modules/gallery/router/gallery.backoffice.router.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"gallery.backoffice.router.js","sources":["../../../../../../src/modules/gallery/router/gallery.backoffice.router.js"],"sourcesContent":["
|
1
|
+
{"version":3,"file":"gallery.backoffice.router.js","sources":["../../../../../../src/modules/gallery/router/gallery.backoffice.router.js"],"sourcesContent":["import * as validationOwnership from '@pf/src/modules/auth/views/middlewares/ownership.validation';\n\nconst gallery = [{\n path: 'gallery',\n name: 'Backoffice Gallery',\n meta: {\n title: {\n en: 'Backoffice Gallery',\n ru: 'Управление Галерей'\n },\n },\n beforeEnter: [\n validationOwnership.requiresAccess('gallery', 'read')\n ],\n component: () => import(/* webpackChunkName: 'BackofficeGallery' */ '@pf/src/modules/gallery/components/sections/BackofficeGallery.vue'),\n}];\n\nexport default gallery;"],"names":["validationOwnership.requiresAccess"],"mappings":";AAEK,MAAC,UAAU,CAAC;AAAA,EACf,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,IACJ,OAAO;AAAA,MACL,IAAI;AAAA,MACJ,IAAI;AAAA,IACL;AAAA,EACF;AAAA,EACD,aAAa;AAAA,IACXA,eAAmC,WAAW,MAAM;AAAA,EACrD;AAAA,EACD,WAAW,MAAM;AAAA;AAAA,IAAmD;AAAA,EAAmE;AACzI,CAAC;"}
|
@@ -8,6 +8,7 @@ const Header = require("./views/components/partials/Header.vue.cjs");
|
|
8
8
|
const Sidebar = require("./views/components/partials/Sidebar.vue.cjs");
|
9
9
|
const BottomNavigationBar = require("./views/components/partials/BottomNavigationBar.vue.cjs");
|
10
10
|
const mixins = require("./views/mixins/mixins.cjs");
|
11
|
+
const vueAppRenderer = require("./views/utils/vue-app-renderer.cjs");
|
11
12
|
const globals = require("./views/store/globals.cjs");
|
12
13
|
function initializeGlobals(app, store, router, options = {}) {
|
13
14
|
const route = options.route || "Home";
|
@@ -60,6 +61,7 @@ exports.layoutClient = Client.default;
|
|
60
61
|
exports.Header = Header.default;
|
61
62
|
exports.Sidebar = Sidebar.default;
|
62
63
|
exports.mixins = mixins;
|
64
|
+
exports.appRenderer = vueAppRenderer;
|
63
65
|
exports.storeGlobals = globals;
|
64
66
|
exports.default = ModuleGlobals;
|
65
67
|
//# sourceMappingURL=globals.client.cjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"globals.client.cjs","sources":["../../../../../src/modules/globals/globals.client.js"],"sourcesContent":["// Components\n// import Client from \"./components/layouts/Client.vue\"\n\nimport getBrowserLocale from './views/localization/get-browser-locale.js';\nimport scrollBehavior from './views/router/scrollBehavior.js';\n\nimport layoutApp from './views/components/layouts/App.vue'\nimport layoutClient from './views/components/layouts/Client.vue'\nimport Header from '@pf/src/modules/globals/views/components/partials/Header.vue'\nimport Sidebar from '@pf/src/modules/globals/views/components/partials/Sidebar.vue'\nimport BottomNavigationBar from '@pf/src/modules/globals/views/components/partials/BottomNavigationBar.vue'\n\nimport * as mixins from './views/mixins/mixins.js'\nimport * as storeGlobals from './views/store/globals.js';\n\nexport {\n // Client,\n mixins,\n scrollBehavior,\n getBrowserLocale,\n // Store\n storeGlobals,\n // Components\n layoutClient,\n layoutApp,\n Header,\n Sidebar\n};\n\n// Пример функции инициализации для модуля заказов\nfunction initializeGlobals(app, store, router, options = {}) {\n const route = options.route || 'Home';\n\n const envVariables = [\n 'NODE_ENV',\n 'PORT',\n 'APP_NAME',\n 'DOMAIN_URL',\n 'API_URL',\n 'WSS_URL',\n 'FILE_SERVER_URL',\n 'WDT_TOKEN',\n 'WDM_URL_PROD',\n 'GOOGLE_MAPS_API_KEY',\n 'MOBILE_APP'\n ];\n\n app.config.globalProperties.DOMAIN_URL = process.env.DOMAIN_URL;\n app.config.globalProperties.API_URL = process.env.API_URL;\n app.config.globalProperties.MOBILE_APP = process.env.MOBILE_APP;\n app.config.globalProperties.FILE_SERVER_URL = process.env.FILE_SERVER_URL;\n app.config.globalProperties.GOOGLE_MAPS_API_KEY = process.env.GOOGLE_MAPS_API_KEY;\n\n app\n .mixin(mixins.globalMixins);\n \n // Change Locale to Route Locale if available\n router.beforeEach((to, from, next) => {\n const locale = to.params.locale;\n\n if (locale) {\n if (!app.config.globalProperties.$i18n.availableLocales.includes(locale)) {\n return next({ path: '/404' });\n } else {\n app.config.globalProperties.$i18n.locale = locale;\n return next();\n }\n }\n\n return next();\n \n });\n\n store.addStore('globals', storeGlobals);\n\n router.addRoute(route, { path: '404', name: 'notfound', component: () => import('@pf/src/modules/globals/views/components/pages/404.vue') });\n router.addRoute(route, { path: '401', name: 'unauthorized', component: () => import('@pf/src/modules/globals/views/components/pages/401.vue') });\n router.addRoute(route, { path: ':pathMatch(.*)*', name: 'NotFound', redirect: { name: 'notfound' } });\n}\n\nconst ModuleGlobals = {\n initialize: initializeGlobals,\n views: {\n store: {\n storeGlobals,\n },\n router: {\n // routerOrders\n },\n components: {\n // Pages\n layoutClient,\n layoutApp,\n Header,\n Sidebar,\n BottomNavigationBar\n }\n }\n}\n\nexport default ModuleGlobals\n"],"names":["mixins.globalMixins","storeGlobals","layoutClient","layoutApp","Header","Sidebar","BottomNavigationBar"],"mappings":"
|
1
|
+
{"version":3,"file":"globals.client.cjs","sources":["../../../../../src/modules/globals/globals.client.js"],"sourcesContent":["// Components\n// import Client from \"./components/layouts/Client.vue\"\n\nimport getBrowserLocale from './views/localization/get-browser-locale.js';\nimport scrollBehavior from './views/router/scrollBehavior.js';\n\nimport layoutApp from './views/components/layouts/App.vue'\nimport layoutClient from './views/components/layouts/Client.vue'\nimport Header from '@pf/src/modules/globals/views/components/partials/Header.vue'\nimport Sidebar from '@pf/src/modules/globals/views/components/partials/Sidebar.vue'\nimport BottomNavigationBar from '@pf/src/modules/globals/views/components/partials/BottomNavigationBar.vue'\n\nimport * as mixins from './views/mixins/mixins.js'\nimport * as appRenderer from './views/utils/vue-app-renderer.js';\nimport * as storeGlobals from './views/store/globals.js';\n\nexport {\n // Client,\n mixins,\n scrollBehavior,\n getBrowserLocale,\n appRenderer,\n // Store\n storeGlobals,\n // Components\n layoutClient,\n layoutApp,\n Header,\n Sidebar\n};\n\n// Пример функции инициализации для модуля заказов\nfunction initializeGlobals(app, store, router, options = {}) {\n const route = options.route || 'Home';\n\n const envVariables = [\n 'NODE_ENV',\n 'PORT',\n 'APP_NAME',\n 'DOMAIN_URL',\n 'API_URL',\n 'WSS_URL',\n 'FILE_SERVER_URL',\n 'WDT_TOKEN',\n 'WDM_URL_PROD',\n 'GOOGLE_MAPS_API_KEY',\n 'MOBILE_APP'\n ];\n\n app.config.globalProperties.DOMAIN_URL = process.env.DOMAIN_URL;\n app.config.globalProperties.API_URL = process.env.API_URL;\n app.config.globalProperties.MOBILE_APP = process.env.MOBILE_APP;\n app.config.globalProperties.FILE_SERVER_URL = process.env.FILE_SERVER_URL;\n app.config.globalProperties.GOOGLE_MAPS_API_KEY = process.env.GOOGLE_MAPS_API_KEY;\n\n app\n .mixin(mixins.globalMixins);\n \n // Change Locale to Route Locale if available\n router.beforeEach((to, from, next) => {\n const locale = to.params.locale;\n\n if (locale) {\n if (!app.config.globalProperties.$i18n.availableLocales.includes(locale)) {\n return next({ path: '/404' });\n } else {\n app.config.globalProperties.$i18n.locale = locale;\n return next();\n }\n }\n\n return next();\n \n });\n\n store.addStore('globals', storeGlobals);\n\n router.addRoute(route, { path: '404', name: 'notfound', component: () => import('@pf/src/modules/globals/views/components/pages/404.vue') });\n router.addRoute(route, { path: '401', name: 'unauthorized', component: () => import('@pf/src/modules/globals/views/components/pages/401.vue') });\n router.addRoute(route, { path: ':pathMatch(.*)*', name: 'NotFound', redirect: { name: 'notfound' } });\n}\n\nconst ModuleGlobals = {\n initialize: initializeGlobals,\n views: {\n store: {\n storeGlobals,\n },\n router: {\n // routerOrders\n },\n components: {\n // Pages\n layoutClient,\n layoutApp,\n Header,\n Sidebar,\n BottomNavigationBar\n }\n }\n}\n\nexport default ModuleGlobals\n"],"names":["mixins.globalMixins","storeGlobals","layoutClient","layoutApp","Header","Sidebar","BottomNavigationBar"],"mappings":";;;;;;;;;;;;AAgCA,SAAS,kBAAkB,KAAK,OAAO,QAAQ,UAAU,CAAA,GAAI;AAC3D,QAAM,QAAQ,QAAQ,SAAS;AAgB/B,MAAI,OAAO,iBAAiB,aAAa,QAAQ,IAAI;AACrD,MAAI,OAAO,iBAAiB,UAAU,QAAQ,IAAI;AAClD,MAAI,OAAO,iBAAiB,aAAa,QAAQ,IAAI;AACrD,MAAI,OAAO,iBAAiB,kBAAkB,QAAQ,IAAI;AAC1D,MAAI,OAAO,iBAAiB,sBAAsB,QAAQ,IAAI;AAE9D,MACG,MAAMA,OAAmB,YAAA;AAG5B,SAAO,WAAW,CAAC,IAAI,MAAM,SAAS;AACpC,UAAM,SAAS,GAAG,OAAO;AAEzB,QAAI,QAAQ;AACV,UAAI,CAAC,IAAI,OAAO,iBAAiB,MAAM,iBAAiB,SAAS,MAAM,GAAG;AACxE,eAAO,KAAK,EAAE,MAAM,OAAQ,CAAA;AAAA,MACpC,OAAa;AACN,YAAI,OAAO,iBAAiB,MAAM,SAAS;AAC3C,eAAO,KAAI;AAAA,MACX;AAAA,IACF;AAED,WAAO,KAAI;AAAA,EAEf,CAAG;AAED,QAAM,SAAS,WAAWC,OAAY;AAEtC,SAAO,SAAS,OAAO,EAAE,MAAM,OAAO,MAAM,YAAY,WAAW,MAAM,qCAAO,sCAAwD,CAAA,EAAG,CAAA;AAC3I,SAAO,SAAS,OAAO,EAAE,MAAM,OAAO,MAAM,gBAAgB,WAAW,MAAM,qCAAO,sCAAwD,CAAA,EAAG,CAAA;AAC/I,SAAO,SAAS,OAAO,EAAE,MAAM,mBAAmB,MAAM,YAAY,UAAU,EAAE,MAAM,WAAU,EAAI,CAAA;AACtG;AAEK,MAAC,gBAAgB;AAAA,EACpB,YAAY;AAAA,EACZ,OAAO;AAAA,IACL,OAAO;AAAA,MACX,cAAMA;AAAAA,IACD;AAAA,IACD,QAAQ;AAAA;AAAA,IAEP;AAAA,IACD,YAAY;AAAA;AAAA,MAEhB,cAAMC,OAAY;AAAA,MAClB,WAAMC,IAAS;AAAA,MACf,QAAMC,OAAM;AAAA,MACZ,SAAMC,QAAO;AAAA,MACb,qBAAMC,oBAAmB;AAAA,IACpB;AAAA,EACF;AACH;;;;;;;;;;;"}
|
@@ -7,6 +7,7 @@ import _sfc_main$3 from "./views/components/partials/Sidebar.vue.js";
|
|
7
7
|
import _sfc_main$4 from "./views/components/partials/BottomNavigationBar.vue.js";
|
8
8
|
import { globalMixins } from "./views/mixins/mixins.js";
|
9
9
|
import * as mixins from "./views/mixins/mixins.js";
|
10
|
+
import * as vueAppRenderer from "./views/utils/vue-app-renderer.js";
|
10
11
|
import * as globals from "./views/store/globals.js";
|
11
12
|
function initializeGlobals(app, store, router, options = {}) {
|
12
13
|
const route = options.route || "Home";
|
@@ -55,6 +56,7 @@ const ModuleGlobals = {
|
|
55
56
|
export {
|
56
57
|
_sfc_main$2 as Header,
|
57
58
|
_sfc_main$3 as Sidebar,
|
59
|
+
vueAppRenderer as appRenderer,
|
58
60
|
ModuleGlobals as default,
|
59
61
|
default2 as getBrowserLocale,
|
60
62
|
_sfc_main$1 as layoutApp,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"globals.client.js","sources":["../../../../../src/modules/globals/globals.client.js"],"sourcesContent":["// Components\n// import Client from \"./components/layouts/Client.vue\"\n\nimport getBrowserLocale from './views/localization/get-browser-locale.js';\nimport scrollBehavior from './views/router/scrollBehavior.js';\n\nimport layoutApp from './views/components/layouts/App.vue'\nimport layoutClient from './views/components/layouts/Client.vue'\nimport Header from '@pf/src/modules/globals/views/components/partials/Header.vue'\nimport Sidebar from '@pf/src/modules/globals/views/components/partials/Sidebar.vue'\nimport BottomNavigationBar from '@pf/src/modules/globals/views/components/partials/BottomNavigationBar.vue'\n\nimport * as mixins from './views/mixins/mixins.js'\nimport * as storeGlobals from './views/store/globals.js';\n\nexport {\n // Client,\n mixins,\n scrollBehavior,\n getBrowserLocale,\n // Store\n storeGlobals,\n // Components\n layoutClient,\n layoutApp,\n Header,\n Sidebar\n};\n\n// Пример функции инициализации для модуля заказов\nfunction initializeGlobals(app, store, router, options = {}) {\n const route = options.route || 'Home';\n\n const envVariables = [\n 'NODE_ENV',\n 'PORT',\n 'APP_NAME',\n 'DOMAIN_URL',\n 'API_URL',\n 'WSS_URL',\n 'FILE_SERVER_URL',\n 'WDT_TOKEN',\n 'WDM_URL_PROD',\n 'GOOGLE_MAPS_API_KEY',\n 'MOBILE_APP'\n ];\n\n app.config.globalProperties.DOMAIN_URL = process.env.DOMAIN_URL;\n app.config.globalProperties.API_URL = process.env.API_URL;\n app.config.globalProperties.MOBILE_APP = process.env.MOBILE_APP;\n app.config.globalProperties.FILE_SERVER_URL = process.env.FILE_SERVER_URL;\n app.config.globalProperties.GOOGLE_MAPS_API_KEY = process.env.GOOGLE_MAPS_API_KEY;\n\n app\n .mixin(mixins.globalMixins);\n \n // Change Locale to Route Locale if available\n router.beforeEach((to, from, next) => {\n const locale = to.params.locale;\n\n if (locale) {\n if (!app.config.globalProperties.$i18n.availableLocales.includes(locale)) {\n return next({ path: '/404' });\n } else {\n app.config.globalProperties.$i18n.locale = locale;\n return next();\n }\n }\n\n return next();\n \n });\n\n store.addStore('globals', storeGlobals);\n\n router.addRoute(route, { path: '404', name: 'notfound', component: () => import('@pf/src/modules/globals/views/components/pages/404.vue') });\n router.addRoute(route, { path: '401', name: 'unauthorized', component: () => import('@pf/src/modules/globals/views/components/pages/401.vue') });\n router.addRoute(route, { path: ':pathMatch(.*)*', name: 'NotFound', redirect: { name: 'notfound' } });\n}\n\nconst ModuleGlobals = {\n initialize: initializeGlobals,\n views: {\n store: {\n storeGlobals,\n },\n router: {\n // routerOrders\n },\n components: {\n // Pages\n layoutClient,\n layoutApp,\n Header,\n Sidebar,\n BottomNavigationBar\n }\n }\n}\n\nexport default ModuleGlobals\n"],"names":["mixins.globalMixins","storeGlobals","layoutClient","layoutApp","Header","Sidebar","BottomNavigationBar"],"mappings":"
|
1
|
+
{"version":3,"file":"globals.client.js","sources":["../../../../../src/modules/globals/globals.client.js"],"sourcesContent":["// Components\n// import Client from \"./components/layouts/Client.vue\"\n\nimport getBrowserLocale from './views/localization/get-browser-locale.js';\nimport scrollBehavior from './views/router/scrollBehavior.js';\n\nimport layoutApp from './views/components/layouts/App.vue'\nimport layoutClient from './views/components/layouts/Client.vue'\nimport Header from '@pf/src/modules/globals/views/components/partials/Header.vue'\nimport Sidebar from '@pf/src/modules/globals/views/components/partials/Sidebar.vue'\nimport BottomNavigationBar from '@pf/src/modules/globals/views/components/partials/BottomNavigationBar.vue'\n\nimport * as mixins from './views/mixins/mixins.js'\nimport * as appRenderer from './views/utils/vue-app-renderer.js';\nimport * as storeGlobals from './views/store/globals.js';\n\nexport {\n // Client,\n mixins,\n scrollBehavior,\n getBrowserLocale,\n appRenderer,\n // Store\n storeGlobals,\n // Components\n layoutClient,\n layoutApp,\n Header,\n Sidebar\n};\n\n// Пример функции инициализации для модуля заказов\nfunction initializeGlobals(app, store, router, options = {}) {\n const route = options.route || 'Home';\n\n const envVariables = [\n 'NODE_ENV',\n 'PORT',\n 'APP_NAME',\n 'DOMAIN_URL',\n 'API_URL',\n 'WSS_URL',\n 'FILE_SERVER_URL',\n 'WDT_TOKEN',\n 'WDM_URL_PROD',\n 'GOOGLE_MAPS_API_KEY',\n 'MOBILE_APP'\n ];\n\n app.config.globalProperties.DOMAIN_URL = process.env.DOMAIN_URL;\n app.config.globalProperties.API_URL = process.env.API_URL;\n app.config.globalProperties.MOBILE_APP = process.env.MOBILE_APP;\n app.config.globalProperties.FILE_SERVER_URL = process.env.FILE_SERVER_URL;\n app.config.globalProperties.GOOGLE_MAPS_API_KEY = process.env.GOOGLE_MAPS_API_KEY;\n\n app\n .mixin(mixins.globalMixins);\n \n // Change Locale to Route Locale if available\n router.beforeEach((to, from, next) => {\n const locale = to.params.locale;\n\n if (locale) {\n if (!app.config.globalProperties.$i18n.availableLocales.includes(locale)) {\n return next({ path: '/404' });\n } else {\n app.config.globalProperties.$i18n.locale = locale;\n return next();\n }\n }\n\n return next();\n \n });\n\n store.addStore('globals', storeGlobals);\n\n router.addRoute(route, { path: '404', name: 'notfound', component: () => import('@pf/src/modules/globals/views/components/pages/404.vue') });\n router.addRoute(route, { path: '401', name: 'unauthorized', component: () => import('@pf/src/modules/globals/views/components/pages/401.vue') });\n router.addRoute(route, { path: ':pathMatch(.*)*', name: 'NotFound', redirect: { name: 'notfound' } });\n}\n\nconst ModuleGlobals = {\n initialize: initializeGlobals,\n views: {\n store: {\n storeGlobals,\n },\n router: {\n // routerOrders\n },\n components: {\n // Pages\n layoutClient,\n layoutApp,\n Header,\n Sidebar,\n BottomNavigationBar\n }\n }\n}\n\nexport default ModuleGlobals\n"],"names":["mixins.globalMixins","storeGlobals","layoutClient","layoutApp","Header","Sidebar","BottomNavigationBar"],"mappings":";;;;;;;;;;;AAgCA,SAAS,kBAAkB,KAAK,OAAO,QAAQ,UAAU,CAAA,GAAI;AAC3D,QAAM,QAAQ,QAAQ,SAAS;AAgB/B,MAAI,OAAO,iBAAiB,aAAa,QAAQ,IAAI;AACrD,MAAI,OAAO,iBAAiB,UAAU,QAAQ,IAAI;AAClD,MAAI,OAAO,iBAAiB,aAAa,QAAQ,IAAI;AACrD,MAAI,OAAO,iBAAiB,kBAAkB,QAAQ,IAAI;AAC1D,MAAI,OAAO,iBAAiB,sBAAsB,QAAQ,IAAI;AAE9D,MACG,MAAMA,YAAmB;AAG5B,SAAO,WAAW,CAAC,IAAI,MAAM,SAAS;AACpC,UAAM,SAAS,GAAG,OAAO;AAEzB,QAAI,QAAQ;AACV,UAAI,CAAC,IAAI,OAAO,iBAAiB,MAAM,iBAAiB,SAAS,MAAM,GAAG;AACxE,eAAO,KAAK,EAAE,MAAM,OAAQ,CAAA;AAAA,MACpC,OAAa;AACN,YAAI,OAAO,iBAAiB,MAAM,SAAS;AAC3C,eAAO,KAAI;AAAA,MACX;AAAA,IACF;AAED,WAAO,KAAI;AAAA,EAEf,CAAG;AAED,QAAM,SAAS,WAAWC,OAAY;AAEtC,SAAO,SAAS,OAAO,EAAE,MAAM,OAAO,MAAM,YAAY,WAAW,MAAM,OAAO,qCAAwD,EAAG,CAAA;AAC3I,SAAO,SAAS,OAAO,EAAE,MAAM,OAAO,MAAM,gBAAgB,WAAW,MAAM,OAAO,qCAAwD,EAAG,CAAA;AAC/I,SAAO,SAAS,OAAO,EAAE,MAAM,mBAAmB,MAAM,YAAY,UAAU,EAAE,MAAM,WAAU,EAAI,CAAA;AACtG;AAEK,MAAC,gBAAgB;AAAA,EACpB,YAAY;AAAA,EACZ,OAAO;AAAA,IACL,OAAO;AAAA,MACX,cAAMA;AAAAA,IACD;AAAA,IACD,QAAQ;AAAA;AAAA,IAEP;AAAA,IACD,YAAY;AAAA;AAAA,MAEhB,cAAMC;AAAAA,MACN,WAAMC;AAAAA,MACN,QAAMC;AAAAA,MACN,SAAMC;AAAAA,MACN,qBAAMC;AAAAA,IACD;AAAA,EACF;AACH;"}
|
@@ -57,9 +57,10 @@ class Store {
|
|
57
57
|
body: item
|
58
58
|
});
|
59
59
|
}
|
60
|
-
async delete(
|
61
|
-
return await this.request(`/delete
|
62
|
-
method: "DELETE"
|
60
|
+
async delete(item) {
|
61
|
+
return await this.request(`/delete`, {
|
62
|
+
method: "DELETE",
|
63
|
+
body: item
|
63
64
|
});
|
64
65
|
}
|
65
66
|
// Enhanced Mutations utilizing Vue reactivity system efficiently
|