@ozdao/prometheus-framework 0.2.309 → 0.2.310
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/products.server.js +196 -198
- package/dist/products.server.mjs +196 -198
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Block/Block.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +2 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +3 -2
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js.map +1 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +93 -0
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +94 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js.map +1 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue2.cjs +0 -93
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue2.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue2.js +1 -94
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue2.js.map +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +13 -12
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +13 -12
- package/dist/prometheus-framework/src/components/Field/Field.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/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 +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/EnterPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Invite.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ResetPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignIn.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/SignUp.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/components/sections/ProfileEditCredentials.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js +1 -0
- package/dist/prometheus-framework/src/modules/auth/views/middlewares/auth.validation.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.cjs +6 -2
- 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 +6 -2
- package/dist/prometheus-framework/src/modules/auth/views/store/auth.js.map +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +3 -5
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +4 -6
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +2 -2
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Card.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Card.vue.js +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 +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonCheck.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +4 -4
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Event.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +5 -5
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +5 -5
- 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/CardHeader.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/BottomNavigationBar.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/BottomNavigationBar.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/BottomNavigationBar.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/BottomNavigationBar.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.cjs +5 -5
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.js +8 -8
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/NavigationBar.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.cjs +4 -0
- 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 +4 -0
- package/dist/prometheus-framework/src/modules/globals/views/store/globals.js.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormDelivery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/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/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +2 -3
- 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 -4
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/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/MembersAdd.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +743 -743
- package/dist/prometheus-framework/src/modules/pages/pages.client.js +743 -743
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/pages/PageEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardCategory.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.cjs +11 -10
- 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 +11 -10
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardProduct.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/LeftoverPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ListPositions.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs +79 -44
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js +83 -48
- package/dist/prometheus-framework/src/modules/products/components/pages/Categories.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +81 -31
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +91 -41
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +122 -83
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +135 -96
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +39 -21
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +51 -33
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/CategoriesTree.vue.cjs +96 -0
- package/dist/prometheus-framework/src/modules/products/components/sections/CategoriesTree.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/products/components/sections/CategoriesTree.vue.js +96 -0
- package/dist/prometheus-framework/src/modules/products/components/sections/CategoriesTree.vue.js.map +1 -0
- 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 +22 -8
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +22 -8
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/SectionProduct.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/products.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/products.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/router/categories.router.cjs +17 -5
- package/dist/prometheus-framework/src/modules/products/router/categories.router.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/router/categories.router.js +17 -5
- package/dist/prometheus-framework/src/modules/products/router/categories.router.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/router/products.router.cjs +1 -12
- package/dist/prometheus-framework/src/modules/products/router/products.router.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/router/products.router.js +1 -12
- package/dist/prometheus-framework/src/modules/products/router/products.router.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/categories.cjs +52 -71
- package/dist/prometheus-framework/src/modules/products/store/categories.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/categories.js +52 -71
- package/dist/prometheus-framework/src/modules/products/store/categories.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.cjs +6 -8
- package/dist/prometheus-framework/src/modules/products/store/products.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/store/products.js +6 -8
- package/dist/prometheus-framework/src/modules/products/store/products.js.map +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +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 +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Map.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
- 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 +3 -3
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +3 -3
- package/package.json +1 -1
- package/src/components/Block/Block.vue +1 -1
- package/src/components/EditImages/EditImages.vue +1 -1
- package/src/modules/auth/views/middlewares/auth.validation.js +1 -0
- package/src/modules/auth/views/store/auth.js +6 -2
- package/src/modules/backoffice/components/pages/Dashboard.vue +1 -3
- package/src/modules/globals/views/components/partials/BottomNavigationBar.vue +1 -1
- package/src/modules/globals/views/components/partials/NavigationBar.vue +3 -3
- package/src/modules/globals/views/store/globals.js +5 -0
- package/src/modules/organizations/components/pages/Organization.vue +1 -1
- package/src/modules/organizations/components/pages/OrganizationBackoffice.vue +1 -2
- package/src/modules/products/components/blocks/CardCategory.vue +14 -3
- package/src/modules/products/components/blocks/CardProduct.vue +12 -11
- package/src/modules/products/components/pages/Categories.vue +120 -28
- package/src/modules/products/components/pages/CategoryEdit.vue +206 -151
- package/src/modules/products/components/pages/ProductEdit.vue +107 -69
- package/src/modules/products/components/pages/Products.vue +35 -20
- package/src/modules/products/components/sections/CategoriesTree.vue +102 -0
- package/src/modules/products/components/sections/EditProductInfo.vue +53 -40
- package/src/modules/products/controllers/categories.controller.js +177 -97
- package/src/modules/products/controllers/products.controller.js +4 -2
- package/src/modules/products/models/category.model.js +15 -66
- package/src/modules/products/models/product.model.js +15 -12
- package/src/modules/products/products.client.js +0 -1
- package/src/modules/products/router/categories.router.js +17 -5
- package/src/modules/products/router/products.router.js +0 -12
- package/src/modules/products/routes/categories.routes.js +5 -34
- package/src/modules/products/store/categories.js +69 -83
- package/src/modules/products/store/products.js +6 -8
@@ -1,35 +1,51 @@
|
|
1
|
-
import { computed, openBlock, createElementBlock,
|
1
|
+
import { computed, onUnmounted, openBlock, createElementBlock, createBlock, withCtx, createElementVNode, toDisplayString, unref, createVNode, createTextVNode, createCommentVNode, Fragment, renderList } from "vue";
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
3
|
-
import _sfc_main$
|
4
|
-
import _sfc_main$
|
3
|
+
import _sfc_main$4 from "../../../icons/navigation/IconDelete.vue.js";
|
4
|
+
import _sfc_main$3 from "../../../../components/Button/Button.vue.js";
|
5
5
|
import Select from "../../../../components/Select/Select.vue.js";
|
6
|
-
import Field from "../../../../components/Field/Field.
|
7
|
-
import _sfc_main$
|
6
|
+
import Field from "../../../../components/Field/Field.vue.js";
|
7
|
+
import _sfc_main$5 from "../../../../components/Feed/Feed.vue.js";
|
8
|
+
import _sfc_main$2 from "../../../../components/Block/Block.vue.js";
|
9
|
+
import _sfc_main$1 from "../../../icons/navigation/IconCheckmark.vue.js";
|
10
|
+
import { state as state$1 } from "../../../globals/views/store/globals.js";
|
11
|
+
import { state as state$2 } from "../../../auth/views/store/auth.js";
|
8
12
|
import { actions, state } from "../../store/categories.js";
|
9
13
|
/* empty css */
|
10
|
-
const _hoisted_1 = { class: "
|
11
|
-
const _hoisted_2 = { class: "mn-
|
12
|
-
const _hoisted_3 = { class: "
|
13
|
-
const _hoisted_4 =
|
14
|
+
const _hoisted_1 = { class: "pd-thin bg-white for-transition w-100" };
|
15
|
+
const _hoisted_2 = { class: "mn-r-auto" };
|
16
|
+
const _hoisted_3 = { class: "mn-b-medium w-100 flex-nowrap gap-thin flex" };
|
17
|
+
const _hoisted_4 = { class: "flex-v-center flex-nowrap flex" };
|
14
18
|
const _hoisted_5 = ["onClick"];
|
15
19
|
const _hoisted_6 = ["onClick"];
|
20
|
+
const _hoisted_7 = ["onClick"];
|
21
|
+
const _hoisted_8 = ["onClick"];
|
16
22
|
const _sfc_main = {
|
17
23
|
__name: "CategoryEdit",
|
18
24
|
setup(__props) {
|
19
25
|
const route = useRoute();
|
20
26
|
const router = useRouter();
|
21
27
|
if (route.params.category) {
|
22
|
-
actions.
|
28
|
+
actions.read({ url: route.params.category });
|
23
29
|
} else {
|
24
|
-
actions.
|
30
|
+
actions.clean();
|
25
31
|
}
|
26
32
|
computed(() => state.current);
|
27
33
|
computed(() => route.name);
|
34
|
+
state$1.navigation_bar.actions = [{
|
35
|
+
component: _sfc_main$1,
|
36
|
+
props: {
|
37
|
+
fill: "rgb(var(--main))"
|
38
|
+
},
|
39
|
+
condition: () => state$2.user && state$2.user._id,
|
40
|
+
action: () => onSubmit()
|
41
|
+
}], onUnmounted(() => {
|
42
|
+
state$1.navigation_bar.actions = [];
|
43
|
+
});
|
28
44
|
function onSubmit() {
|
29
45
|
if (route.params.category) {
|
30
|
-
actions.
|
46
|
+
actions.update(state.current);
|
31
47
|
} else {
|
32
|
-
actions.
|
48
|
+
actions.create(state.current);
|
33
49
|
}
|
34
50
|
}
|
35
51
|
function redirectTo() {
|
@@ -41,11 +57,14 @@ const _sfc_main = {
|
|
41
57
|
});
|
42
58
|
}
|
43
59
|
return (_ctx, _cache) => {
|
44
|
-
return openBlock(), createElementBlock(
|
45
|
-
|
60
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
61
|
+
!_ctx.MOBILE_APP ? (openBlock(), createBlock(_sfc_main$2, {
|
62
|
+
key: 0,
|
63
|
+
class: "radius-big mn-b-thin flex-nowrap flex-v-center flex"
|
64
|
+
}, {
|
46
65
|
default: withCtx(() => [
|
47
|
-
createElementVNode("h1",
|
48
|
-
createVNode(_sfc_main$
|
66
|
+
createElementVNode("h1", _hoisted_2, toDisplayString(unref(route).params.category ? "Edit Category" : "Add Category"), 1),
|
67
|
+
createVNode(_sfc_main$3, {
|
49
68
|
submit: onSubmit,
|
50
69
|
callback: redirectTo,
|
51
70
|
class: "pd-small radius-big bg-main t-black uppercase t-medium"
|
@@ -57,19 +76,19 @@ const _sfc_main = {
|
|
57
76
|
})
|
58
77
|
]),
|
59
78
|
_: 1
|
60
|
-
}),
|
61
|
-
createVNode(_sfc_main$
|
79
|
+
})) : createCommentVNode("", true),
|
80
|
+
createVNode(_sfc_main$2, {
|
62
81
|
title: "Profile",
|
63
82
|
class: "mn-b-thin"
|
64
83
|
}, {
|
65
84
|
default: withCtx(() => [
|
66
|
-
createElementVNode("div",
|
85
|
+
createElementVNode("div", _hoisted_3, [
|
67
86
|
createVNode(Field, {
|
68
87
|
field: state.current.order,
|
69
88
|
"onUpdate:field": _cache[0] || (_cache[0] = ($event) => state.current.order = $event),
|
70
89
|
label: "Order",
|
71
90
|
disabled: true,
|
72
|
-
class: "w-
|
91
|
+
class: "w-40 bg-white radius-small pd-medium"
|
73
92
|
}, null, 8, ["field"]),
|
74
93
|
createVNode(Field, {
|
75
94
|
field: state.current.url,
|
@@ -77,15 +96,15 @@ const _sfc_main = {
|
|
77
96
|
label: "URL",
|
78
97
|
placeholder: "Enter category URL",
|
79
98
|
class: "w-100 bg-white radius-small pd-medium"
|
80
|
-
}, null, 8, ["field"]),
|
81
|
-
createVNode(Field, {
|
82
|
-
field: state.current.name,
|
83
|
-
"onUpdate:field": _cache[2] || (_cache[2] = ($event) => state.current.name = $event),
|
84
|
-
label: "Name",
|
85
|
-
placeholder: "Enter category name",
|
86
|
-
class: "w-100 bg-white radius-small pd-medium"
|
87
99
|
}, null, 8, ["field"])
|
88
100
|
]),
|
101
|
+
createVNode(Field, {
|
102
|
+
field: state.current.name,
|
103
|
+
"onUpdate:field": _cache[2] || (_cache[2] = ($event) => state.current.name = $event),
|
104
|
+
label: "Name",
|
105
|
+
placeholder: "Enter category name",
|
106
|
+
class: "w-100 mn-b-small bg-white radius-small pd-medium"
|
107
|
+
}, null, 8, ["field"]),
|
89
108
|
createVNode(Select, {
|
90
109
|
select: state.current.status,
|
91
110
|
"onUpdate:select": _cache[3] || (_cache[3] = ($event) => state.current.status = $event),
|
@@ -99,7 +118,7 @@ const _sfc_main = {
|
|
99
118
|
placeholder: "Display product",
|
100
119
|
class: "pos-relative w-100 mn-b-small bg-white radius-small pd-medium"
|
101
120
|
}, null, 8, ["select"]),
|
102
|
-
createElementVNode("div",
|
121
|
+
createElementVNode("div", _hoisted_4, [
|
103
122
|
_cache[6] || (_cache[6] = createElementVNode("h4", { class: "mn-r-thin t-medium" }, "Localization", -1)),
|
104
123
|
createElementVNode("button", {
|
105
124
|
onClick: _cache[4] || (_cache[4] = () => state.current.localization.push({ locale: "", text: "" })),
|
@@ -127,24 +146,55 @@ const _sfc_main = {
|
|
127
146
|
onClick: () => state.current.localization.splice(index, 1),
|
128
147
|
class: "radius-small pd-small flex-center flex aspect-1x1 bg-red"
|
129
148
|
}, [
|
130
|
-
createVNode(_sfc_main$
|
131
|
-
], 8,
|
149
|
+
createVNode(_sfc_main$4, { class: "i-medium" })
|
150
|
+
], 8, _hoisted_5)
|
132
151
|
]);
|
133
152
|
}), 128))
|
134
153
|
]),
|
135
154
|
_: 1
|
136
155
|
}),
|
137
|
-
createVNode(_sfc_main$
|
156
|
+
createVNode(_sfc_main$2, {
|
138
157
|
title: "Subcategories",
|
139
158
|
placeholder: "No subcategories added yet",
|
140
159
|
actions: [{
|
141
160
|
label: "+",
|
142
|
-
function: () => state.current.
|
161
|
+
function: () => state.current.children.push({ name: "", url: "" })
|
143
162
|
}],
|
144
163
|
class: "mn-b-thin"
|
145
164
|
}, {
|
146
165
|
default: withCtx(() => [
|
147
|
-
(
|
166
|
+
createTextVNode(toDisplayString(state.current.children) + " ", 1),
|
167
|
+
createVNode(_sfc_main$5, {
|
168
|
+
states: {
|
169
|
+
empty: {
|
170
|
+
title: "No Events Found",
|
171
|
+
description: "Currently, there are no events available."
|
172
|
+
}
|
173
|
+
},
|
174
|
+
store: {
|
175
|
+
read: (options) => actions.read(options),
|
176
|
+
state
|
177
|
+
},
|
178
|
+
options: {
|
179
|
+
user: state$2.user._id,
|
180
|
+
limit: 10
|
181
|
+
}
|
182
|
+
}, {
|
183
|
+
default: withCtx(({
|
184
|
+
items
|
185
|
+
}) => [
|
186
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(items, (category, index) => {
|
187
|
+
return openBlock(), createElementBlock("div", {
|
188
|
+
onClick: () => {
|
189
|
+
state.current.children.push(category._id);
|
190
|
+
},
|
191
|
+
class: "bg-white pd-medium radius-small mn-b-medium"
|
192
|
+
}, toDisplayString(category.name), 9, _hoisted_6);
|
193
|
+
}), 256))
|
194
|
+
]),
|
195
|
+
_: 1
|
196
|
+
}, 8, ["store", "options"]),
|
197
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(state.current.children, (item, index) => {
|
148
198
|
return openBlock(), createElementBlock("div", {
|
149
199
|
class: "gap-thin mn-b-thin flex-nowrap flex",
|
150
200
|
key: index
|
@@ -162,17 +212,17 @@ const _sfc_main = {
|
|
162
212
|
class: "w-100 bg-white radius-small pd-medium"
|
163
213
|
}, null, 8, ["field", "onUpdate:field"]),
|
164
214
|
createElementVNode("div", {
|
165
|
-
onClick: () => state.current.
|
215
|
+
onClick: () => state.current.children.splice(index, 1),
|
166
216
|
class: "radius-small pd-small flex-center flex aspect-1x1 bg-red"
|
167
217
|
}, [
|
168
|
-
createVNode(_sfc_main$
|
169
|
-
], 8,
|
218
|
+
createVNode(_sfc_main$4, { class: "i-medium" })
|
219
|
+
], 8, _hoisted_7)
|
170
220
|
]);
|
171
221
|
}), 128))
|
172
222
|
]),
|
173
223
|
_: 1
|
174
224
|
}, 8, ["actions"]),
|
175
|
-
createVNode(_sfc_main$
|
225
|
+
createVNode(_sfc_main$2, {
|
176
226
|
title: "Filters",
|
177
227
|
placeholder: "No filters added yet",
|
178
228
|
actions: [{
|
@@ -202,14 +252,14 @@ const _sfc_main = {
|
|
202
252
|
onClick: () => state.current.filters.splice(index, 1),
|
203
253
|
class: "radius-small pd-small flex-center flex aspect-1x1 bg-red"
|
204
254
|
}, [
|
205
|
-
createVNode(_sfc_main$
|
206
|
-
], 8,
|
255
|
+
createVNode(_sfc_main$4, { class: "i-medium" })
|
256
|
+
], 8, _hoisted_8)
|
207
257
|
]);
|
208
258
|
}), 128))
|
209
259
|
]),
|
210
260
|
_: 1
|
211
261
|
}, 8, ["actions"])
|
212
|
-
]
|
262
|
+
]);
|
213
263
|
};
|
214
264
|
}
|
215
265
|
};
|
package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CategoryEdit.vue.js","sources":["../../../../../../../src/modules/products/components/pages/CategoryEdit.vue"],"sourcesContent":["<template>\n <Block class=\"radius-big mn-b-thin flex-nowrap flex-v-center flex\">\n
|
1
|
+
{"version":3,"file":"CategoryEdit.vue.js","sources":["../../../../../../../src/modules/products/components/pages/CategoryEdit.vue"],"sourcesContent":["<template>\n <div class=\"pd-thin bg-white for-transition w-100\">\n <Block v-if=\"!MOBILE_APP\" class=\"radius-big mn-b-thin flex-nowrap flex-v-center flex\">\n <h1 class=\"mn-r-auto\">\n {{route.params.category ? 'Edit Category' : 'Add Category'}}\n </h1>\n\n <Button \n :submit=\"onSubmit\"\n :callback=\"redirectTo\"\n class=\"pd-small radius-big bg-main t-black uppercase t-medium\"\n >\n Save Category \n </Button>\n </Block>\n \n <Block \n title=\"Profile\"\n class=\"mn-b-thin\"\n >\n <div class=\"mn-b-medium w-100 flex-nowrap gap-thin flex\">\n <Field\n v-model:field=\"categories.state.current.order\"\n label=\"Order\"\n :disabled=\"true\"\n class=\"w-40 bg-white radius-small pd-medium\"\n /> \n <Field\n v-model:field=\"categories.state.current.url\"\n label=\"URL\"\n placeholder=\"Enter category URL\"\n class=\"w-100 bg-white radius-small pd-medium\"\n /> \n \n </div>\n <Field\n v-model:field=\"categories.state.current.name\"\n label=\"Name\"\n placeholder=\"Enter category name\"\n class=\"w-100 mn-b-small bg-white radius-small pd-medium\"\n /> \n\n <Select \n v-model:select=\"categories.state.current.status\"\n label=\"Status\"\n :options=\"[\n 'draft', \n 'internal',\n 'published',\n 'removed'\n ]\"\n placeholder=\"Display product\"\n class=\"pos-relative w-100 mn-b-small bg-white radius-small pd-medium\"\n />\n\n <div class=\"flex-v-center flex-nowrap flex\">\n <h4 class=\"mn-r-thin t-medium\">Localization</h4>\n \n <button \n @click=\"() => categories.state.current.localization.push({locale: '', text: ''})\" \n class=\"i-small pd-thin button-delete button\"\n >\n +\n </button>\n </div>\n <div \n class=\"gap-thin mn-b-thin flex-nowrap flex\" \n v-for=\"(item, index) in categories.state.current.localization\" \n :key=\"index\"\n > \n <Field\n v-model:field=\"item.locale\"\n placeholder=\"Locale\"\n class=\"w-100 bg-white radius-small pd-medium\"\n /> \n <Field\n v-model:field=\"item.text\"\n placeholder=\"Text\"\n class=\"w-100 bg-white radius-small pd-medium\"\n />\n <div\n @click=\"() => categories.state.current.localization.splice(index, 1)\" \n class=\"radius-small pd-small flex-center flex aspect-1x1 bg-red\"\n >\n <IconDelete \n class=\"i-medium\"\n />\n </div>\n </div>\n\n \n </Block>\n <!-- Subcategories -->\n <Block\n title=\"Subcategories\"\n placeholder=\"No subcategories added yet\"\n :actions=\"[{\n label: '+',\n function: () => categories.state.current.children.push({name: '', url: ''})\n }]\"\n class=\"mn-b-thin\"\n >\n\n {{categories.state.current.children}}\n <Feed\n :states=\"{\n empty: {\n title: 'No Events Found',\n description: 'Currently, there are no events available.'\n }\n }\"\n :store=\"{\n read: (options) => categories.actions.read(options),\n state: categories.state\n }\"\n :options=\"{\n user: auth.state.user._id,\n limit: 10\n }\"\n v-slot=\"{ \n items \n }\"\n >\n <div \n v-for=\"(category,index) in items\"\n @click=\"() => { categories.state.current.children.push(category._id) }\"\n class=\"bg-white pd-medium radius-small mn-b-medium\"\n >\n {{category.name}}\n </div>\n \n </Feed>\n \n <div \n class=\"gap-thin mn-b-thin flex-nowrap flex\" \n v-for=\"(item, index) in categories.state.current.children\" \n :key=\"index\"\n > \n <Field\n v-model:field=\"item.name\"\n placeholder=\"Subcategory name\"\n class=\"w-100 bg-white radius-small pd-medium\"\n /> \n <Field\n v-model:field=\"item.url\"\n placeholder=\"Subcategory\"\n class=\"w-100 bg-white radius-small pd-medium\"\n />\n <div\n @click=\"() => categories.state.current.children.splice(index, 1)\" \n class=\"radius-small pd-small flex-center flex aspect-1x1 bg-red\"\n >\n <IconDelete \n class=\"i-medium\"\n />\n </div>\n </div> \n </Block>\n <!-- Filters -->\n <Block\n title=\"Filters\"\n placeholder=\"No filters added yet\"\n :actions=\"[{\n label: '+',\n function: () => categories.state.current.filters.push({name: '', url: ''})\n }]\"\n >\n <div \n class=\"gap-thin mn-b-thin flex-nowrap flex\" \n v-for=\"(item, index) in categories.state.current.filters\" \n :key=\"index\"\n > \n <Field\n v-model:field=\"item.name\"\n placeholder=\"Filter name\"\n class=\"w-100 bg-white radius-small pd-medium\"\n /> \n <Field\n v-model:field=\"item.options\"\n placeholder=\"Filter options divided by ,\"\n class=\"w-100 bg-white radius-small pd-medium\"\n />\n <div\n @click=\"() => categories.state.current.filters.splice(index, 1)\" \n class=\"radius-small pd-small flex-center flex aspect-1x1 bg-red\"\n >\n <IconDelete \n class=\"i-medium\"\n />\n </div>\n </div> \n </Block>\n </div>\n \n</template>\n\n<script setup>\n // Import libs\n import { computed, onUnmounted } from 'vue'\n import { useRoute,useRouter } from 'vue-router'\n \n import IconDelete from '@pf/src/modules/icons/navigation/IconDelete.vue';\n\n import Button from \"@pf/src/components/Button/Button.vue\";\n import Select from \"@pf/src/components/Select/Select.vue\";\n import Field from \"@pf/src/components/Field/Field.vue\";\n import Feed from '@pf/src/components/Feed/Feed.vue'\n\n import Block from '@pf/src/components/Block/Block.vue';\n\n import IconCheckmark from '@pf/src/modules/icons/navigation/IconCheckmark.vue'\n\n // Import the new store structure\n import * as globals from '@pf/src/modules/globals/views/store/globals';\n import * as auth from '@pf/src/modules/auth/views/store/auth'; \n import * as categories from '@pf/src/modules/products/store/categories';\n\n const route = useRoute()\n const router = useRouter()\n\n // Data prefetching\n if (route.params.category) {\n categories.actions.read({url: route.params.category})\n } else {\n categories.actions.clean() // Adjusted based on the new store's method to reset the category state\n }\n\n // Accessing state\n const category = computed(() => categories.state.current)\n const routePath = computed(() => route.name)\n\n // Navigation Bar\n globals.state.navigation_bar.actions = [{\n component: IconCheckmark,\n props: {\n fill: \"rgb(var(--main))\" \n },\n condition: () => auth.state.user && auth.state.user._id,\n action: () => onSubmit()\n }],\n\n onUnmounted(() => {\n globals.state.navigation_bar.actions = [];\n });\n\n\n\n // Functions\n function onSubmit() {\n if (route.params.category) {\n categories.actions.update(categories.state.current)\n } else {\n categories.actions.create(categories.state.current)\n }\n }\n\n function redirectTo () {\n router.push({\n name: 'Categories Organization', \n params: { \n _id: route.params._id\n } \n })\n }\n</script>\n\n<style lang=\"scss\">\n /* Your styles here */\n</style>\n"],"names":["categories.actions","categories.state","globals.state","IconCheckmark","auth.state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAyNE,UAAM,QAAQ,SAAU;AACxB,UAAM,SAAS,UAAW;AAG1B,QAAI,MAAM,OAAO,UAAU;AACzBA,cAAmB,KAAK,EAAC,KAAK,MAAM,OAAO,SAAQ,CAAC;AAAA,IACxD,OAAS;AACLA,cAAmB,MAAO;AAAA,IAC3B;AAGgB,aAAS,MAAMC,MAAiB,OAAO;AACtC,aAAS,MAAM,MAAM,IAAI;AAG3CC,YAAc,eAAe,UAAU,CAAC;AAAA,MACtC,WAAWC;AAAAA,MACX,OAAO;AAAA,QACL,MAAM;AAAA,MACP;AAAA,MACD,WAAW,MAAMC,QAAW,QAAQA,QAAW,KAAK;AAAA,MACpD,QAAQ,MAAM,SAAU;AAAA,IAC5B,CAAG,GAEF,YAAY,MAAM;AACfF,cAAc,eAAe,UAAU;IAC3C,CAAG;AAKD,aAAS,WAAW;AAClB,UAAI,MAAM,OAAO,UAAU;AACzBF,gBAAmB,OAAOC,MAAiB,OAAO;AAAA,MACxD,OAAW;AACLD,gBAAmB,OAAOC,MAAiB,OAAO;AAAA,MACnD;AAAA,IACF;AAED,aAAS,aAAc;AACrB,aAAO,KAAK;AAAA,QACV,MAAM;AAAA,QACN,QAAQ;AAAA,UACN,KAAK,MAAM,OAAO;AAAA,QACnB;AAAA,MACP,CAAK;AAAA,IACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
4
|
const Block = require("../../../../components/Block/Block.vue.cjs");
|
5
|
-
const Field = require("../../../../components/Field/Field.
|
5
|
+
const Field = require("../../../../components/Field/Field.vue.cjs");
|
6
6
|
const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
7
7
|
const Select = require("../../../../components/Select/Select.vue.cjs");
|
8
8
|
const Popup = require("../../../../components/Popup/Popup.vue.cjs");
|
9
|
-
;/* empty css
|
9
|
+
;/* empty css */
|
10
10
|
const CardPosition = require("../blocks/CardPosition.vue.cjs");
|
11
11
|
const CardOrderItem = require("../../../orders/components/blocks/CardOrderItem.vue.cjs");
|
12
12
|
const vueRouter = require("vue-router");
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { ref, computed, onMounted, openBlock, createElementBlock, createElementVNode, toDisplayString, unref, createVNode, withCtx, Fragment, renderList, createBlock, createCommentVNode } from "vue";
|
2
2
|
import _sfc_main$4 from "../../../../components/Block/Block.vue.js";
|
3
|
-
import Field from "../../../../components/Field/Field.
|
3
|
+
import Field from "../../../../components/Field/Field.vue.js";
|
4
4
|
import _sfc_main$2 from "../../../../components/Feed/Feed.vue.js";
|
5
5
|
import Select from "../../../../components/Select/Select.vue.js";
|
6
6
|
import _sfc_main$1 from "../../../../components/Popup/Popup.vue.js";
|
7
|
-
/* empty css
|
7
|
+
/* empty css */
|
8
8
|
import _sfc_main$5 from "../blocks/CardPosition.vue.js";
|
9
9
|
import _sfc_main$3 from "../../../orders/components/blocks/CardOrderItem.vue.js";
|
10
10
|
import { useRoute, useRouter } from "vue-router";
|
@@ -6,29 +6,30 @@ require("vue-i18n");
|
|
6
6
|
;/* empty css */
|
7
7
|
const Block = require("../../../../components/Block/Block.vue.cjs");
|
8
8
|
;/* empty css */
|
9
|
-
const Field = require("../../../../components/Field/Field.
|
9
|
+
const Field = require("../../../../components/Field/Field.vue.cjs");
|
10
10
|
const Checkbox = require("../../../../components/Checkbox/Checkbox.vue.cjs");
|
11
|
-
const Button = require("../../../../components/Button/Button.
|
11
|
+
const Button = require("../../../../components/Button/Button.vue.cjs");
|
12
12
|
const Popup = require("../../../../components/Popup/Popup.vue.cjs");
|
13
13
|
const Feed = require("../../../../components/Feed/Feed.vue.cjs");
|
14
|
-
const EditImages = require("../../../../components/EditImages/EditImages.
|
14
|
+
const EditImages = require("../../../../components/EditImages/EditImages.vue.cjs");
|
15
15
|
const IconDelete = require("../../../icons/navigation/IconDelete.vue.cjs");
|
16
16
|
const CardPosition = require("../blocks/CardPosition.vue.cjs");
|
17
17
|
const CardOrderItem = require("../../../orders/components/blocks/CardOrderItem.vue.cjs");
|
18
18
|
const EditProductInfo = require("../sections/EditProductInfo.vue.cjs");
|
19
19
|
const globals = require("../../../globals/views/store/globals.cjs");
|
20
|
+
const auth = require("../../../auth/views/store/auth.cjs");
|
20
21
|
const products = require("../../store/products.cjs");
|
21
22
|
const categories = require("../../store/categories.cjs");
|
22
23
|
;/* empty css */
|
23
|
-
const _hoisted_1 = { class: "for-transition w-100 cols-1 pd-thin gap-thin" };
|
24
|
-
const _hoisted_2 = { class: "mn-r-auto" };
|
24
|
+
const _hoisted_1 = { class: "for-transition w-100 cols-1 bg-white pd-thin gap-thin" };
|
25
|
+
const _hoisted_2 = { class: "t-nowrap mn-r-auto" };
|
25
26
|
const _hoisted_3 = { class: "cols-2 gap-thin" };
|
26
|
-
const _hoisted_4 = {
|
27
|
+
const _hoisted_4 = { class: "radius-small h-100 i-big flex-center flex aspect-1x1 bg-red" };
|
28
|
+
const _hoisted_5 = {
|
27
29
|
key: 0,
|
28
30
|
class: "cols-1 gap-thin"
|
29
31
|
};
|
30
|
-
const
|
31
|
-
const _hoisted_6 = { class: "radius-small h-100 i-big flex-center flex aspect-1x1 bg-red" };
|
32
|
+
const _hoisted_6 = { class: "bg-light mn-b-thin h-min-20r h-max-20r o-scroll pd-medium radius-big" };
|
32
33
|
const _hoisted_7 = { class: "radius-small pd-small flex-center flex aspect-1x1 bg-red" };
|
33
34
|
const _sfc_main = {
|
34
35
|
__name: "ProductEdit",
|
@@ -62,11 +63,25 @@ const _sfc_main = {
|
|
62
63
|
console.error("error");
|
63
64
|
}
|
64
65
|
});
|
65
|
-
function onSubmit() {
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
66
|
+
async function onSubmit() {
|
67
|
+
try {
|
68
|
+
if (route.params.product) {
|
69
|
+
await products.actions.update(route.params.product, products.state.current);
|
70
|
+
} else {
|
71
|
+
products.state.current.owner = {
|
72
|
+
target: route.params._id || auth.state.user._id,
|
73
|
+
type: route.params._id ? "organization" : "user"
|
74
|
+
};
|
75
|
+
products.state.current.creator = {
|
76
|
+
target: auth.state.user._id,
|
77
|
+
type: "user",
|
78
|
+
hidden: false
|
79
|
+
};
|
80
|
+
await products.actions.create(products.state.current);
|
81
|
+
}
|
82
|
+
} catch (error) {
|
83
|
+
globals.setError({ response: { data: { errorCode: "PRODUCT_NOT_CREATED" } } });
|
84
|
+
console.error("Product creation error:", error);
|
70
85
|
}
|
71
86
|
}
|
72
87
|
function onDelete() {
|
@@ -82,9 +97,12 @@ const _sfc_main = {
|
|
82
97
|
}
|
83
98
|
return (_ctx, _cache) => {
|
84
99
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
85
|
-
vue.
|
100
|
+
!_ctx.MOBILE_APP ? (vue.openBlock(), vue.createBlock(Block.default, {
|
101
|
+
key: 0,
|
102
|
+
class: "flex-nowrap gap-small flex-v-center flex"
|
103
|
+
}, {
|
86
104
|
default: vue.withCtx(() => [
|
87
|
-
vue.createElementVNode("
|
105
|
+
vue.createElementVNode("h2", _hoisted_2, vue.toDisplayString(vue.unref(route).params.product ? products.state.current.name : "Create Product"), 1),
|
88
106
|
vue.unref(route).params.product ? (vue.openBlock(), vue.createBlock(Button.default, {
|
89
107
|
key: 0,
|
90
108
|
submit: onDelete,
|
@@ -108,7 +126,7 @@ const _sfc_main = {
|
|
108
126
|
})
|
109
127
|
]),
|
110
128
|
_: 1
|
111
|
-
}),
|
129
|
+
})) : vue.createCommentVNode("", true),
|
112
130
|
vue.createVNode(Block.default, {
|
113
131
|
placeholder: "The product doesn't have any images yet.",
|
114
132
|
class: "h-min"
|
@@ -133,6 +151,70 @@ const _sfc_main = {
|
|
133
151
|
]),
|
134
152
|
_: 1
|
135
153
|
}),
|
154
|
+
vue.createVNode(Block.default, {
|
155
|
+
title: "Categories",
|
156
|
+
actions: [{
|
157
|
+
label: "+",
|
158
|
+
function: () => vue.unref(router).push({
|
159
|
+
name: "Categories",
|
160
|
+
params: {
|
161
|
+
_id: vue.unref(route).params._id
|
162
|
+
}
|
163
|
+
})
|
164
|
+
}]
|
165
|
+
}, {
|
166
|
+
default: vue.withCtx(() => [
|
167
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(categories.state.all, (category, index) => {
|
168
|
+
return vue.openBlock(), vue.createBlock(Checkbox.default, {
|
169
|
+
label: category.name,
|
170
|
+
name: "categories",
|
171
|
+
value: category.url,
|
172
|
+
class: "w-100 mn-t-small bg-white radius-small pd-small",
|
173
|
+
radio: products.state.current.category,
|
174
|
+
"onUpdate:radio": (event) => products.state.current.category = event
|
175
|
+
}, null, 8, ["label", "value", "radio", "onUpdate:radio"]);
|
176
|
+
}), 256))
|
177
|
+
]),
|
178
|
+
_: 1
|
179
|
+
}, 8, ["actions"]),
|
180
|
+
vue.createVNode(Block.default, {
|
181
|
+
title: "Parameters",
|
182
|
+
placeholder: "No parameters added yet",
|
183
|
+
actions: [{
|
184
|
+
label: "+",
|
185
|
+
function: () => products.state.current.information.push({ name: "", value: "" })
|
186
|
+
}],
|
187
|
+
class: "cols-1 gap-thin"
|
188
|
+
}, {
|
189
|
+
default: vue.withCtx(() => [
|
190
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(products.state.current.information, (item, index) => {
|
191
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
192
|
+
class: "gap-thin flex-nowrap flex",
|
193
|
+
key: index
|
194
|
+
}, [
|
195
|
+
vue.createVNode(Field.default, {
|
196
|
+
field: item.name,
|
197
|
+
"onUpdate:field": ($event) => item.name = $event,
|
198
|
+
placeholder: "Название параметра",
|
199
|
+
class: "w-100 bg-white radius-small pd-medium"
|
200
|
+
}, null, 8, ["field", "onUpdate:field"]),
|
201
|
+
vue.createVNode(Field.default, {
|
202
|
+
field: item.value,
|
203
|
+
"onUpdate:field": ($event) => item.value = $event,
|
204
|
+
placeholder: "Значение параметра",
|
205
|
+
class: "w-100 bg-white radius-small pd-medium"
|
206
|
+
}, null, 8, ["field", "onUpdate:field"]),
|
207
|
+
vue.createElementVNode("div", _hoisted_4, [
|
208
|
+
vue.createVNode(IconDelete.default, {
|
209
|
+
onClick: () => products.state.current.information.splice(index, 1),
|
210
|
+
class: "i-medium"
|
211
|
+
}, null, 8, ["onClick"])
|
212
|
+
])
|
213
|
+
]);
|
214
|
+
}), 128))
|
215
|
+
]),
|
216
|
+
_: 1
|
217
|
+
}, 8, ["actions"]),
|
136
218
|
vue.createVNode(Block.default, {
|
137
219
|
title: "Ingredients",
|
138
220
|
placeholder: "No ingridients added yet",
|
@@ -142,7 +224,7 @@ const _sfc_main = {
|
|
142
224
|
}]
|
143
225
|
}, {
|
144
226
|
default: vue.withCtx(() => [
|
145
|
-
products.state.current.ingredients.length > 0 ? (vue.openBlock(), vue.createElementBlock("div",
|
227
|
+
products.state.current.ingredients.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
|
146
228
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(products.state.current.ingredients, (product, index) => {
|
147
229
|
return vue.openBlock(), vue.createBlock(CardPosition.default, {
|
148
230
|
key: product._id,
|
@@ -175,7 +257,7 @@ const _sfc_main = {
|
|
175
257
|
class: "bg-white w-min-30r w-max-30r radius-big pd-medium"
|
176
258
|
}, {
|
177
259
|
default: vue.withCtx(() => [
|
178
|
-
vue.createElementVNode("div",
|
260
|
+
vue.createElementVNode("div", _hoisted_6, [
|
179
261
|
vue.createVNode(Feed.default, {
|
180
262
|
search: {
|
181
263
|
class: "bg-white mn-b-thin"
|
@@ -221,70 +303,6 @@ const _sfc_main = {
|
|
221
303
|
_: 1
|
222
304
|
}, 8, ["isPopupOpen"])
|
223
305
|
]),
|
224
|
-
vue.createVNode(Block.default, {
|
225
|
-
title: "Categories",
|
226
|
-
actions: [{
|
227
|
-
label: "+",
|
228
|
-
function: () => vue.unref(router).push({
|
229
|
-
name: "Categories Organization",
|
230
|
-
params: {
|
231
|
-
_id: vue.unref(route).params._id
|
232
|
-
}
|
233
|
-
})
|
234
|
-
}]
|
235
|
-
}, {
|
236
|
-
default: vue.withCtx(() => [
|
237
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(categories.state.all, (category, index) => {
|
238
|
-
return vue.openBlock(), vue.createBlock(Checkbox.default, {
|
239
|
-
label: category.name,
|
240
|
-
name: "categories",
|
241
|
-
value: category.url,
|
242
|
-
class: "w-100 mn-t-small bg-white radius-small pd-small",
|
243
|
-
radio: products.state.current.category,
|
244
|
-
"onUpdate:radio": (event) => products.state.current.category = event
|
245
|
-
}, null, 8, ["label", "value", "radio", "onUpdate:radio"]);
|
246
|
-
}), 256))
|
247
|
-
]),
|
248
|
-
_: 1
|
249
|
-
}, 8, ["actions"]),
|
250
|
-
vue.createVNode(Block.default, {
|
251
|
-
title: "Parameters",
|
252
|
-
placeholder: "No parameters added yet",
|
253
|
-
actions: [{
|
254
|
-
label: "+",
|
255
|
-
function: () => products.state.current.information.push({ name: "", value: "" })
|
256
|
-
}],
|
257
|
-
class: "cols-1 gap-thin"
|
258
|
-
}, {
|
259
|
-
default: vue.withCtx(() => [
|
260
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(products.state.current.information, (item, index) => {
|
261
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
262
|
-
class: "gap-thin flex-nowrap flex",
|
263
|
-
key: index
|
264
|
-
}, [
|
265
|
-
vue.createVNode(Field.default, {
|
266
|
-
field: item.name,
|
267
|
-
"onUpdate:field": ($event) => item.name = $event,
|
268
|
-
placeholder: "Название параметра",
|
269
|
-
class: "w-100 bg-white radius-small pd-medium"
|
270
|
-
}, null, 8, ["field", "onUpdate:field"]),
|
271
|
-
vue.createVNode(Field.default, {
|
272
|
-
field: item.value,
|
273
|
-
"onUpdate:field": ($event) => item.value = $event,
|
274
|
-
placeholder: "Значение параметра",
|
275
|
-
class: "w-100 bg-white radius-small pd-medium"
|
276
|
-
}, null, 8, ["field", "onUpdate:field"]),
|
277
|
-
vue.createElementVNode("div", _hoisted_6, [
|
278
|
-
vue.createVNode(IconDelete.default, {
|
279
|
-
onClick: () => products.state.current.information.splice(index, 1),
|
280
|
-
class: "i-medium"
|
281
|
-
}, null, 8, ["onClick"])
|
282
|
-
])
|
283
|
-
]);
|
284
|
-
}), 128))
|
285
|
-
]),
|
286
|
-
_: 1
|
287
|
-
}, 8, ["actions"]),
|
288
306
|
vue.createVNode(Block.default, {
|
289
307
|
title: "Localization",
|
290
308
|
placeholder: "No localizations added yet",
|
@@ -321,7 +339,28 @@ const _sfc_main = {
|
|
321
339
|
}), 128))
|
322
340
|
]),
|
323
341
|
_: 1
|
324
|
-
}, 8, ["actions"])
|
342
|
+
}, 8, ["actions"]),
|
343
|
+
vue.unref(route).params.product ? (vue.openBlock(), vue.createBlock(Button.default, {
|
344
|
+
key: 1,
|
345
|
+
submit: onDelete,
|
346
|
+
callback: redirectTo,
|
347
|
+
class: "bg-red w-100 mn-b-thin"
|
348
|
+
}, {
|
349
|
+
default: vue.withCtx(() => _cache[4] || (_cache[4] = [
|
350
|
+
vue.createTextVNode(" Delete ")
|
351
|
+
])),
|
352
|
+
_: 1
|
353
|
+
})) : vue.createCommentVNode("", true),
|
354
|
+
vue.createVNode(Button.default, {
|
355
|
+
submit: onSubmit,
|
356
|
+
callback: redirectTo,
|
357
|
+
class: "w-100 bg-main"
|
358
|
+
}, {
|
359
|
+
default: vue.withCtx(() => _cache[5] || (_cache[5] = [
|
360
|
+
vue.createTextVNode(" Save ")
|
361
|
+
])),
|
362
|
+
_: 1
|
363
|
+
})
|
325
364
|
]);
|
326
365
|
};
|
327
366
|
}
|