@ozdao/prometheus-framework 0.2.39 → 0.2.41
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +1 -2
- package/dist/auth.server.mjs +1 -2
- package/dist/files.server.js +1 -2
- package/dist/files.server.mjs +1 -2
- package/dist/globals.server.js +1 -1
- package/dist/globals.server.mjs +1 -1
- package/dist/mailing-10560277.mjs +78 -0
- package/dist/mailing-902d13d5.js +77 -0
- package/dist/main.css +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +225 -2
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +2 -225
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +61 -2
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue2.js +2 -61
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Chips/Chips.vue.js +13 -9
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/components/Chips/Chips.vue2.js +4 -0
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +26 -22
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Feed/Feed.vue.js +29 -30
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +76 -2
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +2 -76
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +70 -2
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +2 -70
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +95 -2
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +2 -95
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Slider/Slider.vue.js +69 -0
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +44 -2
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +2 -44
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +8 -8
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/community.client.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/community.client.js +18 -20
- 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 +88 -62
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +97 -68
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/BlogPost.vue.js +35 -34
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +18 -18
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue2.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/Feed.vue.js +4 -4
- 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 +65 -19
- package/dist/prometheus-framework/src/modules/community/components/sections/JoinUs.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/JoinUs.vue.js +9 -9
- 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 +8 -7
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Image.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Image.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +5 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +65 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -5
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +2 -65
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +64 -70
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +6 -6
- 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/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +5 -5
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +6 -5
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +43 -42
- package/dist/prometheus-framework/src/modules/icons/entities/IconFeatured.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconFeatured.vue.js +30 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconFollowing.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconFollowing.vue.js +47 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconPopular.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconPopular.vue.js +28 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconRecent.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/entities/IconRecent.vue.js +45 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconArrow.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconArrow.vue.js +32 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconChevronRight.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/navigation/IconChevronRight.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/icons/navigation/IconEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/icons/navigation/IconEdit.vue.js +25 -14
- package/dist/prometheus-framework/src/modules/icons/navigation/IconEllipsis.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/icons/navigation/IconEllipsis.vue.js +44 -0
- package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/MobileApp.vue.js +90 -67
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +2 -11
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +11 -2
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/EditOrder.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormOrderDetails.vue.js +2 -2
- 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 +45 -42
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +2 -2
- 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 +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +3 -3
- 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 +5 -5
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +60 -55
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +18 -17
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Publics.vue.js +20 -21
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardLeftover.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +6 -6
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/PopularProducts.vue.js +37 -34
- 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 +23 -23
- 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 +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/blocks/CardSpot.vue.js +8 -8
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +7 -7
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/components/pages/Wallet.vue.js +31 -30
- package/dist/prometheus-framework.cjs.js +20 -20
- package/dist/prometheus-framework.es.js +1278 -1288
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Button/Button.vue +2 -3
- package/src/components/Chips/Chips.vue +9 -3
- package/src/components/Countdown/Countdown.vue +4 -3
- package/src/components/Dropdown/Dropdown.vue +9 -3
- package/src/components/Feed/Feed.vue +7 -11
- package/src/components/Feed/Masonry.vue +177 -0
- package/src/components/FieldBig/FieldBig.vue +3 -3
- package/src/components/Header/Header.vue +2 -0
- package/src/components/Navigation/Navigation.vue +2 -0
- package/src/components/Shader/Shader.vue +161 -116
- package/src/components/Slider/Slider.vue +92 -0
- package/src/modules/applications/applications.client.js +2 -0
- package/src/modules/applications/components/sections/SubscribeNewsletter.vue +114 -0
- package/src/modules/applications/controllers/applications.controller.js +125 -136
- package/src/modules/applications/models/application.model.js +22 -7
- package/src/modules/applications/routes/applications.routes.js +29 -13
- package/src/modules/auth/controllers/auth.controller.js +2 -3
- package/src/modules/auth/store/auth.js +3 -5
- package/src/modules/chats/components/blocks/ChatMessage.vue +3 -2
- package/src/modules/chats/components/pages/ChatPage.vue +6 -6
- package/src/modules/chats/components/sections/ChatWindow.vue +57 -12
- package/src/modules/chats/store/chat.store.js +6 -1
- package/src/modules/community/community.client.js +0 -2
- package/src/modules/community/components/blocks/CardBlogpost.vue +71 -33
- package/src/modules/community/components/layouts/Community.vue +65 -26
- package/src/modules/community/components/pages/Blog.vue +37 -0
- package/src/modules/community/components/pages/BlogPost.vue +5 -6
- package/src/modules/community/components/pages/Community.vue +1 -0
- package/src/modules/community/components/pages/CreateBlogPost.vue +1 -0
- package/src/modules/community/components/sections/Feed.vue +1 -1
- package/src/modules/community/components/sections/HotPosts.vue +64 -24
- package/src/modules/community/components/sections/JoinUs.vue +4 -5
- package/src/modules/community/store/blogposts.js +1 -0
- package/src/modules/constructor/components/elements/Embed.vue +7 -6
- package/src/modules/constructor/components/elements/Image.vue +2 -2
- package/src/modules/constructor/components/elements/Textarea.vue +1 -1
- package/src/modules/constructor/components/sections/Constructor.vue +3 -19
- package/src/modules/events/components/pages/EditEvent.vue +48 -3
- package/src/modules/events/components/pages/Event.vue +16 -8
- package/src/modules/events/components/sections/HeroEvent.vue +32 -28
- package/src/modules/events/components/sections/SectionMainGuest.vue +3 -2
- package/src/modules/events/components/sections/SectionPreviousEvents.vue +22 -15
- package/src/modules/events/models/event.model.js +9 -0
- package/src/modules/files/middlewares/server/middlewareBusboy.js +14 -3
- package/src/modules/files/routes/files.routes.js +9 -1
- package/src/modules/globals/components/blocks/CardHeader.vue +6 -3
- package/src/modules/globals/utils/mailing.js +12 -0
- package/src/modules/icons/entities/IconEarn.vue +20 -0
- package/src/modules/icons/entities/IconFeatured.vue +14 -0
- package/src/modules/icons/entities/IconFollowing.vue +17 -0
- package/src/modules/icons/entities/IconPopular.vue +14 -0
- package/src/modules/icons/entities/IconRecent.vue +17 -0
- package/src/modules/icons/navigation/IconAdd.vue +1 -3
- package/src/modules/icons/navigation/IconArrow.vue +21 -0
- package/src/modules/icons/navigation/IconCheckmark.vue +16 -0
- package/src/modules/icons/navigation/IconChevronRight.vue +2 -2
- package/src/modules/icons/navigation/IconEdit.vue +16 -2
- package/src/modules/icons/navigation/IconEllipsis.vue +16 -0
- package/src/modules/icons/placeholders/PlaceholderChat.vue +9 -0
- package/src/modules/landing/components/sections/MobileApp.vue +38 -21
- package/src/modules/landing/components/sections/SectionEarn.vue +104 -0
- package/src/modules/landing/components/sections/SectionFeatures.vue +7 -8
- package/src/modules/marketplace/components/layouts/Marketplace.vue +3 -3
- package/src/modules/orders/components/blocks/StatusHistory.vue +7 -1
- package/src/modules/orders/components/pages/Order.vue +3 -4
- package/src/modules/orders/store/shopcart.js +21 -5
- package/src/modules/organizations/components/blocks/CardOrganization.vue +6 -6
- package/src/modules/organizations/components/pages/Organization.vue +1 -1
- package/src/modules/organizations/components/sections/DetailsTab.vue +42 -43
- package/src/modules/organizations/components/sections/Publics.vue +3 -4
- package/src/modules/payments/controller/payments.controller.js +54 -200
- package/src/modules/payments/controller/payments.tinkoff.controller.js +242 -0
- package/src/modules/payments/models/payment.model.js +22 -0
- package/src/modules/payments/routes/payments.routes.js +4 -25
- package/src/modules/payments/routes/payments.tinkoff.routes.js +58 -0
- package/src/modules/products/components/pages/Product.vue +3 -1
- package/src/modules/products/components/sections/HeroRecommendation.vue +9 -170
- package/src/modules/products/components/sections/MenuSection.vue +4 -4
- package/src/modules/products/components/sections/PopularProducts.vue +3 -3
- package/src/modules/products/components/sections/SectionProduct.vue +3 -0
- package/src/modules/products/controllers/products.controller.js +188 -109
- package/src/modules/products/models/product.model.js +1 -0
- package/src/modules/spots/components/layouts/Spots.vue +2 -2
- package/src/modules/wallet/components/pages/Wallet.vue +73 -88
- package/src/modules/wallet/controllers/crypto.controller.js +79 -0
- package/src/modules/wallet/models/wallet.model.js +27 -0
- package/src/styles/base/all.scss +4 -0
- package/src/styles/base/backgrounds.scss +2 -2
- package/src/styles/base/shadow_transitions_hover_refactor.scss +11 -1
- package/src/styles/typography.scss +19 -12
- package/src/modules/community/components/sections/SubscribeNewsletter.vue +0 -67
- package/src/modules/constructor/components/elements/Youtube.vue +0 -52
- /package/src/modules/{orders/models/payment.model.js → payments/models/payment.tinkoff.model.js} +0 -0
@@ -28,11 +28,12 @@ const actions = {
|
|
28
28
|
setShopcart() {
|
29
29
|
try {
|
30
30
|
const storedShopcart = localStorage.getItem('shopcart');
|
31
|
+
|
31
32
|
if (storedShopcart) {
|
32
33
|
const shopcartData = JSON.parse(storedShopcart);
|
33
34
|
state.positions = shopcartData.positions; // Восстанавливаем продукты
|
34
35
|
state.organization = shopcartData.organization; // Восстанавливаем _id организации
|
35
|
-
}
|
36
|
+
}
|
36
37
|
} catch (error) {
|
37
38
|
console.error(error);
|
38
39
|
throw error;
|
@@ -74,11 +75,16 @@ const actions = {
|
|
74
75
|
|
75
76
|
if (cartItemIndex > -1) {
|
76
77
|
state.positions.splice(cartItemIndex, 1);
|
77
|
-
|
78
|
-
|
78
|
+
|
79
|
+
// Сохраняем весь объект корзины, а не только позиции
|
80
|
+
localStorage.setItem('shopcart', JSON.stringify({
|
81
|
+
positions: state.positions,
|
82
|
+
organization: state.organization
|
83
|
+
}));
|
79
84
|
}
|
80
85
|
},
|
81
86
|
|
87
|
+
|
82
88
|
decrementItemQuantity(_id) {
|
83
89
|
const cartItem = state.positions.find(
|
84
90
|
(item) => item._id === _id
|
@@ -92,10 +98,15 @@ const actions = {
|
|
92
98
|
state.positions.splice(cartItemIndex, 1);
|
93
99
|
}
|
94
100
|
|
95
|
-
|
101
|
+
// Сохраняем весь объект корзины, а не только позиции
|
102
|
+
localStorage.setItem('shopcart', JSON.stringify({
|
103
|
+
positions: state.positions,
|
104
|
+
organization: state.organization
|
105
|
+
}));
|
96
106
|
}
|
97
107
|
},
|
98
108
|
|
109
|
+
|
99
110
|
incrementItemQuantity(_id) {
|
100
111
|
const cartItem = state.positions.find(
|
101
112
|
(item) => item._id === _id
|
@@ -104,10 +115,15 @@ const actions = {
|
|
104
115
|
if (cartItem) {
|
105
116
|
cartItem.quantity++;
|
106
117
|
|
107
|
-
|
118
|
+
// Сохраняем весь объект корзины, а не только позиции
|
119
|
+
localStorage.setItem('shopcart', JSON.stringify({
|
120
|
+
positions: state.positions,
|
121
|
+
organization: state.organization
|
122
|
+
}));
|
108
123
|
}
|
109
124
|
},
|
110
125
|
|
126
|
+
|
111
127
|
resetShopcart({ state }) {
|
112
128
|
state.positions = [];
|
113
129
|
|
@@ -16,10 +16,10 @@
|
|
16
16
|
class="h-4r w-4r"
|
17
17
|
/>
|
18
18
|
|
19
|
-
<div class="pos-relative w-100 flex-child-1 flex-child mn-l-
|
19
|
+
<div class="pos-relative w-100 flex-h-center flex flex-column flex-child-1 flex-child mn-l-thin w-100">
|
20
20
|
|
21
21
|
<!-- <Text :text="organization.profile.name ? organization.profile.name : ''" :maxLen="18" class="h3 d-block"/> -->
|
22
|
-
<p class="
|
22
|
+
<p class="h4 t-truncate">{{organization.profile.name}}</p>
|
23
23
|
<!-- RATING -->
|
24
24
|
<!-- <div v-if="showRating && organization.rating" class="w-max star-container flex-v-center flex">
|
25
25
|
<img
|
@@ -38,8 +38,8 @@
|
|
38
38
|
class="pos-relative p-small"
|
39
39
|
/>
|
40
40
|
|
41
|
-
<div v-if="showFollowers">
|
42
|
-
<p class="mn-b-thin">{{organization.numberOfSubscribers}} followers</p>
|
41
|
+
<div v-if="showFollowers" class="flex-center gap-thin pd-r-thin pd-l-thin flex-nowrap flex mn-t-thin bg-white radius-extra w-max">
|
42
|
+
<p class="mn-t-thin mn-b-thin">{{organization.numberOfSubscribers}} followers</p>
|
43
43
|
|
44
44
|
<ButtonToggleMembership
|
45
45
|
v-if="
|
@@ -51,9 +51,9 @@
|
|
51
51
|
:role="'subscriber'"
|
52
52
|
:target="organization._id"
|
53
53
|
:status="organization.isSubscriber"
|
54
|
-
:text="{create: '
|
54
|
+
:text="{create: '+', remove: '-'}"
|
55
55
|
@updateMembership="event => handleMembershipUpdate(event, 'isSubscriber', 'numberOfSubscribers')"
|
56
|
-
class="
|
56
|
+
class="i-semi"
|
57
57
|
/>
|
58
58
|
</div>
|
59
59
|
|
@@ -191,7 +191,7 @@
|
|
191
191
|
const router = useRouter()
|
192
192
|
const route = useRoute()
|
193
193
|
// Accesing state
|
194
|
-
let tab = route.query.tab ? route.query.tab : '
|
194
|
+
let tab = route.query.tab ? route.query.tab : 'products';
|
195
195
|
|
196
196
|
const organizationData = ref(null)
|
197
197
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<template>
|
2
2
|
<transition name="slide-fade">
|
3
|
-
<section class="
|
3
|
+
<section class="flex-center flex flex-column t-center pd-medium radius-big bg-grey">
|
4
4
|
|
5
5
|
<Dropdown
|
6
6
|
v-if="user._id !== organization.owner"
|
7
|
-
:label="'
|
7
|
+
:label="{ component: IconEllipsis, class: 'i-regular t-transp' }"
|
8
8
|
:align="'right'"
|
9
|
-
class="cursor-pointer pos-absolute pos-r-
|
9
|
+
class="cursor-pointer pos-absolute pos-r-regular pos-t-regular pd-thin radius-extra "
|
10
10
|
>
|
11
11
|
<section
|
12
12
|
class="bg-black pd-thin radius-small"
|
@@ -34,7 +34,7 @@
|
|
34
34
|
:status="organization.isBlocked"
|
35
35
|
:text="{create: 'Block', remove: 'Unblock'}"
|
36
36
|
@updateMembership="event => handleMembershipUpdate(event, 'isBlocked')"
|
37
|
-
class="t-white
|
37
|
+
class="t-white w-100 mn-t-thin bg-red"
|
38
38
|
/>
|
39
39
|
</section>
|
40
40
|
</Dropdown>
|
@@ -53,7 +53,7 @@
|
|
53
53
|
<img
|
54
54
|
v-if="organization.profile.photo"
|
55
55
|
:src="(FILE_SERVER_URL || '') + organization.profile.photo"
|
56
|
-
class="radius-big bg-grey flex-center flex mn-b-small
|
56
|
+
class="radius-big bg-grey flex-center flex mn-b-small w-8r"
|
57
57
|
/>
|
58
58
|
|
59
59
|
<PlaceholderOrganizationPic
|
@@ -61,48 +61,45 @@
|
|
61
61
|
class="radius-medium mn-b-small i-extra"
|
62
62
|
/>
|
63
63
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
64
|
+
<h1
|
65
|
+
class="mn-b-thin"
|
66
|
+
>
|
67
|
+
{{ organization.profile.name }}
|
68
|
+
</h1>
|
69
|
+
|
70
|
+
<div class="flex-center pd-r-thin pd-l-thin flex-nowrap flex mn-t-thin bg-white radius-extra w-max">
|
71
|
+
<IconFollowing class="i-medium mn-r-micro t-transp"/>
|
72
|
+
|
73
|
+
<p class="mn-t-thin p-medium t-medium uppercase mn-b-thin">{{organization.numberOfSubscribers}} followers</p>
|
74
|
+
|
75
|
+
<ButtonToggleMembership
|
76
|
+
v-if="
|
77
|
+
user._id
|
78
|
+
&& route.params._id
|
79
|
+
&& route.params._id !== user._id
|
80
|
+
&& organization.owner !== user._id
|
81
|
+
"
|
82
|
+
:user="user._id"
|
83
|
+
:type="'organization'"
|
84
|
+
:role="'subscriber'"
|
85
|
+
:target="organization._id"
|
86
|
+
:status="organization.isSubscriber"
|
87
|
+
:text="{create: '+', remove: '-'}"
|
88
|
+
@updateMembership="event => handleMembershipUpdate(event, 'isSubscriber', 'numberOfSubscribers')"
|
89
|
+
class=" mn-l-thin p-medium t-medium radius-extra i-semi"
|
90
|
+
/>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
<p class="w-max-50r mn-t-regular mn-b-medium p-big">
|
94
|
+
<Text :text="organization.profile.description || ''" :maxLen="240" />
|
95
|
+
</p>
|
96
|
+
|
97
|
+
<Chips
|
77
98
|
v-if="organization.profile?.tags?.length > 0"
|
78
99
|
:chips="organization.profile.tags"
|
79
|
-
class="
|
100
|
+
class="p-medium"
|
80
101
|
/>
|
81
102
|
|
82
|
-
<p
|
83
|
-
class="t-semi mn-b-small"
|
84
|
-
>
|
85
|
-
<!-- 👍 3 212 likes · -->
|
86
|
-
<!-- 💬 342 comments · -->
|
87
|
-
👨👨👧👧 {{organization.numberOfSubscribers}} followers
|
88
|
-
</p>
|
89
|
-
|
90
|
-
<ButtonToggleMembership
|
91
|
-
v-if="
|
92
|
-
user._id
|
93
|
-
&& route.params._id
|
94
|
-
&& route.params._id !== user._id
|
95
|
-
&& organization.owner !== user._id
|
96
|
-
"
|
97
|
-
:user="user._id"
|
98
|
-
:type="'organization'"
|
99
|
-
:role="'subscriber'"
|
100
|
-
:target="organization._id"
|
101
|
-
:status="organization.isSubscriber"
|
102
|
-
:text="{create: 'Follow', remove: 'Unfollow'}"
|
103
|
-
@updateMembership="event => handleMembershipUpdate(event, 'isSubscriber', 'numberOfSubscribers')"
|
104
|
-
class="w-min mn-b-medium mn-r-auto mn-l-auto"
|
105
|
-
/>
|
106
103
|
|
107
104
|
<h4
|
108
105
|
v-if="Object.values(organization.socials).some(value => value)"
|
@@ -148,7 +145,9 @@
|
|
148
145
|
import Text from '@pf/src/components/Text/Text.vue'
|
149
146
|
import Chips from '@pf/src/components/Chips/Chips.vue'
|
150
147
|
// Icons
|
148
|
+
import IconFollowing from '@pf/src/modules/icons/entities/IconFollowing.vue'
|
151
149
|
import IconEdit from '@pf/src/modules/icons/navigation/IconEdit.vue'
|
150
|
+
import IconEllipsis from '@pf/src/modules/icons/navigation/IconEllipsis.vue'
|
152
151
|
import PlaceholderOrganizationPic from '@pf/src/modules/icons/placeholders/PlaceholderOrganizationPic.vue'
|
153
152
|
// Org Module
|
154
153
|
import ButtonToggleMembership from '@pf/src/modules/organizations/components/elements/ButtonToggleMembership.vue'
|
@@ -14,8 +14,8 @@
|
|
14
14
|
:key="organization._id"
|
15
15
|
:organization="organization"
|
16
16
|
:user="auth.state.user"
|
17
|
-
|
18
|
-
|
17
|
+
@updateMembership="handleMembershipUpdate"
|
18
|
+
class="w-max-20r radius-big"
|
19
19
|
/>
|
20
20
|
</div>
|
21
21
|
</div>
|
@@ -35,9 +35,8 @@
|
|
35
35
|
onMounted(async () => {
|
36
36
|
publics.value = await organization.actions.read({
|
37
37
|
user: auth.state.user._id,
|
38
|
-
|
38
|
+
sortParam: "profile.tags",
|
39
39
|
limit: 10,
|
40
|
-
types: ['public']
|
41
40
|
});
|
42
41
|
});
|
43
42
|
|
@@ -3,239 +3,93 @@ var jwt = require("jsonwebtoken");
|
|
3
3
|
var axios = require('axios');
|
4
4
|
var bcrypt = require("bcryptjs");
|
5
5
|
var crypto = require('crypto');
|
6
|
-
const { v4: uuidv4 } = require('uuid');
|
7
6
|
|
8
|
-
|
9
|
-
var TerminalPassword = process.env.TINKOFF_TERMINAL_PASSWORD;
|
7
|
+
const QRCode = require('qrcode');
|
10
8
|
|
11
9
|
const controllerFactory = (db) => {
|
12
10
|
const Payment = db.payment;
|
11
|
+
const Wallet = db.wallet;
|
13
12
|
const Order = db.order;
|
14
13
|
|
15
|
-
const getAll = (req, res) => {
|
16
|
-
Payment.find({}).sort({'createdAt': 'desc'}).exec((err, paymentes) => {
|
17
|
-
// If error
|
18
|
-
if (err) {return res.status(500).send({ message: err }); }
|
19
|
-
// If not found
|
20
|
-
if (!paymentes) {return res.status(404).send({ message: "Paymentes not found." }); }
|
21
|
-
// If succes
|
22
|
-
res.status(200).send(paymentes);
|
23
|
-
});
|
24
|
-
};
|
25
|
-
|
26
14
|
const create = (req, res) => {
|
27
|
-
|
28
|
-
Payment.create({
|
29
|
-
type: req.body.type,
|
30
|
-
order: req.body.order,
|
31
|
-
positions: req.body.positions
|
32
|
-
}, (err, payment) => {
|
33
|
-
if (err) {return res.status(500).send({ message: err }); }
|
34
|
-
if (!payment) {return res.status(404).send({ message: "Something wrong when updating product. (with files)" }); }
|
35
|
-
res.status(200).send(payment);
|
36
|
-
})
|
37
|
-
};
|
15
|
+
const { amount, positions, userId } = req.body;
|
38
16
|
|
39
|
-
|
40
|
-
|
41
|
-
// If error
|
42
|
-
if (err) {return res.status(500).send({ message: err }); }
|
43
|
-
// If not found
|
44
|
-
if (!payment) {return res.status(404).send({ message: "Payment not found." }); }
|
45
|
-
// If succes
|
46
|
-
res.status(200).send(payment);
|
47
|
-
});
|
48
|
-
};
|
17
|
+
const newPayment = new Payment({ amount, positions, user: userId });
|
18
|
+
await newPayment.save();
|
49
19
|
|
50
|
-
|
20
|
+
const qrData = `PaymentID:${newPayment._id};Amount:${amount}`;
|
21
|
+
const qrCode = await QRCode.toDataURL(qrData);
|
22
|
+
|
23
|
+
res.send({ qrCode, paymentId: newPayment._id });
|
24
|
+
};
|
51
25
|
|
52
|
-
|
26
|
+
const read = (req, res) => {
|
27
|
+
Payment.find({}).sort({'createdAt': 'desc'}).exec((err, paymentes) => {
|
53
28
|
// If error
|
54
29
|
if (err) {return res.status(500).send({ message: err }); }
|
55
30
|
// If not found
|
56
|
-
if (!
|
31
|
+
if (!paymentes) {return res.status(404).send({ message: "Paymentes not found." }); }
|
57
32
|
// If succes
|
58
|
-
res.status(200).send(
|
33
|
+
res.status(200).send(paymentes);
|
59
34
|
});
|
60
35
|
};
|
61
36
|
|
62
|
-
const
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
})
|
68
|
-
};
|
69
|
-
|
70
|
-
function createToken (request) {
|
71
|
-
request = Object.entries(request).map(function(key) {
|
72
|
-
return { [key[0]]: key[1] }
|
73
|
-
})
|
74
|
-
request.push({Password: TerminalPassword})
|
75
|
-
request.sort(function(a, b){
|
76
|
-
if(Object.keys(a)[0] < Object.keys(b)[0]) { return -1; }
|
77
|
-
if(Object.keys(a)[0] > Object.keys(b)[0]) { return 1; }
|
78
|
-
return 0;
|
79
|
-
})
|
80
|
-
const requestContacted = request.map(function(key) {
|
81
|
-
return Object.values(key)[0]
|
82
|
-
}).join("")
|
83
|
-
|
84
|
-
const hash = crypto.createHash('sha256').update(requestContacted).digest('hex');
|
85
|
-
|
86
|
-
return hash
|
87
|
-
}
|
88
|
-
const newpayment = (req, res) => {
|
89
|
-
// Data for payment init
|
90
|
-
console.log(req.body.phone);
|
91
|
-
// Send request to Tinkoff
|
92
|
-
axios.post('https://securepay.tinkoff.ru/v2/Init', {
|
93
|
-
TerminalKey: TerminalKey,
|
94
|
-
Amount: '350000',
|
95
|
-
OrderId: req.body._id,
|
96
|
-
Recurrent: 'y',
|
97
|
-
PayType: "О",
|
98
|
-
CustomerKey: req.body.phone,
|
99
|
-
Description: 'Оплата в интернет-магазине',
|
100
|
-
Data: {
|
101
|
-
phone: req.body.phone,
|
102
|
-
},
|
103
|
-
// SuccessURL: 'http://tandem.ohmybike.ru/rent/' + OrderId,
|
104
|
-
// FailURL: 'http://tandem.ohmybike.ru/account'
|
105
|
-
// SuccessURL: 'http://localhost:8082/rent/' + OrderId,
|
106
|
-
// FailURL: 'http://localhost:8082/account'
|
107
|
-
}).then(function(response) {
|
108
|
-
const payment = new Payment(response.data);
|
109
|
-
payment.save((err, payment) => {
|
110
|
-
if (err) {
|
111
|
-
res.status(500).send({ message: err });
|
112
|
-
return;
|
113
|
-
}
|
114
|
-
|
115
|
-
payment.save(err => {
|
116
|
-
if (err) {
|
117
|
-
res.status(500).send({ message: err });
|
118
|
-
return;
|
119
|
-
}
|
120
|
-
res.send(response.data);
|
121
|
-
});
|
122
|
-
})
|
123
|
-
}).catch(function(error) {
|
124
|
-
res.send(error);
|
125
|
-
})
|
126
|
-
|
127
|
-
};
|
128
|
-
const setpayment = (req, res) => {
|
129
|
-
// Data for payment
|
130
|
-
const payment = new Payment({
|
131
|
-
OrderId: req.body.OrderId,
|
132
|
-
Success: req.body.Success,
|
133
|
-
Status: req.body.Status,
|
134
|
-
PaymentId: req.body.PaymentId,
|
135
|
-
ErrorCode: req.body.ErrorCode,
|
136
|
-
Message: req.body.Message,
|
137
|
-
Details: req.body.Details
|
138
|
-
});
|
139
|
-
// Wright to db
|
140
|
-
console.log(payment)
|
37
|
+
const update = (req, res) => {
|
38
|
+
const session = await mongoose.startSession();
|
39
|
+
session.startTransaction();
|
40
|
+
try {
|
41
|
+
const { paymentId, walletId } = req.body; // Теперь мы работаем с walletId
|
141
42
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
43
|
+
const payment = await Payment.findById(paymentId).session(session);
|
44
|
+
|
45
|
+
if (!payment) {
|
46
|
+
throw new Error('Payment not found');
|
47
|
+
}
|
48
|
+
if (payment.status !== 'pending') {
|
49
|
+
throw new Error('Payment is not in a pending state');
|
146
50
|
}
|
147
51
|
|
148
|
-
|
149
|
-
if (err) {
|
150
|
-
res.status(500).send({ message: err });
|
151
|
-
return;
|
152
|
-
}
|
52
|
+
const wallet = await Wallet.findById(walletId).session(session);
|
153
53
|
|
154
|
-
|
155
|
-
|
156
|
-
})
|
157
|
-
};
|
158
|
-
const getstatus = (req, res) => {
|
159
|
-
console.log(req.body.order)
|
160
|
-
Payment.findOne({
|
161
|
-
OrderId: req.body.order
|
162
|
-
})
|
163
|
-
.sort({createdAt: -1})
|
164
|
-
.exec((err, payment) => {
|
165
|
-
if (err) {
|
166
|
-
res.status(500).send({ message: err });
|
167
|
-
return;
|
168
|
-
}
|
169
|
-
if (!payment) {
|
170
|
-
return res.status(404).send({ message: "Payment Not found." });
|
54
|
+
if (!wallet) {
|
55
|
+
throw new Error('Wallet not found');
|
171
56
|
}
|
172
57
|
|
173
|
-
|
174
|
-
|
175
|
-
console.log(payment.Status)
|
176
|
-
console.log(req.body.order)
|
177
|
-
Order.findOneAndUpdate({ _id: req.body.order, status: 'Подтвержден' }, {$set: {status: "Ожидает отправки"}},{ new: true}).catch(function(error) {
|
178
|
-
res.status(500).send(error);
|
179
|
-
});
|
58
|
+
if (wallet.amount < payment.amount) {
|
59
|
+
throw new Error('Insufficient funds');
|
180
60
|
}
|
181
61
|
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
62
|
+
// Списание средств с кошелька
|
63
|
+
wallet.amount -= payment.amount;
|
64
|
+
await wallet.save({ session });
|
65
|
+
|
66
|
+
// Обновление статуса платежа
|
67
|
+
payment.status = 'completed';
|
68
|
+
await payment.save({ session });
|
69
|
+
|
70
|
+
await session.commitTransaction();
|
71
|
+
res.send('Payment processed successfully');
|
72
|
+
} catch (error) {
|
73
|
+
await session.abortTransaction();
|
74
|
+
res.status(500).send(error.message);
|
75
|
+
} finally {
|
76
|
+
session.endSession();
|
77
|
+
}
|
194
78
|
};
|
195
79
|
|
196
|
-
const
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
CustomerKey: req.body,
|
202
|
-
Token: createToken({TerminalKey: TerminalKey, CustomerKey: req.body.phone})
|
203
|
-
})
|
204
|
-
.then(function(response) {
|
205
|
-
res.send(response.data);
|
206
|
-
})
|
207
|
-
.catch(function(error) {
|
208
|
-
res.status(500).send(error);
|
209
|
-
});
|
210
|
-
}
|
211
|
-
|
212
|
-
const getcustomercards = (req, res) => {
|
213
|
-
axios.post('https://securepay.tinkoff.ru/v2/GetCardList', {
|
214
|
-
TerminalKey: TerminalKey,
|
215
|
-
CustomerKey: req.body.phone,
|
216
|
-
Token: createToken({TerminalKey: TerminalKey, CustomerKey: req.body.phone})
|
217
|
-
})
|
218
|
-
.then(function(response) {
|
219
|
-
console.log(response.data)
|
220
|
-
res.send(response.data);
|
80
|
+
const deletePayment = (req, res) => {
|
81
|
+
Payment.findOneAndDelete({_id: req.params._id}, (err, payment) => {
|
82
|
+
if (err) {return res.status(500).send({ message: err }); }
|
83
|
+
if (!payment) {return res.status(404).send({ message: "Something wrong when deleting payment." }); }
|
84
|
+
res.status(200).send(payment);
|
221
85
|
})
|
222
|
-
|
223
|
-
res.status(500).send(error);
|
224
|
-
});
|
225
|
-
}
|
86
|
+
};
|
226
87
|
|
227
88
|
return {
|
228
|
-
getAll,
|
229
89
|
create,
|
230
|
-
|
90
|
+
read,
|
231
91
|
update,
|
232
92
|
delete: deletePayment,
|
233
|
-
createToken,
|
234
|
-
newpayment,
|
235
|
-
setpayment,
|
236
|
-
getstatus,
|
237
|
-
addcustomer,
|
238
|
-
getcustomercards
|
239
93
|
};
|
240
94
|
};
|
241
95
|
|