@ozdao/prometheus-framework 0.2.308 → 0.2.310
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.css +1 -1
- 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 +2 -2
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +2 -2
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js.map +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/Field/Field.vue2.cjs +13 -12
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs.map +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +13 -12
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/auth.client.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/auth.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/auth.client.js +1 -0
- package/dist/prometheus-framework/src/modules/auth/auth.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.cjs +58 -78
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.js +78 -98
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/Profile.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +90 -85
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.js +94 -89
- package/dist/prometheus-framework/src/modules/auth/views/components/pages/ProfileEdit.vue.js.map +1 -1
- 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/router/users.cjs +19 -1
- package/dist/prometheus-framework/src/modules/auth/views/router/users.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/auth/views/router/users.js +19 -1
- package/dist/prometheus-framework/src/modules/auth/views/router/users.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 +13 -13
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +2 -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 +2 -2
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/community/components/blocks/FooterBlogpost.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +9 -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 +9 -9
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Blog.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +4 -4
- 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 +4 -4
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Comments.vue.cjs +2 -2
- 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 +2 -2
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs +2 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js +2 -1
- package/dist/prometheus-framework/src/modules/community/router/blogposts.js.map +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/pages/EditEvent.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.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 +3 -3
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/globals/globals.client.cjs +4 -2
- 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/store.cjs +57 -0
- package/dist/prometheus-framework/src/modules/globals/views/classes/store.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/classes/store.js +57 -0
- package/dist/prometheus-framework/src/modules/globals/views/classes/store.js.map +1 -0
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/BottomNavigationBar.vue.cjs +75 -114
- 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 +76 -115
- 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/NavigationBar.vue.cjs +4 -4
- 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 +7 -7
- 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/icons/entities/IconCatalog.vue.cjs +36 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconCatalog.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconCatalog.vue.js +36 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconCatalog.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconCommunity.vue.cjs +36 -24
- package/dist/prometheus-framework/src/modules/icons/entities/IconCommunity.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/entities/IconCommunity.vue.js +36 -24
- package/dist/prometheus-framework/src/modules/icons/entities/IconCommunity.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/entities/IconGroups.vue.cjs +21 -12
- package/dist/prometheus-framework/src/modules/icons/entities/IconGroups.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/entities/IconGroups.vue.js +21 -12
- package/dist/prometheus-framework/src/modules/icons/entities/IconGroups.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/entities/IconHome.vue.cjs +36 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconHome.vue.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconHome.vue.js +36 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconHome.vue.js.map +1 -0
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonBlogpost.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEvent.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonEventShort.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/icons/skeletons/SkeletonOrganization.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/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/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 +15 -16
- 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/pages/pages.client.cjs +1117 -1117
- package/dist/prometheus-framework/src/modules/pages/pages.client.js +1117 -1117
- 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 +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 +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/pages/Categories.vue.cjs +78 -43
- 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 +79 -29
- 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 +90 -40
- 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 +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/ProductEdit.vue.cjs +120 -81
- 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 +133 -94
- 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/EditProductInfo.vue.cjs +20 -6
- 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 +20 -6
- 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/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/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/layouts/Spots.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/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 +21 -21
- package/dist/prometheus-framework.es.js +910 -910
- package/package.json +1 -1
- package/src/components/Block/Block.vue +1 -1
- package/src/components/Completion/Completion.vue +1 -0
- package/src/components/EditImages/EditImages.vue +1 -1
- package/src/components/Feed/Feed.vue +1 -1
- package/src/components/Field/Field.vue +1 -1
- package/src/modules/auth/auth.client.js +2 -0
- package/src/modules/auth/views/components/pages/Profile.vue +57 -35
- package/src/modules/auth/views/components/pages/ProfileEdit.vue +91 -77
- package/src/modules/auth/views/middlewares/auth.validation.js +1 -0
- package/src/modules/auth/views/router/users.js +21 -2
- package/src/modules/auth/views/store/auth.js +6 -2
- package/src/modules/backoffice/components/pages/Dashboard.vue +1 -3
- package/src/modules/community/components/blocks/CardBlogpost.vue +1 -1
- package/src/modules/community/components/blocks/FooterBlogpost.vue +3 -3
- package/src/modules/community/components/layouts/Community.vue +8 -8
- package/src/modules/community/components/pages/Blog.vue +1 -1
- package/src/modules/community/components/pages/BlogPost.vue +3 -3
- package/src/modules/community/components/pages/Community.vue +1 -1
- package/src/modules/community/components/sections/Comments.vue +2 -2
- package/src/modules/community/router/blogposts.js +4 -3
- package/src/modules/globals/globals.client.js +3 -0
- package/src/modules/globals/views/classes/store.js +63 -0
- package/src/modules/globals/views/components/partials/BottomNavigationBar.vue +87 -59
- package/src/modules/globals/views/components/partials/NavigationBar.vue +3 -3
- package/src/modules/globals/views/store/globals.js +5 -0
- package/src/modules/icons/entities/IconCatalog.vue +18 -0
- package/src/modules/icons/entities/IconCommunity.vue +15 -5
- package/src/modules/icons/entities/IconGroups.vue +7 -2
- package/src/modules/icons/entities/IconHome.vue +18 -0
- package/src/modules/icons/skeletons/SkeletonBlogpost.vue +1 -1
- package/src/modules/icons/skeletons/SkeletonEvent.vue +1 -1
- package/src/modules/icons/skeletons/SkeletonEventShort.vue +1 -1
- package/src/modules/icons/skeletons/SkeletonOrganization.vue +1 -1
- 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
- package/src/styles/base/shadow_transitions_hover_refactor.scss +2 -0
- package/src/styles/typography.scss +2 -2
- package/src/modules/auth/views/router/account.js +0 -41
@@ -1,120 +1,200 @@
|
|
1
|
+
const ObjectId = require('mongoose').Types.ObjectId;
|
2
|
+
|
1
3
|
const controllerFactory = (db) => {
|
2
|
-
|
4
|
+
const Category = db.category;
|
3
5
|
|
4
|
-
|
5
|
-
|
6
|
+
return {
|
7
|
+
async read(req, res) {
|
6
8
|
try {
|
7
|
-
|
8
|
-
|
9
|
-
|
9
|
+
const {
|
10
|
+
parent,
|
11
|
+
url,
|
12
|
+
search,
|
13
|
+
sort = 'order',
|
14
|
+
order = 1,
|
15
|
+
page = 1,
|
16
|
+
limit = 10,
|
17
|
+
excludeChildren = false,
|
18
|
+
rootOnly = false
|
19
|
+
} = req.query;
|
10
20
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
21
|
+
const matchStage = {
|
22
|
+
...(req.query.status && { status: req.query.status }),
|
23
|
+
...(req.query.url && { url: req.query.url }),
|
24
|
+
...(search && { name: { $regex: search, $options: 'i' } }),
|
25
|
+
...(parent ? { parent: new mongoose.Types.ObjectId(parent) } : {}),
|
26
|
+
...(rootOnly ? { parent: null } : {})
|
27
|
+
};
|
28
|
+
|
29
|
+
const pipeline = [
|
30
|
+
{ $match: matchStage },
|
31
|
+
{
|
32
|
+
$graphLookup: {
|
33
|
+
from: 'categories',
|
34
|
+
startWith: '$_id',
|
35
|
+
connectFromField: '_id',
|
36
|
+
connectToField: 'parent',
|
37
|
+
as: 'allDescendants',
|
38
|
+
maxDepth: 10
|
39
|
+
}
|
40
|
+
},
|
41
|
+
{ $sort: { [sort]: order === 'asc' ? 1 : -1 } },
|
42
|
+
{ $skip: (page - 1) * limit },
|
43
|
+
{ $limit: Number(limit) },
|
44
|
+
];
|
16
45
|
|
17
|
-
const
|
46
|
+
const flatResults = await Category.aggregate(pipeline);
|
18
47
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
48
|
+
function buildTree(items) {
|
49
|
+
const itemMap = {};
|
50
|
+
const roots = [];
|
51
|
+
|
52
|
+
// First pass: Create map of items by ID
|
53
|
+
items.forEach(item => {
|
54
|
+
itemMap[item._id.toString()] = {
|
55
|
+
...item,
|
56
|
+
children: []
|
57
|
+
};
|
58
|
+
});
|
28
59
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
60
|
+
// Second pass: Build tree structure
|
61
|
+
items.forEach(item => {
|
62
|
+
const itemId = item._id.toString();
|
63
|
+
const parentId = item.parent?._id?.toString();
|
64
|
+
if (parentId && itemMap[parentId]) {
|
65
|
+
itemMap[parentId].children.push(itemMap[itemId]);
|
66
|
+
} else {
|
67
|
+
roots.push(itemMap[itemId]);
|
68
|
+
}
|
69
|
+
});
|
70
|
+
|
71
|
+
// Sort children arrays by order property
|
72
|
+
const sortByOrder = (a, b) => {
|
73
|
+
const orderA = a.order ?? Number.MAX_SAFE_INTEGER;
|
74
|
+
const orderB = b.order ?? Number.MAX_SAFE_INTEGER;
|
75
|
+
return orderA - orderB;
|
76
|
+
};
|
77
|
+
|
78
|
+
// Recursive function to sort children at all levels
|
79
|
+
const sortChildren = (node) => {
|
80
|
+
if (node.children && node.children.length > 0) {
|
81
|
+
node.children.sort(sortByOrder);
|
82
|
+
node.children.forEach(sortChildren);
|
83
|
+
}
|
84
|
+
};
|
85
|
+
|
86
|
+
// Sort roots and all children
|
87
|
+
roots.sort(sortByOrder);
|
88
|
+
roots.forEach(sortChildren);
|
89
|
+
|
90
|
+
return roots;
|
91
|
+
}
|
92
|
+
|
93
|
+
const treeResults = flatResults.map(doc => {
|
94
|
+
const descendants = doc.allDescendants || [];
|
95
|
+
const allItems = [doc, ...descendants];
|
96
|
+
const tree = buildTree(allItems);
|
97
|
+
|
98
|
+
// Find and return only the root node (original document)
|
99
|
+
return tree.find(node => node._id.toString() === doc._id.toString());
|
100
|
+
});
|
101
|
+
|
102
|
+
// Sort root categories
|
103
|
+
treeResults.sort((a, b) => {
|
104
|
+
const orderA = a.order ?? Number.MAX_SAFE_INTEGER;
|
105
|
+
const orderB = b.order ?? Number.MAX_SAFE_INTEGER;
|
106
|
+
return orderA - orderB;
|
107
|
+
});
|
108
|
+
|
109
|
+
res.json(treeResults);
|
44
110
|
} catch (err) {
|
45
|
-
|
46
|
-
res.status(500).send({ message: err.message });
|
111
|
+
res.status(500).json({ message: err.message });
|
47
112
|
}
|
48
|
-
}
|
113
|
+
},
|
49
114
|
|
115
|
+
async create(req, res) {
|
116
|
+
try {
|
117
|
+
const highestOrder = await Category.findOne().sort('-order');
|
118
|
+
const order = highestOrder ? highestOrder.order + 1 : 1;
|
119
|
+
const category = new Category({ ...req.body, order });
|
50
120
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
res.status(500).send({ message: err });
|
121
|
+
if (req.body.parent) {
|
122
|
+
const parent = await Category.findByIdAndUpdate(
|
123
|
+
req.body.parent,
|
124
|
+
{ $push: { children: category._id } },
|
125
|
+
{ new: true }
|
126
|
+
);
|
127
|
+
if (!parent) throw new Error('Parent category not found');
|
128
|
+
category.parent = parent._id;
|
60
129
|
}
|
61
|
-
};
|
62
130
|
|
63
|
-
|
64
|
-
|
131
|
+
if (req.body.children && req.body.children.length > 0) {
|
132
|
+
await Category.updateMany(
|
133
|
+
{ _id: { $in: req.body.children } },
|
134
|
+
{ $set: { parent: category._id } }
|
135
|
+
);
|
136
|
+
}
|
65
137
|
|
66
|
-
|
67
|
-
|
138
|
+
await category.save();
|
139
|
+
res.status(201).json(category);
|
140
|
+
} catch (err) {
|
141
|
+
res.status(err.message === 'Parent category not found' ? 404 : 500).json({ message: err.message });
|
142
|
+
}
|
143
|
+
},
|
68
144
|
|
69
|
-
|
145
|
+
async update(req, res) {
|
70
146
|
|
71
|
-
|
72
|
-
|
147
|
+
try {
|
148
|
+
const { categories } = req.body;
|
149
|
+
|
150
|
+
const bulkOps = categories.map(category => ({
|
151
|
+
updateOne: {
|
152
|
+
filter: { _id: category._id },
|
153
|
+
update: {
|
154
|
+
$set: {
|
155
|
+
order: category.order,
|
156
|
+
parent: category.parent ? new ObjectId(category.parent) : null
|
157
|
+
}
|
73
158
|
}
|
74
|
-
|
75
|
-
}
|
76
|
-
console.log(req.body);
|
77
|
-
console.log(req.category);
|
78
|
-
res.status(500).send({ message: err });
|
79
|
-
}
|
80
|
-
};
|
159
|
+
}
|
160
|
+
}));
|
81
161
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
{ url: req.params.url },
|
86
|
-
{ $set: req.body },
|
87
|
-
{ new: true }
|
88
|
-
).exec();
|
89
|
-
if (!category) {
|
90
|
-
return res.status(404).send({ message: "Something wrong when updating category." });
|
91
|
-
}
|
92
|
-
res.status(200).send(category);
|
93
|
-
} catch (err) {
|
94
|
-
res.status(500).send({ message: err });
|
95
|
-
}
|
96
|
-
};
|
162
|
+
await Category.bulkWrite(bulkOps);
|
163
|
+
const updatedCategories = await Category.find().sort({ order: 'asc' }).lean();
|
164
|
+
res.status(200).json(updatedCategories);
|
97
165
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
166
|
+
} catch (err) {
|
167
|
+
console.error('Category update error:', err);
|
168
|
+
res.status(500).json({ message: 'Failed to update categories' });
|
169
|
+
}
|
170
|
+
},
|
171
|
+
|
172
|
+
async delete(req, res) {
|
173
|
+
try {
|
174
|
+
const category = await Category.findOne({ url: req.body.url });
|
175
|
+
if (!category) throw new Error('Category not found');
|
176
|
+
|
177
|
+
const deleteSubcategories = async (categoryId) => {
|
178
|
+
const cat = await Category.findById(categoryId);
|
179
|
+
if (cat) {
|
180
|
+
for (const childId of cat.children) {
|
181
|
+
await deleteSubcategories(childId);
|
103
182
|
}
|
104
|
-
|
105
|
-
|
106
|
-
|
183
|
+
await Category.findByIdAndDelete(categoryId);
|
184
|
+
}
|
185
|
+
};
|
186
|
+
|
187
|
+
if (category.parent) {
|
188
|
+
await Category.findByIdAndUpdate(category.parent, { $pull: { children: category._id } });
|
107
189
|
}
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
deleteCategory
|
117
|
-
};
|
190
|
+
|
191
|
+
await deleteSubcategories(category._id);
|
192
|
+
res.status(200).json({ message: 'Category deleted successfully' });
|
193
|
+
} catch (err) {
|
194
|
+
res.status(err.message === 'Category not found' ? 404 : 500).json({ message: err.message });
|
195
|
+
}
|
196
|
+
}
|
197
|
+
};
|
118
198
|
};
|
119
199
|
|
120
|
-
module.exports = controllerFactory;
|
200
|
+
module.exports = controllerFactory;
|
@@ -35,8 +35,8 @@ const controllerFactory = (db) => {
|
|
35
35
|
try {
|
36
36
|
const query = {};
|
37
37
|
|
38
|
-
if (req.query.
|
39
|
-
query.
|
38
|
+
if (req.query.owner) {
|
39
|
+
query['owner.target'] = new ObjectId(req.query.owner);
|
40
40
|
}
|
41
41
|
|
42
42
|
if (req.query._id) {
|
@@ -263,8 +263,10 @@ const controllerFactory = (db) => {
|
|
263
263
|
{
|
264
264
|
name: req.body.name,
|
265
265
|
status: req.body.status,
|
266
|
+
listing: req.body.listing,
|
266
267
|
description: req.body.description,
|
267
268
|
price: req.body.price,
|
269
|
+
price_currency: req.body.price_currency,
|
268
270
|
sale: req.body.sale,
|
269
271
|
category: req.body.category,
|
270
272
|
images: req.body.images,
|
@@ -1,75 +1,24 @@
|
|
1
1
|
module.exports = (db) => {
|
2
|
-
const
|
3
|
-
name: {
|
4
|
-
type: String,
|
5
|
-
required: true,
|
6
|
-
trim: true
|
7
|
-
},
|
2
|
+
const CategorySchema = new db.mongoose.Schema({
|
3
|
+
name: { type: String, required: true, trim: true },
|
8
4
|
status: {
|
9
5
|
type: String,
|
10
|
-
enum: ['draft','internal','published','removed'],
|
6
|
+
enum: ['draft','internal','published','removed'],
|
11
7
|
default: 'draft',
|
12
8
|
required: true,
|
13
9
|
},
|
14
|
-
order: {
|
15
|
-
|
16
|
-
|
17
|
-
},
|
18
|
-
|
19
|
-
type: String,
|
20
|
-
required: true,
|
21
|
-
trim: true
|
22
|
-
},
|
23
|
-
subcategories: {
|
24
|
-
type: Array
|
25
|
-
},
|
26
|
-
localization: {
|
27
|
-
type: Array
|
28
|
-
},
|
29
|
-
filters: {
|
30
|
-
type: Array
|
31
|
-
},
|
32
|
-
// owner: {
|
33
|
-
// type: {
|
34
|
-
// type: String,
|
35
|
-
// required: true
|
36
|
-
// },
|
37
|
-
// target: {
|
38
|
-
// type: mongoose.Schema.Types.ObjectId,
|
39
|
-
// ref: function (value) {
|
40
|
-
// if (this.owner.type === 'user') return 'User';
|
41
|
-
// if (this.owner.type === 'organization') return 'Organization';
|
42
|
-
// },
|
43
|
-
// required: true,
|
44
|
-
// },
|
45
|
-
// },
|
46
|
-
// creator: {
|
47
|
-
// hidden: {
|
48
|
-
// type: Boolean,
|
49
|
-
// required: true
|
50
|
-
// },
|
51
|
-
// type: {
|
52
|
-
// type: String,
|
53
|
-
// required: true
|
54
|
-
// },
|
55
|
-
// target: {
|
56
|
-
// type: mongoose.Schema.Types.ObjectId,
|
57
|
-
// ref: function (value) {
|
58
|
-
// if (this.owner.type === 'user') return 'User';
|
59
|
-
// if (this.owner.type === 'organization') return 'Organization';
|
60
|
-
// },
|
61
|
-
// required: true,
|
62
|
-
// },
|
63
|
-
// }
|
10
|
+
order: { type: Number, required: true },
|
11
|
+
url: { type: String, required: true, trim: true },
|
12
|
+
parent: { type: db.mongoose.Schema.Types.ObjectId, ref: 'Category' },
|
13
|
+
localization: { type: Array },
|
14
|
+
filters: { type: Array }
|
64
15
|
}, {
|
65
|
-
timestamps: {
|
66
|
-
currentTime: () => Date.now()
|
67
|
-
}
|
16
|
+
timestamps: { currentTime: () => Date.now() }
|
68
17
|
});
|
69
18
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
return
|
75
|
-
}
|
19
|
+
CategorySchema.index({ parent: 1 });
|
20
|
+
CategorySchema.index({ 'owner.target': 1, 'creator.target': 1});
|
21
|
+
|
22
|
+
const Category = db.mongoose.model('Category', CategorySchema, 'categories');
|
23
|
+
return Category;
|
24
|
+
};
|
@@ -2,7 +2,13 @@ const applyOwnershipSchema = require('@pf/src/modules/globals/models/schemas/own
|
|
2
2
|
|
3
3
|
module.exports = (db) => {
|
4
4
|
const ProductSchema = new db.mongoose.Schema({
|
5
|
-
status:
|
5
|
+
status: {
|
6
|
+
type: String
|
7
|
+
},
|
8
|
+
listing: {
|
9
|
+
type: String,
|
10
|
+
enum: ['sale', 'rent']
|
11
|
+
},
|
6
12
|
name: {type: String},
|
7
13
|
category: {type: Array},
|
8
14
|
description: {type: String},
|
@@ -17,7 +23,13 @@ module.exports = (db) => {
|
|
17
23
|
value: {type: String}
|
18
24
|
}],
|
19
25
|
// ЗАДАЧА: Нужно отрефачить price, перенести его в default variant
|
20
|
-
price: {
|
26
|
+
price: {
|
27
|
+
type: Number
|
28
|
+
},
|
29
|
+
price_currency: {
|
30
|
+
type: String,
|
31
|
+
default: '$',
|
32
|
+
},
|
21
33
|
prices: { type: Array},
|
22
34
|
//
|
23
35
|
variants: [{
|
@@ -64,16 +76,7 @@ module.exports = (db) => {
|
|
64
76
|
min: [0, 'Quantity-based discount cannot be less than 0'],
|
65
77
|
max: [100, 'Quantity-based discount cannot be more than 100']
|
66
78
|
},
|
67
|
-
}]
|
68
|
-
// Refactor
|
69
|
-
owner: {
|
70
|
-
type: db.mongoose.Schema.Types.ObjectId,
|
71
|
-
ref: 'User',
|
72
|
-
},
|
73
|
-
organization: {
|
74
|
-
type: db.mongoose.Schema.Types.ObjectId,
|
75
|
-
ref: 'Organization',
|
76
|
-
},
|
79
|
+
}]
|
77
80
|
}, {
|
78
81
|
timestamps: {
|
79
82
|
currentTime: () => Date.now()
|
@@ -2,21 +2,33 @@ import * as validationAuth from '@pf/src/modules/auth/views/middlewares/auth.val
|
|
2
2
|
|
3
3
|
const categoriesRoutes = [{
|
4
4
|
path: 'categories',
|
5
|
-
name: 'Categories
|
5
|
+
name: 'Categories',
|
6
6
|
meta: {
|
7
7
|
title: {
|
8
|
-
en: '
|
9
|
-
ru: '
|
8
|
+
en: 'Categories',
|
9
|
+
ru: 'Категории'
|
10
10
|
}
|
11
11
|
},
|
12
12
|
component: () => import('@pf/src/modules/products/components/pages/Categories.vue')
|
13
13
|
}, {
|
14
14
|
path: 'categories/add',
|
15
|
-
name: '
|
15
|
+
name: 'Category Add',
|
16
|
+
meta: {
|
17
|
+
title: {
|
18
|
+
en: 'Add Category',
|
19
|
+
ru: 'Добавить Категорию'
|
20
|
+
}
|
21
|
+
},
|
16
22
|
component: () => import('@pf/src/modules/products/components/pages/CategoryEdit.vue')
|
17
23
|
},{
|
18
24
|
path: 'categories/:category/edit',
|
19
|
-
name: '
|
25
|
+
name: 'Category Edit',
|
26
|
+
meta: {
|
27
|
+
title: {
|
28
|
+
en: 'Edit Category',
|
29
|
+
ru: 'Редактировать Категорию'
|
30
|
+
}
|
31
|
+
},
|
20
32
|
beforeEnter: [validationAuth.requiresAuth],
|
21
33
|
component: () => import('@pf/src/modules/products/components/pages/CategoryEdit.vue')
|
22
34
|
}];
|
@@ -2,7 +2,6 @@ import * as validationAuth from '@pf/src/modules/auth/views/middlewares/auth.val
|
|
2
2
|
|
3
3
|
import * as auth from '@pf/src/modules/auth/views/store/auth';
|
4
4
|
|
5
|
-
import IconPlus from '@pf/src/modules/icons/navigation/IconPlus.vue'
|
6
5
|
|
7
6
|
export function createProductRoutes(prefix = '', options = {}) {
|
8
7
|
const nameWithPrefix = (name) => prefix ? `${prefix}${name}` : name;
|
@@ -18,17 +17,6 @@ export function createProductRoutes(prefix = '', options = {}) {
|
|
18
17
|
en: 'Products',
|
19
18
|
ru: 'Товары'
|
20
19
|
},
|
21
|
-
|
22
|
-
actions: [
|
23
|
-
{
|
24
|
-
component: IconPlus,
|
25
|
-
props: {
|
26
|
-
fill: "rgb(var(--main))"
|
27
|
-
},
|
28
|
-
condition: () => auth.state.user && auth.state.user._id,
|
29
|
-
action: (router) => router.push({ name: 'ProductAdd' })
|
30
|
-
}
|
31
|
-
],
|
32
20
|
authorize: options.productsAuthorize || []
|
33
21
|
},
|
34
22
|
component: () => import(/* webpackChunkName: 'Products' */ '@pf/src/modules/products/components/pages/Products.vue'),
|
@@ -7,40 +7,11 @@ module.exports = function(app, db) {
|
|
7
7
|
const controller = controllerFactory(db);
|
8
8
|
|
9
9
|
const { verifyCategory } = middlewareFactoryProducts(db);
|
10
|
-
// Get categorys
|
11
|
-
app.get(
|
12
|
-
"/categories",
|
13
|
-
controller.getCategories
|
14
|
-
);
|
15
|
-
app.post(
|
16
|
-
"/categories",
|
17
|
-
controller.updateCategories
|
18
|
-
);
|
19
|
-
// Get category
|
20
|
-
app.get(
|
21
|
-
"/categories/:url",
|
22
|
-
controller.getCategory
|
23
|
-
);
|
24
|
-
// Add category
|
25
|
-
app.post(
|
26
|
-
"/categories/add",
|
27
|
-
[
|
28
|
-
verifyCategory.checkCategoryExistOrNot,
|
29
|
-
],
|
30
|
-
controller.addCategory
|
31
|
-
);
|
32
|
-
// Update catagory
|
33
|
-
app.post(
|
34
|
-
"/categories/:url",
|
35
|
-
controller.updateCategory
|
36
|
-
);
|
37
|
-
// Delete category
|
38
|
-
app.delete(
|
39
|
-
"/categories/:url",
|
40
|
-
controller.deleteCategory
|
41
|
-
);
|
42
10
|
|
11
|
+
app.get('/api/categories', controller.read);
|
12
|
+
app.post('/api/categories/create', [verifyCategory.checkCategoryExistOrNot], controller.create);
|
13
|
+
app.post('/api/categories/update', controller.update);
|
14
|
+
app.post('/api/categories/delete', controller.delete);
|
43
15
|
};
|
44
16
|
|
45
|
-
|
46
|
-
|
17
|
+
module.exports.controllerFactory = controllerFactory;
|